mirror of
https://github.com/samueldr/wip-pinebook-pro.git
synced 2025-01-08 09:59:47 +01:00
pinebookpro-firmware -> pinebookpro-ap6256-firmware
And updated to what nhp uses in their releases.
This commit is contained in:
parent
074924d57c
commit
316059eebb
3 changed files with 42 additions and 36 deletions
41
firmware/ap6256-firmware.nix
Normal file
41
firmware/ap6256-firmware.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ lib
|
||||
, fetchFromGitLab
|
||||
, fetchurl
|
||||
, runCommandNoCC
|
||||
}:
|
||||
|
||||
let
|
||||
nhp = patch: sha256: let rev = "c74b23b8766e4cfc50d1197e6dcd08cc1625866f"; in fetchurl {
|
||||
url = "https://raw.githubusercontent.com/nadiaholmquist/pbp-packages/${rev}/ap6256-firmware/${patch}";
|
||||
inherit sha256;
|
||||
};
|
||||
in
|
||||
runCommandNoCC "pinebookpro-ap6256-firmware" {
|
||||
meta = with lib; {
|
||||
license = licenses.unfreeRedistributable;
|
||||
};
|
||||
} ''
|
||||
(PS4=" $ "; set -x
|
||||
|
||||
cp ${(nhp "BCM4345C5.hcd" "1vl3gkgdqdlhyg9dyflqi6icglr2pll6zr82147g69pfvp6ckv96")} "BCM4345C5.hcd"
|
||||
cp ${(nhp "fw_bcm43456c5_ag.bin" "03qqgzjz152zaj9y0ppqqsqs03yzi8sb71rfvr29zc1xg1x74y3r")} "fw_bcm43456c5_ag.bin"
|
||||
cp ${(nhp "brcmfmac43456-sdio.clm_blob" "0bi5y3qkqx95c6bb872slw0kig14c453r33j14qyb2f7id8m08lf")} "brcmfmac43456-sdio.clm_blob"
|
||||
cp ${(nhp "nvram_ap6256.txt" "1zsnswiiwx50pbwl8574xa7z07v9iyfajxccbfrnc8ap99gzpvj3")} "nvram_ap6256.txt"
|
||||
|
||||
mkdir -p $out/lib/firmware/brcm
|
||||
|
||||
# https://github.com/nadiaholmquist/pbp-packages/blob/ded66e50064c55a56a958558ab35bc6bae444e72/ap6256-firmware/PKGBUILD#L22
|
||||
# Bluetooth firmware
|
||||
install -Dm644 "BCM4345C5.hcd" -t "$out/lib/firmware/"
|
||||
install -Dm644 "BCM4345C5.hcd" "$out/lib/firmware/brcm/BCM.hcd"
|
||||
install -Dm644 "BCM4345C5.hcd" -t "$out/lib/firmware/brcm/"
|
||||
# Wifi firmware
|
||||
install -Dm644 "nvram_ap6256.txt" -t "$out/lib/firmware/"
|
||||
install -Dm644 "fw_bcm43456c5_ag.bin" "$out/lib/firmware/brcm/brcmfmac43456-sdio.bin"
|
||||
install -Dm644 "brcmfmac43456-sdio.clm_blob" "$out/lib/firmware/brcm/brcmfmac43456-sdio.clm_blob"
|
||||
install -Dm644 "nvram_ap6256.txt" "$out/lib/firmware/brcm/brcmfmac43456-sdio.radxa,rockpi4b.txt"
|
||||
install -Dm644 "nvram_ap6256.txt" "$out/lib/firmware/brcm/brcmfmac43456-sdio.radxa,rockpi4c.txt"
|
||||
install -Dm644 "nvram_ap6256.txt" "$out/lib/firmware/brcm/brcmfmac43456-sdio.pine64,pinebook-pro.txt"
|
||||
install -Dm644 "nvram_ap6256.txt" "$out/lib/firmware/brcm/brcmfmac43456-sdio.pine64,rockpro64-v2.1.txt"
|
||||
)
|
||||
''
|
|
@ -1,35 +0,0 @@
|
|||
{ stdenv
|
||||
, fetchFromGitLab
|
||||
, runCommandNoCC
|
||||
}:
|
||||
|
||||
let
|
||||
pinebook-firmware = fetchFromGitLab {
|
||||
domain = "gitlab.manjaro.org";
|
||||
owner = "tsys";
|
||||
repo = "pinebook-firmware";
|
||||
rev = "937f0d52d27d7712da6a008d35fd7c2819e2b077";
|
||||
sha256 = "0qldxxlxk6f3gymkljphwy7dz3cl1gxsnijhng2l7rkrh7h6wgi2";
|
||||
};
|
||||
ap6256-firmware = fetchFromGitLab {
|
||||
domain = "gitlab.manjaro.org";
|
||||
owner = "manjaro-arm";
|
||||
repo = "packages%2Fcommunity%2Fap6256-firmware";
|
||||
rev = "a30bf312b268eab42d38fab0cc3ed3177895ff5d";
|
||||
sha256 = "14gyb99j85xw07wrr9lilb1jz68y6r0n0b6x4ldl7d6igs988qwb";
|
||||
};
|
||||
in
|
||||
runCommandNoCC "pinebookpro-firmware-2020-02-08" {
|
||||
meta = with stdenv.lib; {
|
||||
license = licenses.unfreeRedistributable;
|
||||
};
|
||||
} ''
|
||||
(PS4=" $ "; set -x
|
||||
mkdir -p $out/lib/firmware/{brcm,rockchip}
|
||||
(cd ${ap6256-firmware}
|
||||
cp -fv *.hcd *blob *.bin *.txt $out/lib/firmware/brcm/
|
||||
)
|
||||
cp -fv ${pinebook-firmware}/brcm/* $out/lib/firmware/brcm/
|
||||
cp -fv ${pinebook-firmware}/rockchip/* $out/lib/firmware/rockchip/
|
||||
)
|
||||
''
|
|
@ -21,6 +21,6 @@ in
|
|||
linux_pinebookpro_lts = callPackage ./kernel/lts { kernelPatches = []; };
|
||||
linuxPackages_pinebookpro_lts = linuxPackagesFor final.linux_pinebookpro_lts;
|
||||
|
||||
pinebookpro-firmware = callPackage ./firmware {};
|
||||
pinebookpro-ap6256-firmware = callPackage ./firmware/ap6256-firmware.nix {};
|
||||
pinebookpro-keyboard-updater = callPackage ./keyboard-updater {};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue