top命令查看CPU利用率并非很方便,所以打算移植htop到imx6上,主要包括如下几个步骤:linux
首先须要编译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