diff options
| -rw-r--r-- | meta/recipes-devtools/mtd/files/ubihealthd.service | 10 | ||||
| -rw-r--r-- | meta/recipes-devtools/mtd/mtd-utils_2.3.0.bb | 21 |
2 files changed, 28 insertions, 3 deletions
diff --git a/meta/recipes-devtools/mtd/files/ubihealthd.service b/meta/recipes-devtools/mtd/files/ubihealthd.service new file mode 100644 index 0000000000..74b8df655b --- /dev/null +++ b/meta/recipes-devtools/mtd/files/ubihealthd.service | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | [Unit] | ||
| 2 | Description=UBI health daemon | ||
| 3 | After=multi-user.target | ||
| 4 | |||
| 5 | [Service] | ||
| 6 | Type=forking | ||
| 7 | ExecStart=@SBINDIR@/ubihealthd | ||
| 8 | |||
| 9 | [Install] | ||
| 10 | WantedBy=multi-user.target | ||
diff --git a/meta/recipes-devtools/mtd/mtd-utils_2.3.0.bb b/meta/recipes-devtools/mtd/mtd-utils_2.3.0.bb index 47f0b01abe..08ab677676 100644 --- a/meta/recipes-devtools/mtd/mtd-utils_2.3.0.bb +++ b/meta/recipes-devtools/mtd/mtd-utils_2.3.0.bb | |||
| @@ -6,7 +6,7 @@ LICENSE = "GPL-2.0-or-later" | |||
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ |
| 7 | file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c" | 7 | file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c" |
| 8 | 8 | ||
| 9 | inherit autotools pkgconfig update-alternatives | 9 | inherit autotools pkgconfig systemd update-alternatives |
| 10 | 10 | ||
| 11 | DEPENDS = "zlib e2fsprogs util-linux" | 11 | DEPENDS = "zlib e2fsprogs util-linux" |
| 12 | RDEPENDS:mtd-utils-tests += "bash" | 12 | RDEPENDS:mtd-utils-tests += "bash" |
| @@ -17,7 +17,8 @@ SRC_URI = "git://git.infradead.org/mtd-utils.git;branch=master \ | |||
| 17 | file://0002-ubifs-utils-journal-Include-sys-stat.h.patch \ | 17 | file://0002-ubifs-utils-journal-Include-sys-stat.h.patch \ |
| 18 | file://0003-ubifs-utils-link-libmissing.a-in-case-execinfo.h-isn.patch \ | 18 | file://0003-ubifs-utils-link-libmissing.a-in-case-execinfo.h-isn.patch \ |
| 19 | file://0004-ubifs-utils-extract_files-Include-linux-limits.h.patch \ | 19 | file://0004-ubifs-utils-extract_files-Include-linux-limits.h.patch \ |
| 20 | file://0001-Improve-check-for-GCC-compiler-version.patch" | 20 | file://0001-Improve-check-for-GCC-compiler-version.patch \ |
| 21 | file://ubihealthd.service" | ||
| 21 | 22 | ||
| 22 | # xattr support creates an additional compile-time dependency on acl because | 23 | # xattr support creates an additional compile-time dependency on acl because |
| 23 | # the sys/acl.h header is needed. libacl is not needed and thus enabling xattr | 24 | # the sys/acl.h header is needed. libacl is not needed and thus enabling xattr |
| @@ -29,6 +30,7 @@ PACKAGECONFIG[crypto] = "--with-crypto,--without-crypto,openssl" | |||
| 29 | PACKAGECONFIG[jffs] = "--with-jffs,--without-jffs" | 30 | PACKAGECONFIG[jffs] = "--with-jffs,--without-jffs" |
| 30 | PACKAGECONFIG[ubifs] = "--with-ubifs,--without-ubifs" | 31 | PACKAGECONFIG[ubifs] = "--with-ubifs,--without-ubifs" |
| 31 | PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd" | 32 | PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd" |
| 33 | PACKAGECONFIG[ubihealthd-service] = ",," | ||
| 32 | 34 | ||
| 33 | CPPFLAGS:append:riscv64 = " -pthread -D_REENTRANT" | 35 | CPPFLAGS:append:riscv64 = " -pthread -D_REENTRANT" |
| 34 | 36 | ||
| @@ -54,6 +56,9 @@ ALTERNATIVE_LINK_NAME[flash_lock] = "${sbindir}/flash_lock" | |||
| 54 | ALTERNATIVE_LINK_NAME[flash_unlock] = "${sbindir}/flash_unlock" | 56 | ALTERNATIVE_LINK_NAME[flash_unlock] = "${sbindir}/flash_unlock" |
| 55 | ALTERNATIVE_LINK_NAME[flashcp] = "${sbindir}/flashcp" | 57 | ALTERNATIVE_LINK_NAME[flashcp] = "${sbindir}/flashcp" |
| 56 | 58 | ||
| 59 | SYSTEMD_SERVICE:${PN}-ubifs = "${@bb.utils.contains('PACKAGECONFIG', 'ubihealthd-service', 'ubihealthd.service', '', d)}" | ||
| 60 | SYSTEMD_AUTO_ENABLE = "disable" | ||
| 61 | |||
| 57 | do_install () { | 62 | do_install () { |
| 58 | oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir} | 63 | oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir} |
| 59 | install -d ${D}${includedir}/mtd | 64 | install -d ${D}${includedir}/mtd |
| @@ -64,6 +69,12 @@ do_install () { | |||
| 64 | install -m 0644 ${S}/include/libubigen.h ${D}${includedir} | 69 | install -m 0644 ${S}/include/libubigen.h ${D}${includedir} |
| 65 | oe_libinstall -a libubi ${D}${libdir}/ | 70 | oe_libinstall -a libubi ${D}${libdir}/ |
| 66 | oe_libinstall -a libmtd ${D}${libdir}/ | 71 | oe_libinstall -a libmtd ${D}${libdir}/ |
| 72 | |||
| 73 | if ${@bb.utils.contains('PACKAGECONFIG', 'ubihealthd-service', 'true', 'false', d)}; then | ||
| 74 | install -d ${D}${systemd_system_unitdir} | ||
| 75 | install -m 0644 ${UNPACKDIR}/ubihealthd.service ${D}${systemd_system_unitdir} | ||
| 76 | sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_system_unitdir}/ubihealthd.service | ||
| 77 | fi | ||
| 67 | } | 78 | } |
| 68 | 79 | ||
| 69 | PACKAGES =+ "mtd-utils-misc mtd-utils-tests" | 80 | PACKAGES =+ "mtd-utils-misc mtd-utils-tests" |
| @@ -71,7 +82,11 @@ PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "jffs", "mtd-utils-jffs2", "" | |||
| 71 | PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "ubifs", "mtd-utils-ubifs", "", d)}" | 82 | PACKAGES =+ "${@bb.utils.contains("PACKAGECONFIG", "ubifs", "mtd-utils-ubifs", "", d)}" |
| 72 | 83 | ||
| 73 | FILES:mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool" | 84 | FILES:mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool" |
| 74 | FILES:mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*" | 85 | FILES:mtd-utils-ubifs = "\ |
| 86 | ${sbindir}/mkfs.ubifs \ | ||
| 87 | ${sbindir}/ubi* \ | ||
| 88 | ${@bb.utils.contains('PACKAGECONFIG', 'ubihealthd-service', '${systemd_system_unitdir}/ubihealthd.service', '', d)} \ | ||
| 89 | " | ||
| 75 | FILES:mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image" | 90 | FILES:mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image" |
| 76 | FILES:mtd-utils-tests = "${libexecdir}/mtd-utils/*" | 91 | FILES:mtd-utils-tests = "${libexecdir}/mtd-utils/*" |
| 77 | 92 | ||
