working build of bootloader
This commit is contained in:
@@ -4,7 +4,11 @@ OS_NAME := os()
|
||||
ARCH_NAME := arch()
|
||||
|
||||
OVMF_ARM := if OS_NAME == "macos" {
|
||||
"/opt/homebrew/share/qemu/edk2-aarch64-code.fd"
|
||||
if ARCH_NAME == "arm64" {
|
||||
"/opt/homebrew/share/qemu/edk2-aarch64-code.fd"
|
||||
} else {
|
||||
"/usr/local/share/qemu/edk2-aarch64-code.fd"
|
||||
}
|
||||
} else {
|
||||
"/usr/share/edk2/aarch64/QEMU_EFI.fd"
|
||||
}
|
||||
@@ -24,7 +28,7 @@ CPU := if ARCH_NAME == "arm64" { "host" } else {
|
||||
export BUILD_DIR := justfile_directory() + "/.build"
|
||||
export TEMP_DIR := BUILD_DIR + "/temp"
|
||||
export BOOT_BIN := BUILD_DIR + "/bootloader/BOOTAA64.EFI"
|
||||
export IMG_FILE := BUILD_DIR + "/termOS.img"
|
||||
export IMG_FILE := BUILD_DIR + "/ksOS.img"
|
||||
|
||||
mod Bootloader
|
||||
|
||||
@@ -48,13 +52,16 @@ _prep:
|
||||
|
||||
@run: _image
|
||||
@echo "🚀 Launching..."
|
||||
@cp /usr/share/edk2/aarch64/QEMU_VARS.fd {{TEMP_DIR}}/vars.fd
|
||||
qemu-system-aarch64 {{ACCEL}} \
|
||||
-machine virt \
|
||||
-cpu {{CPU}} \
|
||||
-m 512M \
|
||||
-drive if=pflash,format=raw,readonly=on,file=/usr/share/edk2/aarch64/QEMU_EFI.fd \
|
||||
-drive if=pflash,format=raw,file={{TEMP_DIR}}/vars.fd \
|
||||
-device virtio-gpu-pci \
|
||||
-display cocoa,show-cursor=on \
|
||||
-drive if=pflash,format=raw,readonly=on,file={{OVMF_ARM}} \
|
||||
-drive file={{IMG_FILE}},format=raw,if=none,id=hd0 \
|
||||
-device virtio-blk-device,drive=hd0 \
|
||||
-serial mon:stdio
|
||||
|
||||
@clean:
|
||||
rm -rf {{BUILD_DIR}}
|
||||
Reference in New Issue
Block a user