On Tue, Jan 21, 2014 at 1:41 PM, Anders Darander <and...@chargestorm.se> wrote: > * Hans Beckérus <hans.becke...@gmail.com> [140121 13:12]: > >> On Tue, Jan 21, 2014 at 12:10 PM, Hans Beckérus <hans.becke...@gmail.com> >> wrote: >> > On Tue, Jan 21, 2014 at 11:23 AM, Anders Darander <and...@chargestorm.se> >> > wrote: >> >> * Hans Beckérus <hans.becke...@gmail.com> [140121 11:05]: >> >>> Things looked ok for a while, /dev was populated properly after boot >> >>> and all necessary file systems / mount points were created. >> >>> We were using an ext2 fs in RAM for mounting /. >> >>> Now, we made a change to instead use a CPIO image compressed using xz >> >>> and enabled the support in kernel to handle this. >> >>> This is when our problems started :( Suddenly our system booted with >> >>> just a very minimalistic /dev folder, containing basically only a few >> >>> of the devices probed at boot time. > >> >>> So, the questions now are: > >> >>> - how was /dev populated before when there was no /etc/init.d/mdev? > >> >> I haven't checked poky-tiny, or more specifically the kernel >> >> configurations for it. But based on the description that I cited above, >> >> I'd guess that poky-tiny has >> >> CONFIG_DEVTMPFS=y >> >> CONFIG_DEVTMPFS_MOUNT=y >> >> enabled. > >> > Indeed (from our .config): > >> > CONFIG_DEVTMPFS=y >> > CONFIG_DEVTMPFS_MOUNT=y > >> >> That would mean the the kernel itself were managing /dev for you when >> >> you were using ext2. Unfortunately, CONFIG_DEVTMPFS_MOUNT do only >> >> automount devmptfs on /dev if you're not in an initramfs (or initrd). > >> > Sounds reasonable. But, when moving from ext2.gz to cpio.xz, we still >> > did not add any init script for mounting /dev, yet it is still created >> > and populated? But only with a very limited set of devices. >> > I guess there is a difference when the kernel mounts the cpio.xz image >> > compared to expanding the ext2.gz in RAM with respect to how /dev is >> > handled. But I am only guessing here. > > I'm running a slow build of poky-tiny on an overloaded machine... Maybe > I can get back to those question in a while. > No problem. Take your time ;)
>> Another thing, You say CONFIG_DEVTMPFS_MOUNT does *not* automount /dev >> if using the initrd scheme? >> But I think it did when using the compressed ext2 file system? How >> come /dev was mounted and populated automatically in the ext2 case but >> when we changed to cpio.xz things seem to break? > > This one can I at least answer. > > It's because that's how devmtpfs is implemented in the kernel. > > "This option does not affect initramfs based booting, here the devtmpfs > filesystem always needs to be mounted manually after the roots is > mounted." quote taken from the help text of CONFIG_DEVMTPFS_MOUNT, see > your kernel tree or e.g. > http://cateee.net/lkddb/web-lkddb/DEVTMPFS_MOUNT.html > Well, I do not think this is absolutely true, or I have misunderstood something. But we do not *use* the initramfs scheme, we use initrd in both ext2 and cpio case. So, what from what I can tell we use the initrd scheme and /sbin/init. And if CONFIG_DEVMTPFS_MOUNT is only affected the initramfs scheme then it should work similar for initrd for both the ext2 and the cpio case, which obviously is not the case. > Cheers, > Anders > > -- > Anders Darander > ChargeStorm AB / eStorm AB _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto