X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/77690f22c510be3adf79b925ce7b932f00dc8224..d56898ee77b960cfe7f1d75bca2725d9d5337553:/grubload/multiboot_c.c diff --git a/grubload/multiboot_c.c b/grubload/multiboot_c.c index c87b675..f871687 100644 --- a/grubload/multiboot_c.c +++ b/grubload/multiboot_c.c @@ -33,7 +33,8 @@ void c_start(unsigned int magic, struct mb_info *wee) puts("Grubptr is: "); puthex(*grubptr); puts("\n"); - + + for (i = 0; i < wee->mod_cnt; i++) { puts("Module:\n"); @@ -41,6 +42,16 @@ void c_start(unsigned int magic, struct mb_info *wee) puts(" Size: "); puthex(wee->mods[i].mod_end - wee->mods[i].mod_start); puts("\n"); puts(" Name: "); puts(wee->mods[i].mod_string); puts("\n"); } + + if ((wee->mod_cnt != 1) || (strcmp(wee->mods[0].mod_string, "aseg.elf"))) + { + puts("Expected 1 module called aseg.elf.\n"); + while(1) asm("hlt"); + } + + load_elf(wee->mods[0].mod_start, wee->mods[0].mod_end - wee->mods[0].mod_start); + + while (1) ; }