Skip to content
Snippets Groups Projects
Commit a2cdf211 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Allow both filesystem and live modes

parent 7ba99fce
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,18 @@ startup_start: ...@@ -11,7 +11,18 @@ startup_start:
align 512, db 0 align 512, db 0
startup_end: startup_end:
filesystem: %ifdef KERNEL
%defstr FILESYSTEM_STR %[FILESYSTEM] kernel_file:
incbin FILESYSTEM_STR %defstr KERNEL_STR %[KERNEL]
incbin KERNEL_STR
.end:
align 512, db 0 align 512, db 0
%endif
%ifdef FILESYSTEM
filesystem:
%defstr FILESYSTEM_STR %[FILESYSTEM]
incbin FILESYSTEM_STR
.end:
align 512, db 0
%endif
...@@ -10,8 +10,25 @@ startup: ...@@ -10,8 +10,25 @@ startup:
or al, 2 or al, 2
out 0x92, al out 0x92, al
call redoxfs %ifdef KERNEL
mov edi, [kernel_base]
mov ecx, (kernel_file.end - kernel_file)
mov [kernel_size], ecx
mov eax, (kernel_file - boot)/512
add ecx, 511
shr ecx, 9
call load_extent
jmp .loaded_kernel
%endif
%ifdef FILESYSTEM
call redoxfs
jmp .loaded_kernel
%endif
.loaded_kernel:
call memory_map call memory_map
call vesa call vesa
...@@ -113,7 +130,9 @@ load_extent: ...@@ -113,7 +130,9 @@ load_extent:
%include "memory_map.asm" %include "memory_map.asm"
%include "vesa.asm" %include "vesa.asm"
%include "initialize.asm" %include "initialize.asm"
%include "redoxfs.asm" %ifdef FILESYSTEM
%include "redoxfs.asm"
%endif
init_fpu_msg: db "Init FPU",13,10,0 init_fpu_msg: db "Init FPU",13,10,0
init_sse_msg: db "Init SSE",13,10,0 init_sse_msg: db "Init SSE",13,10,0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment