Subject: HOWTO: load & mount ramdisk on EBSA-285

From: "Paul Robertson" <[email-masked]>
Date: Tue, 23 Nov 1999 11:23:15 -0000

Well, this is how I did it...

1. (In boot loader) copy the compressed kernel from FLASH to RAM at 0x8000

2. Copy the compressed ramdisk image to RAM at 0x800000

3. Set up the following kernel parameters in param_struct:
    root_dev = 0x0100
    root_flags = FLAG_RDLOAD
    initrd_start = 0xc0800000        /* NB virtual address */
    initrd_size = 2188926              /* size of compressed image in bytes */

4. Jump to 0x8000

This works, but it isn't very clever in the way it enough RAM for the compressed ramdisk is available at a fixed address and wont be overwritten by the initialising kernel.

I don't know how best to improve this. I'd like to add a routine to arch/arm/kernel/setup.c to copy the ramdisk image from FLASH to RAM if initrd_start is a FLASH address, but I don't know if that would be the right thing to do.

Suggestions?

Paul Robertson
LocSoft Limited
"The key to your embedded solutions"
www.locsoft.com
Phone +44 (0) 1793 432557 
Fax     +44 (0) 1793 432727

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Wed, 24 Nov 1999 09:59:17 +0000 (GMT)

Paul Robertson writes:
> This works, but it isn't very clever in the way it enough RAM for the
> compressed ramdisk is available at a fixed address and wont be
> overwritten by the initialising kernel.

If the initrd image is overwritten, then the kernel will flag it in the boot
messages.  Unfortunately, with 2.2 and older kernels this is the way it is on
all architectures.

The problem has been fixed in the 2.3 kernels with the advent of a "bootmem"
allocator, which is told regions that it must not allocate from, including
the initrd image.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.linux.org.uk/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |

unsubscribe: body of `unsubscribe linux-arm-kernel' to [email-masked]