Skip to content
Snippets Groups Projects
Unverified Commit fb8c5594 authored by Martin Kröning's avatar Martin Kröning :crab: Committed by GitHub
Browse files

Merge branch 'main' into remove-gitlab-config

parents b95cc463 d964f752
No related branches found
No related tags found
No related merge requests found
......@@ -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'
......@@ -79,14 +80,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 +95,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 +106,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 +118,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 +133,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 +144,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
......@@ -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"
......
[package]
name = "rusty-loader"
name = "hermit-loader"
version = "0.4.4"
authors = ["Stefan Lankes <slankes@eonerc.rwth-aachen.de>", "Colin Finck <colin.finck@rwth-aachen.de>"]
license = "MIT OR Apache-2.0"
......
# 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 the [Hermit kernel](https://github.com/hermitcore/kernel) within [QEMU](https://www.qemu.org).
## Requirements
......@@ -15,7 +15,7 @@ $ cargo xtask build --target <TARGET> --release
With `<TARGET>` being either `x86_64`, `x86_64-uefi`, or `aarch64`.
Afterward, the loader is located at `target/<TARGET>/release/rusty-loader`.
Afterward, the loader is located at `target/<TARGET>/release/hermit-loader`.
## Running
......
; 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]
......
......@@ -134,7 +134,7 @@ pub unsafe fn find_kernel() -> &'static [u8] {
paging::map::<Size4KiB>(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);
......@@ -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);
......
......@@ -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()?;
......
......@@ -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",
}
}
}
......
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