linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* run udev on ARM system kernel 2.6.22
@ 2007-09-10  4:11 jim hugh
  2007-09-10  5:48 ` Greg KH
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: jim hugh @ 2007-09-10  4:11 UTC (permalink / raw)
  To: linux-hotplug

Hi,

I've just upgraded my ARM system from kernel 2.6.11 to kernel 2.6.22.
Now, I've got problems,  Neither MMC nor USB works, I was told that
the udev need be run and be configured. I've looked at udev FAQ and
other documents, but still not clear how to run MMC and USB on kernel
2.6.22. Is there an example to set up udev and to get MMC and USB
work?

Thank you and sorry for asking an FAQ.

Regards,

Jim

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: run udev on ARM system kernel 2.6.22
  2007-09-10  4:11 run udev on ARM system kernel 2.6.22 jim hugh
@ 2007-09-10  5:48 ` Greg KH
  2007-09-10 23:14 ` jim hugh
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2007-09-10  5:48 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Sep 10, 2007 at 02:11:07PM +1000, jim hugh wrote:
> Hi,
> 
> I've just upgraded my ARM system from kernel 2.6.11 to kernel 2.6.22.
> Now, I've got problems,  Neither MMC nor USB works, I was told that
> the udev need be run and be configured. I've looked at udev FAQ and
> other documents, but still not clear how to run MMC and USB on kernel
> 2.6.22. Is there an example to set up udev and to get MMC and USB
> work?
> 
> Thank you and sorry for asking an FAQ.

I don't understand why you would think that udev would need to be
running in order for USB to work.  Unless you are having problems
accessing usbfs from userspace, or some userspace interaction with
plugged-in usb storage devices?

I think we are going to need more information on exactly what is not
working for you.

thanks,

greg k-h

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: run udev on ARM system kernel 2.6.22
  2007-09-10  4:11 run udev on ARM system kernel 2.6.22 jim hugh
  2007-09-10  5:48 ` Greg KH
@ 2007-09-10 23:14 ` jim hugh
  2007-09-11  6:23 ` Greg KH
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jim hugh @ 2007-09-10 23:14 UTC (permalink / raw)
  To: linux-hotplug

On 9/10/07, Greg KH <greg@kroah.com> wrote:
> On Mon, Sep 10, 2007 at 02:11:07PM +1000, jim hugh wrote:
> > Hi,
> >
> > I've just upgraded my ARM system from kernel 2.6.11 to kernel 2.6.22.
> > Now, I've got problems,  Neither MMC nor USB works, I was told that
> > the udev need be run and be configured. I've looked at udev FAQ and
> > other documents, but still not clear how to run MMC and USB on kernel
> > 2.6.22. Is there an example to set up udev and to get MMC and USB
> > work?
> >
> > Thank you and sorry for asking an FAQ.
>
> I don't understand why you would think that udev would need to be
> running in order for USB to work.  Unless you are having problems
> accessing usbfs from userspace, or some userspace interaction with
> plugged-in usb storage devices?
>
> I think we are going to need more information on exactly what is not
> working for you.
>
> thanks,

Thanks Greg. Let me provide more details here:

We have an ARM 920T board, it was all fine when kernel 2.6.11 was
running on it. Since I upgraded it to kernel 2.6.22, USB and MMC all
stopped working, the modules loading was fine, but there was nothing
happen when a USB stick or MMC card was inserted into it (dmesg did
not show out anything when the device was inserted). I understand that
the major difference between 2.6.11 and 2.6.22 is the devfs, in kernel
2.6.11, devfs is used and the /dev is mounted to the devfs, everything
works fine. In kernel 2.6.22, devfs is no longer used that caused
couple of problems:

1. /dev is no longer mounted to devfs, we have to manually edit it to
static /dev.

2. In our system, when /dev was mounted to devfs, it was mapped to
ramfs, now it is mapped to squashfs and I know that caused the problem
of USB and MMC as you mentioned above. We are currently working to
change it to map to ramfs, but it broken the booting, it could not
start the console, we are trying to fix it. So, booting /dev without
devfs is another issue.

Anyway, I am still not clear what is a proper procedure to use /dev
without devfs on kernel 2.6.22. People advised me from kernel mailing
list, we should use udev and proper configuration. Personally, I don't
like to use static /dev and I hope to switch using udev will fix all
the problem we currently face (please correct me). I've read the udev
documents including your good paper, but I have to admit, I still have
lots of questions to change to udev, such as:

Does the kernel 2.6.22 has already included udev package, or we have
to download and install udev package?

What need be change in boot procedure?

In an essence, is there a step by step howdo document to use and install udev?

I apologize my ignorance of unaware of major changes in current kernel
and appreciate helps and advice.

Thank you.

Kind Regards,

Jim

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: run udev on ARM system kernel 2.6.22
  2007-09-10  4:11 run udev on ARM system kernel 2.6.22 jim hugh
  2007-09-10  5:48 ` Greg KH
  2007-09-10 23:14 ` jim hugh
@ 2007-09-11  6:23 ` Greg KH
  2007-09-11 15:19 ` Dan Nicholson
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2007-09-11  6:23 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Sep 11, 2007 at 09:14:43AM +1000, jim hugh wrote:
> On 9/10/07, Greg KH <greg@kroah.com> wrote:
> > On Mon, Sep 10, 2007 at 02:11:07PM +1000, jim hugh wrote:
> > > Hi,
> > >
> > > I've just upgraded my ARM system from kernel 2.6.11 to kernel 2.6.22.
> > > Now, I've got problems,  Neither MMC nor USB works, I was told that
> > > the udev need be run and be configured. I've looked at udev FAQ and
> > > other documents, but still not clear how to run MMC and USB on kernel
> > > 2.6.22. Is there an example to set up udev and to get MMC and USB
> > > work?
> > >
> > > Thank you and sorry for asking an FAQ.
> >
> > I don't understand why you would think that udev would need to be
> > running in order for USB to work.  Unless you are having problems
> > accessing usbfs from userspace, or some userspace interaction with
> > plugged-in usb storage devices?
> >
> > I think we are going to need more information on exactly what is not
> > working for you.
> >
> > thanks,
> 
> Thanks Greg. Let me provide more details here:
> 
> We have an ARM 920T board, it was all fine when kernel 2.6.11 was
> running on it. Since I upgraded it to kernel 2.6.22, USB and MMC all
> stopped working, the modules loading was fine, but there was nothing
> happen when a USB stick or MMC card was inserted into it (dmesg did
> not show out anything when the device was inserted). I understand that
> the major difference between 2.6.11 and 2.6.22 is the devfs, in kernel
> 2.6.11, devfs is used and the /dev is mounted to the devfs, everything
> works fine. In kernel 2.6.22, devfs is no longer used that caused
> couple of problems:
> 
> 1. /dev is no longer mounted to devfs, we have to manually edit it to
> static /dev.
> 
> 2. In our system, when /dev was mounted to devfs, it was mapped to
> ramfs, now it is mapped to squashfs and I know that caused the problem
> of USB and MMC as you mentioned above. We are currently working to
> change it to map to ramfs, but it broken the booting, it could not
> start the console, we are trying to fix it. So, booting /dev without
> devfs is another issue.
> 
> Anyway, I am still not clear what is a proper procedure to use /dev
> without devfs on kernel 2.6.22. People advised me from kernel mailing
> list, we should use udev and proper configuration. Personally, I don't
> like to use static /dev and I hope to switch using udev will fix all
> the problem we currently face (please correct me). I've read the udev
> documents including your good paper, but I have to admit, I still have
> lots of questions to change to udev, such as:
> 
> Does the kernel 2.6.22 has already included udev package, or we have
> to download and install udev package?
> 
> What need be change in boot procedure?
> 
> In an essence, is there a step by step howdo document to use and install udev?

Ah, yeah, that would be nice to have, a document describing exactly how
to integrate udev into your "distro".  Unfortunatly, the closest thing
that I know of like that is the "Linux From Scratch" type rules, you
might look into how they do things.

Or just grab your favorite desktop distro and investigate how the boot
process works for them.  I know that Gentoo, Red Hat, Debian, and SuSE,
all have very good udev support, but each distro has a different type of
boot process, so it is integrated a little bit differently in each one.

So, depending on how your system starts up, things will work a bit
differently for you, but you can get the idea from the above.

The basic steps you need to do are the following:

  - as early as possible, mount a tmpfs at /dev
  - turn off calling /sbin/hotplug by either disabling it in your
    kernel, or by echoing "" to /proc/sys/kernel/hotplug
  - start /sbin/udevd in daemon mode (with the --daemon command line
    option)
  - run udevtrigger to populate /dev with the initial devices that have
    been found by the kernel in the boot process
  - run udevsettle to let udevtrigger finish properly before continuing.

Now udevd should be listening to the proper socket and your /dev tree
should be all up and full.  Any new devices that are then found in the
boot process (due to modules being loaded or new devices being plugged
in) will be handled properly.

Oh, and you need to have installed udev in the proper way, with the
needed rules files.  The ones in the releases should work just fine for
you, but you might need to tweak some group and other permissions
depending on your system needs.

If you have any specific questions about the above, or it isn't working
for you, feel free to ask here on the list.

Hope this helps,

greg k-h

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: run udev on ARM system kernel 2.6.22
  2007-09-10  4:11 run udev on ARM system kernel 2.6.22 jim hugh
                   ` (2 preceding siblings ...)
  2007-09-11  6:23 ` Greg KH
@ 2007-09-11 15:19 ` Dan Nicholson
  2007-09-11 15:34 ` Kay Sievers
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Dan Nicholson @ 2007-09-11 15:19 UTC (permalink / raw)
  To: linux-hotplug

On 9/10/07, Greg KH <greg@kroah.com> wrote:
>
> Ah, yeah, that would be nice to have, a document describing exactly how
> to integrate udev into your "distro".  Unfortunatly, the closest thing
> that I know of like that is the "Linux From Scratch" type rules, you
> might look into how they do things.

Actually, in the most recent udev release, Kay made it so that a
default set of rules are installed. They seem to be pretty solid
except for a couple issues that seem to be fixed.

http://git.kernel.org/?p=linux/hotplug/udev.git;a=history;f=etc/udev/rules.d;hÌ3228faad0ebf9f33d5702cef46144e6d527606;hb=HEAD

The LFS rules are actually really similar to what's already in the
tarball. There are just a handful of cases where they are more minimal
or specify a different group, etc.

> Or just grab your favorite desktop distro and investigate how the boot
> process works for them.  I know that Gentoo, Red Hat, Debian, and SuSE,
> all have very good udev support, but each distro has a different type of
> boot process, so it is integrated a little bit differently in each one.

That's a good suggestion. If you're interested in the LFS setup, I can
point you at some links, but Greg's explanation of the runtime process
should get you going.

Greg/Kay, would you be interested in somehow HOWTO type documentation
for udev? I imagine there might be an enterprising LFSer or two who'd
be interested in contributing that back.

--
Dan

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: run udev on ARM system kernel 2.6.22
  2007-09-10  4:11 run udev on ARM system kernel 2.6.22 jim hugh
                   ` (3 preceding siblings ...)
  2007-09-11 15:19 ` Dan Nicholson
@ 2007-09-11 15:34 ` Kay Sievers
  2007-09-11 22:52 ` jim hugh
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Kay Sievers @ 2007-09-11 15:34 UTC (permalink / raw)
  To: linux-hotplug

On 9/11/07, Dan Nicholson <dbn.lists@gmail.com> wrote:
> On 9/10/07, Greg KH <greg@kroah.com> wrote:
> >
> > Ah, yeah, that would be nice to have, a document describing exactly how
> > to integrate udev into your "distro".  Unfortunatly, the closest thing
> > that I know of like that is the "Linux From Scratch" type rules, you
> > might look into how they do things.
>
> Actually, in the most recent udev release, Kay made it so that a
> default set of rules are installed. They seem to be pretty solid
> except for a couple issues that seem to be fixed.
>
> http://git.kernel.org/?p=linux/hotplug/udev.git;a=history;f=etc/udev/rules.d;hÌ3228faad0ebf9f33d5702cef46144e6d527606;hb=HEAD
>
> The LFS rules are actually really similar to what's already in the
> tarball. There are just a handful of cases where they are more minimal
> or specify a different group, etc.
>
> > Or just grab your favorite desktop distro and investigate how the boot
> > process works for them.  I know that Gentoo, Red Hat, Debian, and SuSE,
> > all have very good udev support, but each distro has a different type of
> > boot process, so it is integrated a little bit differently in each one.
>
> That's a good suggestion. If you're interested in the LFS setup, I can
> point you at some links, but Greg's explanation of the runtime process
> should get you going.
>
> Greg/Kay, would you be interested in somehow HOWTO type documentation
> for udev? I imagine there might be an enterprising LFSer or two who'd
> be interested in contributing that back.

Sure, patch the README file, it already contains some of the needed stuff.

Thanks,
Kay

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: run udev on ARM system kernel 2.6.22
  2007-09-10  4:11 run udev on ARM system kernel 2.6.22 jim hugh
                   ` (4 preceding siblings ...)
  2007-09-11 15:34 ` Kay Sievers
@ 2007-09-11 22:52 ` jim hugh
  2007-09-11 23:05 ` Greg KH
  2007-09-11 23:21 ` Kay Sievers
  7 siblings, 0 replies; 9+ messages in thread
From: jim hugh @ 2007-09-11 22:52 UTC (permalink / raw)
  To: linux-hotplug

On 9/11/07, Greg KH <greg@kroah.com> wrote:
> On Tue, Sep 11, 2007 at 09:14:43AM +1000, jim hugh wrote:
> > On 9/10/07, Greg KH <greg@kroah.com> wrote:
> > > On Mon, Sep 10, 2007 at 02:11:07PM +1000, jim hugh wrote:
> > > > Hi,
> > > >
> > > > I've just upgraded my ARM system from kernel 2.6.11 to kernel 2.6.22.
> > > > Now, I've got problems,  Neither MMC nor USB works, I was told that
> > > > the udev need be run and be configured. I've looked at udev FAQ and
> > > > other documents, but still not clear how to run MMC and USB on kernel
> > > > 2.6.22. Is there an example to set up udev and to get MMC and USB
> > > > work?
> > > >
> > > > Thank you and sorry for asking an FAQ.
> > >
> > > I don't understand why you would think that udev would need to be
> > > running in order for USB to work.  Unless you are having problems
> > > accessing usbfs from userspace, or some userspace interaction with
> > > plugged-in usb storage devices?
> > >
> > > I think we are going to need more information on exactly what is not
> > > working for you.
> > >
> > > thanks,
> >
> > Thanks Greg. Let me provide more details here:
> >
> > We have an ARM 920T board, it was all fine when kernel 2.6.11 was
> > running on it. Since I upgraded it to kernel 2.6.22, USB and MMC all
> > stopped working, the modules loading was fine, but there was nothing
> > happen when a USB stick or MMC card was inserted into it (dmesg did
> > not show out anything when the device was inserted). I understand that
> > the major difference between 2.6.11 and 2.6.22 is the devfs, in kernel
> > 2.6.11, devfs is used and the /dev is mounted to the devfs, everything
> > works fine. In kernel 2.6.22, devfs is no longer used that caused
> > couple of problems:
> >
> > 1. /dev is no longer mounted to devfs, we have to manually edit it to
> > static /dev.
> >
> > 2. In our system, when /dev was mounted to devfs, it was mapped to
> > ramfs, now it is mapped to squashfs and I know that caused the problem
> > of USB and MMC as you mentioned above. We are currently working to
> > change it to map to ramfs, but it broken the booting, it could not
> > start the console, we are trying to fix it. So, booting /dev without
> > devfs is another issue.
> >
> > Anyway, I am still not clear what is a proper procedure to use /dev
> > without devfs on kernel 2.6.22. People advised me from kernel mailing
> > list, we should use udev and proper configuration. Personally, I don't
> > like to use static /dev and I hope to switch using udev will fix all
> > the problem we currently face (please correct me). I've read the udev
> > documents including your good paper, but I have to admit, I still have
> > lots of questions to change to udev, such as:
> >
> > Does the kernel 2.6.22 has already included udev package, or we have
> > to download and install udev package?
> >
> > What need be change in boot procedure?
> >
> > In an essence, is there a step by step howdo document to use and install udev?
>
> Ah, yeah, that would be nice to have, a document describing exactly how
> to integrate udev into your "distro".  Unfortunatly, the closest thing
> that I know of like that is the "Linux From Scratch" type rules, you
> might look into how they do things.
>
> Or just grab your favorite desktop distro and investigate how the boot
> process works for them.  I know that Gentoo, Red Hat, Debian, and SuSE,
> all have very good udev support, but each distro has a different type of
> boot process, so it is integrated a little bit differently in each one.
>
> So, depending on how your system starts up, things will work a bit
> differently for you, but you can get the idea from the above.
>
> The basic steps you need to do are the following:
>
>   - as early as possible, mount a tmpfs at /dev
>   - turn off calling /sbin/hotplug by either disabling it in your
>     kernel, or by echoing "" to /proc/sys/kernel/hotplug
>   - start /sbin/udevd in daemon mode (with the --daemon command line
>     option)
>   - run udevtrigger to populate /dev with the initial devices that have
>     been found by the kernel in the boot process
>   - run udevsettle to let udevtrigger finish properly before continuing.
>
> Now udevd should be listening to the proper socket and your /dev tree
> should be all up and full.  Any new devices that are then found in the
> boot process (due to modules being loaded or new devices being plugged
> in) will be handled properly.
>
> Oh, and you need to have installed udev in the proper way, with the
> needed rules files.  The ones in the releases should work just fine for
> you, but you might need to tweak some group and other permissions
> depending on your system needs.
>
> If you have any specific questions about the above, or it isn't working
> for you, feel free to ask here on the list.
>
> Hope this helps,
>
> greg k-h
>
Thanks Greg. That was nice descriptions. We have resolved boot issue
and there are more questions:

We are doing ARM embedded development, there is no hard disk, only
limited directory can be made to ram for RW.

I guess that the udev is not included in the kernel, we have to
download the udev source code (current version 1.15?) (do we also need
to download hotplug as well?) and compile it as user program?

To enable using udev, we need to make /sys /dev and /var for RW, and
the rest or RO. Is it sufficient?

From the document, it says that the /dev will destroy / create the
/dev. Does that mean, we need only manually add /dev/console and
/dev/null for booting, than let udev control the the /dev when kernel
is booted?

Thank you.

Kind Regards,

Jim

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: run udev on ARM system kernel 2.6.22
  2007-09-10  4:11 run udev on ARM system kernel 2.6.22 jim hugh
                   ` (5 preceding siblings ...)
  2007-09-11 22:52 ` jim hugh
@ 2007-09-11 23:05 ` Greg KH
  2007-09-11 23:21 ` Kay Sievers
  7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2007-09-11 23:05 UTC (permalink / raw)
  To: linux-hotplug

On Wed, Sep 12, 2007 at 08:52:20AM +1000, jim hugh wrote:
> 
> We are doing ARM embedded development, there is no hard disk, only
> limited directory can be made to ram for RW.

That's not a problem, udev works on lots of systems like that.

> I guess that the udev is not included in the kernel, we have to
> download the udev source code (current version 1.15?) (do we also need
> to download hotplug as well?) and compile it as user program?

Yes, you have to download and build udev on your own, it does not come
with the kernel tree for a variety of good reasons.

And no, you do not need hotplug at all.

> To enable using udev, we need to make /sys /dev and /var for RW, and
> the rest or RO. Is it sufficient?

/sys has sysfs mounted on it, it has nothing to do with permissions.

As for your other locations, it all depends on what your system does.

If you really have no userspace, then just use a static /dev tree, why
would you need to use udev at all?  There will not be any userspace
programs to access the device nodes :)

> From the document, it says that the /dev will destroy / create the
> /dev. Does that mean, we need only manually add /dev/console and
> /dev/null for booting, than let udev control the the /dev when kernel
> is booted?

Yes.

thanks,

greg k-h

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: run udev on ARM system kernel 2.6.22
  2007-09-10  4:11 run udev on ARM system kernel 2.6.22 jim hugh
                   ` (6 preceding siblings ...)
  2007-09-11 23:05 ` Greg KH
@ 2007-09-11 23:21 ` Kay Sievers
  7 siblings, 0 replies; 9+ messages in thread
From: Kay Sievers @ 2007-09-11 23:21 UTC (permalink / raw)
  To: linux-hotplug

On 9/12/07, jim hugh <development.jim@gmail.com> wrote:
> On 9/11/07, Greg KH <greg@kroah.com> wrote:
> > On Tue, Sep 11, 2007 at 09:14:43AM +1000, jim hugh wrote:
> > > On 9/10/07, Greg KH <greg@kroah.com> wrote:
> > > > On Mon, Sep 10, 2007 at 02:11:07PM +1000, jim hugh wrote:
> > > > > Hi,
> > > > >
> > > > > I've just upgraded my ARM system from kernel 2.6.11 to kernel 2.6.22.
> > > > > Now, I've got problems,  Neither MMC nor USB works, I was told that
> > > > > the udev need be run and be configured. I've looked at udev FAQ and
> > > > > other documents, but still not clear how to run MMC and USB on kernel
> > > > > 2.6.22. Is there an example to set up udev and to get MMC and USB
> > > > > work?
> > > > >
> > > > > Thank you and sorry for asking an FAQ.
> > > >
> > > > I don't understand why you would think that udev would need to be
> > > > running in order for USB to work.  Unless you are having problems
> > > > accessing usbfs from userspace, or some userspace interaction with
> > > > plugged-in usb storage devices?
> > > >
> > > > I think we are going to need more information on exactly what is not
> > > > working for you.
> > > >
> > > > thanks,
> > >
> > > Thanks Greg. Let me provide more details here:
> > >
> > > We have an ARM 920T board, it was all fine when kernel 2.6.11 was
> > > running on it. Since I upgraded it to kernel 2.6.22, USB and MMC all
> > > stopped working, the modules loading was fine, but there was nothing
> > > happen when a USB stick or MMC card was inserted into it (dmesg did
> > > not show out anything when the device was inserted). I understand that
> > > the major difference between 2.6.11 and 2.6.22 is the devfs, in kernel
> > > 2.6.11, devfs is used and the /dev is mounted to the devfs, everything
> > > works fine. In kernel 2.6.22, devfs is no longer used that caused
> > > couple of problems:
> > >
> > > 1. /dev is no longer mounted to devfs, we have to manually edit it to
> > > static /dev.
> > >
> > > 2. In our system, when /dev was mounted to devfs, it was mapped to
> > > ramfs, now it is mapped to squashfs and I know that caused the problem
> > > of USB and MMC as you mentioned above. We are currently working to
> > > change it to map to ramfs, but it broken the booting, it could not
> > > start the console, we are trying to fix it. So, booting /dev without
> > > devfs is another issue.
> > >
> > > Anyway, I am still not clear what is a proper procedure to use /dev
> > > without devfs on kernel 2.6.22. People advised me from kernel mailing
> > > list, we should use udev and proper configuration. Personally, I don't
> > > like to use static /dev and I hope to switch using udev will fix all
> > > the problem we currently face (please correct me). I've read the udev
> > > documents including your good paper, but I have to admit, I still have
> > > lots of questions to change to udev, such as:
> > >
> > > Does the kernel 2.6.22 has already included udev package, or we have
> > > to download and install udev package?
> > >
> > > What need be change in boot procedure?
> > >
> > > In an essence, is there a step by step howdo document to use and install udev?
> >
> > Ah, yeah, that would be nice to have, a document describing exactly how
> > to integrate udev into your "distro".  Unfortunatly, the closest thing
> > that I know of like that is the "Linux From Scratch" type rules, you
> > might look into how they do things.
> >
> > Or just grab your favorite desktop distro and investigate how the boot
> > process works for them.  I know that Gentoo, Red Hat, Debian, and SuSE,
> > all have very good udev support, but each distro has a different type of
> > boot process, so it is integrated a little bit differently in each one.
> >
> > So, depending on how your system starts up, things will work a bit
> > differently for you, but you can get the idea from the above.
> >
> > The basic steps you need to do are the following:
> >
> >   - as early as possible, mount a tmpfs at /dev
> >   - turn off calling /sbin/hotplug by either disabling it in your
> >     kernel, or by echoing "" to /proc/sys/kernel/hotplug
> >   - start /sbin/udevd in daemon mode (with the --daemon command line
> >     option)
> >   - run udevtrigger to populate /dev with the initial devices that have
> >     been found by the kernel in the boot process
> >   - run udevsettle to let udevtrigger finish properly before continuing.
> >
> > Now udevd should be listening to the proper socket and your /dev tree
> > should be all up and full.  Any new devices that are then found in the
> > boot process (due to modules being loaded or new devices being plugged
> > in) will be handled properly.
> >
> > Oh, and you need to have installed udev in the proper way, with the
> > needed rules files.  The ones in the releases should work just fine for
> > you, but you might need to tweak some group and other permissions
> > depending on your system needs.
> >
> > If you have any specific questions about the above, or it isn't working
> > for you, feel free to ask here on the list.
> >
> > Hope this helps,
> >
> > greg k-h
> >
> Thanks Greg. That was nice descriptions. We have resolved boot issue
> and there are more questions:
>
> We are doing ARM embedded development, there is no hard disk, only
> limited directory can be made to ram for RW.
>
> I guess that the udev is not included in the kernel, we have to
> download the udev source code (current version 1.15?) (do we also need
> to download hotplug as well?) and compile it as user program?

The hotplug package is not used by udev or any recent system.

> To enable using udev, we need to make /sys /dev and /var for RW, and
> the rest or RO. Is it sufficient?

/sys comes from the kernel, just like /proc, just mount it. udev does
not do anything in /var, /dev should be tmpfs.

> >From the document, it says that the /dev will destroy / create the
> /dev. Does that mean, we need only manually add /dev/console and
> /dev/null for booting, than let udev control the the /dev when kernel
> is booted?

/dev/null is nice for udevd to startup correctly. There are a few more
nodes and symlinks you may need to create depending on your setup:
null, console, fd/, stdin, stdout, stderr, core, pts/, shm/, kmsg.

Kay

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-09-11 23:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-10  4:11 run udev on ARM system kernel 2.6.22 jim hugh
2007-09-10  5:48 ` Greg KH
2007-09-10 23:14 ` jim hugh
2007-09-11  6:23 ` Greg KH
2007-09-11 15:19 ` Dan Nicholson
2007-09-11 15:34 ` Kay Sievers
2007-09-11 22:52 ` jim hugh
2007-09-11 23:05 ` Greg KH
2007-09-11 23:21 ` Kay Sievers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).