From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] need smaller filesystem for NOR
Date: Fri, 8 Feb 2013 18:38:07 +0100 [thread overview]
Message-ID: <20130208183807.2b2fe572@skate> (raw)
In-Reply-To: <1360344317.17385.31.camel@genx.eng.msli.com>
Dear John Stile,
On Fri, 08 Feb 2013 09:25:17 -0800, John Stile wrote:
> I primarily boot from one of two 128Mb NAND areas, but I have an 8Mb NOR
> failsafe if NAND is bad. I have about 5.5Mb available for the
> Filesystem after loading at91bootstrap, uboot, uboot-env, and kernel.
> ...(using buildroot-2011.11)...
>
> The rootfs.jffs2 for NAND is 41Mb.
> I need one for NOR that is less than 5.5Mb.
>
> Is there a good method or script to copy buildroot's rootfs.jffs2 to
> make a smaller copy for NOR?
>
> My first attempt leads to
> VFS: Mounted root (jffs2 filesystem) on device 31:1.
> Freeing init memory: 104K
> Warning: unable to open an initial console.
> Kernel panic - not syncing: No init found. Try passing init= option to kernel.
> [<c0028678>] (unwind_backtrace+0x0/0xdc) from [<c0243990>] (panic+0x34/0x110)
> [<c0243990>] (panic+0x34/0x110) from [<c002254c>] (init_post+0x138/0x170)
> [<c002254c>] (init_post+0x138/0x170) from [<c0008408>] (kernel_init+0xbc/0xe8)
> [<c0008408>] (kernel_init+0xbc/0xe8) from [<c003b634>] (do_exit+0x0/0x5a4)
> [<c003b634>] (do_exit+0x0/0x5a4) from [<00000003>] (0x3)
>
> I think this means the file system is found and mounted, and for some
> reason, init isn't found, although I have played with init= to no avail,
> and if I mount my little jffs2, I do see busybox and all the links
> (/bin/init).
Beware that if a NAND or NOR partition is empty and properly erase,
jffs2 will happily mount it and show a filesystem that contains no
file. So the behavior you're seeing here could perfectly happen if your
NAND or NOR partition is simply empty.
> I tried to trying to hack it (unsuccessfully) with a post-build script
> that tries to do what buildroot does:
Rather than doing this, what about having a separate Buildroot project
that is used to build your small NOR failsafe filesystem? If it's only
a 5.5 MB filesystem, most likely there isn't too much in it. Both
Buildroot projects can share the same Buildroot source tree, but be
built in different directories.
Let's say ~/buildroot/ contains the Buildroot sources,
~/buildroot/configs/project_defconfig and
~/buildroot/configs/project_failsafe_defconfig are respectively the
Buildroot configuration for your full filesystem and for the small
failsafe filesystem. Then you can do:
mkdir -p ~/project/full/
cd ~/project/full/
make -C ~/buildroot O=$(pwd) project_defconfig
make
mkdir -p ~/project/failsafe/
cd ~/project/failsafe
make -C ~/buildroot O=$(pwd) project_failsafe_defconfig
make
And that's it.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2013-02-08 17:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-08 17:25 [Buildroot] need smaller filesystem for NOR John Stile
2013-02-08 17:38 ` Thomas Petazzoni [this message]
2013-02-08 21:34 ` John Stile
2013-02-12 0:19 ` John Stile
2013-02-12 17:31 ` Arnout Vandecappelle
2013-02-12 21:50 ` Thomas Petazzoni
2013-02-16 18:05 ` Peter Korsgaard
2013-02-12 18:24 ` John Stile
2013-02-08 17:38 ` Yann E. MORIN
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=20130208183807.2b2fe572@skate \
--to=thomas.petazzoni@free-electrons.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