From bccc5d8fa79194ea2e05f8be00bbca4a3fec6e1e Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Mon, 12 Feb 2007 21:28:55 +0000 Subject: [PATCH] Added a non-braindead version of a patch provided by Fabio Erculiani in bug #160333. This is completely untested, so I'm rolling up 3.4.7_pre2 to get it tested prior to genkernel 3.4.7 going final. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@486 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- ChangeLog | 6 ++++++ generic/initrd.scripts | 22 +++++++++++++++++----- generic/linuxrc | 15 ++++++++++++--- genkernel | 2 +- 4 files changed, 36 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 511f96a..4e3fa6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,12 @@ # Copyright 2006-2007 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 12 Feb 2007; Chris Gianelloni + generic/initrd.scripts, generic/linuxrc, genkernel: + Added a non-braindead version of a patch provided by Fabio Erculiani + in bug #160333. This is completely untested, so I'm + rolling up 3.4.7_pre2 to get it tested prior to genkernel 3.4.7 going final. + 12 Feb 2007; Chris Gianelloni ppc/Pegasos: Add a known-working 2.6.16+ kernel config from http://www.ppczone.org/downloads/config-2.6.16-pegasos for bug #165758. diff --git a/generic/initrd.scripts b/generic/initrd.scripts index 0e19447..077d396 100644 --- a/generic/initrd.scripts +++ b/generic/initrd.scripts @@ -321,14 +321,26 @@ start_dev_mgr() { if [ "${USE_UDEV_NORMAL}" -eq '1' ] then - cd /sys - [ "${DO_slowusb}" ] && sleep 10 + for dir in /sys/bus/usb/drivers/usb-storage/* + do + if [ -d "${dir}" ] + then + FORCE_slowusb="1" + fi + done + if [ "${DO_slowusb}" ] || [ "${FORCE_slowusb}" ] + then + sleep 10 + fi + kill_devfsd good_msg 'Activating mdev' -# runUdev runmdev - [ "${DO_slowusb}" ] && sleep 20 - cd / + + if [ "${DO_slowusb}" ] || [ "${FORCE_slowusb}" ] + then + sleep 10 + fi else good_msg 'Activating devfs' mount -t devfs devfs /dev 2>/dev/null diff --git a/generic/linuxrc b/generic/linuxrc index 7b370fa..019b403 100644 --- a/generic/linuxrc +++ b/generic/linuxrc @@ -625,7 +625,10 @@ then fi done - [ "${DO_slowusb}" ] && sleep 10 + if [ "${DO_slowusb}" ] || [ "${FORCE_slowusb}" ] + then + sleep 10 + fi mkdir initrd proc tmp sys 2>/dev/null chmod 1777 tmp fi @@ -640,7 +643,10 @@ then # Let Init scripts know that we booted from CD export CDBOOT CDBOOT=1 - [ "${DO_slowusb}" ] && sleep 10 + if [ "${DO_slowusb}" ] || [ "${FORCE_slowusb}" ] + then + sleep 10 + fi else if [ "${USE_UNIONFS_NORMAL}" -eq '1' ] then @@ -678,7 +684,10 @@ then cd ${CHROOT} mkdir ${CHROOT}/proc ${CHROOT}/sys 2>/dev/null pivot_root . tmp/.initrd - [ "${DO_slowusb}" ] && sleep 10 + if [ "${DO_slowusb}" ] || [ "${FORCE_slowusb}" ] + then + sleep 10 + fi echo -n '.' if /tmp/.initrd/bin/[ "${USE_DEVFS_NORMAL}" -eq '1' -a "${CDROOT}" -eq '0' ] diff --git a/genkernel b/genkernel index 54247fd..890cb25 100755 --- a/genkernel +++ b/genkernel @@ -2,7 +2,7 @@ # Genkernel v3 PATH="/bin:/usr/bin:/sbin:/usr/sbin" -GK_V='3.4.7_pre1' +GK_V='3.4.7_pre2' TMPDIR='/var/tmp/genkernel' TEMP=${TMPDIR}/$RANDOM.$RANDOM.$RANDOM.$$ -- 2.26.2