Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TEST] initramfs-framework: Do not fail if device unlocked #1130

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion layers/meta-balena
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ do_deploy:append:revpi-connect-4() {
echo "dtoverlay=dwc2,dr_mode=host" >> ${DEPLOYDIR}/bootfiles/config.txt
}

do_deploy:append:raspberrypicm4-ioboard() {
echo "otg_mode=1" >> ${DEPLOYDIR}/bootfiles/config.txt
}

do_deploy:append:raspberrypicm4-ioboard-sb() {
echo "otg_mode=1" >> ${DEPLOYDIR}/bootfiles/config.txt
}

do_deploy:append:raspberrypi3-unipi-neuron() {
# Use the dt overlays required by the UniPi Neuron family of boards
echo "dtoverlay=neuronee" >> ${DEPLOYDIR}/bootfiles/config.txt
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[all]
BOOT_UART=0
WAKE_ON_GPIO=0
POWER_OFF_ON_HALT=1
FREEZE_VERSION=0
HDMI_DELAY=0
BOOT_ORDER=0xf2165
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,7 @@ BALENA_NONENCRYPTED_BOOT_PARTITION_FILES="\
is_secured() {
# Check the private key has been programmed
if [ -n "$(otp_read_key | sed s/0//g)" ]; then
# Check that the RSA digest has been programmed
# Skip on balena bootloader that has no VHCI access
if grep -q "balena_stage2" < /proc/cmdline; then
return 0
else
if otp_has_rsa_digest; then
return 0
fi
fi
fi
return 1
}
Expand Down