Add sifive_u SCHEME

This commit is contained in:
Zejun Zhao 2025-10-29 11:37:22 +08:00 committed by Ruihan Li
parent 6af524b451
commit 35720de928
2 changed files with 23 additions and 4 deletions

View File

@ -114,10 +114,12 @@ BOOT_METHOD = qemu-direct
OVMF = off
endif
ifeq ($(OSDK_TARGET_ARCH), riscv64)
SCHEME = riscv
else ifeq ($(OSDK_TARGET_ARCH), loongarch64)
SCHEME = loongarch
ifeq ($(SCHEME), "")
ifeq ($(OSDK_TARGET_ARCH), riscv64)
SCHEME = riscv
else ifeq ($(OSDK_TARGET_ARCH), loongarch64)
SCHEME = loongarch
endif
endif
ifneq ($(SCHEME), "")

View File

@ -68,6 +68,23 @@ qemu.args = """\
-device virtconsole,chardev=mux \
"""
[scheme."sifive_u"]
supported_archs = ["riscv64"]
build.features = ["riscv_sv39_mode"]
boot.method = "qemu-direct"
build.strip_elf = false
qemu.args = """\
-machine sifive_u \
-m 8G \
-no-reboot \
-nographic \
-display none \
-serial chardev:mux \
-monitor chardev:mux \
-chardev stdio,id=mux,mux=on,signal=off,logfile=qemu.log
"""
[scheme."loongarch"]
boot.method = "qemu-direct"
build.strip_elf = false