diff --git a/1003-add-riscv64-support-for-kpatch-build.patch b/1003-add-riscv64-support-for-kpatch-build.patch new file mode 100644 index 0000000000000000000000000000000000000000..7a07d2ddf94b75993160c197293888c7718200ca --- /dev/null +++ b/1003-add-riscv64-support-for-kpatch-build.patch @@ -0,0 +1,25 @@ +From effc37c7cb9b8d9848f35bcf68fc349eb6d9c143 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=E5=BC=A0=E5=AE=89=E7=9B=9F?= +Date: Tue, 17 Jun 2025 15:24:29 +0800 +Subject: [PATCH 1/1] add riscv64 support for kpatch build + +--- + kpatch-build/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/kpatch-build/Makefile b/kpatch-build/Makefile +index efa26fe..8252838 100644 +--- a/kpatch-build/Makefile ++++ b/kpatch-build/Makefile +@@ -22,7 +22,7 @@ PLUGIN_CFLAGS := $(filter-out -Wconversion, $(CFLAGS)) + PLUGIN_CFLAGS += -shared -I$(GCC_PLUGINS_DIR)/include \ + -Igcc-plugins -fPIC -fno-rtti -O2 -Wall + endif +-ifeq ($(filter $(ARCH),aarch64 s390x x86_64 ppc64le loongarch64),) ++ifeq ($(filter $(ARCH),aarch64 s390x x86_64 ppc64le loongarch64 riscv64),) + $(error Unsupported architecture ${ARCH}, check https://github.com/dynup/kpatch/#supported-architectures) + endif + +-- +2.43.5 + diff --git a/kpatch-build.spec b/kpatch-build.spec index 0e546b33e6eb2af546aad2e7fba7fe7546445204..19cfe87a77a8fa894b4de0349162bf1a3107e04b 100644 --- a/kpatch-build.spec +++ b/kpatch-build.spec @@ -1,4 +1,4 @@ -%define anolis_release 2 +%define anolis_release 3 %define debug_package %{nil} Name: kpatch-build @@ -17,6 +17,7 @@ Requires: kernel-devel gcc patch make Patch1001: 1001-change-the-install-dir-to-system-path.patch Patch1002: 1002-add-loongarch64-support-for-kpatch-build.patch +Patch1003: 1003-add-riscv64-support-for-kpatch-build.patch %description kpatch-build is a hot patch creation tool that can perform CVE and @@ -63,6 +64,9 @@ install -m 644 kmod/patch/* %{buildroot}/%{_datadir}/kpatch/patch %doc doc/arm64-upstream-prerequisites.md %changelog +* Tue Jun 17 2025 Anmeng Zhang - 1.0.0-3 +- add riscv64 support for kpatch build + * Wed Oct 18 2023 Wenlong Zhang - 1.0.0-2 - add loong64 support for kpatch-build