1.进入uboot源码包目录
2.配置uboot
TQ210: make TQ210_config
Smart210: make smart210_config
OK210: make forlinx_linux_config
OK6410: make forlinx_nand_ram256_config
Tiny6410: make tiny6410_config
TQ2440: make TQ2440_config
Mini2440: make mini2440_config
3.编译uboot
make ARCH=arm CROSS_COMPILE=arm-linux-
4.编译完后uboot目录下产生uboot.bin二进制文件,这时就可以使用uboot啦.
5.烧写uboot至开发板,可用dnw下载至开发板内存开始位置
6.使用uboot
help :查看当前开发板所支持的命令
printenv(print) :查看环境变量 eg : print ipaddr
setenv :添加 修改 删除 环境变量 eg : setenv ipaddr 192.168.1.102 (添加/修改) setenv ipaddr (删 除)
saveenv :保存所有的环境变量至nandflash(断电不消失)
tftp : 通过网络下载文件
1.设置环境变量ipaddr serverip 至同一网段,可用ping命令查看网络是否连通(注意: pc需关闭防墙/selinux)
2.配置tftp服务器,配置文件位于/etc/xinetd.d/tftp 。修改此文件如下:(tftpboot目录为服务器文件存放目 录)

3.将tftpboot目录权限改为777
4.重启xinetd服务
5.查看tftp服务是否启动 netstat -a | grep tftp
6.使用tftp下载内核文件至开发板 (tftp 内存地址 下载文件)
TQ210: tftp 0xc0008000 uImage
Smart210: tftp 0x20000000 uImage
OK210: tftp 0xc0008000 uImage
OK6410: tftp 0xc0008000 uImage
Tiny6410: tftp 0xc0008000 uImage
TQ2440: tftp 0x31000000 uImage
Mini2440: tftp 0x31000000 uImage
bootm:运行固定格式的二进制程序 (bootm {addr} {arg} eg: bootm 0xc0008000)
md :显示内存区域内容 (md.b c0000000)
mm :修改内存区域内容 (mm c0000000)
nand erase :擦除nandflash (nand erase {起始地址} {len})
nand write :从内存写数据到nandflash (nand write c0008000 400000 500000)从内存c0008000处写到nandflash 4M处,大小为5M
nand read :从nandflash读数据到内存 (nand read 内存起始地址 Flash起始地址 长度len)
附:1.设置从nand flash 自动启动
setenv bootcmd nand read c0008000 400000 500000 \; bootm c0008000
2.设置自动下载内核到内存后启动
setenv bootcmd tftp c0008000 uImage \; bootm c0008000