I want to customize the android output build directory for automation and OTA purposes. I'm simply setting the environment variable OUT_DIR_COMMON_BASE before calling build/envsetup.sh and lunch.
This works properly in Android 9. In the Android 10 build, the build is failing at:
device/fsl/common/build/dtbo.mk:37 writing to read only directory 'out/target/product/XXX/dtbo-XXX.img'
I'm not sure if this is a problem with the dtbo makefile or is something wrong with my specific product. Any suggestion where to find the source of this problem? If I simply compile to the normal out directory w/ out setting the environment variable then compilation works fine. Also, before the failure, other targets are being built in the new OUT directory fine. So it appears to be something just with this makefile or target. I usually am calling imx-make.sh but this error also occurs if I just call make.
Solved! Go to Solution.
I found the issue with the NXP BSP (11.0.1).
You do need to make sure you set the OUT_DIR env variable in your build. However, in order for the dtbo.mk NXP makefile to use this OUT_DIR, you need to fix the path of the DTBOIMAGE.
This is what the NXP BSP currently has:
BOARD_PREBUILT_DTBOIMAGE := out/target/product/evk_8mn/dtbo-imx8mn.img
Change this to
BOARD_PREBUILT_DTBOIMAGE := $(OUT_DIR)/target/product/evk_8mn/dtbo-imx8mn.img
I'm facing a similar issue with Android 11. Did you ever figure out a solution? Setting the OUR_DIR did not help either.
Hello,
If this is still relevant, please try setting the environment variable OUT_DIR.
Regards,
Aldo.
I found the issue with the NXP BSP (11.0.1).
You do need to make sure you set the OUT_DIR env variable in your build. However, in order for the dtbo.mk NXP makefile to use this OUT_DIR, you need to fix the path of the DTBOIMAGE.
This is what the NXP BSP currently has:
BOARD_PREBUILT_DTBOIMAGE := out/target/product/evk_8mn/dtbo-imx8mn.img
Change this to
BOARD_PREBUILT_DTBOIMAGE := $(OUT_DIR)/target/product/evk_8mn/dtbo-imx8mn.img