Kconfig: convert MD5 and CMD_MD5SUM
Subsystems (3)
cover Kconfig: convert MD5 and CMD_MD5SUM
This series move CONFIG_MD5 and the associated CONFIG_CMD_MD5SUM over to Kconfig, so it can easily be selected either by menuconfig or by a _defconfig (without resorting to header file hacks).
Cheers,
Andre.
Andre Przywara (4):
kirkwood: remove get_random_hex() and MD5 dependency
Kconfig: introduce md5sum command selection
Kconfig: define MD5 dependency for FIT support
configs: move CMD_MD5SUM definition to defconfigs
Kconfig | 1 + arch/arm/mach-kirkwood/include/mach/config.h | 1 - arch/arm/mach-kirkwood/include/mach/cpu.h | 1 - cmd/Kconfig | 14 ++++++++++++++ configs/dragonboard410c_defconfig | 1 + configs/sandbox_defconfig | 1 + configs/sandbox_noblk_defconfig | 1 + configs/sandbox_spl_defconfig | 1 + configs/sh7752evb_defconfig | 1 + configs/sh7753evb_defconfig | 1 + configs/sh7757lcr_defconfig | 1 + include/configs/dragonboard410c.h | 4 ---- include/configs/sandbox.h | 1 - include/configs/sh7752evb.h | 2 -- include/configs/sh7753evb.h | 2 -- include/configs/sh7757lcr.h | 2 -- include/image.h | 1 - lib/Kconfig | 4 ++++ scripts/config_whitelist.txt | 3 --- 19 files changed, 26 insertions(+), 17 deletions(-)
Signature · 1 line
2.8.2
PATCH 1/4 kirkwood: remove get_random_hex() and MD5 dependency
Commit 19a5944fcd62 ("mvgbe: remove setting of ethaddr within the driver") removed the usage of get_random_hex() from the mvgbe driver about six years ago. However the prototype of that function survived till today in some kirkwood header file.
Remove that prototype and the CONFIG_MD5 dependency triggered by that.
--- arch/arm/mach-kirkwood/include/mach/config.h | 1 - arch/arm/mach-kirkwood/include/mach/cpu.h | 1 - 2 files changed, 2 deletions(-)
arch/arm/mach-kirkwood/include/mach/config.h +0 -1
@@ -24,7 +24,6 @@#endif /* CONFIG_KW88F6281 */ #include <asm/arch/soc.h> -#define CONFIG_MD5 /* get_random_hex on krikwood needs MD5 support */ #define CONFIG_KIRKWOOD_EGIGA_INIT /* Enable GbePort0/1 for kernel */ #define CONFIG_KIRKWOOD_RGMII_PAD_1V8 /* Set RGMII Pad voltage to 1.8V */ #define CONFIG_KIRKWOOD_PCIE_INIT /* Enable PCIE Port0 for kernel */
arch/arm/mach-kirkwood/include/mach/cpu.h +0 -1
@@ -139,7 +139,6 @@ struct kwgpio_registers {/* * functions */ -unsigned char get_random_hex (void );unsigned int mvebu_sdram_bar (enum memory_bank bank);unsigned int mvebu_sdram_bs (enum memory_bank bank);void mvebu_sdram_size_adjust (enum memory_bank bank);
Signature · 1 line
2.8.2
PATCH 2/4 Kconfig: introduce md5sum command selection
In reply to Andre PrzywaraSo far CONFIG_MD5SUM would need to be set by a board's include file. Since the command is really generic, move it over to Kconfig to allow it to be defined by either a board's defconfig, menuconfig or some config snippet merged via mergeconfig.sh.
--- cmd/Kconfig | 14 ++++++++++++++ lib/Kconfig | 4 ++++ 2 files changed, 18 insertions(+)
cmd/Kconfig +14 -0
@@ -338,6 +338,20 @@ config CMD_CRC32 help Compute CRC32. +config CMD_MD5SUM + bool "md5sum" + default n + select MD5 + help + Compute MD5 checksum. + +config MD5SUM_VERFIY + bool "md5sum -v" + default n + depends on CMD_MD5SUM + help + Add -v option to verify data against an MD5 checksum. + config LOOPW bool "loopw" help
lib/Kconfig +4 -0
@@ -101,6 +101,10 @@ config SHA_PROG_HW_ACCEL SHA1/SHA256 progressive hashing. Data can be streamed in a block at a time and the hashing is performed in hardware. + +config MD5 + bool + endmenu menu "Compression Support"
Signature · 1 line
2.8.2
PATCH 3/4 Kconfig: define MD5 dependency for FIT support
In reply to Andre PrzywaraFIT images require MD5 support to verify image checksums. So far this was expressed by defining a CPP symbol in image.h. Since MD5 is now a first class Kconfig citizen, express that in Kconfig instead.
--- Kconfig | 1 + include/image.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)
Kconfig +1 -0
@@ -144,6 +144,7 @@ menu "Boot images" config FIT bool "Support Flattened Image Tree" + select MD5 help This option allows you to boot the new uImage structure, Flattened Image Tree. FIT is formally a FDT, which can include
include/image.h +0 -1
@@ -67,7 +67,6 @@ struct lmb;# endif # else # define CONFIG_CRC32 /* FIT images need CRC32 support */ -# define CONFIG_MD5 /* and MD5 */ # define CONFIG_SHA1 /* and SHA1 */ # define CONFIG_SHA256 /* and SHA256 */ # define IMAGE_ENABLE_CRC32 1
Signature · 1 line
2.8.2
PATCH 4/4 configs: move CMD_MD5SUM definition to defconfigs
In reply to Andre PrzywaraBoards with an apparent need for the md5sum command had the connected config symbol defined in their board header file.
Move this over to the respective defconfig files now that md5sum is configured via Kconfig.
(This is a manual effort, which differs from moveconfig.py, not sure who is right here. Boards except sandbox loose the md5sum command with moveconfig.py, though it was explicitly mentioned in their config.h's)
--- configs/dragonboard410c_defconfig | 1 + configs/sandbox_defconfig | 1 + configs/sandbox_noblk_defconfig | 1 + configs/sandbox_spl_defconfig | 1 + configs/sh7752evb_defconfig | 1 + configs/sh7753evb_defconfig | 1 + configs/sh7757lcr_defconfig | 1 + include/configs/dragonboard410c.h | 4 ---- include/configs/sandbox.h | 1 - include/configs/sh7752evb.h | 2 -- include/configs/sh7753evb.h | 2 -- include/configs/sh7757lcr.h | 2 -- scripts/config_whitelist.txt | 3 --- 13 files changed, 7 insertions(+), 14 deletions(-)
configs/dragonboard410c_defconfig +1 -0
@@ -36,3 +36,4 @@ CONFIG_USB_EHCI_MSM=y CONFIG_USB_ULPI_VIEWPORT=y CONFIG_USB_ULPI=y CONFIG_USB_STORAGE=y +CONFIG_CMD_MD5SUM=y
configs/sandbox_defconfig +1 -0
@@ -22,6 +22,7 @@ CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y +CONFIG_CMD_MD5SUM=y CONFIG_LOOPW=y CONFIG_CMD_MEMTEST=y CONFIG_CMD_MX_CYCLIC=y
configs/sandbox_noblk_defconfig +1 -0
@@ -22,6 +22,7 @@ CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y +CONFIG_CMD_MD5SUM=y CONFIG_LOOPW=y CONFIG_CMD_MEMTEST=y CONFIG_CMD_MX_CYCLIC=y
configs/sandbox_spl_defconfig +1 -0
@@ -29,6 +29,7 @@ CONFIG_CMD_BOOTZ=y # CONFIG_CMD_IMLS is not set CONFIG_CMD_ASKENV=y CONFIG_CMD_GREPENV=y +CONFIG_CMD_MD5SUM=y CONFIG_LOOPW=y CONFIG_CMD_MEMTEST=y CONFIG_CMD_MX_CYCLIC=y
configs/sh7752evb_defconfig +1 -0
@@ -27,6 +27,7 @@ CONFIG_CMD_EXT2=y CONFIG_MAC_PARTITION=y CONFIG_DOS_PARTITION=y CONFIG_MMC=y +CONFIG_CMD_MD5SUM=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_MACRONIX=y CONFIG_SPI_FLASH_STMICRO=y
configs/sh7753evb_defconfig +1 -0
@@ -26,6 +26,7 @@ CONFIG_CMD_EXT2=y CONFIG_MAC_PARTITION=y CONFIG_DOS_PARTITION=y CONFIG_MMC=y +CONFIG_CMD_MD5SUM=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_MACRONIX=y CONFIG_SPI_FLASH_STMICRO=y
configs/sh7757lcr_defconfig +1 -0
@@ -27,6 +27,7 @@ CONFIG_CMD_EXT2=y CONFIG_MAC_PARTITION=y CONFIG_DOS_PARTITION=y CONFIG_MMC=y +CONFIG_CMD_MD5SUM=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_USE_PRIVATE_LIBGCC=y
include/configs/dragonboard410c.h +0 -4
@@ -46,12 +46,8 @@#define CONFIG_USB_ETHER_MCS7830 #define CONFIG_USB_ETHER_SMSC95XX -/* Libraries */ -#define CONFIG_MD5 -/* Extra Commands */ #define CONFIG_CMD_ENV -#define CONFIG_CMD_MD5SUM /* Enable that for switching of boot partitions */ /* Disabled by default as some sub-commands can brick eMMC */ /*#define CONFIG_SUPPORT_EMMC_BOOT */
include/configs/sandbox.h +0 -1
@@ -44,7 +44,6 @@#define CONFIG_CMD_CBFS #define CONFIG_CMD_CRAMFS #define CONFIG_HOST_MAX_DEVICES 4 -#define CONFIG_CMD_MD5SUM /* * Size of malloc() pool, before and after relocation
include/configs/sh7752evb.h +0 -2
@@ -16,8 +16,6 @@#define CONFIG_CMD_DFL #define CONFIG_CMD_SDRAM -#define CONFIG_CMD_MD5SUM -#define CONFIG_MD5 #define CONFIG_BAUDRATE 115200#define CONFIG_BOOTARGS "console=ttySC2,115200 root=/dev/nfs ip=dhcp"
include/configs/sh7753evb.h +0 -2
@@ -16,8 +16,6 @@#define CONFIG_CMD_DFL #define CONFIG_CMD_SDRAM -#define CONFIG_CMD_MD5SUM -#define CONFIG_MD5 #define CONFIG_BAUDRATE 115200#define CONFIG_BOOTARGS "console=ttySC2,115200 root=/dev/nfs ip=dhcp"
include/configs/sh7757lcr.h +0 -2
@@ -16,8 +16,6 @@#define CONFIG_SYS_TEXT_BASE 0x8ef80000#define CONFIG_CMD_SDRAM -#define CONFIG_CMD_MD5SUM -#define CONFIG_MD5 #define CONFIG_BAUDRATE 115200#define CONFIG_BOOTARGS "console=ttySC2,115200 root=/dev/nfs ip=dhcp"
scripts/config_whitelist.txt +0 -3
@@ -509,7 +509,6 @@ CONFIG_CMD_LDRINFO CONFIG_CMD_LOADY CONFIG_CMD_LZMADEC CONFIG_CMD_MAX6957 -CONFIG_CMD_MD5SUM CONFIG_CMD_MEM CONFIG_CMD_MFSL CONFIG_CMD_MMC_SPI
@@ -1882,8 +1881,6 @@ CONFIG_MCFRTC CONFIG_MCFTMR CONFIG_MCFUART CONFIG_MCLK_DIS -CONFIG_MD5 -CONFIG_MD5SUM_VERIFY CONFIG_MDIO_TIMEOUT CONFIG_MECP5123 CONFIG_MEMSIZE
Signature · 1 line
2.8.2
PATCH 1/4 kirkwood: remove get_random_hex() and MD5 dependency
In reply to Andre PrzywaraQuoted 11 lines · Andre Przywara
Commit
19a5944fcd62("mvgbe: remove setting of ethaddr within the driver") removed the usage ofget_random_hex()from the mvgbe driver about six years ago. However the prototype of that function survived till today in some kirkwood header file.
Remove that prototype and theCONFIG_MD5dependency triggered by that.Signed-off-by Andre Przywara <[email protected]>--- arch/arm/mach-kirkwood/include/mach/config.h | 1 - arch/arm/mach-kirkwood/include/mach/cpu.h | 1 - 2 files changed, 2 deletions(-)
PATCH 2/4 Kconfig: introduce md5sum command selection
In reply to Andre PrzywaraQuoted 10 lines · Andre Przywara
So far
CONFIG_MD5SUMwould need to be set by a board's include file. Since the command is really generic, move it over toKconfigto allow it to be defined by either a board's defconfig, menuconfig or some config snippet merged viamergeconfig.sh.Signed-off-by Andre Przywara <[email protected]>--- cmd/Kconfig | 14 ++++++++++++++ lib/Kconfig | 4 ++++ 2 files changed, 18 insertions(+)
PATCH 3/4 Kconfig: define MD5 dependency for FIT support
In reply to Andre PrzywaraQuoted 9 lines · Andre Przywara
FIT images require MD5 support to verify image checksums. So far this was expressed by defining a CPP symbol in
image.h. Since MD5 is now a first classKconfigcitizen, express that inKconfiginstead.Signed-off-by Andre Przywara <[email protected]>--- Kconfig | 1 + include/image.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)
PATCH 4/4 configs: move CMD_MD5SUM definition to defconfigs
In reply to Andre PrzywaraHi Andre,
Quoted 9 lines · Andre Przywara
Boards with an apparent need for the md5sum command had the connected config symbol defined in their board header file.
Move this over to the respective defconfig files now that md5sum is configured viaKconfig.
(This is a manual effort, which differs frommoveconfig.py, not sure who is right here. Boards except sandbox loose the md5sum command withmoveconfig.py, though it was explicitly mentioned in their config.h's)Signed-off-by Andre Przywara <[email protected]>
Quoted 15 lines
--- configs/dragonboard410c_defconfig | 1 + configs/sandbox_defconfig | 1 + configs/sandbox_noblk_defconfig | 1 + configs/sandbox_spl_defconfig | 1 + configs/sh7752evb_defconfig | 1 + configs/sh7753evb_defconfig | 1 + configs/sh7757lcr_defconfig | 1 + include/configs/dragonboard410c.h | 4 ---- include/configs/sandbox.h | 1 - include/configs/sh7752evb.h | 2 -- include/configs/sh7753evb.h | 2 -- include/configs/sh7757lcr.h | 2 -- scripts/config_whitelist.txt | 3 --- 13 files changed, 7 insertions(+), 14 deletions(-)
That's odd - did you check that these boards actually do end up with it. I've not seen that problem with moveconfig.py before.
Regards,
SImon
PATCH 1/4 kirkwood: remove get_random_hex() and MD5 dependency
In reply to Andre PrzywaraQuoted 29 lines · Andre Przywara
Commit
19a5944fcd62("mvgbe: remove setting of ethaddr within the driver") removed the usage ofget_random_hex()from the mvgbe driver about six years ago. However the prototype of that function survived till today in some kirkwood header file.
Remove that prototype and theCONFIG_MD5dependency triggered by that.Signed-off-by Andre Przywara <[email protected]>--- arch/arm/mach-kirkwood/include/mach/config.h | 1 - arch/arm/mach-kirkwood/include/mach/cpu.h | 1 - 2 files changed, 2 deletions(-)arch/arm/mach-kirkwood/include/mach/config.h +0
-1@@ -24,7 +24,6 @@#endif /* CONFIG_KW88F6281 */ #include <asm/arch/soc.h> -#define CONFIG_MD5 /* get_random_hex on krikwood needs MD5 support */ #define CONFIG_KIRKWOOD_EGIGA_INIT /* Enable GbePort0/1 for kernel */ #define CONFIG_KIRKWOOD_RGMII_PAD_1V8 /* Set RGMII Pad voltage to 1.8V */ #define CONFIG_KIRKWOOD_PCIE_INIT /* Enable PCIE Port0 for kernel */ arch/arm/mach-kirkwood/include/mach/cpu.h +0
-0
arch/arm/mach-kirkwood/include/mach/cpu.h struct kwgpio_registers { · line 144
Quoted 7 lines
arch/arm/mach-kirkwood/include/mach/cpu.h +0
-1@@ -139,7 +139,6 @@ struct kwgpio_registers {/* * functions */ -unsigned char get_random_hex (void );unsigned int mvebu_sdram_bar (enum memory_bank bank);unsigned int mvebu_sdram_bs (enum memory_bank bank);void mvebu_sdram_size_adjust (enum memory_bank bank);
Thanks,
Stefan
PATCH 1/4 kirkwood: remove get_random_hex() and MD5 dependency
In reply to Andre PrzywaraQuoted 8 lines · Andre Przywara
Commit
19a5944fcd62("mvgbe: remove setting of ethaddr within the driver") removed the usage ofget_random_hex()from the mvgbe driver about six years ago. However the prototype of that function survived till today in some kirkwood header file.
Remove that prototype and theCONFIG_MD5dependency triggered by that.Signed-off-by Andre Przywara <[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/20170317/02cdc73f/attachment.sig>
PATCH 2/4 Kconfig: introduce md5sum command selection
In reply to Andre PrzywaraQuoted 7 lines · Andre Przywara
So far
CONFIG_MD5SUMwould need to be set by a board's include file. Since the command is really generic, move it over toKconfigto allow it to be defined by either a board's defconfig, menuconfig or some config snippet merged viamergeconfig.sh.Signed-off-by Andre Przywara <[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/20170317/e3a04f2a/attachment.sig>
PATCH 3/4 Kconfig: define MD5 dependency for FIT support
In reply to Andre PrzywaraQuoted 6 lines · Andre Przywara
FIT images require MD5 support to verify image checksums. So far this was expressed by defining a CPP symbol in
image.h. Since MD5 is now a first classKconfigcitizen, express that inKconfiginstead.Signed-off-by Andre Przywara <[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/20170317/e72f216a/attachment.sig>
PATCH 4/4 configs: move CMD_MD5SUM definition to defconfigs
In reply to Andre PrzywaraQuoted 10 lines · Andre Przywara
Boards with an apparent need for the md5sum command had the connected config symbol defined in their board header file.
Move this over to the respective defconfig files now that md5sum is configured viaKconfig.
(This is a manual effort, which differs frommoveconfig.py, not sure who is right here. Boards except sandbox loose the md5sum command withmoveconfig.py, though it was explicitly mentioned in their config.h's)Signed-off-by Andre Przywara <[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/20170317/2dd9e102/attachment.sig>