Compare commits

..

No commits in common. "757ba49d65585efbcfe0c0da8abf545c9a6d0cdd" and "3e183c4b988f5b2e1319787a6615cb07fcdc8e09" have entirely different histories.

9 changed files with 22 additions and 128 deletions

View file

@ -11,7 +11,7 @@ steps:
- name: build - name: build
image: bash image: bash
commands: commands:
- tini -s nix -- develop .#ci -c just -- build - nix develop .#ci -c just -- build
- name: upload - name: upload
image: bash image: bash

View file

@ -5,11 +5,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1717285511, "lastModified": 1714641030,
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", "narHash": "sha256-yzcRNDoyVP7+SCNX0wmuDju1NUCt8Dz9+lyUXEI0dbI=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", "rev": "e5d10a24b66c3ea8f150e47dfdb0416ab7c3390e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -20,11 +20,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1719254875, "lastModified": 1715534503,
"narHash": "sha256-ECni+IkwXjusHsm9Sexdtq8weAq/yUyt1TWIemXt3Ko=", "narHash": "sha256-5ZSVkFadZbFP1THataCaSf0JH2cAH3S29hU9rrxTEqk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2893f56de08021cffd9b6b6dfc70fd9ccd51eb60", "rev": "2057814051972fa1453ddfb0d98badbea9b83c06",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -36,14 +36,14 @@
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1717284937, "lastModified": 1714640452,
"narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=", "narHash": "sha256-QBx10+k6JWz6u7VsohfSw8g8hjdBZEf8CFzXH1/1Z94=",
"type": "tarball", "type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" "url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" "url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz"
} }
}, },
"root": { "root": {

View file

@ -28,11 +28,6 @@
pkgs.cachix pkgs.cachix
pkgs.jq pkgs.jq
pkgs.just pkgs.just
(pkgs.python3.withPackages (py: [
py.PyGithub
py.packaging
]))
pkgs.pyright
]; ];
}; };
}; };

View file

@ -2,7 +2,6 @@
{ {
config, config,
lib, lib,
options,
pkgs, pkgs,
... ...
}: }:
@ -41,14 +40,7 @@ in
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
environment.systemPackages = [ environment.systemPackages = [ pkgs.efibootmgr ];
pkgs.efibootmgr
(x13sPackages.uncompressed-firmware.override {
firmwareFilesList = lib.flatten options.hardware.firmware.definitions;
})
];
environment.pathsToLink = [ "/share/uncompressed-firmware" ];
hardware.enableAllFirmware = true; hardware.enableAllFirmware = true;
hardware.firmware = [ x13sPackages."x13s/extra-firmware" ]; hardware.firmware = [ x13sPackages."x13s/extra-firmware" ];
@ -112,14 +104,6 @@ in
}; };
}; };
# https://github.com/jhovold/linux/wiki/X13s#modem
networking.networkmanager.fccUnlockScripts = [
{
id = "105b:e0c3";
path = "${pkgs.modemmanager}/share/ModemManager/fcc-unlock.available.d/105b";
}
];
nixpkgs.overlays = [ nixpkgs.overlays = [
(_: super: { (_: super: {
# don't try and use zfs # don't try and use zfs
@ -135,12 +119,6 @@ in
# default is performance # default is performance
powerManagement.cpuFreqGovernor = "ondemand"; powerManagement.cpuFreqGovernor = "ondemand";
# https://github.com/jhovold/linux/wiki/X13s#camera
services.udev.extraRules = ''
ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="linux,cma", GROUP="video", MODE="0660"
ACTION=="add", SUBSYSTEM=="dma_heap", KERNEL=="system", GROUP="video", MODE="0660"
'';
systemd.services.bluetooth-x13s-mac = { systemd.services.bluetooth-x13s-mac = {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
before = [ "bluetooth.service" ]; before = [ "bluetooth.service" ];

View file

@ -7,10 +7,10 @@
"owner": "jhovold", "owner": "jhovold",
"repo": "linux" "repo": "linux"
}, },
"branch": "wip/sc8280xp-6.10-rc5", "branch": "wip/sc8280xp-6.9",
"revision": "fb34a1d838d061d9e2199656b832bb2ebc2dc5e3", "revision": "357c0f0c7ad2d7d95a3200b6cfd7bef43299de04",
"url": "https://github.com/jhovold/linux/archive/fb34a1d838d061d9e2199656b832bb2ebc2dc5e3.tar.gz", "url": "https://github.com/jhovold/linux/archive/357c0f0c7ad2d7d95a3200b6cfd7bef43299de04.tar.gz",
"hash": "07gsf26954qi9lspbzlc4xsan4vbiyzbfnpwbwyaxcqfibzfg6vg" "hash": "1n6cv149rafgk7wkb8cjixy6car4zq0dhhz39b7gjnzr599mqwxn"
} }
}, },
"version": 3 "version": 3

View file

@ -15,9 +15,11 @@ let
); );
in in
rec { rec {
linux_jhovold = pkgs.callPackage linux_x13s_pkg { linux_jhovold = linux_jhovold_6_9;
linux_jhovold_6_9 = pkgs.callPackage linux_x13s_pkg {
src = sources.linux-jhovold; src = sources.linux-jhovold;
version = "6.10.0-rc5"; version = "6.9.0";
defconfig = "johan_defconfig"; defconfig = "johan_defconfig";
}; };
@ -25,6 +27,4 @@ rec {
qrtr = pkgs.callPackage ./qrtr { }; qrtr = pkgs.callPackage ./qrtr { };
"x13s/extra-firmware" = pkgs.callPackage ./extra-firmware.nix { }; "x13s/extra-firmware" = pkgs.callPackage ./extra-firmware.nix { };
uncompressed-firmware = pkgs.callPackage ./uncompressed-firmware.nix { };
} }

View file

@ -4,10 +4,10 @@ index 65c4b80..669d9a0 100644
+++ b/pd-mapper.c +++ b/pd-mapper.c
@@ -194,7 +194,7 @@ static int pd_load_map(const char *file) @@ -194,7 +194,7 @@ static int pd_load_map(const char *file)
} }
#ifndef ANDROID #ifndef ANDROID
-#define FIRMWARE_BASE "/lib/firmware/" -#define FIRMWARE_BASE "/lib/firmware/"
+#define FIRMWARE_BASE "/run/current-system/sw/share/uncompressed-firmware/" +#define FIRMWARE_BASE "/run/current-system/firmware/"
#else #else
#define FIRMWARE_BASE "/vendor/firmware/" #define FIRMWARE_BASE "/vendor/firmware/"
#endif #endif

View file

@ -1,24 +0,0 @@
{
runCommand,
buildEnv,
firmwareFilesList ? [ ],
}:
runCommand "qcom-modem-uncompressed-firmware-share"
{
firmwareFiles = buildEnv {
name = "qcom-modem-uncompressed-firmware";
paths = firmwareFilesList;
pathsToLink = [
"/lib/firmware/rmtfs"
"/lib/firmware/qcom"
];
};
}
''
PS4=" $ "
(
set -x
mkdir -p $out/share/
ln -s $firmwareFiles/lib/firmware/ $out/share/uncompressed-firmware
)
''

View file

@ -1,55 +0,0 @@
#!/usr/bin/env python3
from github import Github
import sys
import re
from packaging.version import Version
from subprocess import run
latest_version: str = "0"
latest_branch: str = ""
previous_version: str = ""
with Github() as gh:
for branch in gh.get_user("jhovold").get_repo("linux").get_branches():
v = re.match("wip/sc8280xp-((v?6.[0-9]+)(-rc[0-9]+)?)", branch.name)
if v != None and Version(v.group(1)) > Version(latest_version):
# add .0 to version
latest_version = f"{v.group(2)}.0{v.group(3) or ''}"
latest_branch = v.group(0)
print("branch: " + latest_branch)
print("latest: " + latest_version)
with open("packages/default.nix", "r") as f:
lines = f.readlines()
for line in lines:
v = re.match(r'^\s*version = "(6[.0-9-rc]+)";.*$', line)
if v != None:
previous_version = v.group(1)
print("previous: " + previous_version)
if previous_version == latest_version:
print("No update found, exiting.")
sys.exit(1)
with open("packages/default.nix", "w") as f:
for line in lines:
f.write(
re.sub(
r'^(\s*version = ")6[.0-9-rc]+(";.*$)',
rf"\g<1>{latest_version}\2",
line,
)
)
run(
f"npins add --name linux-jhovold github --branch {latest_branch} jhovold linux".split(
" "
)
)
run("git add npins/ packages/default.nix".split(" "))
run(["git", "commit", "-m", f"jhovold: {previous_version} -> {latest_version}"])