主题 : u-boot移植到mini2440过程及源码。 复制链接 | 浏览器收藏 | 打印
级别: 侠客
UID: 3595
精华: 4
发帖: 53
金钱: 425 两
威望: 213 点
贡献值: 31 点
综合积分: 186 分
注册时间: 2009-01-20
最后登录: 2011-10-18
楼主  发表于: 2009-01-21 16:47

 u-boot移植到mini2440过程及源码。

管理提醒: 本帖被 qq2440 执行取消置顶操作(2009-08-07)
我移植的u-boot2008.10,mini2440上使用。支持yaffs,支持nand flash启动,网卡。比mini2440自带的u-boot功能全。大家可以试一下。

这是镜像文件。 u-boot.rar (67 K) 下载次数:1008

详情见我的博客。内含源代码。

http://hi.baidu.com/rat%5Flinux/blog/item/988ea5631f7555dae7113af2.html
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2009-01-30 14:33
做的很好,特别是加入了yaffs1的支持,相信对苦苦与yaffs奋战的兄弟们很有帮助,谢谢楼主了。
"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
2楼  发表于: 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
3楼  发表于: 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: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
4楼  发表于: 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
5楼  发表于: 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: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
6楼  发表于: 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."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
7楼  发表于: 2009-09-02 16:09
引用第24楼zhanliang198于2009-09-02 16:03发表的  :
请问下,我的电脑是Fedora 9,arm-gcc-linux 4.3.2,u-boot-1.1.6能不能移植到mini2440呢?

可以,但我建议你最好不要再去玩u-boot-1.1.6这样的老古董,否则你会重做很多别人已经做过的事情。而且,最好不要用arm-linux-gcc 4.3.2来编译1.1.6,。它比1.1.6新太多了,用3.x版本的arm-linux-gcc可能会好一些
"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
8楼  发表于: 2009-09-02 16:22
引用第26楼zhanliang198于2009-09-02 16:14发表的  :
那么用arm-linux-gcc-3.4.1来编译u-boot-2008.10应该可以吧?环境用Fedora 9来行不行?

最好找一个支持软浮点(softfloat)的的编译器,我印象里那是u-boot的默认设置。
环境用Fedora 9的完全没问题
"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
9楼  发表于: 2009-09-02 16:27
引用第27楼zhanliang198于2009-09-02 16:18发表的  :
还有我的开发板的内核是linux-2.6.29的,行不行?

可以, 这是开发板用户手册上的推荐配置
"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."