summaryrefslogtreecommitdiffstats
path: root/meta-selftest
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2022-11-07 15:55:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-11-08 22:47:17 +0000
commitb3d0e068f72b79f868940877b147fcfda67623a7 (patch)
tree330dc4a366301a2fe3c528e98936cd7658a8b900 /meta-selftest
parentc750c1f473d2bdc026bcb99442a979424f6fabcc (diff)
downloadpoky-b3d0e068f72b79f868940877b147fcfda67623a7.tar.gz
selftest: add a copy of previous mtd-utils version to meta-selftest
The latest version update eliminated all custom patches, and the selftest expects them. (From OE-Core rev: 95298a7f1ad29c0fc0d02772d646116709ac355f) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-selftest')
-rw-r--r--meta-selftest/recipes-devtools/mtd/mtd-utils-selftest/0001-tests-Remove-unused-linux-fs.h-header-from-includes.patch31
-rw-r--r--meta-selftest/recipes-devtools/mtd/mtd-utils-selftest_git.bb77
2 files changed, 108 insertions, 0 deletions
diff --git a/meta-selftest/recipes-devtools/mtd/mtd-utils-selftest/0001-tests-Remove-unused-linux-fs.h-header-from-includes.patch b/meta-selftest/recipes-devtools/mtd/mtd-utils-selftest/0001-tests-Remove-unused-linux-fs.h-header-from-includes.patch
new file mode 100644
index 0000000000..73d4a8475f
--- /dev/null
+++ b/meta-selftest/recipes-devtools/mtd/mtd-utils-selftest/0001-tests-Remove-unused-linux-fs.h-header-from-includes.patch
@@ -0,0 +1,31 @@
1From 6fb10bd18488ed84776675bc1b2982800a51d839 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 6 Aug 2022 20:14:38 -0700
4Subject: [mtd-utils][PATCH] tests: Remove unused linux/fs.h header from includes
5
6This header is not needed, moreover it includes linux/mount.h which is
7now in conflict[1] with glibc provided sys/mount.h from glibc 2.36 onwards
8
9[1] https://sourceware.org/glibc/wiki/Release/2.36
10
11Upstream-Status: Submitted [https://lists.infradead.org/pipermail/linux-mtd/2022-August/094667.html]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 tests/fs-tests/lib/tests.c | 1 -
15 1 file changed, 1 deletion(-)
16
17diff --git a/tests/fs-tests/lib/tests.c b/tests/fs-tests/lib/tests.c
18index d1a2e0c..3db0426 100644
19--- a/tests/fs-tests/lib/tests.c
20+++ b/tests/fs-tests/lib/tests.c
21@@ -35,7 +35,6 @@
22 #include <sys/vfs.h>
23 #include <sys/mount.h>
24 #include <sys/statvfs.h>
25-#include <linux/fs.h>
26 #include <linux/jffs2.h>
27
28 #include "tests.h"
29--
302.37.1
31
diff --git a/meta-selftest/recipes-devtools/mtd/mtd-utils-selftest_git.bb b/meta-selftest/recipes-devtools/mtd/mtd-utils-selftest_git.bb
new file mode 100644
index 0000000000..ca2141c972
--- /dev/null
+++ b/meta-selftest/recipes-devtools/mtd/mtd-utils-selftest_git.bb
@@ -0,0 +1,77 @@
1SUMMARY = "Tools for managing memory technology devices"
2HOMEPAGE = "http://www.linux-mtd.infradead.org/"
3DESCRIPTION = "mtd-utils tool is a generic Linux subsystem for memory devices, especially Flash devices."
4SECTION = "base"
5LICENSE = "GPL-2.0-or-later"
6LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
7 file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
8
9inherit autotools pkgconfig update-alternatives
10
11DEPENDS = "zlib e2fsprogs util-linux"
12RDEPENDS:mtd-utils-tests += "bash"
13
14PV = "2.1.4"
15
16SRCREV = "c7f1bfa44a84d02061787e2f6093df5cc40b9f5c"
17SRC_URI = "git://git.infradead.org/mtd-utils.git;branch=master \
18 file://0001-tests-Remove-unused-linux-fs.h-header-from-includes.patch \
19 "
20
21S = "${WORKDIR}/git"
22
23# xattr support creates an additional compile-time dependency on acl because
24# the sys/acl.h header is needed. libacl is not needed and thus enabling xattr
25# regardless whether acl is enabled or disabled in the distro should be okay.
26PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)} lzo jffs ubifs"
27PACKAGECONFIG[lzo] = "--with-lzo,--without-lzo,lzo"
28PACKAGECONFIG[xattr] = "--with-xattr,--without-xattr,acl"
29PACKAGECONFIG[crypto] = "--with-crypto,--without-crypto,openssl"
30PACKAGECONFIG[jffs] = "--with-jffs,--without-jffs"
31PACKAGECONFIG[ubifs] = "--with-ubifs,--without-ubifs"
32PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
33
34CPPFLAGS:append:riscv64 = " -pthread -D_REENTRANT"
35
36EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} ${@bb.utils.contains('PACKAGECONFIG', 'xattr', '', '-DWITHOUT_XATTR', d)} -I${S}/include' 'BUILDDIR=${S}'"
37
38# Use higher priority than corresponding BusyBox-provided applets
39ALTERNATIVE_PRIORITY = "100"
40
41ALTERNATIVE:${PN} = "flashcp flash_eraseall flash_lock flash_unlock nanddump nandwrite"
42ALTERNATIVE:${PN}-ubifs = "ubiattach ubidetach ubimkvol ubirename ubirmvol ubirsvol ubiupdatevol"
43
44ALTERNATIVE_LINK_NAME[nandwrite] = "${sbindir}/nandwrite"
45ALTERNATIVE_LINK_NAME[nanddump] = "${sbindir}/nanddump"
46ALTERNATIVE_LINK_NAME[ubiattach] = "${sbindir}/ubiattach"
47ALTERNATIVE_LINK_NAME[ubidetach] = "${sbindir}/ubidetach"
48ALTERNATIVE_LINK_NAME[ubimkvol] = "${sbindir}/ubimkvol"
49ALTERNATIVE_LINK_NAME[ubirename] = "${sbindir}/ubirename"
50ALTERNATIVE_LINK_NAME[ubirmvol] = "${sbindir}/ubirmvol"
51ALTERNATIVE_LINK_NAME[ubirsvol] = "${sbindir}/ubirsvol"
52ALTERNATIVE_LINK_NAME[ubiupdatevol] = "${sbindir}/ubiupdatevol"
53ALTERNATIVE_LINK_NAME[flash_eraseall] = "${sbindir}/flash_eraseall"
54ALTERNATIVE_LINK_NAME[flash_lock] = "${sbindir}/flash_lock"
55ALTERNATIVE_LINK_NAME[flash_unlock] = "${sbindir}/flash_unlock"
56ALTERNATIVE_LINK_NAME[flashcp] = "${sbindir}/flashcp"
57
58do_install () {
59 oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
60}
61
62PACKAGES =+ "mtd-utils-misc mtd-utils-tests"
63PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "jffs", "mtd-utils-jffs2", "", d)}"
64PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "ubifs", "mtd-utils-ubifs", "", d)}"
65
66FILES:mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool"
67FILES:mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*"
68FILES:mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image"
69FILES:mtd-utils-tests = "${libexecdir}/mtd-utils/*"
70
71BBCLASSEXTEND = "native nativesdk"
72
73# git/.compr.c.dep:46: warning: NUL character seen; rest of line ignored
74# git/.compr.c.dep:47: *** missing separator. Stop.
75PARALLEL_MAKE = ""
76
77EXCLUDE_FROM_WORLD = "1"