Mercurial > hg > aboriginal
changeset 888:626288dd5cf3
Lots of comments.
author | Rob Landley <rob@landley.net> |
---|---|
date | Mon, 16 Nov 2009 01:45:56 -0600 |
parents | 2499abcf2df1 |
children | 0947cffea3bd |
files | build.sh clean.sh cross-compiler.sh download.sh host-tools.sh root-filesystem.sh sources/README sources/baseconfig-uClibc sources/toys/ccwrap.c system-image.sh |
diffstat | 10 files changed, 37 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/build.sh Sun Nov 15 14:50:25 2009 -0600 +++ b/build.sh Mon Nov 16 01:45:56 2009 -0600 @@ -1,5 +1,7 @@ #!/bin/bash +# Run all the steps needed to build a system image from scratch. + # If run with no arguments, list architectures. ARCH="$1"
--- a/clean.sh Sun Nov 15 14:50:25 2009 -0600 +++ b/clean.sh Mon Nov 16 01:45:56 2009 -0600 @@ -1,7 +1,6 @@ #!/bin/bash -# Delete all the target stages, to force them to rebuild next time build.sh -# runs. +# Delete all the target stages, to force them to rebuild next build.sh. # This leaves build.packages and build/host alone. (You can delete those # too if you like, rm -rf build is safe, it just means ./download.sh --extract
--- a/cross-compiler.sh Sun Nov 15 14:50:25 2009 -0600 +++ b/cross-compiler.sh Mon Nov 16 01:45:56 2009 -0600 @@ -1,5 +1,7 @@ #!/bin/bash +# Build a cross compiler for the specified target. + # Get lots of predefined environment variables and shell functions. source sources/include.sh || exit 1
--- a/download.sh Sun Nov 15 14:50:25 2009 -0600 +++ b/download.sh Mon Nov 16 01:45:56 2009 -0600 @@ -1,10 +1,12 @@ #!/bin/bash -# Download everything we haven't already got a copy of. +# Download all the source tarballs we haven't got up-to-date copies of. -# The tarball extraction in setupfor doesn't parallelize well, so if -# you're going to run multiple builds at once call "./download.sh --extract" -# to extract and patch all tarballs up front, to avoid collisions. +# The tarballs are downloaded into the "packages" directory, which is +# created as needed. + +# The --extract option extracts/patches each tarball into "build/packages". +# (Otherwise this is done later when the tarball is first used by a build.) [ "$1" == "--extract" ] && EXTRACT_ALL=yes
--- a/host-tools.sh Sun Nov 15 14:50:25 2009 -0600 +++ b/host-tools.sh Mon Nov 16 01:45:56 2009 -0600 @@ -1,9 +1,11 @@ #!/bin/bash -# This script sets up a known host environment. It serves a similar purpose -# to the temporary chroot system in Linux From Scratch chapter 5, isolating -# the new build from the host system so information from the host doesn't -# accidentally leak into the target. +# Set up a known host environment, providing known versions all required +# prerequisites, built from source. + +# This script serves a similar purpose to the temporary chroot system in +# Linux From Scratch chapter 5, isolating the new build from the host system +# so information from the host doesn't accidentally leak into the target. # This script populates a build/host directory with busybox and symlinks to # the host's toolchain, then adds the other packages (genext2fs, e2fsprogs,
--- a/root-filesystem.sh Sun Nov 15 14:50:25 2009 -0600 +++ b/root-filesystem.sh Mon Nov 16 01:45:56 2009 -0600 @@ -1,5 +1,7 @@ #!/bin/bash +# Build a root filesystem for a given target. + # Get lots of predefined environment variables and shell functions. source sources/include.sh || exit 1
--- a/sources/README Sun Nov 15 14:50:25 2009 -0600 +++ b/sources/README Mon Nov 16 01:45:56 2009 -0600 @@ -20,7 +20,7 @@ native: Files copied verbatim into each architecture's root-filesystem image. - toys: Various small code snippets written or maintained by this project. + toys: Various small code snippets written or maintained for this project. sections: Package build scripts called more than once during build.sh. This is duplicate code factored out into a common location.
--- a/sources/baseconfig-uClibc Sun Nov 15 14:50:25 2009 -0600 +++ b/sources/baseconfig-uClibc Mon Nov 16 01:45:56 2009 -0600 @@ -1,3 +1,9 @@ +# Common configuration for uClibc. + +# This is a miniconfig (created by running sources/toys/miniconfig.sh on +# a full .config file), to which target-specific entries in $UCLIBC_CONFIG +# (from the target's settings file) are appended. + ARCH_HAS_MMU=y ARCH_USE_MMU=y UCLIBC_HAS_FLOATS=y
--- a/sources/toys/ccwrap.c Sun Nov 15 14:50:25 2009 -0600 +++ b/sources/toys/ccwrap.c Mon Nov 16 01:45:56 2009 -0600 @@ -9,6 +9,10 @@ * Licensed under GPLv2. */ +#ifndef GCC_UNWRAPPED_NAME +#error You forgot -DGCC_UNWRAPPED_NAME='"'$PREFIX-rawgcc'"' +#else + #define _GNU_SOURCE #include <alloca.h> #include <stdio.h> @@ -479,3 +483,4 @@ fprintf(stderr, "%s: %s\n", cpp ? cpp : cc, strerror(errno)); exit(EXIT_FAILURE); } +#endif
--- a/system-image.sh Sun Nov 15 14:50:25 2009 -0600 +++ b/system-image.sh Mon Nov 16 01:45:56 2009 -0600 @@ -1,6 +1,7 @@ #!/bin/bash -# Create a bootable system image from root-filesystem +# Package a root filesystem directory into a filesystem image, with +# associated bootable kernel binary and launch scripts. source sources/include.sh || exit 1 @@ -63,11 +64,14 @@ cp "$(getconfig linux)" mini.conf || dienow [ "$SYSIMAGE_TYPE" == "initramfs" ] && (echo "CONFIG_BLK_DEV_INITRD=y" >> mini.conf || dienow) -make ARCH="${BOOT_KARCH}" KCONFIG_ALLCONFIG=mini.conf \ +make ARCH="${BOOT_KARCH}" KCONFIG_ALLCONFIG=mini.conf $LINUX_FLAGS \ allnoconfig >/dev/null || dienow # Build kernel in parallel with initramfs +echo make -j $CPUS ARCH="${BOOT_KARCH}" CROSS_COMPILE="${ARCH}-" $LINUX_FLAGS \ + $VERBOSITY + ( make -j $CPUS ARCH="${BOOT_KARCH}" CROSS_COMPILE="${ARCH}-" $LINUX_FLAGS \ $VERBOSITY || dienow ) &