移植ncurses libncurses.so & libncursesw.so

准备工作

ncurses-6.0.tar.gz

配置&编译&安装

1. 解压

tar zxvf ncurses-6.0.tar.gz

2. 配置

注意

  1. < targe-dir > 按实际安装路径填写
  2. –enable-widec 这个选项如果再移植alsa-utils时很重要,必填!
    但是minicom只认libncurses.so所以不能带这个选项!
### cross-compile to ncurses (libncurses.so.6.0) 
./configure --host=arm-linux-gnueabihf \
--prefix=<install-dir>/arm_ncurses \
--target=arm-linux-gnueabihf \
--with-shared \
--without-profile \
--disable-stripping \
--without-progs \
--with-manpages \
--without-tests 
### cross-compile to ncursesw (libncursesw.so.6.0) 
./configure --host=arm-linux-gnueabihf \
--prefix=<install-dir>/arm_ncurses_w \
--target=arm-linux-gnueabihf \
--with-shared \
--without-profile \
--disable-stripping \
--without-progs \
--with-manpages \
--without-tests \
--enable-widec

3. 编译&安装

make
make install

4. 目标环境配置

在目标机器目录 /etc/profile 下追加以下代码

# file path: /etc/profile

#! /bin/sh
LD_LIBRARY_PATH=/lib:/usr/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

5. 拷贝文件至开发板

//cd arm_ncurses
mkdir -p ~/nfs/rootfs/usr/share
cp -arf lib/*          ~/nfs/rootfs/usr/lib
cp -arf share/*        ~/nfs/rootfs/usr/share

//cd arm_ncurses_w
cp -arf lib/*          ~/nfs/rootfs/usr/lib
cp -arf share/*        ~/nfs/rootfs/usr/share

X. 常见错误

Error opening terminal vt100

没有在 etc/profile 指定TERM的环境变量,在该文件下追加以下语句

export TERM=vt100
export TERMINFO=/usr/share/terminfo

configure 一些说明

常见的一些配置
--prefix= #安装路径
--host= #运行环境, 交叉编译链前缀
--target= #交叉编译链前缀
--enable-widec #开启wide-char/UTF-8
--with-shared #生成共享库
--with-manpages #应该是添加一些man指令可以看的帮助页面
--without-tests #禁止测试,不需要测试,测试会比较久?
--without-profile #分析使用的一些特性吧?
--disable-stripping #关闭压缩,因为在交叉编译程序上使用主机工具可能会引发错误
--without-progs #禁止程序安装?
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值