I am trying to port linux-2.2.14/MIPS to a new board containing a QED
R5271 MIPS processor. I am having problems with execve("/sbin/init,...)
in init/main.c. The "/sbin/init" is not being called by the kernel. I
am nfs root mounting the "simple" filesystem during the kernel boot, and
the network and nfs mount seem to be working (I have read and printk'ed
/etc/rc at the end of main.c::init()).
Things I have tried to debug with:
1) Have written a small tcp/ip server to accept a socket connection,
have execve this instead of "/sbin/init". The server will not accept
connections. Thus, I believe it's not running.
2) Have statically linked the server and have instrumented binfmt_elf.c
and fs/exec.c with debug. The loader seems be working correctly, and
arch/mips/kernel/process.c::start_thread(...) is called with the
corrected pc and sp. The pc is the entry point in the elf file and the
sp is 0x7ffff90.
Some printk debug from binfmt_elf.c:
start theard pc 400140 sp 7fffff90
3) Have been trying to get printk support into system calls by rewriting
read_write.c::sys_write (and friends) to do a printk() at the start of
the call. I have written a statically linked program that calls
write(0,"here",4). This didn't result in printk output. I would
suspect that the program is not being correctly execve.
So, my questions are:
1) Does anyone have a good way to debug in this small window going
between kernel mode and user mode for the first time?
2) Is there anything else I could try to prove out that the kernel is
going into user mode?
3) Has anyone else had these issues?
My command_line is:
Also, My /dev/console is pointing to /dev/ttyS0 and it seems to be dead,
I can't printf() to stdout.
Greg Lonnon mailto:firstname.lastname@example.org
Description: Card for Greg Lonnon