Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] system: run getty on boot console by default
@ 2014-12-23 12:06 Alexey Brodkin
  2014-12-23 12:18 ` Yegor Yefremov
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Alexey Brodkin @ 2014-12-23 12:06 UTC (permalink / raw)
  To: buildroot

We used to specify explicitly serial port with all its settings
for init to instantiate getty.

This limits usecases when the same one rootfs could be used.

For example following cases won't work well with hardcoded
serial console settings:
 * On the same board other serial port is expected to be used
 * The same rootfs is intended to be used on different boards with
   different serial ports (like ttySx vs ttyAMAx or even ttyx)

With this change by default we rely on "console" specified in
kernel's boot command line.

What is important getty will be set on the last console
specified in bootargs.

For example is a kernel comand line:
--->---
bootargs="... console=tty0 console=ttyS3,115200n8..."
--->---

This now will instantiate serial console on ttyS3 but not on tty0.

Tested with both Busybox and SysV init.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
---
 system/Config.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/system/Config.in b/system/Config.in
index 0fa0dc6..6447be8 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -263,13 +263,13 @@ if BR2_TARGET_GENERIC_GETTY
 menu "getty options"
 config BR2_TARGET_GENERIC_GETTY_PORT
 	string "TTY port"
-	default "ttyS0"
+	default "console"
 	help
 	  Specify a port to run a getty on.
 
 choice
 	prompt "Baudrate"
-	default BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200
+	default BR2_TARGET_GENERIC_GETTY_BAUDRATE_KEEP
 	help
 	  Select a baudrate to use.
 
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-01-12 22:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-23 12:06 [Buildroot] [PATCH] system: run getty on boot console by default Alexey Brodkin
2014-12-23 12:18 ` Yegor Yefremov
2014-12-23 12:32   ` Alexey Brodkin
2014-12-23 13:57     ` Yegor Yefremov
2014-12-23 14:35       ` Alexey Brodkin
2014-12-23 19:52         ` Thomas Petazzoni
2014-12-23 21:18           ` Alexey Brodkin
2014-12-23 22:10             ` Thomas Petazzoni
2014-12-24  9:03               ` Alexey Brodkin
2015-01-09 18:15                 ` Alexey Brodkin
2015-01-10 16:10 ` Thomas Petazzoni
2015-01-12 22:07 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox