Advanced USB delay handling

USB boot delay is now handled with the usbdelay kernel param (default=0)

We use the built in delay of usb-storage to control this. by setting the
module's delay param. If your USB device doesn't work on first boot, try
setting usbdelay=10 or so

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
This commit is contained in:
Aaron Griffin 2009-01-24 20:17:54 -06:00
parent 7b2dea215e
commit 8a37489379
4 changed files with 22 additions and 5 deletions

View File

@ -7,7 +7,9 @@ install: all
install -D -m 755 testiso $(DESTDIR)/usr/bin/testiso install -D -m 755 testiso $(DESTDIR)/usr/bin/testiso
# hooks/install are needed by mkinitcpio # hooks/install are needed by mkinitcpio
install -D -m 644 hooks/archiso $(DESTDIR)/lib/initcpio/hooks/archiso install -D -m 644 hooks/archiso $(DESTDIR)/lib/initcpio/hooks/archiso
install -D -m 644 hooks/archiso-early $(DESTDIR)/lib/initcpio/hooks/archiso-early
install -D -m 644 install/archiso $(DESTDIR)/lib/initcpio/install/archiso install -D -m 644 install/archiso $(DESTDIR)/lib/initcpio/install/archiso
install -D -m 644 install/archiso-early $(DESTDIR)/lib/initcpio/install/archiso-early
uninstall: uninstall:
rm -f $(DESTDIR)/usr/sbin/mkarchiso rm -f $(DESTDIR)/usr/sbin/mkarchiso

View File

@ -54,13 +54,11 @@ run_hook ()
msg "done." msg "done."
# external drives may need to settle # external drives may need to settle
msg ":: Waiting for usb devices to settle..." msg ":: Waiting for devices to settle..."
/sbin/udevadm trigger --subsystem-match=usb /sbin/udevadm trigger --subsystem-match=usb
/sbin/udevadm settle /sbin/udevadm settle
if [ "${rootdelay}" != "0" ]; then msg ":: Waiting ${usbdelay:-0}s for USB devices"
/bin/sleep "${rootdelay}" /bin/sleep "${usbdelay:-0}"
export rootdelay=0
fi
msg ":: Scanning for boot device..." msg ":: Scanning for boot device..."

View File

@ -0,0 +1,8 @@
# vim: set ft=sh:
run_hook ()
{
# Set our usbdelay time. Default: 0
/bin/mkdir -p /etc/modprobe.d/
echo "options usb-storage delay_use=${usbdelay:-0}" >/
/etc/modprobe.d/usb-delay
}

View File

@ -0,0 +1,9 @@
install ()
{
MODULES=""
BINARIES=""
FILES=""
SCRIPT="archiso-early"
}
# vim:ft=sh:ts=4:sw=4:et: