mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
linux-rpi: 4.1.20-XXX -> 4.4.13-1.20160620-1
- Add a patch to unset CONFIG_LOCALVERSION in the v7 build. - Copy all the device trees to match the upstream names so U-Boot can find them. (This is a hack.)
This commit is contained in:
parent
44955a73b2
commit
55aecd308e
@ -1,21 +1,47 @@
|
||||
{ stdenv, fetchurl, perl, buildLinux, ... } @ args:
|
||||
{ stdenv, fetchFromGitHub, perl, buildLinux, ... } @ args:
|
||||
|
||||
let
|
||||
modDirVersion = "4.4.13";
|
||||
tag = "1.20160620-1";
|
||||
in
|
||||
stdenv.lib.overrideDerivation (import ./generic.nix (args // rec {
|
||||
version = "${modDirVersion}-${tag}";
|
||||
inherit modDirVersion;
|
||||
|
||||
rev = "f4b20d47d7df7927967fcd524324b145cfc9e2f9";
|
||||
|
||||
in import ./generic.nix (args // rec {
|
||||
version = "4.1.y-${rev}";
|
||||
|
||||
modDirVersion = "4.1.20-v7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://api.github.com/repos/raspberrypi/linux/tarball/${rev}";
|
||||
name = "linux-raspberrypi-${version}.tar.gz";
|
||||
sha256 = "0x17hlbi7lpmmnp24dnkync5gzj57j84j0nlrcv1lv9fahjkqsm2";
|
||||
src = fetchFromGitHub {
|
||||
owner = "raspberrypi";
|
||||
repo = "linux";
|
||||
rev = "raspberrypi-kernel_${tag}";
|
||||
sha256 = "0bydlzmd9mar07j6dihhzn1xm6vpn92y33vf1qsdkl3hjil6brfc";
|
||||
};
|
||||
|
||||
features.iwlwifi = true;
|
||||
|
||||
extraMeta.hydraPlatforms = [];
|
||||
})) (oldAttrs: {
|
||||
postConfigure = ''
|
||||
# The v7 defconfig has this set to '-v7' which screws up our modDirVersion.
|
||||
sed -i $buildRoot/.config -e 's/^CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION=""/'
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# Make copies of the DTBs so that U-Boot finds them, as it is looking for the upstream names.
|
||||
# This is ugly as heck.
|
||||
copyDTB() {
|
||||
if [ -f "$out/dtbs/$1" ]; then
|
||||
cp -v "$out/dtbs/$1" "$out/dtbs/$2"
|
||||
fi
|
||||
}
|
||||
|
||||
# I am not sure if all of these are correct...
|
||||
copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-a.dtb
|
||||
copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-b.dtb
|
||||
copyDTB bcm2708-rpi-b.dtb bcm2835-rpi-b-rev2.dtb
|
||||
copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-a-plus.dtb
|
||||
copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-b-plus.dtb
|
||||
copyDTB bcm2708-rpi-b-plus.dtb bcm2835-rpi-zero.dtb
|
||||
copyDTB bcm2708-rpi-cm.dtb bcm2835-rpi-cm.dtb
|
||||
copyDTB bcm2709-rpi-2-b.dtb bcm2836-rpi-2-b.dtb
|
||||
copyDTB bcm2710-rpi-3-b.dtb bcm2837-rpi-3-b.dtb
|
||||
'';
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user