From c8d71ced44ad26848f82432a6a0f4f4c15619405 Mon Sep 17 00:00:00 2001 From: "yan.yihao 10263201" Date: Tue, 6 May 2025 14:52:43 +0800 Subject: [PATCH 1/3] add support for RISC-V build --- qemu.spec | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/qemu.spec b/qemu.spec index 13f07bf..0f481ac 100644 --- a/qemu.spec +++ b/qemu.spec @@ -12,6 +12,9 @@ %ifarch loongarch64 %global target_list loongarch64-linux-user,loongarch64-softmmu %endif +%ifarch riscv64 +%global target_list riscv64-linux-user,riscv64-softmmu +%endif %endif %global libfdt_version 1.6.0 @@ -568,7 +571,7 @@ Patch0282: 0282-hw-misc-psp-support-tkm-use-mem2-memory.patch Patch0283: 0283-hw-misc-psp-Pin-the-hugepage-memory-specified-by-mem.patch Patch0284: 0284-fix-potential-use-after-free-with-dbus-shared-memory.patch -ExclusiveArch: x86_64 aarch64 loongarch64 +ExclusiveArch: x86_64 aarch64 loongarch64 riscv64 BuildRequires: meson >= %{meson_version} BuildRequires: bison @@ -715,7 +718,7 @@ Requires: %{name}-system-aarch64 = %{EVR} %ifarch loongarch64 Requires: %{name}-system-loongarch64 = %{EVR} %endif -%ifarch riscv +%ifarch riscv64 Requires: %{name}-system-riscv = %{EVR} %endif %ifarch x86_64 @@ -1201,7 +1204,7 @@ Requires: %{name}-common = %{EVR} This package provides the QEMU system emulator for Loongson boards. %endif -%ifarch riscv +%ifarch riscv64 %package system-riscv Summary: QEMU system emulator for RISC-V Requires: %{name}-system-riscv-core = %{EVR} @@ -2057,6 +2060,10 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %{_bindir}/qemu-loongarch64 %{_datadir}/systemtap/tapset/qemu-loongarch64*.stp %endif +%ifarch riscv64 +%{_bindir}/qemu-riscv64 +%{_datadir}/systemtap/tapset/qemu-riscv64*.stp +%endif %files user-binfmt %{_exec_prefix}/lib/binfmt.d/qemu-*-dynamic.conf @@ -2084,10 +2091,9 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %{_mandir}/man1/qemu-system-loongarch64.1* %endif -%ifarch riscv +%ifarch riscv64 %files system-riscv %files system-riscv-core -%{_bindir}/qemu-system-riscv32 %{_bindir}/qemu-system-riscv64 %{_datadir}/%{name}/opensbi-riscv*.bin %{_datadir}/systemtap/tapset/qemu-system-riscv*.stp -- Gitee From 5af493a6de6a788fbe521c6d6eeac9f97ea0d5ff Mon Sep 17 00:00:00 2001 From: "yan.yihao 10263201" Date: Tue, 6 May 2025 15:21:30 +0800 Subject: [PATCH 2/3] add support for RISC-V build --- qemu.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qemu.spec b/qemu.spec index 0f481ac..a01be39 100644 --- a/qemu.spec +++ b/qemu.spec @@ -1,4 +1,4 @@ -%define anolis_release 25 +%define anolis_release 26 %bcond_with check %global all_system_emu_support 0 @@ -2117,6 +2117,9 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %endif %changelog +* Tue May 6 2025 Yihao Yan - 2:8.2.0-26 +- add support for riscv64 + * Sat Nov 30 2024 Xianglai Li - 2:8.2.0-25 - Remove loongarch qemu's dependency on the seavgabios package. -- Gitee From 93e4e8b98d7e2278ed74b5c56ecbb37bdf735ff1 Mon Sep 17 00:00:00 2001 From: yAn1hCDc Date: Fri, 30 May 2025 09:32:22 +0000 Subject: [PATCH 3/3] update date in changelog Signed-off-by: yAn1hCDc --- qemu.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu.spec b/qemu.spec index bcf66d6..b29f3ff 100644 --- a/qemu.spec +++ b/qemu.spec @@ -2199,7 +2199,7 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %endif %changelog -* Tue May 6 2025 Yihao Yan - 2:8.2.0-28 +* Fri May 30 2025 Yihao Yan - 2:8.2.0-28 - add support for riscv64 * Fri May 30 2025 wh02252983 - 2:8.2.0-27 -- Gitee