Message ID | 20171002160657.39576-3-raj.khem@gmail.com |
---|---|
State | Accepted |
Commit | dec9f0ba38811962fc9486559eb5432c36cf4d9c |
Headers | show |
Series | [oe,meta-initramfs,1/5] klibc: Pass Optimization with KLIBCOPTFLAGS | expand |
On Mon, Oct 2, 2017 at 6:06 PM, Khem Raj <raj.khem@gmail.com> wrote: > Signed-off-by: Khem Raj <raj.khem@gmail.com> > --- > .../0001-Makefile-only-build-ubi-utils.patch | 25 ++++++++++------------ > .../0005-common.h-klibc-fixes-2.patch | 22 +++++-------------- > ...ils-klibc_1.5.1.bb => ubi-utils-klibc_1.5.2.bb} | 8 +++---- > 3 files changed, 19 insertions(+), 36 deletions(-) > rename meta-initramfs/recipes-devtools/mtd/{ubi-utils-klibc_1.5.1.bb => ubi-utils-klibc_1.5.2.bb} (90%) > > diff --git a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch > index 9d5e4ebf0..6e1b9ff10 100644 > --- a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch > +++ b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch > @@ -25,11 +25,11 @@ Signed-off-by: Andrea Adami <andrea.adami@gmail.com> > 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 > +Index: git/Makefile > +=================================================================== > +--- git.orig/Makefile > ++++ git/Makefile > +@@ -16,28 +16,11 @@ endif > > TESTS = tests > > @@ -37,7 +37,7 @@ index eade234..2275865 100644 > - 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 \ > +- mtd_debug flashcp nandwrite nandtest mtdpart \ > - jffs2dump \ > - nftldump nftl_format docfdisk \ > - rfddump rfdformat \ > @@ -51,15 +51,15 @@ index eade234..2275865 100644 > -BINS += mkfs.ubifs/mkfs.ubifs > -BINS += $(addprefix ubi-utils/,$(UBI_BINS)) > -SCRIPTS = flash_eraseall > -+BINS = $(addprefix ubi-utils/,$(UBI_BINS)) > - > - TARGETS = $(BINS) > +- > +-TARGETS = $(BINS) > -TARGETS += lib/libmtd.a > -TARGETS += ubi-utils/libubi.a > ++BINS = $(addprefix ubi-utils/,$(UBI_BINS)) > > OBJDEPS = $(BUILDDIR)/include/version.h > > -@@ -61,12 +46,9 @@ endif > +@@ -61,12 +44,9 @@ endif > rm -f $(BUILDDIR)/include/version.h > $(MAKE) -C $(TESTS) clean > > @@ -73,7 +73,7 @@ index eade234..2275865 100644 > > tests:: > $(MAKE) -C $(TESTS) > -@@ -91,8 +73,6 @@ LDLIBS_mkfs.jffs2 = -lz $(LZOLDLIBS) > +@@ -91,8 +71,6 @@ LDLIBS_mkfs.jffs2 = -lz $(LZOLDLIBS) > LDFLAGS_jffs2reader = $(ZLIBLDFLAGS) $(LZOLDFLAGS) > LDLIBS_jffs2reader = -lz $(LZOLDLIBS) > > @@ -82,6 +82,3 @@ index eade234..2275865 100644 > # > # Common libmtd > # > --- > -1.9.1 > - > diff --git a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch > index 2e43d5d97..6b09c14d6 100644 > --- a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch > +++ b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch > @@ -22,20 +22,11 @@ Signed-off-by: Andrea Adami <andrea.adami@gmail.com> > include/common.h | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > -diff --git a/include/common.h b/include/common.h > -index 77f3f7d..2cbee0f 100644 > ---- a/include/common.h > -+++ b/include/common.h > -@@ -126,7 +126,7 @@ static char __PRIxoff_t_static_assert[sizeof(off_t) == 8 ? 1 : -1]; > - fprintf(stderr, "%s: warning!: " fmt "\n", PROGRAM_NAME, ##__VA_ARGS__); \ > - } while(0) > - > --#if defined(__UCLIBC__) > -+#if defined(__UCLIBC__) || defined(__KLIBC__) > - /* uClibc versions before 0.9.34 don't have rpmatch() */ > - #if __UCLIBC_MAJOR__ == 0 && \ > - (__UCLIBC_MINOR__ < 9 || \ > -@@ -146,15 +146,17 @@ static inline int __rpmatch(const char *resp) > +Index: git/include/common.h > +=================================================================== > +--- git.orig/include/common.h > ++++ git/include/common.h > +@@ -161,15 +161,17 @@ static inline int __rpmatch(const char * > */ > static inline bool prompt(const char *msg, bool def) > { > @@ -56,6 +47,3 @@ index 77f3f7d..2cbee0f 100644 > printf("failed to read prompt; assuming '%s'\n", > def ? "yes" : "no"); > break; > --- > -1.9.1 > - > diff --git a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.1.bb b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.2.bb > similarity index 90% > rename from meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.1.bb > rename to meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.2.bb > index 8ca1ca727..518c02fc0 100644 > --- a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.1.bb > +++ b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.2.bb > @@ -9,7 +9,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ > > inherit klibc > > -SRC_URI = "git://git.infradead.org/mtd-utils.git;tag=b7455d847ab4f9eeeb6a729efc306bfda7bddc99 \ > +SRCREV = "aea36417067dade75192bafa03af70b6eb2677b1" > +SRC_URI = "git://git.infradead.org/mtd-utils.git \ > file://0001-Makefile-only-build-ubi-utils.patch \ > file://0002-common.mk-for-klibc-CC-is-klcc.patch \ > file://0003-libubi.c-add-klibc-specific-fixes.patch \ > @@ -23,10 +24,7 @@ S = "${WORKDIR}/git/" > EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} -I${S}include -DWITHOUT_XATTR' 'BUILDDIR=${S}'" > > do_install () { > - > - install -d ${D}${sbindir} I don't remember if it is actually necessary but here sbindir was purposedly created for safety. Maybe building it anew after having wiped tmp makes install fail? > - oe_runmake DESTDIR="${D}" install > - > + oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir} > } > > PACKAGES = "ubi-utils-klibc-dbg" > -- > 2.14.2 > > -- > _______________________________________________ > Openembedded-devel mailing list > Openembedded-devel@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-devel Thanks for taking care of this. I planned to update to 2.x one day, at least the ubi-utils, but you know, these old binaries do work perfectly on armv4/armv5 so I never did it... For the klibc patchset, Acked-by: Andrea Adami <andrea.adami@gmail.com> Cheers Andrea -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff --git a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch index 9d5e4ebf0..6e1b9ff10 100644 --- a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch +++ b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0001-Makefile-only-build-ubi-utils.patch @@ -25,11 +25,11 @@ Signed-off-by: Andrea Adami <andrea.adami@gmail.com> 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 +Index: git/Makefile +=================================================================== +--- git.orig/Makefile ++++ git/Makefile +@@ -16,28 +16,11 @@ endif TESTS = tests @@ -37,7 +37,7 @@ index eade234..2275865 100644 - 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 \ +- mtd_debug flashcp nandwrite nandtest mtdpart \ - jffs2dump \ - nftldump nftl_format docfdisk \ - rfddump rfdformat \ @@ -51,15 +51,15 @@ index eade234..2275865 100644 -BINS += mkfs.ubifs/mkfs.ubifs -BINS += $(addprefix ubi-utils/,$(UBI_BINS)) -SCRIPTS = flash_eraseall -+BINS = $(addprefix ubi-utils/,$(UBI_BINS)) - - TARGETS = $(BINS) +- +-TARGETS = $(BINS) -TARGETS += lib/libmtd.a -TARGETS += ubi-utils/libubi.a ++BINS = $(addprefix ubi-utils/,$(UBI_BINS)) OBJDEPS = $(BUILDDIR)/include/version.h -@@ -61,12 +46,9 @@ endif +@@ -61,12 +44,9 @@ endif rm -f $(BUILDDIR)/include/version.h $(MAKE) -C $(TESTS) clean @@ -73,7 +73,7 @@ index eade234..2275865 100644 tests:: $(MAKE) -C $(TESTS) -@@ -91,8 +73,6 @@ LDLIBS_mkfs.jffs2 = -lz $(LZOLDLIBS) +@@ -91,8 +71,6 @@ LDLIBS_mkfs.jffs2 = -lz $(LZOLDLIBS) LDFLAGS_jffs2reader = $(ZLIBLDFLAGS) $(LZOLDFLAGS) LDLIBS_jffs2reader = -lz $(LZOLDLIBS) @@ -82,6 +82,3 @@ index eade234..2275865 100644 # # Common libmtd # --- -1.9.1 - diff --git a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch index 2e43d5d97..6b09c14d6 100644 --- a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch +++ b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc/0005-common.h-klibc-fixes-2.patch @@ -22,20 +22,11 @@ Signed-off-by: Andrea Adami <andrea.adami@gmail.com> include/common.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) -diff --git a/include/common.h b/include/common.h -index 77f3f7d..2cbee0f 100644 ---- a/include/common.h -+++ b/include/common.h -@@ -126,7 +126,7 @@ static char __PRIxoff_t_static_assert[sizeof(off_t) == 8 ? 1 : -1]; - fprintf(stderr, "%s: warning!: " fmt "\n", PROGRAM_NAME, ##__VA_ARGS__); \ - } while(0) - --#if defined(__UCLIBC__) -+#if defined(__UCLIBC__) || defined(__KLIBC__) - /* uClibc versions before 0.9.34 don't have rpmatch() */ - #if __UCLIBC_MAJOR__ == 0 && \ - (__UCLIBC_MINOR__ < 9 || \ -@@ -146,15 +146,17 @@ static inline int __rpmatch(const char *resp) +Index: git/include/common.h +=================================================================== +--- git.orig/include/common.h ++++ git/include/common.h +@@ -161,15 +161,17 @@ static inline int __rpmatch(const char * */ static inline bool prompt(const char *msg, bool def) { @@ -56,6 +47,3 @@ index 77f3f7d..2cbee0f 100644 printf("failed to read prompt; assuming '%s'\n", def ? "yes" : "no"); break; --- -1.9.1 - diff --git a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.1.bb b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.2.bb similarity index 90% rename from meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.1.bb rename to meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.2.bb index 8ca1ca727..518c02fc0 100644 --- a/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.1.bb +++ b/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.2.bb @@ -9,7 +9,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ inherit klibc -SRC_URI = "git://git.infradead.org/mtd-utils.git;tag=b7455d847ab4f9eeeb6a729efc306bfda7bddc99 \ +SRCREV = "aea36417067dade75192bafa03af70b6eb2677b1" +SRC_URI = "git://git.infradead.org/mtd-utils.git \ file://0001-Makefile-only-build-ubi-utils.patch \ file://0002-common.mk-for-klibc-CC-is-klcc.patch \ file://0003-libubi.c-add-klibc-specific-fixes.patch \ @@ -23,10 +24,7 @@ S = "${WORKDIR}/git/" EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} -I${S}include -DWITHOUT_XATTR' 'BUILDDIR=${S}'" do_install () { - - install -d ${D}${sbindir} - oe_runmake DESTDIR="${D}" install - + oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir} } PACKAGES = "ubi-utils-klibc-dbg"
Signed-off-by: Khem Raj <raj.khem@gmail.com> --- .../0001-Makefile-only-build-ubi-utils.patch | 25 ++++++++++------------ .../0005-common.h-klibc-fixes-2.patch | 22 +++++-------------- ...ils-klibc_1.5.1.bb => ubi-utils-klibc_1.5.2.bb} | 8 +++---- 3 files changed, 19 insertions(+), 36 deletions(-) rename meta-initramfs/recipes-devtools/mtd/{ubi-utils-klibc_1.5.1.bb => ubi-utils-klibc_1.5.2.bb} (90%) -- 2.14.2 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel