diff options
Diffstat (limited to 'meta/recipes-devtools/mtd/mtd-utils_2.3.0.bb')
-rw-r--r-- | meta/recipes-devtools/mtd/mtd-utils_2.3.0.bb | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/meta/recipes-devtools/mtd/mtd-utils_2.3.0.bb b/meta/recipes-devtools/mtd/mtd-utils_2.3.0.bb new file mode 100644 index 0000000000..aa593ac14f --- /dev/null +++ b/meta/recipes-devtools/mtd/mtd-utils_2.3.0.bb | |||
@@ -0,0 +1,83 @@ | |||
1 | SUMMARY = "Tools for managing memory technology devices" | ||
2 | HOMEPAGE = "http://www.linux-mtd.infradead.org/" | ||
3 | DESCRIPTION = "mtd-utils tool is a generic Linux subsystem for memory devices, especially Flash devices." | ||
4 | SECTION = "base" | ||
5 | LICENSE = "GPL-2.0-or-later" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ | ||
7 | file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c" | ||
8 | |||
9 | inherit autotools pkgconfig update-alternatives | ||
10 | |||
11 | DEPENDS = "zlib e2fsprogs util-linux" | ||
12 | RDEPENDS:mtd-utils-tests += "bash" | ||
13 | |||
14 | SRCREV = "4594fc1f4496a0ed55cabd31fbeba4e3fbf05602" | ||
15 | SRC_URI = "git://git.infradead.org/mtd-utils.git;branch=master \ | ||
16 | file://0001-ubifs-utils-ubifs.h-Include-fcntl.h.patch \ | ||
17 | file://0002-ubifs-utils-journal-Include-sys-stat.h.patch \ | ||
18 | file://0003-ubifs-utils-link-libmissing.a-in-case-execinfo.h-isn.patch \ | ||
19 | file://0004-ubifs-utils-extract_files-Include-linux-limits.h.patch" | ||
20 | |||
21 | S = "${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. | ||
26 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)} lzo jffs ubifs" | ||
27 | PACKAGECONFIG[lzo] = "--with-lzo,--without-lzo,lzo" | ||
28 | PACKAGECONFIG[xattr] = "--with-xattr,--without-xattr,acl" | ||
29 | PACKAGECONFIG[crypto] = "--with-crypto,--without-crypto,openssl" | ||
30 | PACKAGECONFIG[jffs] = "--with-jffs,--without-jffs" | ||
31 | PACKAGECONFIG[ubifs] = "--with-ubifs,--without-ubifs" | ||
32 | PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd" | ||
33 | |||
34 | CPPFLAGS:append:riscv64 = " -pthread -D_REENTRANT" | ||
35 | |||
36 | EXTRA_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 | ||
39 | ALTERNATIVE_PRIORITY = "100" | ||
40 | |||
41 | ALTERNATIVE:${PN} = "flashcp flash_eraseall flash_lock flash_unlock nanddump nandwrite" | ||
42 | ALTERNATIVE:${PN}-ubifs = "ubiattach ubidetach ubimkvol ubirename ubirmvol ubirsvol ubiupdatevol" | ||
43 | |||
44 | ALTERNATIVE_LINK_NAME[nandwrite] = "${sbindir}/nandwrite" | ||
45 | ALTERNATIVE_LINK_NAME[nanddump] = "${sbindir}/nanddump" | ||
46 | ALTERNATIVE_LINK_NAME[ubiattach] = "${sbindir}/ubiattach" | ||
47 | ALTERNATIVE_LINK_NAME[ubidetach] = "${sbindir}/ubidetach" | ||
48 | ALTERNATIVE_LINK_NAME[ubimkvol] = "${sbindir}/ubimkvol" | ||
49 | ALTERNATIVE_LINK_NAME[ubirename] = "${sbindir}/ubirename" | ||
50 | ALTERNATIVE_LINK_NAME[ubirmvol] = "${sbindir}/ubirmvol" | ||
51 | ALTERNATIVE_LINK_NAME[ubirsvol] = "${sbindir}/ubirsvol" | ||
52 | ALTERNATIVE_LINK_NAME[ubiupdatevol] = "${sbindir}/ubiupdatevol" | ||
53 | ALTERNATIVE_LINK_NAME[flash_eraseall] = "${sbindir}/flash_eraseall" | ||
54 | ALTERNATIVE_LINK_NAME[flash_lock] = "${sbindir}/flash_lock" | ||
55 | ALTERNATIVE_LINK_NAME[flash_unlock] = "${sbindir}/flash_unlock" | ||
56 | ALTERNATIVE_LINK_NAME[flashcp] = "${sbindir}/flashcp" | ||
57 | |||
58 | do_install () { | ||
59 | oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir} | ||
60 | install -d ${D}${includedir}/mtd | ||
61 | install -d ${D}${libdir} | ||
62 | install -m 0644 ${S}/include/libubi.h ${D}${includedir} | ||
63 | install -m 0644 ${S}/include/libmtd.h ${D}${includedir} | ||
64 | install -m 0644 ${S}/include/libscan.h ${D}${includedir} | ||
65 | install -m 0644 ${S}/include/libubigen.h ${D}${includedir} | ||
66 | oe_libinstall -a libubi ${D}${libdir}/ | ||
67 | oe_libinstall -a libmtd ${D}${libdir}/ | ||
68 | } | ||
69 | |||
70 | PACKAGES =+ "mtd-utils-misc mtd-utils-tests" | ||
71 | PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "jffs", "mtd-utils-jffs2", "", d)}" | ||
72 | PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "ubifs", "mtd-utils-ubifs", "", d)}" | ||
73 | |||
74 | FILES:mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool" | ||
75 | FILES:mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*" | ||
76 | FILES:mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image" | ||
77 | FILES:mtd-utils-tests = "${libexecdir}/mtd-utils/*" | ||
78 | |||
79 | BBCLASSEXTEND = "native nativesdk" | ||
80 | |||
81 | # git/.compr.c.dep:46: warning: NUL character seen; rest of line ignored | ||
82 | # git/.compr.c.dep:47: *** missing separator. Stop. | ||
83 | PARALLEL_MAKE = "" | ||