]> Joshua Wise's Git repositories - netwatch.git/commitdiff
Merge ELF loader.
authorJoshua Wise <joshua@rebirth.joshuawise.com>
Wed, 10 Sep 2008 22:24:10 +0000 (18:24 -0400)
committerJoshua Wise <joshua@rebirth.joshuawise.com>
Wed, 10 Sep 2008 22:24:10 +0000 (18:24 -0400)
1  2 
grubload/Makefile
grubload/multiboot_c.c

index c850bb33434cc4512e48560bff4ce102e3432dd4,041f09c0b41bff219ccb8443079134ee3f06c57a..f0f9742d55564c4f8f0842cbfc60b4e62be82b38
@@@ -1,4 -1,4 +1,4 @@@
- 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
  
index 25522e26c7cdffe8a14945a0066ad247f9454554,f87168704fe0be9d15df95afdf03e40012354623..03e2143ba7d6970a8ab967f9ee33fd0f4024ac0b
@@@ -47,7 -43,15 +48,15 @@@ void c_start(unsigned int magic, struc
                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!
  }
This page took 0.025793 seconds and 4 git commands to generate.