From cccb19d19ff27724e412cf3b21750f82ebbb20d1 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 27 Sep 2017 20:19:34 -0600 Subject: [PATCH] Prepare bootloader for use in installer --- x86_64/disk.asm | 18 ++++++++++-------- x86_64/startup-common.asm | 11 ++++------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/x86_64/disk.asm b/x86_64/disk.asm index fce7e9436a..67638405b1 100644 --- a/x86_64/disk.asm +++ b/x86_64/disk.asm @@ -17,12 +17,14 @@ startup_end: incbin KERNEL_STR .end: align 512, db 0 -%endif - -%ifdef FILESYSTEM - filesystem: - %defstr FILESYSTEM_STR %[FILESYSTEM] - incbin FILESYSTEM_STR - .end: - align 512, db 0 +%else + %ifdef FILESYSTEM + filesystem: + %defstr FILESYSTEM_STR %[FILESYSTEM] + incbin FILESYSTEM_STR + .end: + align 512, db 0 + %else + filesystem: + %endif %endif diff --git a/x86_64/startup-common.asm b/x86_64/startup-common.asm index 5fd0834461..06641cd250 100644 --- a/x86_64/startup-common.asm +++ b/x86_64/startup-common.asm @@ -19,15 +19,12 @@ startup: add ecx, 511 shr ecx, 9 call load_extent - - jmp .loaded_kernel - %endif - - %ifdef FILESYSTEM + %else call redoxfs - jmp .loaded_kernel %endif + jmp .loaded_kernel + .loaded_kernel: call memory_map @@ -126,7 +123,7 @@ load_extent: %include "memory_map.asm" %include "vesa.asm" %include "initialize.asm" -%ifdef FILESYSTEM +%ifndef KERNEL %include "redoxfs.asm" %endif