From cb8b658c85de3b38078744db29390a6900fd0946 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 e911b40..ee72d20 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: 4%{?dist} +Release: 4%{anolis_release}%{?dist} Epoch: 1 License: GPLv2+ Source0: http://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.xz @@ -17,7 +18,7 @@ Patch6: 0007-dmidecode-Fix-crash-with-u-option.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-4.0.1 +- Support loongarch64 + * Wed Jan 26 2022 Coiby Xu - 1:3.3-4 - Resolves: rhbz#2042224 -- Gitee From 69c04923dd110ff49e2be199833ae50b0b554267 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 | 5 +++ 2 files changed, 37 insertions(+) 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 ee72d20..d83c69e 100644 --- a/dmidecode.spec +++ b/dmidecode.spec @@ -17,9 +17,13 @@ Patch5: 0006-dmidecode-Add-new-memory-device-types-from-SMBIOS-spec-3.4.0 Patch6: 0007-dmidecode-Fix-crash-with-u-option.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 @@ -54,6 +58,7 @@ make %{?_smp_mflags} DESTDIR=%{buildroot} prefix=%{_prefix} install-bin install- %changelog * Tue Apr 19 2022 yangxiaoxuan - 1:3.3-4.0.1 +- Patch: dmidecode Add new memory device types from SMBIOS spec 3.4.0 (Weitao Zhou) - Support loongarch64 * Wed Jan 26 2022 Coiby Xu - 1:3.3-4 -- Gitee