Mailing List Archive

initramfs help
I'm trying to create a initramfs for the Marvell OpenRD-client as Raúl
Porcel did for the SheevaPlug in his acclaimed tome:
http://dev.gentoo.org/~armin76/arm/sheevaplug/install.xml

I've created a topic "Help with initramfs for Marvell OpenRD-Client LE"
in the forum, http://forums.gentoo.org/viewtopic-p-6511131.html#6511131,
outlining what I have done and the failure I have met with:

tftpboot 0x8000000 initramfs
...
## Loading Ramdisk Image at 08000000 ...
Bad Magic Number

My question that could be readily answered is: when preparing the
initramfs for a staged tree at /usr/src/initramfs, is the command

cd /usr/src/initramfs/
find . -print0 | cpio --null -ov --format=newc | gzip -9 > [outputfile]

I'm wondering if the file should be in gzip format or something else?

Also, I read at the deprecated http://www.gentoo.org/doc/en/genkernel.xml
that:

Additionally, you should enable SquashFS because most modern Gentoo
Installation CDs require it.

Does this apply to a kernel for the ARM processor such as Raul did?

It would be really educational to learn what the steps are for creating
an initramfs.

--

John Laurence Poole
P.O. Box 6566
Napa CA 94581-6566
707-812-1323 office
Re: initramfs help [ In reply to ]
John L. Poole wrote:
> It would be really educational to learn what the steps are for
> creating an initramfs.

See here:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/filesystems/ramfs-rootfs-initramfs.txt


//Peter
Re: initramfs help [ In reply to ]
On Thursday, December 09, 2010 18:51:39 John L. Poole wrote:
> I've created a topic "Help with initramfs for Marvell OpenRD-Client LE"
> in the forum, http://forums.gentoo.org/viewtopic-p-6511131.html#6511131,
> outlining what I have done and the failure I have met with:
>
> tftpboot 0x8000000 initramfs
> ...
> ## Loading Ramdisk Image at 08000000 ...
> Bad Magic Number

initramfs is not a ramdisk. that is an initrd.

> My question that could be readily answered is: when preparing the
> initramfs for a staged tree at /usr/src/initramfs, is the command
>
> cd /usr/src/initramfs/
> find . -print0 | cpio --null -ov --format=newc | gzip -9 > [outputfile]

why dont you just build it into the kernel ? set CONFIG_INITRAMFS_SOURCE to
the path of your rootfs and let the kernel worry about making one.

otherwise, the only sane way is to use the scripts/gen_initramfs_lists.sh and
usr/gen_init_cpio helper utils in the kernel. mucking about yourself with
find/cpio/gzip is plain crazy.
-mike