forked from linux-usb-gadgets/gt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop gt.target in favour of the standard systemd usb-gadget.target
Also reword surrounding language so it still fits on the lines. The usb-gadget.target is provided by systemd since 242. Suggested-by: Sam Day (@samcday) Fixes: linux-usb-gadgets#33
- Loading branch information
Showing
4 changed files
with
9 additions
and
20 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,14 +91,14 @@ Udev rule | |
.. code-block:: console | ||
SUBSYSTEM=="udc", ACTION=="add", \ | ||
TAG+="systemd", ENV{SYSTEMD_WANTS}+="gt.target" | ||
TAG+="systemd", ENV{SYSTEMD_WANTS}+="usb-gadget.target" | ||
The condition for taking the activity is that there is a kernel "add" event | ||
from the "udc" subsystem, which means a new udc has just been made available. | ||
The device in question is tagged with "systemd", which makes systemd | ||
aware of the new device, and SYSTEMD_WANTS is set to the name of the target we | ||
want to reach if the condition is met. | ||
want to reach if the condition is met. This is provided by systemd since 242. | ||
|
||
Systemd | ||
======= | ||
|
@@ -113,7 +113,7 @@ Target unit | |
The target is a simple target to be reached when the udev rule fires. | ||
The service unit will use a "WantedBy" dependency to lend itself for being | ||
managed with systemctl enable/disable. | ||
managed with systemctl enable/disable. This is provided by systemd since 242. | ||
|
||
Service unit | ||
------------ | ||
|
@@ -134,16 +134,16 @@ The unit file is named [email protected] and is a template unit. | |
Type=simple | ||
[Install] | ||
WantedBy=gt.target | ||
WantedBy=usb-gadget.target | ||
This unit is a template unit, so system administrator is supposed to issue | ||
|
||
.. code-block:: console | ||
systemctl enable gt@<gadget scheme file basename> | ||
This sets up appropriate symbolic links in gt.target.wants directory, which | ||
in turn triggers executing the service unit the usual systemd way. | ||
This sets up appropriate symbolic links in usb-gadget.target.wants directory, | ||
which in turn triggers executing the service unit the usual systemd way. | ||
|
||
The service itself uses gt to load gadget scheme with the name implied from | ||
the template parameter, name the gadget accordingly and activate it. Upon | ||
|
@@ -296,8 +296,8 @@ Discussion | |
========== | ||
|
||
This document assumes there is only one UDC available in the gadget system. | ||
If there are more, the first one to appear will cause reaching the gt.target, | ||
so the first UDC becoming available will be used for running the gadget.service | ||
The first UDC that becomes available will lead to reaching usb-gadget.target, | ||
so the first UDC becoming available will be used for running the gadget service | ||
on it. This might or might not be what you want. | ||
|
||
This document does not address the case where actual USB device functionality | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,4 @@ ExecStop=gt rm -rf %i | |
Type=simple | ||
|
||
[Install] | ||
WantedBy=gt.target | ||
WantedBy=usb-gadget.target |