Skip to content
Snippets Groups Projects
Commit aed998aa authored by Simon Glass's avatar Simon Glass Committed by Tom Rini
Browse files

Convert CONFIG_LZMA to Kconfig


This converts the following to Kconfig:
   CONFIG_LZMA

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent 4a37cb50
No related branches found
No related tags found
No related merge requests found
Showing
with 14 additions and 28 deletions
...@@ -1723,29 +1723,6 @@ The following options need to be configured: ...@@ -1723,29 +1723,6 @@ The following options need to be configured:
the malloc area (as defined by CONFIG_SYS_MALLOC_LEN) should the malloc area (as defined by CONFIG_SYS_MALLOC_LEN) should
be at least 4MB. 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 CONFIG_LZO
If this option is set, support for LZO compressed images If this option is set, support for LZO compressed images
......
...@@ -72,6 +72,7 @@ config SANDBOX ...@@ -72,6 +72,7 @@ config SANDBOX
imply CMD_HASH imply CMD_HASH
imply CMD_IO imply CMD_IO
imply CMD_IOTRACE imply CMD_IOTRACE
imply LZMA
config SH config SH
bool "SuperH architecture" bool "SuperH architecture"
......
...@@ -50,3 +50,4 @@ CONFIG_DEBUG_UART_BOARD_INIT=y ...@@ -50,3 +50,4 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_AR933X_UART=y CONFIG_AR933X_UART=y
CONFIG_DM_SPI=y CONFIG_DM_SPI=y
CONFIG_ATH79_SPI=y CONFIG_ATH79_SPI=y
CONFIG_LZMA=y
...@@ -46,3 +46,4 @@ CONFIG_DEBUG_UART_BOARD_INIT=y ...@@ -46,3 +46,4 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_SYS_NS16550=y CONFIG_SYS_NS16550=y
CONFIG_DM_SPI=y CONFIG_DM_SPI=y
CONFIG_ATH79_SPI=y CONFIG_ATH79_SPI=y
CONFIG_LZMA=y
...@@ -27,4 +27,5 @@ CONFIG_SYS_NS16550=y ...@@ -27,4 +27,5 @@ CONFIG_SYS_NS16550=y
CONFIG_USB=y CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE=y
CONFIG_LZMA=y
CONFIG_OF_LIBFDT=y CONFIG_OF_LIBFDT=y
...@@ -26,4 +26,5 @@ CONFIG_SYS_NS16550=y ...@@ -26,4 +26,5 @@ CONFIG_SYS_NS16550=y
CONFIG_USB=y CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE=y
CONFIG_LZMA=y
CONFIG_OF_LIBFDT=y CONFIG_OF_LIBFDT=y
...@@ -21,4 +21,5 @@ CONFIG_SYS_NS16550=y ...@@ -21,4 +21,5 @@ CONFIG_SYS_NS16550=y
CONFIG_USB=y CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE=y
CONFIG_LZMA=y
CONFIG_OF_LIBFDT=y CONFIG_OF_LIBFDT=y
...@@ -25,4 +25,5 @@ CONFIG_SYS_NS16550=y ...@@ -25,4 +25,5 @@ CONFIG_SYS_NS16550=y
CONFIG_USB=y CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE=y
CONFIG_LZMA=y
CONFIG_OF_LIBFDT=y CONFIG_OF_LIBFDT=y
...@@ -15,3 +15,4 @@ CONFIG_CMD_FAT=y ...@@ -15,3 +15,4 @@ CONFIG_CMD_FAT=y
# CONFIG_ISO_PARTITION is not set # CONFIG_ISO_PARTITION is not set
CONFIG_MTD_NOR_FLASH=y CONFIG_MTD_NOR_FLASH=y
CONFIG_SYS_NS16550=y CONFIG_SYS_NS16550=y
CONFIG_LZMA=y
...@@ -16,3 +16,4 @@ CONFIG_CMD_FAT=y ...@@ -16,3 +16,4 @@ CONFIG_CMD_FAT=y
# CONFIG_ISO_PARTITION is not set # CONFIG_ISO_PARTITION is not set
CONFIG_MTD_NOR_FLASH=y CONFIG_MTD_NOR_FLASH=y
CONFIG_SYS_NS16550=y CONFIG_SYS_NS16550=y
CONFIG_LZMA=y
...@@ -13,3 +13,4 @@ CONFIG_CMD_FAT=y ...@@ -13,3 +13,4 @@ CONFIG_CMD_FAT=y
# CONFIG_ISO_PARTITION is not set # CONFIG_ISO_PARTITION is not set
CONFIG_MTD_NOR_FLASH=y CONFIG_MTD_NOR_FLASH=y
CONFIG_SYS_NS16550=y CONFIG_SYS_NS16550=y
CONFIG_LZMA=y
...@@ -14,3 +14,4 @@ CONFIG_CMD_FAT=y ...@@ -14,3 +14,4 @@ CONFIG_CMD_FAT=y
# CONFIG_ISO_PARTITION is not set # CONFIG_ISO_PARTITION is not set
CONFIG_MTD_NOR_FLASH=y CONFIG_MTD_NOR_FLASH=y
CONFIG_SYS_NS16550=y CONFIG_SYS_NS16550=y
CONFIG_LZMA=y
...@@ -27,4 +27,5 @@ CONFIG_SYS_NS16550=y ...@@ -27,4 +27,5 @@ CONFIG_SYS_NS16550=y
CONFIG_USB=y CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE=y
CONFIG_LZMA=y
CONFIG_OF_LIBFDT=y CONFIG_OF_LIBFDT=y
...@@ -45,3 +45,4 @@ CONFIG_DM_USB=y ...@@ -45,3 +45,4 @@ CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE=y
CONFIG_LZMA=y
...@@ -19,5 +19,6 @@ CONFIG_PXA_SERIAL=y ...@@ -19,5 +19,6 @@ CONFIG_PXA_SERIAL=y
CONFIG_USB=y CONFIG_USB=y
CONFIG_USB_STORAGE=y CONFIG_USB_STORAGE=y
CONFIG_LCD=y CONFIG_LCD=y
CONFIG_LZMA=y
CONFIG_OF_LIBFDT=y CONFIG_OF_LIBFDT=y
# CONFIG_EFI_LOADER is not set # CONFIG_EFI_LOADER is not set
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#define CONFIG_BOOTCOMMAND "sf probe;" \ #define CONFIG_BOOTCOMMAND "sf probe;" \
"mtdparts default;" \ "mtdparts default;" \
"bootm 0x9f650000" "bootm 0x9f650000"
#define CONFIG_LZMA
#define MTDIDS_DEFAULT "nor0=spi-flash.0" #define MTDIDS_DEFAULT "nor0=spi-flash.0"
#define MTDPARTS_DEFAULT "mtdparts=spi-flash.0:" \ #define MTDPARTS_DEFAULT "mtdparts=spi-flash.0:" \
......
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#define CONFIG_BOOTCOMMAND "sf probe;" \ #define CONFIG_BOOTCOMMAND "sf probe;" \
"mtdparts default;" \ "mtdparts default;" \
"bootm 0x9f680000" "bootm 0x9f680000"
#define CONFIG_LZMA
#define MTDIDS_DEFAULT "nor0=spi-flash.0" #define MTDIDS_DEFAULT "nor0=spi-flash.0"
#define MTDPARTS_DEFAULT "mtdparts=spi-flash.0:" \ #define MTDPARTS_DEFAULT "mtdparts=spi-flash.0:" \
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
* Compression configuration * Compression configuration
*/ */
#define CONFIG_BZIP2 #define CONFIG_BZIP2
#define CONFIG_LZMA
/* /*
* Commands configuration * Commands configuration
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
* Compression configuration * Compression configuration
*/ */
#define CONFIG_BZIP2 #define CONFIG_BZIP2
#define CONFIG_LZMA
#define CONFIG_LZO #define CONFIG_LZO
/* /*
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
*/ */
#ifdef CONFIG_SYS_MVFS #ifdef CONFIG_SYS_MVFS
#define CONFIG_BZIP2 #define CONFIG_BZIP2
#define CONFIG_LZMA
#endif /* CONFIG_SYS_MVFS */ #endif /* CONFIG_SYS_MVFS */
/* /*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment