mirror of
https://git.yoctoproject.org/poky
synced 2026-03-09 16:59:40 +01:00
if virtualization is enabled as DISTRO_FEATURES, then meta-virtualization layer
enables CONFIG_LSPCI=y for busybox, which in result have conflicts with pciutils
update-alternatives: Error: not linking ..core-image-base/1.0-r0/rootfs/usr/bin/lspci
to /bin/busybox.nosuid since
..core-image-base/1.0-r0/rootfs/usr/bin/lspci exists and is not a link
So marking it as ALTERNATIVE with ALTERNATIVE_PRIORITY set to 100
Ref:
https://git.yoctoproject.org/poky/commit/meta/recipes-bsp/pciutils?id=a81af375dfc51446b21548dce2afa6a77bc02df3
0b307156c9
https://git.yoctoproject.org/meta-virtualization/tree/recipes-core/busybox/busybox/lspci.cfg
https://git.yoctoproject.org/meta-virtualization/tree/recipes-core/busybox/busybox_virtualization.inc#n4
https://git.yoctoproject.org/meta-virtualization/tree/recipes-core/busybox/busybox_%25.bbappend#n1
(From OE-Core rev: bbb7dcb461c09409b556571cf645bcadf12f397c)
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 257e7620a79ea50c0c59746ff9a3817d43411e39)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
63 lines
1.9 KiB
BlitzBasic
63 lines
1.9 KiB
BlitzBasic
SUMMARY = "PCI utilities"
|
|
DESCRIPTION = 'The PCI Utilities package contains a library for portable access \
|
|
to PCI bus configuration space and several utilities based on this library.'
|
|
HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml"
|
|
SECTION = "console/utils"
|
|
|
|
LICENSE = "GPL-2.0-or-later"
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
|
|
DEPENDS = "zlib kmod"
|
|
|
|
SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \
|
|
file://configure.patch"
|
|
|
|
SRC_URI[sha256sum] = "9d40b97be8b6a2cdf96aead5a61881d1f7e4e0da9544a9bac4fba1ae9dcd40eb"
|
|
|
|
inherit multilib_header pkgconfig update-alternatives
|
|
|
|
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}"
|
|
PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev"
|
|
|
|
PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes STRIP= LIBDIR=${libdir}"
|
|
|
|
# see configure.patch
|
|
do_configure () {
|
|
(
|
|
cd lib && \
|
|
# PACKAGECONFIG_CONFARGS for this recipe could only possibly contain 'HWDB=yes/no',
|
|
# so we put it before ./configure
|
|
${PCI_CONF_FLAG} ${PACKAGECONFIG_CONFARGS} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH}
|
|
)
|
|
}
|
|
|
|
export PREFIX = "${prefix}"
|
|
export SBINDIR = "${sbindir}"
|
|
export SHAREDIR = "${datadir}"
|
|
export MANDIR = "${mandir}"
|
|
|
|
EXTRA_OEMAKE = "-e MAKEFLAGS= ${PCI_CONF_FLAG}"
|
|
|
|
ASNEEDED = ""
|
|
|
|
# The configure script breaks if the HOST variable is set
|
|
HOST[unexport] = "1"
|
|
|
|
do_install () {
|
|
oe_runmake DESTDIR=${D} install install-lib
|
|
|
|
install -d ${D}${bindir}
|
|
ln -s ../sbin/lspci ${D}${bindir}/lspci
|
|
|
|
oe_multilib_header pci/config.h
|
|
}
|
|
|
|
PACKAGES =+ "${PN}-ids libpci"
|
|
FILES:${PN}-ids = "${datadir}/pci.ids*"
|
|
FILES:libpci = "${libdir}/libpci.so.*"
|
|
SUMMARY:${PN}-ids = "PCI utilities - device ID database"
|
|
DESCRIPTION:${PN}-ids = "Package providing the PCI device ID database for pciutils."
|
|
RDEPENDS:${PN} += "${PN}-ids"
|
|
|
|
ALTERNATIVE:${PN} = "lspci"
|
|
ALTERNATIVE_PRIORITY = "100"
|