tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
overriding RAIDframe disks as root disks with multiboot
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;
/* we found something bootable... */
Home |
Main Index |
Thread Index |
Old Index