android-tools-conf-configfs: handle multiple UDC controllers
PATCH 1/1 android-tools-conf-configfs: handle multiple UDC controllers
From: Shoudi Li <[email protected]>
For the boards with multiple UDC ports, adb funtion will be impacted due to below error.
ls /sys/class/udc/ > /sys/kernel/config/usb_gadget/adb/UDC
ls: write error: Device or resource busy
--- .../android-tools-conf-configfs/android-gadget-start | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start +4 -2
@@ -2,6 +2,8 @@ set -e -sleep 3 +sleep 10 -ls /sys/class/udc/ > /sys/kernel/config/usb_gadget/adb/UDC +ls /sys/class/udc/ | head -n 1 | xargs echo -n > /sys/kernel/config/usb_gadget/adb/UDC + +echo "Setting UDC $(ls /sys/class/udc/ | head -n 1) for USB ADB Gadget usage"
Signature · 1 line
2.52.0
Hi,
On Fri, Jan 23, 2026 at 09:46:04AM +0000, Shoudi Li wrote:
In the headers: From: Shoudi Li <[email protected]>
What is going on?
Quoted 9 lines
From: Shoudi Li <[email protected]>
For the boards with multiple UDC ports, adb funtion will be impacted due to below error.
ls
/sys/class/udc/>/sys/kernel/config/usb_gadget/adb/UDC
ls: write error: Device or resource busySigned-off-by Shoudi Li <[email protected]>
Missing SoB or '[email protected]'.
Signature · 2 lines
With best wishes Dmitry
Dmitry Baryshkov <[email protected]> escreveu (sexta, 23/01/2026 à(s) 17:24):
Quoted 7 lines
Hi,
On Fri, Jan 23, 2026 at 09:46:04AM +0000, Shoudi Li wrote:
In the headers:From: Shoudi Li <[email protected]>What is going on?
The same issue as before. I will send a v2
Quoted 19 lines
Quoted 11 lines
From: Shoudi Li <[email protected]>
For the boards with multiple UDC ports, adb funtion will be impacted due to below error.
ls
/sys/class/udc/>/sys/kernel/config/usb_gadget/adb/UDC
ls: write error: Device or resource busySigned-off-by Shoudi Li <[email protected]>Missing SoB or '[email protected]'.
--
With best wishes
Dmitry
Signature · 3 lines
Best regards, José Quaresma
meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start
Quoted 18 lines · Jose Quaresma via lists.openembedded.org
From: Shoudi Li <[email protected]>
For the boards with multiple UDC ports, adb funtion will be impacted due to below error.
ls
/sys/class/udc/>/sys/kernel/config/usb_gadget/adb/UDC
ls: write error: Device or resource busySigned-off-by Shoudi Li <[email protected]>--- .../android-tools-conf-configfs/android-gadget-start | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start +0
-0
For some reason, there are two *android-tools-conf-configfs* recipes which seem identical except for this and a few other minor changes. I think this one in dynamic-layers/selinux should be removed instead of aligning it with the other recipe.
Quoted 23 lines
meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start +4
-3@@ -2,6 +2,8 @@ set -e -sleep 3 +sleep 10 -ls /sys/class/udc/ > /sys/kernel/config/usb_gadget/adb/UDC +ls /sys/class/udc/ | head -n 1 | xargs echo -n > /sys/kernel/config/usb_gadget/adb/UDC + +echo "Setting UDC $(ls /sys/class/udc/ | head -n 1) for USB ADB Gadget usage" --2.52.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#123778): https://lists.openembedded.org/g/openembedded-devel/message/123778
Mute This Topic: https://lists.openembedded.org/mt/117415388/3616702
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 17 lines · Anuj Mittal
Quoted 14 lines · Jose Quaresma via lists.openembedded.org
From: Shoudi Li <[email protected]>
For the boards with multiple UDC ports, adb funtion will be impacted due to below error.
ls
/sys/class/udc/>/sys/kernel/config/usb_gadget/adb/UDC
ls: write error: Device or resource busySigned-off-by Shoudi Li <[email protected]>--- .../android-tools-conf-configfs/android-gadget-start | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Quoted 9 lines
meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start
Quoted 4 lines
meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start +0
-0For some reason, there are two *android-tools-conf-configfs* recipes which seem identical except for this and a few other minor changes. I think this one in dynamic-layers/selinux should be removed instead of aligning it with the other recipe.
Looks like it. Commit d3f4e6851243 ("android-tools 10: import version from meta-clang"), which added the second copy, isn't clear, why the second copy was necessary.
Signature · 2 lines
With best wishes Dmitry
Hi Dmitry,
the reason I added a second version of android-tools is explained in the pull-request which added android-tools version 10:
https://github.com/openembedded/meta-openembedded/pull/664#issuecomment-1468861667
(one version depends on meta-selinux and the other does not).
However I was not the one adding a second version of android-tools-conf. I don't see a good reason to have two copies of the recipe android-tools-conf, since this recipe doesn't depend on meta-selinux. This was probably just a mistake.
Quoted 41 lines · Dmitry Baryshkov
Quoted 7 lines · Anuj Mittal
Quoted 4 lines · Jose Quaresma via lists.openembedded.org
From: Shoudi Li <[email protected]>
For the boards with multiple UDC ports, adb funtion will be impacted
due
Quoted 11 lines
Quoted 11 lines
to below error.
ls
/sys/class/udc/>/sys/kernel/config/usb_gadget/adb/UDC
ls: write error: Device or resource busySigned-off-by Shoudi Li <[email protected]>--- .../android-tools-conf-configfs/android-gadget-start | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)diff --git
a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start
Quoted 2 lines
Quoted 2 lines
index
ca6c3df275..76b5e29624100644
---a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start
Quoted 1 line
Quoted 1 line
+++
b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start
Quoted 5 lines
For some reason, there are two *android-tools-conf-configfs* recipes which seem identical except for this and a few other minor changes. I think this one in dynamic-layers/selinux should be removed instead of aligning it with the other recipe.
Looks like it. Commit
d3f4e6851243("android-tools 10: import version from meta-clang"), which added the second copy, isn't clear, why the second copy was necessary.--
With best wishes
Dmitry
Sorry, I misread the order of the git history: I was the one adding a second version of android-tools-conf. However since this recipe doesn't need meta-selinux, it should simply be removed. Only android-tools which has DEPENDS = "... libselinux" needs to be duplicated.
Quoted 57 lines · Etienne Cordonnier
Hi Dmitry,
the reason I added a second version of android-tools is explained in the pull-request which added android-tools version 10:
https://github.com/openembedded/meta-openembedded/pull/664#issuecomment-1468861667
(one version depends on meta-selinux and the other does not).However I was not the one adding a second version of android-tools-conf. I don't see a good reason to have two copies of the recipe android-tools-conf, since this recipe doesn't depend on meta-selinux. This was probably just a mistake.
Quoted 42 lines · Dmitry Baryshkov
Quoted 7 lines · Anuj Mittal
Quoted 4 lines · Jose Quaresma via lists.openembedded.org
From: Shoudi Li <[email protected]>
For the boards with multiple UDC ports, adb funtion will be impacted
due
Quoted 8 lines
Quoted 8 lines
to below error.
ls
/sys/class/udc/>/sys/kernel/config/usb_gadget/adb/UDC
ls: write error: Device or resource busySigned-off-by Shoudi Li <[email protected]>--- .../android-tools-conf-configfs/android-gadget-start | 6++++--
Quoted 3 lines
Quoted 3 lines
1 file changed, 4 insertions(+), 2 deletions(-)diff --git
a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start
Quoted 2 lines
Quoted 2 lines
index
ca6c3df275..76b5e29624100644
---a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start
Quoted 1 line
Quoted 1 line
+++
b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start
Quoted 5 lines
For some reason, there are two *android-tools-conf-configfs* recipes which seem identical except for this and a few other minor changes. I think this one in dynamic-layers/selinux should be removed instead of aligning it with the other recipe.
Looks like it. Commit
d3f4e6851243("android-tools 10: import version from meta-clang"), which added the second copy, isn't clear, why the second copy was necessary.--
With best wishes
Dmitry
Quoted 22 lines · Anuj Mittal via lists.openembedded.org
Quoted 9 lines · Jose Quaresma via lists.openembedded.org
From: Shoudi Li <[email protected]>
For the boards with multiple UDC ports, adb funtion will be impacted due to below error.
ls
/sys/class/udc/>/sys/kernel/config/usb_gadget/adb/UDC
ls: write error: Device or resource busyQuoted 6 lines
Signed-off-by Shoudi Li <[email protected]>--- .../android-tools-conf-configfs/android-gadget-start | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)diff --git
a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start
Quoted 2 lines
index
ca6c3df275..76b5e29624100644
---
Quoted 9 lines
a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start
Quoted 1 line
+++
b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start
For some reason, there are two *android-tools-conf-configfs* recipes which seem identical except for this and a few other minor changes. I think this one in dynamic-layers/selinux should be removed instead of aligning it with the other recipe.
Right, I think its because there was selinux dependency. Things might have changed so I would prefer that we delete
the one in meta-openembedded/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools
and if we need something from meta-selinux, that could be added as a bbappend in dynamic layer e.g. dependency on selinux or somesuch
Quoted 32 lines
meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start line 7
Quoted 10 lines
meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start +2
-2@@ -2,6 +2,8 @@ set -e -sleep 3 +sleep 10 -ls /sys/class/udc/ > /sys/kernel/config/usb_gadget/adb/UDC +ls /sys/class/udc/ | head -n 1 | xargs echo -n >
/sys/kernel/config/usb_gadget/adb/UDCReview line 9
Quoted 2 lines
(quoted diff) +2
-0+ +echo "Setting UDC $(ls /sys/class/udc/ | head -n 1) for USB ADB Gadgetusage"
Quoted 6 lines
--
2.52.0-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#123822):
https://lists.openembedded.org/g/openembedded-devel/message/123822
Mute This Topic: https://lists.openembedded.org/mt/117415388/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-