Skip to content

Commit e2ffaa1

Browse files
committed
Edits and gadgetmode
1 parent 32170f1 commit e2ffaa1

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

Docs/Plugins.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ Copy a directory tree from the host system into the IMG
224224
* **from** — /full/path/to/sourcedir
225225
* **to** — /full/path/to/destdir
226226
* **rsyncopts** — Additional switches for the `rsync` command. If `rsyncopts` is specified, ALL desired rsync switches must be included. If `rsyncopts` is NOT provided, the default switch `-a` is used
227-
* **stderr** — /path/to/file where stderr from the rsync command is written (D:/dev/null)
228-
* **stdout** — /path/to/file where stdout from the rsync command is written (D:/dev/null)
227+
* **stderr** — /path/to/file where stderr from the rsync command is written [D:/dev/null]
228+
* **stdout** — /path/to/file where stdout from the rsync command is written [D:/dev/null]
229229

230230
The copydir plugin behavior is dependent on whether the `from` file contains a trailing slash, just like the rsync command. **The rsync man page states:** A trailing slash on the source changes this behavior to avoid creating an additional directory level at the destination. You can think of a trailing / on a source as meaning "copy the contents of this directory" as opposed to "copy the directory by name", but in both cases the attributes of the containing directory are transferred to the containing directory on the destination.
231231

@@ -343,7 +343,28 @@ The `extractfs` plugin is a non-general purpose `--burn-plugin` that is used to
343343

344344
#### Examples
345345

346-
* `--burn-plugin extractfs:"bootfs=/path/to/bootfs|rootfs=/path/to/rootfs"
346+
* `--burn-plugin extractfs:"bootfs=/path/to/bootfs|rootfs=/path/to/rootfs"`
347+
348+
### gadgetmode
349+
350+
Configures a Pi to be in gadget mode so it can connect via USB to a gadget mode host providing it with a network connection.
351+
352+
#### Arguments
353+
354+
* `autoconnect-retries` — Sets the number of retries for the gadget to obtain a DHCP address via the USB gadget connection [D:5]
355+
* `dhcp-timeout` — Configures the DHCP timeout for each attempt to get a DHCP address via the USB connection [D:60]
356+
* `gadget-mode` — Configures the gadget mode. Default is unshared `simple` mode. `gadget-mode=shared` enables the gadget device to be shared using libcomposite
357+
* `static-mac` — Configures the provided static MAC address for the USB gadget device. Useful so the Pi gets the same IP address every time, but only with `gadget-mode=simple`
358+
* `noipv6` — Do not configure ipv6 on the gadget USB connection
359+
360+
#### Examples
361+
362+
* `--plugin gadgetmode:"static-mac=aa:bb:cc:dd:ee:ff"` — Configure simple gadget mode with a static MAC address
363+
* `--plugin gadgetmode:"gadget-mode=libcomposite|static-mac=fa:ce:fe:ed:00" — Configure shared gadget mode with a static MAC address
364+
365+
#### Notes
366+
367+
* The `autoconnect-retries` and `dhcp-timeout` values are set high to improve success when connected to slower devices
347368

348369
### git-clone
349370

@@ -396,7 +417,7 @@ The hotspot plugin configures the specified wireless device to be a WiFi hotspot
396417

397418
* **config** — Config file with all the arguments (see Example)
398419
* **device** — WiFi device name [D:wlan0]
399-
* **dhcpmode** — Mode for DHCP server. Controls whether NetworkManager uses its internal dnsmasq DHCP server or not. Valid settings are `none` and `nm`. If set to `none`, you must configure a DHCP server for the hotspot. [D:nm] If `dhcpmode` == `none` then `wlanip must be provided.
420+
* **dhcpmode** — Mode for DHCP server. Controls whether NetworkManager uses its internal dnsmasq DHCP server or not. Valid settings are `none` and `nm`. If set to `none`, you must configure a DHCP server for the hotspot. [D:nm] If `dhcpmode` == `none` then `wlanip` must be provided.
400421
* **hsenable** — If **hsenable=y** set the hotspot to enable as part of system boot [D:y]. Can be specified as simply `hsenable`. To disable, use `hsenable=n`
401422
* **hsname** — Set the hotspot name [D:Hotspot]
402423
* **ipforward** — For routed hotspots, controls whether IP forwarding is enabled. If specified, must be the name of the network device to which network traffic is forwarded. [D:""] For bridged hotspots `ipforward` controls the network device to which the WiFi traffic is bridged [D:eth0]

0 commit comments

Comments
 (0)