From 67ba83a934dc04c5f7bafec2370e9080b9a2de8f Mon Sep 17 00:00:00 2001 From: Drew Hess Date: Thu, 9 Nov 2017 08:28:14 -0800 Subject: [PATCH] kernel: add beagleboard.org kernel And update the existing platform variant to use it --- lib/systems/platforms.nix | 2 +- .../linux/kernel/linux-beagleboard.nix | 25 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 10 ++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 pkgs/os-specific/linux/kernel/linux-beagleboard.nix diff --git a/lib/systems/platforms.nix b/lib/systems/platforms.nix index 9dcd59066d02..fd43ceaa0df2 100644 --- a/lib/systems/platforms.nix +++ b/lib/systems/platforms.nix @@ -462,7 +462,7 @@ rec { beaglebone = armv7l-hf-multiplatform // { name = "beaglebone"; - kernelBaseConfig = "omap2plus_defconfig"; + kernelBaseConfig = "bb.org_defconfig"; kernelAutoModules = false; kernelExtraConfig = ""; # TBD kernel config kernelTarget = "zImage"; diff --git a/pkgs/os-specific/linux/kernel/linux-beagleboard.nix b/pkgs/os-specific/linux/kernel/linux-beagleboard.nix new file mode 100644 index 000000000000..b0d9f04efc84 --- /dev/null +++ b/pkgs/os-specific/linux/kernel/linux-beagleboard.nix @@ -0,0 +1,25 @@ +{ stdenv, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args: + +let + modDirVersion = "4.9.59"; + tag = "r73"; +in +import ./generic.nix (args // rec { + version = "${modDirVersion}-ti-${tag}"; + inherit modDirVersion; + + src = fetchFromGitHub { + owner = "beagleboard"; + repo = "linux"; + rev = "${version}"; + sha256 = "1kzbbaqmzgvfls1v9jir2ck9vcdd774mq474vhr5x6dqjnnb5kg9"; + }; + + kernelPatches = args.kernelPatches; + + features = { + efiBootStub = false; + } // (args.features or {}); + + extraMeta.hydraPlatforms = []; +} // (args.argsOverride or {})) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 17eca4b70c46..33dbb2f596ad 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12414,6 +12414,15 @@ with pkgs; klibcShrunk = lowPrio (callPackage ../os-specific/linux/klibc/shrunk.nix { }); + linux_beagleboard = callPackage ../os-specific/linux/kernel/linux-beagleboard.nix { + kernelPatches = + [ kernelPatches.bridge_stp_helper + kernelPatches.p9_fixes + kernelPatches.cpu-cgroup-v2."4.9" + kernelPatches.modinst_arg_list_too_long + ]; + }; + linux_hardened_copperhead = callPackage ../os-specific/linux/kernel/linux-hardened-copperhead.nix { kernelPatches = with kernelPatches; [ kernelPatches.bridge_stp_helper @@ -12682,6 +12691,7 @@ with pkgs; linux_latest = linuxPackages_latest.kernel; # Build the kernel modules for the some of the kernels. + linuxPackages_beagleboard = linuxPackagesFor pkgs.linux_beagleboard; linuxPackages_hardened_copperhead = linuxPackagesFor pkgs.linux_hardened_copperhead; linuxPackages_mptcp = linuxPackagesFor pkgs.linux_mptcp; linuxPackages_rpi = linuxPackagesFor pkgs.linux_rpi;