diff mbox series

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

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

Commit Message

Jan Kiszka Nov. 5, 2024, 5:54 p.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"
+}