Skip to content

Commit

Permalink
io386: replace check for io386 to call lock_chip by a single call und…
Browse files Browse the repository at this point in the history
…er kexec-boot prior of real kexec
  • Loading branch information
tlaurion committed Jun 12, 2023
1 parent 93d2f84 commit d5b0360
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
11 changes: 0 additions & 11 deletions initrd/bin/generic-init
Original file line number Diff line number Diff line change
Expand Up @@ -41,35 +41,24 @@ while true; do
fi

if [ "$totp_confirm" = "u" ]; then
if [ "$CONFIG_IO386" = y ]; then
lock_chip
fi
exec /bin/usb-init
continue
fi

if [ "$totp_confirm" = "m" ]; then
# Try to select a kernel from the menu
if [ "$CONFIG_IO386" = y ]; then
lock_chip
fi
mount_boot
kexec-select-boot -m -b /boot -c "grub.cfg"
continue
fi

if [ "$totp_confirm" = "y" -o -n "$totp_confirm" ]; then
# Try to boot the default
if [ "$CONFIG_IO386" = y ]; then
lock_chip
fi
mount_boot
kexec-select-boot -b /boot -c "grub.cfg" \
|| recovery "Failed default boot"
fi



done

recovery "Something failed during boot"
4 changes: 4 additions & 0 deletions initrd/bin/kexec-boot
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,9 @@ if [ "$CONFIG_TPM" = "y" ]; then
tpmr kexec_finalize
fi

if [ "$CONFIG_IO386" = y ]; then
lock_chip
fi

echo "Starting the new kernel"
exec kexec -e

0 comments on commit d5b0360

Please sign in to comment.