1 ------------------------------------------------------------------------
3 ------------------------------------------------------------------------
8 To boot fast into the OS (Linux), this board port integrates the SPL
9 framework. This means, that a special, stripped-down version of
10 U-Boot runs in the beginning. In the case of the A3M071 board, this
11 SPL U-Boot version is less than 16 KiB big. This SPL U-Boot can either
12 boot the OS (Linux) or a "real", full-blown U-Boot. This detection
13 on whether to boot Linux or U-Boot is done by using the "boot_os"
14 environment variable. If "boot_os" is set to "yes", Linux will be
15 loaded and booted from the SPL U-Boot version. Otherwise, the
16 full-blown U-Boot version will be loaded and run.
18 Enabling Linux booting:
19 -----------------------
25 $ fw_setenv boot_os yes
27 Enabling U-Boot booting:
28 ------------------------
34 $ fw_setenv boot_os no
37 Preparing Linux image(s) for booting from SPL U-Boot:
38 -----------------------------------------------------
39 To boot the Linux kernel from the SPL, the DT blob (fdt) needs to get
40 prepard/patched first. U-Boot usually inserts some dynamic values into
41 the DT binary (blob), e.g. autodetected memory size, MAC addresses,
42 clocks speeds etc. To generate this patched DT blob, you can use
43 the following command:
45 1. Load fdt blob to SDRAM:
46 => tftp 1800000 a3m071/a3m071.dtb
48 2. Set bootargs as desired for Linux booting (e.g. flash_mtd):
49 => run mtdargs addip2 addtty
51 3. Use "fdt" commands to patch the DT blob:
56 4. Display patched DT blob (optional):
59 5. Save fdt to NOR flash:
60 => erase fc060000 fc07ffff
61 => cp.b 1800000 fc060000 10000
63 All this can be integrated into an environment command:
64 => setenv upd_fdt 'tftp 1800000 a3m071/a3m071.dtb;run mtdargs addip2 addtty; \
65 fdt addr 1800000;fdt boardsetup;erase fc060000 fc07ffff; \
66 cp.b 1800000 fc060000 10000'
69 After this, only "run upd_fdt" needs to get called to load, patch
70 and save the DT blob into NOR flash.
72 Additionally, the Linux kernel image has to be saved uncompressed in
73 its uImage file (and not gzip compressed). This can be done with this
76 $ mkimage -A ppc -O linux -T kernel -C none -a 0 -e 0 \
77 -n "Linux Kernel Image" -d vmlinux.bin uImage.uncompressed
79 ------------------------------------------------------------------------
80 Stefan Roese, 2012-08-23