1How to use and build U-Boot on mx6sabresd: 2---------------------------------- 3 4Currently there are four methods for booting mx6sabresd boards: 5 61. Booting from SD card via normal U-Boot (u-boot.imx) 7 82. Booting from eMMC via normal U-Boot 9 103. Booting via SPL (SPL and u-boot.img) 11 124. Booting via Falcon mode (SPL launches the kernel directly) 13 14 151. Booting from SD card via normal U-Boot 16----------------------------------------- 17 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 332. 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 71------------------ 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 904. Booting via Falcon mode 91-------------------------- 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. 143