Yocto Build for IMX8 EVK

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

Yocto Build for IMX8 EVK

10,755 Views
genekinaraai
Contributor I

I want to build a full image and then SDK for the IMX8 QUAD EVK so I can build gstreamer plugins.

 

I have tried these repo init/sync combos:

            imx-linux-honister imx-5.15.5-1.0.0 

            imx-linux-hardknott imx-5.10.72-2.2.0 

            imx-linux-hardknott imx-5.10.35-2.0.0 

            imx-linux-zeus imx-5.4.24-2.1.0

            imx-linux-rocko  imx-4.9.88-2.0.0

           

$ MACHINE=imx8mqevk DISTRO=fsl-imx-xwayland source imx-setup-release.sh -b bld-imx8mqevk-xwayland

$ bitbake imx-image-full

 

Unfortunately none of these run to completion.  They all seem to have broken links.

 

Can you recommend a newer build that is still complete?

 

Thanks

0 Kudos
Reply
15 Replies

7,867 Views
BillStrahm
Contributor III

What may be happening is running out of memory on the build server.  It isn't related to the number of cores from what I can tell - but the number of concurrent tasks running and how much each task takes.  You can adjust the number of concurrent tasks by adding 

BB_NUMBER_THREADS="10"

to your conf/local.conf file.  I have found 10 seems to be working even though I have 16 cores available (enough cores - not enough memory).  

You can also adjust:

PARALLEL_MAKE="-j 2"

This is the number of threads each task (compile only maybe) can use.

I may try some larger options on a AWS/Azure cloud server with more memory to see if my thoughts are correct.

0 Kudos
Reply

10,591 Views
purendra1991
NXP Employee
NXP Employee

Hi @genekinaraai , I am facing the same issue as yours, have you got any breakthrough, please share your observation.

Thanks in advance.

0 Kudos
Reply

10,582 Views
genekinaraai
Contributor I

Hi,

I wish I had the ultimate answer to share.  Perhaps my observations might trigger an idea that helps.  My main observation is that yocto builds seem to work better with higher performance systems.  Packets are transferred over TCP/IP, so each packet is retried until successful.  That should lead to every yocto build being identical, just slower on some machines, but my experience shows a difference. 

Instead, as I build on larger machines, my builds apparently produced fewer errors.  The last two builds came close.  I used an i9 with 32GB memory and had a handful of errors.  My last build was on a Xeon with 128GB memory and seems to have only one error:

---- ERROR: Task (/home/kuser/yocto/sources/meta-imx/meta-ml/recipes-libraries/onnxruntime/onnxruntime_1.10.0.bb:do_install) failed with exit code '1'

NOTE: Tasks Summary: Attempted 9597 tasks of which 0 didn't need to be rerun and 1 failed.

Summary: 1 task failed:

  /home/kuser/yocto/sources/meta-imx/meta-ml/recipes-libraries/onnxruntime/onnxruntime_1.10.0.bb:do_install

Summary: There were 4 WARNING messages shown.

Summary: There was 1 ERROR message shown, returning a non-zero exit code.

I wonder if yocto recipes can build the same exact image, or do the recipes change over time without the version numbering change?  If the recipe is just a suggestion and not a law, then I could see it behaving differently for various builders.

 

 

0 Kudos
Reply

10,559 Views
joanxie
NXP TechSupport
NXP TechSupport

pls refer to the yocto user guide which has detailed linux host machine request:

To get the Yocto Project expected behavior in a Linux Host Machine, the packages and utilities described below must be installed.
An important consideration is the hard disk space required in the host machine. For example, when building on a machine running Ubuntu, the minimum hard disk space required is about 50 GB. It is recommended that at least 120 GB is provided, which is enough to compile all backends together. For building machine learning components, at least 250 GB is recommended.
The recommended minimum Ubuntu version is 18.04 or later. The Chromium version 74 ir later requires Ubuntu 18.04. The latest release supports Chromium v91, which requires an increase to the ulimit (number of open files) to 4098.

 

0 Kudos
Reply

10,707 Views
genekinaraai
Contributor I

I ran the honister build again from scratch.  The full error log.do_package.2555 is attached.  I don't mind installing a fresh copy of Ubuntu 20.04 if that will help begin the build with a known good state.  Is that a good next step?

 

0 Kudos
Reply

10,700 Views
josephzhou1
Contributor V

cannot see . seems no head no Tail.

 

we want to see the screen , such as you type "bitbake xxx" then after that all the screen showed in order .

 

yah if u like u shld reinstall your ubuntu and make sure no proxy no vpn in your network and try to build it step by step

 

thank u

Best Regards,
Joseph Zhou Jianhui / Senior Embedded Software Engineer, Singapore
0 Kudos
Reply

10,685 Views
genekinaraai
Contributor I

I created a Ubuntu 20.04 docker to guarantee the build system is clean.

The build did not complete.  I found this in the middle of the console-latest log:

ERROR: qtbase-6.2.2-r0 do_install_ptest_base: ExecutionError('/home/kuser/yocto/bld-imx8mqevk-xwayland/tmp/work/cortexa53-crypto-mx8m-poky-linux/qtbase/6.2.2-r0/temp/run.do_install_ptest_base.13696', 1, None, None)
NOTE: recipe xprop-1_1.2.5-r0: task do_install: Started
ERROR: Logfile of failure stored in: /home/kuser/yocto/bld-imx8mqevk-xwayland/tmp/work/cortexa53-crypto-mx8m-poky-linux/qtbase/6.2.2-r0/temp/log.do_install_ptest_base.13696

 

How to fix this?

That is the only "ERROR:" I find in the console-latest log.  Does that mean this is the last error?

0 Kudos
Reply

10,414 Views
gkelly1
Contributor I

I too am getting a build error during the qtbase do_install_ptest_base task, on Ubuntu 20.04 with a clean build environment using the latest imx manifest in the IMX Yocto Project User's Guide (-b imx-linux-honister -m imx-5.15.5-1.0.0.xml). 

If I force the build to continue using "bitbake imx-image-full --continute", it still fails at this step the first time. But then if I run that command again, the qtbase do_install_ptest_base task succeeds. I did get other build errors later in the process that I haven't debugged yet. But it seems like qtbase do_install_ptest_base might be missing a dependency in it's recipe.

0 Kudos
Reply

10,405 Views
genekinaraai
Contributor I

Hi Gkelly1,

I am sorry to hear you are also having trouble with your yocto build.  I just noticed there is a new guide published today:

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

 

I suspect the recipes change, or the repositories change or go missing, so this newly published guide must have just been tested.  Hopefully it will work!

 

It might be helpful to build the smallest image first.  I need gstreamer, so I am building the full version.  The smallest image won't be useful for me.

 

There are also options to build from a local cache of files instead of pulling them all down during build time.  I haven't figured it out yet, but that should insure that flaky repositories are not an issue.

My latest error has something to do with onyx.  Google searches show things I can try, but first I will try the newly released recipes.

 

Good luck, and please post your success or failures so others can build on that.

 

 

0 Kudos
Reply

10,300 Views
gkelly1
Contributor I

I tried the new repo manifest in the updated NXP document (-b imx-linux-kirkstone -m imx-5.15.32-2.0.0.xml) and still ran into the same issue - that qtbase_git.bb:do_install_ptest_base fails on the first build of imx-image-full if the build cache is clean. But it does complete on the 2nd build attempt if I had used "--continue" during the first attempt. And, strangely enough, if I start with "bitbake qtbase" (with an empty build cache), that also succeeds. So I suppose it's a suitable workaround to run "bitbake qtbase; bitbake imx-image-full" for now.

0 Kudos
Reply

10,723 Views
josephzhou1
Contributor V

all that release are tested and published then , so aall are no issues for sure , i can build all no any faults .

 

so it is your config or nework own issues

 

[please showed us your full build logs thenwe may be can advices u in details pls 

 

 

thank you

Best Regards,
Joseph Zhou Jianhui / Senior Embedded Software Engineer, Singapore
0 Kudos
Reply

10,673 Views
genekinaraai
Contributor I

What config do you think is the issue? 

 

What kind of network is required? I am using two different cable modem connections with no VPN, one with 50mbps, and the other with 350mbps.  These failures occur on both networks.

 

0 Kudos
Reply

10,730 Views
genekinaraai
Contributor I

I am following the steps from: "i.MX Yocto Project User's Guide Rev. LF5.15.5_1.0.0 — 31 March 2022"

There are many "do_fetch: Fetcher failure" errors.  Attached is one of the results.

My hunch is that broken links are related to the age of the recipe, so the newer builds ought to work with a higher probability.  I believe imx-linux-kirkstone is supposed to be released this month, but it appears I am too early grab that yet.

I am digging into the Yocto documentation to figure out how to build from a local directory instead of downloading the repos each time.  Perhaps this will eliminate the Fetcher failure.

I hope there is a faster way to fix this.  Any advice will be greatly appreciated.

 

 

 

0 Kudos
Reply

10,725 Views
joanxie
NXP TechSupport
NXP TechSupport

do fetch errors related to your network, you can delete the packages by cleasstate "bitbake -c cleasstate libgphoto2" then bitbake again

 

0 Kudos
Reply

10,741 Views
joanxie
NXP TechSupport
NXP TechSupport

these bsp are available now, just built them step by step accord ing to the yocto user guide, what do you mean " none of these run to completion" ? pls share the detailed information

 

0 Kudos
Reply