Problem setting alternate build directory w/ Android 10

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem setting alternate build directory w/ Android 10

Jump to solution
2,331 Views
dennis3
Contributor V

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.

Labels (1)
0 Kudos
1 Solution
2,115 Views
cjcdev
Contributor I

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

 

View solution in original post

0 Kudos
3 Replies
2,161 Views
cjcdev
Contributor I

I'm facing a similar issue with Android 11.  Did you ever figure out a solution? Setting the OUR_DIR did not help either.

0 Kudos
2,250 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

If this is still relevant, please try setting the environment variable OUT_DIR.

Regards,
Aldo.

0 Kudos
2,116 Views
cjcdev
Contributor I

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

 

0 Kudos