blob: 9ffac2ed3a8a0eced6bd93d814c017a8e0ccedbd [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Tools for managing memory technology devices"
2HOMEPAGE = "http://www.linux-mtd.infradead.org/"
3SECTION = "base"
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
6 file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
7
Brad Bishopd7bf8c12018-02-25 22:55:05 -05008inherit autotools pkgconfig update-alternatives
Brad Bishop6e60e8b2018-02-01 10:27:11 -05009
Brad Bishop19323692019-04-05 15:28:33 -040010DEPENDS = "zlib e2fsprogs util-linux"
Brad Bishop316dfdd2018-06-25 12:45:53 -040011RDEPENDS_mtd-utils-tests += "bash"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050012
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080013PV = "2.0.2+${SRCPV}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050014
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080015SRCREV = "bc63d36e39f389c8c17f6a8e9db47f2acc884659"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050016SRC_URI = "git://git.infradead.org/mtd-utils.git \
17 file://add-exclusion-to-mkfs-jffs2-git-2.patch \
Adriana Kobylakccb24382018-07-30 12:56:29 -050018 file://0001-Revert-Return-correct-error-number-in-ubi_get_vol_in.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050019"
20
Patrick Williamsc124f4f2015-09-15 14:41:29 -050021S = "${WORKDIR}/git/"
22
Brad Bishop316dfdd2018-06-25 12:45:53 -040023EXTRA_OECONF += "--enable-install-tests"
24
Patrick Williamsc124f4f2015-09-15 14:41:29 -050025# xattr support creates an additional compile-time dependency on acl because
26# the sys/acl.h header is needed. libacl is not needed and thus enabling xattr
27# regardless whether acl is enabled or disabled in the distro should be okay.
Brad Bishop19323692019-04-05 15:28:33 -040028PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)} lzo"
29PACKAGECONFIG[lzo] = "--with-lzo,--without-lzo,lzo"
30PACKAGECONFIG[xattr] = "--with-xattr,--without-xattr,acl"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050031
Brad Bishop316dfdd2018-06-25 12:45:53 -040032CPPFLAGS_append_riscv64 = " -pthread -D_REENTRANT"
33
Patrick Williamsc124f4f2015-09-15 14:41:29 -050034EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} ${@bb.utils.contains('PACKAGECONFIG', 'xattr', '', '-DWITHOUT_XATTR', d)} -I${S}/include' 'BUILDDIR=${S}'"
35
Brad Bishop316dfdd2018-06-25 12:45:53 -040036# Use higher priority than corresponding BusyBox-provided applets
37ALTERNATIVE_PRIORITY = "100"
38
39ALTERNATIVE_${PN} = "flashcp flash_eraseall flash_lock flash_unlock nanddump nandwrite"
40ALTERNATIVE_${PN}-ubifs = "ubiattach ubidetach ubimkvol ubirename ubirmvol ubirsvol ubiupdatevol"
41
Brad Bishopd7bf8c12018-02-25 22:55:05 -050042ALTERNATIVE_LINK_NAME[flash_eraseall] = "${sbindir}/flash_eraseall"
Brad Bishop316dfdd2018-06-25 12:45:53 -040043ALTERNATIVE_LINK_NAME[nandwrite] = "${sbindir}/nandwrite"
44ALTERNATIVE_LINK_NAME[nanddump] = "${sbindir}/nanddump"
45ALTERNATIVE_LINK_NAME[ubiattach] = "${sbindir}/ubiattach"
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"
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 Bishop316dfdd2018-06-25 12:45:53 -040062PACKAGES =+ "mtd-utils-jffs2 mtd-utils-ubifs mtd-utils-misc mtd-utils-tests"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050063
64FILES_mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool"
65FILES_mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*"
66FILES_mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image"
Brad Bishop316dfdd2018-06-25 12:45:53 -040067FILES_mtd-utils-tests = "${libexecdir}/mtd-utils/*"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050068
Patrick Williamsc0f7c042017-02-23 20:41:17 -060069BBCLASSEXTEND = "native nativesdk"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050070
71# git/.compr.c.dep:46: warning: NUL character seen; rest of line ignored
72# git/.compr.c.dep:47: *** missing separator. Stop.
73PARALLEL_MAKE = ""