Sujith Sankar | 2 Nov 2009 03:11
Picon

Linux hotplug - doesn't seem to work

Hi,

In the embedded application that I'm working on, I need to mount USB
mass storage devices when they are plugged in.

After going through the documentation, it seems that Linux hotplug
could help in achieving this.  For this, CONFIG_HOTPLUG was enabled
using make menuconfig.  When Linux comes up, I see that
    -  "cat /proc/sys/kernel/hotplug" gives "/sbin/hotplug", but such
a file (/sbin/hotplug) is not there.
    -   Creating my own /sbin/hotplug which echoes "hotplug" to
/root/log does not echo "hotplug" to /root/log when I insert or remove
a USB mass storage device.  This shows that /sbin/hotplug is not
getting invoked.
    -   If a USB mass storage device is plugged in, the USB subsystem
identifies it.  After this, if busybox mdev (which, I believe, is a
scaled down version of udev, but not a daemon) is run,
/dev/device_file is getting created.  The device could be mounted
using the command "mount -t vfat /dev/device_file /mnt".  (busybox
mdev allows automating this mounting through its conf file)

1.  Is there any other configuration that is required to make USB hotplug work?
2.  To achieve USB hotplug, is there a better (in terms of memory
usage as well) way than hooking busybox mdev to USB hotplug trigger?

I feel that things could fall in place if I could get this USB hotplug
working.  It would be great if someone could help me out with this.

Thanks,
-Sujith
(Continue reading)

Soh Kam Yung | 2 Nov 2009 08:53
Picon

Re: License query for libudev in udev-142

On Wed, Oct 28, 2009 at 5:42 PM, Soh Kam Yung <sohkamyung <at> gmail.com> wrote:
> On Wed, Oct 28, 2009 at 5:19 PM, Alan Jenkins
> <sourcejedi.lkml <at> googlemail.com> wrote:
>> On 10/28/09, Soh Kam Yung <sohkamyung <at> gmail.com> wrote:
>>> This is a follow-up to this mail sent by Kay Sievers
>>> [http://article.gmane.org/gmane.linux.hotplug.devel/14653] which has
>>> this statement:
>>>
>>> "libudev is LGPL, only the daemon and the tools are GPL."
>>>
>>> I've checked through the headers for the source code in the udev/lib
>>> directory for udev-142 source tar file.  They are all marked as
>>> licensed under the LGPL.
>>>
>>> However, one file, libudev-device-db-write.c, has a #include "udev.h".
>>>  The file udev/udev.h is licensed under the GPL.
>>>
>>> Does this affect Kay's statement that libudev is LGPL?
>>>
>>> Regards,
>>> Kam-Yung
>>
>> That file should not be linked into libudev; it's only needed to
>> implement the udev dameon itself.  Only udevd is allowed to write to
>> the database.
>>
>> It might even be an accident; it seems odd that it would really need udev.h.
>>
>> Regards
>> Alan
(Continue reading)

Alan Jenkins | 2 Nov 2009 11:07

Re: License query for libudev in udev-142

On 11/2/09, Soh Kam Yung <sohkamyung <at> gmail.com> wrote:
> Hello,
>
> Is there any updates on this query?
>
> Does the presence of the #include "udev.h" in the libudev code change
> the LGPL status of libudev in udev-142 or will this be taken care of
> in a future udev release?

Sorry, I thought I had answered the question.  I believe that although
libudev-device-db-write.c is in the "lib" directory, it is not
actually linked into libudev.  You can surely confirm this yourself by
looking at the commands used to build libudev... or by building
libudev on it's own after removing the libudev-device-db-write.c file.

Note that in the current git tree, udev/lib is moved to /libudev, and
there is at least one more "private" file under /libudev which is not
linked into the LGPL library, but which is only used in the GPL'd
daemon.  It looks like they have all been named "libudev-*-private.c".
 Hopefully that should provide a little more clarity of intent.

Regards
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Marco d'Itri | 2 Nov 2009 10:58
Picon
Favicon

Re: License query for libudev in udev-142

On Nov 02, Soh Kam Yung <sohkamyung <at> gmail.com> wrote:

> Is there any updates on this query?
Other than "an header like that one is not copyrightable"?

> Does the presence of the #include "udev.h" in the libudev code change
> the LGPL status of libudev in udev-142 or will this be taken care of
> in a future udev release?
No, you can still consider it LGPL'ed.

--

-- 
ciao,
Marco
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Alan Jenkins | 2 Nov 2009 11:31

Re: Linux hotplug - doesn't seem to work

On 11/2/09, Sujith Sankar <sujithsankar1 <at> gmail.com> wrote:
> Hi,
>
> In the embedded application that I'm working on, I need to mount USB
> mass storage devices when they are plugged in.
>
> After going through the documentation, it seems that Linux hotplug
> could help in achieving this.  For this, CONFIG_HOTPLUG was enabled
> using make menuconfig.  When Linux comes up, I see that
>     -  "cat /proc/sys/kernel/hotplug" gives "/sbin/hotplug", but such
> a file (/sbin/hotplug) is not there.
>     -   Creating my own /sbin/hotplug which echoes "hotplug" to
> /root/log does not echo "hotplug" to /root/log when I insert or remove
> a USB mass storage device.  This shows that /sbin/hotplug is not
> getting invoked.

Stupid question here - I take it you tried running /sbin/hotplug
manually, and checking that it does the right thing?

>     -   If a USB mass storage device is plugged in, the USB subsystem
> identifies it.  After this, if busybox mdev (which, I believe, is a
> scaled down version of udev, but not a daemon) is run,
> /dev/device_file is getting created.  The device could be mounted
> using the command "mount -t vfat /dev/device_file /mnt".  (busybox
> mdev allows automating this mounting through its conf file)
>
> 1.  Is there any other configuration that is required to make USB hotplug
> work?

I don't think so.
(Continue reading)

Oleg Puchinin | 2 Nov 2009 12:10
Picon

udev

Hello !
My name is Oleg. I am from Russia.
I build linux from scratch. Currently my system have busybox and libc.
I install udev, but it's not work.
$ /sbin/udevd --daemon
run, but do nothing (/dev/ is clean)
sysfs mounted to /sys
tmpfs mounted ot /dev

Please, helpl my.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Oleg Puchinin | 2 Nov 2009 12:50
Picon

udev

Здравуствуйте !
Простите, что на русском, с английским туго.
Так вот. Собираю свою систему (с нуля). Установил busybox и libc.
Затем установил в / udev . Пробую запускать
$ /sbin/udevd --daemon
Запускается, но /dev остается девственно пустым. Подскажите,
пожалуйста , в чем может быть проблема ?

sysfs смонтирован на /sys
proc на /proc
tmpfs на /dev

Олег.
Kay Sievers | 2 Nov 2009 12:51

Re: udevadm settle (udev 146) & pam-mount (1.32) via mount (util-linux-ng 2.16.1)

On Fri, Oct 30, 2009 at 16:33, Christian Schmidt <schmidt <at> digadd.de> wrote:
> Kay Sievers wrote:
>> On Thu, Oct 29, 2009 at 19:15, Christian P. Schmidt <schmidt <at> digadd.de> wrote:
>>
>>> The problem here is that SIGUSR1 and SIGALRM are both blocked in oldmask
>>> already, and never reach udevadm. No care is ever taken to ensure those
>>> signals are not blocked.
>>>
>>> The attached patch is one of the many possible ways to rectify the solution.
>>
>> Oh, I see. I guess, we should just unblock these both signals right at
>> the time we install the signal handler?
>
> That would probably be the most correct solution, indeed.

I've added this now:
  http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h=bc3ec7bd45814a75845529fd0aca5c5a9d9f0c14

Thanks,
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Pierre | 2 Nov 2009 15:25
Picon

Problem compiling udev 146

# make
make --no-print-directory all-recursive
Making all in .
   CCLD   extras/edd_id/edd_id
extras/edd_id/edd_id.o: In function `main':
edd_id.c:(.text+0x4ab): undefined reference to `openat'
collect2: ld returned 1 exit status
make[2]: *** [extras/edd_id/edd_id] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Andrey Borzenkov | 2 Nov 2009 15:35
Picon

Re: udev

On Monday 02 of November 2009 14:10:56 Oleg Puchinin wrote:
> Hello !
> My name is Oleg. I am from Russia.
> I build linux from scratch. Currently my system have busybox and
>  libc. I install udev, but it's not work.
> $ /sbin/udevd --daemon
> run, but do nothing (/dev/ is clean)
> sysfs mounted to /sys
> tmpfs mounted ot /dev
> 

udevd only responds to external events. To force udevd to (re-)create 
nodes for devices that already exist run "udevadm trigger". You can 
further fine tune which devices will be triggered; look at udevadm 
manual.

Gmane