Page 1 of 1

Most basic POSIX commands

Posted: Fri May 04, 2012 9:53 pm
by justin
Right now I am working towards implementing the system calls at http://sourceware.org/newlib/libc.html#Syscalls so that I can port newlib. I wanted to put a question out to all those who have ported POSIX applications to their OS. After the prerequisites for newlib, what do you consider the next most important set of system calls for porting existing applications?

I ask this because I don't have much experience to know which are the most important commands. Obviously, threading is needed for threaded applications and networking for networking applications, but my question is really targeted at a more basic level than this.

Re: Most basic POSIX commands

Posted: Fri May 04, 2012 10:11 pm
by gerryg400
Start with the time functions. IIRC they only need gettimeofday() to be implemented by your kernel. Kernel side is easy and you get a visible result.

Re: Most basic POSIX commands

Posted: Fri May 04, 2012 11:43 pm
by piranha
My recommendation would be to build yourself a nice OS Specific Toolchain (on the wiki) to test out compiling programs with your library (if you haven't done so yet). Then try to port binutils. Binutils is easy to cross compile, it doesn't seem to require much past the basic newlib stuff (I don't remember exactly what it requires). And then start writing all the functions that it wants.

-JL