Pixelworks Target Filesystem Builder
====================================

Requirements:

- generate cramfs, squashfs and jffs2 images etc.
- image sizes and type may vary with target type
- image content varies with target type, some files
  may even be specific to or customized for a target
- since there will be a lot of similarity between images
  for different targets, we need to support reusable
  building blocks to ease maintenance


The filesystem image may be build from some of the following input files:

- system libraries and support files from the toolchain (libc etc.)
- init scripts and configuration files
- system binaries (busybox, mtd-utils etc.)
- PW applications, libraries and support files

Most of these files are built during "make sw_all" and installed
in a staging area.  Some files, like the init scripts, are also
maintained locally in the linux_fs/v3/src/ directory.
For compatibility with the linux_fs/v2 build structure
the staging directory is called linux_fs/v3/rootfs/.
Files from the staging area of the src/ directory are copied
during the build process as described below.


The implementation uses bash shell scripts and is structured
according to the following ideas:

- the "targets/" directory contains one subdirectory for each
  target, i.e. $TARGET_CHIP + $TARGET_PLATFORM combination

- this target subdirectory contains one shell script for each
  filesystem image to build, where the name of the script
  must match the name of the filesystem image

- each of these fs image build scripts just contains calls
  to a number of other scripts which are kept in the
  targets/include/ directory
  
- these build include scripts are organized by
  topic, e.g. there is one script to create device nodes,
  one script to copy the system libraries, etc.
  This way it is easy to enable or disable features depending
  on the target type.

- the rules.mk Makefile exports a number of variables to
  the environment;  these can be used in the scripts to
  implement variants

- the src/ directory contains files which are copied into
  the filesystem by one of the scripts from targets/include/;
  thus they are also organized in topics and names similarly
  to the scripts


There is no fixed scheme how to deal with target variances.
All of the following are possible:

- skripts can be added or skippped, depending on target
- a skript can copy only part of the files, depending on target
- a second src/ directory can hold additional files, or files
  which replace other ones (e.g. base-files -> base-files-garnet,
  netconfig -> netconfig-v4)


The filesystems are built in the build/ directory, and the
final filesystems images are placed into images/.


Here is an overwiew of the directory layout:

  targets/
    include/
      base-files.sh
      ...
    ruby_c0-eval-1/
      root.cramfs
      rw.jffs2
    ...
  src/
    base-files/
      etc/
        init.d/
      ...
    base-files-garnet
    ...
  rootfs/
  build/
  images/
