tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: overriding RAIDframe disks as root disks with multiboot
On Sat, Oct 31, 2009 at 08:36:14PM +0100, Klaus Heinz wrote:
> Hi,
>
> I would like to use the "root" option of the "multiboot" command in
> boot.cfg in order to specify which RAIDframe disk should be used as the
> root disk.
>
> Unfortunately this does not work at the moment on NetBSD 5 and
> NetBSD-current. If the kernel config file does not specify the root disk
> at compile time, RAIDframe always takes precedence over everything else.
>
> The appended patch changes this behaviour so that RAIDframe respects
> the multiboot command line.
>
> Is my patch machine-independant, ie can I expect <machine/bootinfo.h>
> and "lookup_bootinfo(BTINFO_ROOTDEVICE)" to be available on all platforms?
> I am not sure whether this file, function and macro is considered part of
> the MI/MD interface; section 9 of the man pages does not mention the
> term "bootinfo".
>
> ciao
> Klaus
>
> Index: rf_netbsdkintf.c
> ===================================================================
> RCS file: /cvsroot/src/sys/dev/raidframe/rf_netbsdkintf.c,v
> retrieving revision 1.250.4.4
> diff -u -r1.250.4.4 rf_netbsdkintf.c
> --- rf_netbsdkintf.c 4 Apr 2009 17:15:14 -0000 1.250.4.4
> +++ rf_netbsdkintf.c 31 Oct 2009 14:47:05 -0000
> @@ -163,6 +163,8 @@
>
> #include <prop/proplib.h>
>
> +#include <machine/bootinfo.h>
> +
> #include <dev/raidframe/raidframevar.h>
> #include <dev/raidframe/raidframeio.h>
> #include "raid.h"
> @@ -487,7 +489,7 @@
> /* if the user has specified what the root device should be
> then we don't touch booted_device or boothowto... */
>
> - if (rootspec != NULL)
> + if ((rootspec != NULL) || (lookup_bootinfo(BTINFO_ROOTDEVICE) != NULL))
> return;
IMO, the code from if (rootspec != NULL) to the end of
rf_buildroothack() should be deleted. Let the MD findroot() code
choose, as it does for every other type of disk. What am I missing?
Dave
--
David Young OJC Technologies
dyoung%ojctech.com@localhost Urbana, IL * (217) 278-3933
Home |
Main Index |
Thread Index |
Old Index