Skip to content

Commit

Permalink
runtime-rs/clh: Fix unable to boot container
Browse files Browse the repository at this point in the history
In the case of Cloud Hypervisor running on arm64 architecture,
only arm AMBA UART (pl011) is supported as the TTY. Consequently,
when enabling Hypervisor debug mode, it's essential to configure
the console as "ttyAMA0" rather than "ttyS0

Fixes: #8381

Signed-off-by: briwan01 <brian.wang@arm.com>
  • Loading branch information
brianwang12 authored and jongwu committed Nov 22, 2023
1 parent 358f32e commit 231b9df
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/runtime-rs/crates/hypervisor/src/ch/inner_hypervisor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,19 @@ impl CloudHypervisorInner {
// Start by adding the default set of kernel parameters.
let mut params = KernelParams::new(enable_debug);

#[cfg(target_arch = "x86_64")]
let console_param_debug = KernelParams::from_string("console=ttyS0,115200n8");

#[cfg(target_arch = "aarch64")]
let console_param_debug = KernelParams::from_string("console=ttyAMA0,115200n8");

let mut rootfs_param = KernelParams::new_rootfs_kernel_params(rootfs_driver, rootfs_type)?;

let mut console_params = if enable_debug {
if confidential_guest {
KernelParams::from_string("console=hvc0")
} else {
KernelParams::from_string("console=ttyS0,115200n8")
console_param_debug
}
} else {
KernelParams::from_string("quiet")
Expand Down

0 comments on commit 231b9df

Please sign in to comment.