Skip to content

Commit

Permalink
Workaround for NixOS/nixpkgs#154163
Browse files Browse the repository at this point in the history
  • Loading branch information
notarock committed Oct 14, 2023
1 parent 107f80b commit 55e2296
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions rpi4-image.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
nixpkgs.localSystem.system = "aarch64-linux";
imports =
[ <nixpkgs/nixos/modules/installer/sd-card/sd-image.nix> ./base-config.nix ];
boot.kernelPackages = pkgs.linuxPackages_rpi4;
boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true;
boot.kernelPackages = pkgs.linuxPackages_rpi4;
boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true;

boot.consoleLogLevel = lib.mkDefault 7;
boot.consoleLogLevel = lib.mkDefault 7;

# The serial ports listed here are:
# - ttyS0: for Tegra (Jetson TX1)
# - ttyAMA0: for QEMU's -machine virt
boot.kernelParams =
[ "console=ttyS0,115200n8" "console=ttyAMA0,115200n8" "console=tty0" ];

boot.initrd.availableKernelModules = [
boot.initrd.availableKernelModules = [
# Allows early (earlier) modesetting for the Raspberry Pi
"vc4"
"bcm2835_dma"
Expand All @@ -25,6 +25,15 @@
"sun8i_mixer"
];

# Fix missing modules
# https://github.com/NixOS/nixpkgs/issues/154163
nixpkgs.overlays = [
(final: super: {
makeModulesClosure = x:
super.makeModulesClosure (x // { allowMissing = true; });
})
];

sdImage = {
populateFirmwareCommands = let
configTxt = pkgs.writeText "config.txt" ''
Expand Down

0 comments on commit 55e2296

Please sign in to comment.