Convert CONFIG_LZMA to Kconfig
authorSimon Glass <sjg@chromium.org>
Wed, 17 May 2017 09:25:42 +0000 (03:25 -0600)
committerTom Rini <trini@konsulko.com>
Mon, 22 May 2017 16:45:32 +0000 (12:45 -0400)
This converts the following to Kconfig:
   CONFIG_LZMA

Signed-off-by: Simon Glass <sjg@chromium.org>
28 files changed:
README
arch/Kconfig
configs/ap121_defconfig
configs/ap143_defconfig
configs/guruplug_defconfig
configs/ib62x0_defconfig
configs/iconnect_defconfig
configs/nsa310s_defconfig
configs/qemu_mips64_defconfig
configs/qemu_mips64el_defconfig
configs/qemu_mips_defconfig
configs/qemu_mipsel_defconfig
configs/sheevaplug_defconfig
configs/tplink_wdr4300_defconfig
configs/zipitz2_defconfig
include/configs/ap121.h
include/configs/ap143.h
include/configs/ib62x0.h
include/configs/iconnect.h
include/configs/mv-plug-common.h
include/configs/nsa310s.h
include/configs/qemu-mips.h
include/configs/qemu-mips64.h
include/configs/sandbox.h
include/configs/tplink_wdr4300.h
include/configs/zipitz2.h
lib/Kconfig
scripts/config_whitelist.txt

diff --git a/README b/README
index 98a51dc..9d351ec 100644 (file)
--- 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
index bad0352..beec00a 100644 (file)
@@ -72,6 +72,7 @@ config SANDBOX
        imply CMD_HASH
        imply CMD_IO
        imply CMD_IOTRACE
+       imply LZMA
 
 config SH
        bool "SuperH architecture"
index 2550aee..40055f0 100644 (file)
@@ -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
index 0753221..05f1699 100644 (file)
@@ -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
index 361293a..570819d 100644 (file)
@@ -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
index a8107e2..cc9011d 100644 (file)
@@ -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
index 32994ec..3e48380 100644 (file)
@@ -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
index 2ba8764..ae39818 100644 (file)
@@ -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
index 45513be..6835cf1 100644 (file)
@@ -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
index 5f6ea3e..60bd616 100644 (file)
@@ -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
index b87b0c5..c6f08b4 100644 (file)
@@ -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
index 281cf66..b8c2069 100644 (file)
@@ -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
index 19acc7d..ac7217d 100644 (file)
@@ -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
index 3c7e6ff..65314df 100644 (file)
@@ -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
index 06e915c..0b38f2b 100644 (file)
@@ -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
index 8ae3c77..2284b8b 100644 (file)
@@ -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:" \
index a2c31a2..2950783 100644 (file)
@@ -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:" \
index 0b92d7b..a5782f3 100644 (file)
@@ -23,7 +23,6 @@
  * Compression configuration
  */
 #define CONFIG_BZIP2
-#define CONFIG_LZMA
 
 /*
  * Commands configuration
index bb4eb7b..63e5060 100644 (file)
@@ -25,7 +25,6 @@
  * Compression configuration
  */
 #define CONFIG_BZIP2
-#define CONFIG_LZMA
 #define CONFIG_LZO
 
 /*
index 90ad0a6..a2f68ad 100644 (file)
@@ -22,7 +22,6 @@
  */
 #ifdef CONFIG_SYS_MVFS
 #define CONFIG_BZIP2
-#define CONFIG_LZMA
 #endif /* CONFIG_SYS_MVFS */
 
 /*
index 9b99b0e..bc67270 100644 (file)
@@ -21,7 +21,6 @@
 
 /* compression configuration */
 #define CONFIG_BZIP2
-#define CONFIG_LZMA
 
 /* commands configuration */
 #define CONFIG_SYS_MVFS
index aeaf88a..abdc93c 100644 (file)
 
 #define MEM_SIZE               128
 
-#define CONFIG_LZMA
-
 #endif /* __CONFIG_H */
index d201c84..f1e096f 100644 (file)
 
 #define MEM_SIZE               128
 
-#define CONFIG_LZMA
-
 #endif /* __CONFIG_H */
index 905fcd9..b3e2c47 100644 (file)
 #define CONFIG_GZIP_COMPRESSED
 #define CONFIG_BZIP2
 #define CONFIG_LZO
-#define CONFIG_LZMA
 
 #define CONFIG_CMD_LZMADEC
 
index d39dd92..fc99dbd 100644 (file)
@@ -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
index 8a745e5..9b3769b 100644 (file)
@@ -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
index db09151..09670f0 100644 (file)
@@ -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
index 2610c41..5b163a5 100644 (file)
@@ -1575,7 +1575,6 @@ CONFIG_LUAN
 CONFIG_LWMON5
 CONFIG_LXT971_NO_SLEEP
 CONFIG_LYNXKDI
-CONFIG_LZMA
 CONFIG_M41T94_SPI_CS
 CONFIG_M520x
 CONFIG_M52277EVB