5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-03-12 20:58:26 +03:00

arm: use UART for serial0 instead of a separate device

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2018-11-12 14:10:41 +01:00 committed by Thomas Lamprecht
parent 6f0cb67588
commit 91b01bbbaa

View File

@ -3558,7 +3558,14 @@ sub config_to_command {
if ($path eq 'socket') {
my $socket = "/var/run/qemu-server/${vmid}.serial$i";
push @$devices, '-chardev', "socket,id=serial$i,path=$socket,server,nowait";
# On aarch64, serial0 is the UART device. Qemu only allows
# connecting UART devices via the '-serial' command line, as
# the device has a fixed slot on the hardware...
if ($arch eq 'aarch64' && $i == 0) {
push @$devices, '-serial', "chardev:serial$i";
} else {
push @$devices, '-device', "isa-serial,chardev=serial$i";
}
} else {
die "no such serial device\n" if ! -c $path;
push @$devices, '-chardev', "tty,id=serial$i,path=$path";