import lshw-B.02.19.2-2.el8
This commit is contained in:
parent
98cee4bfa8
commit
ddeb789dae
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/lshw-B.02.18.tar.gz
|
||||
SOURCES/lshw-B.02.19.2.tar.gz
|
||||
|
@ -1 +1 @@
|
||||
c0240f5e53cf40769d52e316719e8010ea6bdea3 SOURCES/lshw-B.02.18.tar.gz
|
||||
f44f0fa34968fdc0cce42e83c44b17e43579e978 SOURCES/lshw-B.02.19.2.tar.gz
|
||||
|
@ -1,49 +0,0 @@
|
||||
From 85edb6a1a5734078a58bad21a5e6918e07f360bc Mon Sep 17 00:00:00 2001
|
||||
From: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com>
|
||||
Date: Tue, 30 Apr 2019 17:24:50 +0530
|
||||
Subject: [PATCH] Display proper logical name of network device
|
||||
|
||||
This patch adds support to display proper logical name of
|
||||
network devices.
|
||||
|
||||
Test results:
|
||||
|
||||
*-l-lan
|
||||
description: Ethernet interface
|
||||
physical id: 2
|
||||
bus info: vio@30000002
|
||||
logical name: /proc/device-tree/vdevice/l-lan@30000002
|
||||
|
||||
With patch:
|
||||
|
||||
*-l-lan
|
||||
description: Ethernet interface
|
||||
physical id: 2
|
||||
bus info: vio@30000002
|
||||
logical name: /proc/device-tree/vdevice/l-lan@30000002
|
||||
logical name: eth0
|
||||
|
||||
Signed-off-by: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com>
|
||||
Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
|
||||
---
|
||||
src/core/hw.cc | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/core/hw.cc b/src/core/hw.cc
|
||||
index f136383e99fb..4522c1af0fc3 100644
|
||||
--- a/src/core/hw.cc
|
||||
+++ b/src/core/hw.cc
|
||||
@@ -1284,8 +1284,8 @@ void hwNode::merge(const hwNode & node)
|
||||
This->handle = node.getHandle();
|
||||
if (This->description == "")
|
||||
This->description = node.getDescription();
|
||||
- if (This->logicalnames.size() == 0)
|
||||
- This->logicalnames = node.getLogicalNames();
|
||||
+ for (unsigned int i = 0; i < node.This->logicalnames.size(); i++)
|
||||
+ setLogicalName(node.This->logicalnames[i]);
|
||||
if (This->businfo == "")
|
||||
This->businfo = node.getBusInfo();
|
||||
if (This->physid == "")
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,64 +0,0 @@
|
||||
From 028f6b229a138211d17bb32b8668dc73e6724464 Mon Sep 17 00:00:00 2001
|
||||
From: Lyonel Vincent <lyonel@ezix.org>
|
||||
Date: Thu, 14 Jun 2018 19:17:26 +0200
|
||||
Subject: [PATCH 1/8] merge Github PR #40 and #41
|
||||
|
||||
Properly handle scsi device type 0x14 (== 20) to add ZBC and ZAC host
|
||||
managed zoned block devices to the "disk" class. While at it, also add
|
||||
in scsi_type() the missing type name string for the device
|
||||
type 0xe (== 14).
|
||||
|
||||
---
|
||||
lshw.spec.in | 2 +-
|
||||
src/core/scsi.cc | 8 +++++++-
|
||||
2 files changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lshw.spec.in b/lshw.spec.in
|
||||
index c597379c3bc8..f7f88b323ce9 100644
|
||||
--- a/lshw.spec.in
|
||||
+++ b/lshw.spec.in
|
||||
@@ -12,7 +12,7 @@ Group: Applications/System
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
%description
|
||||
-lshw (Hardware Lister) is a small tool to provide detailed informaton on
|
||||
+lshw (Hardware Lister) is a small tool to provide detailed information 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
|
||||
diff --git a/src/core/scsi.cc b/src/core/scsi.cc
|
||||
index 75061c0fb195..4992c889dd12 100644
|
||||
--- a/src/core/scsi.cc
|
||||
+++ b/src/core/scsi.cc
|
||||
@@ -260,6 +260,10 @@ static const char *scsi_type(int type)
|
||||
return "Medium Changer";
|
||||
case 0xd:
|
||||
return "Enclosure";
|
||||
+ case 0xe:
|
||||
+ return "Simplified direct-access device";
|
||||
+ case 0x14:
|
||||
+ return "Host managed zoned block device";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
@@ -706,6 +710,7 @@ static void scan_sg(hwNode & n)
|
||||
{
|
||||
case 0:
|
||||
case 14:
|
||||
+ case 20:
|
||||
device = hwNode("disk", hw::disk);
|
||||
break;
|
||||
case 1:
|
||||
@@ -752,7 +757,8 @@ static void scan_sg(hwNode & n)
|
||||
}
|
||||
if ((m_id.scsi_type == 4) || (m_id.scsi_type == 5))
|
||||
scan_cdrom(device);
|
||||
- if ((m_id.scsi_type == 0) || (m_id.scsi_type == 7) || (m_id.scsi_type == 14))
|
||||
+ if ((m_id.scsi_type == 0) || (m_id.scsi_type == 7) ||
|
||||
+ (m_id.scsi_type == 14) || (m_id.scsi_type == 20))
|
||||
scan_disk(device);
|
||||
|
||||
if (!adapter_businfo.empty())
|
||||
--
|
||||
2.17.1
|
||||
|
96
SOURCES/0001-report-CPU-family-model-stepping.patch
Normal file
96
SOURCES/0001-report-CPU-family-model-stepping.patch
Normal file
@ -0,0 +1,96 @@
|
||||
From f914f225975bb4a146792c2b0181b8d0e01ff3a6 Mon Sep 17 00:00:00 2001
|
||||
From: Lyonel Vincent <lyonel@ezix.org>
|
||||
Date: Sat, 28 Mar 2020 11:54:10 +0100
|
||||
Subject: [PATCH 01/17] report CPU family/model/stepping
|
||||
|
||||
---
|
||||
src/core/cpuinfo.cc | 21 +++++++++++++++++++--
|
||||
src/core/hw.cc | 20 ++++++++++++++++++++
|
||||
src/core/hw.h | 1 +
|
||||
3 files changed, 40 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/core/cpuinfo.cc b/src/core/cpuinfo.cc
|
||||
index 33085fda1159..eceb83aa4e3a 100644
|
||||
--- a/src/core/cpuinfo.cc
|
||||
+++ b/src/core/cpuinfo.cc
|
||||
@@ -463,6 +463,14 @@ string value)
|
||||
}
|
||||
if (id == "model name")
|
||||
cpu->setProduct(value);
|
||||
+ if (id == "microcode")
|
||||
+ cpu->setConfig(id, stoll(value, NULL, 0));
|
||||
+ if (id == "cpu family")
|
||||
+ cpu->addHint(id, stoll(value, NULL, 0));
|
||||
+ if (id == "model")
|
||||
+ cpu->addHint(id, stoll(value, NULL, 0));
|
||||
+ if (id == "stepping")
|
||||
+ cpu->addHint(id, stoll(value, NULL, 0));
|
||||
//if ((id == "cpu MHz") && (cpu->getSize() == 0))
|
||||
//{
|
||||
//cpu->setSize((long long) (1000000L * atof(value.c_str())));
|
||||
@@ -667,8 +675,17 @@ bool scan_cpuinfo(hwNode & n)
|
||||
}
|
||||
|
||||
hwNode *cpu = getcpu(n, 0);
|
||||
- if(cpu && (n.getWidth()==0))
|
||||
- n.setWidth(cpu->getWidth());
|
||||
+ if(cpu)
|
||||
+ {
|
||||
+ hw::value family, model, stepping;
|
||||
+ family = cpu->getHint("cpu family");
|
||||
+ model = cpu->getHint("model");
|
||||
+ stepping = cpu->getHint("stepping");
|
||||
+ if(family.defined() && model.defined() && stepping.defined())
|
||||
+ cpu->setVersion(tostring(family.asInteger())+"."+tostring(model.asInteger())+"."+tostring(stepping.asInteger()));
|
||||
+ if(n.getWidth()==0)
|
||||
+ n.setWidth(cpu->getWidth());
|
||||
+ }
|
||||
|
||||
return true;
|
||||
}
|
||||
diff --git a/src/core/hw.cc b/src/core/hw.cc
|
||||
index 4522c1af0fc3..a59273008862 100644
|
||||
--- a/src/core/hw.cc
|
||||
+++ b/src/core/hw.cc
|
||||
@@ -2432,6 +2432,26 @@ string value::asString() const
|
||||
}
|
||||
|
||||
|
||||
+long long value::asInteger() const
|
||||
+{
|
||||
+ if(!This) return 0;
|
||||
+
|
||||
+ switch(This->type)
|
||||
+ {
|
||||
+ case hw::text:
|
||||
+ return stoll(This->s, NULL, 0);
|
||||
+ case hw::integer:
|
||||
+ return This->ll;
|
||||
+ case hw::boolean:
|
||||
+ return This->b?1:0;
|
||||
+ case hw::nil:
|
||||
+ return 0;
|
||||
+ };
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
bool value::defined() const
|
||||
{
|
||||
if(!This) return false;
|
||||
diff --git a/src/core/hw.h b/src/core/hw.h
|
||||
index 3cb782b0e635..451e9b3cf26a 100644
|
||||
--- a/src/core/hw.h
|
||||
+++ b/src/core/hw.h
|
||||
@@ -79,6 +79,7 @@ namespace hw
|
||||
bool operator ==(const value &) const;
|
||||
|
||||
string asString() const;
|
||||
+ long long asInteger() const;
|
||||
bool defined() const;
|
||||
|
||||
private:
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,62 +0,0 @@
|
||||
From 881075c79be4706a2b3bcd5a75eb659b0e394fce Mon Sep 17 00:00:00 2001
|
||||
From: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
||||
Date: Mon, 23 Apr 2018 16:41:40 +0530
|
||||
Subject: [PATCH] spd: Print dimm rank information
|
||||
|
||||
Print DIMM rank information under configuration. Supported for
|
||||
DDR3 and DDR4.
|
||||
|
||||
Sample output:
|
||||
*-bank:1
|
||||
description: RDIMM DDR4 2666 MHz (0.4ns)
|
||||
product: M393A2G40EB2-CTD
|
||||
......
|
||||
configuration: errordetection=ecc rank=1
|
||||
|
||||
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
||||
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
|
||||
---
|
||||
src/core/device-tree.cc | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/src/core/device-tree.cc b/src/core/device-tree.cc
|
||||
index 642b3c54ece1..a510e4bea726 100644
|
||||
--- a/src/core/device-tree.cc
|
||||
+++ b/src/core/device-tree.cc
|
||||
@@ -862,6 +862,7 @@ static void add_memory_bank_spd(string path, hwNode & bank)
|
||||
close(fd);
|
||||
|
||||
if (dimminfo[2] >= 9) {
|
||||
+ int rank_offset;
|
||||
double ns;
|
||||
char vendor[5];
|
||||
const char *type, *mod_type;
|
||||
@@ -878,6 +879,7 @@ static void add_memory_bank_spd(string path, hwNode & bank)
|
||||
partno_offset = 0x149;
|
||||
bus_width_offset = 0x0d;
|
||||
serial_offset = 0x145;
|
||||
+ rank_offset = 0xc;
|
||||
|
||||
/*
|
||||
* There is no other valid values for the medium- and fine- timebase
|
||||
@@ -896,6 +898,7 @@ static void add_memory_bank_spd(string path, hwNode & bank)
|
||||
partno_offset = 0x80;
|
||||
serial_offset = 0x7a;
|
||||
bus_width_offset = 0x08;
|
||||
+ rank_offset = 0x7;
|
||||
|
||||
ns = (dimminfo[0xc] / 2) * (dimminfo[0xa] / (float) dimminfo[0xb]);
|
||||
snprintf(vendor, sizeof(vendor), "%x%x", dimminfo[0x76], dimminfo[0x75]);
|
||||
@@ -913,6 +916,9 @@ static void add_memory_bank_spd(string path, hwNode & bank)
|
||||
break;
|
||||
}
|
||||
|
||||
+ // Add DIMM rank
|
||||
+ bank.setConfig("rank", ((dimminfo[rank_offset] >> 3) & 0x7) + 1);
|
||||
+
|
||||
bank.setClock(1000000000 / ns);
|
||||
bank.setVendor(jedec_resolve(vendor));
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,72 +0,0 @@
|
||||
From 60173f077a54610e7b80f24e9189aee29fbd6012 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Callaghan <dcallagh@redhat.com>
|
||||
Date: Mon, 9 Jul 2018 17:46:39 +1000
|
||||
Subject: [PATCH 2/8] Avoid very long IDE programming interface names as
|
||||
capabilities
|
||||
|
||||
Recent versions of the PCIID database added programming interface names
|
||||
for IDE controllers, like this:
|
||||
|
||||
01 IDE interface
|
||||
00 ISA Compatibility mode-only controller
|
||||
05 PCI native mode-only controller
|
||||
0a ISA Compatibility mode controller, supports both channels switched to PCI native mode
|
||||
0f PCI native mode controller, supports both channels switched to ISA compatibility mode
|
||||
80 ISA Compatibility mode-only controller, supports bus mastering
|
||||
85 PCI native mode-only controller, supports bus mastering
|
||||
8a ISA Compatibility mode controller, supports both channels switched to PCI native mode, supports bus mastering
|
||||
8f PCI native mode controller, supports both channels switched to ISA compatibility mode, supports bus mastering
|
||||
|
||||
resulting in an awkwardly named capability for the IDE controller:
|
||||
|
||||
<capabilities>
|
||||
<capability id="ide" />
|
||||
<capability id="pci_native_mode_controller__supports_both_channels_switched_to_isa_compatibility_mode__supports_bus_mastering" />
|
||||
<capability id="bus_master" >bus mastering</capability>
|
||||
</capabilities>
|
||||
|
||||
This patch adds a special case for IDE controllers to avoid using the
|
||||
programming interface name as a capability. Instead, separate
|
||||
capabilities are added for the possible combinations:
|
||||
|
||||
<capabilities>
|
||||
<capability id="ide" />
|
||||
<capability id="isa_compat_mode" >ISA compatibility mode</capability>
|
||||
<capability id="pci_native_mode" >PCI native mode</capability>
|
||||
<capability id="bus_master" >bus mastering</capability>
|
||||
</capabilities>
|
||||
|
||||
---
|
||||
src/core/pci.cc | 16 +++++++++++++++-
|
||||
1 file changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/pci.cc b/src/core/pci.cc
|
||||
index d6111fdf096d..c8380c3034be 100644
|
||||
--- a/src/core/pci.cc
|
||||
+++ b/src/core/pci.cc
|
||||
@@ -965,7 +965,21 @@ static hwNode *scan_pci_dev(struct pci_dev &d, hwNode & n)
|
||||
}
|
||||
device->setDescription(get_class_description(dclass));
|
||||
|
||||
- if (moredescription != ""
|
||||
+ if (dclass == PCI_CLASS_STORAGE_IDE)
|
||||
+ {
|
||||
+ // IDE programming interface names are really long and awkward,
|
||||
+ // so don't add them as capabilities
|
||||
+ if (progif == 0x00 || progif == 0x80)
|
||||
+ device->addCapability("isa_compat_mode", "ISA compatibility mode");
|
||||
+ else if (progif == 0x05 || progif == 0x85)
|
||||
+ device->addCapability("pci_native_mode", "PCI native mode");
|
||||
+ else if (progif == 0x0a || progif == 0x0f || progif == 0x8a || progif == 0x8f)
|
||||
+ {
|
||||
+ device->addCapability("isa_compat_mode", "ISA compatibility mode");
|
||||
+ device->addCapability("pci_native_mode", "PCI native mode");
|
||||
+ }
|
||||
+ }
|
||||
+ else if (moredescription != ""
|
||||
&& moredescription != device->getDescription())
|
||||
{
|
||||
device->addCapability(moredescription);
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,43 +0,0 @@
|
||||
From 8d03e1e101c92a8c30103e4fcf3b930d37202e86 Mon Sep 17 00:00:00 2001
|
||||
From: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
||||
Date: Mon, 23 Apr 2018 23:37:33 +0530
|
||||
Subject: [PATCH] devtree: Add DIMM running speed
|
||||
|
||||
We parse 'spd' data to get max speed. But actual running speed may be
|
||||
lesser than max speed. On recent Power System we have 'frequency'
|
||||
property inside memory node in device tree. Lets add support in lshw
|
||||
to display this information.
|
||||
|
||||
Sample output:
|
||||
*-bank:1
|
||||
description: RDIMM DDR4 2666 MHz (0.4ns)
|
||||
product: HMAA8GR7A2R4N-VN
|
||||
physical id: 0
|
||||
....
|
||||
....
|
||||
clock: 2666MHz (0.4ns)
|
||||
|
||||
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
||||
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
|
||||
---
|
||||
src/core/device-tree.cc | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/core/device-tree.cc b/src/core/device-tree.cc
|
||||
index dea4140b3a96..c53558d08f3d 100644
|
||||
--- a/src/core/device-tree.cc
|
||||
+++ b/src/core/device-tree.cc
|
||||
@@ -1038,6 +1038,10 @@ static void add_memory_bank(string name, string path, hwNode & core)
|
||||
if (exists("spd"))
|
||||
add_memory_bank_spd(path + "/" + name + "/spd", bank);
|
||||
|
||||
+ // Parse Memory SPD data
|
||||
+ if (exists("frequency"))
|
||||
+ bank.setClock(get_u32("frequency"));
|
||||
+
|
||||
memory->addChild(bank);
|
||||
} else if(name.substr(0, 4) == "dimm") {
|
||||
hwNode bank("bank", hw::memory);
|
||||
--
|
||||
2.17.1
|
||||
|
53
SOURCES/0002-move-PnP-devices-to-the-ISA-LPC-bridge.patch
Normal file
53
SOURCES/0002-move-PnP-devices-to-the-ISA-LPC-bridge.patch
Normal file
@ -0,0 +1,53 @@
|
||||
From 126bc4387648fabf0478d0b869fe6bc52676b447 Mon Sep 17 00:00:00 2001
|
||||
From: Lyonel Vincent <lyonel@ezix.org>
|
||||
Date: Sun, 29 Mar 2020 19:25:39 +0200
|
||||
Subject: [PATCH 02/17] move PnP devices to the ISA/LPC bridge
|
||||
|
||||
---
|
||||
src/core/pnp.cc | 14 ++++++++++----
|
||||
1 file changed, 10 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/core/pnp.cc b/src/core/pnp.cc
|
||||
index 8c92adf647a0..6a391856ec52 100644
|
||||
--- a/src/core/pnp.cc
|
||||
+++ b/src/core/pnp.cc
|
||||
@@ -165,6 +165,11 @@ hw::hwClass pnp_class(const string & pnpid)
|
||||
return hw::generic;
|
||||
}
|
||||
|
||||
+static bool ISAbridge(const hwNode & n)
|
||||
+{
|
||||
+ return n.getClass()==hw::bridge && n.isCapable("isa");
|
||||
+}
|
||||
+
|
||||
bool scan_pnp(hwNode & n)
|
||||
{
|
||||
vector < sysfs::entry > entries = sysfs::entries_by_bus("pnp");
|
||||
@@ -172,11 +177,12 @@ bool scan_pnp(hwNode & n)
|
||||
if (entries.empty())
|
||||
return false;
|
||||
|
||||
- hwNode *core = n.getChild("core");
|
||||
- if (!core)
|
||||
+ hwNode *isapnpbridge = n.findChild(ISAbridge);
|
||||
+ if (!isapnpbridge) isapnpbridge = n.getChild("core");
|
||||
+ if (!isapnpbridge)
|
||||
{
|
||||
n.addChild(hwNode("core", hw::bus));
|
||||
- core = n.getChild("core");
|
||||
+ isapnpbridge = n.getChild("core");
|
||||
}
|
||||
|
||||
for (vector < sysfs::entry >::iterator it = entries.begin();
|
||||
@@ -208,7 +214,7 @@ bool scan_pnp(hwNode & n)
|
||||
device.setProduct("PnP device " + pnpid);
|
||||
device.claim();
|
||||
|
||||
- core->addChild(device);
|
||||
+ isapnpbridge->addChild(device);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,27 +0,0 @@
|
||||
From 4e963955897536be49df9678d07ce7529ed7bdf3 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Callaghan <dcallagh@redhat.com>
|
||||
Date: Wed, 11 Jul 2018 12:48:51 +1000
|
||||
Subject: [PATCH 3/8] Set powerpc logo hint
|
||||
|
||||
Previously, when the CPU information was coming from /proc/cpuinfo, this
|
||||
logo hint was being set.
|
||||
|
||||
---
|
||||
src/core/device-tree.cc | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/core/device-tree.cc b/src/core/device-tree.cc
|
||||
index 642b3c54ece1..790362250294 100644
|
||||
--- a/src/core/device-tree.cc
|
||||
+++ b/src/core/device-tree.cc
|
||||
@@ -695,6 +695,7 @@ static void scan_devtree_cpu_power(hwNode & core)
|
||||
}
|
||||
|
||||
cpu.setDescription("CPU");
|
||||
+ cpu.addHint("logo", string("powerpc"));
|
||||
set_cpu(cpu, currentcpu++, basepath);
|
||||
|
||||
reg = get_u32(basepath + "/reg");
|
||||
--
|
||||
2.17.1
|
||||
|
34
SOURCES/0003-correctly-format-SMBIOS-UUID.patch
Normal file
34
SOURCES/0003-correctly-format-SMBIOS-UUID.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From bb82dda52da2029a527577a796daffcbc97d8e83 Mon Sep 17 00:00:00 2001
|
||||
From: Lyonel Vincent <lyonel@ezix.org>
|
||||
Date: Mon, 30 Mar 2020 23:36:15 +0200
|
||||
Subject: [PATCH 03/17] correctly format SMBIOS UUID
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
cf. https://en.wikipedia.org/wiki/Universally_unique_identifier (RFC 4122 Section 3 requires that the characters be generated in lower case, while being case-insensitive on input.)
|
||||
|
||||
cf. https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_2.7.1.pdf §7.2.1
|
||||
|
||||
---
|
||||
src/core/dmi.cc | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/core/dmi.cc b/src/core/dmi.cc
|
||||
index c4c01e02a392..30b3ab3b995c 100644
|
||||
--- a/src/core/dmi.cc
|
||||
+++ b/src/core/dmi.cc
|
||||
@@ -195,8 +195,8 @@ static string dmi_uuid(const u8 * p)
|
||||
return string(REMOVED);
|
||||
|
||||
snprintf(buffer, sizeof(buffer),
|
||||
- "%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X",
|
||||
- p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], p[8], p[9], p[10],
|
||||
+ "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
|
||||
+ p[3], p[2], p[1], p[0], p[5], p[4], p[7], p[6], p[8], p[9], p[10],
|
||||
p[11], p[12], p[13], p[14], p[15]);
|
||||
|
||||
return hw::strip(string(buffer));
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,49 +0,0 @@
|
||||
From 5c69f583963c01afefeff967416ea79fbfafd1f6 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Callaghan <dcallagh@redhat.com>
|
||||
Date: Wed, 11 Jul 2018 13:34:55 +1000
|
||||
Subject: [PATCH 4/8] Fix DIMM info for older IBM POWER systems
|
||||
|
||||
Commit f95aa917 applied the patch from #695, adding the
|
||||
scan_devtree_memory_ibm() function, but it called the function in the
|
||||
wrong place. The function finds memory-controller@* nodes on older IBM
|
||||
POWER systems, not newer OPAL firmware based ones.
|
||||
|
||||
This patch has the side effect of reordering CPU nodes before memory
|
||||
nodes on non-IBM device-tree-based hardware (like Calxeda Highbank and
|
||||
other unusual stuff). That is in line with other platforms.
|
||||
|
||||
---
|
||||
src/core/device-tree.cc | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/core/device-tree.cc b/src/core/device-tree.cc
|
||||
index 642b3c54ece1..23ef797788cb 100644
|
||||
--- a/src/core/device-tree.cc
|
||||
+++ b/src/core/device-tree.cc
|
||||
@@ -1395,7 +1395,6 @@ bool scan_device_tree(hwNode & n)
|
||||
core->addHint("icon", string("board"));
|
||||
scan_devtree_root(*core);
|
||||
scan_devtree_cpu_power(*core);
|
||||
- scan_devtree_memory_ibm(*core);
|
||||
scan_devtree_memory_powernv(*core);
|
||||
scan_devtree_firmware_powernv(*core);
|
||||
n.addCapability("powernv", "Non-virtualized");
|
||||
@@ -1448,12 +1447,12 @@ bool scan_device_tree(hwNode & n)
|
||||
if (exists(DEVICETREE "/ibm,lpar-capable")) {
|
||||
n.setDescription("pSeries LPAR");
|
||||
scan_devtree_cpu_power(*core);
|
||||
- scan_devtree_memory(*core);
|
||||
}
|
||||
else {
|
||||
- scan_devtree_memory(*core);
|
||||
scan_devtree_cpu(*core);
|
||||
- }
|
||||
+ }
|
||||
+ scan_devtree_memory(*core);
|
||||
+ scan_devtree_memory_ibm(*core);
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
27
SOURCES/0004-cosmetic-clean-up.patch
Normal file
27
SOURCES/0004-cosmetic-clean-up.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From aea375aeb4f58a35afd1ec2998a04060bc8fccfa Mon Sep 17 00:00:00 2001
|
||||
From: Lyonel Vincent <lyonel@ezix.org>
|
||||
Date: Tue, 31 Mar 2020 23:27:36 +0200
|
||||
Subject: [PATCH 04/17] cosmetic clean-up
|
||||
|
||||
---
|
||||
src/core/mmc.cc | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/core/mmc.cc b/src/core/mmc.cc
|
||||
index 96c2c49e4597..1385e116c7ae 100644
|
||||
--- a/src/core/mmc.cc
|
||||
+++ b/src/core/mmc.cc
|
||||
@@ -327,8 +327,8 @@ bool scan_mmc(hwNode & n)
|
||||
device->setDescription("MMC Host");
|
||||
device->setModalias(e.modalias());
|
||||
|
||||
- vector < sysfs::entry > namespaces = e.devices();
|
||||
- for(vector < sysfs::entry >::iterator i = namespaces.begin(); i != namespaces.end(); ++i)
|
||||
+ vector < sysfs::entry > devices = e.devices();
|
||||
+ for(vector < sysfs::entry >::iterator i = devices.begin(); i != devices.end(); ++i)
|
||||
{
|
||||
const sysfs::entry & d = *i;
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,91 +0,0 @@
|
||||
From f54a30ec01cc4173707720821056b99464e7e245 Mon Sep 17 00:00:00 2001
|
||||
From: Lyonel Vincent <lyonel@ezix.org>
|
||||
Date: Thu, 20 Dec 2018 15:49:41 +0100
|
||||
Subject: [PATCH 5/8] apply Github PR42
|
||||
|
||||
Fix typos
|
||||
|
||||
---
|
||||
docs/Changelog | 4 ++--
|
||||
src/lshw.1 | 6 +++---
|
||||
src/lshw.sgml | 6 +++---
|
||||
3 files changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/docs/Changelog b/docs/Changelog
|
||||
index 924b146cb523..c11ddb2dcc4a 100644
|
||||
--- a/docs/Changelog
|
||||
+++ b/docs/Changelog
|
||||
@@ -83,7 +83,7 @@
|
||||
fixed a portability problem with GTK+ [1099]
|
||||
* B.02.05
|
||||
added support for DVD writers
|
||||
- improved GUI usability (thanks to OpenUsability volonteers: Tina Trillitzsch and Florian Graessle)
|
||||
+ improved GUI usability (thanks to OpenUsability volunteers: Tina Trillitzsch and Florian Graessle)
|
||||
many new SVG icons
|
||||
added a logo for LSHW (used as icon for gtk-lshw's windows)
|
||||
build system updates
|
||||
@@ -209,6 +209,6 @@
|
||||
fixes for GCC 3.2
|
||||
* T.00.02
|
||||
second public test release
|
||||
- PCI busses listing
|
||||
+ PCI buses listing
|
||||
* T.00.01
|
||||
first public test release
|
||||
diff --git a/src/lshw.1 b/src/lshw.1
|
||||
index 43e4eacd75a2..43239da0bb44 100644
|
||||
--- a/src/lshw.1
|
||||
+++ b/src/lshw.1
|
||||
@@ -101,10 +101,10 @@ A list of all known PCI ID's (vendors, devices, classes and subclasses).
|
||||
If compiled with zlib support, lshw will look for \fIpci.ids.gz\fR first, then for \fIpci.ids\fR\&.
|
||||
.TP
|
||||
\fB/proc/bus/pci/*\fR
|
||||
-Used to access the configuration of installed PCI busses and devices.
|
||||
+Used to access the configuration of installed PCI buses and devices.
|
||||
.TP
|
||||
\fB/proc/ide/*\fR
|
||||
-Used to access the configuration of installed IDE busses and devices.
|
||||
+Used to access the configuration of installed IDE buses and devices.
|
||||
.TP
|
||||
\fB/proc/scsi/*, /dev/sg*\fR
|
||||
Used to access the configuration of installed SCSI devices.
|
||||
@@ -116,7 +116,7 @@ Used on x86 platforms to access CPU-specific configuration.
|
||||
Used on PowerPC platforms to access OpenFirmware configuration.
|
||||
.TP
|
||||
\fB/proc/bus/usb/*\fR
|
||||
-Used to access the configuration of installed USB busses and devices.
|
||||
+Used to access the configuration of installed USB buses and devices.
|
||||
.TP
|
||||
\fB/sys/*\fR
|
||||
Used on 2.6 kernels to access hardware/driver configuration information.
|
||||
diff --git a/src/lshw.sgml b/src/lshw.sgml
|
||||
index 2f3a3ac1ab92..8c1c49e0898b 100644
|
||||
--- a/src/lshw.sgml
|
||||
+++ b/src/lshw.sgml
|
||||
@@ -171,12 +171,12 @@ If compiled with zlib support, lshw will look for <filename>pci.ids.gz</filename
|
||||
|
||||
<varlistentry><term>/proc/bus/pci/*</term>
|
||||
<listitem><para>
|
||||
-Used to access the configuration of installed PCI busses and devices.
|
||||
+Used to access the configuration of installed PCI buses and devices.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term>/proc/ide/*</term>
|
||||
<listitem><para>
|
||||
-Used to access the configuration of installed IDE busses and devices.
|
||||
+Used to access the configuration of installed IDE buses and devices.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term>/proc/scsi/*, /dev/sg*</term>
|
||||
@@ -196,7 +196,7 @@ Used on PowerPC platforms to access OpenFirmware configuration.
|
||||
|
||||
<varlistentry><term>/proc/bus/usb/*</term>
|
||||
<listitem><para>
|
||||
-Used to access the configuration of installed USB busses and devices.
|
||||
+Used to access the configuration of installed USB buses and devices.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term>/sys/*</term>
|
||||
--
|
||||
2.17.1
|
||||
|
223
SOURCES/0005-begin-work-on-input-devices.patch
Normal file
223
SOURCES/0005-begin-work-on-input-devices.patch
Normal file
@ -0,0 +1,223 @@
|
||||
From 691ed58e2838ca3e50e899f013e259ea84f6bfe9 Mon Sep 17 00:00:00 2001
|
||||
From: Lyonel Vincent <lyonel@ezix.org>
|
||||
Date: Wed, 1 Apr 2020 00:43:15 +0200
|
||||
Subject: [PATCH 05/17] begin work on input devices
|
||||
|
||||
still missing:
|
||||
* capabilities
|
||||
* properties
|
||||
* report at least as much information as /proc/bus/input/devices
|
||||
|
||||
---
|
||||
src/core/hw.cc | 2 +-
|
||||
src/core/input.cc | 146 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
src/core/input.h | 8 +++
|
||||
src/core/main.cc | 4 ++
|
||||
4 files changed, 159 insertions(+), 1 deletions(-)
|
||||
create mode 100644 src/core/input.cc
|
||||
create mode 100644 src/core/input.h
|
||||
|
||||
diff --git a/src/core/hw.cc b/src/core/hw.cc
|
||||
index a59273008862..f7da370816c5 100644
|
||||
--- a/src/core/hw.cc
|
||||
+++ b/src/core/hw.cc
|
||||
@@ -1083,7 +1083,7 @@ void hwNode::setLogicalName(const string & name)
|
||||
This->logicalnames.push_back("/dev/" + n);
|
||||
}
|
||||
else
|
||||
- This->logicalnames.push_back(n);
|
||||
+ This->logicalnames.push_back(basename(n.c_str()));
|
||||
|
||||
if(This->dev == "")
|
||||
This->dev = get_devid(n);
|
||||
diff --git a/src/core/input.cc b/src/core/input.cc
|
||||
new file mode 100644
|
||||
index 000000000000..1f14fa9d8b56
|
||||
--- /dev/null
|
||||
+++ b/src/core/input.cc
|
||||
@@ -0,0 +1,146 @@
|
||||
+#include "version.h"
|
||||
+#include "hw.h"
|
||||
+#include "sysfs.h"
|
||||
+#include "osutils.h"
|
||||
+#include "input.h"
|
||||
+#include "disk.h"
|
||||
+#include "heuristics.h"
|
||||
+
|
||||
+#include <vector>
|
||||
+#include <iostream>
|
||||
+
|
||||
+__ID("@(#) $Id$");
|
||||
+
|
||||
+#define BUS_PCI 0x01
|
||||
+#define BUS_ISAPNP 0x02
|
||||
+#define BUS_USB 0x03
|
||||
+#define BUS_HIL 0x04
|
||||
+#define BUS_BLUETOOTH 0x05
|
||||
+#define BUS_VIRTUAL 0x06
|
||||
+
|
||||
+#define BUS_ISA 0x10
|
||||
+#define BUS_I8042 0x11
|
||||
+#define BUS_XTKBD 0x12
|
||||
+#define BUS_RS232 0x13
|
||||
+#define BUS_GAMEPORT 0x14
|
||||
+#define BUS_PARPORT 0x15
|
||||
+#define BUS_AMIGA 0x16
|
||||
+#define BUS_ADB 0x17
|
||||
+#define BUS_I2C 0x18
|
||||
+#define BUS_HOST 0x19
|
||||
+#define BUS_GSC 0x1A
|
||||
+#define BUS_ATARI 0x1B
|
||||
+#define BUS_SPI 0x1C
|
||||
+#define BUS_RMI 0x1D
|
||||
+#define BUS_CEC 0x1E
|
||||
+#define BUS_INTEL_ISHTP 0x1F
|
||||
+
|
||||
+using namespace std;
|
||||
+
|
||||
+bool scan_input(hwNode & n)
|
||||
+{
|
||||
+ vector < sysfs::entry > entries = sysfs::entries_by_class("input");
|
||||
+
|
||||
+ if (entries.empty())
|
||||
+ return false;
|
||||
+
|
||||
+ for (vector < sysfs::entry >::iterator it = entries.begin();
|
||||
+ it != entries.end(); ++it)
|
||||
+ {
|
||||
+ const sysfs::entry & e = *it;
|
||||
+
|
||||
+ if(!e.hassubdir("id")) continue;
|
||||
+
|
||||
+ hwNode *device = n.findChildByBusInfo(e.leaf().businfo());
|
||||
+ if(!device)
|
||||
+ device = n.addChild(hwNode("input", hw::input));
|
||||
+ else
|
||||
+ {
|
||||
+ if(device->getClass() == hw::generic)
|
||||
+ device->setClass(hw::input);
|
||||
+ }
|
||||
+ device->claim();
|
||||
+ device->setLogicalName("input/"+e.name());
|
||||
+ device->setProduct(e.string_attr("name"));
|
||||
+ device->setModalias(e.modalias());
|
||||
+ switch(e.hex_attr("id/bustype"))
|
||||
+ {
|
||||
+ case BUS_PCI:
|
||||
+ device->addCapability("pci", "PCI");
|
||||
+ break;
|
||||
+ case BUS_ISAPNP:
|
||||
+ device->addCapability("isa", "ISA");
|
||||
+ device->addCapability("pnp", "PnP");
|
||||
+ break;
|
||||
+ case BUS_USB:
|
||||
+ device->addCapability("usb", "USB");
|
||||
+ break;
|
||||
+ case BUS_HIL:
|
||||
+ device->addCapability("hil", "HP-HIL");
|
||||
+ break;
|
||||
+ case BUS_BLUETOOTH:
|
||||
+ device->addCapability("bt", "Bluetooth");
|
||||
+ break;
|
||||
+ case BUS_VIRTUAL:
|
||||
+ device->addCapability("virtual");
|
||||
+ break;
|
||||
+ case BUS_ISA:
|
||||
+ device->addCapability("isa", "ISA bus");
|
||||
+ break;
|
||||
+ case BUS_I8042:
|
||||
+ device->addCapability("i8042", "i8042 PC AT keyboard controller");
|
||||
+ break;
|
||||
+ case BUS_XTKBD:
|
||||
+ device->addCapability("xtkbd", "XT keyboard controller");
|
||||
+ break;
|
||||
+ case BUS_RS232:
|
||||
+ device->addCapability("rs232", "RS-232 serial");
|
||||
+ break;
|
||||
+ case BUS_GAMEPORT:
|
||||
+ device->addCapability("gameport", "game port");
|
||||
+ break;
|
||||
+ case BUS_PARPORT:
|
||||
+ device->addCapability("parport", "parallel port");
|
||||
+ break;
|
||||
+ case BUS_AMIGA:
|
||||
+ device->addCapability("amiga", "Amiga bus");
|
||||
+ break;
|
||||
+ case BUS_ADB:
|
||||
+ device->addCapability("adb", "Apple Desktop Bus");
|
||||
+ break;
|
||||
+ case BUS_I2C:
|
||||
+ device->addCapability("i2c", "I²C bus");
|
||||
+ break;
|
||||
+ case BUS_HOST:
|
||||
+ device->addCapability("host");
|
||||
+ break;
|
||||
+ case BUS_GSC:
|
||||
+ device->addCapability("gsc", "GSC bus");
|
||||
+ break;
|
||||
+ case BUS_ATARI:
|
||||
+ device->addCapability("atari", "Atari bus");
|
||||
+ break;
|
||||
+ case BUS_SPI:
|
||||
+ device->addCapability("spi", "SPI");
|
||||
+ break;
|
||||
+ case BUS_RMI:
|
||||
+ device->addCapability("rmi", "RMI");
|
||||
+ break;
|
||||
+ case BUS_CEC:
|
||||
+ device->addCapability("cec", "CEC");
|
||||
+ break;
|
||||
+ case BUS_INTEL_ISHTP:
|
||||
+ device->addCapability("intelishtp", "Intel Integrated Sensor Hub");
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ vector < sysfs::entry > events = e.devices();
|
||||
+ for(vector < sysfs::entry >::iterator i = events.begin(); i != events.end(); ++i)
|
||||
+ {
|
||||
+ const sysfs::entry & d = *i;
|
||||
+ device->setLogicalName("input/"+d.name());
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
diff --git a/src/core/input.h b/src/core/input.h
|
||||
new file mode 100644
|
||||
index 000000000000..1bf2383bc53b
|
||||
--- /dev/null
|
||||
+++ b/src/core/input.h
|
||||
@@ -0,0 +1,8 @@
|
||||
+#ifndef _INPUT_H_
|
||||
+#define _INPUT_H_
|
||||
+
|
||||
+#include "hw.h"
|
||||
+
|
||||
+bool scan_input(hwNode &);
|
||||
+
|
||||
+#endif
|
||||
diff --git a/src/core/main.cc b/src/core/main.cc
|
||||
index d0d7f1057c29..ad0e586ef549 100644
|
||||
--- a/src/core/main.cc
|
||||
+++ b/src/core/main.cc
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "vio.h"
|
||||
#include "nvme.h"
|
||||
#include "mmc.h"
|
||||
+#include "input.h"
|
||||
#include "smp.h"
|
||||
#include "abi.h"
|
||||
#include "s390.h"
|
||||
@@ -140,6 +141,9 @@ bool scan_system(hwNode & system)
|
||||
status("MMC");
|
||||
if (enabled("mmc"))
|
||||
scan_mmc(computer);
|
||||
+ status("input");
|
||||
+ if (enabled("input"))
|
||||
+ scan_input(computer);
|
||||
status("S/390 devices");
|
||||
if (enabled("s390"))
|
||||
scan_s390_devices(computer);
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 4a415a6725fd88e9219e6af92dcdaf88e0dff36e Mon Sep 17 00:00:00 2001
|
||||
From: hygonsoc <hygonsoc@gmail.com>
|
||||
Date: Wed, 26 Dec 2018 00:08:00 +0800
|
||||
Subject: [PATCH 6/8] add Hygon company description for Hygon CPU VendorID
|
||||
checking
|
||||
|
||||
---
|
||||
src/core/cpuinfo.cc | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/core/cpuinfo.cc b/src/core/cpuinfo.cc
|
||||
index 8a72d985f57c..33085fda1159 100644
|
||||
--- a/src/core/cpuinfo.cc
|
||||
+++ b/src/core/cpuinfo.cc
|
||||
@@ -455,6 +455,8 @@ string value)
|
||||
{
|
||||
if (value == "AuthenticAMD")
|
||||
value = "Advanced Micro Devices [AMD]";
|
||||
+ if (value == "HygonGenuine")
|
||||
+ value = "Hygon";
|
||||
if (value == "GenuineIntel")
|
||||
value = "Intel Corp.";
|
||||
cpu->setVendor(value);
|
||||
--
|
||||
2.17.1
|
||||
|
34
SOURCES/0006-cosmetic-fixes.patch
Normal file
34
SOURCES/0006-cosmetic-fixes.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From 7edaa09faa5755e44f2c6226f3447536658300af Mon Sep 17 00:00:00 2001
|
||||
From: Lyonel Vincent <lyonel@ezix.org>
|
||||
Date: Thu, 2 Apr 2020 13:21:58 +0200
|
||||
Subject: [PATCH 06/17] cosmetic fixes
|
||||
|
||||
---
|
||||
src/core/input.cc | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/core/input.cc b/src/core/input.cc
|
||||
index 1f14fa9d8b56..a8d8eaf45cb3 100644
|
||||
--- a/src/core/input.cc
|
||||
+++ b/src/core/input.cc
|
||||
@@ -79,7 +79,7 @@ bool scan_input(hwNode & n)
|
||||
device->addCapability("hil", "HP-HIL");
|
||||
break;
|
||||
case BUS_BLUETOOTH:
|
||||
- device->addCapability("bt", "Bluetooth");
|
||||
+ device->addCapability("bluetooth", "Bluetooth");
|
||||
break;
|
||||
case BUS_VIRTUAL:
|
||||
device->addCapability("virtual");
|
||||
@@ -112,7 +112,7 @@ bool scan_input(hwNode & n)
|
||||
device->addCapability("i2c", "I²C bus");
|
||||
break;
|
||||
case BUS_HOST:
|
||||
- device->addCapability("host");
|
||||
+ device->addCapability("platform");
|
||||
break;
|
||||
case BUS_GSC:
|
||||
device->addCapability("gsc", "GSC bus");
|
||||
--
|
||||
2.17.1
|
||||
|
141
SOURCES/0007-detect-sound-devices.patch
Normal file
141
SOURCES/0007-detect-sound-devices.patch
Normal file
@ -0,0 +1,141 @@
|
||||
From 1cc52cac74ea735faae92dc963d10292608d7a4d Mon Sep 17 00:00:00 2001
|
||||
From: Lyonel Vincent <lyonel@ezix.org>
|
||||
Date: Thu, 2 Apr 2020 13:39:42 +0200
|
||||
Subject: [PATCH 07/17] detect sound devices
|
||||
|
||||
---
|
||||
src/core/main.cc | 4 ++++
|
||||
src/core/sound.cc | 53 +++++++++++++++++++++++++++++++++++++++++++++++
|
||||
src/core/sound.h | 8 +++++++
|
||||
src/core/sysfs.cc | 5 +++++
|
||||
src/core/sysfs.h | 1 +
|
||||
5 files changed, 71 insertions(+)
|
||||
create mode 100644 src/core/sound.cc
|
||||
create mode 100644 src/core/sound.h
|
||||
|
||||
diff --git a/src/core/main.cc b/src/core/main.cc
|
||||
index ad0e586ef549..e35258c56141 100644
|
||||
--- a/src/core/main.cc
|
||||
+++ b/src/core/main.cc
|
||||
@@ -46,6 +46,7 @@
|
||||
#include "nvme.h"
|
||||
#include "mmc.h"
|
||||
#include "input.h"
|
||||
+#include "sound.h"
|
||||
#include "smp.h"
|
||||
#include "abi.h"
|
||||
#include "s390.h"
|
||||
@@ -141,6 +142,9 @@ bool scan_system(hwNode & system)
|
||||
status("MMC");
|
||||
if (enabled("mmc"))
|
||||
scan_mmc(computer);
|
||||
+ status("sound");
|
||||
+ if (enabled("sound"))
|
||||
+ scan_sound(computer);
|
||||
status("input");
|
||||
if (enabled("input"))
|
||||
scan_input(computer);
|
||||
diff --git a/src/core/sound.cc b/src/core/sound.cc
|
||||
new file mode 100644
|
||||
index 000000000000..05edf2352267
|
||||
--- /dev/null
|
||||
+++ b/src/core/sound.cc
|
||||
@@ -0,0 +1,53 @@
|
||||
+#include "version.h"
|
||||
+#include "hw.h"
|
||||
+#include "sysfs.h"
|
||||
+#include "osutils.h"
|
||||
+#include "sound.h"
|
||||
+#include "heuristics.h"
|
||||
+
|
||||
+#include <vector>
|
||||
+#include <iostream>
|
||||
+
|
||||
+__ID("@(#) $Id$");
|
||||
+
|
||||
+using namespace std;
|
||||
+
|
||||
+bool scan_sound(hwNode & n)
|
||||
+{
|
||||
+ vector < sysfs::entry > entries = sysfs::entries_by_class("sound");
|
||||
+
|
||||
+ if (entries.empty())
|
||||
+ return false;
|
||||
+
|
||||
+ for (vector < sysfs::entry >::iterator it = entries.begin();
|
||||
+ it != entries.end(); ++it)
|
||||
+ {
|
||||
+ const sysfs::entry & e = *it;
|
||||
+ string id = e.string_attr("id");
|
||||
+ if(id!="")
|
||||
+ {
|
||||
+ hwNode *device = n.findChildByBusInfo(e.leaf().businfo());
|
||||
+ if(!device)
|
||||
+ device = n.addChild(hwNode("sound", hw::multimedia));
|
||||
+ device->claim();
|
||||
+ if(device->getDescription() == "") device->setDescription(id);
|
||||
+ //device->setPhysId(e.hex_attr("number"));
|
||||
+ //device->setBusInfo("sound@"+e.string_attr("number"));
|
||||
+ device->setLogicalName("snd/"+e.name());
|
||||
+ if(device->getProduct() == "") device->setProduct(e.string_attr("name"));
|
||||
+ device->setModalias(e.modalias());
|
||||
+
|
||||
+ vector < sysfs::entry > events = e.devices();
|
||||
+ for(vector < sysfs::entry >::iterator i = events.begin(); i != events.end(); ++i)
|
||||
+ {
|
||||
+ const sysfs::entry & d = *i;
|
||||
+ if(d.subsystem() == "sound")
|
||||
+ {
|
||||
+ device->setLogicalName("snd/"+d.name());
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
diff --git a/src/core/sound.h b/src/core/sound.h
|
||||
new file mode 100644
|
||||
index 000000000000..c2caf04687bf
|
||||
--- /dev/null
|
||||
+++ b/src/core/sound.h
|
||||
@@ -0,0 +1,8 @@
|
||||
+#ifndef _SOUND_H_
|
||||
+#define _SOUND_H_
|
||||
+
|
||||
+#include "hw.h"
|
||||
+
|
||||
+bool scan_sound(hwNode &);
|
||||
+
|
||||
+#endif
|
||||
diff --git a/src/core/sysfs.cc b/src/core/sysfs.cc
|
||||
index 32d65642f157..ee8b1da06c78 100644
|
||||
--- a/src/core/sysfs.cc
|
||||
+++ b/src/core/sysfs.cc
|
||||
@@ -343,6 +343,11 @@ string entry::classname() const
|
||||
return basename(dirname(This->devpath).c_str());
|
||||
}
|
||||
|
||||
+string entry::subsystem() const
|
||||
+{
|
||||
+ return basename(realpath(This->devpath+"/subsystem").c_str());
|
||||
+}
|
||||
+
|
||||
bool entry::isvirtual() const
|
||||
{
|
||||
return string(basename(dirname(dirname(This->devpath)).c_str())) == "virtual";
|
||||
diff --git a/src/core/sysfs.h b/src/core/sysfs.h
|
||||
index 9cc1b2b0a500..c25430b834df 100644
|
||||
--- a/src/core/sysfs.h
|
||||
+++ b/src/core/sysfs.h
|
||||
@@ -26,6 +26,7 @@ namespace sysfs
|
||||
bool hassubdir(const string &) const;
|
||||
string name() const;
|
||||
string classname() const;
|
||||
+ string subsystem() const;
|
||||
bool isvirtual() const;
|
||||
string businfo() const;
|
||||
string driver() const;
|
||||
--
|
||||
2.17.1
|
||||
|
File diff suppressed because it is too large
Load Diff
102
SOURCES/0008-detect-framebuffers.patch
Normal file
102
SOURCES/0008-detect-framebuffers.patch
Normal file
@ -0,0 +1,102 @@
|
||||
From 755371fc1590e752380822ffdb320484e3b6851f Mon Sep 17 00:00:00 2001
|
||||
From: Lyonel Vincent <lyonel@ezix.org>
|
||||
Date: Thu, 2 Apr 2020 14:54:03 +0200
|
||||
Subject: [PATCH 08/17] detect framebuffers
|
||||
|
||||
---
|
||||
src/core/graphics.cc | 44 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
src/core/graphics.h | 8 ++++++++
|
||||
src/core/main.cc | 4 ++++
|
||||
3 files changed, 56 insertions(+)
|
||||
create mode 100644 src/core/graphics.cc
|
||||
create mode 100644 src/core/graphics.h
|
||||
|
||||
diff --git a/src/core/graphics.cc b/src/core/graphics.cc
|
||||
new file mode 100644
|
||||
index 000000000000..a8d490cd1d61
|
||||
--- /dev/null
|
||||
+++ b/src/core/graphics.cc
|
||||
@@ -0,0 +1,44 @@
|
||||
+#include "version.h"
|
||||
+#include "hw.h"
|
||||
+#include "sysfs.h"
|
||||
+#include "osutils.h"
|
||||
+#include "graphics.h"
|
||||
+#include "heuristics.h"
|
||||
+
|
||||
+#include <vector>
|
||||
+#include <iostream>
|
||||
+
|
||||
+__ID("@(#) $Id$");
|
||||
+
|
||||
+using namespace std;
|
||||
+
|
||||
+bool scan_graphics(hwNode & n)
|
||||
+{
|
||||
+ vector < sysfs::entry > entries = sysfs::entries_by_class("graphics");
|
||||
+
|
||||
+ if (entries.empty())
|
||||
+ return false;
|
||||
+
|
||||
+ for (vector < sysfs::entry >::iterator it = entries.begin();
|
||||
+ it != entries.end(); ++it)
|
||||
+ {
|
||||
+ const sysfs::entry & e = *it;
|
||||
+ string dev = e.string_attr("dev");
|
||||
+ if(dev!="")
|
||||
+ {
|
||||
+ hwNode *device = n.findChildByBusInfo(e.leaf().businfo());
|
||||
+ if(!device)
|
||||
+ device = n.addChild(hwNode("graphics", hw::display));
|
||||
+ device->claim();
|
||||
+ device->setLogicalName(e.name());
|
||||
+ device->addCapability("fb", "framebuffer");
|
||||
+ if(device->getProduct() == "") device->setProduct(e.string_attr("name"));
|
||||
+ string resolution = e.string_attr("virtual_size");
|
||||
+ string depth = e.string_attr("bits_per_pixel");
|
||||
+ if(resolution != "") device->setConfig("resolution", resolution);
|
||||
+ if(depth != "") device->setConfig("depth", depth);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
diff --git a/src/core/graphics.h b/src/core/graphics.h
|
||||
new file mode 100644
|
||||
index 000000000000..c30f0bf8112b
|
||||
--- /dev/null
|
||||
+++ b/src/core/graphics.h
|
||||
@@ -0,0 +1,8 @@
|
||||
+#ifndef _GRAPHICS_H_
|
||||
+#define _GRAPHICS_H_
|
||||
+
|
||||
+#include "hw.h"
|
||||
+
|
||||
+bool scan_graphics(hwNode &);
|
||||
+
|
||||
+#endif
|
||||
diff --git a/src/core/main.cc b/src/core/main.cc
|
||||
index e35258c56141..ac2fba0146f0 100644
|
||||
--- a/src/core/main.cc
|
||||
+++ b/src/core/main.cc
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "mmc.h"
|
||||
#include "input.h"
|
||||
#include "sound.h"
|
||||
+#include "graphics.h"
|
||||
#include "smp.h"
|
||||
#include "abi.h"
|
||||
#include "s390.h"
|
||||
@@ -145,6 +146,9 @@ bool scan_system(hwNode & system)
|
||||
status("sound");
|
||||
if (enabled("sound"))
|
||||
scan_sound(computer);
|
||||
+ status("graphics");
|
||||
+ if (enabled("graphics"))
|
||||
+ scan_graphics(computer);
|
||||
status("input");
|
||||
if (enabled("input"))
|
||||
scan_input(computer);
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,35 +0,0 @@
|
||||
From 6cc0581bc805c8bf7ea057c065c3c36caf744ef3 Mon Sep 17 00:00:00 2001
|
||||
From: Lyonel Vincent <lyonel@ezix.org>
|
||||
Date: Sun, 24 Mar 2019 11:18:57 +0100
|
||||
Subject: [PATCH 8/8] merge Github PR44
|
||||
|
||||
Add a class 'nvme' for NVMe devices
|
||||
|
||||
---
|
||||
src/core/pci.cc | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/core/pci.cc b/src/core/pci.cc
|
||||
index c8380c3034be..21b9033285ff 100644
|
||||
--- a/src/core/pci.cc
|
||||
+++ b/src/core/pci.cc
|
||||
@@ -105,6 +105,7 @@ __ID("@(#) $Id$");
|
||||
#define PCI_CLASS_STORAGE_RAID 0x0104
|
||||
#define PCI_CLASS_STORAGE_SATA 0x0106
|
||||
#define PCI_CLASS_STORAGE_SAS 0x0107
|
||||
+#define PCI_CLASS_STORAGE_NVME 0x0108
|
||||
#define PCI_CLASS_STORAGE_OTHER 0x0180
|
||||
|
||||
#define PCI_BASE_CLASS_NETWORK 0x02
|
||||
@@ -340,6 +341,8 @@ static const char *get_class_name(unsigned int c)
|
||||
return "sata";
|
||||
case PCI_CLASS_STORAGE_SAS:
|
||||
return "sas";
|
||||
+ case PCI_CLASS_STORAGE_NVME:
|
||||
+ return "nvme";
|
||||
case PCI_CLASS_BRIDGE_HOST:
|
||||
return "host";
|
||||
case PCI_CLASS_BRIDGE_ISA:
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,29 @@
|
||||
From f6138333811f7f2bf01551c70f5726f7c556dd36 Mon Sep 17 00:00:00 2001
|
||||
From: Lyonel Vincent <lyonel@ezix.org>
|
||||
Date: Fri, 3 Apr 2020 22:42:21 +0200
|
||||
Subject: [PATCH 09/17] try to connect input devices to the right parent
|
||||
|
||||
---
|
||||
src/core/input.cc | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/src/core/input.cc b/src/core/input.cc
|
||||
index a8d8eaf45cb3..ab37d37c3863 100644
|
||||
--- a/src/core/input.cc
|
||||
+++ b/src/core/input.cc
|
||||
@@ -52,6 +52,12 @@ bool scan_input(hwNode & n)
|
||||
if(!e.hassubdir("id")) continue;
|
||||
|
||||
hwNode *device = n.findChildByBusInfo(e.leaf().businfo());
|
||||
+ if(!device)
|
||||
+ {
|
||||
+ device = n.findChildByBusInfo(e.leaf().parent().businfo());
|
||||
+ if(device)
|
||||
+ device = device->addChild(hwNode("input", hw::input));
|
||||
+ }
|
||||
if(!device)
|
||||
device = n.addChild(hwNode("input", hw::input));
|
||||
else
|
||||
--
|
||||
2.17.1
|
||||
|
39
SOURCES/0010-devtree-Add-chip-id-from-the-dimm-module.patch
Normal file
39
SOURCES/0010-devtree-Add-chip-id-from-the-dimm-module.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From 4c19563dae05d3a730bb67917f1810eb33a54613 Mon Sep 17 00:00:00 2001
|
||||
From: Shivaprasad G Bhat <sbhat@linux.ibm.com>
|
||||
Date: Fri, 6 Mar 2020 04:41:33 -0600
|
||||
Subject: [PATCH 10/17] devtree: Add chip-id from the dimm module
|
||||
|
||||
Add chip-id from dimm module into the configuration if available. DIMM's are
|
||||
behind the CHIP on Power systems. By adding chip-id it helps to map what dimm
|
||||
is sitting behind which chip.
|
||||
|
||||
Sample output:
|
||||
*-bank:0
|
||||
description: 16GB CDIMM
|
||||
product: 41T9571 FRU# 41T9571
|
||||
physical id: 0
|
||||
.....
|
||||
configuration: chip-id=0
|
||||
|
||||
|
||||
Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
|
||||
---
|
||||
src/core/device-tree.cc | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/core/device-tree.cc b/src/core/device-tree.cc
|
||||
index 490e1976e619..f43d34f072b6 100644
|
||||
--- a/src/core/device-tree.cc
|
||||
+++ b/src/core/device-tree.cc
|
||||
@@ -1031,6 +1031,8 @@ static void add_memory_bank(string name, string path, hwNode & core)
|
||||
if(exists("description"))
|
||||
description = hw::strip(get_string("description"));
|
||||
bank.setDescription(description);
|
||||
+ if (exists("ibm,chip-id"))
|
||||
+ bank.setConfig("chip-id", get_u32("ibm,chip-id"));
|
||||
|
||||
if(exists("ibm,loc-code"))
|
||||
bank.setSlot(hw::strip(get_string("ibm,loc-code")));
|
||||
--
|
||||
2.17.1
|
||||
|
40
SOURCES/0011-devtree-Add-chip-id-from-CPU-node.patch
Normal file
40
SOURCES/0011-devtree-Add-chip-id-from-CPU-node.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From 872b0996df37aae586575ca8021c2509c05067b0 Mon Sep 17 00:00:00 2001
|
||||
From: Shivaprasad G Bhat <sbhat@linux.ibm.com>
|
||||
Date: Fri, 6 Mar 2020 04:41:33 -0600
|
||||
Subject: [PATCH 11/17] devtree: Add chip-id from CPU node
|
||||
|
||||
Add chip-id from CPU node into the configuration if available. CPU's are
|
||||
behind the CHIP on Power systems. By adding chip-id it helps to map what cpus
|
||||
are sitting behind which chip.
|
||||
|
||||
Sample output:
|
||||
*-cpu:10
|
||||
description: POWER8E (raw), altivec supported
|
||||
product: 00FX746 FRU# 00FX522
|
||||
physical id: 176
|
||||
bus info: cpu@10
|
||||
version: 2.1 (pvr 004b 0201)
|
||||
...
|
||||
configuration: chip-id=1 threads=8
|
||||
|
||||
Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
|
||||
---
|
||||
src/core/device-tree.cc | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/core/device-tree.cc b/src/core/device-tree.cc
|
||||
index f43d34f072b6..af665a4d8e1a 100644
|
||||
--- a/src/core/device-tree.cc
|
||||
+++ b/src/core/device-tree.cc
|
||||
@@ -492,6 +492,8 @@ static void fill_core_vpd(hwNode & cpu, string & basepath,
|
||||
return;
|
||||
|
||||
chip_id = get_u32(basepath + "/ibm,chip-id");
|
||||
+ cpu.setConfig("chip-id", chip_id);
|
||||
+
|
||||
data = chip_vpd[chip_id];
|
||||
xscom_path = xscoms[chip_id];
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
31
SOURCES/0012-volumes-fix-segfault-in-apfs-volume-code.patch
Normal file
31
SOURCES/0012-volumes-fix-segfault-in-apfs-volume-code.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From 82df4fa7d3705f2f61282ed5b22074d4e0a6efc4 Mon Sep 17 00:00:00 2001
|
||||
From: Harry Mallon <hjmallon@gmail.com>
|
||||
Date: Thu, 23 Apr 2020 21:18:47 +0100
|
||||
Subject: [PATCH 12/17] volumes: fix segfault in apfs volume code
|
||||
|
||||
---
|
||||
src/core/volumes.cc | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/volumes.cc b/src/core/volumes.cc
|
||||
index e70352377f84..6fce2ee3de1c 100644
|
||||
--- a/src/core/volumes.cc
|
||||
+++ b/src/core/volumes.cc
|
||||
@@ -784,12 +784,13 @@ struct apfs_super_block {
|
||||
|
||||
static bool detect_apfs(hwNode & n, source & s)
|
||||
{
|
||||
- static char buffer[sizeof(apfs_super_block)];
|
||||
+ static char buffer[APFS_STANDARD_BLOCK_SIZE];
|
||||
source apfsvolume;
|
||||
apfs_super_block *sb = (apfs_super_block*)buffer;
|
||||
unsigned long block_size;
|
||||
|
||||
apfsvolume = s;
|
||||
+ apfsvolume.blocksize = APFS_STANDARD_BLOCK_SIZE;
|
||||
|
||||
if(readlogicalblocks(apfsvolume, buffer, 0, 1)!=1)
|
||||
return false;
|
||||
--
|
||||
2.17.1
|
||||
|
58
SOURCES/0013-merge-Github-PR-53.patch
Normal file
58
SOURCES/0013-merge-Github-PR-53.patch
Normal file
@ -0,0 +1,58 @@
|
||||
From 89759485f86a48526b4f508a10f7478c76a3f71e Mon Sep 17 00:00:00 2001
|
||||
From: Lyonel Vincent <lyonel@ezix.org>
|
||||
Date: Fri, 15 May 2020 16:00:08 +0200
|
||||
Subject: [PATCH 13/17] merge Github PR #53
|
||||
|
||||
---
|
||||
src/core/cpuinfo.cc | 21 ++++++++++-----------
|
||||
1 file changed, 10 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/core/cpuinfo.cc b/src/core/cpuinfo.cc
|
||||
index eceb83aa4e3a..49f3052d8da1 100644
|
||||
--- a/src/core/cpuinfo.cc
|
||||
+++ b/src/core/cpuinfo.cc
|
||||
@@ -446,6 +446,7 @@ string value)
|
||||
|
||||
if (cpu)
|
||||
{
|
||||
+ hw::value family, model, stepping;
|
||||
|
||||
// x86 CPUs are assumed to be 32 bits per default
|
||||
if(cpu->getWidth()==0) cpu->setWidth(32);
|
||||
@@ -471,6 +472,13 @@ string value)
|
||||
cpu->addHint(id, stoll(value, NULL, 0));
|
||||
if (id == "stepping")
|
||||
cpu->addHint(id, stoll(value, NULL, 0));
|
||||
+
|
||||
+ family = cpu->getHint("cpu family");
|
||||
+ model = cpu->getHint("model");
|
||||
+ stepping = cpu->getHint("stepping");
|
||||
+ if(family.defined() && model.defined() && stepping.defined())
|
||||
+ cpu->setVersion(tostring(family.asInteger())+"."+tostring(model.asInteger())+"."+tostring(stepping.asInteger()));
|
||||
+
|
||||
//if ((id == "cpu MHz") && (cpu->getSize() == 0))
|
||||
//{
|
||||
//cpu->setSize((long long) (1000000L * atof(value.c_str())));
|
||||
@@ -675,17 +683,8 @@ bool scan_cpuinfo(hwNode & n)
|
||||
}
|
||||
|
||||
hwNode *cpu = getcpu(n, 0);
|
||||
- if(cpu)
|
||||
- {
|
||||
- hw::value family, model, stepping;
|
||||
- family = cpu->getHint("cpu family");
|
||||
- model = cpu->getHint("model");
|
||||
- stepping = cpu->getHint("stepping");
|
||||
- if(family.defined() && model.defined() && stepping.defined())
|
||||
- cpu->setVersion(tostring(family.asInteger())+"."+tostring(model.asInteger())+"."+tostring(stepping.asInteger()));
|
||||
- if(n.getWidth()==0)
|
||||
- n.setWidth(cpu->getWidth());
|
||||
- }
|
||||
+ if(cpu && (n.getWidth()==0))
|
||||
+ n.setWidth(cpu->getWidth());
|
||||
|
||||
return true;
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,96 @@
|
||||
From 29f69ac618fd5ace9ed9aae7839b5cfdc1fb5130 Mon Sep 17 00:00:00 2001
|
||||
From: Shivaprasad G Bhat <sbhat@linux.ibm.com>
|
||||
Date: Wed, 1 Apr 2020 09:25:52 -0500
|
||||
Subject: [PATCH 14/17] devtree: Add capabilites to the OPAL Firmware
|
||||
|
||||
On OpenPower systems, the presence of the "/ibm,opal" entry in the device tree
|
||||
signifies machines are running under OPAL firmware (i.e skiboot). Under this
|
||||
node OPAL exports certain available interfaces. And also this node have a
|
||||
compatible property listing "ibm,opal-v<X> which denotes the OPAL compatability.
|
||||
|
||||
This change adds a function to parse information about those OPAL firmware
|
||||
capabilities and add it to skiboot firmware node. With a current OpenPower
|
||||
machine, we get something like this:
|
||||
|
||||
*-firmware:0
|
||||
description: skiboot
|
||||
product: OPAL firmware
|
||||
physical id: 2
|
||||
version: 5.4.3-35bf9d9
|
||||
capabilities: opal-v2 opal-v3 prd ipmi
|
||||
|
||||
|
||||
Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
|
||||
Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
|
||||
---
|
||||
src/core/device-tree.cc | 42 +++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 42 insertions(+)
|
||||
|
||||
diff --git a/src/core/device-tree.cc b/src/core/device-tree.cc
|
||||
index af665a4d8e1a..e7227e1f74b7 100644
|
||||
--- a/src/core/device-tree.cc
|
||||
+++ b/src/core/device-tree.cc
|
||||
@@ -219,11 +219,48 @@ static void scan_devtree_bootrom(hwNode & core)
|
||||
}
|
||||
}
|
||||
|
||||
+static hwNode *add_base_opal_node(hwNode & core)
|
||||
+{
|
||||
+ vector < string >:: iterator it;
|
||||
+ vector < string > compat;
|
||||
+ string basepath = DEVICETREE "/ibm,opal";
|
||||
+ hwNode opal("firmware");
|
||||
+
|
||||
+ if (!exists(basepath))
|
||||
+ return NULL;
|
||||
+
|
||||
+ pushd(basepath);
|
||||
+
|
||||
+ opal.setProduct("OPAL firmware");
|
||||
+ opal.setDescription("skiboot");
|
||||
+
|
||||
+ compat = get_strings(basepath + "/compatible");
|
||||
+ for (it = compat.begin(); it != compat.end(); ++it) {
|
||||
+ if (matches(*it, "^ibm,opal-v"))
|
||||
+ opal.addCapability((*it).erase(0,4));
|
||||
+ }
|
||||
+
|
||||
+ if (exists(basepath + "/ipmi/compatible") &&
|
||||
+ matches(get_string(basepath + "/ipmi/compatible"), "^ibm,opal-ipmi"))
|
||||
+ opal.addCapability("ipmi");
|
||||
+
|
||||
+ if (exists(basepath + "/diagnostics/compatible") &&
|
||||
+ matches(get_string(basepath + "/diagnostics/compatible"), "^ibm,opal-prd"))
|
||||
+ opal.addCapability("prd");
|
||||
+
|
||||
+ popd();
|
||||
+
|
||||
+ opal.claim();
|
||||
+ return core.addChild(opal);
|
||||
+}
|
||||
+
|
||||
static void scan_devtree_firmware_powernv(hwNode & core)
|
||||
{
|
||||
int n;
|
||||
struct dirent **namelist;
|
||||
|
||||
+ hwNode *opal = add_base_opal_node(core);
|
||||
+
|
||||
if (!exists(DEVICETREE "/ibm,firmware-versions"))
|
||||
return;
|
||||
|
||||
@@ -245,6 +282,11 @@ static void scan_devtree_firmware_powernv(hwNode & core)
|
||||
fwnode.setDescription(sname);
|
||||
fwnode.setVersion(hw::strip(get_string(fullpath)));
|
||||
fwnode.claim();
|
||||
+ if (opal && sname == "skiboot") {
|
||||
+ opal->merge(fwnode);
|
||||
+ free(namelist[i]);
|
||||
+ continue;
|
||||
+ }
|
||||
core.addChild(fwnode);
|
||||
}
|
||||
free(namelist[i]);
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,29 @@
|
||||
From 4348e283f8a0bdd40b97c5d0b6e12354576b3113 Mon Sep 17 00:00:00 2001
|
||||
From: Lyonel Vincent <lyonel@ezix.org>
|
||||
Date: Mon, 25 May 2020 09:31:05 +0200
|
||||
Subject: [PATCH 15/17] =?UTF-8?q?fix=20issue=20with=20logical=20names=20be?=
|
||||
=?UTF-8?q?ing=20truncated=20(`/dev/sda`=20=E2=86=92=20`sda`)?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
---
|
||||
src/core/hw.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/hw.cc b/src/core/hw.cc
|
||||
index f7da370816c5..aca424c3f221 100644
|
||||
--- a/src/core/hw.cc
|
||||
+++ b/src/core/hw.cc
|
||||
@@ -1083,7 +1083,7 @@ void hwNode::setLogicalName(const string & name)
|
||||
This->logicalnames.push_back("/dev/" + n);
|
||||
}
|
||||
else
|
||||
- This->logicalnames.push_back(basename(n.c_str()));
|
||||
+ This->logicalnames.push_back((n[0]=='/')?n:basename(n.c_str()));
|
||||
|
||||
if(This->dev == "")
|
||||
This->dev = get_devid(n);
|
||||
--
|
||||
2.17.1
|
||||
|
51
SOURCES/0016-code-clean-up-for-read-3.patch
Normal file
51
SOURCES/0016-code-clean-up-for-read-3.patch
Normal file
@ -0,0 +1,51 @@
|
||||
From 37c3f3934b9d03be2d0ec70caf3779e03c003c5a Mon Sep 17 00:00:00 2001
|
||||
From: Lyonel Vincent <lyonel@ezix.org>
|
||||
Date: Mon, 25 May 2020 15:24:38 +0200
|
||||
Subject: [PATCH 16/17] code clean-up for read(3)
|
||||
|
||||
use ssize_t instead of size_t
|
||||
cf. Github PR #52
|
||||
|
||||
---
|
||||
src/core/cpuinfo.cc | 2 +-
|
||||
src/core/osutils.cc | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/core/cpuinfo.cc b/src/core/cpuinfo.cc
|
||||
index 49f3052d8da1..9e41a42184a6 100644
|
||||
--- a/src/core/cpuinfo.cc
|
||||
+++ b/src/core/cpuinfo.cc
|
||||
@@ -597,7 +597,7 @@ bool scan_cpuinfo(hwNode & n)
|
||||
if (core)
|
||||
{
|
||||
char buffer[1024];
|
||||
- size_t count;
|
||||
+ ssize_t count;
|
||||
string cpuinfo_str = "";
|
||||
string description = "", version = "";
|
||||
string plat = platform();
|
||||
diff --git a/src/core/osutils.cc b/src/core/osutils.cc
|
||||
index f023a465921b..a53ed89e9d7b 100644
|
||||
--- a/src/core/osutils.cc
|
||||
+++ b/src/core/osutils.cc
|
||||
@@ -148,7 +148,7 @@ vector < string > &list)
|
||||
{
|
||||
char buffer[1024];
|
||||
string buffer_str = "";
|
||||
- size_t count = 0;
|
||||
+ ssize_t count = 0;
|
||||
data_file fd = file_open(file);
|
||||
|
||||
if (file_open_error(fd))
|
||||
@@ -174,7 +174,7 @@ const string & def)
|
||||
if (fd >= 0)
|
||||
{
|
||||
char buffer[1024];
|
||||
- size_t count = 0;
|
||||
+ ssize_t count = 0;
|
||||
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
result = "";
|
||||
--
|
||||
2.17.1
|
||||
|
27
SOURCES/0017-report-product-model-on-Power-systems.patch
Normal file
27
SOURCES/0017-report-product-model-on-Power-systems.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From 3775782808e8b9b8aa72ed2ce23e145433e193cf Mon Sep 17 00:00:00 2001
|
||||
From: Lyonel Vincent <lyonel@ezix.org>
|
||||
Date: Wed, 27 May 2020 01:16:20 +0200
|
||||
Subject: [PATCH 17/17] report product model on Power systems
|
||||
|
||||
Github PR #54
|
||||
|
||||
---
|
||||
src/core/device-tree.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/device-tree.cc b/src/core/device-tree.cc
|
||||
index e7227e1f74b7..027ad16fc557 100644
|
||||
--- a/src/core/device-tree.cc
|
||||
+++ b/src/core/device-tree.cc
|
||||
@@ -1396,7 +1396,7 @@ static void get_ibm_model(hwNode & n)
|
||||
{
|
||||
if (ibm_model_defs[i].model == machinetype || ibm_model_defs[i].model == model)
|
||||
{
|
||||
- n.setProduct(ibm_model_defs[i].modelname);
|
||||
+ n.setProduct(n.getProduct() + " (" + ibm_model_defs[i].modelname + ")");
|
||||
n.addHint("icon", string(ibm_model_defs[i].icon));
|
||||
n.setConfig("chassis", ibm_model_defs[i].chassis);
|
||||
return;
|
||||
--
|
||||
2.17.1
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -21,7 +21,7 @@ index 6c69c37336c8..688863130291 100644
|
||||
+include(FindPkgConfig)
|
||||
+
|
||||
project(lshw)
|
||||
set(VERSION "B.012.18")
|
||||
set(VERSION "B.02.19.2")
|
||||
|
||||
--
|
||||
2.17.1
|
@ -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 ++++++
|
||||
CMakeLists.txt | 43 ++++++
|
||||
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 ++
|
||||
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 ---------
|
||||
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 +++
|
||||
.../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(-)
|
||||
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
|
||||
@ -40,17 +40,18 @@ Subject: [PATCH] cmakeify
|
||||
|
||||
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)
|
||||
+
|
||||
+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)
|
||||
@ -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,5 @@ index 36fbdb7..0000000
|
||||
-clean:
|
||||
- rm -f $(CATALOGS) $(PACKAGENAME).pot
|
||||
--
|
||||
2.13.6
|
||||
2.25.1
|
||||
|
@ -1,27 +1,32 @@
|
||||
Summary: Hardware lister
|
||||
Name: lshw
|
||||
Version: B.02.18
|
||||
Release: 22%{?dist}
|
||||
Version: B.02.19.2
|
||||
Release: 2%{?dist}
|
||||
License: GPLv2
|
||||
Group: Applications/System
|
||||
URL: http://ezix.org/project/wiki/HardwareLiSter
|
||||
Source0: http://www.ezix.org/software/files/lshw-%{version}.tar.gz
|
||||
Patch1: lshw-B.02.18-scandir.patch
|
||||
Patch2: lshw-B.02.18-20cda77.patch
|
||||
Patch3: lshw-B.02.18-revert-json.patch
|
||||
Patch4: lshw-B.02.18-cmake.patch
|
||||
Patch5: lshw-B.02.18-Add-the-FindPkgConfig-to-CMakeLists.patch
|
||||
Patch6: 0001-merge-Github-PR-40-and-41.patch
|
||||
Patch7: 0002-Avoid-very-long-IDE-programming-interface-names-as-c.patch
|
||||
Patch8: 0003-Set-powerpc-logo-hint.patch
|
||||
Patch9: 0004-Fix-DIMM-info-for-older-IBM-POWER-systems.patch
|
||||
Patch10: 0005-apply-Github-PR42.patch
|
||||
Patch11: 0006-add-Hygon-company-description-for-Hygon-CPU-VendorID.patch
|
||||
Patch12: 0007-update-id-files.patch
|
||||
Patch13: 0008-merge-Github-PR44.patch
|
||||
Patch14: 0001-Display-proper-logical-name-of-network-device.patch
|
||||
Patch15: 0001-spd-Print-dimm-rank-information.patch
|
||||
Patch16: 0002-devtree-Add-DIMM-running-speed.patch
|
||||
Patch2: lshw-B.02.18-revert-json.patch
|
||||
Patch3: lshw-B.02.19.2-cmake.patch
|
||||
Patch4: lshw-B.02.19.2-Add-the-FindPkgConfig-to-CMakeLists.patch
|
||||
Patch5: 0001-report-CPU-family-model-stepping.patch
|
||||
Patch6: 0002-move-PnP-devices-to-the-ISA-LPC-bridge.patch
|
||||
Patch7: 0003-correctly-format-SMBIOS-UUID.patch
|
||||
Patch8: 0004-cosmetic-clean-up.patch
|
||||
Patch9: 0005-begin-work-on-input-devices.patch
|
||||
Patch10: 0006-cosmetic-fixes.patch
|
||||
Patch11: 0007-detect-sound-devices.patch
|
||||
Patch12: 0008-detect-framebuffers.patch
|
||||
Patch13: 0009-try-to-connect-input-devices-to-the-right-parent.patch
|
||||
Patch14: 0010-devtree-Add-chip-id-from-the-dimm-module.patch
|
||||
Patch15: 0011-devtree-Add-chip-id-from-CPU-node.patch
|
||||
Patch16: 0012-volumes-fix-segfault-in-apfs-volume-code.patch
|
||||
Patch17: 0013-merge-Github-PR-53.patch
|
||||
Patch18: 0014-devtree-Add-capabilites-to-the-OPAL-Firmware.patch
|
||||
Patch19: 0015-fix-issue-with-logical-names-being-truncated-dev-sda.patch
|
||||
Patch20: 0016-code-clean-up-for-read-3.patch
|
||||
Patch21: 0017-report-product-model-on-Power-systems.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: desktop-file-utils
|
||||
@ -57,8 +62,8 @@ format.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch01 -p1
|
||||
%patch02 -p1
|
||||
%patch03 -R -p1
|
||||
%patch02 -R -p1
|
||||
%patch03 -p1
|
||||
%patch04 -p1
|
||||
%patch05 -p1
|
||||
%patch06 -p1
|
||||
@ -72,6 +77,11 @@ format.
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
%patch16 -p1
|
||||
%patch17 -p1
|
||||
%patch18 -p1
|
||||
%patch19 -p1
|
||||
%patch20 -p1
|
||||
%patch21 -p1
|
||||
|
||||
%build
|
||||
mkdir build && pushd build
|
||||
@ -119,6 +129,16 @@ src/lshw -json \
|
||||
%{_datadir}/polkit-1/actions/org.ezix.lshw.gui.policy
|
||||
|
||||
%changelog
|
||||
* Wed May 27 2020 Lianbo Jiang <lijiang@redhat.com> - B.02.19.2-2
|
||||
- Update to upstream master 3775782808e8
|
||||
|
||||
* Tue May 26 2020 Lianbo Jiang <lijiang@redhat.com> - B.02.19.2-1
|
||||
- B.02.19.2
|
||||
|
||||
* Mon Feb 10 2020 Lianbo Jiang <lijiang@redhat.com> - B.02.18-23
|
||||
- Do not show modified time with -notime option
|
||||
- Resolves: rhbz#1733126
|
||||
|
||||
* Thu Nov 21 2019 Lianbo Jiang <lijiang@redhat.com> - B.02.18-22
|
||||
- Display proper logical name of network device
|
||||
- Resolves: rhbz#1724087
|
||||
|
Loading…
Reference in New Issue
Block a user