changeset 1030:81003c9f31cb

Add a new FAQ: how to get a writeable root filesystem.
author Rob Landley <>
date Wed, 07 Apr 2010 16:39:41 -0500
parents edf0d611a8ba
children 425fc32f43a3
files www/FAQ.html
diffstat 1 files changed, 47 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/www/FAQ.html	Wed Apr 07 15:50:03 2010 -0500
+++ b/www/FAQ.html	Wed Apr 07 16:39:41 2010 -0500
@@ -5,11 +5,13 @@
 <li><p><a href=#where_start>Q: Where do I start?</a></p></li>
+<li><p><a href=#add_package>Q: How do I add $PACKAGE to my system image's root filesystem?</a></p></li>
 <li><p><a href=#ubuntu_mispackaged_qemu>Q: ./ says qemu-system-mips isn't found, but I installed qemu.  Why isn't this working?</a></p></li>
 <li><p><a href=#case_sensitive_patch>Q: I added my uClibc patch to sources/patches but it didn't do anything, what's wrong?</a></p></li>
-<li><p><a href=#package_breaks>Q: Why did packate build $NAME die because it couldn't find $PREREQUISITE, even though it's installed?</a></p></li>
+<li><p><a href=#package_breaks>Q: Why did package build $NAME die because it couldn't find $PREREQUISITE, even though it's installed?</a></p></li>
 <a name=where_start /><h2>Q: Where do I start?</h2>
@@ -55,20 +57,24 @@
 <p>Go to the <a href=downloads>downloads directory</a> and grab the highest
 numbered release tarball, extract it, and run <b>./</b> to list
 the available targets.  The run <b>./ $TARGET</b> to compile
-the one you like.  The results are in the "build> directory.</p>
+the one you like.  The results wind up in the "build" directory.</p>
 <p>The build scripts are written in bash, and fairly extensively commented.
 All the scripts at the top level are designed to be run directly, and is just a wrapper script that calls them in order.  The less commonly
 used scripts in <b>sources/more</b> are also designed to be run directly.</p>
-<p>Go to the <a href=/ht/firmware>mercurial archive</a> to grab the latest
-development version out of source control.  If you don't want to use mercurial,
-you can grab a <a href=/hg/firmware/archive/tip.tar.bz2>tarball</a> of the
-current code at any time.</p>
+<p>A large number of variables can be set to configure the build, either
+by modifying the file "config" (which documents them all) or by exporting
+them as environment variables.</p>
+<p>To grab the latest development version of the build scripts out of the
+source control system, go to the <a href=/ht/firmware>mercurial archive</a>.
+If you don't want to install mercurial, you can grab a
+<a href=/hg/firmware/archive/tip.tar.bz2>tarball</a> of the current code at
+any time.</p>
 <p>For the first two, the <a href=downloads/binaries>downloads/binaries
@@ -84,7 +90,41 @@
 <p>If all else fails, look at the pretty
 <a href=screenshots>screenshots</a>.</p>
+<a name=add_package /><h2>Q: How do I add $PACKAGE to my system image's root filesystem?</h2>
+<p>A: The easy way is to build a new system image with a writeable root
+filesystem and enough extra space to install your package in.</p>
+<p>FWL builds squashfs images by default, and the prebuilt binary tarballs in
+the downloads/binaries directory are built with the default values.  Squashfs
+is a read-only compressed filesystem, which means it's pretty durable (you
+never need to fsck it), but also a bit limiting.  The
+script attaches a 2 gigabyte ext2 image to /dev/hdb (which is mounted on
+/home) so you always have writeable space to build stuff in, but that doesn't
+let you modify the root filesystem on /dev/hda: you can't install packages
+you build into /bin and such on a read-only root filesystem.</p>
+<p>The "SYSIMAGE_TYPE" and "SYSIMAGE_HDA_MEGS" config entries let you change
+the default system image type generated by the script.  You
+can edit the file "config" or specify them as environment variables, ala:</p>
+<p>That creates a 2 gigabyte ext2 image, which you can boot into and install
+packages natively under, using the "./ $TARGET" script.
+If you've already built a system image, you can repackage the existing root
+filesystem by just running (instead of the whole
+As always, your new system image is created in the "build" subdirectory.</p>
+<p>Note: since this is a writeable image, you'll have to fsck it.  You can
+also use "tune2fs -j" to turn it into an ext3 image.</p>
+<p>(The "hard way" to go with the above "easy way" is to cross compile the
+additional package and add it to the build/root-filesystem-$TARGET directory
+so packages it up into the squashfs.  You're on your own if
+you want to do that, it's not recommended.  Native building is much easier.)</p>
 <a name=ubuntu_mispackaged_qemu /><h2>Q: ./ says qemu-system-$TARGET isn't found, but I installed the qemu package and the executable "qemu" is there.  Why isn't this working?</h2>