Fail to boot up with hikey960 and neonkey

I want to boot up hikey960 and neonkey on aosp and read the sensor data with sensor box application. I tried several builds from aosp-known-good-manifests, but none of them can work.
Could you anyone can provide the manifest.xml which I can successfully read the sensor data from neonkey.

and when after I sync code with the latest manifest from https://github.com/96boards/aosp-known-good-manifests/tree/master/latest
and then build image with “make TARGET_SENSOR_MEZZANINE=neonkey -j24”.
errors:
[ 2% 1942/95016] aux C: libnanohub_os <= device/google/contexthub/firmware/os/core/heap.c
FAILED: out/target/product/hikey960/aux/argonkey/nanohub-stm32-cortexm4/obj/STATIC_LIBRARIES/libnanohub_os_intermedia tes/os/core/heap.o
/bin/bash -c “PWD=/proc/self/cwd /root/toolchains/gcc-arm-none-eabi-5_3-2016q1/bin/arm-none-eabi-gcc -I device/goo gle/contexthub/firmware/external/freebsd/inc -I device/google/contexthub/firmware/os/algos -I device/google/contexthu b/firmware/variant/argonkey/inc -I device/google/contexthub/firmware/os/inc -I device/google/contexthub/firmware/os/p latform/stm32/inc -I device/google/contexthub/firmware/os/cpu/cortexm4/inc -I device/google/contexthub/firmware/…/li b/include -I system/chre/chre_api/include/chre_api -I device/google/contexthub/firmware -I out/target/product/hikey96 0/aux/argonkey/nanohub-stm32-cortexm4/obj/STATIC_LIBRARIES/libnanohub_os_intermediates -I out/target/product/hikey960 /aux/argonkey/nanohub-stm32-cortexm4/gen/STATIC_LIBRARIES/libnanohub_os_intermediates -I libnativehelper/include_jni $(cat out/target/product/hikey960/aux/argonkey/nanohub-stm32-cortexm4/obj/STATIC_LIBRARIES/libnanohub_os_intermediat es/import_includes) -c -Wall -Werror -Waddress -Wempty-body -Wenum-compare -Wlogical-op -Wmissing-declarations -Wp ointer-arith -Wshadow -fdata-sections -ffunction-sections -fno-strict-aliasing -fno-unwind-tables -fstack-reuse=all - fvisibility=hidden -DCHRE_MESSAGE_TO_HOST_MAX_SIZE=128 -DCHRE_NO_DOUBLE_SUPPORT -DDEBUG -g -ggdb3 -D_OS_BUILD_ -DUSE_ PRINTF_FLAG_CHARS -O2 -DPLATFORM_HW_TYPE=0x4172 -DDEBUG_SWD -mthumb -mcpu=cortex-m4 -march=armv7e-m -mfloat-abi=softf p -mfpu=fpv4-sp-d16 -mno-thumb-interwork -ffast-math -fsingle-precision-constant -DARM -DUSE_NANOHUB_FLOAT_RUNTIME -D ARM_MATH_CM4 -D__FPU_PRESENT -DCPU_NUM_PERSISTENT_RAM_BITS=32 -DPLATFORM_HW_VER=0 -DANDROID_STRICT -Werror=int-to-p ointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-c ompare -Wno-tautological-type-limit-compare -Wno-tautological-unsigned-enum-zero-compare -Wno-tautological-unsigned-z ero-compare -Wno-enum-compare -Wno-enum-compare-switch -Wno-c++98-compat-extra-semi -Wno-return-std-move-in-c++11 -MD -MF out/target/product/hikey960/aux/argonkey/nanohub-stm32-cortexm4/obj/STATIC_LIBRARIES/libnanohub_os_intermediates /os/core/heap.d -o out/target/product/hikey960/aux/argonkey/nanohub-stm32-cortexm4/obj/STATIC_LIBRARIES/libnanohub_os _intermediates/os/core/heap.o device/google/contexthub/firmware/os/core/heap.c”
cc1: error: -Werror=address-of-temporary: no option -Waddress-of-temporary
cc1: error: unrecognized command line option ‘-Wno-return-std-move-in-c++11’ [-Werror]
cc1: error: unrecognized command line option ‘-Wno-c++98-compat-extra-semi’ [-Werror]
cc1: error: unrecognized command line option ‘-Wno-enum-compare-switch’ [-Werror]
cc1: error: unrecognized command line option ‘-Wno-tautological-unsigned-zero-compare’ [-Werror]
cc1: error: unrecognized command line option ‘-Wno-tautological-unsigned-enum-zero-compare’ [-Werror]
cc1: error: unrecognized command line option ‘-Wno-tautological-type-limit-compare’ [-Werror]
cc1: error: unrecognized command line option ‘-Wno-tautological-constant-compare’ [-Werror]
cc1: all warnings being treated as errors
FAILED: [W][2019-07-22T13:21:15+0800][19591] void cmdline::logParams(nsjconf_t *)():250 Process will be UID/EUID=0 in the global user namespace, and will have user root-level access to files
[W][2019-07-22T13:21:15+0800][19591] void cmdline::logParams(nsjconf_t *)():260 Process will be GID/EGID=0 in the glo bal user namespace, and will have group root-level access to files
[W][2019-07-22T13:21:15+0800][1] bool caps::initNs(nsjconf_t *)():215 prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_CLEAR_ALL) : Invalid argument
13:21:48 ninja failed with: exit status 1

so does the latest aosp master support hikey960 with neonkey?

AOSP dropped support for neonkey and similar sensorhub based boards long time ago.
For now, you can try the oldest manifest from here https://github.com/96boards/aosp-known-good-manifests/tree/master/known-good/hikey960
It should work.

I already tried the oldest manifest https://github.com/96boards/aosp-known-good-manifests/blob/master/known-good/hikey960/2018-02-27_14:36:45-pinned-manifest.xml.
but there’s no neonkey related code.

I also tried several other builds from https://github.com/96boards/aosp-known-good-manifests/tree/master/known-good/hikey960. some builds have related code but cannot work from application side.

I am really urgent for setup hikey960 and neonkey, is there any other way to find the suitable manifest?

Well, the good news is that the source code is all very much still available. This means that you can certainly get it working with a little bit of effort.

It looks to me like the thing that is stopping it from compiling are a bunch of unrecognized compiler parameters. You can start by removing those.

thx for reply. much effort will be taken to resolve the compile issue, so I decides to switch to older branch. it can be built successfully, but no nanohub loaded.
I have no idea how to start to work with to make them works. Could you give me some advice?

The only advice I can really give you is… read the error messages, because they tell you exactly why something doesn’t work. If you can get it to compile and it still doesn’t work, read the logs. If there is nothing pertinent in the logs, read and understand the code and add logging wherever you think it is needed.

And don’t forget to pay attention to avc denials (selinux). You might want to start off by setting selinux to permissive.

problem has been resolved. thanks for all your support.

No need to modify dtb, this line should take care of it during build time: hikey960/BoardConfig.mk - device/linaro/hikey - Git at Google

Also try the pie-release branch it should work.