mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] mtd-utils: Add option to build and install test tools
@ 2022-06-01 10:48 Alexander Dahl
  2022-06-10  6:49 ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Dahl @ 2022-06-01 10:48 UTC (permalink / raw)
  To: ptxdist

Those tools are only needed in development for testing and debugging.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
---

Notes:
    I had this lying around since 2018, and now needed it again to
    investigate a UBIFS issue on raw NAND flash.
    Maybe it's helpful to someone else, too?!

 rules/mtd-utils.in   |  8 ++++++++
 rules/mtd-utils.make | 18 +++++++++++++++++-
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/rules/mtd-utils.in b/rules/mtd-utils.in
index bd7ce9449..c3b8bb29b 100644
--- a/rules/mtd-utils.in
+++ b/rules/mtd-utils.in
@@ -396,4 +396,12 @@ config MTD_UTILS_MTDINFO
 
 endif
 
+config MTD_UTILS_TESTS
+    bool
+    prompt "MTD test programs"
+    help
+      MTD test-suite with the following, potentially dangerous, test
+      programs: nandbiterrs, flash_speed, flash_stress, flash_readtest,
+      nandpagetest, nandsubpagetest, and flash_torture.
+
 endif
diff --git a/rules/mtd-utils.make b/rules/mtd-utils.make
index a049e9896..d14f4356e 100644
--- a/rules/mtd-utils.make
+++ b/rules/mtd-utils.make
@@ -35,7 +35,7 @@ MTD_UTILS_CONF_OPT	:= \
 	$(CROSS_AUTOCONF_USR) \
 	--disable-unit-tests \
 	$(GLOBAL_LARGE_FILE_OPTION) \
-	--disable-tests \
+	--$(call ptx/endis,PTXCONF_MTD_UTILS_TESTS)-tests \
 	--$(call ptx/endis,PTXCONF_MTD_UTILS_UBIHEALTHD)-ubihealthd \
 	--$(call ptx/endis, PTXCONF_MTD_UTILS_LSMTD)-lsmtd \
 	--$(call ptx/wwo, PTXCONF_MTD_UTILS_JFFS)-jffs \
@@ -256,6 +256,22 @@ ifdef PTXCONF_MTD_UTILS_MTDINFO
 	@$(call install_copy, mtd-utils, 0, 0, 0755, -, \
 		/usr/sbin/mtdinfo)
 endif
+ifdef PTXCONF_MTD_UTILS_TESTS
+	@$(call install_copy, mtd-utils, 0, 0, 0755, -, \
+		/usr/libexec/mtd-utils/nandbiterrs)
+	@$(call install_copy, mtd-utils, 0, 0, 0755, -, \
+		/usr/libexec/mtd-utils/flash_speed)
+	@$(call install_copy, mtd-utils, 0, 0, 0755, -, \
+		/usr/libexec/mtd-utils/flash_stress)
+	@$(call install_copy, mtd-utils, 0, 0, 0755, -, \
+		/usr/libexec/mtd-utils/flash_readtest)
+	@$(call install_copy, mtd-utils, 0, 0, 0755, -, \
+		/usr/libexec/mtd-utils/nandpagetest)
+	@$(call install_copy, mtd-utils, 0, 0, 0755, -, \
+		/usr/libexec/mtd-utils/nandsubpagetest)
+	@$(call install_copy, mtd-utils, 0, 0, 0755, -, \
+		/usr/libexec/mtd-utils/flash_torture)
+endif
 
 	@$(call install_finish, mtd-utils)
 

base-commit: 114887419025a5b377c94f0443b8320989f3c736
-- 
2.30.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-10  6:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-01 10:48 [ptxdist] [PATCH] mtd-utils: Add option to build and install test tools Alexander Dahl
2022-06-10  6:49 ` [ptxdist] [APPLIED] " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox