* [Buildroot] efficient usb plug in notification
@ 2008-08-06 15:10 Christopher Taylor
2008-08-06 15:18 ` sjhill at realitydiluted.com
2008-08-07 7:44 ` Hinko Kocevar
0 siblings, 2 replies; 7+ messages in thread
From: Christopher Taylor @ 2008-08-06 15:10 UTC (permalink / raw)
To: buildroot
I'm trying to see what my best options are of getting USB plugin
notifications in user-space in a buildroot/uClibc env.
Since this is an embedded platform, I'm really concerned about
efficiency of the mechanisms and I'm not sure how efficient udev +
dbus + hal is. Does anyone have any thoughts on this and what some
reasonable alternatives are within the buildroot chain?
-Chris
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] efficient usb plug in notification
2008-08-06 15:10 Christopher Taylor
@ 2008-08-06 15:18 ` sjhill at realitydiluted.com
2008-08-07 3:23 ` Christopher Taylor
2008-08-07 7:44 ` Hinko Kocevar
1 sibling, 1 reply; 7+ messages in thread
From: sjhill at realitydiluted.com @ 2008-08-06 15:18 UTC (permalink / raw)
To: buildroot
> I'm trying to see what my best options are of getting USB plugin
> notifications in user-space in a buildroot/uClibc env.
>
Is this for USB storage devices only, or all types of USB devices?
> Since this is an embedded platform, I'm really concerned about
> efficiency of the mechanisms and I'm not sure how efficient udev +
> dbus + hal is. Does anyone have any thoughts on this and what some
> reasonable alternatives are within the buildroot chain?
>
I used 'udev' in all my embedded platforms. I did the original work
of getting dbus and hal into buildroot, but it was a royal pain. If
you are just doing USB storage devices, look at the usbmount package.
It works great and I can certainly help you with that if you hit any
snags.
-Steve
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] efficient usb plug in notification
@ 2008-08-06 17:19 shaleh at speakeasy.net
2008-08-07 3:26 ` Christopher Taylor
0 siblings, 1 reply; 7+ messages in thread
From: shaleh at speakeasy.net @ 2008-08-06 17:19 UTC (permalink / raw)
To: buildroot
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/buildroot/attachments/20080806/078ceab5/attachment.htm
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] efficient usb plug in notification
2008-08-06 15:18 ` sjhill at realitydiluted.com
@ 2008-08-07 3:23 ` Christopher Taylor
0 siblings, 0 replies; 7+ messages in thread
From: Christopher Taylor @ 2008-08-07 3:23 UTC (permalink / raw)
To: buildroot
Thank y ou so much for your reply
On Wed, Aug 6, 2008 at 11:18 AM, <sjhill@realitydiluted.com> wrote:
>> I'm trying to see what my best options are of getting USB plugin
>> notifications in user-space in a buildroot/uClibc env.
>>
> Is this for USB storage devices only, or all types of USB devices?
Well I have two different projects. One is USB devices in general and
it's VERY power conscious and the other is just USB storage and it's
not that big of a deal.
> I used 'udev' in all my embedded platforms. I did the original work
> of getting dbus and hal into buildroot, but it was a royal pain. If
> you are just doing USB storage devices, look at the usbmount package.
> It works great and I can certainly help you with that if you hit any
> snags.
Is power consumption/battery life an issue on any of the projects you
used the udev/dbus/hal combination and were you able to quantify their
effect on power usage?
Thank you very much for your suggestion, I may post again if I run
into any snags.
IN getting dbus and hal into buildroot, did you get it into the
toolchain or is it that you were able to get it into the fs role
inside buildroot. Either one deserves kudos.
-Chris
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] efficient usb plug in notification
2008-08-06 17:19 [Buildroot] efficient usb plug in notification shaleh at speakeasy.net
@ 2008-08-07 3:26 ` Christopher Taylor
2008-08-08 2:04 ` Sean Perry
0 siblings, 1 reply; 7+ messages in thread
From: Christopher Taylor @ 2008-08-07 3:26 UTC (permalink / raw)
To: buildroot
> You can replace /sbin/hotplug with a shell script/program of your choice.
> This gets called by the kernel for every plug event. Just have your version
> of hotplug react to the plug events you care about. Then you "just" need to
> figure out how to interact between the hotplug script and your user space
> libraries, programs, etc.
>
Given the power concerns that we have, this may be the best idea.
I'll have to look into what's passed to the hotplug script/program and
see if we can get all the information from that. Thanx so much for
this tip!
I'm moderately familiar with udev/dbus/hal but I have some
reservations about using them due to the extra cycles taken up.
This hotplyg approach seems promising for power conscious platforms
assuming it provides enough information. A named pipe to our
application should solve this problem.
Thanx everyone for sharing your experience!
-Chris
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] efficient usb plug in notification
2008-08-06 15:10 Christopher Taylor
2008-08-06 15:18 ` sjhill at realitydiluted.com
@ 2008-08-07 7:44 ` Hinko Kocevar
1 sibling, 0 replies; 7+ messages in thread
From: Hinko Kocevar @ 2008-08-07 7:44 UTC (permalink / raw)
To: buildroot
Christopher Taylor wrote:
> I'm trying to see what my best options are of getting USB plugin
> notifications in user-space in a buildroot/uClibc env.
>
> Since this is an embedded platform, I'm really concerned about
> efficiency of the mechanisms and I'm not sure how efficient udev +
> dbus + hal is. Does anyone have any thoughts on this and what some
> reasonable alternatives are within the buildroot chain?
>
There is a mdev applet in busybox - a smaller version of udev. It works
similar to hotplug. I haven't used it extensively but it is not hard
to use, plus everything is in the buildroot already;)
See http://wildanm.wordpress.com/2007/08/21/mdev-mini-udev-in-busybox.
HTH,
Hinko
--
?ETRTA POT, d.o.o., Kranj
Planina 3
4000 Kranj
Slovenia, Europe
Tel. +386 (0) 4 280 66 03
E-mail: hinko.kocevar at cetrtapot.si
Http: www.cetrtapot.si
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] efficient usb plug in notification
2008-08-07 3:26 ` Christopher Taylor
@ 2008-08-08 2:04 ` Sean Perry
0 siblings, 0 replies; 7+ messages in thread
From: Sean Perry @ 2008-08-08 2:04 UTC (permalink / raw)
To: buildroot
Christopher Taylor wrote:
>> You can replace /sbin/hotplug with a shell script/program of your choice.
>> This gets called by the kernel for every plug event. Just have your version
>> of hotplug react to the plug events you care about. Then you "just" need to
>> figure out how to interact between the hotplug script and your user space
>> libraries, programs, etc.
>>
>
> Given the power concerns that we have, this may be the best idea.
> I'll have to look into what's passed to the hotplug script/program and
> see if we can get all the information from that. Thanx so much for
> this tip!
>
> I'm moderately familiar with udev/dbus/hal but I have some
> reservations about using them due to the extra cycles taken up.
>
> This hotplyg approach seems promising for power conscious platforms
> assuming it provides enough information. A named pipe to our
> application should solve this problem.
>
Everything comes in via the environment, so look there. Should have
everything you need.
mdev just adds a /dev/$node and then calls a script with
$MDEV=/dev/$node. Definitely not enough info and it depends on the
device actually have an entry in /dev -- the usb devices I use do not.
I had our custom hotplug script call mdev when it is done so all of the
device nodes get created correctly.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-08-08 2:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-06 17:19 [Buildroot] efficient usb plug in notification shaleh at speakeasy.net
2008-08-07 3:26 ` Christopher Taylor
2008-08-08 2:04 ` Sean Perry
-- strict thread matches above, loose matches on Subject: below --
2008-08-06 15:10 Christopher Taylor
2008-08-06 15:18 ` sjhill at realitydiluted.com
2008-08-07 3:23 ` Christopher Taylor
2008-08-07 7:44 ` Hinko Kocevar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox