[U-Boot] [PATCH 00/15] 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
Peter Tyser (15): 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 gen_eth_addr: Use POSIX rand() and srand() elf.h: Add missing int32_t typedef for WIN32 compilers Add support for building native win32 tools Makefile: Add removal of *.exe file to clean target Deleted unused tools/Makefile.win32 common/Makefile: Conditionally compile env_embedded.o
Makefile | 2 +- README | 10 ++ common/Makefile | 2 +- doc/README.NetConsole | 6 +- include/elf.h | 1 + include/image.h | 2 + include/libfdt_env.h | 12 +++ include/linux/types.h | 5 +- tools/Makefile | 255 ++++++++++++++++++++++++++++--------------------- tools/Makefile.win32 | 37 ------- tools/gen_eth_addr.c | 6 +- tools/mingw_support.c | 79 +++++++++++++++ tools/mingw_support.h | 48 +++++++++ tools/mkimage.c | 4 + tools/mkimage.h | 5 + tools/ubsha1.c | 6 +- 16 files changed, 321 insertions(+), 159 deletions(-) delete mode 100644 tools/Makefile.win32 create mode 100644 tools/mingw_support.c create mode 100644 tools/mingw_support.h

Signed-off-by: Peter Tyser ptyser@xes-inc.com --- tools/Makefile | 153 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 77 insertions(+), 76 deletions(-)
diff --git a/tools/Makefile b/tools/Makefile index 9e9ee15..5cce148 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -138,164 +138,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) >$@
#########################################################################

Split variable declarations into multiple lines and use the standard VAR-y convention. This should more easily allow conditional compilation of files in the future.
Signed-off-by: Peter Tyser ptyser@xes-inc.com --- tools/Makefile | 46 ++++++++++++++++++++++++++++++++++------------ 1 files changed, 34 insertions(+), 12 deletions(-)
diff --git a/tools/Makefile b/tools/Makefile index 5cce148..991ad8b 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -21,23 +21,44 @@ # 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 +# 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 += inca-swap-bytes$(SFX) -OBJ_FILES += inca-swap-bytes.o +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 += mpc86x_clk$(SFX) -#OBJ_FILES += mpc86x_clk.o +#BIN_FILES-y += mpc86x_clk$(SFX) +#OBJ_FILES-y += 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 +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
@@ -115,8 +136,9 @@ endif include $(TOPDIR)/config.mk
# 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 @@ -148,7 +170,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) $@

Signed-off-by: Peter Tyser ptyser@xes-inc.com --- tools/Makefile | 107 +++++++++++++++++++++++++++++--------------------------- 1 files changed, 55 insertions(+), 52 deletions(-)
diff --git a/tools/Makefile b/tools/Makefile index 991ad8b..09512ec 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -21,57 +21,6 @@ # MA 02111-1307 USA #
-# 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 - -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 - - -#------------------------------------------------------------------------- - HOSTARCH := $(shell uname -m | \ sed -e s/i.86/i386/ \ -e s/sun4u/sparc64/ \ @@ -135,6 +84,60 @@ 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-$(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 +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-$(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 + +# 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 + +# 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 +endif +ifeq ($(VENDOR),atmel) +LOGO_BMP= logos/atmel.bmp +endif + # now $(obj) is defined SRCS := $(addprefix $(obj),$(OBJ_LINKS-y:.o=.c)) $(OBJ_FILES-y:.o=.c) BINS := $(addprefix $(obj),$(BIN_FILES-y)) @@ -157,7 +160,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 $@ $^

Signed-off-by: Peter Tyser ptyser@xes-inc.com --- tools/Makefile | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/Makefile b/tools/Makefile index 09512ec..3b90ba6 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -85,7 +85,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) @@ -100,7 +100,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

Signed-off-by: Peter Tyser ptyser@xes-inc.com --- tools/Makefile | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/Makefile b/tools/Makefile index 3b90ba6..27a0361 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -88,7 +88,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) @@ -103,7 +103,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

Signed-off-by: Peter Tyser ptyser@xes-inc.com --- tools/Makefile | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/tools/Makefile b/tools/Makefile index 27a0361..3a76a6d 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -92,6 +92,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 @@ -107,11 +108,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)

Signed-off-by: Peter Tyser ptyser@xes-inc.com --- tools/Makefile | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/Makefile b/tools/Makefile index 3a76a6d..6fccb8a 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -87,7 +87,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) @@ -103,7 +103,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

Signed-off-by: Peter Tyser ptyser@xes-inc.com --- tools/Makefile | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/Makefile b/tools/Makefile index 6fccb8a..6e60c0d 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -89,7 +89,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) @@ -105,7 +105,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

Signed-off-by: Peter Tyser ptyser@xes-inc.com --- doc/README.NetConsole | 6 ++---- tools/Makefile | 1 + 2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/doc/README.NetConsole b/doc/README.NetConsole index 94c8816..639cc12 100644 --- a/doc/README.NetConsole +++ b/doc/README.NetConsole @@ -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 diff --git a/tools/Makefile b/tools/Makefile index 6e60c0d..429f741 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -93,6 +93,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

Replace random()/srandom() use with rand()/srand() to support compilation with the mingw toolchain
Signed-off-by: Peter Tyser ptyser@xes-inc.com --- tools/gen_eth_addr.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/gen_eth_addr.c b/tools/gen_eth_addr.c index 75be385..429b20d 100644 --- a/tools/gen_eth_addr.c +++ b/tools/gen_eth_addr.c @@ -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,

Signed-off-by: Peter Tyser ptyser@xes-inc.com --- include/elf.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/elf.h b/include/elf.h index a9839df..3a948f7 100644 --- a/include/elf.h +++ b/include/elf.h @@ -45,6 +45,7 @@ #include <unistd.h> typedef unsigned char uint8_t; typedef unsigned short uint16_t; +typedef int int32_t; typedef unsigned int uint32_t; #endif

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
Signed-off-by: Peter Tyser ptyser@xes-inc.com --- README | 10 ++++++ include/image.h | 2 + include/libfdt_env.h | 12 +++++++ include/linux/types.h | 5 ++- tools/Makefile | 15 +++++++-- tools/mingw_support.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++ tools/mingw_support.h | 48 +++++++++++++++++++++++++++++ tools/mkimage.c | 4 ++ tools/mkimage.h | 5 +++ tools/ubsha1.c | 6 +++- 10 files changed, 181 insertions(+), 5 deletions(-) create mode 100644 tools/mingw_support.c create mode 100644 tools/mingw_support.h
diff --git a/README b/README index 43fb1c0..3609eca 100644 --- a/README +++ b/README @@ -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 WIN32 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 + binaries 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 using 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: diff --git a/include/image.h b/include/image.h index 74a1240..f183757 100644 --- a/include/image.h +++ b/include/image.h @@ -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 diff --git a/include/libfdt_env.h b/include/libfdt_env.h index ea474a5..1c67015 100644 --- a/include/libfdt_env.h +++ b/include/libfdt_env.h @@ -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) diff --git a/include/linux/types.h b/include/linux/types.h index 1b0b4a4..90c0695 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -10,10 +10,13 @@
#ifndef __KERNEL_STRICT_NAMES
+#ifndef __MINGW32__ +/* prevent mingw overlaps for certain typedefs */ typedef __kernel_fd_set fd_set; typedef __kernel_dev_t dev_t; typedef __kernel_ino_t ino_t; typedef __kernel_mode_t mode_t; +#endif typedef __kernel_nlink_t nlink_t; typedef __kernel_off_t off_t; typedef __kernel_pid_t pid_t; @@ -54,7 +57,7 @@ typedef __kernel_loff_t loff_t; typedef __kernel_size_t size_t; #endif
-#ifndef _SSIZE_T +#if !defined(_SSIZE_T) && !defined(__MINGW32__) #define _SSIZE_T typedef __kernel_ssize_t ssize_t; #endif diff --git a/tools/Makefile b/tools/Makefile index 429f741..9b40276 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -79,6 +79,14 @@ SFX = endif
# +# mingw toolchain requires mingw_support.c and generates .exe files +# +ifneq (,$(findstring mingw,$(shell $(HOSTCC) -v 2>&1 | grep mingw))) +MINGW_OBJ_FILES-y += mingw_support.o +SFX = .exe +endif + +# # Include this after HOSTOS HOSTARCH check # so that we can act intelligently. # @@ -140,6 +148,7 @@ endif 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)) +MINGW_OBJS := $(addprefix $(obj),$(MINGW_OBJ_FILES-y))
# # Use native tools and options @@ -163,7 +172,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 $(MINGW_OBJS) $(CC) $(CFLAGS) -o $@ $^
$(obj)img2srec$(SFX): $(obj)img2srec.o @@ -171,7 +180,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) $(MINGW_OBJS) $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^ $(STRIP) $@
@@ -318,7 +327,7 @@ $(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) +$(LOGO_H): $(obj)bmp_logo$(SFX) $(LOGO_BMP) $(obj)./bmp_logo $(LOGO_BMP) >$@
######################################################################### diff --git a/tools/mingw_support.c b/tools/mingw_support.c new file mode 100644 index 0000000..67cd6e1 --- /dev/null +++ b/tools/mingw_support.c @@ -0,0 +1,79 @@ +/* + * Copyright 2008 Extreme Engineering Solutions, Inc. + * + * mmap/munmap implementation derived from: + * Clamav Native Windows Port : mmap win32 compatibility layer + * Copyright (c) 2005-2006 Gianluigi Tiesi sherpya@netfarm.it + * Parts by Kees Zeelenberg kzlg@users.sourceforge.net (LibGW32C) + * + * 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 "mingw_support.h" +#include <stdio.h> +#include <stdint.h> +#include <errno.h> +#include <io.h> + +int fsync(int fd) +{ + return _commit(fd); +} + +void *mmap(void *addr, size_t len, int prot, int flags, int fd, int offset) +{ + void *map = NULL; + HANDLE handle = INVALID_HANDLE_VALUE; + DWORD cfm_flags = 0, mvf_flags = 0; + + switch (prot) { + case PROT_READ | PROT_WRITE: + cfm_flags = PAGE_READWRITE; + mvf_flags = FILE_MAP_ALL_ACCESS; + break; + case PROT_WRITE: + cfm_flags = PAGE_READWRITE; + mvf_flags = FILE_MAP_WRITE; + break; + case PROT_READ: + cfm_flags = PAGE_READONLY; + mvf_flags = FILE_MAP_READ; + break; + default: + return MAP_FAILED; + } + + handle = CreateFileMappingA((HANDLE) _get_osfhandle(fd), NULL, + cfm_flags, HIDWORD(len), LODWORD(len), NULL); + if (!handle) + return MAP_FAILED; + + map = MapViewOfFile(handle, mvf_flags, HIDWORD(offset), + LODWORD(offset), len); + CloseHandle(handle); + + if (!map) + return MAP_FAILED; + + return map; +} + +int munmap(void *addr, size_t len) +{ + if (!UnmapViewOfFile(addr)) + return -1; + + return 0; +} diff --git a/tools/mingw_support.h b/tools/mingw_support.h new file mode 100644 index 0000000..b4011a6 --- /dev/null +++ b/tools/mingw_support.h @@ -0,0 +1,48 @@ +/* + * Copyright 2008 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 __MINGW_SUPPORT_H_ +#define __WINGW_SUPPORT_H_ 1 + +/* Defining __INSIDE_MSYS__ helps to prevent u-boot/mingw overlap */ +#define __INSIDE_MSYS__ 1 + +#include <windows.h> + +/* mmap protections */ +#define PROT_READ 0x1 /* Page can be read */ +#define PROT_WRITE 0x2 /* Page can be written */ +#define PROT_EXEC 0x4 /* Page can be executed */ +#define PROT_NONE 0x0 /* Page can not be accessed */ + +/* Sharing types (must choose one and only one of these) */ +#define MAP_SHARED 0x01 /* Share changes */ +#define MAP_PRIVATE 0x02 /* Changes are private */ + +/* Return value of `mmap' in case of an error */ +#define MAP_FAILED ((void *) -1) + +/* Windows 64-bit access macros */ +#define LODWORD(l) ((DWORD)((DWORDLONG)(l))) +#define HIDWORD(l) ((DWORD)(((DWORDLONG)(l)>>32)&0xFFFFFFFF)) + +int fsync(int fd); +void *mmap(void *, size_t, int, int, int, int); +int munmap(void *, size_t); + +#endif /* __MINGW_SUPPORT_H_ */ diff --git a/tools/mkimage.c b/tools/mkimage.c index 967fe9a..380b535 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -25,6 +25,10 @@ #include "mkimage.h" #include <image.h>
+#ifdef __MINGW32__ +#include "mingw_support.h" +#endif + extern int errno;
#ifndef MAP_FAILED diff --git a/tools/mkimage.h b/tools/mkimage.h index a2d5248..6974fa4 100644 --- a/tools/mkimage.h +++ b/tools/mkimage.h @@ -28,7 +28,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> @@ -65,6 +69,7 @@ typedef unsigned int __u32; typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; +typedef unsigned long ulong;
#define ntohl(a) SWAP_LONG(a) #define htonl(a) SWAP_LONG(a) diff --git a/tools/ubsha1.c b/tools/ubsha1.c index b37b2b7..604921d 100644 --- a/tools/ubsha1.c +++ b/tools/ubsha1.c @@ -27,9 +27,13 @@ #include <fcntl.h> #include <errno.h> #include <string.h> -#include <sys/mman.h> #include <sys/stat.h> #include "sha1.h" +#ifdef __MINGW32__ +#include "mingw_support.h" +#else +#include <sys/mman.h> +#endif
#ifndef __ASSEMBLY__ #define __ASSEMBLY__ /* Dirty trick to get only #defines */

Signed-off-by: Peter Tyser ptyser@xes-inc.com --- Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile index e8b4c13..238ab1e 100644 --- a/Makefile +++ b/Makefile @@ -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

Signed-off-by: Peter Tyser ptyser@xes-inc.com --- tools/Makefile.win32 | 37 ------------------------------------- 1 files changed, 0 insertions(+), 37 deletions(-) delete mode 100644 tools/Makefile.win32
diff --git a/tools/Makefile.win32 b/tools/Makefile.win32 deleted file mode 100644 index 69dc44c..0000000 --- a/tools/Makefile.win32 +++ /dev/null @@ -1,37 +0,0 @@ -# -# (C) Copyright 2001 -# Wolfgang Denk, DENX Software Engineering, wd@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 $< -

Signed-off-by: Peter Tyser ptyser@xes-inc.com --- common/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/common/Makefile b/common/Makefile index f13cd11..f81f3d8 100644 --- a/common/Makefile +++ b/common/Makefile @@ -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

Dear Peter Tyser,
In message 160374df5e47fe9ec65c3b5ddff7edb5c63b5aa7.1236207433.git.ptyser@xes-inc.com you wrote:
Signed-off-by: Peter Tyser ptyser@xes-inc.com
common/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk

i would change "Deleted unused" in the summary to "Delete now unused" -mike

Dear Peter Tyser,
In message 8660452a3722e000f523eaaa906cea2c519b8cb0.1236207433.git.ptyser@xes-inc.com you wrote:
Signed-off-by: Peter Tyser ptyser@xes-inc.com
tools/Makefile.win32 | 37 ------------------------------------- 1 files changed, 0 insertions(+), 37 deletions(-) delete mode 100644 tools/Makefile.win32
Applied, thanks.
Best regards,
Wolfgang Denk

Dear Peter Tyser,
In message ac35a151dce48f9fa117b97479caf1345bcd7b27.1236207433.git.ptyser@xes-inc.com you wrote:
Signed-off-by: Peter Tyser ptyser@xes-inc.com
Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk

On Wednesday 04 March 2009 18:33:02 Peter Tyser wrote:
--- a/README +++ b/README +Note: If you wish to generate WIN32 versions of the utilities in
WIN32 -> Windows
the tools directory you can use the MinGW toolchain
(http://www.mingw.org). Set your HOST tools to the MinGW
binaries and execute 'make tools'. For example:
binaries -> cross-compiler
Binaries such as tools/mkimage.exe will be created which can
be executed on computers using Windows.
using -> running
--- a/include/linux/types.h +++ b/include/linux/types.h @@ -10,10 +10,13 @@
#ifndef __KERNEL_STRICT_NAMES
+#ifndef __MINGW32__ +/* prevent mingw overlaps for certain typedefs */ typedef __kernel_fd_set fd_set; typedef __kernel_dev_t dev_t; typedef __kernel_ino_t ino_t; typedef __kernel_mode_t mode_t; +#endif typedef __kernel_nlink_t nlink_t; typedef __kernel_off_t off_t; typedef __kernel_pid_t pid_t; @@ -54,7 +57,7 @@ typedef __kernel_loff_t loff_t; typedef __kernel_size_t size_t; #endif
-#ifndef _SSIZE_T +#if !defined(_SSIZE_T) && !defined(__MINGW32__) #define _SSIZE_T typedef __kernel_ssize_t ssize_t; #endif
perhaps we should be defining __KERNEL_STRICT_NAMES for host builds instead
--- a/tools/Makefile +++ b/tools/Makefile @@ -79,6 +79,14 @@ SFX = endif
# +# mingw toolchain requires mingw_support.c and generates .exe files +# +ifneq (,$(findstring mingw,$(shell $(HOSTCC) -v 2>&1 | grep mingw))) +MINGW_OBJ_FILES-y += mingw_support.o +SFX = .exe +endif
perhaps we should create a sfx.sh script which handles the logic of detecting the default suffix. would be a lot cleaner than relying on strings in toolchain names.
as for the mingw_support.c, how about we create a new "os_support.c" file which is always compiled and in there we can do things like: #ifdef MINGW # include "mingw_support.c" #elif ..... ... other system warts ... #endif
that would allow us to keep system-specific OBJ vars from popping up all over and having to constantly update the Makefile for them
-$(LOGO_H): $(obj)bmp_logo $(LOGO_BMP) +$(LOGO_H): $(obj)bmp_logo$(SFX) $(LOGO_BMP)
this is unrelated ... please move to a more appropriate patch and/or make it into its own
+void *mmap(void *addr, size_t len, int prot, int flags, int fd, int offset) +{
this is a pretty naïve implementation ... but it seems like for u-boot's usage, it should be complete ?
--- /dev/null +++ b/tools/mingw_support.h +/* Windows 64-bit access macros */ +#define LODWORD(l) ((DWORD)((DWORDLONG)(l))) +#define HIDWORD(l) ((DWORD)(((DWORDLONG)(l)>>32)&0xFFFFFFFF))
ugh, this makes my eyes burn. please change I to something that doesnt look like a bar (perhaps the common "x"), and add whitespace where appropriate.
--- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -25,6 +25,10 @@ +#ifdef __MINGW32__ +#include "mingw_support.h" +#endif --- a/tools/mkimage.h +++ b/tools/mkimage.h @@ -28,7 +28,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
why not move the mingw_support.h to mkimage.h ... then you wont have to touch mkimage.c. or create a new "os_support.h" header and move these differences there. then you wont have to copy & paste the same code to every tool that uses mmap(). -mike

On Wed, 2009-03-04 at 19:21 -0500, Mike Frysinger wrote:
On Wednesday 04 March 2009 18:33:02 Peter Tyser wrote:
--- a/README +++ b/README
the tools directory you can use the MinGW toolchain
(http://www.mingw.org). Set your HOST tools to the MinGW
binaries and execute 'make tools'. For example:
binaries -> cross-compiler
I think binaries is more fitting than cross-compiler since the mingw strip utility is also used. In theory other HOST tools might be used down the road.
--- a/include/linux/types.h +++ b/include/linux/types.h @@ -10,10 +10,13 @@
#ifndef __KERNEL_STRICT_NAMES
+#ifndef __MINGW32__ +/* prevent mingw overlaps for certain typedefs */ typedef __kernel_fd_set fd_set; typedef __kernel_dev_t dev_t; typedef __kernel_ino_t ino_t; typedef __kernel_mode_t mode_t; +#endif typedef __kernel_nlink_t nlink_t; typedef __kernel_off_t off_t; typedef __kernel_pid_t pid_t; @@ -54,7 +57,7 @@ typedef __kernel_loff_t loff_t; typedef __kernel_size_t size_t; #endif
-#ifndef _SSIZE_T +#if !defined(_SSIZE_T) && !defined(__MINGW32__) #define _SSIZE_T typedef __kernel_ssize_t ssize_t; #endif
perhaps we should be defining __KERNEL_STRICT_NAMES for host builds instead
I'll look into it.
--- a/tools/Makefile +++ b/tools/Makefile @@ -79,6 +79,14 @@ SFX = endif
# +# mingw toolchain requires mingw_support.c and generates .exe files +# +ifneq (,$(findstring mingw,$(shell $(HOSTCC) -v 2>&1 | grep mingw))) +MINGW_OBJ_FILES-y += mingw_support.o +SFX = .exe +endif
perhaps we should create a sfx.sh script which handles the logic of detecting the default suffix. would be a lot cleaner than relying on strings in toolchain names.
The above looks at the output of the "HOSTCC -v" command. The "Target: XXX" strings should contain mingw regardless of the naming of HOSTCC. How about combining the SFX detection into:
ifeq ($(HOSTOS),cygwin) HOST_CFLAGS += -ansi endif
# # toolchains targeting win32 generate .exe files # ifneq (,$(findstring WIN32 ,$(shell echo "" | $(HOSTCC) -E -dM -))) SFX = .exe else SFX = endif
+void *mmap(void *addr, size_t len, int prot, int flags, int fd, int offset) +{
this is a pretty naïve implementation ... but it seems like for u-boot's usage, it should be complete ?
I hope:) It looks sufficient based on my limited win32 programming knowledge and I tested the resulting mkimage.exe to validate its functionality.
--- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -25,6 +25,10 @@ +#ifdef __MINGW32__ +#include "mingw_support.h" +#endif --- a/tools/mkimage.h +++ b/tools/mkimage.h @@ -28,7 +28,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
why not move the mingw_support.h to mkimage.h ... then you wont have to touch mkimage.c. or create a new "os_support.h" header and move these differences there. then you wont have to copy & paste the same code to every tool that uses mmap().
I'll implement the os_support.[ch] idea as suggested.
Best, Peter

On Thursday 05 March 2009 13:32:27 Peter Tyser wrote:
On Wed, 2009-03-04 at 19:21 -0500, Mike Frysinger wrote:
On Wednesday 04 March 2009 18:33:02 Peter Tyser wrote:
--- a/README +++ b/README
the tools directory you can use the MinGW toolchain
(http://www.mingw.org). Set your HOST tools to the MinGW
binaries and execute 'make tools'. For example:
binaries -> cross-compiler
I think binaries is more fitting than cross-compiler since the mingw strip utility is also used. In theory other HOST tools might be used down the road.
cross-compiler usually encompasses the toolchain in lay terms. if you want to be strict, then use "toolchain". "binaries" is too vague: are you talking about programs that produce binaries that run on Windows ? or maybe you're talking about the binaries that run under Windows ?
--- a/tools/Makefile +++ b/tools/Makefile @@ -79,6 +79,14 @@ SFX = endif
# +# mingw toolchain requires mingw_support.c and generates .exe files +# +ifneq (,$(findstring mingw,$(shell $(HOSTCC) -v 2>&1 | grep mingw))) +MINGW_OBJ_FILES-y += mingw_support.o +SFX = .exe +endif
perhaps we should create a sfx.sh script which handles the logic of detecting the default suffix. would be a lot cleaner than relying on strings in toolchain names.
The above looks at the output of the "HOSTCC -v" command. The "Target: XXX" strings should contain mingw regardless of the naming of HOSTCC. How about combining the SFX detection into:
ifeq ($(HOSTOS),cygwin) HOST_CFLAGS += -ansi endif
# # toolchains targeting win32 generate .exe files # ifneq (,$(findstring WIN32 ,$(shell echo "" | $(HOSTCC) -E -dM -))) SFX = .exe else SFX = endif
you dont need the pipe if you simply redirect input from /dev/null ... otherwise, this looks better than the previous one -mike

Dear Peter Tyser,
In message 3c6c8b0c8a5a0dacbd19c414465b312cb0256a7d.1236207433.git.ptyser@xes-inc.com 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
Signed-off-by: Peter Tyser ptyser@xes-inc.com
README | 10 ++++++ include/image.h | 2 + include/libfdt_env.h | 12 +++++++ include/linux/types.h | 5 ++- tools/Makefile | 15 +++++++-- tools/mingw_support.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++ tools/mingw_support.h | 48 +++++++++++++++++++++++++++++ tools/mkimage.c | 4 ++ tools/mkimage.h | 5 +++ tools/ubsha1.c | 6 +++- 10 files changed, 181 insertions(+), 5 deletions(-) create mode 100644 tools/mingw_support.c create mode 100644 tools/mingw_support.h
Not applied. My understanding was that you would reposed a modified version. Please verify.
Best regards,
Wolfgang Denk

On Wednesday 04 March 2009 18:33:01 Peter Tyser wrote:
Signed-off-by: Peter Tyser ptyser@xes-inc.com
include/elf.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/elf.h b/include/elf.h index a9839df..3a948f7 100644 --- a/include/elf.h +++ b/include/elf.h @@ -45,6 +45,7 @@ #include <unistd.h> typedef unsigned char uint8_t; typedef unsigned short uint16_t; +typedef int int32_t; typedef unsigned int uint32_t; #endif
the mingw compiler provides int32_t types via stdint.h like pretty much every other sane system. why cant we use that instead ? -mike

On Wed, 2009-03-04 at 18:54 -0500, Mike Frysinger wrote:
On Wednesday 04 March 2009 18:33:01 Peter Tyser wrote:
Signed-off-by: Peter Tyser ptyser@xes-inc.com
include/elf.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/elf.h b/include/elf.h index a9839df..3a948f7 100644 --- a/include/elf.h +++ b/include/elf.h @@ -45,6 +45,7 @@ #include <unistd.h> typedef unsigned char uint8_t; typedef unsigned short uint16_t; +typedef int int32_t; typedef unsigned int uint32_t; #endif
the mingw compiler provides int32_t types via stdint.h like pretty much every other sane system. why cant we use that instead ?
It looks like we can, thanks for the pointer.

Dear Peter Tyser,
In message fda9baacdf53470f2653bd04a4677af78798ec49.1236207433.git.ptyser@xes-inc.com you wrote:
Signed-off-by: Peter Tyser ptyser@xes-inc.com
include/elf.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
Not applied; I understood that we agreed to use stdint.h instead. PLease verify.
Best regards,
Wolfgang Denk

On Wednesday 04 March 2009 18:33:00 Peter Tyser wrote:
Replace random()/srandom() use with rand()/srand() to support compilation with the mingw toolchain
i'd add to the changelog that in general, the latter should be more common than the former since they've been around longer. and note that no functionality should be lost as the sets of functions do the same thing. -mike

Dear Mike Frysinger,
In message 200903041853.05083.vapier@gentoo.org you wrote:
On Wednesday 04 March 2009 18:33:00 Peter Tyser wrote:
Replace random()/srandom() use with rand()/srand() to support compilation with the mingw toolchain
i'd add to the changelog that in general, the latter should be more common than the former since they've been around longer. and note that no functionality should be lost as the sets of functions do the same thing.
Comment added. Thanks.
Best regards,
Wolfgang Denk

Dear Peter Tyser,
In message 0bca9a93be63621ee791be20c6bd1c33495af517.1236207433.git.ptyser@xes-inc.com you wrote:
Replace random()/srandom() use with rand()/srand() to support compilation with the mingw toolchain
Signed-off-by: Peter Tyser ptyser@xes-inc.com
tools/gen_eth_addr.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk

Dear Peter Tyser,
In message 2b3b8ecc973665b7f706c787318cef12d035ae57.1236207433.git.ptyser@xes-inc.com you wrote:
Signed-off-by: Peter Tyser ptyser@xes-inc.com
doc/README.NetConsole | 6 ++---- tools/Makefile | 1 + 2 files changed, 3 insertions(+), 4 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk

Dear Peter Tyser,
In message e6917661fa7d502ec66b8371fd0b8e02aa75c4cf.1236207433.git.ptyser@xes-inc.com you wrote:
Signed-off-by: Peter Tyser ptyser@xes-inc.com
tools/Makefile | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk

Dear Peter Tyser,
In message 14dd76717b4b634d3860b9d7759726e52a9d455d.1236207433.git.ptyser@xes-inc.com you wrote:
Signed-off-by: Peter Tyser ptyser@xes-inc.com
tools/Makefile | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk

Dear Peter Tyser,
In message 7b401d04ef4d44513d04fe514d5919b59527ca85.1236207433.git.ptyser@xes-inc.com you wrote:
Signed-off-by: Peter Tyser ptyser@xes-inc.com
tools/Makefile | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk

Dear Peter Tyser,
In message 843a50a7133b20d731e1fb154c749c6d8e701b3a.1236207433.git.ptyser@xes-inc.com you wrote:
Signed-off-by: Peter Tyser ptyser@xes-inc.com
tools/Makefile | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk

Dear Peter Tyser,
In message 1939e61f7ae1d5fd4133207ca9935bdfde54d448.1236207433.git.ptyser@xes-inc.com you wrote:
Signed-off-by: Peter Tyser ptyser@xes-inc.com
tools/Makefile | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk

On Wednesday 04 March 2009 18:32:53 Peter Tyser wrote:
Signed-off-by: Peter Tyser ptyser@xes-inc.com
tools/Makefile | 107 +++++++++++++++++++++++++++++--------------------------- 1 files changed, 55 insertions(+), 52 deletions(-)
diff --git a/tools/Makefile b/tools/Makefile index 991ad8b..09512ec 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -21,57 +21,6 @@ # MA 02111-1307 USA #
-# 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)
this patch seems to move a large chunk of code around in the file for no real discernible reason ... maybe some unrelated changes got squashed here ? -mike

On Wed, 2009-03-04 at 18:48 -0500, Mike Frysinger wrote:
On Wednesday 04 March 2009 18:32:53 Peter Tyser wrote:
Signed-off-by: Peter Tyser ptyser@xes-inc.com
tools/Makefile | 107 +++++++++++++++++++++++++++++--------------------------- 1 files changed, 55 insertions(+), 52 deletions(-)
diff --git a/tools/Makefile b/tools/Makefile index 991ad8b..09512ec 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -21,57 +21,6 @@ # MA 02111-1307 USA #
-# 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)
this patch seems to move a large chunk of code around in the file for no real discernible reason ... maybe some unrelated changes got squashed here ?
I moved a chunk of code below the "include $(TOPDIR)/config.mk". The config.mk includes the include/autoconf.mk file which is needed for conditional compilation. I assumed it was necessary to include config.mk before referencing CONFIG_XXX values in the Makefile, so the change was intentional. Maybe there's some "make magic" such that the the order of the inclusion of config.mk doesn't matter, but I thought this was more logical even if it wasn't absolutely necessary.
Best, Peter

On Wednesday 04 March 2009 18:58:42 Peter Tyser wrote:
On Wed, 2009-03-04 at 18:48 -0500, Mike Frysinger wrote:
On Wednesday 04 March 2009 18:32:53 Peter Tyser wrote:
Signed-off-by: Peter Tyser ptyser@xes-inc.com
tools/Makefile | 107 +++++++++++++++++++++++++++++--------------------------- 1 files changed, 55 insertions(+), 52 deletions(-)
diff --git a/tools/Makefile b/tools/Makefile index 991ad8b..09512ec 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -21,57 +21,6 @@ # MA 02111-1307 USA #
-# 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)
this patch seems to move a large chunk of code around in the file for no real discernible reason ... maybe some unrelated changes got squashed here ?
I moved a chunk of code below the "include $(TOPDIR)/config.mk". The config.mk includes the include/autoconf.mk file which is needed for conditional compilation. I assumed it was necessary to include config.mk before referencing CONFIG_XXX values in the Makefile, so the change was intentional. Maybe there's some "make magic" such that the the order of the inclusion of config.mk doesn't matter, but I thought this was more logical even if it wasn't absolutely necessary.
please split that out then, or do the move when you did the mondo convert to the -y syntax in the first place (since you were already touching every line). going by the subject line, there should be only like 2-4 lines changed in this patch. -mike

Dear Peter Tyser,
In message 1236211122.27449.8.camel@localhost.localdomain you wrote:
I moved a chunk of code below the "include $(TOPDIR)/config.mk". The config.mk includes the include/autoconf.mk file which is needed for conditional compilation. I assumed it was necessary to include config.mk before referencing CONFIG_XXX values in the Makefile, so the change was intentional. Maybe there's some "make magic" such that the the order of the inclusion of config.mk doesn't matter, but I thought this was more logical even if it wasn't absolutely necessary.
Then document this (in the commit message), please.
Best regards,
Wolfgang Denk

Dear Peter Tyser,
In message 22a383f60a66b6c9baa54dcc1766b3ebde62c873.1236207433.git.ptyser@xes-inc.com you wrote:
Signed-off-by: Peter Tyser ptyser@xes-inc.com
tools/Makefile | 107 +++++++++++++++++++++++++++++--------------------------- 1 files changed, 55 insertions(+), 52 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk

Dear Peter Tyser,
In message 2e1eea15f282ac75853cd510fa4301e3f0763e75.1236207433.git.ptyser@xes-inc.com you wrote:
Split variable declarations into multiple lines and use the standard VAR-y convention. This should more easily allow conditional compilation of files in the future.
Signed-off-by: Peter Tyser ptyser@xes-inc.com
tools/Makefile | 46 ++++++++++++++++++++++++++++++++++------------ 1 files changed, 34 insertions(+), 12 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk

Dear Peter Tyser,
In message 774d4e517995c43614a1b3870814d6e5829ab6c3.1236207433.git.ptyser@xes-inc.com you wrote:
Signed-off-by: Peter Tyser ptyser@xes-inc.com
tools/Makefile | 153 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 77 insertions(+), 76 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk

On Wednesday 04 March 2009 18:32:50 Peter Tyser wrote:
This patch series attempts to do 2 things:
- Add support for generating win32 versions of the tools in tools/
- 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.
this looks like real good stuff ... and much better than your previous attempt for mingw support :)
even if the mingw pieces dont get merged, i certainly think all the others should
any patch i didnt comment on specifically means i agreed with it and would add my Acked-By tag ... otherwise, very minor things and then i'd ack it
cheers! -mike
participants (3)
-
Mike Frysinger
-
Peter Tyser
-
Wolfgang Denk