diff options
author | Pascal Terjan <pterjan@mandriva.org> | 2009-04-03 17:22:30 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mandriva.org> | 2009-04-03 17:22:30 +0000 |
commit | d2e3f8c0bb9ca5ea9267390c4971e4567c583068 (patch) | |
tree | fd6ee474268a8fe84e1dc0eae9659407014bd309 | |
parent | 64c46896bffa2cd987cc2231ac0c2c6b2a358479 (diff) | |
download | drakx-backup-do-not-use-d2e3f8c0bb9ca5ea9267390c4971e4567c583068.tar drakx-backup-do-not-use-d2e3f8c0bb9ca5ea9267390c4971e4567c583068.tar.gz drakx-backup-do-not-use-d2e3f8c0bb9ca5ea9267390c4971e4567c583068.tar.bz2 drakx-backup-do-not-use-d2e3f8c0bb9ca5ea9267390c4971e4567c583068.tar.xz drakx-backup-do-not-use-d2e3f8c0bb9ca5ea9267390c4971e4567c583068.zip |
add a userspace helper to load firmwares
-rw-r--r-- | images/NEWS | 1 | ||||
-rwxr-xr-x | images/make_boot_img | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/images/NEWS b/images/NEWS index f00ca4acb..126fc05d9 100644 --- a/images/NEWS +++ b/images/NEWS @@ -1,5 +1,6 @@ - include firmwares for most common network cards (#49195) - pass --restore instead of restore option +- add a userspace helper to load firmwares Version 1.37 - 3 April 2009, by Pascal Terjan diff --git a/images/make_boot_img b/images/make_boot_img index 4c788368d..246eb9de1 100755 --- a/images/make_boot_img +++ b/images/make_boot_img @@ -163,6 +163,23 @@ sub initrd { _ "cp -a $_ $tmp_initrd$_"; }; + output("$tmp_initrd/sbin/hotplug", q{ +#!/bin/sh -e +if [ \$SUBSYSTEM = firmware ] && [ \$ACTION = add ] && [ -n "\$FIRMWARE" ] ; then + if [ ! -e /sys\$DEVPATH/loading ]; then + exit 1 + fi + if [ -e "/lib/firmware/$FIRMWARE" ]; then + echo 1 > /sys$DEVPATH/loading + cat "/lib/firmware/$FIRMWARE" > /sys$DEVPATH/data + echo 0 > /sys$DEVPATH/loading + exit 0 + fi + echo -1 > /sys$DEVPATH/loading + exit 1 +fi +}); + _ "chmod 755 $tmp_initrd/sbin/hotplug"; _ "install $stage1_root/init $tmp_initrd/"; foreach ('stage1', 'pppd', 'pppoe') { _ "install $stage1_root/$_ $tmp_initrd/sbin/"; |