From b20cff753ff0ffc24121cb35d2e2d218c2d26cf3 Mon Sep 17 00:00:00 2001 From: Matt Madison Date: Sat, 27 Jul 2024 06:35:07 -0700 Subject: [PATCH] libconfig-tegra, libusbgx-tegra-initrd-flash: meta-oe compatibility These recipes are included to allow the initrd used for flashing to be built without relying on the meta-oe layer. Clean them up so that if meta-oe is part of the build, they don't conflict with the real recipes for things like SDK builds. For libconfig-tegra, exclude it completely when meta-oe is present, since we can use the normal libconfig recipe instead. The libusbgx build is customized for the initrd flash initramfs, so for now, at least, just empty the -dev package for it. Signed-off-by: Matt Madison --- recipes-extended/libconfig/libconfig-tegra_1.7.3.bb | 8 ++++++-- .../libusbgx/libusbgx-tegra-initrd-flash_git.bb | 9 ++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/recipes-extended/libconfig/libconfig-tegra_1.7.3.bb b/recipes-extended/libconfig/libconfig-tegra_1.7.3.bb index 3ba7693f..087df665 100644 --- a/recipes-extended/libconfig/libconfig-tegra_1.7.3.bb +++ b/recipes-extended/libconfig/libconfig-tegra_1.7.3.bb @@ -11,7 +11,7 @@ SRC_URI = "https://hyperrealm.github.io/libconfig/dist/libconfig-${PV}.tar.gz" SRC_URI[md5sum] = "15ec701205f91f21b1187f8b61e0d64f" SRC_URI[sha256sum] = "545166d6cac037744381d1e9cc5a5405094e7bfad16a411699bcff40bbb31ee7" -COMPATIBLE_MACHINE = "(tegra)" +PROVIDES = "libconfig" S = "${WORKDIR}/libconfig-${PV}" @@ -19,4 +19,8 @@ inherit autotools-brokensep pkgconfig PACKAGE_BEFORE_PN = "${PN}++" FILES:${PN}++ = "${libdir}/${BPN}++*${SOLIBS}" -PACKAGE_ARCH = "${TEGRA_PKGARCH}" + +python() { + if 'openembedded-layer' in d.getVar('BBFILE_COLLECTIONS').split(): + raise bb.parse.SkipRecipe('meta-oe layer present, recipe not required') +} diff --git a/recipes-support/libusbgx/libusbgx-tegra-initrd-flash_git.bb b/recipes-support/libusbgx/libusbgx-tegra-initrd-flash_git.bb index 653b15d9..8155f2c4 100644 --- a/recipes-support/libusbgx/libusbgx-tegra-initrd-flash_git.bb +++ b/recipes-support/libusbgx/libusbgx-tegra-initrd-flash_git.bb @@ -16,11 +16,18 @@ SRC_URI = "git://${SRC_REPO};branch=${SRCBRANCH}" S = "${WORKDIR}/git" PACKAGECONFIG = "examples gadget-schemes libconfig" -PACKAGECONFIG[libconfig] = "--with-libconfig=yes,--without-libconfig,libconfig-tegra" +PACKAGECONFIG[libconfig] = "--with-libconfig=yes,--without-libconfig,libconfig" PACKAGECONFIG[examples] = "--enable-examples,--disable-examples" PACKAGECONFIG[gadget-schemes] = "--enable-gadget-schemes,--disable-gadget-schemes" PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,cmocka" +do_install:append() { + rm -rf ${D}${includedir} + rm -rf ${D}${libdir}/pkgconfig + rm -f ${D}${libdir}/*${SOLIBSDEV} +} + +ALLOW_EMPTY:${PN}-dev = "1" RRECOMMENDS:${PN} = "kernel-module-tegra-xudc" RCONFLICTS:${PN} = "libusbgx libusbgx-examples" PACKAGE_ARCH = "${TEGRA_PKGARCH}"