From d9a6511cee50abbf940b9b235d2f36602671970e Mon Sep 17 00:00:00 2001 From: Christopher James Hayward Date: Sat, 19 Jun 2021 10:35:38 -0400 Subject: [PATCH] Enable serial GPIO headers --- README.org | 14 ++++++++------ hosts/raspberry/hardware.nix | 14 +++++++------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/README.org b/README.org index 74cfcb2..f60cdf8 100644 --- a/README.org +++ b/README.org @@ -722,6 +722,8 @@ Deploy this configuration with ~sudo nixos-rebuild switch --flake /etc/dotfiles/ *** Hardware +This section is very much a work in progress. I have struggled to get this device to boot according to the NixOS documentation / wiki on the subject. It seems that when running with the vendored kernel there's an issue booting from the SD card. Nevertheless, the issue is avoided by using the standard kernel. + #+BEGIN_SRC nix :noweb yes :tangle hosts/raspberry/hardware.nix # <> { config, pkgs, lib, inputs, ... }: @@ -734,12 +736,12 @@ Deploy this configuration with ~sudo nixos-rebuild switch --flake /etc/dotfiles/ # boot.kernelPackages = pkgs.linuxPackages_rpi4; boot.tmpOnTmpfs = true; boot.initrd.availableKernelModules = [ "usbhid" "usb_storage" ]; - # boot.kernelParams = [ - # "8250.nr_uarts=1" - # "console=ttyAMA0,115200" - # "console=tty1" - # "cma=128M" - # ]; + boot.kernelParams = [ + "8250.nr_uarts=1" + "console=ttyAMA0,115200" + "console=tty1" + "cma=128M" + ]; boot.loader.grub.enable = false; boot.loader.generic-extlinux-compatible.enable = true; diff --git a/hosts/raspberry/hardware.nix b/hosts/raspberry/hardware.nix index 3209312..fb876f1 100644 --- a/hosts/raspberry/hardware.nix +++ b/hosts/raspberry/hardware.nix @@ -6,15 +6,15 @@ # inputs.nixos-hardware.nixosModules.raspberry-pi-4 # ]; - boot.kernelPackages = pkgs.linuxPackages_rpi4; + # boot.kernelPackages = pkgs.linuxPackages_rpi4; boot.tmpOnTmpfs = true; boot.initrd.availableKernelModules = [ "usbhid" "usb_storage" ]; - # boot.kernelParams = [ - # "8250.nr_uarts=1" - # "console=ttyAMA0,115200" - # "console=tty1" - # "cma=128M" - # ]; + boot.kernelParams = [ + "8250.nr_uarts=1" + "console=ttyAMA0,115200" + "console=tty1" + "cma=128M" + ]; boot.loader.grub.enable = false; boot.loader.generic-extlinux-compatible.enable = true;