[OE-core] device node creation

Gary Thomas gary at mlbassoc.com
Mon Nov 12 21:08:09 UTC 2012


On 2012-11-12 10:42, anton at angri.ru wrote:
> Hello,
>
> I'm trying to create a device node in the generated rootfs image: /dev/net/tun. It is required for openvpn to work. Adding it in the living system is as trivial as "mkdir /dev/net;
> mknod /dev/net/tun c 10 200", but I want it to be there with no manual intrusion required.
>
> I tried several ways:
>
> * IMAGE_DEVICE_TABLES
> * IMAGE_DEVICE_TABLE
> * adding /dev/net/tun file to the package
> * adding a node file to the IMAGE_ROOTFS in rootfs postprocess script
> * using postinst script that creates the node
>
> None of it worked.
>
> What is the way /dev is populated? Where do all those 256 (why so many btw?) pty* nodes come from? How do I create the new node?

Your kernel needs to be built with CONFIG_TUN (not common, you'll
probably need to rebuild it with this option).  Once this option
is in place, udev will automatically create that device for you.

Note: if you add this as an module (CONFIG_TUN=m) the device will
be created when you install the module.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------




More information about the Openembedded-core mailing list