[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [microblaze-uclinux] Ncurses on petalinux



I successfully tested an application and it runs well. I forget to mention that you have also to edit the following section in the make file in the ncurses directory to be like this:

 

romfs:

$(ROMFSINST) -e CONFIG_FMT_USE_FDPIC_ELF $(STAGEDIR)/usr/lib/libncurses.so.5 /lib/

mkdir -p $(ROMFSDIR)/usr/share/terminfo

tic -x -s -e $(NCURSES_TERMS) -o $(ROMFSDIR)/usr/share/terminfo/ $(VER)/misc/terminfo.src

$(ROMFSINST) -s tset /usr/bin/reset

set -e ; \

for x in $(NCURSES_DEMOS) ; do \

$(ROMFSINST) -e CONFIG_USER_NCURSES_TESTS build-$(VER)/test/$$x /bin/ncurses-demo-$$x ; \

 

I'm so happy I'm so glad.

--- On Sun, 7/13/08, Mostafa Ali <extra_brain@xxxxxxxxx> wrote:

From: Mostafa Ali <extra_brain@xxxxxxxxx>
Subject: Re: [microblaze-uclinux] Ncurses on petalinux
To: microblaze-uclinux@xxxxxxxxxxxxxx
Date: Sunday, July 13, 2008, 11:46 PM

I succesfuly added and compiled Ncurses within petalinux but testing is still missing. I'm not good in creating patch files but it is so easy to do it manually, if anyone can create the patch file and upload it that will be so nice of him.
Here are the steps I did:
1- download the blackfin dist.
2- cd to lib
3- copy ncurses into petalinux-dest/lib
4- add the folloing lines in the make file in the lib directory(lin93-94):

dir_3_$(CONFIG_LIB_NCURSES_FORCE)    += ncurses
dir_3_$(CONFIG_LIB_NCURSES)          += ncurses
 
5- add the following in the same file(line 140):
 
 $(ROOTDIR)/lib/ncurses/lib/*.a \
 
6- in the petalinux-dist add the following to the make file(line 45):
STAGEDIR = $(ROOTDIR)/staging
 
I don't know the use of the last directory (staging). After compilation it is created and all the Ncurses libs and bins are added to it. I think this directory should be replaced to be (ROMFS). If anyone knows the use of it please reply.
 
That's all folk.
Wait for testing


#include <ncurses.h>
#include <stdlib.h>

void bomb(int r);

int main(void)
{
initscr();
start_color();

 init_pair(1,COLOR_BLACK,COLOR_RED);
 init_pair(2,COLOR_BLUE,COLOR_BLACK);
 attrset(COLOR_PAIR(1));
 addstr("My name is Mr. Black!\n");
 attrset(COLOR_PAIR(2));
 addstr("My name is Mr. Blue!\n");
 attrset(COLOR_PAIR(1));
 addstr("How do you do?\n");
 attrset(COLOR_PAIR(2));
 addstr("How do I do ");
 attron(A_BOLD);
 addstr("what");
 attroff(A_BOLD);
 addch("?");
 refresh();
 getch();

 endwin();
 return 0;
 }