Unverified Commit adc17a61 authored by Robert Kovacsics's avatar Robert Kovacsics
Browse files

rpiboot: Fix bootfiles location (use INSTALL_PREFIX)

Since
https://github.com/raspberrypi/usbboot/commit/0952ce01e1d42a59aeaccb998a58b840393740b3
the rpiboot package doesn't hard-code the path, but uses INSTALL_PREFIX,
so we should use that to properly configure the default location for the
bootfiles.
parent 09647892
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -22,15 +22,10 @@ stdenv.mkDerivation rec {
  buildInputs = [ libusb1 ];
  nativeBuildInputs = [ pkg-config ];

  patchPhase = ''
    sed -i "s@/usr/@$out/@g" main.c
  '';
  makeFlags = [ "INSTALL_PREFIX=$(out)" ];

  installPhase = ''
  preInstall = ''
    mkdir -p $out/bin
    mkdir -p $out/share/rpiboot
    cp rpiboot $out/bin
    cp -r msd firmware eeprom-erase mass-storage-gadget* recovery* secure-boot* rpi-eeprom rpi-imager-embedded $out/share/rpiboot
  '';

  passthru.updateScript = gitUpdater { };