linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <florian@openwrt.org>
To: myuboot@fastmail.fm
Cc: "Ralf Baechle" <ralf@linux-mips.org>,
	linux-kernel@vger.kernel.org,
	"linux-mips" <linux-mips@linux-mips.org>
Subject: Re: problem bring up initramfs and busybox
Date: Tue, 17 Nov 2009 18:48:43 +0100	[thread overview]
Message-ID: <200911171848.44137.florian@openwrt.org> (raw)
In-Reply-To: <1258479580.17116.1345691629@webmail.messagingengine.com>

Hi,

On Tuesday 17 November 2009 18:39:40 myuboot@fastmail.fm wrote:
> On Tue, 17 Nov 2009 10:33 +0100, "Ralf Baechle" <ralf@linux-mips.org>
> 
> wrote:
> > On Mon, Nov 16, 2009 at 06:21:21PM -0600, myuboot@fastmail.fm wrote:
> > > I have been struggling to bring up a MIPS 32 board with busybox with or
> > > without initramfs.
> > > The kernel stucks there without the shell coming up.
> > >
> > > [    1.153000] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
> > > [    1.161000] ip_tables: (C) 2000-2006 Netfilter Core Team
> > > [    1.167000] TCP cubic registered
> > > [    1.170000] NET: Registered protocol family 17
> > > [   25.971000] Freeing unused kernel memory: 1032k freed
> > > [   39.969000] Algorithmics/MIPS FPU Emulator v1.5
> > >
> > >
> > > What I tried here is to use initramfs with statically linked busybox.
> > > The initramfs seems to be up, and runs the commands in the /init one by
> > > one, and then it goes to a inifite loop in r4k_wait at
> > > arch/mips/kernel/genex.S.
> >
> > r4k_wait is called by the idle loop.  Which means the kernel has no
> > process
> > to run so runs the idle loop.  This might be because there is no other
> > process left running or because all processes are waiting for I/O for
> > example.  So it's not uncommon that even busy systems ocasionally briefly
> > run the idle loop.  In other words, seeing the processor executing
> > r4k_wait does not necessarily mean something went wrong.  In this case -
> > also along with the other information you've provieded it's not obvious
> > what has gone wrong.
> >
> >   Ralf
> 
> According to an email from Kevin, I added a symbolic link from
> switch_root to busybox. The switch_root seems to be found now based on
> the execution sequence, but I got the following error - "Kernel panic -
> not syncing: Attempted to kill init!". This is the same error when I
> tried to start the shell without initramfs. Something must be wrong, but
> I can't quite figure out.
> 
> [    9.250000] Freeing unused kernel memory: 1032k freed
> [   10.463000] Algorithmics/MIPS FPU Emulator v1.5
> [   41.695000] Kernel panic - not syncing: Attempted to kill init!
> [   41.701000] Rebooting in 3 seconds.
> 
> Thanks for your help. Andrew
> 
> (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 "/sbin/switch_root",
> argv=0x4f7450, envp=0x4f7464, regs=0x97819f30)
>     at fs/exec.c:1293
> 1293            retval = unshare_files(&displaced);
> (gdb) c
> Continuing.

If you happen to use uClibc and gcc-4.4.0 or superior, make sure that you have 
that patch applied to uClibc: http://www.mail-
archive.com/uclibc@uclibc.org/msg04483.html
--
WBR, Florian

  reply	other threads:[~2009-11-17 17:50 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 [this message]
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
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=200911171848.44137.florian@openwrt.org \
    --to=florian@openwrt.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=myuboot@fastmail.fm \
    --cc=ralf@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).