From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH 4/5] start_vm: Add RISC-V 64-bit support
Date: Fri, 10 Jan 2020 18:26:05 +0100 [thread overview]
Message-ID: <58ae6dffd390339a5b90b0942436ba89a363e02e.1578677166.git.jan.kiszka@siemens.com> (raw)
In-Reply-To: <cover.1578677166.git.jan.kiszka@siemens.com>
In-Reply-To: <cover.1578677166.git.jan.kiszka@siemens.com>
From: Jan Kiszka <jan.kiszka@siemens.com>
This arch is still special in that QEMU does not support directly
booting the kernel via "-kernel". Rather, you need to install opensbi on
the host and load fw_jump.elf as kernel while the actual kernel goes at
a magic address via the loader device.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
scripts/start_vm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/start_vm b/scripts/start_vm
index 71b55f25..8801cf88 100755
--- a/scripts/start_vm
+++ b/scripts/start_vm
@@ -122,6 +122,10 @@ case "$IMAGE_TYPE" in
QKERNEL=$IMAGE_DIR/${KERNEL_IMAGE}
QINITRD=/dev/null
[ -n "$INITRD_IMAGE" ] && QINITRD=$IMAGE_DIR/${INITRD_IMAGE}
+ if [ "$ARCH" = "riscv64" ]; then
+ EXTRA_ARGS="$EXTRA_ARGS -device loader,file=$QKERNEL,addr=0x80200000"
+ QKERNEL="/usr/lib/riscv64-linux-gnu/opensbi/qemu/virt/fw_jump.elf"
+ fi
EXTRA_ARGS="$EXTRA_ARGS \
-kernel $QKERNEL \
-initrd $QINITRD"
--
2.16.4
next prev parent reply other threads:[~2020-01-10 17:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-10 17:26 [PATCH 0/5] RISC-V support Jan Kiszka
2020-01-10 17:26 ` [PATCH 1/5] meta: Add debian-sid-ports distro config Jan Kiszka
2020-01-10 17:26 ` [PATCH 2/5] meta: base/isar-apt: Add RISC-V architecture Jan Kiszka
2020-01-10 17:26 ` [PATCH 3/5] meta: Allow cross-compilation for RISC-V Jan Kiszka
2020-01-10 17:26 ` Jan Kiszka [this message]
2020-01-10 17:26 ` [PATCH 5/5] meta-isar: Add qemuriscv64 virtual target Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=58ae6dffd390339a5b90b0942436ba89a363e02e.1578677166.git.jan.kiszka@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox