README.odroid 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. U-boot for Odroid X2/U3
  2. ========================
  3. 1. Summary
  4. ==========
  5. This is a quick instruction for setup Odroid boards based on Exynos4412.
  6. Board config: odroid_config
  7. 2. Supported devices
  8. ====================
  9. This U-BOOT config can be used on two boards:
  10. - Odroid U3
  11. - Odroid X2
  12. with CPU Exynos 4412 rev 2.0 and 2GB of RAM
  13. 3. Boot sequence
  14. ================
  15. iROM->BL1->(BL2 + TrustZone)->U-BOOT
  16. This version of U-BOOT doesn't implement SPL but it is required(BL2)
  17. and can be found in "boot.tar.gz" from here:
  18. http://dev.odroid.com/projects/4412boot/wiki/FrontPage?action=download&value=boot.tar.gz
  19. or here:
  20. http://odroid.in/guides/ubuntu-lfs/boot.tar.gz
  21. 4. Boot media layout
  22. ====================
  23. The table below shows SD/eMMC cards layout for U-boot.
  24. The block offset is starting from 0 and the block size is 512B.
  25. -------------------------------------
  26. | Binary | Block offset| part type |
  27. | name | SD | eMMC |(eMMC only)|
  28. -------------------------------------
  29. | Bl1 | 1 | 0 | 1 (boot) |
  30. | Bl2 | 31 | 30 | 1 (boot) |
  31. | U-boot | 63 | 62 | 1 (boot) |
  32. | Tzsw | 2111 | 2110 | 1 (boot) |
  33. | Uboot Env | 2500 | 2500 | 0 (user) |
  34. -------------------------------------
  35. 5. Prepare the SD boot card - with SD card reader
  36. =================================================
  37. To prepare bootable media you need boot binaries provided by hardkernel.
  38. File "boot.tar.gz" (link in point 3.) contains:
  39. - E4412_S.bl1.HardKernel.bin
  40. - E4412_S.tzsw.signed.bin
  41. - bl2.signed.bin
  42. - sd_fusing.sh
  43. - u-boot.bin
  44. This is all you need to boot this board. But if you want to use your custom
  45. u-boot then you need to change u-boot.bin with your own u-boot binary*
  46. and run the script "sd_fusing.sh" - this script is valid only for SD card.
  47. *note:
  48. The proper binary file of current U-boot is u-boot-dtb.bin.
  49. quick steps for Linux:
  50. - extract boot.tar.gz
  51. - put any SD card into the SD reader
  52. - check the device with "dmesg"
  53. - run ./sd_fusing.sh /dev/sdX - where X is SD card device (but not a partition)
  54. Check if Hardkernel U-boot is booting, and next do the same with your U-boot.
  55. 6. Prepare the eMMC boot card
  56. with a eMMC card reader (boot from eMMC card slot)
  57. =====================================================
  58. To boot the device from the eMMC slot you should use a special card reader
  59. which supports eMMC partiion switch. All of the boot binaries are stored
  60. on the eMMC boot partition which is normally hidden.
  61. The "sd_fusing.sh" script can be used after updating offsets of binaries
  62. according to the table from point 4. Be sure that you are working on the right
  63. eMMC partition - its size is usually very small, about 1-4 MiB.
  64. 7. Prepare the eMMC boot card
  65. with a SD card reader (boot from SD card slot)
  66. =================================================
  67. If you have an eMMC->microSD adapter you can prepare the card as in point 5.
  68. But then the device can boot only from the SD card slot.
  69. 8. Prepare the boot media using Hardkernel U-boot
  70. =================================================
  71. You can update the U-boot to the custom one if you have an working bootloader
  72. delivered with the board on a eMMC/SD card. Then follow the steps:
  73. - install the android fastboot tool
  74. - connect a micro usb cable to the board
  75. - on the U-boot prompt, run command: fastboot (as a root)
  76. - on the host, run command: "fastboot flash bootloader u-boot-dtb.bin"
  77. - the custom U-boot should start after the board resets.
  78. 9. Partition layout
  79. ====================
  80. Default U-boot environment is setup for fixed partiion layout.
  81. Partition table: MSDOS. Disk layout and files as listed in the table below.
  82. ----- ------ ------ ------ -------- ---------------------------------
  83. | Num | Name | FS | Size | Offset | Reguired files |
  84. | | | Type | MiB | MiB | |
  85. ----- ------ ------ ------ -------- ---------------------------------
  86. | 1 | BOOT | fat | 100 | 2 | kernel, fdt** |
  87. | 2 | ROOT | ext4 | - | | any Linux system |
  88. ----- ------ ------ ------ -------- ---------------------------------
  89. **note:
  90. Supported fdt files are:
  91. - exynos4412-odroidx2.dtb
  92. - exynos4412-odroidu3.dtb
  93. Supported kernel files are:
  94. - Image.itb
  95. - zImage
  96. - uImage
  97. The default environmental variable "dfu_alt_info" is set* for above layout.
  98. Each partition size is just an example, dfu_alt_info tries init two partitions.
  99. The size of each is not important.
  100. *note:
  101. $dfu_alt_info is set on a boot time and it is concatenated using two variables:
  102. - $dfu_alt_boot(set dynamically)
  103. - $dfu_alt_system(from current env).
  104. To add any changes to dfu_alt_info - please modify $dfu_alt_system only.
  105. Changes are visible after board reset.
  106. 10. The environment and booting the kernel
  107. ==========================================
  108. There are three macros defined in config for various boot options:
  109. Two for both, kernel with device tree support and also without it:
  110. - boot_uimg - load uImage
  111. - boot_zimg - load zImage
  112. If proper fdt file exists then it will be automatically loaded,
  113. so for old kernel types, please remove fdt file from boot partition.
  114. The third boot option for multi image support (more info: doc/uImage.FIT/)
  115. - boot_fit - for binary file: "Image.itb"
  116. Default boot command: "autoboot"
  117. And the boot sequence is:
  118. - boot_fit - if "Image.itb" exists
  119. - boot_zimg - if "zImage" exists
  120. - boot_uimg - if "uImage" exists