扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
看看CFE模式下的命令:
Harbour> help
Available commands:
reset Reset the system.
set time Set current time
set console Change the active console device
e Modify contents of memory.
d Dump memory.
test sdram Test all available memory
test all Test cpld nvram flashand sdram
test cpld Test cpld
test nvram Test nvram
test flash Test flash block
test fatfs Do a FAT file system test, test fatfs device-name
test disk Do a disk test, test disk device-name
test timer Test the timer
test pci Test and display information about PCI buses and devices
boot Start a program depend on HSOS_IMAGE
go Start a previously loaded program.
load Load an executable file into memory without executing it
ping Ping a remote IP host.
ifconfig Configure the Ethernet interface
show time Display current time according to RTC
show devices Display information about the installed devices.
unsetenv Delete an environment variable.
printenv Display the environment variables
setenv Set an environment variable.
help Obtain help for BIOS commands
For more information about a command, enter 'help command-name'
*** command status = 0
几个重要的,
reset,重起系统
printenv,查看启动配置
setenv,设置启动参数
如果对命令不熟,可以用help命令来看格式:
Harbour> help load
SUMMARY
Load an executable file into memory without executing it
USAGE
load [-options] host:filename|dev:filename
This command loads an executable file into memory, but does not execute it.
OPTIONS
-raw sysinfo file
-z Load compessed file
*** command status = 0
上面是对load命令的帮助,大家可以知道这个命令可以装载一个HSOS,但是不会保存它,基本命令格式为load [-options] host:filename|dev:filename等等
既然HSOS文件已经损坏了,我们下载个新的吧,通过TFTP程序,命令格式如下,自己都会建立TFTP服务器吧?
在下载前,先看看设备的配置情况:
Harbour> printenv
Variable Name Value
-------------------- --------------------------------------------------
BOOT_CONSOLE uart0
NET_DEVICE eth3
NET_IPADDR 192.168.98.3
NET_NETMASK 255.255.255.0
NET_GATEWAY 0.0.0.0
NET_NAMESERVER 0.0.0.0
ETH0_HWADDR 00:05:3b:91:00:f8
ETH1_HWADDR 00:05:3b:91:00:f9
ETH2_HWADDR 00:05:3b:91:00:fa
ETH3_HWADDR 00:05:3b:91:00:fb
SERIAL_NO 01010288A11004B000033
PRODUCT_NAME SmartHammer M504
PRODUCT_DATE 2004-11-20
HSOS_CONFIG flash0:config
flash0 0x11000000
HSOS_REBOOT_TIMES 0
HSOS_IMAGE flash0:hsos.M504_1.3.1_0051.img
*** command status = 0
上面的显示大家很容易知道了 eth3已经有个地址了,为192.168.98.3,所以,大家就把网线接在eth3上,设置好自己TFTP服务器的地址,然后ping一下下:测试已经通了。
再下载HSOS程序:
Harbour> load -z 192.168.98.1:hsosM504.img
Loader:elf Filesys:tftp Dev:eth3 File:192.168.98.1:hsosM504.img Options:(null)
Loading......
Good. Loading finished!
*** command status = 0
Harbour>
上面的提示已经成功了;
下面就用这个HSOS启动了,注意它是装载在内存里的,没有保存在FLASH里,所以,不能重起,重起就会丢失HSOS的,我们用下面的命令启动:
Harbour> go
Closing network.
Starting program .....
SiByte BCM1125H A2 (SB1 rev 3)
Board type: SiByte SmartHammer
ge0: Link speed: 100BaseT FDX
ge1: Link speed: 1000BaseT FDX
Login: ge2: Link is Down
ge3: Link is Down
Login: admin
Password:
Password:
Harbour Networks Limited.
version M504_1.3.1_0041
Build 0041 at 六 4月 30 15:01:07 CST 2005.
SmartHammer> en
Password:
SmartHammer#
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。