2023-03-25 14:49:15 +00:00
|
|
|
#!/bin/bash
|
2022-11-28 20:17:02 +00:00
|
|
|
set -o pipefail
|
|
|
|
|
|
|
|
. /tmp/config
|
|
|
|
|
2023-03-25 14:49:15 +00:00
|
|
|
# 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.
|
2022-11-28 20:17:02 +00:00
|
|
|
if [ "$CONFIG_AUTOMATIC_POWERON" = "y" ]; then
|
2023-03-25 14:49:15 +00:00
|
|
|
set_ec_poweron.sh y
|
2022-11-28 20:17:02 +00:00
|
|
|
fi
|
2023-03-25 14:49:15 +00:00
|
|
|
|
|
|
|
# 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.
|