57 lines
1.2 KiB
Nix
57 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
stdenvNoCC,
|
|
fetchurl,
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
pname = "uefi-rpi5";
|
|
version = "test1";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/NumberOneGit/rpi5-uefi/releases/download/${version}/RPI_EFI.fd";
|
|
hash = "sha256-GIgru10KCol9PXcdgR2d1BHf2In07OQ2P1kru7GUupY=";
|
|
};
|
|
|
|
sourceRoot = ".";
|
|
|
|
dontUnpack = true;
|
|
|
|
dontBuild = true;
|
|
# Firmware blobs do not need fixing and should not be modified
|
|
dontFixup = true;
|
|
|
|
installPhase = ''
|
|
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
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "RPI5 UEFI firmware";
|
|
homepage = "https://github.com/NumberOneGit/rpi5-uefi";
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ ];
|
|
};
|
|
}
|