Skip to content

Commit 02a1fe9

Browse files
slakkalaastro
authored andcommitted
cloud-hypervisor: Use correct console on aarch64
Similarly to qemu, cloud-hypervisor also emulates a serial device that gets mapped to ttyAMA0 on aarch64, adjust kernel command line accordingly. Signed-off-by: Santtu Lakkala <[email protected]>
1 parent e3a4dd5 commit 02a1fe9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/runners/cloud-hypervisor.nix

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
}:
55

66
let
7-
inherit (pkgs) lib;
7+
inherit (pkgs) lib system;
88
inherit (microvmConfig) vcpu mem balloonMem user interfaces volumes shares socket devices hugepageMem graphics storeDisk storeOnDisk kernel initrdPath;
99
inherit (microvmConfig.cloud-hypervisor) extraArgs;
1010

@@ -13,6 +13,13 @@ let
1313
aarch64-linux = "${kernel.out}/${pkgs.stdenv.hostPlatform.linux-kernel.target}";
1414
}.${pkgs.system};
1515

16+
kernelConsole =
17+
if system == "x86_64-linux"
18+
then "earlyprintk=ttyS0 console=ttyS0"
19+
else if system == "aarch64-linux"
20+
then "console=ttyAMA0"
21+
else "";
22+
1623
# balloon
1724
useBallooning = balloonMem > 0;
1825

0 commit comments

Comments
 (0)