5 . /usr/share/debconf/confmodule
12 export FIRMWARE_INSTALL_DIR="/lib/firmware"
15 APT_PROXIES=$(apt-config shell \
16 http_proxy Acquire::http::Proxy \
17 https_proxy Acquire::https::Proxy \
18 ftp_proxy Acquire::ftp::Proxy \
21 if [ -n "$APT_PROXIES" ]; then
22 eval export $APT_PROXIES
25 wget --timeout=60 http://www.lwfinger.com/b43-firmware/broadcom-wl-5.100.138.tar.bz2
27 echo "Some problem occurred during the firmware download. Please check your internet connection."
30 if [ -d /lib/firmware/b43 ]; then
31 echo "Deleting old extracted firmware..."
32 rm -rf /lib/firmware/b43
35 tar xvjf broadcom-wl-5.100.138.tar.bz2
36 cd broadcom-wl-5.100.138/linux
37 b43-fwcutter -w "$FIRMWARE_INSTALL_DIR" wl_apsta.o
42 if [ "$(stat -c %d/%i /)" != "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ];
44 echo "A chroot environment has been detected."
45 echo "Remember this firmware needs kernel >= 2.6.25."
49 echo "No chroot environment found. Starting normal installation"
55 # check kernel version
56 if dpkg --compare-versions 2.6.25 gt `uname -r | cut -d- -f1`; then
57 echo "Kernel too old. This firmware needs >= 2.6.25!."
62 # install firmware unconditional if the corresponding debconf value is true
63 # this is usefull for live-systems or similar systems that should work on
65 db_get b43-fwcutter/install-unconditional
66 if [ "$RET" = "true" ] ; then
71 # Fix for BCM4306/3 [14e4:4320] (rev 03)
72 chip=`lspci -n | grep -o "14e4:4320 (rev 03)"` || true
74 echo "Your card is BCM4306/3 [14e4:4320] (rev 03), firwmare 5.100.138 will be used"
79 # Fix for BCM4306/3 [14e4:4324] (rev 03)
80 chip=`lspci -n | grep -o "14e4:4324 (rev 03)"` || true
82 echo "Your card is BCM4306/3 [14e4:4324] (rev 03), firwmare 5.100.138 will be used"
88 pci=`lspci -n | grep -o "14e4:[1234567890abcdef]\+"` || true
90 if [ -n "$pci" ]; then
91 for device in $pci; do
92 device_id=`echo $device | cut -d: -f2`
94 4301 | 4306 | 4320 |4324 | 4325)
97 4307 | 4311 | 4312 | 4315 | 4318 | 4319 | 4321 | 4328 | 4329 | 432b | 432c | 4331 | 4353 | 4357 | 5354)
100 4322 | 4358 | 4365 | 4727 | a8d8)
101 # b43 upstream says 3.6+ for a8d8
102 unsupported="$unsupported $device_id"
104 0576 | 4313 | 432a | 432d | 4358 | 4359 | 435a | a99d)
113 if [ "$legacy" ]; then
114 echo "An unsupported BCM4301, BCM4306 or BCM4306/2 device was found."
115 echo "Use b43legacy firmware (firmware-b43legacy-installer package) instead."
118 elif [ "$unsupported" ]; then
119 echo -n "Unsupported device(s) found: PCI id "
120 for device_id in $unsupported; do echo -n "14e4:$device_id "; done
124 elif [ "$nottested" ]; then
125 echo "This card is actually not tested. Please install the driver manually."
127 elif [ "$latest" ]; then
128 echo "This card work with newer 5.100.138 firmware. Trying to install it."