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://downloads.openwrt.org/sources/wl_apsta-3.130.20.0.o
27 echo "Some problem occurred during the firmware download. Please check your internet connection."
30 if [ -d /lib/firmware/b43legacy ]; then
31 echo "Deleting old extracted firmware..."
32 rm -rf /lib/firmware/b43legacy
35 b43-fwcutter -w "$FIRMWARE_INSTALL_DIR" wl_apsta-3.130.20.0.o
40 if [ "$(stat -c %d/%i /)" != "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ];
42 echo "A chroot environment has been detected."
43 echo "Remember this firmware needs kernel >= 2.6.25."
47 echo "No chroot environment found. Starting normal installation"
50 # install firmware unconditional if the corresponding debconf value is true
51 # this is usefull for live-systems or similar systems that should work on
53 db_get b43-fwcutter/install-unconditional
54 if [ "$RET" = "true" ] ; then
59 # Fix for BCM4306 [14e4:4320] (rev 02)
60 chip=`lspci -n | grep -o "14e4:4320 (rev 02)"` || true
62 echo "Your card is BCM4306 [14e4:4320] (rev 02), using b43legacy firmware"
69 pci=`lspci -n | grep -o "14e4:[1234567890abcdef]\+"` || true
71 if [ -n "$pci" ]; then
72 for device in $pci; do
73 device_id=`echo $device | cut -d: -f2`
75 4301 | 4306 | 4320 | 4324 | 4325)
83 if [ "$supported" = 0 ]; then
84 echo "No supported card found."
85 echo "Use b43 firmware. This is just for the b43legacy driver."