1 How to use and build U-Boot on mx6sabresd:
2 ----------------------------------
4 Currently there are four methods for booting mx6sabresd boards:
6 1. Booting from SD card via normal U-Boot (u-boot.imx)
8 2. Booting from eMMC via normal U-Boot
10 3. Booting via SPL (SPL and u-boot.img)
12 4. Booting via Falcon mode (SPL launches the kernel directly)
15 1. Booting from SD card via normal U-Boot
16 -----------------------------------------
18 $ make mx6qsabresd_defconfig (If you want to build for mx6qsabresd)
22 $ make mx6dlsabresd_defconfig (If you want to build for mx6dlsabresd)
26 This will generate the image called u-boot.imx.
28 - Flash the u-boot.imx binary into the SD card:
30 $ sudo dd if=u-boot.imx of=/dev/sdb bs=1K seek=1 && sync
33 2. Booting from eMMC via normal U-Boot
34 --------------------------------------
36 $ make mx6qsabresd_defconfig (If you want to build for mx6qsabresd)
40 $ make mx6dlsabresd_defconfig (If you want to build for mx6dlsabresd)
44 This will generate the image called u-boot.imx.
46 - Flash the u-boot.imx binary into the eMMC:
48 Set SW6 to download mode: 00001100
50 Plug a usb cable to USB-OTG and load the u-boot image using the imx_usb_loader
51 tool (https://github.com/boundarydevices/imx_usb_loader):
53 $ sudo ./imx_usb u-boot.imx
55 In U-boot change the eMMC partition config:
57 => mmc partconf 2 1 0 0
59 Mount the eMMC in the host PC:
63 Flash the u-boot.imx binary
65 $ sudo dd if=u-boot.imx of=/dev/sdX bs=1K seek=1 && sync
67 Set SW6 to eMMC 8-bit boot: 11010110
73 Other method for building U-Boot on mx6qsabresd and mx6qpsabresd is
74 through SPL. In order to do so:
76 $ make mx6sabresd_spl_defconfig
79 This will generate the SPL image called SPL and the u-boot.img.
81 - Flash the SPL image into the SD card:
83 $ sudo dd if=SPL of=/dev/sdb bs=1K seek=1 && sync
85 - Flash the u-boot.img image into the SD card:
87 $ sudo dd if=u-boot.img of=/dev/sdbbs=1K seek=69 && sync
90 4. Booting via Falcon mode
91 --------------------------
93 $ make mx6sabresd_spl_defconfig
96 This will generate the SPL image called SPL and the u-boot.img.
98 - Flash the SPL image into the SD card:
100 $ sudo dd if=SPL of=/dev/sdb bs=1K seek=1 oflag=sync status=none && sync
102 - Flash the u-boot.img image into the SD card:
104 $ sudo dd if=u-boot.img of=/dev/sdbbs=1K seek=69 oflag=sync status=none && sync
106 Create a partition for root file system and extract it there:
108 $ sudo tar xvf rootfs.tar.gz -C /media/root
110 The SD card must have enough space for raw "args" and "kernel".
111 To configure Falcon mode for the first time, on U-Boot do the following commands:
113 - Setup the IP server:
115 # setenv serverip <server_ip_address>
119 # dhcp ${fdt_addr} imx6q-sabresd.dtb
121 - Download kernel image:
123 # dhcp ${loadaddr} uImage
125 - Write kernel at 2MB offset:
127 # mmc write ${loadaddr} 0x1000 0x4000
129 - Setup kernel bootargs:
131 # setenv bootargs "console=ttymxc0,115200 root=/dev/mmcblk1p1 rootfstype=ext4 rootwait quiet rw"
135 # spl export fdt ${loadaddr} - ${fdt_addr}
137 - Write args 1MB data (0x800 sectors) to 1MB offset (0x800 sectors)
139 # mmc write 18000000 0x800 0x800
141 - Press KEY_VOL_UP key, power up the board and then SPL binary will
142 launch the kernel directly.