编译uboot出现错误 fatal error: configs/.h: No such file or directory

图片

首次编译uboot时出现错误如下:

user@ubuntu:~/share/u-boot2/u-boot$ make CROSS_COMPILE=arm-linux-gnueabi-scripts/kconfig/conf  --syncconfig Kconfig  CFG     u-boot.cfgIn file included from ./include/common.h:16:0:include/config.h:4:10: fatal error: configs/.h: No such file or directory #include <configs/.h>          ^~~~~~~~~~~~compilation terminated.scripts/Makefile.autoconf:77: recipe for target 'u-boot.cfg' failedmake[1]: *** [u-boot.cfg] Error 1make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'.  Stop.

出现上述问题网上也有解决方式,但是有些原因可能并没有出现在源码上。可见如下步骤:

首先将uboot下载解压好后,对uboot进行可视化界面配置

@ubuntu:~/share/u-boot$ make menuconfig

界面如下,因为是刚刚下载的uboot,先简单设置一个芯片,进行可编译测试。

图片

设置芯片架构类型-》选择ARM架构

图片

在结构中选择芯片种类-》选择Atmel AT91

图片

保存配置。

图片

简单配置一下参数之后,进行编译

@ubuntu:~/share/u-boot$ make CROSS_COMPILE=arm-linux-gnueabi-

随后 出现了如下错误

图片

图片

而出现这种错误的原因并不是arch/arm和所配置芯片文件夹下的Kconfig问题。原因在于第一次编译前没有选择board类型。如下图:

图片

在选择芯片这一步还有一个选择board的类型。这个设置好之后,编译就可以顺利运行

  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

九溪弥烟、

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值