blob: 7556fd293d1759e04931ea83450906034559b213 [file] [log] [blame]
Dmitry Shmidt271e5fd2016-02-01 13:42:11 -08001Running Android on hikey board:
2
Dmitry Shmidt271e5fd2016-02-01 13:42:11 -08003* Compiling userspace:
Dmitry Shmidt56a30292016-02-26 16:19:06 -08004Pull AOSP source:
Dmitry Shmidt271e5fd2016-02-01 13:42:11 -08005$ repo init -u https://android.googlesource.com/platform/manifest -b master & repo sync -j24
Dmitry Shmidt56a30292016-02-26 16:19:06 -08006
Dmitry Shmidt4f256d22016-02-29 10:54:16 -08007Install mcopy utility:
8$ apt-get install mtools
9
Dmitry Shmidt56a30292016-02-26 16:19:06 -080010Build:
Dmitry Shmidt271e5fd2016-02-01 13:42:11 -080011$ . ./build/envsetup.sh
12$ lunch hikey-userdebug
13$ make -j32
14
15Note: For 4 GB eMMC part use:
16$ make -j32 TARGET_USERDATAIMAGE_4GB=true
17
18* Installing initial fastboot and ptable:
19Select special bootloader mode by linking J15 1-2 and 3-4 pins
20Connect USB to PC to get ttyUSB device (ex: ttyUSB1)
21Power the board
Dmitry Shmidta0499692017-02-21 11:14:20 -080022$ cd device/linaro/hikey/installer/hikey
Dmitry Shmidt271e5fd2016-02-01 13:42:11 -080023$ ./flash-all.sh /dev/ttyUSB1 [4g]
24Remove link 3-4 and power the board
25
26* Flashing images:
27Enter fastboot mode by linking J15 1-2 and 5-6 pins
John Stultzecf458f2016-05-24 20:38:16 -070028$ fastboot flash boot out/target/product/hikey/boot.img
Dmitry Shmidt271e5fd2016-02-01 13:42:11 -080029$ fastboot flash system out/target/product/hikey/system.img
Dmitry Shmidt3efc1232018-04-10 13:14:24 -070030$ fastboot flash vendor out/target/product/hikey/vendor.img
Dmitry Shmidt271e5fd2016-02-01 13:42:11 -080031$ fastboot flash cache out/target/product/hikey/cache.img
32$ fastboot flash userdata out/target/product/hikey/userdata.img
33Remove 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 Shmidta0499692017-02-21 11:14:20 -080038$ git checkout -b android-hikey-linaro-4.9 origin/android-hikey-linaro-4.9
Dmitry Shmidt271e5fd2016-02-01 13:42:11 -080039$ make ARCH=arm64 hikey_defconfig
40$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- -j24
41Output: arch/arm64/boot/Image & arch/arm64/boot/dts/hisilicon/hi6220-hikey.dtb
Dmitry Shmidta0499692017-02-21 11:14:20 -080042 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 Shmidt271e5fd2016-02-01 13:42:11 -080044
45* Setting monitor resolution
John Stultzecf458f2016-05-24 20:38:16 -070046Add to BOARD_KERNEL_CMDLINE in BoardConfig.mk or
47if you are setting TARGET_BOOTIMAGE_USE_FAT=true edit
48device/linaro/hikey/bootloader/EFI/BOOT/grub.cfg
Dmitry Shmidt271e5fd2016-02-01 13:42:11 -080049Set video= (for example for 24 monitor): video=HDMI-A-1:1280x800@60
50
51* Kernel serial output (uart3):
52J2 (LS Expansion): 1 - Gnd, 11 - Rx, 13 - Tx
53
54External links:
55Board: https://www.96boards.org/products/ce/hikey/
56Howto: https://github.com/96boards/documentation/wiki/LatestSnapshots
Dmitry Shmidt3efc1232018-04-10 13:14:24 -070057Schematics: https://github.com/96boards/documentation/blob/master/consumer/hikey/hardware-docs/HiKey_schematics_LeMaker_version_Rev_A1.pdf