Dmitry Shmidt | 271e5fd | 2016-02-01 13:42:11 -0800 | [diff] [blame] | 1 | Running Android on hikey board: |
| 2 | |
Dmitry Shmidt | 271e5fd | 2016-02-01 13:42:11 -0800 | [diff] [blame] | 3 | * Compiling userspace: |
Dmitry Shmidt | 56a3029 | 2016-02-26 16:19:06 -0800 | [diff] [blame] | 4 | Pull AOSP source: |
Dmitry Shmidt | 271e5fd | 2016-02-01 13:42:11 -0800 | [diff] [blame] | 5 | $ repo init -u https://android.googlesource.com/platform/manifest -b master & repo sync -j24 |
Dmitry Shmidt | 56a3029 | 2016-02-26 16:19:06 -0800 | [diff] [blame] | 6 | |
Dmitry Shmidt | 4f256d2 | 2016-02-29 10:54:16 -0800 | [diff] [blame] | 7 | Install mcopy utility: |
| 8 | $ apt-get install mtools |
| 9 | |
Dmitry Shmidt | 56a3029 | 2016-02-26 16:19:06 -0800 | [diff] [blame] | 10 | Build: |
Dmitry Shmidt | 271e5fd | 2016-02-01 13:42:11 -0800 | [diff] [blame] | 11 | $ . ./build/envsetup.sh |
| 12 | $ lunch hikey-userdebug |
| 13 | $ make -j32 |
| 14 | |
| 15 | Note: For 4 GB eMMC part use: |
| 16 | $ make -j32 TARGET_USERDATAIMAGE_4GB=true |
| 17 | |
| 18 | * Installing initial fastboot and ptable: |
| 19 | Select special bootloader mode by linking J15 1-2 and 3-4 pins |
| 20 | Connect USB to PC to get ttyUSB device (ex: ttyUSB1) |
| 21 | Power the board |
Dmitry Shmidt | a049969 | 2017-02-21 11:14:20 -0800 | [diff] [blame] | 22 | $ cd device/linaro/hikey/installer/hikey |
Dmitry Shmidt | 271e5fd | 2016-02-01 13:42:11 -0800 | [diff] [blame] | 23 | $ ./flash-all.sh /dev/ttyUSB1 [4g] |
| 24 | Remove link 3-4 and power the board |
| 25 | |
| 26 | * Flashing images: |
| 27 | Enter fastboot mode by linking J15 1-2 and 5-6 pins |
John Stultz | ecf458f | 2016-05-24 20:38:16 -0700 | [diff] [blame] | 28 | $ fastboot flash boot out/target/product/hikey/boot.img |
Dmitry Shmidt | 271e5fd | 2016-02-01 13:42:11 -0800 | [diff] [blame] | 29 | $ fastboot flash system out/target/product/hikey/system.img |
Dmitry Shmidt | 3efc123 | 2018-04-10 13:14:24 -0700 | [diff] [blame^] | 30 | $ fastboot flash vendor out/target/product/hikey/vendor.img |
Dmitry Shmidt | 271e5fd | 2016-02-01 13:42:11 -0800 | [diff] [blame] | 31 | $ fastboot flash cache out/target/product/hikey/cache.img |
| 32 | $ fastboot flash userdata out/target/product/hikey/userdata.img |
| 33 | Remove jumper 5-6 and power the board |
| 34 | |
| 35 | * Building kernel |
| 36 | $ git clone https://android.googlesource.com/kernel/hikey-linaro |
| 37 | $ cd hikey-linaro |
Dmitry Shmidt | a049969 | 2017-02-21 11:14:20 -0800 | [diff] [blame] | 38 | $ git checkout -b android-hikey-linaro-4.9 origin/android-hikey-linaro-4.9 |
Dmitry Shmidt | 271e5fd | 2016-02-01 13:42:11 -0800 | [diff] [blame] | 39 | $ make ARCH=arm64 hikey_defconfig |
| 40 | $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- -j24 |
| 41 | Output: arch/arm64/boot/Image & arch/arm64/boot/dts/hisilicon/hi6220-hikey.dtb |
Dmitry Shmidt | a049969 | 2017-02-21 11:14:20 -0800 | [diff] [blame] | 42 | copy Image-dtb and hi6220-hikey.dtb to hikey-kernel directory to files |
| 43 | Image-dtb-4.9 and hi6220-hikey.dtb-4.9 |
Dmitry Shmidt | 271e5fd | 2016-02-01 13:42:11 -0800 | [diff] [blame] | 44 | |
| 45 | * Setting monitor resolution |
John Stultz | ecf458f | 2016-05-24 20:38:16 -0700 | [diff] [blame] | 46 | Add to BOARD_KERNEL_CMDLINE in BoardConfig.mk or |
| 47 | if you are setting TARGET_BOOTIMAGE_USE_FAT=true edit |
| 48 | device/linaro/hikey/bootloader/EFI/BOOT/grub.cfg |
Dmitry Shmidt | 271e5fd | 2016-02-01 13:42:11 -0800 | [diff] [blame] | 49 | Set video= (for example for 24” monitor): video=HDMI-A-1:1280x800@60 |
| 50 | |
| 51 | * Kernel serial output (uart3): |
| 52 | J2 (LS Expansion): 1 - Gnd, 11 - Rx, 13 - Tx |
| 53 | |
| 54 | External links: |
| 55 | Board: https://www.96boards.org/products/ce/hikey/ |
| 56 | Howto: https://github.com/96boards/documentation/wiki/LatestSnapshots |
Dmitry Shmidt | 3efc123 | 2018-04-10 13:14:24 -0700 | [diff] [blame^] | 57 | Schematics: https://github.com/96boards/documentation/blob/master/consumer/hikey/hardware-docs/HiKey_schematics_LeMaker_version_Rev_A1.pdf |