This commit is contained in:
mjallen18
2026-01-02 20:30:05 -06:00
parent b7380317b9
commit 56154fe941
38 changed files with 1188 additions and 594 deletions

View File

@@ -1,38 +1,56 @@
{
lib,
stdenvNoCC,
fetchzip,
fetchurl,
}:
stdenvNoCC.mkDerivation rec {
pname = "uefi-rpi5";
version = "0.3";
version = "test1";
src= fetchzip {
url = "https://github.com/worproject/rpi5-uefi/releases/download/v${version}/RPi5_UEFI_Release_v${version}.zip";
stripRoot = false;
hash = "sha256-bjEvq7KlEFANnFVL0LyexXEeoXj7rHGnwQpq09PhIb0=";
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/firmware"
mkdir -p "$out"
cp -rv "${src}" "$out/firmware"
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/pftf/RPi4";
homepage = "https://github.com/NumberOneGit/rpi5-uefi";
platforms = platforms.linux;
maintainers = with maintainers; [ ];
};
}
}