接下来分析一下韦老师的uboot补丁:

----------------------------------------------------------------------------------------------------------------------------------------------------

--- u-boot-1.1.6/board/100ask24x0/100ask24x0.c    1970-01-01 07:00:00.000000000 +0700
+++ u-boot-1.1.6_jz2440/board/100ask24x0/100ask24x0.c    2010-11-26 12:54:37.034090906 +0800

...

增加100ask24x0/100ask24x0.c文件

里面有

DECLARE_GLOBAL_DATA_PTR;

int board_init (void){...}

int dram_init (void){...}

ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info){...}

理论上照搬自smdk2410板子的同一类型文件.

----------------------------------------------------------------------------------------------------------------------------------------------------

diff -urN u-boot-1.1.6/board/100ask24x0/boot_init.c u-boot-1.1.6_jz2440/board/100ask24x0/boot_init.c
--- u-boot-1.1.6/board/100ask24x0/boot_init.c    1970-01-01 07:00:00.000000000 +0700
+++ u-boot-1.1.6_jz2440/board/100ask24x0/boot_init.c    2010-11-26 12:54:37.042080086 +0800

增加boot_init.c

----------------------------------------------------------------------------------------------------------------------------------------------------

照搬smdk2410上面的config.mk

diff -urN u-boot-1.1.6/board/100ask24x0/config.mk u-boot-1.1.6_jz2440/board/100ask24x0/config.mk
--- u-boot-1.1.6/board/100ask24x0/config.mk    1970-01-01 07:00:00.000000000 +0700
+++ u-boot-1.1.6_jz2440/board/100ask24x0/config.mk    2010-11-26 12:54:37.022042833 +0800

----------------------------------------------------------------------------------------------------------------------------------------------------

diff -urN u-boot-1.1.6/board/100ask24x0/flash.c u-boot-1.1.6_jz2440/board/100ask24x0/flash.c
--- u-boot-1.1.6/board/100ask24x0/flash.c    1970-01-01 07:00:00.000000000 +0700
+++ u-boot-1.1.6_jz2440/board/100ask24x0/flash.c    2010-11-26 12:54:37.022042833 +0800

这个是nand_flash的驱动

----------------------------------------------------------------------------------------------------------------------------------------------------

diff -urN u-boot-1.1.6/board/100ask24x0/lowlevel_init.S u-boot-1.1.6_jz2440/board/100ask24x0/lowlevel_init.S
--- u-boot-1.1.6/board/100ask24x0/lowlevel_init.S    1970-01-01 07:00:00.000000000 +0700
+++ u-boot-1.1.6_jz2440/board/100ask24x0/lowlevel_init.S    2010-11-26 12:54:37.042080086 +0800

启动初始化的汇编, 也就是确定sdram, nand_flash的内存地址映射, 前面也说过这个文件也是要检查的.

----------------------------------------------------------------------------------------------------------------------------------------------------

diff -urN u-boot-1.1.6/board/100ask24x0/Makefile u-boot-1.1.6_jz2440/board/100ask24x0/Makefile
--- u-boot-1.1.6/board/100ask24x0/Makefile    1970-01-01 07:00:00.000000000 +0700
+++ u-boot-1.1.6_jz2440/board/100ask24x0/Makefile    2010-11-26 12:54:37.030096240 +0800

Makefile文件也是来自smdk2410的, 改了一下要编译的目标文件名

+COBJS    := 100ask24x0.o boot_init.o

----------------------------------------------------------------------------------------------------------------------------------------------------

diff -urN u-boot-1.1.6/board/100ask24x0/u-boot.lds u-boot-1.1.6_jz2440/board/100ask24x0/u-boot.lds
--- u-boot-1.1.6/board/100ask24x0/u-boot.lds    1970-01-01 07:00:00.000000000 +0700
+++ u-boot-1.1.6_jz2440/board/100ask24x0/u-boot.lds    2010-11-26 12:54:37.042080086 +0800

链接脚本文件也是照抄, 并无更改.

----------------------------------------------------------------------------------------------------------------------------------------------------

diff -urN u-boot-1.1.6/board/MAI/bios_emulator/scitech/src/v86bios/lex.l u-boot-1.1.6_jz2440/board/MAI/bios_emulator/scitech/src/v86bios/lex.l
--- u-boot-1.1.6/board/MAI/bios_emulator/scitech/src/v86bios/lex.l    2006-11-02 22:15:01.000000000 +0800
+++ u-boot-1.1.6_jz2440/board/MAI/bios_emulator/scitech/src/v86bios/lex.l    1970-01-01 07:00:00.000000000 +0700

之前没涉及这个, 貌似是基本把这个文件给清空了.

----------------------------------------------------------------------------------------------------------------------------------------------------

diff -urN u-boot-1.1.6/common/cmd_bootm.c u-boot-1.1.6_jz2440/common/cmd_bootm.c
--- u-boot-1.1.6/common/cmd_bootm.c    2006-11-02 22:15:01.000000000 +0800
+++ u-boot-1.1.6_jz2440/common/cmd_bootm.c    2010-11-26 12:54:38.150155640 +0800

diff -urN u-boot-1.1.6/common/cmd_load.c u-boot-1.1.6_jz2440/common/cmd_load.c
--- u-boot-1.1.6/common/cmd_load.c    2006-11-02 22:15:01.000000000 +0800
+++ u-boot-1.1.6_jz2440/common/cmd_load.c    2010-11-26 12:54:38.142063808 +0800

diff -urN u-boot-1.1.6/common/cmd_menu.c u-boot-1.1.6_jz2440/common/cmd_menu.c
--- u-boot-1.1.6/common/cmd_menu.c    1970-01-01 07:00:00.000000000 +0700
+++ u-boot-1.1.6_jz2440/common/cmd_menu.c    2010-11-26 12:54:38.158053077 +0800

启动命令, 菜单一类吧

----------------------------------------------------------------------------------------------------------------------------------------------------

diff -urN u-boot-1.1.6/common/cmd_nand_legacy.c u-boot-1.1.6_jz2440/common/cmd_nand_legacy.c
--- u-boot-1.1.6/common/cmd_nand_legacy.c    1970-01-01 07:00:00.000000000 +0700
+++ u-boot-1.1.6_jz2440/common/cmd_nand_legacy.c    2010-11-26 12:54:38.130318758 +0800

diff -urN u-boot-1.1.6/common/env_nand.c u-boot-1.1.6_jz2440/common/env_nand.c
--- u-boot-1.1.6/common/env_nand.c    2006-11-02 22:15:01.000000000 +0800
+++ u-boot-1.1.6_jz2440/common/env_nand.c    2010-11-26 12:54:38.170264643 +0800

这个才是nand支持.

----------------------------------------------------------------------------------------------------------------------------------------------------

diff -urN u-boot-1.1.6/cpu/arm920t/s3c24x0/interrupts.c u-boot-1.1.6_jz2440/cpu/arm920t/s3c24x0/interrupts.c
--- u-boot-1.1.6/cpu/arm920t/s3c24x0/interrupts.c    2006-11-02 22:15:01.000000000 +0800
+++ u-boot-1.1.6_jz2440/cpu/arm920t/s3c24x0/interrupts.c    2010-11-26 12:54:37.726297356 +0800

中断定义, 增加

diff -urN u-boot-1.1.6/cpu/arm920t/s3c24x0/Makefile u-boot-1.1.6_jz2440/cpu/arm920t/s3c24x0/Makefile
--- u-boot-1.1.6/cpu/arm920t/s3c24x0/Makefile    2006-11-02 22:15:01.000000000 +0800
+++ u-boot-1.1.6_jz2440/cpu/arm920t/s3c24x0/Makefile    2010-11-26 12:54:37.726297356 +0800

diff -urN u-boot-1.1.6/cpu/arm920t/s3c24x0/nand_flash.c u-boot-1.1.6_jz2440/cpu/arm920t/s3c24x0/nand_flash.c
--- u-boot-1.1.6/cpu/arm920t/s3c24x0/nand_flash.c    1970-01-01 07:00:00.000000000 +0700
+++ u-boot-1.1.6_jz2440/cpu/arm920t/s3c24x0/nand_flash.c    2010-11-26 12:54:37.726297356 +0800

diff -urN u-boot-1.1.6/cpu/arm920t/s3c24x0/nand_flash_legacy.c u-boot-1.1.6_jz2440/cpu/arm920t/s3c24x0/nand_flash_legacy.c
--- u-boot-1.1.6/cpu/arm920t/s3c24x0/nand_flash_legacy.c    1970-01-01 07:00:00.000000000 +0700
+++ u-boot-1.1.6_jz2440/cpu/arm920t/s3c24x0/nand_flash_legacy.c    2010-11-26 12:54:37.726297356 +0800

----------------------------------------------------------------------------------------------------------------------------------------------------

diff -urN u-boot-1.1.6/cpu/arm920t/s3c24x0/speed.c u-boot-1.1.6_jz2440/cpu/arm920t/s3c24x0/speed.c
--- u-boot-1.1.6/cpu/arm920t/s3c24x0/speed.c    2006-11-02 22:15:01.000000000 +0800
+++ u-boot-1.1.6_jz2440/cpu/arm920t/s3c24x0/speed.c    2010-11-26 12:54:37.730289845 +0800

diff -urN u-boot-1.1.6/cpu/arm920t/start.S u-boot-1.1.6_jz2440/cpu/arm920t/start.S
--- u-boot-1.1.6/cpu/arm920t/start.S    2006-11-02 22:15:01.000000000 +0800
+++ u-boot-1.1.6_jz2440/cpu/arm920t/start.S    2010-11-26 12:54:37.718042180 +0800

这个跟之前的是一样的.

----------------------------------------------------------------------------------------------------------------------------------------------------

diff -urN u-boot-1.1.6/drivers/dm9000x.c u-boot-1.1.6_jz2440/drivers/dm9000x.c
--- u-boot-1.1.6/drivers/dm9000x.c    2006-11-02 22:15:01.000000000 +0800
+++ u-boot-1.1.6_jz2440/drivers/dm9000x.c    2010-11-26 12:54:38.306059089 +0800

增加网络的支持

----------------------------------------------------------------------------------------------------------------------------------------------------

diff -urN u-boot-1.1.6/drivers/jedec_flash.c u-boot-1.1.6_jz2440/drivers/jedec_flash.c
--- u-boot-1.1.6/drivers/jedec_flash.c    1970-01-01 07:00:00.000000000 +0700
+++ u-boot-1.1.6_jz2440/drivers/jedec_flash.c    2010-11-26 12:54:38.462156280 +0800

支持jedec的专用flash驱动

----------------------------------------------------------------------------------------------------------------------------------------------------

diff -urN u-boot-1.1.6/drivers/Makefile u-boot-1.1.6_jz2440/drivers/Makefile
--- u-boot-1.1.6/drivers/Makefile    2006-11-02 22:15:01.000000000 +0800
+++ u-boot-1.1.6_jz2440/drivers/Makefile    2010-11-26 12:54:38.422209313 +0800

增加了驱动, 要修改Makefile, 让其编译

----------------------------------------------------------------------------------------------------------------------------------------------------

diff -urN u-boot-1.1.6/drivers/nand/nand_base.c u-boot-1.1.6_jz2440/drivers/nand/nand_base.c
--- u-boot-1.1.6/drivers/nand/nand_base.c    2006-11-02 22:15:01.000000000 +0800
+++ u-boot-1.1.6_jz2440/drivers/nand/nand_base.c    2010-11-26 12:54:38.406038793 +0800

diff -urN u-boot-1.1.6/drivers/nand/nand_util.c u-boot-1.1.6_jz2440/drivers/nand/nand_util.c
--- u-boot-1.1.6/drivers/nand/nand_util.c    2006-11-02 22:15:01.000000000 +0800
+++ u-boot-1.1.6_jz2440/drivers/nand/nand_util.c    2010-11-26 12:54:38.402251606 +0800

diff -urN u-boot-1.1.6/drivers/nand_legacy/nand_legacy.c u-boot-1.1.6_jz2440/drivers/nand_legacy/nand_legacy.c
--- u-boot-1.1.6/drivers/nand_legacy/nand_legacy.c    2006-11-02 22:15:01.000000000 +0800
+++ u-boot-1.1.6_jz2440/drivers/nand_legacy/nand_legacy.c    2010-11-26 12:54:38.414220270 +0800

放在驱动文件夹下面, 应该是驱动

diff -urN u-boot-1.1.6/drivers/usb/2440usb.h u-boot-1.1.6_jz2440/drivers/usb/2440usb.h
--- u-boot-1.1.6/drivers/usb/2440usb.h    1970-01-01 07:00:00.000000000 +0700
+++ u-boot-1.1.6_jz2440/drivers/usb/2440usb.h    2010-11-26 12:54:38.322059054 +0800

usb驱动

diff -urN u-boot-1.1.6/drivers/usb/Makefile u-boot-1.1.6_jz2440/drivers/usb/Makefile
--- u-boot-1.1.6/drivers/usb/Makefile    1970-01-01 07:00:00.000000000 +0700
+++ u-boot-1.1.6_jz2440/drivers/usb/Makefile    2010-11-26 12:54:38.326057824 +0800

usb驱动编译

支持usb是为了从usb下载文件系统??

diff -urN u-boot-1.1.6/drivers/usb/usb.h u-boot-1.1.6_jz2440/drivers/usb/usb.h
--- u-boot-1.1.6/drivers/usb/usb.h    1970-01-01 07:00:00.000000000 +0700
+++ u-boot-1.1.6_jz2440/drivers/usb/usb.h    2010-11-26 12:54:38.330048254 +0800

diff -urN u-boot-1.1.6/drivers/usb/usbin.c u-boot-1.1.6_jz2440/drivers/usb/usbin.c
--- u-boot-1.1.6/drivers/usb/usbin.c    1970-01-01 07:00:00.000000000 +0700
+++ u-boot-1.1.6_jz2440/drivers/usb/usbin.c    2010-11-26 12:54:38.326057824 +0800

diff -urN u-boot-1.1.6/drivers/usb/usbinit.h u-boot-1.1.6_jz2440/drivers/usb/usbinit.h
--- u-boot-1.1.6/drivers/usb/usbinit.h    1970-01-01 07:00:00.000000000 +0700
+++ u-boot-1.1.6_jz2440/drivers/usb/usbinit.h    2010-11-26 12:54:38.330048254 +0800

----------------------------------------------------------------------------------------------------------------------------------------------------

diff -urN u-boot-1.1.6/include/asm-arm/mach-types.h u-boot-1.1.6_jz2440/include/asm-arm/mach-types.h
--- u-boot-1.1.6/include/asm-arm/mach-types.h    2006-11-02 22:15:01.000000000 +0800
+++ u-boot-1.1.6_jz2440/include/asm-arm/mach-types.h    2010-11-26 12:54:38.046150949 +0800
@@ -737,6 +737,7 @@
 #define MACH_TYPE_CB3RUFC              726
 #define MACH_TYPE_MP2USB               727
 #define MACH_TYPE_PDNB3               1002
+#define MACH_TYPE_SMDKS3C2440          782
 
 #ifdef CONFIG_ARCH_EBSA110
 # ifdef machine_arch_type

增加机器码, 这个估计后面linux内核启动用得着.

----------------------------------------------------------------------------------------------------------------------------------------------------

diff -urN u-boot-1.1.6/include/configs/100ask24x0.h u-boot-1.1.6_jz2440/include/configs/100ask24x0.h
--- u-boot-1.1.6/include/configs/100ask24x0.h    1970-01-01 07:00:00.000000000 +0700
+++ u-boot-1.1.6_jz2440/include/configs/100ask24x0.h    2010-11-26 12:54:37.958266315 +0800

这里是启动时候的环境变量

整体来说, 增加了网络, nandflash支持, usb的驱动, 以及菜单的制作.

uboot补丁的分析的更多相关文章

  1. u-boot源码分析之C语言段

    题外话: 最近一直在学习u-boot的源代码,从代码量到代码风格,都让我认识到什么才是真正的程序.以往我所学到的C语言知识和u-boot的源代码相比,实在不值一提.说到底,机器都是0和1控制的.感觉这 ...

  2. u-boot启动流程分析(2)_板级(board)部分

    转自:http://www.wowotech.net/u-boot/boot_flow_2.html 目录: 1. 前言 2. Generic Board 3. _main 4. global dat ...

  3. [国嵌笔记][030][U-Boot工作流程分析]

    uboot工作流程分析 程序入口 1.打开顶层目录的Makefile,找到目标smdk2440_config的命令中的第三项(smdk2440) 2.进入目录board/samsung/smdk244 ...

  4. 基于335X的UBOOT网口驱动分析

    基于335X的UBOOT网口驱动分析 一.软硬件平台资料 1.  开发板:创龙AM3359核心板,网口采用RMII形式 2.  UBOOT版本:U-Boot-2016.05,采用FDT和DM. 参考链 ...

  5. u-boot源码分析

    Uboot源码分析 源码以u-boot-1.3.4为基准,主芯片采用at91sam9260,主要介绍uboot执行流程. uboot官网:http://www.denx.de/wiki/U-Boot/ ...

  6. Xilinx Uboot网卡驱动分析

    1.MAC控制器.网卡.PHY.MDIO.mii.gmii.rgmii概念扫盲 网卡在功能上包含OSI模型的两个层,数据链路层和物理层.物理层定义了数据传送与接收所需要的电与光信号.线路状态.时钟基准 ...

  7. uboot makefile构建分析-续

    前言 这篇博文是 uboot makefile构建分析的续篇,继续分析uboot构建u-boot.bin的过程 构建u-boot.bin过程分析 makefile一开始,就是确定链接脚本.在构建ubo ...

  8. uboot主Makefile分析(t配置和编译过程详解)

    1.编译uboot前需要三次make make distcleanmake x210_sd_configmake -j4 make distclean为清楚dist文件. make x210_sd_c ...

  9. uboot主Makefile分析

    VERSION = 1 PATCHLEVEL = 3 SUBLEVEL = 4 EXTRAVERSION = U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(S ...

随机推荐

  1. 多线程相关------互斥量Mutex

    互斥量(Mutex) 互斥量是一个可以处于两态之一的变量:解锁和加锁.只有拥有互斥对象的线程才具有访问资源的权限.并且互斥量可以用于不同进程中的线程的互斥访问. 相关函数: CreateMutex用于 ...

  2. Linux下安装Git

    Ubuntu12.04中默认没有安装Git.需要自行安装. 1. 安装Git 1.1 Ubuntu12.04下 可以使用apt-get方式安装,也可以下载源代码安装[1],我们这里使用apt-git安 ...

  3. Tomcat学习记录

    阅读摘录如下: 本质 Tomcat最本质就是个能运行JSP/Servlet的Web服务器 , 因此最典型的应用就是用户通过浏览器访问服务器,Tomcat接收到请求后转发给Servlet,由Servle ...

  4. Nginx 和 Apache 开启目录浏览功能

    1.Nginx 在相应项目的 Server 段中的 location 段中,添加 autoindex on.例如: server { listen ; server_name www.dee.prac ...

  5. JBoss QuickStart之Helloworld

    下载Jboss, quickstart, 按照quickstart说明, mvn clean install. 由于ssl handshake问题(应该是网络连接不稳定), 写了一个脚本不停地尝试bu ...

  6. nginx开启日志,指定格式,查看执行时间

    nginx配置: access_log on; log_format access '$remote_addr – $remote_user [$time_local] "$request& ...

  7. SQL语句 - MERGE INTO 、Cross/Outer Apply用法理解

    MERGE INTO 语法: MERGE INTO table_name alias1 USING (table|view|sub_query) alias2ON (join condition) W ...

  8. JSP数据交互

    JSP数据交互   一.jsp中java小脚本 1.<% java代码段%> 2.<% =java表达式%>不能有分号 3.<%!成员变量和函数声明%>二.注释 1 ...

  9. composer install 卡壳

    曾经用npm依赖包的时候也遇到了相应的问题,总而言之在国内,各种依赖包就换成国内的镜像吧你懂得! linux 或 window 命令行输入 composer config -g repo.packag ...

  10. Java web学习filter (1)

    一.概念:Filter也称之为过滤器,它是Servlet技术中比较激动人心的技术,WEB开发人员通过Filter技术,对web服务器管理的所有web资源: 例如Jsp, Servlet, 静态图片文件 ...