IMX6移植htop

top命令查看CPU利用率并不是很方便,因此打算移植htop到imx6上,主要包括以下几个步骤:

- 资源下载

htop 下载http://hisham.hm/htop/releases/1.0.1/htop-1.0.1.tar.gz

ncurses 下载http://ftp.gnu.org/gnu/ncurses/ncurses-5.9.tar.gz

- 编译

首先需要编译libncurses
./configure --prefix=/home/vincent/resouces/nc   --without-cxx --without-cxx-binding --without-ada --without-manpages --without-progs --without-tests --with-shared --host=arm-none-linux-gnueabi
make -j16
make install

之后编译htop
./configure --prefix=/home/vincent/resouces/ht --disable-unicode  --host=arm-none-linux-gnueabi LDFLAGS=-L/home/vincent/resouces/nc/lib/ CPPFLAGS="-I/home/vincent/resouces/nc/include/ncurses -I/home/vincent/resouces/nc/include/"
make -j16
make install

htop在configure的时候报错,所以头文件目录设置了两个

- 移植

将ncurses库以及htop命令复制到板子上,设置PATH和LD_LIBRARY_PATH

- 问题

执行htop遇到 vt102 打不开
解决:
查看TERM和TERMINFO环境变量是否设置,如果没有,执行:
export TERM=vt102
export TERMINFO=/usr/share/terminfo
posted @ 2017-11-16 10:41  tla001  阅读(406)  评论(0编辑  收藏  举报
个人网站 www.tla001.cn