The busybox ps command doesn't have the option to list the threads. So I am trying to cross compile procps and port ps onto the target board (OMAP L138 based eXp board running Davinci code base). But it fails during compilation. Here is the command I run and few lines from the compilation error.
procps-3.2.8# make CC=arm-none-linux-gnueabi-gcc CPPFLAGS= lib64=lib m64=
arm-none-linux-gnueabi-gcc -D_GNU_SOURCE -I proc -fno-common -ffast-math -W -Wall -Wshadow -Wcast-align -Wredundant-decls -Wbad-function-cast -Wcast-qual -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -O2 -s -c -o top.o top.c
top.c:28:20: error: curses.h: No such file or directory
top.c:38:18: error: term.h: No such file or directory
top.c:72: error: 'COLOR_RED' undeclared here (not in a function)
top.c:72: error: 'COLOR_YELLOW' undeclared here (not in a function)
top.c:72: error: 'COLOR_CYAN' undeclared here (not in a function)
top.c:72: error: 'COLOR_WHITE' undeclared here (not in a function)
top.c:72: error: 'COLOR_MAGENTA' undeclared here (not in a function)
top.c:72: error: 'COLOR_BLUE' undeclared here (not in a function)
top.c:72: error: 'COLOR_GREEN' undeclared here (not in a function)
top.c:72: warning: missing initializer
top.c:72: warning: (near initialization for 'Rc.win')
top.c: In function 'tg2':
top.c:316: warning: implicit declaration of function 'tgoto'
top.c:316: error: 'cursor_address' undeclared (first use in this function)
top.c:316: error: (Each undeclared identifier is reported only once
top.c:316: error: for each function it appears in.)
top.c:316: warning: pointer/integer type mismatch in conditional expression
Here it fails while building top. so was I even trying to modify the Makefile to remove other binaries and keep only ps. But I am surprised I didnt see any reference to ps in the list of binaries there. Cross compiling ps seemed a fairly common affir. But I couldn't find any post for this in any forum. May be there is an alternative to list threads in an embedded Linux environment. Even that would satisfy my requirement instead of cross compiling ps.