Hikey960 on nougat


#1

Hello,

I’m trying to make a fresh build of aosp android-7.1.2_r36 tag for Hikey960. But I think some file are missing.

Here is my steps :

repo init -u https://android.googlesource.com/platform/manifest -b android-7.1.2_r36
repo sync -j4

then I download the drivers for android 7.1.2 from:
https://developers.google.com/android/drivers#hikey96020170531

when I tape : lunch on the terminal, the entry hikey960-userdebug is missing from the list. I only have hikey-userdebug.

Could you please help ?

Thanks


Android Nougat on Hikey960
#2

Hikey960 support is available in mainline AOSP but the support files were not included in the 7.1 maintenance branches (they were not ready when the branches were made).


#3

Thank you for your answer.

Do you think I can use the branches from the master (which is android-8) and use it on android-7.1.2 :

 <project path="device/linaro/bootloader/arm-trusted-firmware" name="device/linaro/bootloader/arm-trusted-firmware" />
  <project path="device/linaro/bootloader/edk2" name="device/linaro/bootloader/edk2" />
  <project path="device/linaro/bootloader/OpenPlatformPkg" name="device/linaro/bootloader/OpenPlatformPkg" />
  <project path="device/linaro/hikey" name="device/linaro/hikey" groups="device,hikey,pdk" />
  <project path="device/linaro/hikey-kernel" name="device/linaro/hikey-kernel" groups="device,hikey,pdk" clone-depth="1" />

Or do you know any other manually way to make this work ?

Thanks


#4

@justin_h83 See Build AOSP 8.0.0_r34 on Hikey960. You can try device/linaro/* from master branch and 7.1.2 for the rest. Let us know how that turns out.


#5

Thanks, I’ll try this and I give you a feedback.


#6

I have just made the test, here is the result :

You’re building on Linux

Lunch menu… pick a combo:
1. aosp_arm-eng
2. aosp_arm64-eng
3. aosp_mips-eng
4. aosp_mips64-eng
5. aosp_x86-eng
6. aosp_x86_64-eng
7. full_fugu-userdebug
8. aosp_fugu-userdebug
9. mini_emulator_arm64-userdebug
10. m_e_arm-userdebug
11. m_e_mips64-eng
12. m_e_mips-userdebug
13. mini_emulator_x86_64-userdebug
14. mini_emulator_x86-userdebug
15. aosp_dragon-userdebug
16. aosp_dragon-eng
17. aosp_marlin-userdebug
18. aosp_sailfish-userdebug
19. aosp_flounder-userdebug
20. aosp_angler-userdebug
21. aosp_bullhead-userdebug
22. hikey-userdebug
23. hikey960-userdebug
24. aosp_shamu-userdebug

Which would you like? [aosp_arm-eng] 23
build/core/combo/TARGET_linux-arm.mk:47: *** Unknown ARM architecture version: armv8-a. Stop.

** Don’t have a product spec for: ‘hikey960’
** Do you have the right repo manifest?

Any idea to solve this ?


#7

Any idea to solve this ?

Not really. 7.1.2 should support armv8-a architecture. What was the output for source ./build/envsetup.h?


#8

for sure, here it is:

XPS-13-9360:~/repo/aosp-hikey$ source build/envsetup.sh
including device/asus/fugu/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-mips64/vendorsetup.sh
including device/generic/mini-emulator-mips/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/google/dragon/vendorsetup.sh
including device/google/marlin/vendorsetup.sh
including device/htc/flounder/vendorsetup.sh
including device/huawei/angler/vendorsetup.sh
including device/lge/bullhead/vendorsetup.sh
including device/linaro/hikey/vendorsetup.sh
including device/moto/shamu/vendorsetup.sh
including sdk/bash_completion/adb.bash


#9

Ok, their was a missing file on android 7.1.2 : build/core/combo/arch/arm/armv8-a.mk, I copy it from the master, and it seem work, here is the result now :

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.2
TARGET_PRODUCT=hikey960
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a73
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=cortex-a73
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.10.0-42-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=N2G48H
OUT_DIR=out

I’ll continue the build, and I will give you feedback, thanks for your help.


#11

Good work! But if there are many other files outside of device/linaro/* that are needed from master branch, then the ‘mixture’ might not work, or very hard to get it to work.


#12

Ok here is my next step :

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.2
TARGET_PRODUCT=hikey960
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a73
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=cortex-a73
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.10.0-42-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=N2G48H
OUT_DIR=out

Checking build tools versions…
including ./abi/cpp/Android.mk …
including ./art/Android.mk …
including ./bionic/Android.mk …
bionic/libc/arch-arm64/arm64.mk:65: *** “TARGET_CPU_VARIANT not set or set to an unknown value. Possible values are generic, denver64. Use generic for devices that do not have a CPU similar to any of the supported cpu variants.”.
build/core/ninja.mk:163: recipe for target ‘out/build-hikey960.ninja’ failed
make: *** [out/build-hikey960.ninja] Error 1

Any idea ?


#13

You can try to fix each build error that appears, but this could go on and on with no estimate on when it’ll end. Besides, even if you reach the end, there’s no guarantee built images will work properly.

Also, it seems like armv8-a.mk is already in build/core/combo/arch/arm64/, so copying it to build/core/combo/arch/arm/ doesn’t look like the right thing to do anymore.

The build should have triggered an armv8 build, not arm. Not sure what happened. Can you list the steps you took to mix device/linaro/* from master branch and 7.1.2 for the rest?


#14

To mix the master with 7.1.2, I just clone the repositories and the binaries:

that’s it!


#15

What about device/linaro/build? Did you get that from master too?


#16

Nop I use the one from 7.1.2. I’v tried to switch to the master but I had on error that say somthing like :

cat /build/envsetup.sh no such file or directory


#17

Ok. It’s possible that some incompatibilities have been introduced in master. See https://android.googlesource.com/platform/build/+/master/Changes.md#ANDROID_BUILD_TOP for details. If so, the files in device/linaro/* are then using a different set of env variables since they come from master, compared to the rest of the code. Not sure how else to help you here. Sorry.


#18

If 8.x is an option for you, perhaps try that version instead of 7.x like the user in the related thread above to see if you’ve better luck.


#19

thank you, I think I’ll move to 8.x, I have to cherry-pick all my changes from 7.1.2. I think it will be better.
thanks again for you help


#20

You’re welcome. Please note that there’s no guarantee you won’t hit the same/similar issues again, although it seems like others have managed to make it work (to a certain degree?) in https://discuss.96boards.org/t/aosp-8-1-stable.


#21

I just check you link, but I’m suprised to see that there NO graphics acceleration working at all. If this is true, I cannot do for my business with this board.

I took the board because I need more GPU power, and according to the spec of the board

CPU 4 Cortex A73 + 4 Cortex A53 Big.Little CPU architecture
GPU ARM Mali G71 MP8

Maybe I have to look for another board.