From cb8db9e1bb2801fb1cd520d7bc9776117e597a73 Mon Sep 17 00:00:00 2001 From: Andrea Ciceri Date: Fri, 8 Apr 2022 10:58:58 +0200 Subject: [PATCH] New source for `ap6256-firmware` and removed unstable kernel --- pine64/pinebook-pro/default.nix | 2 +- .../firmware/ap6256-firmware/default.nix | 14 +++--- pine64/pinebook-pro/kernel/default.nix | 50 ------------------- pine64/pinebook-pro/overlay.nix | 5 +- 4 files changed, 8 insertions(+), 63 deletions(-) delete mode 100644 pine64/pinebook-pro/kernel/default.nix diff --git a/pine64/pinebook-pro/default.nix b/pine64/pinebook-pro/default.nix index a570d6e..799596c 100644 --- a/pine64/pinebook-pro/default.nix +++ b/pine64/pinebook-pro/default.nix @@ -74,7 +74,7 @@ hardware.enableRedistributableFirmware = true; hardware.firmware = [ - pkgs.pinebookpro-ap6256-firmware + (pkgs.callPackage ./firmware/ap6256-firmware { }) ]; systemd.tmpfiles.rules = [ diff --git a/pine64/pinebook-pro/firmware/ap6256-firmware/default.nix b/pine64/pinebook-pro/firmware/ap6256-firmware/default.nix index 3d10f04..2c66766 100644 --- a/pine64/pinebook-pro/firmware/ap6256-firmware/default.nix +++ b/pine64/pinebook-pro/firmware/ap6256-firmware/default.nix @@ -1,16 +1,14 @@ { lib -, fetchFromGitLab -, fetchurl +, fetchFromGitHub , runCommandNoCC }: let - src = fetchFromGitLab { - domain = "gitlab.manjaro.org"; - owner = "manjaro-arm"; - repo = "packages/community/ap6256-firmware"; - rev = "007c6dd132263624db9ea6ce8dde4fc2108f21b7"; - sha256 = "sha256-Agqz05W7Rhl0NNQwpW4aQqs9YZmYyci9OXKzEKA30uk="; + src = fetchFromGitHub { + owner = "nix-community"; + repo = "rkwifibt"; + rev = "421b7dd8f3c67f66910710838a0be03f3575a3c9"; + sha256 = "175qcjfaz7nhpyh0hxiih53k3hly407lkpxgissvldghxrw01ccn"; }; in runCommandNoCC "pinebookpro-ap6256-firmware" diff --git a/pine64/pinebook-pro/kernel/default.nix b/pine64/pinebook-pro/kernel/default.nix deleted file mode 100644 index 72880ea..0000000 --- a/pine64/pinebook-pro/kernel/default.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ pkgs, ... }: - -let - pinnedNixpkgs = import - (builtins.fetchTarball { - name = "nixos-unstable-2022-03-28"; - url = "https://github.com/nixos/nixpkgs/archive/ce8cbe3c01fd8ee2de526ccd84bbf9b82397a510.tar.gz"; - sha256 = "19xfad7pxsp6nkrkjhn36w77w92m60ysq7njn711slw74yj6ibxv"; - }) - { - system = "aarch64-linux"; - }; - - patches = [ - "3170-arm64-dts-rk3399-pinebook-pro-Fix-USB-PD-charging.patch" - "3172-arm64-dts-rk3399-pinebook-pro-Improve-Type-C-support.patch" - "3174-arm64-dts-rk3399-pinebook-pro-Remove-redundant-pinct.patch" - "3178-arm64-dts-rk3399-pinebook-pro-Don-t-allow-usb2-phy-d.patch" - "3339-drm-rockchip-cdn-dp-Disable-CDN-DP-on-disconnect.patch" - "3355-usb-typec-fusb302-Set-the-current-before-enabling-pu.patch" - "3359-usb-typec-fusb302-Update-VBUS-state-even-if-VBUS-int.patch" - "3361-usb-typec-fusb302-Add-OF-extcon-support.patch" - "3362-usb-typec-fusb302-Fix-register-definitions.patch" - "3363-usb-typec-fusb302-Clear-interrupts-before-we-start-t.patch" - "3364-usb-typec-typec-extcon-Add-typec-extcon-bridge-drive.patch" - "3365-phy-rockchip-typec-Make-sure-the-plug-orientation-is.patch" - "3372-phy-rockchip-inno-usb2-More-robust-charger-detection.patch" - "3373-usb-typec-extcon-Don-t-touch-charger-proprties.patch" - ]; - - manjaro-patches = pinnedNixpkgs.fetchgit { - url = "https://gitlab.manjaro.org/manjaro-arm/packages/core/linux.git"; - rev = "d68667dfeb33a40a1ee5d6563ff4815e57ed9084"; - sha256 = "04wb8nx5yw1r044i2cnd1dy4fc7whgn343iid0gqmyg5rk1ack2v"; - }; - - create-patch = p: { - name = p; - patch = "${manjaro-patches}/${p}"; - }; - - manjaro-kernel = pinnedNixpkgs.linuxPackagesFor (pinnedNixpkgs.linuxKernel.kernels.linux_5_16.override { - argsOverride = rec { - kernelPatches = map create-patch patches; - }; - }); -in -{ - inherit unstable-manjaro-kernel; -} diff --git a/pine64/pinebook-pro/overlay.nix b/pine64/pinebook-pro/overlay.nix index d540d72..8d140f0 100644 --- a/pine64/pinebook-pro/overlay.nix +++ b/pine64/pinebook-pro/overlay.nix @@ -1,11 +1,8 @@ final: super: let - inherit (final) callPackage kernelPatches linuxPackagesFor; - kernels = callPackage ./kernel { }; + inherit (final) callPackage; in { - pinebookpro-unstable-manjaro-kernel = kernels.manjaro-kernel; - pinebookpro-ap6256-firmware = callPackage ./firmware/ap6256-firmware { }; pinebookpro-keyboard-updater = callPackage ./keyboard-updater { }; }