uboot—README
If the system board that you have is not listed, then you will need
to port U-Boot to your hardware platform. To do this, follow these
steps:
(如果你拥有的系统板没有列出,那么你需要将uboot移植到硬件平台)
- Add a new configuration option for your board to the toplevel
“Makefile” and to the “MAKEALL” script, using the existing
entries as examples. Note that here and at many other places
boards and other names are listed in alphabetical sort order. Please
keep this order.
(在板级顶层Makefile 跟 Makeall 上为你的板子添加新配置选项) - Create a new directory to hold your board specific code. Add any
files you need. In your board directory, you will need at least
the “Makefile”, a “.c”, “flash.c” and “u-boot.lds”.
(新建一个目录放你的板级代码,添加你需要的文件,在板机目录离,你至少要添加Ma’ke’file
XXX.C flash.c u-boot.lds(连接文件)) - Create a new configuration file “include/configs/.h” for
your board
(为你的板机开发新建一个文件 “include/configs/.h” ) - If you’re porting U-Boot to a new CPU, then also create a new
directory to hold your CPU specific code. Add any files you need.
(如果将uboot移植到一个新的CPU,你同样需要创建一个目录来存放CPU特定代码) - Run “make _config” with your new name.
- (运行编译 make 100askx0_config)
- Type “make”, and you should get a working “u-boot.srec” file to be installed on your target system.
- (make,将在目标系统得到一个Motorola S-Record格式的可执行文件)
- Debug and solve any problems that might arise.
[Of course, this last step is much harder than it sounds.]
(调试跟解决可能回出现的任何问题)
Monitor Commands - Overview:
Environment Variables are set using “setenv”, printed using"printenv", and saved to Flash using “saveenv”. Using "setenv"without a value can be used to delete a variable from theenvironment.
go - start application at address ‘addr’
run - run commands in an environment variable
bootm - boot application image from memory
bootp - boot image via network using BootP/TFTP protocol
tftpboot- boot image via network using TFTP protocol
and env variables “ipaddr” and “serverip”
(and eventually “gatewayip”)
rarpboot- boot image via network using RARP/TFTP protocol
diskboot- boot from IDE devicebootd - boot default, i.e., run ‘bootcmd’
loads - load S-Record file over serial line
loadb - load binary file over serial line (kermit mode)
md - memory display
mm - memory modify (auto-incrementing)
nm - memory modify (constant address)
mw - memory write (fill)
cp - memory copy
cmp - memory compare
crc32 - checksum calculation
imd - i2c memory display
imm - i2c memory modify (auto-incrementing)
inm - i2c memory modify (constant address)
imw - i2c memory write (fill)
icrc32 - i2c checksum calculation
iprobe - probe to discover valid I2C chip addresses
iloop - infinite loop on address range
isdram - print SDRAM configuration information
sspi - SPI utility commands
base - print or set address offset
printenv- print environment variables
setenv - set environment variables
saveenv - save environment variables to persistent storage
protect - enable or disable FLASH write protection
erase - erase FLASH memory
flinfo - print FLASH memory information
bdinfo - print Board Info structure
iminfo - print header information for application image
coninfo - print console devices and informations
ide - IDE sub-system
loop - infinite loop on address range
loopw - infinite write loop on address range
mtest - simple RAM test
icache - enable or disable instruction cache
dcache - enable or disable data cache
reset - Perform RESET of the CPU
echo - echo args to console
version - print monitor version
help - print online help
? - alias for ‘help’