mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-09 03:56:09 +01:00
pine64/rockpro64: HDMI output and Network in initrd
This commit is contained in:
parent
ae546d018a
commit
b48cc4dab0
3 changed files with 32 additions and 0 deletions
|
|
@ -12,3 +12,11 @@ firmware.
|
||||||
|
|
||||||
Alternatively, starting from the _Tow-Boot_ disk image on eMMC is easier to
|
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.
|
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, ... }:
|
{ lib, ... }:
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
./console.nix
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [
|
boot.initrd.kernelModules = [
|
||||||
# PCIe/NVMe
|
# PCIe/NVMe
|
||||||
"nvme"
|
"nvme"
|
||||||
"pcie_rockchip_host"
|
"pcie_rockchip_host"
|
||||||
"phy_rockchip_pcie"
|
"phy_rockchip_pcie"
|
||||||
|
# Network
|
||||||
|
"dwmac_rk"
|
||||||
|
# HDMI
|
||||||
|
"rockchipdrm"
|
||||||
];
|
];
|
||||||
# control the fan on the rockpro64 (like the one in the NAS case)
|
# control the fan on the rockpro64 (like the one in the NAS case)
|
||||||
hardware.fancontrol = {
|
hardware.fancontrol = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue