# HG changeset patch # User Rob Landley # Date 1289273098 21600 # Node ID 35dc1da8988c91a26f004c899cc0c500a498af65 # Parent 8c0b1c9b652568fc0a5e9c089a520a89daac1472 Change control image scripts so they always build in build/control-images, and put the extracted and archived (squashfs) versions in the same directory the way the other build scripts do. Also use utility_functions.sh as appropriate. diff -r 8c0b1c9b6525 -r 35dc1da8988c more/build-control-images.sh --- a/more/build-control-images.sh Mon Nov 08 21:07:36 2010 -0600 +++ b/more/build-control-images.sh Mon Nov 08 21:24:58 2010 -0600 @@ -2,7 +2,7 @@ # Build all control images (for native-build.sh) in build/control-images. -. sources/include.sh || exit 1 +. sources/utility_functions.sh || exit 1 blank_tempdir build/control-images @@ -11,8 +11,7 @@ for i in sources/control-images/{*.sh,*/make-control-image.sh} do - SCRIPTNAME=$(echo $i | sed 's@sources/control-images/\([^./]*\).*@\1@') + $i | maybe_quiet # Forking doesn't work yet due to extract collisions with the same package - #maybe_fork "$i build/control-images/$SCRIPTNAME.hdc | maybe_quiet" - $i build/control-images/$SCRIPTNAME.hdc | maybe_quiet + #maybe_fork "$i | maybe_quiet" done diff -r 8c0b1c9b6525 -r 35dc1da8988c sources/control-images/bootstrap-skeleton/control-image-wrapper.sh --- a/sources/control-images/bootstrap-skeleton/control-image-wrapper.sh Mon Nov 08 21:07:36 2010 -0600 +++ b/sources/control-images/bootstrap-skeleton/control-image-wrapper.sh Mon Nov 08 21:24:58 2010 -0600 @@ -4,12 +4,6 @@ source sources/include.sh || exit 1 -# Did caller specify the name of a control image to generate? Explicit -# /dev/null means none. - -[ $# -ne 1 ] && echo "usage: $0 FILENAME" >&2 && exit 1 -[ "$1" != "/dev/null" ] && [ -e "$1" ] && echo "$1" exists && exit 0 - # Find path to our working directory. MYDIR="$(readlink -f "$(dirname "$(which "$0")")")" @@ -50,8 +44,4 @@ # Create sqaushfs image -if [ "$1" != "/dev/null" ] -then - cd "$TOP" && - mksquashfs "$WORK" "$1" -noappend -all-root || dienow -fi +mksquashfs "$WORK" "$WORK.hdc" -noappend -all-root || dienow diff -r 8c0b1c9b6525 -r 35dc1da8988c sources/control-images/busybox-test.sh --- a/sources/control-images/busybox-test.sh Mon Nov 08 21:07:36 2010 -0600 +++ b/sources/control-images/busybox-test.sh Mon Nov 08 21:24:58 2010 -0600 @@ -4,9 +4,6 @@ source sources/include.sh || exit 1 -[ $# -ne 1 ] && echo "usage: $0 FILENAME" >&2 && exit 1 -[ -e "$1" ] && echo "$1" exists && exit 0 - WORK="$BUILD/control-images/busybox-test" && blank_tempdir "$WORK" # Don't download busybox, it's got to already be there in standard sources. @@ -33,4 +30,4 @@ chmod +x "$WORK"/init || dienow -mksquashfs "$WORK" "$1" -noappend -all-root +mksquashfs "$WORK" "$WORK.hdc" -noappend -all-root diff -r 8c0b1c9b6525 -r 35dc1da8988c sources/control-images/hello-world.sh --- a/sources/control-images/hello-world.sh Mon Nov 08 21:07:36 2010 -0600 +++ b/sources/control-images/hello-world.sh Mon Nov 08 21:24:58 2010 -0600 @@ -7,9 +7,6 @@ source sources/include.sh || exit 1 -[ $# -ne 1 ] && echo "usage: $0 FILENAME" >&2 && exit 1 -[ -e "$1" ] && echo "$1 exists" && exit 0 - # Set up working directories WORK="$BUILD/control-images/hello-world" @@ -37,4 +34,4 @@ cd "$TOP" -mksquashfs "$WORK" "$1" -noappend -all-root +mksquashfs "$WORK" "$WORK.hdc" -noappend -all-root diff -r 8c0b1c9b6525 -r 35dc1da8988c sources/control-images/static-tools.sh --- a/sources/control-images/static-tools.sh Mon Nov 08 21:07:36 2010 -0600 +++ b/sources/control-images/static-tools.sh Mon Nov 08 21:24:58 2010 -0600 @@ -7,9 +7,6 @@ source sources/include.sh || exit 1 -[ $# -ne 1 ] && echo "usage: $0 FILENAME" >&2 && exit 1 -[ -e "$1" ] && echo "$1" exists && exit 0 - PATCHDIR="$SOURCES/native-builds/static-tools-patches" SRCDIR="$SRCDIR/native" && mkdir -p "$SRCDIR" || dienow WORK="$BUILD/control-images/static-tools" && blank_tempdir "$WORK" @@ -90,4 +87,4 @@ cd "$TOP" -mksquashfs "$WORK" "$1" -noappend -all-root +mksquashfs "$WORK" "$WORK.hdc" -noappend -all-root