* [Buildroot] [PATCH v2] uboot-tools: bump to version 2014.04
@ 2014-04-28 11:23 Alexey Brodkin
2014-04-28 12:43 ` Arnout Vandecappelle
0 siblings, 1 reply; 3+ messages in thread
From: Alexey Brodkin @ 2014-04-28 11:23 UTC (permalink / raw)
To: buildroot
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Cc: Peter Korsgaard <peter@korsgaard.com>
---
Changes compared to v1:
* Fixed building of U-Boot tools for the target
* Properly set compiler and linker flags in case of cross-compilation
.../uboot-tools-01-drop-configh-from-tools.patch | 32 +++++-----------------
.../uboot-tools-02-hostcflags-override-fix.patch | 29 --------------------
package/uboot-tools/uboot-tools.mk | 19 ++++++++-----
3 files changed, 19 insertions(+), 61 deletions(-)
delete mode 100644 package/uboot-tools/uboot-tools-02-hostcflags-override-fix.patch
diff --git a/package/uboot-tools/uboot-tools-01-drop-configh-from-tools.patch b/package/uboot-tools/uboot-tools-01-drop-configh-from-tools.patch
index 21995ec..6466287 100644
--- a/package/uboot-tools/uboot-tools-01-drop-configh-from-tools.patch
+++ b/package/uboot-tools/uboot-tools-01-drop-configh-from-tools.patch
@@ -1,14 +1,9 @@
-We need to build u-boot tools without a board configuration for the target.
-fw_env just uses config.h to define the default environment of the created
-image, so it really isn't mandatory.
-
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
-
-diff -Nura u-boot-2013.01.orig/tools/env/fw_env.h u-boot-2013.01/tools/env/fw_env.h
---- u-boot-2013.01.orig/tools/env/fw_env.h 2013-01-19 07:50:53.879241660 -0300
-+++ u-boot-2013.01/tools/env/fw_env.h 2013-01-19 07:58:11.897903403 -0300
-@@ -21,15 +21,6 @@
- * MA 02111-1307 USA
+diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h
+index aff471b..dfe7439 100644
+--- a/tools/env/fw_env.h
++++ b/tools/env/fw_env.h
+@@ -5,14 +5,6 @@
+ * SPDX-License-Identifier: GPL-2.0+
*/
-/* Pull in the current config to define the default environment */
@@ -19,19 +14,6 @@ diff -Nura u-boot-2013.01.orig/tools/env/fw_env.h u-boot-2013.01/tools/env/fw_en
-#else
-#include <config.h>
-#endif
--
+
/*
* To build the utility with the static configuration
- * comment out the next line.
-diff -Nura u-boot-2013.01.orig/tools/env/Makefile u-boot-2013.01/tools/env/Makefile
---- u-boot-2013.01.orig/tools/env/Makefile 2013-01-19 07:50:53.879241660 -0300
-+++ u-boot-2013.01/tools/env/Makefile 2013-01-19 07:59:34.926486346 -0300
-@@ -26,7 +26,7 @@
- HOSTSRCS := $(SRCTREE)/lib/crc32.c fw_env.c fw_env_main.c
- HOSTSRCS += $(SRCTREE)/lib/ctype.c $(SRCTREE)/lib/linux_string.c
- HOSTSRCS += $(SRCTREE)/common/env_attr.c $(SRCTREE)/common/env_flags.c
--HEADERS := fw_env.h $(OBJTREE)/include/config.h
-+HEADERS := fw_env.h
-
- # Compile for a hosted environment on the target
- HOSTCPPFLAGS = -idirafter $(SRCTREE)/include \
diff --git a/package/uboot-tools/uboot-tools-02-hostcflags-override-fix.patch b/package/uboot-tools/uboot-tools-02-hostcflags-override-fix.patch
deleted file mode 100644
index 0202eda..0000000
--- a/package/uboot-tools/uboot-tools-02-hostcflags-override-fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-[PATCH] Fix tools build with custom HOSTCFLAGS
-
-We always need to append HOSTCPPFLAGS, even if HOSTCFLAGS have been
-overridden on the cmdline.
-
-Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
----
- config.mk | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-Index: u-boot-2011.03/config.mk
-===================================================================
---- u-boot-2011.03.orig/config.mk
-+++ u-boot-2011.03/config.mk
-@@ -46,10 +46,12 @@
-
- #########################################################################
-
--HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
-- $(HOSTCPPFLAGS)
-+HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
- HOSTSTRIP = strip
-
-+# append CPPFLAGS even if CFLAGS has been overridden on cmdline
-+override HOSTCFLAGS += $(HOSTCPPFLAGS)
-+
- #
- # Mac OS X / Darwin's C preprocessor is Apple specific. It
- # generates numerous errors and warnings. We want to bypass it
diff --git a/package/uboot-tools/uboot-tools.mk b/package/uboot-tools/uboot-tools.mk
index 398ce8b..0a3d711 100644
--- a/package/uboot-tools/uboot-tools.mk
+++ b/package/uboot-tools/uboot-tools.mk
@@ -4,7 +4,7 @@
#
################################################################################
-UBOOT_TOOLS_VERSION = 2014.01
+UBOOT_TOOLS_VERSION = 2014.04
UBOOT_TOOLS_SOURCE = u-boot-$(UBOOT_TOOLS_VERSION).tar.bz2
UBOOT_TOOLS_SITE = ftp://ftp.denx.de/pub/u-boot
UBOOT_TOOLS_LICENSE = GPLv2+
@@ -12,11 +12,16 @@ UBOOT_TOOLS_LICENSE_FILES = Licenses/gpl-2.0.txt
define UBOOT_TOOLS_BUILD_CMDS
$(MAKE) -C $(@D) \
- HOSTCC="$(TARGET_CC)" \
- HOSTCFLAGS="$(TARGET_CFLAGS)" \
- HOSTLDFLAGS="$(TARGET_LDFLAGS)" \
- HOSTSTRIP=true \
- tools env
+ CROSS_COMPILE="$(TARGET_CROSS)" \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ CROSS_BUILD_TOOLS=y \
+ tools-only
+ $(MAKE) -C $(@D) \
+ CROSS_COMPILE="$(TARGET_CROSS)" \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ env no-dot-config-targets=env
endef
ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE),y)
@@ -49,7 +54,7 @@ define HOST_UBOOT_TOOLS_BUILD_CMDS
HOSTCC="$(HOSTCC)" \
HOSTCFLAGS="$(HOST_CFLAGS)" \
HOSTLDFLAGS="$(HOST_LDFLAGS)" \
- tools
+ tools-only
endef
define HOST_UBOOT_TOOLS_INSTALL_CMDS
--
1.9.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2] uboot-tools: bump to version 2014.04
2014-04-28 11:23 [Buildroot] [PATCH v2] uboot-tools: bump to version 2014.04 Alexey Brodkin
@ 2014-04-28 12:43 ` Arnout Vandecappelle
2014-04-28 12:57 ` Alexey Brodkin
0 siblings, 1 reply; 3+ messages in thread
From: Arnout Vandecappelle @ 2014-04-28 12:43 UTC (permalink / raw)
To: buildroot
On 28/04/14 13:23, Alexey Brodkin wrote:
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
v1 had a much better commit message.
>
> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
> Cc: Peter Korsgaard <peter@korsgaard.com>
> ---
> Changes compared to v1:
>
> * Fixed building of U-Boot tools for the target
> * Properly set compiler and linker flags in case of cross-compilation
>
> .../uboot-tools-01-drop-configh-from-tools.patch | 32 +++++-----------------
> .../uboot-tools-02-hostcflags-override-fix.patch | 29 --------------------
> package/uboot-tools/uboot-tools.mk | 19 ++++++++-----
> 3 files changed, 19 insertions(+), 61 deletions(-)
> delete mode 100644 package/uboot-tools/uboot-tools-02-hostcflags-override-fix.patch
>
> diff --git a/package/uboot-tools/uboot-tools-01-drop-configh-from-tools.patch b/package/uboot-tools/uboot-tools-01-drop-configh-from-tools.patch
> index 21995ec..6466287 100644
> --- a/package/uboot-tools/uboot-tools-01-drop-configh-from-tools.patch
> +++ b/package/uboot-tools/uboot-tools-01-drop-configh-from-tools.patch
> @@ -1,14 +1,9 @@
> -We need to build u-boot tools without a board configuration for the target.
> -fw_env just uses config.h to define the default environment of the created
> -image, so it really isn't mandatory.
> -
> -Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
No need to drop this commit log...
I also don't really like this patch to begin with, because sometimes I
_do_ need fw_setenv to be able to generate a default environment. But
that, of course, would be a separate patch.
> -
> -diff -Nura u-boot-2013.01.orig/tools/env/fw_env.h u-boot-2013.01/tools/env/fw_env.h
> ---- u-boot-2013.01.orig/tools/env/fw_env.h 2013-01-19 07:50:53.879241660 -0300
> -+++ u-boot-2013.01/tools/env/fw_env.h 2013-01-19 07:58:11.897903403 -0300
> -@@ -21,15 +21,6 @@
> - * MA 02111-1307 USA
> +diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h
> +index aff471b..dfe7439 100644
> +--- a/tools/env/fw_env.h
> ++++ b/tools/env/fw_env.h
> +@@ -5,14 +5,6 @@
> + * SPDX-License-Identifier: GPL-2.0+
> */
>
> -/* Pull in the current config to define the default environment */
> @@ -19,19 +14,6 @@ diff -Nura u-boot-2013.01.orig/tools/env/fw_env.h u-boot-2013.01/tools/env/fw_en
> -#else
> -#include <config.h>
> -#endif
> --
> +
Useless change.
> /*
> * To build the utility with the static configuration
> - * comment out the next line.
> -diff -Nura u-boot-2013.01.orig/tools/env/Makefile u-boot-2013.01/tools/env/Makefile
> ---- u-boot-2013.01.orig/tools/env/Makefile 2013-01-19 07:50:53.879241660 -0300
> -+++ u-boot-2013.01/tools/env/Makefile 2013-01-19 07:59:34.926486346 -0300
> -@@ -26,7 +26,7 @@
> - HOSTSRCS := $(SRCTREE)/lib/crc32.c fw_env.c fw_env_main.c
> - HOSTSRCS += $(SRCTREE)/lib/ctype.c $(SRCTREE)/lib/linux_string.c
> - HOSTSRCS += $(SRCTREE)/common/env_attr.c $(SRCTREE)/common/env_flags.c
> --HEADERS := fw_env.h $(OBJTREE)/include/config.h
> -+HEADERS := fw_env.h
> -
> - # Compile for a hosted environment on the target
> - HOSTCPPFLAGS = -idirafter $(SRCTREE)/include \
Otherwise, looks good to me.
Regards,
Arnout
[snip]
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2] uboot-tools: bump to version 2014.04
2014-04-28 12:43 ` Arnout Vandecappelle
@ 2014-04-28 12:57 ` Alexey Brodkin
0 siblings, 0 replies; 3+ messages in thread
From: Alexey Brodkin @ 2014-04-28 12:57 UTC (permalink / raw)
To: buildroot
Hi Arnout,
On Mon, 2014-04-28 at 14:43 +0200, Arnout Vandecappelle wrote:
> On 28/04/14 13:23, Alexey Brodkin wrote:
> > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
>
> v1 had a much better commit message.
Right, because it was simple considering changes were done in commit.
But after pretty significant rework I'll need to comment on much more
things - this new U-Boot version introduced a lot of changes especially
in build infrastructure.
If you prefer to have a verbose description of changes I've done I'll
add more comments happily.
> >
> > Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
> > Cc: Peter Korsgaard <peter@korsgaard.com>
> > ---
> > Changes compared to v1:
> >
> > * Fixed building of U-Boot tools for the target
> > * Properly set compiler and linker flags in case of cross-compilation
> >
> > .../uboot-tools-01-drop-configh-from-tools.patch | 32 +++++-----------------
> > .../uboot-tools-02-hostcflags-override-fix.patch | 29 --------------------
> > package/uboot-tools/uboot-tools.mk | 19 ++++++++-----
> > 3 files changed, 19 insertions(+), 61 deletions(-)
> > delete mode 100644 package/uboot-tools/uboot-tools-02-hostcflags-override-fix.patch
> >
> > diff --git a/package/uboot-tools/uboot-tools-01-drop-configh-from-tools.patch b/package/uboot-tools/uboot-tools-01-drop-configh-from-tools.patch
> > index 21995ec..6466287 100644
> > --- a/package/uboot-tools/uboot-tools-01-drop-configh-from-tools.patch
> > +++ b/package/uboot-tools/uboot-tools-01-drop-configh-from-tools.patch
> > @@ -1,14 +1,9 @@
> > -We need to build u-boot tools without a board configuration for the target.
> > -fw_env just uses config.h to define the default environment of the created
> > -image, so it really isn't mandatory.
> > -
> > -Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
>
> No need to drop this commit log...
Makes sense. Will add it back.
> I also don't really like this patch to begin with, because sometimes I
> _do_ need fw_setenv to be able to generate a default environment. But
> that, of course, would be a separate patch.
Then you need to configure U-Boot before building. Do something like
"make yourboard_config" and only then build tools.
In other words we'll need to provide correct board name in Buildroot
configuration for U-Boot tools. Which I think is a bit of overhead. IMHO
it's good to generate generic tools. At least it's the simplest way.
Maybe we need to consider building of U-Boot tools for target as a part
of U-Boot bootloader. In this case board name will be there already and
configuration of sources will be done by previous build.
> > -
> > -diff -Nura u-boot-2013.01.orig/tools/env/fw_env.h u-boot-2013.01/tools/env/fw_env.h
> > ---- u-boot-2013.01.orig/tools/env/fw_env.h 2013-01-19 07:50:53.879241660 -0300
> > -+++ u-boot-2013.01/tools/env/fw_env.h 2013-01-19 07:58:11.897903403 -0300
> > -@@ -21,15 +21,6 @@
> > - * MA 02111-1307 USA
> > +diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h
> > +index aff471b..dfe7439 100644
> > +--- a/tools/env/fw_env.h
> > ++++ b/tools/env/fw_env.h
> > +@@ -5,14 +5,6 @@
> > + * SPDX-License-Identifier: GPL-2.0+
> > */
> >
> > -/* Pull in the current config to define the default environment */
> > @@ -19,19 +14,6 @@ diff -Nura u-boot-2013.01.orig/tools/env/fw_env.h u-boot-2013.01/tools/env/fw_en
> > -#else
> > -#include <config.h>
> > -#endif
> > --
> > +
>
> Useless change.
Well it is required just because of changes in "fw_env.h" which prevent
original patch to apply. So I created a brand-new patch on top of
current sources.
Regards,
Alexey
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-28 12:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-28 11:23 [Buildroot] [PATCH v2] uboot-tools: bump to version 2014.04 Alexey Brodkin
2014-04-28 12:43 ` Arnout Vandecappelle
2014-04-28 12:57 ` Alexey Brodkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox