<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/meta-openembedded.git/meta-oe/recipes-support/libusbgx, branch master</title>
<subtitle>Mirror of git.openembedded.org/meta-openembedded</subtitle>
<id>https://git.enea.com/cgit/linux/meta-openembedded.git/atom?h=master</id>
<link rel='self' href='https://git.enea.com/cgit/linux/meta-openembedded.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-openembedded.git/'/>
<updated>2025-07-03T06:27:07+00:00</updated>
<entry>
<title>libusbgx: exit with failure code when no UDC is detected</title>
<updated>2025-07-03T06:27:07+00:00</updated>
<author>
<name>Ernest Van Hoecke</name>
<email>ernestvanhoecke@gmail.com</email>
</author>
<published>2025-07-02T14:32:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-openembedded.git/commit/?id=88c7b3ee937bedc9ff46da009ca539662c4b6749'/>
<id>urn:sha1:88c7b3ee937bedc9ff46da009ca539662c4b6749</id>
<content type='text'>
The systemd target `usb-gadget.target` is triggered by udev when a UDC
first comes up. It can happen that by the time gadget-start runs, this
UDC has been removed from the system again.

Have the gadget-start script exit with status 1 when `ls /sys/class/udc`
returns nothing.

Causing a service failure when no UDC is detected and no default was
given, allows the service to be restarted by a udev rule calling the
service (and not the target since those are not reentrant) directly. On
its own this patch will not do much.

For example, we saw such a situation using the DWC3 USB controller and
usb-conn-gpio kernel modules as loadables. By the time of the DWC3 init,
udev was active, and during init DWC3 started the USB OTG port in device
mode. If a pen drive was plugged in at boot, it would quickly switch to
host mode right after initialisation, emitting another udev event for
the removal of the UDC. The systemd target as thus reached, but by the
time gadget-start ran, the UDC was gone.

  dwc3 init       usb-conn-gpio role switch
      │                       │
      ▼                       ▼
udev: add UDC─┐         udev: del UDC─────►/sys/class/udc empty
              │                                         │
              │                                         x
              │                                         │
              │                                         ▼
              └────────────►usb-gadget.target─────►gadget-start

Signed-off-by: Ernest Van Hoecke &lt;ernest.vanhoecke@toradex.com&gt;
Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
</content>
</entry>
<entry>
<title>meta-openembedded/all: adapt to UNPACKDIR changes</title>
<updated>2025-06-25T13:44:52+00:00</updated>
<author>
<name>Alexander Kanavin</name>
<email>alex@linutronix.de</email>
</author>
<published>2025-06-20T14:06:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-openembedded.git/commit/?id=fc78d37ff0ce9e0d60455465851dbe4e86d7a8b3'/>
<id>urn:sha1:fc78d37ff0ce9e0d60455465851dbe4e86d7a8b3</id>
<content type='text'>
Please see
https://git.yoctoproject.org/poky/commit/?id=4dd321f8b83afecd962393101b2a6861275b5265
for what changes are needed, and sed commands that can be used to make them en masse.

I've verified that bitbake -c patch world works with these, but did not run a world
build; the majority of recipes shouldn't need further fixups, but if there are
some that still fall out, they can be fixed in followups.

Signed-off-by: Alexander Kanavin &lt;alex@linutronix.de&gt;
Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
</content>
</entry>
<entry>
<title>libusbgx: fix example gadget start</title>
<updated>2025-06-05T15:11:28+00:00</updated>
<author>
<name>Denis OSTERLAND-HEIM</name>
<email>denis.osterland@diehl.com</email>
</author>
<published>2025-06-05T08:19:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-openembedded.git/commit/?id=0ae908de1a5ea3de90e6051f038b3836c7027b0c'/>
<id>urn:sha1:0ae908de1a5ea3de90e6051f038b3836c7027b0c</id>
<content type='text'>
From variables docu:
&gt; Setting it to "0" does not disable inhibition.
&gt; Only the empty string will disable inhibition.

That means in case of examples enabled we need ""
and if not "1" to disable update-rc.d.

Signed-off-by: Denis OSTERLAND-HEIM &lt;denis.osterland@diehl.com&gt;
Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
</content>
</entry>
<entry>
<title>libusbgx: fix gadget-stop install</title>
<updated>2024-11-20T00:59:07+00:00</updated>
<author>
<name>Grygorii Tertychnyi</name>
<email>grembeter@gmail.com</email>
</author>
<published>2024-11-14T16:38:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-openembedded.git/commit/?id=b8e970395ef84b16e955f6bcd0ff4c866ecef447'/>
<id>urn:sha1:b8e970395ef84b16e955f6bcd0ff4c866ecef447</id>
<content type='text'>
It was by mistake installed gadget-start instead.

Signed-off-by: Grygorii Tertychnyi &lt;grembeter@gmail.com&gt;
Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
</content>
</entry>
<entry>
<title>recipes: set S to fix the QA warning</title>
<updated>2024-06-22T04:45:10+00:00</updated>
<author>
<name>alperak</name>
<email>alperyasinak1@gmail.com</email>
</author>
<published>2024-06-21T10:02:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-openembedded.git/commit/?id=d1a5739b34834ffde2a15bd69c9df2ed1ae96ab1'/>
<id>urn:sha1:d1a5739b34834ffde2a15bd69c9df2ed1ae96ab1</id>
<content type='text'>
Fix the warning by pointing S to ${WORKDIR}/sources and UNPACKDIR to ${S}. Since recent UNPACKDIR work, default S directory is not created anymore. By setting UNPACKDIR to S, S in indirectly created in do_unpack.

Signed-off-by: alperak &lt;alperyasinak1@gmail.com&gt;
Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
</content>
</entry>
<entry>
<title>recipes: Start WORKDIR -&gt; UNPACKDIR transition</title>
<updated>2024-05-23T15:44:44+00:00</updated>
<author>
<name>Khem Raj</name>
<email>raj.khem@gmail.com</email>
</author>
<published>2024-05-13T21:16:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-openembedded.git/commit/?id=ffc64e9c6fee0af7eea3466135416d011172a5e6'/>
<id>urn:sha1:ffc64e9c6fee0af7eea3466135416d011172a5e6</id>
<content type='text'>
Replace references of WORKDIR with UNPACKDIR where it makes sense to do
so in preparation for changing the default value of UNPACKDIR.

Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
</content>
</entry>
<entry>
<title>libusbgx: uprev to the latest commit</title>
<updated>2024-02-15T22:14:26+00:00</updated>
<author>
<name>Max Krummenacher</name>
<email>max.krummenacher@toradex.com</email>
</author>
<published>2024-02-15T19:17:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-openembedded.git/commit/?id=79e4539601182100b2bbeab1d02848ec3105fca4'/>
<id>urn:sha1:79e4539601182100b2bbeab1d02848ec3105fca4</id>
<content type='text'>
Uprev libusbgx to ec0b01c to get following fixes:
```
ec0b01c Merge pull request #83 from mgrzeschik/uac2-controls
cbf1750 uac2: add additional configuration controls
81d7c05 load libcomposite kernel module
caad244 Fix: Memory leak config label
51abbfd Automake: fix distclean of tests
3cc5af7 Added printer function header to installed headers
adc45af Added missing extern C closing brace
```

Refresh 0001-fix-stack-buffer-overflow-in-usbg_f_foo_attr_val-pro.patch.

Signed-off-by: Max Krummenacher &lt;max.krummenacher@toradex.com&gt;
Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
</content>
</entry>
<entry>
<title>libusbgx: fix usbgx.service stop / restart</title>
<updated>2024-02-15T22:14:26+00:00</updated>
<author>
<name>Max Krummenacher</name>
<email>max.krummenacher@toradex.com</email>
</author>
<published>2024-02-15T19:16:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-openembedded.git/commit/?id=0b6224a322a7535151859027c1b256a8834f9469'/>
<id>urn:sha1:0b6224a322a7535151859027c1b256a8834f9469</id>
<content type='text'>
On start the usbgx service configures the usb gadget. However if
one stops the service nothing is done, a subsequent start then
tries to configure the gadget again and fails. `systemctl restart`
is implemented by doing a stop followed by a start and thus is
also affected.

Doing a start/stop/start results with the following reported in
status:

| systemd[1]: Starting Load USB gadget schemas...
| gadget-start[801]: usbg_create_gadget()  duplicate gadget name
| gadget-start[801]:
| gadget-start[801]: Error on import gadget
| gadget-start[801]: Error: USBG_ERROR_EXIST : Already exist
| gadget-start[812]: ls: write error: Device or resource busy

The run-postinsts service does execute a restart for each package
which uses the systemd class which creates a race condition that the
usbgx service is already started when run-postinsts restarts usbgx
and creates the above error output.

Fix that by unconfiguring the usb gadget on stop.

Signed-off-by: Max Krummenacher &lt;max.krummenacher@toradex.com&gt;
Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
</content>
</entry>
<entry>
<title>recipes: drop ${SRCPV} usage</title>
<updated>2024-02-09T17:52:12+00:00</updated>
<author>
<name>Martin Jansa</name>
<email>martin.jansa@gmail.com</email>
</author>
<published>2024-02-06T13:13:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-openembedded.git/commit/?id=21f956598ddb1bb08855fbc9a3293acf957154d1'/>
<id>urn:sha1:21f956598ddb1bb08855fbc9a3293acf957154d1</id>
<content type='text'>
* Drop SRCPV similarly like oe-core did in:
  https://git.openembedded.org/openembedded-core/commit/?h=nanbield&amp;id=843f82a246a535c353e08072f252d1dc78217872

* SRCPV is deferred now from PV to PKGV since:
  https://git.openembedded.org/openembedded-core/commit/?h=nanbield&amp;id=a8e7b0f932b9ea69b3a218fca18041676c65aba0

Signed-off-by: Martin Jansa &lt;martin.jansa@gmail.com&gt;
</content>
</entry>
<entry>
<title>libusbgx: usbgx.service: use Type=oneshot</title>
<updated>2023-08-14T15:14:46+00:00</updated>
<author>
<name>Ming Liu</name>
<email>liu.ming50@gmail.com</email>
</author>
<published>2023-08-14T08:41:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-openembedded.git/commit/?id=e84dbcc3816661b602d5c324fa5a7d93ebe326f6'/>
<id>urn:sha1:e84dbcc3816661b602d5c324fa5a7d93ebe326f6</id>
<content type='text'>
A regression was introduced by commit:
```
commit 48bc4b2d5e4688bac10bcca26657a5fe660b93ab
Author: Ming Liu &lt;liu.ming50@gmail.com&gt;
Date:   Tue May 9 13:36:20 2023 +0200

    libusbgx: fix some systemd service conditions

    Let usbgx.service require and run after sys-kernel-config.mount.

    Use "Type=simple" rather than "Type=oneshot", this ensures
    usbgx.service would not hang on failures, failures could happen in
    many conditions, like if the end user has manually configured
    something in configfs, or start usbgx.service twice, or someting
    wrong in /etc/default/usbgx or /etc/usbgx/*.schema.

    Signed-off-by: Ming Liu &lt;liu.ming50@gmail.com&gt;
    Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
```

In the case when 'Type=simple' is set, 'ExecStartPost=' will execute
right after the process in 'ExecStart=' is started, but we need it
execute after the last 'ExecStart=' process exited successfully, so
change back to "Type=oneshot".

Signed-off-by: Ming Liu &lt;liu.ming50@gmail.com&gt;
Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
</content>
</entry>
</feed>
