Skip to contentSkip to conversation

ubi-utils-klibc: initial commit of version 1.4.9

PATCH New Andrea Adami 1 participant 1 message Apr 29, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ubi-utils-klibc: initial commit of version 1.4.9

* Initially only ubiattach was targeted (for kexecboot project).
* Based on klibc_1.5.25, will be revised once new klibc is out.

---
 .../mtd/ubi-utils-klibc/Makefile.patch             |   50 +++++++++++++
 .../mtd/ubi-utils-klibc/common.mk.patch            |    8 ++
 .../mtd/ubi-utils-klibc/libmtd.c.patch             |   24 +++++++
 .../mtd/ubi-utils-klibc/libubi.c.patch             |   73 ++++++++++++++++++++
 .../recipes-devtools/mtd/ubi-utils-klibc_1.4.9.bb  |   53 ++++++++++++++
 5 files changed, 208 insertions(+), 0 deletions(-)
 create mode 100644 meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/Makefile.patch
 create mode 100644 meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/common.mk.patch
 create mode 100644 meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/libmtd.c.patch
 create mode 100644 meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/libubi.c.patch
 create mode 100644 meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.4.9.bb
meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/Makefile.patch new file +50 -0
new file mode 100644
index 0000000..2802afe
@@ -0,0 +1,50 @@
+--- a/Makefile	2012-04-29 18:15:30.000000000 +0200
++++ b/Makefile	2012-04-29 00:43:03.000000000 +0200
+@@ -16,27 +16,11 @@
+ 
+ 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
++UBI_BINS = ubiupdatevol ubimkvol ubirmvol ubinfo ubiattach ubidetach ubirename mtdinfo ubirsvol
++
++BINS = $(addprefix ubi-utils/,$(UBI_BINS))
+ 
+ TARGETS = $(BINS)
+-TARGETS += lib/libmtd.a
+-TARGETS += ubi-utils/libubi.a
+ 
+ OBJDEPS = $(BUILDDIR)/include/version.h
+ 
+@@ -58,7 +42,7 @@
+ 	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
+@@ -88,7 +72,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 new file +8 -0
new file mode 100644
index 0000000..0a48416
@@ -0,0 +1,8 @@
+--- 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/libmtd.c.patch new file +24 -0
new file mode 100644
index 0000000..f32fb70
@@ -0,0 +1,24 @@
+--- a/lib/libmtd.c	2012-04-29 21:44:52.000000000 +0200
++++ b/lib/libmtd.c	2012-04-29 21:43:04.000000000 +0200
+@@ -441,8 +441,8 @@
+ 		return -1;
+ 	}
+ 
+-	major = major(st.st_rdev);
+-	minor = minor(st.st_rdev);
++	major = __major(st.st_rdev);
++	minor = __minor(st.st_rdev);
+ 
+ 	if (mtd_get_info((libmtd_t *)lib, &info))
+ 		return -1;
+@@ -1381,8 +1381,8 @@
+ 		return -1;
+ 	}
+ 
+-	major = major(st.st_rdev);
+-	minor = minor(st.st_rdev);
++	major = __major(st.st_rdev);
++	minor = __minor(st.st_rdev);
+ 
+ 	if (mtd_get_info((libmtd_t *)lib, &info))
+ 		return -1;
meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/libubi.c.patch new file +73 -0

73 lines not on this page · raw message

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

53 lines not on this page · raw message

Signature · 1 line
1.7.3.4