Makefile: print warning if CONFIG_SYS_EXTRA_OPTIONS is used
PATCH 1/1 Makefile: print warning if CONFIG_SYS_EXTRA_OPTIONS is used
The prompt of this option is marked "DEPRECATED" in capital letters, and its help clearly says:
This option was prepared for the smooth migration from the old configuration to Kconfig. Since this option will be removed sometime, new boards should not use this option.
However, we have had almost no progress on this. In fact, this option is often abused for fresh porting, and more and more new defconfigs with it are coming in (for example, SUNXI boards).
We introduced scripts/check-config.sh to ban new legacy options. We need something forcible for the migration. Here it is.
If CONFIG_SYS_EXTRA_OPTIONS is used, a prompt for the conversion is displayed at the end of the build. The action needed is simple; instead of CONFIG_SYS_EXTRA_OPTIONS="FOO,BAR", please create primary entries for CONFIG_FOO and CONFIG_BAR in Kconfig. If no action is taken, the board will be removed after the v2017.05 release.
---
Makefile | 7 +++++++ 1 file changed, 7 insertions(+)
Makefile +7 -0
@@ -848,6 +848,13 @@ ifeq ($(CONFIG_DM_I2C_COMPAT)$(CONFIG_SANDBOX),y) @echo "before sending patches to the mailing list." @echo "====================================================" endif +ifneq ($(CONFIG_SYS_EXTRA_OPTIONS),"") + @echo "===================== WARNING =========================" + @echo "CONFIG_SYS_EXTRA_OPTIONS is deprecated. Please create" + @echo "primary entries in Kconfig. Otherwise, this board will" + @echo "be removed after v2017.05 release." + @echo "=======================================================" +endif @# Check that this build does not use CONFIG options that we do not @# know about unless they are in Kconfig. All the existing CONFIG @# options are whitelisted, so new ones should not be added.
Signature · 1 line
2.7.4
PATCH 1/1 Makefile: print warning if CONFIG_SYS_EXTRA_OPTIONS is used
Quoted 9 lines · Masahiro Yamada
The prompt of this option is marked "DEPRECATED" in capital letters, and its help clearly says:
This option was prepared for the smooth migration from the old configuration toKconfig. Since this option will be removed sometime, new boards should not use this option.However, we have had almost no progress on this. In fact, this option is often abused for fresh porting, and more and more new defconfigs with it are coming in (for example, SUNXI boards).
That's not entirely true. We've added more defconfig, but with the same set of options we've always had, and are shared by everyone (CONS_INDEX, RGMII).
So this patch, in effect, gives the signal that it's better to have a proliferation of board-specific headers in include/configs, over using SYS_EXTRA until most of the generic functions are merged?
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170221/97de97ec/attachment.sig>
PATCH 1/1 Makefile: print warning if CONFIG_SYS_EXTRA_OPTIONS is used
2017-02-22 8:16 GMT+09:00 Maxime Ripard <[email protected]>:
Quoted 11 lines · Masahiro Yamada
Quoted 9 lines
The prompt of this option is marked "DEPRECATED" in capital letters, and its help clearly says:
This option was prepared for the smooth migration from the old configuration toKconfig. Since this option will be removed sometime, new boards should not use this option.However, we have had almost no progress on this. In fact, this option is often abused for fresh porting, and more and more new defconfigs with it are coming in (for example, SUNXI boards).
Quoted 7 lines
That's not entirely true. We've added more defconfig, but with the same set of options we've always had, and are shared by everyone (
CONS_INDEX, RGMII).So this patch, in effect, gives the signal that it's better to have a proliferation of board-specific headers in
include/configs, over usingSYS_EXTRAuntil most of the generic functions are merged?
No.
I am saying to addCONFIG_CONS_INDEX=2CONFIG_RGMII=y
instead of
CONFIG_SYS_EXTRA_OPTIONS=CONS_INDEX=2,RGMII"
Why proliferation of board-specific headers?
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH 1/1 Makefile: print warning if CONFIG_SYS_EXTRA_OPTIONS is used
Quoted 26 lines · Masahiro Yamada
2017-02-22 8:16 GMT+09:00 Maxime Ripard <[email protected]>:
Quoted 11 lines · Masahiro Yamada
Quoted 9 lines
The prompt of this option is marked "DEPRECATED" in capital letters, and its help clearly says:
This option was prepared for the smooth migration from the old configuration toKconfig. Since this option will be removed sometime, new boards should not use this option.However, we have had almost no progress on this. In fact, this option is often abused for fresh porting, and more and more new defconfigs with it are coming in (for example, SUNXI boards).
Quoted 7 lines
That's not entirely true. We've added more defconfig, but with the same set of options we've always had, and are shared by everyone (
CONS_INDEX, RGMII).So this patch, in effect, gives the signal that it's better to have a proliferation of board-specific headers in
include/configs, over usingSYS_EXTRAuntil most of the generic functions are merged?No.
I am saying to add
CONFIG_CONS_INDEX=2CONFIG_RGMII=y
Quoted 6 lines
instead of
CONFIG_SYS_EXTRA_OPTIONS=CONS_INDEX=2,RGMII"Why proliferation of board-specific headers?
The issue here is that we have a handful of options that need converting still, and are not "easy". For CONS_INDEX we need to find the right generic location for this to be and migrate, and remove the few instances of board-centric versions of the question.
I agree with the sentiment of the original patch but I want to see how many of the current options can be knocked out easily. WRT sunxi, I posted moving two of them, and RGMII will happen as part of the general move of all of the network drivers over.
SATAPWR and MACPWR will take a little more thinking on, to figure out. Do these values exist within the normal device tree in some way already for example? Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170222/d4de4f27/attachment.sig>
PATCH 1/1 Makefile: print warning if CONFIG_SYS_EXTRA_OPTIONS is used
Quoted 39 lines · Tom Rini
Quoted 26 lines · Masahiro Yamada
2017-02-22 8:16 GMT+09:00 Maxime Ripard <[email protected]>:
Quoted 11 lines · Masahiro Yamada
Quoted 9 lines
The prompt of this option is marked "DEPRECATED" in capital letters, and its help clearly says:
This option was prepared for the smooth migration from the old configuration toKconfig. Since this option will be removed sometime, new boards should not use this option.However, we have had almost no progress on this. In fact, this option is often abused for fresh porting, and more and more new defconfigs with it are coming in (for example, SUNXI boards).
Quoted 7 lines
That's not entirely true. We've added more defconfig, but with the same set of options we've always had, and are shared by everyone (
CONS_INDEX, RGMII).So this patch, in effect, gives the signal that it's better to have a proliferation of board-specific headers in
include/configs, over usingSYS_EXTRAuntil most of the generic functions are merged?No.
I am saying to add
CONFIG_CONS_INDEX=2CONFIG_RGMII=yQuoted 6 lines
instead of
CONFIG_SYS_EXTRA_OPTIONS=CONS_INDEX=2,RGMII"Why proliferation of board-specific headers?
The issue here is that we have a handful of options that need converting still, and are not "easy". For
CONS_INDEXwe need to find the right generic location for this to be and migrate, and remove the few instances of board-centric versions of the question.
Quoted 8 lines
I agree with the sentiment of the original patch but I want to see how many of the current options can be knocked out easily. WRT sunxi, I posted moving two of them, and RGMII will happen as part of the general move of all of the network drivers over.
SATAPWR and MACPWR will take a little more thinking on, to figure out. Do these values exist within the normal device tree in some way already for example? Thanks!
They do, but through intermediate regulators, and I'm not sure that's supported right now. An easier fix would be to simply move those options as strings to Kconfig, and call sunxi_name_to_gpio on those.
Mylene started to work on it afaik, I added her in Cc.
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170222/0ed51d1a/attachment.sig>
PATCH 1/1 Makefile: print warning if CONFIG_SYS_EXTRA_OPTIONS is used
In reply to Masahiro YamadaQuoted 26 lines · Masahiro Yamada
2017-02-22 8:16 GMT+09:00 Maxime Ripard <[email protected]>:
Quoted 11 lines · Masahiro Yamada
Quoted 9 lines
The prompt of this option is marked "DEPRECATED" in capital letters, and its help clearly says:
This option was prepared for the smooth migration from the old configuration toKconfig. Since this option will be removed sometime, new boards should not use this option.However, we have had almost no progress on this. In fact, this option is often abused for fresh porting, and more and more new defconfigs with it are coming in (for example, SUNXI boards).
Quoted 7 lines
That's not entirely true. We've added more defconfig, but with the same set of options we've always had, and are shared by everyone (
CONS_INDEX, RGMII).So this patch, in effect, gives the signal that it's better to have a proliferation of board-specific headers in
include/configs, over usingSYS_EXTRAuntil most of the generic functions are merged?No.
I am saying to add
CONFIG_CONS_INDEX=2CONFIG_RGMII=y
Quoted 5 lines
instead of
CONFIG_SYS_EXTRA_OPTIONS=CONS_INDEX=2,RGMII"Why proliferation of board-specific headers?
Because of all the other platforms that would need to be migrated in the process.
If what you suggest is just to remove all the defconfig that have that kind of option, I'll just move to what everyone else does: have it in my header. Because that's just the path of least resistance.
But that just seems counter-productive.
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170222/dc68a068/attachment.sig>
PATCH 1/1 Makefile: print warning if CONFIG_SYS_EXTRA_OPTIONS is used
In reply to Maxime RipardHi,
Quoted 11 lines · Maxime Ripard
Quoted 9 lines · Masahiro Yamada
The prompt of this option is marked "DEPRECATED" in capital letters, and its help clearly says:
This option was prepared for the smooth migration from the old configuration toKconfig. Since this option will be removed sometime, new boards should not use this option.However, we have had almost no progress on this. In fact, this option is often abused for fresh porting, and more and more new defconfigs with it are coming in (for example, SUNXI boards).
Quoted 7 lines
That's not entirely true. We've added more defconfig, but with the same set of options we've always had, and are shared by everyone (
CONS_INDEX, RGMII).So this patch, in effect, gives the signal that it's better to have a proliferation of board-specific headers in
include/configs, over usingSYS_EXTRAuntil most of the generic functions are merged?
I suppose whoever adds the next board gets to do the conversion?
This patch is a step forward. But how about adding a build error whenever a non-whitelisted board defines CONFIG_SYS_EXTRA?
Regards,
Simon
PATCH 1/1 Makefile: print warning if CONFIG_SYS_EXTRA_OPTIONS is used
Quoted 19 lines · Simon Glass
Hi,
Quoted 15 lines · Maxime Ripard
Quoted 9 lines · Masahiro Yamada
The prompt of this option is marked "DEPRECATED" in capital letters, and its help clearly says:
This option was prepared for the smooth migration from the old configuration toKconfig. Since this option will be removed sometime, new boards should not use this option.However, we have had almost no progress on this. In fact, this option is often abused for fresh porting, and more and more new defconfigs with it are coming in (for example, SUNXI boards).
That's not entirely true. We've added more defconfig, but with the same set of options we've always had, and are shared by everyone (
CONS_INDEX, RGMII).
Quoted 5 lines
Quoted 3 lines
So this patch, in effect, gives the signal that it's better to have a proliferation of board-specific headers in
include/configs, over usingSYS_EXTRAuntil most of the generic functions are merged?I suppose whoever adds the next board gets to do the conversion?
That seems a bit unfair to ask someone that barely got into U-Boot to enable his new shiny sunxi board to convert the old Freescale's PPC defconfig in the process.
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170222/29fc2c75/attachment-0001.sig>
PATCH 1/1 Makefile: print warning if CONFIG_SYS_EXTRA_OPTIONS is used
Quoted 24 lines · Maxime Ripard
Quoted 23 lines · Simon Glass
Hi,
Quoted 18 lines · Maxime Ripard
Quoted 9 lines · Masahiro Yamada
The prompt of this option is marked "DEPRECATED" in capital letters, and its help clearly says:
This option was prepared for the smooth migration from the old configuration toKconfig. Since this option will be removed sometime, new boards should not use this option.However, we have had almost no progress on this. In fact, this option is often abused for fresh porting, and more and more new defconfigs with it are coming in (for example, SUNXI boards).
That's not entirely true. We've added more defconfig, but with the same set of options we've always had, and are shared by everyone (
CONS_INDEX, RGMII).So this patch, in effect, gives the signal that it's better to have a proliferation of board-specific headers in
include/configs, over usingSYS_EXTRAuntil most of the generic functions are merged?
Quoted 5 lines
Quoted 1 line
I suppose whoever adds the next board gets to do the conversion?
That seems a bit unfair to ask someone that barely got into U-Boot to enable his new shiny sunxi board to convert the old Freescale's PPC defconfig in the process.
Well, yes and no. Some of the options that need migrating (say CONFIG_NAND) are a PITA, and no, we aren't asking for that.
Drilling down to the sunxi case for a moment, the SYS_EXTRA_OPTIONS that get set are almost entirely sunxi centric (CONFIG_RGMII is used in some atmel cases) so converting those is I feel an appropriate ask.
Getting back up to the high level question, if someone makes an effort to write the Kconfig logic for an option and tries to get the depends logic correct (after looking at how all the various cases of it go), I'm happy to pick it up and do the last part of migrating all of the configs and size-checking for correctness.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170223/cbe28424/attachment.sig>