Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Tools for managing memory technology devices" |
| 2 | HOMEPAGE = "http://www.linux-mtd.infradead.org/" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 3 | DESCRIPTION = "mtd-utils tool is a generic Linux subsystem for memory devices, especially Flash devices." |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 4 | SECTION = "base" |
| 5 | LICENSE = "GPLv2+" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ |
| 7 | file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c" |
| 8 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 9 | inherit autotools pkgconfig update-alternatives |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 10 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 11 | DEPENDS = "zlib e2fsprogs util-linux" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 12 | RDEPENDS:mtd-utils-tests += "bash" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 13 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 14 | PV = "2.1.3" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 15 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 16 | SRCREV = "42ea7cd48d2b3c306d59bb6c530d79f8c25bf9f5" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 17 | SRC_URI = "git://git.infradead.org/mtd-utils.git \ |
| 18 | file://add-exclusion-to-mkfs-jffs2-git-2.patch \ |
Andrew Geissler | b7d2861 | 2020-07-24 16:15:54 -0500 | [diff] [blame] | 19 | " |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 20 | |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 21 | S = "${WORKDIR}/git" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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. |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 26 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)} lzo jffs ubifs" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 27 | PACKAGECONFIG[lzo] = "--with-lzo,--without-lzo,lzo" |
| 28 | PACKAGECONFIG[xattr] = "--with-xattr,--without-xattr,acl" |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 29 | PACKAGECONFIG[crypto] = "--with-crypto,--without-crypto,openssl" |
| 30 | PACKAGECONFIG[jffs] = "--with-jffs,--without-jffs" |
| 31 | PACKAGECONFIG[ubifs] = "--with-ubifs,--without-ubifs" |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 32 | PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 33 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 34 | CPPFLAGS:append:riscv64 = " -pthread -D_REENTRANT" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 35 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 38 | # Use higher priority than corresponding BusyBox-provided applets |
| 39 | ALTERNATIVE_PRIORITY = "100" |
| 40 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 41 | ALTERNATIVE:${PN} = "flashcp flash_eraseall flash_lock flash_unlock nanddump nandwrite" |
| 42 | ALTERNATIVE:${PN}-ubifs = "ubiattach ubidetach ubimkvol ubirename ubirmvol ubirsvol ubiupdatevol" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 43 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 44 | ALTERNATIVE_LINK_NAME[nandwrite] = "${sbindir}/nandwrite" |
| 45 | ALTERNATIVE_LINK_NAME[nanddump] = "${sbindir}/nanddump" |
| 46 | ALTERNATIVE_LINK_NAME[ubiattach] = "${sbindir}/ubiattach" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 57 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 58 | do_install () { |
| 59 | oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir} |
| 60 | } |
| 61 | |
Brad Bishop | f3fd288 | 2019-06-21 08:06:37 -0400 | [diff] [blame] | 62 | PACKAGES =+ "mtd-utils-misc mtd-utils-tests" |
| 63 | PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "jffs", "mtd-utils-jffs2", "", d)}" |
| 64 | PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "ubifs", "mtd-utils-ubifs", "", d)}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 65 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 66 | FILES:mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool" |
| 67 | FILES:mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*" |
| 68 | FILES:mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image" |
| 69 | FILES:mtd-utils-tests = "${libexecdir}/mtd-utils/*" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 70 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 71 | BBCLASSEXTEND = "native nativesdk" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 72 | |
| 73 | # git/.compr.c.dep:46: warning: NUL character seen; rest of line ignored |
| 74 | # git/.compr.c.dep:47: *** missing separator. Stop. |
| 75 | PARALLEL_MAKE = "" |