home: hub: mkinitfs

Download patch

ref: 651133ce9883598c54e0910d6a7589ca72f96303
parent: 59204d36985de5ba2444d5f3e0d50a119287ec51
author: Filippo Valsorda <hi@filippo.io>
date: Sun Aug 9 19:02:01 CDT 2020

initramfs-init: add cmdline consoles to inittab

Sometimes a console is specified on the kernel command line but doesn't
get initialized by the kernel because for example the driver is built as
a module. The init should still spawn getty on it.

--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -106,7 +106,8 @@
 setup_inittab_console(){
 	term=vt100
 	# Inquire the kernel for list of console= devices
-	for tty in $(list_console_devices console); do
+	consoles="$(for c in console $KOPT_consoles; do list_console_devices $c; done)"
+	for tty in $consoles; do
 		# do nothing if inittab already have the tty set up
 		if ! grep -q "^$tty:" $sysroot/etc/inittab; then
 			echo "# enable login on alternative console" \
@@ -340,6 +341,11 @@
 	case "$opt" in
 	s|single|1)
 		SINGLEMODE=yes
+		continue
+		;;
+	console=*)
+		opt="${opt#*=}"
+		KOPT_consoles="${opt%%,*} $KOPT_consoles"
 		continue
 		;;
 	esac