Couple of videos to get you started on the Hikey960 AOSP


#1

Install Pre built AOP

Build AOSP from Source for the Hikey 960


#2

Any help on how to boot hikey 960 form SD card?


#3

The uefi bootloader was very recently made available, no sd card support yet but it will be there soon enough


#4

Thank you for the information. May be a video on how-to once it is available would be useful.
:slight_smile:


#5

My build for hikey960 ends with the following error. Any lead on this would be helpful…:slight_smile:
I am trying to flash the eMMC with the image and kernel built on my machine.


rakshith@patkar007:~/Projects/android-source/hikey960$ make -j4

PLATFORM_VERSION_CODENAME=O
PLATFORM_VERSION=O
TARGET_PRODUCT=hikey960
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a53
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-21-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=NYC
OUT_DIR=out

[2/2] bootstrap out/soong/.minibootstrap/build.ninja.in
[1/2] out/soong/.bootstrap/bin/minibp out/soong/.minibootstrap/build.ninja.in
ninja: no work to do.
ninja: no work to do.
No need to regenerate ninja file
[ 0% 1/47354] Yacc: applypatch <= bootable/recovery/edify/parser.yy
FAILED: out/target/product/hikey960/obj/STATIC_LIBRARIES/libedify_intermediates/parser.cpp
/bin/bash -c “prebuilts/misc/linux-x86/bison/bison -d --defines=out/target/product/hikey960/obj/STATIC_LIBRARIES/libedify_intermediates/parser.h -o out/target/product/hikey960/obj/STATIC_LIBRARIES/libedify_intermediates/parser.cpp bootable/recovery/edify/parser.yy”
/bin/bash: prebuilts/misc/linux-x86/bison/bison: No such file or directory
[ 0% 4/47354] Ensuring Jack server is installed and started
Jack server already installed in "/home/rakshith/.jack-server"
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx2048m -cp /home/rakshith/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher
ninja: build stopped: subcommand failed.
10:02:03 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target ‘run_soong_ui’ failed
make: *** [run_soong_ui] Error 1

make failed to build some targets (01:00 (mm:ss))



#6

looks like you don’t have bison installed …
did you setup build environment properly from:
https://source.android.com/source/initializing

anyways try this.

sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip

also repo sync your source again just to be sure.


#7

Thank you for the reply. Is there a way to flash your locally compiled hikey-linaro kernel to hikey960 when you flash the eMMC with pre-built AOSP?


#8

go through here to create the boot.img file https://source.android.com/source/devices
and use flashboot to flash boot
sudo fastboot flash boot boot.img


#9

When i run:
$ make ARCH=arm64 hikey960_defconfig

platform_testing/build/tasks/tests/native_metric_test_list.mk: warning: continuous_native_metric_tests: Unknown installed file for module perf-setup.sh
./test/vts/utils/python/archive/Android.mk:28: warning: overriding commands for target default' ./test/vts/runners/host/tcp_server/Android.mk:19: warning: ignoring old commands for targetdefault’
ninja: error: unknown target 'hikey960_defconfig’
14:36:25 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target ‘run_soong_ui’ failed
make: *** [run_soong_ui] Error 1

Any take on this?


#10

that command has to be run inside hikey-linaro folder

in the root folder of your android source
download and compile kernel

git clone https://android.googlesource.com/kernel/hikey-linaro
cd hikey-linaro
git checkout -b android-hikey-linaro-4.4 origin/android-hikey-linaro-4.4
make ARCH=arm64 hikey960_defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- -j24

again please go through https://source.android.com/source/devices everything is very well explained