
Hi Tom,
On 13 September 2016 at 07:49, Tom Rini trini@konsulko.com wrote:
On Tue, Sep 13, 2016 at 07:35:42AM -0600, Simon Glass wrote:
Hi Tom,
On 13 September 2016 at 07:16, Tom Rini trini@konsulko.com 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=0x00010000 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=0x00040000 CONFIG_USBTTY=1 - u-boot.cfg: CONFIG_DW_UDC=1 CONFIG_ENV_IS_IN_NAND=1 CONFIG_ENV_OFFSET=0x60000 CONFIG_ENV_RANGE=0x10000 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=0x00010000 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=0x00040000 CONFIG_USBTTY=1 - all: CONFIG_DW_UDC=1 CONFIG_ENV_IS_IN_NAND=1 CONFIG_ENV_OFFSET=0x60000 CONFIG_ENV_RANGE=0x10000 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" CONFIG_USBD_PRODUCT_NAME="SPEAr SoC" CONFIG_USB_DEVICE=1 CONFIG_USB_TTY=1 CONFIG_spear320=1 CONFIG_usbtty=1 spear600_nand : + u-boot.cfg: CONFIG_NAND=1 - u-boot.cfg: CONFIG_nand=1 CONFIG_spear600=1 + all: CONFIG_NAND=1 - all: CONFIG_nand=1 CONFIG_spear600=1 spear300_nand : + u-boot.cfg: CONFIG_ENV_ADDR=(CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN) CONFIG_ENV_IS_IN_FLASH=1 CONFIG_ENV_SECT_SIZE=0x00010000 CONFIG_NAND=1 CONFIG_SYS_MONITOR_LEN=0x00040000 - u-boot.cfg: CONFIG_ENV_IS_IN_NAND=1 CONFIG_ENV_OFFSET=0x60000 CONFIG_ENV_RANGE=0x10000 CONFIG_nand=1 CONFIG_spear300=1 + all: CONFIG_ENV_ADDR=(CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN) CONFIG_ENV_IS_IN_FLASH=1 CONFIG_ENV_SECT_SIZE=0x00010000 CONFIG_NAND=1 CONFIG_SYS_MONITOR_LEN=0x00040000 - all: CONFIG_ENV_IS_IN_NAND=1 CONFIG_ENV_OFFSET=0x60000 CONFIG_ENV_RANGE=0x10000 CONFIG_nand=1 CONFIG_spear300=1 am43xx_evm_usbhost_boot : - u-boot.cfg: CONFIG_SPL_NET_VCI_STRING="AM43xx U-Boot SPL" - u-boot-spl.cfg: CONFIG_SPL_NET_VCI_STRING="AM43xx U-Boot SPL" - all: CONFIG_SPL_NET_VCI_STRING="AM43xx U-Boot SPL" am335x_evm_usbspl : + u-boot.cfg: CONFIG_SPL_ENV_SUPPORT=1 CONFIG_SPL_NET_SUPPORT=1 CONFIG_SPL_NET_VCI_STRING="" + u-boot-spl.cfg: CONFIG_SPL_MMC_SUPPORT=1 CONFIG_SPL_NAND_SUPPORT=1 CONFIG_SPL_YMODEM_SUPPORT=1 + all: 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 spear320_usbtty_nand : + u-boot.cfg: CONFIG_ENV_ADDR=(CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN) CONFIG_ENV_IS_IN_FLASH=1 CONFIG_ENV_SECT_SIZE=0x00010000 CONFIG_NAND=1 CONFIG_SYS_MONITOR_LEN=0x00040000 CONFIG_USBTTY=1 - u-boot.cfg: CONFIG_DW_UDC=1 CONFIG_ENV_IS_IN_NAND=1 CONFIG_ENV_OFFSET=0x60000 CONFIG_ENV_RANGE=0x10000 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_nand=1 CONFIG_spear320=1 CONFIG_usbtty=1 + all: CONFIG_ENV_ADDR=(CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN) CONFIG_ENV_IS_IN_FLASH=1 CONFIG_ENV_SECT_SIZE=0x00010000 CONFIG_NAND=1 CONFIG_SYS_MONITOR_LEN=0x00040000 CONFIG_USBTTY=1 - all: CONFIG_DW_UDC=1 CONFIG_ENV_IS_IN_NAND=1 CONFIG_ENV_OFFSET=0x60000 CONFIG_ENV_RANGE=0x10000 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_nand=1 CONFIG_spear320=1 CONFIG_usbtty=1 am43xx_evm_ethboot : + u-boot.cfg: CONFIG_SPL_NET_SUPPORT=1 + all: CONFIG_SPL_NET_SUPPORT=1 spear310_usbtty_nand : + u-boot.cfg: CONFIG_ENV_ADDR=(CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN) CONFIG_ENV_IS_IN_FLASH=1 CONFIG_ENV_SECT_SIZE=0x00010000 CONFIG_NAND=1 CONFIG_SYS_MONITOR_LEN=0x00040000 CONFIG_USBTTY=1 - u-boot.cfg: CONFIG_DW_UDC=1 CONFIG_ENV_IS_IN_NAND=1 CONFIG_ENV_OFFSET=0x60000 CONFIG_ENV_RANGE=0x10000 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_nand=1 CONFIG_spear310=1 CONFIG_usbtty=1 + all: CONFIG_ENV_ADDR=(CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN) CONFIG_ENV_IS_IN_FLASH=1 CONFIG_ENV_SECT_SIZE=0x00010000 CONFIG_NAND=1 CONFIG_SYS_MONITOR_LEN=0x00040000 CONFIG_USBTTY=1 - all: CONFIG_DW_UDC=1 CONFIG_ENV_IS_IN_NAND=1 CONFIG_ENV_OFFSET=0x60000 CONFIG_ENV_RANGE=0x10000 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_nand=1 CONFIG_spear310=1 CONFIG_usbtty=1 spear310_usbtty spear310_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_spear310=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" CONFIG_USBD_PRODUCT_NAME="SPEAr SoC" CONFIG_USB_DEVICE=1 CONFIG_USB_TTY=1 CONFIG_spear310=1 CONFIG_usbtty=1 spear300 : - u-boot.cfg: CONFIG_spear300=1 - all: CONFIG_spear300=1 spear600_usbtty : + u-boot.cfg: CONFIG_USBTTY=1 - u-boot.cfg: CONFIG_spear600=1 CONFIG_usbtty=1 + all: CONFIG_USBTTY=1 - all: CONFIG_spear600=1 CONFIG_usbtty=1 spear320_nand : + u-boot.cfg: CONFIG_ENV_ADDR=(CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN) CONFIG_ENV_IS_IN_FLASH=1 CONFIG_ENV_SECT_SIZE=0x00010000 CONFIG_NAND=1 CONFIG_SYS_MONITOR_LEN=0x00040000 - u-boot.cfg: CONFIG_ENV_IS_IN_NAND=1 CONFIG_ENV_OFFSET=0x60000 CONFIG_ENV_RANGE=0x10000 CONFIG_nand=1 CONFIG_spear320=1 + all: CONFIG_ENV_ADDR=(CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN) CONFIG_ENV_IS_IN_FLASH=1 CONFIG_ENV_SECT_SIZE=0x00010000 CONFIG_NAND=1 CONFIG_SYS_MONITOR_LEN=0x00040000 - all: CONFIG_ENV_IS_IN_NAND=1 CONFIG_ENV_OFFSET=0x60000 CONFIG_ENV_RANGE=0x10000 CONFIG_nand=1 CONFIG_spear320=1 stv0991 : + u-boot.cfg: CONFIG_STV0991=1 - u-boot.cfg: CONFIG_stv0991=1 + all: CONFIG_STV0991=1 - all: CONFIG_stv0991=1 spear320 spear320_pnor : - u-boot.cfg: CONFIG_spear320=1 - all: CONFIG_spear320=1 spear310_nand : + u-boot.cfg: CONFIG_ENV_ADDR=(CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN) CONFIG_ENV_IS_IN_FLASH=1 CONFIG_ENV_SECT_SIZE=0x00010000 CONFIG_NAND=1 CONFIG_SYS_MONITOR_LEN=0x00040000 - u-boot.cfg: CONFIG_ENV_IS_IN_NAND=1 CONFIG_ENV_OFFSET=0x60000 CONFIG_ENV_RANGE=0x10000 CONFIG_nand=1 CONFIG_spear310=1 + all: CONFIG_ENV_ADDR=(CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN) CONFIG_ENV_IS_IN_FLASH=1 CONFIG_ENV_SECT_SIZE=0x00010000 CONFIG_NAND=1 CONFIG_SYS_MONITOR_LEN=0x00040000 - all: CONFIG_ENV_IS_IN_NAND=1 CONFIG_ENV_OFFSET=0x60000 CONFIG_ENV_RANGE=0x10000 CONFIG_nand=1 CONFIG_spear310=1 spear300_usbtty : + 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_spear300=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" CONFIG_USBD_PRODUCT_NAME="SPEAr SoC" CONFIG_USB_DEVICE=1 CONFIG_USB_TTY=1 CONFIG_spear300=1 CONFIG_usbtty=1 spear600 : - u-boot.cfg: CONFIG_spear600=1 - all: CONFIG_spear600=1 spear300_usbtty_nand : + u-boot.cfg: CONFIG_ENV_ADDR=(CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN) CONFIG_ENV_IS_IN_FLASH=1 CONFIG_ENV_SECT_SIZE=0x00010000 CONFIG_NAND=1 CONFIG_SYS_MONITOR_LEN=0x00040000 CONFIG_USBTTY=1 - u-boot.cfg: CONFIG_DW_UDC=1 CONFIG_ENV_IS_IN_NAND=1 CONFIG_ENV_OFFSET=0x60000 CONFIG_ENV_RANGE=0x10000 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_nand=1 CONFIG_spear300=1 CONFIG_usbtty=1 + all: CONFIG_ENV_ADDR=(CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN) CONFIG_ENV_IS_IN_FLASH=1 CONFIG_ENV_SECT_SIZE=0x00010000 CONFIG_NAND=1 CONFIG_SYS_MONITOR_LEN=0x00040000 CONFIG_USBTTY=1 - all: CONFIG_DW_UDC=1 CONFIG_ENV_IS_IN_NAND=1 CONFIG_ENV_OFFSET=0x60000 CONFIG_ENV_RANGE=0x10000 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_nand=1 CONFIG_spear300=1 CONFIG_usbtty=1 spear310 spear310_pnor : - u-boot.cfg: CONFIG_spear310=1 - all: CONFIG_spear310=1 spear600_usbtty_nand : + u-boot.cfg: CONFIG_NAND=1 CONFIG_USBTTY=1 - u-boot.cfg: CONFIG_nand=1 CONFIG_spear600=1 CONFIG_usbtty=1 + all: CONFIG_NAND=1 CONFIG_USBTTY=1 - all: CONFIG_nand=1 CONFIG_spear600=1 CONFIG_usbtty=1
I don't see anything with xtensa. buildman -sS seems happy, and:
$ ls -l ../kc4-conf/01_of_46_g0eb43efbf341e1637f4c5f40ff4afee812d2382c_buildman/xtfpga/ total 180 -rw-r----- 1 sjg eng 2441 Sep 13 12:35 autoconf.h -rw-r----- 1 sjg eng 3242 Sep 13 12:35 autoconf.mk -rw-r----- 1 sjg eng 18683 Sep 13 12:34 autoconf-spl.mk -rw-r----- 1 sjg eng 18961 Sep 13 12:34 autoconf-tpl.mk -rw-r----- 1 sjg eng 1 Sep 13 12:35 done -rw-r----- 1 sjg eng 0 Sep 13 12:35 log -rw-r----- 1 sjg eng 56 Sep 13 12:35 sizes -rw-r----- 1 sjg eng 190 Sep 13 12:35 toolchain -rw-r----- 1 sjg eng 26156 Sep 13 12:35 u-boot.cfg -rw-r----- 1 sjg eng 3097 Sep 13 12:35 u-boot.objdump -rw-r----- 1 sjg eng 29268 Sep 13 12:35 u-boot.sizes -rw-r----- 1 sjg eng 27632 Sep 13 12:34 u-boot-spl.cfg -rw-r----- 1 sjg eng 28141 Sep 13 12:34 u-boot-tpl.cfg $ ls -l ../kc4-conf/46_of_46_g96f50085eba4631013e7a5774d8da26c25e72d60_Convert-CONFIG_SPL_Y/xtfpga/ total 180 -rw-r----- 1 sjg eng 2441 Sep 13 12:35 autoconf.h -rw-r----- 1 sjg eng 3242 Sep 13 12:35 autoconf.mk -rw-r----- 1 sjg eng 18683 Sep 13 12:34 autoconf-spl.mk -rw-r----- 1 sjg eng 18961 Sep 13 12:34 autoconf-tpl.mk -rw-r----- 1 sjg eng 1 Sep 13 12:35 done -rw-r----- 1 sjg eng 0 Sep 13 12:35 log -rw-r----- 1 sjg eng 56 Sep 13 12:35 sizes -rw-r----- 1 sjg eng 190 Sep 13 12:35 toolchain -rw-r----- 1 sjg eng 26156 Sep 13 12:35 u-boot.cfg -rw-r----- 1 sjg eng 3097 Sep 13 12:35 u-boot.objdump -rw-r----- 1 sjg eng 29268 Sep 13 12:35 u-boot.sizes -rw-r----- 1 sjg eng 27632 Sep 13 12:34 u-boot-spl.cfg -rw-r----- 1 sjg eng 28141 Sep 13 12:34 u-boot-tpl.cfg
This is for the SPL patches only, not the follow-on series (two config-check patches).
Any ideas?
Regards, Simon