Skip to content

Commit

Permalink
Don't install capsule after rollback
Browse files Browse the repository at this point in the history
When a rollback was started before rebooting the update capsule was still installed
on the next reboot and the boot chain was switched. We want to stay on the current chain
after a failed install though.

Signed-off-by: Carlo Kretzschmann <kretzschmann@3dvisionlabs.com>
  • Loading branch information
cakre committed May 2, 2024
1 parent 0262faa commit c5371bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

CAPTARGET="/opt/nvidia/esp/EFI/UpdateCapsule/TEGRA_BL.Cap"

if [ -f "$CAPTARGET" ]; then
rm "$CAPTARGET"
fi
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
SRC_URI = " \
file://switch-rootfs \
file://verify-slot \
file://abort-blupdate \
"

LICENSE = "Apache-2.0"
Expand All @@ -16,6 +17,7 @@ PERSIST_MACHINE_ID:mender-persist-systemd-machine-id = "yes"
do_compile() {
cp ${S}/switch-rootfs ${MENDER_STATE_SCRIPTS_DIR}/ArtifactInstall_Leave_50_switch-rootfs
cp ${S}/verify-slot ${MENDER_STATE_SCRIPTS_DIR}/ArtifactCommit_Leave_50_verify-slot
cp ${S}/abort-blupdate ${MENDER_STATE_SCRIPTS_DIR}/ArtifactRollback_Leave_50_abort-blupdate
}

# Make sure scripts aren't left around from old builds
Expand Down

0 comments on commit c5371bd

Please sign in to comment.