Skip to content
kref edited this page Oct 12, 2013 · 1 revision

With this u-boot, you can put all boot files except stage1 in a FAT formated partition.

How to build:

This assume you have arm-linux-gnueabi-gcc in your PATH

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- ox820_fat_config
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4 all u-boot.img

it will generate u-boot.bin u-boot.img spl/u-boot-spl.bin among others

How it works:

u-boot-spl.bin is the "stage1" in oxnas' terminology.

u-boot.bin and u-boot.img are the u-boot proper, they are almost the same.

u-boot-spl.bin is loaded by rom, it will initialize ram and disk, treat the first disk partition as FAT format, and read the file named "u-boot.img" to DRAM, then transfer control to it.

u-boot will try to load environment variables from "u-boot.env" in the FAT partition, if that failed, it will fall back to default builtin variables. Then it will boot the kernel according to the environment variables.

Note: netconsole is enabled in default env and the default ip address is 192.168.0.100.

BEFORE showing "Hit any key to stop autoboot", it will check if any keypress is received from the serial console, if not, then switch to netconsole imediately.

How to install:

  1. format your disk's first partition as FAT, (if you use sata boot, hopefully, you already have the small unformated partition, just format it), mount it, put u-boot.img in it.
  2. install u-boot-spl.bin to spare sectors
  • You can use WarheadsSE's oxnas_sata_boot.tgz, remove stage1.wrapped u-boot.wrapped uImage, link stage1.wrapped to u-boot-spl.bin, run disk_create.
  • Alternatively, if you are experienced enough, just dd u-boot-spl.bin into proper sector, and update MBR accordingly if necessary.
Clone this wiki locally