We talked about : OpTEE + Android in Hikey960
No, we didn’t really talked about it. The system sends out notification only when a new post is made, not when one is edited, so if the edit is not trivial, as in your case above, it might be better to make a new post instead, else I wouldn’t know of your updates.
I re-installed Ubuntu as 14.04.5. I did everything step by step. I used linaro toolchain. But, Error is same.
I’m not sure about the cross toolchains that come with Ubuntu 14.04. It might be ok. The linaro ones I suggested earlier above are wrong! Sorry about that! They shouldn’t have worked. Not sure why my previous built was successful. See https://github.com/ARM-software/tf-issues/issues/401 for details, especially https://github.com/ARM-software/tf-issues/issues/401#issuecomment-316450010. Have you seen this (or a similar thread) and is this why you’re asking about the binutils version? In any case, you need to check the cross compilers binutils version, e.g. aarch64-linux-gnu-ld, not the native (ld) one, but for linaro toolchain, the version might not give you enough info due to backporting.
I’ve also updated the makefile to use linaro gcc 7 instead, so below commands should work.
cd <aosp main>
repo sync device/linaro/hikey
make TARGET_BUILD_UEFI=true TARGET_TEE_IS_OPTEE=true #no sudo!
Again, the makefile automatically downloads and uses the toolchain so you shouldn’t have to download manually.
I solved the problem. make TARGET_BUILD_UEFI=true TARGET_TEE_IS_OPTEE=true command needs root priviliges.
I don’t think this is a result of the build needing root privileges. Rather that as a result of
sudo, you’re now using a different toolchain that doesn’t trigger the build error. Also, using
sudo might possibly make the images not work properly due to file permissions, so not recommended.
I believe everything should now be ok with the build instructions. Please make sure you don’t have any toolchains that you’ve downloaded manually in your $PATH that might interfere with the build, and try again without
 The ones installed with
apt-get and the ones downloaded in
/home/martin/Android/Sdk/ndk-bundle. The android toolchains should already be in
/home/martin/optee_android_manifest/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin so you shouldn’t need the others.