Heinrich Schuchardt | e43a266 | 2025-04-24 14:13:12 +0200 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0-or-later |
| 2 | |
| 3 | Boot source selection |
| 4 | --------------------- |
| 5 | |
| 6 | The board provides DIP switches to select the device for loading the boot |
| 7 | firmware. |
| 8 | |
| 9 | =========== === === |
| 10 | Boot source SW1 SW2 |
| 11 | =========== === === |
| 12 | UART OFF OFF |
| 13 | SD-card ON OFF |
| 14 | eMMC OFF ON |
| 15 | SPI flash ON ON |
| 16 | =========== === === |
| 17 | |
| 18 | Flashing a new U-Boot version |
| 19 | ----------------------------- |
| 20 | |
| 21 | U-Boot SPL is provided as file spl/u-boot-spl.bin.normal.out. Main U-Boot is |
| 22 | in file u-boot.itb. |
| 23 | |
| 24 | Assuming your new U-Boot version is on partition 1 of an SD-card you could |
| 25 | install it to the SPI flash with: |
| 26 | |
| 27 | .. code-block:: console |
| 28 | |
| 29 | sf probe |
| 30 | load mmc 1:1 $kernel_addr_r u-boot-spl.bin.normal.out |
| 31 | sf update $kernel_addr_r 0 $filesize |
| 32 | load mmc 1:1 $kernel_addr_r u-boot.itb |
| 33 | sf update $kernel_addr_r 0x100000 $filesize |
| 34 | |
| 35 | For loading the files from a TFTP server refer to the dhcp and tftpboot |
| 36 | commands. |
| 37 | |
| 38 | After updating U-Boot you may want to erase a saved environment and reboot. |
| 39 | |
| 40 | .. code-block:: console |
| 41 | |
| 42 | env erase |
| 43 | reset |
| 44 | |
| 45 | Booting from SD-Card |
| 46 | -------------------- |
| 47 | |
| 48 | The device boot ROM loads U-Boot SPL (u-boot-spl.bin.normal.out) from the |
| 49 | partition with type GUID 2E54B353-1271-4842-806F-E436D6AF6985. You are free |
| 50 | to choose any partition number. |
| 51 | |
| 52 | With the default configuration U-Boot SPL loads the U-Boot FIT image |
| 53 | (u-boot.itb) from partition 2 (CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=0x2). |
| 54 | When formatting it is recommended to use GUID |
| 55 | BC13C2FF-59E6-4262-A352-B275FD6F7172 for this partition. |
| 56 | |
| 57 | Booting from eMMC |
| 58 | ----------------- |
| 59 | |
| 60 | The device boot ROM tries to load U-Boot SPL (u-boot-spl.bin.normal.out) from |
| 61 | sector 0 of the eMMC's main hardware partition. But this conflicts with GPT |
| 62 | partitioning. Fortunately eMMC can alternatively load U-Boot SPL from a backup |
| 63 | position. |
| 64 | |
| 65 | For U-Boot SPL (u-boot-spl.bin.normal.out) starting at sector 2048 (position |
| 66 | 0x100000) write the following bytes to the eMMC device after GPT partitioning: |
| 67 | |
| 68 | ======= ======================== |
| 69 | Address Bytes |
| 70 | ======= ======================== |
| 71 | 0x0000 40 02 00 00 00 00 10 00 |
| 72 | 0x0290 40 02 00 00 00 00 10 00 |
| 73 | ======= ======================== |
| 74 | |
| 75 | With the default configuration U-Boot SPL loads the U-Boot FIT image |
| 76 | (u-boot.itb) from partition 2 (CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=0x2). |
| 77 | When formatting it is recommended to use GUID |
| 78 | BC13C2FF-59E6-4262-A352-B275FD6F7172 for this partition. |
| 79 | |
| 80 | Booting from UART |
| 81 | ----------------- |
| 82 | |
| 83 | The boot ROM supports the X-modem protocol to upload |
| 84 | spl/u-boot-spl.bin.normal.out. U-Boot SPL support loading the FIT image |
| 85 | u-boot.itb via the Y-modem protocol. |
| 86 | |
| 87 | Due to restrictions of the boot ROM not all X-modem implementations are |
| 88 | compatible. The package tio (https://github.com/tio/tio) has been found to be |
| 89 | usable. |