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