README 2.5 KB

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