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