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