3 | | Building a FreeBSD kernel i386 called file:DEBUG on an amd64 can cause some headache: |
4 | | build# sh -c 'MACHINE_ARCH=i386 MACHINE=i386 MAKEOBJDIRPREFIX=/usr/obj/nanobsd.wleiden/i386 make KERNCONF=DEBUG NO_MODULES=yes buildkernel' |
| 5 | master# svn checkout http://svn.wirelessleiden.nl/svn/code/iris/trunk/nanobsd /root/nanobsd |
| 6 | master# mkdir -p /usr/local/jail/i386 |
| 7 | master# csup -h cvsup.nl.freebsd.org /usr/share/examples/cvsup/standard-supfile |
| 8 | master# cd /usr/src |
| 9 | master# make buildworld TARGET=i386 |
| 10 | master# make installworld TARGET=i386 DESTDIR=/usr/local/jail/i386 |
| 11 | master# kldload nullfs |
| 12 | master# mkdir -p /usr/local/jail/i386/usr/ports ; mount_nullfs /usr/ports /usr/local/jail/i386/usr/ports |
| 13 | master# mkdir -p /usr/local/jail/i386/usr/obj ; mount_nullfs /usr/obj /usr/local/jail/i386/usr/obj |
| 14 | master# mkdir -p /usr/local/jail/i386/root/nanobsd ; mount_nullfs /root/nanobsd /usr/local/jail/i386/root/nanobsd |
| 15 | master# chroot /usr/local/jail/i386/ |
| 16 | jail# setenv UNAME_m i386 |
| 17 | jail# setenv UNAME_m i386 |
| 18 | jail# /root/nanobsd/tools/package-build.sh |
| 19 | jail# patch -d /usr/src/sys/dev/usb -i /root/nanobsd/misc/patches/usbdevs.patch |
| 20 | jail# patch -d /usr/src/sys/dev/usb/net -i /root/nanobsd/misc/patches/if_udav.c.patch |
| 21 | jail# sh /usr/src/tools/tools/nanobsd/nanobsd.sh -c /root/nanobsd/cfg/nanobsd.wleiden |
| 22 | Info: This build will fail ones it tries to play around with memory disks. |
| 23 | jail# exit |
| 24 | master# setenv CFG_ROOT_PASSWORD `dd if=/dev/random bs=10k count=10 | tr -cd '[a-zA-Z0-9]' | cut -c -15` |
| 25 | master# echo $CFG_ROOT_PASSWORD |
| 26 | master# sh /usr/src/tools/tools/nanobsd/nanobsd.sh -c /root/nanobsd/cfg/nanobsd.wleiden |
| 27 | master# ls -alh /usr/obj/nanobsd.wleiden/_.disk.* |