Skip to content

Commit

Permalink
cloud-hypervisor: Use correct console on aarch64
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
slakkala authored and astro committed Jun 12, 2024
1 parent e3a4dd5 commit 02a1fe9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/runners/cloud-hypervisor.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
}:

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

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

kernelConsole =
if system == "x86_64-linux"
then "earlyprintk=ttyS0 console=ttyS0"
else if system == "aarch64-linux"
then "console=ttyAMA0"
else "";

# balloon
useBallooning = balloonMem > 0;

Expand Down

0 comments on commit 02a1fe9

Please sign in to comment.