armv7 build for Raspberry Pi 2B

This commit is contained in:
Craige McWhirter 2020-09-18 22:56:00 +10:00
parent 9c2f233273
commit b9b8ac6770
Signed by: sercanto
GPG key ID: 7DBA9F5689EFB6AA
3 changed files with 27 additions and 2 deletions

View file

@ -1,10 +1,11 @@
# Configuration common to all Raspberry Pi 3 Model B devices
# Configuration common to all Raspberry Pi 2 Model B devices
{ config, pkgs, lib, ... }:
{
boot = {
consoleLogLevel = lib.mkDefault 7;
initrd = {
availableKernelModules = [
"bcm2835_dma" # Allows early (earlier) mode setting
@ -68,6 +69,8 @@
enableB43Firmware = false; # If true, enable Pi wireless firmware
};
sound.enable = false; # Disable sound.
environment.systemPackages = with pkgs; [
raspberrypi-tools # Userland tools for the Raspberry Pi board
];

15
hosts/paidh-aon.nix Normal file
View file

@ -0,0 +1,15 @@
# NixOps configuration for pàidh-aon
{ config, pkgs, lib, ... }:
{
imports = [
../clusters/pi2B_rack.nix
];
# Comment out deployment when building the SD Image.
#deployment.targetHost = "10.69.0.201";
networking.hostName = "paidh-aon"; # Define your hostname.
system.stateVersion = "20.03"; # The version of NixOS originally installed
}

View file

@ -14,7 +14,7 @@ in
{
imports = [
<nixpkgs/nixos/modules/profiles/base.nix>
<nixpkgs/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix>
<nixpkgs/nixos/modules/installer/cd-dvd/sd-image.nix>
];
boot.consoleLogLevel = lib.mkDefault 7;
@ -25,6 +25,13 @@ in
# Prevent the firmware from smashing the framebuffer setup done by the mainline kernel
# when attempting to show low-voltage or overtemperature warnings.
avoid_warnings=1
[pi2]
kernel=u-boot-rpi2.bin
# U-Boot used to need this to work, regardless of whether UART is actually used or not.
# TODO: check when/if this can be removed.
enable_uart=1
'';
in ''
(cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/firmware/)