diff mbox series

[meta-arago,master/scarthgap,04/10] mtd-utils: Wrap the bbappend in a compliant manner

Message ID 20250312144540.14210-5-reatmon@ti.com
State New
Headers show
Series Wrap bbappends in a | expand

Commit Message

Ryan Eatmon March 12, 2025, 2:45 p.m. UTC
Wrap the bbappend in a yocto-check-layer compliant manner so that only
if you are building this recipe under meta-ti-bsp with ti-soc in the
MACHINE_OVERRIDES would the bbappend apply.

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
---
 .../recipes-core/packagegroups/ti-test.bb     |  5 +-
 ...{mtd-utils_%.bbappend => mtd-utils-ti.inc} |  0
 .../recipes-devtools/mtd/mtd-utils_%.bbappend | 47 ++-----------------
 3 files changed, 7 insertions(+), 45 deletions(-)
 copy meta-arago-test/recipes-devtools/mtd/{mtd-utils_%.bbappend => mtd-utils-ti.inc} (100%)
diff mbox series

Patch

diff --git a/meta-arago-test/recipes-core/packagegroups/ti-test.bb b/meta-arago-test/recipes-core/packagegroups/ti-test.bb
index 934a2c47..a5a8838f 100644
--- a/meta-arago-test/recipes-core/packagegroups/ti-test.bb
+++ b/meta-arago-test/recipes-core/packagegroups/ti-test.bb
@@ -38,7 +38,6 @@  TI_TEST_BASE = "\
     mstpd \
     mtd-utils \
     mtd-utils-ubifs \
-    mtd-utils-ubifs-tests \
     nbench-byte \
     netperf \
     openntpd \
@@ -59,6 +58,10 @@  TI_TEST_BASE = "\
     yavta \
 "
 
+TI_TEST_BASE:ti-soc:append = " \
+    mtd-utils-ubifs-tests \
+"
+
 TI_TEST_EXTRAS = " \
     python3-pillow \
     pytesseract \
diff --git a/meta-arago-test/recipes-devtools/mtd/mtd-utils_%.bbappend b/meta-arago-test/recipes-devtools/mtd/mtd-utils-ti.inc
similarity index 100%
copy from meta-arago-test/recipes-devtools/mtd/mtd-utils_%.bbappend
copy to meta-arago-test/recipes-devtools/mtd/mtd-utils-ti.inc
diff --git a/meta-arago-test/recipes-devtools/mtd/mtd-utils_%.bbappend b/meta-arago-test/recipes-devtools/mtd/mtd-utils_%.bbappend
index 1120e87a..bdf28247 100644
--- a/meta-arago-test/recipes-devtools/mtd/mtd-utils_%.bbappend
+++ b/meta-arago-test/recipes-devtools/mtd/mtd-utils_%.bbappend
@@ -1,45 +1,4 @@ 
-PR:append = ".arago2"
+MTD_UTILS_TI = ""
+MTD_UTILS_TI:ti-soc = "mtd-utils-ti.inc"
 
-SRC_URI:remove = "git://git.infradead.org/mtd-utils.git;branch=master \
-"
-
-SRC_URI:prepend = "git://git.infraroot.at/mtd-utils.git;branch=master;protocol=https \
-"
-
-EXTRA_OEMAKE = "'CC=${CC} ${CFLAGS} ${@bb.utils.contains('PACKAGECONFIG', 'xattr', '', '-DWITHOUT_XATTR', d)} -I${S}/include' 'RANLIB=${RANLIB}' 'AR=${AR}' 'BUILDDIR=${S}'"
-
-do_compile:append() {
-	oe_runmake tests
-}
-
-do_install:append() {
-	install -m 0755 io_update ${D}${sbindir}/
-	install -m 0755 volrefcnt ${D}${sbindir}/
-	install -m 0755 integ ${D}${sbindir}/
-	install -m 0755 io_paral ${D}${sbindir}/
-	install -m 0755 io_read ${D}${sbindir}/
-	install -m 0755 io_basic ${D}${sbindir}/
-	install -m 0755 mkvol_basic ${D}${sbindir}/
-	install -m 0755 mkvol_bad ${D}${sbindir}/
-	install -m 0755 mkvol_paral ${D}${sbindir}/
-	install -m 0755 rsvol ${D}${sbindir}/
-	install -m 0755 tests/ubi-tests/runubitests.sh ${D}${sbindir}/
-	install -m 0755 tests/ubi-tests/ubi-stress-test.sh ${D}${sbindir}/
-}
-
-PACKAGES =+ "mtd-utils-ubifs-tests"
-
-FILES:mtd-utils-ubifs-tests = " \
-${sbindir}/io_update \
-${sbindir}/volrefcnt \
-${sbindir}/integ \
-${sbindir}/io_paral \
-${sbindir}/io_read \
-${sbindir}/io_basic \
-${sbindir}/mkvol_basic \
-${sbindir}/mkvol_bad \
-${sbindir}/mkvol_paral \
-${sbindir}/rsvol \
-${sbindir}/runubitests.sh \
-${sbindir}/ubi-stress-test.sh \
-"
+require ${MTD_UTILS_TI}