免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
123下一页
最近访问板块 发新帖
查看: 10661 | 回复: 25
打印 上一主题 下一主题

[嵌入式]求助:u-boot移植问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-12-19 23:26 |只看该作者 |倒序浏览
在编译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

论坛徽章:
0
2 [报告]
发表于 2006-12-20 21:38 |只看该作者
怎么还没人回答啊?没人做过u-boot的移植吗?

   "难道是我没把问题说清楚?"<道哥>


我实在是对GNU make 不熟,哪位牛人就帮我看看吧.要不这几天又睡不着了!

论坛徽章:
5
3 [报告]
发表于 2006-12-21 09:43 |只看该作者
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


可能post这部分代码还不支持你的cpu & board
如果你不需要POST功能,在include/configs/xxxxx.h 中,把CONFIG_POST注销掉,再试试看
xxxxx.h是目标board对应的配置文件

论坛徽章:
0
4 [报告]
发表于 2006-12-21 14:19 |只看该作者
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'.

那不这也要去掉?

论坛徽章:
0
5 [报告]
发表于 2006-12-21 15:26 |只看该作者
这个问题可以直接试试去换一个交叉编译器,我遇到过这,好像是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 编辑 ]

论坛徽章:
0
6 [报告]
发表于 2006-12-21 19:24 |只看该作者
我的交叉编译器用过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,按照他们说的做,但是不行.都是提示上面的那个错误.

论坛徽章:
0
7 [报告]
发表于 2006-12-21 19:30 |只看该作者
真不知道编译一个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

也许路还要继续走下去... ...

论坛徽章:
0
8 [报告]
发表于 2006-12-22 09:32 |只看该作者
我当时也玩了两天,直接用Google搜索罢,中文的解答很少

论坛徽章:
0
9 [报告]
发表于 2006-12-22 10:06 |只看该作者

回复 1楼 dglwx 的帖子

编译U-BOOT的时候,还要把你u-boot的所有代码放到/usr/local目录下,我用的是2.95.3,应该可以的!

论坛徽章:
0
10 [报告]
发表于 2006-12-22 10:08 |只看该作者

回复 1楼 dglwx 的帖子

另外,补充一点我用的是u-boot-1.1.3
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP