前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >AMD ZCU106 U-Boot 2023.1 Open Source Flow 编译的缺少“gnutls/gnutls.h”错误

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

作者头像
hankfu
发布2023-10-16 18:37:35
3320
发布2023-10-16 18:37:35
举报
文章被收录于专栏:hankhank

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

获取代码

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

代码语言:javascript
复制
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”目录下。

代码语言:javascript
复制
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”错误

代码语言:javascript
复制
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/”下,能修正上述问题。

代码语言:javascript
复制
hankf@XSZGS4:u-boot-xlnx$ cp oe-local-files/platform-top.h include/configs/

缺少“gnutls/gnutls.h”错误

代码语言:javascript
复制
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”后,再编译就正常了。

代码语言:javascript
复制
sudo apt-get install libgnutls28-dev
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2023-07-07,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 获取代码
  • 获取配置文件
  • 编译
    • 缺少“configs/platform-top.h”错误
      • 缺少“gnutls/gnutls.h”错误
      领券
      问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档