This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM62X: Building the SDK with Yocto - Processor SDK AM62x Documentation

Part Number: PROCESSOR-SDK-AM62X

I've followed the instructions in the documentation, however, when I build on Linux (Ubuntu 22.04) I'm seeing 100% CPU usage intermittently on all 8 cores through htop.  I have 32G of RAM.  While compiling, no other apps on the desktop can be used reliably.  Any suggestions? 

  • Hi Jim,

    Yocto-builds are usually very resource-intensive, and can take over a machine completely for several hours. You seeing 100% CPU loading on all cores actually shows that the parallel build is working as intended, loading your system in a way to complete the build in the quickest-possible way. 

    Of course when you want to do other work at the same time this will cause pretty good slow downs as you experienced. This is why often dedicated build machines/servers are used. Note that Yocto not only causes high CPU load but will also push your disk activity quite a bit. Might not be a big issue if you use a fast NVMe drive though.

    If you must use your existing machine while doing Yocto builds and don't have the option of having a dedicated machine, or getting a new higher-end machine, you could experiment getting some of your CPU time back by limiting Yocto's parallel build by adding something like the below to your conf/local.conf file...

    BB_NUMBER_THREADS ?= "1" 
    PARALLEL_MAKE ?= "-j 6"

    Assuming an 8-core machine, this should limited the cores Yocto uses to 6, leaving 2 cores always available for your other application usage. Note that this will likely much prolonging your build time. But it's all a trade-off.

    Along those lines make sure you understand/use the Yocto shared state cache feature (and don't keep deleting that folder), this will dramatically speed up incremental builds. Here's a good summary on this: https://bootlin.com/blog/yocto-sharing-the-sstate-cache-and-download-directories/

    Regards, Andreas

  • Andreas,

     

                    Thank you for your reply!

                    I doubled the RAM on our Ubuntu 22.04 machine and it seems to have helped.

                    At about 38% complete, I had a fetch error but the build continued.  Will I get an image at the end of the build or will I need to do something additional.  From my experience with Qualcomm, the build usually stops with any errors.

     

                                                                    Jim Meyer

  • Hi Jim,

                    At about 38% complete, I had a fetch error but the build continued.  Will I get an image at the end of the build or will I need to do something additional.  From my experience with Qualcomm, the build usually stops with any errors.

    It shouldn't really be that different from how Yocto builds behave using other vendor's solutions. Either it'll go to completion, or stop with an error. But it's not unusual for it to continue building for a while even though errors happened, as Yocto will continue building other recipes not affected by the error, especially when the `bitbake -k` option is used.

    However if it seems to be stuck for a very long time then it is good to double-check the processor loading (e.g., using `htop`) to make sure there's still activity. If not there's probably a rare care where it did hang which has been observed in certain situations when the system runs out of memory, unfortunately without a clean error message (the bitbake server process would just hang).

    Also for AM62x builds specifically, try disabling Chromium from the build. It is very heavy/taxing, and you may not need it for your application, see the Chromium related note in the SDK documentation at https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/09_02_01_09/exports/docs/linux/Overview_Building_the_SDK.html#build-steps

    Regards, Andreas

  • Andreas,

         Can I install the "tisdk-default-image-am62xx-lp-evm.wic.xz" on any generic hardware having the am62xx-lp chip?  Also, if the generic hardware contains different I/O connections and Ethernet (X2), etc., how do I go about configuring these changes.   

  • Hi Jim,

         Can I install the "tisdk-default-image-am62xx-lp-evm.wic.xz" on any generic hardware having the am62xx-lp chip? 

    Oh no, unfortunately it's not that simple. What you need to do is doing a "board port", and this is best done outside Yocto. Basically, customize U-Boot and the Kernel to be in a usable/compatible state for your board. This usually includes customizing U-Boot and Kernel DTB files, adding your custom DDR config to U-Boot (also via DTS), and creating some board-specific files/init sequences in U-Boot as needed.

    https://dev.ti.com/tirex/explore/node?node=A__AWde9U3fyhQwPQrzBeP7QA__AM62-ACADEMY__uiYMDcq__LATEST

    Then you'll need to generate a patch set for both U-Boot and Kernel, which you can then add to the Yocto build (ideally using your own custom layer), to generate ready-to-use images.

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1303384/sk-am62-using-custom-kernel-in-local-workspace-for-yocto-ti-sdk/4953153#4953153

    If you have any specific issues regarding all this while working this please open a separate E2E thread(s), as you may encounter a range of challenges depending on how different your board is from the TI EVM, and different support topics will get handled by different subject-matter experts.

    Regards, Andreas