From 0ae95110d292d3268fa032ca04f04f61f6438359 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 22 Dec 2015 11:07:00 +0000 Subject: [PATCH] install atheros wifi into image --- src/freedombone-image-customise | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index 37c7c850..d3d7408d 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -314,6 +314,21 @@ continue_installation() { fi } +atheros_wifi() { + 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 +} + # Set to true/false to control if eatmydata is used during build use_eatmydata=true @@ -424,6 +439,7 @@ configure_networking admin_user_sudo create_generic_image continue_installation +atheros_wifi cd / echo $"info: killing leftover processes in chroot"