Skip to content

Raspberry Pi 3 Support #22014

@fdietze

Description

@fdietze

So far, I was unable to install nix on rpi3. What I tried:

  • Flash Armv7 image to sdcard and boot Pi. Kernel does not boot, missing dtb files. So I copied bcm2710-rpi-3-b.dtb and bcm2837-rpi-3-b.dtb from the official raspberry image on the sdcard.
  • It boots but has a black screen.
  • I copied my public key into /root/.ssh/authorized_keys, bootet pi and blindly typed systemctl start sshd. It worked! Now I had ssh access to my pi.
  • I changed my configuration.nix to:
{ config, pkgs, lib, ... }:
 {
   # NixOS wants to enable GRUB by default
   boot.loader.grub.enable = false;
   # Enables the generation of /boot/extlinux/extlinux.conf
   boot.loader.generic-extlinux-compatible.enable = true;
 
   boot.kernelPackages = pkgs.linuxPackages_rpi;
 
   # Manual doesn't currently evaluate on ARM
   services.nixosManual.enable = false;
 
   nix.binaryCaches = lib.mkForce [ "http://nixos-arm.dezgeg.me/channel" ];
   nix.binaryCachePublicKeys = [ "nixos-arm.dezgeg.me-1:xBaUKS3n17BZPKeyxL4JfbTqECsT+ysbDJz29kLFRW0=%" ];
 
   # File systems configuration for using the installer's partition layout
   fileSystems = {
     "/boot" = {
       device = "/dev/disk/by-label/NIXOS_BOOT";
       fsType = "vfat";
     };
     "/" = {
       device = "/dev/disk/by-label/NIXOS_SD";
       fsType = "ext4";
     };
   };


   environment.systemPackages = [ pkgs.vim ];
   services.openssh.enable = true;
   users.extraUsers.root.openssh.authorizedKeys.keys =
	   [ "ssh-rsa  xxxxxxxxxxxxx" ];
 }

Then:

nixos-rebuild switch --fast --option binary-caches http://nixos-arm.dezgeg.me/channel --option binary-cache-public-keys nixos-arm.dezgeg.me-1:xBaUKS3n17BZPKeyxL4JfbTqECsT+ysbDJz29kLFRW0=%

After success, the newly installed rpi-kernel does not boot. Any Ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions