Skip to contentSkip to conversation

uboot-tools: bump to version 2014.04

PATCH Superseded Alexey Brodkin 2 participants 7 messages Apr 30, 2014 – May 11, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 uboot-tools: bump to version 2014.04

U-Boot v2014.04 introduced significant changes in its build infrastrcture.

Among things related to buildroot are:
1. Special new target ("tools-only") was added for building host tools alone

2. Tools cross-building for target is no longer possible with substitution of HOSTxx with TARGETxx because host binaries won't be built. Instead we just set CROSS_COMPILE and CROSS_BUILD_TOOLS variables.

3. Most of make targets now require U-Boot to be configured before building. So for building generic "fw_printenv" we now need to make "env" target config- independent.

4. HOSTCPPFLAGS are only applicable to .cpp files so dropping "uboot-tools-02-hostcflags-override-fix.patch"

Also due to lincese boilerplate change in sources "uboot-tools-01-drop-configh-from-tools.patch" required subtle changes.

Cc Arnout Vandecappelle <[email protected]>
Cc Gustavo Zacarias <[email protected]>
Cc Peter Korsgaard <[email protected]>

---

Changes compared to v2:
* Added verbose commit message
* Reverted meaningful comment in "uboot-tools-02-hostcflags-override-fix.patch"

---
 .../uboot-tools-01-drop-configh-from-tools.patch   | 26 ++++++-------------
 .../uboot-tools-02-hostcflags-override-fix.patch   | 29 ----------------------
 package/uboot-tools/uboot-tools.mk                 | 19 ++++++++------
 3 files changed, 19 insertions(+), 55 deletions(-)
 delete mode 100644 package/uboot-tools/uboot-tools-02-hostcflags-override-fix.patch
package/uboot-tools/uboot-tools-01-drop-configh-from-tools.patch +7 -19
index 21995ec..a36332f 100644
@@ -4,11 +4,12 @@ image, so it really isn't mandatory.
 
 Signed-off-by: Gustavo Zacarias <[email protected]>
 
-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 +20,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 \
package/uboot-tools/uboot-tools-02-hostcflags-override-fix.patch deleted +0 -29
deleted file mode 100644
index 0202eda..0000000
@@ -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 <[email protected]>
----
- 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
package/uboot-tools/uboot-tools.mk +12 -7
index 398ce8b..0a3d711 100644
@@ -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
Signature · 1 line
1.9.0
#1 lore raw

PATCH v3 1/1 uboot-tools: bump to version 2014.04

Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Alexey" == Alexey Brodkin <[email protected]> writes:

U-Boot v2014.04 introduced significant changes in its build infrastrcture. Among things related to buildroot are:
1. Special new target ("tools-only") was added for building host tools alone

2. Tools cross-building for target is no longer possible with substitution of HOSTxx with TARGETxx because host binaries won't be built. Instead we just set CROSS_COMPILE and CROSS_BUILD_TOOLS variables.

Quoted 6 lines

3. Most of make targets now require U-Boot to be configured before building. So for building generic "fw_printenv" we now need to make "env" target config- independent.

4. HOSTCPPFLAGS are only applicable to .cpp files so dropping "uboot-tools-02-hostcflags-override-fix.patch"

That's not true. They are flags for the preprocessor. You must be confusing them with CXXFLAGS.

With that said, I think we're passing everything from HOST_CPPFLAGS through HOST_CFLAGS as well, so it shouldn't matter.

Signature · 1 line
Bye, Peter Korsgaard 
#2 lore raw

PATCH v3 1/1 uboot-tools: bump to version 2014.04

Hi Peter,

Quoted 14 lines · Peter Korsgaard
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Alexey" == Alexey Brodkin <[email protected]> writes:

U-Boot v2014.04 introduced significant changes in its build infrastrcture. Among things related to buildroot are:
1. Special new target ("tools-only") was added for building host tools alone

2. Tools cross-building for target is no longer possible with substitution of HOSTxx with TARGETxx because host binaries won't be built. Instead we just set CROSS_COMPILE and CROSS_BUILD_TOOLS variables.

3. Most of make targets now require U-Boot to be configured before building. So for building generic "fw_printenv" we now need to make "env" target config- independent.

Quoted 8 lines
Quoted 2 lines

4. HOSTCPPFLAGS are only applicable to .cpp files so dropping "uboot-tools-02-hostcflags-override-fix.patch"

That's not true. They are flags for the preprocessor. You must be confusing them with CXXFLAGS.

With that said, I think we're passing everything from HOST_CPPFLAGS through HOST_CFLAGS as well, so it shouldn't matter.

Ok I think I did confused wit CXXFLAGS.

But I haven't found any mention of HOSTCPPFLAGS in current U-Boot so I'm wondering if we still need to add any handling of HOSTCPPFLAGS in U-Boot or there's nothing to be done?

Regards,
Alexey

#3 lore raw

PATCH v3 1/1 uboot-tools: bump to version 2014.04

Quoted 5 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Alexey" == Alexey Brodkin <[email protected]> writes:

That's not true. They are flags for the preprocessor. You must be confusing them with CXXFLAGS.

Quoted 8 lines
Quoted 2 lines

With that said, I think we're passing everything from HOST_CPPFLAGS through HOST_CFLAGS as well, so it shouldn't matter.

Ok I think I did confused wit CXXFLAGS.

But I haven't found any mention of HOSTCPPFLAGS in current U-Boot so I'm wondering if we still need to add any handling of HOSTCPPFLAGS in U-Boot or there's nothing to be done?

No, I also don't see it used anywhere in u-boot nowadays, so the patch can get dropped.

I'll adjust the commit message when I commit (unless review finds other issues).

Signature · 1 line
Bye, Peter Korsgaard 
#4 lore raw

PATCH v3 1/1 uboot-tools: bump to version 2014.04

Hi Peter,

Quoted 14 lines · Peter Korsgaard
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Alexey" == Alexey Brodkin <[email protected]> writes:

That's not true. They are flags for the preprocessor. You must be confusing them with CXXFLAGS.

Quoted 8 lines
Quoted 2 lines

With that said, I think we're passing everything from HOST_CPPFLAGS through HOST_CFLAGS as well, so it shouldn't matter.

Ok I think I did confused wit CXXFLAGS.

But I haven't found any mention of HOSTCPPFLAGS in current U-Boot so I'm wondering if we still need to add any handling of HOSTCPPFLAGS in U-Boot or there's nothing to be done?

Quoted 6 lines

No, I also don't see it used anywhere in u-boot nowadays, so the patch can get dropped.

I'll adjust the commit message when I commit (unless review finds other issues).

Thanks for handling this.
My intention was to explicitly mention dropping of the patch. But seems like I failed to properly explain why it could be done.

-Alexey

#5 lore raw

PATCH v3 1/1 uboot-tools: bump to version 2014.04

In reply to Peter Korsgaard

Hi Peter,

Quoted 14 lines · Peter Korsgaard
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Alexey" == Alexey Brodkin <[email protected]> writes:

That's not true. They are flags for the preprocessor. You must be confusing them with CXXFLAGS.

Quoted 8 lines
Quoted 2 lines

With that said, I think we're passing everything from HOST_CPPFLAGS through HOST_CFLAGS as well, so it shouldn't matter.

Ok I think I did confused wit CXXFLAGS.

But I haven't found any mention of HOSTCPPFLAGS in current U-Boot so I'm wondering if we still need to add any handling of HOSTCPPFLAGS in U-Boot or there's nothing to be done?

Quoted 6 lines

No, I also don't see it used anywhere in u-boot nowadays, so the patch can get dropped.

I'll adjust the commit message when I commit (unless review finds other issues).

This is just a kind reminder. If there're no objections is there a chance to get this one applied?

Regards,
Alexey

#6 lore raw

PATCH v3 1/1 uboot-tools: bump to version 2014.04

In reply to Alexey Brodkin
Quoted 22 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Alexey" == Alexey Brodkin <[email protected]> writes:

U-Boot v2014.04 introduced significant changes in its build infrastrcture. Among things related to buildroot are:
1. Special new target ("tools-only") was added for building host tools alone

2. Tools cross-building for target is no longer possible with substitution of HOSTxx with TARGETxx because host binaries won't be built. Instead we just set CROSS_COMPILE and CROSS_BUILD_TOOLS variables.

3. Most of make targets now require U-Boot to be configured before building. So for building generic "fw_printenv" we now need to make "env" target config- independent.

4. HOSTCPPFLAGS are only applicable to .cpp files so dropping "uboot-tools-02-hostcflags-override-fix.patch"

Also due to lincese boilerplate change in sources "uboot-tools-01-drop-configh-from-tools.patch" required subtle changes.

Quoted 8 lines
Cc Arnout Vandecappelle <[email protected]>
Cc Gustavo Zacarias <[email protected]>
Cc Peter Korsgaard <[email protected]>

---

Changes compared to v2:
* Added verbose commit message
* Reverted meaningful comment in "uboot-tools-02-hostcflags-override-fix.patch"

Committed, thanks.

Signature · 2 lines
Venlig hilsen,
Peter Korsgaard