diff --git a/0001-Support-PMC8222-driver-build-for-OpenEuler-2203-vers.patch b/0001-Support-PMC8222-driver-build-for-OpenEuler-2203-vers.patch new file mode 100644 index 0000000..91b94d7 --- /dev/null +++ b/0001-Support-PMC8222-driver-build-for-OpenEuler-2203-vers.patch @@ -0,0 +1,30 @@ +From aecfa96b98be1bdc9562cf912c7497dd241cd9b8 Mon Sep 17 00:00:00 2001 +From: Hao Zhang +Date: Mon, 24 Jul 2023 15:58:03 +0800 +Subject: [PATCH] Support PMC8222 driver build for OpenEuler-2203 version. + +This patch is referred from src/Makefile.alt. + +Signed-off-by: Hao Zhang +--- + Makefile | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/Makefile b/Makefile +index 8e7196c..3c4cadb 100644 +--- a/Makefile ++++ b/Makefile +@@ -103,6 +103,10 @@ OSVENDOR := $(shell \ + $(KVER_SHORT) = "4.19" ]; \ + then \ + echo "OEULER2003"; \ ++ elif [ -n "`grep 'release 22.03' /etc/openEuler-release`" -a \ ++ $(KVER_SHORT) = "5.10" ]; \ ++ then \ ++ echo "OEULER2203"; \ + fi; \ + elif [ -f /etc/os-release ]; \ + then \ +-- +2.33.0 + diff --git a/smartpqi-src.spec b/smartpqi-src.spec index 7c07385..dc1bf86 100644 --- a/smartpqi-src.spec +++ b/smartpqi-src.spec @@ -18,6 +18,8 @@ BuildRoot: /var/tmp/%{name}-buildroot %define debug_package %{nil} +Patch0: 0001-Support-PMC8222-driver-build-for-OpenEuler-2203-vers.patch + %description Driver for Microchip Technology SmartRAID and SmartHBA controllers @@ -25,6 +27,7 @@ Driver for Microchip Technology SmartRAID and SmartHBA controllers %prep echo prep %{version}-%{release} %setup -c -b 0 +%patch0 -p1 -b 0001-Support-PMC8222-driver-build-for-OpenEuler-2203-vers.patch cp %_sourcedir/Module.supported src/Module.supported