From 1f12b0a50c5cc49a951ca8333de91350603463b0 Mon Sep 17 00:00:00 2001 From: Gaurav Mehta Date: Tue, 12 Mar 2024 21:09:30 +1100 Subject: [PATCH] added additional check for first console when booting on arm hosts (cherry picked from commit ff64a85e38168afe5c1b982948b5f159a59ca8d1) --- pkg/console/tty.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/console/tty.go b/pkg/console/tty.go index 637bffc30..1062b0494 100644 --- a/pkg/console/tty.go +++ b/pkg/console/tty.go @@ -3,6 +3,7 @@ package console import ( "io/ioutil" "os" + goruntime "runtime" "strings" "github.com/sirupsen/logrus" @@ -17,6 +18,15 @@ func getFirstConsoleTTY() string { ttys := strings.Split(strings.TrimRight(string(b), "\n"), " ") if len(ttys) > 0 { + // arm devices generally have first console as /dev/ttyAMA0 + // this console is skipped in iso based installs due to display resolution issues + // as a result of this automatic install via ipxe fails since installer runs in + // say /dev/tty1 but first console returned by this method is ttyAMA0 + // we are currently adding a check to skip AMA0 if it is the first console and return + // the second item in the list + if goruntime.GOARCH == "arm64" && strings.Contains(ttys[0], "AMA0") && len(ttys) > 1 { + return ttys[1] + } return ttys[0] } return ""