diff mbox

[1/2] udev: update init script for conditional probing of platform bus

Message ID 1403218403-3303-1-git-send-email-denis@denix.org
State Superseded
Headers show

Commit Message

Denys Dmytriyenko June 19, 2014, 10:53 p.m. UTC
From: Denys Dmytriyenko <denys@ti.com>

Make probing of "platform" bus conditional based on PROBE_PLATFORM_BUS
variable from /etc/default/udev-cache on subsequent boots when udev
cache is used. PROBE_PLATFORM_BUS has to be set to "yes" in order to
force probing on every boot, otherwise it uses the old default behaviour
of probing it just the first time.

This is helpful on modern SoCs where most of the low level peripheral
drivers are registered on the platform bus and need to be probed to load
the necessary modules and enable the connected buses and subsystems.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
 meta/recipes-core/udev/udev/init | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Denys Dmytriyenko June 20, 2014, 5:13 p.m. UTC | #1
On Thu, Jun 19, 2014 at 06:53:22PM -0400, Denys Dmytriyenko wrote:
> From: Denys Dmytriyenko <denys@ti.com>
> 
> Make probing of "platform" bus conditional based on PROBE_PLATFORM_BUS
> variable from /etc/default/udev-cache on subsequent boots when udev
> cache is used. PROBE_PLATFORM_BUS has to be set to "yes" in order to
> force probing on every boot, otherwise it uses the old default behaviour
> of probing it just the first time.
> 
> This is helpful on modern SoCs where most of the low level peripheral
> drivers are registered on the platform bus and need to be probed to load
> the necessary modules and enable the connected buses and subsystems.

Any questions, comments? I would like to keep a dialog open on this one. 
Thanks.


> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> ---
>  meta/recipes-core/udev/udev/init | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
> index 410a650..f2c84d5 100644
> --- a/meta/recipes-core/udev/udev/init
> +++ b/meta/recipes-core/udev/udev/init
> @@ -102,7 +102,12 @@ case "$1" in
>  
>      udevadm control --env=STARTUP=1
>      if [ "$not_first_boot" != "" ];then
> -            udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus  --subsystem-nomatch=graphics	 --subsystem-nomatch=backlight --subsystem-nomatch=video4linux	--subsystem-nomatch=platform
> +            if [ "$PROBE_PLATFORM_BUS" != "yes" ]; then
> +                PLATFORM_BUS_NOMATCH="--subsystem-nomatch=platform"
> +            else
> +                PLATFORM_BUS_NOMATCH=""
> +            fi
> +            udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus --subsystem-nomatch=graphics --subsystem-nomatch=backlight --subsystem-nomatch=video4linux $PLATFORM_BUS_NOMATCH
>              (udevadm settle --timeout=3; udevadm control --env=STARTUP=)&
>      else
>              udevadm trigger --action=add
> -- 
> 2.0.0
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Denys Dmytriyenko June 25, 2014, 12:52 a.m. UTC | #2
Ping? Any comments? Any better suggestions?


On Fri, Jun 20, 2014 at 01:13:38PM -0400, Denys Dmytriyenko wrote:
> On Thu, Jun 19, 2014 at 06:53:22PM -0400, Denys Dmytriyenko wrote:
> > From: Denys Dmytriyenko <denys@ti.com>
> > 
> > Make probing of "platform" bus conditional based on PROBE_PLATFORM_BUS
> > variable from /etc/default/udev-cache on subsequent boots when udev
> > cache is used. PROBE_PLATFORM_BUS has to be set to "yes" in order to
> > force probing on every boot, otherwise it uses the old default behaviour
> > of probing it just the first time.
> > 
> > This is helpful on modern SoCs where most of the low level peripheral
> > drivers are registered on the platform bus and need to be probed to load
> > the necessary modules and enable the connected buses and subsystems.
> 
> Any questions, comments? I would like to keep a dialog open on this one. 
> Thanks.
> 
> 
> > Signed-off-by: Denys Dmytriyenko <denys@ti.com>
> > ---
> >  meta/recipes-core/udev/udev/init | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
> > index 410a650..f2c84d5 100644
> > --- a/meta/recipes-core/udev/udev/init
> > +++ b/meta/recipes-core/udev/udev/init
> > @@ -102,7 +102,12 @@ case "$1" in
> >  
> >      udevadm control --env=STARTUP=1
> >      if [ "$not_first_boot" != "" ];then
> > -            udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus  --subsystem-nomatch=graphics	 --subsystem-nomatch=backlight --subsystem-nomatch=video4linux	--subsystem-nomatch=platform
> > +            if [ "$PROBE_PLATFORM_BUS" != "yes" ]; then
> > +                PLATFORM_BUS_NOMATCH="--subsystem-nomatch=platform"
> > +            else
> > +                PLATFORM_BUS_NOMATCH=""
> > +            fi
> > +            udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus --subsystem-nomatch=graphics --subsystem-nomatch=backlight --subsystem-nomatch=video4linux $PLATFORM_BUS_NOMATCH
> >              (udevadm settle --timeout=3; udevadm control --env=STARTUP=)&
> >      else
> >              udevadm trigger --action=add
> > -- 
> > 2.0.0
> > 
> > -- 
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Paul Eggleton June 25, 2014, 4:20 p.m. UTC | #3
On Tuesday 24 June 2014 20:52:55 Denys Dmytriyenko wrote:
> Ping? Any comments? Any better suggestions?

Looks like Richard has merged this, FWIW.

Cheers,
Paul
Denys Dmytriyenko June 25, 2014, 4:22 p.m. UTC | #4
On Wed, Jun 25, 2014 at 05:20:23PM +0100, Paul Eggleton wrote:
> On Tuesday 24 June 2014 20:52:55 Denys Dmytriyenko wrote:
> > Ping? Any comments? Any better suggestions?
> 
> Looks like Richard has merged this, FWIW.

Yes, I saw it. Already submitted backport for daisy... :)
Richard Purdie June 25, 2014, 10:41 p.m. UTC | #5
On Wed, 2014-06-25 at 12:22 -0400, Denys Dmytriyenko wrote:
> On Wed, Jun 25, 2014 at 05:20:23PM +0100, Paul Eggleton wrote:
> > On Tuesday 24 June 2014 20:52:55 Denys Dmytriyenko wrote:
> > > Ping? Any comments? Any better suggestions?
> > 
> > Looks like Richard has merged this, FWIW.
> 
> Yes, I saw it. Already submitted backport for daisy... :)

I'd like this to see some testing in master for a while before we
backport it...

Cheers,

Richard
Otavio Salvador June 26, 2014, 5:27 p.m. UTC | #6
On Thu, Jun 19, 2014 at 7:53 PM, Denys Dmytriyenko <denis@denix.org> wrote:
> From: Denys Dmytriyenko <denys@ti.com>
>
> Make probing of "platform" bus conditional based on PROBE_PLATFORM_BUS
> variable from /etc/default/udev-cache on subsequent boots when udev
> cache is used. PROBE_PLATFORM_BUS has to be set to "yes" in order to
> force probing on every boot, otherwise it uses the old default behaviour
> of probing it just the first time.
>
> This is helpful on modern SoCs where most of the low level peripheral
> drivers are registered on the platform bus and need to be probed to load
> the necessary modules and enable the connected buses and subsystems.
>
> Signed-off-by: Denys Dmytriyenko <denys@ti.com>

I second this as this fixes a issue in Wandboard in meta-fsl-arm as well.

John, this fix is equivalent to the one we had tested.
Denys Dmytriyenko June 26, 2014, 5:43 p.m. UTC | #7
On Wed, Jun 25, 2014 at 11:41:05PM +0100, Richard Purdie wrote:
> On Wed, 2014-06-25 at 12:22 -0400, Denys Dmytriyenko wrote:
> > On Wed, Jun 25, 2014 at 05:20:23PM +0100, Paul Eggleton wrote:
> > > On Tuesday 24 June 2014 20:52:55 Denys Dmytriyenko wrote:
> > > > Ping? Any comments? Any better suggestions?
> > > 
> > > Looks like Richard has merged this, FWIW.
> > 
> > Yes, I saw it. Already submitted backport for daisy... :)
> 
> I'd like this to see some testing in master for a while before we
> backport it...

I'm Ok waiting a bit longer to test it in master. I'll ping on it later...

But this fixes a very common issue that affects different platforms from 
different BSP layers, including BeagleBone Black in meta-yocto-bsp. The goal 
is to be least intrusive and preserve the old udev cache behavior as much as 
possible. Alternative options were to disable udev cache completely or 
forcefully load necessary modules when they won't be probed on subsequent 
boots.
Denys Dmytriyenko July 15, 2014, 2:41 a.m. UTC | #8
On Thu, Jun 26, 2014 at 01:43:53PM -0400, Denys Dmytriyenko wrote:
> On Wed, Jun 25, 2014 at 11:41:05PM +0100, Richard Purdie wrote:
> > On Wed, 2014-06-25 at 12:22 -0400, Denys Dmytriyenko wrote:
> > > On Wed, Jun 25, 2014 at 05:20:23PM +0100, Paul Eggleton wrote:
> > > > On Tuesday 24 June 2014 20:52:55 Denys Dmytriyenko wrote:
> > > > > Ping? Any comments? Any better suggestions?
> > > > 
> > > > Looks like Richard has merged this, FWIW.
> > > 
> > > Yes, I saw it. Already submitted backport for daisy... :)
> > 
> > I'd like this to see some testing in master for a while before we
> > backport it...
> 
> I'm Ok waiting a bit longer to test it in master. I'll ping on it later...
> 
> But this fixes a very common issue that affects different platforms from 
> different BSP layers, including BeagleBone Black in meta-yocto-bsp. The goal 
> is to be least intrusive and preserve the old udev cache behavior as much as 
> possible. Alternative options were to disable udev cache completely or 
> forcefully load necessary modules when they won't be probed on subsequent 
> boots.

Hi, Richard,

Was it enough wait time to get the change tested in master? Should I re-submit 
the patch for daisy one more time or you have it in the archives? Thanks!
Saul Wold July 15, 2014, 3:30 p.m. UTC | #9
On 07/14/2014 07:41 PM, Denys Dmytriyenko wrote:
> On Thu, Jun 26, 2014 at 01:43:53PM -0400, Denys Dmytriyenko wrote:
>> On Wed, Jun 25, 2014 at 11:41:05PM +0100, Richard Purdie wrote:
>>> On Wed, 2014-06-25 at 12:22 -0400, Denys Dmytriyenko wrote:
>>>> On Wed, Jun 25, 2014 at 05:20:23PM +0100, Paul Eggleton wrote:
>>>>> On Tuesday 24 June 2014 20:52:55 Denys Dmytriyenko wrote:
>>>>>> Ping? Any comments? Any better suggestions?
>>>>>
>>>>> Looks like Richard has merged this, FWIW.
>>>>
>>>> Yes, I saw it. Already submitted backport for daisy... :)
>>>
>>> I'd like this to see some testing in master for a while before we
>>> backport it...
>>
>> I'm Ok waiting a bit longer to test it in master. I'll ping on it later...
>>
>> But this fixes a very common issue that affects different platforms from
>> different BSP layers, including BeagleBone Black in meta-yocto-bsp. The goal
>> is to be least intrusive and preserve the old udev cache behavior as much as
>> possible. Alternative options were to disable udev cache completely or
>> forcefully load necessary modules when they won't be probed on subsequent
>> boots.
>
> Hi, Richard,
>
> Was it enough wait time to get the change tested in master? Should I re-submit
> the patch for daisy one more time or you have it in the archives? Thanks!
>
I have it in my daisy-next (1.6.2) branch (I know it's not in daisy yet).

Sau!
Denys Dmytriyenko July 15, 2014, 3:38 p.m. UTC | #10
On Tue, Jul 15, 2014 at 08:30:04AM -0700, Saul Wold wrote:
> On 07/14/2014 07:41 PM, Denys Dmytriyenko wrote:
> >On Thu, Jun 26, 2014 at 01:43:53PM -0400, Denys Dmytriyenko wrote:
> >>On Wed, Jun 25, 2014 at 11:41:05PM +0100, Richard Purdie wrote:
> >>>On Wed, 2014-06-25 at 12:22 -0400, Denys Dmytriyenko wrote:
> >>>>On Wed, Jun 25, 2014 at 05:20:23PM +0100, Paul Eggleton wrote:
> >>>>>On Tuesday 24 June 2014 20:52:55 Denys Dmytriyenko wrote:
> >>>>>>Ping? Any comments? Any better suggestions?
> >>>>>
> >>>>>Looks like Richard has merged this, FWIW.
> >>>>
> >>>>Yes, I saw it. Already submitted backport for daisy... :)
> >>>
> >>>I'd like this to see some testing in master for a while before we
> >>>backport it...
> >>
> >>I'm Ok waiting a bit longer to test it in master. I'll ping on it later...
> >>
> >>But this fixes a very common issue that affects different platforms from
> >>different BSP layers, including BeagleBone Black in meta-yocto-bsp. The goal
> >>is to be least intrusive and preserve the old udev cache behavior as much as
> >>possible. Alternative options were to disable udev cache completely or
> >>forcefully load necessary modules when they won't be probed on subsequent
> >>boots.
> >
> >Hi, Richard,
> >
> >Was it enough wait time to get the change tested in master? Should I re-submit
> >the patch for daisy one more time or you have it in the archives? Thanks!
> >
> I have it in my daisy-next (1.6.2) branch (I know it's not in daisy yet).

Thanks!
Denys Dmytriyenko July 21, 2014, 10:30 p.m. UTC | #11
On Tue, Jul 15, 2014 at 11:38:41AM -0400, Denys Dmytriyenko wrote:
> On Tue, Jul 15, 2014 at 08:30:04AM -0700, Saul Wold wrote:
> > On 07/14/2014 07:41 PM, Denys Dmytriyenko wrote:
> > >On Thu, Jun 26, 2014 at 01:43:53PM -0400, Denys Dmytriyenko wrote:
> > >>On Wed, Jun 25, 2014 at 11:41:05PM +0100, Richard Purdie wrote:
> > >>>On Wed, 2014-06-25 at 12:22 -0400, Denys Dmytriyenko wrote:
> > >>>>On Wed, Jun 25, 2014 at 05:20:23PM +0100, Paul Eggleton wrote:
> > >>>>>On Tuesday 24 June 2014 20:52:55 Denys Dmytriyenko wrote:
> > >>>>>>Ping? Any comments? Any better suggestions?
> > >>>>>
> > >>>>>Looks like Richard has merged this, FWIW.
> > >>>>
> > >>>>Yes, I saw it. Already submitted backport for daisy... :)
> > >>>
> > >>>I'd like this to see some testing in master for a while before we
> > >>>backport it...
> > >>
> > >>I'm Ok waiting a bit longer to test it in master. I'll ping on it later...
> > >>
> > >>But this fixes a very common issue that affects different platforms from
> > >>different BSP layers, including BeagleBone Black in meta-yocto-bsp. The goal
> > >>is to be least intrusive and preserve the old udev cache behavior as much as
> > >>possible. Alternative options were to disable udev cache completely or
> > >>forcefully load necessary modules when they won't be probed on subsequent
> > >>boots.
> > >
> > >Hi, Richard,
> > >
> > >Was it enough wait time to get the change tested in master? Should I re-submit
> > >the patch for daisy one more time or you have it in the archives? Thanks!
> > >
> > I have it in my daisy-next (1.6.2) branch (I know it's not in daisy yet).
> 
> Thanks!

Saul,

Do you have any ETA on when daisy will be updated? Thanks.
diff mbox

Patch

diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init
index 410a650..f2c84d5 100644
--- a/meta/recipes-core/udev/udev/init
+++ b/meta/recipes-core/udev/udev/init
@@ -102,7 +102,12 @@  case "$1" in
 
     udevadm control --env=STARTUP=1
     if [ "$not_first_boot" != "" ];then
-            udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus  --subsystem-nomatch=graphics	 --subsystem-nomatch=backlight --subsystem-nomatch=video4linux	--subsystem-nomatch=platform
+            if [ "$PROBE_PLATFORM_BUS" != "yes" ]; then
+                PLATFORM_BUS_NOMATCH="--subsystem-nomatch=platform"
+            else
+                PLATFORM_BUS_NOMATCH=""
+            fi
+            udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus --subsystem-nomatch=graphics --subsystem-nomatch=backlight --subsystem-nomatch=video4linux $PLATFORM_BUS_NOMATCH
             (udevadm settle --timeout=3; udevadm control --env=STARTUP=)&
     else
             udevadm trigger --action=add