mirror of
https://github.com/linuxboot/heads.git
synced 2025-01-07 05:28:46 +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
350 B
Bash
Executable File
17 lines
350 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Set the EC BRAM setting for automatic power-on.
|
|
# If $1 is 'y', enable automatic power-on. Otherwise, disable it.
|
|
|
|
# EC BRAM bank 1
|
|
BRAMADDR=0x360
|
|
BRAMDATA=0x361
|
|
|
|
outb "$BRAMADDR" 0x29 # Select byte at offset 29h
|
|
if [ "$1" = "y" ]; then
|
|
outb "$BRAMDATA" 0x00 # 0 -> automatic power-on
|
|
else
|
|
outb "$BRAMDATA" 0x01 # 1 -> stay off
|
|
fi
|
|
|