Compare commits
10 Commits
1bcc414d4a
...
72efcb64d8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72efcb64d8 | ||
|
|
c73301a3e5 | ||
|
|
3f75678169 | ||
|
|
20f4911a7e | ||
|
|
1f4092f833 | ||
|
|
7b0e3ccb42 | ||
|
|
abe80ba809 | ||
|
|
64b520dee6 | ||
|
|
9d64f4cabc | ||
|
|
e3bb5de460 |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -1,29 +1,29 @@
|
||||
From a43ffe12212e1a4dd7b0038197b53798d7a3dfb1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Terje=20R=C3=B8sten?= <terje.rosten@ntnu.no>
|
||||
Date: Mon, 2 Apr 2018 14:51:55 +0200
|
||||
From 5da5b63bd38634834bb3e631a24e31a10ab60f27 Mon Sep 17 00:00:00 2001
|
||||
From: Terje Rosten <terje.rosten@ntnu.no>
|
||||
Date: Wed, 25 Mar 2020 21:57:53 +0100
|
||||
Subject: [PATCH] cmakeify
|
||||
|
||||
|
||||
---
|
||||
CMakeLists.txt | 42 ++++++
|
||||
Makefile | 20 ---
|
||||
README.md | 47 ++++---
|
||||
lshw.spec.in | 52 ++------
|
||||
src/CMakeLists.txt | 103 +++++++++++++++
|
||||
src/Makefile | 144 ---------------------
|
||||
src/core/Makefile | 80 ------------
|
||||
src/core/{config.h => config.h.in} | 28 ++--
|
||||
src/core/db.cc | 8 ++
|
||||
src/core/dump.cc | 2 +-
|
||||
src/core/version.h | 2 +
|
||||
src/gui/CMakeLists.txt | 67 ++++++++++
|
||||
src/gui/Makefile | 61 ---------
|
||||
.../{gtk-lshw.desktop => gtk-lshw.desktop.in} | 7 +-
|
||||
src/gui/integration/lshw-gui.in | 5 +
|
||||
src/gui/integration/org.ezix.lshw.gui.policy.in | 20 +++
|
||||
src/gui/stock.c | 1 +
|
||||
src/po/CMakeLists.txt | 16 +++
|
||||
src/po/Makefile | 23 ----
|
||||
19 files changed, 317 insertions(+), 411 deletions(-)
|
||||
CMakeLists.txt | 43 ++++++
|
||||
Makefile | 20 ---
|
||||
README.md | 51 ++++---
|
||||
lshw.spec.in | 66 +++-----
|
||||
src/CMakeLists.txt | 102 +++++++++++++
|
||||
src/Makefile | 144 ------------------
|
||||
src/core/Makefile | 80 ----------
|
||||
src/core/{config.h => config.h.in} | 28 +---
|
||||
src/core/db.cc | 8 +
|
||||
src/core/dump.cc | 2 +-
|
||||
src/core/version.h | 2 +
|
||||
src/gui/CMakeLists.txt | 67 ++++++++
|
||||
src/gui/Makefile | 61 --------
|
||||
.../{gtk-lshw.desktop => gtk-lshw.desktop.in} | 7 +-
|
||||
src/gui/integration/lshw-gui.in | 5 +
|
||||
.../integration/org.ezix.lshw.gui.policy.in | 20 +++
|
||||
src/gui/stock.c | 1 +
|
||||
src/po/CMakeLists.txt | 16 ++
|
||||
src/po/Makefile | 23 ---
|
||||
19 files changed, 327 insertions(+), 419 deletions(-)
|
||||
create mode 100644 CMakeLists.txt
|
||||
delete mode 100644 Makefile
|
||||
create mode 100644 src/CMakeLists.txt
|
||||
@ -37,20 +37,21 @@ Subject: [PATCH] cmakeify
|
||||
create mode 100644 src/gui/integration/org.ezix.lshw.gui.policy.in
|
||||
create mode 100644 src/po/CMakeLists.txt
|
||||
delete mode 100644 src/po/Makefile
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
new file mode 100644
|
||||
index 0000000..6c69c37
|
||||
index 0000000..3b1d4d6
|
||||
--- /dev/null
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -0,0 +1,42 @@
|
||||
@@ -0,0 +1,43 @@
|
||||
+cmake_minimum_required(VERSION 3.0)
|
||||
+
|
||||
+project(lshw)
|
||||
+set(VERSION "B.012.18")
|
||||
+set(VERSION "B.02.19.2")
|
||||
+
|
||||
+IF(EXISTS "${PROJECT_SOURCE_DIR}/.git")
|
||||
+ find_package(Git)
|
||||
+find_package(Git)
|
||||
+
|
||||
+if(EXISTS "${PROJECT_SOURCE_DIR}/.git" AND "${MAKE_RELEASE}" STREQUAL "")
|
||||
+ if(GIT_FOUND)
|
||||
+ execute_process(
|
||||
+ COMMAND ${GIT_EXECUTABLE} describe --tags
|
||||
@ -113,10 +114,10 @@ index 8fe665e..0000000
|
||||
- tar --transform s!^!$(PACKAGENAME)-$(VERSION)/! -rf $(PACKAGENAME)-$(VERSION).tar $^
|
||||
- gzip -f $(PACKAGENAME)-$(VERSION).tar
|
||||
diff --git a/README.md b/README.md
|
||||
index 7afcae6..393da0f 100644
|
||||
index 30feaf1..294888c 100644
|
||||
--- a/README.md
|
||||
+++ b/README.md
|
||||
@@ -15,27 +15,25 @@ Installation
|
||||
@@ -15,27 +15,29 @@ Installation
|
||||
1. Requirements
|
||||
- Linux 2.4.x, 2.6.x, 3.x or 4.x (2.2.x might work, though)
|
||||
- a PA-RISC-, Alpha-, IA-64- (Itanium-), PowerPC-, ARM- or x86- based machine
|
||||
@ -128,13 +129,17 @@ index 7afcae6..393da0f 100644
|
||||
+ - for optional zlib feature install zlib and gzip
|
||||
|
||||
- 2. To compile it, just use:
|
||||
+ 2. Use cmake options to adjust non default set:
|
||||
+ -DGUI=OFF, -DZLIB=ON, -DSQLITE=ON and/or -DNOLOGO=ON
|
||||
+ 2. Use cmake options to decide feature set:
|
||||
+ - -DGUI=OFF - disable graphical user interface version og lshw
|
||||
+ - -DZLIB=ON - enable reading of gzipped datafiles
|
||||
+ - -DSQLITE=ON - enable SQLite support
|
||||
+ - -DPOLICYKIT=ON - enable PolicyKit integration
|
||||
+ - -DNOLOGO=ON - don't install logos with copyright
|
||||
|
||||
- $ make
|
||||
+ 3. Do configuration and build by
|
||||
|
||||
- To complile with zlib support (see below), use:
|
||||
- To compile with zlib support (see below), use:
|
||||
-
|
||||
- $ make ZLIB=1
|
||||
-
|
||||
@ -154,7 +159,7 @@ index 7afcae6..393da0f 100644
|
||||
|
||||
Getting help
|
||||
------------
|
||||
@@ -61,12 +59,27 @@ If compiled with zlib support, lshw will look for `file`.gz first, then for `fil
|
||||
@@ -61,12 +63,27 @@ If compiled with zlib support, lshw will look for `file`.gz first, then for `fil
|
||||
|
||||
Statically-linked and/or compressed binaries can be built by using
|
||||
|
||||
@ -172,8 +177,8 @@ index 7afcae6..393da0f 100644
|
||||
+Building compressed binaries requires `upx` (cf. https://upx.github.io/).
|
||||
|
||||
-in the `src/` directory
|
||||
+Release and maintenance
|
||||
+-----------------------
|
||||
+Release management and data files maintenance
|
||||
+---------------------------------------------
|
||||
|
||||
-Building compressed binaries requires `upx` (cf. https://upx.github.io/).
|
||||
+Create release tarball,
|
||||
@ -181,17 +186,42 @@ index 7afcae6..393da0f 100644
|
||||
+ 1. Edit CMakeLists.txt to set version
|
||||
+ 2. Run
|
||||
+ $ mkdir build && cd build
|
||||
+ $ cmake .. -GNinja
|
||||
+ $ ninja release
|
||||
+ $ cmake .. -DMAKE_RELEASE=ON
|
||||
+ $ make release
|
||||
+
|
||||
+Update hwdata files:
|
||||
+
|
||||
+ $ ninja refresh_hwdata
|
||||
+ $ make refresh_hwdata
|
||||
diff --git a/lshw.spec.in b/lshw.spec.in
|
||||
index c597379..a7655f5 100644
|
||||
index e837fd4..3fe23c2 100644
|
||||
--- a/lshw.spec.in
|
||||
+++ b/lshw.spec.in
|
||||
@@ -52,49 +52,17 @@ http://lshw.ezix.org/
|
||||
@@ -7,11 +7,11 @@ Version: @VERSION@
|
||||
Release: 2
|
||||
Source: http://www.ezix.org/software/files/%{name}-%{version}.tar.gz
|
||||
URL: http://lshw.ezix.org/
|
||||
-License: GPL
|
||||
+License: GPLv2
|
||||
Group: Applications/System
|
||||
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
-
|
||||
-%global debug_package %{nil}
|
||||
+BuildRequires: gcc
|
||||
+BuildRequires: gcc-c++
|
||||
+BuildRequires: cmake
|
||||
|
||||
%description
|
||||
lshw (Hardware Lister) is a small tool to provide detailed information on
|
||||
@@ -39,7 +39,7 @@ lshw (Hardware Lister) is a small tool to provide detailed informaton on
|
||||
the hardware configuration of the machine. It can report exact memory
|
||||
configuration, firmware version, mainboard configuration, CPU version
|
||||
and speed, cache configuration, bus speed, etc. on DMI-capable x86s
|
||||
- systems and on some PowerPC machines (PowerMac G4 is known to work).
|
||||
+systems and on some PowerPC machines (PowerMac G4 is known to work).
|
||||
|
||||
This package provides a graphical user interface to display hardware
|
||||
information.
|
||||
@@ -54,61 +54,29 @@ http://lshw.ezix.org/
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
@ -200,6 +230,7 @@ index c597379..a7655f5 100644
|
||||
- SBINDIR="%{_sbindir}" \
|
||||
- MANDIR="%{_mandir}" \
|
||||
- DATADIR="%{_datadir}" \
|
||||
- VERSION="%{version}" \
|
||||
- all
|
||||
-%if %{!?_without_gui:1}0
|
||||
-%{__make} %{?_smp_mflags} \
|
||||
@ -207,6 +238,7 @@ index c597379..a7655f5 100644
|
||||
- SBINDIR="%{_sbindir}" \
|
||||
- MANDIR="%{_mandir}" \
|
||||
- DATADIR="%{_datadir}" \
|
||||
- VERSION="%{version}" \
|
||||
- gui
|
||||
-%endif
|
||||
+mkdir build && cd build
|
||||
@ -244,11 +276,12 @@ index c597379..a7655f5 100644
|
||||
-%defattr(-,root,root, 0555)
|
||||
-%doc README.md COPYING docs/TODO docs/Changelog docs/lshw.xsd
|
||||
+%license COPYING
|
||||
+%doc COPYING docs/TODO docs/Changelog docs/lshw.xsd
|
||||
+%doc docs/TODO docs/Changelog docs/lshw.xsd
|
||||
%{_sbindir}/lshw
|
||||
%doc %{_mandir}/man?/*
|
||||
-%doc %{_mandir}/man?/*
|
||||
+%{_mandir}/man?/*
|
||||
%{_datadir}/lshw/
|
||||
@@ -102,9 +70,11 @@ http://lshw.ezix.org/
|
||||
%{_datadir}/locale/*/*/*
|
||||
|
||||
%if %{!?_without_gui:1}0
|
||||
%files gui
|
||||
@ -264,10 +297,10 @@ index c597379..a7655f5 100644
|
||||
%changelog
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
new file mode 100644
|
||||
index 0000000..ab559d9
|
||||
index 0000000..8b97a16
|
||||
--- /dev/null
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -0,0 +1,103 @@
|
||||
@@ -0,0 +1,102 @@
|
||||
+if(STATIC)
|
||||
+ set(ZLIB OFF)
|
||||
+ set(SQLITE OFF)
|
||||
@ -351,7 +384,7 @@ index 0000000..ab559d9
|
||||
+ set_target_properties(lshw PROPERTIES LINK_FLAGS "-static" )
|
||||
+endif()
|
||||
+
|
||||
+target_link_libraries(lshw ${SQLITE3_LIBRARIES} ${Z_LIBRARIES} resolv core)
|
||||
+target_link_libraries(lshw ${SQLITE3_LIBRARIES} ${Z_LIBRARIES} core resolv)
|
||||
+
|
||||
+if(NOT ZLIB)
|
||||
+ if(HWDATA)
|
||||
@ -370,10 +403,9 @@ index 0000000..ab559d9
|
||||
+
|
||||
+install(FILES lshw.1 DESTINATION ${MANDIR}/man1 COMPONENT doc)
|
||||
+install(TARGETS lshw DESTINATION sbin)
|
||||
+
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
deleted file mode 100644
|
||||
index 917bf6b..0000000
|
||||
index 7ae8218..0000000
|
||||
--- a/src/Makefile
|
||||
+++ /dev/null
|
||||
@@ -1,144 +0,0 @@
|
||||
@ -399,7 +431,7 @@ index 917bf6b..0000000
|
||||
-export SQLITE
|
||||
-export ZLIB
|
||||
-
|
||||
-CXX?=c++
|
||||
-CXX?=$(CROSS_COMPILE)c++
|
||||
-INCLUDES=-I./core/
|
||||
-DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" -DVERSION=\"$(VERSION)\"
|
||||
-CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
|
||||
@ -409,7 +441,7 @@ index 917bf6b..0000000
|
||||
-ifeq ($(ZLIB), 1)
|
||||
- CXXFLAGS+= -DZLIB $(shell pkg-config --cflags zlib)
|
||||
-endif
|
||||
-LDFLAGS=-L./core/ -g
|
||||
-LDFLAGS+=-L./core/ -g
|
||||
-ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
|
||||
- LDFLAGS+= -Wl,--as-needed
|
||||
-endif
|
||||
@ -523,13 +555,13 @@ index 917bf6b..0000000
|
||||
-# DO NOT DELETE
|
||||
diff --git a/src/core/Makefile b/src/core/Makefile
|
||||
deleted file mode 100644
|
||||
index 884a963..0000000
|
||||
index b429380..0000000
|
||||
--- a/src/core/Makefile
|
||||
+++ /dev/null
|
||||
@@ -1,80 +0,0 @@
|
||||
-PACKAGENAME?=lshw
|
||||
-
|
||||
-CXX=c++
|
||||
-CXX?=$(CROSS_COMPILE)c++
|
||||
-INCLUDES=
|
||||
-DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
|
||||
-CXXFLAGS?=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
|
||||
@ -537,7 +569,7 @@ index 884a963..0000000
|
||||
-LDSTATIC=
|
||||
-LIBS=
|
||||
-
|
||||
-OBJS = hw.o main.o print.o mem.o dmi.o device-tree.o cpuinfo.o osutils.o pci.o version.o cpuid.o ide.o cdrom.o pcmcia-legacy.o scsi.o s390.o disk.o spd.o network.o isapnp.o pnp.o fb.o options.o usb.o sysfs.o display.o heuristics.o parisc.o cpufreq.o partitions.o blockio.o lvm.o ideraid.o pcmcia.o volumes.o mounts.o smp.o abi.o jedec.o dump.o fat.o virtio.o vio.o
|
||||
-OBJS = hw.o main.o print.o mem.o dmi.o device-tree.o cpuinfo.o osutils.o pci.o version.o cpuid.o ide.o cdrom.o pcmcia-legacy.o scsi.o s390.o disk.o spd.o network.o isapnp.o pnp.o fb.o options.o usb.o sysfs.o display.o heuristics.o parisc.o cpufreq.o partitions.o blockio.o lvm.o ideraid.o pcmcia.o volumes.o mounts.o smp.o abi.o jedec.o dump.o fat.o virtio.o vio.o nvme.o mmc.o
|
||||
-ifeq ($(SQLITE), 1)
|
||||
- OBJS+= db.o
|
||||
-endif
|
||||
@ -699,7 +731,7 @@ index 91e039a..5cecdda 100644
|
||||
#else
|
||||
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
|
||||
new file mode 100644
|
||||
index 0000000..48bd3f5
|
||||
index 0000000..3489053
|
||||
--- /dev/null
|
||||
+++ b/src/gui/CMakeLists.txt
|
||||
@@ -0,0 +1,67 @@
|
||||
@ -719,7 +751,7 @@ index 0000000..48bd3f5
|
||||
+include_directories("${GTK2_INCLUDE_DIRS}")
|
||||
+
|
||||
+add_executable(gtk-lshw ${GTK_SOURCES})
|
||||
+target_link_libraries(gtk-lshw ${SQLITE3_LIBRARIES} ${Z_LIBRARIES} ${GTK2_LIBRARIES} resolv core)
|
||||
+target_link_libraries(gtk-lshw ${SQLITE3_LIBRARIES} ${Z_LIBRARIES} ${GTK2_LIBRARIES} core resolv)
|
||||
+install(TARGETS gtk-lshw DESTINATION sbin)
|
||||
+
|
||||
+if(POLICYKIT)
|
||||
@ -756,7 +788,7 @@ index 0000000..48bd3f5
|
||||
+
|
||||
+install(FILES ${LOGOS} DESTINATION ${PROJECT_DATADIR}/artwork)
|
||||
+install(FILES gtk-lshw.ui DESTINATION ${PROJECT_DATADIR}/ui)
|
||||
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gtk-lshw.desktop
|
||||
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gtk-lshw.desktop
|
||||
+ DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/applications)
|
||||
+install(FILES integration/gtk-lshw.appdata.xml DESTINATION
|
||||
+ ${CMAKE_INSTALL_FULL_DATADIR}/appdata)
|
||||
@ -772,14 +804,14 @@ index 0000000..48bd3f5
|
||||
+endif()
|
||||
diff --git a/src/gui/Makefile b/src/gui/Makefile
|
||||
deleted file mode 100644
|
||||
index 2526c18..0000000
|
||||
index f003cfb..0000000
|
||||
--- a/src/gui/Makefile
|
||||
+++ /dev/null
|
||||
@@ -1,61 +0,0 @@
|
||||
-PACKAGENAME?=lshw
|
||||
-
|
||||
-CXX?=c++
|
||||
-CC?=cc
|
||||
-CXX?=$(CROSS_COMPILE)c++
|
||||
-CC?=$(CROSS_COMPILE)cc
|
||||
-STRIP?=strip
|
||||
-OBJCOPY?=objcopy
|
||||
-
|
||||
@ -790,7 +822,7 @@ index 2526c18..0000000
|
||||
-ifeq ($(SQLITE), 1)
|
||||
- CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3)
|
||||
-endif
|
||||
-CFLAGS=$(CXXFLAGS) $(DEFINES)
|
||||
-CFLAGS=$(CXXFLAGS) -g $(DEFINES)
|
||||
-GTKLIBS=$(shell pkg-config gtk+-2.0 gmodule-2.0 --libs)
|
||||
-LIBS+=-L../core -llshw -lresolv $(GTKLIBS)
|
||||
-ifeq ($(SQLITE), 1)
|
||||
@ -956,5 +988,4 @@ index 36fbdb7..0000000
|
||||
-clean:
|
||||
- rm -f $(CATALOGS) $(PACKAGENAME).pot
|
||||
--
|
||||
2.13.6
|
||||
|
||||
2.25.1
|
||||
135
lshw-B.02.19.2-sw.patch
Executable file
135
lshw-B.02.19.2-sw.patch
Executable file
@ -0,0 +1,135 @@
|
||||
diff -Naur lshw-B.02.19.2.org/README.md lshw-B.02.19.2.sw/README.md
|
||||
--- lshw-B.02.19.2.org/README.md 2022-03-02 05:57:54.280000000 +0000
|
||||
+++ lshw-B.02.19.2.sw/README.md 2022-03-02 06:01:57.610000000 +0000
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
1. Requirements
|
||||
- Linux 2.4.x, 2.6.x, 3.x or 4.x (2.2.x might work, though)
|
||||
- - a PA-RISC-, Alpha-, IA-64- (Itanium-), PowerPC-, ARM- or x86- based machine
|
||||
+ - a PA-RISC-, Alpha-, Sw_64-, IA-64- (Itanium-), PowerPC-, ARM- or x86- based machine
|
||||
- cmake, GNU make or Ninja
|
||||
- an ANSI (or close enough to ANSI compliance) C++ compiler (tested with g++ 2.95.4 and 3.x)
|
||||
- for the (optional) GTK+ graphical user interface, you will need a
|
||||
diff -Naur lshw-B.02.19.2.org/src/core/cpuid.cc lshw-B.02.19.2.sw/src/core/cpuid.cc
|
||||
--- lshw-B.02.19.2.org/src/core/cpuid.cc 2022-03-02 05:57:54.280000000 +0000
|
||||
+++ lshw-B.02.19.2.sw/src/core/cpuid.cc 2022-03-02 06:17:08.250000000 +0000
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
__ID("@(#) $Id$");
|
||||
|
||||
-#if defined(__i386__) || defined(__alpha__)
|
||||
+#if defined(__i386__) || defined(__alpha__) || defined(__sw_64__)
|
||||
|
||||
static hwNode *getcache(hwNode & node,
|
||||
int n = 0)
|
||||
@@ -70,7 +70,7 @@
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
-#endif // __i386__ || __alpha__
|
||||
+#endif // __i386__ || __alpha__ || __sw_64__
|
||||
|
||||
#ifdef __i386__
|
||||
|
||||
diff -Naur lshw-B.02.19.2.org/src/core/cpuinfo.cc lshw-B.02.19.2.sw/src/core/cpuinfo.cc
|
||||
--- lshw-B.02.19.2.org/src/core/cpuinfo.cc 2022-03-02 05:57:54.280000000 +0000
|
||||
+++ lshw-B.02.19.2.sw/src/core/cpuinfo.cc 2022-03-02 06:09:36.460000000 +0000
|
||||
@@ -360,6 +360,63 @@
|
||||
}
|
||||
}
|
||||
|
||||
+static void cpuinfo_sw_64(hwNode & node,
|
||||
+string id,
|
||||
+string value)
|
||||
+{
|
||||
+ static int cpusdetected = 0;
|
||||
+ static int cpusactive = 0;
|
||||
+ unsigned long long frequency = 0;
|
||||
+ int i;
|
||||
+
|
||||
+ hwNode *cpu = getcpu(node, 0);
|
||||
+
|
||||
+ if (id == "platform string" && node.getProduct() == "")
|
||||
+ node.setProduct(value);
|
||||
+ if (id == "system serial number" && node.getSerial() == "")
|
||||
+ node.setSerial(value);
|
||||
+ if (id == "system type")
|
||||
+ node.setVersion(node.getVersion() + " " + value);
|
||||
+ if (id == "system variation")
|
||||
+ node.setVersion(node.getVersion() + " " + value);
|
||||
+ if (id == "system revision")
|
||||
+ node.setVersion(node.getVersion() + " " + value);
|
||||
+
|
||||
+ if (id == "cpus detected")
|
||||
+ cpusdetected = atoi(value.c_str());
|
||||
+ if (id == "cpus active")
|
||||
+ cpusactive = atoi(value.c_str());
|
||||
+ if (id == "cycle frequency [Hz]")
|
||||
+ frequency = atoll(value.c_str());
|
||||
+
|
||||
+ if (cpu)
|
||||
+ {
|
||||
+ cpu->claim(true);
|
||||
+
|
||||
+ if (frequency)
|
||||
+ cpu->setSize(frequency);
|
||||
+ }
|
||||
+
|
||||
+ for (i = 1; i < cpusdetected; i++)
|
||||
+ {
|
||||
+ hwNode *mycpu = getcpu(node, i);
|
||||
+
|
||||
+ if (mycpu)
|
||||
+ {
|
||||
+ mycpu->disable();
|
||||
+
|
||||
+ if (cpu)
|
||||
+ mycpu->setSize(cpu->getSize());
|
||||
+ }
|
||||
+ }
|
||||
+ for (i = 1; i < cpusactive; i++)
|
||||
+ {
|
||||
+ hwNode *mycpu = getcpu(node, i);
|
||||
+
|
||||
+ if (mycpu)
|
||||
+ mycpu->enable();
|
||||
+ }
|
||||
+}
|
||||
static void cpuinfo_alpha(hwNode & node,
|
||||
string id,
|
||||
string value)
|
||||
@@ -637,6 +694,10 @@
|
||||
{
|
||||
cpuinfo_alpha(n, id, value);
|
||||
}
|
||||
+ else if (plat == "sw_64")
|
||||
+ {
|
||||
+ cpuinfo_sw_64(n, id, value);
|
||||
+ }
|
||||
else if (plat == "ia64")
|
||||
{
|
||||
cpuinfo_ia64(n, id, value);
|
||||
diff -Naur lshw-B.02.19.2.org/src/core/dmi.cc lshw-B.02.19.2.sw/src/core/dmi.cc
|
||||
--- lshw-B.02.19.2.org/src/core/dmi.cc 2022-03-02 05:57:54.280000000 +0000
|
||||
+++ lshw-B.02.19.2.sw/src/core/dmi.cc 2022-03-02 06:11:38.140000000 +0000
|
||||
@@ -734,7 +734,8 @@
|
||||
"Core M3",
|
||||
"Core M5",
|
||||
"Core M7",
|
||||
- "Alpha", /* 0x30 */
|
||||
+ "Sw_64", /* 0x9916 */
|
||||
+ "Alpha", /* 0x30 */
|
||||
"Alpha 21064",
|
||||
"Alpha 21066",
|
||||
"Alpha 21164",
|
||||
diff -Naur lshw-B.02.19.2.org/src/core/pci.cc lshw-B.02.19.2.sw/src/core/pci.cc
|
||||
--- lshw-B.02.19.2.org/src/core/pci.cc 2022-03-02 05:57:54.290000000 +0000
|
||||
+++ lshw-B.02.19.2.sw/src/core/pci.cc 2022-03-02 06:13:58.590000000 +0000
|
||||
@@ -169,6 +169,7 @@
|
||||
#define PCI_CLASS_PROCESSOR_486 0x0b01
|
||||
#define PCI_CLASS_PROCESSOR_PENTIUM 0x0b02
|
||||
#define PCI_CLASS_PROCESSOR_ALPHA 0x0b10
|
||||
+#define PCI_CLASS_PROCESSOR_SW_64 0x9916
|
||||
#define PCI_CLASS_PROCESSOR_POWERPC 0x0b20
|
||||
#define PCI_CLASS_PROCESSOR_CO 0x0b40
|
||||
|
||||
BIN
lshw-B.02.19.2.tar.gz
Normal file
BIN
lshw-B.02.19.2.tar.gz
Normal file
Binary file not shown.
23
lshw.spec
23
lshw.spec
@ -1,14 +1,15 @@
|
||||
Name: lshw
|
||||
Version: B.02.18
|
||||
Release: 21
|
||||
Version: B.02.19.2
|
||||
Release: 3
|
||||
Summary: Hardware lister
|
||||
License: GPLv2
|
||||
URL: http://ezix.org/project/wiki/HardwareLiSter
|
||||
Source0: http://www.ezix.org/software/files/%{name}-%{version}.tar.gz
|
||||
Patch0: lshw-B.02.18-scandir.patch
|
||||
Patch1: lshw-B.02.18-20cda77.patch
|
||||
|
||||
Patch2: lshw-B.02.18-revert-json.patch
|
||||
Patch3: lshw-B.02.18-cmake.patch
|
||||
Patch3: lshw-B.02.19.2-cmake.patch
|
||||
Patch4: lshw-B.02.19.2-sw.patch
|
||||
|
||||
BuildRequires: gcc gcc-c++ cmake gettext
|
||||
BuildRequires: desktop-file-utils libappstream-glib ninja-build
|
||||
@ -35,9 +36,12 @@ The %{name}-help package contains doc files for %{name}.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch00 -p1
|
||||
%patch01 -p1
|
||||
|
||||
%patch02 -R -p1
|
||||
%patch03 -p1
|
||||
%ifarch sw_64
|
||||
%patch04 -p1
|
||||
%endif
|
||||
|
||||
%build
|
||||
mkdir -p build && cd build
|
||||
@ -74,6 +78,15 @@ src/lshw -json -disable usb -disable pcmcia -disable isapnp \
|
||||
%{_mandir}/man1/lshw.1.gz
|
||||
|
||||
%changelog
|
||||
* Mon Apr 24 2023 guoqinglan <guoqinglan@kylinsec.com.cn> - B.02.19.2-3
|
||||
- fix build error for sw_64
|
||||
|
||||
* Mon Oct 24 2022 wuzx<wuzx1226@qq.com> - B.02.19.2-2
|
||||
- add sw64 patch
|
||||
|
||||
* Wed Jan 27 2021 yuanxin <yuanxin24@huawei.com> - B.02.19.2-1
|
||||
- upgrade version to B.02.19.2
|
||||
|
||||
* Fri Feb 14 2020 chengquan <chengquan3@huawei.com> - B.02.18-21
|
||||
- Rollback some patches for bugfix
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user