Deploy Yocto Image IMX8

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

Deploy Yocto Image IMX8

1,073 次查看
MagVille1205
Contributor II

Hi, I've been trying to build a linux OS for my motherboard IMX8MQ M8M051.

I've tried multiple times and nothing seems to work. I have finally compiled a new image (MACHINE="imx8mq-evk", DISTRO="fsl-imx-xwayland", IMAGES="imx-image-core"), but I have not been able to deploy it. 

I build my image based on the nxp documentation for yocto :

https://www.nxp.com/docs/en/user-guide/RTEDGEYOCTOUG.pdf

https://www.nxp.com/docs/en/user-guide/IMX_YOCTO_PROJECT_USERS_GUIDE.pdf

When trying the following line, nothing happens... :

.\uuu.exe -b emmc_all imx-boot-imx8mq-evk-sd.bin-flash_evk imx-image-core-imx8mq-evk.rootfs.wic.zst

The thing is, i'm using the files mentionned in the documentation....

I have the manufacturer image (only the one to deploy not the build) and that one works (I can deploy it), but for technical reasons I have to build my own image. As I know that the problem is not the hardware but most likely the image I build...

 

If anyone has questions, ideas or advice, I would be more than happy to hear them ! 

In case the files I use aren't the right one, here is all the files in my deploy image folder :

MagVille1205_1-1746006909475.png

Capture d'écran 2025-04-30 115229.png

MagVille1205_0-1746006863118.png

MagVille1205_2-1746006942815.png

 

0 项奖励
回复
6 回复数

1,059 次查看
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @MagVille1205 

I hope you are doing very well.

 

The image were is your .wic file is not very clear. But you can try this command:

 

uuu -b emmc_all u-boot-imx8mq-evk.bin-sd <your.wic_file>

 

Please try it.

 

Best regards,

Salas.

0 项奖励
回复

996 次查看
MagVille1205
Contributor II

Hi Salas,

First of all thank you so much for taking the time to respond !

I tried what you said and I got this :

PS C:\Users\username\Desktop\M8M051\partage\imx8mq-evk\imx8mq-evk> .\uuu.exe -b emmc_all u-boot-imx8mq-evk.bin-sd imx-image-core-imx8mq-evk.rootfs.wic.zst
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.2.135-0-gacaf035

Success 0 Failure 1

1:11 1/ 1 [Can find validate IVT header ] SDP: boot -f u-boot-imx8mq-evk.bin-sd

So nothing much is going on and I thinkthe problem is my image...

For more context :

I'm currently an intern at a company. And my goal is to build an image with the yocto project for a board they have (i.MX8 M8M051). I'm very new to the yocto project, so I struggle even more.
I cannot call the manufacturer and ask for all of the image build files because I would have to pay, which my company doesn't want to do cause this project is just a "bonus" for them, and the goal of my internship is in fact to successfully build this OS.

After more researched I realised that :

- the MACHINE = imx8mq-evk (based on the manufacturer files)
- The manufacturer built his image on YOCTO 2.5, which is out of date, so for compatibility issue I can only do it with a recent version of Yocto (Styhead)
- In the manufacturer files, there is fsl-imx8mq-M8M051-HDMI.dtb which is used when deploying the image, so I guess I should use it too ? (If the file is put in .dts format, I can read all the configurations parameters (screen, USB, CPU, GPU…) regarding the board, which probably means that without it, it wouldn't work)
- So based on the image I built, I tried to do just like the manufacturer, so create a file like uuu_emmc_M8M051_uboot-kernel-rootfs-HDMI.uuu, compile the flash.bin file, etc... but nothing worked, I still got the same error ("[Can find validate IVT header ] SDP: boot …" or just nothing happening)
- Then after more research, it appears that I should have used the fsl-imx8mq-M8M051-HDMI.dts file before compiling my image by adding it in a specific folder… which I tried and still didn't succeed.

I'm a bit lost with what I am supposed or not supposed to do because nothing has been working for me !

Do you have an idea or a link to a guide that really explains how to include a configuration file for a specific board ?

(I'm also adding that I am now building the image with a docker based on what the nxp documentation said at the beginning of page 6 : https://www.nxp.com/docs/en/user-guide/IMX_YOCTO_PROJECT_USERS_GUIDE.pdf )

Thanks in advance for the help !

0 项奖励
回复

980 次查看
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @MagVille1205 

 

Can you try to build out of docker (I mean in a clear Linux terminal machine)?

Go to the chapter 3.2 Host packages of i.MX Yocto Project User's Guide and there are the following steps:

$ sudo apt install gawk wget git diffstat unzip texinfo gcc build-essential
 chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils
 iputils-ping python3-git python3-jinja2 python3-subunit zstd liblz4-tool file
 locales libacl1

 

$ mkdir ~/bin (this step may not be needed if the bin folder already exists)
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo

 

$ export PATH=~/bin:$PATH

 

$ git config --global user.name "Your Name"
$ git config --global user.email "Your Email"
$ git config --list

 

$ mkdir imx-yocto-bsp
$ cd imx-yocto-bsp
$ repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-styhead -m imx-6.12.3-1.0.0.xml
$ repo sync

 

At this point, you can refer to the chapter 2.1.2 How to build and load Kernel in Yocto Project of i.MX Porting Guide.

Then to chapter 3.1.2 How to build and load U-Boot in Yocto Project of same document.

 

Then, you should be able to get the correct image and load to that board.

 

I hope this can helps to you.

 

Best regards,

Salas.

 

0 项奖励
回复

855 次查看
MagVille1205
Contributor II

Hi @Manuel_Salas,

Thank you for your response !

I followed your instruction using the .dtb file of the manufacturer and it compiled without problem so that's already really great !

Once I did all of the steps (2.1.2 How to build and load Kernel in Yocto Project and 3.1.2 How to build and load U-Boot in Yocto Project), I was kind of lost cause I couldn't deploy my image with only this. So I searched and found out that I might have to do bitbake imx-boot to get the necessary files in order to deploy my image, so that's what I did. (I wanted to make sure that this already worked before compiling the actual full image (imx-image-full).

To make sure that if there was a problem it was my image and not the board, I started like I do every time by deploying the manufacturer image's. At first I had a problem with the _rootfs.sdcard file but it was my fault, I didn't do the right line command… Once that one worked, I tried with mine.

After multiple attempt, I did this :
PS C:\Users\myusername\Desktop\M8M051\partage\imx8mqevk-m8m051\imx8mqevk-m8m051> .\uuu.exe -v SDP: boot -f imx-boot-imx8mqevk-m8m051-emmc.bin-flash_evk
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.2.135-0-gacaf035

Build in config:
Pctl Chip Vid Pid BcdVersion
==================================================
SDPS: MX8QXP 0x1fc9 0x012f [0x0002..0xffff]
SDPS: MX8QM 0x1fc9 0x0129 [0x0002..0xffff]
SDPS: MX28 0x15a2 0x004f
SDPS: MX815 0x1fc9 0x013e
SDP: MX7D 0x15a2 0x0076
SDP: MX6Q 0x15a2 0x0054
SDP: MX6D 0x15a2 0x0061
SDP: MX6SL 0x15a2 0x0063
SDP: MX6SX 0x15a2 0x0071
SDP: MX6UL 0x15a2 0x007d
SDP: MX6ULL 0x15a2 0x0080
SDP: MX6SLL 0x1fc9 0x0128
SDP: MX7ULP 0x1fc9 0x0126
SDP: MXRT106X 0x1fc9 0x0135
SDP: MX8MM 0x1fc9 0x0134
SDP: MX8MQ 0x1fc9 0x012b
SDPU: SPL 0x0525 0xb4a4 [0x0000..0x04ff]
SDPV: SPL1 0x0525 0xb4a4 [0x0500..0x9998]
SDPU: SPL 0x0525 0xb4a4 [0x9999..0x9999]
FBK: 0x066f 0x9afe
FBK: 0x066f 0x9bff
FB: 0x0525 0xa4a5
FB: 0x18d1 0x0d02
Wait for Known USB Device Appear...
>Start Cmd:SDP: boot -f imx-boot-imx8mqevk-m8m051-emmc.bin-flash_evk
New USB Device Attached at 1:11
6400%1:11>Okay

Okay

This is the first time I am seing something green with the word okay so I guess this is good news ? However, when I tried this : .\uuu.exe SDP: boot -f imx-boot-imx8mqevk-m8m051-emmc.bin-flash_evk
I got this only if I turned the board ON/OFF…
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.2.135-0-gacaf035

Success 0 Failure 0

1/ 0 [ ]
1:11 1/ 0 [=================100%=================]

Okay

And when I tried to do a basic uuu file, it goes directly to 100% and get stuck :
PS C:\Users\myusername\Desktop\M8M051\partage\imx8mqevk-m8m051\imx8mqevk-m8m051> .\uuu.exe flash.uuu
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.2.135-0-gacaf035

Success 0 Failure 0

1:11 1/ 1 [=================100%=================] SDP: boot -f imx-boot-imx8mqevk-m8m051-emmc.bin-flash_evk

As I don't have the appropriate USB serial UART, I don't have more informations… but I decided to keep going and started to compile the full image (imx-image-full) ! I'll keep you updated once that's done and whether it worked or not ! In the meantime, if you have any advice for the image deployment, I am happy to hear them ! (The manufacturer seems to use a flash.bin file but I'm not sure how he got it ??)

my flash.uuu :

uuu_version 1.2.39

SDP: boot -f imx-boot-imx8mqevk-m8m051-emmc.bin-flash_evk
FB: ucmd setenv fastboot_dev mmc
FB: ucmd setenv mmcdev 0
FB: ucmd mmc dev 0
FB: flash -raw2sparse all Image-imx8mqevk-m8m051.bin
FB: done

One again, thank you so much for your help !

Have a nice day !

0 项奖励
回复

844 次查看
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello, 

 

The flash.bin is the bootloader binary, and you can make your own with mkimage, but as you are working with yocto, that is not necesary, mkimage is designed to work with an standalone environment.

Also, remember that file imx-boot-imx8mqevk-m8m051-emmc.bin-flash_evk, is the bootloader, like "flash.bin".

 

If you set the command:

uuu -b emmc_all imx-boot-imx8mqevk-m8m051-emmc.bin-flash_evk

 

You should be able to boot just the bootloader (U-boot). (Of course, change the switches from Download mode to boot with eMMC).

Best regards,

Salas. 

0 项奖励
回复

564 次查看
MagVille1205
Contributor II

Hi @Manuel_Salas,

 

I tried to compile the whole image, but I got issues with the disk space. My VM is currently running on 500GB and I keep getting errors regarding low disk space (0.998GB left)... So I feel like there is a problem, and this will not end up working.

So I decided to start all over again ! I also bought a UART debug board, which I will receive next week ! That way, I will be able to have more info regarding why it's not working.

In the meantime, I would like to get more info about if and how I am supposed to use the .dtb files from the manufacturer:

I have the following files:

fsl-imx8mq-M8M051_usbdevice.dtb,    fsl-imx8mq-M8M051-AM-1024600DTZQW.dtb,    fsl-imx8mq-M8M051-HDMI.dtb,    fsl-imx8mq-M8M051-pcie.dtb,    fsl-imx8mq-M8M051-SCX1506W60GGU03.dtb,    fsl-imx8mq-M8M051-TM070JDHG30.dtb

Right now, I am testing the board on an HDMI screen, but later it is supposed to work on an LVDS one (AM-1024600DTZQW) . So I feel like if I can make it work with HDMI, there will be no problem with LVDS...

So from what I understand, I need to only use one at once, right? (I am not concerned by the other .dtb files)

However, I am struggling with where/when to implement this file. From what I understand, as my dtb was made for this specific board, and I plan on only using an HDMI board with a keyboard and a mouse for now, I don't need to do step "2.1.2 How to build and load Kernel in Yocto Project" ?

My other question is, should I build my image with the last Yocto version (Walnascar) or with the last long-term support version (Scarthgap)?

 

Thanks in advance for the help !

0 项奖励
回复