From 809c3f37a64158dd4bfffcb6cea5180f116a3417 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Mon, 18 Jun 2018 21:53:34 -0400 Subject: [PATCH] qemu-x86_64: refactors splash into a variable... To allow playing around. --- devices/qemu-x86_64/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/devices/qemu-x86_64/default.nix b/devices/qemu-x86_64/default.nix index d017aefb..a9eb6f35 100644 --- a/devices/qemu-x86_64/default.nix +++ b/devices/qemu-x86_64/default.nix @@ -2,6 +2,7 @@ with import ../../modules/initrd-order.nix; let + splash = false; kernel = pkgs.linuxPackages_4_16.kernel; device_info = (lib.importJSON ../postmarketOS-devices.json).qemu-amd64; @@ -25,7 +26,11 @@ in mobile.device.info = device_info // { # TODO : make kernel part of options. inherit kernel; - kernel_cmdline = device_info.kernel_cmdline + " vga=${MODE.vga}"; + kernel_cmdline = device_info.kernel_cmdline + + " vga=${MODE.vga}" + # TODO : make cmdline configurable outside device.info (device.info would be used for device-specifics only) + + lib.optionalString splash " quiet vt.global_cursor_default=0" + ; }; mobile.hardware = { soc = "generic-x86_64"; @@ -36,9 +41,8 @@ in }; mobile.system.type = "kernel-initrd"; mobile.boot.stage-1 = { - # Comment the next two if you want to play around with splash. - redirect-log.targets = [ "/dev/tty0" "/dev/kmsg" ]; - splash.enable = false; + redirect-log.targets = lib.mkIf (splash != true) [ "/dev/tty0" ]; + splash.enable = splash; init = (lib.mkOrder BEFORE_READY_INIT '' echo "cmdline:" cat /proc/cmdline