core: 安装模式添加 tty cmdline

This commit is contained in:
bin456789
2023-08-08 23:21:28 +08:00
parent 9be306830e
commit 1f12589f47
5 changed files with 61 additions and 9 deletions

13
ttys.sh Normal file
View File

@ -0,0 +1,13 @@
#!/bin/sh
prefix=$1
for tty in tty0 ttyS0 ttyAMA0; do
dev_tty=/dev/$tty
if [ -e $dev_tty ] && echo >$dev_tty 2>/dev/null; then
if [ -z "$str" ]; then
str="$prefix$tty"
else
str="$str $prefix$tty"
fi
fi
done
echo $str