public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/genkernel:ryao commit in: doc/, defaults/
@ 2013-01-01 16:53 Richard Yao
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Yao @ 2013-01-01 16:53 UTC (permalink / raw
  To: gentoo-commits

commit:     32a9b007bf24be899272a782a9f33d007b1e3c07
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 20 00:47:38 2012 +0000
Commit:     Richard Yao <ryao <AT> gentoo <DOT> org>
CommitDate: Tue Nov 20 00:58:55 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=32a9b007

linuxrc: part keyword

Clean up documentation and functionality of "part" argument to
initramfs. It is meant to imitate the same option to the kernel.

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

---
 defaults/linuxrc    |    3 +++
 doc/genkernel.8.txt |   10 ++++------
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/defaults/linuxrc b/defaults/linuxrc
index 1bc09a7..4166396 100755
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -156,6 +156,9 @@ do
 		part=*)
 			MDPART=${x#*=}
 		;;
+		part|partitionable)
+			MDPART=1
+		;;
 		# NFS
 		ip=*)
 			IP=${x#*=}

diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt
index dc04240..4691a98 100644
--- a/doc/genkernel.8.txt
+++ b/doc/genkernel.8.txt
@@ -520,12 +520,10 @@ which the ramdisk scripts would recognize.
 *console*=<...>::
     Override location of console, default is "/dev/console".
 
-*part*=<...>::
-    Specify part for mdadm to start.  This is the relevant code in mdstart:
-------------------------------------------
-    fd = open("/dev/md<MD_NUMBER>", 0, 0);
-    ioctl(fd, RAID_AUTORUN, <MDPART>);
-------------------------------------------
+*part*[=<0,1>]::
+*partitionable*::
+	Enable/Disable partitionable RAIDs (metadata 0.x) during auto-run.
+	Standalone *part* and *partitionable* keywords for kernel compatability.
 
 *iscsi_initiatorname*=<...>::
 *iscsi_target*=<...>::


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

* [gentoo-commits] proj/genkernel:ryao commit in: doc/, defaults/
@ 2013-06-03 23:35 Richard Yao
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Yao @ 2013-06-03 23:35 UTC (permalink / raw
  To: gentoo-commits

commit:     ffa5076fd4681e6b65968b826b84a66fabcd75f6
Author:     Fabio Erculiani <lxnay <AT> sabayon <DOT> org>
AuthorDate: Tue Apr 23 16:12:46 2013 +0000
Commit:     Richard Yao <ryao <AT> gentoo <DOT> org>
CommitDate: Thu Apr 25 07:20:52 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=ffa5076f

Drop doslowusb and noslowusb boot parameters.

scandelay=<secs> should be always preferred. Moreover, nowadays
automatically sleeping waiting for USB storage to come up in
the way we were used to do it doesn't work as one expects, because
USB is very common and USB storage devices are very likely to be
present on a system.
Furthermore, the initialization code after setup_slowusb is already
waiting for devices to come up.

---
 defaults/initrd.defaults |  4 ++--
 defaults/initrd.scripts  | 21 ---------------------
 defaults/linuxrc         |  6 ------
 doc/genkernel.8.txt      |  5 -----
 4 files changed, 2 insertions(+), 34 deletions(-)

diff --git a/defaults/initrd.defaults b/defaults/initrd.defaults
index e70beab..cbf18f3 100755
--- a/defaults/initrd.defaults
+++ b/defaults/initrd.defaults
@@ -72,5 +72,5 @@ DEFAULT_NFSOPTIONS="ro,nolock,rsize=1024,wsize=1024"
 
 # Only sections that are in by default or those that
 # are not module groups need to be defined here...
-HWOPTS='keymap cache modules pata sata scsi usb firewire waitscan slowusb lvm dmraid mdadm fs net'
-MY_HWOPTS='modules pata sata scsi slowusb usb firewire waitscan dmraid mdadm fs net iscsi crypto'
+HWOPTS='keymap cache modules pata sata scsi usb firewire waitscan lvm dmraid mdadm fs net'
+MY_HWOPTS='modules pata sata scsi usb firewire waitscan dmraid mdadm fs net iscsi crypto'

diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index abd8fad..a216b84 100755
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -446,27 +446,6 @@ prompt_user(){
 	esac
 }
 
-setup_slowusb() {
-	# This function removes unset DO_slowusb if there is no usb-storage attached.
-	# If noslowusb is set, skip this function
-	[ "${DO_slowusb}" ] || return
-
-	# Unset DO_slowusb, so we can set it again if usb-storage has something attached
-	unset DO_slowusb
-
-	local usb_storage_dir="/sys/bus/usb/drivers/usb-storage"
-	if [ ! -d "${usb_storage_dir}" ]
-	then
-		# no automated slowusb required. no usb-storage devices attached.
-		return
-	fi
-	for x in "${usb_storage_dir}"/*
-	do
-		[ -d "${x}" ]  && [ "${x}" != "${usb_storage_dir}/module" ] \
-			&& { DO_slowusb="1" ; break ; }
-	done
-}
-
 cmdline_hwopts() {
 	# Scan CMDLINE for any "doscsi" or "noscsi"-type arguments
 	local FOUND

diff --git a/defaults/linuxrc b/defaults/linuxrc
index 805515b..ba9c5d5 100755
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -359,14 +359,8 @@ mdev -s || bad_msg "mdev -s failed"
 # Apply scan delay if specified
 sdelay
 
-# Setup slow USB bits
-setup_slowusb
-
 cd /
 
-# if doslowusb is passed, pause other 10 seconds here, after mdev load
-[ "${DO_slowusb}" ] && sleep 10
-
 # Start iSCSI
 if [ -e /bin/iscsistart ]
 then

diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt
index 86d7d53..54d26d2 100644
--- a/doc/genkernel.8.txt
+++ b/doc/genkernel.8.txt
@@ -472,11 +472,6 @@ which the ramdisk scripts would recognize.
     Activate SCSI devices on bootup, necessary when SCSI support is
     compiled as modules and you're using SCSI or SATA devices.
 
-*noslowusb*::
-    By default genkernel pause for 10 seconds if it finds a attached
-    usb-storage device to give them time to initiate.
-    This option skips that pause.
-
 *keymap*='MAP'::
     Set keymap to 'MAP', e.g. *keymap*=de.
     For valid values of 'MAP' please see


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

* [gentoo-commits] proj/genkernel:ryao commit in: doc/, defaults/
@ 2013-06-03 23:35 Richard Yao
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Yao @ 2013-06-03 23:35 UTC (permalink / raw
  To: gentoo-commits

commit:     e4ab952d639ff69e57fefa3e3855ee81d4d555fb
Author:     Peter Hjalmarsson <xake <AT> rymdraket <DOT> net>
AuthorDate: Tue Mar  5 21:45:45 2013 +0000
Commit:     Richard Yao <ryao <AT> gentoo <DOT> org>
CommitDate: Sun Mar 31 12:45:08 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=e4ab952d

Add rootflags to switches we understand

Nearly every general documentation including the one in the
kernel tree and the scripts for GRUB2 all expects this flag
to work.

Signed-off-by: Peter Hjalmarsson <xake <AT> rymdraket.net>

---
 defaults/linuxrc    | 24 +++++++++++++++++-------
 doc/genkernel.8.txt |  8 ++++++--
 2 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/defaults/linuxrc b/defaults/linuxrc
index f1e20ce..703652d 100755
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -37,7 +37,7 @@ CMDLINE=$(cat /proc/cmdline)
 # Scan CMDLINE for any specified real_root= or cdroot arguments
 FAKE_ROOT=''
 FAKE_INIT=''
-REAL_ROOTFLAGS=''
+FAKE_ROOTFLAGS=''
 INIT_OPTS=''
 ROOTFSTYPE='auto'
 CRYPT_SILENT=0
@@ -236,6 +236,9 @@ do
 		real_rootflags=*)
 			REAL_ROOTFLAGS=${x#*=}
 		;;
+		rootflags=*)
+			FAKE_ROOTFLAGS=${x#*=}
+		;;
 		rootfstype=*)
 			ROOTFSTYPE=${x#*=}
 		;;
@@ -267,13 +270,20 @@ do
 	esac
 done
 
-if [ -z "${REAL_ROOT}" -a \( "${CDROOT}" = '0' \)  -a \( "${FAKE_ROOT}" != "/dev/ram0" \) ]
-then
-	REAL_ROOT="${FAKE_ROOT}"
-fi
-if [ -z "${REAL_INIT}" -a \( "${CDROOT}" = '0' \)  -a \( "${FAKE_INIT}" != "/linuxrc" \) ]
+if [ \( "${CDROOT}" = '0' \) ]
 then
-	REAL_INIT="${FAKE_INIT}"
+	if [ -z "${REAL_ROOT}" -a \( "${FAKE_ROOT}" != "/dev/ram0" \) ]
+	then
+		REAL_ROOT="${FAKE_ROOT}"
+	fi
+	if [ -z "${REAL_INIT}" -a \( "${FAKE_INIT}" != "/linuxrc" \) ]
+	then
+		REAL_INIT="${FAKE_INIT}"
+	fi
+	if [ -z "${REAL_ROOTFLAGS}" ]
+	then
+		REAL_ROOTFLAGS="${FAKE_ROOTFLAGS}"
+	fi
 fi
 
 # Set variables based on the value of REAL_ROOT

diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt
index 4691a98..86d7d53 100644
--- a/doc/genkernel.8.txt
+++ b/doc/genkernel.8.txt
@@ -545,9 +545,13 @@ which the ramdisk scripts would recognize.
 *aufs*::
     Enables support for AUFS2 (if available in the kernel).
 
-*real_rootflags*=<...>::
+*rootflags*=<...>::
     Additional flags to mount the real root system with.
-    For example *real_rootflags*=noatime would make "-o ro,noatime".
+    For example *rootflags*=noatime would make "-o ro,noatime".
+
+*real_rootflags*=<...>::
+    Legacy kernel parameter from kernel-2.4 initrd.
+    Does the same as *rootflags*=, which should be used in its place.
 
 *real_resume*=<...>::
 *resume*=<...>::


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

* [gentoo-commits] proj/genkernel:ryao commit in: doc/, defaults/
@ 2013-06-03 23:35 Richard Yao
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Yao @ 2013-06-03 23:35 UTC (permalink / raw
  To: gentoo-commits

commit:     9ead931af140020d4f5f2fed47a17da5dc8cfe24
Author:     Fabio Erculiani <lxnay <AT> sabayon <DOT> org>
AuthorDate: Thu Apr 25 10:45:19 2013 +0000
Commit:     Richard Yao <ryao <AT> gentoo <DOT> org>
CommitDate: Mon Apr 29 09:54:47 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=9ead931a

linuxrc: use "quiet" cmdline argument for a really quiet initramfs initialization

"quiet" is already used by the kernel to avoid printing messages on the
console unless they are errors or warnings. Genkernel should do the same
wrt its initramfs initialization code.
This has also the advantage of improving the boot speed.

---
 defaults/initrd.scripts | 34 ++++++++++++++++++++++------------
 defaults/linuxrc        | 35 +++++++++++++++++------------------
 doc/genkernel.8.txt     |  4 ++++
 3 files changed, 43 insertions(+), 30 deletions(-)

diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
old mode 100755
new mode 100644
index ff724b5..c1969d1
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -16,15 +16,16 @@ modules_scan() {
 	local loaded
 
 	MODS=$(cat /etc/modules/${1} 2>/dev/null)
-	[ -n "${MODS}" ] && echo -ne "${BOLD}   ::${NORMAL} "
-	[ -n "${MODS}" ] && echo -ne "Loading from ${1}: "
+	[ -n "${MODS}" ] && [ -z "${QUIET}" ] && \
+		echo -ne "${BOLD}   ::${NORMAL} Loading from ${1}: "
 
 	for x in ${MODS}
 	do
 		MLOAD=$(echo ${MLIST} | sed -e "s/.*${x}.*/${x}/")
 		if [ "${MLOAD}" = "${x}" ] # Only module to no-load
 		then
-			echo -e "${BOLD}   ::${NORMAL} Skipping ${x}..."
+			[ -z "${QUIET}" ] && \
+				echo -e "${BOLD}   ::${NORMAL} Skipping ${x}..."
 		elif [ "${MLOAD}" = "${MLIST}" ]
 		then
 			if [ -n "${DEBUG}" ]; then
@@ -33,17 +34,21 @@ modules_scan() {
 			fi
 			modprobe ${x} > /dev/null 2>&1
 			loaded=${?}
+
 			[ -n "${DEBUG}" -a "${loaded}" = "0" ] && \
 				echo "loaded"
 			[ -n "${DEBUG}" -a "${loaded}" != "0" ] && \
 				echo "not loaded"
+
 			[ -z "${DEBUG}" -a "${loaded}" = "0" ] && \
+				[ -z "${QUIET}" ] && \
 				echo -en "${x} "
 		else
-			echo -e "${BOLD}   ::${NORMAL} Skipping ${x}..."
+			[ -z "${QUIET}" ] && \
+				echo -e "${BOLD}   ::${NORMAL} Skipping ${x}..."
 		fi
 	done
-	[ -n "${MODS}" ] && echo
+	[ -n "${MODS}" ] && [ -z "${QUIET}" ] && echo
 }
 
 uppercase(){
@@ -377,7 +382,9 @@ test_success() {
 # $1 string
 # $2 hide flag
 
-good_msg() {	
+good_msg() {
+	[ -n "${QUIET}" ] && [ -z "${DEBUG}" ] && return 0
+
 	msg_string=$1
 	msg_string="${msg_string:-...}"
 	[ "$2" != 1 ] && echo -e "${GOOD}>>${NORMAL}${BOLD} ${msg_string} ${NORMAL}"
@@ -424,12 +431,15 @@ prompt_user(){
 	eval local oldvalue='$'${1}
 
 	[ $# != 2 -a $# != 3 ] && \
-		bad_msg "Bad invocation of function prompt_user, please file a bug \
-		report with this message" && exit 1
+		bad_msg "Bad invocation of function prompt_user."
+		bad_msg "Please file a bug report with this message" && exit 1
 	[ -n "${3}" ] && local explnt=" or : ${3}" || local explnt="."
-	
+
 	bad_msg "Could not find the ${2} in ${oldvalue}${explnt}"
-	echo '   Please specify another value or: press Enter for the same, type "shell" for a shell, or "q" to skip...'
+	bad_msg "Please specify another value or:"
+	bad_msg "- press Enter for the same"
+	bad_msg '- type "shell" for a shell'
+	bad_msg '- type "q" to skip...'
 	echo -n "${2}(${oldvalue}) :: "
 	read ${1}
 	case `eval echo '$'${1}` in
@@ -440,7 +450,7 @@ prompt_user(){
 			;;
 		'shell')
 			eval ${1}'='${oldvalue}
-			echo "To leave and try again just press <Ctrl>+D"
+			warn_msg "To leave and try again just press <Ctrl>+D"
 			run_shell
 			;;
 		'')
@@ -600,7 +610,7 @@ chooseKeymap() {
 		splash set_msg "Set keymap to ${keymap}"
 	elif [ -z "${keymap}" ]
 	then
-		echo
+		good_msg
 		good_msg "Keeping default keymap"
 		splash set_msg "Keeping default keymap"
 	else

diff --git a/defaults/linuxrc b/defaults/linuxrc
old mode 100755
new mode 100644
index ba9c5d5..1d26aaf
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -31,8 +31,6 @@ then
 	[ -e /linuxrc ] && rm /linuxrc
 fi
 
-quiet_kmsg
-
 CMDLINE=$(cat /proc/cmdline)
 # Scan CMDLINE for any specified real_root= or cdroot arguments
 FAKE_ROOT=''
@@ -41,6 +39,7 @@ FAKE_ROOTFLAGS=''
 INIT_OPTS=''
 ROOTFSTYPE='auto'
 CRYPT_SILENT=0
+QUIET=''
 
 mkdir -p /etc/cmdline /etc/modprobe.d
 for x in ${CMDLINE}
@@ -118,6 +117,9 @@ do
 				ZPOOL_FORCE=-f
 			fi
 		;;
+		quiet)
+			QUIET=1
+		;;
 		# Debug Options
 		debug)
 			DEBUG='yes'
@@ -270,6 +272,8 @@ do
 	esac
 done
 
+quiet_kmsg
+
 if [ "${CDROOT}" = '0' ]
 then
 	if [ -z "${REAL_ROOT}" -a "${FAKE_ROOT}" != "/dev/ram0" ]
@@ -457,17 +461,13 @@ then
 
 	if [ "${REAL_ROOT}" = '' ]
 	then
-		echo -n -e "${WARN}>>${NORMAL}${BOLD} No bootable medium found. Waiting for new devices"
-
+		warn_msg "No bootable medium found. Waiting for new devices..."
 		COUNTER=0
 		while [ ${COUNTER} -lt 3 ]; do
 			sleep 3
-			echo -n '.'
 			let COUNTER=${COUNTER}+1
 		done
-
 		sleep 1
-		echo -e "${NORMAL}"
 		bootstrapCD
 	fi
 
@@ -909,43 +909,42 @@ fi
 
 verbose_kmsg
 
-echo -ne "${GOOD}>>${NORMAL}${BOLD} Booting (initramfs)${NORMAL}"
+good_msg "Booting (initramfs)"
 
 cd "${CHROOT}"
 mkdir "${CHROOT}/proc" "${CHROOT}/sys" "${CHROOT}/run" 2>/dev/null
-echo -ne "${BOLD}.${NORMAL}"
 
 # If devtmpfs is mounted, try move it to the new root
-# If that fails, try to unmount all possible mounts of devtmpfs as stuff breaks otherwise
+# If that fails, try to unmount all possible mounts of
+# devtmpfs as stuff breaks otherwise
 for fs in /dev /sys /proc
 do
 	if grep -qs "$fs" /proc/mounts
 	then
 		if ! mount --move $fs "${CHROOT}"$fs
 		then
-			umount $fs || echo '*: Failed to move and unmount the ramdisk $fs!'
+			umount $fs || \
+			bad_msg "Failed to move and unmount the ramdisk $fs!"
 		fi
 	fi
 done
 
 if [ ! -e "${CHROOT}/dev/console" ] || [ ! -e "${CHROOT}/dev/null" ]
 then
-	echo -ne "${BAD}>>${NORMAL}${BOLD} ERROR: your real /dev is missing files required to boot (console and null)${NORMAL}"
+	bad_msg "ERROR: your real /dev is missing console and null"
 elif [ -e /etc/initrd.splash -a ! -e "${CHROOT}/dev/tty1" ]
 then
-	echo -ne "${BAD}>>${NORMAL}${BOLD} ERROR: your real /dev is missing tty1, which is required for splash${NORMAL}"
+	bad_msg "ERROR: your real /dev is missing tty1, required for splash"
 fi
 
-echo -e "${BOLD}.${NORMAL}"
-
 exec /sbin/switch_root -c "/dev/console" "${CHROOT}" "${REAL_INIT:-/sbin/init}" "${INIT_OPTS}"
 
 # If we get here, something bad has happened
 splash 'verbose'
 
-echo "A fatal error has probably occured since ${REAL_INIT:-/sbin/init} did not"
-echo "boot correctly. Trying to open a shell..."
-echo
+bad_msg "A fatal error has occured since ${REAL_INIT:-/sbin/init} did not"
+bad_msg "boot correctly. Trying to open a shell..."
+
 exec /bin/bash
 exec /bin/sh
 exec /bin/ash

diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt
index 54d26d2..f1cc814 100644
--- a/doc/genkernel.8.txt
+++ b/doc/genkernel.8.txt
@@ -493,6 +493,10 @@ which the ramdisk scripts would recognize.
     switch_root into "<CHROOT>/<SUBDIR>" instead of "<CHROOT>/".
     <CHROOT> is "/newroot" (or "/union") usually.
 
+*quiet*::
+    Do not print anything but error and warning messages during
+    the execution of the initramfs init scripts.
+
 *debug*::
     Drop into a debug shell early in the process.
 


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

end of thread, other threads:[~2013-06-03 23:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-01 16:53 [gentoo-commits] proj/genkernel:ryao commit in: doc/, defaults/ Richard Yao
  -- strict thread matches above, loose matches on Subject: below --
2013-06-03 23:35 Richard Yao
2013-06-03 23:35 Richard Yao
2013-06-03 23:35 Richard Yao

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