From dfe9bb2a4f72d54f7f7e82053a173b029da4cbdf Mon Sep 17 00:00:00 2001 From: Alex Gonzalez Date: Mon, 3 Jun 2024 12:15:52 +0200 Subject: [PATCH] [TEST] initramfs-framework: Do not fail if device unlocked For testing purpose, the `OS_DEVELOPMENT` compilation switch will make the device not crash when booting an unlocked device. Signed-off-by: Alex Gonzalez --- .../recipes-core/initrdscripts/initramfs-framework_%.bbappend | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layers/meta-balena-raspberrypi/recipes-core/initrdscripts/initramfs-framework_%.bbappend b/layers/meta-balena-raspberrypi/recipes-core/initrdscripts/initramfs-framework_%.bbappend index 02182b112..136d8d6f7 100644 --- a/layers/meta-balena-raspberrypi/recipes-core/initrdscripts/initramfs-framework_%.bbappend +++ b/layers/meta-balena-raspberrypi/recipes-core/initrdscripts/initramfs-framework_%.bbappend @@ -20,8 +20,10 @@ do_install:append() { install -m 0755 ${WORKDIR}/cryptsetup-rpi ${D}/init.d/72-cryptsetup sed -i -e "s/@@BALENA_NONENC_BOOT_LABEL@@/${BALENA_NONENC_BOOT_LABEL}/g" ${D}/init.d/72-cryptsetup - install -m 0755 ${WORKDIR}/kexec_pi4_fwgpio ${D}/init.d/73-kexec_pi4_fwgpio + if ${@bb.utils.contains('DISTRO_FEATURES','osdev-image','true','false',d)}; then + sed -i -e "s/fail/warn/g" ${D}/init.d/72-cryptsetup + fi } RDEPENDS:initramfs-module-cryptsetup:append = " os-helpers-otp gnupg"