From: Richard Wallman <richard@wallman.org.uk>
To: Linux-8086 <linux-8086@vger.kernel.org>
Subject: PATCH: Select root device
Date: Fri, 21 Jul 2006 11:10:04 +0100 [thread overview]
Message-ID: <44C0A7FC.6070100@wallman.org.uk> (raw)
Okay, for those with the luxury of having two floppy drives or a hard
disk, here's a patch that will let you select the root device during
kernel configuration.
Here's the output of 'cvs diff': (mind email client wrap)
Index: Documentation/Configure.help
===================================================================
RCS file: /cvsroot/elks/elks/Documentation/Configure.help,v
retrieving revision 1.40
diff -r1.40 Configure.help
588a589,610
> # Root device select
> # ~~~~~~~~~~~~~~~~~~
>
> Selecting the root filesystem device
> CONFIG_ROOTDEV_FD0
> Once the kernel has loaded, it will look for the root filesystem to
> boot the rest of the system (drivers, shells, etc.)
> You have the following options:
>
> /dev/fd0
> The first floppy drive. If the kernel has been loaded from that drive,
> the drive is empty, or the disk in the drive doesn't contain a MINIX
> filesystem, the kernel will wait and prompt you to insert a root disk.
>
> /dev/fd1
> Once the kernel has loaded, it will look for the root filesystem on
> the second floppy drive.
>
> /dev/bda1
> Once the kernel has loaded, it will look for the root filesystem on
> the first primary partition of the first hard disk.
>
Index: arch/i86/boot/bootsect.S
===================================================================
RCS file: /cvsroot/elks/elks/arch/i86/boot/bootsect.S,v
retrieving revision 1.4
diff -r1.4 bootsect.S
45c45
< ROOT_DEV = 0
---
> ! ROOT_DEV = 0
529c529
< .word ROOT_DEV
---
> .word ROOTDEV
Index: arch/i86/drivers/block/Config.in
===================================================================
RCS file: /cvsroot/elks/elks/arch/i86/drivers/block/Config.in,v
retrieving revision 1.10
diff -r1.10 Config.in
54a55,60
>
> comment 'Root location'
> choice 'is the root device' \
> "/dev/fd0 CONFIG_ROOTDEV_FD0 \
> /dev/fd1 CONFIG_ROOTDEV_FD1 \
> /dev/bda1 CONFIG_ROOTDEV_BDA1" /dev/fd0
Index: arch/i86/tools/build.c
===================================================================
RCS file: /cvsroot/elks/elks/arch/i86/tools/build.c,v
retrieving revision 1.9
diff -r1.9 build.c
147a148,151
> #if ROOTDEV
> major_root = ROOTDEV >> 8;
> minor_root = ROOTDEV & 0xff;
> #else
149a154
> #endif
151c156
< fprintf(stderr, "Root device is (%d, %d)\n", major_root, minor_root);
---
> fprintf(stderr, "Root device is (%d, %hhu)\n", major_root,
minor_root);
Index: include/linuxmt/config.h
===================================================================
RCS file: /cvsroot/elks/elks/include/linuxmt/config.h,v
retrieving revision 1.14
diff -r1.14 config.h
9a10,29
> #ifdef CONFIG_ROOTDEV_FD0
> #define ROOTDEV 0x0380
> #endif
>
> #ifdef CONFIG_ROOTDEV_FD1
> #define ROOTDEV 0x03c0
> #endif
>
> #ifdef CONFIG_ROOTDEV_RAM
> #define ROOTDEV 0x0100
> #endif
>
> #ifdef CONFIG_ROOTDEV_BDA1
> #define ROOTDEV 0x0301
> #endif
>
> #ifndef ROOTDEV
> #define ROOTDEV 0x0380
> #endif
>
17a38
> #ifndef CONFIG_ROOTDEV
--
Richard Wallman
reply other threads:[~2006-07-21 10:10 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=44C0A7FC.6070100@wallman.org.uk \
--to=richard@wallman.org.uk \
--cc=linux-8086@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox