From 858d3480297a5e6f33726ed3656a81aaced02c70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Sat, 26 Aug 2023 18:57:18 +0200 Subject: [PATCH 1/3] feat: rename RustyLoader to hermit-loader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- .github/workflows/ci.yml | 16 +++++++------- Cargo.lock | 48 ++++++++++++++++++++-------------------- Cargo.toml | 2 +- README.md | 6 ++--- src/arch/x86_64/mod.rs | 4 ++-- xtask/src/main.rs | 4 ++-- xtask/src/target.rs | 6 ++--- 7 files changed, 43 insertions(+), 43 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d98bd89..7c14e016 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,14 +79,14 @@ jobs: -smp 1 -m 64M \ -device isa-debug-exit,iobase=0xf4,iosize=0x04 \ -display none -serial stdio \ - -kernel target/x86_64/debug/rusty-loader \ + -kernel target/x86_64/debug/hermit-loader \ -initrd data/x86_64/hello_world qemu-system-x86_64 \ -cpu qemu64,apic,fsgsbase,fxsr,rdrand,rdtscp,xsave,xsaveopt \ -smp 1 -m 64M \ -device isa-debug-exit,iobase=0xf4,iosize=0x04 \ -display none -serial stdio \ - -kernel target/x86_64/debug/rusty-loader \ + -kernel target/x86_64/debug/hermit-loader \ -initrd data/x86_64/hello_c - name: Run loader (aarch64) if: matrix.target == 'aarch64' @@ -94,7 +94,7 @@ jobs: qemu-system-aarch64 \ -machine virt,gic-version=3 -cpu cortex-a72 -smp 1 -m 512M \ -display none -serial stdio -semihosting \ - -kernel target/aarch64/debug/rusty-loader \ + -kernel target/aarch64/debug/hermit-loader \ -device guest-loader,addr=0x48000000,initrd=data/aarch64/hello_world - name: Run loader (riscv64) if: matrix.target == 'riscv64' @@ -105,7 +105,7 @@ jobs: -smp 1 \ -m 32M \ -display none -serial stdio \ - -kernel target/riscv64/debug/rusty-loader \ + -kernel target/riscv64/debug/hermit-loader \ -initrd data/riscv64/hello_world - name: Build (release) run: cargo xtask build --target ${{ matrix.target }} --release @@ -117,14 +117,14 @@ jobs: -smp 1 -m 64M \ -device isa-debug-exit,iobase=0xf4,iosize=0x04 \ -display none -serial stdio \ - -kernel target/x86_64/release/rusty-loader \ + -kernel target/x86_64/release/hermit-loader \ -initrd data/x86_64/hello_world qemu-system-x86_64 \ -cpu qemu64,apic,fsgsbase,fxsr,rdrand,rdtscp,xsave,xsaveopt \ -smp 1 -m 64M \ -device isa-debug-exit,iobase=0xf4,iosize=0x04 \ -display none -serial stdio \ - -kernel target/x86_64/release/rusty-loader \ + -kernel target/x86_64/release/hermit-loader \ -initrd data/x86_64/hello_c - name: Run loader (release, aarch64) if: matrix.target == 'aarch64' @@ -132,7 +132,7 @@ jobs: qemu-system-aarch64 \ -machine virt,gic-version=3 -cpu cortex-a72 -smp 1 -m 512M \ -display none -serial stdio -semihosting \ - -kernel target/aarch64/release/rusty-loader \ + -kernel target/aarch64/release/hermit-loader \ -device guest-loader,addr=0x48000000,initrd=data/aarch64/hello_world - name: Run loader (release, riscv64) if: matrix.target == 'riscv64' @@ -143,5 +143,5 @@ jobs: -smp 1 \ -m 32M \ -display none -serial stdio \ - -kernel target/riscv64/release/rusty-loader \ + -kernel target/riscv64/release/hermit-loader \ -initrd data/riscv64/hello_world diff --git a/Cargo.lock b/Cargo.lock index 42949a8c..03b2f5a0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -110,6 +110,30 @@ dependencies = [ "time", ] +[[package]] +name = "hermit-loader" +version = "0.4.4" +dependencies = [ + "align-address", + "align-data", + "cc", + "fdt", + "goblin", + "hermit-dtb", + "hermit-entry", + "log", + "multiboot", + "naked-function", + "nasm-rs", + "riscv", + "sbi", + "sptr", + "uart_16550", + "uefi", + "uefi-services", + "x86_64", +] + [[package]] name = "libc" version = "0.2.147" @@ -255,30 +279,6 @@ version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" -[[package]] -name = "rusty-loader" -version = "0.4.4" -dependencies = [ - "align-address", - "align-data", - "cc", - "fdt", - "goblin", - "hermit-dtb", - "hermit-entry", - "log", - "multiboot", - "naked-function", - "nasm-rs", - "riscv", - "sbi", - "sptr", - "uart_16550", - "uefi", - "uefi-services", - "x86_64", -] - [[package]] name = "sbi" version = "0.2.0" diff --git a/Cargo.toml b/Cargo.toml index c46a49cb..1b926851 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "rusty-loader" +name = "hermit-loader" version = "0.4.4" authors = ["Stefan Lankes ", "Colin Finck "] license = "MIT OR Apache-2.0" diff --git a/README.md b/README.md index 37c930a8..bc8acca2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# RustyLoader +# The Hermit Loader -**RustyLoader** is a loader to run [RustyHermit](https://github.com/hermitcore/libhermit-rs) within [QEMU](https://www.qemu.org). +This project is a loader to run [RustyHermit](https://github.com/hermitcore/libhermit-rs) within [QEMU](https://www.qemu.org). ## Requirements @@ -15,7 +15,7 @@ $ cargo xtask build --target --release With `` being either `x86_64`, `x86_64-uefi`, or `aarch64`. -Afterward, the loader is located at `target//release/rusty-loader`. +Afterward, the loader is located at `target//release/hermit-loader`. ## Running diff --git a/src/arch/x86_64/mod.rs b/src/arch/x86_64/mod.rs index 79a78ddb..b2326699 100644 --- a/src/arch/x86_64/mod.rs +++ b/src/arch/x86_64/mod.rs @@ -150,7 +150,7 @@ pub unsafe fn find_kernel() -> &'static [u8] { let elf_len = ramdisk_size as usize; let free_memory_address = (&kernel_end as *const u8 as usize).align_up(Size2MiB::SIZE as usize); - // TODO: Workaround for https://github.com/hermitcore/rusty-loader/issues/96 + // TODO: Workaround for https://github.com/hermitcore/loader/issues/96 let free_memory_address = cmp::max(free_memory_address, 0x800000); info!("Intialize PhysAlloc with {:#x}", free_memory_address); // Memory after the highest end address is unused and available for the physical memory manager. @@ -221,7 +221,7 @@ pub unsafe fn find_kernel() -> &'static [u8] { info!("Module length: {:#x}", elf_len); let free_memory_address = end_address.align_up(Size2MiB::SIZE as usize); - // TODO: Workaround for https://github.com/hermitcore/rusty-loader/issues/96 + // TODO: Workaround for https://github.com/hermitcore/loader/issues/96 let free_memory_address = cmp::max(free_memory_address, 0x800000); // Memory after the highest end address is unused and available for the physical memory manager. PhysAlloc::init(free_memory_address); diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 25b9cee4..d0fdb829 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -152,9 +152,9 @@ impl flags::Clippy { let sh = Shell::new()?; // TODO: Enable clippy for aarch64 - // https://github.com/hermitcore/rusty-loader/issues/78 + // https://github.com/hermitcore/loader/issues/78 // TODO: Enable clippy for x86_64-uefi - // https://github.com/hermitcore/rusty-loader/issues/122 + // https://github.com/hermitcore/loader/issues/122 #[allow(clippy::single_element_loop)] for target in [Target::X86_64, Target::Riscv64] { target.install()?; diff --git a/xtask/src/target.rs b/xtask/src/target.rs index 095aaa74..2907aba5 100644 --- a/xtask/src/target.rs +++ b/xtask/src/target.rs @@ -64,15 +64,15 @@ impl Target { pub fn build_name(&self) -> &'static str { match self { - Self::X86_64Uefi => "rusty-loader.efi", - _ => "rusty-loader", + Self::X86_64Uefi => "hermit-loader.efi", + _ => "hermit-loader", } } pub fn dist_name(&self) -> &'static str { match self { Self::X86_64Uefi => "BootX64.efi", - _ => "rusty-loader", + _ => "hermit-loader", } } } From ec3f4a68b53de022104b33664549a863912ffa99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Sat, 26 Aug 2023 18:58:18 +0200 Subject: [PATCH 2/3] chore: rename RustyHermit to Hermit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- README.md | 2 +- src/arch/x86_64/entry_fc.asm | 2 +- src/arch/x86_64/mod.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bc8acca2..c91599eb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # The Hermit Loader -This project is a loader to run [RustyHermit](https://github.com/hermitcore/libhermit-rs) within [QEMU](https://www.qemu.org). +This project is a loader to run the [Hermit kernel](https://github.com/hermitcore/kernel) within [QEMU](https://www.qemu.org). ## Requirements diff --git a/src/arch/x86_64/entry_fc.asm b/src/arch/x86_64/entry_fc.asm index d47532b3..25c7548c 100644 --- a/src/arch/x86_64/entry_fc.asm +++ b/src/arch/x86_64/entry_fc.asm @@ -1,4 +1,4 @@ -; This is the kernel's entry point, if RustyHermit is running with +; This is the kernel's entry point, if Hermit is running with ; FireCracker. FireCracker assumes a 64 bit Linux kernel. [BITS 64] diff --git a/src/arch/x86_64/mod.rs b/src/arch/x86_64/mod.rs index b2326699..ee27c8bf 100644 --- a/src/arch/x86_64/mod.rs +++ b/src/arch/x86_64/mod.rs @@ -134,7 +134,7 @@ pub unsafe fn find_kernel() -> &'static [u8] { paging::map::(page_address, page_address, 1, PageTableFlags::empty()); } - // Load the RustyHermit-ELF from the initrd supplied by Firecracker + // Load the Hermit-ELF from the initrd supplied by Firecracker let ramdisk_address = *((&(boot_params as usize) + LINUX_SETUP_HEADER_OFFSET + RAMDISK_IMAGE_OFFSET) as *const u32); From 89a73a72110a7e2ee26275942bb87218690c9027 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Sat, 26 Aug 2023 19:13:12 +0200 Subject: [PATCH 3/3] ci: brew update workaround MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c14e016..3bc1e28f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,8 @@ jobs: - name: Install QEMU, NASM (macos) if: matrix.os == 'macos-latest' run: | - brew update + # enable once it works again + # brew update brew install qemu nasm - name: Install QEMU, NASM (windows) if: matrix.os == 'windows-latest'