blob: 034d0aebd97a1a8dd52db569e1ec92fa8b109a68 [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
7Download and extract HDMI binaries:
8$ wget https://dl.google.com/dl/android/aosp/linaro-hikey-20160226-67c37b1a.tgz
9$ tar xzf linaro-hikey-20160226-67c37b1a.tgz
10$ ./extract-linaro-hikey.sh
11
Dmitry Shmidt4f256d22016-02-29 10:54:16 -080012Install mcopy utility:
13$ apt-get install mtools
14
Dmitry Shmidt56a30292016-02-26 16:19:06 -080015Build:
Dmitry Shmidt271e5fd2016-02-01 13:42:11 -080016$ . ./build/envsetup.sh
17$ lunch hikey-userdebug
18$ make -j32
19
20Note: For 4 GB eMMC part use:
21$ make -j32 TARGET_USERDATAIMAGE_4GB=true
22
23* Installing initial fastboot and ptable:
24Select special bootloader mode by linking J15 1-2 and 3-4 pins
25Connect USB to PC to get ttyUSB device (ex: ttyUSB1)
26Power the board
27$ cd device/linaro/hikey/installer
28$ ./flash-all.sh /dev/ttyUSB1 [4g]
29Remove link 3-4 and power the board
30
31* Flashing images:
32Enter fastboot mode by linking J15 1-2 and 5-6 pins
John Stultzecf458f2016-05-24 20:38:16 -070033$ fastboot flash boot out/target/product/hikey/boot.img
Dmitry Shmidt271e5fd2016-02-01 13:42:11 -080034$ fastboot flash system out/target/product/hikey/system.img
35$ fastboot flash cache out/target/product/hikey/cache.img
36$ fastboot flash userdata out/target/product/hikey/userdata.img
37Remove jumper 5-6 and power the board
38
39* Building kernel
40$ git clone https://android.googlesource.com/kernel/hikey-linaro
41$ cd hikey-linaro
Dmitry Shmidt2f0032b2016-06-06 13:03:36 -070042$ git checkout -b android-hikey-linaro-4.4 origin/android-hikey-linaro-4.4
Dmitry Shmidt271e5fd2016-02-01 13:42:11 -080043$ make ARCH=arm64 hikey_defconfig
44$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- -j24
45Output: arch/arm64/boot/Image & arch/arm64/boot/dts/hisilicon/hi6220-hikey.dtb
John Stultzecf458f2016-05-24 20:38:16 -070046 copy Image-dtb and hi6220-hikey.dtb to hikey-kernel directory
Dmitry Shmidt271e5fd2016-02-01 13:42:11 -080047
48* Setting monitor resolution
John Stultzecf458f2016-05-24 20:38:16 -070049Add to BOARD_KERNEL_CMDLINE in BoardConfig.mk or
50if you are setting TARGET_BOOTIMAGE_USE_FAT=true edit
51device/linaro/hikey/bootloader/EFI/BOOT/grub.cfg
Dmitry Shmidt271e5fd2016-02-01 13:42:11 -080052Set video= (for example for 24 monitor): video=HDMI-A-1:1280x800@60
53
54* Kernel serial output (uart3):
55J2 (LS Expansion): 1 - Gnd, 11 - Rx, 13 - Tx
56
57External links:
58Board: https://www.96boards.org/products/ce/hikey/
59Howto: https://github.com/96boards/documentation/wiki/LatestSnapshots
60Schematics: https://www.96boards.org/wp-content/uploads/2015/02/96Boards-Hikey-Rev-A1.pdf