@@ -14,6 +14,6 @@ INITRAMFS_PREINSTALL += " \
# Recipes that should be installed into the initramfs build rootfs.
INITRAMFS_INSTALL += " \
- initramfs-example \
+ initramfs-isar-example-hook \
initramfs-fsck-hook-ext4 \
"
deleted file mode 100644
@@ -1,21 +0,0 @@
-#!/bin/sh
-# Example hook script.
-#
-# See "HOOK SCRIPTS" in initramfs-tools(7) for details.
-
-set -e
-
-PREREQ=""
-prereqs()
-{
- echo "$PREREQ"
-}
-case $1 in
-prereqs)
- prereqs
- exit 0
- ;;
-esac
-
-. /usr/share/initramfs-tools/hook-functions
-# Begin real processing below this line
deleted file mode 100644
@@ -1,23 +0,0 @@
-#!/bin/sh
-# Example boot script.
-#
-# See "BOOT SCRIPTS" in initramfs-tools(7) for details.
-
-set -e
-
-PREREQ=""
-prereqs()
-{
- echo "$PREREQ"
-}
-case $1 in
-prereqs)
- prereqs
- exit 0
- ;;
-esac
-
-. /scripts/functions
-# Begin real processing below this line
-
-log_success_msg "Hello from ISAR!"
new file mode 100644
@@ -0,0 +1,3 @@
+# Script header is provided by initramfs-hook/hook.inc
+
+log_success_msg "Hello from ISAR!"
similarity index 63%
rename from meta-isar/recipes-initramfs/initramfs-example/initramfs-example.bb
rename to meta-isar/recipes-initramfs/initramfs-example/initramfs-isar-example-hook_0.1.bb
@@ -4,37 +4,30 @@
#
# This software is a part of ISAR.
+require recipes-initramfs/initramfs-hook/hook.inc
+
DESCRIPTION = "Sample initramfs module for ISAR"
MAINTAINER = "Your name here <you@domain.com>"
-DEBIAN_DEPENDS = "initramfs-tools"
# If the conf-hook enables BUSYBOX=y, busybox is needed:
DEBIAN_DEPENDS .= ", busybox"
-SRC_URI = " \
+SRC_URI += " \
file://example.conf-hook \
- file://example.hook \
- file://example.script \
+ file://local-top \
"
-inherit dpkg-raw
-
do_install[cleandirs] += " \
${D}/usr/share/initramfs-tools/conf-hooks.d \
- ${D}/usr/share/initramfs-tools/hooks \
- ${D}/usr/share/initramfs-tools/scripts/local-top \
"
-do_install() {
+do_install:append() {
# See "CONFIGURATION HOOK SCRIPTS" in initramfs-tools(7) for details.
install "${WORKDIR}/example.conf-hook" \
"${D}/usr/share/initramfs-tools/conf-hooks.d/isar-example"
- # See "HOOK SCRIPTS" in initramfs-tools(7) for details.
- install "${WORKDIR}/example.hook" \
- "${D}/usr/share/initramfs-tools/hooks/isar-example"
+ # See "HOOK SCRIPTS" in initramfs-tools(7) for details on
+ # hook-header[.tmpl] + hook.
# Note that there are other places where a boot script might be deployed to,
# apart from local-top. See "BOOT SCRIPTS" in initramfs-tools(7) for details.
- install "${WORKDIR}/example.script" \
- "${D}/usr/share/initramfs-tools/scripts/local-top/example.script"
}