diff mbox series

[isar-cip-core,05/10] initramfs-erofs/squashfs-hook: Convert to hook.inc

Message ID 5ab2ad8433666362cfe30c5c21d70ae2f36117bb.1733151072.git.jan.kiszka@siemens.com (mailing list archive)
State New
Headers show
Series Various initramfs hook improvements | expand

Commit Message

Jan Kiszka Dec. 2, 2024, 2:51 p.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

Simplifies the recipes to their minimum.

The Debian dependency on erofs-utils was actually not needed, drop it at
this chance.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 .../initramfs-erofs-hook/files/erofs.hook     | 25 -------------------
 .../initramfs-erofs-hook_0.1.bb               | 24 ------------------
 .../initramfs-erofs-hook_0.2.bb               | 14 +++++++++++
 .../initramfs-squashfs-hook_0.1.bb            | 24 ------------------
 .../initramfs-squashfs-hook_0.2.bb            | 14 +++++++++++
 5 files changed, 28 insertions(+), 73 deletions(-)
 delete mode 100644 recipes-initramfs/initramfs-erofs-hook/files/erofs.hook
 delete mode 100644 recipes-initramfs/initramfs-erofs-hook/initramfs-erofs-hook_0.1.bb
 create mode 100644 recipes-initramfs/initramfs-erofs-hook/initramfs-erofs-hook_0.2.bb
 delete mode 100644 recipes-initramfs/initramfs-squashfs-hook/initramfs-squashfs-hook_0.1.bb
 create mode 100644 recipes-initramfs/initramfs-squashfs-hook/initramfs-squashfs-hook_0.2.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
deleted file mode 100644
index cf43bf10..00000000
--- a/recipes-initramfs/initramfs-erofs-hook/files/erofs.hook
+++ /dev/null
@@ -1,25 +0,0 @@ 
-#!/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
deleted file mode 100644
index ab679c91..00000000
--- a/recipes-initramfs/initramfs-erofs-hook/initramfs-erofs-hook_0.1.bb
+++ /dev/null
@@ -1,24 +0,0 @@ 
-#
-# 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"
-}
diff --git a/recipes-initramfs/initramfs-erofs-hook/initramfs-erofs-hook_0.2.bb b/recipes-initramfs/initramfs-erofs-hook/initramfs-erofs-hook_0.2.bb
new file mode 100644
index 00000000..a7dbb673
--- /dev/null
+++ b/recipes-initramfs/initramfs-erofs-hook/initramfs-erofs-hook_0.2.bb
@@ -0,0 +1,14 @@ 
+#
+# CIP Core, generic profile
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+#  Jan Kiszka <jan.kiszka@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require recipes-initramfs/initramfs-hook/hook.inc
+
+HOOK_ADD_MODULES = "erofs"
diff --git a/recipes-initramfs/initramfs-squashfs-hook/initramfs-squashfs-hook_0.1.bb b/recipes-initramfs/initramfs-squashfs-hook/initramfs-squashfs-hook_0.1.bb
deleted file mode 100644
index 332278f5..00000000
--- a/recipes-initramfs/initramfs-squashfs-hook/initramfs-squashfs-hook_0.1.bb
+++ /dev/null
@@ -1,24 +0,0 @@ 
-#
-# CIP Core, generic profile
-#
-# Copyright (c) Siemens AG, 2022
-#
-# Authors:
-#  Felix Moessbauer <felix.moessbauer@siemens.com>
-#
-# SPDX-License-Identifier: MIT
-#
-
-inherit dpkg-raw
-
-SRC_URI += "file://squashfs.hook"
-
-DEBIAN_DEPENDS = "initramfs-tools"
-
-do_install[cleandirs] += " \
-    ${D}/usr/share/initramfs-tools/hooks"
-
-do_install() {
-    install -m 0755 "${WORKDIR}/squashfs.hook" \
-        "${D}/usr/share/initramfs-tools/hooks/squashfs"
-}
diff --git a/recipes-initramfs/initramfs-squashfs-hook/initramfs-squashfs-hook_0.2.bb b/recipes-initramfs/initramfs-squashfs-hook/initramfs-squashfs-hook_0.2.bb
new file mode 100644
index 00000000..4b199834
--- /dev/null
+++ b/recipes-initramfs/initramfs-squashfs-hook/initramfs-squashfs-hook_0.2.bb
@@ -0,0 +1,14 @@ 
+#
+# CIP Core, generic profile
+#
+# Copyright (c) Siemens AG, 2024
+#
+# Authors:
+#  Jan Kiszka <jan.kiszka@siemens.com>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require recipes-initramfs/initramfs-hook/hook.inc
+
+HOOK_ADD_MODULES = "squashfs"