在跟着黑金教程学习Linux(zynq7020)的过程中发现根据教程编译的内核在执行到petalinux_build编译内核的时候出现如下错误
ERROR: petalinux-user-image-1.0-r0 do_rootfs: [log_check] petalinux-user-image: found 1 error message in the logfile:
[log_check] ERROR: ld.so: object ‘libpseudo.so’ from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: petalinux-user-image-1.0-r0 do_rootfs: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/alinx/Downloads/peta_prj/ax_peta/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/petalinux-user-image/1.0-r0/temp/log.do_rootfs.75318
ERROR: Task (/home/alinx/Downloads/peta_prj/ax_peta/project-spec/meta-plnx-generated/recipes-core/images/petalinux-user-image.bb:do_rootfs) failed with exit code ‘1’
解决办法是参考:
https://forums.xilinx.com/t5/%E5%B5%8C%E5%85%A5%E5%BC%8F-%E5%B7%A5%E5%85%B7-%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91/petalinux-build%E6%97%B6%E5%87%BA%E9%94%99/m-p/917283
总结原因缺少某些库文件,因此更新文件,使用如下命令:
- sudo apt-get update
- sudo apt-get install -y python tofrodos iproute2 gawk xvfb gcc git net-tools libncurses5-dev tftpd 3. zlib1g-dev libssl-dev flex bison libselinux1 gnupg wget diffstat chrpath socat xterm autoconf libtool tar unzip texinfo zlib1g-dev gcc-multilib build-essential libsdl1.2-dev libglib2.0-dev
- sudo apt-get install zlib1g:i386
- sudo apt-get install screen