Lukasz Majewski | f3adb66 | 2019-12-08 22:06:56 +0100 | [diff] [blame] | 1 | Building SPL/U-Boot for xea board |
| 2 | ================================= |
| 3 | |
| 4 | Setup environment, configure and build, e.g. by: |
| 5 | |
| 6 | $ make imx28_xea_defconfig |
| 7 | $ make -j4 u-boot.sb u-boot.img |
| 8 | |
| 9 | Now you should see u-boot.sb and u-boot.img files in the build directory. |
| 10 | |
| 11 | |
| 12 | Booting |
| 13 | ======= |
| 14 | |
| 15 | The boot ROM loads SPL from SPI NOR flash into SRAM. SPL configures |
| 16 | DRAM and loads either a Linux kernel (falcon mode) or, if the rescue |
| 17 | pin is asserted, the main U-Boot. Both kernel and U-Boot reside in |
| 18 | eMMC boot partition 0. For redundancy, a copy of U-Boot is also |
| 19 | stored in SPI flash. If a valid kernel image is not found, U-Boot is |
| 20 | loaded from eMMC or, if this fails, SPI flash. |
| 21 | |
| 22 | Boot area layout |
| 23 | ---------------- |
| 24 | |
| 25 | SPI NOR |
| 26 | Offset Function File |
| 27 | ------------------------------------------ |
| 28 | 0x00000000 SPL u-boot.sb |
| 29 | 0x00010000 U-Boot u-boot.img |
| 30 | 0x00080000 Environment |
| 31 | |
| 32 | eMMC |
| 33 | Offset Function File |
| 34 | ------------------------------------------ |
| 35 | 0x00000000 U-Boot u-boot.img |
| 36 | 0x00080000 Devicetree imx28-bttc.dtb |
| 37 | 0x00100000 Kernel uImage |
| 38 | |
| 39 | |
| 40 | Falcon mode |
| 41 | =========== |
| 42 | |
| 43 | In falcon mode, the default, SPL loads the kernel and devicetree |
| 44 | directly. For this to work, the stored devicetree must include |
| 45 | correct "memory" and "chosen" nodes as these are not updated by SPL |
| 46 | before booting the kernel. |
| 47 | |
| 48 | |
| 49 | Updating from U-Boot |
| 50 | ==================== |
| 51 | |
| 52 | The default U-Boot environment includes command sequences to update |
| 53 | SPL, U-Boot, and kernel over TFTP. These are as follows: |
| 54 | |
| 55 | - update_spl: writes u-boot.sb to SPI NOR |
| 56 | - update_uboot: writes u-boot.img to eMMC and SPI NOR |
| 57 | - update_kernel: writes kernel and devicetree to eMMC |
| 58 | |
| 59 | They can be invoked at the U-Boot prompt using the "run" command, |
| 60 | e.g. "run update_spl" to update the SPL. |
| 61 | |
| 62 | These update commands download the above-named files from the |
| 63 | ${hostname} directory on the server provided by DHCP. |