参考:CSDN huang_jinjin minicom的配置
1、安装minicom
hisilicon@ubuntu:~$ sudo apt install minicom
[sudo] password for hisilicon:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
lrzsz
The following NEW packages will be installed:
lrzsz minicom
0 upgraded, 2 newly installed, 0 to remove and 185 not upgraded.
Need to get 313 kB of archives.
After this operation, 1,471 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 minicom amd64 2.7.1-1 [239 kB]
Get:2 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 lrzsz amd64 0.12.21-10~build0.18.04.1 [74.8 kB]
Fetched 313 kB in 2s (173 kB/s)
Selecting previously unselected package lrzsz.
(Reading database ... 120707 files and directories currently installed.)
Preparing to unpack .../lrzsz_0.12.21-10~build0.18.04.1_amd64.deb ...
Unpacking lrzsz (0.12.21-10~build0.18.04.1) ...
Selecting previously unselected package minicom.
Preparing to unpack .../minicom_2.7.1-1_amd64.deb ...
Unpacking minicom (2.7.1-1) ...
Setting up minicom (2.7.1-1) ...
Setting up lrzsz (0.12.21-10~build0.18.04.1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
2、验证USB转串口线是否己有驱动
# 如果有usbserial,说明系统支持USB转串口
hisilicon@ubuntu:~$ lsmod | grep usbserial
usbserial 49152 1 ftdi_sio
# 插上USB转串口,确认ubuntu系统是否己识别该设备
hisilicon@ubuntu:~$ dmesg | grep ttyUSB0
[ 309.007290] usb 2-2.2: FTDI USB Serial Device converter now attached to ttyUSB0
[ 433.314450] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
hisilicon@ubuntu:~$ ll /dev | grep USB
crw-rw---- 1 root dialout 188, 0 May 29 10:43 ttyUSB0
3、配置minicom连接的端口
hisilicon@ubuntu:~$ sudo minicom -s
+-----[configuration]------+
| Filenames and paths |
| File transfer protocols |
| Serial port setup |
| Modem and dialing |
| Screen and keyboard |
| Save setup as dfl |
| Save setup as.. |
| Exit |
| Exit from Minicom |
+--------------------------+
# 选择 Serial port setup,选择修改A,并将串口设备修改为/dev/ttyUSB0,将硬件流控制改为NO,并根据实际需要修改波特率等参数,连海思使用默认115200 8N1。
# 如果不改硬件流控制设置,会出现Hit any key to stop autoboot时敲任意键没有反应,造成无法修改uboot配置
+-----------------------------------------------------------------------+
| A - Serial Device : /dev/ttyUSB0 |
| B - Lockfile Location : /var/lock |
| C - Callin Program : |
| D - Callout Program : |
| E - Bps/Par/Bits : 115200 8N1 |
| F - Hardware Flow Control : No |
| G - Software Flow Control : No |
| |
| Change which setting? |
+-----------------------------------------------------------------------+
# 修改完成后回车,选Save setup as dfl 保存
+-----[configuration]------+
| Filenames and paths |
| File transfer protocols |
| Serial port setup |
| Modem and dialing |
| Screen and keyboard |
| Save setup as dfl |
| Save setup as.. |
| Exit |
| Exit from Minicom |
+--------------------------+
4、启动minicom
hisilicon@ubuntu:~$ sudo minicom -w
Welcome to minicom 2.7.1
OPTIONS: I18n
Compiled on Aug 13 2017, 15:25:34.
Port /dev/ttyUSB0, 10:32:45
Press CTRL-A Z for help on special keys