summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas@tuxera.com>2016-07-04 15:17:46 +0300
committerTuomas Tynkkynen <tuomas@tuxera.com>2016-07-04 15:17:46 +0300
commit4085f4de5f5b0798fe27d0622c932254c2573b5a (patch)
tree1fdeab27ee5dd5fca47ce929a101e8078e7788f6 /nixos
parent79ed40cd698a9f61cfbc0322f70177784edb2df2 (diff)
parent55aecd308eff773c7ee6ce754ed75fcf69bde133 (diff)
downloadnixlib-4085f4de5f5b0798fe27d0622c932254c2573b5a.tar
nixlib-4085f4de5f5b0798fe27d0622c932254c2573b5a.tar.gz
nixlib-4085f4de5f5b0798fe27d0622c932254c2573b5a.tar.bz2
nixlib-4085f4de5f5b0798fe27d0622c932254c2573b5a.tar.lz
nixlib-4085f4de5f5b0798fe27d0622c932254c2573b5a.tar.xz
nixlib-4085f4de5f5b0798fe27d0622c932254c2573b5a.tar.zst
nixlib-4085f4de5f5b0798fe27d0622c932254c2573b5a.zip
Merge branch 'pr-newest-uboot' into master
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix25
-rw-r--r--nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix1
2 files changed, 23 insertions, 3 deletions
diff --git a/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix b/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix
index 957a8ff9ce6d..80fb47072286 100644
--- a/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix
+++ b/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix
@@ -19,18 +19,37 @@ in
       "it cannot be cross compiled";
   };
 
+  # Needed by RPi firmware
+  nixpkgs.config.allowUnfree = true;
+
   boot.loader.grub.enable = false;
   boot.loader.generic-extlinux-compatible.enable = true;
 
   boot.kernelPackages = pkgs.linuxPackages_latest;
-  boot.kernelParams = ["console=ttyS0,115200n8" "console=ttymxc0,115200n8" "console=ttyAMA0,115200n8" "console=tty0"];
+  boot.kernelParams = ["console=ttyS0,115200n8" "console=ttymxc0,115200n8" "console=ttyAMA0,115200n8" "console=ttyO0,115200n8" "console=tty0"];
+  boot.consoleLogLevel = 7;
 
   # FIXME: this probably should be in installation-device.nix
   users.extraUsers.root.initialHashedPassword = "";
 
   sdImage = {
-    populateBootCommands = ''
+    populateBootCommands = let
+      configTxt = pkgs.writeText "config.txt" ''
+        [pi2]
+        kernel=u-boot-rpi2.bin
+
+        [pi3]
+        kernel=u-boot-rpi3.bin
+        enable_uart=1
+      '';
+      in ''
+        for f in bootcode.bin fixup.dat start.elf; do
+          cp ${pkgs.raspberrypifw}/share/raspberrypi/boot/$f boot/
+        done
+        cp ${pkgs.ubootRaspberryPi2}/u-boot.bin boot/u-boot-rpi2.bin
+        cp ${pkgs.ubootRaspberryPi3}/u-boot.bin boot/u-boot-rpi3.bin
+        cp ${configTxt} boot/config.txt
         ${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./boot
-    '';
+      '';
   };
 }
diff --git a/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix b/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix
index e7163f10a3c3..dc196468139a 100644
--- a/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix
+++ b/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix
@@ -26,6 +26,7 @@ in
   boot.loader.generic-extlinux-compatible.enable = true;
 
   boot.kernelPackages = pkgs.linuxPackages_rpi;
+  boot.consoleLogLevel = 7;
 
   # FIXME: this probably should be in installation-device.nix
   users.extraUsers.root.initialHashedPassword = "";