Tiny Core Linux
Tiny Core Extensions => TCE Bugs => Topic started by: GNUser on June 30, 2020, 01:48:10 PM
-
Hi, Rich. I just wanted to point out that the latest lshw in the TCL11 x86_64 and TCL10 x86 repos is not showing the "product" and "vendor" lines as expected.
These are the expected output lines:
description: foo
product: bar
vendor: baz
physical id: bang
These are the acual output lines:
description: foo
physical id: bang
For example, this is the actual output when using lshw on TCL11 64:
$ sudo /usr/local/sbin/lshw -c network
*-network
description: Ethernet interface
physical id: 19
bus info: pci@0000:00:19.0
logical name: eth0
version: 03
serial: 00:1f:16:17:f0:da
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=1.8-3 latency=0 link=no multicast=yes port=twisted pair
resources: irq:29 memory:e1a00000-e1a1ffff memory:e1a24000-e1a24fff ioport:3000(size=32)
*-network
description: Wireless interface
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlan0
version: 01
serial: 24:fd:52:18:5b:e5
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical wireless
configuration: broadcast=yes driver=ath9k driverversion=5.4.3-tinycore64 firmware=N/A ip=10.1.86.254 latency=0 link=yes multicast=yes wireless=IEEE 802.11
resources: irq:17 memory:e1900000-e191ffff memory:e1920000-e192ffff
*-network DISABLED
description: Ethernet interface
physical id: 1
logical name: dummy0
serial: 46:e9:67:5b:59:d2
capabilities: ethernet physical
configuration: broadcast=yes driver=dummy driverversion=1.0
But this is the expected output (which is what I see when I use a homebrewed portable version of lshw):
$ sudo /opt/bin/lshw -c network
*-network
description: Ethernet interface
product: 82567LM Gigabit Network Connection
vendor: Intel Corporation
physical id: 19
bus info: pci@0000:00:19.0
logical name: eth0
version: 03
serial: 00:1f:16:17:f0:da
capacity: 1Gbit/s
width: 32 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=1.8-3 latency=0 link=no multicast=yes port=twisted pair
resources: irq:29 memory:e1a00000-e1a1ffff memory:e1a24000-e1a24fff ioport:3000(size=32)
*-network
description: Wireless interface
product: AR93xx Wireless Network Adapter
vendor: Qualcomm Atheros
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlan0
version: 01
serial: 24:fd:52:18:5b:e5
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical wireless
configuration: broadcast=yes driver=ath9k driverversion=5.4.3-tinycore64 firmware=N/A ip=10.1.86.254 latency=0 link=yes multicast=yes wireless=IEEE 802.11
resources: irq:17 memory:e1900000-e191ffff memory:e1920000-e192ffff
*-network DISABLED
description: Ethernet interface
physical id: 1
logical name: dummy0
serial: 46:e9:67:5b:59:d2
capabilities: ethernet physical
configuration: broadcast=yes driver=dummy driverversion=1.0
Any idea why the repo version of lshw is missing the helpful "product" and "vendor" fields?
-
Hi GNUser !
I am sorry if this looks too bad but did you install lshw-dev ?
I have noticed that the files required for lshw to list vendor and product lines (they are the identifier files for each vendor and product
/usr/share/lshw/oui.txt
/usr/share/lshw/pci.ids
/usr/share/lshw/usb.ids
) are in -dev. So, I suggest trying it.
-
There is no lshw-dev.tcz in the repo.
Also, I noticed that lshw.tcz includes these files:
/usr/local/share/lshw/pci.ids.gz
/usr/local/share/lshw/pnp.ids.gz
/usr/local/share/lshw/pnpid.txt.gz
/usr/local/share/lshw/usb.ids.gz
-
You should have oui.txt and all the above said files.
Oh ! I saw x86 repo before :P . I think you are using x64. Just now saw that they are in -doc in x64. Try it.
-
Hi GNUser
I did a little poking around and this is what I found.
Checking the CPU produces product and vendor in the output:
tc@E310:~$ sudo lshw -c cpu
*-cpu
description: CPU
product: Intel(R) Pentium(R) 4 CPU 2.80GHz
vendor: Intel Corp.
physical id: 400
bus info: cpu@0
version: 15.4.9
serial: 0000-0F49-0000-0000-0000-0000
slot: Microprocessor
size: 2800MHz
capacity: 4GHz
width: 64 bits
clock: 800MHz
capabilities: boot fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe x86-64 constant_tsc pebs bts cpuid pni dtes64 monitor ds_cpl cid cx16 xtpr lahf_lm
configuration: id=0
*-logicalcpu:0
description: Logical CPU
physical id: 0.1
width: 64 bits
capabilities: logical
*-logicalcpu:1
description: Logical CPU
physical id: 0.2
width: 64 bits
capabilities: logical
tc@E310:~$
Checking the network with the -numeric option produces product and vendor in the output:
tc@E310:~$ sudo lshw -numeric -c network
*-network
description: Ethernet interface
product: [8086:1064]
vendor: [8086]
physical id: 8
bus info: pci@0000:03:08.0
logical name: eth0
version: 04
serial: 00:13:20:c4:4a:20
size: 100Mbit/s
capacity: 100Mbit/s
width: 32 bits
clock: 33MHz
capabilities: pm bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=e100 driverversion=3.5.24-k2-NAPI duplex=full ip=192.168.1.35 latency=64 link=yes maxlatency=56 mingnt=8 multicast=yes port=MII speed=100Mbit/s
resources: irq:20 memory:dfcff000-dfcfffff ioport:dcc0(size=64)
*-network DISABLED
description: Ethernet interface
physical id: 1
logical name: dummy0
serial: ee:f4:2f:68:6e:22
capabilities: ethernet physical
configuration: broadcast=yes driver=dummy driverversion=1.0
tc@E310:~$
This is from the pci.ids.gz file. The 8086:1064 shows up, but without the 8086 prefix. Maybe that's why its not listing those fields.
1060 82571EB Gigabit Ethernet Controller
8086 0060 PRO/1000 PB Dual Port Server Connection
8086 1060 PRO/1000 PB Dual Port Server Connection
1064 82562ET/EZ/GT/GZ - PRO/100 VE (LOM) Ethernet Controller
-
I figured out the problem: The lshw binary in the extension looks for data files in /usr/share/lshw. However, the extension puts those data files in /usr/local/share/lshw:
$ sudo strace -e trace=file /usr/local/sbin/lshw -c network 2>&1 | grep -F share/lshw
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pci.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pnp.ids.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pnp.ids", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pnpid.txt.gz", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/lshw/pnpid.txt", O_RDONLY) = -1 ENOENT (No such file or directory)
If I create a link, then lshw works as expected:
$ sudo ln -s /usr/local/share/lshw /usr/share/lshw
$ sudo /usr/local/sbin/lshw -c network
...
*-network
description: Wireless interface
product: AR93xx Wireless Network Adapter
vendor: Qualcomm Atheros
physical id: 0
...
Maybe the root issue goes back to when lshw was compiled (missing "--prefix=/usr/local"). The fix would be to recompile lshw or to include link from /usr/share/lshw to /usr/local/share/lshw in the extension.
Rich, to prevent duplicating effort: Do you want to fix this issue or should I?
-
Maybe the root issue goes back to when lshw was compiled (missing "--prefix=/usr/local"). The fix would be to recompile lshw or to include link from /usr/share/lshw to /usr/local/share/lshw in the extension.
It would be better to find the hard coded address in the code and fix it. Is there an option to use the data in pci-utils?
-
A simple fix would be to move the four database files up from the /usr/local/share/lshw directory to the /usr/local/share directory.
/usr/local/share (but not /usr/local/share/lshw) is already one of the places where lshw looks for the data files :)
$ strings /usr/local/sbin/lshw | grep share
...
/usr/local/share/pci.ids:/usr/share/lshw/pci.ids:/usr/local/share/pci.ids:/usr/share/pci.ids:/etc/pci.ids:/usr/share/hwdata/pci.ids:/usr/share/misc/pci.ids
/usr/local/share/pnp.ids:/usr/share/lshw/pnp.ids:/usr/share/hwdata/pnp.ids
/usr/local/share/pnpid.txt:/usr/share/lshw/pnpid.txt:/usr/share/hwdata/pnpid.txt
/usr/local/share/usb.ids:/usr/share/lshw/usb.ids:/usr/local/share/usb.ids:/usr/share/usb.ids:/etc/usb.ids:/usr/share/hwdata/usb.ids:/usr/share/misc/usb.ids
It would therefore be trivial to fix the existing extensions.
@Rich - I see you were the last one to submit the lshw extension. Would you like to do this, or should I?
-
Since I'm the one that seems to be the most bothered by this, I went ahead and fixed it for TCL10 (32 and 64 bit) and TCL11 (32 and 64 bit).
I did not recompile, just moved the .gz data archives from /usr/local/share/lshw/ to /usr/local/share/
The four adjusted extensions have been submitted :)
-
Hi Juanito
... It would be better to find the hard coded address in the code and fix it. ...
I modified the build script to search the .cc files and fix them. Updated to newer version:
* lshw B.02.19
detection of NVMe disks
detection of SD/MMC and SDIO devices
bug fixes
code cleanup
updated data files
Newly compiled extensions submitted.
-
Hi GNUser
Since I'm the one that seems to be the most bothered by this, ...
Now that's simply not true. I was busy yesterday and did not check the forum until last night.
-
I've received submissions from both of you :) which one should I use?
-
Rich's is the better solution. Please go ahead and post his :)
-
Rich - Sorry for assuming I was the one most bothered. It was not meant as an accusation, just a call to action to myself. I tend to have a bit of inertia.
-
Hi GNUser
Rich - Sorry for assuming I was the one most bothered. ...
No problem. I was just having a little fun at your expense and probably should have included a smiley face in my comment ;D.
I figured out the problem: The lshw binary in the extension looks for data files in /usr/share/lshw. However, the extension puts those data files in /usr/local/share/lshw ...
Thank you for taking the time to pinpoint the issue.
-
update posted :)
-
Hi Juanito
Thanks, but I don't see it in the TC10 repo :'(.
-
done now..
-
Hi Juanito
Thank you.