Building a chain boot system from the menuconfig2 branch
Chain booting is described on the ChainBooting page. Here's how to build a system using it. This page assumes that you've already got a working Balloon build environment. There are details of how to achieve this on the SoftwareBuilding page. Note that many configuration options can now be chosen by menu instead of by editing makefiles.
First, check out the menuconfig2 branch:
svn co svn+ssh://<you>@balloonboard.org/home/balloon/svn/balloon/branches/menuconfig2
Note that the file structure checked out of svn relies on a certain number of symbolic links. For that reason, we recommend checking it out using svn on Linux. Using a tool like TortoiseSVN on Windows can lead to the symbolic links becoming short nonsense files, which breaks things. One symptom is that chain booting won't work.
You may need to install the following Debian package:
apt-get install linux-libc-dev-armel-cross
Then
make menuconfig
to get the configuration menu.
From the options, choose the following. If an option isn't mentioned here, it's not critical for getting a working system:
- Balloon3 board
- variant of your choice, probably generic
- Bootldr
- Params partition support in NOR
- Bootldr NAND support
- Buildroot rootfs (initrd)
- version November 2010
- build kernel
- select kernel version (latest, 2.6.38-rc6 as of March 2011)
- select latest yaffs version
- Re-make kernel at each make
- Make boot image
- Make kernel modules
- Make initrd kernel using buildroot
- Make initrd with kernel modules
- build rootfs
- build emdebian rootfs
- build emdebian rootfs with kernel modules
- Debian distro Debian/Squeeze
- build emdebian rootfs
Now build the lot:
make
Installation
Program bootldr (from build/bootldr/bootldrpxa.fast) into NOR using JTAG or load bootldr at existing bootldr prompt. Program zImageInitrd (fron build/kernel) into NOR using load kernel at bootldr prompt. boot at bootldr prompt
Username is root, no password.
Mount the boot partition as a YAFFS partition (the default):
mount /mnt/boot
and put your boot kernel into it:
cd /mnt/boot
and put zImageBoot there from wherever you have it - ZMODEM over the console serial port can be convenient.
When loaded, create a symlink to it:
ln -s zImageBoot vmlinuz
Now mount the root filesystem (YAFFS is the default):
mount /mnt/root
Somehow shovel your rootfs into this. There are many ways of doing this. If your Balloon setup has a USB host connector, use a USB stick or similar. Mine doesn't, so I use the procedure in Balloon3SingleSidedRootFS.
Now you can exit and reboot the system:
exit reboot
Press space bar to get into bootldr prompt very quickly!
Configure the bootldr for chain booting:
set bootscript=chainboot_nand params save
(note that bootldr params are now saved in NOR Flash rather than NAND, so bootldr doesn't need to know anything about NAND filesystems).
Boot the system:
boot
and chain booting should happen.
To get into the recovery kernel, go to the bootldr prompt (press space immediately after power-up) and do
set bootscript=exit boot flash