From: Rob Landley <rob@landley.net>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: linux-embedded@vger.kernel.org
Subject: Re: selecting initramfs support without initrd?
Date: Mon, 30 Jun 2008 23:46:38 -0500 [thread overview]
Message-ID: <200806302346.38954.rob@landley.net> (raw)
In-Reply-To: <alpine.LFD.1.10.0806241805390.5000@localhost.localdomain>
On Tuesday 24 June 2008 17:11:01 Robert P. J. Day wrote:
> i'm not sure if this is the proper forum for this, but while
> perusing the early boot code, i noticed that selecting the config
> variable BLK_DEV_INITRD gives you support for both initramfs, and an
> initrd image.
It gives you support for an _external_ initramfs. (I.E. the bootloader can
load an external blob into memory and feed the physical address into the
kernel via the ramdisk_start=12345 command line option. If this blob gunzips
to a cpio image, it's extracted into rootfs. If it gunzips to a recognized
filesystem type, it's used as an initrd.)
The one built into the kernel is always used and can't be disabled, that I am
aware of. If you have files in the static cpio archive and files in an
internally supplied cpio archive, the file in the external one replaces the
corresponding file in the internal one.
> based on a quick inspection of the source under init/, it would seem
> that you could whack out sizable chunks of code if you had no need for
> initrd, but i could be wrong.
If you disable BLK_DEV_INITRD you'll still have a cpio image built into your
kernel:
make allnoconfig
make -j 3
It's possible that inclusion of the external image loading logic should be
based on a symbol other than BLK_DEV_INITRD, since initramfs can use that
logic when you never use a ram disk block device. It's a question of
untangling stuff and figuring out how much config granularity you want...
Rob
--
"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson.
prev parent reply other threads:[~2008-07-01 4:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-24 22:11 selecting initramfs support without initrd? Robert P. J. Day
2008-06-26 9:40 ` Leon Woestenberg
2008-07-01 4:46 ` Rob Landley [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=200806302346.38954.rob@landley.net \
--to=rob@landley.net \
--cc=linux-embedded@vger.kernel.org \
--cc=rpjday@crashcourse.ca \
/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).