U-boot移植需要修改哪些文件?在網上找到高手關於u-boot移植的patch,過濾了一下,要修改到的文件可能涉及到有如下這些,先羅列出來,以後慢慢證實,下一步,應該先了解一下u-boot的目錄結構纔好進行u-boot的移植工作啊,方向很重要!
在u-boot中添加目標板支持(2410/2440) (board 目標板相關文件,主要包含SDRAM、FLASH驅動)
1 +++ u-boot-rat/board/hugerat/rat2410/config.mk 2008-12-15 23:03:59.000000000 +0800
2 +++ u-boot-rat/board/hugerat/rat2410/flash.c 2008-10-19 03:30:31.000000000 +0800
3 +++ u-boot-rat/board/hugerat/rat2410/lowlevel_init.S(SDRAM設置)
2008-12-10 19:08:15.000000000 +0800
4 +++ u-boot-rat/board/hugerat/rat2410/Makefile 2008-12-16 10:33:56.000000000 +0800
5 +++ u-boot-rat/board/hugerat/rat2410/nand_read.c 2008-12-16 11:14:08.000000000 +0800
6 +++ u-boot-rat/board/hugerat/rat2410/rat2410.c 2008-12-16 11:56:17.000000000 +0800
7 +++ u-boot-rat/board/hugerat/rat2410/u-boot.lds 2008-10-19 03:30:31.000000000 +0800
8 +++ u-boot-rat/board/hugerat/rat2440/config.mk 2008-12-16 16:32:08.000000000 +0800
9 +++ u-boot-rat/board/hugerat/rat2440/flash.c 2008-10-19 03:30:31.000000000 +0800
10 +++ u-boot-rat/board/hugerat/rat2440/lowlevel_init.S (SDRAM設置)
2008-12-10 19:08:15.000000000 +0800
11 +++ u-boot-rat/board/hugerat/rat2440/Makefile 2008-12-11 13:53:16.000000000 +0800
12 +++ u-boot-rat/board/hugerat/rat2440/nand_read.c 2008-02-29 23:23:10.000000000 +0800
13 +++ u-boot-rat/board/hugerat/rat2440/rat2440.c 2008-12-11 16:57:57.000000000 +0800
14 +++ u-boot-rat/board/hugerat/rat2440/u-boot.lds 2008-10-19 03:30:31.000000000 +0800
common 獨立於處理器體系結構的通用代碼,如內存大小探測與故障檢測
15 +++ u-boot-rat/common/cmd_nand.c 2008-12-15 22:14:50.000000000 +0800
cpu 與處理器相關的文件
16 +++ u-boot-rat/cpu/arm920t/s3c24x0/i2c.c 2008-12-05 14:25:37.000000000 +0800
17 +++ u-boot-rat/cpu/arm920t/s3c24x0/interrupts.c 2008-12-16 11:03:20.000000000 +0800
18 +++ u-boot-rat/cpu/arm920t/s3c24x0/nand.c 2008-12-16 10:55:28.000000000 +0800
19 +++ u-boot-rat/cpu/arm920t/s3c24x0/serial.c 2008-12-05 13:52:19.000000000 +0800
20 +++ u-boot-rat/cpu/arm920t/s3c24x0/speed.c 2008-12-05 15:01:07.000000000 +0800
21 +++ u-boot-rat/cpu/arm920t/s3c24x0/usb.c 2008-12-05 14:17:29.000000000 +0800
22 +++ u-boot-rat/cpu/arm920t/s3c24x0/usb_ohci.c 2008-12-05 14:11:34.000000000 +0800
23 +++ u-boot-rat/cpu/arm920t/start.S(時鐘等設置) 2009-01-05 21:28:52.000000000 +0800
driver 通用設備驅動,如CFI FLASH驅動(目前對INTEL FLASH支持較好)
24 +++ u-boot-rat/drivers/mtd/nand/nand_base.c 2008-12-17 11:44:46.000000000 +0800
25 +++ u-boot-rat/drivers/mtd/nand/nand.c 2008-12-09 15:58:42.000000000 +0800
26 +++ u-boot-rat/drivers/mtd/nand/nand_util.c 2008-12-17 12:57:42.000000000 +0800
27 +++ u-boot-rat/drivers/net/dm9000x.c 2008-12-06 20:09:04.000000000 +0800
28 +++ u-boot-rat/drivers/rtc/s3c24x0_rtc.c 2008-12-05 14:15:15.000000000 +0800
29 +++ u-boot-rat/drivers/usb/usb_ohci.c 2008-12-05 14:28:30.000000000 +0800
include U-Boot頭文件;尤其configs子目錄下與目標板相關的配置頭文件是移植過程中經常要修改的文件
30 +++ u-boot-rat/include/asm-arm/mach-types.h 2008-12-16 11:51:51.000000000 +0800
31 +++ u-boot-rat/include/common.h 2008-12-05 14:55:35.000000000 +0800
32 +++ u-boot-rat/include/configs/rat2410.h 2008-12-16 11:04:34.000000000 +0800
33 +++ u-boot-rat/include/configs/rat2440.h 2008-12-16 16:01:00.000000000 +0800
34 +++ u-boot-rat/include/linux/mtd/mtd.h 2008-12-15 21:20:57.000000000 +0800
35 +++ u-boot-rat/include/s3c24x0.h 2008-12-05 15:22:20.000000000 +0800
lib_xxx 處理器體系相關的文件,如lib_ppc, lib_arm目錄分別包含與PowerPC、ARM體系結構相關的文件
36 +++ u-boot-rat/lib_arm/board.c 2008-12-06 20:22:40.000000000 +0800
37 +++ u-boot-rat/Makefile 2008-12-16 09:40:36.000000000 +0800
附件: U-Boot主要目錄結構
- board 目標板相關文件,主要包含SDRAM、FLASH驅動;
- common 獨立於處理器體系結構的通用代碼,如內存大小探測與故障檢測;
- cpu 與處理器相關的文件。如mpc8xx子目錄下含串口、網口、LCD驅動及中斷初始化等文件;
- driver 通用設備驅動,如CFI FLASH驅動(目前對INTEL FLASH支持較好)
- doc U-Boot的說明文檔;
- examples可在U-Boot下運行的示例程序;如hello_world.c,timer.c;
- include U-Boot頭文件;尤其configs子目錄下與目標板相關的配置頭文件是移植過程中經常要修改的文件;
- lib_xxx 處理器體系相關的文件,如lib_ppc, lib_arm目錄分別包含與PowerPC、ARM體系結構相關的文件;
- net 與網絡功能相關的文件目錄,如bootp,nfs,tftp;
- post 上電自檢文件目錄。尚有待於進一步完善;
- rtc RTC驅動程序;
- tools 用於創建U-Boot S-RECORD和BIN鏡像文件的工具;
分類:
第一類目錄與處理器體系結構 或者開發板硬件 直接相關;
第二類目錄是一些通用的函數或者驅動程序 ;
第三類目錄是u-boot的應用程序、工具或者文檔 。
.
|-- board 目標板相關文件,主要包含SDRAM、FLASH驅動;
| `-- EmbedSky
|-- common 獨立於處理器體系結構的通用代碼,如內存大小探測與故障檢測;
與體系結構無關的文件,實現各種命令的C文件。
|-- cpu 與處理器相關的文件
| |-- 74xx_7xx
| |-- arm1136
| |-- arm720t
| |-- arm920t
| | |-- at91rm9200
| | |-- imx
| | |-- ks8695
| | `-- s3c24x0
| |-- arm925t
| |-- arm926ejs
| | |-- omap
| | `-- versatile
| |-- arm946es
| |-- arm_intcm
| |-- at32ap
| | `-- at32ap7000
| |-- bf533
| |-- i386
| |-- ixp
| | `-- npe
| | `-- include
| |-- lh7a40x
| |-- mcf52x2
| |-- microblaze
| |-- mips
| |-- mpc5xx
| |-- mpc5xxx
| |-- mpc8220
| |-- mpc824x
| | `-- drivers
| | |-- epic
| | `-- i2c
| |-- mpc8260
| |-- mpc83xx
| |-- mpc85xx
| |-- mpc86xx
| |-- mpc8xx
| |-- nios
| |-- nios2
| |-- ppc4xx
| |-- pxa Intel的PXA處理器
| |-- s3c44b0
| `-- sa1100
|-- disk disk驅動的分區處理代碼
|-- doc
|-- drivers
通用設備驅動程序,比如各種網卡、支持CFI的flash、串口和USB總線等
| |-- lcd
| |-- nand
| |-- nand_legacy
| `-- sk98lin
| `-- h
|-- dtt 數字溫度測量器或者傳感器的驅動
|-- examples 一些獨立運行的應用程序的例子
|-- fs 支持文件系統的文件,u-boot現在支持cramfs、fat、fdos、jffs2、yaffs和registerfs。
| |-- cramfs 只讀的文件系統
| |-- ext2
| |-- fat 讀寫SD卡等外圍設備時用到的文件系統
| |-- fdos
| |-- jffs2 可寫的基於flash的文件系統,一般用於norflash
| `-- reiserfs
|-- include U-Boot頭文件;尤其configs子目錄下與目標板相關的配置頭文件是移植過程中經常要修改的文件 ,還有對各種硬件平臺支持的會變文件,系統的配置文件和對文件系統支持的文件。
| |-- asm -> asm-arm
| |-- asm-arm
| | |-- arch -> arch-s3c24x0
| | |-- arch-arm1136
| | |-- arch-arm720t
| | |-- arch-arm925t
| | |-- arch-arm926ejs
| | |-- arch-at91rm9200
| | |-- arch-imx
| | |-- arch-ixp
| | |-- arch-ks8695
| | |-- arch-omap
| | |-- arch-pxa
| | |-- arch-s3c24x0
| | |-- arch-s3c44b0
| | |-- arch-sa1100
| | |-- proc -> proc-armv
| | `-- proc-armv
| |-- asm-avr32
| | `-- arch-at32ap7000
| |-- asm-blackfin
| | `-- cpu
| |-- asm-i386
| | `-- ic
| |-- asm-m68k
| |-- asm-microblaze
| | `-- arch-microblaze
| |-- asm-mips
| |-- asm-nios
| |-- asm-nios2
| |-- asm-ppc
| |-- bedbug
| |-- configs 這個目錄是很關鍵的目錄,保存了各個開發板相關的配置信息
| |-- cramfs cramfs使用到的頭文件
| |-- galileo
| |-- jffs2 jffs2文件系統使用到的頭文件
| |-- linux
| | |-- byteorder
| | `-- mtd MTD設備使用到的頭文件
| `-- pcmcia
|-- lib_arm 存放對ARM體系結構通用的文件,主要用於實現ARM平臺通用的函數,與ARM體系結構相關的代碼。
|-- lib_avr32
|-- lib_blackfin
|-- lib_generic 通用的多功能函數實現。
|-- lib_i386 存放對X86體系結構通用的文件,主要用於實現X86平臺通用的函數,與PowerPc體系結構相關的代碼。
|-- lib_m68k
|-- lib_microblaze
|-- lib_mips
|-- lib_nios
|-- lib_nios2
|-- lib_ppc 存放對PowerPC體系結構通用的文件,主要用於實現PowerPC平臺通用的函數,與PowerPC體系結構相關的代碼。
|-- modules
|-- nand_spl
| `-- board
| `-- amcc
| `-- sequoia
|-- net 與網絡功能相關的文件目錄,如bootp,nfs,tftp;
與網絡有關的代碼,BOOTP協議、TFTP協議RARP協議和NFS文件系統的實現。
|-- post 上電自檢文件目錄。尚有待於進一步完善;
| `-- cpu
|-- rtc 實時時鐘RTC驅動程序
`-- tools 用於創建U-Boot S-RECORD和BIN鏡像文件的工具;
|-- bddb
|-- easylogo
|-- env
|-- gdb
|-- logos
|-- scripts
`-- updater
【20091214】
說明:
|- board目錄下只留所配置的開發板的信息,其他板子的刪除掉;
|- cpu目錄下只留arm920t類型,其他的刪除掉;
|- lib_*只留lib_arm目錄,其他的刪除掉;
|- *_config.mk只留arm_config.mk,其餘的刪除掉。
|-drivers目錄只保留需要的驅動,其餘的刪除掉,如nand Flash,網卡,lcd等。
1、刪除全新的uboot源碼board下的所有內容,並將EmbedSky文件夾複製至全新的uboot源碼下
2、複製EmbedSky.h至include/configs/目錄下
3、給include/s3c24x0.h打補丁
4、給include/nand.h打補丁
5、將modules文件夾複製至全新uboot源碼根目錄下
6、創建(複製)cpu/arm920t/s3c24x0目錄下的nand_flash.c文件
7、給lib_arm目錄下的文件打補丁
。。。。。。。。。