14 stdenvNoCC.mkDerivation (finalAttrs: {
15 pname = "raspberrypi-eeprom";
16 version = "2024.09.23-2712";
18 src = fetchFromGitHub {
19 owner = "raspberrypi";
21 rev = "refs/tags/v${finalAttrs.version}";
22 hash = "sha256-5qqcHMoRT5XfhIX392j4Q1DcKjYGq6NMqy1VrWxg5+4=";
25 buildInputs = [ python3 ];
26 nativeBuildInputs = [ makeWrapper ];
29 # Don't try to verify md5 signatures from /var/lib/dpkg and
30 # fix path to the configuration.
31 substituteInPlace rpi-eeprom-update \
32 --replace 'IGNORE_DPKG_CHECKSUMS=''${LOCAL_MODE}' 'IGNORE_DPKG_CHECKSUMS=1' \
33 --replace '/etc/default' '/etc'
38 cp rpi-eeprom-config rpi-eeprom-update rpi-eeprom-digest "$out/bin"
40 mkdir -p "$out/lib/firmware/raspberrypi"
41 for dirname in firmware-*; do
42 dirname_suffix="''${dirname/#firmware-}"
43 cp -rP "$dirname" "$out/lib/firmware/raspberrypi/bootloader-$dirname_suffix"
48 patchShebangs $out/bin
49 for i in rpi-eeprom-update rpi-eeprom-config; do
50 wrapProgram $out/bin/$i \
51 --set FIRMWARE_ROOT "$out/lib/firmware/raspberrypi/bootloader" \
52 ${lib.optionalString stdenvNoCC.hostPlatform.isAarch64 "--set VCMAILBOX ${libraspberrypi}/bin/vcmailbox"} \
53 --prefix PATH : "${lib.makeBinPath ([
61 ] ++ lib.optionals stdenvNoCC.hostPlatform.isAarch64 [
68 description = "Installation scripts and binaries for the closed sourced Raspberry Pi 4 and 5 bootloader EEPROMs";
69 homepage = "https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-4-boot-eeprom";
70 license = with licenses; [ bsd3 unfreeRedistributableFirmware ];
71 maintainers = with maintainers; [ das_j Luflosi ];
72 platforms = platforms.linux;