Skip to content
Snippets Groups Projects
Commit 0c826060 authored by Bensong Liu's avatar Bensong Liu
Browse files

cleanup repo

parent a530a787
No related branches found
No related tags found
No related merge requests found
Showing
with 16 additions and 9 deletions
BITS ?= 64
default: assemble-legacy
bootloader-legacy:
$(MAKE) -C bootloader-legacy
BITS=$(BITS) $(MAKE) -C bootloader-legacy
bootloader-uefi:
$(MAKE) -C bootloader-uefi
# BITS=$(BITS) $(MAKE) -C bootloader-uefi
kernel:
$(MAKE) -C kernel
BITS=$(BITS) $(MAKE) -C kernel
.PHONY: bootloader-legacy bootloader-uefi kernel
......
build:
nasm -f bin boot.asm -o boot.img
build_x86:
build_x86_64:
BITS ?= 64
build:
nasm -f bin boot.asm -DTARGET_BITS=$(BITS) -o boot.img
run: build
qemu-system-x86_64 boot.img
clean:
rm -f boot.img
......@@ -100,6 +100,7 @@ _prot_begin:
mov ebx, _motd_32
call println_vga
%if TARGET_BITS == 64
; Test if 64bit available
call test_support_long_mode
cmp eax, 0
......@@ -112,6 +113,9 @@ _test_passed:
jmp inline_enter_long_mode
%include "./inline_x64lib.inc"
jmp _call_kern_64
%else
jmp _call_kern_32
%endif
[bits 32]
_call_kern_32:
......
File moved
File moved
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