Change how atheros wifi drivers get installed

This commit is contained in:
Bob Mottram 2018-01-26 14:15:32 +00:00
parent 52deb018d4
commit 874efc080f
6 changed files with 4 additions and 48 deletions

View File

@ -1,4 +0,0 @@
Since compiling Atheros drivers for use with a wifi dongle on the Beaglebone Black takes a long time pre-compiled drivers are also available here. These may be extracted into /lib/firmware/ before beginning the main installation via 'freedombone menuconfig'.
sha256:
7eb9324681f03c7630ed01e490ea447dfbd96c9b5389e45b64e4646d1be16ff1 ath9k_htc_driver_bbb.tar.gz

Binary file not shown.

View File

@ -1,17 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABCAAGBQJVs+ZQAAoJEARSzHzqmC44O1oP+wfzs0SL/NjJbl3qtw1P3hSu
jpHZ9kqEibpFX1VSvFrLb9qiqHnyoBcfoz04kWQ+6uKKc8MC1cev14FUdtKiLl7h
9fESVSIx8VgzHmDNkcXj+nLKI5KMp/bORZxoFL0hM/JVNUQH09RT1/upLE6k5PxA
BBDF+lD0Ez9VGSa91FP5T+mDWXFtEZMwTajkzRyi+H38lSEsfMvhbWV1c5M+W7kQ
u2xf5Z1BTd5lH6HPN3LKf5sOWaLAUa+jkUXLJiDfULm1ylO3ckj2TMQDlriY1Cib
zvFjQ4l5NVmO4/L3HE2yIDtJpHxRCVExtzZk+iXLh8ep+avV1B0l2bf5ObahaK7q
hIxudj9eeTb6ZyIUH/tUYW8LjTwNMom1vN98mG7MGnaqMHDlSqrZv36M42SM9FMb
nSu6PdeFycqCM3O8h3HDuMrgBLckLRhubGVBpkE7XZXyhs8ahVGi8LwltfuVvWFz
NsPnmqI8vdSZDN/b3SAN/zBb47STGFhNY9tMgdaebS40IbJ5iD5KCRLarKTHyRTS
W10Q/Onno25UWbu/+ZIjfbuwaoboI8CNJRUI4YDhR4Huahh+s1v9kSjuXwMacO7R
+nZEXJkP0HOQUZY9g7OjrVEXHdKUw1Vlw3AyQt7Z4SUNjeEoRP1Bcr7LPBB8Y5pW
sTndAdLqpVzMBymfLGRS
=OOIn
-----END PGP SIGNATURE-----

Binary file not shown.

View File

@ -496,18 +496,7 @@ atheros_wifi() {
return
fi
firmware_filename="open-ath9k-htc-firmware_1.3-1_all.deb"
firmware_hash='5fea58ffefdf0ef15b504db7fbe3bc078c03e0d927bba64085e4b6f2546102f5'
firmware_url="http://us.archive.trisquel.info/trisquel/pool/main/o/open-ath9k-htc-firmware/$firmware_filename"
firmware_tempfile="/tmp/$firmware_filename"
wget "$firmware_url" -O "$rootdir$firmware_tempfile"
downloaded_firmware_hash=$(sha256sum "$rootdir$firmware_tempfile" | awk -F ' ' '{print $1}')
if [[ "$downloaded_firmware_hash" == "$firmware_hash" ]]; then
chroot "$rootdir" dpkg -i "$firmware_tempfile"
else
echo 'WARNING: Atheros Wifi firmware hash does not match. The driver has not been installed.'
fi
chroot "$rootdir" dpkg -i /root/freedombone/drivers/firmware-ath9k-htc.deb
}
configure_wifi() {

View File

@ -13,7 +13,7 @@
# License
# =======
#
# Copyright (C) 2015-2016 Bob Mottram <bob@freedombone.net>
# Copyright (C) 2015-2018 Bob Mottram <bob@freedombone.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@ -86,7 +86,7 @@ function setup_wifi_atheros {
return
fi
atheros_drivers_file=drivers/ath9k_htc_driver_bbb.tar.gz
atheros_drivers_file=drivers/firmware-ath9k-htc.deb
if [ ! -f $atheros_drivers_file ]; then
if [ ! -f ~/freedombone/$atheros_drivers_file ]; then
return
@ -96,20 +96,8 @@ function setup_wifi_atheros {
else
atheros_drivers_file=$(pwd)/$atheros_drivers_file
fi
if [ ! -d /lib/firmware ]; then
mkdir /lib/firmware
if [ ! -d /lib/firmware ]; then
return
fi
fi
if [ -f /lib/firmware/htc_9271.fw ]; then
return
fi
curr_dir=$(pwd)
cd /lib/firmware
tar -xzvf $atheros_drivers_file
dpkg -i $atheros_drivers_file
reset_usb_devices
cd $curr_dir
update_wifi_adaptors
if [ $IFACE ]; then
wpa_action ${IFACE} stop