blob: fe15ba7b798eb15da3dfb613eb97063d066c919e [file] [log] [blame]
Peng Fanbfddc7a2020-10-14 17:12:08 +08001.. SPDX-License-Identifier: GPL-2.0+
2
3mx6sabresd
4==========
5
6How to use and build U-Boot on mx6sabresd
7-----------------------------------------
8
9The following methods can be used for booting mx6sabresd boards:
10
111. Booting from SD card
12
132. Booting from eMMC
14
153. Booting via Falcon mode (SPL launches the kernel directly)
16
17
181. Booting from SD card via SPL
19-------------------------------
20
21mx6sabresd_defconfig target supports mx6q/mx6dl/mx6qp sabresd variants.
22
23In order to build it:
24
25.. code-block:: bash
26
27 $ make mx6sabresd_defconfig
28 $ make
29
30This will generate the SPL and u-boot-dtb.img binaries.
31
32- Flash the SPL binary into the SD card:
33
34.. code-block:: bash
35
36 $ sudo dd if=SPL of=/dev/sdX bs=1K seek=1 conv=notrunc && sync
37
38- Flash the u-boot-dtb.img binary into the SD card:
39
40.. code-block:: bash
41
42 $ sudo dd if=u-boot-dtb.img of=/dev/sdX bs=1K seek=69 conv=notrunc && sync
43
442. Booting from eMMC
45--------------------
46
47.. code-block:: bash
48
49 $ make mx6sabresd_defconfig
50 $ make
51
52This will generate the SPL and u-boot-dtb.img binaries.
53
54- Boot first from SD card as shown in the previous section
55
56In U-boot change the eMMC partition config::
57
58 => mmc partconf 2 1 0 0
59
60Mount the eMMC in the host PC::
61
62 => ums 0 mmc 2
63
64- Flash SPL and u-boot-dtb.img binaries into the eMMC:
65
66.. code-block:: bash
67
68 $ sudo dd if=SPL of=/dev/sdX bs=1K seek=1 conv=notrunc && sync
69 $ sudo dd if=u-boot-dtb.img of=/dev/sdX bs=1K seek=69 conv=notrunc && sync
70
71Set SW6 to eMMC 8-bit boot: 11010110
72
733. Booting via Falcon mode
74--------------------------
75
76.. code-block:: bash
77
78 $ make mx6sabresd_defconfig
79 $ make
80
81This will generate the SPL image called SPL and the u-boot-dtb.img.
82
83- Flash the SPL image into the SD card
84
85.. code-block:: bash
86
87 $ sudo dd if=SPL of=/dev/sdX bs=1K seek=1 oflag=sync status=none conv=notrunc && sync
88
89- Flash the u-boot-dtb.img image into the SD card
90
91.. code-block:: bash
92
93 $ sudo dd if=u-boot-dtb.img of=/dev/sdX bs=1K seek=69 oflag=sync status=none conv=notrunc && sync
94
95Create a partition for root file system and extract it there
96
97.. code-block:: bash
98
99 $ sudo tar xvf rootfs.tar.gz -C /media/root
100
101The SD card must have enough space for raw "args" and "kernel".
102To configure Falcon mode for the first time, on U-Boot do the following commands:
103
104- Setup the IP server::
105
106 # setenv serverip <server_ip_address>
107
108- Download dtb file::
109
110 # dhcp ${fdt_addr} imx6q-sabresd.dtb
111
112- Download kernel image::
113
114 # dhcp ${loadaddr} uImage
115
116- Write kernel at 2MB offset::
117
118 # mmc write ${loadaddr} 0x1000 0x4000
119
120- Setup kernel bootargs::
121
122 # setenv bootargs "console=ttymxc0,115200 root=/dev/mmcblk1p1 rootfstype=ext4 rootwait quiet rw"
123
124- Prepare args::
125
126 # spl export fdt ${loadaddr} - ${fdt_addr}
127
128- Write args 1MB data (0x800 sectors) to 1MB offset (0x800 sectors)::
129
130 # mmc write 18000000 0x800 0x800
131
132- Press KEY_VOL_UP key, power up the board and then SPL binary will launch the kernel directly.