Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <jacmet@uclibc.org>
To: buildroot@busybox.net
Subject: [Buildroot] Regarding /dev management
Date: Sat, 09 Mar 2013 15:09:45 +0100	[thread overview]
Message-ID: <87ppz83brq.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <CALF0-+WdzsqUdQyiwagDELkqx5HhdxEe+_LwKpwgs-LVosLd0g@mail.gmail.com> (Ezequiel Garcia's message of "Sat, 9 Mar 2013 09:26:36 -0300")

>>>>> "E" == Ezequiel Garcia <elezegarcia@gmail.com> writes:

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

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

 E> Did I miss something? Is this the expected behavior?

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

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

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

Indeed, for everything besides initramfs CONFIG_DEVTMPFS_MOUNT does the
right thing, and we don't need to do anything in userspace.

 E> Perhaps we can add some hack to add:

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

 E> to skeleton when BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y.

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

We already take care of this for initramfs, see fs/cpio/init and the
ROOTFS_CPIO_ADD_INIT rule. Doesn't that work for you?

-- 
Bye, Peter Korsgaard

  reply	other threads:[~2013-03-09 14:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-09 12:26 [Buildroot] Regarding /dev management Ezequiel Garcia
2013-03-09 14:09 ` Peter Korsgaard [this message]
2013-03-09 15:02   ` Ezequiel Garcia
2013-03-09 16:01     ` Thomas Petazzoni
2013-03-09 14:12 ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ppz83brq.fsf@dell.be.48ers.dk \
    --to=jacmet@uclibc.org \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox