Skip to contentSkip to conversation

tools/Makefile cleanup and win32 tool support

PATCH Superseded Peter Tyser 5 participants 69 messages Mar 13, 2009 – Apr 27, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v3 cover tools/Makefile cleanup and win32 tool support

This patch series attempts to do 2 things:
1. Add support for generating win32 versions of the tools in tools/
2. Cleanup tools/Makefile somewhat

In the process of #1 I couldn't help but work on #2 a bit:) Let me know if people would prefer the patches split up.

The win32 tools support is based on the patch found in the email thread "Add native win32 mkimage support". It is different from the original patch in that it:
1. Supports all tools in tools/ (original only supported mkimage)
2. Uses common swap routines instead of re-implementing
3. Got rid of MINGW_COMPILE variable and used HOST* variables instead
4. Updated top-level Makefile to remove all generated *.exe files

Changes since v1:
- Made changes recommended by Mike Frysinger
* Rewordings, generic os_support.[ch] files, style changes, define __KERNEL_STRICT_NAMES for tool builds
- Removed symlinking of header/source files into tools/
* The original code created build rules for files to be symlinked into the tools directory which had some shortcomings:
- 2 make rules for every file - 1 for linking, 1 for compilation
- Ugly clean target (rm specific files which were symlinks)
- dependencies weren't auto-generated
- Auto-generated dependencies for tools/ files
- Remove individual file build rules in favor of a few generic build rules
- Cleaned up HOSTARCH, HOSTOS, HOST_CFLAGS, and HOST_LDFLAGS
- Rebased on TOT

Changes since v2:
- Rebased on "next" branch
- Updated tools/.gitignore
- Moved zlib.h and bzlib.h into include/u-boot/

The changeset seem to grow with every revision, I hope third time's the charm:)

Peter Tyser (28):
Makefile: Make autoconf.mk a dependency of the depend target
Makefile: Add removal of *.exe files to clean target common/Makefile: Conditionally compile env_embedded.o elf.h: Use stdint.h to provide standard typedefs for WIN32 Rename include/zlib.h to include/u-boot/zlib.h
Rename include/bzlib.h to include/u-boot/bzlib.h
gen_eth_addr: Use POSIX rand() and srand() tools/Makefile: Remove HOSTARCH HOSTOS defines tools/Makefile: Remove inappropriate double-tabs tools/Makefile: Split variable declarations into multiple lines tools/Makefile: Build bmp_logo only when LCD or VIDEO logos are
enabled
tools/Makefile: Make img2srec dependent upon CONFIG_CMD_LOADS tools/Makefile: Make ubsha1 dependent upon CONFIG_SHA1_CHECK_UB_IMG tools/Makefile: Make inca-swap-bytes dependent on CONFIG_INCA_IP tools/Makefile: Make envcrc dependent upon CONFIG_ENV_IS_EMBEDDED tools/Makefile: Make gen_eth_addr dependent upon CONFIG_CMD_NET tools/Makefile: Compile ncb when CONFIG_NETCONSOLE tools/Makefile: Add tools/ to the include search path
tools: Remove unecessary symlinking of zlib.h tools/Makefile: Add libfdt/ to the include search path tools/Makefile: Remove symlinks for fdt targets tools/Makefile: Dynamically generate libfdt object dependencies tools/Makefile: Remove symlinks for remaining source files tools/Makefile: Use auto-generated object file dependencies tools/Makefile: Create generic build rules tools/Makefile: Simplify HOST_CFLAGS/HOST_LDFLAGS generation Add support for building native win32 tools
Delete now unused tools/Makefile.win32

 Makefile                       |   22 ++--
 README                         |   10 ++
 board/mpl/common/common_util.c |    2 +-
 common/Makefile                |    2 +-
 common/cmd_bootm.c             |    4 +-
 doc/README.NetConsole          |    6 +-
 fs/cramfs/uncompress.c         |    2 +-
 include/elf.h                  |    7 +-
 include/image.h                |    2 +
 include/libfdt_env.h           |   12 ++
 include/{ => u-boot}/bzlib.h   |    0
 include/{ => u-boot}/zlib.h    |    0
 lib_arm/bootm.c                |    2 +-
 lib_avr32/bootm.c              |    2 +-
 lib_generic/bzlib_private.h    |    2 +-
 lib_generic/crc32.c            |    2 +-
 lib_generic/gunzip.c           |    2 +-
 lib_generic/zlib.c             |    2 +-
 lib_i386/bootm.c               |    2 +-
 lib_m68k/bootm.c               |    4 +-
 lib_microblaze/bootm.c         |    2 +-
 lib_mips/bootm.c               |    2 +-
 lib_ppc/bootm.c                |    4 +-
 tools/.gitignore               |   12 --
 tools/Makefile                 |  313 ++++++++++++++++------------------------
 tools/Makefile.win32           |   37 -----
 tools/gen_eth_addr.c           |    6 +-
 tools/mingw_support.c          |   79 ++++++++++
 tools/mingw_support.h          |   51 +++++++
 tools/mkimage.h                |    5 +
 tools/os_support.c             |   24 +++
 tools/os_support.h             |   29 ++++
 tools/ubsha1.c                 |    3 +
 33 files changed, 370 insertions(+), 284 deletions(-)
 rename include/{ => u-boot}/bzlib.h (100%)
 rename include/{ => u-boot}/zlib.h (100%)
 delete mode 100644 tools/Makefile.win32
 create mode 100644 tools/mingw_support.c
 create mode 100644 tools/mingw_support.h
 create mode 100644 tools/os_support.c
 create mode 100644 tools/os_support.h
#1 lore raw

PATCH v3 1/28 Makefile: Make autoconf.mk a dependency of the depend target

The original code did not generate autoconf.mk until after some targets dependencies had already been calculated, for example the directories in the SUBDIRS variable

---
 Makefile |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
Makefile +8 -8
index e8b4c13..6f17ed1 100644
@@ -345,31 +345,31 @@ $(obj)u-boot:		depend $(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT)
 			--start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
 			-Map u-boot.map -o u-boot
 
-$(OBJS):	depend $(obj)include/autoconf.mk
+$(OBJS):	depend
 		$(MAKE) -C cpu/$(CPU) $(if $(REMOTE_BUILD),$@,$(notdir $@))
 
-$(LIBS):	depend $(obj)include/autoconf.mk $(SUBDIRS)
+$(LIBS):	depend $(SUBDIRS)
 		$(MAKE) -C $(dir $(subst $(obj),,$@))
 
-$(LIBBOARD):	depend $(LIBS) $(obj)include/autoconf.mk
+$(LIBBOARD):	depend $(LIBS)
 		$(MAKE) -C $(dir $(subst $(obj),,$@))
 
-$(SUBDIRS):	depend $(obj)include/autoconf.mk
+$(SUBDIRS):	depend
 		$(MAKE) -C $@ all
 
-$(LDSCRIPT):	depend $(obj)include/autoconf.mk
+$(LDSCRIPT):	depend
 		$(MAKE) -C $(dir $@) $(notdir $@)
 
 $(NAND_SPL):	$(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
 		$(MAKE) -C nand_spl/board/$(BOARDDIR) all
 
-$(U_BOOT_NAND):	$(NAND_SPL) $(obj)u-boot.bin $(obj)include/autoconf.mk
+$(U_BOOT_NAND):	$(NAND_SPL) $(obj)u-boot.bin
 		cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin
 
 $(ONENAND_IPL):	$(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
 		$(MAKE) -C onenand_ipl/board/$(BOARDDIR) all
 
-$(U_BOOT_ONENAND):	$(ONENAND_IPL) $(obj)u-boot.bin $(obj)include/autoconf.mk
+$(U_BOOT_ONENAND):	$(ONENAND_IPL) $(obj)u-boot.bin
 		cat $(obj)onenand_ipl/onenand-ipl-2k.bin $(obj)u-boot.bin > $(obj)u-boot-onenand.bin
 		cat $(obj)onenand_ipl/onenand-ipl-4k.bin $(obj)u-boot.bin > $(obj)u-boot-flexonenand.bin
 
@@ -391,7 +391,7 @@ updater:
 env:
 		$(MAKE) -C tools/env all MTD_VERSION=${MTD_VERSION} || exit 1
 
-depend dep:	$(TIMESTAMP_FILE) $(VERSION_FILE)
+depend dep:	$(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
 		for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir _depend ; done
 
 TAG_SUBDIRS += include
Signature · 1 line
1.6.0.2.GIT
#2 lore raw

PATCH v3 2/28 Makefile: Add removal of *.exe files to clean target

---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +1 -1
index 6f17ed1..b68de1c 100644
@@ -3470,7 +3470,7 @@ clean:
 	@rm -f $(obj)api_examples/demo $(TIMESTAMP_FILE) $(VERSION_FILE)
 	@find $(OBJTREE) -type f \
 		\( -name 'core' -o -name '*.bak' -o -name '*~' \
-		-o -name '*.o'	-o -name '*.a'	\) -print \
+		-o -name '*.o'	-o -name '*.a' -o -name '*.exe'	\) -print \
 		| xargs rm -f
 
 clobber:	clean
Signature · 1 line
1.6.0.2.GIT
#3 lore raw

PATCH v3 3/28 common/Makefile: Conditionally compile env_embedded.o

---
 common/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
common/Makefile +1 -1
index f13cd11..f81f3d8 100644
@@ -51,7 +51,7 @@ COBJS-y += cmd_nvedit.o
 COBJS-y += env_common.o
 COBJS-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o
 COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o
-COBJS-y += env_embedded.o
+COBJS-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o
 COBJS-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
 COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o
 COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o
Signature · 1 line
1.6.0.2.GIT
#4 lore raw

PATCH v3 4/28 elf.h: Use stdint.h to provide standard typedefs for WIN32

The original code provided an incomplete set of typedefs for WIN32 compiles and replicated the standard typedefs that are already provided by stdint.h

---
 include/elf.h |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
include/elf.h +1 -6
index a9839df..f640388 100644
@@ -39,13 +39,8 @@
     defined(__sun__)	 || \
     defined(__APPLE__)
 #include <inttypes.h>
-#elif defined(__linux__) && defined(USE_HOSTCC)
+#elif (defined(__linux__) && defined(USE_HOSTCC)) || defined(__WIN32__)
 #include <stdint.h>
-#elif defined(__WIN32__)
-#include <unistd.h>
-typedef	 unsigned char	 uint8_t;
-typedef	 unsigned short  uint16_t;
-typedef	 unsigned int	 uint32_t;
 #endif
 
 /*
Signature · 1 line
1.6.0.2.GIT
#5 lore raw

PATCH v3 5/28 Rename include/zlib.h to include/u-boot/zlib.h

Some systems have zlib.h installed in /usr/include/. This isn't the desired file (we want the one in include/zlib.h). Moving U-Boot's zlib.h to include/u-boot/ avoids this conflict.

---
 common/cmd_bootm.c          |    2 +-
 fs/cramfs/uncompress.c      |    2 +-
 include/{ => u-boot}/zlib.h |    0
 lib_arm/bootm.c             |    2 +-
 lib_avr32/bootm.c           |    2 +-
 lib_generic/crc32.c         |    2 +-
 lib_generic/gunzip.c        |    2 +-
 lib_generic/zlib.c          |    2 +-
 lib_i386/bootm.c            |    2 +-
 lib_m68k/bootm.c            |    2 +-
 lib_microblaze/bootm.c      |    2 +-
 lib_mips/bootm.c            |    2 +-
 lib_ppc/bootm.c             |    2 +-
 13 files changed, 12 insertions(+), 12 deletions(-)
 rename include/{ => u-boot}/zlib.h (100%)
common/cmd_bootm.c +1 -1
index 6fdeef4..bd1813a 100644
@@ -30,7 +30,7 @@
 #include <command.h>
 #include <image.h>
 #include <malloc.h>
-#include <zlib.h>
+#include <u-boot/zlib.h>
 #include <bzlib.h>
 #include <environment.h>
 #include <lmb.h>
fs/cramfs/uncompress.c +1 -1
index 39dd275..228fe68 100644
@@ -23,7 +23,7 @@
 #include <common.h>
 #include <malloc.h>
 #include <watchdog.h>
-#include <zlib.h>
+#include <u-boot/zlib.h>
 
 static z_stream stream;
 
include/u-boot/zlib.h renamed from include/zlib.h +0 -0
similarity index 100%
rename from include/zlib.h
rename to include/u-boot/zlib.h
lib_arm/bootm.c +1 -1
index 7dbde7d..128b7e3 100644
@@ -24,7 +24,7 @@
 #include <common.h>
 #include <command.h>
 #include <image.h>
-#include <zlib.h>
+#include <u-boot/zlib.h>
 #include <asm/byteorder.h>
 
 DECLARE_GLOBAL_DATA_PTR;
lib_avr32/bootm.c +1 -1
index 03ab8d1..2e6f0a4 100644
@@ -22,7 +22,7 @@
 #include <common.h>
 #include <command.h>
 #include <image.h>
-#include <zlib.h>
+#include <u-boot/zlib.h>
 #include <asm/byteorder.h>
 #include <asm/addrspace.h>
 #include <asm/io.h>
lib_generic/crc32.c +1 -1
index b6a7a91..3927ce1 100644
@@ -17,7 +17,7 @@
 #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
 #include <watchdog.h>
 #endif
-#include "zlib.h"
+#include "u-boot/zlib.h"
 
 #define local static
 #define ZEXPORT	/* empty */
lib_generic/gunzip.c +1 -1
index 5bcf5b7..01a4031 100644
@@ -26,7 +26,7 @@
 #include <command.h>
 #include <image.h>
 #include <malloc.h>
-#include <zlib.h>
+#include <u-boot/zlib.h>
 
 #define	ZALLOC_ALIGNMENT	16
 #define HEAD_CRC		2
lib_generic/zlib.c +1 -1
index 2b01c8f..d1cd44c 100644
@@ -27,7 +27,7 @@
 
 #define _Z_UTIL_H
 
-#include "zlib.h"
+#include "u-boot/zlib.h"
 
 #ifndef local
 #  define local static
lib_i386/bootm.c +1 -1
index ea19b3d..f96d7bd 100644
@@ -24,7 +24,7 @@
 #include <common.h>
 #include <command.h>
 #include <image.h>
-#include <zlib.h>
+#include <u-boot/zlib.h>
 #include <asm/byteorder.h>
 #include <asm/zimage.h>
 
lib_m68k/bootm.c +1 -1
index 958c5ce..e5ed6eb 100755
@@ -24,7 +24,7 @@
 #include <common.h>
 #include <command.h>
 #include <image.h>
-#include <zlib.h>
+#include <u-boot/zlib.h>
 #include <bzlib.h>
 #include <watchdog.h>
 #include <environment.h>
lib_microblaze/bootm.c +1 -1
index e97aae6..bce4774 100644
@@ -27,7 +27,7 @@
 #include <common.h>
 #include <command.h>
 #include <image.h>
-#include <zlib.h>
+#include <u-boot/zlib.h>
 #include <asm/byteorder.h>
 
 DECLARE_GLOBAL_DATA_PTR;
lib_mips/bootm.c +1 -1
index 3db22ea..54af24c 100644
@@ -24,7 +24,7 @@
 #include <common.h>
 #include <command.h>
 #include <image.h>
-#include <zlib.h>
+#include <u-boot/zlib.h>
 #include <asm/byteorder.h>
 #include <asm/addrspace.h>
 
lib_ppc/bootm.c +1 -1
index e03d763..0d702bf 100644
@@ -29,7 +29,7 @@
 #include <command.h>
 #include <image.h>
 #include <malloc.h>
-#include <zlib.h>
+#include <u-boot/zlib.h>
 #include <bzlib.h>
 #include <environment.h>
 #include <asm/byteorder.h>
Signature · 1 line
1.6.0.2.GIT
#6 lore raw

PATCH v3 6/28 Rename include/bzlib.h to include/u-boot/bzlib.h

Some systems have bzlib.h installed in /usr/include/. This isn't the desired file (we want the one in include/bzlib.h). Moving U-Boot's bzlib.h to include/u-boot/ avoids this conflict.

---
 board/mpl/common/common_util.c |    2 +-
 common/cmd_bootm.c             |    2 +-
 include/{ => u-boot}/bzlib.h   |    0
 lib_generic/bzlib_private.h    |    2 +-
 lib_m68k/bootm.c               |    2 +-
 lib_ppc/bootm.c                |    2 +-
 6 files changed, 5 insertions(+), 5 deletions(-)
 rename include/{ => u-boot}/bzlib.h (100%)
board/mpl/common/common_util.c +1 -1
index d169391..c87a248 100644
@@ -32,7 +32,7 @@
 #include <devices.h>
 #include <pci.h>
 #include <malloc.h>
-#include <bzlib.h>
+#include <u-boot/bzlib.h>
 
 #ifdef CONFIG_PIP405
 #include "../pip405/pip405.h"
common/cmd_bootm.c +1 -1
index bd1813a..e66e5d2 100644
@@ -31,7 +31,7 @@
 #include <image.h>
 #include <malloc.h>
 #include <u-boot/zlib.h>
-#include <bzlib.h>
+#include <u-boot/bzlib.h>
 #include <environment.h>
 #include <lmb.h>
 #include <linux/ctype.h>
include/u-boot/bzlib.h renamed from include/bzlib.h +0 -0
similarity index 100%
rename from include/bzlib.h
rename to include/u-boot/bzlib.h
lib_generic/bzlib_private.h +1 -1
index 87d8f94..3414dbe 100644
@@ -68,7 +68,7 @@
 
 #include <malloc.h>
 
-#include "bzlib.h"
+#include "u-boot/bzlib.h"
 
 #ifndef BZ_NO_STDIO
 #include <stdio.h>
lib_m68k/bootm.c +1 -1
index e5ed6eb..c858cc4 100755
@@ -25,7 +25,7 @@
 #include <command.h>
 #include <image.h>
 #include <u-boot/zlib.h>
-#include <bzlib.h>
+#include <u-boot/bzlib.h>
 #include <watchdog.h>
 #include <environment.h>
 #include <asm/byteorder.h>
lib_ppc/bootm.c +1 -1
index 0d702bf..9a846c8 100644
@@ -30,7 +30,7 @@
 #include <image.h>
 #include <malloc.h>
 #include <u-boot/zlib.h>
-#include <bzlib.h>
+#include <u-boot/bzlib.h>
 #include <environment.h>
 #include <asm/byteorder.h>
 
Signature · 1 line
1.6.0.2.GIT
#7 lore raw

PATCH v3 7/28 gen_eth_addr: Use POSIX rand() and srand()

Replace random()/srandom() use with rand()/srand() to support compilation with the mingw toolchain. The rand()/srand() functions are generally more common and are functionally equivalent to the original random()/srandom() calls.

---
 tools/gen_eth_addr.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
tools/gen_eth_addr.c +3 -3
index 75be385..429b20d 100644
@@ -31,15 +31,15 @@ main(int argc, char *argv[])
 {
     unsigned long ethaddr_low, ethaddr_high;
 
-    srandom(time(0) | getpid());
+    srand(time(0) | getpid());
 
     /*
      * setting the 2nd LSB in the most significant byte of
      * the address makes it a locally administered ethernet
      * address
      */
-    ethaddr_high = (random() & 0xfeff) | 0x0200;
-    ethaddr_low = random();
+    ethaddr_high = (rand() & 0xfeff) | 0x0200;
+    ethaddr_low = rand();
 
     printf("%02lx:%02lx:%02lx:%02lx:%02lx:%02lx\n",
 	ethaddr_high >> 8, ethaddr_high & 0xff,
Signature · 1 line
1.6.0.2.GIT
#8 lore raw

PATCH v3 8/28 tools/Makefile: Remove HOSTARCH HOSTOS defines

The values of HOSTARCH and HOSTOS which are exported from the top-level Makefile should be used

---
 tools/Makefile |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)
tools/Makefile +0 -12
index 9e9ee15..e87daaf 100644
@@ -51,18 +51,6 @@ endif
 
 #-------------------------------------------------------------------------
 
-HOSTARCH := $(shell uname -m | \
-	sed -e s/i.86/i386/ \
-	    -e s/sun4u/sparc64/ \
-	    -e s/arm.*/arm/ \
-	    -e s/sa110/arm/ \
-	    -e s/powerpc/ppc/ \
-	    -e s/Power\ Macintosh/ppc/ \
-	    -e s/macppc/ppc/)
-
-HOSTOS := $(shell uname -s | tr A-Z a-z | \
-	sed -e 's/\(cygwin\).*/cygwin/')
-
 TOOLSUBDIRS =
 
 #
Signature · 1 line
1.6.0.2.GIT
#9 lore raw

PATCH v3 9/28 tools/Makefile: Remove inappropriate double-tabs

---
 tools/Makefile |  153 ++++++++++++++++++++++++++++----------------------------
 1 files changed, 77 insertions(+), 76 deletions(-)
tools/Makefile +77 -76
index e87daaf..4219aef 100644
@@ -126,164 +126,165 @@ MAKEDEPEND = makedepend
 all:	$(obj).depend $(BINS) $(LOGO_H) subdirs
 
 $(obj)envcrc$(SFX):	$(obj)envcrc.o $(obj)crc32.o $(obj)env_embedded.o $(obj)sha1.o
-		$(CC) $(CFLAGS) -o $@ $^
+	$(CC) $(CFLAGS) -o $@ $^
 
 $(obj)ubsha1$(SFX):	$(obj)ubsha1.o $(obj)sha1.o
-		$(CC) $(CFLAGS) -o $@ $^
+	$(CC) $(CFLAGS) -o $@ $^
 
 $(obj)img2srec$(SFX):	$(obj)img2srec.o
-		$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
-		$(STRIP) $@
+	$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
+	$(STRIP) $@
 
-$(obj)mkimage$(SFX):	$(obj)mkimage.o $(obj)crc32.o $(obj)image.o $(obj)md5.o $(obj)sha1.o $(LIBFDT_OBJ_FILES)
-		$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
-		$(STRIP) $@
+$(obj)mkimage$(SFX):	$(obj)mkimage.o $(obj)crc32.o $(obj)image.o $(obj)md5.o \
+			$(obj)sha1.o $(LIBFDT_OBJ_FILES)
+	$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
+	$(STRIP) $@
 
 $(obj)ncb$(SFX):	$(obj)ncb.o
-		$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
-		$(STRIP) $@
+	$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
+	$(STRIP) $@
 
 $(obj)gen_eth_addr$(SFX):	$(obj)gen_eth_addr.o
-		$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
-		$(STRIP) $@
+	$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
+	$(STRIP) $@
 
 $(obj)bmp_logo$(SFX):	$(obj)bmp_logo.o
-		$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
-		$(STRIP) $@
+	$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
+	$(STRIP) $@
 
 $(obj)inca-swap-bytes$(SFX):	$(obj)inca-swap-bytes.o
-		$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
-		$(STRIP) $@
+	$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
+	$(STRIP) $@
 
 $(obj)mpc86x_clk$(SFX):	$(obj)mpc86x_clk.o
-		$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
-		$(STRIP) $@
+	$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
+	$(STRIP) $@
 
 $(obj)bin2header$(SFX): $(obj)bin2header.o
-		$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
-		$(STRIP) $@
+	$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
+	$(STRIP) $@
 
 $(obj)envcrc.o:	$(src)envcrc.c
-		$(CC) -g $(CFLAGS) -c -o $@ $<
+	$(CC) -g $(CFLAGS) -c -o $@ $<
 
 $(obj)ubsha1.o:	$(src)ubsha1.c
-		$(CC) -g $(CFLAGS) -c -o $@ $<
+	$(CC) -g $(CFLAGS) -c -o $@ $<
 
 $(obj)crc32.o:	$(obj)crc32.c
-		$(CC) -g $(CFLAGS) -c -o $@ $<
+	$(CC) -g $(CFLAGS) -c -o $@ $<
 
 $(obj)md5.o:	$(obj)md5.c
-		$(CC) -g $(CFLAGS) -c -o $@ $<
+	$(CC) -g $(CFLAGS) -c -o $@ $<
 
 $(obj)sha1.o:	$(obj)sha1.c
-		$(CC) -g $(CFLAGS) -c -o $@ $<
+	$(CC) -g $(CFLAGS) -c -o $@ $<
 
 $(obj)image.o:	$(obj)image.c
-		$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
+	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
 $(obj)mkimage.o:	$(src)mkimage.c
-		$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
+	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
 $(obj)ncb.o:		$(src)ncb.c
-		$(CC) -g $(CFLAGS) -c -o $@ $<
+	$(CC) -g $(CFLAGS) -c -o $@ $<
 
 $(obj)gen_eth_addr.o:	$(src)gen_eth_addr.c
-		$(CC) -g $(CFLAGS) -c -o $@ $<
+	$(CC) -g $(CFLAGS) -c -o $@ $<
 
 $(obj)inca-swap-bytes.o:	$(src)inca-swap-bytes.c
-		$(CC) -g $(CFLAGS) -c -o $@ $<
+	$(CC) -g $(CFLAGS) -c -o $@ $<
 
 $(obj)mpc86x_clk.o:	$(src)mpc86x_clk.c
-		$(CC) -g $(CFLAGS) -c -o $@ $<
+	$(CC) -g $(CFLAGS) -c -o $@ $<
 
 $(obj)fdt.o:	$(obj)fdt.c
-		$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
+	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
 $(obj)fdt_ro.o:	$(obj)fdt_ro.c
-		$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
+	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
 $(obj)fdt_rw.o:	$(obj)fdt_rw.c
-		$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
+	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
 $(obj)fdt_strerror.o:	$(obj)fdt_strerror.c
-		$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
+	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
 $(obj)fdt_wip.o:	$(obj)fdt_wip.c
-		$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
+	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
 subdirs:
 ifeq ($(TOOLSUBDIRS),)
-		@:
+	@:
 else
-		@for dir in $(TOOLSUBDIRS) ; do \
-		    $(MAKE) \
-			HOSTOS=$(HOSTOS) \
-			HOSTARCH=$(HOSTARCH) \
-			HOST_CFLAGS="$(HOST_CFLAGS)" \
-			HOST_LDFLAGS="$(HOST_LDFLAGS)" \
-			-C $$dir || exit 1 ; \
-		done
+	@for dir in $(TOOLSUBDIRS) ; do \
+	    $(MAKE) \
+		HOSTOS=$(HOSTOS) \
+		HOSTARCH=$(HOSTARCH) \
+		HOST_CFLAGS="$(HOST_CFLAGS)" \
+		HOST_LDFLAGS="$(HOST_LDFLAGS)" \
+		-C $$dir || exit 1 ; \
+	done
 endif
 
 $(obj)env_embedded.c:
-		@rm -f $(obj)env_embedded.c
-		ln -s $(src)../common/env_embedded.c $(obj)env_embedded.c
+	@rm -f $(obj)env_embedded.c
+	ln -s $(src)../common/env_embedded.c $(obj)env_embedded.c
 
 $(obj)env_embedded.o:	$(obj)env_embedded.c
-		$(CC) -g $(HOST_ENVIRO_CFLAGS) $(CPPFLAGS) -c -o $@ $<
+	$(CC) -g $(HOST_ENVIRO_CFLAGS) $(CPPFLAGS) -c -o $@ $<
 
 $(obj)zlib.h:
-		@rm -f $@
-		ln -s $(src)../include/zlib.h $@
+	@rm -f $@
+	ln -s $(src)../include/zlib.h $@
 
 $(obj)crc32.c: $(obj)zlib.h
-		@rm -f $(obj)crc32.c
-		ln -s $(src)../lib_generic/crc32.c $(obj)crc32.c
+	@rm -f $(obj)crc32.c
+	ln -s $(src)../lib_generic/crc32.c $(obj)crc32.c
 
 $(obj)md5.c:
-		@rm -f $(obj)md5.c
-		ln -s $(src)../lib_generic/md5.c $(obj)md5.c
+	@rm -f $(obj)md5.c
+	ln -s $(src)../lib_generic/md5.c $(obj)md5.c
 
 $(obj)sha1.c:
-		@rm -f $(obj)sha1.c
-		ln -s $(src)../lib_generic/sha1.c $(obj)sha1.c
+	@rm -f $(obj)sha1.c
+	ln -s $(src)../lib_generic/sha1.c $(obj)sha1.c
 
 $(obj)image.c:
-		@rm -f $(obj)image.c
-		ln -s $(src)../common/image.c $(obj)image.c
-		if [ ! -f $(obj)mkimage.h ] ; then \
-			ln -s $(src)../tools/mkimage.h $(obj)mkimage.h; \
-		fi
-		if [ ! -f $(obj)fdt_host.h ] ; then \
-			ln -s $(src)../tools/fdt_host.h $(obj)fdt_host.h; \
-		fi
+	@rm -f $(obj)image.c
+	ln -s $(src)../common/image.c $(obj)image.c
+	if [ ! -f $(obj)mkimage.h ] ; then \
+		ln -s $(src)../tools/mkimage.h $(obj)mkimage.h; \
+	fi
+	if [ ! -f $(obj)fdt_host.h ] ; then \
+		ln -s $(src)../tools/fdt_host.h $(obj)fdt_host.h; \
+	fi
 
 $(obj)fdt.c:	$(obj)libfdt_internal.h
-		@rm -f $(obj)fdt.c
-		ln -s $(src)../libfdt/fdt.c $(obj)fdt.c
+	@rm -f $(obj)fdt.c
+	ln -s $(src)../libfdt/fdt.c $(obj)fdt.c
 
 $(obj)fdt_ro.c:	$(obj)libfdt_internal.h
-		@rm -f $(obj)fdt_ro.c
-		ln -s $(src)../libfdt/fdt_ro.c $(obj)fdt_ro.c
+	@rm -f $(obj)fdt_ro.c
+	ln -s $(src)../libfdt/fdt_ro.c $(obj)fdt_ro.c
 
 $(obj)fdt_rw.c:	$(obj)libfdt_internal.h
-		@rm -f $(obj)fdt_rw.c
-		ln -s $(src)../libfdt/fdt_rw.c $(obj)fdt_rw.c
+	@rm -f $(obj)fdt_rw.c
+	ln -s $(src)../libfdt/fdt_rw.c $(obj)fdt_rw.c
 
 $(obj)fdt_strerror.c:	$(obj)libfdt_internal.h
-		@rm -f $(obj)fdt_strerror.c
-		ln -s $(src)../libfdt/fdt_strerror.c $(obj)fdt_strerror.c
+	@rm -f $(obj)fdt_strerror.c
+	ln -s $(src)../libfdt/fdt_strerror.c $(obj)fdt_strerror.c
 
 $(obj)fdt_wip.c:	$(obj)libfdt_internal.h
-		@rm -f $(obj)fdt_wip.c
-		ln -s $(src)../libfdt/fdt_wip.c $(obj)fdt_wip.c
+	@rm -f $(obj)fdt_wip.c
+	ln -s $(src)../libfdt/fdt_wip.c $(obj)fdt_wip.c
 
 $(obj)libfdt_internal.h:
-		@rm -f $(obj)libfdt_internal.h
-		ln -s $(src)../libfdt/libfdt_internal.h $(obj)libfdt_internal.h
+	@rm -f $(obj)libfdt_internal.h
+	ln -s $(src)../libfdt/libfdt_internal.h $(obj)libfdt_internal.h
 
 $(LOGO_H):	$(obj)bmp_logo $(LOGO_BMP)
-		$(obj)./bmp_logo $(LOGO_BMP) >$@
+	$(obj)./bmp_logo $(LOGO_BMP) >$@
 
 #########################################################################
 
Signature · 1 line
1.6.0.2.GIT
#10 lore raw

PATCH v3 10/28 tools/Makefile: Split variable declarations into multiple lines

Split variable declarations into multiple lines and use the standard VAR-y convention. Also move object and binary variable declarations to after config.mk has been included to allow for these lists to utilize the CONFIG_XXX variables.

These changes lay the groundwork for conditional compilation of files in the tools directory.

---
 tools/Makefile |   86 ++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 53 insertions(+), 33 deletions(-)
tools/Makefile +53 -33
index 4219aef..14da78d 100644
@@ -21,36 +21,6 @@
 # MA 02111-1307 USA
 #
 
-BIN_FILES	= img2srec$(SFX) mkimage$(SFX) envcrc$(SFX) ubsha1$(SFX) gen_eth_addr$(SFX) bmp_logo$(SFX)
-
-OBJ_LINKS	= env_embedded.o crc32.o md5.o sha1.o image.o
-OBJ_FILES	= img2srec.o mkimage.o envcrc.o ubsha1.o gen_eth_addr.o bmp_logo.o
-
-ifeq ($(ARCH),mips)
-BIN_FILES	+= inca-swap-bytes$(SFX)
-OBJ_FILES	+= inca-swap-bytes.o
-endif
-
-# Don't build by default
-#ifeq ($(ARCH),ppc)
-#BIN_FILES		+= mpc86x_clk$(SFX)
-#OBJ_FILES	+= mpc86x_clk.o
-#endif
-
-LIBFDT_OBJ_FILES	= $(obj)fdt.o $(obj)fdt_ro.o $(obj)fdt_rw.o $(obj)fdt_strerror.o $(obj)fdt_wip.o
-
-LOGO_H	= $(OBJTREE)/include/bmp_logo.h
-
-ifeq ($(LOGO_BMP),)
-LOGO_BMP= logos/denx.bmp
-endif
-ifeq ($(VENDOR),atmel)
-LOGO_BMP= logos/atmel.bmp
-endif
-
-
-#-------------------------------------------------------------------------
-
 TOOLSUBDIRS =
 
 #
@@ -102,9 +72,59 @@ endif
 #
 include $(TOPDIR)/config.mk
 
+# Generated executable files
+BIN_FILES-y += img2srec$(SFX)
+BIN_FILES-y += mkimage$(SFX)
+BIN_FILES-y += envcrc$(SFX)
+BIN_FILES-y += ubsha1$(SFX)
+BIN_FILES-y += gen_eth_addr$(SFX)
+BIN_FILES-y += bmp_logo$(SFX)
+
+# Source files which are symlinked from elsewhere in U-Boot
+OBJ_LINKS-y += env_embedded.o
+OBJ_LINKS-y += crc32.o md5.o
+OBJ_LINKS-y += sha1.o
+OBJ_LINKS-y += image.o
+
+# Source files located in the tools directory
+OBJ_FILES-y += img2srec.o
+OBJ_FILES-y += mkimage.o
+OBJ_FILES-y += envcrc.o
+OBJ_FILES-y += ubsha1.o
+OBJ_FILES-y += gen_eth_addr.o
+OBJ_FILES-y += bmp_logo.o
+
+ifeq ($(ARCH),mips)
+BIN_FILES-y += inca-swap-bytes$(SFX)
+OBJ_FILES-y += inca-swap-bytes.o
+endif
+
+# Don't build by default
+#ifeq ($(ARCH),ppc)
+#BIN_FILES-y += mpc86x_clk$(SFX)
+#OBJ_FILES-y += mpc86x_clk.o
+#endif
+
+# Flattened device tree objects
+LIBFDT_OBJ_FILES-y += fdt.o
+LIBFDT_OBJ_FILES-y += fdt_ro.o
+LIBFDT_OBJ_FILES-y += fdt_rw.o
+LIBFDT_OBJ_FILES-y += fdt_strerror.o
+LIBFDT_OBJ_FILES-y += fdt_wip.o
+
+LOGO_H = $(OBJTREE)/include/bmp_logo.h
+
+ifeq ($(LOGO_BMP),)
+LOGO_BMP= logos/denx.bmp
+endif
+ifeq ($(VENDOR),atmel)
+LOGO_BMP= logos/atmel.bmp
+endif
+
 # now $(obj) is defined
-SRCS	:= $(addprefix $(obj),$(OBJ_LINKS:.o=.c)) $(OBJ_FILES:.o=.c)
-BINS	:= $(addprefix $(obj),$(BIN_FILES))
+SRCS	:= $(addprefix $(obj),$(OBJ_LINKS-y:.o=.c)) $(OBJ_FILES-y:.o=.c)
+BINS	:= $(addprefix $(obj),$(BIN_FILES-y))
+LIBFDT_OBJS	:= $(addprefix $(obj),$(LIBFDT_OBJ_FILES-y))
 
 #
 # Use native tools and options
@@ -136,7 +156,7 @@ $(obj)img2srec$(SFX):	$(obj)img2srec.o
 	$(STRIP) $@
 
 $(obj)mkimage$(SFX):	$(obj)mkimage.o $(obj)crc32.o $(obj)image.o $(obj)md5.o \
-			$(obj)sha1.o $(LIBFDT_OBJ_FILES)
+			$(obj)sha1.o $(LIBFDT_OBJS)
 	$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
 	$(STRIP) $@
 
Signature · 1 line
1.6.0.2.GIT
#11 lore raw

PATCH v3 11/28 tools/Makefile: Build bmp_logo only when LCD or VIDEO logos are enabled

---
 tools/Makefile |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
tools/Makefile +8 -3
index 14da78d..3c59bba 100644
@@ -78,7 +78,8 @@ BIN_FILES-y += mkimage$(SFX)
 BIN_FILES-y += envcrc$(SFX)
 BIN_FILES-y += ubsha1$(SFX)
 BIN_FILES-y += gen_eth_addr$(SFX)
-BIN_FILES-y += bmp_logo$(SFX)
+BIN_FILES-$(CONFIG_LCD_LOGO) += bmp_logo$(SFX)
+BIN_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo$(SFX)
 
 # Source files which are symlinked from elsewhere in U-Boot
 OBJ_LINKS-y += env_embedded.o
@@ -92,7 +93,8 @@ OBJ_FILES-y += mkimage.o
 OBJ_FILES-y += envcrc.o
 OBJ_FILES-y += ubsha1.o
 OBJ_FILES-y += gen_eth_addr.o
-OBJ_FILES-y += bmp_logo.o
+OBJ_FILES-$(CONFIG_LCD_LOGO) += bmp_logo.o
+OBJ_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo.o
 
 ifeq ($(ARCH),mips)
 BIN_FILES-y += inca-swap-bytes$(SFX)
@@ -112,7 +114,10 @@ LIBFDT_OBJ_FILES-y += fdt_rw.o
 LIBFDT_OBJ_FILES-y += fdt_strerror.o
 LIBFDT_OBJ_FILES-y += fdt_wip.o
 
+# Generated LCD/video logo
 LOGO_H = $(OBJTREE)/include/bmp_logo.h
+LOGO-$(CONFIG_LCD_LOGO) += $(LOGO_H)
+LOGO-$(CONFIG_VIDEO_LOGO) += $(LOGO_H)
 
 ifeq ($(LOGO_BMP),)
 LOGO_BMP= logos/denx.bmp
@@ -143,7 +148,7 @@ CC	   = $(HOSTCC)
 STRIP	   = $(HOSTSTRIP)
 MAKEDEPEND = makedepend
 
-all:	$(obj).depend $(BINS) $(LOGO_H) subdirs
+all:	$(obj).depend $(BINS) $(LOGO-y) subdirs
 
 $(obj)envcrc$(SFX):	$(obj)envcrc.o $(obj)crc32.o $(obj)env_embedded.o $(obj)sha1.o
 	$(CC) $(CFLAGS) -o $@ $^
Signature · 1 line
1.6.0.2.GIT
#12 lore raw

PATCH v3 12/28 tools/Makefile: Make img2srec dependent upon CONFIG_CMD_LOADS

---
 tools/Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
tools/Makefile +2 -2
index 3c59bba..b4bd417 100644
@@ -73,7 +73,7 @@ endif
 include $(TOPDIR)/config.mk
 
 # Generated executable files
-BIN_FILES-y += img2srec$(SFX)
+BIN_FILES-$(CONFIG_CMD_LOADS) += img2srec$(SFX)
 BIN_FILES-y += mkimage$(SFX)
 BIN_FILES-y += envcrc$(SFX)
 BIN_FILES-y += ubsha1$(SFX)
@@ -88,7 +88,7 @@ OBJ_LINKS-y += sha1.o
 OBJ_LINKS-y += image.o
 
 # Source files located in the tools directory
-OBJ_FILES-y += img2srec.o
+OBJ_FILES-$(CONFIG_CMD_LOADS) += img2srec.o
 OBJ_FILES-y += mkimage.o
 OBJ_FILES-y += envcrc.o
 OBJ_FILES-y += ubsha1.o
Signature · 1 line
1.6.0.2.GIT
#13 lore raw

PATCH v3 13/28 tools/Makefile: Make ubsha1 dependent upon CONFIG_SHA1_CHECK_UB_IMG

---
 tools/Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
tools/Makefile +2 -2
index b4bd417..e314091 100644
@@ -76,7 +76,7 @@ include $(TOPDIR)/config.mk
 BIN_FILES-$(CONFIG_CMD_LOADS) += img2srec$(SFX)
 BIN_FILES-y += mkimage$(SFX)
 BIN_FILES-y += envcrc$(SFX)
-BIN_FILES-y += ubsha1$(SFX)
+BIN_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1$(SFX)
 BIN_FILES-y += gen_eth_addr$(SFX)
 BIN_FILES-$(CONFIG_LCD_LOGO) += bmp_logo$(SFX)
 BIN_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo$(SFX)
@@ -91,7 +91,7 @@ OBJ_LINKS-y += image.o
 OBJ_FILES-$(CONFIG_CMD_LOADS) += img2srec.o
 OBJ_FILES-y += mkimage.o
 OBJ_FILES-y += envcrc.o
-OBJ_FILES-y += ubsha1.o
+OBJ_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1.o
 OBJ_FILES-y += gen_eth_addr.o
 OBJ_FILES-$(CONFIG_LCD_LOGO) += bmp_logo.o
 OBJ_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo.o
Signature · 1 line
1.6.0.2.GIT
#14 lore raw

PATCH v3 14/28 tools/Makefile: Make inca-swap-bytes dependent on CONFIG_INCA_IP

---
 tools/Makefile |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
tools/Makefile +2 -5
index e314091..942fae2 100644
@@ -80,6 +80,7 @@ BIN_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1$(SFX)
 BIN_FILES-y += gen_eth_addr$(SFX)
 BIN_FILES-$(CONFIG_LCD_LOGO) += bmp_logo$(SFX)
 BIN_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo$(SFX)
+BIN_FILES-$(CONFIG_INCA_IP) += inca-swap-bytes$(SFX)
 
 # Source files which are symlinked from elsewhere in U-Boot
 OBJ_LINKS-y += env_embedded.o
@@ -95,11 +96,7 @@ OBJ_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1.o
 OBJ_FILES-y += gen_eth_addr.o
 OBJ_FILES-$(CONFIG_LCD_LOGO) += bmp_logo.o
 OBJ_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo.o
-
-ifeq ($(ARCH),mips)
-BIN_FILES-y += inca-swap-bytes$(SFX)
-OBJ_FILES-y += inca-swap-bytes.o
-endif
+OBJ_FILES-$(CONFIG_INCA_IP) += inca-swap-bytes.o
 
 # Don't build by default
 #ifeq ($(ARCH),ppc)
Signature · 1 line
1.6.0.2.GIT
#15 lore raw

PATCH v3 15/28 tools/Makefile: Make envcrc dependent upon CONFIG_ENV_IS_EMBEDDED

---
 tools/Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
tools/Makefile +2 -2
index 942fae2..ec35f18 100644
@@ -75,7 +75,7 @@ include $(TOPDIR)/config.mk
 # Generated executable files
 BIN_FILES-$(CONFIG_CMD_LOADS) += img2srec$(SFX)
 BIN_FILES-y += mkimage$(SFX)
-BIN_FILES-y += envcrc$(SFX)
+BIN_FILES-$(CONFIG_ENV_IS_EMBEDDED) += envcrc$(SFX)
 BIN_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1$(SFX)
 BIN_FILES-y += gen_eth_addr$(SFX)
 BIN_FILES-$(CONFIG_LCD_LOGO) += bmp_logo$(SFX)
@@ -91,7 +91,7 @@ OBJ_LINKS-y += image.o
 # Source files located in the tools directory
 OBJ_FILES-$(CONFIG_CMD_LOADS) += img2srec.o
 OBJ_FILES-y += mkimage.o
-OBJ_FILES-y += envcrc.o
+OBJ_FILES-$(CONFIG_ENV_IS_EMBEDDED) += envcrc.o
 OBJ_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1.o
 OBJ_FILES-y += gen_eth_addr.o
 OBJ_FILES-$(CONFIG_LCD_LOGO) += bmp_logo.o
Signature · 1 line
1.6.0.2.GIT
#16 lore raw

PATCH v3 16/28 tools/Makefile: Make gen_eth_addr dependent upon CONFIG_CMD_NET

---
 tools/Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
tools/Makefile +2 -2
index ec35f18..f648d34 100644
@@ -77,7 +77,7 @@ BIN_FILES-$(CONFIG_CMD_LOADS) += img2srec$(SFX)
 BIN_FILES-y += mkimage$(SFX)
 BIN_FILES-$(CONFIG_ENV_IS_EMBEDDED) += envcrc$(SFX)
 BIN_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1$(SFX)
-BIN_FILES-y += gen_eth_addr$(SFX)
+BIN_FILES-$(CONFIG_CMD_NET) += gen_eth_addr$(SFX)
 BIN_FILES-$(CONFIG_LCD_LOGO) += bmp_logo$(SFX)
 BIN_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo$(SFX)
 BIN_FILES-$(CONFIG_INCA_IP) += inca-swap-bytes$(SFX)
@@ -93,7 +93,7 @@ OBJ_FILES-$(CONFIG_CMD_LOADS) += img2srec.o
 OBJ_FILES-y += mkimage.o
 OBJ_FILES-$(CONFIG_ENV_IS_EMBEDDED) += envcrc.o
 OBJ_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1.o
-OBJ_FILES-y += gen_eth_addr.o
+OBJ_FILES-$(CONFIG_CMD_NET) += gen_eth_addr.o
 OBJ_FILES-$(CONFIG_LCD_LOGO) += bmp_logo.o
 OBJ_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo.o
 OBJ_FILES-$(CONFIG_INCA_IP) += inca-swap-bytes.o
Signature · 1 line
1.6.0.2.GIT
#17 lore raw

PATCH v3 17/28 tools/Makefile: Compile ncb when CONFIG_NETCONSOLE

Also conditionally add ncb.o to OBJ_FILES list

---
 doc/README.NetConsole |    6 ++----
 tools/Makefile        |    2 ++
 2 files changed, 4 insertions(+), 4 deletions(-)
doc/README.NetConsole +2 -4
index 94c8816..639cc12 100644
@@ -55,10 +55,8 @@ Again, this script takes exactly one argument, which is interpreted
 as the target IP address (or host name, assuming DNS is working). The
 script can be interrupted by pressing ^T (CTRL-T).
 
-The 'ncb' tool can be found in the tools directory; it will not be
-built by default so you will ither have to adjust the Makefile or
-build it manually.
-
+The 'ncb' tool can be found in the tools directory; it will be built
+when compiling for a board which has CONFIG_NETCONSOLE defined.
 
 For Linux, the network-based console needs special configuration.
 Minimally, the host IP address needs to be specified. This can be
tools/Makefile +2 -0
index f648d34..35e694d 100644
@@ -81,6 +81,7 @@ BIN_FILES-$(CONFIG_CMD_NET) += gen_eth_addr$(SFX)
 BIN_FILES-$(CONFIG_LCD_LOGO) += bmp_logo$(SFX)
 BIN_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo$(SFX)
 BIN_FILES-$(CONFIG_INCA_IP) += inca-swap-bytes$(SFX)
+BIN_FILES-$(CONFIG_NETCONSOLE) += ncb$(SFX)
 
 # Source files which are symlinked from elsewhere in U-Boot
 OBJ_LINKS-y += env_embedded.o
@@ -97,6 +98,7 @@ OBJ_FILES-$(CONFIG_CMD_NET) += gen_eth_addr.o
 OBJ_FILES-$(CONFIG_LCD_LOGO) += bmp_logo.o
 OBJ_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo.o
 OBJ_FILES-$(CONFIG_INCA_IP) += inca-swap-bytes.o
+OBJ_FILES-$(CONFIG_NETCONSOLE) += ncb.o
 
 # Don't build by default
 #ifeq ($(ARCH),ppc)
Signature · 1 line
1.6.0.2.GIT
#18 lore raw

PATCH v3 18/28 tools/Makefile: Add tools/ to the include search path

This change makes the process of symlinking mkimage.h and fdt_host.h unnecessary

---
 tools/Makefile |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
tools/Makefile +1 -6
index 35e694d..e1f262b 100644
@@ -136,6 +136,7 @@ LIBFDT_OBJS	:= $(addprefix $(obj),$(LIBFDT_OBJ_FILES-y))
 CPPFLAGS   = -idirafter $(SRCTREE)/include \
 		-idirafter $(OBJTREE)/include2 \
 		-idirafter $(OBJTREE)/include \
+		-I $(SRCTREE)/tools \
 		-DTEXT_BASE=$(TEXT_BASE) -DUSE_HOSTCC
 CFLAGS     = $(HOST_CFLAGS) $(CPPFLAGS) -O
 
@@ -276,12 +277,6 @@ $(obj)sha1.c:
 $(obj)image.c:
 	@rm -f $(obj)image.c
 	ln -s $(src)../common/image.c $(obj)image.c
-	if [ ! -f $(obj)mkimage.h ] ; then \
-		ln -s $(src)../tools/mkimage.h $(obj)mkimage.h; \
-	fi
-	if [ ! -f $(obj)fdt_host.h ] ; then \
-		ln -s $(src)../tools/fdt_host.h $(obj)fdt_host.h; \
-	fi
 
 $(obj)fdt.c:	$(obj)libfdt_internal.h
 	@rm -f $(obj)fdt.c
Signature · 1 line
1.6.0.2.GIT
#19 lore raw

PATCH v3 19/28 tools: Remove unecessary symlinking of zlib.h

crc32.c uses the zlib.h header in include/u-boot/zlib.h. The symlink was previously necessary to give U-Boot's version of zlib.h precedence over the host computer's version of zlib.h.

---
 Makefile         |    2 +-
 tools/.gitignore |    1 -
 tools/Makefile   |    6 +-----
 3 files changed, 2 insertions(+), 7 deletions(-)
Makefile +1 -1
index b68de1c..8179bcb 100644
@@ -3482,7 +3482,7 @@ clobber:	clean
 		$(obj)cscope.* $(obj)*.*~
 	@rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL)
 	@rm -f $(obj)tools/{crc32.c,env_embedded.c,env/crc32.c,md5.c,sha1.c,inca-swap-bytes}
-	@rm -f $(obj)tools/{image.c,fdt.c,fdt_ro.c,fdt_rw.c,fdt_strerror.c,zlib.h}
+	@rm -f $(obj)tools/{image.c,fdt.c,fdt_ro.c,fdt_rw.c,fdt_strerror.c}
 	@rm -f $(obj)tools/{fdt_wip.c,libfdt_internal.h}
 	@rm -f $(obj)cpu/mpc824x/bedbug_603e.c
 	@rm -f $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm
tools/.gitignore +0 -1
index 377ca9a..c2ac0ae 100644
@@ -18,4 +18,3 @@
 /fdt_strerror.c
 /fdt_wip.c
 /libfdt_internal.h
-/zlib.h
tools/Makefile +1 -5
index e1f262b..037f61b 100644
@@ -258,11 +258,7 @@ $(obj)env_embedded.c:
 $(obj)env_embedded.o:	$(obj)env_embedded.c
 	$(CC) -g $(HOST_ENVIRO_CFLAGS) $(CPPFLAGS) -c -o $@ $<
 
-$(obj)zlib.h:
-	@rm -f $@
-	ln -s $(src)../include/zlib.h $@
-
-$(obj)crc32.c: $(obj)zlib.h
+$(obj)crc32.c: $(SRCTREE)/include/u-boot/zlib.h
 	@rm -f $(obj)crc32.c
 	ln -s $(src)../lib_generic/crc32.c $(obj)crc32.c
 
Signature · 1 line
1.6.0.2.GIT
#20 lore raw

PATCH v3 20/28 tools/Makefile: Add libfdt/ to the include search path

This change makes the process of symlinking libfdt_internal.h unnecessary

---
 Makefile         |    2 +-
 tools/.gitignore |    1 -
 tools/Makefile   |   15 ++++++---------
 3 files changed, 7 insertions(+), 11 deletions(-)
Makefile +1 -1
index 8179bcb..4d6b04c 100644
@@ -3483,7 +3483,7 @@ clobber:	clean
 	@rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL)
 	@rm -f $(obj)tools/{crc32.c,env_embedded.c,env/crc32.c,md5.c,sha1.c,inca-swap-bytes}
 	@rm -f $(obj)tools/{image.c,fdt.c,fdt_ro.c,fdt_rw.c,fdt_strerror.c}
-	@rm -f $(obj)tools/{fdt_wip.c,libfdt_internal.h}
+	@rm -f $(obj)tools/{fdt_wip.c}
 	@rm -f $(obj)cpu/mpc824x/bedbug_603e.c
 	@rm -f $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm
 	@[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name "*" -type l -print | xargs rm -f
tools/.gitignore +0 -1
index c2ac0ae..ea39027 100644
@@ -17,4 +17,3 @@
 /fdt_rw.c
 /fdt_strerror.c
 /fdt_wip.c
-/libfdt_internal.h
tools/Makefile +6 -9
index 037f61b..294d388 100644
@@ -136,6 +136,7 @@ LIBFDT_OBJS	:= $(addprefix $(obj),$(LIBFDT_OBJ_FILES-y))
 CPPFLAGS   = -idirafter $(SRCTREE)/include \
 		-idirafter $(OBJTREE)/include2 \
 		-idirafter $(OBJTREE)/include \
+	        -I $(SRCTREE)/libfdt \
 		-I $(SRCTREE)/tools \
 		-DTEXT_BASE=$(TEXT_BASE) -DUSE_HOSTCC
 CFLAGS     = $(HOST_CFLAGS) $(CPPFLAGS) -O
@@ -274,30 +275,26 @@ $(obj)image.c:
 	@rm -f $(obj)image.c
 	ln -s $(src)../common/image.c $(obj)image.c
 
-$(obj)fdt.c:	$(obj)libfdt_internal.h
+$(obj)fdt.c: $(SRCTREE)/libfdt/libfdt_internal.h
 	@rm -f $(obj)fdt.c
 	ln -s $(src)../libfdt/fdt.c $(obj)fdt.c
 
-$(obj)fdt_ro.c:	$(obj)libfdt_internal.h
+$(obj)fdt_ro.c: $(SRCTREE)/libfdt/libfdt_internal.h
 	@rm -f $(obj)fdt_ro.c
 	ln -s $(src)../libfdt/fdt_ro.c $(obj)fdt_ro.c
 
-$(obj)fdt_rw.c:	$(obj)libfdt_internal.h
+$(obj)fdt_rw.c: $(SRCTREE)/libfdt/libfdt_internal.h
 	@rm -f $(obj)fdt_rw.c
 	ln -s $(src)../libfdt/fdt_rw.c $(obj)fdt_rw.c
 
-$(obj)fdt_strerror.c:	$(obj)libfdt_internal.h
+$(obj)fdt_strerror.c: $(SRCTREE)/libfdt/libfdt_internal.h
 	@rm -f $(obj)fdt_strerror.c
 	ln -s $(src)../libfdt/fdt_strerror.c $(obj)fdt_strerror.c
 
-$(obj)fdt_wip.c:	$(obj)libfdt_internal.h
+$(obj)fdt_wip.c: $(SRCTREE)/libfdt/libfdt_internal.h
 	@rm -f $(obj)fdt_wip.c
 	ln -s $(src)../libfdt/fdt_wip.c $(obj)fdt_wip.c
 
-$(obj)libfdt_internal.h:
-	@rm -f $(obj)libfdt_internal.h
-	ln -s $(src)../libfdt/libfdt_internal.h $(obj)libfdt_internal.h
-
 $(LOGO_H):	$(obj)bmp_logo $(LOGO_BMP)
 	$(obj)./bmp_logo $(LOGO_BMP) >$@
 
Signature · 1 line
1.6.0.2.GIT
#21 lore raw

PATCH v3 21/28 tools/Makefile: Remove symlinks for fdt targets

---
 Makefile         |    3 +--
 tools/.gitignore |    5 -----
 tools/Makefile   |   32 +++++++-------------------------
 3 files changed, 8 insertions(+), 32 deletions(-)
Makefile +1 -2
index 4d6b04c..ef95339 100644
@@ -3482,8 +3482,7 @@ clobber:	clean
 		$(obj)cscope.* $(obj)*.*~
 	@rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL)
 	@rm -f $(obj)tools/{crc32.c,env_embedded.c,env/crc32.c,md5.c,sha1.c,inca-swap-bytes}
-	@rm -f $(obj)tools/{image.c,fdt.c,fdt_ro.c,fdt_rw.c,fdt_strerror.c}
-	@rm -f $(obj)tools/{fdt_wip.c}
+	@rm -f $(obj)tools/{image.c}
 	@rm -f $(obj)cpu/mpc824x/bedbug_603e.c
 	@rm -f $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm
 	@[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name "*" -type l -print | xargs rm -f
tools/.gitignore +0 -5
index ea39027..7614766 100644
@@ -12,8 +12,3 @@
 /ubsha1
 /inca-swap-bytes
 /image.c
-/fdt.c
-/fdt_ro.c
-/fdt_rw.c
-/fdt_strerror.c
-/fdt_wip.c
tools/Makefile +7 -25
index 294d388..ef51abc 100644
@@ -22,6 +22,7 @@
 #
 
 TOOLSUBDIRS =
+LIBFDT_DIR = $(SRCTREE)/libfdt/
 
 #
 # Mac OS X / Darwin's C preprocessor is Apple specific.  It
@@ -223,19 +224,20 @@ $(obj)inca-swap-bytes.o:	$(src)inca-swap-bytes.c
 $(obj)mpc86x_clk.o:	$(src)mpc86x_clk.c
 	$(CC) -g $(CFLAGS) -c -o $@ $<
 
-$(obj)fdt.o:	$(obj)fdt.c
+$(obj)fdt.o:	$(LIBFDT_DIR)fdt.c $(SRCTREE)/libfdt/libfdt_internal.h
 	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
-$(obj)fdt_ro.o:	$(obj)fdt_ro.c
+$(obj)fdt_ro.o:	$(LIBFDT_DIR)fdt_ro.c $(SRCTREE)/libfdt/libfdt_internal.h
 	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
-$(obj)fdt_rw.o:	$(obj)fdt_rw.c
+$(obj)fdt_rw.o:	$(LIBFDT_DIR)fdt_rw.c $(SRCTREE)/libfdt/libfdt_internal.h
 	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
-$(obj)fdt_strerror.o:	$(obj)fdt_strerror.c
+$(obj)fdt_strerror.o: $(LIBFDT_DIR)fdt_strerror.c \
+			$(SRCTREE)/libfdt/libfdt_internal.h
 	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
-$(obj)fdt_wip.o:	$(obj)fdt_wip.c
+$(obj)fdt_wip.o: $(LIBFDT_DIR)fdt_wip.c $(SRCTREE)/libfdt/libfdt_internal.h
 	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
 subdirs:
@@ -275,26 +277,6 @@ $(obj)image.c:
 	@rm -f $(obj)image.c
 	ln -s $(src)../common/image.c $(obj)image.c
 
-$(obj)fdt.c: $(SRCTREE)/libfdt/libfdt_internal.h
-	@rm -f $(obj)fdt.c
-	ln -s $(src)../libfdt/fdt.c $(obj)fdt.c
-
-$(obj)fdt_ro.c: $(SRCTREE)/libfdt/libfdt_internal.h
-	@rm -f $(obj)fdt_ro.c
-	ln -s $(src)../libfdt/fdt_ro.c $(obj)fdt_ro.c
-
-$(obj)fdt_rw.c: $(SRCTREE)/libfdt/libfdt_internal.h
-	@rm -f $(obj)fdt_rw.c
-	ln -s $(src)../libfdt/fdt_rw.c $(obj)fdt_rw.c
-
-$(obj)fdt_strerror.c: $(SRCTREE)/libfdt/libfdt_internal.h
-	@rm -f $(obj)fdt_strerror.c
-	ln -s $(src)../libfdt/fdt_strerror.c $(obj)fdt_strerror.c
-
-$(obj)fdt_wip.c: $(SRCTREE)/libfdt/libfdt_internal.h
-	@rm -f $(obj)fdt_wip.c
-	ln -s $(src)../libfdt/fdt_wip.c $(obj)fdt_wip.c
-
 $(LOGO_H):	$(obj)bmp_logo $(LOGO_BMP)
 	$(obj)./bmp_logo $(LOGO_BMP) >$@
 
Signature · 1 line
1.6.0.2.GIT
#22 lore raw

PATCH v3 22/28 tools/Makefile: Dynamically generate libfdt object dependencies

Add the libfdt files to the SRCS variable so that they have their dependencies automatically generated

---
 tools/Makefile |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
tools/Makefile +6 -7
index ef51abc..b1680ad 100644
@@ -22,7 +22,6 @@
 #
 
 TOOLSUBDIRS =
-LIBFDT_DIR = $(SRCTREE)/libfdt/
 
 #
 # Mac OS X / Darwin's C preprocessor is Apple specific.  It
@@ -128,6 +127,7 @@ endif
 
 # now $(obj) is defined
 SRCS	:= $(addprefix $(obj),$(OBJ_LINKS-y:.o=.c)) $(OBJ_FILES-y:.o=.c)
+SRCS	+= $(addprefix $(SRCTREE)/libfdt/,$(LIBFDT_OBJ_FILES-y:.o=.c))
 BINS	:= $(addprefix $(obj),$(BIN_FILES-y))
 LIBFDT_OBJS	:= $(addprefix $(obj),$(LIBFDT_OBJ_FILES-y))
 
@@ -224,20 +224,19 @@ $(obj)inca-swap-bytes.o:	$(src)inca-swap-bytes.c
 $(obj)mpc86x_clk.o:	$(src)mpc86x_clk.c
 	$(CC) -g $(CFLAGS) -c -o $@ $<
 
-$(obj)fdt.o:	$(LIBFDT_DIR)fdt.c $(SRCTREE)/libfdt/libfdt_internal.h
+$(obj)fdt.o:
 	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
-$(obj)fdt_ro.o:	$(LIBFDT_DIR)fdt_ro.c $(SRCTREE)/libfdt/libfdt_internal.h
+$(obj)fdt_ro.o:
 	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
-$(obj)fdt_rw.o:	$(LIBFDT_DIR)fdt_rw.c $(SRCTREE)/libfdt/libfdt_internal.h
+$(obj)fdt_rw.o:
 	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
-$(obj)fdt_strerror.o: $(LIBFDT_DIR)fdt_strerror.c \
-			$(SRCTREE)/libfdt/libfdt_internal.h
+$(obj)fdt_strerror.o:
 	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
-$(obj)fdt_wip.o: $(LIBFDT_DIR)fdt_wip.c $(SRCTREE)/libfdt/libfdt_internal.h
+$(obj)fdt_wip.o:
 	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
 subdirs:
Signature · 1 line
1.6.0.2.GIT
#23 lore raw

PATCH v3 23/28 tools/Makefile: Remove symlinks for remaining source files

---
 Makefile         |    3 +--
 tools/.gitignore |    5 -----
 tools/Makefile   |   44 +++++++++++++-------------------------------
 3 files changed, 14 insertions(+), 38 deletions(-)
Makefile +1 -2
index ef95339..dfcb71b 100644
@@ -3481,8 +3481,7 @@ clobber:	clean
 	@rm -f $(OBJS) $(obj)*.bak $(obj)ctags $(obj)etags $(obj)TAGS \
 		$(obj)cscope.* $(obj)*.*~
 	@rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL)
-	@rm -f $(obj)tools/{crc32.c,env_embedded.c,env/crc32.c,md5.c,sha1.c,inca-swap-bytes}
-	@rm -f $(obj)tools/{image.c}
+	@rm -f $(obj)tools/{env/crc32.c,inca-swap-bytes}
 	@rm -f $(obj)cpu/mpc824x/bedbug_603e.c
 	@rm -f $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm
 	@[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name "*" -type l -print | xargs rm -f
tools/.gitignore +0 -5
index 7614766..3a4136b 100644
@@ -1,14 +1,9 @@
 /bmp_logo
-/crc32.c
 /envcrc
-/env_embedded.c
 /gen_eth_addr
 /img2srec
-/md5.c
 /mkimage
 /mpc86x_clk
 /ncp
-/sha1.c
 /ubsha1
 /inca-swap-bytes
-/image.c
tools/Makefile +13 -31

76 lines not on this page · raw message

Signature · 1 line
1.6.0.2.GIT
#24 lore raw

PATCH v3 24/28 tools/Makefile: Use auto-generated object file dependencies

Files in the SRCS variable have their dependencies automatically generated so remove duplicate explicit dependencies

---
 tools/Makefile |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)
tools/Makefile +12 -12
index 6ef9099..b7a30b2 100644
@@ -193,37 +193,37 @@ $(obj)bin2header$(SFX): $(obj)bin2header.o
 	$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
 	$(STRIP) $@
 
-$(obj)envcrc.o:	$(src)envcrc.c
+$(obj)envcrc.o:
 	$(CC) -g $(CFLAGS) -c -o $@ $<
 
-$(obj)ubsha1.o:	$(src)ubsha1.c
+$(obj)ubsha1.o:
 	$(CC) -g $(CFLAGS) -c -o $@ $<
 
-$(obj)crc32.o: $(SRCTREE)/lib_generic/crc32.c
+$(obj)crc32.o:
 	$(CC) -g $(CFLAGS) -c -o $@ $<
 
-$(obj)md5.o: $(SRCTREE)/lib_generic/md5.c
+$(obj)md5.o:
 	$(CC) -g $(CFLAGS) -c -o $@ $<
 
-$(obj)sha1.o: $(SRCTREE)/lib_gneric/sha1.c
+$(obj)sha1.o:
 	$(CC) -g $(CFLAGS) -c -o $@ $<
 
-$(obj)image.o: $(SRCTREE)/common/image.c
+$(obj)image.o:
 	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
-$(obj)mkimage.o:	$(src)mkimage.c
+$(obj)mkimage.o:
 	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
-$(obj)ncb.o:		$(src)ncb.c
+$(obj)ncb.o:
 	$(CC) -g $(CFLAGS) -c -o $@ $<
 
-$(obj)gen_eth_addr.o:	$(src)gen_eth_addr.c
+$(obj)gen_eth_addr.o:
 	$(CC) -g $(CFLAGS) -c -o $@ $<
 
-$(obj)inca-swap-bytes.o:	$(src)inca-swap-bytes.c
+$(obj)inca-swap-bytes.o:
 	$(CC) -g $(CFLAGS) -c -o $@ $<
 
-$(obj)mpc86x_clk.o:	$(src)mpc86x_clk.c
+$(obj)mpc86x_clk.o:
 	$(CC) -g $(CFLAGS) -c -o $@ $<
 
 $(obj)fdt.o:
@@ -255,7 +255,7 @@ else
 	done
 endif
 
-$(obj)env_embedded.o: $(SRCTREE)/common/env_embedded.c
+$(obj)env_embedded.o:
 	$(CC) -g $(HOST_ENVIRO_CFLAGS) $(CPPFLAGS) -c -o $@ $<
 
 $(LOGO_H):	$(obj)bmp_logo $(LOGO_BMP)
Signature · 1 line
1.6.0.2.GIT
#25 lore raw

PATCH v3 25/28 tools/Makefile: Create generic build rules

Create a few generic build rules to replace the current method which has 1 build target for each file

---
 tools/Makefile |   55 +++++++++----------------------------------------------
 1 files changed, 9 insertions(+), 46 deletions(-)
tools/Makefile +9 -46
index b7a30b2..d6d366d 100644
@@ -38,13 +38,11 @@ TOOLSUBDIRS =
 ifeq ($(HOSTOS)-$(HOSTARCH),darwin-ppc)
 HOST_CFLAGS = -traditional-cpp -Wall
 HOST_LDFLAGS =-multiply_defined suppress
-HOST_ENVIRO_CFLAGS =
 
 else
 ifeq ($(HOSTOS)-$(HOSTARCH),netbsd-ppc)
 HOST_CFLAGS = -Wall -pedantic
 HOST_LDFLAGS =
-HOST_ENVIRO_CFLAGS =
 
 #
 # Everyone else
@@ -52,7 +50,6 @@ HOST_ENVIRO_CFLAGS =
 else
 HOST_CFLAGS = -Wall -pedantic
 HOST_LDFLAGS =
-HOST_ENVIRO_CFLAGS =
 endif
 endif
 
@@ -128,7 +125,7 @@ endif
 
 # now $(obj) is defined
 SRCS	+= $(addprefix $(SRCTREE)/,$(EXT_OBJ_FILES-y:.o=.c))
-SRCS	+= $(OBJ_FILES-y:.o=.c)
+SRCS	+= $(addprefix $(SRCTREE)/tools/,$(OBJ_FILES-y:.o=.c))
 SRCS	+= $(addprefix $(SRCTREE)/libfdt/,$(LIBFDT_OBJ_FILES-y:.o=.c))
 BINS	:= $(addprefix $(obj),$(BIN_FILES-y))
 LIBFDT_OBJS	:= $(addprefix $(obj),$(LIBFDT_OBJ_FILES-y))
@@ -193,52 +190,21 @@ $(obj)bin2header$(SFX): $(obj)bin2header.o
 	$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
 	$(STRIP) $@
 
-$(obj)envcrc.o:
-	$(CC) -g $(CFLAGS) -c -o $@ $<
-
-$(obj)ubsha1.o:
-	$(CC) -g $(CFLAGS) -c -o $@ $<
-
-$(obj)crc32.o:
-	$(CC) -g $(CFLAGS) -c -o $@ $<
-
-$(obj)md5.o:
-	$(CC) -g $(CFLAGS) -c -o $@ $<
-
-$(obj)sha1.o:
-	$(CC) -g $(CFLAGS) -c -o $@ $<
-
-$(obj)image.o:
+# image.c and mkimage.c require FIT_CFLAGS instead of standard CFLAGS
+$(obj)image.o: $(SRCTREE)/tools/image.c
 	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
-$(obj)mkimage.o:
+$(obj)mkimage.o: $(SRCTREE)/tools/mkimage.c
 	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
-$(obj)ncb.o:
-	$(CC) -g $(CFLAGS) -c -o $@ $<
-
-$(obj)gen_eth_addr.o:
-	$(CC) -g $(CFLAGS) -c -o $@ $<
-
-$(obj)inca-swap-bytes.o:
-	$(CC) -g $(CFLAGS) -c -o $@ $<
-
-$(obj)mpc86x_clk.o:
-	$(CC) -g $(CFLAGS) -c -o $@ $<
-
-$(obj)fdt.o:
-	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
-
-$(obj)fdt_ro.o:
-	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
-
-$(obj)fdt_rw.o:
+# Some of the tool objects need to be accessed from outside the tools directory
+$(obj)%.o: $(SRCTREE)/common/%.c
 	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
-$(obj)fdt_strerror.o:
-	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
+$(obj)%.o: $(SRCTREE)/lib_generic/%.c
+	$(CC) -g $(CFLAGS) -c -o $@ $<
 
-$(obj)fdt_wip.o:
+$(LIBFDT_OBJS):
 	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
 subdirs:
@@ -255,9 +221,6 @@ else
 	done
 endif
 
-$(obj)env_embedded.o:
-	$(CC) -g $(HOST_ENVIRO_CFLAGS) $(CPPFLAGS) -c -o $@ $<
-
 $(LOGO_H):	$(obj)bmp_logo $(LOGO_BMP)
 	$(obj)./bmp_logo $(LOGO_BMP) >$@
 
Signature · 1 line
1.6.0.2.GIT
#26 lore raw

PATCH v3 26/28 tools/Makefile: Simplify HOST_CFLAGS/HOST_LDFLAGS generation

---
 tools/Makefile |   17 +++++------------
 1 files changed, 5 insertions(+), 12 deletions(-)
tools/Makefile +5 -12
index d6d366d..9fe5b1a 100644
@@ -35,22 +35,15 @@ TOOLSUBDIRS =
 # multiple symbol definitions are treated as errors, hence the
 # -multiply_defined suppress option to turn off this error.
 #
-ifeq ($(HOSTOS)-$(HOSTARCH),darwin-ppc)
-HOST_CFLAGS = -traditional-cpp -Wall
-HOST_LDFLAGS =-multiply_defined suppress
 
-else
-ifeq ($(HOSTOS)-$(HOSTARCH),netbsd-ppc)
-HOST_CFLAGS = -Wall -pedantic
+HOST_CFLAGS = -Wall
 HOST_LDFLAGS =
 
-#
-# Everyone else
-#
+ifeq ($(HOSTOS)-$(HOSTARCH),darwin-ppc)
+HOST_CFLAGS += -traditional-cpp
+HOST_LDFLAGS += -multiply_defined suppress
 else
-HOST_CFLAGS = -Wall -pedantic
-HOST_LDFLAGS =
-endif
+HOST_CFLAGS += -pedantic
 endif
 
 #
Signature · 1 line
1.6.0.2.GIT
#27 lore raw

PATCH v3 27/28 Add support for building native win32 tools

Add support for compiling the host tools in the tools directory using the MinGW toolchain. This produces executables which can be used on standard Windows computers without requiring cygwin.

One must specify the MinGW compiler and strip utilities as if they were the host toolchain in order to build win32 executables, eg:

make HOSTCC=i586-mingw32msvc-gcc HOSTSTRIP=i586-mingw32msvc-strip tools

---
 README                |   10 ++++++
 include/image.h       |    2 +
 include/libfdt_env.h  |   12 +++++++
 tools/Makefile        |   23 ++++++++++----
 tools/mingw_support.c |   79 +++++++++++++++++++++++++++++++++++++++++++++++++
 tools/mingw_support.h |   51 +++++++++++++++++++++++++++++++
 tools/mkimage.h       |    5 +++
 tools/os_support.c    |   24 +++++++++++++++
 tools/os_support.h    |   29 ++++++++++++++++++
 tools/ubsha1.c        |    3 ++
 10 files changed, 231 insertions(+), 7 deletions(-)
 create mode 100644 tools/mingw_support.c
 create mode 100644 tools/mingw_support.h
 create mode 100644 tools/os_support.c
 create mode 100644 tools/os_support.h
README +10 -0
index 43fb1c0..3fb2814 100644
@@ -2710,6 +2710,16 @@ necessary. For example using the ELDK on a 4xx CPU, please enter:
 	$ CROSS_COMPILE=ppc_4xx-
 	$ export CROSS_COMPILE
 
+Note: If you wish to generate Windows versions of the utilities in
+      the tools directory you can use the MinGW toolchain
+      (http://www.mingw.org).  Set your HOST tools to the MinGW
+      toolchain and execute 'make tools'.  For example:
+
+       $ make HOSTCC=i586-mingw32msvc-gcc HOSTSTRIP=i586-mingw32msvc-strip tools
+
+      Binaries such as tools/mkimage.exe will be created which can
+      be executed on computers running Windows.
+
 U-Boot is intended to be simple to build. After installing the
 sources you must configure U-Boot for one specific board type. This
 is done by typing:
include/image.h +2 -0
index 74a1240..f183757 100644
@@ -34,7 +34,9 @@
 #define __IMAGE_H__
 
 #if USE_HOSTCC
+#ifndef __MINGW32__
 #include <endian.h>
+#endif
 
 /* new uImage format support enabled on host */
 #define CONFIG_FIT		1
include/libfdt_env.h +12 -0
index ea474a5..1c67015 100644
@@ -24,8 +24,13 @@
 #ifdef USE_HOSTCC
 #include <stdint.h>
 #include <string.h>
+#ifdef __MINGW32__
+#include <linux/types.h>
+#include <linux/byteorder/swab.h>
+#else
 #include <endian.h>
 #include <byteswap.h>
+#endif /* __MINGW32__ */
 #else
 #include <linux/string.h>
 #include <linux/types.h>
@@ -36,10 +41,17 @@
 extern struct fdt_header *working_fdt;  /* Pointer to the working fdt */
 
 #if __BYTE_ORDER == __LITTLE_ENDIAN
+#ifdef __MINGW32__
+#define fdt32_to_cpu(x)		___swab32(x)
+#define cpu_to_fdt32(x)		___swab32(x)
+#define fdt64_to_cpu(x)		___swab64(x)
+#define cpu_to_fdt64(x)		___swab64(x)
+#else
 #define fdt32_to_cpu(x)		bswap_32(x)
 #define cpu_to_fdt32(x)		bswap_32(x)
 #define fdt64_to_cpu(x)		bswap_64(x)
 #define cpu_to_fdt64(x)		bswap_64(x)
+#endif
 #else
 #define fdt32_to_cpu(x)		(x)
 #define cpu_to_fdt32(x)		(x)
tools/Makefile +16 -7
index 9fe5b1a..122e5bb 100644
@@ -46,12 +46,15 @@ else
 HOST_CFLAGS += -pedantic
 endif
 
+ifeq ($(HOSTOS),cygwin)
+HOST_CFLAGS += -ansi
+endif
+
 #
-# Cygwin needs .exe files :-(
+# toolchains targeting win32 generate .exe files
 #
-ifeq ($(HOSTOS),cygwin)
+ifneq (,$(findstring WIN32 ,$(shell $(HOSTCC) -E -dM -xc /dev/null)))
 SFX = .exe
-HOST_CFLAGS += -ansi
 else
 SFX =
 endif
@@ -90,6 +93,7 @@ OBJ_FILES-$(CONFIG_LCD_LOGO) += bmp_logo.o
 OBJ_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo.o
 OBJ_FILES-$(CONFIG_INCA_IP) += inca-swap-bytes.o
 OBJ_FILES-$(CONFIG_NETCONSOLE) += ncb.o
+OBJ_FILES-y += os_support.o
 
 # Don't build by default
 #ifeq ($(ARCH),ppc)
@@ -125,13 +129,15 @@ LIBFDT_OBJS	:= $(addprefix $(obj),$(LIBFDT_OBJ_FILES-y))
 
 #
 # Use native tools and options
+# Define __KERNEL_STRICT_NAMES to prevent typedef overlaps
 #
 CPPFLAGS   = -idirafter $(SRCTREE)/include \
 		-idirafter $(OBJTREE)/include2 \
 		-idirafter $(OBJTREE)/include \
 	        -I $(SRCTREE)/libfdt \
 		-I $(SRCTREE)/tools \
-		-DTEXT_BASE=$(TEXT_BASE) -DUSE_HOSTCC
+		-DTEXT_BASE=$(TEXT_BASE) -DUSE_HOSTCC \
+		-D__KERNEL_STRICT_NAMES
 CFLAGS     = $(HOST_CFLAGS) $(CPPFLAGS) -O
 
 # No -pedantic switch to avoid libfdt compilation warnings
@@ -147,7 +153,7 @@ all:	$(obj).depend $(BINS) $(LOGO-y) subdirs
 $(obj)envcrc$(SFX):	$(obj)envcrc.o $(obj)crc32.o $(obj)env_embedded.o $(obj)sha1.o
 	$(CC) $(CFLAGS) -o $@ $^
 
-$(obj)ubsha1$(SFX):	$(obj)ubsha1.o $(obj)sha1.o
+$(obj)ubsha1$(SFX):	$(obj)ubsha1.o $(obj)sha1.o $(obj)os_support.o
 	$(CC) $(CFLAGS) -o $@ $^
 
 $(obj)img2srec$(SFX):	$(obj)img2srec.o
@@ -155,7 +161,7 @@ $(obj)img2srec$(SFX):	$(obj)img2srec.o
 	$(STRIP) $@
 
 $(obj)mkimage$(SFX):	$(obj)mkimage.o $(obj)crc32.o $(obj)image.o $(obj)md5.o \
-			$(obj)sha1.o $(LIBFDT_OBJS)
+			$(obj)sha1.o $(LIBFDT_OBJS) $(obj)os_support.o
 	$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
 	$(STRIP) $@
 
@@ -183,13 +189,16 @@ $(obj)bin2header$(SFX): $(obj)bin2header.o
 	$(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
 	$(STRIP) $@
 
-# image.c and mkimage.c require FIT_CFLAGS instead of standard CFLAGS
+# Some files complain if compiled with -pedantic, use FIT_CFLAGS
 $(obj)image.o: $(SRCTREE)/tools/image.c
 	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
 $(obj)mkimage.o: $(SRCTREE)/tools/mkimage.c
 	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
 
+$(obj)os_support.o: $(SRCTREE)/tools/os_support.c
+	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
+
 # Some of the tool objects need to be accessed from outside the tools directory
 $(obj)%.o: $(SRCTREE)/common/%.c
 	$(CC) -g $(FIT_CFLAGS) -c -o $@ $<
tools/mingw_support.c new file +79 -0

79 lines not on this page · raw message

tools/mingw_support.h new file +51 -0

51 lines not on this page · raw message

tools/mkimage.h +5 -0
index a2d5248..c8df6e1 100644
@@ -20,6 +20,7 @@
  * MA 02111-1307 USA
  */
 
+#include "os_support.h"
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
@@ -28,7 +29,11 @@
 #ifndef __WIN32__
 #include <netinet/in.h>		/* for host / network byte order conversions	*/
 #endif
+#ifdef __MINGW32__
+#include <stdint.h>
+#else
 #include <sys/mman.h>
+#endif
 #include <sys/stat.h>
 #include <time.h>
 #include <unistd.h>
tools/os_support.c new file +24 -0
new file mode 100644
index 0000000..001fe64
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2009 Extreme Engineering Solutions, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this software; if not, write to the
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * Include additional files required for supporting different operating systems
+ */
+#ifdef __MINGW32__
+#include "mingw_support.c"
+#endif
tools/os_support.h new file +29 -0
new file mode 100644
index 0000000..f6f86b0
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2009 Extreme Engineering Solutions, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this software; if not, write to the
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __OS_SUPPORT_H_
+#define __OS_SUPPORT_H_
+
+/*
+ * Include additional files required for supporting different operating systems
+ */
+#ifdef __MINGW32__
+#include "mingw_support.h"
+#endif
+
+#endif /* __OS_SUPPORT_H_ */
tools/ubsha1.c +3 -0
index b37b2b7..c4203ed 100644
@@ -21,13 +21,16 @@
  * MA 02111-1307 USA
  */
 
+#include "os_support.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <errno.h>
 #include <string.h>
+#ifndef __MINGW32__
 #include <sys/mman.h>
+#endif
 #include <sys/stat.h>
 #include "sha1.h"
 
Signature · 1 line
1.6.0.2.GIT
#28 lore raw

PATCH v3 28/28 Delete now unused tools/Makefile.win32

---
 tools/Makefile.win32 |   37 -------------------------------------
 1 files changed, 0 insertions(+), 37 deletions(-)
 delete mode 100644 tools/Makefile.win32
tools/Makefile.win32 deleted +0 -37
deleted file mode 100644
index 69dc44c..0000000
@@ -1,37 +0,0 @@
-#
-# (C) Copyright 2001
-# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
-#
-# See file CREDITS for list of people who contributed to this
-# project.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA 02111-1307 USA
-#
-
-CPPFLAGS   = -Wall -pedantic -I../include -I.. -D__WIN32__
-CFLAGS     = $(CPPFLAGS) -O
-
-all: mkimage.exe
-
-mkimage.exe:	mkimage.o crc32.o
-		$(CC) -g $(CFLAGS) -o $@ $^
-
-crc32.o:	crc32.c
-		$(CC) -g $(CFLAGS) -c $<
-
-mkimage.o:	mkimage.c
-		$(CC) -g $(CFLAGS) -c $<
-
Signature · 1 line
1.6.0.2.GIT
#29 lore raw

PATCH v3 28/28 Delete now unused tools/Makefile.win32

Dear Peter Tyser,

Quoted 5 lines · In message <[email protected]> you wrote:
---
 tools/Makefile.win32 |   37 -------------------------------------
 1 files changed, 0 insertions(+), 37 deletions(-)
 delete mode 100644 tools/Makefile.win32

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Insufficient facts always invite danger.
	-- Spock, "Space Seed", stardate 3141.9
#30 lore raw

PATCH v3 27/28 Add support for building native win32 tools

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 10 lines · In message <[email protected]> you wrote:

Add support for compiling the host tools in the tools directory using the MinGW toolchain. This produces executables which can be used on standard Windows computers without requiring cygwin.

One must specify the MinGW compiler and strip utilities as if they were the host toolchain in order to build win32 executables, eg:

make HOSTCC=i586-mingw32msvc-gcc HOSTSTRIP=i586-mingw32msvc-strip tools

Quoted 16 lines
---
 README                |   10 ++++++
 include/image.h       |    2 +
 include/libfdt_env.h  |   12 +++++++
 tools/Makefile        |   23 ++++++++++----
 tools/mingw_support.c |   79 +++++++++++++++++++++++++++++++++++++++++++++++++
 tools/mingw_support.h |   51 +++++++++++++++++++++++++++++++
 tools/mkimage.h       |    5 +++
 tools/os_support.c    |   24 +++++++++++++++
 tools/os_support.h    |   29 ++++++++++++++++++
 tools/ubsha1.c        |    3 ++
 10 files changed, 231 insertions(+), 7 deletions(-)
 create mode 100644 tools/mingw_support.c
 create mode 100644 tools/mingw_support.h
 create mode 100644 tools/os_support.c
 create mode 100644 tools/os_support.h

I'm not happy about this os_support thingy, especially since it will always be compiled, even if not needed in 99.99% of the cases. Maybe you have a better idea and can send a cleanup-patch?

Added, thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Is the glass half empty, half full, or twice as large as it needs to
#31 lore raw

PATCH v3 27/28 Add support for building native win32 tools

Hi Wolfgang,

Quoted 30 lines · Wolfgang Denk

Dear Peter Tyser,

Quoted 10 lines · In message <[email protected]> you wrote:

Add support for compiling the host tools in the tools directory using the MinGW toolchain. This produces executables which can be used on standard Windows computers without requiring cygwin.

One must specify the MinGW compiler and strip utilities as if they were the host toolchain in order to build win32 executables, eg:

make HOSTCC=i586-mingw32msvc-gcc HOSTSTRIP=i586-mingw32msvc-strip tools

Quoted 16 lines
---
 README                |   10 ++++++
 include/image.h       |    2 +
 include/libfdt_env.h  |   12 +++++++
 tools/Makefile        |   23 ++++++++++----
 tools/mingw_support.c |   79 +++++++++++++++++++++++++++++++++++++++++++++++++
 tools/mingw_support.h |   51 +++++++++++++++++++++++++++++++
 tools/mkimage.h       |    5 +++
 tools/os_support.c    |   24 +++++++++++++++
 tools/os_support.h    |   29 ++++++++++++++++++
 tools/ubsha1.c        |    3 ++
 10 files changed, 231 insertions(+), 7 deletions(-)
 create mode 100644 tools/mingw_support.c
 create mode 100644 tools/mingw_support.h
 create mode 100644 tools/os_support.c
 create mode 100644 tools/os_support.h
Quoted 3 lines

I'm not happy about this os_support thingy, especially since it will always be compiled, even if not needed in 99.99% of the cases. Maybe you have a better idea and can send a cleanup-patch?

The 2 options that come to mind are:
1. Keep the current method of unconditionally compiling os_support.c, which will in turn include any os-specific files.

2. Move the logic of determining which os-specific files are compiled into the Makefile. Something like:

ifneq (,$(findstring WIN32 ,$(shell $(HOSTCC) -E -dM -xc /dev/null))) SFX = .exe
+OS_SUPPORT_FILES = mingw_support.c
else
SFX =
+OS_SUPPORT_FILES =
endif

and then replace references of "os_support.c" with "$(OS_SUPPORT_FILES). (Or something along those lines).

#1 is ugly in that 99.99% of the time an empty os_support.c file is processed.

#2 is ugly in that the Makefile method to determine a target OS is somewhat hokey and will only get hokier if/when additional OS targets are supported.

I'd vote for #1 as I think the wasted time of processing os_support.c is a drop in the bucket and it seems a bit cleaner than hacking up the Makefile.

If others have any clever ideas let me know.

Best,
Peter

#32 lore raw

PATCH v3 27/28 Add support for building native win32 tools

Quoted 60 lines · On Tuesday 14 April 2009 18:52:30 Peter Tyser wrote:
Quoted 29 lines · Wolfgang Denk
Quoted 19 lines · In message Peter Tyser

Add support for compiling the host tools in the tools directory using the MinGW toolchain. This produces executables which can be used on standard Windows computers without requiring cygwin.

One must specify the MinGW compiler and strip utilities as if they were the host toolchain in order to build win32 executables, eg:

make HOSTCC=i586-mingw32msvc-gcc HOSTSTRIP=i586-mingw32msvc-strip tools

---
 README                |   10 ++++++
 include/image.h       |    2 +
 include/libfdt_env.h  |   12 +++++++
 tools/Makefile        |   23 ++++++++++----
 tools/mingw_support.c |   79
+++++++++++++++++++++++++++++++++++++++++++++++++ tools/mingw_support.h
|   51 +++++++++++++++++++++++++++++++
 tools/mkimage.h       |    5 +++
Quoted 8 lines
 tools/os_support.c    |   24 +++++++++++++++
 tools/os_support.h    |   29 ++++++++++++++++++
 tools/ubsha1.c        |    3 ++
 10 files changed, 231 insertions(+), 7 deletions(-)
 create mode 100644 tools/mingw_support.c
 create mode 100644 tools/mingw_support.h
 create mode 100644 tools/os_support.c
 create mode 100644 tools/os_support.h
Quoted 3 lines

I'm not happy about this os_support thingy, especially since it will always be compiled, even if not needed in 99.99% of the cases. Maybe you have a better idea and can send a cleanup-patch?

The 2 options that come to mind are:
1. Keep the current method of unconditionally compiling os_support.c, which will in turn include any os-specific files.

2. Move the logic of determining which os-specific files are compiled into the Makefile. Something like:

ifneq (,$(findstring WIN32 ,$(shell $(HOSTCC) -E -dM -xc /dev/null))) SFX = .exe

(quoted diff) +2 -0
+OS_SUPPORT_FILES = mingw_support.c
 else
 SFX =
+OS_SUPPORT_FILES =
 endif

and then replace references of "os_support.c" with "$(OS_SUPPORT_FILES). (Or something along those lines).

#1 is ugly in that 99.99% of the time an empty os_support.c file is processed.

#2 is ugly in that the Makefile method to determine a target OS is somewhat hokey and will only get hokier if/when additional OS targets are supported.

Quoted 5 lines

I'd vote for #1 as I think the wasted time of processing os_support.c is a drop in the bucket and it seems a bit cleaner than hacking up the Makefile.

If others have any clever ideas let me know.

i prefer #1 as well ... you covered the reasons fairly well, thanks
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090414/f5f77bad/attachment.pgp

#33 lore raw

PATCH v3 27/28 Add support for building native win32 tools

In reply to Peter Tyser

Dear Peter Tyser,

In message <[email protected]> you wrote:
...

Quoted 7 lines

#1 is ugly in that 99.99% of the time an empty os_support.c file is processed.

#2 is ugly in that the Makefile method to determine a target OS is somewhat hokey and will only get hokier if/when additional OS targets are supported.

Quoted 5 lines

I'd vote for #1 as I think the wasted time of processing os_support.c is a drop in the bucket and it seems a bit cleaner than hacking up the Makefile.

If others have any clever ideas let me know.

It seems there were no really clever ideas, or did I miss them?

Hm.. actually I lost track of which patch is missing. Could you please send me a pointer to the latest and greatest version? Sorry & thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Men don't talk peace unless they're ready to back it up with war.
	-- Col. Green, "The Savage Curtain", stardate 5906.4
#34 lore raw

PATCH v3 27/28 Add support for building native win32 tools

Hi Wolfgang,

Quoted 11 lines
Quoted 11 lines

#1 is ugly in that 99.99% of the time an empty os_support.c file is processed.

#2 is ugly in that the Makefile method to determine a target OS is somewhat hokey and will only get hokier if/when additional OS targets are supported.

I'd vote for #1 as I think the wasted time of processing os_support.c is a drop in the bucket and it seems a bit cleaner than hacking up the Makefile.

Quoted 6 lines
Quoted 1 line

If others have any clever ideas let me know.

It seems there were no really clever ideas, or did I miss them?

Hm.. actually I lost track of which patch is missing. Could you please send me a pointer to the latest and greatest version? Sorry & thanks.

The original v3 of "Add support for building native win32 tools" has actually been merged already.

After merging the patch, you had requested a cleanup patch to which I responded with the patch's rationale as well as a possible (in my opinion) dirtier cleanup. No one else suggested a cleaner way to implement the change, so what is currently committed should be correct.

I'm still open to clever ideas if anyone has one though:)

Thanks,
Peter

#35 lore raw

PATCH v3 26/28 tools/Makefile: Simplify HOST_CFLAGS/HOST_LDFLAGS generation

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 4 lines · In message <[email protected]> you wrote:
---
 tools/Makefile |   17 +++++------------
 1 files changed, 5 insertions(+), 12 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Out of register space (ugh)"
- vi
#36 lore raw

PATCH v3 25/28 tools/Makefile: Create generic build rules

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 7 lines · In message <[email protected]> you wrote:

Create a few generic build rules to replace the current method which has 1 build target for each file

---
 tools/Makefile |   55 +++++++++----------------------------------------------
 1 files changed, 9 insertions(+), 46 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Unibus timeout fatal trap program lost sorry"  -  An  error  message
printed by DEC's RSTS operating system for the PDP-11
#37 lore raw

PATCH v3 24/28 tools/Makefile: Use auto-generated object file dependencies

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 7 lines · In message <[email protected]> you wrote:

Files in the SRCS variable have their dependencies automatically generated so remove duplicate explicit dependencies

---
 tools/Makefile |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 7 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
PROGRAM - n.  A magic spell cast over a computer  allowing it to turn
one's input into error messages.
v. tr. - To engage in a pastime similar to banging one's head against
a wall, but with fewer opportunities for reward.
#38 lore raw

PATCH v3 23/28 tools/Makefile: Remove symlinks for remaining source files

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 6 lines · In message <[email protected]> you wrote:
---
 Makefile         |    3 +--
 tools/.gitignore |    5 -----
 tools/Makefile   |   44 +++++++++++++-------------------------------
 3 files changed, 14 insertions(+), 38 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 8 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Making files is easy under  the  UNIX  operating  system.  Therefore,
users  tend  to  create  numerous  files  using large amounts of file
space. It has been said that the only standard thing about  all  UNIX
systems  is  the  message-of-the-day  telling users to clean up their
files.                            -- System V.2 administrator's guide
#39 lore raw

PATCH v3 22/28 tools/Makefile: Dynamically generate libfdt object dependencies

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 7 lines · In message <[email protected]> you wrote:

Add the libfdt files to the SRCS variable so that they have their dependencies automatically generated

---
 tools/Makefile |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Hokey religions and ancient weapons are  no  substitute  for  a  good
blaster at your side.                                      - Han Solo
#40 lore raw

PATCH v3 21/28 tools/Makefile: Remove symlinks for fdt targets

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 6 lines · In message <[email protected]> you wrote:
---
 Makefile         |    3 +--
 tools/.gitignore |    5 -----
 tools/Makefile   |   32 +++++++-------------------------
 3 files changed, 8 insertions(+), 32 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"The combination of a number of things to make existence worthwhile."
"Yes, the philosophy of 'none,' meaning 'all.'"
	-- Spock and Lincoln, "The Savage Curtain", stardate 5906.4
#41 lore raw

PATCH v3 20/28 tools/Makefile: Add libfdt/ to the include search path

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 9 lines · In message <[email protected]> you wrote:

This change makes the process of symlinking libfdt_internal.h unnecessary

---
 Makefile         |    2 +-
 tools/.gitignore |    1 -
 tools/Makefile   |   15 ++++++---------
 3 files changed, 7 insertions(+), 11 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Einstein argued that there must be simplified explanations of nature,
because God is not capricious or arbitrary. No  such  faith  comforts
the software engineer.                             - Fred Brooks, Jr.
#42 lore raw

PATCH v3 19/28 tools: Remove unecessary symlinking of zlib.h

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 10 lines · In message <[email protected]> you wrote:

crc32.c uses the zlib.h header in include/u-boot/zlib.h. The symlink was previously necessary to give U-Boot's version of zlib.h precedence over the host computer's version of zlib.h.

---
 Makefile         |    2 +-
 tools/.gitignore |    1 -
 tools/Makefile   |    6 +-----
 3 files changed, 2 insertions(+), 7 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Real computer scientists despise the idea of actual  hardware.  Hard-
ware has limitations, software doesn't. It's a real shame that Turing
machines are so poor at I/O.
#43 lore raw

PATCH v3 18/28 tools/Makefile: Add tools/ to the include search path

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 7 lines · In message <[email protected]> you wrote:

This change makes the process of symlinking mkimage.h and fdt_host.h unnecessary

---
 tools/Makefile |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Never worry about theory as long as  the  machinery  does  what  it's
supposed to do.                                      - R. A. Heinlein
#44 lore raw

PATCH v3 17/28 tools/Makefile: Compile ncb when CONFIG_NETCONSOLE

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 7 lines · In message <[email protected]> you wrote:

Also conditionally add ncb.o to OBJ_FILES list

---
 doc/README.NetConsole |    6 ++----
 tools/Makefile        |    2 ++
 2 files changed, 4 insertions(+), 4 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Of all possible committee reactions to any  given  agenda  item,  the
reaction  that will occur is the one which will liberate the greatest
amount of hot air.                                -- Thomas L. Martin
#45 lore raw

PATCH v3 16/28 tools/Makefile: Make gen_eth_addr dependent upon CONFIG_CMD_NET

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 4 lines · In message <[email protected]> you wrote:
---
 tools/Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Only in our dreams we are free.  The rest of the time we need  wages.
                                    - Terry Pratchett, _Wyrd Sisters_
#46 lore raw

PATCH v3 15/28 tools/Makefile: Make envcrc dependent upon CONFIG_ENV_IS_EMBEDDED

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 4 lines · In message <[email protected]> you wrote:
---
 tools/Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Doubt is a pain too lonely to know that faith is his twin brother.
- Kahlil Gibran
#47 lore raw

PATCH v3 14/28 tools/Makefile: Make inca-swap-bytes dependent on CONFIG_INCA_IP

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 4 lines · In message <[email protected]> you wrote:
---
 tools/Makefile |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
COBOL is for morons.                                 -- E.W. Dijkstra
#48 lore raw

PATCH v3 13/28 tools/Makefile: Make ubsha1 dependent upon CONFIG_SHA1_CHECK_UB_IMG

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 4 lines · In message <[email protected]> you wrote:
---
 tools/Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
What the gods would destroy they first submit to  an  IEEE  standards
committee.
#49 lore raw

PATCH v3 12/28 tools/Makefile: Make img2srec dependent upon CONFIG_CMD_LOADS

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 4 lines · In message <[email protected]> you wrote:
---
 tools/Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
There's no sense in being precise  when  you  don't  even  know  what
you're talking about.                             -- John von Neumann
#50 lore raw

PATCH v3 11/28 tools/Makefile: Build bmp_logo only when LCD or VIDEO logos are enabled

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 4 lines · In message <[email protected]> you wrote:
---
 tools/Makefile |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"It is better to have tried and failed than to have  failed  to  try,
but the result's the same."                           - Mike Dennison
#51 lore raw

PATCH v3 10/28 tools/Makefile: Split variable declarations into multiple lines

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 5 lines · In message <[email protected]> you wrote:

Split variable declarations into multiple lines and use the standard VAR-y convention. Also move object and binary variable declarations to after config.mk has been included to allow for these lists to utilize the CONFIG_XXX variables.

Quoted 7 lines

These changes lay the groundwork for conditional compilation of files in the tools directory.

---
 tools/Makefile |   86 ++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 53 insertions(+), 33 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Even if you aren't in doubt, consider the mental welfare of the  per-
son who has to maintain the code after you, and who will probably put
parens in the wrong place.          - Larry Wall in the perl man page
#52 lore raw

PATCH v3 9/28 tools/Makefile: Remove inappropriate double-tabs

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 4 lines · In message <[email protected]> you wrote:
---
 tools/Makefile |  153 ++++++++++++++++++++++++++++----------------------------
 1 files changed, 77 insertions(+), 76 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
By the way, ALL software projects are done by iterative  prototyping.
Some companies call their prototypes "releases", that's all.
#53 lore raw

PATCH v3 8/28 tools/Makefile: Remove HOSTARCH HOSTOS defines

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 7 lines · In message <[email protected]> you wrote:

The values of HOSTARCH and HOSTOS which are exported from the top-level Makefile should be used

---
 tools/Makefile |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Well, the way I see it, logic is only a way of being ignorant by num-
bers.                                 - Terry Pratchett, _Small Gods_
#54 lore raw

PATCH v3 7/28 gen_eth_addr: Use POSIX rand() and srand()

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 9 lines · In message <[email protected]> you wrote:

Replace random()/srandom() use with rand()/srand() to support compilation with the mingw toolchain. The rand()/srand() functions are generally more common and are functionally equivalent to the original random()/srandom() calls.

---
 tools/gen_eth_addr.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"When people are least sure, they are often most dogmatic."
- John Kenneth Galbraith
#55 lore raw

PATCH v3 6/28 Rename include/bzlib.h to include/u-boot/bzlib.h

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 5 lines · In message <[email protected]> you wrote:

Some systems have bzlib.h installed in /usr/include/. This isn't the desired file (we want the one in include/bzlib.h). Moving U-Boot's bzlib.h to include/u-boot/ avoids this conflict.

Quoted 9 lines
---
 board/mpl/common/common_util.c |    2 +-
 common/cmd_bootm.c             |    2 +-
 include/{ => u-boot}/bzlib.h   |    0
 lib_generic/bzlib_private.h    |    2 +-
 lib_m68k/bootm.c               |    2 +-
 lib_ppc/bootm.c                |    2 +-
 6 files changed, 5 insertions(+), 5 deletions(-)
 rename include/{ => u-boot}/bzlib.h (100%)

Patch fails to apply. Please rebase and resubmit.

Best regards,

Wolfgang Denk

Signature · 7 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
But it's real. And if it's real it can be affected ... we may not  be
able  to break it, but, I'll bet you credits to Navy Beans we can put
a dent in it.
	-- deSalle, "Catspaw", stardate 3018.2
#56 lore raw

PATCH v3 6/28 Rename include/bzlib.h to include/u-boot/bzlib.h

Quoted 18 lines · Wolfgang Denk

Dear Peter Tyser,

Quoted 5 lines · In message <[email protected]> you wrote:

Some systems have bzlib.h installed in /usr/include/. This isn't the desired file (we want the one in include/bzlib.h). Moving U-Boot's bzlib.h to include/u-boot/ avoids this conflict.

Quoted 9 lines
---
 board/mpl/common/common_util.c |    2 +-
 common/cmd_bootm.c             |    2 +-
 include/{ => u-boot}/bzlib.h   |    0
 lib_generic/bzlib_private.h    |    2 +-
 lib_m68k/bootm.c               |    2 +-
 lib_ppc/bootm.c                |    2 +-
 6 files changed, 5 insertions(+), 5 deletions(-)
 rename include/{ => u-boot}/bzlib.h (100%)
Quoted 1 line

Patch fails to apply. Please rebase and resubmit.

This should patch should apply cleanly now. It failed previously because patch 5/28 failed. Patch 5/28 was resubmitted as "rename include/zlib.h to include/u-boot/zlib.h" and has been accepted.

Would you like me to resumbit, or will you apply this patch?

Thanks,
Peter

#57 lore raw

PATCH v3 5/28 Rename include/zlib.h to include/u-boot/zlib.h

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 5 lines · In message <[email protected]> you wrote:

Some systems have zlib.h installed in /usr/include/. This isn't the desired file (we want the one in include/zlib.h). Moving U-Boot's zlib.h to include/u-boot/ avoids this conflict.

Quoted 16 lines
---
 common/cmd_bootm.c          |    2 +-
 fs/cramfs/uncompress.c      |    2 +-
 include/{ => u-boot}/zlib.h |    0
 lib_arm/bootm.c             |    2 +-
 lib_avr32/bootm.c           |    2 +-
 lib_generic/crc32.c         |    2 +-
 lib_generic/gunzip.c        |    2 +-
 lib_generic/zlib.c          |    2 +-
 lib_i386/bootm.c            |    2 +-
 lib_m68k/bootm.c            |    2 +-
 lib_microblaze/bootm.c      |    2 +-
 lib_mips/bootm.c            |    2 +-
 lib_ppc/bootm.c             |    2 +-
 13 files changed, 12 insertions(+), 12 deletions(-)
 rename include/{ => u-boot}/zlib.h (100%)

Patch fails to apply. Please rebase and resubmit.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Always borrow money from a pessimist; they don't expect  to  be  paid
back.
#58 lore raw

PATCH v3 5/28 Rename include/zlib.h to include/u-boot/zlib.h

Quoted 25 lines · Wolfgang Denk

Dear Peter Tyser,

Quoted 5 lines · In message <[email protected]> you wrote:

Some systems have zlib.h installed in /usr/include/. This isn't the desired file (we want the one in include/zlib.h). Moving U-Boot's zlib.h to include/u-boot/ avoids this conflict.

Quoted 16 lines
---
 common/cmd_bootm.c          |    2 +-
 fs/cramfs/uncompress.c      |    2 +-
 include/{ => u-boot}/zlib.h |    0
 lib_arm/bootm.c             |    2 +-
 lib_avr32/bootm.c           |    2 +-
 lib_generic/crc32.c         |    2 +-
 lib_generic/gunzip.c        |    2 +-
 lib_generic/zlib.c          |    2 +-
 lib_i386/bootm.c            |    2 +-
 lib_m68k/bootm.c            |    2 +-
 lib_microblaze/bootm.c      |    2 +-
 lib_mips/bootm.c            |    2 +-
 lib_ppc/bootm.c             |    2 +-
 13 files changed, 12 insertions(+), 12 deletions(-)
 rename include/{ => u-boot}/zlib.h (100%)
Quoted 1 line

Patch fails to apply. Please rebase and resubmit.

Sorry for the slow reply, I've been out of the office this past week. It looks like Jean-Christophe re-submitted this as "PATCH 2/2 V2] rename include/zlib.h to include/u-boot/zlib.h" which has been accepted so I won't resumbit.

Jean-Christophe, thanks for rebasing/resending this. In the future it'd be nice if you kept the original signed-off-by around as your patch is pretty much just a rebased version of this one.

Best,
Peter

#59 lore raw

PATCH v3 5/28 Rename include/zlib.h to include/u-boot/zlib.h

Quoted 28 lines · Peter Tyser
Quoted 25 lines · Wolfgang Denk

Dear Peter Tyser,

Quoted 5 lines · In message <[email protected]> you wrote:

Some systems have zlib.h installed in /usr/include/. This isn't the desired file (we want the one in include/zlib.h). Moving U-Boot's zlib.h to include/u-boot/ avoids this conflict.

Quoted 16 lines
---
 common/cmd_bootm.c          |    2 +-
 fs/cramfs/uncompress.c      |    2 +-
 include/{ => u-boot}/zlib.h |    0
 lib_arm/bootm.c             |    2 +-
 lib_avr32/bootm.c           |    2 +-
 lib_generic/crc32.c         |    2 +-
 lib_generic/gunzip.c        |    2 +-
 lib_generic/zlib.c          |    2 +-
 lib_i386/bootm.c            |    2 +-
 lib_m68k/bootm.c            |    2 +-
 lib_microblaze/bootm.c      |    2 +-
 lib_mips/bootm.c            |    2 +-
 lib_ppc/bootm.c             |    2 +-
 13 files changed, 12 insertions(+), 12 deletions(-)
 rename include/{ => u-boot}/zlib.h (100%)
Quoted 1 line

Patch fails to apply. Please rebase and resubmit.

Quoted 8 lines

Sorry for the slow reply, I've been out of the office this past week. It looks like Jean-Christophe re-submitted this as "PATCH 2/2 V2] rename include/zlib.h to include/u-boot/zlib.h" which has been accepted so I won't resumbit.

Jean-Christophe, thanks for rebasing/resending this. In the future it'd be nice if you kept the original signed-off-by around as your patch is pretty much just a rebased version of this one.

sure but I've not even read your patch series

I just wrote that patch to fix the current tree

Best Regards,
J.

#60 lore raw

PATCH v3 4/28 elf.h: Use stdint.h to provide standard typedefs for WIN32

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 8 lines · In message <[email protected]> you wrote:

The original code provided an incomplete set of typedefs for WIN32 compiles and replicated the standard typedefs that are already provided by stdint.h

---
 include/elf.h |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Any sufficiently advanced bug is indistinguishable from a feature.
                                                      - Rich Kulawiec
#61 lore raw

PATCH v3 3/28 common/Makefile: Conditionally compile env_embedded.o

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 4 lines · In message <[email protected]> you wrote:
---
 common/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Programmer's Lament: (Shakespeare, Macbeth, Act I, Scene vii)
        "That we but teach bloody instructions,
        which, being taught, return to plague the inventor..."
#62 lore raw

PATCH v3 2/28 Makefile: Add removal of *.exe files to clean target

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 4 lines · In message <[email protected]> you wrote:
---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"There are things that are so serious that you can  only  joke  about
them"                                                    - Heisenberg
#63 lore raw

PATCH v3 1/28 Makefile: Make autoconf.mk a dependency of the depend target

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 8 lines · In message <[email protected]> you wrote:

The original code did not generate autoconf.mk until after some targets dependencies had already been calculated, for example the directories in the SUBDIRS variable

---
 Makefile |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
You don't need a weatherman to know which way the wind blows.
                                                          - Bob Dylan
#64 lore raw

v3 cover tools/Makefile cleanup and win32 tool support

In reply to Peter Tyser
Quoted 6 lines · Peter Tyser

This patch series attempts to do 2 things:
1. Add support for generating win32 versions of the tools in tools/
2. Cleanup tools/Makefile somewhat

In the process of #1 I couldn't help but work on #2 a bit:) Let me know if people would prefer the patches split up.

<peeve type="pet">
It's easier to read patchsets, especially large ones, when each message is a reply to the original rather than to the preceding patch (which in many mailers makes the subjects appear shifted one character to the right compared to the parent post, eventually scrolling off the right edge of the screen).
</peeve>

-Scott

#65 lore raw

v3 cover tools/Makefile cleanup and win32 tool support

Quoted 8 lines · On Tuesday 17 March 2009 13:21:05 Scott Wood wrote:
Quoted 6 lines · Peter Tyser

This patch series attempts to do 2 things:
1. Add support for generating win32 versions of the tools in tools/
2. Cleanup tools/Makefile somewhat

In the process of #1 I couldn't help but work on #2 a bit:) Let me know if people would prefer the patches split up.

Quoted 7 lines

<peeve type="pet">
It's easier to read patchsets, especially large ones, when each message is a reply to the original rather than to the preceding patch (which in many mailers makes the subjects appear shifted one character to the right compared to the parent post, eventually scrolling off the right edge of the screen).
</peeve>

your mailer does just one char ? i should switch from kmail to whatever you're using :) ...

Peter: if you update to git-1.6.2 (well, maybe what i describe happens in earlier versions, but i know 1.6.2 is good), then you can use --cover-letter to git format-patch and git send-email will thread things the way Scott describes if you send all the patches together: git send-email 0*.patch.

the cover letter will be the thread starter and all the patches in the series will refer to that one rather than each N patch referring to N-1 in the series.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090317/2a24d47f/attachment.pgp

#66 lore raw

v3 cover tools/Makefile cleanup and win32 tool support

Quoted 20 lines · Mike Frysinger
Quoted 8 lines · On Tuesday 17 March 2009 13:21:05 Scott Wood wrote:
Quoted 6 lines · Peter Tyser

This patch series attempts to do 2 things:
1. Add support for generating win32 versions of the tools in tools/
2. Cleanup tools/Makefile somewhat

In the process of #1 I couldn't help but work on #2 a bit:) Let me know if people would prefer the patches split up.

Quoted 7 lines

<peeve type="pet">
It's easier to read patchsets, especially large ones, when each message is a reply to the original rather than to the preceding patch (which in many mailers makes the subjects appear shifted one character to the right compared to the parent post, eventually scrolling off the right edge of the screen).
</peeve>

your mailer does just one char ? i should switch from kmail to whatever you're using :) ...

Quoted 8 lines

Peter: if you update to git-1.6.2 (well, maybe what i describe happens in earlier versions, but i know 1.6.2 is good), then you can use --cover-letter to git format-patch and git send-email will thread things the way Scott describes if you send all the patches together: git send-email 0*.patch.

the cover letter will be the thread starter and all the patches in the series will refer to that one rather than each N patch referring to N-1 in the series.

I see similar default threading styles in both 1.6.0 and 1.6.2. It looks like I was missing git send-email's "--no-chain-reply-to" argument. I added "sendmail.chainreplyto = false" to my .gitconfig which also does the trick.

It makes me wonder why --chain-reply-to would ever be the default...

Peter

#67 lore raw

v3 cover tools/Makefile cleanup and win32 tool support

Quoted 31 lines · On Tuesday 17 March 2009 16:59:39 Peter Tyser wrote:
Quoted 26 lines · Mike Frysinger
Quoted 8 lines · On Tuesday 17 March 2009 13:21:05 Scott Wood wrote:
Quoted 6 lines · Peter Tyser

This patch series attempts to do 2 things:
1. Add support for generating win32 versions of the tools in tools/
2. Cleanup tools/Makefile somewhat

In the process of #1 I couldn't help but work on #2 a bit:) Let me know if people would prefer the patches split up.

Quoted 7 lines

<peeve type="pet">
It's easier to read patchsets, especially large ones, when each message is a reply to the original rather than to the preceding patch (which in many mailers makes the subjects appear shifted one character to the right compared to the parent post, eventually scrolling off the right edge of the screen).
</peeve>

your mailer does just one char ? i should switch from kmail to whatever you're using :) ...

Peter: if you update to git-1.6.2 (well, maybe what i describe happens in earlier versions, but i know 1.6.2 is good), then you can use --cover-letter to git format-patch and git send-email will thread things the way Scott describes if you send all the patches together: git send-email 0*.patch.

Quoted 3 lines

the cover letter will be the thread starter and all the patches in the series will refer to that one rather than each N patch referring to N-1 in the series.

Quoted 6 lines

I see similar default threading styles in both 1.6.0 and 1.6.2. It looks like I was missing git send-email's "--no-chain-reply-to" argument. I added "sendmail.chainreplyto = false" to my .gitconfig which also does the trick.

It makes me wonder why --chain-reply-to would ever be the default...

i thought they changed that default in recent versions ... but i'd have to agree that the default chained to is stupid

btw, if we cant get the windows stuff completely sorted before the next merge, you should be able to get all the build and such cleanups which are not directly related merged ... then we can get back to picking over mingw :) -mike

#68 lore raw

v3 cover tools/Makefile cleanup and win32 tool support

In reply to Peter Tyser

Dear Peter Tyser,

Quoted 3 lines · In message <[email protected]> you wrote:

This patch series attempts to do 2 things:
1. Add support for generating win32 versions of the tools in tools/
2. Cleanup tools/Makefile somewhat

Ouch. I missed that there were updated versions of this patch stack. Rewound everything and will start applying v3 seris now.

Sorry for the confusion.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If I don't document something, it's usually either for a good reason,
or a bad reason.  In this case it's a good reason.  :-)
                 - Larry Wall in <[email protected]>