linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Can physical flash initramfs cpio address be given to bootm?
@ 2010-03-17 19:09 Brian Hutchinson
  2010-03-19 12:36 ` Russell King - ARM Linux
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Hutchinson @ 2010-03-17 19:09 UTC (permalink / raw)
  To: linux-arm-kernel

Can I use the physical flash address of a initramfs with the u-boot
bootm command?  The kernel doesn't appear to like it .... see below.

I'm currently loading my cpio initramfs into u-boot via tftp and then
providing the initrd= bootarg which works now that I've changed my
memory model to sparsemem (Thanks Russell!).

I've tried to wrap the cpio with mkimage both with -a 0x0 -e 0x0 and a
RAM address such as -a 0x4000000 -e 0x4000000 (the location I tftp the
initramfs to)

When I do a bootm 0x20080000 (physical flash location of kernel)
0x20280000 (mkimage of cpio.gz made with -T ramdisk) the physical
flash address of the initramfs gets passed to kernel via ATAGS and the
kernel doesn't like it:

INITRD: 0x20280040+0x00c8bdb6 extends beyond physical memory - disabling initrd

I thought I saw a patch that allowed initramfs to come from physical
media (flash) but it looks like I currently have to copy the initramfs
to ram right now and provide the initrd= which I would like to get
away from since I don't want to have to touch u-boot env vars every
time the cpio changes.

How do you all load a initramfs from flash???

Regards,

Brian

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

* Can physical flash initramfs cpio address be given to bootm?
  2010-03-17 19:09 Can physical flash initramfs cpio address be given to bootm? Brian Hutchinson
@ 2010-03-19 12:36 ` Russell King - ARM Linux
  2010-03-22  9:08   ` Uwe Kleine-König
  0 siblings, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux @ 2010-03-19 12:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 17, 2010 at 03:09:14PM -0400, Brian Hutchinson wrote:
> Can I use the physical flash address of a initramfs with the u-boot
> bootm command?  The kernel doesn't appear to like it .... see below.

bootm has nothing to do with the kernel, so I think you want to ask
this question on a different (uboot?) mailing list.

> When I do a bootm 0x20080000 (physical flash location of kernel)
> 0x20280000 (mkimage of cpio.gz made with -T ramdisk) the physical
> flash address of the initramfs gets passed to kernel via ATAGS and the
> kernel doesn't like it:
> 
> INITRD: 0x20280040+0x00c8bdb6 extends beyond physical memory - disabling initrd

The initrd image must be in RAM; there's no getting around this because
the kernel wants to convert addresses to struct page pointers and other
magical stuff like that which can only be done with RAM.

> How do you all load a initramfs from flash???

You have to copy it into RAM first.  I don't know how to tell uboot to
do that, I'm not a uboot expert.

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

* Can physical flash initramfs cpio address be given to bootm?
  2010-03-19 12:36 ` Russell King - ARM Linux
@ 2010-03-22  9:08   ` Uwe Kleine-König
  2010-03-22 17:54     ` Brian Hutchinson
  0 siblings, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2010-03-22  9:08 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

On Fri, Mar 19, 2010 at 12:36:16PM +0000, Russell King - ARM Linux wrote:
> On Wed, Mar 17, 2010 at 03:09:14PM -0400, Brian Hutchinson wrote:
> > Can I use the physical flash address of a initramfs with the u-boot
> > bootm command?  The kernel doesn't appear to like it .... see below.
> 
> bootm has nothing to do with the kernel, so I think you want to ask
> this question on a different (uboot?) mailing list.
> 
> > When I do a bootm 0x20080000 (physical flash location of kernel)
> > 0x20280000 (mkimage of cpio.gz made with -T ramdisk) the physical
> > flash address of the initramfs gets passed to kernel via ATAGS and the
> > kernel doesn't like it:
> > 
> > INITRD: 0x20280040+0x00c8bdb6 extends beyond physical memory - disabling initrd
> 
> The initrd image must be in RAM; there's no getting around this because
> the kernel wants to convert addresses to struct page pointers and other
> magical stuff like that which can only be done with RAM.
Is this a problem of the implementation or a techical one?  Some time
ago we hit the same problem and IIRC it was only that the memory was
allocated before unpacking and freed at the end.  If that's the only
issue than we can skip it if the initrd lives outside RAM!?
 
Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

* Can physical flash initramfs cpio address be given to bootm?
  2010-03-22  9:08   ` Uwe Kleine-König
@ 2010-03-22 17:54     ` Brian Hutchinson
  0 siblings, 0 replies; 4+ messages in thread
From: Brian Hutchinson @ 2010-03-22 17:54 UTC (permalink / raw)
  To: linux-arm-kernel

In my research it appears other ports allow this but patches have been
submitted to ARM kernel to keep from having to do a useless copy from
flash to RAM only to have the Kernel relocate the ramdisk yet again
... but the patches have not been accepted.

I can do it, it just appears like a wasted step that wastes time
booting a embedded system.

I'm currently investigating some of the patches that have been
submitted regarding this issue.

Regards,

Brian

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

end of thread, other threads:[~2010-03-22 17:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-17 19:09 Can physical flash initramfs cpio address be given to bootm? Brian Hutchinson
2010-03-19 12:36 ` Russell King - ARM Linux
2010-03-22  9:08   ` Uwe Kleine-König
2010-03-22 17:54     ` Brian Hutchinson

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