From b91ab524b0dc1d46344e24a9ade7e39f4eb79c98 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Wed, 30 Oct 2024 12:46:21 +0000 Subject: [PATCH 1/3] README.md: Remove obsolete warning --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index e40fc26..73a526b 100644 --- a/README.md +++ b/README.md @@ -407,9 +407,6 @@ follows: # Troubleshooting ## `64 Bit Systems` -Please note there is currently an issue when compiling with a 64 Bit OS. See -https://github.com/RPi-Distro/pi-gen/issues/271 - A 64 bit image can be generated from the `arm64` branch in this repository. Just replace the command from [this section](#getting-started-with-building-your-images) by the one below, and follow the rest of the documentation: From e86b901e25b9d2554bbbcaf3500f0a41b273c0c2 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 31 Oct 2024 13:19:16 +0000 Subject: [PATCH 2/3] Rework wlan blocking --- stage2/02-net-tweaks/01-run.sh | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/stage2/02-net-tweaks/01-run.sh b/stage2/02-net-tweaks/01-run.sh index d49bdeb..7ec6f73 100755 --- a/stage2/02-net-tweaks/01-run.sh +++ b/stage2/02-net-tweaks/01-run.sh @@ -3,18 +3,25 @@ install -v -d "${ROOTFS_DIR}/etc/wpa_supplicant" install -v -m 600 files/wpa_supplicant.conf "${ROOTFS_DIR}/etc/wpa_supplicant/" +# Newer versions of raspberrypi-sys-mods set rfkill.default_state=0 to prevent +# radiating on 5GHz bands until the WLAN regulatory domain is set. +# Unfortunately, this also blocks bluetooth, so we whitelist the known +# on-board BT adapters here. + +mkdir -p "${ROOTFS_DIR}/var/lib/systemd/rfkill/" +# 5 miniuart 4 miniuart Zero miniuart other other +for addr in 107d50c000.serial 3f215040.serial 20215040.serial fe215040.serial soc; do + echo 1 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-${addr}:bluetooth" +done + if [ -v WPA_COUNTRY ]; then on_chroot <<- EOF SUDO_USER="${FIRST_USER_NAME}" raspi-config nonint do_wifi_country "${WPA_COUNTRY}" EOF -fi - -# Disable wifi on 5GHz models if WPA_COUNTRY is not set -mkdir -p "${ROOTFS_DIR}/var/lib/systemd/rfkill/" -if [ -n "$WPA_COUNTRY" ]; then - echo 0 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-3f300000.mmcnr:wlan" - echo 0 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-fe300000.mmcnr:wlan" -else - echo 1 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-3f300000.mmcnr:wlan" - echo 1 > "${ROOTFS_DIR}/var/lib/systemd/rfkill/platform-fe300000.mmcnr:wlan" +elif [ -d "${ROOTFS_DIR}/var/lib/NetworkManager" ]; then + # NetworkManager unblocks all WLAN devices by default. Prevent that: + cat > "${ROOTFS_DIR}/var/lib/NetworkManager/NetworkManager.state" <<- EOF + [main] + WirelessEnabled=false + EOF fi From c6d303831b9c6214b5d362e82bebb4070f24b291 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Thu, 31 Oct 2024 13:21:58 +0000 Subject: [PATCH 3/3] Remove wpa_supplicant tweaks --- stage2/02-net-tweaks/01-run.sh | 3 --- stage2/02-net-tweaks/files/wpa_supplicant.conf | 2 -- 2 files changed, 5 deletions(-) delete mode 100644 stage2/02-net-tweaks/files/wpa_supplicant.conf diff --git a/stage2/02-net-tweaks/01-run.sh b/stage2/02-net-tweaks/01-run.sh index 7ec6f73..d719c79 100755 --- a/stage2/02-net-tweaks/01-run.sh +++ b/stage2/02-net-tweaks/01-run.sh @@ -1,8 +1,5 @@ #!/bin/bash -e -install -v -d "${ROOTFS_DIR}/etc/wpa_supplicant" -install -v -m 600 files/wpa_supplicant.conf "${ROOTFS_DIR}/etc/wpa_supplicant/" - # Newer versions of raspberrypi-sys-mods set rfkill.default_state=0 to prevent # radiating on 5GHz bands until the WLAN regulatory domain is set. # Unfortunately, this also blocks bluetooth, so we whitelist the known diff --git a/stage2/02-net-tweaks/files/wpa_supplicant.conf b/stage2/02-net-tweaks/files/wpa_supplicant.conf deleted file mode 100644 index 0fc335e..0000000 --- a/stage2/02-net-tweaks/files/wpa_supplicant.conf +++ /dev/null @@ -1,2 +0,0 @@ -ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev -update_config=1