How to change fdtfile and build image?

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

How to change fdtfile and build image?

跳至解决方案
5,571 次查看
Ichi_
Contributor I

Hi All

My kernel is 5.4.70 and use imx8mq-evk.

I can use the command setenv under uboot to change the content of fdtfile from

imx8mq-evk.dtb to imx8mq-evk-dcss-adv7535.dtb and run. 

I want the build image to be fixed in imx8mq-evk-dcss-adv7535.dtb after booting.

I looked for u-boot-imx/1_2020.04-r0/git/include/configs/imx8mq_evk.h file but the

content only saw fdt_file=imx8mq-evk.dtb and no fdtfile.

Which file should I modify?Thanks.

0 项奖励
回复
1 解答
5,389 次查看
pengyong_zhang
NXP Employee
NXP Employee

HI @Ichi_ 

Please try to use the attachment file test.

B.R

在原帖中查看解决方案

0 项奖励
回复
16 回复数
5,365 次查看
pengyong_zhang
NXP Employee
NXP Employee

Hi @Ichi_ 

Glad to listen this, haha. Maybe it's you flash the error .bin file. Anyway, If you have any further question, you can contact me anytime for free. 

B.R

0 项奖励
回复
5,390 次查看
pengyong_zhang
NXP Employee
NXP Employee

HI @Ichi_ 

Please try to use the attachment file test.

B.R

0 项奖励
回复
5,371 次查看
Ichi_
Contributor I

Hi @pengyong_zhang 

I cannot use the file you provided for burning. It will stay at the stage shown in the picture below.

Ichi__0-1730966248921.png

However, after I used bitbake-image-multimedia to replace the file in the uuu folder with the imx-boot-imx8mqevk-sd.bin-flash_evk generated, I could successfully see that fdt_file was set to imx8mq-evk-dcss-adv7535.dtb after booting.

Thank you very much

0 项奖励
回复
5,415 次查看
pengyong_zhang
NXP Employee
NXP Employee

Hi, @Ichi_ 

It is strange, i have tested this on my EVK board, It works fine. Please use the "devtool modify u-boot-imx" command change your code. Or you can compile the Uboot separately.

B.R

0 项奖励
回复
5,408 次查看
Ichi_
Contributor I

Hi @pengyong_zhang 

Thank you for your continued attention to this issue.

I tried compiling uboot separately but got the same result(fdtfile=imx8mq-evk.dtb).

In addition, I got information from imx8mq evk

"Loading Environment from MMC... *** Warning - bad CRC, using default environment"

Complete information as attachments.

Which bsp version do you use? Has the same warning occurred?

Thanks.

0 项奖励
回复
5,462 次查看
pengyong_zhang
NXP Employee
NXP Employee

hi @Ichi_

Sorry, my server has some issue now, so i can not reproduce your question.

Could you please use our latest BSP code and retry?

repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-scarthgap -m imx-6.6.36-2.1.0.xml

repo sync

bitbake imx-image-multimedia

 

B.R

 

0 项奖励
回复
5,450 次查看
Ichi_
Contributor I

Hi @pengyong_zhang 

 

My environment has a newer version Linux 6.6.23_2.0.0.

I have modified fdtfile=imx8mq-evk-dvss-adv7535.dtb in imx8mq_evk.h as shown below:

Ichi__0-1730884021125.png

the imx8mq_evk.h path is build-wayland/tmp/work/imx8mqevk-poky-linux/

u-boot-imx/2024.04/inxlude/config/imx8mq_evk.h

But the situation is the same as before. read the fdtfile from uboot is imx8mq-evk.dtb

Ichi__1-1730884401243.png

 

 

0 项奖励
回复
5,485 次查看
pengyong_zhang
NXP Employee
NXP Employee

HI @Ichi_ 

ok,  i will reproduce your issue on my site, and will give you the feedback ASAP.

0 项奖励
回复
5,501 次查看
pengyong_zhang
NXP Employee
NXP Employee

hi @Ichi_ 

Please share how did you compile the Image and flash it to your board?

B.R

0 项奖励
回复
5,498 次查看
Ichi_
Contributor I

Hi @pengyong_zhang 

The kernel is imx-yocto-L5.4.70_2.3.0

After modifying the imx8mq_evk.h file I executed the following command:

    1  bitbake -c cleanall imx-image-multimedia

    2  bitbake -c compile -f u-boot-imx

    3  bitbake -c deploy -f u-boot-imx

    4  bitbake -c compile -f linux-imx

    5  bitbake -c deploy -f linux-imx

    6  bitbake imx-image-multimedia

And I use uuu tool for programming, the command is sudo uuu uuu.auto

Ichi__0-1730793723715.png

In addition, I can use this process to enable panel and touch drivers and actions.

thank you very much

 

0 项奖励
回复
5,514 次查看
pengyong_zhang
NXP Employee
NXP Employee

hI @Ichi_ 

It's the same thing, fdt_file is fdtfile.

B.R

0 项奖励
回复
5,510 次查看
Ichi_
Contributor I

Hi @pengyong_zhang 

I have set fdt_file to imx8mq-evk-dcss-adv7535.dtb and re-burned.

Ichi__2-1730787578023.png

 

But after boot, the fdtfile is still imx8mq-evk.dtb.

Ichi__1-1730787263594.png

Thanks for your continued replies.

0 项奖励
回复
5,525 次查看
pengyong_zhang
NXP Employee
NXP Employee

HI @Ichi_ 

Please use the latest uboot version, and change the  "fdtfile=imx8mq-evk.dtb\0" \ on  imx8mq_evk.h file.

B.R

0 项奖励
回复
5,522 次查看
Ichi_
Contributor I

Hi @pengyong_zhang 

 

Thank you for your reply.

As mentioned before I found the u-boot-imx/1_2020.04-r0/git/include/configs/imx8mq_evk.h file, but the content only shows fdt_file=imx8mq-evk.dtb, no fdtfile.

0 项奖励
回复
5,539 次查看
pengyong_zhang
NXP Employee
NXP Employee

hi @Ichi_ 

When you change the fdtfile in uboot, you should type "saveenv" command to save it .

B.R

 

0 项奖励
回复
5,534 次查看
Ichi_
Contributor I

Hi @pengyong_zhang 

 

Thank you for your reply.

What I want is that the fdtfile after bitbake imx-image-multimedia is imx8mq-evk-dcss-adv7535.dtb without having to modify it through uboot commands.

Do you know how to modify it?

 

0 项奖励
回复