Skip to contentSkip to conversation

how to hardcode ramdisk parameters in kernel

DISCUSSION Abraham van der Merwe 2 participants 2 messages Jan 17, 2003

lore
Share & tools
lore
#0 lore raw

Hi!

Is there any way to hardcode the parameters in the kernel so that it loads the ramdisk at runtime correctly. For example:

kernel -> zImage.bin
ramdisk -> ramdisk.gz

Now I want to do

cat zImage.bin ramdisk.gz > boot.bin

and then I want to write initrd_start (size of zImage.bin) and initrd_end (initrd_start+size of ramdisk.gz) somewhere in the boot.bin binary and the kernel should know where to find the ramdisk in memory at boot time.

I'm using the simple boot loader for my platform. From the sandpoint platform code it seems that r4 and r5 is passed to the platform_init() function and that can be used to setup initrd_start and initrd_end correctly, but how do I set r4 and r5?

--

Regards
Abraham

QOTD:
"I ain't broke, but I'm badly bent."

___________________________________________________
Abraham vd Merwe [ZR1BBQ] - Frogfoot Networks P.O. Box 3472, Matieland, Stellenbosch, 7602
Cell: +27 82 565 4451 Http: http://www.frogfoot.net/
Email: [email protected]

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#1 lore raw
Quoted 6 lines · In message <[email protected]> you wrote:

cat zImage.bin ramdisk.gz > boot.bin

and then I want to write initrd_start (size of zImage.bin) and initrd_end (initrd_start+size of ramdisk.gz) somewhere in the boot.bin binary and the kernel should know where to find the ramdisk in memory at boot time.

make zImage.initrd

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] A man is not complete until he is married -- then he is finished.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/