mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-20 05:28:08 +00:00
io386: replace check for io386 to call lock_chip by a single common call from kexec-boot prior of real kexec
This commit is contained in:
parent
3f1c76ce11
commit
699a961381
@ -41,18 +41,12 @@ while true; do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$totp_confirm" = "u" ]; then
|
if [ "$totp_confirm" = "u" ]; then
|
||||||
if [ "$CONFIG_IO386" = y ]; then
|
|
||||||
lock_chip
|
|
||||||
fi
|
|
||||||
exec /bin/usb-init
|
exec /bin/usb-init
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$totp_confirm" = "m" ]; then
|
if [ "$totp_confirm" = "m" ]; then
|
||||||
# Try to select a kernel from the menu
|
# Try to select a kernel from the menu
|
||||||
if [ "$CONFIG_IO386" = y ]; then
|
|
||||||
lock_chip
|
|
||||||
fi
|
|
||||||
mount_boot
|
mount_boot
|
||||||
kexec-select-boot -m -b /boot -c "grub.cfg"
|
kexec-select-boot -m -b /boot -c "grub.cfg"
|
||||||
continue
|
continue
|
||||||
@ -60,16 +54,11 @@ while true; do
|
|||||||
|
|
||||||
if [ "$totp_confirm" = "y" -o -n "$totp_confirm" ]; then
|
if [ "$totp_confirm" = "y" -o -n "$totp_confirm" ]; then
|
||||||
# Try to boot the default
|
# Try to boot the default
|
||||||
if [ "$CONFIG_IO386" = y ]; then
|
|
||||||
lock_chip
|
|
||||||
fi
|
|
||||||
mount_boot
|
mount_boot
|
||||||
kexec-select-boot -b /boot -c "grub.cfg" \
|
kexec-select-boot -b /boot -c "grub.cfg" \
|
||||||
|| recovery "Failed default boot"
|
|| recovery "Failed default boot"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
recovery "Something failed during boot"
|
recovery "Something failed during boot"
|
||||||
|
@ -150,5 +150,9 @@ if [ "$CONFIG_TPM" = "y" ]; then
|
|||||||
tpmr kexec_finalize
|
tpmr kexec_finalize
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -x /bin/io386 ]; then
|
||||||
|
lock_chip
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Starting the new kernel"
|
echo "Starting the new kernel"
|
||||||
exec kexec -e
|
exec kexec -e
|
||||||
|
Loading…
Reference in New Issue
Block a user