config whitelist: tool update and sync
v3 cover config whitelist: tool update and sync
The current build-whitelist.sh allows to add new options into the whitelist. For example, it is possible that somebody adds #ifdef CONFIG_NEW_OPTITON to his C file.
So, the build-whitelist.sh will pick it up when we run it next time. We never want to increase the ad-hoc options.
Masahiro Yamada (3):
build-whitelist: do not add new options to whitelist when update
config_whitelist: sync by tool
config_whitelist: remove bogus options
scripts/build-whitelist.sh | 15 +++++++++++++-- scripts/config_whitelist.txt | 16 ---------------- 2 files changed, 13 insertions(+), 18 deletions(-)
Signature · 1 line
1.9.1
PATCH v3 1/3 build-whitelist: do not add new options to whitelist when update
If somebody adds references to new CONFIG options in source files, they will be added in the whitelist when we sync it. (For example, if we run scripts/build-whitelist.sh against commit 42f75050667b, new options CONFIG_SPL_DFU_SUPPORT and CONFIG_USB_XHCI_UNIPHIER will appear in the list.)
In order to make steady progress of Kconfig migration, we want to only decrease whitelist options, but never increase.
So, when we update the whitelist, we should create a temporary list, then take the intersection of the temporary one and the current one.
---
Changes in v3: None
Changes in v2:
- V1 fails to create scripts/config-whitelist.txt from scratch. Fix it.
scripts/build-whitelist.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
scripts/build-whitelist.sh +13 -2
@@ -45,7 +45,18 @@ cat `find . -name "Kconfig*"` |sed -n \ # Use only the options that are present in the first file but not the second. comm -23 scripts/config_whitelist.txt.tmp1 scripts/config_whitelist.txt.tmp2 \ - |sort |uniq >scripts/config_whitelist.txt -rm scripts/config_whitelist.txt.tmp1 scripts/config_whitelist.txt.tmp2 + |sort |uniq >scripts/config_whitelist.txt.tmp3 + +# If scripts/config_whitelist.txt already exists, take the intersection of the +# current list and the new one. We do not want to increase whitelist options. +if [ -r scripts/config_whitelist.txt ]; then + comm -12 scripts/config_whitelist.txt.tmp3 scripts/config_whitelist.txt \ + > scripts/config_whitelist.txt.tmp4 + mv scripts/config_whitelist.txt.tmp4 scripts/config_whitelist.txt +else + mv scripts/config_whitelist.txt.tmp3 scripts/config_whitelist.txt +fi + +rm scripts/config_whitelist.txt.tmp* unset LC_ALL LC_COLLATE
Signature · 1 line
1.9.1
PATCH v3 1/3 build-whitelist: do not add new options to whitelist when update
Quoted 6 lines · Masahiro Yamada
If somebody adds references to new CONFIG options in source files, they will be added in the whitelist when we sync it. (For example, if we run
scripts/build-whitelist.shagainst commit42f75050667b, new optionsCONFIG_SPL_DFU_SUPPORTandCONFIG_USB_XHCI_UNIPHIERwill appear in the list.)
Quoted 8 lines
In order to make steady progress of
Kconfigmigration, we want to only decrease whitelist options, but never increase.So, when we update the whitelist, we should create a temporary list, then take the intersection of the temporary one and the current one.
Signed-off-by Masahiro Yamada <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, 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/20161008/1f41009d/attachment.sig>
PATCH v3 2/3 config_whitelist: sync by tool
In reply to Masahiro YamadaIt is a good practice to drop an option from the whitelist when we convert it to Kconfig, but we may sometimes forget to do that.
So, it might be a good idea to sync the whitelist from time to time.
This commit was generated by:
scripts/build-whitelist.sh
Looks like we had a bit progress...
---
You do not need to apply this, but this is a reminder for periodical sync, like we sync defconfigs from time to time.
Tom can directly run scripts/build-whitelist.sh in the u-boot/master while drinking coffee.
Changes in v3: None
Changes in v2: None
scripts/config_whitelist.txt | 6 ------ 1 file changed, 6 deletions(-)
scripts/config_whitelist.txt +0 -6
@@ -891,7 +891,6 @@ CONFIG_DMC_DDRTR2 CONFIG_DNET_AUTONEG_TIMEOUT CONFIG_DNP5370_EXT_WD_DISABLE CONFIG_DOS_PARTITION -CONFIG_DPLL_SSC_RATE_1PER CONFIG_DP_DDR_CTRL CONFIG_DP_DDR_DIMM_SLOTS_PER_CTLR CONFIG_DP_DDR_NUM_CTRLS
@@ -1256,7 +1255,6 @@ CONFIG_FO300 CONFIG_FOO CONFIG_FORCE_DDR_DATA_BUS_WIDTH_32 CONFIG_FORMIKE -CONFIG_FPGA CONFIG_FPGA_ALTERA CONFIG_FPGA_COUNT CONFIG_FPGA_CYCLON2
@@ -1265,7 +1263,6 @@ CONFIG_FPGA_SOCFPGA CONFIG_FPGA_SPARTAN2 CONFIG_FPGA_SPARTAN3 CONFIG_FPGA_STRATIX_V -CONFIG_FPGA_XILINX CONFIG_FPGA_ZYNQPL CONFIG_FSLDMAFEC CONFIG_FSL_CADMUS
@@ -1656,7 +1653,6 @@ CONFIG_ICACHE CONFIG_ICACHE_OFF CONFIG_ICON CONFIG_ICS307_REFCLK_HZ -CONFIG_IDENT_STRING CONFIG_IDE_8xx_DIRECT CONFIG_IDE_8xx_PCCARD CONFIG_IDE_INIT_POSTRESET
@@ -3991,8 +3987,6 @@ CONFIG_SCSI_SYM53C8XX CONFIG_SC_TIMER_CLK CONFIG_SDCARD CONFIG_SDHCI -CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT -CONFIG_SDHCI_CMD_MAX_TIMEOUT CONFIG_SDRAM_BANK0 CONFIG_SDRAM_BANK1 CONFIG_SDRAM_ECC
Signature · 1 line
1.9.1
PATCH v3 2/3 config_whitelist: sync by tool
Quoted 5 lines · Masahiro Yamada
It is a good practice to drop an option from the whitelist when we convert it to
Kconfig, but we may sometimes forget to do that.So, it might be a good idea to sync the whitelist from time to time.
Quoted 7 lines
This commit was generated by:
scripts/build-whitelist.shLooks like we had a bit progress...
Signed-off-by Masahiro Yamada <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, 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/20161008/8113a467/attachment.sig>
PATCH v3 3/3 config_whitelist: remove bogus options
In reply to Masahiro YamadaThese are not CONFIG options (detected by my eyes).
CONFIG_SPL_BUILD and CONFIG_TPL_BUILD are build options defined only for building SPL and TPL, respectively.
The others are just mentioned in comment blocks.
Now, scripts/build-whitelist.sh never picks up new options. Once we kill these false ones, they will never revive.
---
Changes in v3:
- Newly added
scripts/config_whitelist.txt | 10 ---------- 1 file changed, 10 deletions(-)
scripts/config_whitelist.txt +0 -10
@@ -1,4 +1,3 @@ -CONFIG_ CONFIG_16BIT CONFIG_33 CONFIG_400MHZ_MODE
@@ -1252,7 +1251,6 @@ CONFIG_FLASH_VERIFY CONFIG_FMAN_ENET CONFIG_FM_PLAT_CLK_DIV CONFIG_FO300 -CONFIG_FOO CONFIG_FORCE_DDR_DATA_BUS_WIDTH_32 CONFIG_FORMIKE CONFIG_FPGA_ALTERA
@@ -1725,7 +1723,6 @@ CONFIG_IRAM_TOP CONFIG_IRDA_BASE CONFIG_ISO_PARTITION CONFIG_ISP1362_USB -CONFIG_IS_ CONFIG_IS_BUILTIN CONFIG_IS_ENABLED CONFIG_IS_INVALID
@@ -4245,7 +4242,6 @@ CONFIG_SPL_BOOTROM_SAVE CONFIG_SPL_BOOT_DEVICE CONFIG_SPL_BSS_MAX_SIZE CONFIG_SPL_BSS_START_ADDR -CONFIG_SPL_BUILD CONFIG_SPL_CMT CONFIG_SPL_CMT_DEBUG CONFIG_SPL_COMMON_INIT_DDR
@@ -4253,7 +4249,6 @@ CONFIG_SPL_CONSOLE CONFIG_SPL_DISPLAY_PRINT CONFIG_SPL_ETH_DEVICE CONFIG_SPL_FLUSH_IMAGE -CONFIG_SPL_FOO CONFIG_SPL_FRAMEWORK CONFIG_SPL_FSL_PBL CONFIG_SPL_FS_LOAD_ARGS_NAME
@@ -7922,7 +7917,6 @@ CONFIG_SYS_XIMG_LEN CONFIG_SYS_XLB_PIPELINING CONFIG_SYS_XSVF_DEFAULT_ADDR CONFIG_SYS_XWAY_EBU_BOOTCFG -CONFIG_SYS_XXX CONFIG_SYS_ZYNQ_QSPI_WAIT CONFIG_SYS_ZYNQ_SPI_WAIT CONFIG_SYS_i2C_FSL
@@ -7992,7 +7986,6 @@ CONFIG_TI_SPI_MMAP CONFIG_TMU_CMD_DTT CONFIG_TMU_TIMER CONFIG_TOTAL5200 -CONFIG_TPL_BUILD CONFIG_TPL_DRIVERS_MISC_SUPPORT CONFIG_TPL_PAD_TO CONFIG_TPM_TIS_BASE_ADDRESS
@@ -8406,6 +8399,3 @@ CONFIG_ZYNQ_SDHCI_MAX_FREQ CONFIG_ZYNQ_SDHCI_MIN_FREQ CONFIG_ZYNQ_SERIAL CONFIG_eTSEC_MDIO_BUS -CONFIG_n -CONFIG_prefix -CONFIG_xxx
Signature · 1 line
1.9.1
PATCH v3 3/3 config_whitelist: remove bogus options
Quoted 10 lines · Masahiro Yamada
These are not CONFIG options (detected by my eyes).
CONFIG_SPL_BUILDandCONFIG_TPL_BUILDare build options defined only for building SPL and TPL, respectively.The others are just mentioned in comment blocks.
Now,
scripts/build-whitelist.shnever picks up new options. Once we kill these false ones, they will never revive.
Quoted 8 lines
Signed-off-by Masahiro Yamada <[email protected]>---
Changes in v3:
- Newly addedscripts/config_whitelist.txt | 10 ---------- 1 file changed, 10 deletions(-)
PATCH v3 3/3 config_whitelist: remove bogus options
In reply to Masahiro YamadaQuoted 5 lines · Masahiro Yamada
These are not CONFIG options (detected by my eyes).
CONFIG_SPL_BUILDandCONFIG_TPL_BUILDare build options defined only for building SPL and TPL, respectively.
Quoted 7 lines
The others are just mentioned in comment blocks.
Now,
scripts/build-whitelist.shnever picks up new options. Once we kill these false ones, they will never revive.Signed-off-by Masahiro Yamada <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, 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/20161008/511c1711/attachment.sig>