Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src
Andrew Doran wrote:
Module Name: src
Committed By: ad
Date: Fri May 2 15:26:39 UTC 2008
Modified Files:
src/share/man/man5: boot.cfg.5
src/sys/arch/amd64/amd64: locore.S
src/sys/arch/amd64/conf: GENERIC INSTALL
src/sys/arch/i386/conf: GENERIC INSTALL
src/sys/arch/i386/i386: locore.S machdep.c
src/sys/arch/i386/stand/boot: boot2.c devopen.c version
src/sys/arch/i386/stand/lib: exec.c
src/sys/arch/x86/include: bootinfo.h
src/sys/arch/x86/x86: pmap.c x86_machdep.c
Log Message:
- Give x86 BIOS boot the ability to load new style modules and pass them
into the kernel. Based on a patch by jmcneill@, with many fixes and
improvements by me.
- Put MEMORY_DISK_DYNAMIC and MODULAR into the GENERIC kernels, so that
you can load miniroot.kmod from the boot blocks and boot into the
installer!
Problem here is that we can't use boot.cfg to select different modules
easily. How about this something like this (untested) patch?
--- boot2.c 2 May 2008 15:26:38 -0000 1.25
+++ boot2.c 2 May 2008 16:19:06 -0000
@@ -463,7 +463,7 @@
doboottypemenu(void)
{
int choice;
- char input[80], c;
+ char input[80], c, *ic, *oc;
printf("\n");
/* Display menu */
@@ -508,8 +508,17 @@
check_password(boot_params.bp_password))) {
printf("type \"?\" or \"help\" for help.\n");
bootmenu(); /* does not return */
- } else
- docommand(bootconf.command[choice]);
+ } else {
+ ic = bootconf.command[choice];
+ /* Split command string at ; into separate
commands */
+ do {
+ oc = input;
+ for (; *ic && *ic != ';'; ic++)
+ *oc++ = *ic;
+ *oc = '\0';
+ if (*ic == ';') ic++;
+ docommand(input);
+ } while (*ic);
+ }
}
}
You could then use something like:
menu=Boot with module foo:load=/foo.kmod;boot
menu=Boot with module bar:load=/bar.kmod;boot
menu=Boot with modules foo and bar:load=/foo.kmod;load=/bar.kmod;boot
If you think is OK, I'll tidy it up, update the man page and commit.
--
Dr. Stephen Borrill
http://www.netbsd.org/~sborrill/
Home |
Main Index |
Thread Index |
Old Index