SSD/Linux - Developer's Note
Japanese | English
Table of Contents
- 0. Introduction
- 1. How to get source code
- 2. Structure of source tree
- 3. Software package source
- 3.0 Version control of software package
- 4. Patch files
- 5. Compile
- 6. Compile options
- 7. Cross build
- 8. Kernel source
- 9. How to create initrd == OpenBlockS series ==
- 10. Crunched Binary == i386 ==
- 11. Version up glibc
- 11.0. Prepare header files and libraries
- 11.1. Build binaries based on glibc-2.3.2
- 11.2. Update and finish
- 12. Version up gcc
- 13. Version up kernel
- 14. Update from 0.2-current to 0.3-current with binary sets
0. Introduction
The userland source tree of SSD/Linux imitates NetBSD.
For /usr/share/mk NetBSD's one is used almost as is and BSD make (bmake(1)) instead of GNU make (make(1)) is used to compile the tree.
You may imagine structure of directories and /etc/rc from `BSD like Linux' but what is called `BSD like' for SSD/Linux means this source tree.
The userland of Linux is a set of software packages released individually not as BSD.
It is ideal to control all sources in /usr/src under CVS as BSD but it is impossible to continue to maintain all software packages in /usr/src by about two developers.
Therefore in SSD/Linux software packages released individualy are extracted in /usr/src/dist and they are referenced by bmake(1) with .PATH.
A number of packages, GNU software, use to create Makefile by configure.
Although they support a number of OS's flexibly, it takes much time to compile.
Since it is necessary for Makefile supporting BSD make to create Crunched Binary and it is easy to support Cross Building, in SSD/Linux except the large packages, glibc and gcc etc., Makefiles are rewriten for BSD make to compile directly.
1. How to get source code
The source code of SSD/Linux is available from the following URL.
ftp://ftp.plathome.co.jp/pub/ssdlinux/0.3-LATEST/source/
The source code is gzipped tar to ./source/src.tgz in iso image too.
If you want to the latest source code, get it by CVS.
If you want each file, kernel pathes and .config file etc., get it from CvsWeb.
For kernel patches and .config file, see 8. Kernel source.
2. Structure of source tree
Structure of source tree is in the following:
/usr/src/ bin/ : /bin source tree contrib/ : /usr/contrib source tree cross/ : /usr/cross source tree dist/ : directory for extracting software packages distfiles/ : distfiles for software packages distrib/ : distribution building tree etc/ : /etc source tree lib/ : /lib, /usr/lib source tree libexec/ : /usr/libexec source tree linux/ : symbolic link to linux-2.4.2x linux-2.4.2x/ : kernel source tree (created by mkdist/kernel/Makefile) mkdist/ : tree for fetcheing and extracting software packages sbin/ : /sbin source tree share/ : /usr/share source tree tools/ : tree to update glibc usr.bin/ : /usr/bin source tree usr.sbin/ : /usr/sbin source tree
Since /usr/src/dist and /usr/src/linux-2.4.2x in the above tree do not include code to maintain under SSD/Linux, they are not gzipped tar to src.tgz and CVS Repository.
/usr/src/linux-2.4.2x and /usr/src/linux are created by ./mkdist/kernel/Makefile.
Create /usr/src/dist and /usr/src/dist/distfiles by mkdir(1).
3. Software package source
You should to fetch and extract pristine software packages in /usr/src/dist at first to compile source tree.
After extracting src.tgz or checkouting /usr/src by cvs, create /usr/src/dist and /usr/src/dist/distfiles by mkdir(1) at first.
# mkdir -p /usr/src/dist/distfiles
SSD/Linux has the structure to fetch sources just as pkgsrc of NetBSD and software package source (henceforth distfiles) fetched by ftp(1) in /usr/src/dist/distfiles and extracted in /usr/src/dist.
Kernel is extracted in /usr/src/linux-2.4.2x as follows.
# cd /usr/src/mkdist && bmake
Since the above operation is done automatically with `cd /usr/src && bmake build', it is not necessary to do interactively usually.
All distfiles are included in iso image.
If you have iso image, you had better copy in /usr/src/dist/distfiles beforehand.
Ftp(1) of SSD/Linux is tnftp implemented in NetBSD.
If you need to use proxy, execute `man ftp'.
After a software package is extracted, the information for the version of the software package extracted in /usr/src/dist/XXX is added to /usr/src/dist/VERSIONS with reference to /usr/src/mkdist/XXX/Makefile(XXX is the name of package).
If the information for the version in /usr/src/mkdist/XXX/Makefile is changed, inconsistency is detected with the content of /usr/src/dist/VERSIONS and source is fetched and extracted automatically.
/usr/src/dist/VERSIONS is used to decide whether build tree (/usr/src/lib/glibc/build for glibc) is updated or not for software packages to use configure to compile as gcc and glibc etc.
The information for the version of build tree is saved in .version (/usr/src/lib/glibc/.version for glibc) when build tree is created by executing bmake(1).
4. Patch files
There are three types of patch file in SSD/Linux as follows.
- Patch files distributed publicly
They are fetched in /usr/src/dist/distfiles as distfiles of a software package and are applied to when source code is extracted in /usr/src/dist. - Special patch files applied to SSD/Linux
Source code to which patch files are applied is extracted in /usr/src/usr.bin/XXX with help of bmake(1) referring a current directory precedence over paths defined at .PATH. - Special patch files applied to SSD/Linux and uses configure to compile
Patch files are in /usr/src/mkdist/XXX (source code of SSD/Linux) and are applied to /usr/src/dist/XXX.
5. Compile
You must execute export environment variables, HOSTTYPE, MACHTYPE, and SHELL before compiling.
# export HOSTTYPE # export MACHTYPE # export SHELL
Execute `bmake build' to complie as NetBSD.
# cd /usr/src && bmake build
Files are installed in / (root) by `bmake build'.
If DESTDIR is defined, they are installed in the other directory.
# cd /usr/src && bmake DESTDIR=/home/dest build
Add a option, -DNOCLEAN, not to clean objects compiled.
# cd /usr/src && bmake -DNOCLEAN build
After installation in / (root) by `bmake build', The option, -DSKIPBUILD, is effective than -DNOCLEAN to copy them in DESTDIR.
While the step of clean is skiped by -DNOCLEAN, the step of compile (build) is also skipped and of installation is only done by -DSKIPBUILD.
# cd /usr/src # bmake build # bmake DESTDIR=/home/dest -DSKIPBUILD build
Use `bmake release' to create the distribution tree including boot images and FlashROM images.
You must defilne DESTDIR and RELEASEDIR which is a path of the distribution tree for `bmake release'.
# cd /usr/src # bmake DESTDIR=/home/dest RELEASEDIR=/home/release release
Or execute `bmake build' followed with `bmake release' with -DSKIPBUILD
# cd /usr/src # bmake build # bmake DESTDIR=/home/dest RELEASEDIR=/home/release -DSKIPBUILD release
For rebuild each binary, for example vi(1), execute as follows.
# cd /usr/src/usr.bin/vi # bmake # bmake install
`bmake build' may not work well for undefined variables etc. since include files for bmake(1) in /usr/src/share/mk are updted if you update the source code with CVS.
Update /usr/share/mk by `bmake update_mk' such a case.
# cd /usr/src && bmake update_mk
`bmake build' may not work well for undefined variables etc. since include files for bmake(1) in /usr/src/share/mk are updted if you update the source code with CVS.
`bmake update_mk' ignore DESTDIR even if it is defined in /etc/mk.conf (See the next section) and copy /usr/src/share/mk to /usr/share/mk.
6. Compile options
There are compile options in the following.
Variable name | Variable value | Description |
---|---|---|
BUILD_SRCDIST | `yes' or `no' | To create src.tgz by `bmake release'. |
BUILD_DISTFILES | `yes' or `no' | To create distfiles/ by `bmake release'. |
CROSS_BUILD | powerpc | To cross build for the specified architecture unless undefined. |
DESTDIR | Path of directory | Path installed in. |
DEVELOPTOOLS | `yes' or `no' | 'no' may not work well. |
FULL_SHARED | `yes' or `no' | To build /bin and /sbin with shared libraries. |
HAVE_CVS | `yes' or `no' | Which you use CVS or /usr/src as source code gzipped tar to src.tgz by 'bmake release. For `yes' you must configure to access CVS Repository. |
IPV6 | `yes' or `no' | To use IPv6. |
KERNEL_CONFIG | Path of file | Path of the user defined .config instead of the default directory, /usr/src/linux/.config, of SSD/Linux. |
OLD_GLIBC | 2.x.x | It specifies the internal variable, GLIBC_VERSION, to an old version for debugging when major version updating glibc with /usr/src/tools. |
OPENBLOCKS | `obs200', `obs266', or 'none' | `obs200' or `obs266' for OpenBlockS series and `none' for i386. |
MTA | `sendmail' or `postfix' | Which you use sendmail or postfix as MTA. |
MASTER_SITE_OVERRIDE | Any URL | To get distfiles in /usr/src/mkdist from it. |
NEW_GLIBC | 2.x.x | Major version updating glibc with /usr/src/tools. |
NEW_GLIBC_HEADERS | Path of directory | Path of directory of header files included with /usr/src/tools. |
NEW_GLIBC_LIBS | Path of directory | Path of directory of librariry files used with /usr/src/tools. |
NEW_KERNEL_PATCH | Any strings | Variable to create or update kernel patch for OpenBlockS series. |
RCS_LOCALID | ssdlinux | Local keyword embeded in cvs binary. |
RELEASEDIR | Path of directory | Path of distribution tree installed. |
SSDCVSDATE | YYYYMMDD | Date of source code gzipped tar to src.tgz by `bmake release'. The current date is exported if SSDCVSTAG and SSDCVSDATE are undefined. |
SSDCVSTAG | CVS tag of RELENG_0_1 etc. | CVS tag of source code gzipped tar to src.tgz by `bmake release'. |
USE_EXT3FS | `yes' or `no' | To use ext3 file system. For `yes' you must configure to modify or check /usr/src/linux/.config. |
USE_PAM | `yes' or `no' | To use PAM or not. |
USE_PCMCIA | `yes' or `no' | To use PCMCIA or not. |
These options are configured in /etc/mk.conf.
If CROSS_BUILD is configured, /etc/mk.conf.${CROSS_BUILD} is read after /etc/mk.conf.
You must give bmake(1) options as command line ones.
OK # bmake DESTDIR=/home/dest build NG # DESTDIR=/home/dest bmake build
For details see /usr/share/mk/bsd.own.mk and /usr/share/mk/bsd.mkdist.mk.
There may be variables which we have forgot or are obsolete.
7. Cross build
Configure CROSS_BUILD, OPENBLOCKS, and DESTDIR to cross build binaries for OpenBlockS series under i386.
It is impossible to cross build for i386 under OpenBlockS series.
# export PATH=$PATH:/usr/cross/powerpc/bin # cd /usr/src # bmake CROSS_BUILD=powerpc OPENBLOCKS=obs200 DESTDIR=/home/dest build
`bmake release' works well with RELEASEDIR defined.
# cd /usr/src # bmake CROSS_BUILD=powerpc OPENBLOCKS=obs200 DESTDIR=/home/dest \ RELEASEDIR=/home/relase release
You may create the distribution set of both i386 and OpenBlockS series under i386 by an simple script (/usr/src/Build.sh) with help of /etc/mk.conf and /etc/mk.conf.${CROSS_BUILD}.
○/etc/mk.conf
RELEASEDIR?= /home/release RCS_LOCALID= ssdlinux SSDCVSTAG= OPENBLOCKS?= none
○/etc/mk.conf.powerpc
DESTDIR?= /home/dest
○/usr/src/Build.sh
#!/bin/sh bmake build bmake -DSKIPBUILD DESTDIR=/home/dest release bmake CROSS_BUILD=powerpc OPENBLOCKS=obs200 BUILD_SRCDIST=no \ BUILD_DISTFILES=no release bmake CROSS_BUILD=powerpc OPENBLOCKS=obs266 BUILD_SRCDIST=no \ BUILD_DISTFILES=no release
8. Kernel source
The kernel source of SSD/Linux is based on one from BitKeeper Kernel 2.4 Development of PowerPC Kernel Archives and is implemented the IPv6 protocol stack by USAGE Project and the special patches for OpenBlockS series are applied to it.
(The officail pathes (sync_fs-2.4.20.diff, CAN-2003-0127.diff etc.) are applied to if necessary.)
There are cases that kernel source to which patch files are applied is in dist/distfile temporarily and, patch files itself are distributed and they are merged to the special patch file later on, during supporting a new architecture (a new product of OpenBlockS) or just after supporting.
There is a case that a temporary file with *-YYYYMMDD is distributed during merging.
/usr/src/dist/distfiles/ linux-ppc-2.4.20.tar.bz2 BitKeeper Kernel 2.4 Development usagi-linux24-stable_20030214-2.4.20.diff.bz2 USAGE stable 4.1 patch /usr/src/mkdist/kernel/ linux-ppc-2.4.20-obs.diff Special patch file for OpenBlockS series /usr/src/mkdist/kernel/ linux-ppc-2.4.20-obs266.diff Temporary patch file for OpenBlockS 266 sync_fs-2.4.20.diff CAN-2003-0127.diff linux-ppc-2.4.20-obs-YYYYMMDD Temporary patch file during merging
Since BitKeeper Kernel is not tarballed nor Release tagged for each release, the latest ChangeSet@ of linux-2.4.2x is tarballed (linux-ppc-2.4.2x.tar.bz2) by bk(1) (BitKeeper) and it is the distfiles as follows.
The ChangeSet@ is indicated in /usr/src/mkdist/kernel/Makefile.
Copy (clone) Repository of BitKeeper Kernel 2.4 Development
# /usr/local/bitkeeper/bk clone \ -d http://ppc.bkbits.net/linuxppc_2_4_devel \ /any_work_dir/linuxppc_2_4_devel
If there is a copy (clone) of Repository, update (pull).
# cd /any_work_dir/linuxppc_2_4_devel # /usr/local/bitkeeper/bk pull
Export ChangeSet@ specified (ChangeSet@1.1176 in an example below) and tarball (linux-ppc-2.4.20.tar.bz2).
# cd /any_work_dir/linuxppc_2_4_devel # /usr/local/bitkeeper/bk export -vwk -r1.1176 . /any_work_dir/linux-2.4.20 # cd /any_work_dir # tar cvf linux-ppc-2.4.20.tar linux-2.4.20 # bzip2 -9 linux-ppc-2.4.20.tar
Files, .config, of kernel (default in SSD/Linux) are in /usr/src/mkdist/kernel.
Values of HOSTTYPE, MACHTYPE, OPENBLOCKS, IPV6, and CROSS_BUILD are read by 'bmake build' and the corresponding file is copied as /usr/src/linux/.config.
/usr/src/mkdist/kernel/ dot.config-2.4.2x.i386 for i386 dot.config-2.4.2x.i386.ipv6 for i386 with IPv6 dot.config-2.4.2x.powerpc-obs200 for OpenBlockS 200 dot.config-2.4.2x.powerpc-obs200.ipv6 for OpenBlockS 200 with IPv6 dot.config-2.4.2x.powerpc-obs266 for OpenBlockS 266 dot.config-2.4.2x.powerpc-obs266.ipv6 for OpenBlockS 266 with IPv6 dot.config-2.4.2x.*-YYMMDD temporary .config file during merging
9. How to create initrd == OpenBlockS series ==
Initrd, i.e., FlashROM image file, zImage.initrd.treeboot, for OpenBlockS series is created as follows.
# cd /usr/src && bmake build # cd /usr/src/distrib && bmake bootfs
zImage.initrd.treeboot is in the following directory.
The image file with -product is one including Web based set up tool (setup.cgi).
/usr/src/distrib/powerpc-obs2xx/ treeboot/zImage.initrd.treeboot treeboot-product/zImage.initrd.treeboot-product
Ramdisk image (file system of initrd) included in zImage.initrd.treeboot is created in the following directory.
/usr/src/distrib/powerpc-obs2xx/ initrd/ramdisk.image.gz initrd-product/ramdisk.image-product.gz
If you want to add files to initrd, mount ramdisk.image as a loop device at /mnt and add files as follows.
# cd /usr/src/distrib/powerpc-obs2xx/initrd # gunzip ramdisk.image.gz # losetup /dev/loop0 ramdisk.image # associate loop device with ramdisk.image # mount /dev/loop0 /mnt # mount at /mnt : Add files in /mnt : # umount /mnt # losetup -d /dev/loop0 # detach loop device # cd /usr/src/distrib/powerpc-obs2xx/initrd # gzip -9 ramdisk.image # cd /usr/src/distrib/powerpc-obs2xx/treeboot # bmake clean # bmake # create zImage.initrd.treeboot
If you want to reduce functions included in initrd, you may modify LIST_S in /usr/src/distrib/powerpc-obs2xx/initrd-product/Makefile.
See /usr/src/distrib/powerpc-obs2xx/initrd/list_in for files included in initrd by LIST_S.
For example to remove named, sendmail, and vtund
Modify Makefile as follows.
# $ssdlinux: Makefile,v 1.1 2002/12/27 05:20:12 kanoh Exp $ .include <bsd.own.mk> EXTENSION= -product #LIST_S= common dhcpd ipv6 modules named pcmcia ppp pppoe sendmail \ # vtund useradd httpd setup_cgi LIST_S= common dhcpd ipv6 modules pcmcia ppp pppoe useradd httpd setup_cgi .include "${.CURDIR}/../initrd/Makefile.inc
Execute bmake(1) to recreate ramdisk.image.gz.
# cd /usr/src/distrib/powerpc-obs2xx/initrd-product # bmake clean && bmake
10. Crunced Binary == i386 ==
Crunched Binary now supports i386 only.
OpenBlockS series is not supported since glibc with static nss cannot be compiled under PowerPC architecture.
You should list all object name with `special xxx objs' descripter in conf file since search for object does not work well although the way of use is similar to NetBSD.
See /usr/src/distrib/i386/ramdiskbin/ramdiskbin.conf.in for details.
11. Version up glibc
We describe about updating glibc, here from 2.3.1 to 2.3.2.
For from 2.3.2 to 2.3.3 replace 2.3.1 and 2.3.2 with 2.3.2 and 2.3.3, respectively below.
We do not check to do well from 2.3.1 to 2.3.3.
The procedure to update glibc from 2.3.1 to 2.3.2 as follows.
It is not need for almost SSD/Linux users to follow the procedure to update glibc and we recommend for you not to do so.
The first, the system may not break down.
The second, it is heavy jobs for the system and shall use large amount of the hard disks and takes very long time.
We recommend to update by way when the binary sets will be released based on glibc-2.3.2.
Prepare header files and libraries used by tools.
Create them in the following procedure or download them from here ( 2.3.2, 2.3.3 ) for i386 and ( 2.3.2 , 2.3.3 ) for OpenBlockS.
Compile and install glibc-2.3.2 under the system with glibc-2.3.1.
Let the directory for installation, /home/dest, to be defined with DESTIDR.
It may be any path but not /.
If /, then the system must break down.
# cd /usr/src # bmake build # cd /usr/src/mkdist/glibc # bmake GLIBC_VERSION=2.3.2 # cd /usr/src/lib/glibc # rm -rf /home/dest # bmake GLIBC_VERSION=2.3.2 DESTDIR=/home/dest ( For updating from 2.3.2 to 2.3.3 edit an line in the /usr/src/dist/glibc/Makeconfig temporarily to install normally as follows. Old: $(elf-objpfx)$(rtld-installed-name) \ New: /lib/$(rtld-installed-name) \ ) # bmake GLIBC_VERSION=2.3.2 DESTDIR=/home/dest install ( For updating from 2.3.2 to 2.3.3 return /usr/src/dist/glibc/Makeconfig to the original. )
Cory the necessary files from /home/dest to /home/i386-headers-2.3.2. The latter may be any path.
It is refered in 11.1.
# mkdir -p /home/i386-headers-2.3.2 # cd /home/i386-headers-2.3.2 # (cd /home/dest/usr; tar cvpf - include) | tar xpf - # cd /home/i386-headers-2.3.2/include # rm asm # ln -s /usr/src/linux/include/asm-i386 asm # mkdir -p /home/i386-headers-2.3.2/lib # cd /home/i386-headers-2.3.2/lib # cp /home/dest/lib/libc.so.6 . # cp /home/dest/lib/ld-linux.so.2 . # cp /home/dest/usr/lib/libc_nonshared.a . # cp /home/dest/usr/lib/crt*.o . # cp /home/dest/usr/lib/libc.so .
Edit libc.so as follows.
Old: GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a ) New: GROUP ( libc.so.6 libc_nonshared.a )
These files have been gzipped tar to this as follows.
# cd /home # tar cvpf i386-headers-2.3.2.tar i386-headers-2.3.2 # gzip -9 i386-headers-2.3.2.tarOpenBlockS
The procedure is similar to that of i386.
Note the differences for the symbolic links and so on.
# cd /usr/src # bmake build # cd /usr/src/mkdist/glibc # bmake GLIBC_VERSION=2.3.2 # cd /usr/src/lib/glibc # rm -rf /home/dest # bmake GLIBC_VERSION=2.3.2 DESTDIR=/home/dest ( For updating from 2.3.2 to 2.3.3 edit an line in the /usr/src/dist/glibc/Makeconfig temporarily to install normally as follows. Old: $(elf-objpfx)$(rtld-installed-name) \ New: /lib/$(rtld-installed-name) \ ) # bmake GLIBC_VERSION=2.3.2 DESTDIR=/home/dest install ( For updating from 2.3.2 to 2.3.3 return /usr/src/dist/glibc/Makeconfig to the original. )
Cory the necessary files from /home/dest to /home/ppc-headers-2.3.2.
The latter may be any path.
It is refered in 11.1.
# mkdir -p /home/ppc-headers-2.3.2 # cd /home/ppc-headers-2.3.2 # (cd /home/dest/usr; tar cvpf - include) | tar xpf - # cd /home/ppc-headers-2.3.2/include # rm asm # ln -s /usr/src/linux/include/asm-ppc asm # ln -s /usr/src/linux/arch/ppc/platforms # mkdir -p /home/ppc-headers-2.3.2/lib # cd /home/ppc-headers-2.3.2/lib # cp /home/dest/lib/libc.so.6 . # cp /home/dest/lib/ld-2.3.2.so . # ln -s ld-2.3.2.so ld.so.1 # cp /home/dest/usr/lib/libc_nonshared.a . # cp /home/dest/usr/lib/crt*.o . # cp /home/dest/usr/lib/libc.so .
Edit libc.so as follows.
Old: GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a ) New: GROUP ( libc.so.6 libc_nonshared.a )
These files have been gzipped tar to this
as follows.
# cd /home # tar cvpf ppc-headers-2.3.2.tar ppc-headers-2.3.2 # gzip -9 ppc-headers-2.3.2.tar
They can be created with the cross compiling under i386.
The corresponding procedure for compiling and installtion glibc-2.3.2 is as follows.
# /usr/src/lib/glibc # bmake CROSS_BUILD=powerpc OPENBLOCKS=obs266 \ GLIBC_VERSION=2.3.2 DESTDIR=/home/dest ( It is not necessary to modify /usr/src/dist/glibc/Makeconfig for updating from 2.3.2 to 2.3.3. ) # bmake CROSS_BUILD=powerpc OPENBLOCKS=obs266 \ GLIBC_VERSION=2.3.2 DESTDIR=/home/dest install
Build biraries based on glibc-2.3.2 with tools.
- Add /usr/src/tools/toolchain/bin to the environment variable, PATH.
- Copy the file, ppc-headers-2.3.2.tar.gz in /usr/src/dist/distfiles/.
This file has been prepared in 11.0. - Add the following four lines to /etc/mk.conf.
See 11.0 for NEW_GLIBC_LIBS and NEW_GLIBC_HEADER.
i386DESTDIR=/home/dest NEW_GLIBC=2.3.2 NEW_GLIBC_LIBS=/home/i386-headers-2.3.2/lib NEW_GLIBC_HEADER=/home/i386-headers-2.3.2/include
OpenBlockSDESTDIR=/home/dest NEW_GLIBC=2.3.2 NEW_GLIBC_LIBS=/home/ppc-headers-2.3.2/lib NEW_GLIBC_HEADER=/home/ppc-headers-2.3.2/include
`bmake build' does not work well because of DESTDIR when these variables are specified on a command line.
We do not know why it does so. - Execute as follows. (common both i386 and OpenBlockS)
# cd /usr/src # bmake build
- Delete four lines added above from /etc/mk.conf.
Binaries based on glibc-2.3.2 have been created in /home/dest/.
Let explain the procedure for updating from now.
The system may break down and shall not boot at the worst case.
Anyone updating your system does so at your own risk.
- Boot the system with installation FD or CD-ROM for i386 or with initrd for OpenBlockS.
- Mount the hard disk drive and copy necessary files.
Assume that there is one partition and that it is mounted at /mnt.
Copybin lib sbin usr/bin usr/i386-ssd-linux-gnu2.3.2(i386) usr/include usr/lib usr/libexec usr/mdec(i386) usr/powerpc-ssd-linux-gnu2.3.2(OpenBlockS) usr/sbin
under /mnt/home/dest to /mnt/. - Umount the hard disk drive and reboot.
For OpenBlockS set booting from harddisk. - Add the following line to /etc/mk.conf.
GLIBC_VERSION=2.3.2
Execute as follows.# cd /usr/src # bmake build
- There are directories and files whose name includes the string `gnu2.3.2' in the system.
Remove them since they are not necessary.
Remove the line added to /etc/mk.conf above when GLIBC_VERSION in /usr/src/share/mk/bsd.own.mk would be set to 2.3.2.
12. Version up gcc
The procedure for updating gcc from 3.2.3 to 3.y.z as follows.
- Add the following line to /etc/mk.conf.
GCC_VERSION=3.y.z
- Execute as follows.
# cd /usr/src/mkdist/gcc # bmake # cd /usr/src/usr.bin/gcc # bmake && bmake install
- There are directories whose name is 3.2.3 in the system.
Remove them since they are not necessary.
Remove the line added to /etc/mk.conf above when GCC_VERSION in /usr/src/share/mk/bsd.own.mk would be set to 3.y.z.
13. Version up kernel
The procedure for updating kernel from 2.4.20 to 2.4.26 as follows.
- Add the following line to /etc/mk.conf.
KERNEL_PATCHLEVEL=26
- Execute as follows.
# cd /usr/src # bmake build
- Reboot.
i386
The name of the old kernel is /vmlinuz.old.
You had better reboot after you edit /boot/grub/menu.lst to be able to boot with it too.
OpenBlockS
Create the firmware.# cd /usr/src/distrib/utils # bmake # cd /usr/src/distrib/powerpc-obs2xx # bmake
Update the firmware with zImage.initrd.treeboot-product created in the directory, /usr/src/distrib/powerpc-obs2xx/treeboot-product/ and reboot.
Remove the line added to /etc/mk.conf when KERNEL_PATCHLEVEL in /usr/src/share/mk/bsd.own.mk would be set to 26.
14. Update from 0.2-current to 0.3-current with binary sets
The versions of kernel and glibc are different between 0.2-current and 0.3-current.
Thus it shall task to update from sources as described from 11 to 13.
The simple updating with the binary sets is described here.
The system may break down and shall not boot at the worst case.
Anyone updating your system does so at your own risk.
The procedure for updating from 0.2-current to 0.3-current with the binary sets as follows.
Assume that the system is installed in one partition /dev/hda1.
Mount it at /mnt.
When more than two partitions, mount the whole system at /mnt.
Since the procedures for i386 and OpenBlockS are almost similar, they are described at the same place below.
Intrinsic cases are indicated by `for i386' or `for OpenBlockS'.
- Download binary sets (bast.tgz、comp.tgz、kern.tgz) for i386 or OpenBlockS.
Assume that they are at /var/tmp.
For i386 execute as follows.# cd /var/tmp # tar zxpvf base.tgz ./lib/libpthread-0.10.so
Back up the kernel and make to boot with it.
For OpenBlockS download the firmware too. - Boot from installation FD or CD-ROM for i386 or from initrd for OpenBlockS.
- Mount the hard disk and extract the bianry sets.
# e2fsck /dev/hda1 # mount /dev/hda1 /mnt # cd /mnt/var/tmp # tar zxpvf base.tgz -C /mnt # tar zxpvf comp.tgz -C /mnt # tar zxpvf kern.tgz -C /mnt
For i386 execute as follows.# cp lib/libpthread-0.10.so /mnt/lib
Update the firmware for OpenBlockS. - Umount the hard disk and reboot.
For OpenBlockS boot from harddisk. - Check /usr/src/share/mk/bsd.own.mk to be latest and execute as follows.
# cd /usr/src # bmake build
There are header files and libraries of older version.
Remove them since they are not necessary.