blob: 25c1df3fe4766deb388d6b434f5e5b4d0868f176 [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 Stultz874c0202018-04-27 12:39:45 -070046Add to BOARD_KERNEL_CMDLINE in BoardConfig.mk:
47 video= (for example for 24 monitor): video=HDMI-A-1:1280x800@60
Dmitry Shmidt271e5fd2016-02-01 13:42:11 -080048
49* Kernel serial output (uart3):
50J2 (LS Expansion): 1 - Gnd, 11 - Rx, 13 - Tx
51
52External links:
53Board: https://www.96boards.org/products/ce/hikey/
54Howto: https://github.com/96boards/documentation/wiki/LatestSnapshots
Dmitry Shmidt3efc1232018-04-10 13:14:24 -070055Schematics: https://github.com/96boards/documentation/blob/master/consumer/hikey/hardware-docs/HiKey_schematics_LeMaker_version_Rev_A1.pdf