Re: [U-Boot] [PATCH v2 0/2] Detect and reject new ad-hoc CONFIG options
On Tue, Sep 13, 2016 at 12:38:45PM -0600, Simon Glass wrote: > Hi Tom, > > On 13 September 2016 at 07:49, Tom Riniwrote: > > On Tue, Sep 13, 2016 at 07:35:42AM -0600, Simon Glass wrote: > >> Hi Tom, > >> > >> On 13 September 2016 at 07:16, Tom Rini wrote: > >> > On Mon, Sep 12, 2016 at 11:20:00PM -0600, Simon Glass wrote: > >> > > >> >> Despite the availability of Kconfig, the number of ad-hoc CONFIG > >> >> options in > >> >> U-Boot is still at over 8000. > >> >> > >> >> In February 2015 (commit 741e58e0) there were around 8387 ad-hoc > >> >> CONFIGs. > >> >> As of this patch there are about 8336, only a little fewer. > >> >> > >> >> One problem is that new ones are still being added, admittedly at a > >> >> slower > >> >> rate. This series adds a Makefile check to detect that and produce a > >> >> build > >> >> error. This provides immediate feedback that new CONFIG options should > >> >> go in > >> >> Kconfig. > >> >> > >> >> Changes in v2: > >> >> - Rebase to mainline > >> >> - Fix scripts so that there are no errors > >> >> - Add the 'build-whitelist.sh' script to the tree > >> >> > >> >> Simon Glass (2): > >> >> Kconfig: Add a whitelist of ad-hoc CONFIG options > >> >> Makefile: Give a build error if ad-hoc CONFIG options are added > >> > > >> > OK, this is still a little fragile. When I do: > >> > ./tools/buildman/buildman -b master --force-build --step 0 \ > >> > -SCdvel > >> > 'avr32|nds32|bfin|m68k|microblaze|or32|sh4|sparc|mips|mips64|xtensa' > >> > > >> > vs kconfig-working2 I'm seeing a bunch of failures: > >> > +(M5475GFE) make[1]: *** [no_new_adhoc_configs_check] Error 1 > >> > +(M5475GFE) make: *** [sub-make] Error 2 > >> > >> Yes it looks like I was testing it incorrectly, relying on running on > >> from the SPL series. One problem is that it misses configs with lower > >> case which are defined in Kconfig and then used. I've updated > >> u-boot-dm/kconfig-working2 to deal with that. > >> > >> I'll take another look at this and have an update out today. But we > >> can decouple this from the painful SPL series if you like, since in > >> principle we can run the generation script to create the first of the > >> two patches. > > > > Yes, we can de-couple this. However, you might want to take a look at > > say xtensa as in my check with before/after kconfig-working2 there's a > > tiny size difference and I don't see that normally for a Kconfig > > migration. I'm doing my arm/powerpc build now to see if there's a > > similar set of size changes there and will then start poking at map > > files. > > Here's a full list of config changes for the SPL series as far as I can tell: > > $ buildman -b kc4-conf -fC --step 0 -DI -s > boards.cfg is up to date. Nothing to do. > Summary of 2 commits for 1196 boards (32 threads, 1 job per thread) > 01: buildman > openrisc: + openrisc-generic > sparc: + grsim grsim_leon2 gr_cpci_ax2000 gr_xc3s_1500 gr_ep2s60 > blackfin: + bf609-ezkit > 46: Convert CONFIG_SPL_YMODEM_SUPPORT to Kconfig > arm: >+ u-boot.cfg: CONFIG_ENV_ADDR=(CONFIG_SYS_FLASH_BASE + > CONFIG_SYS_MONITOR_LEN) CONFIG_ENV_IS_IN_FLASH=1 > CONFIG_ENV_SECT_SIZE=0x0001 CONFIG_NAND=1 CONFIG_SPL_ENV_SUPPORT=1 > CONFIG_SPL_NET_SUPPORT=1 CONFIG_SPL_NET_VCI_STRING="" CONFIG_STV0991=1 > CONFIG_SYS_MONITOR_LEN=0x0004 CONFIG_USBTTY=1 >- u-boot.cfg: CONFIG_DW_UDC=1 CONFIG_ENV_IS_IN_NAND=1 > CONFIG_ENV_OFFSET=0x6 CONFIG_ENV_RANGE=0x1 > CONFIG_SPEAR_USBTTY=1 CONFIG_SPL_NET_VCI_STRING="AM43xx U-Boot SPL" > CONFIG_USBD_HS=1 CONFIG_USBD_MANUFACTURER="ST Microelectronics" > CONFIG_USBD_PRODUCT_NAME="SPEAr SoC" CONFIG_USB_DEVICE=1 > CONFIG_USB_TTY=1 CONFIG_nand=1 CONFIG_spear300=1 CONFIG_spear310=1 > CONFIG_spear320=1 CONFIG_spear600=1 CONFIG_stv0991=1 CONFIG_usbtty=1 >+ u-boot-spl.cfg: CONFIG_SPL_MMC_SUPPORT=1 > CONFIG_SPL_NAND_SUPPORT=1 CONFIG_SPL_YMODEM_SUPPORT=1 >- u-boot-spl.cfg: CONFIG_SPL_NET_VCI_STRING="AM43xx U-Boot SPL" >+ all: CONFIG_ENV_ADDR=(CONFIG_SYS_FLASH_BASE + > CONFIG_SYS_MONITOR_LEN) CONFIG_ENV_IS_IN_FLASH=1 > CONFIG_ENV_SECT_SIZE=0x0001 CONFIG_NAND=1 CONFIG_SPL_ENV_SUPPORT=1 > CONFIG_SPL_MMC_SUPPORT=1 CONFIG_SPL_NAND_SUPPORT=1 > CONFIG_SPL_NET_SUPPORT=1 CONFIG_SPL_NET_VCI_STRING="" > CONFIG_SPL_YMODEM_SUPPORT=1 CONFIG_STV0991=1 > CONFIG_SYS_MONITOR_LEN=0x0004 CONFIG_USBTTY=1 >- all: CONFIG_DW_UDC=1 CONFIG_ENV_IS_IN_NAND=1 > CONFIG_ENV_OFFSET=0x6 CONFIG_ENV_RANGE=0x1 > CONFIG_SPEAR_USBTTY=1 CONFIG_SPL_NET_VCI_STRING="AM43xx U-Boot SPL" > CONFIG_USBD_HS=1 CONFIG_USBD_MANUFACTURER="ST Microelectronics" > CONFIG_USBD_PRODUCT_NAME="SPEAr SoC" CONFIG_USB_DEVICE=1 > CONFIG_USB_TTY=1 CONFIG_nand=1 CONFIG_spear300=1 CONFIG_spear310=1 > CONFIG_spear320=1 CONFIG_spear600=1 CONFIG_stv0991=1 CONFIG_usbtty=1 > spear320_usbtty spear320_usbtty_pnor : >+ u-boot.cfg: CONFIG_USBTTY=1 >- u-boot.cfg: CONFIG_DW_UDC=1 CONFIG_SPEAR_USBTTY=1 > CONFIG_USBD_HS=1
Re: [U-Boot] [PATCH v2 0/2] Detect and reject new ad-hoc CONFIG options
Hi Tom, On 13 September 2016 at 07:49, Tom Riniwrote: > On Tue, Sep 13, 2016 at 07:35:42AM -0600, Simon Glass wrote: >> Hi Tom, >> >> On 13 September 2016 at 07:16, Tom Rini wrote: >> > On Mon, Sep 12, 2016 at 11:20:00PM -0600, Simon Glass wrote: >> > >> >> Despite the availability of Kconfig, the number of ad-hoc CONFIG options >> >> in >> >> U-Boot is still at over 8000. >> >> >> >> In February 2015 (commit 741e58e0) there were around 8387 ad-hoc CONFIGs. >> >> As of this patch there are about 8336, only a little fewer. >> >> >> >> One problem is that new ones are still being added, admittedly at a slower >> >> rate. This series adds a Makefile check to detect that and produce a build >> >> error. This provides immediate feedback that new CONFIG options should go >> >> in >> >> Kconfig. >> >> >> >> Changes in v2: >> >> - Rebase to mainline >> >> - Fix scripts so that there are no errors >> >> - Add the 'build-whitelist.sh' script to the tree >> >> >> >> Simon Glass (2): >> >> Kconfig: Add a whitelist of ad-hoc CONFIG options >> >> Makefile: Give a build error if ad-hoc CONFIG options are added >> > >> > OK, this is still a little fragile. When I do: >> > ./tools/buildman/buildman -b master --force-build --step 0 \ >> > -SCdvel >> > 'avr32|nds32|bfin|m68k|microblaze|or32|sh4|sparc|mips|mips64|xtensa' >> > >> > vs kconfig-working2 I'm seeing a bunch of failures: >> > +(M5475GFE) make[1]: *** [no_new_adhoc_configs_check] Error 1 >> > +(M5475GFE) make: *** [sub-make] Error 2 >> >> Yes it looks like I was testing it incorrectly, relying on running on >> from the SPL series. One problem is that it misses configs with lower >> case which are defined in Kconfig and then used. I've updated >> u-boot-dm/kconfig-working2 to deal with that. >> >> I'll take another look at this and have an update out today. But we >> can decouple this from the painful SPL series if you like, since in >> principle we can run the generation script to create the first of the >> two patches. > > Yes, we can de-couple this. However, you might want to take a look at > say xtensa as in my check with before/after kconfig-working2 there's a > tiny size difference and I don't see that normally for a Kconfig > migration. I'm doing my arm/powerpc build now to see if there's a > similar set of size changes there and will then start poking at map > files. Here's a full list of config changes for the SPL series as far as I can tell: $ buildman -b kc4-conf -fC --step 0 -DI -s boards.cfg is up to date. Nothing to do. Summary of 2 commits for 1196 boards (32 threads, 1 job per thread) 01: buildman openrisc: + openrisc-generic sparc: + grsim grsim_leon2 gr_cpci_ax2000 gr_xc3s_1500 gr_ep2s60 blackfin: + bf609-ezkit 46: Convert CONFIG_SPL_YMODEM_SUPPORT to Kconfig arm: + u-boot.cfg: CONFIG_ENV_ADDR=(CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN) CONFIG_ENV_IS_IN_FLASH=1 CONFIG_ENV_SECT_SIZE=0x0001 CONFIG_NAND=1 CONFIG_SPL_ENV_SUPPORT=1 CONFIG_SPL_NET_SUPPORT=1 CONFIG_SPL_NET_VCI_STRING="" CONFIG_STV0991=1 CONFIG_SYS_MONITOR_LEN=0x0004 CONFIG_USBTTY=1 - u-boot.cfg: CONFIG_DW_UDC=1 CONFIG_ENV_IS_IN_NAND=1 CONFIG_ENV_OFFSET=0x6 CONFIG_ENV_RANGE=0x1 CONFIG_SPEAR_USBTTY=1 CONFIG_SPL_NET_VCI_STRING="AM43xx U-Boot SPL" CONFIG_USBD_HS=1 CONFIG_USBD_MANUFACTURER="ST Microelectronics" CONFIG_USBD_PRODUCT_NAME="SPEAr SoC" CONFIG_USB_DEVICE=1 CONFIG_USB_TTY=1 CONFIG_nand=1 CONFIG_spear300=1 CONFIG_spear310=1 CONFIG_spear320=1 CONFIG_spear600=1 CONFIG_stv0991=1 CONFIG_usbtty=1 + u-boot-spl.cfg: CONFIG_SPL_MMC_SUPPORT=1 CONFIG_SPL_NAND_SUPPORT=1 CONFIG_SPL_YMODEM_SUPPORT=1 - u-boot-spl.cfg: CONFIG_SPL_NET_VCI_STRING="AM43xx U-Boot SPL" + all: CONFIG_ENV_ADDR=(CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN) CONFIG_ENV_IS_IN_FLASH=1 CONFIG_ENV_SECT_SIZE=0x0001 CONFIG_NAND=1 CONFIG_SPL_ENV_SUPPORT=1 CONFIG_SPL_MMC_SUPPORT=1 CONFIG_SPL_NAND_SUPPORT=1 CONFIG_SPL_NET_SUPPORT=1 CONFIG_SPL_NET_VCI_STRING="" CONFIG_SPL_YMODEM_SUPPORT=1 CONFIG_STV0991=1 CONFIG_SYS_MONITOR_LEN=0x0004 CONFIG_USBTTY=1 - all: CONFIG_DW_UDC=1 CONFIG_ENV_IS_IN_NAND=1 CONFIG_ENV_OFFSET=0x6 CONFIG_ENV_RANGE=0x1 CONFIG_SPEAR_USBTTY=1 CONFIG_SPL_NET_VCI_STRING="AM43xx U-Boot SPL" CONFIG_USBD_HS=1 CONFIG_USBD_MANUFACTURER="ST Microelectronics" CONFIG_USBD_PRODUCT_NAME="SPEAr SoC" CONFIG_USB_DEVICE=1 CONFIG_USB_TTY=1 CONFIG_nand=1 CONFIG_spear300=1 CONFIG_spear310=1 CONFIG_spear320=1 CONFIG_spear600=1 CONFIG_stv0991=1 CONFIG_usbtty=1 spear320_usbtty spear320_usbtty_pnor : + u-boot.cfg: CONFIG_USBTTY=1 - u-boot.cfg: CONFIG_DW_UDC=1 CONFIG_SPEAR_USBTTY=1 CONFIG_USBD_HS=1 CONFIG_USBD_MANUFACTURER="ST Microelectronics" CONFIG_USBD_PRODUCT_NAME="SPEAr SoC" CONFIG_USB_DEVICE=1 CONFIG_USB_TTY=1 CONFIG_spear320=1 CONFIG_usbtty=1 + all: CONFIG_USBTTY=1 - all: CONFIG_DW_UDC=1 CONFIG_SPEAR_USBTTY=1 CONFIG_USBD_HS=1 CONFIG_USBD_MANUFACTURER="ST Microelectronics"
Re: [U-Boot] [PATCH v2 0/2] Detect and reject new ad-hoc CONFIG options
On Tue, Sep 13, 2016 at 07:35:42AM -0600, Simon Glass wrote: > Hi Tom, > > On 13 September 2016 at 07:16, Tom Riniwrote: > > On Mon, Sep 12, 2016 at 11:20:00PM -0600, Simon Glass wrote: > > > >> Despite the availability of Kconfig, the number of ad-hoc CONFIG options in > >> U-Boot is still at over 8000. > >> > >> In February 2015 (commit 741e58e0) there were around 8387 ad-hoc CONFIGs. > >> As of this patch there are about 8336, only a little fewer. > >> > >> One problem is that new ones are still being added, admittedly at a slower > >> rate. This series adds a Makefile check to detect that and produce a build > >> error. This provides immediate feedback that new CONFIG options should go > >> in > >> Kconfig. > >> > >> Changes in v2: > >> - Rebase to mainline > >> - Fix scripts so that there are no errors > >> - Add the 'build-whitelist.sh' script to the tree > >> > >> Simon Glass (2): > >> Kconfig: Add a whitelist of ad-hoc CONFIG options > >> Makefile: Give a build error if ad-hoc CONFIG options are added > > > > OK, this is still a little fragile. When I do: > > ./tools/buildman/buildman -b master --force-build --step 0 \ > > -SCdvel > > 'avr32|nds32|bfin|m68k|microblaze|or32|sh4|sparc|mips|mips64|xtensa' > > > > vs kconfig-working2 I'm seeing a bunch of failures: > > +(M5475GFE) make[1]: *** [no_new_adhoc_configs_check] Error 1 > > +(M5475GFE) make: *** [sub-make] Error 2 > > Yes it looks like I was testing it incorrectly, relying on running on > from the SPL series. One problem is that it misses configs with lower > case which are defined in Kconfig and then used. I've updated > u-boot-dm/kconfig-working2 to deal with that. > > I'll take another look at this and have an update out today. But we > can decouple this from the painful SPL series if you like, since in > principle we can run the generation script to create the first of the > two patches. Yes, we can de-couple this. However, you might want to take a look at say xtensa as in my check with before/after kconfig-working2 there's a tiny size difference and I don't see that normally for a Kconfig migration. I'm doing my arm/powerpc build now to see if there's a similar set of size changes there and will then start poking at map files. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/2] Detect and reject new ad-hoc CONFIG options
Hi Tom, On 13 September 2016 at 07:16, Tom Riniwrote: > On Mon, Sep 12, 2016 at 11:20:00PM -0600, Simon Glass wrote: > >> Despite the availability of Kconfig, the number of ad-hoc CONFIG options in >> U-Boot is still at over 8000. >> >> In February 2015 (commit 741e58e0) there were around 8387 ad-hoc CONFIGs. >> As of this patch there are about 8336, only a little fewer. >> >> One problem is that new ones are still being added, admittedly at a slower >> rate. This series adds a Makefile check to detect that and produce a build >> error. This provides immediate feedback that new CONFIG options should go in >> Kconfig. >> >> Changes in v2: >> - Rebase to mainline >> - Fix scripts so that there are no errors >> - Add the 'build-whitelist.sh' script to the tree >> >> Simon Glass (2): >> Kconfig: Add a whitelist of ad-hoc CONFIG options >> Makefile: Give a build error if ad-hoc CONFIG options are added > > OK, this is still a little fragile. When I do: > ./tools/buildman/buildman -b master --force-build --step 0 \ > -SCdvel 'avr32|nds32|bfin|m68k|microblaze|or32|sh4|sparc|mips|mips64|xtensa' > > vs kconfig-working2 I'm seeing a bunch of failures: > +(M5475GFE) make[1]: *** [no_new_adhoc_configs_check] Error 1 > +(M5475GFE) make: *** [sub-make] Error 2 Yes it looks like I was testing it incorrectly, relying on running on from the SPL series. One problem is that it misses configs with lower case which are defined in Kconfig and then used. I've updated u-boot-dm/kconfig-working2 to deal with that. I'll take another look at this and have an update out today. But we can decouple this from the painful SPL series if you like, since in principle we can run the generation script to create the first of the two patches. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/2] Detect and reject new ad-hoc CONFIG options
On Mon, Sep 12, 2016 at 11:20:00PM -0600, Simon Glass wrote: > Despite the availability of Kconfig, the number of ad-hoc CONFIG options in > U-Boot is still at over 8000. > > In February 2015 (commit 741e58e0) there were around 8387 ad-hoc CONFIGs. > As of this patch there are about 8336, only a little fewer. > > One problem is that new ones are still being added, admittedly at a slower > rate. This series adds a Makefile check to detect that and produce a build > error. This provides immediate feedback that new CONFIG options should go in > Kconfig. > > Changes in v2: > - Rebase to mainline > - Fix scripts so that there are no errors > - Add the 'build-whitelist.sh' script to the tree > > Simon Glass (2): > Kconfig: Add a whitelist of ad-hoc CONFIG options > Makefile: Give a build error if ad-hoc CONFIG options are added OK, this is still a little fragile. When I do: ./tools/buildman/buildman -b master --force-build --step 0 \ -SCdvel 'avr32|nds32|bfin|m68k|microblaze|or32|sh4|sparc|mips|mips64|xtensa' vs kconfig-working2 I'm seeing a bunch of failures: +(M5475GFE) make[1]: *** [no_new_adhoc_configs_check] Error 1 +(M5475GFE) make: *** [sub-make] Error 2 -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 0/2] Detect and reject new ad-hoc CONFIG options
Despite the availability of Kconfig, the number of ad-hoc CONFIG options in U-Boot is still at over 8000. In February 2015 (commit 741e58e0) there were around 8387 ad-hoc CONFIGs. As of this patch there are about 8336, only a little fewer. One problem is that new ones are still being added, admittedly at a slower rate. This series adds a Makefile check to detect that and produce a build error. This provides immediate feedback that new CONFIG options should go in Kconfig. Changes in v2: - Rebase to mainline - Fix scripts so that there are no errors - Add the 'build-whitelist.sh' script to the tree Simon Glass (2): Kconfig: Add a whitelist of ad-hoc CONFIG options Makefile: Give a build error if ad-hoc CONFIG options are added Makefile | 10 +- scripts/build-whitelist.sh | 51 + scripts/check-config.sh | 55 + scripts/config_whitelist.txt | 8419 ++ 4 files changed, 8534 insertions(+), 1 deletion(-) create mode 100755 scripts/build-whitelist.sh create mode 100755 scripts/check-config.sh create mode 100644 scripts/config_whitelist.txt -- 2.8.0.rc3.226.g39d4020 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot