[Yocto] Error when generating the SDK for imx-linux 5.10-gatesgarth

cancel
Showing results for 
Search instead for 
Did you mean: 

[Yocto] Error when generating the SDK for imx-linux 5.10-gatesgarth

77 Views
danmartzla
Contributor I

Hi there,


I've recently built the latest Linux distribution following the procedures described in the official NXP Yocto project's guide.

The Linux distribution is correctly built using the "imx-image-full" image and the resulting images files are finally generated by using this configuration (which is the default one without any change):

Build Configuration:
BB_VERSION = "1.48.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "ubuntu-18.04"
TARGET_SYS = "aarch64-poky-linux"
MACHINE = "imx8mpevk"
DISTRO = "fsl-imx-xwayland"
DISTRO_VERSION = "5.10-gatesgarth"
TUNE_FEATURES = "aarch64 armv8a crc cortexa53 crypto"
TARGET_FPU = ""
...

 

The errors come when performing the "bitbake imx-image-full -c do_populate_task" command which delivers the following error(s) when finishing the task:

Setting up nativesdk-libglib-2.0-0 (1:2.64.5-r0) ...
/home/quercus/yoctoBSP/gatesgarth-5_10/tmp/work/imx8mpevk-poky-linux/imx-image-full/1.0-r0/sdk/image/var/lib/dpkg/info/nativesdk-libglib-2.0-0.postinst: 4: /home/quercus/yoctoBSP/gatesgarth-5_10/tmp/work/imx8mpevk-poky-linux/imx-image-full/1.0-r0/sdk/image/var/lib/dpkg/info/nativesdk-libglib-2.0-0.postinst: /postinst_intercept: not found
dpkg: error processing package nativesdk-libglib-2.0-0 (--configure):
 installed nativesdk-libglib-2.0-0 package post-installation script subprocess returned error exit status 127
 
 Setting up nativesdk-shadow (4.8.1-r0) ...
mkdir: cannot create directory ‘/usr/lib/opkg’: Permission denied
dpkg: error processing package nativesdk-shadow (--configure):
 installed nativesdk-shadow package post-installation script subprocess returned error exit status 1

 

Other libglib-2.0 dependency errors show up afterwards. As a consequence, the creation of the SDK is then cancelled and I can't find a way to solve this. I can solve the "native-shadow" package error by giving explicit permissions to that folder (with some warnings showing up) but the "nativesdk-libglib-2.0" error persist.

The building environment is performed in a docker container based on Ubuntu 18.04 with all dependencies installed as specified in the NXP Yocto user's guide. I've tried to destroy and create from scratch a new docker container then build the "fsl-imx-wayland" distro and the problem persists.

Thanks in advance.

0 Kudos
5 Replies

5 Views
hellosiva
Contributor I

Hello,

 I am in the same situation. I was getting errors with the  populate_sdk, I followed the suggestion of commenting out PACKAGE_CLASSES in the local.conf. Now I am getting an error while building the regular image where there is conflict between nxp-demo-experience and weston-init packages. Here is the message

 

* check_data_file_clashes: Package nxp-demo-experience wants to install file /home/siva/imx-yocto-3.2/build/tmp/work/imx8mmevk-poky-linux/imx-image-multimedia/1.0-r0/rootfs/etc/default/weston
But that file is already provided by package * weston-init

 

0 Kudos

42 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi danmartzla,

try these steps, please!

---------------------------------------------

delete your current build directory,
# rm -rf build-xwayland
then run below:
DISTRO=fsl-imx-xwayland MACHINE=imx8mpevk source imx-setup-release.sh -b build-xwayland
#gedit ./conf/local.conf
comment the line:
...
#PACKAGE_CLASS = "package_deb"
...
save and exit.

then run command below to export SDK based on core-image-minimal

DISTRO=fsl-imx-xwayland MACHINE=imx8mpevk bitbake core-image-minimal -c populate_sdk

If there is no problem , try others, for example:
DISTRO=fsl-imx-xwayland MACHINE=imx8mpevk bitbake imx-image-multimedia -c populate_sdk

-------------------------------------------

Have a nice day!

B.R,

weidong

 

0 Kudos

26 Views
danmartzla
Contributor I

Hi Weidong,

Thank you for your answer.

The SDK is successfully generated when using the "core-image-minimal" and "imx-image-multimedia"; however, it fails with the "imx-image-full" as previously stated.

In previous "imx-linux" versions, I usually use the "imx-image-full" SDK environment for developing preliminary tests with machine learning libraries. For the "gatesgarth" "imx-image-multimedia" SDK environment, I had to include the following lines in the "local.conf" file as described in the i.MX Yocto Project User's Guide:

IMAGE_INSTALL_append = "packagegroup-imx-ml"
TOOLCHAIN_TARGET_TASK_append += " tensorflow-lite-staticdev tensorflow-lite-dev armnn-dev onnxruntime-dev"

 

When I try to compile the same simple Tensorflow Lite test (developed using the "imx-zeus" environment) within this "gatesgarth" SDK environment, the process fails. The linker seems to complain with a lot of "undefined reference" errors of "ruy" functions even when compiling a very simplified test code. This is one of these errors:

/home/user/GatesgarthSDK_5_10/sysroots/x86_64-pokysdk-linux/usr/libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/10.2.0/real-ld: /home/user/GatesgarthSDK_5_10/sysroots/cortexa53-crypto-poky-linux/usr/lib/libtensorflow-lite.a(cpu_backend_context.cc.o): in function `tflite::CpuBackendContext::ClearCaches()':
/usr/src/debug/tensorflow-lite/2.4.0-r0/git/tensorflow/lite/kernels/cpu_backend_context.h:51: undefined reference to `ruy::Context::ClearPrepackedCache()'

 

My thought is that there might be something that I'm missing when generating the SDK with the machine learning package explicitly defined using the "imx-image-multimedia". The official documentation related to machine learning Yocto configuration and TFLite application compilation from both Zeus and Gatesgarth linux versions look identical. Maybe there is something missing that is included in the "imx-image-full" like the static TFLite library compiled with RUY enabled.

As described in the i.MX Machine Learning User's Guide documentation, the compilation command is the following:

LIBS = -ltensorflow-lite -lstdc++ -lpthread -lopencv_core -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lm -ldl -lrt

INCLUDE_PATH = -I/home/user/GatesgarthSDK_5_10/sysroots/cortexa53-crypto-poky-linux/usr/include/tensorflow/lite/tools/make/downloads/flatbuffers/include \
-I/home/user/GatesgarthSDK_5_10/sysroots/cortexa53-crypto-poky-linux/usr/include/tensorflow/lite/tools/make/downloads/absl

TFLITE_UTILS = utils.cc

${CC} main.cpp $(TFLITE_UTILS) $(INCLUDE_PATH) -O3 -s DTFLITE_WITHOUT_XNNPACK -DTFLITE_USE_NPU -o $(EXE_NAME) $(LIBS)

 

Thank you again for your help.

 

0 Kudos

50 Views
danmartzla
Contributor I

Thank you for the fast reply.

I'm not so experienced working with the Yocto project tools.

Commenting the PACKAGE_CLASS = "package_deb" seems to solve those errors when generating the SDK; however, I'm having a new one:

 

Running transaction check
Transaction check succeeded.
Running transaction test
Error: Transaction test error:
  file /etc/default/weston conflicts between attempted installs of nxp-demo-experience-1.0-r0.cortexa53_crypto and weston-init-1.0-r0.imx8mpevk

 

It's probably not a big deal but I'm not sure how to solve it.

Thank you!

0 Kudos

61 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi,

5.10 SDK generation needs to comment out PACKAGE_CLASS = "package_deb" in conf/local.conf

Try it, please!

 

Have a nice day!

B.R,

weidong

0 Kudos