Target board: ARM (i.mx286)
Host: ubuntu-13.10
Cross compiler: ARM-NONE-LINUX-GNUEABI-GCC
Ncurses Version: 5.9
Original link: Http://blog.csdn.net/fulinus
Ncurses Library: http://ftp.gnu.org/pub/gnu/ncurses/
Extract:
[Email protected] ~]$ tar xzf ncurses-5.9.tar.gz
[Email protected] ~]$ CD ncurses-5.9/
Compile:
[Email protected] ncurses-5.9]$/configure--prefix= $PWD/install--host=arm-none-linux-gnueabi--build=i686-- With-shared
[[email protected] ncurses-5.9]$ make && make install
At this point, the install directory is generated under the ncurses-5.9 directory, which contains the Ncurses library and header files:
[[email protected] ncurses-5.9]$ ls Install
Bin include Lib man share
Test:
In the test directory, we are testing the file, and we are going to download one of the files named rain to run in the Development Board:
[Email protected] ~$./rain
Error opening terminal:vt102.
If the above error occurs, on the target board:
[Email protected] ~$ mkdir-p/usr/share/terminfo/v/
The VT100 and vt102 in the ncurses-5.9/install/share/terminfo/v/directory are downloaded to the/usr/share/terminfo/v/directory of the target board.
Set Environment parameters:
[Email protected] ~ $export term=vt100
[Email protected] ~ $export terminfo=/usr/share/terminfo
Rain can be seen when running rain again:
[Email protected] ~$./rain
If you want to have a color effect:
[Email protected] ~$ mkdir-p/usr/share/terminfo/l/
and download Linux from the ncurses-5.9/install/share/terminfo/l/directory to the/usr/share/terminfo/l/directory of the target board.
Set Environment parameters:
[Email protected] ~ $export Term=linux
[Email protected] ~ $export terminfo=/usr/share/terminfo
Running rain programs has a color effect.
To avoid setting the environment parameters for each restart, you can add them to the/etc/profile file in the target board:
Export Term=linux
Export terminfo=/usr/share/terminfo
Ncurses Library porting