I have a question about the build-p.sh script. Does this script cover any changes made to AOSP files and files under optee/optee_os/ ? I remember in the past OPTEE needed separate compilation.
OP-TEE doesn’t need separate compilation. We’ve integrated it as part of the main AOSP build. That said, if you make any changes under optee/optee_os, optee_os and fip.bin might not be rebuild automatically due the make target missing a dependency. We’ll try to get the fix ‘loaded’ into our repos asap, but in the meantime, you can patch device/linaro/hikey manually as below.
index eb8100a6..bc6e1a1c 100644
@@ -14,7 +14,13 @@ endif
+# rebuild fip.bin whenever optee_os is modified
+$(DIST_DIR_PRODUCT)/fip.bin: $(BOOTLOADER_DIR)/Makefile $(sort $(shell find -L
rm -fr $(DIST_DIR_PRODUCT) $(OPTEE_OS_DIR)/out $(PRODUCT_OUT)/obj/optee
As for changes made to other AOSP files not related to OP-TEE, yes those should be covered as well as long as the Makefiles/Android.mk/Android.bp for them are written properly. The scripts are basically just wrappers around the ‘repo’ and ‘make’ commands with extra commands added to facilitate/automate patching for OP-TEE support and (hopefully) make it more user friendly.