Android 13 Source code - Build error

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

Android 13 Source code - Build error

2,934 Views
Adi99
Contributor I

I have downloaded source code from nxp website for imx8mp - Android 13 code.

but when I start to build bootloader for imx8mp-evk user debug image i got below error .

******************************************************************************************************

Compiling mkimage_imx8
PLAT=imx8mp HDMI=no
make[2]: *** No rule to make target 'lpddr4_pmu_train_1d_imem_202006.bin', needed by 'u-boot-spl-ddr.bin'. Stop.
make[2]: *** Waiting for unfinished jobs....
Compiling mkimage_imx8
cc -O2 -Wall -std=c99 -static ../iMX8M/mkimage_imx8.c -o mkimage_imx8 -lz
../iMX8M/mkimage_imx8.c: In function ‘copy_file.constprop’:
../iMX8M/mkimage_imx8.c:345:21: warning: ‘write’ reading 5 bytes from a region of size 4 [-Wstringop-overread]
345 | if (write(ifd, (char *)&zero, 4-tail) != 4-tail) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../iMX8M/mkimage_imx8.c:303:13: note: source object ‘zero’ of size 4
303 | int zero = 0;
| ^~~~
In file included from ../iMX8M/mkimage_imx8.c:24:
/usr/include/unistd.h:378:16: note: in a call to function ‘write’ declared with attribute ‘access (read_only, 2, 3)’
378 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
| ^~~~~
make[1]: *** [Makefile:23: flash_evk] Error 2

 

 

what is the problem?

0 Kudos
Reply
12 Replies

1,631 Views
giampietroghizz
Contributor III

hi,
I am trying to do the same thing.
I am following the directions given in this document:
https://www.nxp.com/docs/en/user-guide/Android_Auto_User's_Guide.pdf

however i see that the “build” folder is not created with the envsetup.sh file

could you give me some pointers?

thanks

0 Kudos
Reply

1,585 Views
giampietroghizz
Contributor III

i solved the problem: it was a misconfiguration of the enterprise network architecture

0 Kudos
Reply

242 Views
zhangzm
Contributor II

How did you solve it?

thanks

0 Kudos
Reply

231 Views
giampietroghizz
Contributor III
The problem was in the download phase of the android source code. The corporate IT department had applied restrictions, so the source code had not been downloaded correctly. Once these restrictions were removed from the firewall by the IT department, I was able to do the build correctly. I hope I was of some help.
0 Kudos
Reply

217 Views
zhangzm
Contributor II

OK. Thanks!

0 Kudos
Reply

2,906 Views
Adi99
Contributor I

HI @Zhiming_Liu 

1. source build/envsetup.sh

export CLANG_PATH=/opt/prebuilt-android-clang

export AARCH64_GCC_CROSS_COMPILE=/opt/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-

2. lunch evk_8mp-userdebug

3. ./imx-make.sh bootloader -j24

 

steps i have checked is up to date. but it will throw same error.

 

../iMX8M/mkimage_imx8.c: In function ‘copy_file.constprop’:
../iMX8M/mkimage_imx8.c:345:21: warning: ‘write’ reading 5 bytes from a region of size 4 [-Wstringop-overread]
345 | if (write(ifd, (char *)&zero, 4-tail) != 4-tail) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../iMX8M/mkimage_imx8.c:303:13: note: source object ‘zero’ of size 4
303 | int zero = 0;
| ^~~~
In file included from ../iMX8M/mkimage_imx8.c:24:

0 Kudos
Reply

2,894 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Do you still have this issue?

make[2]: *** No rule to make target 'lpddr4_pmu_train_1d_imem_202006.bin', needed by 'u-boot-spl-ddr.bin'. Stop.
make[2]: *** Waiting for unfinished jobs....

Maybe your repo sync is not complete and miss this firmware. 

0 Kudos
Reply

2,874 Views
Adi99
Contributor I

Hi @Zhiming_Liu 

error: bootable/libbootloader/: platform/bootable/libbootloader checkout 3dccc2dc55b1982668c268cefc1f648e489519a4
error: Cannot checkout platform/bootable/libbootloader

error: Unable to fully sync the tree.
error: Checking out local projects failed.
Failing repos:
bootable/libbootloader
Try re-running with "-j1 --fail-fast" to exit at the first error.

 

repo sync fialure in bootloader part. I have tried 4 to 5 times repo sync -j1 --fail-fast but same error is throwing.

what is the solution for that?

0 Kudos
Reply

2,851 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

@Adi99 

Try to delete the repo workspace and repo init again.

0 Kudos
Reply

2,890 Views
Adi99
Contributor I

Hi @Zhiming_Liu 

 

yes same error getting. again check repo sync and update you.

Thanks.

0 Kudos
Reply

2,918 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

@Adi99 

Please share your detailed steps. It seems that the product name you input is not correct.The correct command should be lunch evk8_mp-userdebug

0 Kudos
Reply

2,603 Views
Adi99
Contributor I

Hi @Zhiming_Liu 

 

i have solved this issue. I have re downloaded again repo and follow that NXP guide its works successfully.

0 Kudos
Reply