2022-12-25 07:33:24 +00:00
|
|
|
{ stdenv
|
|
|
|
, ubootRaspberryPi4_64bit
|
|
|
|
, raspberrypifw
|
|
|
|
, raspberrypi-armstubs
|
|
|
|
}:
|
2022-06-29 04:10:50 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-06-29 08:14:46 +00:00
|
|
|
pname = "bootpart-u-boot-rpi-aarch64";
|
2022-06-29 04:10:50 +00:00
|
|
|
version = "1";
|
|
|
|
|
2022-12-25 07:33:24 +00:00
|
|
|
buildInputs = [
|
2022-06-29 04:10:50 +00:00
|
|
|
ubootRaspberryPi4_64bit
|
|
|
|
raspberrypifw # for bootcode.bin, *.dat, *.elf, *.dtb
|
|
|
|
raspberrypi-armstubs # for armstub*
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
src = ./config.txt;
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
2022-12-25 07:33:24 +00:00
|
|
|
installPhase = ''
|
2022-06-29 04:10:50 +00:00
|
|
|
mkdir "$out"
|
|
|
|
cp ${ubootRaspberryPi4_64bit}/u-boot.bin "$out"/
|
2022-06-29 08:14:46 +00:00
|
|
|
cp ${ubootRaspberryPi4_64bit}/*.dtb "$out"/
|
|
|
|
# NB: raspberrypifw dtb's are meant for the kernel, not for u-boot
|
|
|
|
# cp -R ${raspberrypifw}/share/raspberrypi/boot/*.dtb "$out"/
|
2022-06-29 04:10:50 +00:00
|
|
|
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" ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|