kgpe: allow to configure recovery nvram values

On amd64 platforms, booting ownerboot with the recovery jumper
installed will wipe the battery-backed nvram (aka "cmos" aka "rtc
nvram") and overwrite it with known-safe values taken from the
coreboot source code (`src/mainboard/asus/kgpe-d16/cmos.default`).

You should always do this when flashing a motherboard with ownerboot
for the first time.

This commit allows the user to customize the set of known-safe
values which are written when the recovery jumper is installed.  To
do so, copy `src/mainboard/asus/kgpe-d16/cmos.default` out of
coreboot, edit to suit your tastes, and then override
`cmos-defaults` with the path to your customized `cmos.default`
file.
master
Adam Joseph 2 years ago
parent 25bf9f95e0
commit 516b86434a

@ -33,6 +33,16 @@
# insecure configurations? (63xx without microcode)
microcode-blob = null;
# This contains the default values written into the
# battery-backed nvram when you boot with the recovery jumper
# installed (which is something you should do the first time you
# boot with ownerboot/coreboot). If you want to customize these
# values, copy `src/mainboard/asus/kgpe-d16/cmos.default` out of
# coreboot and edit to suit your tastes.
#
# TODO: use a NixOS-style structuredConfig for this.
cmos-default = null;
coreboot = final.lib.makeOverridable (prev.coreboot.override {
iasl = final.iasl_20180531;
payload = "${final.kernel}/bzImage";
@ -52,6 +62,8 @@
3rdparty/blobs/cpu/amd/family_15h/microcode_amd_fam15h.bin
mkdir -p 3rdparty/blobs/cpu/amd/family_10h-family_14h/
touch 3rdparty/blobs/cpu/amd/family_10h-family_14h/microcode_amd.bin
'' + final.lib.optionalString (final.cmos-default != null) ''
cp ${final.cmos-default} src/mainboard/asus/kgpe-d16/cmos.default
'';
postInstall = (a.postInstall or "") + ''
cp src/mainboard/asus/kgpe-d16/cmos.layout $out/

Loading…
Cancel
Save