1.. SPDX-License-Identifier: GPL-2.0+ 2 3mx6sabreauto 4============ 5 6How to use and build U-Boot on mx6sabreauto 7------------------------------------------- 8 9mx6sabreauto_defconfig target supports mx6q/mx6dl/mx6qp sabreauto variants. 10 11In order to build it: 12 13.. code-block:: bash 14 15 $ make mx6sabreauto_defconfig 16 $ make 17 18This will generate the SPL and u-boot-dtb.img binaries. 19 20- Flash the SPL binary into the SD card: 21 22.. code-block:: bash 23 24 $ sudo dd if=SPL of=/dev/sdX bs=1K seek=1 conv=notrunc && sync 25 26- Flash the u-boot-dtb.img binary into the SD card: 27 28.. code-block:: bash 29 30 $ sudo dd if=u-boot-dtb.img of=/dev/sdX bs=1K seek=69 conv=notrunc && sync 31 32Booting via Falcon mode 33----------------------- 34 35Write in mx6sabreauto_defconfig the following define below: 36 37CONFIG_SPL_OS_BOOT=y 38 39In order to build it: 40 41.. code-block:: bash 42 43 $ make mx6sabreauto_defconfig 44 $ make 45 46This will generate the SPL image called SPL and the u-boot-dtb.img. 47 48- Flash the SPL image into the SD card: 49 50.. code-block:: bash 51 52 $ sudo dd if=SPL of=/dev/sdb bs=1K seek=1 conv=notrunc && sync 53 54- Flash the u-boot-dtb.img image into the SD card: 55 56.. code-block:: bash 57 58 $ sudo dd if=u-boot-dtb.img of=/dev/sdb bs=1K seek=69 conv=notrunc && sync 59 60Create a FAT16 boot partition to store uImage and the dtb file, then copy the files there: 61 62.. code-block:: bash 63 64 $ sudo cp uImage /media/boot 65 $ sudo cp imx6dl-sabreauto.dtb /media/boot 66 67Create a partition for root file system and extract it there: 68 69.. code-block:: bash 70 71 $ sudo tar xvf rootfs.tar.gz -C /media/root 72 73The SD card must have enough space for raw "args" and "kernel". 74To configure Falcon mode for the first time, on U-Boot do the following commands: 75 76- Load dtb file from boot partition:: 77 78 # load mmc 0:1 ${fdt_addr} imx6dl-sabreauto.dtb 79 80- Load kernel image from boot partition:: 81 82 # load mmc 0:1 ${loadaddr} uImage 83 84- Write kernel at 2MB offset:: 85 86 # mmc write ${loadaddr} 0x1000 0x4000 87 88- Setup kernel bootargs:: 89 90 # setenv bootargs "console=ttymxc3,115200 root=/dev/mmcblk0p1 rootfstype=ext4 rootwait quiet rw" 91 92- Prepare args:: 93 94 # spl export fdt ${loadaddr} - ${fdt_addr} 95 96- Write args 1MB data (0x800 sectors) to 1MB offset (0x800 sectors):: 97 98 # mmc write 18000000 0x800 0x800 99 100- Restart the board and then SPL binary will launch the kernel directly. 101