* [Buildroot] mdev problem in 2011.08 ?
@ 2011-09-18 13:01 Pierre Ficheux
2011-09-18 14:28 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Pierre Ficheux @ 2011-09-18 13:01 UTC (permalink / raw)
To: buildroot
Hi all,
May be I'm wrong but it seems there is a problem when using mdev for
/dev management:
/dev management (Dynamic using mdev)
The /dev/null device is needed by /etc/inittab when mounting /proc and
/sys. As it does not exist because S10mdev is started later, /sys is not
mounted and mdev -s does not work.
# Startup the system
null::sysinit:/bin/mount -t proc proc /proc
null::sysinit:/bin/mount -o remount,rw / # REMOUNT_ROOTFS_RW
null::sysinit:/bin/mkdir -p /dev/pts
null::sysinit:/bin/mkdir -p /dev/shm
null::sysinit:/bin/mount -a
null::sysinit:/bin/hostname -F /etc/hostname
# now run any rc scripts
::sysinit:/etc/init.d/rcS
I fixed it for my test by adding the following line to /etc/inittab
::sysinit:/bin/mknod /dev/null c 1 3
regards
--
Pierre FICHEUX -/- CTO OW/OWI, France -\- pierre.ficheux at openwide.fr
http://ingenierie.openwide.fr
http://www.ficheux.org
I would love to change the world, but they won't give me the source code
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] mdev problem in 2011.08 ?
2011-09-18 13:01 [Buildroot] mdev problem in 2011.08 ? Pierre Ficheux
@ 2011-09-18 14:28 ` Thomas Petazzoni
2011-09-18 16:44 ` Pierre Ficheux
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2011-09-18 14:28 UTC (permalink / raw)
To: buildroot
Hello Pierre,
Le Sun, 18 Sep 2011 15:01:51 +0200,
Pierre Ficheux <pierre.ficheux@openwide.fr> a ?crit :
> May be I'm wrong but it seems there is a problem when using mdev for
> /dev management:
For our mdev and udev support, we assume that the kernel is compiled
with CONFIG_DEVTMPFS and CONFIG_DEVTMPFS_MOUNT. For kernels built by
Buildroot, this is ensured by :
$(if $(BR2_ROOTFS_DEVICE_CREATION_STATIC),,
$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(@D)/.config))
in linux/linux.mk.
For kernels built outside of Buildroot, it's up to the user to enable
those options. In your case, I guess your kernel lacks devtmpfs support
and/or the option to have devtmpfs mounted automatically at boot time,
and this explains why the /dev/null device is missing.
Regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] mdev problem in 2011.08 ?
2011-09-18 14:28 ` Thomas Petazzoni
@ 2011-09-18 16:44 ` Pierre Ficheux
2011-09-18 17:14 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Pierre Ficheux @ 2011-09-18 16:44 UTC (permalink / raw)
To: buildroot
Le 18/09/11 16:28, Thomas Petazzoni a ?crit :
> Hello Pierre,
>
> Le Sun, 18 Sep 2011 15:01:51 +0200,
> Pierre Ficheux <pierre.ficheux@openwide.fr> a ?crit :
>
>> May be I'm wrong but it seems there is a problem when using mdev for
>> /dev management:
>
> For our mdev and udev support, we assume that the kernel is compiled
> with CONFIG_DEVTMPFS and CONFIG_DEVTMPFS_MOUNT.
Kernel config looks fine:
$ grep DEVTMPFS output/build/linux-2.6.34.5/.config
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
But I still have:
Freeing unused kernel memory: 328k freed
can't open /dev/null: No such file or directory
can't open /dev/null: No such file or directory
can't open /dev/null: No such file or directory
can't open /dev/null: No such file or directory
can't open /dev/null: No such file or directory
can't open /dev/null: No such file or directory
Starting logging: OK
Starting mdev...
mdev: /sys/class: No such file or directory
I test with QEMU + rootfs.cpio, does it matter?
--
Pierre FICHEUX -/- CTO OW/OWI, France -\- pierre.ficheux at openwide.fr
http://ingenierie.openwide.fr
http://www.ficheux.org
I would love to change the world, but they won't give me the source code
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] mdev problem in 2011.08 ?
2011-09-18 16:44 ` Pierre Ficheux
@ 2011-09-18 17:14 ` Thomas Petazzoni
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2011-09-18 17:14 UTC (permalink / raw)
To: buildroot
Le Sun, 18 Sep 2011 18:44:59 +0200,
Pierre Ficheux <pierre.ficheux@openwide.fr> a ?crit :
> I test with QEMU + rootfs.cpio, does it matter?
So you're using the rootfs.cpio as an initrd/initramfs ?
If yes, then yes, it matters. The thing is that the kernel does not
automount the devtmpfs filesystem when an initramfs is present. So, in
Buildroot, we have an "init" wrapper script in fs/initramfs/init which
mounts devtmpfs and does some other things before starting the real
init process. However, this script is only used when you generate an
initramfs bundled into a kernel image generated by Buildroot. If you
generate a .cpio filesystem, this trick is not applied.
However, Arnout Vandecappelle has recently contributed 2 patches that
fix this by refactoring the initramfs and cpio support in Buildroot.
See:
From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
To: buildroot at busybox.net
Subject: [Buildroot] [PATCH 1/2] cpio: fix boot with dynamic /dev
Date: Tue, 6 Sep 2011 23:16:08 +0200
From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
To: buildroot at busybox.net
Subject: [Buildroot] [PATCH 2/2] fs/initramfs: refactor with fs/cpio
Date: Tue, 6 Sep 2011 23:16:09 +0200
The PATCH 1/2 should fix your problem, but on the long term, I think
PATCH 2/2 is the way to go. If you have the time to test and Ack those
patches, it would be nice!
Regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-09-18 17:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-18 13:01 [Buildroot] mdev problem in 2011.08 ? Pierre Ficheux
2011-09-18 14:28 ` Thomas Petazzoni
2011-09-18 16:44 ` Pierre Ficheux
2011-09-18 17:14 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox