Linker error when building imx-boot for Verdin IMX8MP

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

Linker error when building imx-boot for Verdin IMX8MP

105 Views
kanakshilledar
Contributor II

I am currently working on building buildroot for Toradex Verdin iMX8MP SoC. I am trying to build the imx-boot for the same but getting stuck in the build process.
I am following the following article: https://developer.toradex.com/linux-bsp/os-development/build-u-boot-and-linux-kernel-from-source-cod...
One quick question how shall I verify whether my u-boot.bin is u-boot-nodtb.bin?

Error Log:

 

/imx-mkimage$ make SOC=iMX8MP DCD_BOARD=imx8mp_evk flash_evk_emmc_fastboot
Compiling mkimage_imx8
PLAT=imx8mp HDMI=no
Compiling mkimage_imx8
cc -O2 -Wall -std=c99 -static mkimage_imx8.c -o mkimage_imx8  -lz
mkimage_imx8.c: In function ‘copy_file.constprop’:
mkimage_imx8.c:345:21: warning: ‘write’ reading 5 bytes from a region of size 4 [-Wstringop-overread]
  345 |                 if (write(ifd, (char *)&zero, 4-tail) != 4-tail) {
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkimage_imx8.c:303:13: note: source object ‘zero’ of size 4
  303 |         int zero = 0;
      |             ^~~~
In file included from mkimage_imx8.c:24:
/usr/include/unistd.h:378:16: note: in a call to function ‘write’ declared with attribute ‘access (read_only, 2, 3)’
  378 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
/usr/bin/ld: cannot find -lz: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [soc.mak:88: mkimage_imx8] Error 1
make: *** [Makefile:23: flash_evk_emmc_fastboot] Error 2

 

I am on fedora 40 and using the aarch64 toolchain which is in the Fedora repos.

 

$ sudo dnf install zlib-devel
[sudo] password for kanak: 
Last metadata expiration check: 1:13:58 ago on Tue 18 Jun 2024 08:22:37 AM IST.
Package zlib-ng-compat-devel-2.1.6-2.fc40.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

 

Thanks!

Labels (1)
0 Kudos
Reply
1 Reply

81 Views
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

Thank you for your interest in NXP Semiconductor products,

It can be a 3rd party issue as stated here.

Please give a look at the flags, also, at the generated files, probably you have extra/missing files that cause this issue. Could you use our mkimage with the standalone components?

Regards

0 Kudos
Reply