mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-16 16:09:40 +01:00
ff1b798346
As suggested by @Mic92 in https://github.com/NixOS/nixpkgs/pull/111034 I'm submitting my fixes for the FriendlyARM NanoPC-T4 device. I'm not sure if forcing a specific kernel version is kosher, but on the other hand I don't know if my kernel config changes will work on any other version. I'm open to suggestions as to how to do this better. Also unusure if I should call the folder `friendlyarm` or `friendlyelec`. Signed-off-by: Jakub Sokołowski <jakub@status.im>
26 lines
797 B
Nix
26 lines
797 B
Nix
{ lib, pkgs, ... }:
|
|
|
|
{
|
|
boot.loader = {
|
|
grub.enable = lib.mkDefault false;
|
|
# Enables the generation of /boot/extlinux/extlinux.conf.
|
|
generic-extlinux-compatible.enable = lib.mkDefault true;
|
|
};
|
|
|
|
# UART debug console bitrates.
|
|
services.mingetty.serialSpeed = [ 1500000 115200 ];
|
|
|
|
# Enable additional firmware (such as Wi-Fi drivers).
|
|
hardware.enableRedistributableFirmware = lib.mkDefault true;
|
|
|
|
# Fix for not detecting the M.2 NVMe SSD. Will cause recompilation.
|
|
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.10") (lib.mkDefault pkgs.linuxPackages_latest);
|
|
boot.kernelPatches = lib.mkDefault [{
|
|
name = "pcie-rockchip-config.patch";
|
|
patch = null;
|
|
extraConfig = ''
|
|
PHY_ROCKCHIP_PCIE y
|
|
PCIE_ROCKCHIP_HOST y
|
|
'';
|
|
}];
|
|
}
|