[Buildroot] mdev handling

Peter Korsgaard jacmet at sunsite.dk
Wed Sep 8 15:07:33 UTC 2010


>>>>> "Yann" == Yann E MORIN <yann.morin.1998 at anciens.enib.fr> writes:

Hi,

 >> Isn't this largely obsolete now we have devtmpfs?

 Yann> Well, devtmpfs has a static naming scheme, default permissions for device
 Yann> nodes, so it is not sufficient by itself. As the help entry for devtmpfs
 Yann> states:
 Yann>  "It provides a fully functional /dev directory, where usually
 Yann>   udev runs on top, managing permissions and adding meaningful
 Yann>   symlinks."

True, but it is fine for most small embedded systems as well (E.G. the
target group of buildroot). Most of these are root only so you just want
the device nodes of the hw you have available.

But yes, it can certainly be used with mdev as well (you basically just
get rid of the slow mdev -s at startup).

 Yann> Even better, embedded system have a mostly static set of devices, thus a
 Yann> mostly static set of entries in /dev, and those can go to flash. Entries
 Yann> for removeable devices (eg. usb sticks) can still go there. Thus you gain
 Yann> both in flash (no space used by any code, kerenl or userland) and in RAM
 Yann> (no space used by devtmpfs/tmpfs/ramfs/... and VFS entries).

The devtmpfs code is very small if you already have ramfs/tmpfs (and
most likely you do), so the size difference between devtmpfs and static
/dev is really down in the noise.

 Yann> Really, devtmpfs and mdev/udev are for desktop, where the set of
 Yann> devices is to easily divergent, IMHO...

Depends on what you want to do. You fairly often see embedded devicess
that react when you plug in a usb device. For that, mdev (or other
hotplug scripts) are pretty nice.

-- 
Bye, Peter Korsgaard



More information about the buildroot mailing list