summaryrefslogtreecommitdiff
path: root/openwrt
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-01-05 01:20:44 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-01-05 01:20:44 +0000
commit029055c7d78d8b49a945f514e7ce38edf0850e54 (patch)
tree77ced3582a211d69b478e6bad7b3a7cb7c25187d /openwrt
parentd59abc2a2d15362e4a065b1aacd175609bffcfe9 (diff)
downloadmtk-20170518-029055c7d78d8b49a945f514e7ce38edf0850e54.zip
mtk-20170518-029055c7d78d8b49a945f514e7ce38edf0850e54.tar.gz
mtk-20170518-029055c7d78d8b49a945f514e7ce38edf0850e54.tar.bz2
add firmware loading support to hotplug
SVN-Revision: 2834
Diffstat (limited to 'openwrt')
-rwxr-xr-xopenwrt/package/base-files/default/sbin/hotplug9
1 files changed, 9 insertions, 0 deletions
diff --git a/openwrt/package/base-files/default/sbin/hotplug b/openwrt/package/base-files/default/sbin/hotplug
index e53b2af..3500f75 100755
--- a/openwrt/package/base-files/default/sbin/hotplug
+++ b/openwrt/package/base-files/default/sbin/hotplug
@@ -1,4 +1,13 @@
#!/bin/sh
+[ "$1" = "firmware" -a "$ACTION" = "add" ] && {
+ [ -f "/lib/firmware/$FIRMWARE" ] && {
+ echo 1 > "/sys$DEVPATH/loading"
+ cp "/lib/firmware/$FIRMWARE" "/sys$DEVPATH/data"
+ echo 0 > "/sys$DEVPATH/loading"
+ }
+ exit 0
+}
+
[ -e /tmp/.failsafe ] && {
export FAILSAFE=true
} || {