主题 : u-boot移植到mini2440过程及源码。 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 7242
精华: 0
发帖: 2
金钱: 20 两
威望: 20 点
贡献值: 0 点
综合积分: 4 分
注册时间: 2009-07-06
最后登录: 2009-07-06
10楼  发表于: 2009-07-06 21:38
很好的资料!
我最近也在学习移植UBoot到mini2440上~
级别: 新手上路
UID: 8290
精华: 0
发帖: 8
金钱: 75 两
威望: 61 点
贡献值: 0 点
综合积分: 16 分
注册时间: 2009-08-18
最后登录: 2012-11-06
11楼  发表于: 2009-08-20 15:13
最近在研究uboot,要学习一下,有问题的话还要楼主帮助一下。
我在虚拟机上装的红帽9,是2.4内核,用交叉编译工具arm-linux-gcc-4.3.2编译的,在测试编译时不能通过。
make[1]: Entering directory `/home/xzy/uboot/u-boot-2009.06/board/samsung/micro2440'
make[1]: *** No rule to make target `micro2400.c', needed by `.depend'.  Stop.
make[1]: Leaving directory `/home/xzy/uboot/u-boot-2009.06/board/samsung/micro2440'
make: *** [board/samsung/micro2440/libmicro2440.a] Error 2
最后几行出错信息,帮忙看一下,谢谢
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
12楼  发表于: 2009-08-21 10:20
引用第12楼ranger于2009-08-20 20:55发表的  :
我看了你写的东西,说实话没有什么启发,整个过程我都知道, 但是细节方面总是出错,你要是把过程写的再详细些就好了。 我们需要的是捕鱼的方法, 扔几条鱼给我们,不是长久之计啊。

在大学里待太久了脑袋坏掉了吧。要不要人家手把手教你?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
13楼  发表于: 2009-08-21 11:48
引用第11楼byd2006于2009-08-20 15:13发表的  :
最近在研究uboot,要学习一下,有问题的话还要楼主帮助一下。
我在虚拟机上装的红帽9,是2.4内核,用交叉编译工具arm-linux-gcc-4.3.2编译的,在测试编译时不能通过。
make[1]: Entering directory `/home/xzy/uboot/u-boot-2009.06/board/samsung/micro2440'
make[1]: *** No rule to make target `micro2400.c', needed by `.depend'.  Stop.
make[1]: Leaving directory `/home/xzy/uboot/u-boot-2009.06/board/samsung/micro2440'
.......

把你的uboot源代码里的board/samsung/micro2400/Makefile贴出来看看
另外,建议你不要用4.3.2的交叉编译器,uboot到目前为止还没有正式支持EABI。换一个3.x版本支持soft float的编译器会省去你很多麻烦
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 6533
精华: 0
发帖: 3
金钱: 20 两
威望: 7 点
贡献值: 0 点
综合积分: 6 分
注册时间: 2009-06-05
最后登录: 2010-08-26
14楼  发表于: 2009-08-22 17:06
谢谢
先下来看看
正在弄
级别: 新手上路
UID: 7996
精华: 0
发帖: 10
金钱: 100 两
威望: 55 点
贡献值: 0 点
综合积分: 20 分
注册时间: 2009-08-06
最后登录: 2009-09-15
15楼  发表于: 2009-09-01 09:21
非常感谢!正在研究这个问题
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
16楼  发表于: 2009-09-01 13:36

 回 18楼(ranger) 的帖子

你的博客里面说你的board名字是rat2440,我在board目录下根本没有找到这个目录,bin文件我下到板子是可以用, 不过板子名字是100ask24x0。

board定义文件在board/hugerat/rat2440/目录下,运行时显示的"100ask24x0”只是uboot的命令提示符,和板子的名字没有必然的联系。如果你真的知道整个过程的话,恐怕不会问这么初级的问题吧。

然后你又说 “#ifndef CONFIG_SKIP_LOWLEVEL_INIT       bl       cpu_init_crit#endif此段代码中的bl cpu_init_crit注释掉,即不进行CPU的初始化工作(此工作,当前在板子上运行的vivi已完成,故不能再次进行),即改为#ifndef CONFIG_SKIP_LOWLEVEL_INIT       @bl       cpu_init_crit#endif”   但是我到start.S里面看根本就没有注释掉。不知道是作者大意了,还是只是借花献佛。转来转去的东西容易误导人啊。

别人的文章说的很清楚,那只是为了可以让u-boot从SDRAM中启动,方便调试的。

别人是不会手把手教你抓鱼的,能从别人抓到的鱼想出别人是怎么干的是你的本事。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
17楼  发表于: 2009-09-02 10:01
我当然不需要去目录下看,这是楼主提供的u-boot-2008.10的patch(http://blogimg.chinaunix.net/blog/upfile2/090112143501.rar)中的一部分,看这个我就知道了。

另外,别以为我真的有兴趣和你这种人废话,但如果你故意诋毁论坛上别人的成果,我会不厌其烦的和你吵下去。


复制代码
  1. diff -Nurp u-boot-2008.10/board/hugerat/rat2410/Makefile u-boot-rat/board/hugerat/rat2410/Makefile
  2. --- u-boot-2008.10/board/hugerat/rat2410/Makefile    1970-01-01 08:00:00.000000000 +0800
  3. +++ u-boot-rat/board/hugerat/rat2410/Makefile    2008-12-16 10:33:56.000000000 +0800
  4. @@ -0,0 +1,51 @@
  5. +#
  6. +# (C) Copyright 2000-2006
  7. +# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  8. +#
  9. +# See file CREDITS for list of people who contributed to this
  10. +# project.
  11. +#
  12. +# This program is free software; you can redistribute it and/or
  13. +# modify it under the terms of the GNU General Public License as
  14. +# published by the Free Software Foundation; either version 2 of
  15. +# the License, or (at your option) any later version.
  16. +#
  17. +# This program is distributed in the hope that it will be useful,
  18. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  20. +# GNU General Public License for more details.
  21. +#
  22. +# You should have received a copy of the GNU General Public License
  23. +# along with this program; if not, write to the Free Software
  24. +# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  25. +# MA 02111-1307 USA
  26. +#
  27. +
  28. +include $(TOPDIR)/config.mk
  29. +
  30. +LIB    = $(obj)lib$(BOARD).a
  31. +
  32. +COBJS    := rat2410.o nand_read.o flash.o
  33. +SOBJS    := lowlevel_init.o
  34. +
  35. +SRCS    := $(SOBJS:.o=.S) $(COBJS:.o=.c)
  36. +OBJS    := $(addprefix $(obj),$(COBJS))
  37. +SOBJS    := $(addprefix $(obj),$(SOBJS))
  38. +
  39. +$(LIB):    $(obj).depend $(OBJS) $(SOBJS)
  40. +    $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
  41. +
  42. +clean:
  43. +    rm -f $(SOBJS) $(OBJS)
  44. +
  45. +distclean:    clean
  46. +    rm -f $(LIB) core *.bak $(obj).depend
  47. +
  48. +#########################################################################
  49. +
  50. +# defines $(obj).depend target
  51. +include $(SRCTREE)/rules.mk
  52. +
  53. +sinclude $(obj).depend
  54. +
  55. +#########################################################################
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 8398
精华: 0
发帖: 2
金钱: 20 两
威望: 10 点
贡献值: 0 点
综合积分: 4 分
注册时间: 2009-08-22
最后登录: 2009-11-16
18楼  发表于: 2009-09-02 10:30
我download u-boot.bin到我的 mini2440的板子上,上电复位从nand flash启动,为什么串口没有任何反应呢?请指点,多谢
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
19楼  发表于: 2009-09-02 10:46
引用第22楼henry_liu于2009-09-02 10:30发表的  :
我download u-boot.bin到我的 mini2440的板子上,上电复位从nand flash启动,为什么串口没有任何反应呢?请指点,多谢

老实说我不知道,因为我没有用过这个u-boot, 不过我想最直接的方法是用AXD + H-Jtag跟踪一下(在AXD中把PC指针设到0x00000000), 看看最终PC指针停在哪里
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."