mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-20 05:28:08 +00:00
Merge pull request #1578 from JonathonHall-Purism/config-automatic-boot-delay
initrd/bin/config-gui.sh: Allow configuring automatic boot
This commit is contained in:
commit
90d1c2e9e3
@ -2,5 +2,6 @@
|
|||||||
include $(pwd)/boards/UNTESTED_p8z77-m_pro-tpm1-maximized/UNTESTED_p8z77-m_pro-tpm1-maximized.config
|
include $(pwd)/boards/UNTESTED_p8z77-m_pro-tpm1-maximized/UNTESTED_p8z77-m_pro-tpm1-maximized.config
|
||||||
|
|
||||||
CONFIG_HOTPKEY=y
|
CONFIG_HOTPKEY=y
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
||||||
|
|
||||||
export CONFIG_BOARD_NAME="P8Z77-M PRO-HOTP"
|
export CONFIG_BOARD_NAME="P8Z77-M PRO-HOTP"
|
||||||
|
@ -37,6 +37,7 @@ CONFIG_TPMTOTP=y
|
|||||||
#HOTP based remote attestation for supported USB Security dongle
|
#HOTP based remote attestation for supported USB Security dongle
|
||||||
#With/Without TPM support
|
#With/Without TPM support
|
||||||
CONFIG_HOTPKEY=y
|
CONFIG_HOTPKEY=y
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
||||||
|
|
||||||
#Nitrokey Storage admin tool
|
#Nitrokey Storage admin tool
|
||||||
CONFIG_NKSTORECLI=n
|
CONFIG_NKSTORECLI=n
|
||||||
|
@ -38,6 +38,7 @@ CONFIG_TPMTOTP=y
|
|||||||
#HOTP based remote attestation for supported USB Security dongle
|
#HOTP based remote attestation for supported USB Security dongle
|
||||||
#With/Without TPM support
|
#With/Without TPM support
|
||||||
CONFIG_HOTPKEY=y
|
CONFIG_HOTPKEY=y
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
||||||
|
|
||||||
#Nitrokey Storage admin tool
|
#Nitrokey Storage admin tool
|
||||||
CONFIG_NKSTORECLI=n
|
CONFIG_NKSTORECLI=n
|
||||||
|
@ -42,6 +42,7 @@ CONFIG_TPMTOTP=y
|
|||||||
#HOTP based remote attestation for supported USB Security dongle
|
#HOTP based remote attestation for supported USB Security dongle
|
||||||
#With/Without TPM support
|
#With/Without TPM support
|
||||||
CONFIG_HOTPKEY=y
|
CONFIG_HOTPKEY=y
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
||||||
|
|
||||||
#Nitrokey Storage admin tool
|
#Nitrokey Storage admin tool
|
||||||
CONFIG_NKSTORECLI=n
|
CONFIG_NKSTORECLI=n
|
||||||
|
@ -42,6 +42,7 @@ CONFIG_TPMTOTP=y
|
|||||||
#HOTP based remote attestation for supported USB Security dongle
|
#HOTP based remote attestation for supported USB Security dongle
|
||||||
#With/Without TPM support
|
#With/Without TPM support
|
||||||
CONFIG_HOTPKEY=y
|
CONFIG_HOTPKEY=y
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
||||||
|
|
||||||
#Nitrokey Storage admin tool
|
#Nitrokey Storage admin tool
|
||||||
CONFIG_NKSTORECLI=n
|
CONFIG_NKSTORECLI=n
|
||||||
|
@ -42,6 +42,7 @@ CONFIG_TPMTOTP=y
|
|||||||
#HOTP based remote attestation for supported USB Security dongle
|
#HOTP based remote attestation for supported USB Security dongle
|
||||||
#With/Without TPM support
|
#With/Without TPM support
|
||||||
CONFIG_HOTPKEY=y
|
CONFIG_HOTPKEY=y
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
||||||
|
|
||||||
#Nitrokey Storage admin tool
|
#Nitrokey Storage admin tool
|
||||||
CONFIG_NKSTORECLI=n
|
CONFIG_NKSTORECLI=n
|
||||||
|
@ -42,6 +42,7 @@ CONFIG_TPMTOTP=y
|
|||||||
#HOTP based remote attestation for supported USB Security dongle
|
#HOTP based remote attestation for supported USB Security dongle
|
||||||
#With/Without TPM support
|
#With/Without TPM support
|
||||||
CONFIG_HOTPKEY=y
|
CONFIG_HOTPKEY=y
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
||||||
|
|
||||||
#Nitrokey Storage admin tool
|
#Nitrokey Storage admin tool
|
||||||
CONFIG_NKSTORECLI=n
|
CONFIG_NKSTORECLI=n
|
||||||
|
@ -37,6 +37,7 @@ CONFIG_MBEDTLS=y
|
|||||||
CONFIG_DROPBEAR=y
|
CONFIG_DROPBEAR=y
|
||||||
CONFIG_MSRTOOLS=y
|
CONFIG_MSRTOOLS=y
|
||||||
CONFIG_HOTPKEY=y
|
CONFIG_HOTPKEY=y
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
||||||
|
|
||||||
#Uncomment only one of the following block
|
#Uncomment only one of the following block
|
||||||
#Required for graphical gui-init (FBWhiptail)
|
#Required for graphical gui-init (FBWhiptail)
|
||||||
|
@ -38,6 +38,7 @@ CONFIG_MBEDTLS=y
|
|||||||
CONFIG_DROPBEAR=y
|
CONFIG_DROPBEAR=y
|
||||||
CONFIG_MSRTOOLS=y
|
CONFIG_MSRTOOLS=y
|
||||||
CONFIG_HOTPKEY=y
|
CONFIG_HOTPKEY=y
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
||||||
|
|
||||||
#Uncomment only one of the following block
|
#Uncomment only one of the following block
|
||||||
#Required for graphical gui-init (FBWhiptail)
|
#Required for graphical gui-init (FBWhiptail)
|
||||||
|
@ -37,6 +37,7 @@ CONFIG_MBEDTLS=y
|
|||||||
CONFIG_DROPBEAR=y
|
CONFIG_DROPBEAR=y
|
||||||
CONFIG_MSRTOOLS=y
|
CONFIG_MSRTOOLS=y
|
||||||
CONFIG_HOTPKEY=y
|
CONFIG_HOTPKEY=y
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
||||||
|
|
||||||
#Uncomment only one of the following block
|
#Uncomment only one of the following block
|
||||||
#Required for graphical gui-init (FBWhiptail)
|
#Required for graphical gui-init (FBWhiptail)
|
||||||
|
@ -38,6 +38,7 @@ CONFIG_MBEDTLS=y
|
|||||||
CONFIG_DROPBEAR=y
|
CONFIG_DROPBEAR=y
|
||||||
CONFIG_MSRTOOLS=y
|
CONFIG_MSRTOOLS=y
|
||||||
CONFIG_HOTPKEY=y
|
CONFIG_HOTPKEY=y
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
||||||
|
|
||||||
#Uncomment only one of the following block
|
#Uncomment only one of the following block
|
||||||
#Required for graphical gui-init (FBWhiptail)
|
#Required for graphical gui-init (FBWhiptail)
|
||||||
|
@ -42,6 +42,7 @@ CONFIG_TPMTOTP=y
|
|||||||
#HOTP based remote attestation for supported USB Security dongle
|
#HOTP based remote attestation for supported USB Security dongle
|
||||||
#With/Without TPM support
|
#With/Without TPM support
|
||||||
CONFIG_HOTPKEY=y
|
CONFIG_HOTPKEY=y
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
||||||
|
|
||||||
#Nitrokey Storage admin tool
|
#Nitrokey Storage admin tool
|
||||||
CONFIG_NKSTORECLI=n
|
CONFIG_NKSTORECLI=n
|
||||||
|
@ -40,6 +40,7 @@ CONFIG_TPMTOTP=y
|
|||||||
#HOTP based remote attestation for supported USB Security dongle
|
#HOTP based remote attestation for supported USB Security dongle
|
||||||
#With/Without TPM support
|
#With/Without TPM support
|
||||||
CONFIG_HOTPKEY=y
|
CONFIG_HOTPKEY=y
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
||||||
|
|
||||||
#Nitrokey Storage admin tool
|
#Nitrokey Storage admin tool
|
||||||
CONFIG_NKSTORECLI=n
|
CONFIG_NKSTORECLI=n
|
||||||
|
@ -2,5 +2,6 @@
|
|||||||
include $(pwd)/boards/t440p-maximized/t440p-maximized.config
|
include $(pwd)/boards/t440p-maximized/t440p-maximized.config
|
||||||
|
|
||||||
CONFIG_HOTPKEY=y
|
CONFIG_HOTPKEY=y
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
||||||
|
|
||||||
export CONFIG_BOARD_NAME="ThinkPad T440p-hotp-maximized"
|
export CONFIG_BOARD_NAME="ThinkPad T440p-hotp-maximized"
|
||||||
|
@ -42,6 +42,7 @@ CONFIG_TPMTOTP=y
|
|||||||
#HOTP based remote attestation for supported USB Security dongle
|
#HOTP based remote attestation for supported USB Security dongle
|
||||||
#With/Without TPM support
|
#With/Without TPM support
|
||||||
CONFIG_HOTPKEY=y
|
CONFIG_HOTPKEY=y
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
||||||
|
|
||||||
#Nitrokey Storage admin tool
|
#Nitrokey Storage admin tool
|
||||||
CONFIG_NKSTORECLI=n
|
CONFIG_NKSTORECLI=n
|
||||||
|
@ -2,5 +2,6 @@
|
|||||||
include $(pwd)/boards/w541-maximized/w541-maximized.config
|
include $(pwd)/boards/w541-maximized/w541-maximized.config
|
||||||
|
|
||||||
CONFIG_HOTPKEY=y
|
CONFIG_HOTPKEY=y
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
||||||
|
|
||||||
export CONFIG_BOARD_NAME="ThinkPad W541-hotp-maximized"
|
export CONFIG_BOARD_NAME="ThinkPad W541-hotp-maximized"
|
||||||
|
@ -42,6 +42,7 @@ CONFIG_TPMTOTP=y
|
|||||||
#HOTP based remote attestation for supported USB Security dongle
|
#HOTP based remote attestation for supported USB Security dongle
|
||||||
#With/Without TPM support
|
#With/Without TPM support
|
||||||
CONFIG_HOTPKEY=y
|
CONFIG_HOTPKEY=y
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
||||||
|
|
||||||
#Nitrokey Storage admin tool
|
#Nitrokey Storage admin tool
|
||||||
CONFIG_NKSTORECLI=n
|
CONFIG_NKSTORECLI=n
|
||||||
|
@ -37,6 +37,7 @@ CONFIG_TPMTOTP=y
|
|||||||
#HOTP based remote attestation for supported USB Security dongle
|
#HOTP based remote attestation for supported USB Security dongle
|
||||||
#With/Without TPM support
|
#With/Without TPM support
|
||||||
CONFIG_HOTPKEY=y
|
CONFIG_HOTPKEY=y
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
||||||
|
|
||||||
#Nitrokey Storage admin tool
|
#Nitrokey Storage admin tool
|
||||||
CONFIG_NKSTORECLI=n
|
CONFIG_NKSTORECLI=n
|
||||||
|
@ -54,6 +54,7 @@ CONFIG_TPMTOTP=y
|
|||||||
#HOTP based remote attestation for supported USB Security dongle
|
#HOTP based remote attestation for supported USB Security dongle
|
||||||
#With/Without TPM support
|
#With/Without TPM support
|
||||||
CONFIG_HOTPKEY=y
|
CONFIG_HOTPKEY=y
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
||||||
|
|
||||||
#Nitrokey Storage admin tool
|
#Nitrokey Storage admin tool
|
||||||
CONFIG_NKSTORECLI=n
|
CONFIG_NKSTORECLI=n
|
||||||
|
@ -45,6 +45,7 @@ CONFIG_TPMTOTP=y
|
|||||||
#HOTP based remote attestation for supported USB Security dongle
|
#HOTP based remote attestation for supported USB Security dongle
|
||||||
#With/Without TPM support
|
#With/Without TPM support
|
||||||
CONFIG_HOTPKEY=y
|
CONFIG_HOTPKEY=y
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
||||||
|
|
||||||
#Nitrokey Storage admin tool
|
#Nitrokey Storage admin tool
|
||||||
CONFIG_NKSTORECLI=n
|
CONFIG_NKSTORECLI=n
|
||||||
|
@ -44,6 +44,7 @@ CONFIG_TPMTOTP=y
|
|||||||
#HOTP based remote attestation for supported USB Security dongle
|
#HOTP based remote attestation for supported USB Security dongle
|
||||||
#With/Without TPM support
|
#With/Without TPM support
|
||||||
CONFIG_HOTPKEY=y
|
CONFIG_HOTPKEY=y
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
||||||
|
|
||||||
#Nitrokey Storage admin tool
|
#Nitrokey Storage admin tool
|
||||||
CONFIG_NKSTORECLI=n
|
CONFIG_NKSTORECLI=n
|
||||||
|
@ -2,5 +2,6 @@
|
|||||||
include $(pwd)/boards/z220-cmt-maximized/z220-cmt-maximized.config
|
include $(pwd)/boards/z220-cmt-maximized/z220-cmt-maximized.config
|
||||||
|
|
||||||
CONFIG_HOTPKEY=y
|
CONFIG_HOTPKEY=y
|
||||||
|
export CONFIG_AUTO_BOOT_TIMEOUT=5
|
||||||
|
|
||||||
export CONFIG_BOARD_NAME="Hewlett-Packard Z220 Convertible Minitower (HOTP)"
|
export CONFIG_BOARD_NAME="Hewlett-Packard Z220 Convertible Minitower (HOTP)"
|
@ -54,9 +54,14 @@ while true; do
|
|||||||
'J' " $(get_config_display_action "$CONFIG_USE_BLOB_JAIL") Firmware Blob Jail"
|
'J' " $(get_config_display_action "$CONFIG_USE_BLOB_JAIL") Firmware Blob Jail"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Automatic boot
|
||||||
|
dynamic_config_options+=(
|
||||||
|
'M' " Configure automatic boot"
|
||||||
|
)
|
||||||
|
|
||||||
# Basic-only options for automatic boot
|
# Basic-only options for automatic boot
|
||||||
[ "$CONFIG_BASIC" = "y" ] && dynamic_config_options+=(
|
[ "$CONFIG_BASIC" = "y" ] && dynamic_config_options+=(
|
||||||
'A' " $(get_inverted_config_display_action "$CONFIG_BASIC_NO_AUTOMATIC_DEFAULT") automatic default boot"
|
'A' " $(get_inverted_config_display_action "$CONFIG_BASIC_NO_AUTOMATIC_DEFAULT") automatic default boot option"
|
||||||
'U' " $(get_config_display_action "$CONFIG_BASIC_USB_AUTOBOOT") USB automatic boot"
|
'U' " $(get_config_display_action "$CONFIG_BASIC_USB_AUTOBOOT") USB automatic boot"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -401,6 +406,37 @@ while true; do
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
"M" )
|
||||||
|
if [ -z "$CONFIG_AUTO_BOOT_TIMEOUT" ]; then
|
||||||
|
current_msg="Automatic boot is currently disabled."
|
||||||
|
elif [ "$CONFIG_AUTO_BOOT_TIMEOUT" = 1 ]; then
|
||||||
|
current_msg="Currently boots automatically after 1 second."
|
||||||
|
else
|
||||||
|
current_msg="Currently boots automatically after $CONFIG_AUTO_BOOT_TIMEOUT seconds."
|
||||||
|
fi
|
||||||
|
whiptail --title "Automatic Boot" \
|
||||||
|
--menu "$CONFIG_BRAND_NAME can boot automatically. Select the amount of time to wait\nbefore booting.\n\n$current_msg" 0 80 10 \
|
||||||
|
"0" "Don't boot automatically" \
|
||||||
|
"1" "1 second" \
|
||||||
|
"5" "5 seconds" \
|
||||||
|
"10" "10 seconds" \
|
||||||
|
"C" "Cancel" \
|
||||||
|
2>/tmp/whiptail
|
||||||
|
new_setting="$(cat /tmp/whiptail)"
|
||||||
|
if ! [ "$new_setting" = "C" ]; then
|
||||||
|
if [ "$new_setting" = "0" ]; then
|
||||||
|
new_setting= # Empty disables automatic boot
|
||||||
|
current_msg="$CONFIG_BRAND_NAME will not boot automatically."
|
||||||
|
elif [ "$new_setting" = "1" ]; then
|
||||||
|
current_msg="$CONFIG_BRAND_NAME will boot automatically after 1 second."
|
||||||
|
else
|
||||||
|
current_msg="$CONFIG_BRAND_NAME will boot automatically after $new_setting seconds."
|
||||||
|
fi
|
||||||
|
set_user_config "CONFIG_AUTO_BOOT_TIMEOUT" "$new_setting"
|
||||||
|
whiptail --title 'Config change successful' \
|
||||||
|
--msgbox "$current_msg\nSave the config change and reboot for it to go into effect." 0 80
|
||||||
|
fi
|
||||||
|
;;
|
||||||
"A" )
|
"A" )
|
||||||
if [ "$CONFIG_BASIC_NO_AUTOMATIC_DEFAULT" != "y" ]; then
|
if [ "$CONFIG_BASIC_NO_AUTOMATIC_DEFAULT" != "y" ]; then
|
||||||
if (whiptail --title 'Disable automatic default boot?' \
|
if (whiptail --title 'Disable automatic default boot?' \
|
||||||
|
Loading…
Reference in New Issue
Block a user