summary refs log tree commit diff
path: root/nixos/modules/installer
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas@tuxera.com>2018-06-01 20:08:08 +0300
committerTuomas Tynkkynen <tuomas@tuxera.com>2018-06-01 20:08:08 +0300
commite864247f08be32197953b7da5ba5c0626068e9a2 (patch)
tree77116650ae5d2bcc3538f93932232cfded762349 /nixos/modules/installer
parent6c76c4c6d8cfb4575d913367a2088d643914c726 (diff)
parenta8c898be6071c461961b4572afe3b72b7c831fc7 (diff)
downloadnixlib-e864247f08be32197953b7da5ba5c0626068e9a2.tar
nixlib-e864247f08be32197953b7da5ba5c0626068e9a2.tar.gz
nixlib-e864247f08be32197953b7da5ba5c0626068e9a2.tar.bz2
nixlib-e864247f08be32197953b7da5ba5c0626068e9a2.tar.lz
nixlib-e864247f08be32197953b7da5ba5c0626068e9a2.tar.xz
nixlib-e864247f08be32197953b7da5ba5c0626068e9a2.tar.zst
nixlib-e864247f08be32197953b7da5ba5c0626068e9a2.zip
Merge branch 'plat-fix-for-merge-2' into master
Diffstat (limited to 'nixos/modules/installer')
-rw-r--r--nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix25
1 files changed, 19 insertions, 6 deletions
diff --git a/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix b/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix
index 212013b5e289..fe6cc4161630 100644
--- a/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix
+++ b/nixos/modules/installer/cd-dvd/sd-image-raspberrypi.nix
@@ -31,11 +31,24 @@ in
   users.extraUsers.root.initialHashedPassword = "";
 
   sdImage = {
-    populateBootCommands = ''
-      (cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/boot/)
-      cp ${pkgs.ubootRaspberryPi}/u-boot.bin boot/u-boot-rpi.bin
-      echo 'kernel u-boot-rpi.bin' > boot/config.txt
-      ${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./boot
-    '';
+    populateBootCommands = let
+      configTxt = pkgs.writeText "config.txt" ''
+        # 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
+
+        [pi0]
+        kernel=u-boot-rpi0.bin
+
+        [pi1]
+        kernel=u-boot-rpi1.bin
+      '';
+      in ''
+        (cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup*.dat start*.elf $NIX_BUILD_TOP/boot/)
+        cp ${pkgs.ubootRaspberryPiZero}/u-boot.bin boot/u-boot-rpi0.bin
+        cp ${pkgs.ubootRaspberryPi}/u-boot.bin boot/u-boot-rpi1.bin
+        cp ${configTxt} boot/config.txt
+        ${extlinux-conf-builder} -t 3 -c ${config.system.build.toplevel} -d ./boot
+      '';
   };
 }