2023-03-02 09:43:49 +00:00
|
|
|
# Based on https://github.com/Snektron/nixos-vf2/blob/master/pkgs/linux-vf2.nix
|
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
2023-07-08 09:25:37 +00:00
|
|
|
linuxManualConfig,
|
2023-03-02 09:43:49 +00:00
|
|
|
fetchpatch,
|
2023-07-08 09:25:37 +00:00
|
|
|
applyPatches,
|
2023-03-02 09:43:49 +00:00
|
|
|
...
|
|
|
|
} @ args: let
|
2023-07-08 09:25:37 +00:00
|
|
|
modDirVersion = "6.4.0";
|
2023-03-02 09:43:49 +00:00
|
|
|
source = builtins.fromJSON (builtins.readFile ./source.json);
|
|
|
|
in
|
2023-07-08 09:25:37 +00:00
|
|
|
linuxManualConfig ({
|
2023-06-25 15:58:48 +00:00
|
|
|
inherit modDirVersion;
|
|
|
|
version = "${modDirVersion}-vf2";
|
2023-03-02 09:43:49 +00:00
|
|
|
|
2023-07-08 09:25:37 +00:00
|
|
|
src = applyPatches {
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "starfive-tech";
|
|
|
|
repo = "linux";
|
|
|
|
inherit (source) rev sha256;
|
|
|
|
};
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "axp15060-1.patch";
|
2023-06-25 15:58:48 +00:00
|
|
|
url = "https://lore.kernel.org/all/20230524000012.15028-2-andre.przywara@arm.com/raw";
|
|
|
|
hash = "sha256-kj4vQaT4CV29EHv8MtuTgM/semIPDdv2dmveo/X27vU=";
|
2023-07-08 09:25:37 +00:00
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
name = "axp15060-2.patch";
|
2023-06-25 15:58:48 +00:00
|
|
|
url = "https://lore.kernel.org/all/20230524000012.15028-3-andre.przywara@arm.com/raw";
|
|
|
|
hash = "sha256-QCPQyKqoapMtqEDB9QgAuXA7n8e1OtG+YlIgeSQBxXM=";
|
2023-07-08 09:25:37 +00:00
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
name = "axp15060-3.patch";
|
2023-06-25 15:58:48 +00:00
|
|
|
url = "https://lore.kernel.org/all/20230524000012.15028-4-andre.przywara@arm.com/raw";
|
|
|
|
hash = "sha256-SpKDm4PXR6qs7kX5SGVpFF/EPBijMhX1NsFUHrlCynM=";
|
2023-07-08 09:25:37 +00:00
|
|
|
})
|
|
|
|
];
|
2023-06-25 15:58:48 +00:00
|
|
|
};
|
2023-03-02 09:43:49 +00:00
|
|
|
|
2023-07-08 09:25:37 +00:00
|
|
|
configfile = ./vf2.config;
|
2023-06-16 05:40:20 +00:00
|
|
|
|
2023-06-25 15:58:48 +00:00
|
|
|
extraMeta = {
|
|
|
|
branch = "JH7110_VisionFive2_upstream";
|
|
|
|
description = "Linux kernel for StarFive's VisionFive2";
|
|
|
|
platforms = ["riscv64-linux"];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
// (args.argsOverride or {}))
|