* initramfs on PowerPC
@ 2007-05-04 12:32 Richard Danter
2007-05-04 19:02 ` David H. Lynch Jr.
0 siblings, 1 reply; 3+ messages in thread
From: Richard Danter @ 2007-05-04 12:32 UTC (permalink / raw)
To: linuxppc-embedded
Hi all,
I am having a problem booting a kernel with an initramfs. The kernel version
is 2.6.14. The target is a ppc 82xx board.
I have tried both generating the cpio.gz file myself (find . | copi -o -H
newc | gzip > ../initramfs_data.cpio.gz) and pointing initramfs source to a
root FS directory (using xconfig) and then re-building my kernel.
Usually the error is "junk in compressed archive" though I also see an
occasional error about padding.
I am using U-Boot to load the kernel image (uImage).
My host is SuSE 10.0 (x86), though I guess that shouldn't make any difference
(endianism?).
Any thoughts on what I may be doing wrong?
Thanks
Rich
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: initramfs on PowerPC
2007-05-04 12:32 initramfs on PowerPC Richard Danter
@ 2007-05-04 19:02 ` David H. Lynch Jr.
2007-05-08 12:41 ` Richard Danter
0 siblings, 1 reply; 3+ messages in thread
From: David H. Lynch Jr. @ 2007-05-04 19:02 UTC (permalink / raw)
To: Richard Danter; +Cc: linuxppc-embedded
I tried numerous approaches, I never got anything to work except pointing
CONFIG_INITRAMFS_SOURCE at a directory with my intramfs tree in it.
I am sure other ways work, but I never managed to figure out what I was
doing
wrong. Regardless that has worked well for me.
When I build I end up with a single file - zImage,.elf that has both my
kernel
and the initramfs tree in it. While there are a number of distro's that
seem to
use initramfs as a separate file - much like initrd, my loader has no
provisions for a 2nd file, and the kernel build process wraps everything
together
which works fine for me.
I have never seen your "junk in compressed archive" error, and I have
been doing this
for almost 2 years. But I have frequently had decompression errors.
These typically
have been the result of errors in the PPC zlib libraries. I beleive
somewhere between
2.6.16 and 2.6.18 these libraries got updated, and the PPC version of
the new ones
had problems. Anyway, after 2.6.18 the new ones are good - though somehow
once in a while the broken ones seem to creep into my development tree,
but updating it usually fixes things.
There also may be a total size issue. I am hazy on the details, but I
beleive if the
size of size of the kernel goes over 3mb that there are CONFIG values that
may need to be changed. I am not sure whether that is compressed size
decompressed size, kernel size, or combined kernel + initramfs size.
Regardless, one suguestion would be to try with a very minimal initramfs
tree
and add things until it blows up.
Richard Danter wrote:
> Hi all,
>
> I am having a problem booting a kernel with an initramfs. The kernel version
> is 2.6.14. The target is a ppc 82xx board.
>
> I have tried both generating the cpio.gz file myself (find . | copi -o -H
> newc | gzip > ../initramfs_data.cpio.gz) and pointing initramfs source to a
> root FS directory (using xconfig) and then re-building my kernel.
>
> Usually the error is "junk in compressed archive" though I also see an
> occasional error about padding.
>
> I am using U-Boot to load the kernel image (uImage).
>
> My host is SuSE 10.0 (x86), though I guess that shouldn't make any difference
> (endianism?).
>
> Any thoughts on what I may be doing wrong?
>
> Thanks
> Rich
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: initramfs on PowerPC
2007-05-04 19:02 ` David H. Lynch Jr.
@ 2007-05-08 12:41 ` Richard Danter
0 siblings, 0 replies; 3+ messages in thread
From: Richard Danter @ 2007-05-08 12:41 UTC (permalink / raw)
To: linuxppc-embedded
Hi David,
I did as you suggested, made a very small initramfs, and it worked!
All it contained was a simple "hello world" file plus a /dev/console node.
I then tried to increase the size of this small fs by adding a file (dd
if=/dev/urandom of=bigfatfile bs=1M count=1) but this then gives a CRC error
when I try to boot.
I have also tried increasing the default ramdisk size to 16MB but that makes
no difference.
Are there any limitrations to the size of the initramfs or on the contents of
this fs?
Any other suggestions?
Thanks!
Rich
On Friday 04 May 2007 20:02, David H. Lynch Jr. wrote:
> I tried numerous approaches, I never got anything to work except pointing
> CONFIG_INITRAMFS_SOURCE at a directory with my intramfs tree in it.
> I am sure other ways work, but I never managed to figure out what I was
> doing
> wrong. Regardless that has worked well for me.
>
> When I build I end up with a single file - zImage,.elf that has both my
> kernel
> and the initramfs tree in it. While there are a number of distro's that
> seem to
> use initramfs as a separate file - much like initrd, my loader has no
> provisions for a 2nd file, and the kernel build process wraps everything
> together
> which works fine for me.
>
> I have never seen your "junk in compressed archive" error, and I have
> been doing this
> for almost 2 years. But I have frequently had decompression errors.
> These typically
> have been the result of errors in the PPC zlib libraries. I beleive
> somewhere between
> 2.6.16 and 2.6.18 these libraries got updated, and the PPC version of
> the new ones
> had problems. Anyway, after 2.6.18 the new ones are good - though somehow
> once in a while the broken ones seem to creep into my development tree,
> but updating it usually fixes things.
>
> There also may be a total size issue. I am hazy on the details, but I
> beleive if the
> size of size of the kernel goes over 3mb that there are CONFIG values that
> may need to be changed. I am not sure whether that is compressed size
> decompressed size, kernel size, or combined kernel + initramfs size.
>
> Regardless, one suguestion would be to try with a very minimal initramfs
> tree
> and add things until it blows up.
>
> Richard Danter wrote:
> > Hi all,
> >
> > I am having a problem booting a kernel with an initramfs. The kernel
> > version is 2.6.14. The target is a ppc 82xx board.
> >
> > I have tried both generating the cpio.gz file myself (find . | copi -o -H
> > newc | gzip > ../initramfs_data.cpio.gz) and pointing initramfs source to
> > a root FS directory (using xconfig) and then re-building my kernel.
> >
> > Usually the error is "junk in compressed archive" though I also see an
> > occasional error about padding.
> >
> > I am using U-Boot to load the kernel image (uImage).
> >
> > My host is SuSE 10.0 (x86), though I guess that shouldn't make any
> > difference (endianism?).
> >
> > Any thoughts on what I may be doing wrong?
> >
> > Thanks
> > Rich
> > _______________________________________________
> > Linuxppc-embedded mailing list
> > Linuxppc-embedded@ozlabs.org
> > https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-05-08 12:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-04 12:32 initramfs on PowerPC Richard Danter
2007-05-04 19:02 ` David H. Lynch Jr.
2007-05-08 12:41 ` Richard Danter
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).