2. 运行kermit后要对其配置才能下载内核,如:
set line /dev/ttyS0
set speed 115200
set carrier-watch off
set handshake none
set flow-control none
robust
set file type bin
set file name lit
set rec pack 1000
set send pack 1000
set window 5
使用以下命令:connect
就可以使用串口了,进入串口和minicom一样。
切换:按下Ctrl + \ ,再按c 就跳回kermit。跳回串口控制,可以输入c,即connect命令。
发送文件:
kermit中输入connect后,跳到u-boot串口界面。
输入loadb 0x0c008000 回车
按下 ctrl + \ ,再按c,切换到kermit。
输入命令:send /home/zImage
kermit开始传送数据了,并可以看到传送进度,发送完后,输入c,再回到u-boot界面,然后,再输入:go 0x0c008000
内核开始运行了
kermit在启动时会查找~/.kermrc文件,调用里面的命令来初始化kermit。只要将你所需的命令写到~/.kermrc文件里,启动后就不这么麻烦了。
# vi ~/.kermrc
set line /dev/ttyS0
set speed 115200
set carrier-watch off
set handshake none
set flow-control none
robust
set file type bin
set file name lit
set rec pack 1000
set send pack 1000
set window 5
c
保存后退出即可。然后启动kermit,你会看到:
# kermit
Connecting to /dev/ttyS0, speed 115200
Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
注:如果出现如下错误,执行chmod 777 /dev/ttyUSB0即可。
[skywalker@localhost ~]$ kermit
?SET SPEED has no effect without prior SET LINE
Sorry, you must SET LINE or SET HOST first
C-Kermit 8.0.211, 10 Apr 2004, for Linux
Copyright (C) 1985, 2004,
Trustees of Columbia University in the City of New York.
Type ? or HELP for help.
(/home/skywalker/) C-Kermit>