Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/mtd: add ubitests installation
@ 2026-11-18 15:45 Bastien Curutchet via buildroot
  2026-11-18 20:22 ` Julien Olivain via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Bastien Curutchet via buildroot @ 2026-11-18 15:45 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni, Brandon Maier, Bastien Curutchet

mtd-utils provides a runubitests.sh that allows running an extensive
set of tests on UBI devices. This script isn't installed.

Add a new menuconfig entry to enable the script installation, along
with the test applications the script uses. Install them in the same
location as they would be when running a full 'make install'.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
---
 package/mtd/Config.in |  2 ++
 package/mtd/mtd.mk    | 12 ++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/package/mtd/Config.in b/package/mtd/Config.in
index 1054106f81..3de34ed8e3 100644
--- a/package/mtd/Config.in
+++ b/package/mtd/Config.in
@@ -220,6 +220,8 @@ config BR2_PACKAGE_MTD_NANDPAGETEST
 config BR2_PACKAGE_MTD_NANDSUBPAGETEST
 	bool "nandsubpagetest"
 
+config BR2_PACKAGE_MTD_UBITESTS
+	bool "ubitests"
 endif
 
 comment "MTD test tools need a toolchain w/ threads"
diff --git a/package/mtd/mtd.mk b/package/mtd/mtd.mk
index 2a625fccce..f26b20f146 100644
--- a/package/mtd/mtd.mk
+++ b/package/mtd/mtd.mk
@@ -159,6 +159,18 @@ define MTD_INSTALL_TARGET_CMDS
 	$(foreach f,$(MTD_TARGETS_y), \
 		$(INSTALL) -D -m 0755 $(@D)/$(f) $(TARGET_DIR)/usr/sbin/$(notdir $(f))
 	)
+	$(if $(BR2_PACKAGE_MTD_UBITESTS), \
+		$(INSTALL) -D -m 0755 $(@D)/tests/ubi-tests/runubitests.sh $(TARGET_DIR)/usr/libexec/mtd-utils/runubitests.sh
+		$(INSTALL) -D -m 0755 $(@D)/mkvol_basic $(TARGET_DIR)/usr/libexec/mtd-utils/mkvol_basic
+		$(INSTALL) -D -m 0755 $(@D)/mkvol_bad $(TARGET_DIR)/usr/libexec/mtd-utils/mkvol_bad
+		$(INSTALL) -D -m 0755 $(@D)/mkvol_paral $(TARGET_DIR)/usr/libexec/mtd-utils/mkvol_paral
+		$(INSTALL) -D -m 0755 $(@D)/rsvol $(TARGET_DIR)/usr/libexec/mtd-utils/rsvol
+		$(INSTALL) -D -m 0755 $(@D)/io_basic $(TARGET_DIR)/usr/libexec/mtd-utils/io_basic
+		$(INSTALL) -D -m 0755 $(@D)/io_read $(TARGET_DIR)/usr/libexec/mtd-utils/io_read
+		$(INSTALL) -D -m 0755 $(@D)/io_update $(TARGET_DIR)/usr/libexec/mtd-utils/io_update
+		$(INSTALL) -D -m 0755 $(@D)/io_paral $(TARGET_DIR)/usr/libexec/mtd-utils/io_paral
+		$(INSTALL) -D -m 0755 $(@D)/volrefcnt $(TARGET_DIR)/usr/libexec/mtd-utils/volrefcnt
+	)
 endef
 
 # Those libraries are not installed by "make install", but are needed

---
base-commit: 1ae4f84ae1803a6b5043833f0137f961b2db516f
change-id: 20261118-ubitests-d5d7ce13c850

Best regards,
-- 
Bastien Curutchet <bastien.curutchet@bootlin.com>

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2026-11-18 20:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18 15:45 [Buildroot] [PATCH] package/mtd: add ubitests installation Bastien Curutchet via buildroot
2026-11-18 20:22 ` Julien Olivain via buildroot

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