Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Greg Lonnon <glonnon@ridgerun.com>
To: linux-mips@oss.sgi.com, linux-mips@fnet.fr
Subject: problems execve("/sbin/init",...)
Date: Thu, 28 Sep 2000 20:35:16 -0600	[thread overview]
Message-ID: <39D3FFE4.35E83599@ridgerun.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2026 bytes --]

Hi,

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_brk) 10004e04
(end_code) 4782a0
(start_code) 400000
(end_data) 10003dbc
(start_stack) 7fffff90
(brk) 10004e04
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: 
console=ttyS0,115200 root=/dev/nfs
nfsroot=192.168.1.12:/projects/mips/fs ip=192.168.1.211:192.168.1.1:::::

Also, My /dev/console is pointing to /dev/ttyS0 and it seems to be dead,
I can't printf() to stdout.

Thanks,
Greg
-- 
Greg Lonnon                     mailto:glonnon@ridgerun.com

[-- Attachment #2: Card for Greg Lonnon --]
[-- Type: text/x-vcard, Size: 359 bytes --]

begin:vcard 
n:Lonnon;Greg
tel;fax:208-331-2227
tel;home:208-323-1724
tel;work:208-331-2226 ext 18
x-mozilla-html:FALSE
url:www.ridgerun.com
org:RidgeRun, Inc
version:2.1
email;internet:glonnon@ridgerun.com
title:Senior Kernel Developer
adr;quoted-printable:;;200 N. 4th Street	=0D=0ASuite 101;Boise;ID;83702;USA
x-mozilla-cpt:;-7104
fn:Greg Lonnon
end:vcard

             reply	other threads:[~2000-09-29  2:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-29  2:35 Greg Lonnon [this message]
2000-09-29 16:26 ` problems execve("/sbin/init",...) Ralf Baechle
2000-09-29 23:05 ` Jun Sun
2000-09-30  0:25   ` Ralf Baechle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39D3FFE4.35E83599@ridgerun.com \
    --to=glonnon@ridgerun.com \
    --cc=linux-mips@fnet.fr \
    --cc=linux-mips@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox