From 9e97ef794a8f22e96e1d8ec3d80f0cf14e27fad4 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Wed, 5 Jan 2022 11:17:38 -0800 Subject: lib/qemu-common: Add serial device name for RISC-V --- nixos/lib/qemu-common.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos/lib') diff --git a/nixos/lib/qemu-common.nix b/nixos/lib/qemu-common.nix index f3af85040bd..964814e8c60 100644 --- a/nixos/lib/qemu-common.nix +++ b/nixos/lib/qemu-common.nix @@ -17,7 +17,7 @@ rec { ''-netdev vde,id=vlan${toString nic},sock="$QEMU_VDE_SOCKET_${toString net}"'' ]; - qemuSerialDevice = if pkgs.stdenv.hostPlatform.isx86 then "ttyS0" + qemuSerialDevice = if pkgs.stdenv.hostPlatform.isx86 || pkgs.stdenv.hostPlatform.isRiscV then "ttyS0" else if (with pkgs.stdenv.hostPlatform; isAarch32 || isAarch64 || isPower) then "ttyAMA0" else throw "Unknown QEMU serial device for system '${pkgs.stdenv.hostPlatform.system}'"; -- cgit 1.4.1