↓ Archives ↓

Category → openembedded

Alternative to udev in openembedded/Angstrom

I use Angstrom on a Gumstix Overo platform, and one of the things that bothers me is the seemingly long boot times.  One of the items that takes awhile is udev startup.  To try to speed things up, I though I would replace udev with busybox’s mdev.

The first thing I did was create a new image recipe based on the omap3-console-image, but with everything stripped out that I didn’t need.  Then I added the line below to my image file. This will override the IMAGE_DEV_MANAGER default value which is defined in the image.bbclass file.

IMAGE_DEV_MANAGER = "busybox-mdev"

What you’ll soon find though is that many packages (R)DEPEND on udev, it’s very hard to build anything these days
without dragging in udev. To satisfy them, I followed an example from the OE mailing list, and changed the busybox recipe to also provide udev and udev-utils.  Edit the busybox.inc file to add:

PROVIDES += "udev"
PROVIDES += "udev-utils"
RPROVIDES_${PN}-mdev += "udev"
RPROVIDES_${PN}-mdev += "udev-utils"

Now if we go to build the image, bitbake will see more than one possible provider for the “udev” package.  To tell it which one I preferred, I edited my local.conf file to add these lines:

PREFERRED_PROVIDER_udev = "busybox"
PREFERRED_PROVIDER_udev-utils = "busybox"

Now if I build my image, everyone will use busybox-mdev instead of udev.