Add CONFIG_BOOT_EXTRA_TTYS option

It specifies whitespace-separated list of console devices to run Heads
on in addition to the default one.

Example for board config:

    export CONFIG_BOOT_EXTRA_TTYS="tty0 tty1"

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
This commit is contained in:
Sergii Dmytruk 2022-07-22 20:27:28 +03:00
parent b5fb2f907c
commit 565963d51d
No known key found for this signature in database
GPG Key ID: 48579AA47429663E

View File

@ -136,6 +136,13 @@ else
if [ -x "$CONFIG_BOOTSCRIPT" ]; then
echo '***** Normal boot:' $CONFIG_BOOTSCRIPT
if [ -x /bin/setsid ] && [ -x /bin/agetty ]; then
for console in $CONFIG_BOOT_EXTRA_TTYS; do
setsid agetty -aroot -l"$CONFIG_BOOTSCRIPT" "$console" linux &
done
fi
exec "$CONFIG_BOOTSCRIPT"
# We should never reach here, but just in case...