i.MX 8M Plus Compiling the Kernel error

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

i.MX 8M Plus Compiling the Kernel error

697 次查看
ezohc21
Contributor I

 

i.MX8MI am currently encountering an issue while attempting to compile the kernel. When I run the following command:

$ make -j $(nproc)

I receive the following error message:



/opt/yocto/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libcrypto.so: undefined reference to `pthread_rwlock_rdlock@GLIBC_2.2.5'
/opt/yocto/fsl-imx-xwayland/6.6-scarthgap/sysroots/x6_64-pokysdk-linux/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libcrypto.so: undefined reference to `pthread_setspecific@GLIBC_2.2.5'
/opt/yocto/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libcrypto.so: undefined reference to `pthread_key_delete@GLIBC_2.2.5'
/opt/yocto/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libcrypto.so: undefined reference to `pthread_rwlock_unlock@GLIBC_2.2.5'
/opt/yocto/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libcrypto.so: undefined reference to `dlopen@GLIBC_2.2.5'
/opt/yocto/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libcrypto.so: undefined reference to `pthread_rwlock_destroy@GLIBC_2.2.5'
/opt/yocto/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libcrypto.so: undefined reference to `dlerror@GLIBC_2.2.5'
/opt/yocto/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libcrypto.so: undefined reference to `dlclose@GLIBC_2.2.5'
/opt/yocto/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libcrypto.so: undefined reference to `dlsym@GLIBC_2.2.5'
/opt/yocto/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libcrypto.so: undefined reference to `pthread_once@GLIBC_2.2.5'
/opt/yocto/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libcrypto.so: undefined reference to `pthread_rwlock_wrlock@GLIBC_2.2.5'
/opt/yocto/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libcrypto.so: undefined reference to `pthread_rwlock_init@GLIBC_2.2.5'
/opt/yocto/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libcrypto.so: undefined reference to `pthread_key_create@GLIBC_2.2.5'
/opt/yocto/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libcrypto.so: undefined reference to `pthread_getspecific@GLIBC_2.2.5'
/opt/yocto/fsl-imx-xwayland/6.6-scarthgap/sysroots/x86_64-pokysdk-linux/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libcrypto.so: undefined reference to `dladdr@GLIBC_2.2.5'
collect2: error: ld returned 1 exit status
make[3]: *** [scripts/Makefile.host:114: certs/extract-cert] Error 1
make[3]: *** Waiting for unfinished jobs....
CC security/keys/key.o
CC sound/core/sound.o
make[2]: *** [scripts/Makefile.build:480: certs] Error 2

 

Despite multiple attempts, I have been unable to resolve the problem. I would greatly appreciate your assistance in identifying the cause and suggesting a possible solution.

Thank you in advance for your support.

Best regards,

0 项奖励
回复
2 回复数

654 次查看
ezohc21
Contributor I

Thank you for your reply. Also when I try this command, I have compiled without errors.

$HOSTLDFLAGS="-ldl -lpthread" make -j$(nproc)

best regards

0 项奖励
回复

669 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

Try to erase everything about yocto and try this UG10164 i.MX Yocto Project User's Guide Rev. LF6.6.52_2.2.0  and this is the kernel version I have cloned using the step given in this doc -
"repo init -u https://github.com/nxp-imx/imx-manifest
-b imx-linux-scarthgap -m imx-6.6.52-2.2.0.xml"

To build the Image and populate SDK, the steps followed are listed below:

Image:
$ DISTRO=fsl-imx-xwayland MACHINE=imx93-11x11-lpddr4x-evk source imx-setup-release.sh -b
build-xwayland
$ bitbake imx-image-full

Populate SDK: (Used the same environment with which I build the above Image)
$ DISTRO=fsl-imx-xwayland MACHINE=imx93-11x11-lpddr4x-evk bitbake imx-image-full -c populate_sdk

Then used the .sh file generated and executed it and sourced it in another environment and followed the below steps for Linux Kernel Standalone build:
$ git clone https://github.com/nxp-imx/linux-imx -b lf-6.6.y
$ cd linux-imx
$ make imx_v8_defconfig
$ make

I have compiled the 6.6.52 kernel without errors.

 

regards

0 项奖励
回复