[U-Boot] [PATCH 16/28] fs: Kconfig: Add a separate config for FS_CBFS

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


Rather than using CMD_CBFS for both the filesystem and its command, we
should have a separate option for each. This allows us to enable CBFS
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/coreboot-x86_defconfig  | 1 +
 configs/sandbox_defconfig       | 1 +
 configs/sandbox_noblk_defconfig | 1 +
 configs/sandbox_spl_defconfig   | 1 +
 fs/Kconfig                      | 2 ++
 fs/Makefile                     | 2 +-
 fs/cbfs/Kconfig                 | 8 ++++++++
 8 files changed, 16 insertions(+), 1 deletion(-)
 create mode 100644 fs/cbfs/Kconfig

diff --git a/cmd/Kconfig b/cmd/Kconfig
index d16f591c91..d69fde761c 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -880,6 +880,7 @@ endmenu
 menu "Filesystem commands"
 config CMD_CBFS
 	bool "Enable the 'cbfs' command"
+	depends on FS_CBFS
 	help
 	  Define this to enable support for reading from a Coreboot
 	  filesystem. This is a ROM-based filesystem used for accessing files
diff --git a/configs/coreboot-x86_defconfig b/configs/coreboot-x86_defconfig
index 11d64af7f2..7fa455cf49 100644
--- a/configs/coreboot-x86_defconfig
+++ b/configs/coreboot-x86_defconfig
@@ -51,5 +51,6 @@ CONFIG_USB_KEYBOARD=y
 CONFIG_DM_VIDEO=y
 CONFIG_VIDEO_COREBOOT=y
 CONFIG_CONSOLE_SCROLL_LINES=5
+CONFIG_FS_CBFS=y
 CONFIG_USE_PRIVATE_LIBGCC=y
 CONFIG_TPM=y
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index d8421305d8..7d3c0d8c0f 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -167,6 +167,7 @@ CONFIG_CONSOLE_ROTATION=y
 CONFIG_CONSOLE_TRUETYPE=y
 CONFIG_CONSOLE_TRUETYPE_CANTORAONE=y
 CONFIG_VIDEO_SANDBOX_SDL=y
+CONFIG_FS_CBFS=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_TPM=y
 CONFIG_LZ4=y
diff --git a/configs/sandbox_noblk_defconfig b/configs/sandbox_noblk_defconfig
index 34db812f64..a5ca481d49 100644
--- a/configs/sandbox_noblk_defconfig
+++ b/configs/sandbox_noblk_defconfig
@@ -169,6 +169,7 @@ CONFIG_CONSOLE_ROTATION=y
 CONFIG_CONSOLE_TRUETYPE=y
 CONFIG_CONSOLE_TRUETYPE_CANTORAONE=y
 CONFIG_VIDEO_SANDBOX_SDL=y
+CONFIG_FS_CBFS=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_TPM=y
 CONFIG_LZ4=y
diff --git a/configs/sandbox_spl_defconfig b/configs/sandbox_spl_defconfig
index 9cda93071a..486822e2b4 100644
--- a/configs/sandbox_spl_defconfig
+++ b/configs/sandbox_spl_defconfig
@@ -173,6 +173,7 @@ CONFIG_CONSOLE_ROTATION=y
 CONFIG_CONSOLE_TRUETYPE=y
 CONFIG_CONSOLE_TRUETYPE_CANTORAONE=y
 CONFIG_VIDEO_SANDBOX_SDL=y
+CONFIG_FS_CBFS=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_TPM=y
 CONFIG_LZ4=y
diff --git a/fs/Kconfig b/fs/Kconfig
index 41bb0b9f3a..e6438ad0ea 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -4,6 +4,8 @@
 
 menu "File systems"
 
+source "fs/cbfs/Kconfig"
+
 source "fs/ext4/Kconfig"
 
 source "fs/reiserfs/Kconfig"
diff --git a/fs/Makefile b/fs/Makefile
index 51d06fccb6..5c90656ba1 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -12,7 +12,7 @@ obj-$(CONFIG_SPL_EXT_SUPPORT) += ext4/
 else
 obj-y				+= fs.o
 
-obj-$(CONFIG_CMD_CBFS) += cbfs/
+obj-$(CONFIG_FS_CBFS) += cbfs/
 obj-$(CONFIG_CMD_CRAMFS) += cramfs/
 obj-$(CONFIG_FS_EXT4) += ext4/
 obj-y += fat/
diff --git a/fs/cbfs/Kconfig b/fs/cbfs/Kconfig
new file mode 100644
index 0000000000..16089547a5
--- /dev/null
+++ b/fs/cbfs/Kconfig
@@ -0,0 +1,8 @@
+config FS_CBFS
+	bool "Enable CBFS (Coreboot Filesystem)"
+	help
+	  Define this to enable support for reading from a Coreboot
+	  filesystem. This is a ROM-based filesystem used for accessing files
+	  on systems that use coreboot as the first boot-loader and then load
+	  U-Boot to actually boot the Operating System. You can also enable
+	  CMD_CBFS to get command-line access.
-- 
2.13.0.rc0.306.g87b477812d-goog



More information about the U-Boot mailing list