Skip to content

Commit fe9e505

Browse files
author
Patrik Dahlström
committed
rpi: disable wifi and bluetooth
This should resolve znailnetem#12
1 parent ca0d18d commit fe9e505

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,13 @@ build/pi-gen:
123123
raspbian_image: pypi | build/pi-gen
124124
mkdir -p dist/image
125125
rm -rf build/pi-gen/stage3 build/pi-gen/stage4 build/pi-gen/stage5
126+
sed -e 's/wpasupplicant//' \
127+
-e 's/wireless-tools//' \
128+
-e 's/firmware-atheros//' \
129+
-e 's/firmware-brcm80211//' \
130+
-e 's/firmware-libertas//' \
131+
-e 's/^\s*//' \
132+
-i build/pi-gen/stage2/02-net-tweaks/00-packages
126133
cp -r image/raspbian/* build/pi-gen/
127134
cp -r requirements.txt dist/pypi/*.whl build/pi-gen/stage3/01-install-python-packages/files
128135
cp -r image/common/files/* build/pi-gen/stage3/02-install-services/files
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
apt remove --purge -y wpasupplicant bluez*
2+
apt autoremove --purge -y
3+
rm -rf /etc/wpa_supplicant*

image/raspbian/stage3/02-install-services/00-run.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ ln -s /etc/systemd/system/update-network-interfaces.service "${ROOTFS_DIR}"/etc/
1414
install -v -m 700 files/update-network-interfaces "${ROOTFS_DIR}/usr/local/bin"
1515

1616
rm -f "${ROOTFS_DIR}"/etc/systemd/system/multi-user.target.wants/ssh.service
17-
ln -s /lib/systemd/system/ssh.service "${ROOTFS_DIR}"/etc/systemd/system/multi-user.target.wants/ssh.service
17+
ln -s /lib/systemd/system/ssh.service "${ROOTFS_DIR}"/etc/systemd/system/multi-user.target.wants/ssh.service
18+
19+
grep -qxF "dtoverlay=pi3-disable-wifi" "${ROOTFS_DIR}/boot/config.txt" || echo "dtoverlay=pi3-disable-wifi" >> "${ROOTFS_DIR}/boot/config.txt"
20+
grep -qxF "dtoverlay=pi3-disable-bt" "${ROOTFS_DIR}/boot/config.txt" || echo "dtoverlay=pi3-disable-bt" >> "${ROOTFS_DIR}/boot/config.txt"

0 commit comments

Comments
 (0)