From b1329967a77f1aa3cbd16b275b630f665ffeabfb Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Fri, 29 Jul 2005 15:36:42 +0000 Subject: [PATCH] Added --bladecenter for slow USB CD on IBM BladeCenter. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@288 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- gen_cmdline.sh | 5 +++++ gen_determineargs.sh | 7 +++++++ generic/initrd.scripts | 28 +++++++++++++++------------- generic/linuxrc | 3 +++ 4 files changed, 30 insertions(+), 13 deletions(-) diff --git a/gen_cmdline.sh b/gen_cmdline.sh index 889c561..53f9229 100755 --- a/gen_cmdline.sh +++ b/gen_cmdline.sh @@ -69,6 +69,7 @@ longusage() { echo " --lvm2 Include LVM2 support" # echo " --unionfs Include UNIONFS support" echo " --dmraid Include DMRAID support" + echo " --bladecenter Enables extra pauses for IBM Bladecenter CD boots" echo " --bootloader=grub Add new kernel to GRUB configuration" echo " --linuxrc= Specifies a user created linuxrc" echo " --disklabel Include disk label and uuid support in your initrd" @@ -201,6 +202,10 @@ parse_cmdline() { CMD_NO_BUSYBOX=1 print_info 2 "CMD_NO_BUSYBOX: $CMD_NO_BUSYBOX" ;; + --bladecenter) + CMD_BLADECENTER=1 + print_info 2 "CMD_BLADECENTER: $CMD_BLADECENTER" + ;; --dmraid) CMD_DMRAID=1 print_info 2 "CMD_DMRAID: $CMD_DMRAID" diff --git a/gen_determineargs.sh b/gen_determineargs.sh index 32f916c..34a9de8 100644 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -387,6 +387,13 @@ determine_real_args() { else BUSYBOX=1 fi + + if isTrue "${CMD_BLADECENTER}" + then + BLADECENTER=1 + else + BLADECENTER=0 + fi if isTrue "${CMD_DMRAID}" then diff --git a/generic/initrd.scripts b/generic/initrd.scripts index 730c803..54f9986 100644 --- a/generic/initrd.scripts +++ b/generic/initrd.scripts @@ -257,25 +257,27 @@ start_dev_mgr(){ # Check udev is available... if [ "${KV_2_6_OR_GREATER}" -a ! "${USE_UDEV_NORMAL}" -eq '0' -a -x /sbin/udev ] then - USE_UDEV_NORMAL=1 + USE_UDEV_NORMAL=1 else - USE_UDEV_NORMAL=0 + USE_UDEV_NORMAL=0 fi if [ "${USE_UDEV_NORMAL}" -eq '1' ] then - cd /sys - kill_devfsd - good_msg 'Activating udev' - runUdev - cd / + cd /sys + [ "${BLADECENTER}" -eq "1" ] && sleep 10 + kill_devfsd + good_msg 'Activating udev' + runUdev + [ "${BLADECENTER}" -eq "1" ] && sleep 20 + cd / else - if [ ! -e /dev/.devfsd ] - then - good_msg 'Activating devfs' - mount -t devfs devfs /dev - devfsd /dev -np - fi + if [ ! -e /dev/.devfsd ] + then + good_msg 'Activating devfs' + mount -t devfs devfs /dev + devfsd /dev -np + fi fi } diff --git a/generic/linuxrc b/generic/linuxrc index ceaac22..7bd9eb0 100644 --- a/generic/linuxrc +++ b/generic/linuxrc @@ -539,6 +539,7 @@ then fi done + [ "${BLADECENTER}" -eq '1' ] && sleep 10 mkdir initrd proc tmp sys 2>/dev/null chmod 1777 tmp fi @@ -553,6 +554,7 @@ then # Let Init scripts know that we booted from CD export CDBOOT CDBOOT=1 + [ "${BLADECENTER}" -eq '1' ] && sleep 10 else mkdir -p ${NEW_ROOT}/tmp/.initrd fi @@ -576,6 +578,7 @@ then cd ${CHROOT} mkdir ${CHROOT}/proc ${CHROOT}/sys 2>/dev/null pivot_root . tmp/.initrd + [ "${BLADECENTER}" -eq '1' ] && sleep 10 echo -n '.' if /tmp/.initrd/bin/[ "${USE_DEVFS_NORMAL}" -eq '1' -a "${CDROOT}" -eq '0' ] -- 2.26.2