From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Subject: Re: Trouble with embedding initial root fs into the kernel
Date: Tue, 16 Mar 2010 12:04:54 +0000 [thread overview]
Message-ID: <aec7e5c31003160504y1827f417y5962549fc3a569a5@mail.gmail.com> (raw)
In-Reply-To: <201003161222.05067.fabio.giovagnini@aurion-tech.com>
[-- Attachment #1: Type: text/plain, Size: 1412 bytes --]
On Tue, Mar 16, 2010 at 8:32 PM, Magnus Damm <magnus.damm@gmail.com> wrote:
> On Tue, Mar 16, 2010 at 8:22 PM, Fabio Giovagnini
> <fabio.giovagnini@aurion-tech.com> wrote:
>> Hi All,
>> I'd like to know a link where to find info about step by spet procedure to
>> embedding the initial root fs into the kernel
>
> Which processor? I can email you a binary initramfs for sh4a if you
> are interested.
Ok, as for a step-by-step of what I do, see below:
1. Start off with a small initramfs that contains /dev/console
already. I got the attached file from the kernel quite some time ago.
2. Put your files for the initramfs in the directory "tmp", then run
the following:
$ cp initramfs_data-base.cpio initramfs_data.cpio
$ cd tmp && ( find . | cpio -o -H newc --force-local -A -F
"../initramfs_data.cpio" )
3. Modify your kernel configuration to point our your initramfs_data.cpio file:
CONFIG_INITRAMFS_SOURCE="/path/to/your/stuff/initramfs_data.cpio"
4. Make sure you include a script that creates device nodes for you,
or use udev or mdev.
5. I think /init is the first file that gets executed. I usually point
it to /sbin/init from busybox.
6. Start by using statically linked binaries to make it easy.
7. You can always try getting initramfs working with the sh4a binary
on the r2d board in QEMU.
Hope this helps. It's also possible to point out the directory instead
of using an cpio file.
/ magnus
[-- Attachment #2: initramfs_data-base.cpio --]
[-- Type: application/x-cpio, Size: 512 bytes --]
next prev parent reply other threads:[~2010-03-16 12:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-16 11:22 Trouble with embedding initial root fs into the kernel Fabio Giovagnini
2010-03-16 11:32 ` Magnus Damm
2010-03-16 12:04 ` Magnus Damm [this message]
2010-03-16 12:11 ` Fabio Giovagnini
2010-03-16 12:28 ` Fabio Giovagnini
2010-03-16 12:29 ` Magnus Damm
2010-03-16 12:35 ` Fabio Giovagnini
2010-03-16 12:41 ` Magnus Damm
2010-03-18 21:05 ` Fabio Giovagnini
2010-03-18 21:07 ` Fabio Giovagnini
2010-03-19 4:58 ` Magnus Damm
2010-03-19 5:23 ` Fabio Giovagnini
2010-03-19 5:44 ` Magnus Damm
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=aec7e5c31003160504y1827f417y5962549fc3a569a5@mail.gmail.com \
--to=magnus.damm@gmail.com \
--cc=linux-sh@vger.kernel.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).