From 2901e69b66a780c5d139bfffde37dd3ea5cb2dfe Mon Sep 17 00:00:00 2001 From: Josh Junon Date: Fri, 17 Jan 2025 20:59:20 +0100 Subject: [PATCH] dbgutil+limine: fix booting under QEMU with new limine version --- dbgutil/oro_debug_suite/bootstrap/limine.py | 2 +- dbgutil/oro_debug_suite/cmd/boot.py | 37 ++++++++++++--------- oro-arch-x86_64/src/boot/mod.rs | 2 ++ oro-bootloader-limine/src/lib.rs | 2 +- 4 files changed, 26 insertions(+), 17 deletions(-) diff --git a/dbgutil/oro_debug_suite/bootstrap/limine.py b/dbgutil/oro_debug_suite/bootstrap/limine.py index 89fb8d3c..1ca26bc9 100644 --- a/dbgutil/oro_debug_suite/bootstrap/limine.py +++ b/dbgutil/oro_debug_suite/bootstrap/limine.py @@ -5,7 +5,7 @@ from . import get_site_packages_dir LIMINE_GIT_URL = "https://github.com/oro-os/limine.git" -LIMINE_REF = "v7.0.3-binary" +LIMINE_REF = "v8.7.0-binary" def fetch_limine(): diff --git a/dbgutil/oro_debug_suite/cmd/boot.py b/dbgutil/oro_debug_suite/cmd/boot.py index 14d3ecf3..fa3c5624 100644 --- a/dbgutil/oro_debug_suite/cmd/boot.py +++ b/dbgutil/oro_debug_suite/cmd/boot.py @@ -341,24 +341,25 @@ def copyfile(src, dst): copy_limine("limine-bios-cd.bin") copy_limine("limine-bios.sys") - module_config = "\n".join([f"MODULE_PATH=boot:///{k}" for (k, _) in modules]) + module_config = "\n".join([f"module_path: boot():/{k}" for (k, _) in modules]) - with open(path.join(iso_dir, "limine.cfg"), "w") as f: + with open(path.join(iso_dir, "limine.conf"), "w") as f: f.write( f""" - TIMEOUT=0 - GRAPHICS=no - VERBOSE=yes - RANDOMISE_MEMORY=no - INTERFACE_BRANDING=Oro Operating System - INTERFACE_BRANDING_COLOR=5 - SERIAL=yes - KASLR=no - - :Oro Operating System - PROTOCOL=limine - KERNEL_PATH=boot:///oro-limine - SERIAL=yes + timeout: 0 + quiet: no + graphics: yes + verbose: yes + randomise_memory: no + interface_branding: Oro Operating System + interface_branding_color: 5 + serial: yes + + /Oro Operating System + protocol: limine + path: boot():/oro-limine + serial: yes + kasler: no {module_config} """ ) @@ -384,12 +385,18 @@ def copyfile(src, dst): "xorriso", "-as", "mkisofs", + "-r", + "-R", + "-J", "-b", "limine-bios-cd.bin", "-no-emul-boot", "-boot-load-size", "4", "-boot-info-table", + "-hfsplus", + "-apm-block-size", + "2048", "--efi-boot", "limine-uefi-cd.bin", "-efi-boot-part", diff --git a/oro-arch-x86_64/src/boot/mod.rs b/oro-arch-x86_64/src/boot/mod.rs index 2bc56283..c447a48b 100644 --- a/oro-arch-x86_64/src/boot/mod.rs +++ b/oro-arch-x86_64/src/boot/mod.rs @@ -120,8 +120,10 @@ pub unsafe fn boot_primary() -> ! { dbg!("local APIC ID: {lapic_id}"); { + #[doc(hidden)] #[cfg(not(feature = "force-singlecore"))] const MULTICORE_ENABLED: bool = true; + #[doc(hidden)] #[cfg(feature = "force-singlecore")] const MULTICORE_ENABLED: bool = false; diff --git a/oro-bootloader-limine/src/lib.rs b/oro-bootloader-limine/src/lib.rs index 889d4b0f..acfe7e6d 100644 --- a/oro-bootloader-limine/src/lib.rs +++ b/oro-bootloader-limine/src/lib.rs @@ -34,7 +34,7 @@ const KERNEL_STACK_PAGES: usize = 16; /// The path to where the Oro kernel is expected. /// The bootloader does **not** expect it to be listed /// as a module (but it can be). -const KERNEL_PATH: &CStr = limine::cstr!("/boot/oro-kernel"); +const KERNEL_PATH: &CStr = limine::cstr!("/oro-kernel"); /// The path to where the DeviceTree blob is expected, /// if provided. The bootloader does **not** expect it to be