Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yegor Yefremov <yegor_sub1@visionsystems.de>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] add support for virtual terminal
Date: Mon, 07 Nov 2011 11:21:29 +0100	[thread overview]
Message-ID: <4EB7B129.9030608@visionsystems.de> (raw)

introduces new option "Enable virtual console on tty1"
to enable virtual terminal on tty1

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 fs/skeleton/etc/inittab    |    3 +++
 target/generic/Config.in   |    3 +++
 target/generic/Makefile.in |   14 ++++++++++++++
 3 files changed, 20 insertions(+)

Index: b/fs/skeleton/etc/inittab
===================================================================
--- a/fs/skeleton/etc/inittab
+++ b/fs/skeleton/etc/inittab
@@ -23,6 +23,9 @@
 # now run any rc scripts
 ::sysinit:/etc/init.d/rcS
 
+# Put a getty on a virtual terminal
+#tty1::respawn:/sbin/getty tty1 38400
+
 # Put a getty on the serial port
 #ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 # GENERIC_SERIAL
 
Index: b/target/generic/Config.in
===================================================================
--- a/target/generic/Config.in
+++ b/target/generic/Config.in
@@ -116,6 +116,9 @@
 	default "57600"		if BR2_TARGET_GENERIC_GETTY_BAUDRATE_57600
 	default "115200"	if BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200
 
+config BR2_TARGET_GENERIC_TTY_PORT
+	bool "Enable virtual console on tty1"
+
 config BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW
 	bool "remount root filesystem read-write during boot"
 	default y
Index: b/target/generic/Makefile.in
===================================================================
--- a/target/generic/Makefile.in
+++ b/target/generic/Makefile.in
@@ -23,6 +23,14 @@
 	$(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(shell echo $(TARGET_GENERIC_GETTY) | tail -c+4)::respawn:/sbin/getty -L $(TARGET_GENERIC_GETTY) $(TARGET_GENERIC_GETTY_BAUDRATE) vt100 #~' \
 		$(TARGET_DIR)/etc/inittab
 
+# Put a getty on virtual terminal
+target-generic-do-getty-tty1:
+	$(SED) 's/#tty1/tty1/' $(TARGET_DIR)/etc/inittab
+
+# Don't put a getty on virtual terminal
+target-generic-dont-getty-tty1:
+	$(SED) 's/tty1/#tty1/' $(TARGET_DIR)/etc/inittab
+
 # Find commented line, if any, and remove leading '#'s
 target-generic-do-remount-rw:
 	$(SED) '/^#.*# REMOUNT_ROOTFS_RW$$/s~^#\+~~' $(TARGET_DIR)/etc/inittab
@@ -39,6 +47,12 @@
 TARGETS += target-generic-issue
 endif
 
+ifeq ($(BR2_TARGET_GENERIC_TTY_PORT),y)
+TARGETS += target-generic-do-getty-tty1
+else
+TARGETS += target-generic-dont-getty-tty1
+endif
+
 ifeq ($(BR2_ROOTFS_SKELETON_DEFAULT),y)
 ifeq ($(BR2_PACKAGE_SYSVINIT),y)
 TARGETS += target-generic-getty-sysvinit

             reply	other threads:[~2011-11-07 10:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-07 10:21 Yegor Yefremov [this message]
2011-11-07 10:32 ` [Buildroot] [PATCH] add support for virtual terminal Baruch Siach
2011-11-07 11:48   ` Yegor Yefremov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EB7B129.9030608@visionsystems.de \
    --to=yegor_sub1@visionsystems.de \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox