blob: c05d3b7c35be579f716d64709aafd6c31d43d3ae [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Tools for managing memory technology devices"
2HOMEPAGE = "http://www.linux-mtd.infradead.org/"
Andrew Geissler90fd73c2021-03-05 15:25:55 -06003DESCRIPTION = "mtd-utils tool is a generic Linux subsystem for memory devices, especially Flash devices."
Patrick Williamsc124f4f2015-09-15 14:41:29 -05004SECTION = "base"
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
7 file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
8
Brad Bishopd7bf8c12018-02-25 22:55:05 -05009inherit autotools pkgconfig update-alternatives
Brad Bishop6e60e8b2018-02-01 10:27:11 -050010
Brad Bishop19323692019-04-05 15:28:33 -040011DEPENDS = "zlib e2fsprogs util-linux"
Patrick Williams213cb262021-08-07 19:21:33 -050012RDEPENDS:mtd-utils-tests += "bash"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013
Andrew Geissler595f6302022-01-24 19:11:47 +000014PV = "2.1.4"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015
Andrew Geissler595f6302022-01-24 19:11:47 +000016SRCREV = "c7f1bfa44a84d02061787e2f6093df5cc40b9f5c"
17SRC_URI = "git://git.infradead.org/mtd-utils.git;branch=master \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050018 file://add-exclusion-to-mkfs-jffs2-git-2.patch \
Andrew Geisslerb7d28612020-07-24 16:15:54 -050019 "
Patrick Williamsc124f4f2015-09-15 14:41:29 -050020
Andrew Geisslerf0343792020-11-18 10:42:21 -060021S = "${WORKDIR}/git"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050022
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 Bishopf3fd2882019-06-21 08:06:37 -040026PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)} lzo jffs ubifs"
Brad Bishop19323692019-04-05 15:28:33 -040027PACKAGECONFIG[lzo] = "--with-lzo,--without-lzo,lzo"
28PACKAGECONFIG[xattr] = "--with-xattr,--without-xattr,acl"
Brad Bishopf3fd2882019-06-21 08:06:37 -040029PACKAGECONFIG[crypto] = "--with-crypto,--without-crypto,openssl"
30PACKAGECONFIG[jffs] = "--with-jffs,--without-jffs"
31PACKAGECONFIG[ubifs] = "--with-ubifs,--without-ubifs"
Brad Bishop08902b02019-08-20 09:16:51 -040032PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050033
Patrick Williams213cb262021-08-07 19:21:33 -050034CPPFLAGS:append:riscv64 = " -pthread -D_REENTRANT"
Brad Bishop316dfdd2018-06-25 12:45:53 -040035
Patrick Williamsc124f4f2015-09-15 14:41:29 -050036EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} ${@bb.utils.contains('PACKAGECONFIG', 'xattr', '', '-DWITHOUT_XATTR', d)} -I${S}/include' 'BUILDDIR=${S}'"
37
Brad Bishop316dfdd2018-06-25 12:45:53 -040038# Use higher priority than corresponding BusyBox-provided applets
39ALTERNATIVE_PRIORITY = "100"
40
Patrick Williams213cb262021-08-07 19:21:33 -050041ALTERNATIVE:${PN} = "flashcp flash_eraseall flash_lock flash_unlock nanddump nandwrite"
42ALTERNATIVE:${PN}-ubifs = "ubiattach ubidetach ubimkvol ubirename ubirmvol ubirsvol ubiupdatevol"
Brad Bishop316dfdd2018-06-25 12:45:53 -040043
Brad Bishop316dfdd2018-06-25 12:45:53 -040044ALTERNATIVE_LINK_NAME[nandwrite] = "${sbindir}/nandwrite"
45ALTERNATIVE_LINK_NAME[nanddump] = "${sbindir}/nanddump"
46ALTERNATIVE_LINK_NAME[ubiattach] = "${sbindir}/ubiattach"
Brad Bishop316dfdd2018-06-25 12:45:53 -040047ALTERNATIVE_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"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050057
Patrick Williamsc124f4f2015-09-15 14:41:29 -050058do_install () {
59 oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
60}
61
Brad Bishopf3fd2882019-06-21 08:06:37 -040062PACKAGES =+ "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)}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050065
Patrick Williams213cb262021-08-07 19:21:33 -050066FILES: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/*"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050070
Patrick Williamsc0f7c042017-02-23 20:41:17 -060071BBCLASSEXTEND = "native nativesdk"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050072
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 = ""