xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-devtools/mtd/mtd-utils_git.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "Tools for managing memory technology devices"
2*4882a593SmuzhiyunHOMEPAGE = "http://www.linux-mtd.infradead.org/"
3*4882a593SmuzhiyunDESCRIPTION = "mtd-utils tool is a generic Linux subsystem for memory devices, especially Flash devices."
4*4882a593SmuzhiyunSECTION = "base"
5*4882a593SmuzhiyunLICENSE = "GPL-2.0-or-later"
6*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
7*4882a593Smuzhiyun                    file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
8*4882a593Smuzhiyun
9*4882a593Smuzhiyuninherit autotools pkgconfig update-alternatives
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunDEPENDS = "zlib e2fsprogs util-linux"
12*4882a593SmuzhiyunRDEPENDS:mtd-utils-tests += "bash"
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunPV = "2.1.5"
15*4882a593Smuzhiyun
16*4882a593SmuzhiyunSRCREV = "3f3b4cc6c3120107e7aaa21c6415772a255ac49c"
17*4882a593SmuzhiyunSRC_URI = "git://git.infradead.org/mtd-utils.git;branch=master \
18*4882a593Smuzhiyun           file://add-exclusion-to-mkfs-jffs2-git-2.patch \
19*4882a593Smuzhiyun           "
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunS = "${WORKDIR}/git"
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun# xattr support creates an additional compile-time dependency on acl because
24*4882a593Smuzhiyun# the sys/acl.h header is needed. libacl is not needed and thus enabling xattr
25*4882a593Smuzhiyun# regardless whether acl is enabled or disabled in the distro should be okay.
26*4882a593SmuzhiyunPACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)} lzo jffs ubifs"
27*4882a593SmuzhiyunPACKAGECONFIG[lzo] = "--with-lzo,--without-lzo,lzo"
28*4882a593SmuzhiyunPACKAGECONFIG[xattr] = "--with-xattr,--without-xattr,acl"
29*4882a593SmuzhiyunPACKAGECONFIG[crypto] = "--with-crypto,--without-crypto,openssl"
30*4882a593SmuzhiyunPACKAGECONFIG[jffs] = "--with-jffs,--without-jffs"
31*4882a593SmuzhiyunPACKAGECONFIG[ubifs] = "--with-ubifs,--without-ubifs"
32*4882a593SmuzhiyunPACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
33*4882a593Smuzhiyun
34*4882a593SmuzhiyunCPPFLAGS:append:riscv64  = " -pthread -D_REENTRANT"
35*4882a593Smuzhiyun
36*4882a593SmuzhiyunEXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} ${@bb.utils.contains('PACKAGECONFIG', 'xattr', '', '-DWITHOUT_XATTR', d)} -I${S}/include' 'BUILDDIR=${S}'"
37*4882a593Smuzhiyun
38*4882a593Smuzhiyun# Use higher priority than corresponding BusyBox-provided applets
39*4882a593SmuzhiyunALTERNATIVE_PRIORITY = "100"
40*4882a593Smuzhiyun
41*4882a593SmuzhiyunALTERNATIVE:${PN} = "flashcp flash_eraseall flash_lock flash_unlock nanddump nandwrite"
42*4882a593SmuzhiyunALTERNATIVE:${PN}-ubifs = "ubiattach ubidetach ubimkvol ubirename ubirmvol ubirsvol ubiupdatevol"
43*4882a593Smuzhiyun
44*4882a593SmuzhiyunALTERNATIVE_LINK_NAME[nandwrite] = "${sbindir}/nandwrite"
45*4882a593SmuzhiyunALTERNATIVE_LINK_NAME[nanddump] = "${sbindir}/nanddump"
46*4882a593SmuzhiyunALTERNATIVE_LINK_NAME[ubiattach] = "${sbindir}/ubiattach"
47*4882a593SmuzhiyunALTERNATIVE_LINK_NAME[ubidetach] = "${sbindir}/ubidetach"
48*4882a593SmuzhiyunALTERNATIVE_LINK_NAME[ubimkvol] = "${sbindir}/ubimkvol"
49*4882a593SmuzhiyunALTERNATIVE_LINK_NAME[ubirename] = "${sbindir}/ubirename"
50*4882a593SmuzhiyunALTERNATIVE_LINK_NAME[ubirmvol] = "${sbindir}/ubirmvol"
51*4882a593SmuzhiyunALTERNATIVE_LINK_NAME[ubirsvol] = "${sbindir}/ubirsvol"
52*4882a593SmuzhiyunALTERNATIVE_LINK_NAME[ubiupdatevol] = "${sbindir}/ubiupdatevol"
53*4882a593SmuzhiyunALTERNATIVE_LINK_NAME[flash_eraseall] = "${sbindir}/flash_eraseall"
54*4882a593SmuzhiyunALTERNATIVE_LINK_NAME[flash_lock] = "${sbindir}/flash_lock"
55*4882a593SmuzhiyunALTERNATIVE_LINK_NAME[flash_unlock] = "${sbindir}/flash_unlock"
56*4882a593SmuzhiyunALTERNATIVE_LINK_NAME[flashcp] = "${sbindir}/flashcp"
57*4882a593Smuzhiyun
58*4882a593Smuzhiyundo_install () {
59*4882a593Smuzhiyun	oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
60*4882a593Smuzhiyun}
61*4882a593Smuzhiyun
62*4882a593SmuzhiyunPACKAGES =+ "mtd-utils-misc mtd-utils-tests"
63*4882a593SmuzhiyunPACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "jffs", "mtd-utils-jffs2", "", d)}"
64*4882a593SmuzhiyunPACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "ubifs", "mtd-utils-ubifs", "", d)}"
65*4882a593Smuzhiyun
66*4882a593SmuzhiyunFILES:mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool"
67*4882a593SmuzhiyunFILES:mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*"
68*4882a593SmuzhiyunFILES:mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image"
69*4882a593SmuzhiyunFILES:mtd-utils-tests = "${libexecdir}/mtd-utils/*"
70*4882a593Smuzhiyun
71*4882a593SmuzhiyunBBCLASSEXTEND = "native nativesdk"
72*4882a593Smuzhiyun
73*4882a593Smuzhiyun# git/.compr.c.dep:46: warning: NUL character seen; rest of line ignored
74*4882a593Smuzhiyun# git/.compr.c.dep:47: *** missing separator.  Stop.
75*4882a593SmuzhiyunPARALLEL_MAKE = ""
76