I have to port NewLib to a new OS, and it's something completly new for me. I am following this tutorial: http://wiki.osdev.org/Porting_Newlib
And I have few (noob) questions:
1) First I have to complete the system calls in libgloss. For example I have done this:
Code: Select all
#include "glue.h"
#include "include.c" // I have the cpu_syscall function in it, write in assembler
int _DEFUN (close, (fd), int fd)
{
register int retval;
retval = (int)cpu_syscall((void*)fd,NULL,NULL,NULL,__CLOSE);
return retval;
}
2) If my OS doesn't have fork(), I don't have to modify the forck.c in libgloss, right?
3) Once I have finished all the libgloss system calls, I have to compil NewLib. So I do:
It work, but I can't find the .a that should have been created...mkdir build-newlib
cd build-newlib
newlib/configure --prefix=/home/Thonaud/CrossCompiler/ --target=mipsel-uknown-elf
make all install
4) Then I will have to do the crt0.
5) And finally I will have to test NewLib. So I will create a simple main.c file. How I am supposed to compile it with newlib?
Thanks for your help!
PS: sorry for my english...