core: 完善 tty

This commit is contained in:
bin456789
2023-09-03 19:35:01 +08:00
parent 15de1ac098
commit e2ca64a255
4 changed files with 46 additions and 40 deletions

View File

@ -46,22 +46,8 @@ done
# 设置 tty
include=/tmp/include-bootloader
str=
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="console=$tty"
else
str="$str console=$tty"
fi
fi
done
if [ -n "$str" ]; then
echo "bootloader --append=\"$str\"" >$include
else
echo "bootloader" >$include
fi
console_cmdline=$(wget $confhome/ttys.sh -O- | sh -s console=)
echo "bootloader --append=\"$console_cmdline\"" >$include
# 有 installer 分区,表示用了两步安装
include=/tmp/include-packages-for-resize