annotate build.sh @ 1045:a5b0f0a11792

Add BUILD_RW_SYSTEM_IMAGE=1 config option to build 2 gig writeable HDA (new stage named rw-system-image-$ARCH).
author Rob Landley <rob@landley.net>
date Sat, 01 May 2010 01:00:26 -0500
parents 5897a868313e
children abc8ddd4d9f0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
96
137ba51ee993 Delete output directories on re-run, teach build to log and build multiple
Rob Landley <rob@landley.net>
parents: 93
diff changeset
1 #!/bin/bash
137ba51ee993 Delete output directories on re-run, teach build to log and build multiple
Rob Landley <rob@landley.net>
parents: 93
diff changeset
2
888
626288dd5cf3 Lots of comments.
Rob Landley <rob@landley.net>
parents: 873
diff changeset
3 # Run all the steps needed to build a system image from scratch.
626288dd5cf3 Lots of comments.
Rob Landley <rob@landley.net>
parents: 873
diff changeset
4
114
304fd441e6a4 Re-teach build.sh to build more than one architecture in sequence.
Rob Landley <rob@landley.net>
parents: 108
diff changeset
5 # If run with no arguments, list architectures.
108
b66d638a3844 Build User Mode Linux and have that do the ext2 packaging (for now, anyway).
Rob Landley <rob@landley.net>
parents: 105
diff changeset
6
781
d8c780ed3686 Simplify build.sh to take exactly one argument. (Otherwise use buildall.sh.)
Rob Landley <rob@landley.net>
parents: 744
diff changeset
7 if [ $# -ne 1 ]
114
304fd441e6a4 Re-teach build.sh to build more than one architecture in sequence.
Rob Landley <rob@landley.net>
parents: 108
diff changeset
8 then
781
d8c780ed3686 Simplify build.sh to take exactly one argument. (Otherwise use buildall.sh.)
Rob Landley <rob@landley.net>
parents: 744
diff changeset
9 echo "Usage: $0 ARCH"
744
759adf5a0fe9 Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents: 719
diff changeset
10 . sources/include.sh
759adf5a0fe9 Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents: 719
diff changeset
11 read_arch_dir
114
304fd441e6a4 Re-teach build.sh to build more than one architecture in sequence.
Rob Landley <rob@landley.net>
parents: 108
diff changeset
12 fi
941
7dd3fb4dd333 Minor cleanups and comments, introduce check_prerequisite function.
Rob Landley <rob@landley.net>
parents: 915
diff changeset
13 ARCH="$1"
108
b66d638a3844 Build User Mode Linux and have that do the ext2 packaging (for now, anyway).
Rob Landley <rob@landley.net>
parents: 105
diff changeset
14
1028
5897a868313e Jean-Christophe Dubois pointed out that if build.sh doesn't source config, it doesn't get things like NO_NATIVE_COMPILER.
Rob Landley <rob@landley.net>
parents: 1007
diff changeset
15 [ -e config ] && source config
5897a868313e Jean-Christophe Dubois pointed out that if build.sh doesn't source config, it doesn't get things like NO_NATIVE_COMPILER.
Rob Landley <rob@landley.net>
parents: 1007
diff changeset
16
984
9840847885e8 Add export_if_blank and make lots of build paths overrideable.
Rob Landley <rob@landley.net>
parents: 944
diff changeset
17 [ -z "$BUILD" ] && BUILD="build"
9840847885e8 Add export_if_blank and make lots of build paths overrideable.
Rob Landley <rob@landley.net>
parents: 944
diff changeset
18
941
7dd3fb4dd333 Minor cleanups and comments, introduce check_prerequisite function.
Rob Landley <rob@landley.net>
parents: 915
diff changeset
19 # A function to skip stages that have already been done (because the
7dd3fb4dd333 Minor cleanups and comments, introduce check_prerequisite function.
Rob Landley <rob@landley.net>
parents: 915
diff changeset
20 # tarball they create is already there).
7dd3fb4dd333 Minor cleanups and comments, introduce check_prerequisite function.
Rob Landley <rob@landley.net>
parents: 915
diff changeset
21
786
8b5ea56e7507 Teach build.sh not to rebuild static compilers if they're already there.
Rob Landley <rob@landley.net>
parents: 785
diff changeset
22 not_already()
8b5ea56e7507 Teach build.sh not to rebuild static compilers if they're already there.
Rob Landley <rob@landley.net>
parents: 785
diff changeset
23 {
984
9840847885e8 Add export_if_blank and make lots of build paths overrideable.
Rob Landley <rob@landley.net>
parents: 944
diff changeset
24 if [ -f "$BUILD/$1-$ARCH.tar.bz2" ]
786
8b5ea56e7507 Teach build.sh not to rebuild static compilers if they're already there.
Rob Landley <rob@landley.net>
parents: 785
diff changeset
25 then
8b5ea56e7507 Teach build.sh not to rebuild static compilers if they're already there.
Rob Landley <rob@landley.net>
parents: 785
diff changeset
26 echo "=== Skipping $1-$ARCH (already there)"
8b5ea56e7507 Teach build.sh not to rebuild static compilers if they're already there.
Rob Landley <rob@landley.net>
parents: 785
diff changeset
27 return 1
8b5ea56e7507 Teach build.sh not to rebuild static compilers if they're already there.
Rob Landley <rob@landley.net>
parents: 785
diff changeset
28 fi
8b5ea56e7507 Teach build.sh not to rebuild static compilers if they're already there.
Rob Landley <rob@landley.net>
parents: 785
diff changeset
29
8b5ea56e7507 Teach build.sh not to rebuild static compilers if they're already there.
Rob Landley <rob@landley.net>
parents: 785
diff changeset
30 return 0
8b5ea56e7507 Teach build.sh not to rebuild static compilers if they're already there.
Rob Landley <rob@landley.net>
parents: 785
diff changeset
31 }
8b5ea56e7507 Teach build.sh not to rebuild static compilers if they're already there.
Rob Landley <rob@landley.net>
parents: 785
diff changeset
32
944
fc134a13357e Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents: 941
diff changeset
33 # Download source code and build host tools.
fc134a13357e Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents: 941
diff changeset
34
fc134a13357e Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents: 941
diff changeset
35 time ./download.sh || exit 1
fc134a13357e Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents: 941
diff changeset
36
fc134a13357e Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents: 941
diff changeset
37 # host-tools populates one directory with every command the build needs,
fc134a13357e Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents: 941
diff changeset
38 # so we can ditch the old $PATH afterwards.
fc134a13357e Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents: 941
diff changeset
39
fc134a13357e Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents: 941
diff changeset
40 time ./host-tools.sh || exit 1
fc134a13357e Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents: 941
diff changeset
41
941
7dd3fb4dd333 Minor cleanups and comments, introduce check_prerequisite function.
Rob Landley <rob@landley.net>
parents: 915
diff changeset
42 # Do we need to build the simple cross compiler?
781
d8c780ed3686 Simplify build.sh to take exactly one argument. (Otherwise use buildall.sh.)
Rob Landley <rob@landley.net>
parents: 744
diff changeset
43
944
fc134a13357e Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents: 941
diff changeset
44 if not_already simple-cross-compiler
781
d8c780ed3686 Simplify build.sh to take exactly one argument. (Otherwise use buildall.sh.)
Rob Landley <rob@landley.net>
parents: 744
diff changeset
45 then
d8c780ed3686 Simplify build.sh to take exactly one argument. (Otherwise use buildall.sh.)
Rob Landley <rob@landley.net>
parents: 744
diff changeset
46 # If we need to build cross compiler, assume root filesystem is stale.
d8c780ed3686 Simplify build.sh to take exactly one argument. (Otherwise use buildall.sh.)
Rob Landley <rob@landley.net>
parents: 744
diff changeset
47
984
9840847885e8 Add export_if_blank and make lots of build paths overrideable.
Rob Landley <rob@landley.net>
parents: 944
diff changeset
48 rm -rf "$BUILD/root-filesystem-$ARCH.tar.bz2"
944
fc134a13357e Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents: 941
diff changeset
49 time ./simple-cross-compiler.sh "$ARCH" || exit 1
1007
48784ae8533e Move CROSS_SMOKE_TEST implementation out of simple-cross-compiler.sh and into sources/more/cross-smoke-test.sh, called from build.sh. Clean up comments a bit while we're there.
Rob Landley <rob@landley.net>
parents: 998
diff changeset
50
48784ae8533e Move CROSS_SMOKE_TEST implementation out of simple-cross-compiler.sh and into sources/more/cross-smoke-test.sh, called from build.sh. Clean up comments a bit while we're there.
Rob Landley <rob@landley.net>
parents: 998
diff changeset
51 if [ ! -z "$CROSS_SMOKE_TEST" ]
48784ae8533e Move CROSS_SMOKE_TEST implementation out of simple-cross-compiler.sh and into sources/more/cross-smoke-test.sh, called from build.sh. Clean up comments a bit while we're there.
Rob Landley <rob@landley.net>
parents: 998
diff changeset
52 then
48784ae8533e Move CROSS_SMOKE_TEST implementation out of simple-cross-compiler.sh and into sources/more/cross-smoke-test.sh, called from build.sh. Clean up comments a bit while we're there.
Rob Landley <rob@landley.net>
parents: 998
diff changeset
53 sources/more/cross-smoke-test.sh "$ARCH" || exit 1
48784ae8533e Move CROSS_SMOKE_TEST implementation out of simple-cross-compiler.sh and into sources/more/cross-smoke-test.sh, called from build.sh. Clean up comments a bit while we're there.
Rob Landley <rob@landley.net>
parents: 998
diff changeset
54 fi
781
d8c780ed3686 Simplify build.sh to take exactly one argument. (Otherwise use buildall.sh.)
Rob Landley <rob@landley.net>
parents: 744
diff changeset
55 fi
d8c780ed3686 Simplify build.sh to take exactly one argument. (Otherwise use buildall.sh.)
Rob Landley <rob@landley.net>
parents: 744
diff changeset
56
1007
48784ae8533e Move CROSS_SMOKE_TEST implementation out of simple-cross-compiler.sh and into sources/more/cross-smoke-test.sh, called from build.sh. Clean up comments a bit while we're there.
Rob Landley <rob@landley.net>
parents: 998
diff changeset
57 # Optionally, we can build a more capable statically linked compiler via
48784ae8533e Move CROSS_SMOKE_TEST implementation out of simple-cross-compiler.sh and into sources/more/cross-smoke-test.sh, called from build.sh. Clean up comments a bit while we're there.
Rob Landley <rob@landley.net>
parents: 998
diff changeset
58 # canadian cross. (It's more powerful than we need here, but if you're going
48784ae8533e Move CROSS_SMOKE_TEST implementation out of simple-cross-compiler.sh and into sources/more/cross-smoke-test.sh, called from build.sh. Clean up comments a bit while we're there.
Rob Landley <rob@landley.net>
parents: 998
diff changeset
59 # to use the cross compiler in other contexts this is probably what you want.)
784
037488e9889d New build.sh that actually uses the new infrastructure, if STATIC_CROSS_COMPILER_HOST or BUILD_STATIC_NATIVE_COMPILER are set.
Rob Landley <rob@landley.net>
parents: 781
diff changeset
60
944
fc134a13357e Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents: 941
diff changeset
61 if [ ! -z "$STATIC_CC_HOST" ] && not_already cross-compiler
784
037488e9889d New build.sh that actually uses the new infrastructure, if STATIC_CROSS_COMPILER_HOST or BUILD_STATIC_NATIVE_COMPILER are set.
Rob Landley <rob@landley.net>
parents: 781
diff changeset
62 then
037488e9889d New build.sh that actually uses the new infrastructure, if STATIC_CROSS_COMPILER_HOST or BUILD_STATIC_NATIVE_COMPILER are set.
Rob Landley <rob@landley.net>
parents: 781
diff changeset
63
037488e9889d New build.sh that actually uses the new infrastructure, if STATIC_CROSS_COMPILER_HOST or BUILD_STATIC_NATIVE_COMPILER are set.
Rob Landley <rob@landley.net>
parents: 781
diff changeset
64 # These are statically linked against uClibc on the host (for portability),
037488e9889d New build.sh that actually uses the new infrastructure, if STATIC_CROSS_COMPILER_HOST or BUILD_STATIC_NATIVE_COMPILER are set.
Rob Landley <rob@landley.net>
parents: 781
diff changeset
65 # built --with-shared, and have uClibc++ installed.
037488e9889d New build.sh that actually uses the new infrastructure, if STATIC_CROSS_COMPILER_HOST or BUILD_STATIC_NATIVE_COMPILER are set.
Rob Landley <rob@landley.net>
parents: 781
diff changeset
66
037488e9889d New build.sh that actually uses the new infrastructure, if STATIC_CROSS_COMPILER_HOST or BUILD_STATIC_NATIVE_COMPILER are set.
Rob Landley <rob@landley.net>
parents: 781
diff changeset
67 # To build each of these we need two existing cross compilers: one for
037488e9889d New build.sh that actually uses the new infrastructure, if STATIC_CROSS_COMPILER_HOST or BUILD_STATIC_NATIVE_COMPILER are set.
Rob Landley <rob@landley.net>
parents: 781
diff changeset
68 # the host (to build the executables) and one for the target (to build
037488e9889d New build.sh that actually uses the new infrastructure, if STATIC_CROSS_COMPILER_HOST or BUILD_STATIC_NATIVE_COMPILER are set.
Rob Landley <rob@landley.net>
parents: 781
diff changeset
69 # the libraries).
037488e9889d New build.sh that actually uses the new infrastructure, if STATIC_CROSS_COMPILER_HOST or BUILD_STATIC_NATIVE_COMPILER are set.
Rob Landley <rob@landley.net>
parents: 781
diff changeset
70
944
fc134a13357e Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents: 941
diff changeset
71 BUILD_STATIC=1 FROM_ARCH="$STATIC_CC_HOST" STAGE_NAME=cross-compiler \
fc134a13357e Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents: 941
diff changeset
72 ./native-compiler.sh "$ARCH" || exit 1
1007
48784ae8533e Move CROSS_SMOKE_TEST implementation out of simple-cross-compiler.sh and into sources/more/cross-smoke-test.sh, called from build.sh. Clean up comments a bit while we're there.
Rob Landley <rob@landley.net>
parents: 998
diff changeset
73
48784ae8533e Move CROSS_SMOKE_TEST implementation out of simple-cross-compiler.sh and into sources/more/cross-smoke-test.sh, called from build.sh. Clean up comments a bit while we're there.
Rob Landley <rob@landley.net>
parents: 998
diff changeset
74 if [ ! -z "$CROSS_SMOKE_TEST" ]
48784ae8533e Move CROSS_SMOKE_TEST implementation out of simple-cross-compiler.sh and into sources/more/cross-smoke-test.sh, called from build.sh. Clean up comments a bit while we're there.
Rob Landley <rob@landley.net>
parents: 998
diff changeset
75 then
48784ae8533e Move CROSS_SMOKE_TEST implementation out of simple-cross-compiler.sh and into sources/more/cross-smoke-test.sh, called from build.sh. Clean up comments a bit while we're there.
Rob Landley <rob@landley.net>
parents: 998
diff changeset
76 sources/more/cross-smoke-test.sh "$ARCH" || exit 1
48784ae8533e Move CROSS_SMOKE_TEST implementation out of simple-cross-compiler.sh and into sources/more/cross-smoke-test.sh, called from build.sh. Clean up comments a bit while we're there.
Rob Landley <rob@landley.net>
parents: 998
diff changeset
77 fi
784
037488e9889d New build.sh that actually uses the new infrastructure, if STATIC_CROSS_COMPILER_HOST or BUILD_STATIC_NATIVE_COMPILER are set.
Rob Landley <rob@landley.net>
parents: 781
diff changeset
78 fi
037488e9889d New build.sh that actually uses the new infrastructure, if STATIC_CROSS_COMPILER_HOST or BUILD_STATIC_NATIVE_COMPILER are set.
Rob Landley <rob@landley.net>
parents: 781
diff changeset
79
944
fc134a13357e Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents: 941
diff changeset
80 # Build a native compiler. It's statically linked by default so it can be
fc134a13357e Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents: 941
diff changeset
81 # run on an arbitrary host system.
784
037488e9889d New build.sh that actually uses the new infrastructure, if STATIC_CROSS_COMPILER_HOST or BUILD_STATIC_NATIVE_COMPILER are set.
Rob Landley <rob@landley.net>
parents: 781
diff changeset
82
944
fc134a13357e Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents: 941
diff changeset
83 # If this compiler exists, root-filesystem will pick it up and incorpoate it.
fc134a13357e Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents: 941
diff changeset
84
fc134a13357e Largeish refactoring and cleanup of compiler build:
Rob Landley <rob@landley.net>
parents: 941
diff changeset
85 if not_already native-compiler && [ -z "$NO_NATIVE_COMPILER" ]
784
037488e9889d New build.sh that actually uses the new infrastructure, if STATIC_CROSS_COMPILER_HOST or BUILD_STATIC_NATIVE_COMPILER are set.
Rob Landley <rob@landley.net>
parents: 781
diff changeset
86 then
984
9840847885e8 Add export_if_blank and make lots of build paths overrideable.
Rob Landley <rob@landley.net>
parents: 944
diff changeset
87 rm -rf "$BUILD/root-filesystem-$ARCH.tar.bz2"
784
037488e9889d New build.sh that actually uses the new infrastructure, if STATIC_CROSS_COMPILER_HOST or BUILD_STATIC_NATIVE_COMPILER are set.
Rob Landley <rob@landley.net>
parents: 781
diff changeset
88
998
bbcafba8a594 Another bug Wolfgang Denk reported: make BUILD_STATIC=none actually work.
Rob Landley <rob@landley.net>
parents: 984
diff changeset
89 ./native-compiler.sh "$ARCH" || exit 1
784
037488e9889d New build.sh that actually uses the new infrastructure, if STATIC_CROSS_COMPILER_HOST or BUILD_STATIC_NATIVE_COMPILER are set.
Rob Landley <rob@landley.net>
parents: 781
diff changeset
90 fi
037488e9889d New build.sh that actually uses the new infrastructure, if STATIC_CROSS_COMPILER_HOST or BUILD_STATIC_NATIVE_COMPILER are set.
Rob Landley <rob@landley.net>
parents: 781
diff changeset
91
781
d8c780ed3686 Simplify build.sh to take exactly one argument. (Otherwise use buildall.sh.)
Rob Landley <rob@landley.net>
parents: 744
diff changeset
92 # Do we need to build the root filesystem?
539
85979aa53fde Teach build.sh not to rerun build stages we already have the result of.
Rob Landley <rob@landley.net>
parents: 503
diff changeset
93
786
8b5ea56e7507 Teach build.sh not to rebuild static compilers if they're already there.
Rob Landley <rob@landley.net>
parents: 785
diff changeset
94 if not_already root-filesystem
781
d8c780ed3686 Simplify build.sh to take exactly one argument. (Otherwise use buildall.sh.)
Rob Landley <rob@landley.net>
parents: 744
diff changeset
95 then
786
8b5ea56e7507 Teach build.sh not to rebuild static compilers if they're already there.
Rob Landley <rob@landley.net>
parents: 785
diff changeset
96
781
d8c780ed3686 Simplify build.sh to take exactly one argument. (Otherwise use buildall.sh.)
Rob Landley <rob@landley.net>
parents: 744
diff changeset
97 # If we need to build root filesystem, assume system image is stale.
539
85979aa53fde Teach build.sh not to rerun build stages we already have the result of.
Rob Landley <rob@landley.net>
parents: 503
diff changeset
98
984
9840847885e8 Add export_if_blank and make lots of build paths overrideable.
Rob Landley <rob@landley.net>
parents: 944
diff changeset
99 rm -rf "$BUILD/system-image-$ARCH.tar.bz2"
786
8b5ea56e7507 Teach build.sh not to rebuild static compilers if they're already there.
Rob Landley <rob@landley.net>
parents: 785
diff changeset
100 time ./root-filesystem.sh "$ARCH" || exit 1
781
d8c780ed3686 Simplify build.sh to take exactly one argument. (Otherwise use buildall.sh.)
Rob Landley <rob@landley.net>
parents: 744
diff changeset
101 fi
d8c780ed3686 Simplify build.sh to take exactly one argument. (Otherwise use buildall.sh.)
Rob Landley <rob@landley.net>
parents: 744
diff changeset
102
786
8b5ea56e7507 Teach build.sh not to rebuild static compilers if they're already there.
Rob Landley <rob@landley.net>
parents: 785
diff changeset
103 if not_already system-image
781
d8c780ed3686 Simplify build.sh to take exactly one argument. (Otherwise use buildall.sh.)
Rob Landley <rob@landley.net>
parents: 744
diff changeset
104 then
d8c780ed3686 Simplify build.sh to take exactly one argument. (Otherwise use buildall.sh.)
Rob Landley <rob@landley.net>
parents: 744
diff changeset
105 time ./system-image.sh $1 || exit 1
d8c780ed3686 Simplify build.sh to take exactly one argument. (Otherwise use buildall.sh.)
Rob Landley <rob@landley.net>
parents: 744
diff changeset
106 fi
786
8b5ea56e7507 Teach build.sh not to rebuild static compilers if they're already there.
Rob Landley <rob@landley.net>
parents: 785
diff changeset
107
1045
a5b0f0a11792 Add BUILD_RW_SYSTEM_IMAGE=1 config option to build 2 gig writeable HDA (new stage named rw-system-image-$ARCH).
Rob Landley <rob@landley.net>
parents: 1028
diff changeset
108 if [ ! -z "$BUILD_RW_SYSTEM_IMAGE" ] && not_already rw-image
a5b0f0a11792 Add BUILD_RW_SYSTEM_IMAGE=1 config option to build 2 gig writeable HDA (new stage named rw-system-image-$ARCH).
Rob Landley <rob@landley.net>
parents: 1028
diff changeset
109 then
a5b0f0a11792 Add BUILD_RW_SYSTEM_IMAGE=1 config option to build 2 gig writeable HDA (new stage named rw-system-image-$ARCH).
Rob Landley <rob@landley.net>
parents: 1028
diff changeset
110 # Optimization: don't rebuild kernel if we don't need to.
a5b0f0a11792 Add BUILD_RW_SYSTEM_IMAGE=1 config option to build 2 gig writeable HDA (new stage named rw-system-image-$ARCH).
Rob Landley <rob@landley.net>
parents: 1028
diff changeset
111 mkdir -p "$BUILD/rw-system-image-$ARCH" &&
a5b0f0a11792 Add BUILD_RW_SYSTEM_IMAGE=1 config option to build 2 gig writeable HDA (new stage named rw-system-image-$ARCH).
Rob Landley <rob@landley.net>
parents: 1028
diff changeset
112 cp "$BUILD/system-image-$ARCH"/zImage-* "$BUILD/rw-system-image-$ARCH"
a5b0f0a11792 Add BUILD_RW_SYSTEM_IMAGE=1 config option to build 2 gig writeable HDA (new stage named rw-system-image-$ARCH).
Rob Landley <rob@landley.net>
parents: 1028
diff changeset
113
a5b0f0a11792 Add BUILD_RW_SYSTEM_IMAGE=1 config option to build 2 gig writeable HDA (new stage named rw-system-image-$ARCH).
Rob Landley <rob@landley.net>
parents: 1028
diff changeset
114 STAGE_NAME=rw-system-image SYSIMAGE_TYPE=ext2 SYSIMAGE_HDA_MEGS=2048 time ./system-image.sh $1 || exit 1
a5b0f0a11792 Add BUILD_RW_SYSTEM_IMAGE=1 config option to build 2 gig writeable HDA (new stage named rw-system-image-$ARCH).
Rob Landley <rob@landley.net>
parents: 1028
diff changeset
115 fi