public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/genkernel:master commit in: netboot/
@ 2014-01-25  3:11 Richard Yao
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Yao @ 2014-01-25  3:11 UTC (permalink / raw
  To: gentoo-commits

commit:     ebd1221ef0ddf2b3d7a7fc8dfafcee689c16a93c
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 22 14:00:55 2014 +0000
Commit:     Richard Yao <ryao <AT> gentoo <DOT> org>
CommitDate: Sat Jan 25 03:11:32 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=ebd1221e

Add machine detection for hppa.

Signed-off-by: Guy Martin <gmsoft <AT> gentoo.org>

---
 netboot/linuxrc.x | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/netboot/linuxrc.x b/netboot/linuxrc.x
index 3e46859..69e7e7a 100644
--- a/netboot/linuxrc.x
+++ b/netboot/linuxrc.x
@@ -213,8 +213,23 @@ DetectPpc() {
 
 #//--------------------------------------------------------------------------------
 
+#// Determine hppa Machine Type
+#//--------------------------------------------------------------------------------
+
+DetectHppa() {
+	case "${ARCHINFO}" in
+		parisc)
+			MYARCH="HPPA"
+		;;
+		parisc64)
+			MYARCH="HPPA (64bit kernel)"
+		;;
+	esac
 
+	MACHTYPE=$(grep 'model' /proc/cpuinfo | cut -d '/' -f 3 | head -n 1 | sed -e 's/ //g')
+}
 
+#//--------------------------------------------------------------------------------
 #// Discover if the network is already running for us or not
 #//--------------------------------------------------------------------------------
 
@@ -338,6 +353,7 @@ case "${ARCHINFO}" in
 		mount -t openpromfs openprom /proc/openprom
 	;;
 	ppc*)		DetectPpc	;;
+	parisc*)	DetectHppa	;;
 	*)			MACHTYPE=$ARCHINFO	;;
 esac
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] proj/genkernel:master commit in: netboot/
@ 2014-02-27  4:47 Richard Yao
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Yao @ 2014-02-27  4:47 UTC (permalink / raw
  To: gentoo-commits

commit:     d2f2a7d5be0da587d0f127a176a6853bafc24870
Author:     Guy Martin <gmsoft <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 22 14:13:48 2014 +0000
Commit:     Richard Yao <ryao <AT> gentoo <DOT> org>
CommitDate: Thu Feb 27 04:31:24 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=d2f2a7d5

Start a getty on the serial console if known.

This allows busybox to send SIGINT when Ctrl-C is issued.
Most users start a ping to verify connectivity but can never stop it.

Signed-off-by: Guy Martin <gmsoft <AT> gentoo.org>
Signed-off-by: Richard Yao <ryao <AT> gentoo.org>

---
 netboot/linuxrc.x | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/netboot/linuxrc.x b/netboot/linuxrc.x
index 69e7e7a..31b19d0 100644
--- a/netboot/linuxrc.x
+++ b/netboot/linuxrc.x
@@ -322,17 +322,20 @@ LaunchShell() {
 	#// Completed Startup
 	touch /tmp/.startup
 
-	for i in 2 3 4 5 6; do
-		getty -n -l /bin/ashlogin 38400 tty${i} &
-	done
-
-#	# We run the getty for tty1 in the foreground so our pid 1 doesn't end
-#	getty -n -l /bin/ashlogin 38400 tty1
-
-	# We were running the above code, but that doesn't work well on serial. Until
-	# we can autodetect a serial console and start a getty there, we'll just run
-	# ash on /dev/console
-	/bin/ash
+	SERIAL_TTY=$(sed -e 's/.*console=\(tty[a-zA-Z0-9]*\).*/\1/' /proc/cmdline)
+	if [ "${SERIAL_TTY:0:3}" = "tty" -a "${SERIAL_TTY:0:4}" != "tty0" ]
+	then
+		# A serial tty has been specified
+		getty -n -l /bin/ashlogin 38400 ${SERIAL_TTY}
+	else
+		for i in 2 3 4 5 6; do
+			getty -n -l /bin/ashlogin 38400 tty${i} &
+		done
+
+		# If we can't autodetect a serial console and start a getty there, we'll just run
+		# ash on /dev/console
+		/bin/ash
+	fi
 }
 
 #//--------------------------------------------------------------------------------


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-27  4:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-25  3:11 [gentoo-commits] proj/genkernel:master commit in: netboot/ Richard Yao
  -- strict thread matches above, loose matches on Subject: below --
2014-02-27  4:47 Richard Yao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox