From aed998aa34b22e818b2cd58ca7f2246716f2c3a6 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 17 May 2017 03:25:42 -0600 Subject: [PATCH] Convert CONFIG_LZMA to Kconfig This converts the following to Kconfig: CONFIG_LZMA Signed-off-by: Simon Glass --- README | 23 ----------------------- arch/Kconfig | 1 + configs/ap121_defconfig | 1 + configs/ap143_defconfig | 1 + configs/guruplug_defconfig | 1 + configs/ib62x0_defconfig | 1 + configs/iconnect_defconfig | 1 + configs/nsa310s_defconfig | 1 + configs/qemu_mips64_defconfig | 1 + configs/qemu_mips64el_defconfig | 1 + configs/qemu_mips_defconfig | 1 + configs/qemu_mipsel_defconfig | 1 + configs/sheevaplug_defconfig | 1 + configs/tplink_wdr4300_defconfig | 1 + configs/zipitz2_defconfig | 1 + include/configs/ap121.h | 1 - include/configs/ap143.h | 1 - include/configs/ib62x0.h | 1 - include/configs/iconnect.h | 1 - include/configs/mv-plug-common.h | 1 - include/configs/nsa310s.h | 1 - include/configs/qemu-mips.h | 2 -- include/configs/qemu-mips64.h | 2 -- include/configs/sandbox.h | 1 - include/configs/tplink_wdr4300.h | 1 - include/configs/zipitz2.h | 1 - lib/Kconfig | 8 ++++++++ scripts/config_whitelist.txt | 1 - 28 files changed, 22 insertions(+), 37 deletions(-) diff --git a/README b/README index 98a51dcb80..9d351ec5ad 100644 --- a/README +++ b/README @@ -1723,29 +1723,6 @@ The following options need to be configured: the malloc area (as defined by CONFIG_SYS_MALLOC_LEN) should be at least 4MB. - CONFIG_LZMA - - If this option is set, support for lzma compressed - images is included. - - Note: The LZMA algorithm adds between 2 and 4KB of code and it - requires an amount of dynamic memory that is given by the - formula: - - (1846 + 768 << (lc + lp)) * sizeof(uint16) - - Where lc and lp stand for, respectively, Literal context bits - and Literal pos bits. - - This value is upper-bounded by 14MB in the worst case. Anyway, - for a ~4MB large kernel image, we have lc=3 and lp=0 for a - total amount of (1846 + 768 << (3 + 0)) * 2 = ~41KB... that is - a very small buffer. - - Use the lzmainfo tool to determinate the lc and lp values and - then calculate the amount of needed dynamic memory (ensuring - the appropriate CONFIG_SYS_MALLOC_LEN value). - CONFIG_LZO If this option is set, support for LZO compressed images diff --git a/arch/Kconfig b/arch/Kconfig index bad03529cc..beec00a112 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -72,6 +72,7 @@ config SANDBOX imply CMD_HASH imply CMD_IO imply CMD_IOTRACE + imply LZMA config SH bool "SuperH architecture" diff --git a/configs/ap121_defconfig b/configs/ap121_defconfig index 2550aeecb7..40055f04d8 100644 --- a/configs/ap121_defconfig +++ b/configs/ap121_defconfig @@ -50,3 +50,4 @@ CONFIG_DEBUG_UART_BOARD_INIT=y CONFIG_AR933X_UART=y CONFIG_DM_SPI=y CONFIG_ATH79_SPI=y +CONFIG_LZMA=y diff --git a/configs/ap143_defconfig b/configs/ap143_defconfig index 0753221d7f..05f1699748 100644 --- a/configs/ap143_defconfig +++ b/configs/ap143_defconfig @@ -46,3 +46,4 @@ CONFIG_DEBUG_UART_BOARD_INIT=y CONFIG_SYS_NS16550=y CONFIG_DM_SPI=y CONFIG_ATH79_SPI=y +CONFIG_LZMA=y diff --git a/configs/guruplug_defconfig b/configs/guruplug_defconfig index 361293af53..570819d3e5 100644 --- a/configs/guruplug_defconfig +++ b/configs/guruplug_defconfig @@ -27,4 +27,5 @@ CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y +CONFIG_LZMA=y CONFIG_OF_LIBFDT=y diff --git a/configs/ib62x0_defconfig b/configs/ib62x0_defconfig index a8107e264d..cc9011d05c 100644 --- a/configs/ib62x0_defconfig +++ b/configs/ib62x0_defconfig @@ -26,4 +26,5 @@ CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y +CONFIG_LZMA=y CONFIG_OF_LIBFDT=y diff --git a/configs/iconnect_defconfig b/configs/iconnect_defconfig index 32994ec0cb..3e48380bc7 100644 --- a/configs/iconnect_defconfig +++ b/configs/iconnect_defconfig @@ -21,4 +21,5 @@ CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y +CONFIG_LZMA=y CONFIG_OF_LIBFDT=y diff --git a/configs/nsa310s_defconfig b/configs/nsa310s_defconfig index 2ba87642b3..ae39818e4b 100644 --- a/configs/nsa310s_defconfig +++ b/configs/nsa310s_defconfig @@ -25,4 +25,5 @@ CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y +CONFIG_LZMA=y CONFIG_OF_LIBFDT=y diff --git a/configs/qemu_mips64_defconfig b/configs/qemu_mips64_defconfig index 45513be56f..6835cf1c5c 100644 --- a/configs/qemu_mips64_defconfig +++ b/configs/qemu_mips64_defconfig @@ -15,3 +15,4 @@ CONFIG_CMD_FAT=y # CONFIG_ISO_PARTITION is not set CONFIG_MTD_NOR_FLASH=y CONFIG_SYS_NS16550=y +CONFIG_LZMA=y diff --git a/configs/qemu_mips64el_defconfig b/configs/qemu_mips64el_defconfig index 5f6ea3e2e7..60bd6164fc 100644 --- a/configs/qemu_mips64el_defconfig +++ b/configs/qemu_mips64el_defconfig @@ -16,3 +16,4 @@ CONFIG_CMD_FAT=y # CONFIG_ISO_PARTITION is not set CONFIG_MTD_NOR_FLASH=y CONFIG_SYS_NS16550=y +CONFIG_LZMA=y diff --git a/configs/qemu_mips_defconfig b/configs/qemu_mips_defconfig index b87b0c571c..c6f08b4efb 100644 --- a/configs/qemu_mips_defconfig +++ b/configs/qemu_mips_defconfig @@ -13,3 +13,4 @@ CONFIG_CMD_FAT=y # CONFIG_ISO_PARTITION is not set CONFIG_MTD_NOR_FLASH=y CONFIG_SYS_NS16550=y +CONFIG_LZMA=y diff --git a/configs/qemu_mipsel_defconfig b/configs/qemu_mipsel_defconfig index 281cf667da..b8c206971d 100644 --- a/configs/qemu_mipsel_defconfig +++ b/configs/qemu_mipsel_defconfig @@ -14,3 +14,4 @@ CONFIG_CMD_FAT=y # CONFIG_ISO_PARTITION is not set CONFIG_MTD_NOR_FLASH=y CONFIG_SYS_NS16550=y +CONFIG_LZMA=y diff --git a/configs/sheevaplug_defconfig b/configs/sheevaplug_defconfig index 19acc7de3c..ac7217dcba 100644 --- a/configs/sheevaplug_defconfig +++ b/configs/sheevaplug_defconfig @@ -27,4 +27,5 @@ CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y +CONFIG_LZMA=y CONFIG_OF_LIBFDT=y diff --git a/configs/tplink_wdr4300_defconfig b/configs/tplink_wdr4300_defconfig index 3c7e6ff4ba..65314df133 100644 --- a/configs/tplink_wdr4300_defconfig +++ b/configs/tplink_wdr4300_defconfig @@ -45,3 +45,4 @@ CONFIG_DM_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y +CONFIG_LZMA=y diff --git a/configs/zipitz2_defconfig b/configs/zipitz2_defconfig index 06e915c1dc..0b38f2b1af 100644 --- a/configs/zipitz2_defconfig +++ b/configs/zipitz2_defconfig @@ -19,5 +19,6 @@ CONFIG_PXA_SERIAL=y CONFIG_USB=y CONFIG_USB_STORAGE=y CONFIG_LCD=y +CONFIG_LZMA=y CONFIG_OF_LIBFDT=y # CONFIG_EFI_LOADER is not set diff --git a/include/configs/ap121.h b/include/configs/ap121.h index 8ae3c77942..2284b8bc66 100644 --- a/include/configs/ap121.h +++ b/include/configs/ap121.h @@ -33,7 +33,6 @@ #define CONFIG_BOOTCOMMAND "sf probe;" \ "mtdparts default;" \ "bootm 0x9f650000" -#define CONFIG_LZMA #define MTDIDS_DEFAULT "nor0=spi-flash.0" #define MTDPARTS_DEFAULT "mtdparts=spi-flash.0:" \ diff --git a/include/configs/ap143.h b/include/configs/ap143.h index a2c31a2fd5..2950783097 100644 --- a/include/configs/ap143.h +++ b/include/configs/ap143.h @@ -37,7 +37,6 @@ #define CONFIG_BOOTCOMMAND "sf probe;" \ "mtdparts default;" \ "bootm 0x9f680000" -#define CONFIG_LZMA #define MTDIDS_DEFAULT "nor0=spi-flash.0" #define MTDPARTS_DEFAULT "mtdparts=spi-flash.0:" \ diff --git a/include/configs/ib62x0.h b/include/configs/ib62x0.h index 0b92d7b2ca..a5782f3300 100644 --- a/include/configs/ib62x0.h +++ b/include/configs/ib62x0.h @@ -23,7 +23,6 @@ * Compression configuration */ #define CONFIG_BZIP2 -#define CONFIG_LZMA /* * Commands configuration diff --git a/include/configs/iconnect.h b/include/configs/iconnect.h index bb4eb7be7b..63e50606d7 100644 --- a/include/configs/iconnect.h +++ b/include/configs/iconnect.h @@ -25,7 +25,6 @@ * Compression configuration */ #define CONFIG_BZIP2 -#define CONFIG_LZMA #define CONFIG_LZO /* diff --git a/include/configs/mv-plug-common.h b/include/configs/mv-plug-common.h index 90ad0a654b..a2f68ad70a 100644 --- a/include/configs/mv-plug-common.h +++ b/include/configs/mv-plug-common.h @@ -22,7 +22,6 @@ */ #ifdef CONFIG_SYS_MVFS #define CONFIG_BZIP2 -#define CONFIG_LZMA #endif /* CONFIG_SYS_MVFS */ /* diff --git a/include/configs/nsa310s.h b/include/configs/nsa310s.h index 9b99b0e44f..bc67270af7 100644 --- a/include/configs/nsa310s.h +++ b/include/configs/nsa310s.h @@ -21,7 +21,6 @@ /* compression configuration */ #define CONFIG_BZIP2 -#define CONFIG_LZMA /* commands configuration */ #define CONFIG_SYS_MVFS diff --git a/include/configs/qemu-mips.h b/include/configs/qemu-mips.h index aeaf88a686..abdc93c7d2 100644 --- a/include/configs/qemu-mips.h +++ b/include/configs/qemu-mips.h @@ -121,6 +121,4 @@ #define MEM_SIZE 128 -#define CONFIG_LZMA - #endif /* __CONFIG_H */ diff --git a/include/configs/qemu-mips64.h b/include/configs/qemu-mips64.h index d201c848ff..f1e096fddd 100644 --- a/include/configs/qemu-mips64.h +++ b/include/configs/qemu-mips64.h @@ -121,6 +121,4 @@ #define MEM_SIZE 128 -#define CONFIG_LZMA - #endif /* __CONFIG_H */ diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index 905fcd95e9..b3e2c47dcd 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -149,7 +149,6 @@ #define CONFIG_GZIP_COMPRESSED #define CONFIG_BZIP2 #define CONFIG_LZO -#define CONFIG_LZMA #define CONFIG_CMD_LZMADEC diff --git a/include/configs/tplink_wdr4300.h b/include/configs/tplink_wdr4300.h index d39dd92198..fc99dbd91e 100644 --- a/include/configs/tplink_wdr4300.h +++ b/include/configs/tplink_wdr4300.h @@ -36,7 +36,6 @@ "console=ttyS0,115200 root=/dev/mtdblock2 rootfstype=squashfs" #define CONFIG_BOOTCOMMAND \ "dhcp 192.168.1.1:wdr4300.fit && bootm $loadaddr" -#define CONFIG_LZMA #define CONFIG_ENV_IS_NOWHERE #define CONFIG_ENV_SIZE 0x10000 diff --git a/include/configs/zipitz2.h b/include/configs/zipitz2.h index 8a745e5097..9b3769b5f1 100644 --- a/include/configs/zipitz2.h +++ b/include/configs/zipitz2.h @@ -42,7 +42,6 @@ #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_SYS_TEXT_BASE 0x0 -#define CONFIG_LZMA /* LZMA compression support */ /* * Serial Console Configuration diff --git a/lib/Kconfig b/lib/Kconfig index db0915153c..09670f031c 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -148,6 +148,14 @@ config LZ4 frame format currently (2015) implemented in the Linux kernel (generated by 'lz4 -l'). The two formats are incompatible. +config LZMA + bool "Enable LZMA decompression support" + help + This enables support for LZMA (Lempel-Ziv-Markov chain algorithm), + a dictionary compression algorithm that provides a high compression + ratio and fairly fast decompression speed. See also + CONFIG_CMD_LZMADEC which provides a decode command. + config LZO bool endmenu diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 2610c412ed..5b163a5499 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -1575,7 +1575,6 @@ CONFIG_LUAN CONFIG_LWMON5 CONFIG_LXT971_NO_SLEEP CONFIG_LYNXKDI -CONFIG_LZMA CONFIG_M41T94_SPI_CS CONFIG_M520x CONFIG_M52277EVB -- 2.39.2