mirror of
https://github.com/iiab/iiab.git
synced 2025-02-12 19:22:24 +00:00
roles/firmware: Tighten up in-line explanations
This commit is contained in:
parent
ae5daf5830
commit
314631bb3e
4 changed files with 22 additions and 8 deletions
|
@ -2,22 +2,22 @@
|
|||
#
|
||||
# 1. apt changelog firmware-brcm80211
|
||||
# https://github.com/RPi-Distro/firmware-nonfree -> debian/config/brcm80211 (brcm, cypress)
|
||||
# http://archive.raspberrypi.org/debian/dists/bullseye/main/binary-arm64/Packages (1.1MB text file, look inside for summary of latest firmware-brcm80211)
|
||||
# http://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/ -> firmware-brcm80211_* e.g.:
|
||||
# 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.:
|
||||
# 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
|
||||
# http://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/firmware-brcm80211_20221012-1~bpo11+1+rpt1_all.deb from 2022-11-17
|
||||
# https://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/firmware-brcm80211_20221012-1~bpo11+1+rpt1_all.deb from 2022-11-17
|
||||
# 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
|
||||
- name: Back up 4 OS-provided WiFi firmware files (or replicate symlinks) to /lib/firmware/cypress/*.orig -- NOTE that "doubly timestamped" copies (incl any symlinks' contents!) are ALSO made by iiab-check-firmware -- as firmware install completes
|
||||
- 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)
|
||||
# copy:
|
||||
# src: /lib/firmware/cypress/{{ item }}
|
||||
# dest: /lib/firmware/cypress/{{ item }}.orig
|
||||
# #local_follow: False # FAILS TO PRESERVE LINKS (ansible/ansible#74777) e.g. /lib/firmware/cypress/cyfmac43455-sdio.bin -> /etc/alternatives/cyfmac43455-sdio.bin -> ...
|
||||
command: cp -P /lib/firmware/cypress/{{ item }} /lib/firmware/cypress/{{ item }}.orig # "cp -P" == "cp --no-dereference" sufficient to replicate these symlinks and files ("cp -d" & "cp -a" are incrementally stronger, but so far unnec)
|
||||
command: cp -a /lib/firmware/cypress/{{ item }} /lib/firmware/cypress/{{ item }}.orig # "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)
|
||||
with_items:
|
||||
- cyfmac43430-sdio.bin
|
||||
- cyfmac43430-sdio.clm_blob
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
- { src: 'iiab-check-firmware.service', dest: '/etc/systemd/system/', mode: '0644' }
|
||||
- { src: 'iiab-firmware-warn.sh', dest: '/etc/profile.d/', mode: '0644' }
|
||||
|
||||
- name: Enable & (Re)Start iiab-check-firmware.service (also runs on each boot) -- creating our 2-or-4 key simlink chains e.g. /lib/firmware/cypress/X.{bin|blob} -> /lib/firmware/cypress/X.{bin|blob}.iiab -> CHOSEN-FIRMWARE-FILE-OR-LINK
|
||||
- name: Enable & (Re)Start iiab-check-firmware.service (also runs on each boot) -- finalizing 2-or-4 symlink chains e.g. /lib/firmware/cypress/X.{bin|blob} -> /lib/firmware/cypress/X.{bin|blob}.iiab -> CHOSEN-FIRMWARE-FILE-OR-LINK
|
||||
systemd:
|
||||
name: iiab-check-firmware.service
|
||||
daemon_reload: yes
|
||||
|
|
|
@ -1,5 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
# The 1st time /usr/bin/iiab-check-firmware runs (at the end of
|
||||
# firmware/tasks/install.yml) 2-4 lynchpin top links are put in place,
|
||||
# finalizing symlink chains like:
|
||||
#
|
||||
# /lib/firmware/cypress/X.{bin|blob} ->
|
||||
# /lib/firmware/cypress/X.{bin|blob}.iiab ->
|
||||
# CHOSEN-FIRMWARE-FILE-OR-LINK
|
||||
#
|
||||
# Also backing up top-of-chain originals (file or link!) by moving these to:
|
||||
#
|
||||
# /lib/firmware/cypress/<ORIGINAL FILENAME>.YYYY-MM-DD-HH:MM:SS
|
||||
#
|
||||
# NOTE these are "doubly timestamped" to preserve BOTH last-modif & moving date.
|
||||
|
||||
# 2023-02-25: bash scripts using default_vars.yml &/or local_vars.yml
|
||||
# https://github.com/iiab/iiab-factory/blob/master/iiab
|
||||
# https://github.com/iiab/iiab/blob/master/roles/firmware/templates/iiab-check-firmware#L10-14
|
||||
|
@ -16,7 +30,7 @@ iiab_var_value() {
|
|||
link_fw() {
|
||||
if [[ $(readlink /lib/firmware/cypress/$1) != $1.iiab ]] ; then
|
||||
echo
|
||||
mv /lib/firmware/cypress/$1 /lib/firmware/cypress/$1.$(date +%F-%T) # i.e. "doubly timestamping" to preserve BOTH last-modif & moving date
|
||||
mv /lib/firmware/cypress/$1 /lib/firmware/cypress/$1.$(date +%F-%T)
|
||||
ln -s $1.iiab /lib/firmware/cypress/$1
|
||||
echo -e "\e[1mSymlinked /lib/firmware/cypress/$1 -> $1.iiab\e[0m"
|
||||
touch /tmp/.fw_modified
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -f /tmp/.fw_modified ]; then
|
||||
echo -e "\n\e[41;1mWiFi Firmware link(s) modified, per iiab/iiab#2853: PLEASE REBOOT!\e[0m"
|
||||
echo -e "\n\e[41;1mWiFi Firmware link(s) modified, per iiab/iiab#3482: PLEASE REBOOT!\e[0m"
|
||||
echo
|
||||
echo -e "If you want this warning to stop, reboot to remove /tmp/.fw_modified\n"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue