[U-Boot] [PATCH 1/4] tools: enable img2srec for "all" target

Signed-off-by: Mike Frysinger vapier@gentoo.org --- tools/Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/tools/Makefile b/tools/Makefile index 749d994..ea271bf 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -41,6 +41,7 @@ include $(TOPDIR)/config.mk # Enable all the config-independent tools ifneq ($(HOST_TOOLS_ALL),) CONFIG_LCD_LOGO = y +CONFIG_CMD_LOADS = y CONFIG_CMD_NET = y CONFIG_INCA_IP = y CONFIG_NETCONSOLE = y

Signed-off-by: Mike Frysinger vapier@gentoo.org --- tools/.gitignore | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/tools/.gitignore b/tools/.gitignore index cb067a4..07f21a3 100644 --- a/tools/.gitignore +++ b/tools/.gitignore @@ -9,3 +9,8 @@ /ubsha1 /inca-swap-bytes /*.exe +/easylogo/easylogo +/env/crc32.c +/env/fw_printenv +/gdb/gdbcont +/gdb/gdbsend

Dear Mike Frysinger,
In message 1281845002-26525-2-git-send-email-vapier@gentoo.org you wrote:
Signed-off-by: Mike Frysinger vapier@gentoo.org
tools/.gitignore | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
Applied to "next" branch. Thanks
Best regards,
Wolfgang Denk

Most tool subdirs do not rely on a configured tree, so move those targets out of the config checks and unify them in the process.
Also add an easylogo target so people can easily build that.
Also add these new tool targets to the 'tools-all' target.
Signed-off-by: Mike Frysinger vapier@gentoo.org --- Makefile | 23 +++++++++++------------ 1 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/Makefile b/Makefile index 4f1cb1b..fc328df 100644 --- a/Makefile +++ b/Makefile @@ -397,14 +397,8 @@ $(TIMESTAMP_FILE): @LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@ @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@
-gdbtools: - $(MAKE) -C tools/gdb all || exit 1 - updater: - $(MAKE) -C tools/updater all || exit 1 - -env: - $(MAKE) -C tools/env all MTD_VERSION=${MTD_VERSION} || exit 1 + $(MAKE) -C tools/updater all
# Explicitly make _depend in subdirs containing multiple targets to prevent # parallel sub-makes creating .depend files simultaneously. @@ -459,17 +453,22 @@ $(obj)include/autoconf.mk: $(obj)include/config.h else # !config.mk all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \ $(obj)u-boot.img $(obj)u-boot.dis $(obj)u-boot \ -$(filter-out tools,$(SUBDIRS)) $(TIMESTAMP_FILE) $(VERSION_FILE) gdbtools \ -updater env depend dep tags ctags etags cscope $(obj)System.map: +$(filter-out tools,$(SUBDIRS)) $(TIMESTAMP_FILE) $(VERSION_FILE) \ +updater depend dep tags ctags etags cscope $(obj)System.map: @echo "System not configured - see README" >&2 @ exit 1
tools: - $(MAKE) -C tools -tools-all: - $(MAKE) -C tools HOST_TOOLS_ALL=y + $(MAKE) -C $@ all endif # config.mk
+easylogo env gdb: + $(MAKE) -C tools/$@ all MTD_VERSION=${MTD_VERSION} +gdbtools: gdb + +tools-all: easylogo env gdb + $(MAKE) -C tools HOST_TOOLS_ALL=y + .PHONY : CHANGELOG CHANGELOG: git log --no-merges U-Boot-1_1_5.. | \

Dear Mike Frysinger,
In message 1281845002-26525-3-git-send-email-vapier@gentoo.org you wrote:
Most tool subdirs do not rely on a configured tree, so move those targets out of the config checks and unify them in the process.
Also add an easylogo target so people can easily build that.
Also add these new tool targets to the 'tools-all' target.
Signed-off-by: Mike Frysinger vapier@gentoo.org
Makefile | 23 +++++++++++------------ 1 files changed, 11 insertions(+), 12 deletions(-)
Applied to "next" branch. Thanks
Best regards,
Wolfgang Denk

Convert the tools/env/Makefile to use the same host tool syntax as the other tool subdirs.
Signed-off-by: Mike Frysinger vapier@gentoo.org --- tools/env/Makefile | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/env/Makefile b/tools/env/Makefile index 2df631e..f893040 100644 --- a/tools/env/Makefile +++ b/tools/env/Makefile @@ -26,16 +26,16 @@ include $(TOPDIR)/config.mk SRCS := $(obj)crc32.c fw_env.c fw_env_main.c HEADERS := fw_env.h
-CPPFLAGS := -Wall -DUSE_HOSTCC -I$(SRCTREE)/include +HOSTCFLAGS += -Wall -DUSE_HOSTCC -I$(SRCTREE)/include
ifeq ($(MTD_VERSION),old) -CPPFLAGS += -DMTD_OLD +HOSTCFLAGS += -DMTD_OLD endif
all: $(obj)fw_printenv
$(obj)fw_printenv: $(SRCS) $(HEADERS) - $(CROSS_COMPILE)gcc $(CPPFLAGS) $(SRCS) -o $(obj)fw_printenv + $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $(SRCS)
clean: rm -f $(obj)fw_printenv $(obj)crc32.c

Dear Mike Frysinger,
In message 1281845002-26525-4-git-send-email-vapier@gentoo.org you wrote:
Convert the tools/env/Makefile to use the same host tool syntax as the other tool subdirs.
Signed-off-by: Mike Frysinger vapier@gentoo.org
tools/env/Makefile | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
Applied to "next" branch. Thanks
Best regards,
Wolfgang Denk

Hi,
Dear Mike Frysinger,
In message 1281845002-26525-4-git-send-email-vapier@gentoo.org you wrote:
Convert the tools/env/Makefile to use the same host tool syntax as the other tool subdirs.
Signed-off-by: Mike Frysinger vapier@gentoo.org
tools/env/Makefile | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
Applied to "next" branch. Thanks
It just occurred to me that this will no longer cross compile the fw_env tool - effectively rendering the tool useless for me.
Mike, what _exactly_ was the reason to drop cross compilation?
Cheers Detlev

Dear Detlev Zundel,
In message m2k4knd6lx.fsf@ohwell.denx.de you wrote:
Applied to "next" branch. Thanks
It just occurred to me that this will no longer cross compile the fw_env tool - effectively rendering the tool useless for me.
Argh... Indeed, that's broken.
Mike, what _exactly_ was the reason to drop cross compilation?
Mike, I think we should revert that commit?
Best regards,
Wolfgang Denk

On Mon, Nov 8, 2010 at 3:15 PM, Wolfgang Denk wd@denx.de wrote:
Dear Detlev Zundel,
In message m2k4knd6lx.fsf@ohwell.denx.de you wrote:
Applied to "next" branch. Thanks
It just occurred to me that this will no longer cross compile the fw_env tool - effectively rendering the tool useless for me.
Argh... Indeed, that's broken.
Mike, what _exactly_ was the reason to drop cross compilation?
Mike, I think we should revert that commit?
I ran into this issue this week too.
Reverting is one option. I also tried Daniel Hobi's patch "tools/env: cleanup host build flags" and that worked for me.
Steve

Hi Steve,
On 09.11.2010 01:01, Steve Sakoman wrote:
On Mon, Nov 8, 2010 at 3:15 PM, Wolfgang Denk wd@denx.de wrote:
In message m2k4knd6lx.fsf@ohwell.denx.de you wrote:
It just occurred to me that this will no longer cross compile the fw_env tool - effectively rendering the tool useless for me.
Argh... Indeed, that's broken.
I ran into this issue this week too.
Reverting is one option. I also tried Daniel Hobi's patch "tools/env: cleanup host build flags" and that worked for me.
You are refering to this WIP patch:
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/86236
It makes the fw_env tool Makefile similar to the imls Makefile and solves the errno inclusion problem reported by Detlev.
I still think we need a third set of CC, CFLAGS, SRCS, etc defines for compiling tools running on the target. However, we probably can default to the combination CC+HOSTCFLAGS for most platforms.
Best regards, Daniel

On Monday, November 08, 2010 13:15:38 Detlev Zundel wrote:
Mike Frysinger wrote:
Convert the tools/env/Makefile to use the same host tool syntax as the other tool subdirs.
Applied to "next" branch. Thanks
It just occurred to me that this will no longer cross compile the fw_env tool - effectively rendering the tool useless for me.
Mike, what _exactly_ was the reason to drop cross compilation?
nothing was "dropped". you need to set your HOSTCC correctly for the host on which you want tools to compile.
this is like arguing that none of the tools in tools/Makefile cross-compile. they do. i simply fixed tools/env/Makefile to operate the same. -mike

Dear Mike Frysinger,
In message 201011100419.10315.vapier@gentoo.org you wrote:
Mike, what _exactly_ was the reason to drop cross compilation?
nothing was "dropped". you need to set your HOSTCC correctly for the host on which you want tools to compile.
But it is WRONG to use HOSTCC for fw_* - these are _target_ tools, and they need to be CROSS compiled.
this is like arguing that none of the tools in tools/Makefile cross-compile. they do. i simply fixed tools/env/Makefile to operate the same.
Seems this was not a fix, but introduced an error. Dp you agree to revert that commit?
Best regards,
Wolfgang Denk

On Wednesday, November 10, 2010 14:54:17 Wolfgang Denk wrote:
Mike Frysinger wrote:
Mike, what _exactly_ was the reason to drop cross compilation?
nothing was "dropped". you need to set your HOSTCC correctly for the host on which you want tools to compile.
But it is WRONG to use HOSTCC for fw_* - these are _target_ tools, and they need to be CROSS compiled.
so do what i said -- set the HOSTCC to the host you want the tools to run on. this will work for *all* tools instead of arbitrarily picking some to use HOSTCC while picking others to use CROSS.
this is like arguing that none of the tools in tools/Makefile cross-compile. they do. i simply fixed tools/env/Makefile to operate the same.
Seems this was not a fix, but introduced an error. Dp you agree to revert that commit?
of course i disagree. this change is a fix in my mind. -mike

Dear Mike Frysinger,
In message 201011101711.17574.vapier@gentoo.org you wrote:
so do what i said -- set the HOSTCC to the host you want the tools to run on. this will work for *all* tools instead of arbitrarily picking some to use HOSTCC while picking others to use CROSS.
Why are you so ignorant?
There are tools that are supposed to run on the build host (like mkimage or gen_eth_addr), and there are tools that are supposed to run on the target (like fw_*).
Your "one size fits all" approach is broken.
Seems this was not a fix, but introduced an error. Dp you agree to revert that commit?
of course i disagree. this change is a fix in my mind.
Please reconsider. This has been working for nearly a decade, and now it's broken. I want to see this fixed. If needed, by reverting the commit that broke it.
Best regards,
Wolfgang Denk

On Wednesday, November 10, 2010 17:29:52 Wolfgang Denk wrote:
Mike Frysinger wrote:
so do what i said -- set the HOSTCC to the host you want the tools to run on. this will work for *all* tools instead of arbitrarily picking some to use HOSTCC while picking others to use CROSS.
Why are you so ignorant?
cut the crap
There are tools that are supposed to run on the build host (like mkimage or gen_eth_addr), and there are tools that are supposed to run on the target (like fw_*).
you're assuming too much here as well. i need to support cross-compiling all the tools for when the build==host==target and build!=host==target and build!=host!=target. this is the stuff i hit every day with package managers and distro setups.
Seems this was not a fix, but introduced an error. Dp you agree to revert that commit?
of course i disagree. this change is a fix in my mind.
Please reconsider. This has been working for nearly a decade, and now it's broken. I want to see this fixed. If needed, by reverting the commit that broke it.
it's been working for your specific use cases. it hasnt been working without pains for everyone. -mike

Dear Mike Frysinger,
In message 201011101755.54287.vapier@gentoo.org you wrote:
Seems this was not a fix, but introduced an error. Dp you agree to revert that commit?
of course i disagree. this change is a fix in my mind.
Please reconsider. This has been working for nearly a decade, and now it's broken. I want to see this fixed. If needed, by reverting the commit that broke it.
it's been working for your specific use cases. it hasnt been working without pains for everyone.
I agree you have a point.
But it is a change in behaviour, and what it makes worse it that it's an undocumented one. Users who have been doing the same thing for a decade suddenly find their old scripts are not working any more, and there it even a hint of what they do now.
If we decide that such a change makes sense, then it must be explained and documented properly.
Best regards,
Wolfgang Denk

On Sunday, November 14, 2010 16:59:33 Wolfgang Denk wrote:
Mike Frysinger wrote:
Seems this was not a fix, but introduced an error. Dp you agree to revert that commit?
of course i disagree. this change is a fix in my mind.
Please reconsider. This has been working for nearly a decade, and now it's broken. I want to see this fixed. If needed, by reverting the commit that broke it.
it's been working for your specific use cases. it hasnt been working without pains for everyone.
I agree you have a point.
But it is a change in behaviour, and what it makes worse it that it's an undocumented one. Users who have been doing the same thing for a decade suddenly find their old scripts are not working any more, and there it even a hint of what they do now.
If we decide that such a change makes sense, then it must be explained and documented properly.
i guess i can try harder to goad Daniel into getting his work going -mike

Dear Mike Frysinger,
In message 1281845002-26525-1-git-send-email-vapier@gentoo.org you wrote:
Signed-off-by: Mike Frysinger vapier@gentoo.org
tools/Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/tools/Makefile b/tools/Makefile index 749d994..ea271bf 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -41,6 +41,7 @@ include $(TOPDIR)/config.mk # Enable all the config-independent tools ifneq ($(HOST_TOOLS_ALL),) CONFIG_LCD_LOGO = y +CONFIG_CMD_LOADS = y CONFIG_CMD_NET = y CONFIG_INCA_IP = y CONFIG_NETCONSOLE = y
Do we really need this? Only very few people will ever need the img2srec tool, so why build it for everybody?
Best regards,
Wolfgang Denk

On Sunday, September 12, 2010 15:39:06 Wolfgang Denk wrote:
Mike Frysinger wrote:
diff --git a/tools/Makefile b/tools/Makefile index 749d994..ea271bf 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -41,6 +41,7 @@ include $(TOPDIR)/config.mk
# Enable all the config-independent tools ifneq ($(HOST_TOOLS_ALL),) CONFIG_LCD_LOGO = y
+CONFIG_CMD_LOADS = y
CONFIG_CMD_NET = y CONFIG_INCA_IP = y CONFIG_NETCONSOLE = y
Do we really need this? Only very few people will ever need the img2srec tool, so why build it for everybody?
it is only built when people do `make tools-all`, not `make tools`, and in this case, yes, i think we should be building it -mike

Dear Mike Frysinger,
In message 1281845002-26525-1-git-send-email-vapier@gentoo.org you wrote:
Signed-off-by: Mike Frysinger vapier@gentoo.org
tools/Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
Applied to "next" after editing the subject to say "tools-all" instead of "all" (which misled me).
Best regards,
Wolfgang Denk
participants (5)
-
Daniel Hobi
-
Detlev Zundel
-
Mike Frysinger
-
Steve Sakoman
-
Wolfgang Denk