Makefile: restore *_config target
PATCH 1/1 Makefile: restore *_config target
The switch to KConfig break the [board]_config target. This breaks backwards compatibility and hence all documentation about how to build u-boot is no longer valid. It is also annoying for general recipes to build u-boot as contained in buildroot, crochet, oe, poky, eldk etc. Hence restore the *_config target.
--- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Makefile +6 -1
@@ -413,7 +413,7 @@ endif version_h := include/generated/version_autogenerated.h timestamp_h := include/generated/timestamp_autogenerated.h -no-dot-config-targets := clean clobber mrproper distclean \ +no-dot-config-targets := clean clobber %_config mrproper distclean \ help %docs check% coccicheck \ ubootversion backup tools-only
@@ -436,6 +436,11 @@ ifeq ($(KBUILD_EXTMOD),) endif endif +# Before the switch to KConfig the configure target was %_config instead +# of %_defconfig. Just reinvoke make to be backwards compatible. +%_config: FORCE + $(Q)$(MAKE) $(@:_config=_defconfig) + ifeq ($(mixed-targets),1) # =========================================================================== # We're called with mixed targets (*config and build targets).
Signature · 1 line
1.9.1
PATCH 1/1 Makefile: restore *_config target
Hi Jeroen,
Quoted 5 lines · On Fri, 1 Aug 2014 21:28:54 +0200 Jeroen Hofstee <[email protected]> wrote:
The switch to KConfig break the [board]_config target. This breaks backwards compatibility and hence all documentation about how to build u-boot is no longer valid. It is also annoying for general recipes to build u-boot as contained in buildroot, crochet, oe, poky, eldk etc. Hence restore the
*_configtarget.
OK.
Quoted 13 lines
cc Tom Rini <[email protected]>cc Masahiro Yamada <[email protected]>cc Simon Glass <[email protected]>Signed-off-by Jeroen Hofstee <[email protected]>--- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)Makefile +0
-0
Makefile endif · line 418
Quoted 7 lines
Makefile +1
-1@@ -413,7 +413,7 @@ endif version_h := include/generated/version_autogenerated.h timestamp_h := include/generated/timestamp_autogenerated.h -no-dot-config-targets := clean clobber mrproper distclean \ +no-dot-config-targets := clean clobber %_config mrproper distclean \ help %docs check% coccicheck \ ubootversion backup tools-only
This change is not necessay at all, I think.
Makefile ifeq ($(KBUILD_EXTMOD),) · line 446
Quoted 12 lines
Makefile +5
-0@@ -436,6 +436,11 @@ ifeq ($(KBUILD_EXTMOD),) endif endif +# Before the switch to KConfig the configure target was %_config instead +# of %_defconfig. Just reinvoke make to be backwards compatible. +%_config: FORCE + $(Q)$(MAKE) $(@:_config=_defconfig) + ifeq ($(mixed-targets),1) # =========================================================================== # We're called with mixed targets (*config and build targets).
Because <board>_config matches "%config" pattern at line 467, could you modify scripts/multiconfig.py, please?
Best Regards
Masahiro Yamada
PATCH 1/1 Makefile: restore *_config target
Hello Masahiro,
Quoted 32 lines · Masahiro Yamada
Hi Jeroen,
Quoted 5 lines · On Fri, 1 Aug 2014 21:28:54 +0200 Jeroen Hofstee <[email protected]> wrote:
The switch to KConfig break the [board]_config target. This breaks backwards compatibility and hence all documentation about how to build u-boot is no longer valid. It is also annoying for general recipes to build u-boot as contained in buildroot, crochet, oe, poky, eldk etc. Hence restore the
*_configtarget.OK.
Quoted 16 lines
cc Tom Rini <[email protected]>cc Masahiro Yamada <[email protected]>cc Simon Glass <[email protected]>Signed-off-by Jeroen Hofstee <[email protected]>--- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)Makefile +0
-0@@ -413,7 +413,7 @@ endif version_h := include/generated/version_autogenerated.h timestamp_h := include/generated/timestamp_autogenerated.h
Quoted 7 lines
Makefile endif · line 418
Quoted 4 lines
Makefile +1
-1-no-dot-config-targets := clean clobber mrproper distclean \ +no-dot-config-targets := clean clobber %_config mrproper distclean \ help %docs check% coccicheck \ ubootversion backup tools-onlyThis change is not necessay at all, I think.
Depends on the intention, I do _not_ want to invoke the %config for the %_config target, and this prevents that.
Quoted 5 lines
Quoted 5 lines
Makefile +0
-0@@ -436,6 +436,11 @@ ifeq ($(KBUILD_EXTMOD),) endif endif
Quoted 10 lines
Makefile ifeq ($(KBUILD_EXTMOD),) · line 446
Quoted 8 lines
Makefile +5
-0+# Before the switch to KConfig the configure target was %_config instead +# of %_defconfig. Just reinvoke make to be backwards compatible. +%_config: FORCE + $(Q)$(MAKE) $(@:_config=_defconfig) + ifeq ($(mixed-targets),1) # =========================================================================== # We're called with mixed targets (*config and build targets).Because <board>_config matches "%config" pattern at line 467,
Well only when ifeq ($(config-targets),1) was true, which above prevents.
Quoted 2 lines
could you modify
scripts/multiconfig.py, please?
I don't understand what you want to change there... it should only see %_defconfig.
Regards,
Jeroen
PATCH 1/1 Makefile: restore *_config target
Hi Jeroen,
Quoted 24 lines · On Mon, 04 Aug 2014 19:49:24 +0200 Jeroen Hofstee <[email protected]> wrote:
Quoted 9 lines
Quoted 9 lines
cc Tom Rini <[email protected]>cc Masahiro Yamada <[email protected]>cc Simon Glass <[email protected]>Signed-off-by Jeroen Hofstee <[email protected]>--- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)Quoted 14 lines
Makefile endif · line 418
Quoted 11 lines
Makefile +1
-0@@ -413,7 +413,7 @@ endif version_h := include/generated/version_autogenerated.h timestamp_h := include/generated/timestamp_autogenerated.h >> -no-dot-config-targets := clean clobber mrproper distclean \ +no-dot-config-targets := clean clobber %_config mrproper distclean \ help %docs check% coccicheck \ ubootversion backup tools-onlyThis change is not necessay at all, I think.
Quoted 2 lines
Depends on the intention, I do _not_ want to invoke the %config for the %_config target, and this prevents that.
I am afraid you are misunderstanding the usage of no-dot-config-targets.
This variable contains targets we can run without the configuration, such as cleaning targets, help targets, ...
You are adding the configuration target itself to this variable.
Quoted 15 lines
Quoted 14 lines
Makefile ifeq ($(KBUILD_EXTMOD),) · line 445
Quoted 12 lines
Makefile +4
-0@@ -436,6 +436,11 @@ ifeq ($(KBUILD_EXTMOD),) endif endif >> +# Before the switch to KConfig the configure target was %_config instead +# of %_defconfig. Just reinvoke make to be backwards compatible. +%_config: FORCE + $(Q)$(MAKE) $(@:_config=_defconfig) + ifeq ($(mixed-targets),1) # =========================================================================== # We're called with mixed targets (*config and build targets).Because <board>_config matches "%config" pattern at line 467,
Quoted 8 lines
Well only when ifeq ($(config-targets),1) was true, which above prevents.
Quoted 2 lines
could you modify
scripts/multiconfig.py, please?I don't understand what you want to change there... it should only see %_defconfig.
"<board>_config" is now an alias of "<board>_defconfig", right?
I thoght it is more reasonable to handle it in the same place as the other configuration targets.
Could you try the following patch?
diff --git a/scripts/multiconfig.py b/scripts/multiconfig.py index 749abcb..30bfd7f 100755
--- a/scripts/multiconfig.py
+++ b/scripts/multiconfig.py
@@ -402,6 +402,9 @@ def main():
cmd = sys.argv[1]
if cmd.endswith('_defconfig'):
do_board_defconfig(cmd) + elif cmd.endswith('_config'):
+ # backward compatibility
+ do_board_defconfig(cmd[:-len('_config')] + '_defconfig')
else:
func = cmd_list.get(cmd, do_others)
func(cmd)
Best Regards
Masahiro Yamada
PATCH 1/1 Makefile: restore *_config target
Hi Masahiro,
Quoted 27 lines · Masahiro Yamada
Quoted 21 lines · On Mon, 04 Aug 2014 19:49:24 +0200 Jeroen Hofstee <[email protected]> wrote:
Quoted 8 lines
Quoted 8 lines
cc Tom Rini <[email protected]>cc Masahiro Yamada <[email protected]>cc Simon Glass <[email protected]>Signed-off-by Jeroen Hofstee <[email protected]>--- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)Quoted 13 lines
Makefile endif · line 418
Quoted 11 lines
Makefile +1
-0@@ -413,7 +413,7 @@ endif version_h := include/generated/version_autogenerated.h timestamp_h := include/generated/timestamp_autogenerated.h >> -no-dot-config-targets := clean clobber mrproper distclean \ +no-dot-config-targets := clean clobber %_config mrproper distclean \ help %docs check% coccicheck \ ubootversion backup tools-onlyThis change is not necessay at all, I think.
Quoted 2 lines
Depends on the intention, I do _not_ want to invoke the %config for the %_config target, and this prevents that.
Quoted 7 lines
I am afraid you are misunderstanding the usage of no-dot-config-targets.
This variable contains targets we can run without the configuration, such as cleaning targets, help targets, ...
You are adding the configuration target itself to this variable.
No I am not misunderstanding it. I am adding an alias not a configure target and an alias can obviously run without a configured u-boot (and should in this case). If I move the rule up it can be avoided if you insist on it.
Quoted 14 lines
Quoted 14 lines
Quoted 4 lines
Quoted 4 lines
Makefile +0
-0@@ -436,6 +436,11 @@ ifeq ($(KBUILD_EXTMOD),) endif endif >> +# Before the switch to KConfig the configure target was %_config insteadQuoted 8 lines
Makefile ifeq ($(KBUILD_EXTMOD),) · line 446
Quoted 7 lines
Makefile +4
-0+# of %_defconfig. Just reinvoke make to be backwards compatible. +%_config: FORCE + $(Q)$(MAKE) $(@:_config=_defconfig) + ifeq ($(mixed-targets),1) # =========================================================================== # We're called with mixed targets (*config and build targets).Because <board>_config matches "%config" pattern at line 467,
Well only when ifeq ($(config-targets),1) was true, which above prevents.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
could you modify
scripts/multiconfig.py, please?I don't understand what you want to change there... it should only see %_defconfig.
"<board>_config" is now an alias of "<board>_defconfig", right?
yes, make %_config just invokes make %_defconfig. That is all.
Quoted 3 lines
I thoght it is more reasonable to handle it in the same place as the other configuration targets.
Matter of taste I guess, I like my approach more, since it catches differences earlier and no scripts below have to be altered.
Quoted 12 lines
Could you try the following patch?
diff --git
a/scripts/multiconfig.pyb/scripts/multiconfig.pyindex 749abcb..30bfd7f 100755
---a/scripts/multiconfig.py
+++b/scripts/multiconfig.py
@@ -402,6 +402,9 @@ defmain():cmd = sys.argv[1] if cmd.endswith('_defconfig'): do_board_defconfig(cmd)
Quoted 7 lines
+ elif
cmd.endswith('_config'):
+ # backward compatibility
+do_board_defconfig(cmd[:-len('_config')] + '_defconfig')
else:
func =cmd_list.get(cmd, do_others)
func(cmd)
I can't parse this, since I don't know python that well, but it likely works. I do like it more if make already handled it though.
Regards,
Jeroen
Masahiro Yamada
NAKPATCH 1/1 Makefile: restore *_config target
Hi Jeroen,
Quoted 63 lines · On Tue, 05 Aug 2014 21:35:18 +0200 Jeroen Hofstee <[email protected]> wrote:
Hi Masahiro,
Quoted 27 lines · Masahiro Yamada
Quoted 21 lines · On Mon, 04 Aug 2014 19:49:24 +0200 Jeroen Hofstee <[email protected]> wrote:
Quoted 8 lines
Quoted 8 lines
cc Tom Rini <[email protected]>cc Masahiro Yamada <[email protected]>cc Simon Glass <[email protected]>Signed-off-by Jeroen Hofstee <[email protected]>--- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)Quoted 13 lines
Makefile endif · line 418
Quoted 11 lines
Makefile +1
-0@@ -413,7 +413,7 @@ endif version_h := include/generated/version_autogenerated.h timestamp_h := include/generated/timestamp_autogenerated.h >> -no-dot-config-targets := clean clobber mrproper distclean \ +no-dot-config-targets := clean clobber %_config mrproper distclean \ help %docs check% coccicheck \ ubootversion backup tools-onlyThis change is not necessay at all, I think.
Quoted 2 lines
Depends on the intention, I do _not_ want to invoke the %config for the %_config target, and this prevents that.
Quoted 7 lines
I am afraid you are misunderstanding the usage of no-dot-config-targets.
This variable contains targets we can run without the configuration, such as cleaning targets, help targets, ...
You are adding the configuration target itself to this variable.
No I am not misunderstanding it. I am adding an alias not a configure target and an alias can obviously run without a configured u-boot (and should in this case). If I move the rule up it can be avoided if you insist on it.
Quoted 20 lines
Quoted 19 lines
Quoted 4 lines
Quoted 4 lines
Makefile +0
-0@@ -436,6 +436,11 @@ ifeq ($(KBUILD_EXTMOD),) endif endif >> +# Before the switch to KConfig the configure target was %_config insteadQuoted 8 lines
Makefile ifeq ($(KBUILD_EXTMOD),) · line 446
Quoted 7 lines
Makefile +4
-0+# of %_defconfig. Just reinvoke make to be backwards compatible. +%_config: FORCE + $(Q)$(MAKE) $(@:_config=_defconfig) + ifeq ($(mixed-targets),1) # =========================================================================== # We're called with mixed targets (*config and build targets).Because <board>_config matches "%config" pattern at line 467,
Well only when ifeq ($(config-targets),1) was true, which above prevents.
Quoted 2 lines
could you modify
scripts/multiconfig.py, please?I don't understand what you want to change there... it should only see %_defconfig.
Quoted 8 lines
Quoted 1 line
"<board>_config" is now an alias of "<board>_defconfig", right?
yes, make %_config just invokes make %_defconfig. That is all.
Quoted 3 lines
I thoght it is more reasonable to handle it in the same place as the other configuration targets.
Matter of taste I guess,
Not at all.
Confituration targets should go inside "ifeq ($(config-targets),1) ... else", your code is breaking the basic concept of the top Makefile.
NAK.
At least, your patch does not work with O= option.
$ git log commit 5981f2917be03463714d8badfc78454c02ca160e Author: Jeroen Hofstee <[email protected]> Date: Fri Aug 1 21:28:54 2014 +0200
Makefile: restore *_config target
The switch to KConfig break the [board]_config target. This breaks backwards compatibility and hence all documentation about how to build u-boot is no longer valid. It is also annoying for general recipes to build u-boot as contained in buildroot, crochet, oe, poky, eldk etc. Hence restore the *_config target.
commit 25b4adbba018633b943a99322bfb2fb819c0bafb
Author: Masahiro Yamada <[email protected]> Date: Wed Jul 30 14:08:25 2014 +0900
include: remove CONFIG_SPL/CONFIG_TPL definition in config headers
Now CONFIG_SPL and CONFIG_TPL are defined in Kconfig.
Remove the redundant definition in config headers.
$ git clean -x -d -f $ git status On branch jeroen nothing to commit, working directory clean $ make O=foo sandbox_config make[2]: *** No rule to make target `sandbox_defconfig'. Stop. make[1]: *** [sandbox_config] Error 2 make: *** [sub-make] Error 2 $ make O=foo sandbox_defconfig HOSTCC scripts/basic/fixdep GEN /home/yamada/workspace/u-boot-org/foo/Makefile HOSTCC scripts/kconfig/conf.o SHIPPED scripts/kconfig/zconf.tab.c SHIPPED scripts/kconfig/zconf.lex.c SHIPPED scripts/kconfig/zconf.hash.c HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/conf # # configuration written to .config #
Best Regards
Masahiro Yamada
PATCH 1/1 Makefile: restore *_config target
Quoted 73 lines · Masahiro Yamada
Hi Jeroen,
Quoted 66 lines · On Tue, 05 Aug 2014 21:35:18 +0200 Jeroen Hofstee <[email protected]> wrote:
Hi Masahiro,
Quoted 24 lines · Masahiro Yamada
Quoted 21 lines · On Mon, 04 Aug 2014 19:49:24 +0200 Jeroen Hofstee <[email protected]> wrote:
Quoted 21 lines
Quoted 13 lines
cc Tom Rini <[email protected]>cc Masahiro Yamada <[email protected]>cc Simon Glass <[email protected]>Signed-off-by Jeroen Hofstee <[email protected]>--- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)Makefile +0
-0Makefile endif · line 418
Quoted 6 lines
Makefile +1
-0@@ -413,7 +413,7 @@ endif version_h := include/generated/version_autogenerated.h timestamp_h := include/generated/timestamp_autogenerated.h >> -no-dot-config-targets := clean clobber mrproper distclean \ +no-dot-config-targets := clean clobber %_config mrproper distclean \ help %docs check% coccicheck \ ubootversion backup tools-onlyThis change is not necessay at all, I think.
Quoted 9 lines
Quoted 2 lines
Depends on the intention, I do _not_ want to invoke the %config for the %_config target, and this prevents that.
I am afraid you are misunderstanding the usage of no-dot-config-targets.
This variable contains targets we can run without the configuration, such as cleaning targets, help targets, ...
You are adding the configuration target itself to this variable.
No I am not misunderstanding it. I am adding an alias not a configure target and an alias can obviously run without a configured u-boot (and should in this case). If I move the rule up it can be avoided if you insist on it.
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Makefile ifeq ($(KBUILD_EXTMOD),) · line 445
Quoted 11 lines
Makefile +4
-0@@ -436,6 +436,11 @@ ifeq ($(KBUILD_EXTMOD),) endif endif >> +# Before the switch to KConfig the configure target was %_config instead +# of %_defconfig. Just reinvoke make to be backwards compatible. +%_config: FORCE + $(Q)$(MAKE) $(@:_config=_defconfig) + ifeq ($(mixed-targets),1) # =========================================================================== # We're called with mixed targets (*config and build targets).Because <board>_config matches "%config" pattern at line 467,
Quoted 8 lines
Quoted 7 lines
Well only when ifeq ($(config-targets),1) was true, which above prevents.
Quoted 2 lines
could you modify
scripts/multiconfig.py, please?I don't understand what you want to change there... it should only see %_defconfig.
"<board>_config" is now an alias of "<board>_defconfig", right?
yes, make %_config just invokes make %_defconfig. That is all.
Quoted 3 lines
I thoght it is more reasonable to handle it in the same place as the other configuration targets.
Quoted 9 lines
Quoted 1 line
Matter of taste I guess,
Not at all.
Confituration targets should go inside "ifeq ($(config-targets),1) ... else", your code is breaking the basic concept of the topMakefile.NAK.
At least, your patch does not work with O= option.
yes, the defconfig needs to be before the change path indeed. (as in, the rule must be moved up to work properly). I it marked it as refused.
Regards,
Jeroen
PATCH 1/1 Makefile: restore *_config target
In reply to Jeroen HofsteeHi Jeroen,
Quoted 10 lines · Jeroen Hofstee
The switch to KConfig break the [board]_config target. This breaks backwards compatibility and hence all documentation about how to build u-boot is no longer valid. It is also annoying for general recipes to build u-boot as contained in buildroot, crochet, oe, poky, eldk etc. Hence restore the
*_configtarget.cc Tom Rini <[email protected]>cc Masahiro Yamada <[email protected]>cc Simon Glass <[email protected]>Signed-off-by Jeroen Hofstee <[email protected]>
Is there any way we can emit a deprecation warning without breaking these tools?
Regards,
Simon
PATCH 1/1 Makefile: restore *_config target
Hello Simon,
Quoted 9 lines · Simon Glass
Hi Jeroen,
Quoted 6 lines · Jeroen Hofstee
The switch to KConfig break the [board]_config target. This breaks backwards compatibility and hence all documentation about how to build u-boot is no longer valid. It is also annoying for general recipes to build u-boot as contained in buildroot, crochet, oe, poky, eldk etc. Hence restore the
*_configtarget.
Quoted 6 lines
Quoted 4 lines
cc Tom Rini <[email protected]>cc Masahiro Yamada <[email protected]>cc Simon Glass <[email protected]>Signed-off-by Jeroen Hofstee <[email protected]>Is there any way we can emit a deprecation warning without breaking these tools?
I guess the number of ways to do that are just limited by our imagination:
- abusing the bell character can be quite annoying, but is broken / fixed in the
linux distro's I know.
- echo "Hi there, U-boot folks over here, please STOP using _config, use _defconfig instead!" | write $USER
will scare quite a few users I guess.
- sendmail + git config user.email of the OE tree should be annoying enough
- lpr ;)
- play ?
- figure out which oe recipe invoked it and patch it from u-boot ;)
And as a serious answer, no I don't know a decent method to do it. As far as I know OE e.g. just logs to a file and only displays its contents if an error occurred.
Afaiac, the target is just kept. Just to prevent wasting time updating all wikis, docs etc, recipe etc. (it is not that it is a big pile of code or something). I can add an echo of course, but it won't be noticed by such build tools.
Regards,
Jeroen