linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* initramfs too large?
@ 2008-09-10  0:50 Dave Littell
  2008-09-10  6:36 ` Marco Stornelli
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Littell @ 2008-09-10  0:50 UTC (permalink / raw)
  To: linuxppc-embedded

Hi all,

I believe my initramfs has grown beyond some limit, but I'm at a loss to
know how to correct it.  We recognized that we would have to allow a
larger initramfs than the defaults provided, so I modified the following
(on a 2.6.18 kernel):

1. .../arch/powerpc/boot/wrapper: A "-Ttext=0x1000000" was added to the
ld args.

2. .../arch/powerpc/boot/zImage.lds.S: The ALIGN() directive was changed
 to use 16 instead of 4.

I thought I was finished and everything seemed to be working well with
an initramfs CPIO archive size of approx. 9 MB.  However, we just had
another size increase (to a CPIO archive size of approx. 12 MB) and now
I'm rewarded with this at boot:

## Booting image at 08000000 ...
   Image Name:   Linux-2.6.18_pro500-440epx_eval
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    7113720 Bytes =  6.8 MB
   Load Address: 01000000
   Entry Point:  01000410
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
CPU clock-frequency <- 0x27bc86ae (667MHz)
CPU timebase-frequency <- 0x27bc86ae (667MHz)
/plb: clock-frequency <- 9ef21ab (167MHz)
/plb/opb: clock-frequency <- 4f790d5 (83MHz)
/plb/opb/ebc: clock-frequency <- 34fb5e3 (56MHz)
/plb/opb/serial@ef600300: clock-frequency <- a8c000 (11MHz)
/plb/opb/serial@ef600400: clock-frequency <- a8c000 (11MHz)
/plb/opb/serial@ef600500: clock-frequency <- a8c000 (11MHz)
/plb/opb/serial@ef600600: clock-frequency <- a8c000 (11MHz)
Memory <- <0x0 0x0 0x10000000> (256MB)
ENET0: local-mac-address <- 00:80:3f:0d:80:0d
ENET1: local-mac-address <- 79:60:04:ea:d9:a1

zImage starting: loaded at 0x01000000 (sp: 0x0ff182e8)
Allocating 0x904dc0 bytes for kernel ...
gunzipping (0x00000000 <- 0x0100d000:0x01912c90)...done 0x8de100 bytes

Linux/PowerPC load: console=ttyS0,115200 console=ttyMTD3
Finalizing device tree... flat tree at 0x191f3a0

Here it sits, forever.  I poked around a bit with the JTAG and found (in
one instance) that probe_machine() (from setup_common.c) was taking a
DataTLBError exception because it appears the machine descriptors are
scrubbed to 0.  I added some debug code to setup_common.c, but on the
next attempted boot the JTAG showed that DataTLBError exceptions in
identify_cpu() (cputable.c).

If I reduce the size of initramfs back to it's original size the system
runs just fine.  So, I'm guessing the larger initramfs is somehow
stomping on something, but have no idea how to proceed to resolve this.


Thanks very much,
Dave

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: initramfs too large?
  2008-09-10  0:50 initramfs too large? Dave Littell
@ 2008-09-10  6:36 ` Marco Stornelli
  2008-09-10 12:20   ` Dave Littell
  0 siblings, 1 reply; 5+ messages in thread
From: Marco Stornelli @ 2008-09-10  6:36 UTC (permalink / raw)
  To: Dave Littell; +Cc: linuxppc-embedded

Hi Dave,

if I well understood you've done a "manual" operation very ugly. You can 
adjust the default settings in the kernel menu under device 
drivers/block devices and set the number of ramdisk device and the 
default size. You can use even the kernel command line option 
"ramdisk_size" to tell to the kernel the size of the ramdisk size you 
are using.

Regards.


Dave Littell ha scritto:
> Hi all,
>
> I believe my initramfs has grown beyond some limit, but I'm at a loss to
> know how to correct it.  We recognized that we would have to allow a
> larger initramfs than the defaults provided, so I modified the following
> (on a 2.6.18 kernel):
>
> 1. .../arch/powerpc/boot/wrapper: A "-Ttext=0x1000000" was added to the
> ld args.
>
> 2. .../arch/powerpc/boot/zImage.lds.S: The ALIGN() directive was changed
>  to use 16 instead of 4.
>
> I thought I was finished and everything seemed to be working well with
> an initramfs CPIO archive size of approx. 9 MB.  However, we just had
> another size increase (to a CPIO archive size of approx. 12 MB) and now
> I'm rewarded with this at boot:
>
> ## Booting image at 08000000 ...
>    Image Name:   Linux-2.6.18_pro500-440epx_eval
>    Image Type:   PowerPC Linux Kernel Image (gzip compressed)
>    Data Size:    7113720 Bytes =  6.8 MB
>    Load Address: 01000000
>    Entry Point:  01000410
>    Verifying Checksum ... OK
>    Uncompressing Kernel Image ... OK
> CPU clock-frequency <- 0x27bc86ae (667MHz)
> CPU timebase-frequency <- 0x27bc86ae (667MHz)
> /plb: clock-frequency <- 9ef21ab (167MHz)
> /plb/opb: clock-frequency <- 4f790d5 (83MHz)
> /plb/opb/ebc: clock-frequency <- 34fb5e3 (56MHz)
> /plb/opb/serial@ef600300: clock-frequency <- a8c000 (11MHz)
> /plb/opb/serial@ef600400: clock-frequency <- a8c000 (11MHz)
> /plb/opb/serial@ef600500: clock-frequency <- a8c000 (11MHz)
> /plb/opb/serial@ef600600: clock-frequency <- a8c000 (11MHz)
> Memory <- <0x0 0x0 0x10000000> (256MB)
> ENET0: local-mac-address <- 00:80:3f:0d:80:0d
> ENET1: local-mac-address <- 79:60:04:ea:d9:a1
>
> zImage starting: loaded at 0x01000000 (sp: 0x0ff182e8)
> Allocating 0x904dc0 bytes for kernel ...
> gunzipping (0x00000000 <- 0x0100d000:0x01912c90)...done 0x8de100 bytes
>
> Linux/PowerPC load: console=ttyS0,115200 console=ttyMTD3
> Finalizing device tree... flat tree at 0x191f3a0
>
> Here it sits, forever.  I poked around a bit with the JTAG and found (in
> one instance) that probe_machine() (from setup_common.c) was taking a
> DataTLBError exception because it appears the machine descriptors are
> scrubbed to 0.  I added some debug code to setup_common.c, but on the
> next attempted boot the JTAG showed that DataTLBError exceptions in
> identify_cpu() (cputable.c).
>
> If I reduce the size of initramfs back to it's original size the system
> runs just fine.  So, I'm guessing the larger initramfs is somehow
> stomping on something, but have no idea how to proceed to resolve this.
>
>
> Thanks very much,
> Dave
>
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
>   

-- 
Marco Stornelli
Embedded Software Engineer
CoRiTeL - Consorzio di Ricerca sulle Telecomunicazioni
http://www.coritel.it

marco.stornelli@coritel.it
+39 06 72582838

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: initramfs too large?
  2008-09-10  6:36 ` Marco Stornelli
@ 2008-09-10 12:20   ` Dave Littell
  2008-09-10 13:35     ` Marco Stornelli
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Littell @ 2008-09-10 12:20 UTC (permalink / raw)
  To: linuxppc-embedded

Marco Stornelli wrote:
> Hi Dave,
> 
> if I well understood you've done a "manual" operation very ugly. You can
> adjust the default settings in the kernel menu under device
> drivers/block devices and set the number of ramdisk device and the
> default size. You can use even the kernel command line option
> "ramdisk_size" to tell to the kernel the size of the ramdisk size you
> are using.
> 
> Regards.
> 

Hi Marco,

Thanks for the reply.  I believe the ramdisk settings are OK, but I'll
post them later to confirm.  I did try changing those settings, but that
didn't help.

Is the kernel command-line option "ramdisk_size" or "ramdisk-size" for
2.6.18?


Thanks,
Dave


> 
> Dave Littell ha scritto:
>> Hi all,
>>
>> I believe my initramfs has grown beyond some limit, but I'm at a loss to
>> know how to correct it.  We recognized that we would have to allow a
>> larger initramfs than the defaults provided, so I modified the following
>> (on a 2.6.18 kernel):
>>
>> 1. .../arch/powerpc/boot/wrapper: A "-Ttext=0x1000000" was added to the
>> ld args.
>>
>> 2. .../arch/powerpc/boot/zImage.lds.S: The ALIGN() directive was changed
>>  to use 16 instead of 4.
>>
>> I thought I was finished and everything seemed to be working well with
>> an initramfs CPIO archive size of approx. 9 MB.  However, we just had
>> another size increase (to a CPIO archive size of approx. 12 MB) and now
>> I'm rewarded with this at boot:
>>
>> ## Booting image at 08000000 ...
>>    Image Name:   Linux-2.6.18_pro500-440epx_eval
>>    Image Type:   PowerPC Linux Kernel Image (gzip compressed)
>>    Data Size:    7113720 Bytes =  6.8 MB
>>    Load Address: 01000000
>>    Entry Point:  01000410
>>    Verifying Checksum ... OK
>>    Uncompressing Kernel Image ... OK
>> CPU clock-frequency <- 0x27bc86ae (667MHz)
>> CPU timebase-frequency <- 0x27bc86ae (667MHz)
>> /plb: clock-frequency <- 9ef21ab (167MHz)
>> /plb/opb: clock-frequency <- 4f790d5 (83MHz)
>> /plb/opb/ebc: clock-frequency <- 34fb5e3 (56MHz)
>> /plb/opb/serial@ef600300: clock-frequency <- a8c000 (11MHz)
>> /plb/opb/serial@ef600400: clock-frequency <- a8c000 (11MHz)
>> /plb/opb/serial@ef600500: clock-frequency <- a8c000 (11MHz)
>> /plb/opb/serial@ef600600: clock-frequency <- a8c000 (11MHz)
>> Memory <- <0x0 0x0 0x10000000> (256MB)
>> ENET0: local-mac-address <- 00:80:3f:0d:80:0d
>> ENET1: local-mac-address <- 79:60:04:ea:d9:a1
>>
>> zImage starting: loaded at 0x01000000 (sp: 0x0ff182e8)
>> Allocating 0x904dc0 bytes for kernel ...
>> gunzipping (0x00000000 <- 0x0100d000:0x01912c90)...done 0x8de100 bytes
>>
>> Linux/PowerPC load: console=ttyS0,115200 console=ttyMTD3
>> Finalizing device tree... flat tree at 0x191f3a0
>>
>> Here it sits, forever.  I poked around a bit with the JTAG and found (in
>> one instance) that probe_machine() (from setup_common.c) was taking a
>> DataTLBError exception because it appears the machine descriptors are
>> scrubbed to 0.  I added some debug code to setup_common.c, but on the
>> next attempted boot the JTAG showed that DataTLBError exceptions in
>> identify_cpu() (cputable.c).
>>
>> If I reduce the size of initramfs back to it's original size the system
>> runs just fine.  So, I'm guessing the larger initramfs is somehow
>> stomping on something, but have no idea how to proceed to resolve this.
>>
>>
>> Thanks very much,
>> Dave
>>
>>
>> _______________________________________________
>> Linuxppc-embedded mailing list
>> Linuxppc-embedded@ozlabs.org
>> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>>
>>   
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: initramfs too large?
  2008-09-10 12:20   ` Dave Littell
@ 2008-09-10 13:35     ` Marco Stornelli
  2008-09-11  1:49       ` Dave Littell
  0 siblings, 1 reply; 5+ messages in thread
From: Marco Stornelli @ 2008-09-10 13:35 UTC (permalink / raw)
  To: Dave Littell; +Cc: linuxppc-embedded

Hi Dave,

no if well remeber for 2.6.18 it's "ramdisk_size" (before this option 
had a name slightly different) but you can check it out in the kernel 
documentation (in the documentation folder of your kernel). Another 
thing: you should check out that the kernel, the initram disk and the 
dtb are loaded in ram from your bootloader without overlapping, maybe 
you've changed the dimensions and something is overlapped.

Regards.

Dave Littell ha scritto:
> Marco Stornelli wrote:
>   
>> Hi Dave,
>>
>> if I well understood you've done a "manual" operation very ugly. You can
>> adjust the default settings in the kernel menu under device
>> drivers/block devices and set the number of ramdisk device and the
>> default size. You can use even the kernel command line option
>> "ramdisk_size" to tell to the kernel the size of the ramdisk size you
>> are using.
>>
>> Regards.
>>
>>     
>
> Hi Marco,
>
> Thanks for the reply.  I believe the ramdisk settings are OK, but I'll
> post them later to confirm.  I did try changing those settings, but that
> didn't help.
>
> Is the kernel command-line option "ramdisk_size" or "ramdisk-size" for
> 2.6.18?
>
>
> Thanks,
> Dave
>
>
>   
>> Dave Littell ha scritto:
>>     
>>> Hi all,
>>>
>>> I believe my initramfs has grown beyond some limit, but I'm at a loss to
>>> know how to correct it.  We recognized that we would have to allow a
>>> larger initramfs than the defaults provided, so I modified the following
>>> (on a 2.6.18 kernel):
>>>
>>> 1. .../arch/powerpc/boot/wrapper: A "-Ttext=0x1000000" was added to the
>>> ld args.
>>>
>>> 2. .../arch/powerpc/boot/zImage.lds.S: The ALIGN() directive was changed
>>>  to use 16 instead of 4.
>>>
>>> I thought I was finished and everything seemed to be working well with
>>> an initramfs CPIO archive size of approx. 9 MB.  However, we just had
>>> another size increase (to a CPIO archive size of approx. 12 MB) and now
>>> I'm rewarded with this at boot:
>>>
>>> ## Booting image at 08000000 ...
>>>    Image Name:   Linux-2.6.18_pro500-440epx_eval
>>>    Image Type:   PowerPC Linux Kernel Image (gzip compressed)
>>>    Data Size:    7113720 Bytes =  6.8 MB
>>>    Load Address: 01000000
>>>    Entry Point:  01000410
>>>    Verifying Checksum ... OK
>>>    Uncompressing Kernel Image ... OK
>>> CPU clock-frequency <- 0x27bc86ae (667MHz)
>>> CPU timebase-frequency <- 0x27bc86ae (667MHz)
>>> /plb: clock-frequency <- 9ef21ab (167MHz)
>>> /plb/opb: clock-frequency <- 4f790d5 (83MHz)
>>> /plb/opb/ebc: clock-frequency <- 34fb5e3 (56MHz)
>>> /plb/opb/serial@ef600300: clock-frequency <- a8c000 (11MHz)
>>> /plb/opb/serial@ef600400: clock-frequency <- a8c000 (11MHz)
>>> /plb/opb/serial@ef600500: clock-frequency <- a8c000 (11MHz)
>>> /plb/opb/serial@ef600600: clock-frequency <- a8c000 (11MHz)
>>> Memory <- <0x0 0x0 0x10000000> (256MB)
>>> ENET0: local-mac-address <- 00:80:3f:0d:80:0d
>>> ENET1: local-mac-address <- 79:60:04:ea:d9:a1
>>>
>>> zImage starting: loaded at 0x01000000 (sp: 0x0ff182e8)
>>> Allocating 0x904dc0 bytes for kernel ...
>>> gunzipping (0x00000000 <- 0x0100d000:0x01912c90)...done 0x8de100 bytes
>>>
>>> Linux/PowerPC load: console=ttyS0,115200 console=ttyMTD3
>>> Finalizing device tree... flat tree at 0x191f3a0
>>>
>>> Here it sits, forever.  I poked around a bit with the JTAG and found (in
>>> one instance) that probe_machine() (from setup_common.c) was taking a
>>> DataTLBError exception because it appears the machine descriptors are
>>> scrubbed to 0.  I added some debug code to setup_common.c, but on the
>>> next attempted boot the JTAG showed that DataTLBError exceptions in
>>> identify_cpu() (cputable.c).
>>>
>>> If I reduce the size of initramfs back to it's original size the system
>>> runs just fine.  So, I'm guessing the larger initramfs is somehow
>>> stomping on something, but have no idea how to proceed to resolve this.
>>>
>>>
>>> Thanks very much,
>>> Dave
>>>
>>>
>>> _______________________________________________
>>> Linuxppc-embedded mailing list
>>> Linuxppc-embedded@ozlabs.org
>>> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>>>
>>>   
>>>       
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
>   

-- 
Marco Stornelli
Embedded Software Engineer
CoRiTeL - Consorzio di Ricerca sulle Telecomunicazioni
http://www.coritel.it

marco.stornelli@coritel.it
+39 06 72582838

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: initramfs too large?
  2008-09-10 13:35     ` Marco Stornelli
@ 2008-09-11  1:49       ` Dave Littell
  0 siblings, 0 replies; 5+ messages in thread
From: Dave Littell @ 2008-09-11  1:49 UTC (permalink / raw)
  To: linuxppc-embedded

Marco Stornelli wrote:
> Hi Dave,
> 
> no if well remeber for 2.6.18 it's "ramdisk_size" (before this option
> had a name slightly different) but you can check it out in the kernel
> documentation (in the documentation folder of your kernel). Another
> thing: you should check out that the kernel, the initram disk and the
> dtb are loaded in ram from your bootloader without overlapping, maybe
> you've changed the dimensions and something is overlapped.
> 

Everything is included in one zImage, so where things are placed in
memory is all a function of the linker, wrapper, and gunzip, right?  I
did try a "ramdisk_size" command-line argument and saw no change in
behavior.

I noticed today that with the smaller initramfs the kernel is smaller
than 8 MB (_end < 0xc0800000), but with the larger initramfs all the
symbols following the end marker for initramfs are beyond 8 MB.  Is this
a clue?

Using the JTAG I stopped at early_init() and looked at the
__machine_desc_start area.  I noticed that when booting with the smaller
initramfs there's (apparently) good information in there but with the
larger initramfs the area is mostly filled with 0xff's.  I'm now
wondering if there's some relationship between this 8 MB boundary and
possibly some problem in the zImage wrapper, the wrapper's gunzip, or
something in that area.

So, is 8 MB some magic number for the PowerPC kernel?


Thanks,
Dave

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-09-11  1:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-10  0:50 initramfs too large? Dave Littell
2008-09-10  6:36 ` Marco Stornelli
2008-09-10 12:20   ` Dave Littell
2008-09-10 13:35     ` Marco Stornelli
2008-09-11  1:49       ` Dave Littell

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).