From 0b985705d558caceeb968b234af27cfc536ef019 Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Tue, 12 Dec 2017 09:30:50 +0100 Subject: [PATCH] netbird_v2: use ttyS0 as console as soon as a shield is available --- board/nm/netbird_v2/board.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/board/nm/netbird_v2/board.c b/board/nm/netbird_v2/board.c index efbfc2dddf..283b8bd151 100644 --- a/board/nm/netbird_v2/board.c +++ b/board/nm/netbird_v2/board.c @@ -80,7 +80,6 @@ static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE; static BD_Context bdctx[3]; /* The descriptor context */ - #define SHIELD_COM_IO 0 #define SHIELD_DUALCAN 1 @@ -500,7 +499,7 @@ void set_console(void) if (defaultconsole == 0) { /* Use the default console */ - setenv("defaultconsole", "ttyS1\n"); + setenv("defaultconsole", "ttyS1"); } /* Don't allow changing to ttyS0 because ttyS0 is not available in the @@ -509,6 +508,9 @@ void set_console(void) return; } + /* With comio shield the defaultconsole should be ttyS0 and not ttyS1 */ + setenv("defaultconsole", "ttyS0"); + /* If consoldev is set take this as productive conosle instead of default console */ if (read_file("/root/boot/consoledev", buf, 5) != 5) { puts("Invalid file consoledev\n");