[uClibc-cvs] [buildroot 0000290]: (buildroot) udev doesn't manage /dev when it's configured [patch included]

bugs at busybox.net bugs at busybox.net
Wed Jun 15 05:38:53 UTC 2005


A NOTE has been added to this issue.
======================================================================
<http://busybox.net/bugs/view.php?id=290> 
======================================================================
Reported By:                db
Assigned To:                uClibc
======================================================================
Project:                    buildroot
Issue ID:                   290
Category:                   Other
Reproducibility:            always
Severity:                   block
Priority:                   normal
Status:                     assigned
======================================================================
Date Submitted:             06-06-2005 00:09 PDT
Last Modified:              06-14-2005 22:38 PDT
======================================================================
Summary:                    (buildroot) udev doesn't manage /dev when it's
configured [patch included]
Description: 
As is well known by now, "devfs" is about to be removed from Linux 2.6
kernels.
Plus it turns out that embedded systems tend to use that more than most
other
systems, for various reasons ... including systems that buildroot makes.

Buildroot hasn't yet been able to rely on "udev" since it doesn't turn it
on.
It just sits there dead, doing nothing useful.

This patch provides a basic working integration of udev-058 (current)
with
buildroot, and has been tested with Linux 2.6.12-rc5 on two ARM9 cores.
The model is a basic one (no initramfs or initrd), and it just sets up a
ramfs /dev holding the system's device nodes.  The integration will
likely
be improved or tweaked in system-specific ways.  And it seems like udev
hasn't yet been tuned for work on embedded systems either...

======================================================================

----------------------------------------------------------------------
 andersen - 06-09-05 03:08 
----------------------------------------------------------------------
I note that udev.mk is trying to run mkdev.  This is bad, because
mkdev requires root, and buildroot should never be run as root,
lest a typo might result in nuking something in your build system.

It would be far better to fix the buildroot tar target to use fakeroot
rather than kluding in calls to mkdev and running as root.  A version
of busybox mkdevs that uses the device tables used for cramfs, jffs2,
and ext2 targets could make generating needed device nodes with fakeroot
a pretty simple task.  The busybox makedevs +
busybox/patches/makdevs_table.diff
would do the trick...

Anyway, for now I've nuked the mkdev calls.

----------------------------------------------------------------------
 db - 06-09-05 13:03 
----------------------------------------------------------------------
Hmm, I see this patch has been partially integrated; thanks.  The
result is still an un-bootable system however:

 - The resulting root fs images -- the raw build_*/root image as
   well as the root_fs_*.tar image -- aren't bootable because of
   the missing device nodes.  OK, you've explained why you don't
   like that, but the result is still an un-bootable image.

 - You changed when the UDEV init script is run, so that it's too
   late.  It's got to run _before_ the "mount -a", since it's
   providing a whole new /dev/ file system.  This matters for
   things like accessing the /dev/pts files so "ssh" works, as
   well as (on systems that care) /dev/shm.

I've got a patch fixing these two, which I'll add here after I've
had time to test this with the other stuff I've got in the works.

(No, I can't use jffs2 or cramfs images.  The development cycle
starts with NFS root, and jffs2 comes later.  Also, that busybox
makdevs_table.diff won't solve the problem, since the resulting
filesystem doesn't boot far enough to run busybox ... it's missing
the console, so Linux chokes, as well as two files needed by the
C runtime.)

----------------------------------------------------------------------
 db - 06-14-05 22:38 
----------------------------------------------------------------------
Here's the patch I'm using on top of current SVN.

Issue History
Date Modified  Username       Field                    Change              
======================================================================
06-06-05 00:09 db             New Issue                                    
06-06-05 00:09 db             File Added: br2-udev.patch                    
06-09-05 03:08 andersen       Note Added: 0000239                          
06-09-05 13:03 db             Note Added: 0000241                          
06-14-05 22:38 db             Note Added: 0000243                          
======================================================================




More information about the uClibc-cvs mailing list