2021-01-15 15:45:37 +01:00
|
|
|
{ lib, stdenvNoCC, raspberrypifw }:
|
2019-05-09 00:25:22 +02:00
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation {
|
|
|
|
name = "raspberrypi-dtbs-${raspberrypifw.version}";
|
|
|
|
nativeBuildInputs = [ raspberrypifw ];
|
2019-05-15 23:54:20 +02:00
|
|
|
|
|
|
|
# Rename DTBs so u-boot finds them, like linux-rpi.nix
|
2019-05-09 00:25:22 +02:00
|
|
|
buildCommand = ''
|
|
|
|
mkdir -p $out/broadcom/
|
2019-05-15 23:54:20 +02:00
|
|
|
cd $out/broadcom/
|
|
|
|
|
|
|
|
cp ${raspberrypifw}/share/raspberrypi/boot/bcm*.dtb .
|
|
|
|
|
2019-08-17 18:42:22 +02:00
|
|
|
cp bcm2708-rpi-zero-w.dtb bcm2835-rpi-zero-w.dtb
|
2019-05-15 23:54:20 +02:00
|
|
|
cp bcm2708-rpi-b.dtb bcm2835-rpi-a.dtb
|
|
|
|
cp bcm2708-rpi-b.dtb bcm2835-rpi-b.dtb
|
|
|
|
cp bcm2708-rpi-b.dtb bcm2835-rpi-b-rev2.dtb
|
|
|
|
cp bcm2708-rpi-b-plus.dtb bcm2835-rpi-a-plus
|
|
|
|
cp bcm2708-rpi-b-plus.dtb bcm2835-rpi-b-plus
|
|
|
|
cp bcm2708-rpi-b-plus.dtb bcm2835-rpi-zero.dtb
|
|
|
|
cp bcm2708-rpi-cm.dtb bcm2835-rpi-cm.dtb
|
|
|
|
cp bcm2709-rpi-2-b.dtb bcm2836-rpi-2-b.dtb
|
|
|
|
cp bcm2710-rpi-3-b.dtb bcm2837-rpi-3-b.dtb
|
|
|
|
cp bcm2710-rpi-3-b-plus.dtb bcm2837-rpi-3-b-plus.dtb
|
|
|
|
cp bcm2710-rpi-cm3.dtb bcm2837-rpi-cm3.dtb
|
2019-08-17 18:42:22 +02:00
|
|
|
cp bcm2711-rpi-4-b.dtb bcm2838-rpi-4-b.dtb
|
2019-05-09 00:25:22 +02:00
|
|
|
'';
|
2019-05-15 23:54:20 +02:00
|
|
|
|
2019-05-09 00:25:22 +02:00
|
|
|
passthru = {
|
|
|
|
# Compatible overlays that may be used
|
|
|
|
overlays = "${raspberrypifw}/share/raspberrypi/boot/overlays";
|
|
|
|
};
|
2021-01-15 15:45:37 +01:00
|
|
|
meta = with lib; {
|
2020-10-06 20:47:01 +02:00
|
|
|
inherit (raspberrypifw.meta) homepage license;
|
2020-06-30 20:58:30 +02:00
|
|
|
description = "DTBs for the Raspberry Pi";
|
2020-04-08 17:54:58 +02:00
|
|
|
};
|
2019-05-09 00:25:22 +02:00
|
|
|
}
|