[Buildroot] [RFC 3/6] system: add mdev-only /dev management (without devtmpfs)

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Wed Sep 9 11:23:33 UTC 2015


Arnout, Luca,

On Wed, 9 Sep 2015 11:34:48 +0200, Arnout Vandecappelle wrote:
> On 08-09-15 23:28, Luca Ceresoli wrote:
> > First, we need the BR2_ROOTFS_STATIC_DEVICE_TABLE just like the static
> > /dev management, in order to have the very basic devices such as /dev/null
> > and /dev/console until mdev is enabled.
> 
>  Actually, I don't think this is a good idea: we're asking the user to configure
> a static device table which is not going to be used anyway.
> 
>  I think it's better to move /dev/null and /dev/console to device_table.txt -
> i.e., include them in every rootfs. It just increases the size with a few
> hundred bytes, it doesn't hurt because devtmpfs is normally automounted over it
> right away, and it is better for the cpio/initramfs case because you won't get
> the 'Unable to open initial console' message anymore (I think). Plus, the
> redirects can be removed from fs/cpio/init since they'll be automatic.
> 
>  What do the other developers think?

I would prefer to keep /dev/null and /dev/console in a special device
table, used only for the mdev without devtmpfs case, but not make it
configurable.

So, I would actually not make the option BR2_ROOTFS_STATIC_DEVICE_TABLE
visible for the BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV_ONLY case, and
instead force using a minimal, hard-coded, device table in this case.
There is no reason whatsoever to have anything else but /dev/null
and /dev/zero in the mdev without devtmpfs case.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


More information about the buildroot mailing list