uefi stuff

This commit is contained in:
mjallen18
2026-01-07 12:44:33 -06:00
parent e15d62d03a
commit 59121cf43b
2 changed files with 23 additions and 19 deletions

View File

@@ -3,7 +3,27 @@
stdenvNoCC,
fetchurl,
}:
let
defaultConfig = ''
EOF
armstub=RPI_EFI.fd
device_tree_address=0x3e0000
device_tree_end=0x400000
# Force 32 bpp framebuffer allocation.
framebuffer_depth=32
# Disable compensation for displays with overscan.
disable_overscan=1
# Force maximum USB power regardless of the power supply.
usb_max_current_enable=1
# Force maximum CPU speed.
force_turbo=1
EOF
'';
in
stdenvNoCC.mkDerivation rec {
pname = "uefi-rpi5";
version = "test1";
@@ -25,24 +45,8 @@ stdenvNoCC.mkDerivation rec {
runHook preInstall
mkdir -p "$out"
cp -rv "$src" "$out"
cat > "$out/config.txt" <<'EOF'
armstub=RPI_EFI.fd
device_tree_address=0x3e0000
device_tree_end=0x400000
# Force 32 bpp framebuffer allocation.
framebuffer_depth=32
# Disable compensation for displays with overscan.
disable_overscan=1
# Force maximum USB power regardless of the power supply.
usb_max_current_enable=1
# Force maximum CPU speed.
force_turbo=1
EOF
cp -rv "$src" "$out/RPI_EFI.fd"
cat > "$out/config.txt" << ${defaultConfig}
runHook postInstall
'';

View File

@@ -10,7 +10,7 @@
# bootloader = "kernel";
# firmwarePackage = pkgs.raspberrypifw;
# };
kernelPackages = pkgs.unstable.linuxPackages_latest;
kernelPackages = pkgs.${namespace}.linux-rpi5;
supportedFilesystems = lib.mkForce [ ];
};