소스 검색

install atheros wifi into image

Bob Mottram 9 년 전
부모
커밋
0ae95110d2
1개의 변경된 파일16개의 추가작업 그리고 0개의 파일을 삭제
  1. 16
    0
      src/freedombone-image-customise

+ 16
- 0
src/freedombone-image-customise 파일 보기

@@ -314,6 +314,21 @@ continue_installation() {
314 314
     fi
315 315
 }
316 316
 
317
+atheros_wifi() {
318
+    firmware_filename="open-ath9k-htc-firmware_1.3-1_all.deb"
319
+    firmware_hash='5fea58ffefdf0ef15b504db7fbe3bc078c03e0d927bba64085e4b6f2546102f5'
320
+
321
+    firmware_url="http://us.archive.trisquel.info/trisquel/pool/main/o/open-ath9k-htc-firmware/$firmware_filename"
322
+    firmware_tempfile="/tmp/$firmware_filename"
323
+    wget "$firmware_url" -O "$rootdir$firmware_tempfile"
324
+    downloaded_firmware_hash=$(sha256sum "$rootdir$firmware_tempfile" | awk -F ' ' '{print $1}')
325
+    if [[ "$downloaded_firmware_hash" == "$firmware_hash" ]]; then
326
+        chroot "$rootdir" dpkg -i "$firmware_tempfile"
327
+    else
328
+        echo 'WARNING: Atheros Wifi firmware hash does not match. The driver has not been installed.'
329
+    fi
330
+}
331
+
317 332
 # Set to true/false to control if eatmydata is used during build
318 333
 use_eatmydata=true
319 334
 
@@ -424,6 +439,7 @@ configure_networking
424 439
 admin_user_sudo
425 440
 create_generic_image
426 441
 continue_installation
442
+atheros_wifi
427 443
 
428 444
 cd /
429 445
 echo $"info: killing leftover processes in chroot"