fix: correction pour démarrage sans GRUB/multiboot

This commit is contained in:
Nicolas Hordé 2018-09-27 17:32:25 +02:00
parent 31b139ab01
commit 25c2ec0fbf
2 changed files with 11 additions and 8 deletions

View File

@ -2,11 +2,11 @@ all: bits32 bits64 floppy harddisk uefi
sync
bits32: ARCH=bits32
bits32: lib/libs.o system/system.sys harddisk
bits32: lib/libs.o system/system.sys
sync
bits64: ARCH=bits64
bits64: lib/libs.o system/system.sys uefi
bits64: lib/libs.o system/system.sys
sync
floppy: boot/boot12.bin final/floppy.img.final
@ -48,7 +48,7 @@ retest: littleclean test
retest64: littleclean test64
floppytest: floppy qemu-floppy
floppytest: bits32 floppy qemu-floppy
view:
(hexdump -C ./final/harddisk.img.final|head -c10000)

View File

@ -45,17 +45,20 @@ int main(unsigned long magic, unsigned long addr)
cli();
setvmode(0x02);
/* Efface l'ecran */
if (magic != MULTIBOOT2_BOOTLOADER_MAGIC)
{
printf ("Nombre magic inconnu: 0x%x\n", (u32) magic);
return;
}
print("\033[2J\000");
printf(ansilogo);
print("\033[37m\033[0m -Chargement noyaux\000");
ok();
printf ("\033[37m\033[0m -Nombre magique multiboot2 : %X\000", (u32) magic);
if (magic == MULTIBOOT2_BOOTLOADER_MAGIC)
ok();
else
error();
print("\033[37m\033[0m -Initilisation de la memoire (GDT)\000");
initgdt(&&next);
next: