~ubuntu-branches/ubuntu/maverick/linux-backports-modules-2.6.32/maverick

« back to all changes in this revision

Viewing changes to updates/compat-wireless-2.6/udev/compat_firmware.sh

  • Committer: Bazaar Package Importer
  • Author(s): Andy Whitcroft, Andy Whitcroft
  • Date: 2010-02-04 23:15:51 UTC
  • Revision ID: james.westby@ubuntu.com-20100204231551-vjz5pkvxclukjxm1
Tags: 2.6.32-12.1
[ Andy Whitcroft ]

* initial LBM for lucid
* drop generated files
* printchanges -- rebase tree does not have stable tags use changelog
* printenv -- add revisions to printenv output
* formally rename compat-wireless to linux-backports-modules-wireless
* Update to compat-wireless-2.6.33-rc5
* update nouveau to mainline 2.6.33-rc4
* add new LBM package for nouveau
* nouveau -- fix major numbers and proc entry names
* fix up firmware installs for -wireless
* clean up UPDATE-NOVEAU
* update Nouveau to v2.6.33-rc6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -e
 
2
 
 
3
# This is ported from Ubuntu but ubuntu uses these directories which
 
4
# other distributions don't care about:
 
5
# FIRMWARE_DIRS="/lib/firmware/updates/$(uname -r) /lib/firmware/updates \
 
6
#               /lib/firmware/$(uname -r) /lib/firmware"
 
7
# If your distribution looks for firmware in other directories
 
8
# feel free to extend this and add your own directory here.
 
9
#
 
10
FIRMWARE_DIRS="/lib/firmware"
 
11
 
 
12
err() {
 
13
        echo "$@" >&2
 
14
        logger -t "${0##*/}[$$]" "$@" 2>/dev/null || true
 
15
}
 
16
 
 
17
if [ ! -e /sys$DEVPATH/loading ]; then
 
18
        err "udev firmware loader misses sysfs directory"
 
19
        exit 1
 
20
fi
 
21
 
 
22
for DIR in $FIRMWARE_DIRS; do
 
23
        [ -e "$DIR/$FIRMWARE" ] || continue
 
24
        echo 1 > /sys$DEVPATH/loading
 
25
        cat "$DIR/$FIRMWARE" > /sys$DEVPATH/data
 
26
        echo 0 > /sys$DEVPATH/loading
 
27
        exit 0
 
28
done
 
29
 
 
30
echo -1 > /sys$DEVPATH/loading
 
31
err "Cannot find  firmware file '$FIRMWARE'"
 
32
mkdir -p /dev/.udev/firmware-missing
 
33
file=$(echo "$FIRMWARE" | sed 's:/:\\x2f:g')
 
34
ln -s -f "$DEVPATH" /dev/.udev/firmware-missing/$file
 
35
exit 1