lshw: Add new recipe with B.02.18 version
PATCH v3 1/1 lshw: Add new recipe with B.02.18 version
Add new recipe for lshw B.02.18 version - a small tool to provide detailed information on the hardware configuration of the machine.
---
Changes since v2:
1. Fix build with musl libc (suggested by Khem Raj),
2. Refresh patches, extend changelog and fix signed-off by to account used.
Changes since v1:
1. Drop dependency on pciutils and usbutils and use pci.ids and usb.ids bundled with lshw. Recent usbutils do not provide usb.ids (moved to udev-hwdb).
pciutils do provide pci.ids... but in gzipped form which is not yet supported by lshw (next release should support it).
Changes since meta-linaro recipe:
The recipe is based on existing meta-linaro:
https://layers.openembedded.org/layerindex/recipe/5446/
with changes:
1. Bump to 02.18,
2. Fix QA issue with GNU_HASH,
3. Minor recipe styling fixes.
--- .../0001-Makefile-Fix-cross-compilation.patch | 57 ++++++++++++++ ...e-supplied-LDFLAGS-to-silence-OE-GNU_HASH.patch | 34 ++++++++ .../0003-sysfs-Fix-basename-build-with-musl.patch | 92 ++++++++++++++++++++++ meta-oe/recipes-devtools/lshw/lshw_02.18.bb | 32 ++++++++ 4 files changed, 215 insertions(+) create mode 100644 meta-oe/recipes-devtools/lshw/files/0001-Makefile-Fix-cross-compilation.patch create mode 100644 meta-oe/recipes-devtools/lshw/files/0002-Makefile-Use-supplied-LDFLAGS-to-silence-OE-GNU_HASH.patch create mode 100644 meta-oe/recipes-devtools/lshw/files/0003-sysfs-Fix-basename-build-with-musl.patch create mode 100644 meta-oe/recipes-devtools/lshw/lshw_02.18.bb
meta-oe/recipes-devtools/lshw/files/0001-Makefile-Fix-cross-compilation.patch new file +57 -0
@@ -0,0 +1,57 @@ +From 62f9ed95b5d0feab426bff452be793c62a6b795a Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski <[email protected]> +Date: Wed, 6 Jun 2018 12:49:21 +0200 +Subject: [PATCH 1/2] Makefile: Fix cross compilation + +Allow building on ARMv7 and ARMv8. + +Upstream-Status: Submitted +Signed-off-by: Krzysztof Kozlowski <[email protected]> +--- + src/Makefile | 2 +- + src/core/Makefile | 2 +- + src/gui/Makefile | 4 ++-- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/Makefile b/src/Makefile +index b50586bc9234..654b786dd899 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -18,7 +18,7 @@ export MANDIR + export DATADIR + export SQLITE + +-CXX?=c++ ++CXX?=$(CROSS_COMPILE)c++ + INCLUDES=-I./core/ + DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" + CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) +diff --git a/src/core/Makefile b/src/core/Makefile +index 5bf5a69cc6a6..2bd1b94c4175 100644 +--- a/src/core/Makefile ++++ b/src/core/Makefile +@@ -1,6 +1,6 @@ + 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) +diff --git a/src/gui/Makefile b/src/gui/Makefile +index 332ce5704819..b0f925490356 100644 +--- a/src/gui/Makefile ++++ b/src/gui/Makefile +@@ -1,7 +1,7 @@ + PACKAGENAME?=lshw + +-CXX?=c++ +-CC?=cc ++CXX?=$(CROSS_COMPILE)c++ ++CC?=$(CROSS_COMPILE)cc + STRIP?=strip + OBJCOPY?=objcopy + +-- +2.7.4 +
meta-oe/recipes-devtools/lshw/files/0002-Makefile-Use-supplied-LDFLAGS-to-silence-OE-GNU_HASH.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 75667f8a0ae4f1689ff03eb1768b1ee8cdfbf00d Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski <[email protected]> +Date: Wed, 6 Jun 2018 12:49:30 +0200 +Subject: [PATCH 2/2] Makefile: Use supplied LDFLAGS to silence OE GNU_HASH QA + warning + +Fix OpenEmbedded/Yocto QA warning: + + ERROR: lshw-02.16-r1 do_package_qa: QA Issue: No GNU_HASH in the elf binary: 'build/tmp/work/cortexa5hf-neon-poky-linux-gnueabi/lshw/02.16-r1/packages-split/lshw/usr/sbin/lshw' [ldflags] + ERROR: lshw-02.16-r1 do_package_qa: QA run found fatal errors. Please consider fixing them. + ERROR: lshw-02.16-r1 do_package_qa: Function failed: do_package_qa + +Upstream-Status: Submitted +Signed-off-by: Krzysztof Kozlowski <[email protected]> +--- + src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index 654b786dd899..a441ba2bb666 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -25,7 +25,7 @@ CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) + ifeq ($(SQLITE), 1) + CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3) + endif +-LDFLAGS=-L./core/ -g ++LDFLAGS+=-L./core/ -g + ifneq ($(shell $(LD) --help 2| grep -- --as-needed), ) + LDFLAGS+= -Wl,--as-needed + endif +-- +2.7.4 +
meta-oe/recipes-devtools/lshw/files/0003-sysfs-Fix-basename-build-with-musl.patch new file +92 -0
92 lines not on this page · raw message
meta-oe/recipes-devtools/lshw/lshw_02.18.bb new file +32 -0
@@ -0,0 +1,32 @@ +DESCRIPTION = "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 or EFI systems." +SUMMARY = "Hardware lister" +HOMEPAGE = "http://ezix.org/project/wiki/HardwareLiSter" +SECTION = "console/tools" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" + +SRC_URI = " \ + http://ezix.org/software/files/lshw-B.${PV}.tar.gz \ + file://0001-Makefile-Fix-cross-compilation.patch \ + file://0002-Makefile-Use-supplied-LDFLAGS-to-silence-OE-GNU_HASH.patch \ + file://0003-sysfs-Fix-basename-build-with-musl.patch \ +" +SRC_URI[md5sum] = "8671c6d94d6324a744b7f21f1bfecfd2" +SRC_URI[sha256sum] = "ae22ef11c934364be4fd2a0a1a7aadf4495a0251ec6979da280d342a89ca3c2f" + +S = "${WORKDIR}/lshw-B.${PV}" + +do_compile() { + # build core only - don't ship gui + oe_runmake -C src core +} + +do_install() { + oe_runmake install DESTDIR=${D} +}
Signature · 1 line
2.14.1