Add multiboot command. This lets us netboot the xen+dom0 kernel combo.

This commit is contained in:
tnn 2010-04-06 21:18:59 +00:00
parent d5723e6f06
commit 0bc96981a6
1 changed files with 17 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.24 2010/01/17 14:54:44 drochner Exp $ */
/* $NetBSD: main.c,v 1.25 2010/04/06 21:18:59 tnn Exp $ */
/*
* Copyright (c) 1996
@ -64,6 +64,7 @@ void command_quit(char *);
void command_boot(char *);
void command_consdev(char *);
void command_modules(char *);
void command_multiboot(char *);
const struct bootblk_command commands[] = {
{ "help", command_help },
@ -72,6 +73,7 @@ const struct bootblk_command commands[] = {
{ "boot", command_boot },
{ "consdev", command_consdev },
{ "modules", command_modules },
{ "multiboot", command_multiboot },
{ "load", module_add },
{ "vesa", command_vesa },
{ NULL, NULL },
@ -193,6 +195,7 @@ command_help(char *arg)
" (ex. \"netbsd.old -s\"\n"
"consdev {pc|com[0123]|com[0123]kbd|auto}\n"
"vesa {enabled|disabled|list|modenum}\n"
"multiboot [filename] [<args>]\n"
"modules {enabled|disabled}\n"
"load {path_to_module}\n"
"help|?\n"
@ -264,3 +267,16 @@ command_modules(char *arg)
else
printf("invalid flag, must be 'enabled' or 'disabled'.\n");
}
void
command_multiboot(char *arg)
{
char *filename;
filename = arg;
if (exec_multiboot(filename, gettrailer(arg)) < 0)
printf("multiboot: %s: %s\n", filename,
strerror(errno));
else
printf("boot returned\n");
}