mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-03 00:37:14 +08:00
pine64/rockpro64: HDMI output and Network in initrd
This commit is contained in:
committed by
mergify[bot]
parent
ae546d018a
commit
b48cc4dab0
@@ -12,3 +12,11 @@ firmware.
|
||||
|
||||
Alternatively, starting from the _Tow-Boot_ disk image on eMMC is easier to
|
||||
deal with and understand than having to deal with _U-Boot_ manually.
|
||||
|
||||
## Console
|
||||
|
||||
To configure default console I/O to use serial instead of HDMI (default):
|
||||
|
||||
```nix
|
||||
hardware.rockpro64.console = "serial";
|
||||
```
|
||||
|
||||
17
pine64/rockpro64/console.nix
Normal file
17
pine64/rockpro64/console.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
options.hardware.rockpro64.console = lib.mkOption {
|
||||
default = "hdmi";
|
||||
description = "Default console to use at boot.";
|
||||
type = lib.types.enum [
|
||||
"hdmi"
|
||||
"serial"
|
||||
];
|
||||
};
|
||||
config = lib.mkIf (config.hardware.rockpro64.console == "hdmi") {
|
||||
boot.kernelParams = [
|
||||
"console=ttyS0"
|
||||
"console=tty0"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,10 +1,17 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./console.nix
|
||||
];
|
||||
boot.initrd.kernelModules = [
|
||||
# PCIe/NVMe
|
||||
"nvme"
|
||||
"pcie_rockchip_host"
|
||||
"phy_rockchip_pcie"
|
||||
# Network
|
||||
"dwmac_rk"
|
||||
# HDMI
|
||||
"rockchipdrm"
|
||||
];
|
||||
# control the fan on the rockpro64 (like the one in the NAS case)
|
||||
hardware.fancontrol = {
|
||||
|
||||
Reference in New Issue
Block a user