The Netbook Pro boot and Linux install process The Boost bootloader needs several specific files in order to get a Linux kernel running from the internal NAND flash. Each file needs to have a binary header that tells Boost what to do with this file. To install Linux you need four files: nBkPro.img: The bootloader script that does the flash partitioning. NBLXLoad.sh: A shell script called from the initrd to write the root filesystem to flash. nBkProOs.img: A combined kernel and initrd image bootable by Boost. *.jffs2: A jffs2 root filesystem image. nBkPro.img: Bootloader script just contains a set of Boost commands to erase and partition the NAND flash. It is a simple unix-style text file (one command per line) with a Boost header. Bootloader script: nBkPro.img Create the header with these parameters: Checksum: cksum -p Image Flags: 3 Load Offset: 0x00100000 Platform id: 0x326B426E Image id: 0x53745342 Name: "netBook LX BooSt script" Where boost script file contains the commands to be run by boost. For LX prototype this should be: nand -ignore erase 18 ee8 nand partition e8 For a normal NBP the correct value should be 7e8 instead of e8. NAND kernel images: The combined kernel and initrd images are built in a similar way. We need these files: - Kernel image from arch/arm/boot/Image - An 8 MB initrd image (add the kernel modules if necessary). The wapper consists of a raw zlib compressed piece of binary code that consists of kernel, initrd and some glue executable code that copies these pieces into the right place. The most clean solution is to get these values from the kernel source (include/asm-arm/setup.h), copy the files in place and set up the ATAGs accordingly. The wrapper implements in this order: - Disable IRQs - Clear caches - Set up mmu (not completely clear yet) - Determins location for tags and machine type. - Copy tags - Start kernel It might be an idea to use a really simple bootloader for this purpose and inline the large binary blocks (kernel and initrd) in this. It should be possible to go without the wrapper and add the header to a combined kernel+initrd file with the kernel padded to have the initrd with the correct offset to the kernel. The kernel/initrd wrapper needs these parameters for the boost header: Checksum: cksum -p Load offset: 0x408000 Platform id: 0x326B426E Image id: default (0, intended to be unique) Version marker: "K123m" (necessary? critical?) For NAND: Flags: 0x10013 Max. size: 3702784 For CF: Flags: 0x10003 Max size: 8388608 The construction of the Boost headers: You need to calculate a checksum for the file and for the header itself using the cksum tool. The header is 256 bytes long where the last four bytes are used to store the header checksum. All number fields in the header are 32bit unsigned integers in little endian format. Strings are 8bit and padded to the full field length with zeros. The branch instruction needs to be calculated to meet the ARM pipeline length from the image entry offset in this way: uint32_t bi = (0xEA << 24) | ((offset + 248) / 4) & 0x00FFFFFF Usually the offset is 0 for our images. The image size is the file size in bytes, the target filename is "nBkProOs.img" and likely to be used to check the file on CF. Set the mutex_bits to 0. The header looks like this: struct boost_header { uint32_t branch_instruction; uint32_t fill_bytes = 0000; uint32_t image_id; uint32_t platform_id; uint32_t image_size; uint32_t image_checksum; uint32_t load_offset; uint32_t flags; char target_filename[16]; char fill_bytes[48] = {0}; char image_name[64]; char image_version_string[64]; uint32_t mutex_bits; char fill_bytes[24]; uint32_t: checksum; } About the flags: Bit Meaning 0 RAM image 1 Store without header 2 Erase target region before saving 3 No reset before starting the image 4 Copy to OS partition 16 Image is compressed with zlib 17 Image includes splash screen