Skip to content

Commit 469ee44

Browse files
authored
Merge pull request #56 from macmpi/dev
Version 1.6
2 parents eb1a286 + 1cc1123 commit 469ee44

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@ Extra files may be added next to `headless.apkovl.tar.gz` to customise boostrapp
3030

3131
Main execution steps are logged: `cat /var/log/messages | grep headless`.
3232

33-
## Goody:
34-
Seamless USB-gadget mode on capable devices (*e.g. on PiZero*): serial console, ethernet and mass-storage
35-
- Make sure `dwc2` (or `dwc3`) driver is previously loaded on capable device, and configuration is set to **OTG peripheral** mode: this may be driven by hardware (including cable) and/or software.\
36-
(on supporting Pi devices, just add `dtoverlay=dwc2,dr_mode=peripheral` in `usercfg.txt` (or `config.txt`) to force both by software)
37-
- Plug USB cable into host Computer port before booting device.
33+
## Seamless USB-gadget mode on *OTG-peripheral* capable devices:
34+
Devices with UDC controller (*e.g. PiZero*) may expose the following features over USB port: serial console, ethernet interface and mass-storage
35+
36+
To enable them, just make sure `dwc2` (or `dwc3`) driver is previously loaded on capable device, and configuration is set to **OTG peripheral** mode: this may be driven by hardware (including cable) and/or software.\
37+
(on supporting Pi devices[^5], just add `dtoverlay=dwc2,dr_mode=peripheral` in `usercfg.txt` to force both by software)
38+
39+
Plug USB cable into host Computer port before booting device.
3840
- serial terminal can then be connected-to from host Computer (e.g. `cu -l ttyACM0` on Linux. xon/xoff flow control).
3941
- alternatively, with host Computer ECM/RNDIS interface set-up as `10.42.0.1` (sharing internet or not), one can log into device from host with: `ssh [email protected]`.
4042
- volume containing `headless.apkovl.tar.gz` file may be accessed/mounted from host, and config files easily edited. Make sure to unmount properly before removing USB plug.
@@ -57,3 +59,4 @@ Thanks for the initial guides & scripts from @sodface and @davidmytton.
5759
[^2]: Temporarily remove `root=*` statement from kernel command-line parameters list to disable disk-based boot mode.
5860
[^3]: These files are linux text files: Windows/macOS users need to use text editors supporting linux text line-ending (such as [notepad++](https://notepad-plus-plus.org/), BBEdit or any similar).
5961
[^4]: About temporarily bundled ssh keys: this overlay is meant to **quickly bootstrap** system in order to then proceed with proper install; therefore it purposely embeds [some ssh keys](https://github.com/macmpi/alpine-linux-headless-bootstrap/tree/main/overlay/tmp/.ALHB) so that bootstrapping is as fast as possible. Those temporary keys are in RAM `/tmp`: they **are discarded** once actual system install is rebooted (whether or not ssh server is installed in final setup).
62+
[^5]: OTG capable Pi devices include Zero serie/A/A+/3A+/4B/400/5/500/Compute-Modules

headless.apkovl.tar.gz

88 Bytes
Binary file not shown.

headless.apkovl.tar.gz.sha512

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3eb47a6f01bfe6ef6a26cd7a7494a8b673b6c745cc62c39633e140642ae32d906713a72c894dbe5290e0fd4f045512dd22811eb041e6d830b54ea40103532454 headless.apkovl.tar.gz
1+
9660a18afecfeea5c955bff9bbebb5c711076938457fcec0d3e6dd1b4e0598137e77aa6809911711bfb9d7c1e5e4d008d1fd0313bfb9f279f413e3a177873501 headless.apkovl.tar.gz

overlay/tmp/.ALHB/headless_bootstrap

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# SPDX-FileCopyrightText: Copyright 2022-2025, macmpi
44
# SPDX-License-Identifier: MIT
55

6-
ALHB_VERSION="1.5"
6+
ALHB_VERSION="1.6"
77

88
_apk() {
99
local cmd="$1"
@@ -263,6 +263,13 @@ _setup_networking() {
263263
local has_wifi wlan_lst
264264
_has_wifi() { return "$has_wifi"; }
265265

266+
# workaround some brcmfmac issues with wpa_supplicant (not Pi only issue)
267+
# https://github.com/RPi-Distro/firmware-nonfree/commit/2788cb549a19bf2e77901c4071ef88c2ad683b7c
268+
if lsmod | grep -q brcmfmac; then
269+
rmmod brcmfmac && modprobe brcmfmac roamoff=1 feature_disable=0x282000
270+
_logger "Applied brcmfmac workaround for wpa_supplicant"
271+
fi
272+
266273
wlan_lst="$( find /sys/class/net/*/phy80211 -exec \
267274
sh -c 'printf %s\| "$( basename "$( dirname "$0" )" )"' {} \; 2>/dev/null )"
268275
wlan_lst="${wlan_lst%\|}"
@@ -315,8 +322,8 @@ if ! install -m644 "${ovlpath}"/interfaces /etc/network/interfaces >/dev/null 2>
315322
gateway 10.42.0.1
316323
317324
EOF1
318-
nameserver 9.9.9.9
319-
nameserver 149.112.112.112
325+
nameserver 1.1.1.1
326+
nameserver 1.0.0.1
320327

321328
EOF2
322329
;;

0 commit comments

Comments
 (0)