summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/sysvinit/sysvinit-inittab
Commit message (Collapse)AuthorAgeFilesLines
* sysvinit-inittab: use ttyrun to run getty only if the terminal existsRoss Burton2023-10-091-6/+5
| | | | | | | | | | | | | | | | | | | Wrap calls to start_getty with ttyrun, so that getty isn't started if the device doesn't exist. As we know start_getty is only called when the device exists we can remove the partial workaround for this problem in that scripts too. This neatly obsoletes SERIAL_CONSOLES_CHECK, whose sole purpose was to check what terminals are present at boot and rewrite inittab. Notably, this meant that SERIAL_CONSOLES_CHECK made using a read-only rootfs impossible. (From OE-Core rev: f4fd17d5a5e4eaa31995d3ca52c871cfbdc0df68) (From OE-Core rev: 8e48297621311116d3edd7e3aa0de1b8ef2431b1) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sysvinit-inittab/start_getty: Fix respawn too fastBertrand Marquis2022-08-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | When an entry in /dev does not exist, start_getty is returning directly. As it is started from init in a respawn mode, it will loop infinitely. In this case add a sleep inside start_getty to prevent the "Respawning too fast" message popping up every 5 minutes. This case is happening quite often when the system is started as an hypervisor guest as the standard serial line is usually taken by it and removed from the configuration. This was triggered quite often running linux as dom0 on top of Xen on arm as the serial line is taken by Xen and removed from the device tree. Use the opportunity to replace one tab with spaces as the rest of the file is using spaces. (From OE-Core rev: 5a704d0ff4d95b6d3a67b80a0db2be66253e7d61) Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: rootfs-postcommands: autologin root on serial-gettyJohannes Schneider2022-08-121-1/+2
| | | | | | | | | | | | | | | | when empty-root-password AND serial-autologin-root are part of the IMAGE_FEATURES, save some of the developers time by not having to type the (then still sole) 'root' username on the serial console after each and every reboot this is done by inserting '--autologin root' into the command line of the responsible 'getty' service (From OE-Core rev: 01b3cb46405f814e27cab5290118211786cd63a0) Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sysvinit-inittab/start_getty: Check /sys for the tty device existenceKevin Hao2021-04-181-41/+3
| | | | | | | | | | | | The hvc tty driver doesn't populate a file like /proc/tty/driver/serial, so the current implementation of start_getty doesn't work for the hvc console. By checking the /sys/class/tty/ for the tty device existence, it should support more console types and also make the codes more simple. (From OE-Core rev: 670ceef0f6584ece5ce4176610255226a6148570) Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sysvinit-inittab: Add support for tty devices with 10 or more number.Yuki Hoshino2020-06-151-2/+2
| | | | | | | | | | | | | | "start_getty" support for tty devices with under 10 number. When SERIAL_CONSOLES has tty devices with 10 or more number, do not't start getty and output the following message. ---------- sh 1: unknown operand ---------- (From OE-Core rev: 39dc49523f5d24db8f8053444c543c371c32d10c) Signed-off-by: Yuki Hoshino <yuki.hoshino@miraclelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sysvinit-inittab: support non-busybox-getty on serial consolesAndré Draszik2019-02-121-1/+13
| | | | | | | | | | | | | | | | | | | | | | | Busybox' getty has code to try to make itself a session leader, whereas util-linux' agetty doesn't. It expects this to happen from outside. When getty is not a session leader, many things don't work on the serial console, e.g. setting the terminal process group, job control doesn't work, etc. Executing image tests also fails with AssertionErrors, because Feb 5 16:12:55 qemuarm getty[590]: /dev/ttyAMA1: cannot get controlling tty: Operation not permitted Feb 5 16:12:55 qemuarm getty[590]: /dev/ttyAMA1: cannot set process group: Inappropriate ioctl for device Update the start_getty script to invoke getty via the setsid utility if needed, i.e. if /sbin/getty is not busybox getty. [YOCTO #13058] (From OE-Core rev: 37be77565d323fc543427ad47399996119f59ab1) Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sysvinit-inittab: start_getty: Cleanup commentsAndrea Adami2017-09-211-13/+13
| | | | | | | | (From OE-Core rev: dd17a009e3adf2dc0d75a4c664086f661401e9ff) Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sysvinit-inittab: start_getty: consider whitespaces in tty driver nameAndrea Adami2017-09-211-4/+12
| | | | | | | | | | | | | Unbreak serial console when driver name contains spaces (PXA serial). Fix commit ac0e954 "start_getty: Over added SERIAL_CONSOLE cause error in userspace log" (From OE-Core rev: 8b98302c30efb7073f61dc2a166f7414f050ef65) Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* start_getty: Over added SERIAL_CONSOLE cause error in userspace logChoong YinThong2017-06-031-4/+34
| | | | | | | | | | | | | | | | | Error log will be logged into /var/log/message. Added in more condition checking on the script. Check /proc/tty/drivers and /proc/tty/driver/* file system to retrieve active targeted serial. Only establish getty with active serial in runtime. [YOCTO #10844] Reviewed-by: Saul Wold <sgw@linux.intel.com> (From OE-Core rev: ac0e9541fe93e866e42914f65a0516b993f0cffe) Signed-off-by: Choong YinThong <yin.thong.choong@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sysvinit-inittab: make TERM=vt102 on serial consolesAndré Draszik2016-11-231-1/+1
| | | | | | | | | | | | | | | | This makes more sense than the default TERM=linux (as set by the linux kernel). In addition, when using busybox init, it tries to achieve the same (in a different way). Both agetty, and busybox getty support the terminal type as the last argument. (From OE-Core rev: a23004f32dda9310c7efc29720fa9c3027a7c329) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sysvinit-inittab: Add wrapper script to verify console existsSaul Wold2015-12-011-0/+5
| | | | | | | | | | | | | | Add a wrapper script around getty to check if a given console exists, this allows for multiple Console ttys to be specified for various boards without having additional BSP types just for different console types. [YOCTO #8689] (From OE-Core rev: b93369a7943949f51057e0a704f5524ab7682fe6) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sysvinit-inittab: Fixed license warning.Lianhao Lu2012-03-201-339/+0
| | | | | | | | | | WARNING: .../sysvinit-inittab-2.88dsf-r6/sysvinit-2.88dsf/COPYING could not be copied for some reason. It may not exist. WARN for now. (From OE-Core rev: 85e4d0c4bb024a67b61afb0f0fedfb15d6aa0d18) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sysvinit: split inittab into it's own recipeKoen Kooi2011-06-092-0/+369
Implements the improvements suggested in the original fix for [YOCTO #1131] (From OE-Core rev: e9cde6962d369fb620799d0370ea9dc7d6234d37) Signed-off-by: <koen@dominion.thruhere.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>