All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Kreiner <martin@boich.de>
To: linux-kernel@vger.kernel.org
Subject: RAM disk image with offset after kernel
Date: Tue, 17 Sep 2002 15:03:02 +0200	[thread overview]
Message-ID: <3D872806.8050907@boich.de> (raw)

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


                 reply	other threads:[~2002-09-17 14:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D872806.8050907@boich.de \
    --to=martin@boich.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.