Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,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` |
| [Radxa Dragon Q6A](radxa/dragon-q6a) | `<nixos-hardware/radxa/dragon-q6a>` | `dragon-q6a` |
| [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` |
Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@
rock-5b = import ./radxa/rock-5b;
rock-pi-4 = import ./radxa/rock-pi-4;
rock-pi-e = import ./radxa/rock-pi-e;
dragon-q6a = import ./radxa/dragon-q6a;
kobol-helios4 = import ./kobol/helios4;
samsung-np900x3c = import ./samsung/np900x3c;
slimbook-hero-rpl-rtx = import ./slimbook/hero/rpl-rtx;
Expand Down
5 changes: 3 additions & 2 deletions radxa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ Our goals are:
* No support guarantee. We are not here to teach people how to use NixOS.

We explicitly want to avoid packaging the entire vendor SDK bootloader and kernel
in Nix. Those are not going to be accepted in `nixpkgs`, and our targetted audiences
like homelabbers generally ignore the additional hardware features.
in Nix, unless necessary. Those are not going to be accepted in `nixpkgs`, and
our targetted audiences like homelabbers generally ignore the additional hardware
features.

This also aligns with [NixOS on ARM](https://wiki.nixos.org/wiki/NixOS_on_ARM)'s
definition of "support":
Expand Down
54 changes: 54 additions & 0 deletions radxa/dragon-q6a/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
lib,
pkgs,
config,
...
}:
{
imports = [
../.
];

config = {
hardware = {
radxa.enable = true;
};

boot = {
# We need a out-of-tree kernel for Dragon Q6A, otherwise important hardware such as NVME won't work.
kernelPackages = pkgs.linuxPackagesFor (import ./kernel.nix { inherit lib pkgs; });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be part of upstream 6.19. I hope we can wait and just not deal with downstream kernel.

At least this should be lib.mkDefault.

loader = {
systemd-boot = {
enable = lib.mkDefault true;
installDeviceTree = true;
};
efi.canTouchEfiVariables = false;
};
kernelParams = [
"console=ttyMSM0,115200n8"
"earlycon"
"keep_bootcon"
];

initrd = {
availableKernelModules = [
"usb_storage"
"nvme"
"xhci_hcd"
];
};
};

console.earlySetup = lib.mkDefault true;

hardware = {
firmware = with pkgs; [
linux-firmware
];
deviceTree = {
enable = true;
name = "qcom/qcs6490-radxa-dragon-q6a.dtb";
};
};
};
}
31 changes: 31 additions & 0 deletions radxa/dragon-q6a/kernel.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
lib,
pkgs,
...
}:
pkgs.buildLinux {
defconfig = "qcom_module_defconfig";
version = "6.17.1-4-q6a-radxa";
modDirVersion = "6.17.1";

src = pkgs.fetchFromGitHub {
owner = "radxa";
repo = "kernel";
# Fixed in https://github.com/radxa-pkg/linux-qcom/tree/6.17.1-4
rev = "996b43f72835d22c2f79e1f476dd34f90f9e69bb";
hash = "sha256-5nWveVNY5GevkBws1CjKf6WOGLFakBgiNzBsf6B2rrQ=";
};

structuredExtraConfig = with lib.kernel; {
EFI_ZBOOT = lib.mkForce no;
NVME_AUTH = lib.mkForce yes;
};

extraConfig = ''
NOVA_CORE n
COMPRESSED_INSTALL n
WLAN_VENDOR_AIC8800 n
'';

ignoreConfigErrors = true;
}