-
Notifications
You must be signed in to change notification settings - Fork 1
/
benh_disk.asm
72 lines (58 loc) · 2.21 KB
/
benh_disk.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
; ==================================================================
; benOS Bootloader
; Copyright (C) 2018 Bench Computer, Inc. -- see ~/LICENSE
;
; The official bootloader for benOS and BenchX desktop/laptop products.
; The first bootloader built for a decentralized operating system.
; Many bootloaders were looked at and utilized in the creation of
; benOS's BenchX bootloader.
;
; Bootloaders we utilized: Ubuntu, MikeOS, Debian, Linux Mint, ReOS
; ==================================================================
sectalign off
%include "benstart.asm"
; ------------------------------------------------------------------
; benOS Launch Start >> i386 or x86_64
; ------------------------------------------------------------------
benos_launch_start:
; ------------------------------------------------------------------
; benOS i386 Launch Loader
; ------------------------------------------------------------------
%ifdef ARCH_i386
%include "benos-i386.asm"
%endif
; ------------------------------------------------------------------
; benOS x86_64 Launch Loader
; ------------------------------------------------------------------
%ifdef ARCH_x86_64
%include "benos-x86_64.asm"
%endif
align 512, db 0
benos_launch_end:
; ------------------------------------------------------------------
; benOS Microkernel Loader
; ------------------------------------------------------------------
%ifdef KERNEL
benos_kernel_file:
%defstr KERNEL_STR %[KERNEL]
incbin KERNEL_STR
.end:
align 512, db 0
%else
; ------------------------------------------------------------------
; benOS If Microkernel Has Already Loaded, Load FileSystem
; ------------------------------------------------------------------
align X_BLOCK_SIZE, db 0
%ifdef BEN_FILESYSTEM
benos_filesystem:
%defstr BEN_FILESYSTEM_STR %[BEN_FILESYSTEM]
incbin BEN_FILESYSTEM_STR
.end:
align X_BLOCK_SIZE, db 0
; --------------------------------------------------------------------------------
; benOS If Microkernel and FileSystem Already Loaded, Execute Loaded Filesystem
; --------------------------------------------------------------------------------
%else
benos_filesystem:
%endif
%endif