mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-19 04:57:55 +00:00
e9a5b27e6c
PureBoot doesn't have any other three-valued settings and this doesn't present very well in the config UI. Instead make this a two-valued setting; drop the mode that forces the EC setting to "stay off" at every boot because this is the default. When disabling automatic power-on, disable the EC BRAM setting too. Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
17 lines
566 B
Bash
Executable File
17 lines
566 B
Bash
Executable File
#!/bin/bash
|
|
set -o pipefail
|
|
|
|
. /tmp/config
|
|
|
|
# If CONFIG_AUTOMATIC_POWERON is set, always set the EC BRAM setting during
|
|
# boot. It persists as long as the RTC battery is set, but set it during every
|
|
# boot for robustness in case the battery is temporarily removed, or the user
|
|
# toggles in config-gui and then does not flash, etc.
|
|
if [ "$CONFIG_AUTOMATIC_POWERON" = "y" ]; then
|
|
set_ec_poweron.sh y
|
|
fi
|
|
|
|
# Don't disable the setting in the EC BRAM though if CONFIG_AUTOMATIC_POWERON
|
|
# is not enabled. The default is disabled anyway, and the OS could configure
|
|
# it.
|