hermit-os / hermit-rs

Hermit for Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hermit doesn't work on aarch64: rusty-loader can't find DTB for aarch64

basmaelgaabouri opened this issue · comments

  • I built a hello-world application using:
    cargo build -Z build-std=std,core,alloc,panic_abort -Z build-std-features=compiler-builtins-mem --target aarch64-unknown-hermit
  • built the rusty-loader using: cargo xtask build --target aarch64
    however, when I try to run it on qemu using the following command:
    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 -initrd ../rusty-hermit/target/aarch64-unknown-hermit/debug/hello_world
    I get the following error:
[LOADER][INFO] Loader: [0x40200000 - 0x40232000]
[LOADER] panicked at 'called `Option::unwrap()` on a `None` value', src/arch/aarch64/mod.rs:101:10

Thanks for trying Hermit! :)

The initial ram disk has to be provided differently on AArch64.

Instead of -initrd <APP>, try -device guest-loader,addr=0x48000000,initrd=<APP>.
Does this fix your issue?

I opened a corresponding PR: hermit-os/loader#231