Removed NASM dependency.
This commit is contained in:
parent
e9db400e15
commit
5f0b2ce33e
@ -7,7 +7,6 @@ A hobby OS written in Nim.
|
||||
* nim
|
||||
* nimble (* or use other nake install method)
|
||||
* clang
|
||||
* nasm
|
||||
* grub2
|
||||
* qemu
|
||||
|
||||
|
@ -1,31 +1,27 @@
|
||||
; http://wiki.osdev.org/Bare_Bones_with_NASM
|
||||
MBALIGN equ 1<<0 ; align loaded modules on page boundaries
|
||||
MEMINFO equ 1<<1 ; provide memory map
|
||||
FLAGS equ MBALIGN | MEMINFO ; this is the Multiboot 'flag' field
|
||||
MAGIC equ 0x1BADB002 ; 'magic number' lets bootloader find the header
|
||||
CHECKSUM equ -(MAGIC + FLAGS) ; checksum of above, to prove we are multiboot
|
||||
# http://wiki.osdev.org/Bare_Bones_with_NASM
|
||||
.set MBALIGN, 1<<0 # align loaded modules on page boundaries
|
||||
.set MEMINFO, 1<<1 # provide memory map
|
||||
.set FLAGS, MBALIGN | MEMINFO # this is the Multiboot 'flag' field
|
||||
.set MAGIC, 0x1BADB002 # 'magic number' lets bootloader find the header
|
||||
.set CHECKSUM,-(MAGIC + FLAGS) # checksum of above, to prove we are multiboot
|
||||
|
||||
section .multiboot
|
||||
align 4
|
||||
dd MAGIC
|
||||
dd FLAGS
|
||||
dd CHECKSUM
|
||||
.section .multiboot
|
||||
.align 4
|
||||
.long MAGIC
|
||||
.long FLAGS
|
||||
.long CHECKSUM
|
||||
|
||||
section .bss
|
||||
align 16
|
||||
.section .bss
|
||||
stack_bottom:
|
||||
resb 16384 ; 16 KiB
|
||||
.skip 16384 # 16 KiB
|
||||
stack_top:
|
||||
|
||||
section .text
|
||||
global _start:function (_start.end - _start)
|
||||
.section .text
|
||||
.global _start
|
||||
.type _start, @function
|
||||
_start:
|
||||
|
||||
mov esp, stack_top
|
||||
|
||||
extern kernel_main
|
||||
mov $stack_top, %esp
|
||||
call kernel_main
|
||||
|
||||
cli
|
||||
.hang: hlt
|
||||
jmp .hang
|
||||
|
@ -17,7 +17,7 @@ task "clean", "Removes build files.":
|
||||
|
||||
task "bootloader", "Builds the bootloader.":
|
||||
echo "Building bootloader."
|
||||
direShell("nasm -felf32 kernel/arch/i386/boot.s -o boot.o")
|
||||
direShell("clang -c --target=i386-pc-none-elf kernel/arch/i386/boot.s -o boot.o")
|
||||
echo "Done."
|
||||
|
||||
task "build", "Builds the operating system.":
|
||||
|
Loading…
Reference in New Issue
Block a user