Skip to content

Commit cd5b981

Browse files
Add FydeTab Duo
1 parent 3dac8a8 commit cd5b981

File tree

11 files changed

+9894
-0
lines changed

11 files changed

+9894
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ See code for all available configurations.
202202
| [FriendlyARM NanoPC-T4](friendlyarm/nanopc-t4) | `<nixos-hardware/friendlyarm/nanopc-t4>` | `friendlyarm-nanopc-t4` |
203203
| [FriendlyARM NanoPi R5s](friendlyarm/nanopi-r5s) | `<nixos-hardware/friendlyarm/nanopi-r5s>` | `friendlyarm-nanopi-r5s` |
204204
| [Focus M2 Gen 1](focus/m2/gen1) | `<nixos-hardware/focus/m2/gen1>` | `focus-m2-gen1` |
205+
| [FydeTab Duo](fydetab/duo) | `<nixos-hardware/fydetab/duo>` | `fydetab-duo` |
205206
| [Gigabyte B550](gigabyte/b550) | `<nixos-hardware/gigabyte/b550>` | `gigabyte-b550` |
206207
| [Gigabyte B650](gigabyte/b650) | `<nixos-hardware/gigabyte/b650>` | `gigabyte-b650` |
207208
| [GMKtec NucBox G3 Plus](gmktec/nucbox/g3-plus) | `<nixos-hardware/gmktec/nucbox/g3-plus>` | `gmktec-nucbox-g3-plus` |

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@
137137
friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4;
138138
friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s;
139139
focus-m2-gen1 = import ./focus/m2/gen1;
140+
fydetab-duo = import ./fydetab/duo;
140141
gigabyte-b550 = import ./gigabyte/b550;
141142
gigabyte-b650 = import ./gigabyte/b650;
142143
gmktec-nucbox-g3-plus = import ./gmktec/nucbox/g3-plus;

fydetab/duo/ap6275p.nix

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
lib,
3+
stdenv,
4+
fetchFromGitHub,
5+
}:
6+
stdenv.mkDerivation (_finalAttrs: {
7+
pname = "ap6275p-firmware";
8+
version = "2023-11-05";
9+
10+
src = fetchFromGitHub {
11+
owner = "Joshua-Riek";
12+
repo = "firmware";
13+
rev = "621ac45f5d931522bc08b51b995b938778973d2a";
14+
hash = "sha256-ksAOxZTnEka9SirHYxroLMbKi+99FY72X2z1pJhgYnY=";
15+
};
16+
17+
compressFirmware = false;
18+
19+
dontConfigure = true;
20+
dontBuild = true;
21+
22+
installPhase = ''
23+
runHook preInstall
24+
25+
mkdir -p $out/lib/firmware/ap6275p
26+
install -m644 ap6275p/BCM4362A2.hcd $out/lib/firmware/ap6275p/
27+
install -m644 ap6275p/clm_bcm43752a2_pcie_ag.blob $out/lib/firmware/ap6275p/
28+
install -m644 ap6275p/fw_bcm43752a2_pcie_ag.bin $out/lib/firmware/ap6275p/
29+
install -m644 ap6275p/nvram_AP6275P.txt $out/lib/firmware/ap6275p/
30+
install -m644 ap6275p/config.txt $out/lib/firmware/ap6275p/
31+
32+
mv $out/lib/firmware/ap6275p/nvram_AP6275P.txt $out/lib/firmware/ap6275p/nvram_ap6275p.txt
33+
mv $out/lib/firmware/ap6275p/config.txt $out/lib/firmware/ap6275p/config_bcm43752a2_pcie_ag.txt
34+
35+
runHook postInstall
36+
'';
37+
38+
meta = {
39+
description = "Firmware for the AP6275P WiFi/Bluetooth module";
40+
homepage = "https://github.com/Joshua-Riek/firmware";
41+
license = lib.licenses.unfree;
42+
};
43+
})

fydetab/duo/brcm-patchram.nix

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
lib,
3+
stdenv,
4+
fetchurl,
5+
autoPatchelfHook,
6+
}:
7+
stdenv.mkDerivation (_finalAttrs: {
8+
pname = "brcm-patchram-plus";
9+
version = "2024-08-23";
10+
11+
src = fetchurl {
12+
url = "https://github.com/Linux-for-Fydetab-Duo/pkgbuilds/raw/fd5ebe4914f32c5a1c4fc15b4fb5a62bad2da1ea/fydetabduo-post-install/brcm_patchram_plus";
13+
hash = "sha256-fZ1ximZcosZDYbveEkyMnasLWpcifaZ5CKz7QKtqKZQ=";
14+
};
15+
16+
nativeBuildInputs = [
17+
autoPatchelfHook
18+
];
19+
20+
unpackPhase = ''
21+
runHook preUnpack
22+
cp --no-preserve=ownership,mode $src brcm_patchram_plus
23+
chmod +x brcm_patchram_plus
24+
runHook postUnpack
25+
'';
26+
27+
dontConfigure = true;
28+
dontBuild = true;
29+
30+
installPhase = ''
31+
runHook preInstall
32+
33+
mkdir -p $out/bin
34+
cp brcm_patchram_plus $out/bin
35+
autoPatchelf $out/bin/brcm_patchram_plus
36+
37+
runHook postInstall
38+
'';
39+
40+
meta = {
41+
license = lib.licenses.unfree;
42+
mainProgram = "brcm_patchram_plus";
43+
};
44+
})

0 commit comments

Comments
 (0)