diff options
author | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2016-12-23 13:05:15 +1100 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2016-12-23 13:08:15 +1100 |
commit | 1ed8cbeebbb040290ddd1ac79eb1334efb8da7c7 (patch) | |
tree | 06e1f836bd11145ec0d79abff22b48e6a7176508 /openpower/overlay | |
parent | 52489f03e809f4f5523db035c1f33d25ce3692b4 (diff) | |
download | blackbird-op-build-1ed8cbeebbb040290ddd1ac79eb1334efb8da7c7.tar.gz blackbird-op-build-1ed8cbeebbb040290ddd1ac79eb1334efb8da7c7.zip |
overlay: Move `udevadm settle` to after pb-discover start
Add S10udev and S17udevsettle to the overlay to replace the existing
S10udev from buildroot. `udevadm settle` can wait up to 30 seconds which
delays the start of pb-discover and can cause important information to
miss the Petitboot UI. Start pb-discover first and then settle to have
the UI receive all events and bring up devices in the same time.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'openpower/overlay')
-rwxr-xr-x | openpower/overlay/etc/init.d/S10udev | 49 | ||||
-rwxr-xr-x | openpower/overlay/etc/init.d/S17udevsettle | 10 |
2 files changed, 59 insertions, 0 deletions
diff --git a/openpower/overlay/etc/init.d/S10udev b/openpower/overlay/etc/init.d/S10udev new file mode 100755 index 00000000..fd8179ea --- /dev/null +++ b/openpower/overlay/etc/init.d/S10udev @@ -0,0 +1,49 @@ +#!/bin/sh +# +# udev This is a minimal non-LSB version of a UDEV startup script. It +# was derived by stripping down the udev-058 LSB version for use +# with buildroot on embedded hardware using Linux 2.6.34+ kernels. +# +# You may need to customize this for your system's resource limits +# (including startup time!) and administration. For example, if +# your early userspace has a custom initramfs or initrd you might +# need /dev much earlier; or without hotpluggable busses (like USB, +# PCMCIA, MMC/SD, and so on) your /dev might be static after boot. +# +# This script assumes your system boots right into the eventual root +# filesystem, and that init runs this udev script before any programs +# needing more device nodes than the bare-bones set -- /dev/console, +# /dev/zero, /dev/null -- that's needed to boot and run this script. +# + +# Check for missing binaries +UDEV_BIN=/sbin/udevd +test -x $UDEV_BIN || exit 5 + +# Check for config file and read it +UDEV_CONFIG=/etc/udev/udev.conf +test -r $UDEV_CONFIG || exit 6 +. $UDEV_CONFIG + +case "$1" in + start) + printf "Populating ${udev_root:-/dev} using udev: " + printf '\000\000\000\000' > /proc/sys/kernel/hotplug + $UDEV_BIN -d || (echo "FAIL" && exit 1) + udevadm trigger --type=subsystems --action=add + udevadm trigger --type=devices --action=add + echo "done" + ;; + stop) + # Stop execution of events + udevadm control --stop-exec-queue + killall udevd + ;; + *) + echo "Usage: $0 {start|stop}" + exit 1 + ;; +esac + + +exit 0 diff --git a/openpower/overlay/etc/init.d/S17udevsettle b/openpower/overlay/etc/init.d/S17udevsettle new file mode 100755 index 00000000..92d3f9c0 --- /dev/null +++ b/openpower/overlay/etc/init.d/S17udevsettle @@ -0,0 +1,10 @@ +#!/bin/sh +case "$1" in + start) + udevadm settle --timeout=30 || echo "udevadm settle failed" + ;; + *) + exit 1;; +esac + +exit 0 |