Bob Mottram 7 лет назад
Родитель
Сommit
5814c386c1
2 измененных файлов: 3 добавлений и 61 удалений
  1. 2
    16
      src/freedombone-image-customise
  2. 1
    45
      src/freedombone-utils-wifi

+ 2
- 16
src/freedombone-image-customise Просмотреть файл

@@ -492,22 +492,7 @@ continue_installation() {
492 492
 }
493 493
 
494 494
 atheros_wifi() {
495
-    if [[ "$MACHINE" == "beaglebonewifi" ]]; then
496
-        return
497
-    fi
498
-
499
-    firmware_filename="open-ath9k-htc-firmware_1.3-1_all.deb"
500
-    firmware_hash='5fea58ffefdf0ef15b504db7fbe3bc078c03e0d927bba64085e4b6f2546102f5'
501
-
502
-    firmware_url="http://us.archive.trisquel.info/trisquel/pool/main/o/open-ath9k-htc-firmware/$firmware_filename"
503
-    firmware_tempfile="/tmp/$firmware_filename"
504
-    wget "$firmware_url" -O "$rootdir$firmware_tempfile"
505
-    downloaded_firmware_hash=$(sha256sum "$rootdir$firmware_tempfile" | awk -F ' ' '{print $1}')
506
-    if [[ "$downloaded_firmware_hash" == "$firmware_hash" ]]; then
507
-        chroot "$rootdir" dpkg -i "$firmware_tempfile"
508
-    else
509
-        echo 'WARNING: Atheros Wifi firmware hash does not match. The driver has not been installed.'
510
-    fi
495
+    chroot "$rootdir" apt-get -yq install open-ath9k-htc-firmware
511 496
 }
512 497
 
513 498
 configure_wifi() {
@@ -902,6 +887,7 @@ initialise_mesh() {
902 887
         # install proprietary wifi drivers
903 888
         # see https://wiki.debian.org/iwlwifi
904 889
         chroot "$rootdir" apt-get -yq install firmware-iwlwifi firmware-b43-installer firmware-brcm80211 firmware-realtek
890
+        chroot "$rootdir" apt-get -yq install firmware-atheros firmware-zd1211
905 891
     fi
906 892
 
907 893
     INSTALLING_MESH=1

+ 1
- 45
src/freedombone-utils-wifi Просмотреть файл

@@ -36,9 +36,6 @@ WIFI_PASSPHRASE=
36 36
 WIFI_HOTSPOT='no'
37 37
 WIFI_NETWORKS_FILE=~/${PROJECT_NAME}-wifi.cfg
38 38
 
39
-# repo for atheros AR9271 wifi driver
40
-ATHEROS_WIFI_REPO="https://github.com/qca/open-ath9k-htc-firmware.git"
41
-
42 39
 function default_network_config {
43 40
     echo '# This file describes the network interfaces available on your system' > /etc/network/interfaces
44 41
     echo '# and how to activate them. For more information, see interfaces(5).' >> /etc/network/interfaces
@@ -166,48 +163,7 @@ function install_atheros_wifi {
166 163
     if [[ $(is_completed $FUNCNAME) == "1" ]]; then
167 164
         return
168 165
     fi
169
-    if [ $INSTALLING_ON_BBB != "yes" ]; then
170
-        return
171
-    fi
172
-    if [[ $ENABLE_BATMAN != "yes" ]]; then
173
-        return
174
-    fi
175
-    if [ -d $INSTALL_DIR/open-ath9k-htc-firmware ]; then
176
-        return
177
-    fi
178
-    # have drivers already been installed ?
179
-    if [ -f /lib/firmware/htc_9271.fw ]; then
180
-        return
181
-    fi
182
-    apt-get -yq install build-essential cmake git m4 texinfo
183
-    if [ ! -d $INSTALL_DIR ]; then
184
-        mkdir -p $INSTALL_DIR
185
-    fi
186
-    cd $INSTALL_DIR
187
-    if [ ! -d $INSTALL_DIR/open-ath9k-htc-firmware ]; then
188
-        function_check git_clone
189
-        git_clone $ATHEROS_WIFI_REPO $INSTALL_DIR/open-ath9k-htc-firmware
190
-        if [ ! "$?" = "0" ]; then
191
-            rm -rf $INSTALL_DIR/open-ath9k-htc-firmware
192
-            exit 74283
193
-        fi
194
-    fi
195
-    cd $INSTALL_DIR/open-ath9k-htc-firmware
196
-    git checkout 1.4.0
197
-    make toolchain
198
-    if [ ! "$?" = "0" ]; then
199
-        rm -rf $INSTALL_DIR/open-ath9k-htc-firmware
200
-        exit 24820
201
-    fi
202
-    make firmware
203
-    if [ ! "$?" = "0" ]; then
204
-        rm -rf $INSTALL_DIR/open-ath9k-htc-firmware
205
-        exit 63412
206
-    fi
207
-    cp target_firmware/*.fw /lib/firmware/
208
-    if [ ! "$?" = "0" ]; then
209
-        exit 74681
210
-    fi
166
+    apt-get -yq install open-ath9k-htc-firmware
211 167
     mark_completed $FUNCNAME
212 168
 }
213 169