From: myuboot@fastmail.fm
To: "Chris Dearman" <chris@mips.com>
Cc: "linux-mips" <linux-mips@linux-mips.org>
Subject: Re: problem bring up initramfs and busybox
Date: Tue, 17 Nov 2009 18:31:33 -0600 [thread overview]
Message-ID: <1258504293.3627.1345755107@webmail.messagingengine.com> (raw)
In-Reply-To: <4B031B78.5030204@mips.com>
On Tue, 17 Nov 2009 13:54 -0800, "Chris Dearman" <chris@mips.com> wrote:
> Kevin D. Kissell wrote:
> > This looks like another boot file system setup problem to me. Are you
> > sure that there's an executable init image at /mnt/root/sbin/init? I'm
> > pretty sure that the path that you provide to your new init has to be
> > relative to the new root.
>
> That sounds right.
>
> Andrew, my suggestion would be to change your initramfs /init script to
> invoke "/bin/busybox sh" as the last command instead of "exec
> switch_root". The "Kernel panic - not syncing: Attempted to kill init!"
> says that switch_root is exiting for some reason. It could be anything
> from missing files/devices on the /mnt/root file system to a bug in
> busy_box.
> By booting into the shell you can run the command by hand (maybe with
> strace if you have it) to help identify where the problem is.
>
> Chris
>
> --
> Chris Dearman Desk: +1 408 530 5092 Cell: +1 408 398 5531
> MIPS Technologies Inc 955 East Arques Ave, Sunnyvale CA 94085
Chris,
Thanks for your response. Now I changed my init file to the following -
#!/bin/busybox sh
mount -t proc proc /proc
mount -t sysfs sysfs /sys
mdev -s
/bin/busybox sh
The Kernel panic is gone but the shell still does not come up. Somehow
there is no printout on the screen. Below is the error info.
I have tried similar things previously. I also tried using a statically
linked hello world in the place of init script. But the result is
similar - no print out from either hello world or busybox.
[ 1.169000] TCP cubic registered
[ 1.173000] NET: Registered protocol family 17
[ 15.811000] Freeing unused kernel memory: 1032k freed
[ 33.978000] Algorithmics/MIPS FPU Emulator v1.5
And here is the trace on BDI -
gdb) c
Continuing.
Breakpoint 2, do_execve (filename=0x9780a000 "/init", argv=0x943dd2bc,
envp=0x943dd230, regs=0x97819e30)
at fs/exec.c:1293
1293 retval = unshare_files(&displaced);
(gdb) c
Continuing.
Breakpoint 2, do_execve (filename=0x9780a000 "/bin/busybox",
argv=0x4f73dc, envp=0x4f73ec, regs=0x97987f30)
at fs/exec.c:1293
1293 retval = unshare_files(&displaced);
(gdb) c
Continuing.
^C
Program received signal SIGSTOP, Stopped (signal).
r4k_wait () at arch/mips/kernel/genex.S:147
147 jr ra
Current language: auto; currently asm
Let me provide some history about what I am trying to do here in case it
is relevant to the issue. I have a MIPS32 board very similar to AR7.
Previously it has working toolchain/u-boot/kernel. I changed the board
from little endian to big endian mode and have been trying to upgrade
the toolchain/u-boot/kernel (gcc 4.4.1/u-boot2009.08/kernel 2.6.31). I
made some changes to the u-boot and kernel on console initialisation in
order to bring up the console. Up to the point, the kernel comes up
normally.
Since the time I start porting, I have been wondering if any change
related to exception needs to be done due to the endianess change. But
recently I found an AR7 patch for big endian mode(
https://lists.openwrt.org/pipermail/openwrt-devel/2009-May/004262.html)
and I did not see any change related to exception there. I hope the
issue is not something related to exception that messes up the
execution. Sorry if the above is a stupid question. I am trying to learn
embedded system. Your suggestion will be appreciated.
Thanks, Andrew
next prev parent reply other threads:[~2009-11-18 0:31 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1255735395.30097.1340523469@webmail.messagingengine.com>
2009-10-16 23:50 ` 2.6.31 kernel for mips compile failure - war.h:12:17: error: war.h: No such file or directory David Daney
2009-10-19 23:49 ` myuboot
2009-10-19 23:56 ` serial port 8250 messed up after coverting from little endian to big endian on kernel 2.6.31 myuboot
2009-10-20 6:17 ` Florian Fainelli
2009-10-20 15:52 ` myuboot
2009-10-27 20:40 ` myuboot
2009-10-28 8:35 ` Shmulik Ladkani
2009-10-28 11:04 ` Sergei Shtylyov
2009-10-28 19:36 ` myuboot
2009-10-29 8:26 ` Shmulik Ladkani
2009-11-02 23:54 ` myuboot
2009-12-04 1:52 ` PIR OFFSET for AR7 myuboot
2009-12-04 16:03 ` Thomas Bogendoerfer
2009-12-04 17:30 ` myuboot
2009-11-11 0:22 ` Kernel panic - not syncing: Attempted to kill init! myuboot
[not found] ` <4AFA6B7F.10404@walsimou.com>
2009-11-11 15:48 ` myuboot
2009-11-17 0:21 ` problem bring up initramfs and busybox myuboot
2009-11-17 9:33 ` Ralf Baechle
2009-11-17 17:39 ` myuboot
2009-11-17 17:48 ` Florian Fainelli
2009-11-17 21:09 ` myuboot
2009-11-17 21:02 ` Kevin D. Kissell
2009-11-17 21:54 ` Chris Dearman
2009-11-18 0:31 ` myuboot [this message]
2009-11-18 0:39 ` Florian Fainelli
2009-11-18 0:58 ` myuboot
2009-11-18 1:03 ` David VomLehn
2009-11-18 16:11 ` myuboot
2009-11-18 16:29 ` myuboot
2009-11-26 0:24 ` myuboot
2009-11-26 8:45 ` Florian Fainelli
2009-11-26 18:23 ` myuboot
2009-12-05 0:18 ` myuboot
2010-01-19 19:51 ` loadable kernel module link failure - endianness incompatible with that of the selected emulation myuboot
2010-01-19 23:47 ` David Daney
2010-01-20 16:10 ` myuboot
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=1258504293.3627.1345755107@webmail.messagingengine.com \
--to=myuboot@fastmail.fm \
--cc=chris@mips.com \
--cc=linux-mips@linux-mips.org \
/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;
as well as URLs for NNTP newsgroup(s).