[Buildroot] Regarding /dev management

Ezequiel Garcia elezegarcia at gmail.com
Sat Mar 9 12:26:36 UTC 2013


Hi everyone,

Yesterday I spent a couple hours trying to build my first buildroot fs.
In particular, I wanted to use devtmpfs
(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS)
but found that /dev is not mounted by default in skeleton fs scripts,
it should be mounted in inittab before some other things.

After some hacking in skeleton files, I managed to get the thing working.

Did I miss something? Is this the expected behavior?

Notice that I'm using the cpio image output and using the rootfs as in
initramfs.
In this case, CONFIG_DEVTMPFS=y and CONFIG_DEVTMPFS_MOUNT=y
kernel options do not matter, because... (quoting Kconfig)

""This will instruct the kernel to automatically mount the
devtmpfs filesystem at /dev, directly after the kernel has
mounted the root filesystem. The behavior can be overridden
with the commandline parameter: devtmpfs.mount=0|1.

This option does not affect initramfs based booting, here
the devtmpfs filesystem always needs to be mounted manually
after the roots is mounted.""

Perhaps we can add some hack to add:

::sysinit:/bin/mount -t devtmpfs devtmpfs /dev

to skeleton when BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y.

However, being new to buildroot, perhaps I'm speaking non-sense and the
developer is expected to use its own custom skeleton in this case.

Thanks,
-- 
    Ezequiel


More information about the buildroot mailing list