mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] mtd-utils: allow building and installing of flash_otp_{lock,write}
@ 2013-02-20 20:14 Uwe Kleine-König
  2013-02-28 13:39 ` [ptxdist] [PATCH v2] mtd-utils: allow building and installing of flash_otp_{lock, write} Uwe Kleine-König
  0 siblings, 1 reply; 3+ messages in thread
From: Uwe Kleine-König @ 2013-02-20 20:14 UTC (permalink / raw)
  To: ptxdist

---
 ...flash_otp_write-fix-format-string-warning.patch |   30 ++++++++++++++
 ...so-build-and-install-flash_otp_lock-and-f.patch |   42 ++++++++++++++++++++
 patches/mtd-utils-1.5.0/series                     |    4 +-
 rules/mtd-utils.in                                 |   12 ++++++
 rules/mtd-utils.make                               |    8 ++++
 5 files changed, 95 insertions(+), 1 deletion(-)
 create mode 100644 patches/mtd-utils-1.5.0/0003-flash_otp_write-fix-format-string-warning.patch
 create mode 100644 patches/mtd-utils-1.5.0/0004-Makefile-also-build-and-install-flash_otp_lock-and-f.patch

diff --git a/patches/mtd-utils-1.5.0/0003-flash_otp_write-fix-format-string-warning.patch b/patches/mtd-utils-1.5.0/0003-flash_otp_write-fix-format-string-warning.patch
new file mode 100644
index 0000000..ae49c4e
--- /dev/null
+++ b/patches/mtd-utils-1.5.0/0003-flash_otp_write-fix-format-string-warning.patch
@@ -0,0 +1,30 @@
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
+Date: Wed, 20 Feb 2013 17:25:30 +0100
+Subject: [PATCH] flash_otp_write: fix format string warning
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This fixes
+	flash_otp_write.c: In function 'main':
+	flash_otp_write.c:61:2: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'off_t' [-Wformat]
+
+Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
+Forwarded: id:1361378469-18631-1-git-send-email-u.kleine-koenig@pengutronix.de
+---
+ flash_otp_write.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/flash_otp_write.c b/flash_otp_write.c
+index d407ebb..41cf1c5 100644
+--- a/flash_otp_write.c
++++ b/flash_otp_write.c
+@@ -58,7 +58,7 @@ int main(int argc,char *argv[])
+ 		return errno;
+ 	}
+ 
+-	printf("Writing OTP user data on %s at offset 0x%lx\n", argv[2], offset);
++	printf("Writing OTP user data on %s at offset 0x%lx\n", argv[2], (unsigned long)offset);
+ 
+ 	if (mtdInfo.type == MTD_NANDFLASH)
+ 		len = mtdInfo.writesize;
diff --git a/patches/mtd-utils-1.5.0/0004-Makefile-also-build-and-install-flash_otp_lock-and-f.patch b/patches/mtd-utils-1.5.0/0004-Makefile-also-build-and-install-flash_otp_lock-and-f.patch
new file mode 100644
index 0000000..9727290
--- /dev/null
+++ b/patches/mtd-utils-1.5.0/0004-Makefile-also-build-and-install-flash_otp_lock-and-f.patch
@@ -0,0 +1,42 @@
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
+Date: Wed, 20 Feb 2013 17:29:12 +0100
+Subject: [PATCH] Makefile: also build and install flash_otp_lock and
+ flash_otp_write
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
+Forwarded: id:1361378491-18687-1-git-send-email-u.kleine-koenig@pengutronix.de
+---
+ .gitignore |    2 ++
+ Makefile   |    3 ++-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/.gitignore b/.gitignore
+index d4771fb..83ca938 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -25,6 +25,8 @@
+ /flash_lock
+ /flash_otp_dump
+ /flash_otp_info
++/flash_otp_lock
++/flash_otp_write
+ /flash_unlock
+ /flashcp
+ /ftl_check
+diff --git a/Makefile b/Makefile
+index 190db58..3f9c24f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -19,7 +19,8 @@ TESTS = tests
+ MTD_BINS = \
+ 	ftl_format flash_erase nanddump doc_loadbios \
+ 	ftl_check mkfs.jffs2 flash_lock flash_unlock \
+-	flash_otp_info flash_otp_dump mtd_debug flashcp nandwrite nandtest \
++	flash_otp_info flash_otp_dump flash_otp_lock flash_otp_write \
++	mtd_debug flashcp nandwrite nandtest \
+ 	jffs2dump \
+ 	nftldump nftl_format docfdisk \
+ 	rfddump rfdformat \
diff --git a/patches/mtd-utils-1.5.0/series b/patches/mtd-utils-1.5.0/series
index 38ac3d1..f79750b 100644
--- a/patches/mtd-utils-1.5.0/series
+++ b/patches/mtd-utils-1.5.0/series
@@ -2,4 +2,6 @@
 #tag:base --start-number 1
 0001-make-ubifs-optional.patch
 0002-Make-liblzo-optional-for-ubifs-tools.patch
-# c7b83aac3f84d721cecd9e53605999f9  - git-ptx-patches magic
+0003-flash_otp_write-fix-format-string-warning.patch
+0004-Makefile-also-build-and-install-flash_otp_lock-and-f.patch
+# 44cd4af830d1bc4fa41b6462c43f9cf6  - git-ptx-patches magic
diff --git a/rules/mtd-utils.in b/rules/mtd-utils.in
index 45ab8e7..d1c46bd 100644
--- a/rules/mtd-utils.in
+++ b/rules/mtd-utils.in
@@ -68,6 +68,18 @@ config MTD_UTILS_FLASH_OTP_INFO
 	help
 	  Print info about one-time programmable data.
 
+config MTD_UTILS_FLASH_OTP_LOCK
+	bool
+	prompt "flash_otp_lock"
+	help
+	  Lock one-time programmable data.
+
+config MTD_UTILS_FLASH_OTP_WRITE
+	bool
+	prompt "flash_otp_write"
+	help
+	  Write one-time programmable data.
+
 config MTD_UTILS_FLASH_UNLOCK
 	bool
 	prompt "flash_unlock"
diff --git a/rules/mtd-utils.make b/rules/mtd-utils.make
index d20050e..75be7db 100644
--- a/rules/mtd-utils.make
+++ b/rules/mtd-utils.make
@@ -91,6 +91,14 @@ ifdef PTXCONF_MTD_UTILS_FLASH_OTP_INFO
 	@$(call install_copy, mtd-utils, 0, 0, 0755, -, \
 		/usr/sbin/flash_otp_info)
 endif
+ifdef PTXCONF_MTD_UTILS_FLASH_OTP_LOCK
+	@$(call install_copy, mtd-utils, 0, 0, 0755, -, \
+		/usr/sbin/flash_otp_lock)
+endif
+ifdef PTXCONF_MTD_UTILS_FLASH_OTP_WRITE
+	@$(call install_copy, mtd-utils, 0, 0, 0755, -, \
+		/usr/sbin/flash_otp_write)
+endif
 ifdef PTXCONF_MTD_UTILS_FLASH_UNLOCK
 	@$(call install_copy, mtd-utils, 0, 0, 0755, -, \
 		/usr/sbin/flash_unlock)
-- 
1.7.10.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2013-03-04 17:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-20 20:14 [ptxdist] [PATCH] mtd-utils: allow building and installing of flash_otp_{lock,write} Uwe Kleine-König
2013-02-28 13:39 ` [ptxdist] [PATCH v2] mtd-utils: allow building and installing of flash_otp_{lock, write} Uwe Kleine-König
2013-03-04 17:06   ` Michael Olbrich

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