Compare commits

...
Author SHA1 Message Date
Naïm Camille Favier 46edafb09a framework-13-amd-ai-300-series: disable ALSA UCM profiles by default
https://github.com/NixOS/nixos-hardware/issues/1603
2026-01-14 18:04:42 +01:00
Florian Klink efe2094529 Merge pull request #1730 from flokli/pocket-iio
gpd/pocket-{3,4}: enable IIO
2026-01-14 13:29:35 +00:00
Florian Klink 316a132d5f gpd/pocket-{3,4}: enable IIO
Enables screen auto rotation.
2026-01-14 12:30:30 +02:00
Jörg Thalheim 40b1a28dce Merge pull request #1712 from dniku/patch-1
Revise README for AMD AI 300 Series modules
2025-12-31 12:48:04 +00:00
Dmitry 6388e5a77b Address stylistic suggestions 2025-12-31 09:59:50 +00:00
Dmitry 838481adb5 Update README for nix-shell command usage 2025-12-30 11:34:29 +00:00
Dmitry d31d8077bb Revise README for AMD AI 300 Series modules
Updated README to reflect changes in module recommendations and added instructions for hybrid graphics setup.
2025-12-30 11:34:29 +00:00
Jörg Thalheim 9b3c38bf6c Merge pull request #1714 from NixOS/track-prepped-68-Corolla-master
Adding Asus flow z13 2023 gz301vu support
2025-12-30 04:56:31 +00:00
track-prepped-68-Corolla 736df904de Adding Asus flow z13 2023 gz301vu support 2025-12-30 04:43:30 +00:00
Jörg Thalheim 84185d1de4 Merge pull request #1713 from NixOS/razer-blade-14-RZ09-0530
add razer-blade-14-RZ09-0530
2025-12-30 04:41:49 +00:00
Jörg Thalheim 59a4cb7b82 Merge pull request #1704 from ducnguyen96/feat/add-lenovo-thinkpad-e14-gen2
feat: add Lenovo ThinkPad E14 (Intel - Gen 2)
2025-12-30 04:36:02 +00:00
Adriel Velazquez 64e8049770 Adding the razer blade 14 2025 2025-12-30 04:29:13 +00:00
Jörg Thalheim 7a9a613a3e Merge pull request #1709 from alirezamirsepassi/patch-1
audio(framework-13-amd-ai-300): update default rawDeviceName
2025-12-30 04:25:07 +00:00
Jörg Thalheim 2da033befd Merge pull request #1707 from ryantrinkle/framework-amd-ai-300-graphics-refresh-bug
framework-16-amd-ai-300-series: mitigate various graphics issues
2025-12-30 04:24:24 +00:00
Alireza Mirsepassi 59761f9b5e audio(framework-13-amd-ai-300): update default rawDeviceName
Update the default `rawDeviceName` for the Framework 13 AMD AI 300 series.
Recent UCM profile updates (or kernel driver changes) now cause the device
to expose a HiFi profile sink name (`HiFi__Speaker__sink`) instead of the
generic `analog-stereo` name.

This ensures the audio enhancement effects correctly attach to the speaker
sink out of the box.

Device name changed from:
`alsa_output.pci-0000_c1_00.6.analog-stereo`
to:
`alsa_output.pci-0000_c1_00.6.HiFi__Speaker__sink`
2025-12-27 16:10:22 +01:00
Ryan Trinkle 26043a0950 framework-16-amd-ai-300-series: mitigate various graphics issues 2025-12-25 20:45:22 -04:00
Jörg Thalheim c5db9569ac Merge pull request #1705 from leifhelm/mnt-reform
Mnt reform: Update kernel from 6.17.2 to 6.17.8
2025-12-24 09:34:15 +00:00
Jakob Leifhelm 26e2f6b7d5 mnt/reform: kernel 6.17.2 -> 6.17.8 2025-12-23 23:12:28 +01:00
Jakob Leifhelm cebe2d7105 mnt/reform: use mkDefault for the kernel 2025-12-23 23:11:14 +01:00
ducnguyen96 fdbadf6273 feat: add Lenovo ThinkPad E14 (Intel - Gen 2) 2025-12-22 09:42:22 +07:00
Arian van Putten 9154f4569b Merge pull request #1627 from arianvp/altrad8ud-1l2t
Add ASRock Rack ALTRAD8UD-1L2T
2025-11-29 18:25:30 +00:00
Arian van Putten d7e4ed37ce Add ASRock Rack ALTRAD8UD-1L2T 2025-11-29 13:10:26 +01:00
Jörg Thalheim d62603a997 Merge pull request #1684 from NixOS/framework-16-amd-ai-300-nvidia
framework-16-amd-ai-300-series: add nvidia submodule
2025-11-28 11:10:24 +00:00
Jörg ThalheimandDaniel Schaefer fd83b9479c framework-16-amd-ai-300-series: add nvidia submodule
Add a dedicated submodule for Framework Laptop 16 AMD AI 300 Series with
NVIDIA dGPU (RTX 5070). This provides hybrid graphics configuration with
PRIME offload, allowing the AMD iGPU to run by default for better battery
life while making the NVIDIA dGPU available on demand via nvidia-offload.

Exposed as nixosModules.framework-16-amd-ai-300-series-nvidia

Co-authored-by: Daniel Schaefer <dhs@frame.work>
2025-11-28 11:57:31 +01:00
Jörg Thalheim 00e9525fb6 Merge pull request #1688 from 8bitbuddhist/surface-fix-hash
microsoft/surface: fix invalid hash
2025-11-27 18:48:16 +00:00
Andre 083fd1136b microsoft/surface: fix invalid hash 2025-11-26 13:08:45 -05:00
Jörg Thalheim da17006633 Merge pull request #1681 from 8bitbuddhist/surface-kernel-simplify
microsoft/surface: simplify patch pulling
2025-11-25 14:13:59 +00:00
Jörg Thalheim 63564a6dcc Merge pull request #1682 from NixOS/dependabot/github_actions/actions/checkout-6
build(deps): bump actions/checkout from 5 to 6
2025-11-25 14:13:28 +00:00
Andre ae4fcae923 microsoft/surface: flatten 'repos' object 2025-11-24 17:47:45 -05:00
dependabot[bot] 3e2ce03650 build(deps): bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 02:00:56 +00:00
Andre abb5f782d3 microsoft/surface: change logic to pull the latest linux-surface for all versions, since we really just need the patches. 2025-11-23 13:20:08 -05:00
Jörg Thalheim 899dc449bc Merge pull request #1669 from zatrit/t480-kaby-lake
lenovo/thinkpad/t480: replaced cpu/intel with cpu/intel/kaby-lake
2025-11-11 07:47:33 +00:00
Jörg Thalheim e279a579b1 Merge pull request #1670 from robot-o/lenovo-legion-16iax10h
lenovo/legion/16iax10h: add Lenovo Legion Pro 7i
2025-11-11 07:47:18 +00:00
Jörg Thalheim 27973e0f41 Merge pull request #1671 from leifhelm/mnt-reform
Fix and update kernel. Update uboot
2025-11-11 07:44:54 +00:00
Jakob Leifhelm 238316ce44 mnt-reform: Format 2025-11-09 11:31:44 +01:00
Jakob Leifhelm 6ae02e4ebd mnt-reform: Add name parameter to kernel patches 2025-11-09 11:25:40 +01:00
Jakob Leifhelm a31d53a0b2 mnt-reform: Add uboot flash script 2025-11-09 11:25:35 +01:00
robot-o 81c78cffb9 lenovo/legion/16iax10h: add Lenovo Legion Pro 7i 2025-11-08 21:15:31 +01:00
Jakob Leifhelm 20baaa0d68 mnt-reform: uboot remove x86 dependency 2025-11-08 10:53:01 +01:00
Jakob Leifhelm 9fbdc8cbdb mnt-reform: Update kernel to 6.17.2 2025-11-08 10:51:57 +01:00
zatrit ef813e4370 lenovo/thinkpad/t480: replaced cpu/intel with cpu/intel/kaby-lake 2025-11-08 11:33:26 +03:00
Jörg Thalheim 52113c4f5c Merge pull request #1668 from concatime/fix/rename-modules
Rename some modules to their correct names
2025-11-06 21:07:11 +00:00
Issam E. Maghni fc4c7c6ec7 meta: rename module to pcie-brcmstb
https://github.com/torvalds/linux/blob/v6.17/drivers/pci/controller/Makefile#L37
2025-11-06 15:05:04 -05:00
Issam E. Maghni 744975050f meta: rename module to usb-storage
https://github.com/torvalds/linux/blob/v6.17/drivers/usb/storage/Kconfig#L23-L24
> To compile this driver as a module, choose M here: the
> module will be called usb-storage.
2025-11-06 15:05:04 -05:00
Jörg Thalheim 24084931d8 Merge pull request #1661 from HyprGirl/master
asus/zephyrus/ga401iv: init
2025-11-06 11:05:22 +00:00
Jörg Thalheim 3e24540eb9 Merge pull request #1663 from concatime/feat/add-only-wireless-firmwares
raspberry-pi/4: add only wireless firmwares
2025-11-06 11:04:51 +00:00
Jörg Thalheim bd47664211 Merge pull request #1667 from concatime/feat/add-genet-module-to-initrd-if-netboot
raspberry-pi/4: add genet module to initrd if netboot
2025-11-06 11:04:33 +00:00
Jörg Thalheim be02d168e7 Merge pull request #1657 from NixOS/no-instantiate
speed up ci
2025-11-06 11:03:32 +00:00
Jörg Thalheim f34ca8045a mnt/reform: stop doing ifd 2025-11-06 11:27:57 +01:00
Jörg Thalheim ec18896955 librem/5r4/u-boot: update and use newer compiler 2025-11-06 11:21:16 +01:00
Jörg Thalheim 64269645d4 star64: add missing names to kernel patches 2025-11-06 11:14:48 +01:00
Jörg Thalheim d1ad892e3b helios4: add missing names to kernel patches 2025-11-06 11:14:03 +01:00
Issam E. Maghni ec135126c1 raspberry-pi/4: add genet module to initrd if netboot
This module is required to have Ethernet in initial RAM disk.

It solves the issue encountered in this thread:
https://discourse.nixos.org/t/netboot-into-nfs-root-instead-of-the-fat-netboot-ramdisk/8556/2
2025-11-05 19:31:43 -05:00
Jörg Thalheim e4c6ee69e7 Merge pull request #1666 from brianmcgillion/update-imx8
imx8-evk: fix cross-compiled builds
2025-11-05 19:41:19 +00:00
Brian McGillion ae91411396 imx8-evk: fix cross-compiled builds
update just to fix the cross compilation.

Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
2025-11-05 16:35:23 +04:00
Jörg Thalheim d48e8f0e16 Merge pull request #1665 from brianmcgillion/fix-system-property
system: fix the system setting for nixpkgs
2025-11-05 09:50:57 +00:00
Brian McGillion eea20ba3b0 system: fix the system setting for nixpkgs
https://github.com/NixOS/nixpkgs/commit/90cb7876446bf1684ffe40ab7832de0ec1b92991

Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
2025-11-05 13:20:53 +04:00
Issam E. Maghni 2a3a409ac5 raspberry-pi/4: add only wireless firmwares 2025-11-04 15:28:35 -05:00
Jörg Thalheim 2e85ae1b70 Merge pull request #1662 from NixOS/nxp-docs
nxp: document flashing better
2025-11-04 14:44:00 +00:00
Jörg Thalheim 8b72f74d80 nxp: add upstream docs 2025-11-04 15:27:28 +01:00
Jörg Thalheim 655a6da8a8 nxp: document flash procedure and expose images in flake 2025-11-04 13:35:34 +01:00
Jörg Thalheim bffe23e699 Merge pull request #1650 from govindsi/feat/ucm-imx95-platform
Add support for UCM-iMX95 Evaluation Kit platform
2025-11-04 12:19:19 +00:00
Jörg Thalheim 01e8e18d9d format flake.nix after nixpkgs bump 2025-11-04 13:04:34 +01:00
Jörg Thalheim 5ad68c5dff tests: add all aarch64 NXP boards to aarch64Systems list 2025-11-04 12:57:21 +01:00
Jörg Thalheim fad92f5f57 ucm-imx95: expand pkgs in callPackage for overrides 2025-11-04 12:57:21 +01:00
Jörg Thalheim f2e49f279c optee-builder: use stdenv as opposed to gccStdenv
should be the same in our use case, but stdenv is more standard.
2025-11-04 12:34:11 +01:00
Romana d60ba4a306 Merge branch 'NixOS:master' into master 2025-11-03 22:54:14 +00:00
Romana 5723dff2cd add ga401iv to readme and flake.nix 2025-11-03 19:59:38 +01:00
Jörg Thalheim 2567706185 Merge pull request #1660 from afreakk/patch-1
'runCommandNoCC' has been renamed to/replaced by 'runCommand'
2025-11-03 14:13:01 +00:00
Romana 5e6ecb961a asus-zephyrus-ga401iv: Add config for 2020 model of ga401 2025-11-03 03:45:34 +01:00
Jörg Thalheim 7467f155fc Merge pull request #1555 from imxade/imxade-patch-1
[Inspiron 3442] Removed enableAllFirmware, BT doesn't rely on it
2025-10-31 17:53:41 +00:00
Rituraj ddb27b7bba Merge branch 'master' into imxade-patch-1 2025-10-31 21:51:27 +05:30
Hans 13cc234e37 'runCommandNoCC' has been renamed to/replaced by 'runCommand' 2025-10-31 09:54:49 +01:00
Jörg Thalheim f6299de29d bump nixpkgs 2025-10-30 14:29:33 +01:00
Jörg Thalheim caacab410f speed up ci: run nix-eval-jobs with no-instantiate 2025-10-30 14:07:00 +01:00
Rituraj 37d0301b3c Removed enableAllFirmware, BT doesn't rely on it 2025-07-26 18:13:24 +05:30
72 changed files with 1170 additions and 249 deletions

No files matched your search

+2 -2
View File
@@ -9,13 +9,13 @@ jobs:
nixfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: cachix/install-nix-action@v31
- run: nix build .#checks.x86_64-linux.formatting
tests:
needs: nixfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: cachix/install-nix-action@v31
- run: nix run .#run-tests
+7 -1
View File
@@ -109,6 +109,7 @@ See code for all available configurations.
| [Asus ROG Ally RC71L (2023)](asus/ally/rc71l) | `<nixos-hardware/asus/ally/rc71l>` | `asus-ally-rc71l` |
| [Asus ROG Flow X13 GV302X\* (2023)](asus/flow/gv302x/amdgpu) | `<nixos-hardware/asus/flow/gv302x/amdgpu>` | `asus-flow-gv302x-amdgpu` |
| [Asus ROG Flow X13 GV302X\* (2023)](asus/flow/gv302x/nvidia) | `<nixos-hardware/asus/flow/gv302x/nvidia>` | `asus-flow-gv302x-nvidia` |
| [Asus ROG Flow Z13 gz301vu\* (2023)](asus/flow/gz301vu) | `<nixos-hardware/asus/flow/gz301vu>` | `asus-flow-gz301vu` |
| [Asus ROG GL552VW](asus/rog-gl552vw) | `<nixos-hardware/asus/rog-gl552vw>` | `asus-rog-gl552vw` |
| [Asus ROG Strix G513IM](asus/rog-strix/g513im) | `<nixos-hardware/asus/rog-strix/g513im>` | `asus-rog-strix-g513im` |
| [Asus ROG Strix G533ZW](asus/rog-strix/g533zw) | `<nixos-hardware/asus/rog-strix/g533zw>` | `asus-rog-strix-g533zw` |
@@ -116,7 +117,8 @@ See code for all available configurations.
| [Asus ROG Strix G713IE](asus/rog-strix/g713ie) | `<nixos-hardware/asus/rog-strix/g713ie>` | `asus-rog-strix-g713ie` |
| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `<nixos-hardware/asus/rog-strix/g733qs>` | `asus-rog-strix-g733qs` |
| [Asus ROG Strix X570-E GAMING](asus/rog-strix/x570e) | `<nixos-hardware/asus/rog-strix/x570e>` | `asus-rog-strix-x570e` |
| [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `<nixos-hardware/asus/zephyrus/ga401>` | `asus-zephyrus-ga401` |
| [Asus ROG Zephyrus G14 GA401IV (2020)](asus/zephyrus/ga401iv) | `<nixos-hardware/asus/zephyrus/ga401iv>` | `asus-zephyrus-ga401iv` |
| [Asus ROG Zephyrus G14 GA401 (2021)](asus/zephyrus/ga401) | `<nixos-hardware/asus/zephyrus/ga401>` | `asus-zephyrus-ga401` |
| [Asus ROG Zephyrus G14 GA402](asus/zephyrus/ga402) | `<nixos-hardware/asus/zephyrus/ga402>` | `asus-zephyrus-ga402` |
| [Asus ROG Zephyrus G14 GA402X\* (2023)](asus/zephyrus/ga402x/amdgpu) | `<nixos-hardware/asus/zephyrus/ga402x/amdgpu>` | `asus-zephyrus-ga402x-amdgpu` |
| [Asus ROG Zephyrus G14 GA402X\* (2023)](asus/zephyrus/ga402x/nvidia) | `<nixos-hardware/asus/zephyrus/ga402x/nvidia>` | `asus-zephyrus-ga402x-nvidia` |
@@ -134,6 +136,7 @@ See code for all available configurations.
| [Asus Zenbook Flip S13 UX371](asus/zenbook/ux371/) | `<nixos-hardware/asus/zenbook/ux371>` | `asus-zenbook-ux371` |
| [Asus Zenbook Pro 15 UX535](asus/zenbook/ux535/) | `<nixos-hardware/asus/zenbook/ux535>` | `asus-zenbook-ux535` |
| [Asus Zenbook Pro 17 UM6702](asus/zenbook/um6702/) | `<nixos-hardware/asus/zenbook/um6702>` | `asus-zenbook-um6702` |
| [Asrock Rack ALTRAD8UD-1L2T](asrock-rack/altrad8ud-1l2t) | `<nixos-hardware/asrock-rack/altrad8ud-1l2t>` | `asrock-rack-altrad8ud-1l2t` |
| [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `<nixos-hardware/beagleboard/pocketbeagle>` | `beagleboard-pocketbeagle` |
| [Chuwi MiniBook X](chuwi/minibook-x) | `<nixos-hardware/chuwi/minibook-x>` | `chuwi-minibook-x` |
| [Deciso DEC series](deciso/dec) | `<nixos-hardware/deciso/dec>` | `deciso-dec` |
@@ -263,6 +266,7 @@ See code for all available configurations.
| [Lenovo Legion 7 16achg6 (Nvidia)](lenovo/legion/16achg6/nvidia) | `<nixos-hardware/lenovo/legion/16achg6/nvidia>` | `lenovo-legion-16achg6-nvidia` |
| [Lenovo Legion 7i Pro 16irx8h (Intel)](lenovo/legion/16irx8h) | `<nixos-hardware/lenovo/legion/16irx8h>` | `lenovo-legion-16irx8h` |
| [Lenovo Legion 7 Pro 16irx9h (Intel)](lenovo/legion/16irx9h) | `<nixos-hardware/lenovo/legion/16irx9h>` | `lenovo-legion-16irx9h` |
| [Lenovo Legion Pro 7 16iax10h (Intel)](lenovo/legion/16iax10h) | `<nixos-hardware/lenovo/legion/16iax10h>` | `lenovo-legion-16iax10h` |
| [Lenovo Legion Slim 5](lenovo/legion/16aph8/) | `<nixos-hardware/lenovo/legion/16aph8>` | `lenovo-legion-16aph8` |
| [Lenovo Legion Slim 7 Gen 7 (AMD)](lenovo/legion/16arha7/) | `<nixos-hardware/lenovo/legion/16arha7>` | `lenovo-legion-16arha7` |
| [Lenovo Legion T5 AMR5](lenovo/legion/t526amr5) | `<nixos-hardware/lenovo/legion/t526amr5>` | `lenovo-legion-t526amr5` |
@@ -271,6 +275,7 @@ See code for all available configurations.
| [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `<nixos-hardware/lenovo/thinkpad/e14/amd>` | `lenovo-thinkpad-e14-amd` |
| [Lenovo ThinkPad E14 (Intel - Gen 1)](lenovo/thinkpad/e14/intel) | `<nixos-hardware/lenovo/thinkpad/e14/intel>` | `lenovo-thinkpad-e14-intel` |
| [Lenovo ThinkPad E14 (Intel - Gen 4)](lenovo/thinkpad/e14/intel/gen4) | `<nixos-hardware/lenovo/thinkpad/e14/intel/gen4>` | `lenovo-thinkpad-e14-intel-gen4` |
| [Lenovo ThinkPad E14 (Intel - Gen 2)](lenovo/thinkpad/e14/intel/gen2) | `<nixos-hardware/lenovo/thinkpad/e14/intel/gen2>` | `lenovo-thinkpad-e14-intel-gen2` |
| [Lenovo ThinkPad E14 (Intel - Gen 6)](lenovo/thinkpad/e14/intel/gen6) | `<nixos-hardware/lenovo/thinkpad/e14/intel/gen6>` | `lenovo-thinkpad-e14-intel-gen6` |
| [Lenovo ThinkPad E15 (Intel)](lenovo/thinkpad/e15/intel) | `<nixos-hardware/lenovo/thinkpad/e15/intel>` | `lenovo-thinkpad-e15-intel` |
| [Lenovo ThinkPad E470](lenovo/thinkpad/e470) | `<nixos-hardware/lenovo/thinkpad/e470>` | `lenovo-thinkpad-e470` |
@@ -418,6 +423,7 @@ See code for all available configurations.
| [Radxa ROCK 5 Model B](radxa/rock-5b) | `<nixos-hardware/radxa/rock-5b>` | `rock-5b` |
| [Radxa ROCK Pi 4](radxa/rock-pi-4) | `<nixos-hardware/radxa/rock-pi-4>` | `rock-pi-4` |
| [Radxa ROCK Pi E](radxa/rock-pi-e) | `<nixos-hardware/radxa/rock-pi-e>` | `rock-pi-e` |
| [Razer Blade 14 (RZ09-0530)](razer/blade/14/RZ09-0530) | `<nixos-hardware/razer/blade/14/RZ09-0530>` | `razer-blade-14-RZ09-0530` |
| [Raspberry Pi 2](raspberry-pi/2) | `<nixos-hardware/raspberry-pi/2>` | `raspberry-pi-2` |
| [Raspberry Pi 3](raspberry-pi/3) | `<nixos-hardware/raspberry-pi/3>` | `raspberry-pi-3` |
| [Raspberry Pi 4](raspberry-pi/4) | `<nixos-hardware/raspberry-pi/4>` | `raspberry-pi-4` |
+44
View File
@@ -0,0 +1,44 @@
# ASRock Rack ALTRAD8UD-1L2T
This is a popular motherboard for the [Ampere Altra](https://amperecomputing.com/briefs/ampere-altra-family-product-brief) family of CPUs.
It is used in for example the [System76 Thelio Astra](https://system76.com/desktops/thelio-astra-a1.1-n1/configure)
```shellsession
$ pciutils -nn
0000:00:00.0 Host bridge [0600]: Ampere Computing, LLC Altra PCI Express Root Complex A [1def:e100]
0000:00:01.0 PCI bridge [0604]: Ampere Computing, LLC Altra PCI Express Root Port a0 [1def:e101] (rev 04)
0001:00:00.0 Host bridge [0600]: Ampere Computing, LLC Altra PCI Express Root Complex A [1def:e100]
0001:00:01.0 PCI bridge [0604]: Ampere Computing, LLC Altra PCI Express Root Port a0 [1def:e101] (rev 04)
0002:00:00.0 Host bridge [0600]: Ampere Computing, LLC Altra PCI Express Root Complex A [1def:e100]
0002:00:01.0 PCI bridge [0604]: Ampere Computing, LLC Altra PCI Express Root Port a0 [1def:e101] (rev 04)
0002:00:02.0 PCI bridge [0604]: Ampere Computing, LLC Altra PCI Express Root Port a1 [1def:e102] (rev 04)
0002:00:03.0 PCI bridge [0604]: Ampere Computing, LLC Altra PCI Express Root Port a2 [1def:e103] (rev 04)
0002:00:04.0 PCI bridge [0604]: Ampere Computing, LLC Altra PCI Express Root Port a3 [1def:e104] (rev 04)
0002:01:00.0 Non-Volatile memory controller [0108]: Sandisk Corp WD Black SN850X NVMe SSD [15b7:5030] (rev 01)
0003:00:00.0 Host bridge [0600]: Ampere Computing, LLC Altra PCI Express Root Complex A [1def:e100]
0003:00:01.0 PCI bridge [0604]: Ampere Computing, LLC Altra PCI Express Root Port a0 [1def:e101] (rev 04)
0003:00:02.0 PCI bridge [0604]: Ampere Computing, LLC Altra PCI Express Root Port a1 [1def:e102] (rev 04)
0003:00:03.0 PCI bridge [0604]: Ampere Computing, LLC Altra PCI Express Root Port a2 [1def:e103] (rev 04)
0003:00:04.0 PCI bridge [0604]: Ampere Computing, LLC Altra PCI Express Root Port a3 [1def:e104] (rev 04)
0003:01:00.0 PCI bridge [0604]: ASRock Incorporation Device [1849:1150] (rev 04)
0003:02:00.0 VGA compatible controller [0300]: ASPEED Technology, Inc. ASPEED Graphics Family [1a03:2000] (rev 41)
0003:03:00.0 Ethernet controller [0200]: Intel Corporation Ethernet Controller X550 [8086:1563] (rev 01)
0003:03:00.1 Ethernet controller [0200]: Intel Corporation Ethernet Controller X550 [8086:1563] (rev 01)
0003:04:00.0 USB controller [0c03]: ASMedia Technology Inc. ASM3042 USB 3.2 Gen 1 xHCI Controller [1b21:3042]
0003:05:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:1533] (rev 03)
0004:00:00.0 Host bridge [0600]: Ampere Computing, LLC Altra PCI Express Root Complex A [1def:e100]
0004:00:01.0 PCI bridge [0604]: Ampere Computing, LLC Altra PCI Express Root Port a0 [1def:e101] (rev 04)
0005:00:00.0 Host bridge [0600]: Ampere Computing, LLC Altra PCI Express Root Complex A [1def:e100]
0005:00:01.0 PCI bridge [0604]: Ampere Computing, LLC Altra PCI Express Root Port a0 [1def:e101] (rev 04)
000c:00:00.0 Host bridge [0600]: Ampere Computing, LLC Altra PCI Express Root Complex A [1def:e100]
000c:00:01.0 PCI bridge [0604]: Ampere Computing, LLC Altra PCI Express Root Port a0 [1def:e101] (rev 04)
000c:00:02.0 PCI bridge [0604]: Ampere Computing, LLC Altra PCI Express Root Port a1 [1def:e102] (rev 04)
000c:00:03.0 PCI bridge [0604]: Ampere Computing, LLC Altra PCI Express Root Port a2 [1def:e103] (rev 04)
000c:00:04.0 PCI bridge [0604]: Ampere Computing, LLC Altra PCI Express Root Port a3 [1def:e104] (rev 04)
000d:00:00.0 Host bridge [0600]: Ampere Computing, LLC Altra PCI Express Root Complex A [1def:e100]
000d:00:01.0 PCI bridge [0604]: Ampere Computing, LLC Altra PCI Express Root Port a0 [1def:e101] (rev 04)
000d:00:02.0 PCI bridge [0604]: Ampere Computing, LLC Altra PCI Express Root Port a1 [1def:e102] (rev 04)
000d:00:03.0 PCI bridge [0604]: Ampere Computing, LLC Altra PCI Express Root Port a2 [1def:e103] (rev 04)
000d:00:04.0 PCI bridge [0604]: Ampere Computing, LLC Altra PCI Express Root Port a3 [1def:e104] (rev 04)
```
+10
View File
@@ -0,0 +1,10 @@
{
imports = [ ../../common/networking/intel/x550 ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"usb_storage"
"nvme"
];
nixpkgs.hostPlatform = "aarch64-linux";
}
-1
View File
@@ -11,7 +11,6 @@ let
mkEnableOption
mkIf
mkMerge
version
versionAtLeast
;
+81
View File
@@ -0,0 +1,81 @@
{
config,
pkgs,
lib,
...
}:
let
inherit (lib)
mkDefault
mkMerge
;
in
{
imports = [
../../../common/cpu/intel/raptor-lake
../../../common/gpu/intel/raptor-lake
../../../common/gpu/nvidia/ada-lovelace
../../../common/gpu/nvidia/prime.nix
../../../common/pc/laptop
../../../common/pc/ssd
];
config = mkMerge [
{
# Configure basic system settings:
boot = {
blacklistedKernelModules = [ "nouveau" ];
kernelModules = [ "kvm-intel" ];
kernelParams = [
"mem_sleep_default=deep"
"pcie_aspm.policy=powersupersave"
"nvidia-drm.modeset=1"
"nvidia-drm.fbdev=1"
];
};
services = {
asusd = {
enable = mkDefault true;
enableUserService = mkDefault true;
};
supergfxd.enable = mkDefault true;
};
#flow devices are 2 in 1 laptops
hardware.sensor.iio.enable = mkDefault true;
hardware = {
nvidia = {
modesetting.enable = true;
nvidiaSettings = mkDefault true;
forceFullCompositionPipeline = mkDefault true;
prime = {
offload = {
enable = mkDefault true;
enableOffloadCmd = mkDefault true;
};
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
powerManagement = {
enable = mkDefault true;
finegrained = mkDefault false;
};
dynamicBoost.enable = mkDefault true;
};
};
}
];
}
+38
View File
@@ -0,0 +1,38 @@
{ lib, ... }:
{
imports = [
../../../common/cpu/amd
../../../common/cpu/amd/pstate.nix
../../../common/gpu/amd
../../../common/gpu/nvidia/prime.nix
../../../common/gpu/nvidia/turing
../../../common/pc/laptop
../../../common/pc/ssd
];
hardware.nvidia = {
# Enable DRM kernel mode setting
# This will also cause "PCI-Express Runtime D3 Power Management" to be enabled by default
modesetting.enable = lib.mkDefault true;
# Dynamic boost is available on ampere GPUs and newer, not this laptop
dynamicBoost.enable = lib.mkDefault false;
prime = {
amdgpuBusId = "PCI:4:0:0";
nvidiaBusId = "PCI:1:0:0";
};
};
services = {
asusd.enable = lib.mkDefault true;
udev.extraHwdb = ''
evdev:name:*:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:*
KEYBOARD_KEY_ff31007c=f20 # fixes mic mute button
KEYBOARD_KEY_ff3100b2=home # Set fn+LeftArrow as Home
KEYBOARD_KEY_ff3100b3=end # Set fn+RightArrow as End
'';
};
}
+10
View File
@@ -0,0 +1,10 @@
{ lib, config, ... }:
let
nvidiaPackage = config.hardware.nvidia.package;
in
{
imports = [ ../. ];
# enable the open source drivers if the package supports it
hardware.nvidia.open = lib.mkOverride 990 (nvidiaPackage ? open && nvidiaPackage ? firmware);
}
+36
View File
@@ -0,0 +1,36 @@
# The x550 supports 5G but the driver does not enable it by default
# https://forum.proxmox.com/threads/x550-x550-t2-duplex-auto-negotiation.116776/
{
systemd.network.links."80-x550" = {
matchConfig = {
Driver = "ixgbe";
Property = [
"ID_MODEL_ID=0x1563"
"ID_VENDOR_ID=0x8086"
];
};
linkConfig.Advertise = [
"100baset-full"
"1000baset-full"
"2500baset-full"
"5000baset-full"
"10000baset-full"
];
linkConfig.NamePolicy = [
"keep"
"kernel"
"database"
"onboard"
"slot"
"path"
];
linkConfig.AlternativeNamesPolicy = [
"database"
"onboard"
"slot"
"path"
"mac"
];
linkConfig.MACAddressPolicy = "persistent";
};
}
+80
View File
@@ -0,0 +1,80 @@
# MediaTek MT7925 WiFi 7 / Bluetooth support
#
# The MT7925 is a WiFi 7 (802.11be) + Bluetooth combo chip found in many
# 2024-2025 laptops. It requires specific workarounds for stable operation.
#
# Known issues:
# - Power management causes random disconnections
# - ASPM (Active State Power Management) causes hangs
# - CLC (Country Location Code) causes 6GHz band instability
# - WiFi often fails to reconnect after suspend/resume
# - wpa_supplicant has issues; iwd is recommended
#
# Devices using MT7925:
# - Razer Blade 14 (RZ09-0530) 2025
# - ThinkPad P16s Gen 4
# - Other 2024-2025 laptops with WiFi 7
#
# References:
# - https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2118755
# - https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2133863
{
lib,
pkgs,
...
}:
{
# ===========================================================================
# Kernel Recommendation
# ===========================================================================
# Kernel 6.18+ is recommended for stable MT7925 operation.
# Earlier kernels may have driver bugs causing disconnections or hangs.
# Set: boot.kernelPackages = pkgs.linuxPackages_latest;
# ===========================================================================
# Kernel Module Parameters
# ===========================================================================
# Disable power management at driver level during module load
boot.extraModprobeConfig = ''
# MT7925 WiFi - disable all power management for stability
options mt7925e disable_aspm=1
options mt7925e power_save=0
# Disable CLC (Country Location Code) - fixes 6GHz band stability
options mt7925-common disable_clc=1
'';
# ===========================================================================
# NetworkManager Configuration
# ===========================================================================
networking.networkmanager.wifi = {
# Disable WiFi power saving (causes disconnections)
powersave = lib.mkDefault false;
# Consistent MAC during scans (randomization causes issues)
scanRandMacAddress = lib.mkDefault false;
};
# ===========================================================================
# Suspend/Resume Fix
# ===========================================================================
# Restart NetworkManager after suspend to clear stale driver state
systemd.services.mediatek-wifi-resume = {
description = "Restart NetworkManager after suspend to fix MediaTek WiFi";
wantedBy = [
"suspend.target"
"hibernate.target"
"hybrid-sleep.target"
];
after = [
"suspend.target"
"hibernate.target"
"hybrid-sleep.target"
];
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.systemd}/bin/systemctl restart NetworkManager.service";
};
};
}
+34
View File
@@ -0,0 +1,34 @@
# MediaTek MT7925 - iwd backend configuration
#
# Use iwd instead of wpa_supplicant for MT7925. iwd provides better
# stability and faster roaming for WiFi 7 chips.
#
# Import this alongside default.nix:
# imports = [
# ../common/wifi/mediatek/mt7925
# ../common/wifi/mediatek/mt7925/iwd.nix
# ];
{ lib, ... }:
{
# Required for iwd to work with MT7925 - includes non-redistributable firmware
hardware.enableAllFirmware = lib.mkDefault true;
# Use iwd backend instead of wpa_supplicant
networking.networkmanager.wifi.backend = lib.mkDefault "iwd";
# iwd configuration for MT7925 stability
networking.wireless.iwd.settings = {
General = {
# Consistent MAC per network (fixes WPA3 handshake issues)
AddressRandomization = "network";
# Let NetworkManager handle IP configuration, not iwd
# (prevents conflicts between iwd and NetworkManager)
EnableNetworkConfiguration = false;
};
Settings = {
AutoConnect = true;
};
};
}
+30 -2
View File
@@ -23,7 +23,35 @@ Boot ROM initializes the SoC and loads OEI, which runs in TCM to perform early s
}
```
### Building Boot Images
The boot image for flashing to SD cards can be built directly from the flake:
```bash
# Build boot image for UCM-iMX95
nix build github:NixOS/nixos-hardware#packages.aarch64-linux.ucm-imx95-boot
```
The boot image will be available at `./result/image/flash.bin`.
**Note:** These packages target `aarch64-linux`. If you're on a different architecture (e.g., x86_64-linux), you'll need remote builders configured for aarch64-linux.
### Flashing to SD Card
Once built, you can flash the boot image to an SD card:
```bash
# Write boot image to SD card at 32KB offset (adjust /dev/sdX to your SD card device)
sudo dd if=./result/image/flash.bin of=/dev/sdX bs=1k seek=32 conv=fsync
```
**Warning:** Double-check the device path to avoid overwriting the wrong disk!
### Notes
- The configuration, including device-tree, kernel, and bootloader components, is optimized for the UCM-iMX95 SoM and EVK.
- The generated NixOS image supports booting from SD card or eMMC, depending on the hardware configuration.
- The configuration, including device-tree, kernel, and bootloader components, is optimized for the UCM-iMX95 SoM and EVK.
- The generated NixOS image supports booting from SD card or eMMC, depending on the hardware configuration.
- The boot components (OEI in TCM/DDR, SM, ATF, U-Boot) follow the standard NXP release layout for i.MX95 platforms.
### Upstream Documentation
- [NXP i.MX95 EVK U-Boot Documentation](https://docs.u-boot.org/en/latest/board/nxp/imx95_evk.html)
- [CompuLab UCM-iMX95 Product Page](https://www.compulab.com/products/computer-on-modules/ucm-imx95-nxp-i-mx-95-som-system-on-module/)
+21 -14
View File
@@ -1,17 +1,24 @@
{
pkgs,
callPackage,
fetchFromGitHub,
stdenv,
clang,
git,
dtc,
glibc,
zlib,
vim,
}:
with pkgs;
let
imx95-atf = pkgs.callPackage ./ucm-imx95-atf.nix { };
imx95-firmware = pkgs.callPackage ./ucm-imx95-firmware.nix { };
imx95-uboot = pkgs.callPackage ./ucm-imx95-uboot.nix { };
imx95-optee-os = pkgs.callPackage ./ucm-imx95-optee-os.nix { };
imx95-sm-fw = pkgs.callPackage ./ucm-imx95-sm-fw.nix { };
imx95-oei-ddr = pkgs.callPackage ./ucm-imx95-oei-ddr.nix { };
imx95-oei-tcm = pkgs.callPackage ./ucm-imx95-oei-tcm.nix { };
src = pkgs.fetchFromGitHub {
imx95-atf = callPackage ./ucm-imx95-atf.nix { };
imx95-firmware = callPackage ./ucm-imx95-firmware.nix { };
imx95-uboot = callPackage ./ucm-imx95-uboot.nix { };
imx95-optee-os = callPackage ./ucm-imx95-optee-os.nix { };
imx95-sm-fw = callPackage ./ucm-imx95-sm-fw.nix { };
imx95-oei-ddr = callPackage ./ucm-imx95-oei-ddr.nix { };
imx95-oei-tcm = callPackage ./ucm-imx95-oei-tcm.nix { };
src = fetchFromGitHub {
owner = "nxp-imx";
repo = "imx-mkimage";
#tag: lf-6.6.52-2.2.1
@@ -21,7 +28,7 @@ let
shortRev = builtins.substring 0 8 src.rev;
in
{
imx95-boot = pkgs.stdenv.mkDerivation rec {
imx95-boot = stdenv.mkDerivation rec {
inherit src;
name = "imx95-mkimage";
version = "lf-6.6.52-2.2.1";
@@ -32,11 +39,11 @@ in
substituteInPlace Makefile \
--replace-fail 'CC = gcc' 'CC = clang'
substituteInPlace iMX95/soc.mak \
--replace-fail 'xxd' "${pkgs.vim.xxd}/bin/xxd"
--replace-fail 'xxd' "${vim.xxd}/bin/xxd"
substituteInPlace scripts/fspi_fcb_gen.sh \
--replace-fail 'xxd' "${pkgs.vim.xxd}/bin/xxd"
--replace-fail 'xxd' "${vim.xxd}/bin/xxd"
substituteInPlace scripts/fspi_packer.sh \
--replace-fail 'xxd' "${pkgs.vim.xxd}/bin/xxd"
--replace-fail 'xxd' "${vim.xxd}/bin/xxd"
patchShebangs scripts
'';
@@ -1,10 +1,12 @@
{
pkgs,
stdenv,
fetchurl,
coreutils,
bash,
siliconRev ? "A0",
...
}:
with pkgs;
stdenv.mkDerivation rec {
pname = "nxp-firmware-imx95";
version = "nxp-firmware-8.28-994fa14";
+6 -2
View File
@@ -1,5 +1,9 @@
{ lib, pkgs, ... }@args:
with pkgs;
{
lib,
buildLinux,
fetchFromGitHub,
...
}@args:
buildLinux (
args
// rec {
+14 -10
View File
@@ -1,20 +1,24 @@
{
lib,
pkgs,
stdenv,
buildPackages,
gcc-arm-embedded,
fetchFromGitHub,
fetchpatch,
}:
let
metaBspImx95Rev = "5f4c7b5db846fa3a75055054e32215089d15a7b7"; # scarthgap
in
pkgs.stdenv.mkDerivation rec {
stdenv.mkDerivation rec {
pname = "imx95-imx-oei";
version = "lf-6.6.36-2.1.0";
nativeBuildInputs = [
pkgs.buildPackages.python3
pkgs.gcc-arm-embedded
buildPackages.python3
gcc-arm-embedded
];
src = pkgs.fetchFromGitHub {
src = fetchFromGitHub {
owner = "nxp-imx";
repo = "imx-oei";
rev = "5fca9f47544d03c52ca371eadfffbfd2454e6925";
@@ -22,15 +26,15 @@ pkgs.stdenv.mkDerivation rec {
};
patches = [
(pkgs.fetchpatch {
(fetchpatch {
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-oei/imx-oei/0001-Add-CompuLab-lpddr5_timing.c.patch";
sha256 = "sha256-6ZpBOXw2aIhD2i9Wx368xfHq6NvdZghWHU9u8+gRTj8=";
})
(pkgs.fetchpatch {
(fetchpatch {
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-oei/imx-oei/0002-board-mx95lp5-Fix-default-DDR_CONFIG-timing-name.patch";
sha256 = "sha256-WZ/vYaTC2iKIC+jnHtnPriCxK9gjRsOv2Uy13Ye4698=";
})
(pkgs.fetchpatch {
(fetchpatch {
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-oei/imx-oei/0003-Add-CompuLab-lpddr5_timing_4g.c.patch";
sha256 = "sha256-yyierv2USZlM8Cuxf4FDj4+UtILvJQH9BJSj+fmayL8=";
})
@@ -45,8 +49,8 @@ pkgs.stdenv.mkDerivation rec {
makeFlags = [
"board=mx95lp5"
"CROSS_COMPILE=${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-"
"OEI_CROSS_COMPILE=${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-"
"CROSS_COMPILE=${gcc-arm-embedded}/bin/arm-none-eabi-"
"OEI_CROSS_COMPILE=${gcc-arm-embedded}/bin/arm-none-eabi-"
"ARCH=arm"
"DDR_CONFIG=lpddr5_timing"
"oei=ddr"
+14 -10
View File
@@ -1,20 +1,24 @@
{
lib,
pkgs,
stdenv,
buildPackages,
gcc-arm-embedded,
fetchFromGitHub,
fetchpatch,
}:
let
metaBspImx95Rev = "5f4c7b5db846fa3a75055054e32215089d15a7b7"; # scarthgap
in
pkgs.stdenv.mkDerivation rec {
stdenv.mkDerivation rec {
pname = "imx95-imx-oei-tcm";
version = "lf-6.6.36-2.1.0";
nativeBuildInputs = [
pkgs.buildPackages.python3
pkgs.gcc-arm-embedded
buildPackages.python3
gcc-arm-embedded
];
src = pkgs.fetchFromGitHub {
src = fetchFromGitHub {
owner = "nxp-imx";
repo = "imx-oei";
rev = "5fca9f47544d03c52ca371eadfffbfd2454e6925";
@@ -22,15 +26,15 @@ pkgs.stdenv.mkDerivation rec {
};
patches = [
(pkgs.fetchpatch {
(fetchpatch {
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-oei/imx-oei/0001-Add-CompuLab-lpddr5_timing.c.patch";
sha256 = "sha256-6ZpBOXw2aIhD2i9Wx368xfHq6NvdZghWHU9u8+gRTj8=";
})
(pkgs.fetchpatch {
(fetchpatch {
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-oei/imx-oei/0002-board-mx95lp5-Fix-default-DDR_CONFIG-timing-name.patch";
sha256 = "sha256-WZ/vYaTC2iKIC+jnHtnPriCxK9gjRsOv2Uy13Ye4698=";
})
(pkgs.fetchpatch {
(fetchpatch {
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-oei/imx-oei/0003-Add-CompuLab-lpddr5_timing_4g.c.patch";
sha256 = "sha256-yyierv2USZlM8Cuxf4FDj4+UtILvJQH9BJSj+fmayL8=";
})
@@ -45,8 +49,8 @@ pkgs.stdenv.mkDerivation rec {
makeFlags = [
"board=mx95lp5"
"CROSS_COMPILE=${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-"
"OEI_CROSS_COMPILE=${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-"
"CROSS_COMPILE=${gcc-arm-embedded}/bin/arm-none-eabi-"
"OEI_CROSS_COMPILE=${gcc-arm-embedded}/bin/arm-none-eabi-"
"ARCH=arm"
"DDR_CONFIG=lpddr5_timing"
"oei=tcm"
+11 -8
View File
@@ -1,14 +1,17 @@
{
lib,
pkgs,
stdenv,
fetchFromGitHub,
buildPackages,
bash,
}:
let
inherit (pkgs.buildPackages) python3;
toolchain = pkgs.gccStdenv.cc;
binutils = pkgs.gccStdenv.cc.bintools.bintools_bin;
cpp = pkgs.gccStdenv.cc;
inherit (buildPackages) python3;
toolchain = stdenv.cc;
binutils = stdenv.cc.bintools.bintools_bin;
cpp = stdenv.cc;
in
pkgs.stdenv.mkDerivation {
stdenv.mkDerivation {
pname = "imx95-optee-os";
version = "lf-6.6.36_2.1.0";
@@ -24,7 +27,7 @@ pkgs.stdenv.mkDerivation {
cryptography
];
src = pkgs.fetchFromGitHub {
src = fetchFromGitHub {
owner = "nxp-imx";
repo = "imx-optee-os";
rev = "612bc5a642a4608d282abeee2349d86de996d7ee";
@@ -50,7 +53,7 @@ pkgs.stdenv.mkDerivation {
substituteInPlace scripts/pem_to_pub_c.py \
--replace-fail '/usr/bin/env python3' '${python3}/bin/python'
substituteInPlace ta/pkcs11/scripts/verify-helpers.sh \
--replace-fail '/bin/bash' '${pkgs.bash}/bin/bash'
--replace-fail '/bin/bash' '${bash}/bin/bash'
substituteInPlace mk/gcc.mk \
--replace-fail "\$(CROSS_COMPILE_\$(sm))objcopy" ${binutils}/bin/${toolchain.targetPrefix}objcopy
substituteInPlace mk/gcc.mk \
+18 -14
View File
@@ -1,26 +1,30 @@
{
lib,
pkgs,
stdenv,
buildPackages,
gcc-arm-embedded,
fetchFromGitHub,
fetchpatch,
}:
let
metaBspImx95Rev = "224eed17cddc573061150e9d2ce6f9acb39ea50e"; # scarthgap-6.6.36-EVAL-UCM-iMX95-1.0
in
pkgs.stdenv.mkDerivation rec {
stdenv.mkDerivation rec {
pname = "imx95-sm-fw";
version = "lf-6.6.36-2.1.0";
nativeBuildInputs = [
pkgs.buildPackages.python3
pkgs.gcc-arm-embedded
buildPackages.python3
gcc-arm-embedded
];
propagatedBuildInputs = with pkgs.buildPackages.python3.pkgs; [
propagatedBuildInputs = with buildPackages.python3.pkgs; [
pycryptodomex
pyelftools
cryptography
];
src = pkgs.fetchFromGitHub {
src = fetchFromGitHub {
owner = "nxp-imx";
repo = "imx-sm";
rev = "709deccd9338399eb39b5cf99a60eab4fa60d539";
@@ -28,23 +32,23 @@ pkgs.stdenv.mkDerivation rec {
};
patches = [
(pkgs.fetchpatch {
(fetchpatch {
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-system-manager/imx-system-manager/0001-Add-mcimx95cust-board.patch";
sha256 = "sha256-zvZ4bNew+yRPmaZQMrAH087KpCLRqz6zdElfe72Dtuc=";
})
(pkgs.fetchpatch {
(fetchpatch {
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-system-manager/imx-system-manager/0002-Fix-null-pionter-except.patch";
sha256 = "sha256-q72VEvJqm2CmOxdWMqGibgXS5lY08mC4srEcy00QdrE=";
})
(pkgs.fetchpatch {
(fetchpatch {
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-system-manager/imx-system-manager/0001-update-for-yocto-6.6.36-compatibility.patch";
sha256 = "sha256-JzHqDiD/ZOu6VQQI0JxY17RQ3bA2t1aP3O1sjLPguWs=";
})
(pkgs.fetchpatch {
(fetchpatch {
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-system-manager/imx-system-manager/0003-sm-Disable-GPIO1-10-interrupt.patch";
sha256 = "sha256-dhcDv7Uq856+MBonczMPznk+tuqUFxTcHiKLX+myCVA=";
})
(pkgs.fetchpatch {
(fetchpatch {
url = "https://raw.githubusercontent.com/compulab-yokneam/meta-bsp-imx95/${metaBspImx95Rev}/recipes-bsp/imx-system-manager/imx-system-manager/0004-configs-mx95cust-change-LPTPM1-ownership.patch";
sha256 = "sha256-NcLu6+zXpiSz1bHKW14Zuf6F/4pzKsekb+zaRtKjSTY=";
})
@@ -52,7 +56,7 @@ pkgs.stdenv.mkDerivation rec {
postPatch = ''
substituteInPlace sm/makefiles/gcc_cross.mak \
--replace-fail "\$(SM_CROSS_COMPILE)objcopy" ${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-objcopy
--replace-fail "\$(SM_CROSS_COMPILE)objcopy" ${gcc-arm-embedded}/bin/arm-none-eabi-objcopy
substituteInPlace sm/makefiles/build_info.mak \
--replace-fail "/bin/echo" "echo"
substituteInPlace sm/makefiles/gcc_cross.mak \
@@ -63,8 +67,8 @@ pkgs.stdenv.mkDerivation rec {
makeFlags = [
"config=mx95cust"
"M=2"
"CROSS_COMPILE=${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-"
"CROSS_COMPILE64=${pkgs.gcc-arm-embedded}/bin/arm-none-eabi-"
"CROSS_COMPILE=${gcc-arm-embedded}/bin/arm-none-eabi-"
"CROSS_COMPILE64=${gcc-arm-embedded}/bin/arm-none-eabi-"
"ARCH=arm"
];
+1 -1
View File
@@ -4,7 +4,7 @@
...
}:
{
nixpkgs.hostPlatform = "aarch64-linux";
nixpkgs.hostPlatform.system = "aarch64-linux";
boot = {
kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/ucm-imx95-linux.nix { });
+1 -1
View File
@@ -1,3 +1,3 @@
final: _prev: {
inherit (final.callPackage ./bsp/ucm-imx95-boot.nix { pkgs = final; }) imx95-boot;
inherit (final.callPackage ./bsp/ucm-imx95-boot.nix { }) imx95-boot;
}
-2
View File
@@ -6,8 +6,6 @@
../../../common/pc/laptop
];
hardware.enableAllFirmware = lib.mkDefault true;
services = {
fwupd.enable = lib.mkDefault true;
thermald.enable = lib.mkDefault true;
+1 -1
View File
@@ -15,7 +15,7 @@
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"usb-storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
+26 -10
View File
@@ -65,6 +65,7 @@
apple-macbook-pro-14-1 = import ./apple/macbook-pro/14-1;
apple-macmini-4-1 = import ./apple/macmini/4;
apple-t2 = import ./apple/t2;
asrock-rack-altrad8ud-1l2t = import ./asrock-rack/altrad8ud-1l2t;
asus-battery = import ./asus/battery.nix;
asus-ally-rc71l = import ./asus/ally/rc71l;
asus-fx504gd = import ./asus/fx504gd;
@@ -74,6 +75,7 @@
asus-fa507rm = import ./asus/fa507rm;
asus-flow-gv302x-amdgpu = import ./asus/flow/gv302x/amdgpu;
asus-flow-gv302x-nvidia = import ./asus/flow/gv302x/nvidia;
asus-flow-gz301vu = import ./asus/flow/gz301vu;
asus-pro-ws-x570-ace = import ./asus/pro-ws-x570-ace;
asus-rog-gl552vw = import ./asus/rog-gl552vw;
asus-rog-strix-g513im = import ./asus/rog-strix/g513im;
@@ -87,6 +89,7 @@
asus-zenbook-ux535 = import ./asus/zenbook/ux535;
asus-zenbook-ux481-intelgpu = import ./asus/zenbook/ux481/intelgpu;
asus-zenbook-ux481-nvidia = import ./asus/zenbook/ux481/nvidia;
asus-zephyrus-ga401iv = import ./asus/zephyrus/ga401iv;
asus-zephyrus-ga401 = import ./asus/zephyrus/ga401;
asus-zephyrus-ga402 = import ./asus/zephyrus/ga402;
asus-zephyrus-ga402x = import ./asus/zephyrus/ga402x;
@@ -172,6 +175,7 @@
framework-amd-ai-300-series = import ./framework/13-inch/amd-ai-300-series;
framework-16-7040-amd = import ./framework/16-inch/7040-amd;
framework-16-amd-ai-300-series = import ./framework/16-inch/amd-ai-300-series;
framework-16-amd-ai-300-series-nvidia = import ./framework/16-inch/amd-ai-300-series/nvidia;
framework-desktop-amd-ai-max-300-series = import ./framework/desktop/amd-ai-max-300-series;
friendlyarm-nanopc-t4 = import ./friendlyarm/nanopc-t4;
friendlyarm-nanopi-r5s = import ./friendlyarm/nanopi-r5s;
@@ -229,12 +233,14 @@
lenovo-legion-16ithg6 = import ./lenovo/legion/16ithg6;
lenovo-legion-16irx8h = import ./lenovo/legion/16irx8h;
lenovo-legion-16irx9h = import ./lenovo/legion/16irx9h;
lenovo-legion-16iax10h = import ./lenovo/legion/16iax10h;
lenovo-legion-t526amr5 = import ./lenovo/legion/t526amr5;
lenovo-legion-y530-15ich = import ./lenovo/legion/15ich;
lenovo-thinkpad = import ./lenovo/thinkpad;
lenovo-thinkpad-a475 = import ./lenovo/thinkpad/a475;
lenovo-thinkpad-e14-amd = import ./lenovo/thinkpad/e14/amd;
lenovo-thinkpad-e14-intel = import ./lenovo/thinkpad/e14/intel;
lenovo-thinkpad-e14-intel-gen2 = import ./lenovo/thinkpad/e14/intel/gen2;
lenovo-thinkpad-e14-intel-gen4 = import ./lenovo/thinkpad/e14/intel/gen4;
lenovo-thinkpad-e14-intel-gen6 = import ./lenovo/thinkpad/e14/intel/gen6;
lenovo-thinkpad-e15-intel = import ./lenovo/thinkpad/e15/intel;
@@ -385,6 +391,7 @@
purism-librem-13v3 = import ./purism/librem/13v3;
purism-librem-15v3 = import ./purism/librem/15v3;
purism-librem-5r4 = import ./purism/librem/5r4;
razer-blade-14-RZ09-0530 = import ./razer/blade/14/RZ09-0530;
raspberry-pi-2 = import ./raspberry-pi/2;
raspberry-pi-3 = import ./raspberry-pi/3;
raspberry-pi-4 = import ./raspberry-pi/4;
@@ -425,16 +432,16 @@
common-cpu-amd-zenpower = import ./common/cpu/amd/zenpower.nix;
common-cpu-amd-raphael-igpu = import ./common/cpu/amd/raphael/igpu.nix;
common-cpu-intel = import ./common/cpu/intel;
common-gpu-intel-comet-lake =
deprecated "992" "common-gpu-intel-comet-lake"
(import ./common/gpu/intel/comet-lake);
common-gpu-intel-comet-lake = deprecated "992" "common-gpu-intel-comet-lake" (
import ./common/gpu/intel/comet-lake
);
common-cpu-intel-cpu-only = import ./common/cpu/intel/cpu-only.nix;
common-gpu-intel-kaby-lake =
deprecated "992" "common-gpu-intel-kaby-lake"
(import ./common/gpu/intel/kaby-lake);
common-gpu-intel-sandy-bridge =
deprecated "992" "common-gpu-intel-sandy-bridge"
(import ./common/gpu/intel/sandy-bridge);
common-gpu-intel-kaby-lake = deprecated "992" "common-gpu-intel-kaby-lake" (
import ./common/gpu/intel/kaby-lake
);
common-gpu-intel-sandy-bridge = deprecated "992" "common-gpu-intel-sandy-bridge" (
import ./common/gpu/intel/sandy-bridge
);
common-gpu-amd = import ./common/gpu/amd;
common-gpu-amd-sea-islands = import ./common/gpu/amd/sea-islands;
common-gpu-amd-southern-islands = import ./common/gpu/amd/southern-islands;
@@ -445,6 +452,7 @@
common-gpu-nvidia-nonprime = import ./common/gpu/nvidia;
common-gpu-nvidia-disable = import ./common/gpu/nvidia/disable.nix;
common-hidpi = import ./common/hidpi.nix;
common-networking-intel-x550 = import ./common/networking/intel/x550;
common-pc = import ./common/pc;
common-pc-hdd = import ./common/pc/hdd;
common-pc-laptop = import ./common/pc/laptop;
@@ -462,11 +470,19 @@
# Add packages
packages = eachSystem (
pkgs: _system: {
pkgs: system:
{
run-tests = pkgs.callPackage ./tests/run-tests.nix {
inherit self;
};
}
// pkgs.lib.optionalAttrs (system == "aarch64-linux") {
# Boot images for NXP i.MX boards (aarch64-linux only)
ucm-imx95-boot = (pkgs.callPackage ./compulab/ucm-imx95/bsp/ucm-imx95-boot.nix { }).imx95-boot;
imx93-boot = (pkgs.callPackage ./nxp/imx93-evk/bsp/imx93-boot.nix { }).imx93-boot;
imx8mp-boot = (pkgs.callPackage ./nxp/imx8mp-evk/bsp/imx8mp-boot.nix { }).imx8m-boot;
imx8mq-boot = (pkgs.callPackage ./nxp/imx8mq-evk/bsp/imx8mq-boot.nix { }).imx8m-boot;
}
);
# Add checks for `nix run .#run-tests`
+1 -1
View File
@@ -13,7 +13,7 @@
"xhci_pci"
"ahci"
"nvme"
"usb_storage"
"usb-storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
@@ -16,11 +16,19 @@
services.fwupd.enable = true;
hardware.framework.laptop13.audioEnhancement.rawDeviceName =
lib.mkDefault "alsa_output.pci-0000_c1_00.6.analog-stereo";
lib.mkDefault "alsa_output.pci-0000_c1_00.6.HiFi__Speaker__sink";
# suspend works with 6.15
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.15") (
lib.mkDefault pkgs.linuxPackages_latest
);
# Disable the broken ALSA UCM profiles by default.
# See https://github.com/NixOS/nixos-hardware/issues/1603
services.pipewire.wireplumber.extraConfig."10-no-ucm" = {
"monitor.alsa.properties" = {
"alsa.use-ucm" = lib.mkDefault false;
};
};
};
}
+94 -11
View File
@@ -1,25 +1,108 @@
# [Framework Laptop 16 AMD AI 300 Series](https://frame.work/)
# [Framework Laptop 16 — AMD Ryzen AI 300 Series](https://frame.work/)
## nvidia
## Recommended modules
If you have an nvidia dGPU module, you can enable it via the nvidia open drivers:
### Base (no NVIDIA dGPU module)
```
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia.open = true; # see the note above
Use the base module:
```nix
{
imports = [
nixos-hardware.nixosModules.framework-16-amd-ai-300-series
];
}
```
See also [NVIDIA](https://wiki.nixos.org/wiki/NVIDIA) on the NixOS Wiki.
### NVIDIA dGPU module (RTX 5070 etc.)
## Updating Firmware
If you have the Framework 16 NVIDIA dGPU module (GeForce RTX 5070 or similar), use the NVIDIA submodule:
Everything is updateable through fwupd, so it's enabled by default.
```nix
{
imports = [
nixos-hardware.nixosModules.framework-16-amd-ai-300-series-nvidia
];
}
```
To get the latest firmware, run:
This enables hybrid graphics with PRIME offload: the AMD iGPU runs by default for better battery life, and the NVIDIA dGPU can be used on demand with `nvidia-offload <command>`.
#### IMPORTANT: You MUST override the PCI bus IDs for your specific system!
The default values are examples only and will likely not match your hardware. Due to Framework 16's modular design, bus IDs vary depending on installed expansion cards and NVMe drives:
```nix
{
hardware.nvidia.prime = {
amdgpuBusId = "PCI:195:0:0"; # Adjust to your system
nvidiaBusId = "PCI:194:0:0"; # Adjust to your system
};
}
```
Find your bus IDs with:
```sh
$ nix-shell -p pciutils --run 'lspci | grep -E "VGA|3D|Display"'
c2:00.0 VGA compatible controller: NVIDIA Corporation ...
c3:00.0 Display controller: Advanced Micro Devices ...
```
Convert the hex bus ID to decimal (e.g., `c2:00.0` → `PCI:194:0:0`, `c3:00.0` → `PCI:195:0:0`).
Helper:
```sh
# Replace BDF with the lspci value like c2:00.0
BDF="c2:00.0"
BUS="${BDF%%:*}"; REST="${BDF#*:}"
DEV="${REST%%.*}"; FUN="${REST#*.}"
printf 'PCI:%d:%d:%d\n' "$((16#$BUS))" "$((16#$DEV))" "$FUN"
```
#### Validate hybrid / offload behavior
```sh
# Default should use AMD
nix-shell -p mesa-demos --run 'glxinfo -B | grep -E "OpenGL vendor|OpenGL renderer"'
# Offload should use NVIDIA
nix-shell -p mesa-demos --run 'nvidia-offload glxinfo -B | grep -E "OpenGL vendor|OpenGL renderer"'
```
To check whether the NVIDIA GPU is runtime-suspending at idle:
```sh
# Reuse $BDF from above
cat /sys/bus/pci/devices/0000:$BDF/power/runtime_status
```
Note: running `nvidia-smi` can wake the GPU, so it is not a reliable “is it sleeping?” probe.
#### Optional: Battery-saver boot entry
If you want an easy “iGPU-only” boot entry (to maximize battery life and avoid loading NVIDIA at all), you can enable the PRIME battery saver specialisation:
```nix
{
hardware.nvidia.primeBatterySaverSpecialisation = true;
}
```
This creates an additional boot entry tagged `battery-saver`.
#### Troubleshooting notes
* If suspend/resume fails after heavy GPU/VRAM usage, see the NixOS NVIDIA wiki for power management / VRAM save notes: https://wiki.nixos.org/wiki/NVIDIA
## Firmware updates (fwupd)
Firmware is updatable via `fwupd` (enabled by default). To get the latest firmware:
```sh
$ fwupdmgr refresh
$ fwupdmgr update
```
- [Latest Update](https://fwupd.org/lvfs/devices/work.frame.Laptop16.RyzenAI300.BIOS.firmware)
- [Latest BIOS update on LVFS](https://fwupd.org/lvfs/devices/work.frame.Laptop16.RyzenAI300.BIOS.firmware)
@@ -18,4 +18,12 @@
# Everything is updateable through fwupd
services.fwupd.enable = true;
# The following mitigations fix various graphics issues
# See https://gist.github.com/lbrame/f9034b1a9fe4fc2d2835c5542acb170a#user-content-quick-version-apply-the-mitigations-i-am-personally-using
boot.kernelParams = [
"amdgpu.dcdebugmask=0x410"
"amdgpu.sg_display=0"
"amdgpu.abmlevel=0"
];
}
@@ -0,0 +1,28 @@
{ lib, ... }:
{
imports = [
../.
../../../../common/gpu/nvidia/blackwell
../../../../common/gpu/nvidia/prime.nix
];
# Explicitly set nvidia as video driver to override modesetting from AMD module
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
# Hybrid graphics with PRIME offload for better battery life
# AMD iGPU by default, NVIDIA dGPU on demand via nvidia-offload command
prime = {
# WARNING: These defaults may not match your system!
# Bus IDs vary depending on installed expansion cards and NVMe drives.
# You MUST override these values - see README.md for instructions.
# Bus IDs can be found with `lspci | grep -E "VGA|3D|Display"`
amdgpuBusId = lib.mkDefault "PCI:195:0:0";
nvidiaBusId = lib.mkDefault "PCI:194:0:0";
};
# Power management for hybrid graphics
powerManagement.enable = lib.mkDefault true;
};
}
+3
View File
@@ -36,6 +36,9 @@ in
"video=DSI-1:panel_orientation=right_side_up"
];
# Turn on IIO for accelerometer screen rotation.
hardware.sensor.iio.enable = lib.mkDefault true;
fonts.fontconfig = {
subpixel.rgba = "vbgr"; # Pixel order for rotated screen
+3
View File
@@ -23,6 +23,9 @@ in
];
};
# Turn on IIO for accelerometer screen rotation.
hardware.sensor.iio.enable = lib.mkDefault true;
fonts.fontconfig = {
subpixel.rgba = "vbgr"; # Pixel order for rotated screen
+4 -1
View File
@@ -5,6 +5,7 @@ let
# A patch to get both PWM fans working
# the patch has been successfully applied to 5.15 and 5.19
{
name = "mvebu-gpio-remove-hardcoded-timer-assignment";
patch = pkgs.fetchpatch {
url = "https://raw.githubusercontent.com/armbian/build/bd3466eef2106ea13e85e821f5d852ff97465e6c/patch/kernel/archive/mvebu-5.15/92-mvebu-gpio-remove-hardcoded-timer-assignment.patch";
sha256 = "sha256-eQqMp0+MZd30zkl8DE89oB7czvyqCkfwF2k0EZ69jr0=";
@@ -12,12 +13,14 @@ let
}
# support for Wake-On-Lan
{
name = "mvebu-gpio-add-wake-on-gpio-support";
patch = pkgs.fetchpatch {
url = "https://raw.githubusercontent.com/armbian/build/bd3466eef2106ea13e85e821f5d852ff97465e6c/patch/kernel/archive/mvebu-5.15/92-mvebu-gpio-add_wake_on_gpio_support.patch";
sha256 = "sha256-OrvnVCU55P0U78jdoxGRJvl29i+Rvq8AdEGSCCpxa2I=";
};
}
{
name = "helios4-dts-add-wake-on-lan-support";
patch = pkgs.fetchpatch {
url = "https://raw.githubusercontent.com/armbian/build/bd3466eef2106ea13e85e821f5d852ff97465e6c/patch/kernel/archive/mvebu-5.15/94-helios4-dts-add-wake-on-lan-support.patch";
sha256 = "sha256-ai4161bTC22023eaVVWsvbk6fQKjkv0P4DQ4DA1Zgow=";
@@ -36,7 +39,7 @@ in
nixpkgs.overlays = [ (import ./overlay.nix) ];
nixpkgs.hostPlatform = "armv7l-linux";
nixpkgs.hostPlatform.system = "armv7l-linux";
boot.initrd.availableKernelModules = [ "ahci_mvebu" ];
+1 -1
View File
@@ -7,7 +7,7 @@
let
# This file was obtained from the display while "DDG" mode was enabled.
chip_edid = pkgs.runCommandNoCC "chip_edid" { } ''
chip_edid = pkgs.runCommand "chip_edid" { } ''
mkdir -p $out/lib/firmware/edid
cp ${./16ach6h.bin} $out/lib/firmware/edid/16ach6h.bin
'';
+41
View File
@@ -0,0 +1,41 @@
{
lib,
config,
...
}:
{
imports = [
../../../common/cpu/intel
../../../common/gpu/nvidia/prime.nix
../../../common/gpu/nvidia/blackwell
../../../common/pc/laptop
../../../common/pc/ssd
../../../common/hidpi.nix
];
boot.extraModulePackages = [ config.boot.kernelPackages.lenovo-legion-module ];
hardware = {
nvidia = {
powerManagement.enable = lib.mkDefault true;
#
prime = {
intelBusId = "PCI:00:02:0";
nvidiaBusId = "PCI:02:00:0";
};
};
};
# Sound speaker fix, see #1039
boot.extraModprobeConfig = ''
options snd-hda-intel model=auto
'';
boot.blacklistedKernelModules = [ "snd_soc_avs" ];
# Cooling management
services.thermald.enable = lib.mkDefault true;
# √(2560² + 1600²) px / 16 in ≃ 189 dpi
services.xserver.dpi = 189;
}
@@ -0,0 +1,11 @@
{ lib, ... }:
{
imports = [
../../.
../../../../../common/cpu/intel/tiger-lake
];
services.throttled.enable = lib.mkDefault false;
hardware.intelgpu.driver = "xe";
}
+1 -1
View File
@@ -2,7 +2,7 @@
{
imports = [
../../../common/cpu/intel
../../../common/cpu/intel/kaby-lake
../../../common/pc/ssd
../.
];
+12 -46
View File
@@ -32,57 +32,23 @@ let
else
abort "Invalid kernel version: ${kernelVersion}";
# Set the version and hash for the linux-surface releases
pkgVersion =
with config.hardware.microsoft-surface;
if kernelVersion == "longterm" then
"6.12.7"
else if kernelVersion == "stable" then
"6.15.3"
else
abort "Invalid kernel version: ${kernelVersion}";
# Fetch the latest linux-surface patches
linux-surface = pkgs.fetchFromGitHub {
owner = "linux-surface";
repo = "linux-surface";
rev = "50d0ed6be462a5fdb643cfe8469bf69158afae42";
hash = "sha256-VEoZH3dFsLn9GnUyjnbOoJeTRM3KEQ9fhlMk03NXoXs=";
};
pkgHash =
with config.hardware.microsoft-surface;
if kernelVersion == "longterm" then
"sha256-Pv7O8D8ma+MPLhYP3HSGQki+Yczp8b7d63qMb6l4+mY="
else if kernelVersion == "stable" then
"sha256-ozvYrZDiVtMkdCcVnNEdlF2Kdw4jivW0aMJrDynN3Hk="
else
abort "Invalid kernel version: ${kernelVersion}";
# Fetch the linux-surface package
repos =
pkgs.callPackage
(
{
fetchFromGitHub,
rev,
hash,
}:
{
linux-surface = fetchFromGitHub {
owner = "linux-surface";
repo = "linux-surface";
rev = rev;
hash = hash;
};
}
)
{
hash = pkgHash;
rev = "arch-${pkgVersion}-1";
};
# Fetch and build the kernel package
inherit (pkgs.callPackage ./kernel/linux-package.nix { inherit repos; })
# Fetch and build the kernel
inherit (pkgs.callPackage ./kernel/linux-package.nix { })
linuxPackage
surfacePatches
;
kernelPatches = surfacePatches {
version = pkgVersion;
patchFn = ./kernel/${versions.majorMinor pkgVersion}/patches.nix;
patchSrc = (repos.linux-surface + "/patches/${versions.majorMinor pkgVersion}");
version = srcVersion;
patchFn = ./kernel/${versions.majorMinor srcVersion}/patches.nix;
patchSrc = (linux-surface + "/patches/${versions.majorMinor srcVersion}");
};
kernelPackages = linuxPackage {
inherit kernelPatches;
@@ -4,7 +4,6 @@
fetchurl,
buildLinux,
linuxPackagesFor,
repos,
}:
let
@@ -74,7 +73,6 @@ in
{
inherit
linuxPackage
repos
surfacePatches
versionsOf
isVersionOf
+1 -1
View File
@@ -5,6 +5,6 @@
...
}:
{
boot.kernelPackages = pkgs.callPackage ./kernel.nix { };
boot.kernelPackages = lib.mkDefault (pkgs.callPackage ./kernel.nix { });
boot.extraModulePackages = [ (config.boot.kernelPackages.callPackage ./lpc.nix { }) ];
}
+12 -15
View File
@@ -7,14 +7,9 @@
...
}:
let
modDirVersion = "6.16.5";
reformDebianPackages = fetchFromGitLab {
domain = "source.mnt.re";
owner = "reform";
repo = "reform-debian-packages";
rev = "830c94db42beef876dc58ea56711659ae7bd415d";
hash = "sha256-mdORgTOM7RJnEjY5G/iWMHf69wQkql11yRpQ/DrQKb4=";
};
sources = lib.importJSON ./sources.json;
modDirVersion = sources.modDirVersion;
reformDebianPackages = fetchFromGitLab sources.reformDebianPackages;
linuxPkg =
{
lib,
@@ -31,15 +26,17 @@ let
src = fetchzip {
url = "mirror://kernel/linux/kernel/v${lib.versions.major modDirVersion}.x/linux-${modDirVersion}.tar.xz";
hash = "sha256-XiTuH40b3VJqzwygZzU0FcvMDj41Rq6IsMbm+3+QxDY=";
hash = "sha256-PLMxGXbKztn4MubhKVqSCSzf+UYL50NI48bikMxgghg=";
};
kernelPatches =
(map (patch: { inherit patch; }) (
lib.filesystem.listFilesRecursive "${reformDebianPackages}/linux/patches${lib.versions.majorMinor modDirVersion}"
))
(map (patch: {
name = patch;
patch = "${reformDebianPackages}/${patch}";
}) (import ./kernelPatches.nix))
++ [
{
name = "reform-dts";
patch = callPackage ./dtsPatch.nix {
inherit reformDebianPackages;
kernelSource = src;
@@ -77,7 +74,7 @@ let
JOYSTICK_XPAD_LEDS = yes;
INTERCONNECT_IMX8MP = yes;
SND_SOC_FSL_ASRC = yes;
SND_SOC_FSL_ASRC = module; # From the documentation: This option is only useful for out-of-tree drivers since in-tree drivers select it automatically.
DRM_IMX_LCDIF = yes;
DRM_IMX8MP_DW_HDMI_BRIDGE = yes;
DRM_IMX8MP_HDMI_PVI = yes;
@@ -130,7 +127,7 @@ let
SPI_ROCKCHIP = yes;
SPI_ROCKCHIP_SFC = module;
ARM_SCMI_CPUFREQ = module;
VIDEO_ROCKCHIP_VDEC2 = module;
# VIDEO_ROCKCHIP_VDEC2 = module; # no rkvdec2 patch included any more
ROCKCHIP_DW_HDMI_QP = yes;
ROCKCHIP_DW_MIPI_DSI2 = yes;
PHY_ROCKCHIP_SAMSUNG_DCPHY = yes;
@@ -138,7 +135,7 @@ let
GPIO_ROCKCHIP = yes;
PL330_DMA = yes;
DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW = no; # patches for 6.16 break this driver
DRM_ZYNQMP_DPSUB = no; # patches for 6.17 break this driver
};
}
// (args.argsOverride or { })
+103
View File
@@ -0,0 +1,103 @@
[
"linux/patches6.17/imx8mp-mnt-pocket-reform/2ghz/0001-imx8mp-2ghz-clk.patch"
"linux/patches6.17/imx8mp-mnt-pocket-reform/2ghz/0002-imx8mp-2ghz-opp.patch"
"linux/patches6.17/imx8mp-mnt-pocket-reform/audio/0000-revert-crashy-audiomix-pm-support.patch"
"linux/patches6.17/imx8mp-mnt-pocket-reform/mmc-sdio/0001-sdhci-add-no-sd-uhs-sdr104-devicetree-property.patch"
"linux/patches6.17/imx8mp-mnt-pocket-reform/mmc-sdio/0002-During-the-card-init-the-host-side-sometimes-may-nee.patch"
"linux/patches6.17/imx8mp-mnt-pocket-reform/mmc-sdio/0003-USDHC-IP-has-one-limitation-the-tuning-circuit-can-t.patch"
"linux/patches6.17/imx8mp-mnt-pocket-reform/pocket-panel/0001-v5-add-multi-display-panel-driver.patch"
"linux/patches6.17/imx8mp-mnt-pocket-reform/pocket-panel/0002-pocket-panel-fix-sleep-add-orientation.patch"
"linux/patches6.17/imx8mp-mnt-reform2/0001-sn65dsi86-use-hs-clock-of-samsung-dsim-host-directly.patch"
"linux/patches6.17/imx8mp-mnt-reform2/0002-lcdif-dont-exceed-desired-pixel-clock.patch"
"linux/patches6.17/imx8mq-mnt-reform2/0001-imx8mq-mnt-reform2.dts-multiple-fixes-for-display-wi.patch"
"linux/patches6.17/imx8mq-mnt-reform2/0001-nwl-dsi-fixup-mode-only-for-LCDIF-input-not-DCSS.patch"
"linux/patches6.17/imx8mq-mnt-reform2/0002-Revert-drm-bridge-nwl-dsi-Use-vsync-hsync-polarity-f.patch"
"linux/patches6.17/imx8mq-mnt-reform2/0003-lcdif-fix-pcie-interference.patch"
"linux/patches6.17/imx8mq-mnt-reform2/0004-mnt4002-imx-gpcv2-wake-smccc.patch.patch"
"linux/patches6.17/imx8mq-mnt-reform2/0005-pci-imx6-add-support-for-internal-refclk-imx8mq.patch"
"linux/patches6.17/imx8mq-mnt-reform2/0006-imx8mq-import-HDMI-driver-and-make-DCSS-compatible-w.patch"
"linux/patches6.17/ls1028a-mnt-reform2/0000-dtsi-add-hdptx.patch"
"linux/patches6.17/meson-g12b-bananapi-cm4-mnt-pocket-reform/0001-a311d-viu-fifo-lines-config.patch"
"linux/patches6.17/meson-g12b-bananapi-cm4-mnt-pocket-reform/0002-a311d-viu-fifo-lines-config-header.patch"
"linux/patches6.17/meson-g12b-bananapi-cm4-mnt-pocket-reform/0003-tlv320aic31xx-add-1228800hz-support.patch"
"linux/patches6.17/meson-g12b-bananapi-cm4-mnt-reform2/0001-Revert-drm-bridge-synopsys-dw-mipi-dsi-enable-EoTp-b.patch"
"linux/patches6.17/meson-g12b-bananapi-cm4-mnt-reform2/0001-meson-g12b-bananapi-cm4-mnt-reform2.dts-fix-audio-an.patch"
"linux/patches6.17/meson-g12b-bananapi-cm4-mnt-reform2/0011-dw-mipi-dsi-phy-stop-wait-time.patch"
"linux/patches6.17/meson-g12b-bananapi-cm4-mnt-reform2/0012-innolux-n125hce-gn1-timing-tweaks.patch"
"linux/patches6.17/meson-g12b-bananapi-cm4-mnt-reform2/0013-meson-viu-hold-fifo-lines.patch"
"linux/patches6.17/meson-g12b-bananapi-cm4-mnt-reform2/0014-meson-venc-sync.patch.patch"
"linux/patches6.17/meson-g12b-bananapi-cm4-mnt-reform2/0015-meson-dw-mipi-dsi-sync-invert.patch"
"linux/patches6.17/meson-g12b-bananapi-cm4-mnt-reform2/0016-sn65dsi86-burst-mode-support.patch"
"linux/patches6.17/meson-g12b-bananapi-cm4-mnt-reform2/0018-sn65dsi86-never-turn-off.patch"
"linux/patches6.17/meson-g12b-bananapi-cm4-mnt-reform2/0020-LOCAL-ALSA-Assign-internal-PCM-chmap-ELD-IEC958-kctl.patch"
"linux/patches6.17/meson-g12b-bananapi-cm4-mnt-reform2/0021-HACK-of-partial-revert-of-fdt.c-changes.patch"
"linux/patches6.17/meson-g12b-bananapi-cm4-mnt-reform2/0022-add-bt-and-eth-resets.patch"
"linux/patches6.17/meson-g12b-bananapi-cm4-mnt-reform2/0023-sdio-pullups.patch"
"linux/patches6.17/meson-g12b-bananapi-cm4-mnt-reform2/0024-sdio-improve-wifi-speed.patch"
"linux/patches6.17/meson-g12b-bananapi-cm4-mnt-reform2/0030-WORKAROUND-meson-plane-disable-afbc-32x8.patch"
"linux/patches6.17/rk3588-mnt-reform2/0001-MERGED-drm-bridge-Pass-down-connector-to-drm-bridge-.patch"
"linux/patches6.17/rk3588-mnt-reform2/0024-math.h-add-DIV_ROUND_UP_NO_OVERFLOW.patch"
"linux/patches6.17/rk3588-mnt-reform2/0025-clk-divider-Fix-divisor-masking-on-64-bit-platforms.patch"
"linux/patches6.17/rk3588-mnt-reform2/0026-clk-composite-replace-open-coded-abs_diff.patch"
"linux/patches6.17/rk3588-mnt-reform2/0030-mfd-rk8xx-Fix-shutdown-handler.patch"
"linux/patches6.17/rk3588-mnt-reform2/0031-dt-bindings-display-vop2-Add-VP-clock-resets.patch"
"linux/patches6.17/rk3588-mnt-reform2/0032-drm-rockchip-vop2-Add-clock-resets-support.patch"
"linux/patches6.17/rk3588-mnt-reform2/0033-arm64-dts-rockchip-Add-VOP-clock-resets-for-rk3588s.patch"
"linux/patches6.17/rk3588-mnt-reform2/0035-drm-rockchip-vop2-Add-core-reset-support.patch"
"linux/patches6.17/rk3588-mnt-reform2/0036-dt-bindings-display-rockchip-Add-schema-for-RK3588-D.patch"
"linux/patches6.17/rk3588-mnt-reform2/0037-drm-bridge-synopsys-Add-DW-DPTX-Controller-support-l.patch"
"linux/patches6.17/rk3588-mnt-reform2/0038-drm-rockchip-Add-RK3588-DPTX-output-support.patch"
"linux/patches6.17/rk3588-mnt-reform2/0042-arm64-dts-rockchip-Add-DP0-for-rk3588.patch"
"linux/patches6.17/rk3588-mnt-reform2/0043-arm64-dts-rockchip-Add-DP1-for-rk3588.patch"
"linux/patches6.17/rk3588-mnt-reform2/0046-arm64-defconfig-Enable-Rockchip-RK3588-DisplayPort-C.patch"
"linux/patches6.17/rk3588-mnt-reform2/0055-phy-rockchip-usbdp-move-orientation-handling-further.patch"
"linux/patches6.17/rk3588-mnt-reform2/0056-phy-rockchip-usbdp-reset-USB3-and-reinit-on-orientat.patch"
"linux/patches6.17/rk3588-mnt-reform2/0063-thermal-rockchip-unify-struct-rockchip_tsadc_chip-fo.patch"
"linux/patches6.17/rk3588-mnt-reform2/0064-thermal-rockchip-shut-up-GRF-warning.patch"
"linux/patches6.17/rk3588-mnt-reform2/0065-thermal-rockchip-simplify-GRF-logic.patch"
"linux/patches6.17/rk3588-mnt-reform2/0067-PCI-dw-rockchip-Add-system-PM-support.patch"
"linux/patches6.17/rk3588-mnt-reform2/0068-drm-bridge-dw-hdmi-qp-Add-CEC-support.patch"
"linux/patches6.17/rk3588-mnt-reform2/0069-drm-bridge-dw-hdmi-qp-Fixup-timer-base-setup.patch"
"linux/patches6.17/rk3588-mnt-reform2/0070-drm-rockchip-dw_hdmi_qp-Improve-error-handling-with-.patch"
"linux/patches6.17/rk3588-mnt-reform2/0071-drm-rockchip-dw_hdmi_qp-Provide-CEC-IRQ-in-dw_hdmi_q.patch"
"linux/patches6.17/rk3588-mnt-reform2/0072-drm-rockchip-dw_hdmi_qp-Provide-ref-clock-rate-in-dw.patch"
"linux/patches6.17/rk3588-mnt-reform2/0073-arm64-defconfig-Enable-DW-HDMI-QP-CEC-support.patch"
"linux/patches6.17/rk3588-mnt-reform2/0075-phy-hdmi-Add-HDMI-2.1-FRL-configuration-options.patch"
"linux/patches6.17/rk3588-mnt-reform2/0076-phy-rockchip-samsung-hdptx-Fix-reported-clock-rate-i.patch"
"linux/patches6.17/rk3588-mnt-reform2/0077-phy-rockchip-samsung-hdptx-Reduce-ROPLL-loop-bandwid.patch"
"linux/patches6.17/rk3588-mnt-reform2/0078-phy-rockchip-samsung-hdptx-Prevent-Inter-Pair-Skew-f.patch"
"linux/patches6.17/rk3588-mnt-reform2/0079-phy-rockchip-samsung-hdptx-Use-usleep_range-instead-.patch"
"linux/patches6.17/rk3588-mnt-reform2/0080-phy-rockchip-samsung-hdptx-Fix-coding-style-alignmen.patch"
"linux/patches6.17/rk3588-mnt-reform2/0081-phy-rockchip-samsung-hdptx-Consistently-use-rk_-hdpt.patch"
"linux/patches6.17/rk3588-mnt-reform2/0082-phy-rockchip-samsung-hdptx-Enable-lane-output-in-com.patch"
"linux/patches6.17/rk3588-mnt-reform2/0083-phy-rockchip-samsung-hdptx-Cleanup-_cmn_init_seq-lis.patch"
"linux/patches6.17/rk3588-mnt-reform2/0084-phy-rockchip-samsung-hdptx-Compute-clk-rate-from-PLL.patch"
"linux/patches6.17/rk3588-mnt-reform2/0085-phy-rockchip-samsung-hdptx-Drop-hw_rate-driver-data.patch"
"linux/patches6.17/rk3588-mnt-reform2/0086-phy-rockchip-samsung-hdptx-Switch-to-driver-specific.patch"
"linux/patches6.17/rk3588-mnt-reform2/0087-phy-rockchip-samsung-hdptx-Extend-rk_hdptx_phy_verif.patch"
"linux/patches6.17/rk3588-mnt-reform2/0088-phy-rockchip-samsung-hdptx-Add-HDMI-2.1-FRL-support.patch"
"linux/patches6.17/rk3588-mnt-reform2/0089-drm-rockchip-vop2-Check-bpc-before-switching-DCLK-so.patch"
"linux/patches6.17/rk3588-mnt-reform2/0090-drm-bridge-dw-hdmi-qp-Handle-platform-supported-form.patch"
"linux/patches6.17/rk3588-mnt-reform2/0091-drm-rockchip-dw_hdmi_qp-Switch-to-phy_configure.patch"
"linux/patches6.17/rk3588-mnt-reform2/0092-drm-rockchip-dw_hdmi_qp-Use-bit-macros-for-RK3576-re.patch"
"linux/patches6.17/rk3588-mnt-reform2/0093-drm-rockchip-dw_hdmi_qp-Add-high-color-depth-support.patch"
"linux/patches6.17/rk3588-mnt-reform2/0094-DEBUG-phy-rockchip-samsung-hdptx-Add-verbose-logging.patch"
"linux/patches6.17/rk3588-mnt-reform2/0095-WIP-SCRAMB-drm-bridge-Add-detect_ctx-hook.patch"
"linux/patches6.17/rk3588-mnt-reform2/0096-WIP-SCRAMB-drm-bridge-connector-Switch-from-detect-t.patch"
"linux/patches6.17/rk3588-mnt-reform2/0097-WIP-SCRAMB-drm-bridge-dw-hdmi-qp-Add-high-TMDS-clock.patch"
"linux/patches6.17/rk3588-mnt-reform2/0098-WIP-YUV420-drm-rockchip-vop2-Add-YUV420-output-forma.patch"
"linux/patches6.17/rk3588-mnt-reform2/0099-WIP-YUV420-drm-rockchip-dw_hdmi_qp-Add-YUV420-output.patch"
"linux/patches6.17/rk3588-mnt-reform2/0100-WIP-FRL-dt-bindings-display-rockchip-Add-tmds-enable.patch"
"linux/patches6.17/rk3588-mnt-reform2/0101-WIP-FRL-drm-rockchip-dw_hdmi_qp-Fixup-usage-of-enabl.patch"
"linux/patches6.17/rk3588-mnt-reform2/0103-WIP-FRL-arm64-dts-rockchip-Assign-ACLK_VOP-to-750-MH.patch"
"linux/patches6.17/rk3588-mnt-reform2/0104-WIP-FRL-drm-connector-hdmi-Handle-FRL-in-hdmi_clock_.patch"
"linux/patches6.17/rk3588-mnt-reform2/0105-WIP-FRL-drm-bridge-dw-hdmi-qp-Add-HDMI-2.1-FRL-suppo.patch"
"linux/patches6.17/rk3588-mnt-reform2/0106-WIP-FRL-drm-rockchip-dw_hdmi_qp-Add-HDMI-2.1-FRL-sup.patch"
"linux/patches6.17/rk3588-mnt-reform2/0107-WIP-FRL-drm-rockchip-vop2-Add-HDMI-2.1-FRL-support.patch"
"linux/patches6.17/rk3588-mnt-reform2/0108-dt-bindings-phy-rockchip-usbdp-add-improved-ports-sc.patch"
"linux/patches6.17/rk3588-mnt-reform2/0114-media-dt-bindings-video-interfaces-add-defines-for-s.patch"
"linux/patches6.17/rk3588-mnt-reform2/0142-drm-bridge-dw-hdmi-qp-Fix-spurious-IRQ-on-resume.patch"
"linux/patches6.17/rk3588-mnt-reform2/2001-drm-bridge-dw-hdmi-qp-Return-0-in-audio-prepare-when.patch"
"linux/patches6.17/rk3588-mnt-reform2/2003-drm-bridge-synopsys-Do-not-warn-about-audio-params-c.patch"
"linux/patches6.17/rk3588-mnt-reform2/5200-drm-rockchip-Set-dma-mask-to-64-bit.patch"
]
+4 -2
View File
@@ -14,8 +14,8 @@ stdenv.mkDerivation rec {
domain = "source.mnt.re";
owner = "reform";
repo = "reform-tools";
rev = "45f930403492aa2156522bfe30edb02e33494b69";
hash = "sha256-no33CsV69nu1TR0cqxQDd1bFXqhjqOW9IUDxds0fyxE=";
rev = "95fff02ea84386e4e9815ee650032b1a5bd6107c";
hash = "sha256-bFiVvpLTboxhA5SmMcf60iazEsgFehabsdqZMZ3APuI=";
};
sourceRoot = "source/lpc";
@@ -26,7 +26,9 @@ stdenv.mkDerivation rec {
nativeBuildInputs = kernel.moduleBuildDependencies;
installPhase = ''
runHook preInstall
make -C "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" M="$(pwd)" INSTALL_MOD_PATH=$out modules_install $makeFlags
runHook postInstall
'';
makeFlags = kernelModuleMakeFlags ++ [
+23
View File
@@ -0,0 +1,23 @@
{
lib,
callPackage,
}:
rec {
reform-flash-uboot =
lib.mapAttrs (_name: config: callPackage ./reform-flash-uboot.nix { inherit config; })
{
reform2-rk3588-dsi = {
warn = true;
mmc = "mmcblk0";
mmcBoot0 = false;
ubootOffset = 32768;
flashbinOffset = 0;
image = "${ubootImage.reform2-rk3588-dsi}/rk3588-mnt-reform2-dsi-flash.bin";
};
};
uboot.reform2-rk3588-dsi = callPackage ../rk3588/uboot.nix { };
ubootImage.reform2-rk3588-dsi = callPackage ../rk3588/uboot-image.nix {
uboot = uboot.reform2-rk3588-dsi;
};
}
+44
View File
@@ -0,0 +1,44 @@
{
lib,
writeShellApplication,
config,
}:
let
dev = "/dev/" + config.mmc + lib.optionalString config.mmcBoot0 "boot0";
in
writeShellApplication {
name = "reform-flash-uboot";
text = ''
if [ "$(id -u)" -ne 0 ]; then
echo "reform-flash-uboot has to be run as root / using sudo."
exit 1
fi
''
+ lib.optionalString config.warn ''
echo "W: Flashing u-boot to eMMC on $(cat /proc/device-tree/model) is not without risk." >&2
echo "W: If you flash the wrong u-boot or if the flashing process goes wrong, it is" >&2
echo "W: possible to soft-brick your board. Restoring it might need some extra hardware." >&2
echo "W: Please only proceed if you are sure that the benefits outweigh the risks for you." >&2
printf "Are you sure you want to proceed? [y/N] "
read -r response
if [ "$response" != "y" ]; then
echo "Exiting."
exit
fi
''
+ ''
echo "Writing ${config.image} to ${dev}" >&2
''
+ lib.optionalString config.mmcBoot0 ''
echo 0 >"/sys/class/block/${config.mmc}boot0/force_ro"
''
+ ''
dd if='${config.image}' of='${dev}' bs=512 seek='${
builtins.toString (config.ubootOffset / 512)
}' skip='${builtins.toString (config.flashbinOffset / 512)}'
''
+ lib.optionalString config.mmcBoot0 ''
echo 1 >"/sys/class/block/${config.mmc}boot0/force_ro"
'';
}
-25
View File
@@ -1,25 +0,0 @@
{
runCommand,
uboot,
fetchFromGitHub,
}:
# script from https://source.mnt.re/reform/reform-rk3588-uboot/-/blob/b530d65f4a878c0329a594fa248ba8da59d2e05f/build.sh
runCommand "mnt-reform-firmware-rk3855${uboot.variant}" { } ''
mkdir $out
cp -r ${uboot} u-boot
cp -r ${uboot.rkbin} rkbin
chmod -R +rw u-boot
chmod -R +rw rkbin
cd u-boot
mkdir spl
mv u-boot-spl.bin spl
../rkbin/tools/boot_merger rock5b-rk3588.ini
cd ..
# rkbin stuff
cd rkbin
./tools/boot_merger RKBOOT/RK3588MINIALL.ini
# concatenate
cd ..
cp u-boot/idbloader.img $out/mnt-reform2-rk3588${uboot.variant}-flash.bin
dd if=u-boot/u-boot.itb of=$out/mnt-reform2-rk3588${uboot.variant}-flash.bin seek=16320
''
+3 -3
View File
@@ -44,8 +44,8 @@
storeContents = config.installerImage.storeContents;
comp = config.installerImage.squashfsCompression;
};
uboot = pkgs.callPackage ./uboot.nix { };
firmware = pkgs.callPackage ./firmware.nix { inherit uboot; };
packages = pkgs.callPackage ../pkgs { };
ubootImage = packages.ubootImage.reform2-rk3588-dsi;
content = pkgs.callPackage (
{
stdenv,
@@ -215,7 +215,7 @@
eval $(partx $img -o START,SECTORS --nr 1 --pairs)
dd conv=notrunc if=${content} of=$img seek=$START count=$SECTORS
dd conv=notrunc if=${firmware}/mnt-reform2-rk3588-dsi-flash.bin of=$img seek=64
dd conv=notrunc if=${ubootImage}/rk3588-mnt-reform2-dsi-flash.bin of=$img seek=64
if test -n "$compressImage"; then
zstd -T$NIX_BUILD_CORES --rm $img
+11
View File
@@ -0,0 +1,11 @@
{
runCommand,
uboot,
fetchFromGitHub,
}:
# script from https://source.mnt.re/reform/reform-rk3588-uboot/-/blob/28289e36cd1cb90b302780e83b014250c880c4ec/build.sh
runCommand "mnt-reform-uboot-image-rk3855${uboot.variant}" { } ''
mkdir $out
cp ${uboot}/idbloader.img $out/rk3588-mnt-reform2${uboot.variant}-flash.bin
dd if=${uboot}/u-boot.itb of=$out/rk3588-mnt-reform${uboot.variant}-flash.bin seek=16320
''
+6 -5
View File
@@ -10,14 +10,14 @@ let
domain = "source.mnt.re";
owner = "reform";
repo = "reform-rk3588-uboot";
rev = "55bca0174e7bb449e96028d64ad8348f5af35977";
hash = "sha256-A3u1afGK65cGOwENQtu8Hh+fLsSDNxc3rEebkd3QOic=";
rev = "28289e36cd1cb90b302780e83b014250c880c4ec";
hash = "sha256-fWGyC+rlfL0NYYRFLvdF7EiO3s9GfFkfhAbTEM5ECAM=";
};
rkbin = fetchFromGitHub {
owner = "rockchip-linux";
repo = "rkbin";
rev = "f43a462e7a1429a9d407ae52b4745033034a6cf9";
hash = "sha256-geESfZP8ynpUz/i/thpaimYo3kzqkBX95gQhMBzNbmk=";
rev = "272136301989d493000425935bd4ead0ef04d06b";
hash = "sha256-qXnuZyFNc6gYTkAtPg1t9WHwj8OiTxOLvsHUuvolK/w=";
};
in
buildUBoot rec {
@@ -32,6 +32,7 @@ buildUBoot rec {
patches = [
"${mntPatches}/0001-ini-ddrbin-bump.patch"
"${mntPatches}/0002-add-target-init-mnt-reform-series.patch"
"${mntPatches}/0003-scripts-dtc-pylibfdt-libfdt-i_shipped-Use-SWIG_AppendOutp.patch"
];
prePatch = ''
cp ${mntPatches}/*.dts arch/arm/dts/
@@ -45,7 +46,7 @@ buildUBoot rec {
"spl/u-boot-spl.bin"
];
variant = "-dsi";
defconfig = "mnt-reform2-rk3588${variant}_defconfig";
defconfig = "rk3588-mnt-reform2${variant}_defconfig";
extraMakeFlags = [
"BL31=${armTrustedFirmwareRK3588}/bl31.elf"
"ROCKCHIP_TPL=${rkbin}/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.18.bin"
+10
View File
@@ -0,0 +1,10 @@
{
"modDirVersion": "6.17.8",
"reformDebianPackages": {
"domain": "source.mnt.re",
"owner": "reform",
"repo": "reform-debian-packages",
"rev": "8268e5ebcf049afad80b470025adba75305d2c80",
"hash": "sha256-Set1jLoiyCAgE9vlRpwsFzDueHmp+B680+JxCVth6+U="
}
}
+10
View File
@@ -0,0 +1,10 @@
let
nixpkgs = import <nixpkgs> { };
pkgs = nixpkgs.pkgs;
lib = nixpkgs.lib;
sources = lib.importJSON ./sources.json;
reformDebianPackages = pkgs.fetchFromGitLab sources.reformDebianPackages;
in
map (lib.removePrefix "${reformDebianPackages}/") (
lib.filesystem.listFilesRecursive "${reformDebianPackages}/linux/patches${lib.versions.majorMinor sources.modDirVersion}"
)
+4
View File
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
nix eval --file updateKernelPatches.nix > kernelPatches.nix
nix fmt kernelPatches.nix
+49
View File
@@ -38,3 +38,52 @@ Code snippet example that enables 'imx8mp-evk/imx8mq-evk/imx93-evk' configuratio
}
```
### 2.3 Building Boot Images
Boot images for flashing to SD cards can be built directly from the flake:
```bash
# Build boot image for i.MX8MP EVK
nix build github:NixOS/nixos-hardware#packages.aarch64-linux.imx8mp-boot
# Build boot image for i.MX8MQ EVK
nix build github:NixOS/nixos-hardware#packages.aarch64-linux.imx8mq-boot
# Build boot image for i.MX93 EVK
nix build github:NixOS/nixos-hardware#packages.aarch64-linux.imx93-boot
# Or from a local checkout
nix build .#packages.aarch64-linux.imx8mp-boot
```
The boot image will be available at `./result/image/flash.bin`.
**Note:** These packages target `aarch64-linux`. If you're on a different architecture (e.g., x86_64-linux), you'll need remote builders configured for aarch64-linux.
### 2.4 Flashing to SD Card
Once built, you can flash the boot image to an SD card:
```bash
# For i.MX8MP and i.MX93 (32KB offset):
sudo dd if=./result/image/flash.bin of=/dev/sdX bs=1k seek=32 conv=fsync
# For i.MX8MQ (33KB offset):
sudo dd if=./result/image/flash.bin of=/dev/sdX bs=1k seek=33 conv=fsync
```
**Note:** Different i.MX processors require different offsets. i.MX8MP and i.MX93 use 32KB (seek=32), while i.MX8MQ uses 33KB (seek=33).
**Warning:** Double-check the device path to avoid overwriting the wrong disk!
## 3. Upstream Documentation
### U-Boot Board Documentation
- [NXP i.MX8MP EVK U-Boot Documentation](https://docs.u-boot.org/en/latest/board/nxp/imx8mp_evk.html)
- [NXP i.MX8MQ EVK U-Boot Documentation](https://docs.u-boot.org/en/latest/board/nxp/imx8mq_evk.html)
- [NXP i.MX93 11x11 EVK U-Boot Documentation](https://docs.u-boot.org/en/latest/board/nxp/imx93_11x11_evk.html)
- [NXP i.MX95 EVK U-Boot Documentation](https://docs.u-boot.org/en/latest/board/nxp/imx95_evk.html)
### Additional Resources
- [NXP i.MX 8M Series TF-A Documentation](https://trustedfirmware-a.readthedocs.io/en/latest/plat/imx8m.html)
+4 -4
View File
@@ -16,12 +16,12 @@ pkgs.stdenv.mkDerivation rec {
--replace 'CC = gcc' 'CC = clang'
'';
nativeBuildInputs = [
clang
git
depsBuildBuild = [
pkgs.buildPackages.stdenv.cc
];
buildInputs = [
nativeBuildInputs = [
clang
git
glibc.static
];
+4 -4
View File
@@ -13,9 +13,9 @@
}:
let
inherit (pkgs.buildPackages) python3;
toolchain = pkgs.gccStdenv.cc;
binutils = pkgs.gccStdenv.cc.bintools.bintools_bin;
cpp = pkgs.gccStdenv.gcc;
toolchain = pkgs.stdenv.cc;
binutils = pkgs.stdenv.cc.bintools.bintools_bin;
cpp = pkgs.stdenv.cc;
# Determine PLATFORM and PLATFORM_FLAVOR from platformFlavor
# Format can be either "imx-mx93evk" (full platform string) or "mx8mpevk" (just flavor, platform is "imx")
@@ -58,7 +58,7 @@ pkgs.stdenv.mkDerivation {
substituteInPlace mk/gcc.mk \
--replace-fail "\$(CROSS_COMPILE_\$(sm))ar" ${binutils}/bin/${toolchain.targetPrefix}ar
substituteInPlace mk/gcc.mk \
--replace-fail "\$(CROSS_COMPILE_\$(sm))cpp"${cpp}/bin/${toolchain.targetPrefix}cpp
--replace-fail "\$(CROSS_COMPILE_\$(sm))cpp" ${cpp}/bin/${toolchain.targetPrefix}cpp
'';
makeFlags = [
+1 -1
View File
@@ -1,6 +1,6 @@
{ pkgs, lib, ... }:
{
nixpkgs.hostPlatform = "aarch64-linux";
nixpkgs.hostPlatform.system = "aarch64-linux";
boot = {
kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/linux-imx8.nix { });
+8 -15
View File
@@ -2,7 +2,6 @@
pkgs,
enable-tee ? true,
}:
with pkgs;
let
fw-ver = "202006";
cp-tee = if enable-tee then "install -m 0644 ${imx8mp-optee-os}/tee.bin ./iMX8M/tee.bin" else "";
@@ -22,7 +21,7 @@ let
shortRev = builtins.substring 0 8 src.rev;
in
{
imx8m-boot = pkgs.stdenv.mkDerivation rec {
imx8m-boot = pkgs.buildPackages.stdenv.mkDerivation {
inherit src;
name = "imx8mp-mkimage";
version = "lf-6.1.55-2.2.0";
@@ -30,22 +29,16 @@ in
postPatch = ''
substituteInPlace Makefile \
--replace 'git rev-parse --short=8 HEAD' 'echo ${shortRev}'
substituteInPlace Makefile \
--replace 'CC = gcc' 'CC = clang'
patchShebangs scripts
'';
nativeBuildInputs = [
clang
git
dtc
];
buildInputs = [
git
glibc.static
zlib
zlib.static
pkgs.buildPackages.stdenv.cc
pkgs.buildPackages.git
pkgs.buildPackages.dtc
pkgs.buildPackages.glibc.static
pkgs.buildPackages.zlib
pkgs.buildPackages.zlib.static
];
buildPhase = ''
@@ -54,7 +47,7 @@ in
make bin
make SOC=iMX8MP mkimage_imx8
cp -v ${pkgs.ubootTools}/bin/mkimage ./iMX8M/mkimage_uboot
cp -v ${pkgs.buildPackages.ubootTools}/bin/mkimage ./iMX8M/mkimage_uboot
install -m 0644 ${imx8mp-uboot}/u-boot-spl.bin ./iMX8M/u-boot-spl.bin
install -m 0644 ${imx8mp-uboot}/u-boot-nodtb.bin ./iMX8M/u-boot-nodtb.bin
+1 -1
View File
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
dontStrip = true;
installPhase = ''
${pkgs.bash}/bin/bash $src --auto-accept --force
${pkgs.buildPackages.bash}/bin/bash $src --auto-accept --force
mv firmware-imx-${version} $out
'';
}
+1 -1
View File
@@ -4,7 +4,7 @@
...
}:
{
nixpkgs.hostPlatform = "aarch64-linux";
nixpkgs.hostPlatform.system = "aarch64-linux";
boot = {
kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/imx8mp-linux.nix { });
+1 -1
View File
@@ -4,7 +4,7 @@
...
}:
{
nixpkgs.hostPlatform = "aarch64-linux";
nixpkgs.hostPlatform.system = "aarch64-linux";
boot = {
kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/imx8mq-linux.nix { });
+1 -1
View File
@@ -4,7 +4,7 @@
...
}:
{
nixpkgs.hostPlatform = "aarch64-linux";
nixpkgs.hostPlatform.system = "aarch64-linux";
boot = {
kernelPackages = pkgs.linuxPackagesFor (pkgs.callPackage ./bsp/imx93-linux.nix { });
+1 -1
View File
@@ -24,7 +24,7 @@
};
};
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
nixpkgs.hostPlatform.system = lib.mkDefault "aarch64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
}
+6 -1
View File
@@ -32,6 +32,7 @@ let
defconfig = "pine64_star64_defconfig";
kernelPatches = [
{
name = "keys-dh-fix";
patch = fetchpatch {
url = "https://github.com/torvalds/linux/commit/215bebc8c6ac438c382a6a56bd2764a2d4e1da72.diff";
hash = "sha256-1ZqmVOkgcDBRkHvVRPH8I5G1STIS1R/l/63PzQQ0z0I=";
@@ -39,12 +40,16 @@ let
};
}
{
name = "starfive-vin-sensor-fix";
patch = fetchpatch {
url = "https://github.com/starfive-tech/linux/pull/108/commits/9ae8cb751c4d1fd2146b279a8e67887590e9d07a.diff";
hash = "sha256-EY0lno+HkY5mradBUPII3qqu0xh+BVQRzveCQcaht0M=";
};
}
{ patch = ./irq-desc-to-data.patch; }
{
name = "irq-desc-to-data";
patch = ./irq-desc-to-data.patch;
}
]
++ kernelPatches;
+2 -2
View File
@@ -14,7 +14,7 @@ lib.mkIf config.hardware.librem5.customInitrdModules {
"tps6598x"
"xhci_hcd"
"usbcore"
"usb_storage"
"usb-storage"
"uas"
"xhci_plat_hcd"
];
@@ -56,7 +56,7 @@ lib.mkIf config.hardware.librem5.customInitrdModules {
"tps6598x"
"xhci_hcd"
"usbcore"
"usb_storage"
"usb-storage"
"uas"
"xhci_plat_hcd"
];
+5 -5
View File
@@ -1,6 +1,5 @@
{
stdenv,
gcc11Stdenv,
buildUBoot,
fetchurl,
fetchFromGitLab,
@@ -28,7 +27,7 @@ let
meta.license = lib.licenses.unfree;
});
arm-trusted-firmware-imx8mq = gcc11Stdenv.mkDerivation (_fa: {
arm-trusted-firmware-imx8mq = stdenv.mkDerivation (_fa: {
pname = "arm-trusted-firmware-bl31";
version = "unstable-2020-07-08";
src = fetchFromGitLab {
@@ -40,6 +39,7 @@ let
};
enableParallelBuilding = true;
hardeningDisable = [ "all" ];
NIX_CFLAGS_COMPILE = "-Wno-error=array-bounds";
NIX_LDFLAGS = "--no-warn-rwx-segments";
buildFlags = [
"PLAT=imx8mq"
@@ -53,14 +53,14 @@ let
});
ubootLibrem5 = buildUBoot {
version = "unstable-2022-12-15";
version = "unstable-2025-03-25";
defconfig = "librem5_defconfig";
src = fetchFromGitLab {
domain = "source.puri.sm";
owner = "Librem5";
repo = "uboot-imx";
rev = "956aa590c93977992743b41c45d3c7ee5a024915"; # this is the latest commit on the upstream/librem5 branch
hash = "sha256-MsIIlarN+WFFEzc0ptLAgS7BwJ6Cosy42xo0EwPn1AU=";
rev = "72fcd4ee36e0874daac734c1195263cd9ce9d981"; # this is the latest commit on the upstream/librem5 branch
hash = "sha256-ymqZPuyyZoFTaCMQIJnuNs1fV0uVwJhyQdnGwv9m9lE=";
};
patches = [ ];
BL31 = "${arm-trusted-firmware-imx8mq}/bl31.bin";
+1 -1
View File
@@ -9,7 +9,7 @@
kernelPackages = lib.mkDefault pkgs.linuxKernel.packages.linux_rpi3;
initrd.availableKernelModules = [
"usbhid"
"usb_storage"
"usb-storage"
];
};
+5 -5
View File
@@ -31,11 +31,12 @@
kernelPackages = lib.mkDefault pkgs.linuxKernel.packages.linux_rpi4;
initrd.availableKernelModules = [
"usbhid"
"usb_storage"
"usb-storage"
"vc4"
"pcie_brcmstb" # required for the pcie bus to work
"pcie-brcmstb" # required for the pcie bus to work
"reset-raspberrypi" # required for vl805 firmware to load
];
]
++ lib.optional config.boot.initrd.network.enable "genet";
# Allow building kernel
initrd.systemd.tpm2.enable = false;
@@ -55,6 +56,5 @@
}
];
# Required for the Wireless firmware
hardware.enableRedistributableFirmware = true;
hardware.firmware = [ pkgs.raspberrypiWirelessFirmware ];
}
+1 -1
View File
@@ -16,7 +16,7 @@ in
initrd.availableKernelModules = [
"nvme"
"usbhid"
"usb_storage"
"usb-storage"
];
};
+68
View File
@@ -0,0 +1,68 @@
# Razer Blade 14 (RZ09-0530)
Model year: 2025
## Hardware Specifications
- **Model:** RZ09-0530
- **CPU:** AMD Ryzen AI 9 HX 370 (Strix Point)
- **iGPU:** AMD Radeon 880M / 890M
- **dGPU:** NVIDIA GeForce RTX 5060 Max-Q (Blackwell)
- **Display:** 14" 2560x1600 OLED, 240Hz
## Identifying Your Model
```bash
nix-shell -p dmidecode --run "sudo dmidecode -s system-product-name"
# Should output: Blade 14 - RZ09-0530
```
## Usage
```nix
{
imports = [
inputs.nixos-hardware.nixosModules.razer-blade-14-RZ09-0530
];
}
```
## Features
This profile configures:
- AMD CPU with microcode updates
- NVIDIA Prime offload (use `nvidia-offload` command for GPU-intensive applications)
- AMD iGPU for early KMS
- Power management for hybrid graphics
- Proper PCI bus IDs for the hybrid GPU setup
## Optional: OpenRazer for RGB Control
If you want to control the Razer RGB keyboard lighting, you can enable OpenRazer:
```nix
{
hardware.openrazer = {
enable = true;
# Disable keyStatistics if using a keyboard remapper like kanata
keyStatistics = false;
users = [ "your-username" ];
};
# Optional: Polychromatic GUI for RGB control
environment.systemPackages = [ pkgs.polychromatic ];
}
```
## Known Issues
- None reported yet
## Additional Notes
- The NVIDIA RTX 5060 Max-Q uses the Blackwell architecture and works with the open kernel modules (`hardware.nvidia.open = true`)
- Fine-grained power management is enabled by default for better battery life
- Use `nvidia-offload <command>` to run applications on the discrete GPU
+60
View File
@@ -0,0 +1,60 @@
{ config, lib, ... }:
let
inherit (lib) mkDefault;
in
{
imports = [
../../../../common/cpu/amd
../../../../common/gpu/amd
../../../../common/gpu/nvidia/prime.nix
../../../../common/pc/laptop
../../../../common/pc/ssd
../../../../common/wifi/mediatek/mt7925
../../../../common/wifi/mediatek/mt7925/iwd.nix
];
# Razer Blade 14 (RZ09-0530 / 2025) - AMD Ryzen AI 9 HX 370 + NVIDIA RTX 5060 Max-Q
# Enable AMD iGPU and NVIDIA dGPU drivers
services.xserver.videoDrivers = mkDefault [
"amdgpu"
"nvidia"
];
hardware = {
# Firmware for AMD CPU/GPU, WiFi, Bluetooth
enableRedistributableFirmware = mkDefault true;
# Enable AMD iGPU in initrd for early KMS
amdgpu.initrd.enable = mkDefault true;
nvidia = {
modesetting.enable = mkDefault true;
nvidiaSettings = mkDefault true;
# Open kernel modules work on Blackwell (RTX 50 series)
open = mkDefault true;
prime = {
offload = {
enable = mkDefault true;
enableOffloadCmd = mkDefault true;
};
# Bus IDs for Razer Blade 14 2025
# Obtained via: nix shell nixpkgs#pciutils -c lspci -d ::03xx
# c4:00.0 (196:0:0) - NVIDIA GeForce RTX 5060 Max-Q
# c5:00.0 (197:0:0) - AMD Radeon 880M / 890M
amdgpuBusId = "PCI:197:0:0";
nvidiaBusId = "PCI:196:0:0";
};
# Power management for hybrid graphics
powerManagement = {
enable = mkDefault true;
finegrained = mkDefault true;
};
};
};
}
+9 -9
View File
@@ -2,11 +2,11 @@
"nodes": {
"nixos-stable": {
"locked": {
"lastModified": 1755274400,
"narHash": "sha256-rTInmnp/xYrfcMZyFMH3kc8oko5zYfxsowaLv1LVobY=",
"lastModified": 1761597516,
"narHash": "sha256-wxX7u6D2rpkJLWkZ2E932SIvDJW8+ON/0Yy8+a5vsDU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ad7196ae55c295f53a7d1ec39e4a06d922f3b899",
"rev": "daf6dc47aa4b44791372d6139ab7b25269184d55",
"type": "github"
},
"original": {
@@ -18,11 +18,11 @@
},
"nixos-unstable-small": {
"locked": {
"lastModified": 1755375481,
"narHash": "sha256-43PgCQFgFD1nM/7dncytV0c5heNHe/gXrEud18ZWcZU=",
"lastModified": 1761789293,
"narHash": "sha256-zwQKLaUgHSpY6SvB/MDgPYRPomWAmbkS3Xfo6JvFVOA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "35f1742e4f1470817ff8203185e2ce0359947f12",
"rev": "8d42228a0de7c23b012e2f7dd963425a372e1b0e",
"type": "github"
},
"original": {
@@ -46,11 +46,11 @@
]
},
"locked": {
"lastModified": 1750931469,
"narHash": "sha256-0IEdQB1nS+uViQw4k3VGUXntjkDp7aAlqcxdewb/hAc=",
"lastModified": 1761311587,
"narHash": "sha256-Msq86cR5SjozQGCnC6H8C+0cD4rnx91BPltZ9KK613Y=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "ac8e6f32e11e9c7f153823abc3ab007f2a65d3e1",
"rev": "2eddae033e4e74bf581c2d1dfa101f9033dbd2dc",
"type": "github"
},
"original": {
+5
View File
@@ -21,6 +21,11 @@ let
"raspberry-pi-3"
"raspberry-pi-4"
"raspberry-pi-5"
"nxp-imx8mp-evk"
"nxp-imx8mq-evk"
"nxp-imx8qm-mek"
"nxp-imx93-evk"
"ucm-imx95"
];
matchArch =
+1
View File
@@ -69,6 +69,7 @@ def run_eval_test(gcroot_dir: Path, jobs: int) -> list[str]:
failed_profiles = []
cmd = [
"nix-eval-jobs",
"--no-instantiate",
"--extra-experimental-features", "flakes",
"--option", "eval-cache", "false",
"--gc-roots-dir",