From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 751B430C105 for ; Fri, 19 Sep 2025 12:25:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758284743; cv=none; b=p9rL8Lo5q4TmnA/PLJJ1VVhY6Z+OG0fo2QCd0DdW8yPZvYY7yxp04MhFU9ssNVTfbyvcvaqo2SQDe9x1qzLwqOybU0h0nU4UqGtNINZ8XUAbRVuAe/crZ6kz7harK4QuldbFqT3AmI481Ne4f0aRlr/nsgz2PEBFk4uExJmFTAI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758284743; c=relaxed/simple; bh=HQFWKjiL9yFo69PMiv7bd/7yco1/hSSpdG0rYrcDcpo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=dVqmlevN1Hwh85W456UPIdNqeDMgNax3knmlo4m8hIPXLub8gSzmm8YB0gAl0aJS8kDOJEFIWlPgU7Zm6C0TQoIP1Lwb5BDQtpO+8b5+Fu3l3Rgjrkjc319rkZY6G98RnSPT8MUvsdSXkm+ZJO+gCuUUSNgW+vBkaR2Xr8Q6Oa4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qvKMmF/H; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qvKMmF/H" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3CFB6C4CEF1; Fri, 19 Sep 2025 12:25:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1758284743; bh=HQFWKjiL9yFo69PMiv7bd/7yco1/hSSpdG0rYrcDcpo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=qvKMmF/H8PbRtM8dX3otfBqxwMMNHzl8h/eo5qbzJo2uC0OjBgrcYuzmkHD+7Z76D w1OYh7U0G863MOtF1PSwsKwy44DFmlTzefgXyYz6KNqAO9O0Kg2bZmHrK/fP3Tya+5 2psr5AZ0lalOyAp+xR9NGxQn0qIN12lhjAJjOCgZsj4LXmArDwAdCiLU33m6FUtVVN 9oodLIjCmS7sqEnUxg9tLBwj+XCflhfZSVtfHaK9fZ8zurbft4wEDSBvacdAHquPb5 g2o6oHfbZQLJDNcLjJxbKbYTfZiLajCDR+s6N/SnT9kiiQvaxrfKWOYPwezd4MCLcB xEL146Hl52cXQ== From: Daniel Gomez Date: Fri, 19 Sep 2025 14:25:09 +0200 Subject: [PATCH v2 3/4] workflows: bootlinux: add kernel configuration fragments support Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250919-kernel-fragment-support-v2-3-8d2b7b8cb4e4@samsung.com> References: <20250919-kernel-fragment-support-v2-0-8d2b7b8cb4e4@samsung.com> In-Reply-To: <20250919-kernel-fragment-support-v2-0-8d2b7b8cb4e4@samsung.com> To: Luis Chamberlain , Chuck Lever Cc: kdevops@lists.linux.dev, Daniel Gomez X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=46691; i=da.gomez@samsung.com; h=from:subject:message-id; bh=eV0N2x6XZ7gWINTZSNypqFQQZn+5i4AYvAjzuZYXNIg=; b=owEBbQKS/ZANAwAIAUCeo8QfGVH7AcsmYgBozUu7pCiwNkwtPHI/BGc4kZQ46+oxZLaciTpOS zuD5ffP8KmJAjMEAAEIAB0WIQTvdRrhHw9z4bnGPFNAnqPEHxlR+wUCaM1LuwAKCRBAnqPEHxlR +1JOD/0TdCHO6Y+0MBKowxjXGhl33QbFAz9DkWY4fy4EolrBTdWt+6aT0S/QDI5J+/STKmQTFwm MxzRoTCLzIgVi5HpieFAdNQNp6Ffojdf5NhASlQq8K1gYo7kFer7leUkgFbP71olKXzG0uZKDlR 4FE4bZtzG5vsJ5DViBNaXOmU18U0ys5aEU9ARvtz5vRGV279tBNrcjpx61+tonmcON+XjASMcXv JEiwG5JdmqhRrcYZTPFJl/HK/5fQMcPy8UeOoKLWw2SVAnkpdxTvzgM3nQyUF+IR8BAklcP+Ne6 sH+UIm6s/cAqEI1Yi720QtLdWgAstxAojs9qk4lh0s/e5zvdzwz3RFM1OZmqoKq8HOjTqWyIkgk 2Bxzp57VBsDIOyeO9YpxOakxXPBAqD06z4Q9Kye8J9qTYG8bvFklhgVy5la7pj4nPjPh6NitLkJ E0qtPFLdKFSHOQvXhHa84enZCqk1icidNH/LBeXzVzuJO1OPmCYvzQP18pHykUz7GQxMheS4t7x NtFPuebvKwQhDx7PKkkL/uhb5wZHQuaX7I0ntMj7Xy89gwwz8aA40Ir4M7c20gMx/5a7m8EkEt2 jcOIQHBZ8I9hhS0+gNNDhw4Spwx5tr1/WbEgBs5EkR20QAiWLdhnEGCMMltCJObWO3II63S07LM 5RRQkKNNbgQVQ1Q== X-Developer-Key: i=da.gomez@samsung.com; a=openpgp; fpr=B2A7A9CFDD03B540FF58B27185F56EA4E9E8138F From: Daniel Gomez Add comprehensive kernel configuration fragment system that enables building kernels using merge_config.sh with focused configuration fragments instead of monolithic config files. Key features: - Modular Kconfig organization split into logical categories - Support for both x86_64 and ARM64 architectures - Architecture-specific fragment visibility (ARM64 page sizes) - Module dependency management for advanced features - New fragments for extended modversions, kmemleak, and module testing Fragment categories: - Essential: Core system requirements (64bit, systemd, distro, storage) - Security: Hardening and security features - Architecture: Platform-specific optimizations - Development: Debugging and diagnostic tools - Memory: NUMA and memory management features - Modules: Kernel module system configuration - Advanced: eBPF, XArray, and specialized features - Container: Virtualization and container support - Specialized: Minimal kernels, power management, Rust support - Legacy: Compatibility and legacy feature support Technical implementation: - Uses merge_config.sh for robust fragment composition - Complete integration with kdevops build workflow - Supports both 9P and target build modes - Pre-built configurations for common setups - Template-based fragment management Configuration fragments origin: https://github.com/dkruces/linux-config-fragments Generated-by: Claude AI Signed-off-by: Daniel Gomez Reviewed-by: Luis Chamberlain --- defconfigs/configs/linux_kdevops.config | 11 +++ defconfigs/configs/linux_minimal.config | 9 +++ playbooks/roles/bootlinux/defaults/main.yml | 43 +++++++++++ playbooks/roles/bootlinux/tasks/build/9p.yml | 13 +++- playbooks/roles/bootlinux/tasks/build/builder.yml | 2 + playbooks/roles/bootlinux/tasks/build/targets.yml | 8 +++ .../roles/bootlinux/tasks/config-fragments.yml | 80 +++++++++++++++++++++ .../bootlinux/templates/fragments/64bit.config | 1 + .../templates/fragments/arm64_16k_pages.config | 1 + .../templates/fragments/arm64_4k_pages.config | 1 + .../templates/fragments/arm64_64k_pages.config | 1 + .../bootlinux/templates/fragments/blktrace.config | 2 + .../templates/fragments/buffer_head.config | 7 ++ .../bootlinux/templates/fragments/distro.config | 84 ++++++++++++++++++++++ .../templates/fragments/ebpf-errorinj.config | 2 + .../bootlinux/templates/fragments/ebpf.config | 61 ++++++++++++++++ .../roles/bootlinux/templates/fragments/gdb.config | 6 ++ .../bootlinux/templates/fragments/initramfs.config | 22 ++++++ .../bootlinux/templates/fragments/kmemleak.config | 3 + .../roles/bootlinux/templates/fragments/ksm.config | 1 + .../bootlinux/templates/fragments/localauto.config | 2 + .../bootlinux/templates/fragments/moby.config | 9 +++ .../templates/fragments/modules-blk.config | 2 + .../fragments/modules-extended-modversions.config | 2 + .../templates/fragments/modules-modversions.config | 1 + .../templates/fragments/modules-testing.config | 3 + .../bootlinux/templates/fragments/modules.config | 15 ++++ .../bootlinux/templates/fragments/numa.config | 2 + .../bootlinux/templates/fragments/storage.config | 11 +++ .../bootlinux/templates/fragments/systemd.config | 78 ++++++++++++++++++++ .../bootlinux/templates/fragments/virtio-fs.config | 15 ++++ .../bootlinux/templates/fragments/vm_debug.config | 1 + .../bootlinux/templates/fragments/xarray.config | 6 ++ .../templates/fragments/xarray_no_multi.config | 9 +++ workflows/linux/Kconfig | 2 + workflows/linux/Kconfig.fragments | 26 +++++++ workflows/linux/fragments/Kconfig.advanced | 27 +++++++ workflows/linux/fragments/Kconfig.arch | 30 ++++++++ workflows/linux/fragments/Kconfig.container | 15 ++++ workflows/linux/fragments/Kconfig.development | 28 ++++++++ workflows/linux/fragments/Kconfig.essential | 63 ++++++++++++++++ workflows/linux/fragments/Kconfig.legacy | 9 +++ workflows/linux/fragments/Kconfig.memory | 15 ++++ workflows/linux/fragments/Kconfig.modules | 46 ++++++++++++ workflows/linux/fragments/Kconfig.security | 10 +++ workflows/linux/fragments/Kconfig.specialized | 23 ++++++ 46 files changed, 807 insertions(+), 1 deletion(-) diff --git a/defconfigs/configs/linux_kdevops.config b/defconfigs/configs/linux_kdevops.config new file mode 100644 index 00000000..948935e6 --- /dev/null +++ b/defconfigs/configs/linux_kdevops.config @@ -0,0 +1,11 @@ +CONFIG_BOOTLINUX_USE_CONFIG_FRAGMENTS=y +CONFIG_BOOTLINUX_FRAGMENT_64BIT=y +CONFIG_BOOTLINUX_FRAGMENT_KVM_GUEST=y +CONFIG_BOOTLINUX_FRAGMENT_VIRTIO_FS=y +CONFIG_BOOTLINUX_FRAGMENT_SYSTEMD=y +CONFIG_BOOTLINUX_FRAGMENT_DISTRO=y +CONFIG_BOOTLINUX_FRAGMENT_STORAGE=y +CONFIG_BOOTLINUX_FRAGMENT_INITRAMFS=y +CONFIG_BOOTLINUX_FRAGMENT_LOCALAUTO=y +CONFIG_BOOTLINUX_FRAGMENT_MODULES=y +CONFIG_BOOTLINUX_FRAGMENT_MODULES_BLK=y diff --git a/defconfigs/configs/linux_minimal.config b/defconfigs/configs/linux_minimal.config new file mode 100644 index 00000000..4624f6e7 --- /dev/null +++ b/defconfigs/configs/linux_minimal.config @@ -0,0 +1,9 @@ +CONFIG_BOOTLINUX_USE_CONFIG_FRAGMENTS=y +CONFIG_BOOTLINUX_FRAGMENT_64BIT=y +CONFIG_BOOTLINUX_FRAGMENT_KVM_GUEST=y +CONFIG_BOOTLINUX_FRAGMENT_VIRTIO_FS=y +CONFIG_BOOTLINUX_FRAGMENT_SYSTEMD=y +CONFIG_BOOTLINUX_FRAGMENT_DISTRO=y +CONFIG_BOOTLINUX_FRAGMENT_STORAGE=y +CONFIG_BOOTLINUX_FRAGMENT_INITRAMFS=y +CONFIG_BOOTLINUX_FRAGMENT_LOCALAUTO=y diff --git a/playbooks/roles/bootlinux/defaults/main.yml b/playbooks/roles/bootlinux/defaults/main.yml index 97adec30..1ae70b2c 100644 --- a/playbooks/roles/bootlinux/defaults/main.yml +++ b/playbooks/roles/bootlinux/defaults/main.yml @@ -98,3 +98,46 @@ bootlinux_tree_custom_localversion: false bootlinux_is_dev_node: false bootlinux_debug_ref: "{{ lookup('env', 'DEBUG_REF') | default(false, true) | bool }}" +# Kernel configuration fragments support +bootlinux_use_config_fragments: false + +# Upstream kernel fragments +bootlinux_fragment_tiny: false +bootlinux_fragment_nopm: false +bootlinux_fragment_debug: false +bootlinux_fragment_hardening: false +bootlinux_fragment_kvm_guest: true +bootlinux_fragment_xen: false +bootlinux_fragment_rust: false + +# kdevops fragments +bootlinux_fragment_64bit: true +bootlinux_fragment_systemd: true +bootlinux_fragment_distro: true +bootlinux_fragment_storage: true +bootlinux_fragment_virtio_fs: true +bootlinux_fragment_numa: false +bootlinux_fragment_modules: false +bootlinux_fragment_initramfs: true +bootlinux_fragment_ebpf: false +bootlinux_fragment_gdb: false +bootlinux_fragment_vm_debug: false +bootlinux_fragment_localversion: false +bootlinux_fragment_blktrace: false +bootlinux_fragment_ksm: false + +# ARM64 page size (mutually exclusive choice) +bootlinux_fragment_arm64_4k_pages: false +bootlinux_fragment_arm64_16k_pages: false +bootlinux_fragment_arm64_64k_pages: false + +# Additional kdevops fragments +bootlinux_fragment_buffer_head: false +bootlinux_fragment_ebpf_errorinj: false +bootlinux_fragment_localauto: true +bootlinux_fragment_moby: false +bootlinux_fragment_modules_blk: false +bootlinux_fragment_x86: false +bootlinux_fragment_xarray: false +bootlinux_fragment_xarray_no_multi: false + diff --git a/playbooks/roles/bootlinux/tasks/build/9p.yml b/playbooks/roles/bootlinux/tasks/build/9p.yml index 6f03ed9a..08512c90 100644 --- a/playbooks/roles/bootlinux/tasks/build/9p.yml +++ b/playbooks/roles/bootlinux/tasks/build/9p.yml @@ -116,6 +116,16 @@ mode: "0644" run_once: true delegate_to: localhost + when: not bootlinux_use_config_fragments|default(false)|bool + +- name: Use configuration fragments for Linux {{ target_linux_tree }} on the control node + ansible.builtin.import_tasks: ../config-fragments.yml + run_once: true + delegate_to: localhost + vars: + target_linux_dir_path: "{{ bootlinux_9p_host_path }}" + when: + - bootlinux_use_config_fragments|default(false)|bool - name: Set kernel localversion if requested on the control node ansible.builtin.shell: "echo {{ active_linux_localversion | default(target_linux_localversion) }} > {{ bootlinux_9p_host_path }}/localversion" @@ -128,7 +138,7 @@ $ {{ ansible_callback_diy.result.output.cmd | join(' ') }} {{ ansible_callback_diy.result.output.stdout | default('') }} -- name: Configure Linux {{ target_linux_tree }} on the control node +- name: Configure kernel with oldconfig (9P build - monolithic config only) ansible.builtin.shell: | set -o pipefail yes "" | make oldconfig @@ -141,6 +151,7 @@ executable: /bin/bash run_once: true delegate_to: localhost + when: not bootlinux_use_config_fragments|default(false)|bool vars: ansible_callback_diy_runner_on_ok_msg: | $ {{ ansible_callback_diy.result.output.cmd | join(' ') }} diff --git a/playbooks/roles/bootlinux/tasks/build/builder.yml b/playbooks/roles/bootlinux/tasks/build/builder.yml index 9ab73bf7..f981ad97 100644 --- a/playbooks/roles/bootlinux/tasks/build/builder.yml +++ b/playbooks/roles/bootlinux/tasks/build/builder.yml @@ -112,6 +112,7 @@ target: "olddefconfig" when: - bootlinux_compiler_gcc|bool + - not bootlinux_use_config_fragments|default(false)|bool - name: Build {{ target_linux_tree }} community.general.make: @@ -129,6 +130,7 @@ target: "olddefconfig" when: - bootlinux_compiler_clang|bool + - not bootlinux_use_config_fragments|default(false)|bool - name: Build {{ target_linux_tree }} community.general.make: diff --git a/playbooks/roles/bootlinux/tasks/build/targets.yml b/playbooks/roles/bootlinux/tasks/build/targets.yml index 5deb330b..d77c8634 100644 --- a/playbooks/roles/bootlinux/tasks/build/targets.yml +++ b/playbooks/roles/bootlinux/tasks/build/targets.yml @@ -75,6 +75,13 @@ owner: "{{ data_user }}" group: "{{ data_group }}" mode: "0644" + when: not bootlinux_use_config_fragments|default(false)|bool + +- name: Use configuration fragments for Linux {{ target_linux_tree }} on target nodes + ansible.builtin.import_tasks: ../config-fragments.yml + when: + - bootlinux_use_config_fragments|default(false)|bool + - target_arch_arm64|default(false)|bool - name: Set kernel localversion if requested on the target nodes ansible.builtin.shell: "echo {{ target_linux_localversion }} > {{ target_linux_dir_path }}/localversion" @@ -91,6 +98,7 @@ args: chdir: "{{ target_linux_dir_path }}" executable: /bin/bash + when: not bootlinux_use_config_fragments|default(false)|bool - name: Build {{ target_linux_tree }} on the target nodes ansible.builtin.shell: "{{ target_linux_make_cmd }}" diff --git a/playbooks/roles/bootlinux/tasks/config-fragments.yml b/playbooks/roles/bootlinux/tasks/config-fragments.yml new file mode 100644 index 00000000..855022b6 --- /dev/null +++ b/playbooks/roles/bootlinux/tasks/config-fragments.yml @@ -0,0 +1,80 @@ +--- +# Kernel configuration using fragments with merge_config.sh + +- name: Initialize fragment list + ansible.builtin.set_fact: + fragment_list: [] + +# Build fragment list for upstream kernel fragments +- name: Add upstream fragments to list + ansible.builtin.set_fact: + fragment_list: "{{ fragment_list + [item.path] }}" + loop: + - { condition: "{{ bootlinux_fragment_tiny|default(false)|bool }}", path: "kernel/configs/tiny.config" } + - { condition: "{{ bootlinux_fragment_nopm|default(false)|bool }}", path: "kernel/configs/nopm.config" } + - { condition: "{{ bootlinux_fragment_debug|default(false)|bool }}", path: "kernel/configs/debug.config" } + - { condition: "{{ bootlinux_fragment_hardening|default(false)|bool }}", path: "kernel/configs/hardening.config" } + - { condition: "{{ bootlinux_fragment_kvm_guest|default(false)|bool }}", path: "kernel/configs/kvm_guest.config" } + - { condition: "{{ bootlinux_fragment_xen|default(false)|bool }}", path: "kernel/configs/xen.config" } + - { condition: "{{ bootlinux_fragment_rust|default(false)|bool }}", path: "kernel/configs/rust.config" } + when: item.condition + +# Build fragment list for kdevops template fragments +- name: Add kdevops template fragments to list + ansible.builtin.set_fact: + fragment_list: "{{ fragment_list + [role_path + '/templates/fragments/' + item.file] }}" + loop: + - { condition: "{{ bootlinux_fragment_64bit|default(false)|bool }}", file: "64bit.config" } + - { condition: "{{ bootlinux_fragment_systemd|default(false)|bool }}", file: "systemd.config" } + - { condition: "{{ bootlinux_fragment_distro|default(false)|bool }}", file: "distro.config" } + - { condition: "{{ bootlinux_fragment_storage|default(false)|bool }}", file: "storage.config" } + - { condition: "{{ bootlinux_fragment_virtio_fs|default(false)|bool }}", file: "virtio-fs.config" } + - { condition: "{{ bootlinux_fragment_numa|default(false)|bool }}", file: "numa.config" } + - { condition: "{{ bootlinux_fragment_modules|default(false)|bool }}", file: "modules.config" } + - { condition: "{{ bootlinux_fragment_initramfs|default(false)|bool }}", file: "initramfs.config" } + - { condition: "{{ bootlinux_fragment_ebpf|default(false)|bool }}", file: "ebpf.config" } + - { condition: "{{ bootlinux_fragment_gdb|default(false)|bool }}", file: "gdb.config" } + - { condition: "{{ bootlinux_fragment_vm_debug|default(false)|bool }}", file: "vm_debug.config" } + - { condition: "{{ bootlinux_fragment_localversion|default(false)|bool }}", file: "localversion.config" } + - { condition: "{{ bootlinux_fragment_blktrace|default(false)|bool }}", file: "blktrace.config" } + - { condition: "{{ bootlinux_fragment_ksm|default(false)|bool }}", file: "ksm.config" } + - { condition: "{{ bootlinux_fragment_arm64_4k_pages|default(false)|bool }}", file: "arm64_4k_pages.config" } + - { condition: "{{ bootlinux_fragment_arm64_16k_pages|default(false)|bool }}", file: "arm64_16k_pages.config" } + - { condition: "{{ bootlinux_fragment_arm64_64k_pages|default(false)|bool }}", file: "arm64_64k_pages.config" } + - { condition: "{{ bootlinux_fragment_buffer_head|default(false)|bool }}", file: "buffer_head.config" } + - { condition: "{{ bootlinux_fragment_ebpf_errorinj|default(false)|bool }}", file: "ebpf-errorinj.config" } + - { condition: "{{ bootlinux_fragment_localauto|default(false)|bool }}", file: "localauto.config" } + - { condition: "{{ bootlinux_fragment_moby|default(false)|bool }}", file: "moby.config" } + - { condition: "{{ bootlinux_fragment_modules_blk|default(false)|bool }}", file: "modules-blk.config" } + - { condition: "{{ bootlinux_fragment_x86|default(false)|bool }}", file: "x86.config" } + - { condition: "{{ bootlinux_fragment_xarray|default(false)|bool }}", file: "xarray.config" } + - { condition: "{{ bootlinux_fragment_xarray_no_multi|default(false)|bool }}", file: "xarray_no_multi.config" } + when: item.condition + +- name: Display selected configuration fragments + ansible.builtin.debug: + msg: | + Selected kernel configuration fragments ({{ fragment_list | length }} total): + {{ fragment_list | join(' ') }} + when: fragment_list | length > 0 + +- name: Display warning if no fragments selected + ansible.builtin.debug: + msg: "WARNING: No configuration fragments were selected!" + when: fragment_list | length == 0 + vars: + ansible_callback_diy_runner_on_ok_msg: "{{ ansible_callback_diy.result.output.msg }}" + +# Apply fragments using merge_config.sh +- name: Apply configuration fragments using merge_config.sh + ansible.builtin.shell: >- + {{ 'LLVM=1 ' if bootlinux_compiler_clang|default(false)|bool else '' }}./scripts/kconfig/merge_config.sh + -n .config + {{ fragment_list | join(' ') }} + args: + chdir: "{{ target_linux_dir_path }}" + when: fragment_list | length > 0 + vars: + ansible_callback_diy_runner_on_ok_msg: | + $ {{ ansible_callback_diy.result.output.cmd }} + {{ ansible_callback_diy.result.output.stdout | default('') }} diff --git a/playbooks/roles/bootlinux/templates/fragments/64bit.config b/playbooks/roles/bootlinux/templates/fragments/64bit.config new file mode 100644 index 00000000..06a94e48 --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/64bit.config @@ -0,0 +1 @@ +CONFIG_64BIT=y diff --git a/playbooks/roles/bootlinux/templates/fragments/arm64_16k_pages.config b/playbooks/roles/bootlinux/templates/fragments/arm64_16k_pages.config new file mode 100644 index 00000000..a83e1a50 --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/arm64_16k_pages.config @@ -0,0 +1 @@ +CONFIG_ARM64_16K_PAGES=y diff --git a/playbooks/roles/bootlinux/templates/fragments/arm64_4k_pages.config b/playbooks/roles/bootlinux/templates/fragments/arm64_4k_pages.config new file mode 100644 index 00000000..5df91df1 --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/arm64_4k_pages.config @@ -0,0 +1 @@ +CONFIG_ARM64_4K_PAGES=y diff --git a/playbooks/roles/bootlinux/templates/fragments/arm64_64k_pages.config b/playbooks/roles/bootlinux/templates/fragments/arm64_64k_pages.config new file mode 100644 index 00000000..bda5426d --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/arm64_64k_pages.config @@ -0,0 +1 @@ +CONFIG_ARM64_64K_PAGES=y diff --git a/playbooks/roles/bootlinux/templates/fragments/blktrace.config b/playbooks/roles/bootlinux/templates/fragments/blktrace.config new file mode 100644 index 00000000..1d95879a --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/blktrace.config @@ -0,0 +1,2 @@ +CONFIG_FTRACE=y +CONFIG_BLK_DEV_IO_TRACE=y diff --git a/playbooks/roles/bootlinux/templates/fragments/buffer_head.config b/playbooks/roles/bootlinux/templates/fragments/buffer_head.config new file mode 100644 index 00000000..a091f1ee --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/buffer_head.config @@ -0,0 +1,7 @@ +# Disable buffer head support +CONFIG_EXFAT_FS=n +CONFIG_EXT4_FS=n +CONFIG_FAT_FS=n +CONFIG_NTFS_FS=n +CONFIG_MSDOS_FS=n +CONFIG_VFAT_FS=n diff --git a/playbooks/roles/bootlinux/templates/fragments/distro.config b/playbooks/roles/bootlinux/templates/fragments/distro.config new file mode 100644 index 00000000..4a0d3cf0 --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/distro.config @@ -0,0 +1,84 @@ +CONFIG_ACPI=y +CONFIG_ADVISE_SYSCALLS=y +CONFIG_AIO=y +CONFIG_ALLOW_DEV_COREDUMP=y +CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_MISC=y +CONFIG_BINFMT_SCRIPT=y +CONFIG_BUG=y +CONFIG_CHECKPOINT_RESTORE=y +CONFIG_CMA_SYSFS=y +CONFIG_CMA=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_COREDUMP=y # Required by CONFIG_ELF_CORE +CONFIG_CPU_ISOLATION=y +CONFIG_CROSS_MEMORY_ATTACH=y +CONFIG_DEBUG_MISC=y +CONFIG_DEVMEM=y +CONFIG_DEVTMPFS=y +CONFIG_E1000E=y +CONFIG_E1000=y +CONFIG_ELF_CORE=y +CONFIG_ETHERNET=y +CONFIG_EXPERT=y +CONFIG_EXT4_USE_FOR_EXT2=y +CONFIG_FAT_DEFAULT_UTF8=y +CONFIG_FAT_FS=y +CONFIG_FILE_LOCKING=y # Required for CONFIG_NFSD +CONFIG_FS_STACK=y +CONFIG_FUSE_DAX=y +CONFIG_FUSE_IO_URING=y +CONFIG_FUSE_PASSTHROUGH=y +CONFIG_FUTEX=y +CONFIG_FW_LOADER=y +CONFIG_GUP_TEST=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_HOTPLUG_CPU=y +CONFIG_HWMON=y +CONFIG_HW_RANDOM=y +CONFIG_INPUT=y +CONFIG_IOMMU_SUPPORT=y +CONFIG_KALLSYMS=y +CONFIG_MAGIC_SYSRQ=y +CONFIG_MEMBARRIER=y +CONFIG_MEMCG=y +CONFIG_MIGRATION=y +CONFIG_MSDOS_FS=y +CONFIG_NET_9P_FD=y +CONFIG_NETFILTER=y +CONFIG_NET_VENDOR_INTEL=y +CONFIG_NFSD=y +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS=y +CONFIG_NTFS_FS=y +CONFIG_PACKET=y +CONFIG_POSIX_TIMERS=y +CONFIG_PRINTK_TIME=y +CONFIG_PRINTK=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_PROC_SYSCTL=y +CONFIG_QUOTA=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SHMEM=y +CONFIG_SIGNALFD=y +CONFIG_SMP=y +CONFIG_SYN_COOKIES=y +CONFIG_SYSFS_DEPRECATED=n +CONFIG_SYSFS_SYSCALL=y +CONFIG_SYSFS=y +CONFIG_SYSVIPC=y +CONFIG_TIMERFD=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_TRANSPARENT_HUGEPAGE=y +CONFIG_TTY=y +CONFIG_UNIX98_PTYS=y +CONFIG_UNIX_DIAG=y +CONFIG_USB_SUPPORT=y +CONFIG_VFAT_FS=y +CONFIG_VIRTIO_INPUT=y +CONFIG_VT=y +CONFIG_XFS_SUPPORT_ASCII_CI=y +CONFIG_ZONE_DMA=y diff --git a/playbooks/roles/bootlinux/templates/fragments/ebpf-errorinj.config b/playbooks/roles/bootlinux/templates/fragments/ebpf-errorinj.config new file mode 100644 index 00000000..5e132d93 --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/ebpf-errorinj.config @@ -0,0 +1,2 @@ +CONFIG_BPF_KPROBE_OVERRIDE=y +CONFIG_FUNCTION_ERROR_INJECTION=y diff --git a/playbooks/roles/bootlinux/templates/fragments/ebpf.config b/playbooks/roles/bootlinux/templates/fragments/ebpf.config new file mode 100644 index 00000000..2d393735 --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/ebpf.config @@ -0,0 +1,61 @@ +# eBPF +# DOCS: +# https://github.com/iovisor/bcc/blob/master/docs/kernel_config.md +# https://github.com/iovisor/bcc/blob/master/INSTALL.md#kernel-configuration +CONFIG_BPF=y +CONFIG_BPFILTER=y +CONFIG_BPFILTER_UMH=y +CONFIG_BPF_EVENTS=y +CONFIG_BPF_JIT=y +CONFIG_BPF_JIT_ALWAYS_ON=y +CONFIG_BPF_LIRC_MODE2=y +CONFIG_BPF_LSM=y +CONFIG_BPF_STREAM_PARSER=y +CONFIG_BPF_SYSCALL=y +CONFIG_CGROUP_BPF=y +CONFIG_DEBUG_INFO_BTF=y # macos sdk error +CONFIG_DEBUG_INFO_REDUCED=n +CONFIG_DUMMY=y +CONFIG_DYNAMIC_FTRACE=y +CONFIG_FTRACE=y # Required by CONFIG_BPF_EVENTS +CONFIG_FTRACE_SYSCALLS=y +CONFIG_FUNCTION_GRAPH_TRACER=y +CONFIG_FUNCTION_TRACER=y +CONFIG_IKHEADERS=y +CONFIG_IPV6_SEG6_LWTUNNEL=y +CONFIG_KPROBES=y +CONFIG_KPROBE_EVENTS=y # Required by CONFIG_BPF_EVENTS +CONFIG_LIRC=y +CONFIG_LWTUNNEL_BPF=y +CONFIG_MODULES=y # Required by CONFIG_BPF_JIT +CONFIG_NETFILTER_XTABLES=y +CONFIG_NETFILTER_XT_MATCH_BPF=y +CONFIG_NET_ACT_BPF=y +CONFIG_NET_ACT_GACT=y +CONFIG_NET_ACT_POLICE=y +CONFIG_NET_CLS_ACT=y +CONFIG_NET_CLS_BPF=y +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_SFQ=y +CONFIG_PERF_EVENTS=y # Required by CONFIG_BPF_EVENTS +CONFIG_PROFILING=y +CONFIG_RC_CORE=y +CONFIG_SECURITY=y +CONFIG_STACK_TRACER=y +CONFIG_UPROBE_EVENTS=y # Required by CONFIG_BPF_EVENTS +CONFIG_VXLAN=y +CONFIG_NET=y # Required by CONFIG_BPFILTER and CONFIG_IPV6_SEG6_LWTUNNEL +CONFIG_INET=y # Required by CONFIG_BPFILTER and CONFIG_IPV6_SEG6_LWTUNNEL +CONFIG_RC_CORE=y # Required by CONFIG_BPF_LIRC_MODE2 +CONFIG_LIRC=y # Required by CONFIG_BPF_LIRC_MODE2 +CONFIG_INPUT=y # Required by CONFIG_BPF_LIRC_MODE2 +CONFIG_SECURITY=y # Required by BPF_LSM +CONFIG_SYSFS=y # Required by CONFIG_SECURITY and CONFIG_IKHEADERS +CONFIG_MULTIUSER=y # Required by CONFIG_SECURITY +CONFIG_CGROUPS=y # Required by CONFIG_CGROUP_BPF +CONFIG_DEBUG_INFO=y # Required by CONFIG_DEBUG_INFO_BTF +CONFIG_DEBUG_INFO_SPLIT=n # Required by CONFIG_DEBUG_INFO_BTF +CONFIG_DEBUG_INFO_REDUCED=n # Required by CONFIG_DEBUG_INFO_BTF +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y # Required by CONFIG_DEBUG_INFO_BTF (CONFIG_DEBUG_INFO_DWARF5) +CONFIG_NETDEVICES=y # Required by CONFIG_DUMMY +CONFIG_NET_CORE=y # Required by CONFIG_DUMMY diff --git a/playbooks/roles/bootlinux/templates/fragments/gdb.config b/playbooks/roles/bootlinux/templates/fragments/gdb.config new file mode 100644 index 00000000..e95cf9ce --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/gdb.config @@ -0,0 +1,6 @@ +# Debugging kernel and modules via gdb +# DOCS: https://docs.kernel.org/process/debugging/gdb-kernel-debugging.html +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y +CONFIG_DEBUG_INFO_REDUCED=n +CONFIG_GDB_SCRIPTS=y diff --git a/playbooks/roles/bootlinux/templates/fragments/initramfs.config b/playbooks/roles/bootlinux/templates/fragments/initramfs.config new file mode 100644 index 00000000..f80daba7 --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/initramfs.config @@ -0,0 +1,22 @@ +# Initial RAM disk support +CONFIG_BLK_DEV_INITRD=y + +# Compression support for initramfs +CONFIG_RD_GZIP=y +CONFIG_RD_BZIP2=y +CONFIG_RD_LZMA=y +CONFIG_RD_XZ=y +CONFIG_RD_LZO=y +CONFIG_RD_LZ4=y +CONFIG_RD_ZSTD=y + +# Kernel compression algorithms needed for initramfs +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_ZSTD_DECOMPRESS=y +CONFIG_ZSTD_COMPRESS=y +CONFIG_XZ_DEC=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_LZ4_COMPRESS=y +CONFIG_LZ4_DECOMPRESS=y diff --git a/playbooks/roles/bootlinux/templates/fragments/kmemleak.config b/playbooks/roles/bootlinux/templates/fragments/kmemleak.config new file mode 100644 index 00000000..9e07bad2 --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/kmemleak.config @@ -0,0 +1,3 @@ +CONFIG_DEBUG_KMEMLEAK=y +CONFIG_SAMPLES=y +CONFIG_SAMPLE_KMEMLEAK=m diff --git a/playbooks/roles/bootlinux/templates/fragments/ksm.config b/playbooks/roles/bootlinux/templates/fragments/ksm.config new file mode 100644 index 00000000..757efcb9 --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/ksm.config @@ -0,0 +1 @@ +CONFIG_KSM=y diff --git a/playbooks/roles/bootlinux/templates/fragments/localauto.config b/playbooks/roles/bootlinux/templates/fragments/localauto.config new file mode 100644 index 00000000..6276cf0a --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/localauto.config @@ -0,0 +1,2 @@ +CONFIG_COMPILE_TEST=n +CONFIG_LOCALVERSION_AUTO=y diff --git a/playbooks/roles/bootlinux/templates/fragments/moby.config b/playbooks/roles/bootlinux/templates/fragments/moby.config new file mode 100644 index 00000000..38d45d4a --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/moby.config @@ -0,0 +1,9 @@ +# Moby (docker open source) +# https://github.com/moby/moby/blob/master/contrib/check-config.sh +CONFIG_BRIDGE_NETFILTER=y +CONFIG_BRIDGE=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_IP_VS=y +CONFIG_NF_CONNTRACK=y +CONFIG_OVERLAY_FS=y +CONFIG_NF_TABLES=y diff --git a/playbooks/roles/bootlinux/templates/fragments/modules-blk.config b/playbooks/roles/bootlinux/templates/fragments/modules-blk.config new file mode 100644 index 00000000..3cb3e5c8 --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/modules-blk.config @@ -0,0 +1,2 @@ +CONFIG_BLK_DEV_RAM=m +CONFIG_BLK_DEV_LOOP=m diff --git a/playbooks/roles/bootlinux/templates/fragments/modules-extended-modversions.config b/playbooks/roles/bootlinux/templates/fragments/modules-extended-modversions.config new file mode 100644 index 00000000..8e57d490 --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/modules-extended-modversions.config @@ -0,0 +1,2 @@ +CONFIG_MODVERSIONS=y +CONFIG_EXTENDED_MODVERSIONS=y diff --git a/playbooks/roles/bootlinux/templates/fragments/modules-modversions.config b/playbooks/roles/bootlinux/templates/fragments/modules-modversions.config new file mode 100644 index 00000000..6119c683 --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/modules-modversions.config @@ -0,0 +1 @@ +CONFIG_MODVERSIONS=y diff --git a/playbooks/roles/bootlinux/templates/fragments/modules-testing.config b/playbooks/roles/bootlinux/templates/fragments/modules-testing.config new file mode 100644 index 00000000..59a229dd --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/modules-testing.config @@ -0,0 +1,3 @@ +CONFIG_TEST_KALLSYMS=m +CONFIG_TEST_KMOD=m +CONFIG_XFS_FS=m diff --git a/playbooks/roles/bootlinux/templates/fragments/modules.config b/playbooks/roles/bootlinux/templates/fragments/modules.config new file mode 100644 index 00000000..42abd686 --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/modules.config @@ -0,0 +1,15 @@ +CONFIG_MODULES=y +CONFIG_MODULE_DEBUG=y +CONFIG_MODULE_STATS=y +CONFIG_MODULE_DEBUG_AUTOLOAD_DUPS=n +CONFIG_MODULE_FORCE_LOAD=n +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=n +CONFIG_MODULE_UNLOAD_TAINT_TRACKING=y +CONFIG_MODVERSIONS=n +CONFIG_MODULE_SRCVERSION_ALL=n +CONFIG_MODULE_SIG=n +CONFIG_MODULE_COMPRESS=n +CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=n +CONFIG_MODPROBE_PATH=/sbin/modprobe +CONFIG_TRIM_UNUSED_KSYMS=n diff --git a/playbooks/roles/bootlinux/templates/fragments/numa.config b/playbooks/roles/bootlinux/templates/fragments/numa.config new file mode 100644 index 00000000..a7a4edf5 --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/numa.config @@ -0,0 +1,2 @@ +CONFIG_SMP=y +CONFIG_NUMA=y diff --git a/playbooks/roles/bootlinux/templates/fragments/storage.config b/playbooks/roles/bootlinux/templates/fragments/storage.config new file mode 100644 index 00000000..da2b46aa --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/storage.config @@ -0,0 +1,11 @@ +CONFIG_BLK_DEV_NULL_BLK=y +CONFIG_BLK_DEV_NVME=y +CONFIG_COMPILE_TEST=y +CONFIG_CONFIGFS_FS=y +CONFIG_DEBUG_FS=y +CONFIG_DNOTIFY=y +CONFIG_EXFAT_FS=y +CONFIG_FUSE_FS=y +CONFIG_HUGETLBFS=y +CONFIG_IO_URING=y +CONFIG_NVME_VERBOSE_ERRORS=y diff --git a/playbooks/roles/bootlinux/templates/fragments/systemd.config b/playbooks/roles/bootlinux/templates/fragments/systemd.config new file mode 100644 index 00000000..be009461 --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/systemd.config @@ -0,0 +1,78 @@ +# systemd +# DOCS: https://github.com/systemd/systemd/blob/main/README +CONFIG_AUDIT=n +CONFIG_AUTOFS_FS=y +CONFIG_SCSI=y # Required by CONFIG_BLK_DEV_BSG +CONFIG_BLK_DEV_BSG=y +#CONFIG_BPF=y +#CONFIG_MODULES=y # Required by CONFIG_BPF_JIT +#CONFIG_BPF_JIT=y +#CONFIG_PERF_EVENTS=y # Required by CONFIG_BPF_EVENTS +#CONFIG_UPROBE_EVENTS=y # Required by CONFIG_BPF_EVENTS +#CONFIG_KPROBE_EVENTS=y # Required by CONFIG_BPF_EVENTS +#CONFIG_FTRACE=y # Required by CONFIG_BPF_EVENTS +#CONFIG_BPF_EVENTS=y +#CONFIG_BPF_LSM=y +#CONFIG_BPF_SYSCALL=y +CONFIG_BTRFS_FS=y +CONFIG_CFS_BANDWIDTH=y +CONFIG_CGROUPS=y +#CONFIG_CGROUP_BPF=y +CONFIG_CGROUP_SCHED=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y # Required by CONFIG_DEBUG_INFO +CONFIG_DEBUG_INFO=y # Required for CONFIG_DEBUG_INFO_BTF +#CONFIG_DEBUG_INFO_BTF=y +CONFIG_DEVTMPFS=y +CONFIG_DMI=y # Required by CONFIG_DMIID +CONFIG_DMIID=y +CONFIG_SECONDARY_TRUSTED_KEYRING=y # Required by CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG_SECONDARY_KEYRING +CONFIG_BLK_DEV_DM=y # Required by CONFIG_DM_VERITY +CONFIG_MD=y # Required by CONFIG_DM_VERITY +CONFIG_DM_VERITY=y # Required by CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG +CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG=y +CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG_SECONDARY_KEYRING=y +CONFIG_EFI=y # Required for CONFIG_EFIVAR_FS +CONFIG_EFIVAR_FS=y +CONFIG_EFI_PARTITION=y +CONFIG_EPOLL=y +CONFIG_EXT4_FS=y +CONFIG_FAIR_GROUP_SCHED=y +CONFIG_FHANDLE=y +CONFIG_9P_FS_POSIX_ACL=y +CONFIG_FS_POSIX_ACL=y +CONFIG_EXT4_FS_POSIX_ACL=y # Selects FS_POSIX_ACL +CONFIG_XFS_POSIX_ACL=y # Selects FS_POSIX_ACL +CONFIG_BTRFS_FS_POSIX_ACL=y # Selects FS_POSIX_ACL +CONFIG_FW_LOADER_USER_HELPER=n +CONFIG_HAVE_EBPF_JIT=y +CONFIG_INTEGRITY_SIGNATURE=y # Required for CONFIG_INTEGRITY_ASYMMETRIC_KEYS +CONFIG_INTEGRITY_ASYMMETRIC_KEYS=y # Required for CONFIG_IMA_ARCH_POLICY +CONFIG_SECURITY=y # Required for CONFIG_INTEGRITY +CONFIG_INTEGRITY=y +CONFIG_IMA=y # Required by CONFIG_IMA_ARCH_POLICY +CONFIG_IMA_APPRAISE=y # Required by CONFIG_IMA_ARCH_POLICY +CONFIG_IMA_ARCH_POLICY=y +CONFIG_INOTIFY_USER=y +#CONFIG_INTEGRITY_MACHINE_KEYRING=y +CONFIG_IPV6=y +CONFIG_KCMP=y +CONFIG_NET=y +CONFIG_NET_NS=y +CONFIG_PROC_FS=y +CONFIG_PSI=y +CONFIG_RT_GROUP_SCHED=n +CONFIG_SECCOMP=y +CONFIG_SECCOMP_FILTER=y +CONFIG_SIGNALFD=y +CONFIG_SYSFS=y +CONFIG_SYSFS_DEPRECATED=n +CONFIG_TIMERFD=y +CONFIG_SHMEM=y # Required for CONFIG_TMPFS +CONFIG_TMPFS=y +CONFIG_TMPFS_XATTR=y +CONFIG_UEVENT_HELPER_PATH="" +CONFIG_UNIX=y +CONFIG_MULTIUSER=y # Required for CONFIG_NAMESPACES +CONFIG_NAMESPACES=y # Required for CONFIG_USER_NS +CONFIG_USER_NS=y +CONFIG_XFS_FS=y diff --git a/playbooks/roles/bootlinux/templates/fragments/virtio-fs.config b/playbooks/roles/bootlinux/templates/fragments/virtio-fs.config new file mode 100644 index 00000000..df391082 --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/virtio-fs.config @@ -0,0 +1,15 @@ +#CONFIG_VIRTIO_MMIO=y +# virtio-fs +# DOCS: https://virtio-fs.gitlab.io/howto-qemu.html +CONFIG_DAX=y +#CONFIG_DAX_DRIVER=y # Deprecated by afd586f0d06c ("dax: remove CONFIG_DAX_DRIVER") +CONFIG_FS_DAX=y +CONFIG_FUSE_FS=y # Required for VIRTIO_FS +CONFIG_MEMORY_HOTPLUG=y # Required by CONFIG_ZONE_DEVICE +CONFIG_MEMORY_HOTREMOVE=y # Required by CONFIG_ZONE_DEVICE +CONFIG_SPARSEMEM_VMEMMAP=y # Required by CONFIG_ZONE_DEVICE +CONFIG_MIGRATION=y # Required for CONFIG_MEMORY_HOTREMOVE=y +CONFIG_MMU=y # Required by CONFIG_FS_DAX +CONFIG_VIRTIO=y +CONFIG_VIRTIO_FS=y +CONFIG_ZONE_DEVICE=y # Required by CONFIG_FS_DAX diff --git a/playbooks/roles/bootlinux/templates/fragments/vm_debug.config b/playbooks/roles/bootlinux/templates/fragments/vm_debug.config new file mode 100644 index 00000000..d19bdfdd --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/vm_debug.config @@ -0,0 +1 @@ +CONFIG_DEBUG_VM=y diff --git a/playbooks/roles/bootlinux/templates/fragments/xarray.config b/playbooks/roles/bootlinux/templates/fragments/xarray.config new file mode 100644 index 00000000..5474e5f9 --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/xarray.config @@ -0,0 +1,6 @@ +CONFIG_TEST_XARRAY=m +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_DEBUG_VM_PGFLAGS=y +CONFIG_DEBUG_VM=y +CONFIG_RUNTIME_TESTING_MENU=y # Required for CONFIG_TEST_XARRAY diff --git a/playbooks/roles/bootlinux/templates/fragments/xarray_no_multi.config b/playbooks/roles/bootlinux/templates/fragments/xarray_no_multi.config new file mode 100644 index 00000000..456dc608 --- /dev/null +++ b/playbooks/roles/bootlinux/templates/fragments/xarray_no_multi.config @@ -0,0 +1,9 @@ +CONFIG_TEST_XARRAY=m +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_DEBUG_VM_PGFLAGS=y +CONFIG_DEBUG_VM=y +CONFIG_RUNTIME_TESTING_MENU=y # Required for CONFIG_TEST_XARRAY +CONFIG_XARRAY_MULTI=n +CONFIG_TRANSPARENT_HUGEPAGE=n +CONFIG_PREEMPT_RT=n diff --git a/workflows/linux/Kconfig b/workflows/linux/Kconfig index cbfa8a3c..cae82382 100644 --- a/workflows/linux/Kconfig +++ b/workflows/linux/Kconfig @@ -561,4 +561,6 @@ endif # BOOTLINUX_AB_DIFFERENT_REF endif # KDEVOPS_BASELINE_AND_DEV +source "workflows/linux/Kconfig.fragments" + endif # BOOTLINUX diff --git a/workflows/linux/Kconfig.fragments b/workflows/linux/Kconfig.fragments new file mode 100644 index 00000000..6d99885a --- /dev/null +++ b/workflows/linux/Kconfig.fragments @@ -0,0 +1,26 @@ +config BOOTLINUX_USE_CONFIG_FRAGMENTS + bool "Use kernel configuration fragments" + output yaml + help + Enable this to build the kernel using configuration fragments + instead of a monolithic configuration file. This allows you to + compose kernel configurations from smaller, focused fragments. + + When enabled, the kernel configuration will be built using + merge_config.sh with selected fragments from both upstream + kernel sources and kdevops templates. + +if BOOTLINUX_USE_CONFIG_FRAGMENTS + +source "workflows/linux/fragments/Kconfig.essential" +source "workflows/linux/fragments/Kconfig.security" +source "workflows/linux/fragments/Kconfig.arch" +source "workflows/linux/fragments/Kconfig.development" +source "workflows/linux/fragments/Kconfig.memory" +source "workflows/linux/fragments/Kconfig.modules" +source "workflows/linux/fragments/Kconfig.advanced" +source "workflows/linux/fragments/Kconfig.container" +source "workflows/linux/fragments/Kconfig.specialized" +source "workflows/linux/fragments/Kconfig.legacy" + +endif # BOOTLINUX_USE_CONFIG_FRAGMENTS diff --git a/workflows/linux/fragments/Kconfig.advanced b/workflows/linux/fragments/Kconfig.advanced new file mode 100644 index 00000000..05d5bc66 --- /dev/null +++ b/workflows/linux/fragments/Kconfig.advanced @@ -0,0 +1,27 @@ +menu "Advanced features" + +config BOOTLINUX_FRAGMENT_EBPF + bool "eBPF support (kdevops: ebpf.config)" + output yaml + help + Enable extended Berkeley Packet Filter support. + +config BOOTLINUX_FRAGMENT_EBPF_ERRORINJ + bool "eBPF error injection (kdevops: ebpf-errorinj.config)" + output yaml + help + Enable eBPF-based error injection capabilities for testing. + +config BOOTLINUX_FRAGMENT_XARRAY + bool "XArray data structure support (kdevops: xarray.config)" + output yaml + help + Enable XArray data structure support in the kernel. + +config BOOTLINUX_FRAGMENT_XARRAY_NO_MULTI + bool "XArray without multi-index (kdevops: xarray_no_multi.config)" + output yaml + help + Enable XArray support but disable multi-index functionality. + +endmenu diff --git a/workflows/linux/fragments/Kconfig.arch b/workflows/linux/fragments/Kconfig.arch new file mode 100644 index 00000000..1a383666 --- /dev/null +++ b/workflows/linux/fragments/Kconfig.arch @@ -0,0 +1,30 @@ +menu "Architecture-specific configuration" + +choice + prompt "ARM64 page size configuration" + depends on TARGET_ARCH_ARM64 + default BOOTLINUX_FRAGMENT_ARM64_4K_PAGES + help + Choose the page size configuration for ARM64. + +config BOOTLINUX_FRAGMENT_ARM64_4K_PAGES + bool "4KB pages (kdevops: arm64_4k_pages.config)" + output yaml + help + Use 4KB page size (default for most systems). + +config BOOTLINUX_FRAGMENT_ARM64_16K_PAGES + bool "16KB pages (kdevops: arm64_16k_pages.config)" + output yaml + help + Use 16KB page size for better performance in some workloads. + +config BOOTLINUX_FRAGMENT_ARM64_64K_PAGES + bool "64KB pages (kdevops: arm64_64k_pages.config)" + output yaml + help + Use 64KB page size for high-performance computing workloads. + +endchoice + +endmenu diff --git a/workflows/linux/fragments/Kconfig.container b/workflows/linux/fragments/Kconfig.container new file mode 100644 index 00000000..c3f0460e --- /dev/null +++ b/workflows/linux/fragments/Kconfig.container @@ -0,0 +1,15 @@ +menu "Container and virtualization" + +config BOOTLINUX_FRAGMENT_XEN + bool "Xen guest support (upstream: xen.config)" + output yaml + help + Use the upstream xen.config fragment to enable Xen hypervisor support. + +config BOOTLINUX_FRAGMENT_MOBY + bool "Container/Moby support (kdevops: moby.config)" + output yaml + help + Enable kernel features required for container runtimes like Moby/Docker. + +endmenu diff --git a/workflows/linux/fragments/Kconfig.development b/workflows/linux/fragments/Kconfig.development new file mode 100644 index 00000000..9f9968b8 --- /dev/null +++ b/workflows/linux/fragments/Kconfig.development @@ -0,0 +1,28 @@ +menu "Development and debugging" + +config BOOTLINUX_FRAGMENT_DEBUG + bool "Kernel debugging features (upstream: debug.config)" + output yaml + help + Use the upstream debug.config fragment to enable various kernel debugging + and diagnostic features. + +config BOOTLINUX_FRAGMENT_GDB + bool "Kernel GDB support (kdevops: gdb.config)" + output yaml + help + Enable kernel debugging via GDB. + +config BOOTLINUX_FRAGMENT_VM_DEBUG + bool "Virtual memory debugging (kdevops: vm_debug.config)" + output yaml + help + Enable virtual memory debugging features. + +config BOOTLINUX_FRAGMENT_BLKTRACE + bool "Block I/O tracing support (kdevops: blktrace.config)" + output yaml + help + Enable block layer tracing and debugging capabilities. + +endmenu diff --git a/workflows/linux/fragments/Kconfig.essential b/workflows/linux/fragments/Kconfig.essential new file mode 100644 index 00000000..78d08073 --- /dev/null +++ b/workflows/linux/fragments/Kconfig.essential @@ -0,0 +1,63 @@ +menu "Essential kernel configuration" + +config BOOTLINUX_FRAGMENT_64BIT + bool "64-bit architecture optimizations (kdevops: 64bit.config)" + default y + output yaml + help + Enable 64-bit specific optimizations and features. + +config BOOTLINUX_FRAGMENT_KVM_GUEST + bool "KVM guest optimizations (upstream: kvm_guest.config)" + default y + output yaml + help + Use the upstream kvm_guest.config fragment to enable optimizations for + running the kernel as a KVM guest. + +config BOOTLINUX_FRAGMENT_VIRTIO_FS + bool "VirtIO filesystem support (kdevops: virtio-fs.config)" + default y + output yaml + help + Enable VirtIO filesystem support for virtualized environments. + +config BOOTLINUX_FRAGMENT_SYSTEMD + bool "systemd support (kdevops: systemd.config)" + default y + output yaml + help + Enable kernel features required by systemd init system. + +config BOOTLINUX_FRAGMENT_DISTRO + bool "Distribution kernel features (kdevops: distro.config)" + default y + output yaml + help + Enable features commonly needed by Linux distributions. + +config BOOTLINUX_FRAGMENT_STORAGE + bool "Storage and filesystem features (kdevops: storage.config)" + default y + output yaml + help + Enable advanced storage and filesystem features. + +config BOOTLINUX_FRAGMENT_INITRAMFS + bool "Initial RAM disk support (kdevops: initramfs.config)" + default y + output yaml + help + Enable initramfs (initial RAM disk) support with compression + algorithms. This is essential for most Linux distributions + and is needed for generating initrd images during kernel + installation. + +config BOOTLINUX_FRAGMENT_LOCALAUTO + bool "Local version auto generation (kdevops: localauto.config)" + default y + output yaml + help + Automatically generate local version strings with git information. + +endmenu diff --git a/workflows/linux/fragments/Kconfig.legacy b/workflows/linux/fragments/Kconfig.legacy new file mode 100644 index 00000000..87f0f754 --- /dev/null +++ b/workflows/linux/fragments/Kconfig.legacy @@ -0,0 +1,9 @@ +menu "Legacy and compatibility" + +config BOOTLINUX_FRAGMENT_BUFFER_HEAD + bool "Buffer head support (kdevops: buffer_head.config)" + output yaml + help + Enable buffer head infrastructure for filesystem operations. + +endmenu diff --git a/workflows/linux/fragments/Kconfig.memory b/workflows/linux/fragments/Kconfig.memory new file mode 100644 index 00000000..d6fbcb91 --- /dev/null +++ b/workflows/linux/fragments/Kconfig.memory @@ -0,0 +1,15 @@ +menu "Memory management" + +config BOOTLINUX_FRAGMENT_NUMA + bool "NUMA support (kdevops: numa.config)" + output yaml + help + Enable Non-Uniform Memory Access support. + +config BOOTLINUX_FRAGMENT_KSM + bool "Kernel Samepage Merging (kdevops: ksm.config)" + output yaml + help + Enable KSM for memory deduplication in virtualized environments. + +endmenu diff --git a/workflows/linux/fragments/Kconfig.modules b/workflows/linux/fragments/Kconfig.modules new file mode 100644 index 00000000..e64673b1 --- /dev/null +++ b/workflows/linux/fragments/Kconfig.modules @@ -0,0 +1,46 @@ +menu "Module and extensibility" + +config BOOTLINUX_FRAGMENT_MODULES + bool "Enhanced module support (kdevops: modules.config)" + output yaml + help + Enable advanced kernel module features. + +config BOOTLINUX_FRAGMENT_MODULES_BLK + bool "Block layer module support (kdevops: modules-blk.config)" + depends on BOOTLINUX_FRAGMENT_MODULES + output yaml + help + Enhanced block layer module support and debugging. + +config BOOTLINUX_FRAGMENT_MODULES_MODVERSIONS + bool "Standard module versioning (kdevops: modules-modversions.config)" + depends on BOOTLINUX_FRAGMENT_MODULES + output yaml + help + Enable standard module versioning support for module compatibility checking. + +config BOOTLINUX_FRAGMENT_MODULES_EXTENDED_MODVERSIONS + bool "Extended module versioning (kdevops: modules-extended-modversions.config)" + depends on BOOTLINUX_FRAGMENT_MODULES + output yaml + help + Enable extended module versioning support for long symbol names. + Required for Rust support and advanced module versioning. + +config BOOTLINUX_FRAGMENT_MODULES_TESTING + bool "Module testing support (kdevops: modules-testing.config)" + depends on BOOTLINUX_FRAGMENT_MODULES + output yaml + help + Enable kernel module testing features including kallsyms and kmod tests. + +config BOOTLINUX_FRAGMENT_KMEMLEAK + bool "Kernel memory leak detection (kdevops: kmemleak.config)" + depends on BOOTLINUX_FRAGMENT_MODULES + output yaml + help + Enable kernel memory leak detection and sample module for debugging + memory leaks in kernel code. + +endmenu diff --git a/workflows/linux/fragments/Kconfig.security b/workflows/linux/fragments/Kconfig.security new file mode 100644 index 00000000..e79f3584 --- /dev/null +++ b/workflows/linux/fragments/Kconfig.security @@ -0,0 +1,10 @@ +menu "Security and hardening" + +config BOOTLINUX_FRAGMENT_HARDENING + bool "Security hardening options (upstream: hardening.config)" + output yaml + help + Use the upstream hardening.config fragment to enable kernel security + hardening features. + +endmenu diff --git a/workflows/linux/fragments/Kconfig.specialized b/workflows/linux/fragments/Kconfig.specialized new file mode 100644 index 00000000..444c0599 --- /dev/null +++ b/workflows/linux/fragments/Kconfig.specialized @@ -0,0 +1,23 @@ +menu "Specialized kernel variants" + +config BOOTLINUX_FRAGMENT_TINY + bool "Tiny kernel configuration (upstream: tiny.config)" + output yaml + help + Use the upstream tiny.config fragment from the kernel sources. + This enables CONFIG_EMBEDDED and other options for minimal kernels. + +config BOOTLINUX_FRAGMENT_NOPM + bool "Disable power management (upstream: nopm.config)" + output yaml + help + Use the upstream nopm.config fragment to disable power management features. + +config BOOTLINUX_FRAGMENT_RUST + bool "Rust language support (upstream: rust.config)" + output yaml + help + Use the upstream rust.config fragment to enable Rust programming language + support in the kernel. + +endmenu -- 2.50.1