Rebuild kernel and modules for i.MX8 MEK

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

Rebuild kernel and modules for i.MX8 MEK

Contributor I


I'm using an imx8qxpmek devkit and the fsl-imx-xwayland distro. This is basically what I have done to build a new Yocto Warrior image:

. /opt/poky/2.7.2/environment-setup-x86_64-pokysdk-linux

repo init -u -b imx-linux-warrior -m imx-4.19.35-1.1.0.xml

repo sync

MACHINE=imx8qxpmek SDKMACHINE=x86_64 DISTRO=fsl-imx-xwayland source ./ -b build-default

bitbake fsl-image-qt5-validation-imx -c populate_sdk_ext

However, installing the resulting eSDK fails. I've tried several Yocto releases and encountered all sorts of errors. Usually the eSDK installation script fails with a large number of error messages along the lines of:

ERROR: Task gdb-cross-aarch64.do_prepare_recipe_sysroot attempted to execute unexpectedly
ERROR: Task gdb-cross-aarch64.do_patch attempted to execute unexpectedly
ERROR: Task qemu-helper-native.do_prepare_recipe_sysroot attempted to execute unexpectedly
ERROR: Task qemu-helper-native.do_patch attempted to execute unexpectedly

This error is not isolated to a particular package but seem to appear for most, if not all, packages during eSDK installation.

The reason I'm trying to build the eSDK is that I'd like to make some minor changes to the kernel and then rebuild the kernel itself, all standard/custom modules that are part of the fsl-image-qt5-validation-imx, as well as an external, custom kernel module.

I'm running Ubuntu 18.04 as a host system.

Any chance someone could provide working step-by-step instructions for how to modify and rebuild kernel/modules for the fsl-image-qt5-validation-imx image running on an imx8qxpmek? I've spent a lot of time trying but everything has failed so far.

0 Kudos
2 Replies

NXP TechSupport
NXP TechSupport

Hello  Lars Andersson,

There is not a step-by-step guide I can suggest. However, Yocto is designed around distribution and not development. This means that Yocto does not keep track of changed source files and that sometimes the recipe will re-fecth the original configuration, erasing your changes.

It is suggested that you work on the changed you require by cross compiling outside of Yocto and that you incorporate the changes trough new recipes or appends to the current recipes. You can find more information on the Yocto Project documentation and there may be examples on the web on how to do this.

I hope this helps!


0 Kudos

Senior Contributor II

Hi ,

For steps to build You can refer  Linux 4.19.35_1.1.0 Yocto project User's guide (One can download documents from below link).

i.MX Software and Development Tools | NXP 

To build toolchain refer this link.


Radhika Somaiya.

0 Kudos