If you thought uClibc was tricky to build correctly, you will have an even harder time with ncurses. Do it exactly as I tell you and it will work, at least for the current version of the software. Set the uClibc directory first in your path. Do this in a subshell, so you can return by leaving that shell.
bash export PATH=$MYBOOT/uclibc-dev:$PATH
Now configure and build ncurses:
./configure --with-build-cc=/usr/bin/gcc \ --host=i686-unknown-linux --without-cxx \ --prefix=/home/lennartb/myboot/uclibc-dev/ make make installIt builds a static library only. It sucks, but at the moment I don't know a better solution.
Next go to the dialog directory in order to build the dialog utility:
./configure make strip dialog mv dialog ../rootfs/usr/bin
Next comes the ugliest thing of all: ncurses expects its terminfo files in the $MYBOOT/uclibc-dev subdirectory, even on the target system! There are proper ways around that, I think, but for now we will simply create that directory within the target system.
mkdirhier $MYBOOT/rootfs$MYBOOT/uclibc-dev/share/terminfo/l cp $MYBOOT/uclibc-dev/share/terminfo/l/linux \ $MYBOOT/rootfs$MYBOOT/uclibc-dev/share/terminfo/lThe first command creates the directory under the rootfs directory and the second command copies the terminfo file into it. The linux file is the only one we need.
We are eager to test the whole thing. First become root and chroot into the rootfs environment.
/usr/sbin/chroot $MYBOOT/rootfs /bin/sh
Next type the following commands:
export TERM=linux dialog --msgbox "Hello, world" 5 20This looks much nicer if you try it on a text console.