m/node: also log to ttyS1
Some systems have their serial console connected to ttyS1, not ttyS0.
We currently have no way of passing this information to the system as we
lock down boot parameters and
there is significant risk in letting people change this, both in terms
of security (some kernel parameters can affect the integrity of the OS)
as well as availability as such a setting needs to be respected by both
A and B loaders, thus any misconfiguration could make the node
non-functional without an obvious way to roll back.
Thus this just adds ttyS1 to the list of serial consoles for the time
being. When we have such a mechanism, we'll likely undo the hardcoding
of all consoles anyways.
Fixes #216
Change-Id: I2f35edad049ceae1bb5cfc22b89bf6a1664cfbf8
Reviewed-on: https://review.monogon.dev/c/monogon/+/1625
Tested-by: Jenkins CI
Reviewed-by: Serge Bazanski <serge@monogon.tech>
diff --git a/metropolis/node/core/main.go b/metropolis/node/core/main.go
index 08eb39a..715a7ac 100644
--- a/metropolis/node/core/main.go
+++ b/metropolis/node/core/main.go
@@ -48,7 +48,7 @@
lt := logtree.New()
// Set up logger for Metropolis. Currently logs everything to /dev/tty0 and
- // /dev/ttyS0.
+ // /dev/ttyS{0,1}.
consoles := []console{
{
path: "/dev/tty0",
@@ -58,6 +58,10 @@
path: "/dev/ttyS0",
maxWidth: 120,
},
+ {
+ path: "/dev/ttyS1",
+ maxWidth: 120,
+ },
}
// Alternative channel that crash handling writes to, and which gets distributed
// to the consoles.