From: Emmanuel BOUAZIZ <ebouaziz@neotion.com>
To: buildroot@busybox.net
Subject: [Buildroot] buildroot with SquashFS root file system
Date: Thu, 08 Dec 2011 11:31:10 +0100 [thread overview]
Message-ID: <4EE091EE.2010504@neotion.com> (raw)
In-Reply-To: <201112061216.46659.minimod@morethan.org>
On 12/06/2011 07:16 PM, Michael S. Zick wrote:
> My next guess -
>
> Was the kernel built by Buildroot or did you build it otherwise?
> If the kernel wasn't built by Buildroot, it may not have the
> required options set for tmpfs, devtmpfs, automount devtmpfs.
>
> If built outside of Buildroot, what version kernel?
>
I build the kernel using buildroot. It's version 3.1.4
On 12/06/2011 09:29 PM, Peter Korsgaard wrote:
>
> An initramfs would be a better option than initrd, but OK. Did you build
> the kernel with buildroot or manually?
>
I'll probably use the initramfs since it already works and you say it's a better option. But I'd like to make the
SquashFS work now that I've started, it's frustrating not to succeed :p
I build the kernel with buildroot, it'version 3.1.4
>
> Emmanuel> Here is what I get during the boot sequence:
>
> Emmanuel> (...)
> Emmanuel> RAMDISK: squashfs filesystem found at block 0
> Emmanuel> RAMDISK: Loading 14133KiB [1 disk] into ram disk.../
> Emmanuel> usb 1-7: new high speed USB device number 3 using ehci_hcd
> Emmanuel> VFS: Mounted root (squashfs filesystem) readonly on device 1:0
> Emmanuel> usb 2-2: new full speed USB device number 2 using uhci_hcd
> Emmanuel> can't open /dev/null: No such file or directory
> Emmanuel> can't open /dev/null: No such file or directory
> Emmanuel> can't open /dev/null: No such file or directory
> Emmanuel> can't open /dev/null: No such file or directory
> Emmanuel> can't open /dev/null: No such file or directory
> Emmanuel> can't open /dev/null: No such file or directory
>
> Do you have CONFIG_DEVTMPFS enabled in your kernel? From a quick look at
> the kernel sources (init/do_mounts_initrd.c) I see that the kernel
> doesn't mount devtmpfs automatically when an initrd is used, so you'll
> need to add a wrapper script as /linuxrc which mounts it and execs
> /sbin/init, similar to how we do it for initramfs (fs/cpio/init):
>
> # devtmpfs does not get automounted for initramfs
> /bin/mount -t devtmpfs devtmpfs /dev
> exec 0</dev/console
> exec 1>/dev/console
> exec 2>/dev/console
> exec /sbin/init $*
>
Yes it's enabled. I've put that same mechanism in squashfs (modified fs/squashfs/squashfs.mk and added fs/squashfs/init)
and added init=/init in kernel parameters but the /init script is not run.
I took a look at the possible kernel parameters and added root=/dev/ram0 rw to the kernel parameters.
Now I get a "devtmpfs: mounted" before the /init script is run, and another saying "mount: mounting devtmpfs on /dev
failed: Device or resource busy" when the /init script is run :D
So I removed the /init script, the "can't open /dev/null" problem is gone.
The only remaining problem is that the whole filesystem is read-only despite the 'rw' including /var and /tmp.
regards,
--
Emmanuel
next prev parent reply other threads:[~2011-12-08 10:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-06 15:20 [Buildroot] buildroot with SquashFS root file system Emmanuel BOUAZIZ
2011-12-06 15:56 ` Michael S. Zick
2011-12-06 17:59 ` Emmanuel BOUAZIZ
2011-12-06 18:16 ` Michael S. Zick
2011-12-08 10:31 ` Emmanuel BOUAZIZ [this message]
2011-12-08 10:48 ` Peter Korsgaard
2011-12-08 11:26 ` Emmanuel BOUAZIZ
2011-12-08 14:27 ` Michael S. Zick
2011-12-08 17:34 ` Emmanuel BOUAZIZ
2011-12-06 20:29 ` Peter Korsgaard
2011-12-13 17:18 ` Arnout Vandecappelle
2011-12-14 8:40 ` Thomas Petazzoni
2011-12-14 9:01 ` Peter Korsgaard
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=4EE091EE.2010504@neotion.com \
--to=ebouaziz@neotion.com \
--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