set uefi nvram for convenience

This commit is contained in:
mjallen18
2026-01-09 13:19:29 -06:00
parent 0483ea8a67
commit 994fddba66

View File

@@ -23,8 +23,21 @@ let
# Force maximum CPU speed.
force_turbo=1
dtoverlay=vc4-kms-v3d-pi5.dtbo
dtoverlay=i2c0-pi5.dtbo
dtoverlay=i2c1-pi5.dtbo
dtoverlay=i2c2-pi5.dtbo
dtoverlay=i2c3-pi5.dtbo
dtoverlay=pisound-pi5.dtbo
dtoverlay=sdio-pi5.dtbo
dtoverlay=disable-wifi-pi5.dtbo
EOF
'';
nvram = ./nvram-block.bin;
in
stdenvNoCC.mkDerivation rec {
pname = "uefi-rpi5";
@@ -42,12 +55,26 @@ stdenvNoCC.mkDerivation rec {
dontBuild = true;
# Firmware blobs do not need fixing and should not be modified
dontFixup = true;
# fixupPhase = ''
# runHook preFixup
# dd if=${nvram} of="$src/RPI_EFI.fd" \
# bs=1 seek=$((0x1d0060)) count=$((0x11c0)) conv=notrunc
# runHook postFixup
# '';
installPhase = ''
runHook preInstall
mkdir -p "$out"
cp -rv "$src" "$out/RPI_EFI.fd"
cp ${src} .
dd if=${nvram} of=./RPI_EFI.fd \
bs=1 seek=$((0x1d0060)) count=$((0x11c0)) conv=notrunc
cp -v ./RPI_EFI.fd "$out/RPI_EFI.fd"
cat > "$out/config.txt" << ${defaultConfig}
runHook postInstall