blob: bc0c0d0d1629577bbe2cb763d54798cb77bfdb71 [file] [log] [blame]
Diego Dorta20af96a2016-10-11 11:09:28 -03001How to use and build U-Boot on mx6sabresd:
2----------------------------------
3
Breno Lima0d0dc392017-04-10 09:45:29 -03004Currently there are four methods for booting mx6sabresd boards:
Diego Dorta20af96a2016-10-11 11:09:28 -03005
Breno Lima0d0dc392017-04-10 09:45:29 -030061. Booting from SD card via normal U-Boot (u-boot.imx)
Diego Dorta20af96a2016-10-11 11:09:28 -03007
Breno Lima0d0dc392017-04-10 09:45:29 -030082. Booting from eMMC via normal U-Boot
Diego Dorta20af96a2016-10-11 11:09:28 -03009
Breno Lima0d0dc392017-04-10 09:45:29 -0300103. Booting via SPL (SPL and u-boot.img)
Diego Dorta20af96a2016-10-11 11:09:28 -030011
Breno Lima0d0dc392017-04-10 09:45:29 -0300124. Booting via Falcon mode (SPL launches the kernel directly)
Diego Dorta20af96a2016-10-11 11:09:28 -030013
Breno Lima0d0dc392017-04-10 09:45:29 -030014
151. Booting from SD card via normal U-Boot
16-----------------------------------------
Diego Dorta20af96a2016-10-11 11:09:28 -030017
18$ make mx6qsabresd_defconfig (If you want to build for mx6qsabresd)
19
20or
21
22$ make mx6dlsabresd_defconfig (If you want to build for mx6dlsabresd)
23
24$ make
25
26This will generate the image called u-boot.imx.
27
28- Flash the u-boot.imx binary into the SD card:
29
30$ sudo dd if=u-boot.imx of=/dev/sdb bs=1K seek=1 && sync
31
32
Breno Lima0d0dc392017-04-10 09:45:29 -0300332. Booting from eMMC via normal U-Boot
34--------------------------------------
35
36$ make mx6qsabresd_defconfig (If you want to build for mx6qsabresd)
37
38or
39
40$ make mx6dlsabresd_defconfig (If you want to build for mx6dlsabresd)
41
42$ make
43
44This will generate the image called u-boot.imx.
45
46- Flash the u-boot.imx binary into the eMMC:
47
48Set SW6 to download mode: 00001100
49
50Plug a usb cable to USB-OTG and load the u-boot image using the imx_usb_loader
51tool (https://github.com/boundarydevices/imx_usb_loader):
52
53$ sudo ./imx_usb u-boot.imx
54
55In U-boot change the eMMC partition config:
56
57=> mmc partconf 2 1 0 0
58
59Mount the eMMC in the host PC:
60
61=> ums 0 mmc 2
62
63Flash the u-boot.imx binary
64
65$ sudo dd if=u-boot.imx of=/dev/sdX bs=1K seek=1 && sync
66
67Set SW6 to eMMC 8-bit boot: 11010110
68
69
703. Booting via SPL
Diego Dorta20af96a2016-10-11 11:09:28 -030071------------------
72
73Other method for building U-Boot on mx6qsabresd and mx6qpsabresd is
74through SPL. In order to do so:
75
76$ make mx6sabresd_spl_defconfig
77$ make
78
79This will generate the SPL image called SPL and the u-boot.img.
80
81- Flash the SPL image into the SD card:
82
83$ sudo dd if=SPL of=/dev/sdb bs=1K seek=1 && sync
84
85- Flash the u-boot.img image into the SD card:
86
87$ sudo dd if=u-boot.img of=/dev/sdbbs=1K seek=69 && sync
88
89
Breno Lima0d0dc392017-04-10 09:45:29 -0300904. Booting via Falcon mode
Diego Dorta20af96a2016-10-11 11:09:28 -030091--------------------------
92
93$ make mx6sabresd_spl_defconfig
94$ make
95
96This will generate the SPL image called SPL and the u-boot.img.
97
98- Flash the SPL image into the SD card:
99
100$ sudo dd if=SPL of=/dev/sdb bs=1K seek=1 oflag=sync status=none && sync
101
102- Flash the u-boot.img image into the SD card:
103
104$ sudo dd if=u-boot.img of=/dev/sdbbs=1K seek=69 oflag=sync status=none && sync
105
106Create a partition for root file system and extract it there:
107
108$ sudo tar xvf rootfs.tar.gz -C /media/root
109
110The SD card must have enough space for raw "args" and "kernel".
111To configure Falcon mode for the first time, on U-Boot do the following commands:
112
113- Setup the IP server:
114
115# setenv serverip <server_ip_address>
116
117- Download dtb file:
118
119# dhcp ${fdt_addr} imx6q-sabresd.dtb
120
121- Download kernel image:
122
123# dhcp ${loadaddr} uImage
124
125- Write kernel at 2MB offset:
126
127# mmc write ${loadaddr} 0x1000 0x4000
128
129- Setup kernel bootargs:
130
131# setenv bootargs "console=ttymxc0,115200 root=/dev/mmcblk1p1 rootfstype=ext4 rootwait quiet rw"
132
133- Prepare args:
134
135# spl export fdt ${loadaddr} - ${fdt_addr}
136
137- Write args 1MB data (0x800 sectors) to 1MB offset (0x800 sectors)
138
139# mmc write 18000000 0x800 0x800
140
141- Press KEY_VOL_UP key, power up the board and then SPL binary will
142launch the kernel directly.