From c841c3e2c6117549c320faba8ac45e1ca1df4602 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Mon, 10 Sep 2018 00:15:51 -0400 Subject: linux_rpi: add support for Raspberry Pi 3 --- pkgs/os-specific/linux/kernel/linux-rpi.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'pkgs/os-specific/linux/kernel/linux-rpi.nix') diff --git a/pkgs/os-specific/linux/kernel/linux-rpi.nix b/pkgs/os-specific/linux/kernel/linux-rpi.nix index d061e41eb2f..26fb595ad59 100644 --- a/pkgs/os-specific/linux/kernel/linux-rpi.nix +++ b/pkgs/os-specific/linux/kernel/linux-rpi.nix @@ -18,6 +18,7 @@ stdenv.lib.overrideDerivation (buildLinux (args // rec { defconfig = { "armv6l-linux" = "bcmrpi_defconfig"; "armv7l-linux" = "bcm2709_defconfig"; + "aarch64-linux" = "bcmrpi3_defconfig"; }.${stdenv.hostPlatform.system} or (throw "linux_rpi not supported on '${stdenv.hostPlatform.system}'"); features = { @@ -31,9 +32,17 @@ stdenv.lib.overrideDerivation (buildLinux (args // rec { sed -i $buildRoot/.config -e 's/^CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=""/' ''; - postFixup = '' - # Make copies of the DTBs named after the upstream names so that U-Boot finds them. - # This is ugly as heck, but I don't know a better solution so far. + # Make copies of the DTBs named after the upstream names so that U-Boot finds them. + # This is ugly as heck, but I don't know a better solution so far. + postFixup = if stdenv.hostPlatform.system == "aarch64-linux" then '' + rm $out/dtbs/broadcom/bcm283*.dtb + copyDTB() { + cp -v "$out/dtbs/broadcom/$1" "$out/dtbs/broadcom/$2" + } + + copyDTB bcm2710-rpi-3-b.dtb bcm2837-rpi-3-b.dtb + copyDTB bcm2710-rpi-3-b-plus.dtb bcm2837-rpi-3-b-plus.dtb + '' else '' rm $out/dtbs/bcm283*.dtb copyDTB() { cp -v "$out/dtbs/$1" "$out/dtbs/$2" -- cgit 1.4.1