config: kernel: Add support for configuring BTRFS to be built-in
authorMarek Behún <kabel@kernel.org>
Mon, 22 Jul 2024 14:57:50 +0000 (16:57 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Wed, 14 Aug 2024 22:35:17 +0000 (00:35 +0200)
Add the KERNEL_BTRFS_FS config option so that targets can select
whether BTRFS support must be built-in.

Select this option (alongside KERNEL_BTRFS_FS_POSIX_ACL) from the
layerscape/armv8_64b subtarget instead of enabling it in
target/linux/layerscape/armv8_64b/config-* files.

Move disabling of CONFIG_BTRFS_FS_CHECK_INTEGRITY into generic configs.

This makes it possible for OpenWRT to be built with built-in BTRFS
support on specific boards, instead of whole targets.

Signed-off-by: Marek Behún <kabel@kernel.org>
Link: https://github.com/openwrt/openwrt/pull/15990
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
config/Config-kernel.in
target/linux/generic/config-5.15
target/linux/generic/config-6.1
target/linux/generic/config-6.6
target/linux/layerscape/armv8_64b/config-6.1
target/linux/layerscape/armv8_64b/config-6.6
target/linux/layerscape/armv8_64b/target.mk

index 9cedd1df127f5c197f4d778b6feccaf411c28a6f..73b26b631abbba45d6b75fec21ebede849ed6bff 100644 (file)
@@ -1238,6 +1238,12 @@ if KERNEL_IP_PNP
 
 endif
 
+config KERNEL_BTRFS_FS
+       bool "Compile the kernel with built-in BTRFS support"
+       help
+         Say Y here if you want to make the kernel to be able to boot off a
+         BTRFS partition.
+
 menu "Filesystem ACL and attr support options"
        config USE_FS_ACL_ATTR
                bool "Use filesystem ACL and attr support by default"
index 8e2223aebb3e3c5b661f11f6bfba175f6aa8b025..90650ac7dd2773f1288879d1c4274a4bd814ebe2 100644 (file)
@@ -774,6 +774,7 @@ CONFIG_BROKEN_ON_SMP=y
 # CONFIG_BTRFS_ASSERT is not set
 # CONFIG_BTRFS_DEBUG is not set
 # CONFIG_BTRFS_FS is not set
+# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set
 # CONFIG_BTRFS_FS_POSIX_ACL is not set
 # CONFIG_BTRFS_FS_REF_VERIFY is not set
 # CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set
index 1b657ea2141059d276b7618a9810d9571cd37bde..80dcb54683fabc52db64a215e49709853eea3fc8 100644 (file)
@@ -820,6 +820,7 @@ CONFIG_BROKEN_ON_SMP=y
 # CONFIG_BTRFS_ASSERT is not set
 # CONFIG_BTRFS_DEBUG is not set
 # CONFIG_BTRFS_FS is not set
+# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set
 # CONFIG_BTRFS_FS_POSIX_ACL is not set
 # CONFIG_BTRFS_FS_REF_VERIFY is not set
 # CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set
index e5c53606088e6ae003c8454cac9404d1c1bc6977..26651e077ca204b58367395fb9b8dbc3a6b2df2e 100644 (file)
@@ -725,6 +725,7 @@ CONFIG_BROKEN_ON_SMP=y
 # CONFIG_BTRFS_ASSERT is not set
 # CONFIG_BTRFS_DEBUG is not set
 # CONFIG_BTRFS_FS is not set
+# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set
 # CONFIG_BTRFS_FS_POSIX_ACL is not set
 # CONFIG_BTRFS_FS_REF_VERIFY is not set
 # CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set
index a2a4a633af23c30bc9963b1405d9fe251cc4b515..2ebe59c7ccf2c6f97b2c07610a723687bb42565a 100644 (file)
@@ -104,9 +104,6 @@ CONFIG_BLK_MQ_VIRTIO=y
 CONFIG_BLK_PM=y
 CONFIG_BSD_PROCESS_ACCT=y
 CONFIG_BSD_PROCESS_ACCT_V3=y
-CONFIG_BTRFS_FS=y
-# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set
-CONFIG_BTRFS_FS_POSIX_ACL=y
 CONFIG_CAVIUM_ERRATUM_22375=y
 CONFIG_CAVIUM_ERRATUM_23144=y
 CONFIG_CAVIUM_ERRATUM_23154=y
index f95b4603bec4b075c0c1e3a0f6fb4b20d515d6c5..6d9d2ba2d56882c681efe23d728eb62e2f429c6d 100644 (file)
@@ -105,9 +105,6 @@ CONFIG_BLK_MQ_VIRTIO=y
 CONFIG_BLK_PM=y
 CONFIG_BSD_PROCESS_ACCT=y
 CONFIG_BSD_PROCESS_ACCT_V3=y
-CONFIG_BTRFS_FS=y
-# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set
-CONFIG_BTRFS_FS_POSIX_ACL=y
 CONFIG_BUFFER_HEAD=y
 CONFIG_BUILTIN_RETURN_ADDRESS_STRIPS_PAC=y
 CONFIG_CAVIUM_ERRATUM_22375=y
index c9a61701a99218a11805a2fe8133baa8ee44a09e..d880afa7a37f0bac4cd3f0e49879c3e5dee66b4a 100644 (file)
@@ -5,6 +5,7 @@
 ARCH:=aarch64
 BOARDNAME:=ARMv8 64-bit based boards
 KERNELNAME:=Image dtbs
+DEPENDS:=+@KERNEL_BTRFS_FS +@KERNEL_BTRFS_FS_POSIX_ACL
 
 define Target/Description
        Build firmware images for NXP Layerscape ARMv8 64-bit based boards.