From 015da801c81263d44299b9f9a178e1414ea6b518 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 8 Aug 2020 19:25:11 -0400 Subject: [PATCH 01/10] Update local_vars_min.yml --- vars/local_vars_min.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index ab8ab62d9..def8807c9 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -43,7 +43,7 @@ iiab_home_url: /home # you'll end up preventing older laptops/phones/tablets (which require 2.4 GHz) # from connecting to your IIAB's internal hotspot! BAD IDEA (: # -# Raspbian requires Wi-Fi country since March 2018. Please set it here: +# Raspberry Pi OS requires Wi-Fi country since March 2018. Please set it here: host_country_code: US host_ssid: "Internet in a Box" host_wifi_mode: g @@ -63,7 +63,7 @@ wan_netmask: # wan_netmask: 255.255.255.0 wan_gateway: # wan_gateway: 192.168.1.254 # If nec wan_nameserver can override ISP-provided DNS servers via dnsmasq: # /etc/resolv.conf dictates which backend is used for the machine itself, so -# 127.0.0.1 means you get dnsmasq (so it works right away on Raspbian) while +# 127.0.0.1 means you get dnsmasq (so it works right away on RaspiOS) while # 127.0.0.53 gives you systemd-networkd (so Ubuntu itself does NOT use this # dnsmasq-specified upstream DNS [e.g. wan_nameserver] but its LAN clients do!) wan_nameserver: # wan_nameserver: 192.168.1.254 or 8.8.8.8 or 1.1.1.1 From 9324ab4a795be9fb1bf491e13cd683cc72842554 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 8 Aug 2020 19:25:56 -0400 Subject: [PATCH 02/10] Update local_vars_medium.yml --- vars/local_vars_medium.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index 16e9faff4..0d3e1082e 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -43,7 +43,7 @@ iiab_home_url: /home # you'll end up preventing older laptops/phones/tablets (which require 2.4 GHz) # from connecting to your IIAB's internal hotspot! BAD IDEA (: # -# Raspbian requires Wi-Fi country since March 2018. Please set it here: +# Raspberry Pi OS requires Wi-Fi country since March 2018. Please set it here: host_country_code: US host_ssid: "Internet in a Box" host_wifi_mode: g @@ -63,7 +63,7 @@ wan_netmask: # wan_netmask: 255.255.255.0 wan_gateway: # wan_gateway: 192.168.1.254 # If nec wan_nameserver can override ISP-provided DNS servers via dnsmasq: # /etc/resolv.conf dictates which backend is used for the machine itself, so -# 127.0.0.1 means you get dnsmasq (so it works right away on Raspbian) while +# 127.0.0.1 means you get dnsmasq (so it works right away on RaspiOS) while # 127.0.0.53 gives you systemd-networkd (so Ubuntu itself does NOT use this # dnsmasq-specified upstream DNS [e.g. wan_nameserver] but its LAN clients do!) wan_nameserver: # wan_nameserver: 192.168.1.254 or 8.8.8.8 or 1.1.1.1 From 15476bd108282ced1d42f7ea946b02ceb9d87731 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 8 Aug 2020 19:26:58 -0400 Subject: [PATCH 03/10] Update local_vars_big.yml --- vars/local_vars_big.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vars/local_vars_big.yml b/vars/local_vars_big.yml index e0d4205db..7bf36019b 100644 --- a/vars/local_vars_big.yml +++ b/vars/local_vars_big.yml @@ -43,7 +43,7 @@ iiab_home_url: /home # you'll end up preventing older laptops/phones/tablets (which require 2.4 GHz) # from connecting to your IIAB's internal hotspot! BAD IDEA (: # -# Raspbian requires Wi-Fi country since March 2018. Please set it here: +# Raspberry Pi OS requires Wi-Fi country since March 2018. Please set it here: host_country_code: US host_ssid: "Internet in a Box" host_wifi_mode: g @@ -63,7 +63,7 @@ wan_netmask: # wan_netmask: 255.255.255.0 wan_gateway: # wan_gateway: 192.168.1.254 # If nec wan_nameserver can override ISP-provided DNS servers via dnsmasq: # /etc/resolv.conf dictates which backend is used for the machine itself, so -# 127.0.0.1 means you get dnsmasq (so it works right away on Raspbian) while +# 127.0.0.1 means you get dnsmasq (so it works right away on RaspiOS) while # 127.0.0.53 gives you systemd-networkd (so Ubuntu itself does NOT use this # dnsmasq-specified upstream DNS [e.g. wan_nameserver] but its LAN clients do!) wan_nameserver: # wan_nameserver: 192.168.1.254 or 8.8.8.8 or 1.1.1.1 From 3dac58641a541d7e5e2f08e3643e9b7ad53c977f Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 8 Aug 2020 19:33:32 -0400 Subject: [PATCH 04/10] Update default_vars.yml --- vars/default_vars.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index 4fa2586aa..1239a6489 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -90,7 +90,7 @@ iiab_home_url: /home # you'll end up preventing older laptops/phones/tablets (which require 2.4 GHz) # from connecting to your IIAB's internal hotspot! BAD IDEA (: # -# Raspbian req WiFi country since March 2018. CHANGE IT IN /etc/iiab/local_vars.yml +# Raspberry Pi OS requires WiFi country -- SET THIS IN /etc/iiab/local_vars.yml host_country_code: US host_ssid: "Internet in a Box" host_wifi_mode: g @@ -185,7 +185,7 @@ wan_netmask: # wan_netmask: 255.255.255.0 wan_gateway: # wan_gateway: 192.168.1.254 # If nec wan_nameserver can override ISP-provided DNS servers via dnsmasq: # /etc/resolv.conf dictates which backend is used for the machine itself, so -# 127.0.0.1 means you get dnsmasq (so it works right away on Raspbian) while +# 127.0.0.1 means you get dnsmasq (so it works right away on RaspiOS) while # 127.0.0.53 gives you systemd-networkd (so Ubuntu itself does NOT use this # dnsmasq-specified upstream DNS [e.g. wan_nameserver] but its LAN clients do!) wan_nameserver: # wan_nameserver: 192.168.1.254 or 8.8.8.8 or 1.1.1.1 @@ -697,7 +697,7 @@ calibreweb_home: "{{ content_base }}/calibre-web" # /library/calibre-web # Works" ~30 lines below, and https://github.com/iiab/iiab/wiki/IIAB-Platforms # Wide to narrow (insofar as poss) -is_debuntu: False # Covers all 3: Ubuntu, Debian, Raspbian +is_debuntu: False # Covers all 3: Ubuntu, Debian, Raspbian (Raspberry Pi OS) is_ubuntu: False is_ubuntu_20: False @@ -706,12 +706,12 @@ is_ubuntu_18: False is_ubuntu_17: False is_ubuntu_16: False -is_debian: False # Covers both: Debian, Raspbian +is_debian: False # Covers both: Debian, Raspbian (Raspberry Pi OS) is_debian_10: False is_debian_9: False is_debian_8: False -is_raspbian: False # Covers RPi HW and non-RPi HW versions of Raspbian +is_raspbian: False # Covers both: RPi HW + non-RPi HW versions of Raspbian (Raspberry Pi OS) is_raspbian_10: False is_raspbian_9: False is_raspbian_8: False From 4d57829075a776a75185ea8b53a6fda57a84fdd2 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 9 Aug 2020 08:54:21 -0400 Subject: [PATCH 05/10] Tag 'rpi_firmware_downloaded: True' in iiab_state.yml --- roles/firmware/tasks/install.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/firmware/tasks/install.yml b/roles/firmware/tasks/install.yml index bcc7b496d..b4d61f758 100644 --- a/roles/firmware/tasks/install.yml +++ b/roles/firmware/tasks/install.yml @@ -22,5 +22,5 @@ - name: "Add 'firmware_retrieved: True' to {{ iiab_state_file }}" lineinfile: path: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml - regexp: '^RPi_firmware_retrieved' - line: 'RPi_firmware_retrieved: True' + regexp: '^rpi_firmware_downloaded' + line: 'rpi_firmware_downloaded: True' From 8b772fe5164bb67ee2d15e918cc041f3039e5da3 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 9 Aug 2020 08:55:51 -0400 Subject: [PATCH 06/10] Also rename Ansible var, to 'rpi_firmware_downloaded' --- roles/firmware/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/firmware/tasks/main.yml b/roles/firmware/tasks/main.yml index 2d493c259..4aebf3fdd 100644 --- a/roles/firmware/tasks/main.yml +++ b/roles/firmware/tasks/main.yml @@ -1,6 +1,6 @@ - name: Include older RPi Firmware include_tasks: install.yml - when: RPi_firmware_retrieved is undefined + when: rpi_firmware_downloaded is undefined - name: Install check-firmware service files template: From 9bd5cfbc67ee204016e7b9a2c8a05c83cf46c7cc Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 9 Aug 2020 09:21:29 -0400 Subject: [PATCH 07/10] firmware/tasks/install.yml: comments/clarifs + set Ansible var --- roles/firmware/tasks/install.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/roles/firmware/tasks/install.yml b/roles/firmware/tasks/install.yml index b4d61f758..0f3d7507b 100644 --- a/roles/firmware/tasks/install.yml +++ b/roles/firmware/tasks/install.yml @@ -1,5 +1,5 @@ # check the timestamps, might want to preserve the old ones -- name: Backup OS provided Firmware +- name: Backup OS-provided firmware (for RPi's internal WiFi) copy: src: "/lib/firmware/brcm/{{ item }}" dest: "/lib/firmware/brcm/{{ item }}.orig" @@ -8,17 +8,23 @@ - brcmfmac43455-sdio.bin - brcmfmac43455-sdio.clm_blob -# grab the old firmware -- name: Retrieve older firmware +- name: Download older firmware (for RPi high-capacity internal WiFi) get_url: url: "{{ item.url }}" dest: "{{ item.dest }}" with_items: - - { url: 'http://d.iiab.io/packages/brcmfmac43430-sdio.clm_blob_2018-09-11_7.45.98.65', dest: '/lib/firmware/brcm/brcmfmac43430-sdio.clm_blob.iiab' } - { url: 'http://d.iiab.io/packages/brcmfmac43430-sdio.bin_2018-09-11_7.45.98.65', dest: '/lib/firmware/brcm/brcmfmac43430-sdio.bin.iiab' } + - { url: 'http://d.iiab.io/packages/brcmfmac43430-sdio.clm_blob_2018-09-11_7.45.98.65', dest: '/lib/firmware/brcm/brcmfmac43430-sdio.clm_blob.iiab' } - { url: 'http://d.iiab.io/packages/brcmfmac43455-sdio.bin_2015-03-01_7.45.18.0_ub19.10.1', dest: '/lib/firmware/brcm/brcmfmac43455-sdio.bin.iiab' } - { url: 'http://d.iiab.io/packages/brcmfmac43455-sdio.clm_blob_2018-02-26_rpi', dest: '/lib/firmware/brcm/brcmfmac43455-sdio.clm_blob.iiab' } + +# RECORD RPi Firmware AS DOWNLOADED + +- name: "Set 'rpi_firmware_downloaded: True'" + set_fact: + rpi_firmware_downloaded: True + - name: "Add 'firmware_retrieved: True' to {{ iiab_state_file }}" lineinfile: path: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml From 1f3bd2d31fe51ce366385fb3eaf3140b5cf10112 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 9 Aug 2020 09:21:59 -0400 Subject: [PATCH 08/10] firmware/tasks/main.yml: comments/clarifs --- roles/firmware/tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/firmware/tasks/main.yml b/roles/firmware/tasks/main.yml index 4aebf3fdd..811635d1b 100644 --- a/roles/firmware/tasks/main.yml +++ b/roles/firmware/tasks/main.yml @@ -1,18 +1,18 @@ -- name: Include older RPi Firmware +- name: Backup/Download firmware (for RPi internal WiFi) include_tasks: install.yml when: rpi_firmware_downloaded is undefined -- name: Install check-firmware service files +- name: 'Install from template: check-firmware.service, check-firmware.sh & fw_warn.sh' template: src: "{{ item.src }}" dest: "{{ item.dest }}" mode: "{{ item.mode }}" with_items: - - { src: 'fw_warn.sh', dest: '/etc/profile.d/', mode: '0644' } - { src: 'check-firmware.service', dest: '/etc/systemd/system/', mode: '0644' } - { src: 'check-firmware.sh', dest: '/usr/sbin/', mode: '0755' } + - { src: 'fw_warn.sh', dest: '/etc/profile.d/', mode: '0644' } -- name: Enable and Start check-firmware.service +- name: Enable & (Re)start check-firmware.service systemd: name: check-firmware.service daemon_reload: yes From 300cd9983fedb08abfd8c84e69968b230336c0af Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 9 Aug 2020 09:37:41 -0400 Subject: [PATCH 09/10] firmware/tasks/install.yml: minor grammar fix --- roles/firmware/tasks/install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/firmware/tasks/install.yml b/roles/firmware/tasks/install.yml index 0f3d7507b..508d9d7b3 100644 --- a/roles/firmware/tasks/install.yml +++ b/roles/firmware/tasks/install.yml @@ -1,5 +1,5 @@ # check the timestamps, might want to preserve the old ones -- name: Backup OS-provided firmware (for RPi's internal WiFi) +- name: Back up OS-provided firmware (for RPi's internal WiFi) copy: src: "/lib/firmware/brcm/{{ item }}" dest: "/lib/firmware/brcm/{{ item }}.orig" From 3743c5a01279286f672a873754bb5fdfe4e55a4e Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 9 Aug 2020 09:38:27 -0400 Subject: [PATCH 10/10] firmware/tasks/main.yml: minor grammar fix --- roles/firmware/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/firmware/tasks/main.yml b/roles/firmware/tasks/main.yml index 811635d1b..0cec498d6 100644 --- a/roles/firmware/tasks/main.yml +++ b/roles/firmware/tasks/main.yml @@ -1,4 +1,4 @@ -- name: Backup/Download firmware (for RPi internal WiFi) +- name: Back up/Download firmware (for RPi internal WiFi) include_tasks: install.yml when: rpi_firmware_downloaded is undefined