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

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 <configs/platform-top.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
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 <configs/platform-top.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
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 <configs/platform-top.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
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 <gnutls/gnutls.h>
          ^~~~~~~~~~~~~~~~~
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
  • 4
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值