<2012 11 2> U-boot(1)版本与移植概况


u-boot版本情况
网站:http://ftp.denx.de/pub/u-boot/

1、版本号变化:
2008年8月及以前
按版本号命名:u-boot-1.3.4.tar.bz2(2008年8月更新)
2008年8月以后均按日期命名。
目前最新版本:u-boot-2012.10.tar.bz2(更新时间15-Oct-2012 20:39 9.0M)

2、目录结构变化:
u-boot目录结构主要经历过2次变化,u-boot版本第一次从u-boot-1.3.2开始发生变化,主要增加了api的内容;变化最大的是第二次,从2010.6版本开始。

u-boot-2010.03及以前版本

├── api 存放uboot提供的接口函数
├── board 根据不同开发板定制的代码,代码也不少
├── common 通用的代码,涵盖各个方面,已命令行处理为主
├── cpu 与体系结构相关的代码,uboot的重头戏
├── disk 磁盘分区相关代码
├── doc 文档,一堆README开头的文件
├── drivers 驱动,很丰富,每种类型的设备驱动占用一个子目录
├── examples 示例程序
├── fs 文件系统,支持嵌入式开发板常见的文件系统
├── include 头文件,已通用的头文件为主
├── lib_【arch】 与体系结构相关的通用库文件(10个文件,支持10种处理器架构)
├── nand_spl NAND存储器相关代码
├── net 网络相关代码,小型的协议栈
├── onenand_ipl
├── post 加电自检程序
└── tools 辅助程序,用于编译和检查uboot目标文件

从u-boot-2010.06版本开始把体系结构相关的内容合并,原先的cpu与lib_arch内容全部纳入arch中,并且其中增加inlcude文件夹;分离出通用库文件lib。

u-boot-2010.06及以后版本

├── api 存放uboot提供的接口函数
├── arch 与体系结构相关的代码,uboot的重头戏
├── board 根据不同开发板定制的代码,代码也不少
├── common 通用的代码,涵盖各个方面,已命令行处理为主
├── disk 磁盘分区相关代码
├── doc 文档,一堆README开头的文件
├── drivers 驱动,很丰富,每种类型的设备驱动占用一个子目录
├── examples 示例程序
├── fs 文件系统,支持嵌入式开发板常见的文件系统
├── include 头文件,已通用的头文件为主
├── lib 通用库文件
├── nand_spl NAND存储器相关代码
├── net 网络相关代码,小型的协议栈
├── onenand_ipl
├── post 加电自检程序
└── tools 辅助程序,用于编译和检查uboot目标文件

移植工作最主要的是看对应的处理器和开发板代码,2010.06版本以后处理器相关的代码集中在arch、board目录。(以前版本主要在cpu和board目录)

|--arch\
  |--arm\
    |--cpu\ 子目录对应一种处理器的不同产品型号或者系列;
      |--arm720t\
      |--arm920t\
        |--a320\
        |--at91\
        |...
        |--s3c24x0\
          |--interrupts.c
          |--speed.c
          |--timer.c
          |--usb.c
          |--usb_ohci.c
          |--usb_ohci.h
        |--Makefile
        |--cpu.c
        |--interrupts.c
        |--start.S <==整个bootloader入口点
        |--u-boot.lds <==链接脚本
        |--Makefile 
  |--config.mk
    |--include\ 子目录是处理器用到的头文件;
       |--asm\
         |--arch-a320\
         |...
         |--arch_s3c24x0\
            |--memory.h
            |--s3c2400.h 
            |--s3c2410.h 
            |--s3c24x0_cpu.h 
            |--s3c24x0.h
         |...
         |--proc-armv\(公用)
          |--atomic.h
         |--bitops.h
         |--byteorder.h
         |--cache.h
         |--... (等共24个.h公用头文件)
    |--lib\ 目录对应用到处理器公用的代码;
      |--board.c
      |--config.mk
      |--... (等共16个文件) |--board\   |--ppmc7xx\   |...   |--samsung\       |--goni\       |--smdk2400\       |--smdk2410\           |--smdk2410.c           |--flash.c           |--lowlevel_init.S           |--config.mk           |--Makefile           |--nand_read.c           |--nand_read_save.c   |... drivers/i2c/s3c24x0_i2c.c     /mtd/nand/nand_base.c     /mtd/nand/nand_util.c     /mtd/nand/s3c2410_nand.c     /net/dm9000x.c     /video/cfb_console_2.c     /video/cfb_console.c     /video/Makefile     /video/s3c2410_fb.c     /video/videomodes.c     /video/videomodes.h     /configs/fl2440.h     /linux/mtd/mtd.h     /serial.h common/cmd_nand.c      /serial.c board.cfg Makefile

 

================================================================
source: http://blog.csdn.net/yanghao23

        鉴于u-boot的2010.09版本之后的结构发生很大变化,特别是它启动步骤的改变,使得支持Nand flash启动支持的困难,我尝试了几次,最后从Nand flash启动后uboot的指令却无法支持了,而2010.09版本是U-boot结构发生较大改变的最后一个版本,其中已添加了S3C2440的支持(不像以前的版本需要在很多文件中的CONFIG_S3C2410后加上CONFIG_S3C2440),于是选择它作为fl2440的bootloader。

这是一个移植做好后的patch文件改变项
u-boot-2010.09 < uboot2010.09_fl2440.patch
------->>>>>>>

------
patching file arch/arm/cpu/arm920t/.goutputstream-GWHEQV patching file arch/arm/cpu/arm920t/.goutputstream-JRIBQV patching file arch/arm/cpu/arm920t/s3c24x0/speed.c patching file arch/arm/cpu/arm920t/s3c24x0/timer.c patching file arch/arm/cpu/arm920t/start.S patching file arch/arm/cpu/arm920t/u-boot.lds
patching file arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h patching file arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
patching file arch/arm/lib/board.c

------ patching file board/fl2440/config.mk patching file board/fl2440/fl2440.c patching file board/fl2440/flash.c patching file board/fl2440/lowlevel_init.S patching file board/fl2440/Makefile patching file board/fl2440/nand_read.c patching file board/fl2440/nand_read_save.c
patching file boards.cfg

------ patching file common/cmd_nand.c patching file common/serial.c
------
patching file drivers/i2c/s3c24x0_i2c.c patching file drivers/mtd/nand/nand_base.c patching file drivers/mtd/nand/nand_util.c patching file drivers/mtd/nand/s3c2410_nand.c patching file drivers/net/dm9000x.c patching file drivers/video/cfb_console_2.c patching file drivers/video/cfb_console.c patching file drivers/video/Makefile patching file drivers/video/s3c2410_fb.c patching file drivers/video/videomodes.c patching file drivers/video/videomodes.h patching file include/configs/fl2440.h patching file include/linux/mtd/mtd.h patching file include/serial.h patching file Makefile

 

==========================================================================

转载于:https://www.cnblogs.com/andrew-wang/archive/2012/11/04/2753971.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值