mirror of
https://codeberg.org/mart-w/nixos-x13s.git
synced 2024-11-21 23:04:47 +01:00
enable kernel selection support
This commit is contained in:
parent
b05262f882
commit
5a4384c71b
|
@ -16,7 +16,7 @@ jobs:
|
||||||
|
|
||||||
- name: build all
|
- name: build all
|
||||||
run: |
|
run: |
|
||||||
OUTPUT=$(nix build --print-out-paths .#x13s/linux .#x13s/alsa-ucm-conf .#pd-mapper .#x13s/extra-firmware)
|
OUTPUT=$(nix build --print-out-paths .#linux_jhovold .#linux_steev .#x13s/alsa-ucm-conf .#pd-mapper .#x13s/extra-firmware)
|
||||||
echo $OUTPUT
|
echo $OUTPUT
|
||||||
echo "$OUTPUT" > build.out
|
echo "$OUTPUT" > build.out
|
||||||
|
|
||||||
|
|
19
module.nix
19
module.nix
|
@ -10,7 +10,14 @@ let
|
||||||
x13sPackages = import ./packages/default.nix { inherit lib pkgs; };
|
x13sPackages = import ./packages/default.nix { inherit lib pkgs; };
|
||||||
|
|
||||||
dtbName = "sc8280xp-lenovo-thinkpad-x13s.dtb";
|
dtbName = "sc8280xp-lenovo-thinkpad-x13s.dtb";
|
||||||
linuxPackages_x13s = pkgs.linuxPackagesFor x13sPackages."x13s/linux";
|
linuxPackages_x13s = pkgs.linuxPackagesFor (
|
||||||
|
if cfg.kernel == "jhovold" then
|
||||||
|
x13sPackages.linux_jhovold
|
||||||
|
else if cfg.kernel == "steev" then
|
||||||
|
x13sPackages.linux_steev
|
||||||
|
else
|
||||||
|
pkgs.linuxPackages_latest
|
||||||
|
);
|
||||||
dtb = "${linuxPackages_x13s.kernel}/dtbs/qcom/${dtbName}";
|
dtb = "${linuxPackages_x13s.kernel}/dtbs/qcom/${dtbName}";
|
||||||
|
|
||||||
alsa-ucm-conf-env.ALSA_CONFIG_UCM2 = "${x13sPackages."x13s/alsa-ucm-conf"}/share/alsa/ucm2";
|
alsa-ucm-conf-env.ALSA_CONFIG_UCM2 = "${x13sPackages."x13s/alsa-ucm-conf"}/share/alsa/ucm2";
|
||||||
|
@ -23,6 +30,16 @@ in
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "mac address to set on boot";
|
description = "mac address to set on boot";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
kernel = lib.mkOption {
|
||||||
|
type = lib.types.enum [
|
||||||
|
"jhovold"
|
||||||
|
"mainline"
|
||||||
|
"steev"
|
||||||
|
];
|
||||||
|
description = "which patched kernel to use. jhovold is the latest RC, steev is the latest patched release, and mainline is nixos latest";
|
||||||
|
default = "jhovold";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
"url": "https://api.github.com/repos/alsa-project/alsa-ucm-conf/tarball/v1.2.11",
|
"url": "https://api.github.com/repos/alsa-project/alsa-ucm-conf/tarball/v1.2.11",
|
||||||
"hash": "1jcn0x6bbg69p1ygxnh1zn33sd9lpbll4bnhvkzw1fjpmw7igjkz"
|
"hash": "1jcn0x6bbg69p1ygxnh1zn33sd9lpbll4bnhvkzw1fjpmw7igjkz"
|
||||||
},
|
},
|
||||||
"linux": {
|
"linux-jhovold": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "GitHub",
|
"type": "GitHub",
|
||||||
|
@ -25,6 +25,18 @@
|
||||||
"revision": "00a0ee0018ac61ec4c93536f27916ff40cfe7a99",
|
"revision": "00a0ee0018ac61ec4c93536f27916ff40cfe7a99",
|
||||||
"url": "https://github.com/jhovold/linux/archive/00a0ee0018ac61ec4c93536f27916ff40cfe7a99.tar.gz",
|
"url": "https://github.com/jhovold/linux/archive/00a0ee0018ac61ec4c93536f27916ff40cfe7a99.tar.gz",
|
||||||
"hash": "115yra3w4a0f4aprjb8n5gpq4xc8j7h3kql18z755jii5gd49qfr"
|
"hash": "115yra3w4a0f4aprjb8n5gpq4xc8j7h3kql18z755jii5gd49qfr"
|
||||||
|
},
|
||||||
|
"linux-steev": {
|
||||||
|
"type": "Git",
|
||||||
|
"repository": {
|
||||||
|
"type": "GitHub",
|
||||||
|
"owner": "steev",
|
||||||
|
"repo": "linux"
|
||||||
|
},
|
||||||
|
"branch": "lenovo-x13s-linux-6.7.y",
|
||||||
|
"revision": "45411854bb931cb5c989e00ded127d4fc68dfa01",
|
||||||
|
"url": "https://github.com/steev/linux/archive/45411854bb931cb5c989e00ded127d4fc68dfa01.tar.gz",
|
||||||
|
"hash": "19wa6ihmjp748vj5qqzy1kqz4bhxy4k81v90kbca9y15l6waqm6q"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": 3
|
"version": 3
|
||||||
|
|
|
@ -3,39 +3,30 @@ let
|
||||||
sources = import ../npins;
|
sources = import ../npins;
|
||||||
|
|
||||||
linux_x13s_pkg =
|
linux_x13s_pkg =
|
||||||
{ buildLinux, ... }@args:
|
{ version, buildLinux, ... }@args:
|
||||||
let
|
|
||||||
version = "6.8.0-rc5";
|
|
||||||
modDirVersion = "${version}";
|
|
||||||
in
|
|
||||||
buildLinux (
|
buildLinux (
|
||||||
args
|
args
|
||||||
// {
|
// {
|
||||||
inherit version modDirVersion;
|
modDirVersion = version;
|
||||||
|
|
||||||
src = sources.linux;
|
kernelPatches = (args.kernelPatches or [ ]) ++ [ ];
|
||||||
|
|
||||||
kernelPatches = (args.kernelPatches or [ ]) ++ [
|
|
||||||
# {
|
|
||||||
# # fix resets when reading EFI vars
|
|
||||||
# name = "qcom-shm-bridge-tz";
|
|
||||||
# patch = (
|
|
||||||
# pkgs.fetchurl {
|
|
||||||
# url = "https://lore.kernel.org/lkml/20240205182810.58382-1-brgl@bgdev.pl/t.mbox.gz";
|
|
||||||
# hash = "sha256-MeuDkVFSf/KqzcD92wR6U9yOJhOKmZkXsgGcOm/9l/k=";
|
|
||||||
# }
|
|
||||||
# );
|
|
||||||
# extraStructuredConfig = {
|
|
||||||
# QCOM_TZMEM_MODE_SHMBRIDGE = lib.kernel.yes;
|
|
||||||
# };
|
|
||||||
# }
|
|
||||||
];
|
|
||||||
extraMeta.branch = lib.versions.majorMinor version;
|
extraMeta.branch = lib.versions.majorMinor version;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
"x13s/linux" = pkgs.callPackage linux_x13s_pkg { defconfig = "johan_defconfig"; };
|
linux_jhovold = pkgs.callPackage linux_x13s_pkg {
|
||||||
|
src = sources.linux-jhovold;
|
||||||
|
version = "6.8.0-rc5";
|
||||||
|
defconfig = "johan_defconfig";
|
||||||
|
};
|
||||||
|
|
||||||
|
linux_steev = pkgs.callPackage linux_x13s_pkg {
|
||||||
|
src = sources.linux-steev;
|
||||||
|
version = "6.7.5";
|
||||||
|
defconfig = "laptop_defconfig";
|
||||||
|
};
|
||||||
|
|
||||||
"x13s/alsa-ucm-conf" = pkgs.alsa-ucm-conf.overrideAttrs (
|
"x13s/alsa-ucm-conf" = pkgs.alsa-ucm-conf.overrideAttrs (
|
||||||
_: {
|
_: {
|
||||||
version = sources.alsa-ucm-conf.version;
|
version = sources.alsa-ucm-conf.version;
|
||||||
|
|
Loading…
Reference in a new issue