- 论坛徽章:
- 0
|
5.7 开始的步骤... 9
5.8 首次上电... 11
5.7 开始的步骤
在默认配置中,U-Boot运行在一种互动模式,它通过串口“COM.1(X.18)”提供命令行形式的用户接口。
这意味着U-Boot显示一个提示符(默认是:=>),等待着接受用户的输入。然后你输入一个命令,按下回车键。U-Boot将运行这个命令,然后又出现提示符等待下一条命令。
你可以使用help(或者简单地一个?)来查看所有的U-Boot命令。它将会列出在你当前配置下所有支持的命令。[请注意到尽管U-Boot提供了很多配置选项,并不是所有选项都支持各种处理器和开发板,有些选项可能在你的配置中并没有被选上。]
=> help
askenv - get environment variables from stdin
autoscr - run script from memory
base - print or set address offset
bdinfo - print Board Info structure
bootm - boot application image from memory
bootp - boot image via network using BootP/TFTP protocol
bootd - boot default, i.e., run 'bootcmd'
cmp - memory compare
coninfo - print console devices and informations
cp - memory copy
crc32 - checksum calculation
date - get/set/reset date & time
dhcp - invoke DHCP client to obtain IP/boot params
diskboot- boot from IDE device
echo - echo args to console
erase - erase FLASH memory
flinfo - print FLASH memory information
go - start application at address 'addr'
help - print online help
ide - IDE sub-system
iminfo - print header information for application image
loadb - load binary file over serial line (kermit mode)
loads - load S-Record file over serial line
loop - infinite loop on address range
md - memory display
mm - memory modify (auto-incrementing)
mtest - simple RAM test
mw - memory write (fill)
nm - memory modify (constant address)
printenv- print environment variables
protect - enable or disable FLASH write protection
rarpboot- boot image via network using RARP/TFTP protocol
reset - Perform RESET of the CPU
run - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv - set environment variables
sleep - delay execution for some time
tftpboot- boot image via network using TFTP protocol
and env variables ipaddr and serverip
version - print monitor version
? - alias for 'help'
=>
使用help 你可以得到更多的命令信息:
=> help tftpboot
tftpboot [loadAddress] [bootfilename]
=> help setenv printenv
setenv name value ...
- set environment variable 'name' to 'value ...'
setenv name
- delete environment variable 'name'
printenv
- print values of all environment variables
printenv name ...
- print value of environment variable 'name'
=>
大多数命令可以缩写,只要字符串的内容仍然可以被确定:
=> help fli tftp
flinfo
- print information for all FLASH memory banks
flinfo N
- print information for FLASH memory bank # N
tftpboot [loadAddress] [bootfilename]
=>
5.8 首次上电
注意:如果你购买的TQM8xxL板已经安装了U-Boot,你可以跳过这节,因为制造商已经完成这些步骤了。
把主机指定的串口和在TQM8xxL板上标有“COM.1(X.18)”的端口连接,运行终端程序,给TQM8xxL板接上电源。你可以看到如下信息:
Connecting to /dev/ttyS1, speed 115200.
The escape character is Ctrl-\ (ASCII 28, FS)
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------
PPCBoot 1.1.5 (Mar 21 2002 - 19:55:04)
CPU: XPC860xxZPnnD3 at 50 MHz: 16 kB I-Cache 8 kB D-Cache FEC present
Board: TQM860LDDBA3-P50.203
DRAM: 64 MB
FLASH: 8 MB
In: serial
Out: serial
Err: serial
PCMCIA: No Card found
Type "run flash_nfs" to mount root filesystem over NFS
Hit any key to stop autoboot: 0
=>
你可以按下任意键来中止倒计数。如果你不那么做,你可能会看到一些(无关紧要的)错误,因为系统没有初始化。
有时你可能会看到一种信息:
*** Warning - bad CRC, using default environment
这条信息没有害处,只要你初始化和保存环境变量之后,它就不会出现了。
首先,你必须输入你的开发板的序列号和网卡地址。需要特别注意的是,这些参数是写保护的,一旦保存了就无法改变(通常制造商已经设置好了)。使用U-Boot的setenv命令可以输入数据,命令后面跟上变量名和值,参数之间用空格(或者Tab符)隔开。例如,使用变量名serial#设置开发板的ID或者说序列号,变量名ethaddr用于设置以太网地址:
=> setenv serial# TQM860LDB0A3-P.200 10061684 4
=> setenv ethaddr 00:D0:93:00:05:B5
使用printenv确认你已经输入正确的值:
=> printenv serial# ethaddr
serial#=TQM860LDDBA3-P50.203 10226122 4
ethaddr=00:D0:93:00:28:81
=>
请仔细核查显示值是否正确!等保存之后你将不能更正任何错误。如果发现错误,请重新启动开发板。如果检查无误,你可以使用saveenv命令永久保存这些参数。
=> saveenv
Saving Enviroment to Flash...
Un-Protected 1 sectors
Erasing Flash...
. done
Erased 1 sectors
Writing to Flash... done
Protected 1 sectors
=>
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/60243/showart_471143.html |
|