diff mbox series

[isar-cip-core,v2,02/13] initramfs-etc-overlay-hook: Install overlay module

Message ID ff9a89cb20920ddbacebc4c78e57e52537466064.1651769009.git.jan.kiszka@siemens.com (mailing list archive)
State New
Headers show
Series Fixes and improvements for SWUpdate images, kernel/config update | expand

Commit Message

Jan Kiszka May 5, 2022, 4:43 p.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

Needed in case overlay support is built as kernel module.

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

Patch

diff --git a/recipes-initramfs/initramfs-etc-overlay-hook/files/etc-overlay.hook b/recipes-initramfs/initramfs-etc-overlay-hook/files/etc-overlay.hook
new file mode 100644
index 0000000..bfaa7b6
--- /dev/null
+++ b/recipes-initramfs/initramfs-etc-overlay-hook/files/etc-overlay.hook
@@ -0,0 +1,25 @@ 
+#!/bin/sh
+#
+# CIP Core, generic profile
+#
+# Copyright (c) Siemens AG, 2022
+#
+# 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 overlay
diff --git a/recipes-initramfs/initramfs-etc-overlay-hook/initramfs-etc-overlay-hook_0.1.bb b/recipes-initramfs/initramfs-etc-overlay-hook/initramfs-etc-overlay-hook_0.1.bb
index 19e9261..37a04ec 100644
--- a/recipes-initramfs/initramfs-etc-overlay-hook/initramfs-etc-overlay-hook_0.1.bb
+++ b/recipes-initramfs/initramfs-etc-overlay-hook/initramfs-etc-overlay-hook_0.1.bb
@@ -12,6 +12,7 @@ 
 inherit dpkg-raw
 
 SRC_URI += " \
+    file://etc-overlay.hook \
     file://etc-overlay.script \
     "
 
@@ -22,6 +23,8 @@  do_install[cleandirs] += " \
     ${D}/usr/share/initramfs-tools/scripts/local-bottom"
 
 do_install() {
+    install -m 0755 "${WORKDIR}/etc-overlay.hook" \
+        "${D}/usr/share/initramfs-tools/hooks/etc-overlay"
     install -m 0755 "${WORKDIR}/etc-overlay.script" \
         "${D}/usr/share/initramfs-tools/scripts/local-bottom/etc-overlay"
 }