All of lore.kernel.org
 help / color / mirror / Atom feed
* RAM disk image with offset after kernel
@ 2002-09-17 13:03 Martin Kreiner
  0 siblings, 0 replies; only message in thread
From: Martin Kreiner @ 2002-09-17 13:03 UTC (permalink / raw)
  To: linux-kernel

hi,

i'am currently working on a thin-client solution for IBM's 2x00.
with modified bios they are able to load an uncompressed kernel. i would 
like to append a RAM disk image as described in 
../Documentation/ramdisk.txt but rdev can't handle this magic any more?:

---snip
./arch/i386/kernel/setup.c:#define RAMDISK_IMAGE_START_MASK     0x07FF
./arch/i386/kernel/setup.c:#define RAMDISK_PROMPT_FLAG          0x8000
./arch/i386/kernel/setup.c:#define RAMDISK_LOAD_FLAG            0x4000

...

The usage of the word (two bytes) that "rdev -r" sets in the kernel image
has changed. The low 11 bits (0 -> 10) specify an offset (in 1 k blocks)
of up to 2 MB (2^11) of where to find the RAM disk (this used to be the
size). Bit 14 indicates that a RAM disk is to be loaded, and bit 15
indicates whether a prompt/wait sequence is to be given before trying
to read the RAM disk.

...

Use "rdev" to set the boot device, RAM disk offset, prompt flag, etc.
For prompt_ramdisk=1, load_ramdisk=1, ramdisk_start=400, one would
have 2^15 + 2^14 + 400 = 49552.

        rdev /dev/fd0 /dev/fd0
        rdev -r /dev/fd0 49552
--snap

so i tried :

dd if=my_ramdisk_image of=vmlinux bs=1k seek=my_kernel_size+some_space

and changed in ../arch/i386/kernel/setup.c:

-    char c = ' ', *to = command_line, *from = COMMAND_LINE
+    char c = ' ', *to = command_line, *from = strcat(COMMAND_LINE , " 
ramdisk_start=my_kernel_size+some_space");

but in ../init/do_mount.c:

if (ext2sb->s_magic == cpu_to_le16(EXT2_SUPER_MAGIC)

failed, so at boot i get:

RAMDISK: Couldn't find valid RAM disk image starting at 
my_kernel_size+some_space

what's wrong? Superblock?


TIA,

martin kreiner


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-09-17 14:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-17 13:03 RAM disk image with offset after kernel Martin Kreiner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.