add support for virtual terminal
PATCH 1/1 add support for virtual terminal
introduces new option "Enable virtual console on tty1" to enable virtual terminal on tty1
--- fs/skeleton/etc/inittab | 3 +++ target/generic/Config.in | 3 +++ target/generic/Makefile.in | 14 ++++++++++++++ 3 files changed, 20 insertions(+)
fs/skeleton/etc/inittab +3 -0
@@ -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
target/generic/Config.in +3 -0
@@ -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
target/generic/Makefile.in +14 -0
@@ -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
PATCH 1/1 add support for virtual terminal
Hi Yegor,
Quoted 5 lines · Yegor Yefremov
introduces new option "Enable virtual console on tty1" to enable virtual terminal on tty1
Signed-off-by Yegor Yefremov <[email protected]>---
[snip]
fs/skeleton/etc/inittab line 27
Quoted 2 lines
fs/skeleton/etc/inittab +2
-0+# Put a getty on a virtual terminal +#tty1::respawn:/sbin/getty tty1 38400
You should probably add '# GENERIC_VT' in this line. See below.
Quoted 3 lines
+
# Put a getty on the serial port #ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 #GENERIC_SERIAL
[snip]
Quoted 5 lines
Index: b/target/generic/Makefile.in
===================================================================
target/generic/Makefile.in line 32
Quoted 10 lines
target/generic/Makefile.in +7
-0@@ -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
This might cause unintended changes in /etc/inittab, since the 'tty1' string appears in more places. Add '# GENERIC_VT' as above, and only change matching lines. See how GENERIC_SERIAL is being used
baruch
Signature · 3 lines
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -PATCH 1/1 add support for virtual terminal
Hi Baruch,
Quoted 25 lines · Yegor Yefremov
Quoted 5 lines
introduces new option "Enable virtual console on tty1" to enable virtual terminal on tty1
Signed-off-by Yegor Yefremov <[email protected]>---
[snip]
fs/skeleton/etc/inittab line 27
Quoted 2 lines
fs/skeleton/etc/inittab +2
-0+# Put a getty on a virtual terminal +#tty1::respawn:/sbin/getty tty1 38400You should probably add '#
GENERIC_VT' in this line. See below.Quoted 3 lines
+
# Put a getty on the serial port #ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 #GENERIC_SERIAL[snip]
Quoted 8 lines
Index: b/target/generic/Makefile.in
===================================================================target/generic/Makefile.in +0
-0@@ -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
Quoted 10 lines
target/generic/Makefile.in line 32
Quoted 7 lines
target/generic/Makefile.in +7
-0+# 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/inittabThis might cause unintended changes in
/etc/inittab, since the 'tty1' string appears in more places. Add '#GENERIC_VT' as above, and only change matching lines. See howGENERIC_SERIALis being used
Thanks. Changes implemented.
Yegor