Skip to content

Commit

Permalink
added additional check for first console when booting on arm hosts
Browse files Browse the repository at this point in the history
(cherry picked from commit ff64a85)
  • Loading branch information
ibrokethecloud authored and Vicente-Cheng committed Mar 13, 2024
1 parent b2265fd commit 1f12b0a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/console/tty.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package console
import (
"io/ioutil"
"os"
goruntime "runtime"
"strings"

"github.com/sirupsen/logrus"
Expand All @@ -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 ""
Expand Down

0 comments on commit 1f12b0a

Please sign in to comment.