[U-Boot] [PATCH 21/28] fs: Kconfig: Add a separate option for FS_CRAMFS

Simon Glass sjg at chromium.org
Thu Apr 27 04:28:04 UTC 2017


Rather than using CMD_CRAMFS for both the filesystem and its command, we
should have a separate option for each. This allows us to enable CRAMFS
support without the command, if desired, which reduces U-Boot's size
slightly.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 cmd/Kconfig                          | 1 +
 configs/UCP1020_SPIFLASH_defconfig   | 1 +
 configs/UCP1020_defconfig            | 1 +
 configs/km_kirkwood_128m16_defconfig | 1 +
 configs/km_kirkwood_defconfig        | 1 +
 configs/km_kirkwood_pci_defconfig    | 1 +
 configs/kmcoge4_defconfig            | 1 +
 configs/kmcoge5ne_defconfig          | 1 +
 configs/kmcoge5un_defconfig          | 1 +
 configs/kmeter1_defconfig            | 1 +
 configs/kmlion1_defconfig            | 1 +
 configs/kmnusa_defconfig             | 1 +
 configs/kmopti2_defconfig            | 1 +
 configs/kmsugp1_defconfig            | 1 +
 configs/kmsupx5_defconfig            | 1 +
 configs/kmsuv31_defconfig            | 1 +
 configs/kmtegr1_defconfig            | 1 +
 configs/kmtepr2_defconfig            | 1 +
 configs/kmvect1_defconfig            | 1 +
 configs/mgcoge3ne_defconfig          | 1 +
 configs/mgcoge3un_defconfig          | 1 +
 configs/mgcoge_defconfig             | 1 +
 configs/portl2_defconfig             | 1 +
 configs/sandbox_defconfig            | 1 +
 configs/sandbox_noblk_defconfig      | 1 +
 configs/sandbox_spl_defconfig        | 1 +
 configs/suvd3_defconfig              | 1 +
 configs/tuge1_defconfig              | 1 +
 configs/tuxx1_defconfig              | 1 +
 fs/cramfs/Kconfig                    | 7 +++++++
 30 files changed, 36 insertions(+)

diff --git a/cmd/Kconfig b/cmd/Kconfig
index e85e2e554c..c5ef3cd2e9 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -899,6 +899,7 @@ config CMD_CBFS
 
 config CMD_CRAMFS
 	bool "Enable the 'cramfs' command"
+	depends on FS_CRAMFS
 	help
 	  This provides commands for dealing with CRAMFS (Compressed ROM
 	  filesystem). CRAMFS is useful when space is tight since files are
diff --git a/configs/UCP1020_SPIFLASH_defconfig b/configs/UCP1020_SPIFLASH_defconfig
index 4e5e0c16b8..2b3e4bd042 100644
--- a/configs/UCP1020_SPIFLASH_defconfig
+++ b/configs/UCP1020_SPIFLASH_defconfig
@@ -34,4 +34,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_FSL_ESPI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/UCP1020_defconfig b/configs/UCP1020_defconfig
index ae7cb25611..df0f8cc5f7 100644
--- a/configs/UCP1020_defconfig
+++ b/configs/UCP1020_defconfig
@@ -34,4 +34,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_FSL_ESPI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/km_kirkwood_128m16_defconfig b/configs/km_kirkwood_128m16_defconfig
index 0d10b1e9f3..17649e8b00 100644
--- a/configs/km_kirkwood_128m16_defconfig
+++ b/configs/km_kirkwood_128m16_defconfig
@@ -24,4 +24,5 @@ CONFIG_CMD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/km_kirkwood_defconfig b/configs/km_kirkwood_defconfig
index e051f59422..5601776ae3 100644
--- a/configs/km_kirkwood_defconfig
+++ b/configs/km_kirkwood_defconfig
@@ -24,4 +24,5 @@ CONFIG_CMD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/km_kirkwood_pci_defconfig b/configs/km_kirkwood_pci_defconfig
index 43fe0bd79a..df299d3aed 100644
--- a/configs/km_kirkwood_pci_defconfig
+++ b/configs/km_kirkwood_pci_defconfig
@@ -24,4 +24,5 @@ CONFIG_CMD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/kmcoge4_defconfig b/configs/kmcoge4_defconfig
index eaebdaf044..842a04909a 100644
--- a/configs/kmcoge4_defconfig
+++ b/configs/kmcoge4_defconfig
@@ -32,4 +32,5 @@ CONFIG_NETDEVICES=y
 CONFIG_E1000=y
 CONFIG_SYS_NS16550=y
 CONFIG_FSL_ESPI=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/kmcoge5ne_defconfig b/configs/kmcoge5ne_defconfig
index 8073833365..18f039cfc7 100644
--- a/configs/kmcoge5ne_defconfig
+++ b/configs/kmcoge5ne_defconfig
@@ -21,4 +21,5 @@ CONFIG_CMD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 # CONFIG_PCI is not set
 CONFIG_SYS_NS16550=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/kmcoge5un_defconfig b/configs/kmcoge5un_defconfig
index 52d68576d9..c1ea8bf76a 100644
--- a/configs/kmcoge5un_defconfig
+++ b/configs/kmcoge5un_defconfig
@@ -24,4 +24,5 @@ CONFIG_CMD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/kmeter1_defconfig b/configs/kmeter1_defconfig
index 04fb1b77d5..134990ee46 100644
--- a/configs/kmeter1_defconfig
+++ b/configs/kmeter1_defconfig
@@ -21,4 +21,5 @@ CONFIG_CMD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 # CONFIG_PCI is not set
 CONFIG_SYS_NS16550=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/kmlion1_defconfig b/configs/kmlion1_defconfig
index a25a1bd6dc..493ab92a62 100644
--- a/configs/kmlion1_defconfig
+++ b/configs/kmlion1_defconfig
@@ -32,4 +32,5 @@ CONFIG_NETDEVICES=y
 CONFIG_E1000=y
 CONFIG_SYS_NS16550=y
 CONFIG_FSL_ESPI=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/kmnusa_defconfig b/configs/kmnusa_defconfig
index e54fcbedce..b0fb8d9487 100644
--- a/configs/kmnusa_defconfig
+++ b/configs/kmnusa_defconfig
@@ -24,4 +24,5 @@ CONFIG_CMD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/kmopti2_defconfig b/configs/kmopti2_defconfig
index 722cf9b622..f0e8acc4a9 100644
--- a/configs/kmopti2_defconfig
+++ b/configs/kmopti2_defconfig
@@ -21,4 +21,5 @@ CONFIG_CMD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 # CONFIG_PCI is not set
 CONFIG_SYS_NS16550=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/kmsugp1_defconfig b/configs/kmsugp1_defconfig
index 7d0ed2c2a0..5898fcc589 100644
--- a/configs/kmsugp1_defconfig
+++ b/configs/kmsugp1_defconfig
@@ -24,4 +24,5 @@ CONFIG_CMD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/kmsupx5_defconfig b/configs/kmsupx5_defconfig
index 0ac6ef6a5c..c8eca5ca70 100644
--- a/configs/kmsupx5_defconfig
+++ b/configs/kmsupx5_defconfig
@@ -21,4 +21,5 @@ CONFIG_CMD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 # CONFIG_PCI is not set
 CONFIG_SYS_NS16550=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/kmsuv31_defconfig b/configs/kmsuv31_defconfig
index ce107e9961..c0e0600204 100644
--- a/configs/kmsuv31_defconfig
+++ b/configs/kmsuv31_defconfig
@@ -24,4 +24,5 @@ CONFIG_CMD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/kmtegr1_defconfig b/configs/kmtegr1_defconfig
index 212a6e18a8..68c029148e 100644
--- a/configs/kmtegr1_defconfig
+++ b/configs/kmtegr1_defconfig
@@ -21,4 +21,5 @@ CONFIG_CMD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 # CONFIG_PCI is not set
 CONFIG_SYS_NS16550=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/kmtepr2_defconfig b/configs/kmtepr2_defconfig
index 8cf76a3078..1e86313f69 100644
--- a/configs/kmtepr2_defconfig
+++ b/configs/kmtepr2_defconfig
@@ -21,4 +21,5 @@ CONFIG_CMD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 # CONFIG_PCI is not set
 CONFIG_SYS_NS16550=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/kmvect1_defconfig b/configs/kmvect1_defconfig
index 1935ec5e51..6bf65fda97 100644
--- a/configs/kmvect1_defconfig
+++ b/configs/kmvect1_defconfig
@@ -21,4 +21,5 @@ CONFIG_CMD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 # CONFIG_PCI is not set
 CONFIG_SYS_NS16550=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/mgcoge3ne_defconfig b/configs/mgcoge3ne_defconfig
index 3b07b1e6b9..a0f775b7f4 100644
--- a/configs/mgcoge3ne_defconfig
+++ b/configs/mgcoge3ne_defconfig
@@ -20,4 +20,5 @@ CONFIG_CMD_UBI=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 # CONFIG_PCI is not set
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/mgcoge3un_defconfig b/configs/mgcoge3un_defconfig
index 382b20488d..0401d7e46f 100644
--- a/configs/mgcoge3un_defconfig
+++ b/configs/mgcoge3un_defconfig
@@ -24,4 +24,5 @@ CONFIG_CMD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/mgcoge_defconfig b/configs/mgcoge_defconfig
index 73ab24a790..5265cde3f1 100644
--- a/configs/mgcoge_defconfig
+++ b/configs/mgcoge_defconfig
@@ -21,3 +21,4 @@ CONFIG_CMD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 # CONFIG_PCI is not set
 CONFIG_OF_LIBFDT=y
+CONFIG_FS_CRAMFS=y
diff --git a/configs/portl2_defconfig b/configs/portl2_defconfig
index 19cd5711d7..61e0c046c7 100644
--- a/configs/portl2_defconfig
+++ b/configs/portl2_defconfig
@@ -24,4 +24,5 @@ CONFIG_CMD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index a6251eddfa..522c866c6b 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -169,6 +169,7 @@ CONFIG_CONSOLE_TRUETYPE=y
 CONFIG_CONSOLE_TRUETYPE_CANTORAONE=y
 CONFIG_VIDEO_SANDBOX_SDL=y
 CONFIG_FS_CBFS=y
+CONFIG_FS_CRAMFS=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_TPM=y
 CONFIG_LZ4=y
diff --git a/configs/sandbox_noblk_defconfig b/configs/sandbox_noblk_defconfig
index ab26ae1f9e..1c2278de9b 100644
--- a/configs/sandbox_noblk_defconfig
+++ b/configs/sandbox_noblk_defconfig
@@ -171,6 +171,7 @@ CONFIG_CONSOLE_TRUETYPE=y
 CONFIG_CONSOLE_TRUETYPE_CANTORAONE=y
 CONFIG_VIDEO_SANDBOX_SDL=y
 CONFIG_FS_CBFS=y
+CONFIG_FS_CRAMFS=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_TPM=y
 CONFIG_LZ4=y
diff --git a/configs/sandbox_spl_defconfig b/configs/sandbox_spl_defconfig
index e095fedd31..d68d1d0efe 100644
--- a/configs/sandbox_spl_defconfig
+++ b/configs/sandbox_spl_defconfig
@@ -175,6 +175,7 @@ CONFIG_CONSOLE_TRUETYPE=y
 CONFIG_CONSOLE_TRUETYPE_CANTORAONE=y
 CONFIG_VIDEO_SANDBOX_SDL=y
 CONFIG_FS_CBFS=y
+CONFIG_FS_CRAMFS=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_TPM=y
 CONFIG_LZ4=y
diff --git a/configs/suvd3_defconfig b/configs/suvd3_defconfig
index c966eeed9a..8999b4bffb 100644
--- a/configs/suvd3_defconfig
+++ b/configs/suvd3_defconfig
@@ -21,4 +21,5 @@ CONFIG_CMD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 # CONFIG_PCI is not set
 CONFIG_SYS_NS16550=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/tuge1_defconfig b/configs/tuge1_defconfig
index d9f1b3c226..8138d6002e 100644
--- a/configs/tuge1_defconfig
+++ b/configs/tuge1_defconfig
@@ -21,4 +21,5 @@ CONFIG_CMD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 # CONFIG_PCI is not set
 CONFIG_SYS_NS16550=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/tuxx1_defconfig b/configs/tuxx1_defconfig
index f8097fe2fb..5df0968dc0 100644
--- a/configs/tuxx1_defconfig
+++ b/configs/tuxx1_defconfig
@@ -21,4 +21,5 @@ CONFIG_CMD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 # CONFIG_PCI is not set
 CONFIG_SYS_NS16550=y
+CONFIG_FS_CRAMFS=y
 CONFIG_OF_LIBFDT=y
diff --git a/fs/cramfs/Kconfig b/fs/cramfs/Kconfig
index e69de29bb2..2b73709f75 100644
--- a/fs/cramfs/Kconfig
+++ b/fs/cramfs/Kconfig
@@ -0,0 +1,7 @@
+config FS_CRAMFS
+	bool "Enable CRAMFS filesystem support"
+	help
+	  This provides support for reading images fromCRAMFS (Compressed ROM
+	  filesystem). CRAMFS is useful when space is tight since files are
+	  compressed. You can also enable CMD_CRAMFS to get command-line
+	  access.
-- 
2.13.0.rc0.306.g87b477812d-goog



More information about the U-Boot mailing list