Build Android 9 boot.img problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Build Android 9 boot.img problem

跳至解决方案
4,656 次查看
yenchou
Contributor III

Hi All,

When I used  imx-p9.0.0_2.2.0-ga to build boot.img, I met a problem.

I used google and other community, but did not find a solution.

The build log:

Using /home/user/FSL_9_0_0/android_build/vendor/nxpopen-source/kernel_imx/arch/arm/configs/imx_v7_android_defconfig as base
Merging /home/user/FSL_9_0_0/android_build/vendor/nxp-opensource/kernel_imx
sed: read error on /home/user/FSL_9_0_0/android_build/vendor/nxp-opensource/kernel_imx: Is a directory
cat: /home/user/FSL_9_0_0/android_build/vendor/nxp-opensource/kernel_imx: Is a directory
make[1]: Entering directory `/home/user/FSL_9_0_0/android_build/out/target/product/sabresd_6dq/obj/KERNEL_OBJ'
GEN ./Makefile
HOSTCC scripts/kconfig/zconf.tab.o
scripts/kconfig/zconf.tab.c:2466:23: fatal error: zconf.lex.c: No such file or directory
compilation terminated.
make[2]: *** [scripts/kconfig/zconf.tab.o] Error 1
make[1]: *** [alldefconfig] Error 2
make[1]: Leaving directory `/home/user/FSL_9_0_0/android_build/out/target/product/sabresd_6dq/obj/KERNEL_OBJ'
make: *** [sub-make] Error 2
grep: /home/user/FSL_9_0_0/android_build/out/target/product/sabresd_6dq/obj/KERNEL_OBJ/.config: No such file or directory
Value requested for CONFIG_KERNEL_LZO not in final .config

Did anyone meet the same problem?

How do I resolve the err?

Thank you for your help.

标签 (3)
标记 (1)
1 解答
4,291 次查看
radhikasomaiya
Senior Contributor II

Hi Yen Chou ,

Can you please try to build boot.img after clean it with $make clean. We are able to build boot.img with the steps provided in your comment.

Regards,

Radhika Somaiya. 

在原帖中查看解决方案

8 回复数
4,291 次查看
radhikasomaiya
Senior Contributor II

Hi Yen Chou,

No, you don't need to do the step $make clean every time.

Regards,

Radhika Somaiya.

---------------------------------------------------------------------------------------------------------------------------

Note: If our post answers your question, please click the Correct Answer button. Thank you!
---------------------------------------------------------------------------------------------------------------------------

0 项奖励
回复
4,291 次查看
yenchou
Contributor III

Hi Radhika,

Thank you for your help.

 

4,292 次查看
radhikasomaiya
Senior Contributor II

Hi Yen Chou ,

Can you please try to build boot.img after clean it with $make clean. We are able to build boot.img with the steps provided in your comment.

Regards,

Radhika Somaiya. 

4,291 次查看
yenchou
Contributor III

Hi Radhika,

Sorry for reply late, I took leave last Friday.

I  used clean with  $make clean then it built  successfully.

Do I have to do the step "$make clean"  before I build boot.img every time?

Many thanks,

Yen Chou.

0 项奖励
回复
4,291 次查看
radhikasomaiya
Senior Contributor II

Hi Yen Chou,

It seems like you are building for i.MX 6Quad/6DualLite/6QuadPlus SABRE-AI Board. You can refer Table 1. Build names from Android User's Guide for android device name.

android_img.png

Please try once to build with the below steps:

         $ cd ${MY_ANDROID}

         $ source build/envsetup.sh
         $ lunch sabreauto_6q-userdebug
         $ make bootimage

Regards,

Radhika Somaiya.

0 项奖励
回复
4,291 次查看
yenchou
Contributor III

Hi Radhika,

Thank you for your quick reply.

Sorry, I copied the wrong words, the correct words is "lunch sabresd_6dq-userdebug".

I want to build  image for imx6 DualLite SABRE-SD board.

Now I have to copy .config and zconf.lex.c files to out/target/product/sabresd_6dq/obj/KERNEL_OBJ.

But I think the method is not regular, I have to find other method.

Many thanks,

Yen Chou.

0 项奖励
回复
4,291 次查看
radhikasomaiya
Senior Contributor II

Hi Yen Chou ,

We are able to build boot.img with imx-p9.0.0_2.2.0-ga for i.MX 6Quad/6DualLite/6QuadPlus SABRE-SD Board and SABRE Platform. To build boot.img you can refer section 3.5 Building boot.img from the attached Android User's Guide. You can download the documents from the below link.

https://www.nxp.com/docs/en/supporting-information/android_p9.0.0_2.2.0-ga_docs.zip 

Can you please share the build steps which you have followed? 

Regards,

Radhika Somaiya.

0 项奖励
回复
4,291 次查看
yenchou
Contributor III

Hi Radhika,

Thank you for your reply.

I already read the documents before build Android9 and followed the documents steps to do.

My steps is

$ export MY_ANDROID=~/android_build

$ cd ${MY_ANDROID}
$ source build/envsetup.sh
$ lunch sabreauto_6dq-userdebug
$ make bootloader -j4

$ cd ${MY_ANDROID}/vendor/nxp-opensource/kernel_imx

$ export ARCH=arm
$ export CROSS_COMPILE=${MY_ANDROID}/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-

$ make imx_v7_android_defconfig

$ make KCFLAGS=-mno-android

$ cd ${MY_ANDROID}

$ make bootimage

When I used the command "make bootimage", the error happened.

I found the path "android_build/out/target/product/sabresd_6dq/obj/KERNEL_OBJ" didn't have .config file, then I 

found other path "android_build/out/target/product/sabresd_6dq/obj/KERNEL_OBJ/scripts/kconfig/" also didn't have zconf.lex.c file.

But I didn't know what happend.

Do you have any ideas?

0 项奖励
回复