All of lore.kernel.org
 help / color / mirror / Atom feed
From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [OT]Need help getting Linux past init
Date: Fri, 26 Mar 2010 15:56:52 +0100	[thread overview]
Message-ID: <m2hbo3f7wr.fsf@ohwell.denx.de> (raw)
In-Reply-To: <4BACA98F.1030506@gmail.com> (Graeme Russ's message of "Fri, 26 Mar 2010 23:33:19 +1100")

Hi Graeme,

> Hi All,
>
> I know this post is off topic - I you can point me to a better target
> audience (except LKML - they are somewhat reserved about requests for help
> ;) please let me know. That said, here goes...
>
> I now have U-Boot (x86 port) fully capable of booting a Linux kernel
> (2.6.33). I downloaded Buildroot and built a JFFS2 image and after a lot of
> mucking around, finally got U-Boot to ls it and the Linux Kernel to mount it.

Congratulations!

> My Linux kernel command line is:
>
> console=ttyS0,115200 noinitrd rw root=/dev/mtdblock0 rootfstype=jffs2
> init=/bin/sh
>
> I've added a few debug lines in Linux. The last lines of the boot process
> are as follows:
>
> [    1.340905] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
> [    1.343423] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
> [    1.345935] serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
> [    1.396891] brd: module loaded
> [    1.422898] loop: module loaded
> [    1.426898] Serck eNET flash device: 0x1000000 at 0x11000000
> [    1.436921] Serck eNET Flash Bank #0: Found 1 x16 devices at 0x0 in
> 16-bit bank
> [    1.438291]  Intel/Sharp Extended Query Table at 0x0031
> [    1.439291]  Intel/Sharp Extended Query Table at 0x0031
> [    1.440557] Using buffer write method
> [    1.441575] cfi_cmdset_0001: Erase suspend on write enabled
> [    1.449905] 8139too Fast Ethernet driver 0.9.28
> [    1.460851] eth0: RealTek RTL8139 at 0x2000, 00:40:f4:6e:67:ac, IRQ 10
> [    1.472862] eth1: RealTek RTL8139 at 0x2100, 00:40:f4:6e:67:ac, IRQ 9
> [    1.475904] rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0
> [    1.479905] rtc-test rtc-test.0: rtc core: registered test as rtc0
> [    1.482905] rtc-test rtc-test.1: rtc core: registered test as rtc1
> [    1.498879] TCP cubic registered
> [    1.505900] rtc-test rtc-test.0: setting system clock to 2010-03-24
> 02:12:31 UTC (1269396751)
> [    1.584915] VFS: Mounted root (jffs2 filesystem) on device 31:0.
> [    1.587000] Freeing unused kernel memory: 168k freed
> [    1.591853] Call mark_rodata_ro()
> [    1.595840] Write protecting the kernel text: 2660k
> [    1.598100] Write protecting the kernel read-only data: 772k
> [    1.598880] Set system_state = SYSTEM_RUNNING
> [    1.600505] Call numa_default_policy()
> [    1.601504] Opening /dev/console
> [    1.612898] Set current->signal->flags |= SIGNAL_UNKILLABLE
> [    1.614104] run_init_process(/bin/sh)
> [    1.615189] sys_execve()
> [    1.616189] do_execve()
> [    1.816894] execve succeeded
>
> So it looks like the kernel has no problem locating /bin/sh in the JFFS2
> partition but then the lights go out. I've also tried /bin/init - same result.

Hm.  Can you try the filesystem on another x86 platform with a working
kernel?  If I have problems like this, I usually try to boot into a
working filesystem, mount the filesystem in questino and try a chroot
into it.  Unfortunately this is not applicable for you.

You may try to link /bin/sh statically.  Maybe the dynamic linker has a
problem?

> I even tried changing /dev/console to be a symlink to /dev/ttyS0 but that
> didn't change a thing.
>
> I am _SO_ close to getting this going, and after all the work I have put
> into U-Boot to get this far, it is really frustrating.

As you have come this far, I don't see how you can be stopped ;)

Cheers
  Detlev

-- 
Old mathematicians never die; they just lose some of their functions.
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de

  parent reply	other threads:[~2010-03-26 14:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-26 12:33 [U-Boot] [OT]Need help getting Linux past init Graeme Russ
2010-03-26 14:24 ` Dennis Semakin
2010-03-26 14:56 ` Detlev Zundel [this message]
2010-03-26 16:55 ` Peter Tyser
2010-03-27 11:34   ` Graeme Russ

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=m2hbo3f7wr.fsf@ohwell.denx.de \
    --to=dzu@denx.de \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.