AMD ZCU106 U-Boot 2023.1 Open Source Flow 编译的缺少“gnutls/gnutls.h”错误

作者:付汉杰 hankf@amd.com

AMD ZCU106 U-Boot 2023.1 Open Source Flow 编译的缺少“gnutls/gnutls.h”错误

获取代码

以下列命令获取U-Boot代码

petalinux-devtool modify u-boot-xlnx

在目录components/yocto/workspace/sources/u-boot-xlnx 下应该有u-boot-xlnx的源代码。

获取配置文件

查找u-boot的配置文件“.config”,并复制到u-boot-xlnx的源代码目录下,以及u-boot-xlnx的源代码的“configs”目录下。

hankf@XSZGS4:zcu106-vcu-trd-231-bsp-peta$ find -name ".config" | grep -i u-boot-xlnx
./build/tmp/work/xilinx_zcu106-xilinx-linux/u-boot-xlnx/1_v2023.01-xilinx-v2023.1+git999-r0/u-boot-xlnx-v2023.01-xilinx-v2023.1+git999/.config

hankf@XSZGS4:zcu106-vcu-trd-231-bsp-peta$ cp ./build/tmp/work/xilinx_zcu106-xilinx-linux/u-boot-xlnx/1_v2023.01-xilinx-v2023.1+git999-r0/u-boot-xlnx-v2023.01-xilinx-v2023.1+git999/.config components/yocto/workspace/sources/u-boot-xlnx/

hankf@XSZGS4:zcu106-vcu-trd-231-bsp-peta$ cp ./build/tmp/work/xilinx_zcu106-xilinx-linux/u-boot-xlnx/1_v2023.01-xilinx-v2023.1+git999-r0/u-boot-xlnx-v2023.01-xilinx-v2023.1+git999/.config components/yocto/workspace/sources/u-boot-xlnx/configs/xilinx_peta_defconfig

编译

缺少“configs/platform-top.h”错误

hankf@XSZGS4:u-boot-xlnx$ make -j
scripts/kconfig/conf --syncconfig Kconfig
UPD include/config.h
CFG u-boot.cfg
GEN include/autoconf.mk.dep
CFG spl/u-boot.cfg
In file included from ./include/common.h:16:
include/config.h:4:10: fatal error: configs/platform-top.h: No such file or directory
4 | #include
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./include/common.h:16:
include/config.h:4:10: fatal error: configs/platform-top.h: No such file or directory
4 | #include
| ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ./include/common.h:16:
include/config.h:4:10: fatal error: configs/platform-top.h: No such file or directory
4 | #include
| ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

“platform-top.h”是单板相关的头文件。PetaLinux把它放在了目录“oe-local-files”下。复制“oe-local-files/platform-top.h”到目录“include/configs/”下,能修正上述问题。

hankf@XSZGS4:u-boot-xlnx$ cp oe-local-files/platform-top.h include/configs/

缺少“gnutls/gnutls.h”错误

hankf@XSZGS4:u-boot-xlnx$ make -j
scripts/kconfig/conf --syncconfig Kconfig
arch/Kconfig:379:warning: 'SYS_IMMR': number is invalid
CFG u-boot.cfg
GEN include/autoconf.mk.dep
CFG spl/u-boot.cfg
............
ENVT include/generated/environment.h
HOSTCC tools/mkeficapsule
tools/mkeficapsule.c:21:10: fatal error: gnutls/gnutls.h: No such file or directory
#include
^~~~~~~~~~~~~~~~~
compilation terminated.
scripts/Makefile.host:95: recipe for target 'tools/mkeficapsule' failed
make[1]: *** [tools/mkeficapsule] Error 1
Makefile:1872: recipe for target 'tools' failed
make: *** [tools] Error 2

这是编译Host上的工具得到的错误。执行下列命令,安装“libgnutls28-dev”后,再编译就正常了。

sudo apt-get install libgnutls28-dev

本文转载自:博客园

最新文章

最新文章