diff mbox series

[isar-cip-core,v3,6/6] kas: Add option for selecting read-only rootfs type

Message ID bcb07e33-2ee6-4b9c-a57d-07125662c7f3@siemens.com (mailing list archive)
State New
Headers show
Series None | expand

Commit Message

Jan Kiszka Nov. 7, 2024, 6:31 a.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

This allows to select EROFS as alternative to squashfs. The option is
limited to 6.1 kernels, older ones will no longer be enabled. Debian
buster lacked the required erofs-utils package, and bullseye seems to
generate filesystems that are not detected by kernel 6.1. Therefore,
limit support to bookworm+.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Changes in v3:
 - exclude buster and bullseye

 Kconfig           | 16 ++++++++++++++++
 kas/opt/erofs.yml | 16 ++++++++++++++++
 2 files changed, 32 insertions(+)
 create mode 100644 kas/opt/erofs.yml
diff mbox series

Patch

diff --git a/Kconfig b/Kconfig
index 8062cdb7..d10ae917 100644
--- a/Kconfig
+++ b/Kconfig
@@ -198,6 +198,22 @@  config IMAGE_DELTA_SWUPDATE
 
 endchoice
 
+choice
+	prompt "Read-only rootfs type"
+
+config IMAGE_RO_ROOTFS_SQUASHFS
+	bool "Squashfs"
+
+config IMAGE_RO_ROOTFS_EROFS
+	bool "EROFS"
+	depends on KERNEL_6_1 && !DEBIAN_BUSTER && !DEBIAN_BULLSEYE
+
+endchoice
+
+config KAS_INCLUDE_EROFS
+	string
+	default "kas/opt/erofs.yml" if IMAGE_RO_ROOTFS_EROFS
+
 config IMAGE_SECURE_BOOT
 	bool "Secure boot support"
 	depends on TARGET_QEMU_AMD64 || TARGET_QEMU_ARM64 || TARGET_QEMU_ARM || TARGET_X86_UEFI
diff --git a/kas/opt/erofs.yml b/kas/opt/erofs.yml
new file mode 100644
index 00000000..7c44f5b8
--- /dev/null
+++ b/kas/opt/erofs.yml
@@ -0,0 +1,16 @@ 
+#
+# CIP Core, generic profile
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+#  Jan Kiszka <jan.kiszka@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+
+header:
+  version: 14
+
+local_conf_header:
+  erofs: |
+    RO_ROOTFS_TYPE = "erofs"