Skip to content

Commit

Permalink
Add console.enable option to modules/default.nix (#250)
Browse files Browse the repository at this point in the history
* adding console.enable option to modules/default.nix

* Update modules/default.nix

Co-authored-by: Jared Baur <45740526+jmbaur@users.noreply.github.com>

---------

Co-authored-by: bjordan <bjordan@anduril.com>
Co-authored-by: Jared Baur <45740526+jmbaur@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 30, 2024
1 parent 9ff41ba commit 26c6ed1
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ in
binaries needed for flashing/fusing Jetson SOMs.
'';
};

console.enable = mkOption {
default = config.console.enable;
defaultText = "config.console.enable";
type = types.bool;
description = "Enable boot.kernelParams default console configuration";
};
};
};

Expand Down Expand Up @@ -175,12 +182,14 @@ in
pkgs.nvidia-jetpack.kernelPackages;

boot.kernelParams = [
"console=tty0" # Output to HDMI/DP. May need fbcon=map:0 as well
"console=ttyTCU0,115200" # Provides console on "Tegra Combined UART" (TCU)

# Needed on Orin at least, but upstream has it for both
"nvidia.rm_firmware_active=all"
] ++ lib.optional (lib.hasPrefix "xavier-" cfg.som || cfg.som == "generic") "video=efifb:off"; # Disable efifb driver, which crashes Xavier NX and possibly AGX
]
++ lib.optionals cfg.console.enable [
"console=tty0" # Output to HDMI/DP. May need fbcon=map:0 as well
"console=ttyTCU0,115200" # Provides console on "Tegra Combined UART" (TCU)
]
++ lib.optional (lib.hasPrefix "xavier-" cfg.som || cfg.som == "generic") "video=efifb:off"; # Disable efifb driver, which crashes Xavier NX and possibly AGX

boot.initrd.includeDefaultModules = false; # Avoid a bunch of modules we may not get from tegra_defconfig
boot.initrd.availableKernelModules = [ "xhci-tegra" ]; # Make sure USB firmware makes it into initrd
Expand Down

0 comments on commit 26c6ed1

Please sign in to comment.