world leader in high performance signal processing
Trace: » ncurses

Run ncurses application on blackfin

It is fairly easy to get ncurses application run on your target system. This next section will help guide you through the process of compile ncurses library and run some ncurses applications in your target system. But if you want to know more about ncurses,I recommend you to browse the offical website http://www.gnu.org/software/ncurses/.

Step by Step Instructions

  • First you want to make sure you have the latest sources from CVS for the toolchain and the kernel. For more information on this please refer to the CVS Quickstart.
  • Next you must build and install the toolchain. If you are unsure on how to do this please see buildscript.
  • After the toolchain has finished building you must add the toolchain to your PATH. Please refer to Setting the PATH Environment for more details.
  • Next cd into the freshly downloaded kernel directory, uClinux-dist.
user@linux:~/checkouts/kernel/uClinux-dist> cd where/you/put/uClinux-dist
  • Now enter the command:
user@linux:~/checkouts/kernel/uClinux-dist> make clean
  • Next enter the following command to configure your kernel:
user@linux:~/checkouts/kernel/uClinux-dist> make menuconfig
  • In the make menuconfig menu select the Kernel/Library/Defaults Selection
  • Here check off the boxes:
(x) Customize Kernel Settings
(x) Customize Vendor/User Settings
  • Then select Exit and Save

You may be asked to input some parameters during the make menuconfig or make procedures. If you are asked during these processes for any information simply hit enter to use the default values.

  • Under the Library Configuration menu check off the following options:
 [*] Build ncurses                                                                                
 
  • Now you can modify the INSTALL_TERMINFO_TYPE variable in the lib/ncurses/Makefile to add some terminfo types.Note, seperated by corma
INSTALL_TERMINFO_TYPE= linux,vt100
  • When you get back to the command line. Issue a make to create the kernel image.
user@linux:~/checkouts/kernel/uClinux-dist>  make
  • After the make finishes, you can use the compiled ncurses library in uClinux-dist to compile your ncurses applications.

ensure that the include files are pointing to ./uClinux-dist/lib/ncurses/include and libs have the ./uClinux-dist/lib/ncurses in the path.Or you will encounter some compilation problems.

  • copy the linux image to your tftp directory. (For more information setting up a tftp server please see setting_up_a_tftp_server.)
user@linux:~/checkouts/kernel/uClinux-dist> cp ./images/linux /tftpboot/linux
  • Tftp the file to your target and boot the kernel using U-Boot. (For more information on using U-Boot please see u-boot.)
stamp> tftp 0x1000000 linux
stamp> bootelf
  • Once the kernel has booted, you can upload your ncurses application image to blackfin board. Then you should export two variable as the following:
export TERM=linux
export TERMINFO=/usr/share/terminfo

make sure that there exists some terminfo file under /usr/share/terminfo directory. For example,”linux” type terminfo should be placed in /usr/share/terminfo/l/ directory.

  • Then you can run your ncurses application.