38 lines
1.0 KiB
Nix
38 lines
1.0 KiB
Nix
|
{ stdenv, pkgs }:
|
||
|
|
||
|
stdenv.mkDerivation rec {
|
||
|
pname = "bootpart-tow-boot-rpi-aarch64";
|
||
|
version = "1";
|
||
|
|
||
|
buildInputs = with pkgs; [
|
||
|
tow-boot-rpi4 # for Tow-Boot.*.bin
|
||
|
raspberrypifw # for bootcode.bin, *.dat, *.elf, *.dtb
|
||
|
raspberrypi-armstubs # for armstub*
|
||
|
|
||
|
];
|
||
|
|
||
|
src = ./config.txt;
|
||
|
|
||
|
dontUnpack = true;
|
||
|
|
||
|
installPhase = with pkgs; ''
|
||
|
mkdir "$out"
|
||
|
cp ${tow-boot-rpi4}/Tow-Boot.noenv.*.bin "$out"/
|
||
|
cp -R ${raspberrypifw}/share/raspberrypi/boot/*.dtb "$out"/
|
||
|
cp -R ${raspberrypifw}/share/raspberrypi/boot/*.bin "$out"/
|
||
|
cp -R ${raspberrypifw}/share/raspberrypi/boot/*.dat "$out"/
|
||
|
cp -R ${raspberrypifw}/share/raspberrypi/boot/*.img "$out"/
|
||
|
cp -R ${raspberrypifw}/share/raspberrypi/boot/*.elf "$out"/
|
||
|
cp -R ${raspberrypifw}/share/raspberrypi/boot/overlays "$out"/
|
||
|
cp ${raspberrypi-armstubs}/* "$out"/
|
||
|
cp ${src} "$out"/config.txt
|
||
|
'';
|
||
|
|
||
|
|
||
|
meta = {
|
||
|
description = "unmanaged files to place in /boot on a raspberry pi system";
|
||
|
platforms = [ "aarch64-linux" ];
|
||
|
};
|
||
|
}
|
||
|
|