All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guillaume Dargaud <dargaud@lpsc.in2p3.fr>
To: buildroot@busybox.net
Subject: [Buildroot] Booting with ramdisk
Date: Fri, 8 Apr 2011 10:00:51 +0200	[thread overview]
Message-ID: <201104081000.52071.dargaud@lpsc.in2p3.fr> (raw)
In-Reply-To: <8739m8mfn0.fsf@macbook.be.48ers.dk>

On Sunday 27 March 2011 23:12:51 Peter Korsgaard wrote:
> >>>>> "Guillaume" == Guillaume Dargaud <dargaud@lpsc.in2p3.fr> writes:
> Hi,
> 
>  Guillaume> Now I want to embed that OS in the kernel (no need for a
>  Guillaume> network anymore as the kernel is on a flash mem). So I did
>  Guillaume> the following: - add ROOTFS CPIO to the buildroot options
>  Guillaume> and make a new version - point CONFIG_INITRAMFS_SOURCE to
>  Guillaume> the resulting rootfs.cpio file
> 
> That sounds correct. If you build your kernel in buildroot we even have
> initramfs option that handles it all, but the above should afaik work
> as well.
> 
>  Guillaume> - change the kernel parameters to "console=ttyUL0,115200
> root=/dev/ram" (that's in a dts file)
> 
> That shouldn't be needed.

OK, I've tried with the same kernel params, only adding
CONFIG_INITRAMFS_SOURCE="/home/dargaud/Devel/buildroot-2010.11/output/images/rootfs.cpio"
And it won't run just the same.

>  Guillaume> The kernel stops instantly without even a blip on the
>  Guillaume> console. A debugger reveals that it stops at 0x401718... I
>  Guillaume> have no idea what's going on at this stage.
> 
> Strange. What architecture/system is this? How much did the (compressed)
> kernel grow? Perhaps it's too big / you'll need to load it higher. For
> most archs, the kernel want to decompress into address 0, so if you load
> it too low, you might end up overwriting the compressed kernel as you're
> decompressing it.
> 
> Perhaps you could add some debugging prints to the bootloader handover /
> kernel decompression?

The original kernel elf file is 1.4 Mb and it grows to 2.5 Mb with the ramdisk, which seems about right considering the 
compression.
It's a PowerPC architecture and the kernel gets loaded at 0x400000
I don't know how to change the loading address or how to look at the uncompressed size in memory, how can I see if this 
is the right track ?
-- 
Guillaume Dargaud
http://www.gdargaud.net/

  reply	other threads:[~2011-04-08  8:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-21 14:46 [Buildroot] Booting with ramdisk Guillaume Dargaud
2011-03-27 21:12 ` Peter Korsgaard
2011-04-08  8:00   ` Guillaume Dargaud [this message]
2011-04-14  9:04   ` Guillaume Dargaud

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=201104081000.52071.dargaud@lpsc.in2p3.fr \
    --to=dargaud@lpsc.in2p3.fr \
    --cc=buildroot@busybox.net \
    /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.