2023-02-25 20:41:08 +00:00
# 2023-02-25: MONITOR FIRMWARE UPDATES in 3 places especially...
2023-02-25 08:42:23 +00:00
#
# 1. apt changelog firmware-brcm80211
2023-02-25 20:41:08 +00:00
# https://github.com/RPi-Distro/firmware-nonfree -> debian/config/brcm80211 (brcm, cypress)
2023-02-26 02:16:17 +00:00
# https://archive.raspberrypi.org/debian/dists/bullseye/main/binary-arm64/Packages (1.1MB text file, look inside for summary of latest firmware-brcm80211)
# https://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/ -> firmware-brcm80211_* e.g.:
2023-02-25 20:41:08 +00:00
# https://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/firmware-brcm80211_20190114-1+rpt11_all.deb from 2021-01-25
# https://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/firmware-brcm80211_20210315-3+rpt4_all.deb from 2021-12-06
2023-02-26 02:16:17 +00:00
# https://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/firmware-brcm80211_20221012-1~bpo11+1+rpt1_all.deb from 2022-11-17
2023-02-25 08:42:23 +00:00
# 2. apt changelog linux-firmware-raspi
# https://packages.ubuntu.com/search?keywords=linux-firmware-raspi
# 3. https://github.com/moodlebox/moodlebox/blob/main/roles/accesspoint/tasks/main.yml
#- name: Back up 4 OS-provided WiFi firmware files (incl symlink contents) to /lib/firmware/cypress/*.orig
2023-02-26 02:16:17 +00:00
- name : Back up 4 OS-provided WiFi firmware files (replicate any symlinks) to /lib/firmware/cypress/*.orig -- /usr/bin/iiab-check-firmware will later do similar (e.g. as firmware install completes) -- moving 2-or-4 of these to <ORIGINAL FILENAME>.YYYY-MM-DD-HH:MM:SS ("doubly timestamping" to preserve BOTH last-modif & moving date)
2023-02-25 08:42:23 +00:00
# copy:
# src: /lib/firmware/cypress/{{ item }}
# dest: /lib/firmware/cypress/{{ item }}.orig
2023-02-25 18:55:41 +00:00
# #local_follow: False # FAILS TO PRESERVE LINKS (ansible/ansible#74777) e.g. /lib/firmware/cypress/cyfmac43455-sdio.bin -> /etc/alternatives/cyfmac43455-sdio.bin -> ...
2023-05-02 00:29:49 +00:00
# 2023-05-01 CLARIF OF BELOW:
# 1) Even if 'mv' fails, no matter it'll continue to 'cp' below
# 2) 'cp -P' == 'cp --no-dereference' sufficient to replicate these symlinks and files ('cp -d' & 'cp -a' are incrementally stronger, and so probably can't hurt)
shell : |
mv /lib/firmware/cypress/{{ item }}.orig /lib/firmware/cypress/{{ item }}.orig.$(date +%F-%T)
cp -a /lib/firmware/cypress/{{ item }} /lib/firmware/cypress/{{ item }}.orig
2020-09-22 17:17:34 +00:00
with_items :
2023-02-25 08:42:23 +00:00
- cyfmac43430-sdio.bin
- cyfmac43430-sdio.clm_blob
- cyfmac43455-sdio.bin
- cyfmac43455-sdio.clm_blob
2023-02-25 18:55:41 +00:00
#ignore_errors: yes # 2023-02-25: Let's INTENTIONALLY surface any errors, e.g. if any future RasPiOS or Ubuntu-on-Rpi lack some of the above 4 files/links?
2020-09-22 17:17:34 +00:00
2022-07-05 16:56:59 +00:00
- name : Download higher-capacity firmwares (for RPi internal WiFi, per https://github.com/iiab/iiab/issues/823#issuecomment-662285202 and https://github.com/iiab/iiab/issues/2853)
2020-09-22 17:17:34 +00:00
get_url :
2022-07-05 16:56:59 +00:00
url : "{{ iiab_download_url }}/{{ item }}"
2023-02-25 08:42:23 +00:00
dest : /lib/firmware/cypress/
2021-12-26 15:24:31 +00:00
timeout : "{{ download_timeout }}"
2020-09-22 17:17:34 +00:00
with_items :
2023-02-25 08:42:23 +00:00
- brcmfmac43455-sdio.bin_2021-11-30_minimal # 19 -- SAME AS RASPIOS & UBUNTU'S https://github.com/RPi-Distro/firmware-nonfree/blob/feeeda21e930c2e182484e8e1269b61cca2a8451/debian/config/brcm80211/cypress/cyfmac43455-sdio-minimal.bin
2022-07-05 16:56:59 +00:00
- brcmfmac43455-sdio.bin_2021-10-05_3rd-trial-minimal # 24 -- from https://github.com/iiab/iiab/issues/2853#issuecomment-934293015
2023-02-25 08:42:23 +00:00
- brcmfmac43455-sdio.clm_blob_2021-11-17_rpi # Works w/ both above -- SAME AS RASPIOS & UBUNTU'S https://github.com/RPi-Distro/firmware-nonfree/blob/dc406650e840705957f8403efeacf71d2d7543b3/debian/config/brcm80211/cypress/cyfmac43455-sdio.clm_blob
2022-07-05 16:56:59 +00:00
- brcmfmac43455-sdio.bin_2015-03-01_7.45.18.0_ub19.10.1 # 32 -- from https://github.com/iiab/iiab/issues/823#issuecomment-662285202
- brcmfmac43455-sdio.clm_blob_2018-02-26_rpi
- brcmfmac43430-sdio.bin_2018-09-11_7.45.98.65 # 30 -- from https://github.com/iiab/iiab/issues/823#issuecomment-662285202
- brcmfmac43430-sdio.clm_blob_2018-09-11_7.45.98.65
2020-09-22 17:17:34 +00:00
# RECORD firmware AS DOWNLOADED
- name : "Set 'firmware_downloaded: True'"
set_fact :
firmware_downloaded : True
- name : "Add 'firmware_downloaded: True' to {{ iiab_state_file }}"
lineinfile :
path : "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
regexp : '^firmware_downloaded'
line: 'firmware_downloaded : True '
# SEE ALSO firmware_installed in install.yml