]> www.infradead.org Git - mtd-utils.git/commitdiff
mtd-utils: ubihealthd: this tool does not depend on UBIFS
authorJuergen Borleis <jbe@pengutronix.de>
Wed, 25 Nov 2020 10:25:47 +0000 (11:25 +0100)
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>
Sun, 29 Nov 2020 22:28:43 +0000 (23:28 +0100)
The "need_getrandom" check and result is used only for the "ubihealthd".
This tool is very important to have it around at run-time, while the
corresponding "mkfs.ubifs" tool is still optional (think about offline
generated ubifs images).
Since compiling "mkfs.ubifs" adds more dependencies (various shared
libraries), buildsystems for embedded devices will add these shared
libraries to the root filesystem even if "mkfs.ubifs" isn't used or
installed.

Thus, handling both tools independently makes sense. The previous behavior
is kept, e.g. if UBIFS support is enabled, it enables "ubihealthd" as well.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
configure.ac

index bcea080b9de0f0839c6b234af521b781f05c4ffd..a5f6261cc8143f6502a5f8c85636d62395af4f32 100644 (file)
@@ -71,7 +71,6 @@ need_xattr="no"
 need_cmocka="no"
 need_selinux="no"
 need_openssl="no"
-need_getrandom="no"
 
 AM_COND_IF([UNIT_TESTS], [
        need_cmocka="yes"
@@ -107,6 +106,9 @@ AM_COND_IF([INSTALL_TESTS],
        [AC_SUBST(testbindir, ["\$libexecpath"])],
        [AC_SUBST(testbindir, ["\".\""])])
 
+AC_ARG_ENABLE([ubihealthd],
+       [AS_HELP_STRING([--enable-ubihealthd], [Build the ubihealthd program])],
+       [need_getrandom="${enableval}"],[need_getrandom="auto"])
 
 AC_ARG_ENABLE([lsmtd],
        [AS_HELP_STRING([--disable-lsmtd], [Do not build the lsmtd program])],
@@ -142,7 +144,7 @@ AM_COND_IF([BUILD_UBIFS], [
        need_lzo="yes"
        need_zstd="yes"
        need_openssl="yes"
-       need_getrandom="yes"
+       AS_VAR_IF([need_getrandom], [auto], [need_getrandom="yes"])
 ])
 
 AM_COND_IF([BUILD_JFFSX], [