mtd: Add option to install mtd integrity test
PATCH 1/1 mtd: Add option to install mtd integrity test
From: ynadupur <[email protected]>
Description:
The mtd tests have proven very useful in testing both flash stability and JFFS2 changes. Adding an option to install the integrity test.
--- package/mtd/Config.in | 3 +++ package/mtd/mtd.mk | 12 ++++++++++++ 2 files changed, 15 insertions(+)
package/mtd/Config.in +3 -0
@@ -159,4 +159,7 @@ config BR2_PACKAGE_MTD_UBIBLOCK bool "ubiblock" default y +config BR2_PACKAGE_MTD_TESTS + bool "mtd tests" + endif
package/mtd/mtd.mk +12 -0
@@ -97,6 +97,18 @@ MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIBLOCK) += ubiblock MTD_TARGETS_y += $(addprefix ubi-utils/,$(MTD_TARGETS_UBI_y)) MTD_TARGETS_$(BR2_PACKAGE_MTD_MKFSUBIFS) += mkfs.ubifs/mkfs.ubifs +ifeq ($(BR2_PACKAGE_MTD_TESTS),y) +define MTD_TESTS_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE1) CROSS=$(TARGET_CROSS) \ + BUILDDIR=$(@D) $(MTD_MAKE_OPTS) -C $(@D)/tests/fs-tests all +endef +MTD_POST_BUILD_HOOKS += MTD_TESTS_BUILD_CMDS +define MTD_TESTS_TARGET_INSTALL_CMDS + $(INSTALL) -D -m 755 $(@D)/tests/fs-tests/integrity/integck $(TARGET_DIR)/usr/sbin/integck +endef +MTD_POST_INSTALL_TARGET_HOOKS += MTD_TESTS_TARGET_INSTALL_CMDS +endif + define MTD_BUILD_CMDS $(TARGET_CONFIGURE_OPTS) $(MAKE1) CROSS=$(TARGET_CROSS) \ BUILDDIR=$(@D) $(MTD_MAKE_OPTS) -C $(@D) \
Signature · 1 line
1.9.1
PATCH 1/1 mtd: Add option to install mtd integrity test
Hello,
Quoted 1 line · Matt Weber
From: ynadupur <[email protected]>
This From...
Quoted 6 lines
Description:
The mtd tests have proven very useful in testing both flash stability and JFFS2 changes. Adding an option to install the integrity test.Signed-off-by [YUGENDRA SAI BABU NADUPURU]<[email protected]>
... didn't match this SoB line.
Quoted 11 lines
Signed-off-by Matt Weber <[email protected]>--- package/mtd/Config.in | 3 +++ package/mtd/mtd.mk | 12 ++++++++++++ 2 files changed, 15 insertions(+)package/mtd/Config.in +0
-0
package/mtd/Config.in config BR2_PACKAGE_MTD_UBIBLOCK · line 162
Quoted 4 lines
package/mtd/Config.in +1
-0@@ -159,4 +159,7 @@ config BR2_PACKAGE_MTD_UBIBLOCK bool "ubiblock" default y +config BR2_PACKAGE_MTD_TESTS
Renamed to BR2_PACKAGE_MTD_INTEGCK, since it installs only this tool.
package/mtd/Config.in config BR2_PACKAGE_MTD_UBIBLOCK
Quoted 11 lines
package/mtd/Config.in +11
-0+ifeq ($(BR2_PACKAGE_MTD_TESTS),y) +define MTD_TESTS_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE1) CROSS=$(TARGET_CROSS) \ + BUILDDIR=$(@D) $(MTD_MAKE_OPTS) -C $(@D)/tests/fs-tests all +endef +MTD_POST_BUILD_HOOKS += MTD_TESTS_BUILD_CMDS +define MTD_TESTS_TARGET_INSTALL_CMDS + $(INSTALL) -D -m 755 $(@D)/tests/fs-tests/integrity/integck $(TARGET_DIR)/usr/sbin/integck +endef +MTD_POST_INSTALL_TARGET_HOOKS += MTD_TESTS_TARGET_INSTALL_CMDS +endif
Instead of hooks, I've used intermediate variables.
Also, integck was not building properly with uClibc or musl due to its use of <execinfo.h>. I've added a patch to fix that, which I've submitted upstream.
Applied with those changes, thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 mtd: Add option to install mtd integrity test
In reply to Matt WeberMatt, All,
On 2016-07-14 16:03 -0500, Matt Weber spake thusly:
Quoted 5 lines
From: ynadupur <[email protected]>
Description:
The mtd tests have proven very useful in testing both flash stability and JFFS2 changes. Adding an option to install the integrity test.
This is causing build failures with the musl C library, because it does not provide stdio_lim.h:
http://autobuild.buildroot.org/results/252/2526598f561dc66ae02c53ec82f6a2a1395cdaf6/build-end.log
Instead, those defines are directly available in stdio.h for musl.
Care to have a look, please?
Regards,
Yann E. MORIN.
Quoted 49 lines
Signed-off-by [YUGENDRA SAI BABU NADUPURU]<[email protected]>Signed-off-by Matt Weber <[email protected]>--- package/mtd/Config.in | 3 +++ package/mtd/mtd.mk | 12 ++++++++++++ 2 files changed, 15 insertions(+)package/mtd/Config.in +3
-0@@ -159,4 +159,7 @@ config BR2_PACKAGE_MTD_UBIBLOCK bool "ubiblock" default y +config BR2_PACKAGE_MTD_TESTS + bool "mtd tests" + endifpackage/mtd/mtd.mk +12
-0@@ -97,6 +97,18 @@ MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIBLOCK) += ubiblock MTD_TARGETS_y += $(addprefix ubi-utils/,$(MTD_TARGETS_UBI_y)) MTD_TARGETS_$(BR2_PACKAGE_MTD_MKFSUBIFS) += mkfs.ubifs/mkfs.ubifs +ifeq ($(BR2_PACKAGE_MTD_TESTS),y) +define MTD_TESTS_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE1) CROSS=$(TARGET_CROSS) \ + BUILDDIR=$(@D) $(MTD_MAKE_OPTS) -C $(@D)/tests/fs-tests all +endef +MTD_POST_BUILD_HOOKS += MTD_TESTS_BUILD_CMDS +define MTD_TESTS_TARGET_INSTALL_CMDS + $(INSTALL) -D -m 755 $(@D)/tests/fs-tests/integrity/integck $(TARGET_DIR)/usr/sbin/integck +endef +MTD_POST_INSTALL_TARGET_HOOKS += MTD_TESTS_TARGET_INSTALL_CMDS +endif + define MTD_BUILD_CMDS $(TARGET_CONFIGURE_OPTS) $(MAKE1) CROSS=$(TARGET_CROSS) \ BUILDDIR=$(@D) $(MTD_MAKE_OPTS) -C $(@D) \Signature · 6 lines
1.9.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 mtd: Add option to install mtd integrity test
All,
Quoted 9 lines · Yann E. MORIN
Matt, All,
On 2016-07-14 16:03 -0500, Matt Weber spake thusly:
Quoted 5 lines
From: ynadupur <[email protected]>
Description:
The mtd tests have proven very useful in testing both flash stability and JFFS2 changes. Adding an option to install the integrity test.
Quoted 8 lines
This is causing build failures with the musl C library, because it does not provide
stdio_lim.h:http://autobuild.buildroot.org/results/252/2526598f561dc66ae02c53ec82f6a2a1395cdaf6/build-end.logInstead, those defines are directly available in
stdio.hfor musl.Care to have a look, please?
Sure, Sai is taking a look and he might jump on IRC to get some guidance for how to make it compatible across libs.
Quoted 61 lines
Regards,
Yann E. MORIN.Quoted 45 lines
Signed-off-by [YUGENDRA SAI BABU NADUPURU]<[email protected]>Signed-off-by Matt Weber <[email protected]>--- package/mtd/Config.in | 3 +++ package/mtd/mtd.mk | 12 ++++++++++++ 2 files changed, 15 insertions(+)package/mtd/Config.in +3
-0@@ -159,4 +159,7 @@ config BR2_PACKAGE_MTD_UBIBLOCK bool "ubiblock" default y +config BR2_PACKAGE_MTD_TESTS + bool "mtd tests" + endifpackage/mtd/mtd.mk +12
-1@@ -97,6 +97,18 @@ MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIBLOCK) += ubiblock MTD_TARGETS_y += $(addprefix ubi-utils/,$(MTD_TARGETS_UBI_y)) MTD_TARGETS_$(BR2_PACKAGE_MTD_MKFSUBIFS) += mkfs.ubifs/mkfs.ubifs +ifeq ($(BR2_PACKAGE_MTD_TESTS),y) +define MTD_TESTS_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE1) CROSS=$(TARGET_CROSS) \ + BUILDDIR=$(@D) $(MTD_MAKE_OPTS) -C $(@D)/tests/fs-tests all +endef +MTD_POST_BUILD_HOOKS += MTD_TESTS_BUILD_CMDS +define MTD_TESTS_TARGET_INSTALL_CMDS + $(INSTALL) -D -m 755 $(@D)/tests/fs-tests/integrity/integck $(TARGET_DIR)/usr/sbin/integck +endef +MTD_POST_INSTALL_TARGET_HOOKS += MTD_TESTS_TARGET_INSTALL_CMDS +endif + define MTD_BUILD_CMDS $(TARGET_CONFIGURE_OPTS) $(MAKE1) CROSS=$(TARGET_CROSS) \ BUILDDIR=$(@D) $(MTD_MAKE_OPTS) -C $(@D) \ --1.9.1
Quoted 4 lines
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot--
.-----------------.--------------------.------------------.--------------------.| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |'------------------------------^-------^------------------^--------------------'
Signature · 8 lines
Matthew L Weber / Pr Software Engineer Airborne Information Systems / Security Systems and Software / Secure Platforms MS 131-100, C Ave NE, Cedar Rapids, IA, 52498, USA www.rockwellcollins.com Note: Any Export License Required Information and License Restricted Third Party Intellectual Property (TPIP) content must be encrypted and sent to matthew.weber at corp.rockwellcollins.com.