mx6sabresd.rst 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. .. SPDX-License-Identifier: GPL-2.0+
  2. mx6sabresd
  3. ==========
  4. How to use and build U-Boot on mx6sabresd
  5. -----------------------------------------
  6. The following methods can be used for booting mx6sabresd boards:
  7. 1. Booting from SD card
  8. 2. Booting from eMMC
  9. 3. Booting via Falcon mode (SPL launches the kernel directly)
  10. 1. Booting from SD card via SPL
  11. -------------------------------
  12. mx6sabresd_defconfig target supports mx6q/mx6dl/mx6qp sabresd variants.
  13. In order to build it:
  14. .. code-block:: bash
  15. $ make mx6sabresd_defconfig
  16. $ make
  17. This will generate the SPL and u-boot-dtb.img binaries.
  18. - Flash the SPL binary into the SD card:
  19. .. code-block:: bash
  20. $ sudo dd if=SPL of=/dev/sdX bs=1K seek=1 conv=notrunc && sync
  21. - Flash the u-boot-dtb.img binary into the SD card:
  22. .. code-block:: bash
  23. $ sudo dd if=u-boot-dtb.img of=/dev/sdX bs=1K seek=69 conv=notrunc && sync
  24. 2. Booting from eMMC
  25. --------------------
  26. .. code-block:: bash
  27. $ make mx6sabresd_defconfig
  28. $ make
  29. This will generate the SPL and u-boot-dtb.img binaries.
  30. - Boot first from SD card as shown in the previous section
  31. In U-boot change the eMMC partition config::
  32. => mmc partconf 2 1 0 0
  33. Mount the eMMC in the host PC::
  34. => ums 0 mmc 2
  35. - Flash SPL and u-boot-dtb.img binaries into the eMMC:
  36. .. code-block:: bash
  37. $ sudo dd if=SPL of=/dev/sdX bs=1K seek=1 conv=notrunc && sync
  38. $ sudo dd if=u-boot-dtb.img of=/dev/sdX bs=1K seek=69 conv=notrunc && sync
  39. Set SW6 to eMMC 8-bit boot: 11010110
  40. 3. Booting via Falcon mode
  41. --------------------------
  42. .. code-block:: bash
  43. $ make mx6sabresd_defconfig
  44. $ make
  45. This will generate the SPL image called SPL and the u-boot-dtb.img.
  46. - Flash the SPL image into the SD card
  47. .. code-block:: bash
  48. $ sudo dd if=SPL of=/dev/sdX bs=1K seek=1 oflag=sync status=none conv=notrunc && sync
  49. - Flash the u-boot-dtb.img image into the SD card
  50. .. code-block:: bash
  51. $ sudo dd if=u-boot-dtb.img of=/dev/sdX bs=1K seek=69 oflag=sync status=none conv=notrunc && sync
  52. Create a partition for root file system and extract it there
  53. .. code-block:: bash
  54. $ sudo tar xvf rootfs.tar.gz -C /media/root
  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. - Setup the IP server::
  58. # setenv serverip <server_ip_address>
  59. - Download dtb file::
  60. # dhcp ${fdt_addr} imx6q-sabresd.dtb
  61. - Download kernel image::
  62. # dhcp ${loadaddr} uImage
  63. - Write kernel at 2MB offset::
  64. # mmc write ${loadaddr} 0x1000 0x4000
  65. - Setup kernel bootargs::
  66. # setenv bootargs "console=ttymxc0,115200 root=/dev/mmcblk1p1 rootfstype=ext4 rootwait quiet rw"
  67. - Prepare args::
  68. # spl export fdt ${loadaddr} - ${fdt_addr}
  69. - Write args 1MB data (0x800 sectors) to 1MB offset (0x800 sectors)::
  70. # mmc write 18000000 0x800 0x800
  71. - Press KEY_VOL_UP key, power up the board and then SPL binary will launch the kernel directly.