diff mbox series

[isar-cip-core,v2] initramfs-overlay: fix missing scriptpreq

Message ID 20250110165103.77249-1-Quirin.Gylstorff@siemens.com (mailing list archive)
State New
Headers show
Series [isar-cip-core,v2] initramfs-overlay: fix missing scriptpreq | expand

Commit Message

Quirin Gylstorff Jan. 10, 2025, 4:50 p.m. UTC
From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

During testing with LAVA it was detect that the overlays are not
mounted on real hardware if the image is booted a second time.

SCRIPT_PREREQ adds a weak prerequisite to the script so it still
works if the crypt hook is not installed.

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---

Changes v2:
 - fixed typo in commit
 - added clarification that SCRIPT_PREREQ adds a weak prerequisite

 .../initramfs-overlay-hook/initramfs-overlay-hook_0.2.bb        | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jan Kiszka Jan. 13, 2025, 12:09 p.m. UTC | #1
On 10.01.25 17:50, Quirin Gylstorff wrote:
> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> 
> During testing with LAVA it was detect that the overlays are not
> mounted on real hardware if the image is booted a second time.
> 
> SCRIPT_PREREQ adds a weak prerequisite to the script so it still
> works if the crypt hook is not installed.
> 
> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> ---
> 
> Changes v2:
>  - fixed typo in commit
>  - added clarification that SCRIPT_PREREQ adds a weak prerequisite
> 
>  .../initramfs-overlay-hook/initramfs-overlay-hook_0.2.bb        | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/recipes-initramfs/initramfs-overlay-hook/initramfs-overlay-hook_0.2.bb b/recipes-initramfs/initramfs-overlay-hook/initramfs-overlay-hook_0.2.bb
> index 56ae8d2..4e2e292 100644
> --- a/recipes-initramfs/initramfs-overlay-hook/initramfs-overlay-hook_0.2.bb
> +++ b/recipes-initramfs/initramfs-overlay-hook/initramfs-overlay-hook_0.2.bb
> @@ -45,6 +45,8 @@ DEBIAN_DEPENDS .= ", awk, coreutils, util-linux"
>  HOOK_ADD_MODULES = "overlay"
>  HOOK_COPY_EXECS = "mountpoint awk e2fsck mke2fs"
>  
> +SCRIPT_PREREQ="crypt"
> +
>  do_install:append() {
>      install -m 0755 "${WORKDIR}/${INITRAMFS_OVERLAY_RECOVERY_SCRIPT}" \
>          "${D}/usr/share/initramfs-tools/scripts"

Thanks, applied.

Jan
diff mbox series

Patch

diff --git a/recipes-initramfs/initramfs-overlay-hook/initramfs-overlay-hook_0.2.bb b/recipes-initramfs/initramfs-overlay-hook/initramfs-overlay-hook_0.2.bb
index 56ae8d2..4e2e292 100644
--- a/recipes-initramfs/initramfs-overlay-hook/initramfs-overlay-hook_0.2.bb
+++ b/recipes-initramfs/initramfs-overlay-hook/initramfs-overlay-hook_0.2.bb
@@ -45,6 +45,8 @@  DEBIAN_DEPENDS .= ", awk, coreutils, util-linux"
 HOOK_ADD_MODULES = "overlay"
 HOOK_COPY_EXECS = "mountpoint awk e2fsck mke2fs"
 
+SCRIPT_PREREQ="crypt"
+
 do_install:append() {
     install -m 0755 "${WORKDIR}/${INITRAMFS_OVERLAY_RECOVERY_SCRIPT}" \
         "${D}/usr/share/initramfs-tools/scripts"