I am looking at the instructions on https://github.com/linaro-swg/optee_android_manifest. Given that OPTEE now has support for Hikey 960, I wanted to ask if the following steps would work for building Android + OPTEE for Hikey 960:
repo init -u https://android-git.linaro.org/git/platform/manifest.git -b android-8.1.0_r7 -g “default,-non-default,-device,hikey”
git clone https://android-git.linaro.org/git/platform/manifest.git -b linaro-oreo local_manifests
rm -f swg.xml
Sync: repo sync -j24
repo manifest -r -o pinned-manifest.xml
tar xzf arm-hikey960-OPR-cf4e0c80.tgz
Run AOSP Build:
setprop sys.usb.configfs 1
make TARGET_BUILD_KERNEL=true TARGET_BOOTIMAGE_USE_FAT=true
CFG_SECURE_DATA_PATH=y CFG_SECSTOR_TA_MGMT_PTA=y TARGET_TEE_IS_OPTEE=true
No, the steps are for hikey620 and so will not work for hikey960.
Op-tee hasn’t been properly integrated into hikey960 aosp yet.
There are temporary instructions @ https://github.com/vchong/optee_android_manifest/blob/wip/tmp.txt but the last time I tried, even though I was able to boot and run xtest to completion, there were constant errors scrolling on the console output similar to those in http://discuss.96boards.org/t/transaction-failed. Don’t think those are op-tee related errors though.
I will try your suggested list of steps and let you know how it goes.
Thank you !
You’re welcome. Just a note of caution that even the regular (non-optee) hikey960 aosp components are still under constant development/improvement so please don’t expect this to have any semblance of a working condition similar to that of the hikey620 which is more mature.
I ran the following steps:
repo init -u https://android-git.linaro.org/git/platform/manifest.git -b master
git clone https://github.com/vchong/optee_android_manifest.git -b wip local_manifests
tar xzf arm-hikey960-NOU-7ad3cccc.tgz
I use the following build script:
I am getting the compilation errors for fip.bin. The error began as shown below:
The compilation stopped showing the error below:
@vchong can you please check if you are also getting this error ? Do you know how to fix this build error ?
@vchong I tried to sync the branch again and tried a compilation using the steps mentioned above. I get the following error:
I wanted to ask if you have seen this error before and if you know how to fix it ?
@a2t2 Yes sorry looks like the build is broken atm. I’ll try to get to it when possible but the priority is not high.
@vchong Okay. Let me know once its working. Thank you.
@at2t As a workaround, make below change and rebuild:
change LOCAL_CFLAGS += -g3
to LOCAL_CFLAGS += -g3 -Wno-error.
LOCAL_CFLAGS += -g3
LOCAL_CFLAGS += -g3 -Wno-error
@at2t Even with above workaround there’s still another error so please wait for update.
@vchong Would it more stable to build if a particular branch number (like android 8.1) is used, instead of using the master branch ?
@at2t No. Not all 8.* branches/trees support hikey960. Even if some do, they’re not so ‘stable’ either. See https://discuss.96boards.org/t/aosp-8-1-stable for example.
@vchong Okay. I will wait till you get the build working. Thanks.
@a2t2 Sorry for the wait and thanks for your patience. Try adding below line to the bottom of the device/linaro/hikey/sepolicy/tee.te file and rebuild.
typeattribute tee_data_file core_data_file_type;