From a3895623696b495433d1338969fd19853892f35b Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Fri, 22 Sep 2023 02:14:57 -0400 Subject: Switch boot loader to U-Boot Previously was using Tianocore EDK II build with old platform firmware. Switch to NixOS SD image build, which has stock Raspberry Pi OS firmware (but missing the DTO overlays/ directory) chained into U-Boot. --- hostnix/weebnix/configuration.nix | 7 +++++-- hostnix/weebnix/hardware-configuration.nix | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'hostnix/weebnix') diff --git a/hostnix/weebnix/configuration.nix b/hostnix/weebnix/configuration.nix index b6cf54a..d32c577 100644 --- a/hostnix/weebnix/configuration.nix +++ b/hostnix/weebnix/configuration.nix @@ -10,9 +10,12 @@ ./hardware-configuration.nix ]; - # Use the systemd-boot EFI boot loader. + # https://github.com/NixOS/nixpkgs/issues/122130#issuecomment-1568815007 + boot.initrd.availableKernelModules = [ "uas" "pcie-brcmstb" "reset-raspberrypi" ]; + boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; + # Raspberry Pi has no NVRAM. + boot.loader.efi.canTouchEfiVariables = false; # networking.hostName = "nixos"; # Define your hostname. # Pick only one of the below networking options. diff --git a/hostnix/weebnix/hardware-configuration.nix b/hostnix/weebnix/hardware-configuration.nix index 9d3c7fa..37a06c8 100644 --- a/hostnix/weebnix/hardware-configuration.nix +++ b/hostnix/weebnix/hardware-configuration.nix @@ -8,7 +8,7 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "usbhid" "usb_storage" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; @@ -43,8 +43,9 @@ # still possible to use this option, but it's recommended to use it in conjunction # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enabcm6e4ei0.useDHCP = lib.mkDefault true; + # networking.interfaces.end0.useDHCP = lib.mkDefault true; # networking.interfaces.wlan0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; } -- cgit v1.3.1