使用的开发板是三星4412的开发板,u-boot用的是u-boot.2013.01版本。随后我会把相关的资料上传,需要的朋友可以下载使用
1、uboot 源码获取方式
1. 从 官网获取
http://ftp.denx.de/pub/u-boot/
老的uboot 版本不建议使用,遇到问题, 决绝难度大,
太新的不要用
rc 的 不要用, 属于测试版
2. 也可以从芯片厂商 直接获取
2、 bootloader 启动加载者
1. uboot 德国
2. bios
3. redhetboot
4. vivi
3、 uboot 编译
1. 拷贝 u-boot-2013.01-fs4412.tar.gz 到 虚拟机
2. $ tar -xvf u-boot-2013.01-fs4412.tar.gz
2. $ make fs4412_config // 配置uboot 编译成那个开发板的 bin 程序
3. $ make -j2 // 编译 -j2 代表 多处理器 编译
4. ./build.sh // 添加 校验程序
5. $ make clean // 清除 生成的 目标文件
$ make mrproper // 清除 生成的 目标文件 和 配置 生成的中间文件
$ make distclean // 清除 生成的 目标文件 和 配置 生成的中间文件 和 .bak ...
配置交叉编译工具
4、目录结构
// 平台相关吗
arch 存放cpu 架构 相关驱动代码
arch/arm/cpu/ 不同arm 版本的处理器驱动
board 不同开发板的驱动
board/samsung 三星厂商的开发板
board/samsung/fs4412
include 头文件目录
include/confis/ 重要, 选择性编译 那个外设驱动的 默认配置
driver
boards.cfg // 开发板的配置信息
5、uboot 烧写
1. 烧写
FS4412 # tftp 41000000 u-boot-fs4412.bin
FS4412 # emmc open 0
FS4412 # mmc write 0 41000000 0 406
MMC write: dev # 0, block # 0, count 1030. 1030 blocks write finish
1030 blocks verify1: OK
烧写成功
2. 拨码开关 选择 emmc 启动
6、 系统部署
1. 烧写bin到 emmc
FS4412 # tftp 41000000 uImage
FS4412 # emmc open 0
FS4412 # mmc write 0 41000000 0 1660
FS4412 # tftp 41000000 exynos4412-origen.dtb
FS4412 # mmc write 0 41000000 1660 44
2. 重启开发版
3.
FS4412 # emmc open 0
FS4412 # mmc read 0 41000000 0 1660
FS4412 # mmc read 0 42000000 1660 44
FS4412 # set bootcmd “emmc open 0; mmc read 0 41000000 0 1660;mmc read 0 42000000 1660 44; bootm 41000000 - 42000000”
u-boot文件系统和uImage资料下载