# HG changeset patch # User Rob Landley # Date 1446743616 21600 # Node ID 3a66b5554d1e9ed23699067436386d2cd62d76e9 # Parent 9cdd90bdce76757b456e5b98727a1ed045ce5b85 Documentation update. diff -r 9cdd90bdce76 -r 3a66b5554d1e www/build-stages.html --- a/www/build-stages.html Thu Nov 05 09:59:14 2015 -0600 +++ b/www/build-stages.html Thu Nov 05 11:13:36 2015 -0600 @@ -4,17 +4,17 @@

The Aboriginal Linux build scripts are the source code for the Aboriginal -Linux project. If you would like to build your own cross compiler or target -system image from source, use these build scripts. They're written in bash +Linux project. If you would like to build your own cross compiler or target +system image from source, use these build scripts. They're written in bash and should be fairly easy to read.

Quick start

-

Run build.sh with no arguments to see a list of targets. Select +

Run build.sh with no arguments to see a list of targets. Select a target, and run build.sh $TARGET with the target name in place of -$TARGET. When it finishes, run more/dev-environment.sh $TARGET to +$TARGET. When it finishes, run more/dev-environment.sh $TARGET to boot the resulting system image under QEMU, configured for use as a -development environment. Type exit to shut down the emulator.

+development environment. Type exit to shut down the emulator.

Overview

@@ -24,34 +24,33 @@
  • download.sh - Download source packages used by the rest of the build.
  • host-tools.sh - Build prerequisites host needs to run remaining stages.
  • simple-cross-compiler.sh - Build cross compiler for selected target architecture.
  • -
  • [cross-compiler.sh] - optionally produce a more portable cross compiler (not needed by rest of build).
  • +
  • [cross-compiler.sh] - optionally produce a more portable +cross compiler (not needed by rest of build, but released as +a tarball).
  • native-compiler.sh - Build native compiler to install/run on target.
  • -
  • simple-root-filesystem.sh - Build root filesystem that can boot to a shell prompt.
  • -
  • root-filesystem.sh - Combine output of native-compiler and simple-root-filesystem stages into a single directory.
  • -
  • root-image.sh - Create ext2/squashfs/initramfs image file from root-filesystem or simple-root-filesystem output.
  • -
  • linux-kernel.sh - Build bootable Linux kernel.
  • -
  • system-image.sh - Package together filesystem image and kernel with scripts to launch them under an emulator.
  • +
  • root-filesystem.sh - Build simple initramfs filesystem, just enough to boot to a shell prompt.
  • +
  • system-image.sh - Build bootable linux kernel and package together filesystem image and kernel with scripts to launch them under an emulator.
  • The top level wrapper script build.sh runs the above stages in order, -but each stage script can also be run individually. Each of the above +but each stage script can also be run individually. Each of the above build scripts (except download.sh and host-tools.sh) take a single argument: -the name of the target architecture to build code for. Run build.sh with no +the name of the target architecture to build code for. Run build.sh with no arguments to see a list of available targets.

    Each build stage (except download.sh and host-tools.sh) produces its output in the "build" directory under a subdirectory named after the script plus the -target. It also produces a tarball of that directory if the build stage -completed successfully. (The download.sh script populates the "packages" +target. It also produces a tarball of that directory if the build stage +completed successfully. (The download.sh script populates the "packages" directory instead, and host-tools.sh produces its output the directory "build/host" with no tarball version since those programs are intended to run locally.)

    -

    All downloaded files wind up in the "packages" directory. Output from -compiles is generated in the "build" directory. These are the only two -directories the build writes to, and both directories may be deleted and -then recreated by the build scripts. (The equivalent of "distclean" is -rm -rf build packages from the top level directory.)

    +

    All downloaded files wind up in the "packages" directory. Output from +compiles is generated in the "build" directory. These are the only two +directories the build writes to, and both directories may be deleted (to be +recreated by the build scripts). The equivalent of "distclean" is +rm -rf build packages from the top level directory.

    None of these scripts need to be run as root -- an explicit design goal of Aboriginal Linux is that root access on the host is never required.

    @@ -64,23 +63,28 @@

    The sources/more directory contains additional scripts the user can run, -but which are not called from build.sh. This directory contains the external +but which are not called from build.sh. This directory contains the external user interfaces the user can call directly which are not build stages. See more/README in the Aboriginal source code for details.

    - +

    The native-build.sh script in each system-image, and the +more/native-build-from-build.sh script, use build +control images, externally supplied filesystem images (usually squashfs) +the system image's init script automatically mounts on /mnt. If the file +/mnt/init exists (I.E. an executable "init" script at the top of the +build control image), the system image init script will run that file instead +of dropping to a shell prompt. This allows arbitrary automated behavior +out of the newly booted image, operating on supplied data.