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/" |
| 3 | SECTION = "base" |
| 4 | LICENSE = "GPLv2+" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ |
| 6 | file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c" |
| 7 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 8 | inherit autotools pkgconfig update-alternatives |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 9 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 10 | DEPENDS = "zlib lzo e2fsprogs util-linux" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 11 | RDEPENDS_mtd-utils-tests += "bash" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 12 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 13 | PV = "2.0.2+${SRCPV}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 14 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 15 | SRCREV = "bc63d36e39f389c8c17f6a8e9db47f2acc884659" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 16 | SRC_URI = "git://git.infradead.org/mtd-utils.git \ |
| 17 | file://add-exclusion-to-mkfs-jffs2-git-2.patch \ |
Adriana Kobylak | ccb2438 | 2018-07-30 12:56:29 -0500 | [diff] [blame] | 18 | file://0001-Revert-Return-correct-error-number-in-ubi_get_vol_in.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 19 | " |
| 20 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 21 | S = "${WORKDIR}/git/" |
| 22 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 23 | EXTRA_OECONF += "--enable-install-tests" |
| 24 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 25 | # 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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 28 | PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 29 | PACKAGECONFIG[xattr] = ",,acl," |
| 30 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 31 | CPPFLAGS_append_riscv64 = " -pthread -D_REENTRANT" |
| 32 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 33 | EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} ${@bb.utils.contains('PACKAGECONFIG', 'xattr', '', '-DWITHOUT_XATTR', d)} -I${S}/include' 'BUILDDIR=${S}'" |
| 34 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 35 | # Use higher priority than corresponding BusyBox-provided applets |
| 36 | ALTERNATIVE_PRIORITY = "100" |
| 37 | |
| 38 | ALTERNATIVE_${PN} = "flashcp flash_eraseall flash_lock flash_unlock nanddump nandwrite" |
| 39 | ALTERNATIVE_${PN}-ubifs = "ubiattach ubidetach ubimkvol ubirename ubirmvol ubirsvol ubiupdatevol" |
| 40 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 41 | ALTERNATIVE_LINK_NAME[flash_eraseall] = "${sbindir}/flash_eraseall" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 42 | ALTERNATIVE_LINK_NAME[nandwrite] = "${sbindir}/nandwrite" |
| 43 | ALTERNATIVE_LINK_NAME[nanddump] = "${sbindir}/nanddump" |
| 44 | ALTERNATIVE_LINK_NAME[ubiattach] = "${sbindir}/ubiattach" |
| 45 | ALTERNATIVE_LINK_NAME[ubiattach] = "${sbindir}/ubiattach" |
| 46 | ALTERNATIVE_LINK_NAME[ubidetach] = "${sbindir}/ubidetach" |
| 47 | ALTERNATIVE_LINK_NAME[ubimkvol] = "${sbindir}/ubimkvol" |
| 48 | ALTERNATIVE_LINK_NAME[ubirename] = "${sbindir}/ubirename" |
| 49 | ALTERNATIVE_LINK_NAME[ubirmvol] = "${sbindir}/ubirmvol" |
| 50 | ALTERNATIVE_LINK_NAME[ubirsvol] = "${sbindir}/ubirsvol" |
| 51 | ALTERNATIVE_LINK_NAME[ubiupdatevol] = "${sbindir}/ubiupdatevol" |
| 52 | ALTERNATIVE_LINK_NAME[flash_eraseall] = "${sbindir}/flash_eraseall" |
| 53 | ALTERNATIVE_LINK_NAME[flash_lock] = "${sbindir}/flash_lock" |
| 54 | ALTERNATIVE_LINK_NAME[flash_unlock] = "${sbindir}/flash_unlock" |
| 55 | ALTERNATIVE_LINK_NAME[flashcp] = "${sbindir}/flashcp" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 56 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 57 | do_install () { |
| 58 | oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir} |
| 59 | } |
| 60 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 61 | PACKAGES =+ "mtd-utils-jffs2 mtd-utils-ubifs mtd-utils-misc mtd-utils-tests" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 62 | |
| 63 | FILES_mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool" |
| 64 | FILES_mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*" |
| 65 | FILES_mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 66 | FILES_mtd-utils-tests = "${libexecdir}/mtd-utils/*" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 67 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 68 | BBCLASSEXTEND = "native nativesdk" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 69 | |
| 70 | # git/.compr.c.dep:46: warning: NUL character seen; rest of line ignored |
| 71 | # git/.compr.c.dep:47: *** missing separator. Stop. |
| 72 | PARALLEL_MAKE = "" |