[Buildroot] Device files and Buildroot
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Sat Dec 3 18:40:00 UTC 2011
Le Sat, 3 Dec 2011 07:53:51 -0500,
Trevor Woerner <twoerner at gmail.com> a écrit :
> Excellent write-up. Does buildroot's /dev handling also tweak
> /etc/fstab? I would assume /dev would only need to be mounted in the
> non-static cases.
Two cases here :
* Static /dev. In this case /dev is part of the root filesystem
itself, so there is no need for anything special in /etc/fstab.
* Dynamic /dev (either with devtmpfs only, or with devtmpfs+mdev or
devtmpfs+udev). In this case, we use the CONFIG_DEVTMPFS_MOUNT
kernel option, which tells the kernel to automatically mount the
devtmpfs filesystem at boot time. So the root filesystem simply
contains a /dev directory, completely empty. Nothing is needed
in /etc/fstab: the kernel will mount devtmpfs in /dev automatically.
The only special case here is when the root filesystem is an
initramfs: for some reason, the kernel does not mount devtmpfs
automatically in this case, but Buildroot installs a special /init
wrapper script, which mounts devtmpfs before starting the real init.
But even in this case, nothing special is needed in /etc/fstab.
Does that answer your question?
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
More information about the buildroot
mailing list