From: Grant Edwards <grant.b.edwards@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [OT] How to get rootfs.cpio combined with a kernel?
Date: Sat, 28 Apr 2012 14:48:27 +0000 (UTC) [thread overview]
Message-ID: <jngvvq$m1a$1@dough.gmane.org> (raw)
In-Reply-To: 201204272212.07280.arnout@mind.be
On 2012-04-27, Arnout Vandecappelle <arnout@mind.be> wrote:
> On Monday 23 April 2012 18:24:20 Grant Edwards wrote:
>>[...]
>>
>> Any pointers to documentation on how one might combine a kernel object
>> and a rootfs cpio image to get a uImage file?
>
> Short answer: the kernel build system doesn't support it.
That's pretty much what I had concluded.
> Long answer: the initramfs is compiled into one of the many builtin.o
> files that are created all over the place. This is linked into vmlinux.
> See "Build vmlinux" in the top-level Makefile of the kernel.
>
> The good thing is that the command to build vmlinux is stored in
> .vmlinux.cmd, so you can use that to re-run the link - but you'd have
> to keep all the individual built-in.o files of course. The bad
> thing, however, is that this is not the end. You probably want to
> create a bzImage or similar, which is an additional,
> architecture-specific linking step.
>
> Conclusion: unless you're willing to spend a lot of effort on this,
> you're better off to either keep the compiled kernel tree for linking
> with the rootfs, or using a separate kernel and rootfs image.
I was reluctant to do that because I wanted to distribute them as a
single uImage and store them in a single flash partition. But...
> If you're using U-Boot, you can even combine them in one uImage.
That's something I hadn't discovered, and I think that is the right
answer: build the kernel and rootfs separately, and then combine them
into a single uImage for installation in flash in booting by U-Boot.
I'll study the U-Boot docs...
Thanks!
--
Grant
prev parent reply other threads:[~2012-04-28 14:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-23 16:24 [Buildroot] [OT] How to get rootfs.cpio combined with a kernel? Grant Edwards
2012-04-27 20:12 ` Arnout Vandecappelle
2012-04-28 14:48 ` Grant Edwards [this message]
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='jngvvq$m1a$1@dough.gmane.org' \
--to=grant.b.edwards@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox