README 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. ================================================================================
  2. Board Information
  3. ================================================================================
  4. Developed by HiSilicon, the board features the Hi3798C V200 with an
  5. integrated quad-core 64-bit ARM Cortex A53 processor and high
  6. performance Mali T720 GPU, making it capable of running any commercial
  7. set-top solution based on Linux or Android. Its high performance
  8. specification also supports a premium user experience with up to H.265
  9. HEVC decoding of 4K video at 60 frames per second.
  10. SOC Hisilicon Hi3798CV200
  11. CPU Quad-core ARM Cortex-A53 64 bit
  12. DRAM DDR3/3L/4 SDRAM interface, maximum 32-bit data width 2 GB
  13. USB Two USB 2.0 ports One USB 3.0 ports
  14. CONSOLE USB-micro port for console support
  15. ETHERNET 1 GBe Ethernet
  16. PCIE One PCIe 2.0 interfaces
  17. JTAG 8-Pin JTAG
  18. EXPANSION INTERFACE Linaro 96Boards Low Speed Expansion slot
  19. DIMENSION Standard 160×120 mm 96Boards Enterprice Edition form factor
  20. WIFI 802.11AC 2*2 with Bluetooth
  21. CONNECTORS One connector for Smart Card One connector for TSI
  22. ================================================================================
  23. BUILD INSTRUCTIONS
  24. ================================================================================
  25. Note of warning:
  26. ================
  27. U-boot has a *strong* dependency with the l-loader and the arm trusted firmware
  28. repositories.
  29. The boot sequence is:
  30. l-loader --> arm_trusted_firmware --> u-boot
  31. U-Boot needs to be aware of the BL31 runtime location and size to avoid writing
  32. over it. Currently, BL31 is being placed below the kernel text offset (check
  33. poplar.c) but this could change in the future.
  34. The current version of u-boot has been tested with:
  35. - https://github.com/Linaro/poplar-l-loader.git
  36. commit f0988698dcc5c08bd0a8f50aa0457e138a5f438c
  37. Author: Alex Elder <elder@linaro.org>
  38. Date: Fri Jun 16 08:57:59 2017 -0500
  39. l-loader: use external memory region definitions
  40. The ARM Trusted Firmware code now has a header file that collects
  41. all the definitions for the memory regions used for its boot stages.
  42. Include that file where needed, and use the definitions found therein
  43. Signed-off-by: Alex Elder <elder@linaro.org>
  44. - https://github.com/Linaro/poplar-arm-trusted-firmware.git
  45. commit 6ac42dd3be13c99aa8ce29a15073e2f19d935f68
  46. Author: Alex Elder <elder@linaro.org>
  47. Date: Fri Jun 16 09:24:50 2017 -0500
  48. poplar: define memory regions in a separate file
  49. Separate the definitions for memory regions used for the BL stage
  50. images and FIP into a new file. The "l-loader" image uses knowledge
  51. of the sizes and locations of these memory regions, and it can now
  52. include this (external) header to get these definitions, rather than
  53. having to make coordinated changes to both code bases.
  54. The new file has a complete set of definitions (more than may be
  55. required by one or the other user). It also includes a summary of
  56. how the boot process works, and how it uses these regions.
  57. It should now be relatively easy to adjust the sizes and locations
  58. of these memory regions, or to add to them (e.g. for TEE).
  59. Signed-off-by: Alex Elder <elder@linaro.org>
  60. Compile from source:
  61. ====================
  62. Get all the sources
  63. > mkdir -p ~/poplar/src ~/poplar/bin
  64. > cd ~/poplar/src
  65. > git clone https://github.com/Linaro/poplar-l-loader.git l-loader
  66. > git clone https://github.com/Linaro/poplar-arm-trusted-firmware.git atf
  67. > git clone https://github.com/Linaro/poplar-u-boot.git u-boot
  68. Make sure you are using the correct branch on each one of these repositories.
  69. The definition of "correct" might change over time (at this moment in time this
  70. would be the "latest" branch).
  71. Compile U-Boot:
  72. ===============
  73. Prerequisite:
  74. # sudo apt-get install device-tree-compiler
  75. > cd ~/poplar/src/u-boot
  76. > make CROSS_COMPILE=aarch64-linux-gnu- poplar_defconfig
  77. > make CROSS_COMPILE=aarch64-linux-gnu-
  78. > cp u-boot.bin ~/poplar/bin
  79. Compile ARM Trusted Firmware (ATF):
  80. ===================================
  81. > cd ~/poplar/src/atf
  82. > make CROSS_COMPILE=aarch64-linux-gnu- all fip \
  83. SPD=none BL33=~/poplar/bin/u-boot.bin DEBUG=1 PLAT=poplar
  84. Copy resulting binaries
  85. > cp build/hi3798cv200/debug/bl1.bin ~/poplar/src/l-loader/atf/
  86. > cp build/hi3798cv200/debug/fip.bin ~/poplar/src/l-loader/atf/
  87. Compile l-loader:
  88. =================
  89. > cd ~/poplar/src/l-loader
  90. > make clean
  91. > make CROSS_COMPILE=arm-linux-gnueabi-
  92. Due to BootROM requiremets, rename l-loader.bin to fastboot.bin:
  93. > cp l-loader.bin ~/poplar/bin/fastboot.bin
  94. ================================================================================
  95. FLASH INSTRUCTIONS
  96. ================================================================================
  97. Two methods:
  98. Using USB debrick support:
  99. Copy fastboot.bin to a FAT partition on the USB drive and reboot the
  100. poplar board while pressing S3(usb_boot).
  101. The system will execute the new u-boot and boot into a shell which you
  102. can then use to write to eMMC.
  103. Using U-BOOT from shell:
  104. 1) using AXIS usb ethernet dongle and tftp
  105. 2) using FAT formated USB drive
  106. 1. TFTP (USB ethernet dongle)
  107. =============================
  108. Plug a USB AXIS ethernet dongle on any of the USB2 ports on the Poplar board.
  109. Copy fastboot.bin to your tftp server.
  110. In u-boot make sure your network is properly setup.
  111. Then
  112. => tftp 0x30000000 fastboot.bin
  113. starting USB...
  114. USB0: USB EHCI 1.00
  115. scanning bus 0 for devices... 1 USB Device(s) found
  116. USB1: USB EHCI 1.00
  117. scanning bus 1 for devices... 3 USB Device(s) found
  118. scanning usb for storage devices... 0 Storage Device(s) found
  119. scanning usb for ethernet devices... 1 Ethernet Device(s) found
  120. Waiting for Ethernet connection... done.
  121. Using asx0 device
  122. TFTP from server 192.168.1.4; our IP address is 192.168.1.10
  123. Filename 'poplar/fastboot.bin'.
  124. Load address: 0x30000000
  125. Loading: #################################################################
  126. #################################################################
  127. ###############################################################
  128. 2 MiB/s
  129. done
  130. Bytes transferred = 983040 (f0000 hex)
  131. => mmc write 0x30000000 0 0x780
  132. MMC write: dev # 0, block # 0, count 1920 ... 1920 blocks written: OK
  133. => reset
  134. 2. USING USB FAT DRIVE
  135. =======================
  136. Copy fastboot.bin to any partition on a FAT32 formated usb flash drive.
  137. Enter the uboot prompt
  138. => fatls usb 0:2
  139. 983040 fastboot.bin
  140. 1 file(s), 0 dir(s)
  141. => fatload usb 0:2 0x30000000 fastboot.bin
  142. reading fastboot.bin
  143. 983040 bytes read in 44 ms (21.3 MiB/s)
  144. => mmc write 0x30000000 0 0x780
  145. MMC write: dev # 0, block # 0, count 1920 ... 1920 blocks written: OK
  146. ================================================================================
  147. BOOT TRACE
  148. ================================================================================
  149. Bootrom start
  150. Boot Media: eMMC
  151. Decrypt auxiliary code ...OK
  152. lsadc voltage min: 000000FE, max: 000000FF, aver: 000000FE, index: 00000000
  153. Entry boot auxiliary code
  154. Auxiliary code - v1.00
  155. DDR code - V1.1.2 20160205
  156. Build: Mar 24 2016 - 17:09:44
  157. Reg Version: v134
  158. Reg Time: 2016/03/18 09:44:55
  159. Reg Name: hi3798cv2dmb_hi3798cv200_ddr3_2gbyte_8bitx4_4layers.reg
  160. Boot auxiliary code success
  161. Bootrom success
  162. LOADER: Switched to aarch64 mode
  163. LOADER: Entering ARM TRUSTED FIRMWARE
  164. LOADER: CPU0 executes at 0x000ce000
  165. INFO: BL1: 0xe1000 - 0xe7000 [size = 24576]
  166. NOTICE: Booting Trusted Firmware
  167. NOTICE: BL1: v1.3(debug):v1.3-372-g1ba9c60
  168. NOTICE: BL1: Built : 17:51:33, Apr 30 2017
  169. INFO: BL1: RAM 0xe1000 - 0xe7000
  170. INFO: BL1: Loading BL2
  171. INFO: Loading image id=1 at address 0xe9000
  172. INFO: Image id=1 loaded at address 0xe9000, size = 0x5008
  173. NOTICE: BL1: Booting BL2
  174. INFO: Entry point address = 0xe9000
  175. INFO: SPSR = 0x3c5
  176. NOTICE: BL2: v1.3(debug):v1.3-372-g1ba9c60
  177. NOTICE: BL2: Built : 17:51:33, Apr 30 2017
  178. INFO: BL2: Loading BL31
  179. INFO: Loading image id=3 at address 0x129000
  180. INFO: Image id=3 loaded at address 0x129000, size = 0x8038
  181. INFO: BL2: Loading BL33
  182. INFO: Loading image id=5 at address 0x37000000
  183. INFO: Image id=5 loaded at address 0x37000000, size = 0x58f17
  184. NOTICE: BL1: Booting BL31
  185. INFO: Entry point address = 0x129000
  186. INFO: SPSR = 0x3cd
  187. INFO: Boot bl33 from 0x37000000 for 364311 Bytes
  188. NOTICE: BL31: v1.3(debug):v1.3-372-g1ba9c60
  189. NOTICE: BL31: Built : 17:51:33, Apr 30 2017
  190. INFO: BL31: Initializing runtime services
  191. INFO: BL31: Preparing for EL3 exit to normal world
  192. INFO: Entry point address = 0x37000000
  193. INFO: SPSR = 0x3c9
  194. U-Boot 2017.05-rc2-00130-gd2255b0 (Apr 30 2017 - 17:51:28 +0200)poplar
  195. Model: HiSilicon Poplar Development Board
  196. BOARD: Hisilicon HI3798cv200 Poplar
  197. DRAM: 1 GiB
  198. MMC: Hisilicon DWMMC: 0
  199. In: serial@f8b00000
  200. Out: serial@f8b00000
  201. Err: serial@f8b00000
  202. Net: Net Initialization Skipped
  203. No ethernet found.
  204. Hit any key to stop autoboot: 0
  205. starting USB...
  206. USB0: USB EHCI 1.00
  207. scanning bus 0 for devices... 1 USB Device(s) found
  208. USB1: USB EHCI 1.00
  209. scanning bus 1 for devices... 4 USB Device(s) found
  210. scanning usb for storage devices... 1 Storage Device(s) found
  211. scanning usb for ethernet devices... 1 Ethernet Device(s) found
  212. USB device 0:
  213. Device 0: Vendor: SanDisk Rev: 1.00 Prod: Cruzer Blade
  214. Type: Removable Hard Disk
  215. Capacity: 7632.0 MB = 7.4 GB (15630336 x 512)
  216. ... is now current device
  217. Scanning usb 0:1...
  218. =>