diff mbox series

[isar-cip-core,3/6] Add initramfs-erofs-hook

Message ID fe5d4b784eeee78d51b13faa863ee331cbe61bad.1730289107.git.jan.kiszka@siemens.com (mailing list archive)
State New
Headers show
Series Add support for EROFS | expand

Commit Message

Jan Kiszka Oct. 30, 2024, 11:51 a.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

This is basically just search&replace compared to
initramfs-squashfs-hook.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 .../initramfs-erofs-hook/files/erofs.hook     | 25 +++++++++++++++++++
 .../initramfs-erofs-hook_0.1.bb               | 24 ++++++++++++++++++
 2 files changed, 49 insertions(+)
 create mode 100644 recipes-initramfs/initramfs-erofs-hook/files/erofs.hook
 create mode 100644 recipes-initramfs/initramfs-erofs-hook/initramfs-erofs-hook_0.1.bb
diff mbox series

Patch

diff --git a/recipes-initramfs/initramfs-erofs-hook/files/erofs.hook b/recipes-initramfs/initramfs-erofs-hook/files/erofs.hook
new file mode 100644
index 00000000..cf43bf10
--- /dev/null
+++ b/recipes-initramfs/initramfs-erofs-hook/files/erofs.hook
@@ -0,0 +1,25 @@ 
+#!/bin/sh
+#
+# CIP Core, generic profile
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+#  Jan Kiszka <jan.kiszka@siemens.com>
+#
+
+PREREQ=""
+prereqs()
+{
+    echo "$PREREQ"
+}
+case $1 in
+prereqs)
+    prereqs
+    exit 0
+    ;;
+esac
+
+. /usr/share/initramfs-tools/hook-functions
+
+manual_add_modules erofs
diff --git a/recipes-initramfs/initramfs-erofs-hook/initramfs-erofs-hook_0.1.bb b/recipes-initramfs/initramfs-erofs-hook/initramfs-erofs-hook_0.1.bb
new file mode 100644
index 00000000..ab679c91
--- /dev/null
+++ b/recipes-initramfs/initramfs-erofs-hook/initramfs-erofs-hook_0.1.bb
@@ -0,0 +1,24 @@ 
+#
+# CIP Core, generic profile
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+#  Jan Kiszka <jan.kiszka@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+inherit dpkg-raw
+
+SRC_URI += "file://erofs.hook"
+
+DEBIAN_DEPENDS = "erofs-utils"
+
+do_install[cleandirs] += " \
+    ${D}/usr/share/initramfs-tools/hooks"
+
+do_install() {
+    install -m 0755 "${WORKDIR}/erofs.hook" \
+        "${D}/usr/share/initramfs-tools/hooks/erofs"
+}