From e36c13083f9ccdb8f0f217fe4aa13149255d1ee4 Mon Sep 17 00:00:00 2001 From: yangxiaoxuan Date: Tue, 31 Aug 2021 18:20:25 +0800 Subject: [PATCH 1/2] build: support loongarch64 Signed-off-by: yangxiaoxuan --- dmidecode.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dmidecode.spec b/dmidecode.spec index eed4a9f..c7b9c24 100644 --- a/dmidecode.spec +++ b/dmidecode.spec @@ -1,7 +1,8 @@ +%define anolis_release .0.1 Summary: Tool to analyse BIOS DMI data Name: dmidecode Version: 3.3 -Release: 1%{?dist} +Release: 1%{anolis_release}%{?dist} Epoch: 1 License: GPLv2+ Source0: http://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.xz @@ -13,7 +14,7 @@ Patch2: 0003-dmidecode-Missing-comma-in-the-dmi_slot_type.patch Patch3: 0004-dmidecode-Skip-details-of-uninstalled-memory-modules.patch BuildRequires: gcc make -ExclusiveArch: %{ix86} x86_64 ia64 aarch64 +ExclusiveArch: %{ix86} x86_64 ia64 aarch64 loongarch64 %description dmidecode reports information about x86 & ia64 hardware as described in the @@ -44,7 +45,7 @@ make %{?_smp_mflags} DESTDIR=%{buildroot} prefix=%{_prefix} install-bin install- %{!?_licensedir:%global license %%doc} %license LICENSE %{_sbindir}/dmidecode -%ifnarch ia64 aarch64 +%ifnarch ia64 aarch64 loongarch64 %{_sbindir}/vpddecode %{_sbindir}/ownership %{_sbindir}/biosdecode @@ -52,6 +53,9 @@ make %{?_smp_mflags} DESTDIR=%{buildroot} prefix=%{_prefix} install-bin install- %{_mandir}/man8/* %changelog +* Tue Apr 19 2022 yangxiaoxuan - 1:3.3-1.0.1 +- Support loongarch64 + * Tue Nov 9 2021 Coiby Xu - 1:3.3-1 - Rebase to upsteam 3.3 - Resolves: rhbz#1998772 -- Gitee From d7bb95b49ac16d1b7044441b8fc38fd64bc35825 Mon Sep 17 00:00:00 2001 From: "yunqi.zwt" Date: Wed, 8 Sep 2021 16:26:05 +0800 Subject: [PATCH 2/2] Patch: dmidecode Add new memory device types from SMBIOS spec 3.4.0 Signed-off-by: yunqi.zwt Signed-off-by: ZhouWeitao --- ...-device-types-from-SMBIOS-spec-3.4.0.patch | 32 +++++++++++++++++++ dmidecode.spec | 8 ++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 1000-dmidecode-Add-new-memory-device-types-from-SMBIOS-spec-3.4.0.patch diff --git a/1000-dmidecode-Add-new-memory-device-types-from-SMBIOS-spec-3.4.0.patch b/1000-dmidecode-Add-new-memory-device-types-from-SMBIOS-spec-3.4.0.patch new file mode 100644 index 0000000..fda0684 --- /dev/null +++ b/1000-dmidecode-Add-new-memory-device-types-from-SMBIOS-spec-3.4.0.patch @@ -0,0 +1,32 @@ +From 7e25483a392e292c58cea67ba4d052856c2f35d0 Mon Sep 17 00:00:00 2001 +From: Prabhakar pujeri +Date: Mon, 19 Oct 2020 14:38:04 +0200 +Subject: Add new memory device types from SMBIOS spec 3.4.0 + +Added 2 more new values (0x22 and 0x23). +--- + dmidecode.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/dmidecode.c b/dmidecode.c +index 8b6f5af..97ba941 100644 +--- a/dmidecode.c ++++ b/dmidecode.c +@@ -2639,10 +2639,12 @@ static const char *dmi_memory_device_type(u8 code) + "LPDDR4", + "Logical non-volatile device", + "HBM", +- "HBM2" /* 0x21 */ ++ "HBM2", ++ "DDR5", ++ "LPDDR5" /* 0x23 */ + }; + +- if (code >= 0x01 && code <= 0x21) ++ if (code >= 0x01 && code <= 0x23) + return type[code - 0x01]; + return out_of_spec; + } +-- +cgit v1.2.1 + diff --git a/dmidecode.spec b/dmidecode.spec index c7b9c24..1cd59fd 100644 --- a/dmidecode.spec +++ b/dmidecode.spec @@ -13,9 +13,13 @@ Patch1: 0002-dmidecode-Add-new-processor-characteristics-bits-from-SMBIOS Patch2: 0003-dmidecode-Missing-comma-in-the-dmi_slot_type.patch Patch3: 0004-dmidecode-Skip-details-of-uninstalled-memory-modules.patch +# http://git.savannah.nongnu.org/cgit/dmidecode.git/patch/?id=7e25483a392e292c58cea67ba4d052856c2f35d0 +Patch1000: 1000-dmidecode-Add-new-memory-device-types-from-SMBIOS-spec-3.4.0.patch + BuildRequires: gcc make ExclusiveArch: %{ix86} x86_64 ia64 aarch64 loongarch64 + %description dmidecode reports information about x86 & ia64 hardware as described in the system BIOS according to the SMBIOS/DMI standard. This information @@ -33,6 +37,7 @@ I/O ports (e.g. serial, parallel, USB). %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch1000 -p1 %build make %{?_smp_mflags} CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" @@ -53,7 +58,8 @@ make %{?_smp_mflags} DESTDIR=%{buildroot} prefix=%{_prefix} install-bin install- %{_mandir}/man8/* %changelog -* Tue Apr 19 2022 yangxiaoxuan - 1:3.3-1.0.1 +* Thu Apr 21 2022 Weitao Zhou - 1:3.3-1.0.1 +- Patch: dmidecode Add new memory device types from SMBIOS spec 3.4.0 - Support loongarch64 * Tue Nov 9 2021 Coiby Xu - 1:3.3-1 -- Gitee