* [Buildroot] no /dev/console; /dev/null when booting with initrd of type 'ext2'
@ 2012-10-16 14:16 Thierry Bultel
2012-10-16 14:23 ` Richard Braun
2012-10-16 16:09 ` Arnout Vandecappelle
0 siblings, 2 replies; 10+ messages in thread
From: Thierry Bultel @ 2012-10-16 14:16 UTC (permalink / raw)
To: buildroot
Hi,
When booting with an initrd of type "ext2", as it is the case when using
a generated ISO image,
the kernel (a 3.2.21 in my case) does not automagically create the
"/dev/null" and "dev/console" entries,
whereas it does when using a cpio.
Would the solution be to always have these inodes created in
'device_table.txt' ?
(Works in my case, I do not plan to use the static table)
Or change the ISO generation for using cpio instead of ext2 ?
Thanks
Thierry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20121016/175bc41e/attachment.html>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] no /dev/console; /dev/null when booting with initrd of type 'ext2'
2012-10-16 14:16 [Buildroot] no /dev/console; /dev/null when booting with initrd of type 'ext2' Thierry Bultel
@ 2012-10-16 14:23 ` Richard Braun
2012-10-16 16:15 ` Thierry Bultel
2012-10-16 16:09 ` Arnout Vandecappelle
1 sibling, 1 reply; 10+ messages in thread
From: Richard Braun @ 2012-10-16 14:23 UTC (permalink / raw)
To: buildroot
On Tue, Oct 16, 2012 at 04:16:48PM +0200, Thierry Bultel wrote:
> Would the solution be to always have these inodes created in
> 'device_table.txt' ?
> (Works in my case, I do not plan to use the static table)
The devtmpfs "file system" is usually a better approach.
--
Richard Braun
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] no /dev/console; /dev/null when booting with initrd of type 'ext2'
2012-10-16 14:16 [Buildroot] no /dev/console; /dev/null when booting with initrd of type 'ext2' Thierry Bultel
2012-10-16 14:23 ` Richard Braun
@ 2012-10-16 16:09 ` Arnout Vandecappelle
2012-10-17 12:04 ` Thierry Bultel
1 sibling, 1 reply; 10+ messages in thread
From: Arnout Vandecappelle @ 2012-10-16 16:09 UTC (permalink / raw)
To: buildroot
On 16/10/12 16:16, Thierry Bultel wrote:
> When booting with an initrd of type "ext2", as it is the case when using a generated ISO image,
ISO?
> the kernel (a 3.2.21 in my case) does not automagically create the "/dev/null" and "dev/console" entries,
> whereas it does when using a cpio.
The kernel doesn't, but buildroot does. We copy fs/cpio/init to /init
for cpio (and initramfs) archives, because those are the ones that are
normally used for initrd.
You can copy fs/cpio/init to /init in your post-build script, if you like.
> Would the solution be to always have these inodes created in 'device_table.txt' ?
> (Works in my case, I do not plan to use the static table)
Not really: the kernel doesn't automount devtmps for initrd.
> Or change the ISO generation for using cpio instead of ext2 ?
There's no point in using ext2 for initrd, it just adds overhead.
So yes, switch to cpio.
Oh, now I see your point with the iso image: fs/iso9660 uses an ext2
initrd... Hm, that seems like a bad idea. Someone should rewrite that.
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286540
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] no /dev/console; /dev/null when booting with initrd of type 'ext2'
2012-10-16 14:23 ` Richard Braun
@ 2012-10-16 16:15 ` Thierry Bultel
2012-10-16 16:28 ` Richard Braun
0 siblings, 1 reply; 10+ messages in thread
From: Thierry Bultel @ 2012-10-16 16:15 UTC (permalink / raw)
To: buildroot
Le 16/10/2012 16:23, Richard Braun a ?crit :
> On Tue, Oct 16, 2012 at 04:16:48PM +0200, Thierry Bultel wrote:
>> Would the solution be to always have these inodes created in
>> 'device_table.txt' ?
>> (Works in my case, I do not plan to use the static table)
> The devtmpfs "file system" is usually a better approach.
>
I have CONFIG_TMPFS and , and CONFIG_DEVTMPFS_MOUNT, and it works with
everything but initrd of type "ext2"
I am thus asking 2 questions to myself
1) Why does the ISO image imply an ext2 initrd , instead of a cpio ?
2) Why does ext2 not work with devtmpfs (the answer is likely somewhere
in the kernel sources and I will take a look as well) ?
Regards
Thierry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20121016/e479d661/attachment.html>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] no /dev/console; /dev/null when booting with initrd of type 'ext2'
2012-10-16 16:15 ` Thierry Bultel
@ 2012-10-16 16:28 ` Richard Braun
2012-10-16 17:27 ` Thomas Petazzoni
0 siblings, 1 reply; 10+ messages in thread
From: Richard Braun @ 2012-10-16 16:28 UTC (permalink / raw)
To: buildroot
On Tue, Oct 16, 2012 at 06:15:36PM +0200, Thierry Bultel wrote:
> 2) Why does ext2 not work with devtmpfs (the answer is likely
> somewhere in the kernel sources and I will take a look as well) ?
A common mistake is forgetting to select the "mount devtmpfs at boot
time" option (CONFIG_DEVTMPFS_MOUNT).
--
Richard Braun
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] no /dev/console; /dev/null when booting with initrd of type 'ext2'
2012-10-16 16:28 ` Richard Braun
@ 2012-10-16 17:27 ` Thomas Petazzoni
2012-10-16 17:30 ` Richard Braun
2012-10-16 21:20 ` Peter Korsgaard
0 siblings, 2 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2012-10-16 17:27 UTC (permalink / raw)
To: buildroot
Dear Richard Braun,
On Tue, 16 Oct 2012 18:28:25 +0200, Richard Braun wrote:
> On Tue, Oct 16, 2012 at 06:15:36PM +0200, Thierry Bultel wrote:
> > 2) Why does ext2 not work with devtmpfs (the answer is likely
> > somewhere in the kernel sources and I will take a look as well) ?
>
> A common mistake is forgetting to select the "mount devtmpfs at boot
> time" option (CONFIG_DEVTMPFS_MOUNT).
Yes, but Thierry explicitly said he enabled this option, re-read the
e-mail you're replying to :)
Maybe the devtmpfs mounting done by CONFIG_DEVTMPFS_MOUNT does not take
place when an initrd is used? I honestly don't know, I don't use initrd
personally.
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] 10+ messages in thread
* [Buildroot] no /dev/console; /dev/null when booting with initrd of type 'ext2'
2012-10-16 17:27 ` Thomas Petazzoni
@ 2012-10-16 17:30 ` Richard Braun
2012-10-16 21:20 ` Peter Korsgaard
1 sibling, 0 replies; 10+ messages in thread
From: Richard Braun @ 2012-10-16 17:30 UTC (permalink / raw)
To: buildroot
On Tue, Oct 16, 2012 at 07:27:00PM +0200, Thomas Petazzoni wrote:
> Yes, but Thierry explicitly said he enabled this option, re-read the
> e-mail you're replying to :)
Woah, right sorry, time to sleep. Good luck.
--
Richard Braun
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] no /dev/console; /dev/null when booting with initrd of type 'ext2'
2012-10-16 17:27 ` Thomas Petazzoni
2012-10-16 17:30 ` Richard Braun
@ 2012-10-16 21:20 ` Peter Korsgaard
1 sibling, 0 replies; 10+ messages in thread
From: Peter Korsgaard @ 2012-10-16 21:20 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Hi,
Thomas> Maybe the devtmpfs mounting done by CONFIG_DEVTMPFS_MOUNT does
Thomas> not take place when an initrd is used? I honestly don't know, I
Thomas> don't use initrd personally.
I also don't use initrd's, but it's atleast not done for initramfs
(which is why we have the pre-init script in fs/cpio/init).
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] no /dev/console; /dev/null when booting with initrd of type 'ext2'
2012-10-16 16:09 ` Arnout Vandecappelle
@ 2012-10-17 12:04 ` Thierry Bultel
2012-10-17 21:10 ` Thomas Petazzoni
0 siblings, 1 reply; 10+ messages in thread
From: Thierry Bultel @ 2012-10-17 12:04 UTC (permalink / raw)
To: buildroot
Le 16/10/2012 18:09, Arnout Vandecappelle a ?crit :
> On 16/10/12 16:16, Thierry Bultel wrote:
>> When booting with an initrd of type "ext2", as it is the case when
>> using a generated ISO image,
>
> ISO?
>
>> the kernel (a 3.2.21 in my case) does not automagically create the
>> "/dev/null" and "dev/console" entries,
>> whereas it does when using a cpio.
>
> The kernel doesn't, but buildroot does. We copy fs/cpio/init to /init
> for cpio (and initramfs) archives, because those are the ones that are
> normally used for initrd.
>
> You can copy fs/cpio/init to /init in your post-build script, if you
> like.
>
>
>> Would the solution be to always have these inodes created in
>> 'device_table.txt' ?
>> (Works in my case, I do not plan to use the static table)
>
> Not really: the kernel doesn't automount devtmps for initrd.
>
>> Or change the ISO generation for using cpio instead of ext2 ?
>
> There's no point in using ext2 for initrd, it just adds overhead.
> So yes, switch to cpio.
>
> Oh, now I see your point with the iso image: fs/iso9660 uses an ext2
> initrd... Hm, that seems like a bad idea. Someone should rewrite that.
FYI, I have hacked into "iso9660.mk"
diff -r1.1.1.1 iso9660.mk
18c18
< $(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux
rootfs-ext2 grub
---
> $(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux
rootfs-cpio grub
22a23
25c26
< cp $(BINARIES_DIR)/rootfs.ext2 $(ISO9660_TARGET_DIR)/initrd
---
> cp $(BINARIES_DIR)/rootfs.cpio $(ISO9660_TARGET_DIR)/initrd
and it works perfectly without having to use the "device_table_dev.txt"
The other thing that is missing here is that the iso9660 build does not
support the grub splashscreen.
>
> Regards,
> Arnout
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] no /dev/console; /dev/null when booting with initrd of type 'ext2'
2012-10-17 12:04 ` Thierry Bultel
@ 2012-10-17 21:10 ` Thomas Petazzoni
0 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2012-10-17 21:10 UTC (permalink / raw)
To: buildroot
Dear Thierry Bultel,
On Wed, 17 Oct 2012 14:04:07 +0200, Thierry Bultel wrote:
> FYI, I have hacked into "iso9660.mk"
>
> diff -r1.1.1.1 iso9660.mk
> 18c18
> < $(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux
> rootfs-ext2 grub
> ---
> > $(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux
> rootfs-cpio grub
> 22a23
>
> 25c26
> < cp $(BINARIES_DIR)/rootfs.ext2 $(ISO9660_TARGET_DIR)/initrd
> ---
> > cp $(BINARIES_DIR)/rootfs.cpio $(ISO9660_TARGET_DIR)/initrd
>
> and it works perfectly without having to use the
> "device_table_dev.txt"
Could you send a proper Git patch for that? See
http://elinux.org/Buildroot_how_to_contribute.
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] 10+ messages in thread
end of thread, other threads:[~2012-10-17 21:10 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-16 14:16 [Buildroot] no /dev/console; /dev/null when booting with initrd of type 'ext2' Thierry Bultel
2012-10-16 14:23 ` Richard Braun
2012-10-16 16:15 ` Thierry Bultel
2012-10-16 16:28 ` Richard Braun
2012-10-16 17:27 ` Thomas Petazzoni
2012-10-16 17:30 ` Richard Braun
2012-10-16 21:20 ` Peter Korsgaard
2012-10-16 16:09 ` Arnout Vandecappelle
2012-10-17 12:04 ` Thierry Bultel
2012-10-17 21:10 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox