- OBJS=multiboot_c.o multiboot_asm.o console.o minilib.o realmode.o
-OBJS=multiboot_c.o multiboot_asm.o console.o minilib.o loader.o
++OBJS=multiboot_c.o multiboot_asm.o console.o minilib.o realmode.o loader.o
CC=gcc
CFLAGS=-nostdlib -I../include -I. -fno-builtin -nostdinc
puts(" Name: "); puts(wee->mods[i].mod_string); puts("\n");
}
-
- while (1)
- ;
+ 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);
+
- realmode();
+ puts("Now returning to real mode.\n");
+ memcpy(0x4000, _binary_realmode_bin_start, (int)&_binary_realmode_bin_size);
++ realmode(); // goodbye!
}