[嵌入式]求助:u-boot移植问题
在编译u-boot-1.1.6时出现下面的错误,是移植到samsung的s3c2410上去!
应该是makefile的问题,但不知道怎么改!高手能不能帮哈忙哦,今天搞了一天。谢个先!
[root@dglwx u-boot-1.1.6]# make
for dir in tools examples post post/cpu ; do make -C $dir _depend ; done
make[1]: Entering directory `/root/embed/u-boot-1.1.6/tools'
ln -s ../common/environment.c environment.c
ln -s ../lib_generic/crc32.c crc32.c
make[1]: Leaving directory `/root/embed/u-boot-1.1.6/tools'
make[1]: Entering directory `/root/embed/u-boot-1.1.6/tools'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/root/embed/u-boot-1.1.6/tools'
make[1]: Entering directory `/root/embed/u-boot-1.1.6/examples'
make[1]: Leaving directory `/root/embed/u-boot-1.1.6/examples'
make[1]: Entering directory `/root/embed/u-boot-1.1.6/examples'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/root/embed/u-boot-1.1.6/examples'
make[1]: Entering directory `/root/embed/u-boot-1.1.6/post'
make[1]: Leaving directory `/root/embed/u-boot-1.1.6/post'
make[1]: Entering directory `/root/embed/u-boot-1.1.6/post'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/root/embed/u-boot-1.1.6/post'
make[1]: Entering directory `/root/embed/u-boot-1.1.6/post/cpu'
make[1]: *** 没有规则可以创建“.depend”需要的目标“asm.S”。 停止。
make[1]: Leaving directory `/root/embed/u-boot-1.1.6/post/cpu'
make: *** [depend] 错误 2
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
怎么还没人回答啊?没人做过u-boot的移植吗?
"难道是我没把问题说清楚?"<道哥>
我实在是对GNU make 不熟,哪位牛人就帮我看看吧.要不这几天又睡不着了!
可能post这部分代码还不支持你的cpu & board
如果你不需要POST功能,在include/configs/xxxxx.h 中,把CONFIG_POST注销掉,再试试看
xxxxx.h是目标board对应的配置文件
POST不是上电自检吗?能去掉么?
还有那前面的:
make[1]: Leaving directory `/root/embed/u-boot-1.1.6/tools'
make[1]: Entering directory `/root/embed/u-boot-1.1.6/tools'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/root/embed/u-boot-1.1.6/tools'
make[1]: Entering directory `/root/embed/u-boot-1.1.6/examples'
make[1]: Leaving directory `/root/embed/u-boot-1.1.6/examples'
make[1]: Entering directory `/root/embed/u-boot-1.1.6/examples'
make[1]: Nothing to be done for `_depend'.
那不这也要去掉?
这个问题可以直接试试去换一个交叉编译器,我遇到过这,好像是u-boot的bug和交叉编译器的问题都有
细节我不知道,我只知道换了一个版本的就可以了,这是我学的时候的手记你可以看一下:
Wed Nov 22 12:27:37 CST 2006
I was compiled u-boot-1.1.2 for "smdk2410" completely,and the flow showing below.
Flow:
http://www.handhelds.org/downloa ... x-gcc-3.3.2.tar.bz2
We can download arm-linux-gcc-3.3.2.tar.bz2 from the URL above.
Following,do the command such as:
tar -jxvf ./arm-linux-gcc-3.3.2.tar.bz2
Then you can see a new directory at current path,and then:
cd usr/local/arm
Transfer it to(into) /usr/local/arm(sub-directory arm was created by yourself)
mv ./3.3.2 /usr/local/arm/
Now,we should change the content of /etc/profile.
vi /etc/profile
Add a new line as "PATH=$PATH:/usr/local/arm/3.3.2/bin" at last or wherever you would like.Restart or Relogin,maybe export the variable will be better.
In the following several steps,we are begin to compile the u-boot-1.1.2.
Turn into the directory /arm/u-boot-1.1.2 and typed:
make smdk2410_config
(smdk2410 is a familiar board and a good example for developers in our country.)
(I guessed that you should known how to change the value of CROSS_COMPILE ... .)
make
or
make 2>&1 | tee /arm/logs/make_smdk.log
At last,four binaries such as u-boot,u-boot.bin,u-boot.map and u-boot.srec were created successfully,if without any exceptions.
[ 本帖最后由 Pacer 于 2006-12-21 15:30 编辑 ]
我的交叉编译器用过arm-linux-gcc 2.4.1和arm-linux-gcc 2.95.3,也试过用arm-linux-elf,都提示同样的错误,我怀疑是不是Makefile文件的问题?
我看网上的资料都是用arm-linux-gcc 2. 和U-boot 1.1.4,按照他们说的做,但是不行.都是提示上面的那个错误.
真不知道编译一个U-boot要试多少交叉编译工具.
我试过:u-boot1.1.4 u-boot 1.1.5 u-boot 1.1.6
交叉编译工具试过::arm-linux-gcc 2.4.1 arm-linux-gcc 2.95.3 arm-linux-elf
也许路还要继续走下去... ...
我当时也玩了两天,直接用Google搜索罢,中文的解答很少
编译U-BOOT的时候,还要把你u-boot的所有代码放到/usr/local目录下,我用的是2.95.3,应该可以的!
另外,补充一点我用的是u-boot-1.1.3