mirror of
https://github.com/samueldr/wip-pinebook-pro.git
synced 2024-11-23 03:19:43 +01:00
overlay: linux*_pinebookpro -> linux*_pinebookpro_latest
This is preparing the stage for the LTS tracking 5.4 soon.
This commit is contained in:
parent
0eb7ee1ea8
commit
4b754f92e7
3 changed files with 76 additions and 70 deletions
|
@ -1,47 +0,0 @@
|
|||
{ stdenv
|
||||
, buildPackages
|
||||
, fetchFromGitLab
|
||||
, perl
|
||||
, buildLinux
|
||||
, modDirVersionArg ? null
|
||||
, ... } @ args:
|
||||
|
||||
let
|
||||
inherit (stdenv.lib)
|
||||
concatStrings
|
||||
intersperse
|
||||
take
|
||||
splitString
|
||||
optionalString
|
||||
;
|
||||
in
|
||||
(
|
||||
buildLinux (args // rec {
|
||||
version = "5.6";
|
||||
|
||||
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
|
||||
modDirVersion = if (modDirVersionArg == null) then concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))) else modDirVersionArg;
|
||||
|
||||
# branchVersion needs to be x.y
|
||||
extraMeta.branch = concatStrings (intersperse "." (take 2 (splitString "." version)));
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.manjaro.org";
|
||||
owner = "tsys";
|
||||
repo = "linux-pinebook-pro";
|
||||
rev = "93293259039d6fc3a725961d42b4f11bfc3f5127";
|
||||
sha256 = "0yrn22j10f3f6hxmbd23ccis35f9s8cbjvzxiyxnsch2zab9349s";
|
||||
};
|
||||
|
||||
postInstall = (optionalString (args ? postInstall) args.postInstall) + ''
|
||||
mkdir -p "$out/nix-support"
|
||||
cp -v "$buildRoot/.config" "$out/nix-support/build.config"
|
||||
'';
|
||||
} // (args.argsOverride or {}))
|
||||
)
|
||||
#).overrideAttrs(args: {
|
||||
# postInstall = (optionalString (args ? postInstall) args.postInstall) + ''
|
||||
# mkdir -p "$out/nix-support"
|
||||
# cp -v "$buildRoot/.config" "$out/nix-support/build.config"
|
||||
# '';
|
||||
#})
|
67
kernel/latest/default.nix
Normal file
67
kernel/latest/default.nix
Normal file
|
@ -0,0 +1,67 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, kernelPatches
|
||||
, buildPackages
|
||||
, fetchFromGitLab
|
||||
, perl
|
||||
, buildLinux
|
||||
, modDirVersionArg ? null
|
||||
, ... } @ args:
|
||||
|
||||
let
|
||||
inherit (stdenv.lib)
|
||||
concatStrings
|
||||
intersperse
|
||||
take
|
||||
splitString
|
||||
optionalString
|
||||
;
|
||||
version = "5.6";
|
||||
additionalConfig = {
|
||||
name = "pinebookpro-config-fixes";
|
||||
patch = null;
|
||||
extraConfig = ''
|
||||
PCIE_ROCKCHIP y
|
||||
PCIE_ROCKCHIP_HOST y
|
||||
PCIE_DW_PLAT y
|
||||
PCIE_DW_PLAT_HOST y
|
||||
PHY_ROCKCHIP_PCIE y
|
||||
PHY_ROCKCHIP_INNO_HDMI y
|
||||
PHY_ROCKCHIP_DP y
|
||||
ROCKCHIP_MBOX y
|
||||
STAGING_MEDIA y
|
||||
VIDEO_HANTRO y
|
||||
VIDEO_HANTRO_ROCKCHIP y
|
||||
USB_DWC2_PCI y
|
||||
ROCKCHIP_LVDS y
|
||||
ROCKCHIP_RGB y
|
||||
'';
|
||||
};
|
||||
in
|
||||
|
||||
buildLinux (args // {
|
||||
inherit version;
|
||||
|
||||
kernelPatches = kernelPatches ++ [
|
||||
additionalConfig
|
||||
];
|
||||
|
||||
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
|
||||
modDirVersion = if (modDirVersionArg == null) then concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))) else modDirVersionArg;
|
||||
|
||||
# branchVersion needs to be x.y
|
||||
extraMeta.branch = concatStrings (intersperse "." (take 2 (splitString "." version)));
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.manjaro.org";
|
||||
owner = "tsys";
|
||||
repo = "linux-pinebook-pro";
|
||||
rev = "93293259039d6fc3a725961d42b4f11bfc3f5127";
|
||||
sha256 = "0yrn22j10f3f6hxmbd23ccis35f9s8cbjvzxiyxnsch2zab9349s";
|
||||
};
|
||||
|
||||
postInstall = (optionalString (args ? postInstall) args.postInstall) + ''
|
||||
mkdir -p "$out/nix-support"
|
||||
cp -v "$buildRoot/.config" "$out/nix-support/build.config"
|
||||
'';
|
||||
} // (args.argsOverride or {}))
|
32
overlay.nix
32
overlay.nix
|
@ -10,33 +10,19 @@ in
|
|||
uBootPinebookProExternalFirst = callPackage ./u-boot {
|
||||
externalFirst = true;
|
||||
};
|
||||
linux_pinebookpro = callPackage ./kernel {
|
||||
|
||||
# The unqualified kernel attr is deprecated.
|
||||
linux_pinebookpro = throw "The linux_pinebookpro attribute has been replaced by linux_pinebookpro_latest.";
|
||||
linuxPackages_pinebookpro = throw "The linuxPackages_pinebookpro attribute has been replaced by linuxPackages_pinebookpro_latest.";
|
||||
|
||||
linux_pinebookpro_latest = callPackage ./kernel/latest {
|
||||
kernelPatches = [
|
||||
kernelPatches.bridge_stp_helper
|
||||
#kernelPatches.export_kernel_fpu_functions
|
||||
{
|
||||
name = "pinebookpro-config-fixes";
|
||||
patch = null;
|
||||
extraConfig = ''
|
||||
PCIE_ROCKCHIP y
|
||||
PCIE_ROCKCHIP_HOST y
|
||||
PCIE_DW_PLAT y
|
||||
PCIE_DW_PLAT_HOST y
|
||||
PHY_ROCKCHIP_PCIE y
|
||||
PHY_ROCKCHIP_INNO_HDMI y
|
||||
PHY_ROCKCHIP_DP y
|
||||
ROCKCHIP_MBOX y
|
||||
STAGING_MEDIA y
|
||||
VIDEO_HANTRO y
|
||||
VIDEO_HANTRO_ROCKCHIP y
|
||||
USB_DWC2_PCI y
|
||||
ROCKCHIP_LVDS y
|
||||
ROCKCHIP_RGB y
|
||||
'';
|
||||
}
|
||||
kernelPatches.export_kernel_fpu_functions."5.3"
|
||||
];
|
||||
};
|
||||
linuxPackages_pinebookpro = linuxPackagesFor final.linux_pinebookpro;
|
||||
linuxPackages_pinebookpro_latest = linuxPackagesFor final.linux_pinebookpro_latest;
|
||||
|
||||
pinebookpro-firmware = callPackage ./firmware {};
|
||||
pinebookpro-keyboard-updater = callPackage ./keyboard-updater {};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue