netbird_v2: use ttyS0 as console as soon as a shield is available
This commit is contained in:
parent
bf28f7c85e
commit
0b985705d5
|
|
@ -80,7 +80,6 @@ static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
|
||||||
|
|
||||||
static BD_Context bdctx[3]; /* The descriptor context */
|
static BD_Context bdctx[3]; /* The descriptor context */
|
||||||
|
|
||||||
|
|
||||||
#define SHIELD_COM_IO 0
|
#define SHIELD_COM_IO 0
|
||||||
#define SHIELD_DUALCAN 1
|
#define SHIELD_DUALCAN 1
|
||||||
|
|
||||||
|
|
@ -500,7 +499,7 @@ void set_console(void)
|
||||||
|
|
||||||
if (defaultconsole == 0) {
|
if (defaultconsole == 0) {
|
||||||
/* Use the default console */
|
/* Use the default console */
|
||||||
setenv("defaultconsole", "ttyS1\n");
|
setenv("defaultconsole", "ttyS1");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Don't allow changing to ttyS0 because ttyS0 is not available in the
|
/* Don't allow changing to ttyS0 because ttyS0 is not available in the
|
||||||
|
|
@ -509,6 +508,9 @@ void set_console(void)
|
||||||
return;
|
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 consoldev is set take this as productive conosle instead of default console */
|
||||||
if (read_file("/root/boot/consoledev", buf, 5) != 5) {
|
if (read_file("/root/boot/consoledev", buf, 5) != 5) {
|
||||||
puts("Invalid file consoledev\n");
|
puts("Invalid file consoledev\n");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue