Skip to contentSkip to conversation

ubi-utils-klibc_1.5.0: remove recipe and patches

PATCH New Andrea Adami 1 participant 2 messages Nov 13, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ubi-utils-klibc_1.5.0: remove recipe and patches

Next patch replaces with v. 1.5.1 and new/rebased patchset

---
 .../mtd/ubi-utils-klibc/Makefile.patch             | 53 ----------------------
 .../mtd/ubi-utils-klibc/common.mk.patch            |  8 ----
 .../mtd/ubi-utils-klibc/libiniparser.c.patch       | 19 --------
 .../mtd/ubi-utils-klibc/libubi.c.patch             | 28 ------------
 .../mtd/ubi-utils-klibc/ubiformat.c.patch          | 20 --------
 .../recipes-devtools/mtd/ubi-utils-klibc_1.5.0.bb  | 49 --------------------
 6 files changed, 177 deletions(-)
 delete mode 100644 meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/Makefile.patch
 delete mode 100644 meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/common.mk.patch
 delete mode 100644 meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/libiniparser.c.patch
 delete mode 100644 meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/libubi.c.patch
 delete mode 100644 meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/ubiformat.c.patch
 delete mode 100644 meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.0.bb
meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/Makefile.patch deleted +0 -53
deleted file mode 100644
index b7dad87..0000000
@@ -1,53 +0,0 @@
---- a/Makefile	2012-05-01 19:46:47.000000000 +0200
-+++ b/Makefile	2012-05-01 19:48:01.000000000 +0200
-@@ -16,27 +16,13 @@
- 
- 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 \
--	jffs2dump \
--	nftldump nftl_format docfdisk \
--	rfddump rfdformat \
--	serve_image recv_image \
--	sumtool jffs2reader
- UBI_BINS = \
- 	ubiupdatevol ubimkvol ubirmvol ubicrc32 ubinfo ubiattach \
- 	ubidetach ubinize ubiformat ubirename mtdinfo ubirsvol
- 
--BINS = $(MTD_BINS)
--BINS += mkfs.ubifs/mkfs.ubifs
--BINS += $(addprefix ubi-utils/,$(UBI_BINS))
--SCRIPTS = flash_eraseall
-+BINS = $(addprefix ubi-utils/,$(UBI_BINS))
- 
- TARGETS = $(BINS)
--TARGETS += lib/libmtd.a
--TARGETS += ubi-utils/libubi.a
- 
- OBJDEPS = $(BUILDDIR)/include/version.h
- 
-@@ -58,12 +44,9 @@
- 	rm -f $(BUILDDIR)/include/version.h
- 	$(MAKE) -C $(TESTS) clean
- 
--install:: $(addprefix $(BUILDDIR)/,${BINS}) ${SCRIPTS}
-+install:: $(addprefix $(BUILDDIR)/,${BINS})
- 	mkdir -p ${DESTDIR}/${SBINDIR}
- 	install -m 0755 $^ ${DESTDIR}/${SBINDIR}/
--	mkdir -p ${DESTDIR}/${MANDIR}/man1
--	install -m 0644 mkfs.jffs2.1 ${DESTDIR}/${MANDIR}/man1/
--	-gzip -9f ${DESTDIR}/${MANDIR}/man1/*.1
- 
- tests::
- 	$(MAKE) -C $(TESTS)
-@@ -88,7 +71,6 @@
- LDFLAGS_jffs2reader = $(ZLIBLDFLAGS) $(LZOLDFLAGS)
- LDLIBS_jffs2reader  = -lz $(LZOLDLIBS)
- 
--$(foreach v,$(MTD_BINS),$(eval $(call mkdep,,$(v))))
- 
- #
- # Common libmtd
meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/common.mk.patch deleted +0 -8
deleted file mode 100644
index 0a48416..0000000
@@ -1,8 +0,0 @@
---- a/common.mk	2012-04-29 18:15:30.000000000 +0200
-+++ b/common.mk	2012-04-29 00:51:53.000000000 +0200
-@@ -1,4 +1,4 @@
--CC := $(CROSS)gcc
-+CC := $(CROSS)klcc
- AR := $(CROSS)ar
- RANLIB := $(CROSS)ranlib
- 
meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/libiniparser.c.patch deleted +0 -19
deleted file mode 100644
index 45f2439..0000000
@@ -1,19 +0,0 @@
---- a/ubi-utils/libiniparser.c	2012-05-29 23:46:08.000000000 +0200
-+++ b/ubi-utils/libiniparser.c	2012-05-29 23:45:01.000000000 +0200
-@@ -327,6 +327,8 @@
-   the notfound value is returned.
-  */
- /*--------------------------------------------------------------------------*/
-+/* Floating-point is not supported in klibc */
-+/*
- double iniparser_getdouble(dictionary * d, char * key, double notfound)
- {
-     char    *   str ;
-@@ -335,6 +337,7 @@
-     if (str==INI_INVALID_KEY) return notfound ;
-     return atof(str);
- }
-+*/
- 
- /*-------------------------------------------------------------------------*/
- /**
meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/libubi.c.patch deleted +0 -28
deleted file mode 100644
index b52e207..0000000
@@ -1,28 +0,0 @@
---- a/ubi-utils/libubi.c	2012-05-01 01:57:51.000000000 +0200
-+++ b/ubi-utils/libubi.c	2012-05-01 01:55:14.000000000 +0200
-@@ -686,7 +706,7 @@
-  * success and %-1 in case of failure. @r->ubi_num contains newly created UBI
-  * device number.
-  */
--static int do_attach(const char *node, const struct ubi_attach_req *r)
-+static int do_attach(const char *node, struct ubi_attach_req *r)
- {
- 	int fd, ret;
- 
-@@ -1346,13 +1346,13 @@
- 
- int ubi_set_property(int fd, uint8_t property, uint64_t value)
- {
--	struct ubi_set_prop_req r;
-+	struct ubi_set_vol_prop_req r;
- 
--	memset(&r, 0, sizeof(struct ubi_set_prop_req));
-+	memset(&r, 0, sizeof(struct ubi_set_vol_prop_req));
- 	r.property = property;
- 	r.value = value;
- 
--	return ioctl(fd, UBI_IOCSETPROP, &r);
-+	return ioctl(fd, UBI_IOCSETVOLPROP, &r);
- }
- 
- int ubi_leb_unmap(int fd, int lnum)
meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/ubiformat.c.patch deleted +0 -20
deleted file mode 100644
index d21ed57..0000000
@@ -1,20 +0,0 @@
---- a/ubi-utils/ubiformat.c	2012-05-03 01:14:39.000000000 +0200
-+++ b/ubi-utils/ubiformat.c	2012-05-20 23:11:57.000000000 +0200
-@@ -246,7 +246,7 @@
- 
- 	while (1) {
- 		normsg_cont("continue? (yes/no)  ");
--		if (scanf("%3s", buf) == EOF) {
-+		if (fgets(buf,4,stdin) == NULL) {
- 			sys_errmsg("scanf returned unexpected EOF, assume \"yes\"");
- 			return 1;
- 		}
-@@ -262,7 +262,7 @@
- 	char buf[4];
- 
- 	while (1) {
--		if (scanf("%3s", buf) == EOF) {
-+		if (fgets(buf,4,stdin) == NULL) {
- 			sys_errmsg("scanf returned unexpected EOF, assume \"no\"");
- 			return 0;
- 		}
meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.0.bb deleted +0 -49

49 lines not on this page · raw message

Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/2 ubi-utils-klibc_1.5.1: initial commit of v. 1.5.1

NOTE: we track master upstream so we are some commits ahead v 1.5.1.

---
 .../0001-Makefile-only-build-ubi-utils.patch       | 87 ++++++++++++++++++++++
 .../0002-common.mk-for-klibc-CC-is-klcc.patch      | 27 +++++++
 .../0003-libubi.c-add-klibc-specific-fixes.patch   | 76 +++++++++++++++++++
 .../0004-common.h-klibc-fixes-1.patch              | 84 +++++++++++++++++++++
 .../0005-common.h-klibc-fixes-2.patch              | 61 +++++++++++++++
 ...rser-remove-unused-function-needing-float.patch | 85 +++++++++++++++++++++
 .../recipes-devtools/mtd/ubi-utils-klibc_1.5.1.bb  | 50 +++++++++++++
 7 files changed, 470 insertions(+)
 create mode 100644 meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch
 create mode 100644 meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0002-common.mk-for-klibc-CC-is-klcc.patch
 create mode 100644 meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0003-libubi.c-add-klibc-specific-fixes.patch
 create mode 100644 meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0004-common.h-klibc-fixes-1.patch
 create mode 100644 meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch
 create mode 100644 meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0006-libiniparser-remove-unused-function-needing-float.patch
 create mode 100644 meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.1.bb
meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch new file +87 -0
new file mode 100644
index 0000000..9d5e4eb
@@ -0,0 +1,87 @@
+From c4e6bd9378645d577e9d9f85da85f1438afe7c50 Mon Sep 17 00:00:00 2001
+From: Andrea Adami <[email protected]>
+Date: Sun, 29 Jun 2014 00:32:29 +0200
+Subject: [PATCH 1/6] Makefile: build ubi-utils only
+
+We build all the static ubi-utils but actually only ubiattach is needed in
+a minimalistic initramfs for the mount of ubi volumes.
+
+More fixes are needed in order to build the full mtd-utils.
+The first issue is:
+
+| mkfs.jffs2.c:64:20: fatal error: libgen.h: No such file or directory
+|  #include <libgen.h>
+
+Removing the include then the second error is:
+
+| mkfs.jffs2.c:1570:22: error: '_SC_PAGESIZE' undeclared
+| (first use in this function)
+|   page_size = sysconf(_SC_PAGESIZE);
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Andrea Adami <[email protected]>
+---
+ Makefile | 24 ++----------------------
+ 1 file changed, 2 insertions(+), 22 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index eade234..2275865 100644
+--- a/Makefile
++++ b/Makefile
+@@ -16,28 +16,13 @@ endif
+ 
+ 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 flash_otp_lock flash_otp_write \
+-	mtd_debug flashcp nandwrite nandtest \
+-	jffs2dump \
+-	nftldump nftl_format docfdisk \
+-	rfddump rfdformat \
+-	serve_image recv_image \
+-	sumtool jffs2reader
+ UBI_BINS = \
+ 	ubiupdatevol ubimkvol ubirmvol ubicrc32 ubinfo ubiattach \
+ 	ubidetach ubinize ubiformat ubirename mtdinfo ubirsvol ubiblock
+ 
+-BINS = $(MTD_BINS)
+-BINS += mkfs.ubifs/mkfs.ubifs
+-BINS += $(addprefix ubi-utils/,$(UBI_BINS))
+-SCRIPTS = flash_eraseall
++BINS = $(addprefix ubi-utils/,$(UBI_BINS))
+ 
+ TARGETS = $(BINS)
+-TARGETS += lib/libmtd.a
+-TARGETS += ubi-utils/libubi.a
+ 
+ OBJDEPS = $(BUILDDIR)/include/version.h
+ 
+@@ -61,12 +46,9 @@ endif
+ 	rm -f $(BUILDDIR)/include/version.h
+ 	$(MAKE) -C $(TESTS) clean
+ 
+-install:: $(addprefix $(BUILDDIR)/,${BINS}) ${SCRIPTS}
++install:: $(addprefix $(BUILDDIR)/,${BINS})
+ 	mkdir -p ${DESTDIR}/${SBINDIR}
+ 	install -m 0755 $^ ${DESTDIR}/${SBINDIR}/
+-	mkdir -p ${DESTDIR}/${MANDIR}/man1
+-	install -m 0644 mkfs.jffs2.1 ${DESTDIR}/${MANDIR}/man1/
+-	-gzip -9f ${DESTDIR}/${MANDIR}/man1/*.1
+ 
+ tests::
+ 	$(MAKE) -C $(TESTS)
+@@ -91,8 +73,6 @@ LDLIBS_mkfs.jffs2  = -lz $(LZOLDLIBS)
+ LDFLAGS_jffs2reader = $(ZLIBLDFLAGS) $(LZOLDFLAGS)
+ LDLIBS_jffs2reader  = -lz $(LZOLDLIBS)
+ 
+-$(foreach v,$(MTD_BINS),$(eval $(call mkdep,,$(v))))
+-
+ #
+ # Common libmtd
+ #
+-- 
+1.9.1
+
meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0002-common.mk-for-klibc-CC-is-klcc.patch new file +27 -0
new file mode 100644
index 0000000..89c494e
@@ -0,0 +1,27 @@
+From f3609c7c0450b4c31e1d4603fcf2cfb1ba46f994 Mon Sep 17 00:00:00 2001
+From: Andrea Adami <[email protected]>
+Date: Sun, 29 Jun 2014 00:37:28 +0200
+Subject: [PATCH 2/6] common.mk: for klibc $(CC) is klcc
+
+Do not hardcode: assign the value to the variable if it is not already defined.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andrea Adami <[email protected]>
+---
+ common.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/common.mk b/common.mk
+index ba87377..59c56df 100644
+--- a/common.mk
++++ b/common.mk
+@@ -1,4 +1,4 @@
+-CC := $(CROSS)gcc
++CC ?= $(CROSS)gcc
+ AR := $(CROSS)ar
+ RANLIB := $(CROSS)ranlib
+ 
+-- 
+1.9.1
+
meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0003-libubi.c-add-klibc-specific-fixes.patch new file +76 -0

76 lines not on this page · raw message

meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0004-common.h-klibc-fixes-1.patch new file +84 -0

84 lines not on this page · raw message

meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch new file +61 -0

61 lines not on this page · raw message

meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0006-libiniparser-remove-unused-function-needing-float.patch new file +85 -0

85 lines not on this page · raw message

meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.1.bb new file +50 -0

50 lines not on this page · raw message

Signature · 1 line
1.9.1