一 编译ncurses-5.7.tar.gz
minicom依赖ncurses,需先安装ncurses-5.7.tar.gz
下载:http://download.chinaunix.net/download/0008000/7242.shtml
编译:./configure --host=arm-uclibc-linux
make
lib库路径:ncurses-5.7/lib
二 编译minicom-2.1.tar.gz
下载:http://download.chinaunix.net/download/0007000/6764.shtml
编译:./configure --host=arm-uclibc-linux LDFLAGS=-L<绝对路径>/ncurses-5.7/lib --disable-nls
make
minicom路径:minicom-1.2/src
教训:版本匹配非常重要。
原先下载了minicom-2.4.tar.gz编译出现如下问题:
minicom.c:31:19: wchar.h: 没有那个文件或目录
minicom.c:32:20: wctype.h: 没有那个文件或目录
minicom.c:33:19: iconv.h: 没有那个文件或目录
三 运行minicom
配置参数
./minicom -s
提示:No termcap entry for vt100
mkdir /usr/share/terminfo/v
从PC机上复制/usr/share/terminfo/v/vt100 到机顶盒对应目录
+-----[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 - Serial Device : /dev/ttyS1 |
| B - Lockfile Location : /var/lock |
| C - Callin Program : |
| D - Callout Program : |
| E - Bps/Par/Bits : 38400 8N1 |
| F - Hardware Flow Control : Yes |
| G - Software Flow Control : No |
| |
| Change which setting? |
+-----------------------------------------------------------------------+