前言文件1.开发板厂商提供的uboot的配置及编译
前言
uboot是通用的启动代码,我们编译移植最好找到和自己的开发板最相近的版本,比如厂商已经匹配的uboot,uboot分类:官方版,SoC厂商,开发板厂商。
我们可以根据自己入手的开发板做一次移植,再根据官方给出的uboot做一次移植,从而很好的学习此方面的知识。
文件
├── board
│ └── samsung
│ ├── common
│ └── x210
├── common
├── config.mk
├── cpu
│ └── s5pc11x
│ └── s6pc110
├── disk
├── doc
│ └── uImage.FIT
├── drivers
│ ├── bios_emulator
│ │ ├── include
│ │ │ └── x86emu
│ │ └── x86emu
│ ├── block
│ ├── dma
│ ├── hwmon
│ ├── i2c
│ ├── input
│ ├── misc
│ ├── mmc
│ ├── mtd
│ │ ├── nand
│ │ ├── nand_legacy
│ │ ├── onenand
│ │ ├── spi
│ │ └── ubi
│ ├── net
│ │ └── sk98lin
│ │ └── h
│ ├── pci
│ ├── pcmcia
│ ├── qe
│ ├── rtc
│ ├── serial
│ ├── spi
│ ├── usb
│ └── video
├── examples
├── fs
│ ├── cramfs
│ ├── ext2
│ ├── fat
│ ├── fdos
│ ├── jffs2
│ └── reiserfs
├── include
│ ├── asm-arm
│ │ ├── arch-s5pc11x
│ │ └── proc-armv
│ └── linux
│ ├── byteorder
│ ├── mmc
│ └── mtd
├── lib_arm
├── libfdt
├── lib_generic
├── Makefile
├── mkconfig
├── nand_spl
│ └── board
│ └── amcc
│ ├── acadia
│ ├── bamboo
│ ├── canyonlands
│ ├── kilauea
│ └── sequoia
├── net
├── onenand_bl1
│ └── smdkc110
├── onenand_ipl
│ └── board
│ └── apollon
├── post
│ ├── board
│ │ ├── lwmon
│ │ ├── lwmon5
│ │ └── netta
│ ├── cpu
│ │ ├── mpc8xx
│ │ └── ppc4xx
│ ├── drivers
│ └── lib_ppc
│ └── fpu
├── rules.mk
├── sd_fusing
└── tools
├── bddb
├── easylogo
├── env
├── gdb
├── logos
├── scripts
└── updater
uboot可以学到文件系统fatfs,两种启动方式:普通传参和镜像树传参fit,设备树,驱动,命令,环境变量,
1.开发板厂商提供的uboot的配置及编译以下内容基于x210开发板:
配置:make x210_sd_config
出现:Configuring for x210_sd board…说明配置好了。
配置取决于主板和CPU类型的组合;所有此类信息都保存在配置文件“include/configs/
编译:make
注意事项:
1.我们需要的交叉编译工具链为arm-2009q3,注意自己是否安装
2.makefile的第147行内容为:CROSS_COMPILE = /usr/local/arm/arm-2009q3/bin/arm-none-linux-gnueabi-
3.我们的uboot可以x210_sd_config也可以x210_nand_config,也可以通过mkmovi生成inand或者mmc使用的镜像文件
uboot中的文件及文件夹
文件:
mkconfig
Makefile
文件夹:
board:代表不同品牌的板子
common:env、command、控制台、crc校验等和硬件无关的代码。
cpu:SoC相关初始化和控制代码(CPU、中断、串口等SoC内部外设,start.S)。
driver:从Linux来的一部分驱动,是uboot阶段需要使用的硬件,比如网卡驱动、Inand/SD卡、NandFlash等的驱动。
fs:文件系统,从linux移植
include:头文件
lib_xxx:库
libfdt:设备树相关(启动传参,(3.4后的Linux改用设备树启动传参))
sd_fusing:烧录uboot镜像到SD卡的代码(此代码在Linux中运行,其编译采用gcc,而不是arm-linux-gcc)



