嵌入式爱好者

查看: 21559|回复: 9

[Linux] 按手册对uboot执行make后报错,可能是路径问题

[复制链接]

4

主题

11

帖子

39

积分

扫一扫,手机访问本帖
发表于 2020-4-3 19:42:00 | 显示全部楼层 |阅读模式
# make
for dir in tools examples post post/cpu ; do make -C $dir _depend ; done
make[1]: 进入目录“/forlinx/uboot1.1.6/tools”
/bin/sh: 3: gcc: not found
/bin/sh: 3: gcc: not found
/bin/sh: 3: gcc: not found
/bin/sh: 3: gcc: not found
/bin/sh: 3: gcc: not found
/bin/sh: 3: gcc: not found
/bin/sh: 3: gcc: not found
make[1]: *** 没有规则可制作目标“.depend”,由“_depend” 需求。 停止。
make[1]: 离开目录“/forlinx/uboot1.1.6/tools”
make[1]: 进入目录“/forlinx/uboot1.1.6/examples”
make[1]: 对“_depend”无需做任何事。
make[1]: 离开目录“/forlinx/uboot1.1.6/examples”
make[1]: 进入目录“/forlinx/uboot1.1.6/post”
make[1]: 对“_depend”无需做任何事。
make[1]: 离开目录“/forlinx/uboot1.1.6/post”
make[1]: 进入目录“/forlinx/uboot1.1.6/post/cpu”
make[1]: 对“_depend”无需做任何事。
make[1]: 离开目录“/forlinx/uboot1.1.6/post/cpu”
make -C tools all
make[1]: 进入目录“/forlinx/uboot1.1.6/tools”
gcc -Wall -pedantic -idirafter /forlinx/uboot1.1.6/include -idirafter /forlinx/uboot1.1.6/include2 -idirafter /forlinx/uboot1.1.6/include -DTEXT_BASE=0xCFE00000 -DUSE_HOSTCC -O -c -o img2srec.o img2srec.c
make[1]: gcc: Command not found
/forlinx/uboot1.1.6/config.mk:234: recipe for target 'img2srec.o' failed
make[1]: *** [img2srec.o] Error 127
make[1]: 离开目录“/forlinx/uboot1.1.6/tools”
Makefile:281: recipe for target 'tools' failed
make: *** [tools] Error 2
我使用的编译器不是手册里面那种,出错可能是因为手册内提供的uboot有一些路径设置和我的不一样。请问,我该怎么修改,改哪些文件,depend又是哪个?

回复

使用道具 举报

4

主题

11

帖子

39

积分

 楼主| 发表于 2020-4-4 17:03:55 | 显示全部楼层
# make
for dir in tools examples post post/cpu ; do make -C $dir _depend ; done
make[1]: 进入目录“/forlinx/uboot1.1.6/tools”
/bin/sh: 3: gcc: not found
/bin/sh: 3: gcc: not found
/bin/sh: 3: gcc: not found
/bin/sh: 3: gcc: not found
/bin/sh: 3: gcc: not found
/bin/sh: 3: gcc: not found
/bin/sh: 3: gcc: not found
make[1]: *** 没有规则可制作目标“.depend”,由“_depend” 需求。 停止。
make[1]: 离开目录“/forlinx/uboot1.1.6/tools”
make[1]: 进入目录“/forlinx/uboot1.1.6/examples”
make[1]: 对“_depend”无需做任何事。
make[1]: 离开目录“/forlinx/uboot1.1.6/examples”
make[1]: 进入目录“/forlinx/uboot1.1.6/post”
make[1]: 对“_depend”无需做任何事。
make[1]: 离开目录“/forlinx/uboot1.1.6/post”
make[1]: 进入目录“/forlinx/uboot1.1.6/post/cpu”
make[1]: 对“_depend”无需做任何事。
make[1]: 离开目录“/forlinx/uboot1.1.6/post/cpu”
make -C tools all
make[1]: 进入目录“/forlinx/uboot1.1.6/tools”
gcc -Wall -pedantic -idirafter /forlinx/uboot1.1.6/include -idirafter /forlinx/uboot1.1.6/include2 -idirafter /forlinx/uboot1.1.6/include -DTEXT_BASE=0xCFE00000 -DUSE_HOSTCC -O -c -o img2srec.o img2srec.c
make[1]: gcc: Command not found
/forlinx/uboot1.1.6/config.mk:234: recipe for target 'img2srec.o' failed
make[1]: *** [img2srec.o] Error 127
make[1]: 离开目录“/forlinx/uboot1.1.6/tools”
Makefile:280: recipe for target 'tools' failed
make: *** [tools] Error 2
换用手册提供的交叉编译器后结果一样。
点评回复 支持 反对

使用道具 举报

0

主题

1173

帖子

2194

积分

发表于 2020-4-7 09:18:39 | 显示全部楼层
您用的是哪块开发板

点评

是OK6410-A  详情 回复 发表于 2020-4-8 19:07
点评回复 支持 反对

使用道具 举报

4

主题

11

帖子

39

积分

 楼主| 发表于 2020-4-8 19:07:35 | 显示全部楼层
zhichao 发表于 2020-4-7 09:18
您用的是哪块开发板

是OK6410-A
点评回复 支持 反对

使用道具 举报

0

主题

1173

帖子

2194

积分

发表于 2020-4-9 08:50:18 | 显示全部楼层
您用的开发环境是按照手册上提供的方法搭建的吗,编译之前是否配置config

点评

是的。先执行#make forlinx_nand_ram256_config,然后#make clean,最后#make。不成功后我尝试了输入#make distclean,然后再重复上述步骤,还是报错。  详情 回复 发表于 2020-4-9 09:09
点评回复 支持 反对

使用道具 举报

4

主题

11

帖子

39

积分

 楼主| 发表于 2020-4-9 09:09:13 | 显示全部楼层
zhichao 发表于 2020-4-9 08:50
您用的开发环境是按照手册上提供的方法搭建的吗,编译之前是否配置config

是的。先执行#make forlinx_nand_ram256_config,然后#make clean,最后#make。不成功后我尝试了输入#make distclean,然后再重复上述步骤,还是报错。
点评回复 支持 反对

使用道具 举报

0

主题

1173

帖子

2194

积分

发表于 2020-4-9 13:27:57 | 显示全部楼层
是按照安装交叉编译器的吗,编译器解压到/usr/local/arm了吗

点评

是的。我已经解决了,谢谢您的帮助。  详情 回复 发表于 2020-4-27 19:09
点评回复 支持 反对

使用道具 举报

4

主题

11

帖子

39

积分

 楼主| 发表于 2020-4-27 19:09:12 | 显示全部楼层
zhichao 发表于 2020-4-9 13:27
是按照安装交叉编译器的吗,编译器解压到/usr/local/arm了吗

是的。我已经解决了,谢谢您的帮助。

点评

怎么解决的啊  详情 回复 发表于 2021-2-1 23:17
点评回复 支持 反对

使用道具 举报

0

主题

1

帖子

13

积分

发表于 2021-2-1 23:17:50 | 显示全部楼层
lsfnuiauwar 发表于 2020-4-27 19:09
是的。我已经解决了,谢谢您的帮助。

怎么解决的啊
点评回复 支持 反对

使用道具 举报

0

主题

1

帖子

14

积分

发表于 2021-6-17 17:09:12 | 显示全部楼层
你好,我想问你的问题怎么解决的呀
点评回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2024-4-25 08:35

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表