From b51abacb5fd465e5ce4329ec27ac516b5a2b83b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Beh=C3=BAn?= Date: Mon, 22 Jul 2024 16:57:50 +0200 Subject: [PATCH] config: kernel: Add support for configuring BTRFS to be built-in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Link: https://github.com/openwrt/openwrt/pull/15990 Signed-off-by: Hauke Mehrtens --- config/Config-kernel.in | 6 ++++++ target/linux/generic/config-5.15 | 1 + target/linux/generic/config-6.1 | 1 + target/linux/generic/config-6.6 | 1 + target/linux/layerscape/armv8_64b/config-6.1 | 3 --- target/linux/layerscape/armv8_64b/config-6.6 | 3 --- target/linux/layerscape/armv8_64b/target.mk | 1 + 7 files changed, 10 insertions(+), 6 deletions(-) diff --git a/config/Config-kernel.in b/config/Config-kernel.in index 9cedd1df127..73b26b631ab 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -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" diff --git a/target/linux/generic/config-5.15 b/target/linux/generic/config-5.15 index 8e2223aebb3..90650ac7dd2 100644 --- a/target/linux/generic/config-5.15 +++ b/target/linux/generic/config-5.15 @@ -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 diff --git a/target/linux/generic/config-6.1 b/target/linux/generic/config-6.1 index 1b657ea2141..80dcb54683f 100644 --- a/target/linux/generic/config-6.1 +++ b/target/linux/generic/config-6.1 @@ -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 diff --git a/target/linux/generic/config-6.6 b/target/linux/generic/config-6.6 index e5c53606088..26651e077ca 100644 --- a/target/linux/generic/config-6.6 +++ b/target/linux/generic/config-6.6 @@ -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 diff --git a/target/linux/layerscape/armv8_64b/config-6.1 b/target/linux/layerscape/armv8_64b/config-6.1 index a2a4a633af2..2ebe59c7ccf 100644 --- a/target/linux/layerscape/armv8_64b/config-6.1 +++ b/target/linux/layerscape/armv8_64b/config-6.1 @@ -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 diff --git a/target/linux/layerscape/armv8_64b/config-6.6 b/target/linux/layerscape/armv8_64b/config-6.6 index f95b4603bec..6d9d2ba2d56 100644 --- a/target/linux/layerscape/armv8_64b/config-6.6 +++ b/target/linux/layerscape/armv8_64b/config-6.6 @@ -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 diff --git a/target/linux/layerscape/armv8_64b/target.mk b/target/linux/layerscape/armv8_64b/target.mk index c9a61701a99..d880afa7a37 100644 --- a/target/linux/layerscape/armv8_64b/target.mk +++ b/target/linux/layerscape/armv8_64b/target.mk @@ -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.