需要下载安装两个文件ncurses和minicom:
root@linuxidc:/opt/arm-tools/ncurses-6.0# ./configure --host=arm-none-linux-gnueabi --prefix=/opt/arm-tools/ncurses-6.0/install-arm
root@linuxidc:/opt/arm-tools/ncurses-6.0# make
root@linuxidc:/opt/arm-tools/ncurses-6.0# make install
root@linuxidc:/opt/arm-tools/minicom-2.1# ./configure --host=arm-none-linux-gnueabi --prefix=/opt/arm-tools/minicom-2.1/install-arm CPPFLAG=-I/opt/arm-tools/ncurses-6.0/install-arm/include/ncures LDFLAGS=-L/opt/arm-tools/ncurses-6.0/install-arm/lib
注1:根据网上的参考方法,复制本机/usr/share/terminfo下的v目录老是出错。复制/lib/terminfo下的v目录,解决问题。
注2:编译出错“minicom.c: 156:13: error: conflicting types for ‘getline’”
这是因为minicom.c中的getline和系统中的库函数名冲突,所以将文件中所有的getline改为getlines,成功解决问题。
将本机/lib/terminfo下的v目录复制到ARM的/usr/share/terminfo下:
在/etc/profile里面添加:
export TERM=vt100
export TERMINFO=/usr/share/terminfo
source /etc/profile立即生效