* [U-Boot] [PATCH 00/26 v2] tools/Makefile cleanup and win32 tool support
@ 2009-03-12 19:48 Peter Tyser
2009-03-12 19:48 ` [U-Boot] [PATCH 01/26 v2] Makefile: Make autoconf.mk a dependency of the depend target Peter Tyser
0 siblings, 1 reply; 40+ messages in thread
From: Peter Tyser @ 2009-03-12 19:48 UTC (permalink / raw)
To: u-boot
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
Peter Tyser (26):
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
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/Makefile: Give precedence to U-Boot's include directory
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 ++
common/Makefile | 2 +-
doc/README.NetConsole | 6 +-
include/elf.h | 7 +-
include/image.h | 2 +
include/libfdt_env.h | 12 ++
tools/Makefile | 314 ++++++++++++++++++-------------------------------
tools/Makefile.win32 | 37 ------
tools/gen_eth_addr.c | 6 +-
tools/mingw_support.c | 79 ++++++++++++
tools/mingw_support.h | 51 ++++++++
tools/mkimage.h | 7 +-
tools/os_support.c | 24 ++++
tools/os_support.h | 29 +++++
tools/ubsha1.c | 3 +
16 files changed, 349 insertions(+), 262 deletions(-)
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
^ permalink raw reply [flat|nested] 40+ messages in thread* [U-Boot] [PATCH 01/26 v2] Makefile: Make autoconf.mk a dependency of the depend target 2009-03-12 19:48 [U-Boot] [PATCH 00/26 v2] tools/Makefile cleanup and win32 tool support Peter Tyser @ 2009-03-12 19:48 ` Peter Tyser 2009-03-12 19:48 ` [U-Boot] [PATCH 02/26 v2] Makefile: Add removal of *.exe files to clean target Peter Tyser 2009-03-12 21:00 ` [U-Boot] [PATCH 01/26 v2] Makefile: Make autoconf.mk a dependency of the depend target Wolfgang Denk 0 siblings, 2 replies; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:48 UTC (permalink / raw) To: u-boot 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 Signed-off-by: Peter Tyser <ptyser@xes-inc.com> --- Makefile | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index e8b4c13..6f17ed1 100644 --- a/Makefile +++ b/Makefile @@ -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 -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 02/26 v2] Makefile: Add removal of *.exe files to clean target 2009-03-12 19:48 ` [U-Boot] [PATCH 01/26 v2] Makefile: Make autoconf.mk a dependency of the depend target Peter Tyser @ 2009-03-12 19:48 ` Peter Tyser 2009-03-12 19:48 ` [U-Boot] [PATCH 03/26 v2] common/Makefile: Conditionally compile env_embedded.o Peter Tyser 2009-03-12 21:00 ` [U-Boot] [PATCH 01/26 v2] Makefile: Make autoconf.mk a dependency of the depend target Wolfgang Denk 1 sibling, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:48 UTC (permalink / raw) To: u-boot 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 6f17ed1..b68de1c 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 -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 03/26 v2] common/Makefile: Conditionally compile env_embedded.o 2009-03-12 19:48 ` [U-Boot] [PATCH 02/26 v2] Makefile: Add removal of *.exe files to clean target Peter Tyser @ 2009-03-12 19:48 ` Peter Tyser 2009-03-12 19:48 ` [U-Boot] [PATCH 04/26 v2] elf.h: Use stdint.h to provide standard typedefs for WIN32 Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:48 UTC (permalink / raw) To: u-boot 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 -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 04/26 v2] elf.h: Use stdint.h to provide standard typedefs for WIN32 2009-03-12 19:48 ` [U-Boot] [PATCH 03/26 v2] common/Makefile: Conditionally compile env_embedded.o Peter Tyser @ 2009-03-12 19:48 ` Peter Tyser 2009-03-12 19:48 ` [U-Boot] [PATCH 05/26 v2] gen_eth_addr: Use POSIX rand() and srand() Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:48 UTC (permalink / raw) To: u-boot The original code provided an incomplete set of typedefs for WIN32 compiles and replicated the standard typedefs that are already provided by stdint.h Signed-off-by: Peter Tyser <ptyser@xes-inc.com> --- include/elf.h | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/include/elf.h b/include/elf.h index a9839df..f640388 100644 --- a/include/elf.h +++ b/include/elf.h @@ -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 /* -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 05/26 v2] gen_eth_addr: Use POSIX rand() and srand() 2009-03-12 19:48 ` [U-Boot] [PATCH 04/26 v2] elf.h: Use stdint.h to provide standard typedefs for WIN32 Peter Tyser @ 2009-03-12 19:48 ` Peter Tyser 2009-03-12 19:48 ` [U-Boot] [PATCH 06/26 v2] tools/Makefile: Remove HOSTARCH HOSTOS defines Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:48 UTC (permalink / raw) To: u-boot 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. 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, -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 06/26 v2] tools/Makefile: Remove HOSTARCH HOSTOS defines 2009-03-12 19:48 ` [U-Boot] [PATCH 05/26 v2] gen_eth_addr: Use POSIX rand() and srand() Peter Tyser @ 2009-03-12 19:48 ` Peter Tyser 2009-03-12 19:48 ` [U-Boot] [PATCH 07/26 v2] tools/Makefile: Remove inappropriate double-tabs Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:48 UTC (permalink / raw) To: u-boot The values of HOSTARCH and HOSTOS which are exported from the top-level Makefile should be used Signed-off-by: Peter Tyser <ptyser@xes-inc.com> --- tools/Makefile | 12 ------------ 1 files changed, 0 insertions(+), 12 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index 9e9ee15..e87daaf 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -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 = # -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 07/26 v2] tools/Makefile: Remove inappropriate double-tabs 2009-03-12 19:48 ` [U-Boot] [PATCH 06/26 v2] tools/Makefile: Remove HOSTARCH HOSTOS defines Peter Tyser @ 2009-03-12 19:48 ` Peter Tyser 2009-03-12 19:48 ` [U-Boot] [PATCH 08/26 v2] tools/Makefile: Split variable declarations into multiple lines Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:48 UTC (permalink / raw) To: u-boot 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 e87daaf..4219aef 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -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) >$@ ######################################################################### -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 08/26 v2] tools/Makefile: Split variable declarations into multiple lines 2009-03-12 19:48 ` [U-Boot] [PATCH 07/26 v2] tools/Makefile: Remove inappropriate double-tabs Peter Tyser @ 2009-03-12 19:48 ` Peter Tyser 2009-03-12 19:48 ` [U-Boot] [PATCH 09/26 v2] tools/Makefile: Build bmp_logo only when LCD or VIDEO logos are enabled Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:48 UTC (permalink / raw) To: u-boot 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. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> --- tools/Makefile | 86 ++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 53 insertions(+), 33 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index 4219aef..14da78d 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -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) $@ -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 09/26 v2] tools/Makefile: Build bmp_logo only when LCD or VIDEO logos are enabled 2009-03-12 19:48 ` [U-Boot] [PATCH 08/26 v2] tools/Makefile: Split variable declarations into multiple lines Peter Tyser @ 2009-03-12 19:48 ` Peter Tyser 2009-03-12 19:48 ` [U-Boot] [PATCH 10/26 v2] tools/Makefile: Make img2srec dependent upon CONFIG_CMD_LOADS Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:48 UTC (permalink / raw) To: u-boot Signed-off-by: Peter Tyser <ptyser@xes-inc.com> --- tools/Makefile | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index 14da78d..3c59bba 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -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 $@ $^ -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 10/26 v2] tools/Makefile: Make img2srec dependent upon CONFIG_CMD_LOADS 2009-03-12 19:48 ` [U-Boot] [PATCH 09/26 v2] tools/Makefile: Build bmp_logo only when LCD or VIDEO logos are enabled Peter Tyser @ 2009-03-12 19:48 ` Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 11/26 v2] tools/Makefile: Make ubsha1 dependent upon CONFIG_SHA1_CHECK_UB_IMG Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:48 UTC (permalink / raw) To: u-boot 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 3c59bba..b4bd417 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -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 -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 11/26 v2] tools/Makefile: Make ubsha1 dependent upon CONFIG_SHA1_CHECK_UB_IMG 2009-03-12 19:48 ` [U-Boot] [PATCH 10/26 v2] tools/Makefile: Make img2srec dependent upon CONFIG_CMD_LOADS Peter Tyser @ 2009-03-12 19:49 ` Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 12/26 v2] tools/Makefile: Make inca-swap-bytes dependent on CONFIG_INCA_IP Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:49 UTC (permalink / raw) To: u-boot 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 b4bd417..e314091 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -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 -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 12/26 v2] tools/Makefile: Make inca-swap-bytes dependent on CONFIG_INCA_IP 2009-03-12 19:49 ` [U-Boot] [PATCH 11/26 v2] tools/Makefile: Make ubsha1 dependent upon CONFIG_SHA1_CHECK_UB_IMG Peter Tyser @ 2009-03-12 19:49 ` Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 13/26 v2] tools/Makefile: Make envcrc dependent upon CONFIG_ENV_IS_EMBEDDED Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:49 UTC (permalink / raw) To: u-boot 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 e314091..942fae2 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -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) -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 13/26 v2] tools/Makefile: Make envcrc dependent upon CONFIG_ENV_IS_EMBEDDED 2009-03-12 19:49 ` [U-Boot] [PATCH 12/26 v2] tools/Makefile: Make inca-swap-bytes dependent on CONFIG_INCA_IP Peter Tyser @ 2009-03-12 19:49 ` Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 14/26 v2] tools/Makefile: Make gen_eth_addr dependent upon CONFIG_CMD_NET Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:49 UTC (permalink / raw) To: u-boot 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 942fae2..ec35f18 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -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 -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 14/26 v2] tools/Makefile: Make gen_eth_addr dependent upon CONFIG_CMD_NET 2009-03-12 19:49 ` [U-Boot] [PATCH 13/26 v2] tools/Makefile: Make envcrc dependent upon CONFIG_ENV_IS_EMBEDDED Peter Tyser @ 2009-03-12 19:49 ` Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 15/26 v2] tools/Makefile: Compile ncb when CONFIG_NETCONSOLE Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:49 UTC (permalink / raw) To: u-boot 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 ec35f18..f648d34 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -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 -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 15/26 v2] tools/Makefile: Compile ncb when CONFIG_NETCONSOLE 2009-03-12 19:49 ` [U-Boot] [PATCH 14/26 v2] tools/Makefile: Make gen_eth_addr dependent upon CONFIG_CMD_NET Peter Tyser @ 2009-03-12 19:49 ` Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 16/26 v2] tools/Makefile: Add tools/ to the include search path Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:49 UTC (permalink / raw) To: u-boot Also conditionally add ncb.o to OBJ_FILES list Signed-off-by: Peter Tyser <ptyser@xes-inc.com> --- doc/README.NetConsole | 6 ++---- tools/Makefile | 2 ++ 2 files changed, 4 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 f648d34..35e694d 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -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) -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 16/26 v2] tools/Makefile: Add tools/ to the include search path 2009-03-12 19:49 ` [U-Boot] [PATCH 15/26 v2] tools/Makefile: Compile ncb when CONFIG_NETCONSOLE Peter Tyser @ 2009-03-12 19:49 ` Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 17/26 v2] tools/Makefile: Give precedence to U-Boot's include directory Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:49 UTC (permalink / raw) To: u-boot This change makes the process of symlinking mkimage.h and fdt_host.h unnecessary Signed-off-by: Peter Tyser <ptyser@xes-inc.com> --- tools/Makefile | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index 35e694d..e1f262b 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -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 -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 17/26 v2] tools/Makefile: Give precedence to U-Boot's include directory 2009-03-12 19:49 ` [U-Boot] [PATCH 16/26 v2] tools/Makefile: Add tools/ to the include search path Peter Tyser @ 2009-03-12 19:49 ` Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 18/26 v2] tools/Makefile: Add libfdt/ to the include search path Peter Tyser ` (2 more replies) 0 siblings, 3 replies; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:49 UTC (permalink / raw) To: u-boot Update include search path so that the includes in U-Boot's include/ directory have precedence over system includes. This allows crc32.c to use U-Boot's zlib.h header which removes the previously required symlinked zlib.h. The 'pedantic' gcc flag was also removed to prevent new warnings of "long long" variables which occurred as a result of this change. Strict ISO C is not required for the tools thus the pedantic flag is not strictly necessary. The __32 typedef for WIN32 targets in mkimage.h is also no longer necessary because U-Boot's asm-xxx/types.h provides it. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> --- Makefile | 2 +- tools/Makefile | 15 +++++---------- tools/mkimage.h | 2 -- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index b68de1c..ecb8430 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/tools/Makefile b/tools/Makefile index e1f262b..db4ecc8 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -42,7 +42,7 @@ HOST_ENVIRO_CFLAGS = else ifeq ($(HOSTOS)-$(HOSTARCH),netbsd-ppc) -HOST_CFLAGS = -Wall -pedantic +HOST_CFLAGS = -Wall HOST_LDFLAGS = HOST_ENVIRO_CFLAGS = @@ -50,7 +50,7 @@ HOST_ENVIRO_CFLAGS = # Everyone else # else -HOST_CFLAGS = -Wall -pedantic +HOST_CFLAGS = -Wall HOST_LDFLAGS = HOST_ENVIRO_CFLAGS = endif @@ -133,10 +133,9 @@ LIBFDT_OBJS := $(addprefix $(obj),$(LIBFDT_OBJ_FILES-y)) # # Use native tools and options # -CPPFLAGS = -idirafter $(SRCTREE)/include \ - -idirafter $(OBJTREE)/include2 \ - -idirafter $(OBJTREE)/include \ +CPPFLAGS = -I $(SRCTREE)/include \ -I $(SRCTREE)/tools \ + -idirafter $(OBJTREE)/include2 \ -DTEXT_BASE=$(TEXT_BASE) -DUSE_HOSTCC CFLAGS = $(HOST_CFLAGS) $(CPPFLAGS) -O @@ -258,11 +257,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: @rm -f $(obj)crc32.c ln -s $(src)../lib_generic/crc32.c $(obj)crc32.c diff --git a/tools/mkimage.h b/tools/mkimage.h index a2d5248..9b4c0ce 100644 --- a/tools/mkimage.h +++ b/tools/mkimage.h @@ -54,8 +54,6 @@ #endif #ifdef __WIN32__ -typedef unsigned int __u32; - #define SWAP_LONG(x) \ ((__u32)( \ (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \ -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 18/26 v2] tools/Makefile: Add libfdt/ to the include search path 2009-03-12 19:49 ` [U-Boot] [PATCH 17/26 v2] tools/Makefile: Give precedence to U-Boot's include directory Peter Tyser @ 2009-03-12 19:49 ` Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 19/26 v2] tools/Makefile: Remove symlinks for fdt targets Peter Tyser 2009-03-12 23:01 ` [U-Boot] [PATCH 17/26 v2] tools/Makefile: Give precedence to U-Boot's include directory Mike Frysinger 2009-03-18 16:28 ` Scott Wood 2 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:49 UTC (permalink / raw) To: u-boot This change makes the process of symlinking libfdt_internal.h unnecessary Signed-off-by: Peter Tyser <ptyser@xes-inc.com> --- Makefile | 2 +- tools/Makefile | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index ecb8430..4bee5ca 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/tools/Makefile b/tools/Makefile index db4ecc8..337d695 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -135,6 +135,7 @@ LIBFDT_OBJS := $(addprefix $(obj),$(LIBFDT_OBJ_FILES-y)) # CPPFLAGS = -I $(SRCTREE)/include \ -I $(SRCTREE)/tools \ + -I $(SRCTREE)/libfdt \ -idirafter $(OBJTREE)/include2 \ -DTEXT_BASE=$(TEXT_BASE) -DUSE_HOSTCC CFLAGS = $(HOST_CFLAGS) $(CPPFLAGS) -O @@ -273,30 +274,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) >$@ -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 19/26 v2] tools/Makefile: Remove symlinks for fdt targets 2009-03-12 19:49 ` [U-Boot] [PATCH 18/26 v2] tools/Makefile: Add libfdt/ to the include search path Peter Tyser @ 2009-03-12 19:49 ` Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 20/26 v2] tools/Makefile: Dynamically generate libfdt object dependencies Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:49 UTC (permalink / raw) To: u-boot Signed-off-by: Peter Tyser <ptyser@xes-inc.com> --- Makefile | 3 +-- tools/Makefile | 32 +++++++------------------------- 2 files changed, 8 insertions(+), 27 deletions(-) diff --git a/Makefile b/Makefile index 4bee5ca..ef95339 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/tools/Makefile b/tools/Makefile index 337d695..99423b2 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -22,6 +22,7 @@ # TOOLSUBDIRS = +LIBFDT_DIR = $(SRCTREE)/libfdt/ # # Mac OS X / Darwin's C preprocessor is Apple specific. It @@ -222,19 +223,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: @@ -274,26 +276,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) >$@ -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 20/26 v2] tools/Makefile: Dynamically generate libfdt object dependencies 2009-03-12 19:49 ` [U-Boot] [PATCH 19/26 v2] tools/Makefile: Remove symlinks for fdt targets Peter Tyser @ 2009-03-12 19:49 ` Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 21/26 v2] tools/Makefile: Remove symlinks for remaining source files Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:49 UTC (permalink / raw) To: u-boot Add the libfdt files to the SRCS variable so that they have their dependencies automatically generated Signed-off-by: Peter Tyser <ptyser@xes-inc.com> --- tools/Makefile | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index 99423b2..e3abf56 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -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)) @@ -223,20 +223,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: -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 21/26 v2] tools/Makefile: Remove symlinks for remaining source files 2009-03-12 19:49 ` [U-Boot] [PATCH 20/26 v2] tools/Makefile: Dynamically generate libfdt object dependencies Peter Tyser @ 2009-03-12 19:49 ` Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 22/26 v2] tools/Makefile: Use auto-generated object file dependencies Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:49 UTC (permalink / raw) To: u-boot Signed-off-by: Peter Tyser <ptyser@xes-inc.com> --- Makefile | 3 +-- tools/Makefile | 43 +++++++++++++------------------------------ 2 files changed, 14 insertions(+), 32 deletions(-) diff --git a/Makefile b/Makefile index ef95339..dfcb71b 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/tools/Makefile b/tools/Makefile index e3abf56..e996bb9 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -83,11 +83,12 @@ 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 -OBJ_LINKS-y += crc32.o md5.o -OBJ_LINKS-y += sha1.o -OBJ_LINKS-y += image.o +# Source files which exist outside the tools directory +EXT_OBJ_FILES-y += common/env_embedded.o +EXT_OBJ_FILES-y += lib_generic/crc32.o +EXT_OBJ_FILES-y += lib_generic/md5.o +EXT_OBJ_FILES-y += lib_generic/sha1.o +EXT_OBJ_FILES-y += common/image.o # Source files located in the tools directory OBJ_FILES-$(CONFIG_CMD_LOADS) += img2srec.o @@ -126,7 +127,8 @@ LOGO_BMP= logos/atmel.bmp endif # now $(obj) is defined -SRCS := $(addprefix $(obj),$(OBJ_LINKS-y:.o=.c)) $(OBJ_FILES-y:.o=.c) +SRCS += $(addprefix $(SRCTREE)/,$(EXT_OBJ_FILES-y:.o=.c)) +SRCS += $(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)) @@ -196,16 +198,16 @@ $(obj)envcrc.o: $(src)envcrc.c $(obj)ubsha1.o: $(src)ubsha1.c $(CC) -g $(CFLAGS) -c -o $@ $< -$(obj)crc32.o: $(obj)crc32.c +$(obj)crc32.o: $(SRCTREE)/lib_generic/crc32.c $(CC) -g $(CFLAGS) -c -o $@ $< -$(obj)md5.o: $(obj)md5.c +$(obj)md5.o: $(SRCTREE)/lib_generic/md5.c $(CC) -g $(CFLAGS) -c -o $@ $< -$(obj)sha1.o: $(obj)sha1.c +$(obj)sha1.o: $(SRCTREE)/lib_gneric/sha1.c $(CC) -g $(CFLAGS) -c -o $@ $< -$(obj)image.o: $(obj)image.c +$(obj)image.o: $(SRCTREE)/common/image.c $(CC) -g $(FIT_CFLAGS) -c -o $@ $< $(obj)mkimage.o: $(src)mkimage.c @@ -252,28 +254,9 @@ else done endif -$(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 +$(obj)env_embedded.o: $(SRCTREE)/common/env_embedded.c $(CC) -g $(HOST_ENVIRO_CFLAGS) $(CPPFLAGS) -c -o $@ $< -$(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 - -$(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 $(LOGO_H): $(obj)bmp_logo $(LOGO_BMP) $(obj)./bmp_logo $(LOGO_BMP) >$@ -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 22/26 v2] tools/Makefile: Use auto-generated object file dependencies 2009-03-12 19:49 ` [U-Boot] [PATCH 21/26 v2] tools/Makefile: Remove symlinks for remaining source files Peter Tyser @ 2009-03-12 19:49 ` Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 23/26 v2] tools/Makefile: Create generic build rules Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:49 UTC (permalink / raw) To: u-boot Files in the SRCS variable have their dependencies automatically generated so remove duplicate explicit dependencies Signed-off-by: Peter Tyser <ptyser@xes-inc.com> --- tools/Makefile | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index e996bb9..c4d6e1b 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -192,37 +192,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: @@ -254,7 +254,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 $@ $< -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 23/26 v2] tools/Makefile: Create generic build rules 2009-03-12 19:49 ` [U-Boot] [PATCH 22/26 v2] tools/Makefile: Use auto-generated object file dependencies Peter Tyser @ 2009-03-12 19:49 ` Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 24/26 v2] tools/Makefile: Simplify HOST_CFLAGS/HOST_LDFLAGS generation Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:49 UTC (permalink / raw) To: u-boot Create a few generic build rules to replace the current method which has 1 build target for each file Signed-off-by: Peter Tyser <ptyser@xes-inc.com> --- tools/Makefile | 55 +++++++------------------------------------------------ 1 files changed, 7 insertions(+), 48 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index c4d6e1b..25f8150 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -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 HOST_LDFLAGS = -HOST_ENVIRO_CFLAGS = # # Everyone else @@ -52,7 +50,6 @@ HOST_ENVIRO_CFLAGS = else HOST_CFLAGS = -Wall 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)) @@ -192,52 +189,18 @@ $(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: +# mkimage.c requires FIT_CFLAGS instead of standard CFLAGS +$(obj)mkimage.o: $(SRCTREE)/tools/mkimage.c $(CC) -g $(FIT_CFLAGS) -c -o $@ $< -$(obj)mkimage.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)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: +$(obj)%.o: $(SRCTREE)/lib_generic/%.c $(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: - $(CC) -g $(FIT_CFLAGS) -c -o $@ $< - -$(obj)fdt_strerror.o: - $(CC) -g $(FIT_CFLAGS) -c -o $@ $< - -$(obj)fdt_wip.o: +$(LIBFDT_OBJS): $(CC) -g $(FIT_CFLAGS) -c -o $@ $< subdirs: @@ -254,10 +217,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) >$@ -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 24/26 v2] tools/Makefile: Simplify HOST_CFLAGS/HOST_LDFLAGS generation 2009-03-12 19:49 ` [U-Boot] [PATCH 23/26 v2] tools/Makefile: Create generic build rules Peter Tyser @ 2009-03-12 19:49 ` Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 25/26 v2] Add support for building native win32 tools Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:49 UTC (permalink / raw) To: u-boot Signed-off-by: Peter Tyser <ptyser@xes-inc.com> --- tools/Makefile | 15 +++------------ 1 files changed, 3 insertions(+), 12 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index 25f8150..6a40d88 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -35,22 +35,13 @@ 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 HOST_LDFLAGS = -# -# Everyone else -# -else -HOST_CFLAGS = -Wall -HOST_LDFLAGS = -endif +ifeq ($(HOSTOS)-$(HOSTARCH),darwin-ppc) +HOST_CFLAGS += -traditional-cpp +HOST_LDFLAGS += -multiply_defined suppress endif # -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 25/26 v2] Add support for building native win32 tools 2009-03-12 19:49 ` [U-Boot] [PATCH 24/26 v2] tools/Makefile: Simplify HOST_CFLAGS/HOST_LDFLAGS generation Peter Tyser @ 2009-03-12 19:49 ` Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 26/26 v2] Delete now unused tools/Makefile.win32 Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:49 UTC (permalink / raw) To: u-boot 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 +++++++ tools/Makefile | 18 +++++++---- 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, 227 insertions(+), 6 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 diff --git a/README b/README index 43fb1c0..3fb2814 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 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: 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/tools/Makefile b/tools/Makefile index 6a40d88..c8d673f 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -44,12 +44,15 @@ HOST_CFLAGS += -traditional-cpp HOST_LDFLAGS += -multiply_defined suppress 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 @@ -88,6 +91,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) @@ -123,12 +127,14 @@ LIBFDT_OBJS := $(addprefix $(obj),$(LIBFDT_OBJ_FILES-y)) # # Use native tools and options +# Define __KERNEL_STRICT_NAMES to prevent typedef overlaps # CPPFLAGS = -I $(SRCTREE)/include \ -I $(SRCTREE)/tools \ -I $(SRCTREE)/libfdt \ -idirafter $(OBJTREE)/include2 \ - -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 @@ -144,7 +150,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 @@ -152,7 +158,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) $@ 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..1fb6c93 --- /dev/null +++ b/tools/mingw_support.h @@ -0,0 +1,51 @@ +/* + * 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(x) ((DWORD)((DWORDLONG)(x))) +#define HIDWORD(x) ((DWORD)(((DWORDLONG)(x) >> 32) & 0xffffffff)) + +typedef UINT uint; +typedef ULONG ulong; + +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.h b/tools/mkimage.h index 9b4c0ce..23b5076 100644 --- a/tools/mkimage.h +++ b/tools/mkimage.h @@ -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> diff --git a/tools/os_support.c b/tools/os_support.c new file mode 100644 index 0000000..001fe64 --- /dev/null +++ b/tools/os_support.c @@ -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 diff --git a/tools/os_support.h b/tools/os_support.h new file mode 100644 index 0000000..f6f86b0 --- /dev/null +++ b/tools/os_support.h @@ -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_ */ diff --git a/tools/ubsha1.c b/tools/ubsha1.c index b37b2b7..c4203ed 100644 --- a/tools/ubsha1.c +++ b/tools/ubsha1.c @@ -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" -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 26/26 v2] Delete now unused tools/Makefile.win32 2009-03-12 19:49 ` [U-Boot] [PATCH 25/26 v2] Add support for building native win32 tools Peter Tyser @ 2009-03-12 19:49 ` Peter Tyser 0 siblings, 0 replies; 40+ messages in thread From: Peter Tyser @ 2009-03-12 19:49 UTC (permalink / raw) To: u-boot 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 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 $< - -- 1.6.0.2.GIT ^ permalink raw reply related [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 17/26 v2] tools/Makefile: Give precedence to U-Boot's include directory 2009-03-12 19:49 ` [U-Boot] [PATCH 17/26 v2] tools/Makefile: Give precedence to U-Boot's include directory Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 18/26 v2] tools/Makefile: Add libfdt/ to the include search path Peter Tyser @ 2009-03-12 23:01 ` Mike Frysinger 2009-03-12 23:19 ` Wolfgang Denk 2009-03-18 16:28 ` Scott Wood 2 siblings, 1 reply; 40+ messages in thread From: Mike Frysinger @ 2009-03-12 23:01 UTC (permalink / raw) To: u-boot On Thursday 12 March 2009 15:49:06 Peter Tyser wrote: > Update include search path so that the includes in U-Boot's include/ > directory have precedence over system includes. This allows crc32.c > to use U-Boot's zlib.h header which removes the previously required > symlinked zlib.h. this seems pretty risky. the headers in include/ are pretty much for u-boot. making those with the host headers seems like it's doomed to failure. -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/20090312/a2ac8660/attachment.pgp ^ permalink raw reply [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 17/26 v2] tools/Makefile: Give precedence to U-Boot's include directory 2009-03-12 23:01 ` [U-Boot] [PATCH 17/26 v2] tools/Makefile: Give precedence to U-Boot's include directory Mike Frysinger @ 2009-03-12 23:19 ` Wolfgang Denk 2009-03-12 23:53 ` Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Wolfgang Denk @ 2009-03-12 23:19 UTC (permalink / raw) To: u-boot Dear Mike Frysinger, In message <200903121901.23433.vapier@gentoo.org> you wrote: > > On Thursday 12 March 2009 15:49:06 Peter Tyser wrote: > > Update include search path so that the includes in U-Boot's include/ > > directory have precedence over system includes. This allows crc32.c > > to use U-Boot's zlib.h header which removes the previously required > > symlinked zlib.h. > > this seems pretty risky. the headers in include/ are pretty much for u-boot. > making those with the host headers seems like it's doomed to failure. Indeed. Full NAK from me, too. Best regards, Wolfgang Denk -- 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 was sliced bread the greatest thing since? ^ permalink raw reply [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 17/26 v2] tools/Makefile: Give precedence to U-Boot's include directory 2009-03-12 23:19 ` Wolfgang Denk @ 2009-03-12 23:53 ` Peter Tyser 2009-03-13 0:02 ` Andy Fleming 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 23:53 UTC (permalink / raw) To: u-boot On Fri, 2009-03-13 at 00:19 +0100, Wolfgang Denk wrote: > Dear Mike Frysinger, > > In message <200903121901.23433.vapier@gentoo.org> you wrote: > > > > On Thursday 12 March 2009 15:49:06 Peter Tyser wrote: > > > Update include search path so that the includes in U-Boot's include/ > > > directory have precedence over system includes. This allows crc32.c > > > to use U-Boot's zlib.h header which removes the previously required > > > symlinked zlib.h. > > > > this seems pretty risky. the headers in include/ are pretty much for u-boot. > > making those with the host headers seems like it's doomed to failure. > > Indeed. > > Full NAK from me, too. So what's a good fix? U-Boot's crc32() prototype uses uint32_t while the standard zlib uses ulongs (It looks like Mike tried to keep U-Boot's zlib.h header in line with the standard zlib.h, but then resorted to using uint32_t's a year ago: http://www.mail-archive.com/u-boot-users at lists.sourceforge.net/msg03726.html ). The first workarounds that popped to mind are: 1. link with zlib to provide crc32() instead of compiling u-boot's version 2. keep doing the symlink song and dance to give u-boot's zlib.h priority 3. put u-boot's crc32() prototype back in line with zlib's and implement Mike's original solution 4. put u-boot's crc32() prototype back in line with zlib's and do some preprocessor magic (look at __SIZE_TYPE__, __LONG_MAX__, etc) - not sure if this is possible/portable 5. some other idea? Thanks, Peter ^ permalink raw reply [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 17/26 v2] tools/Makefile: Give precedence to U-Boot's include directory 2009-03-12 23:53 ` Peter Tyser @ 2009-03-13 0:02 ` Andy Fleming 2009-03-13 20:05 ` Peter Tyser 0 siblings, 1 reply; 40+ messages in thread From: Andy Fleming @ 2009-03-13 0:02 UTC (permalink / raw) To: u-boot On Thu, Mar 12, 2009 at 6:53 PM, Peter Tyser <ptyser@xes-inc.com> wrote: > On Fri, 2009-03-13 at 00:19 +0100, Wolfgang Denk wrote: >> Dear Mike Frysinger, >> >> In message <200903121901.23433.vapier@gentoo.org> you wrote: >> > >> > On Thursday 12 March 2009 15:49:06 Peter Tyser wrote: >> > > Update include search path so that the includes in U-Boot's include/ >> > > directory have precedence over system includes. ?This allows crc32.c >> > > to use U-Boot's zlib.h header which removes the previously required >> > > symlinked zlib.h. >> > >> > this seems pretty risky. ?the headers in include/ are pretty much for u-boot. >> > making those with the host headers seems like it's doomed to failure. >> >> Indeed. >> >> Full NAK from me, too. > > So what's a good fix? ?U-Boot's crc32() prototype uses uint32_t while > the standard zlib uses ulongs (It looks like Mike tried to keep U-Boot's > zlib.h header in line with the standard zlib.h, but then resorted to > using uint32_t's a year ago: > http://www.mail-archive.com/u-boot-users at lists.sourceforge.net/msg03726.html ). Take a look at 20a14a42a25f72e379f38460b8a8484667536795 Basically, modify the tools to explicitly go after the u-boot version of the header when that is the desired behavior. Andy ^ permalink raw reply [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 17/26 v2] tools/Makefile: Give precedence to U-Boot's include directory 2009-03-13 0:02 ` Andy Fleming @ 2009-03-13 20:05 ` Peter Tyser 0 siblings, 0 replies; 40+ messages in thread From: Peter Tyser @ 2009-03-13 20:05 UTC (permalink / raw) To: u-boot On Thu, 2009-03-12 at 19:02 -0500, Andy Fleming wrote: > On Thu, Mar 12, 2009 at 6:53 PM, Peter Tyser <ptyser@xes-inc.com> wrote: > > On Fri, 2009-03-13 at 00:19 +0100, Wolfgang Denk wrote: > >> Dear Mike Frysinger, > >> > >> In message <200903121901.23433.vapier@gentoo.org> you wrote: > >> > > >> > On Thursday 12 March 2009 15:49:06 Peter Tyser wrote: > >> > > Update include search path so that the includes in U-Boot's include/ > >> > > directory have precedence over system includes. This allows crc32.c > >> > > to use U-Boot's zlib.h header which removes the previously required > >> > > symlinked zlib.h. > >> > > >> > this seems pretty risky. the headers in include/ are pretty much for u-boot. > >> > making those with the host headers seems like it's doomed to failure. > >> > >> Indeed. > >> > >> Full NAK from me, too. > > > > So what's a good fix? U-Boot's crc32() prototype uses uint32_t while > > the standard zlib uses ulongs (It looks like Mike tried to keep U-Boot's > > zlib.h header in line with the standard zlib.h, but then resorted to > > using uint32_t's a year ago: > > http://www.mail-archive.com/u-boot-users at lists.sourceforge.net/msg03726.html ). Thanks Andy, that looks a lot cleaner and simpler. I'll resubmit the series shortly. Peter ^ permalink raw reply [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 17/26 v2] tools/Makefile: Give precedence to U-Boot's include directory 2009-03-12 19:49 ` [U-Boot] [PATCH 17/26 v2] tools/Makefile: Give precedence to U-Boot's include directory Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 18/26 v2] tools/Makefile: Add libfdt/ to the include search path Peter Tyser 2009-03-12 23:01 ` [U-Boot] [PATCH 17/26 v2] tools/Makefile: Give precedence to U-Boot's include directory Mike Frysinger @ 2009-03-18 16:28 ` Scott Wood 2009-03-18 16:36 ` Peter Tyser 2009-03-23 14:43 ` Peter Tyser 2 siblings, 2 replies; 40+ messages in thread From: Scott Wood @ 2009-03-18 16:28 UTC (permalink / raw) To: u-boot On Thu, Mar 12, 2009 at 02:49:06PM -0500, Peter Tyser wrote: > - @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,} That comma at the end looks like it would delete the tools directory, except for the lack of -r. -Scott ^ permalink raw reply [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 17/26 v2] tools/Makefile: Give precedence to U-Boot's include directory 2009-03-18 16:28 ` Scott Wood @ 2009-03-18 16:36 ` Peter Tyser 2009-03-18 16:47 ` Wolfgang Denk 2009-03-23 14:43 ` Peter Tyser 1 sibling, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-18 16:36 UTC (permalink / raw) To: u-boot On Wed, 2009-03-18 at 11:28 -0500, Scott Wood wrote: > On Thu, Mar 12, 2009 at 02:49:06PM -0500, Peter Tyser wrote: > > - @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,} > > That comma at the end looks like it would delete the tools directory, except > for the lack of -r. Thanks for the catch. Do maintainers generally prefer that just the 1 patch be resubmitted, or the whole patch series? ^ permalink raw reply [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 17/26 v2] tools/Makefile: Give precedence to U-Boot's include directory 2009-03-18 16:36 ` Peter Tyser @ 2009-03-18 16:47 ` Wolfgang Denk 0 siblings, 0 replies; 40+ messages in thread From: Wolfgang Denk @ 2009-03-18 16:47 UTC (permalink / raw) To: u-boot Dear Peter Tyser, In message <1237394171.13370.1059.camel@localhost.localdomain> you wrote: > On Wed, 2009-03-18 at 11:28 -0500, Scott Wood wrote: > > On Thu, Mar 12, 2009 at 02:49:06PM -0500, Peter Tyser wrote: > > > - @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,} > > > > That comma at the end looks like it would delete the tools directory, except > > for the lack of -r. > > Thanks for the catch. Do maintainers generally prefer that just the 1 > patch be resubmitted, or the whole patch series? As long as you have to repost only one (or two) of the patches, just post these. When many patches of the series need to be updated, you probably want to regenerate the whole seris anyway to make sure it still applies. Best regards, Wolfgang Denk -- 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 Worlds may change, galaxies disintegrate, but a woman always remains a woman. -- Kirk, "The Conscience of the King", stardate 2818.9 ^ permalink raw reply [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 17/26 v2] tools/Makefile: Give precedence to U-Boot's include directory 2009-03-18 16:28 ` Scott Wood 2009-03-18 16:36 ` Peter Tyser @ 2009-03-23 14:43 ` Peter Tyser 2009-03-23 18:37 ` Mike Frysinger 1 sibling, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-23 14:43 UTC (permalink / raw) To: u-boot On Wed, 2009-03-18 at 11:28 -0500, Scott Wood wrote: > On Thu, Mar 12, 2009 at 02:49:06PM -0500, Peter Tyser wrote: > > - @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,} > > That comma at the end looks like it would delete the tools directory, except > for the lack of -r. Hi Wolfgang, The issue Scott brought up is not present in the most recent version (v3) of the patchset, so I won't be sending a fix as I implied in a previous email. Feel free to merge the changeset if/when you feel comfortable with it. Best, Peter ^ permalink raw reply [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 17/26 v2] tools/Makefile: Give precedence to U-Boot's include directory 2009-03-23 14:43 ` Peter Tyser @ 2009-03-23 18:37 ` Mike Frysinger 0 siblings, 0 replies; 40+ messages in thread From: Mike Frysinger @ 2009-03-23 18:37 UTC (permalink / raw) To: u-boot On Monday 23 March 2009 10:43:55 Peter Tyser wrote: > On Wed, 2009-03-18 at 11:28 -0500, Scott Wood wrote: > > On Thu, Mar 12, 2009 at 02:49:06PM -0500, Peter Tyser wrote: > > > - @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,} > > > > That comma at the end looks like it would delete the tools directory, > > except for the lack of -r. > > Hi Wolfgang, > The issue Scott brought up is not present in the most recent version > (v3) of the patchset, so I won't be sending a fix as I implied in a > previous email. Feel free to merge the changeset if/when you feel > comfortable with it. you can post individual updates to a thread (since git send-email allows you to set the reply-to id). so if you post a patchset (v2) and only one or two patches needs a tweak, post those updates as sub-replies. -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/20090323/0fae4195/attachment.pgp ^ permalink raw reply [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 01/26 v2] Makefile: Make autoconf.mk a dependency of the depend target 2009-03-12 19:48 ` [U-Boot] [PATCH 01/26 v2] Makefile: Make autoconf.mk a dependency of the depend target Peter Tyser 2009-03-12 19:48 ` [U-Boot] [PATCH 02/26 v2] Makefile: Add removal of *.exe files to clean target Peter Tyser @ 2009-03-12 21:00 ` Wolfgang Denk 2009-03-12 21:12 ` Peter Tyser 1 sibling, 1 reply; 40+ messages in thread From: Wolfgang Denk @ 2009-03-12 21:00 UTC (permalink / raw) To: u-boot Dear Peter Tyser, In message <1236887355-31359-2-git-send-email-ptyser@xes-inc.com> 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 > > Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Just a question on this patch series - is it based on the "next" branch? Best regards, Wolfgang Denk -- 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 ^ permalink raw reply [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 01/26 v2] Makefile: Make autoconf.mk a dependency of the depend target 2009-03-12 21:00 ` [U-Boot] [PATCH 01/26 v2] Makefile: Make autoconf.mk a dependency of the depend target Wolfgang Denk @ 2009-03-12 21:12 ` Peter Tyser 2009-03-12 21:37 ` Wolfgang Denk 0 siblings, 1 reply; 40+ messages in thread From: Peter Tyser @ 2009-03-12 21:12 UTC (permalink / raw) To: u-boot On Thu, 2009-03-12 at 22:00 +0100, Wolfgang Denk wrote: > Dear Peter Tyser, > > In message <1236887355-31359-2-git-send-email-ptyser@xes-inc.com> 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 > > > > Signed-off-by: Peter Tyser <ptyser@xes-inc.com> > > Just a question on this patch series - is it based on the "next" > branch? Testing/development was done on the "master" branch, but I did verify the series applies cleanly to the "next" branch. The binaries generated when using the "next" branch code "appeared" to work at a quick glance. Let me know if you'd prefer to apply it to the "next" branch and I can do a bit more testing quickly. Best, Peter ^ permalink raw reply [flat|nested] 40+ messages in thread
* [U-Boot] [PATCH 01/26 v2] Makefile: Make autoconf.mk a dependency of the depend target 2009-03-12 21:12 ` Peter Tyser @ 2009-03-12 21:37 ` Wolfgang Denk 0 siblings, 0 replies; 40+ messages in thread From: Wolfgang Denk @ 2009-03-12 21:37 UTC (permalink / raw) To: u-boot Dear Peter Tyser, In message <1236892324.17861.33.camel@localhost.localdomain> you wrote: > > Testing/development was done on the "master" branch, but I did verify > the series applies cleanly to the "next" branch. The binaries generated > when using the "next" branch code "appeared" to work at a quick glance. > Let me know if you'd prefer to apply it to the "next" branch and I can > do a bit more testing quickly. It is not a strict bug fix and this will not go in befopre the next merge window opens. And I posted a request that allpatches for the next release should be based on the "next" branch. Best regards, Wolfgang Denk -- 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 "I didn't know it was impossible when I did it." ^ permalink raw reply [flat|nested] 40+ messages in thread
end of thread, other threads:[~2009-03-23 18:37 UTC | newest] Thread overview: 40+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-03-12 19:48 [U-Boot] [PATCH 00/26 v2] tools/Makefile cleanup and win32 tool support Peter Tyser 2009-03-12 19:48 ` [U-Boot] [PATCH 01/26 v2] Makefile: Make autoconf.mk a dependency of the depend target Peter Tyser 2009-03-12 19:48 ` [U-Boot] [PATCH 02/26 v2] Makefile: Add removal of *.exe files to clean target Peter Tyser 2009-03-12 19:48 ` [U-Boot] [PATCH 03/26 v2] common/Makefile: Conditionally compile env_embedded.o Peter Tyser 2009-03-12 19:48 ` [U-Boot] [PATCH 04/26 v2] elf.h: Use stdint.h to provide standard typedefs for WIN32 Peter Tyser 2009-03-12 19:48 ` [U-Boot] [PATCH 05/26 v2] gen_eth_addr: Use POSIX rand() and srand() Peter Tyser 2009-03-12 19:48 ` [U-Boot] [PATCH 06/26 v2] tools/Makefile: Remove HOSTARCH HOSTOS defines Peter Tyser 2009-03-12 19:48 ` [U-Boot] [PATCH 07/26 v2] tools/Makefile: Remove inappropriate double-tabs Peter Tyser 2009-03-12 19:48 ` [U-Boot] [PATCH 08/26 v2] tools/Makefile: Split variable declarations into multiple lines Peter Tyser 2009-03-12 19:48 ` [U-Boot] [PATCH 09/26 v2] tools/Makefile: Build bmp_logo only when LCD or VIDEO logos are enabled Peter Tyser 2009-03-12 19:48 ` [U-Boot] [PATCH 10/26 v2] tools/Makefile: Make img2srec dependent upon CONFIG_CMD_LOADS Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 11/26 v2] tools/Makefile: Make ubsha1 dependent upon CONFIG_SHA1_CHECK_UB_IMG Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 12/26 v2] tools/Makefile: Make inca-swap-bytes dependent on CONFIG_INCA_IP Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 13/26 v2] tools/Makefile: Make envcrc dependent upon CONFIG_ENV_IS_EMBEDDED Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 14/26 v2] tools/Makefile: Make gen_eth_addr dependent upon CONFIG_CMD_NET Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 15/26 v2] tools/Makefile: Compile ncb when CONFIG_NETCONSOLE Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 16/26 v2] tools/Makefile: Add tools/ to the include search path Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 17/26 v2] tools/Makefile: Give precedence to U-Boot's include directory Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 18/26 v2] tools/Makefile: Add libfdt/ to the include search path Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 19/26 v2] tools/Makefile: Remove symlinks for fdt targets Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 20/26 v2] tools/Makefile: Dynamically generate libfdt object dependencies Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 21/26 v2] tools/Makefile: Remove symlinks for remaining source files Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 22/26 v2] tools/Makefile: Use auto-generated object file dependencies Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 23/26 v2] tools/Makefile: Create generic build rules Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 24/26 v2] tools/Makefile: Simplify HOST_CFLAGS/HOST_LDFLAGS generation Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 25/26 v2] Add support for building native win32 tools Peter Tyser 2009-03-12 19:49 ` [U-Boot] [PATCH 26/26 v2] Delete now unused tools/Makefile.win32 Peter Tyser 2009-03-12 23:01 ` [U-Boot] [PATCH 17/26 v2] tools/Makefile: Give precedence to U-Boot's include directory Mike Frysinger 2009-03-12 23:19 ` Wolfgang Denk 2009-03-12 23:53 ` Peter Tyser 2009-03-13 0:02 ` Andy Fleming 2009-03-13 20:05 ` Peter Tyser 2009-03-18 16:28 ` Scott Wood 2009-03-18 16:36 ` Peter Tyser 2009-03-18 16:47 ` Wolfgang Denk 2009-03-23 14:43 ` Peter Tyser 2009-03-23 18:37 ` Mike Frysinger 2009-03-12 21:00 ` [U-Boot] [PATCH 01/26 v2] Makefile: Make autoconf.mk a dependency of the depend target Wolfgang Denk 2009-03-12 21:12 ` Peter Tyser 2009-03-12 21:37 ` Wolfgang Denk
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox