Mercurial > hg > aboriginal
annotate sources/include.sh @ 729:1d2921810860
Fix the canadian cross stuff for arches that override CROSS_TARGET (ala ppc440)
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 17 May 2009 15:14:46 -0500 |
parents | db5cb617339a |
children | 104e8a35ea2e |
rev | line source |
---|---|
173
8b4c243a212e
Add better debug info to a status report, and stop fighting ubuntu so much
Rob Landley <rob@landley.net>
parents:
170
diff
changeset
|
1 #!/bin/bash |
138
7dffe9648a56
Installing bash but not using it. Yeah, there's a political agenda at work
Rob Landley <rob@landley.net>
parents:
125
diff
changeset
|
2 |
351
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
3 |
399
4e11cfb255e2
Break config out from include.sh, so environment variables users can edit to affect the build are collected together in one place with nothing else in it.
Rob Landley <rob@landley.net>
parents:
398
diff
changeset
|
4 [ -e config ] && source config |
398
a7daae215647
Implement unstable package download logic, with examples. (Try "USE_UNSTABLE=uClibc,linux ./download.sh" for example.)
Rob Landley <rob@landley.net>
parents:
396
diff
changeset
|
5 |
428
c88e25996320
Split function definitions out from include.sh.
Rob Landley <rob@landley.net>
parents:
419
diff
changeset
|
6 source sources/functions.sh |
c88e25996320
Split function definitions out from include.sh.
Rob Landley <rob@landley.net>
parents:
419
diff
changeset
|
7 |
351
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
8 # What host compiler should we use? |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
9 |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
10 [ -z "$CC" ] && CC=gcc |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
11 |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
12 # How many processors should make -j use? |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
13 |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
14 if [ -z "$CPUS" ] |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
15 then |
553
80f3356577fc
Move kernel building from mini-native to package-mini-native in preparation for initramfs packaging option.
Rob Landley <rob@landley.net>
parents:
538
diff
changeset
|
16 export CPUS=$(echo /sys/devices/system/cpu/cpu[0-9]* | wc -w) |
351
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
17 [ "$CPUS" -lt 1 ] && CPUS=1 |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
18 fi |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
19 |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
20 umask 022 |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
21 unset CFLAGS CXXFLAGS |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
22 |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
23 # Find/create directories |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
24 |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
25 TOP=`pwd` |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
26 export SOURCES="${TOP}/sources" |
638
2a2f5c529633
Move sources/packages to just packages, so we're not mixing run-time downloaded files with repository files.
Rob Landley <rob@landley.net>
parents:
615
diff
changeset
|
27 export SRCDIR="${TOP}/packages" |
351
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
28 export BUILD="${TOP}/build" |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
29 export HOSTTOOLS="${BUILD}/host" |
352
1782b77fae15
Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
30 |
608
ab76d4cdd392
Jean Wolter pointed out that running RECORD_COMMANDS=1 twice could create circular symlinks. Hopefully fixed now, and some related cleanups/clarifications.
Rob Landley <rob@landley.net>
parents:
597
diff
changeset
|
31 mkdir -p "${SRCDIR}" || dienow |
357
5c61d556fe0c
Make forkbomb.sh --fork work with RECORD_COMMANDS.
Rob Landley <rob@landley.net>
parents:
352
diff
changeset
|
32 |
615
7523d1f3b818
Some slight paranoia against multiple host-tools.sh runs that get interrupted in the middle. (Yeah, in general that's not guaranteed to work, but still...)
Rob Landley <rob@landley.net>
parents:
608
diff
changeset
|
33 # Retain old $PATH in case we re-run host-tools.sh with different options. |
7523d1f3b818
Some slight paranoia against multiple host-tools.sh runs that get interrupted in the middle. (Yeah, in general that's not guaranteed to work, but still...)
Rob Landley <rob@landley.net>
parents:
608
diff
changeset
|
34 |
7523d1f3b818
Some slight paranoia against multiple host-tools.sh runs that get interrupted in the middle. (Yeah, in general that's not guaranteed to work, but still...)
Rob Landley <rob@landley.net>
parents:
608
diff
changeset
|
35 export OLDPATH="$PATH" |
7523d1f3b818
Some slight paranoia against multiple host-tools.sh runs that get interrupted in the middle. (Yeah, in general that's not guaranteed to work, but still...)
Rob Landley <rob@landley.net>
parents:
608
diff
changeset
|
36 |
352
1782b77fae15
Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
37 # Adjust $PATH |
1782b77fae15
Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
38 |
1782b77fae15
Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
39 if [ "$PATH" != "$HOSTTOOLS" ] |
1782b77fae15
Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
40 then |
1782b77fae15
Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
41 if [ -f "$HOSTTOOLS/busybox" ] |
1782b77fae15
Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
42 then |
1782b77fae15
Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
43 PATH="$HOSTTOOLS" |
1782b77fae15
Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
44 else |
1782b77fae15
Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
45 PATH="${HOSTTOOLS}:$PATH" |
1782b77fae15
Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
46 fi |
1782b77fae15
Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
47 fi |
1782b77fae15
Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
48 |
608
ab76d4cdd392
Jean Wolter pointed out that running RECORD_COMMANDS=1 twice could create circular symlinks. Hopefully fixed now, and some related cleanups/clarifications.
Rob Landley <rob@landley.net>
parents:
597
diff
changeset
|
49 # Setup for $RECORD_COMMANDS |
ab76d4cdd392
Jean Wolter pointed out that running RECORD_COMMANDS=1 twice could create circular symlinks. Hopefully fixed now, and some related cleanups/clarifications.
Rob Landley <rob@landley.net>
parents:
597
diff
changeset
|
50 |
ab76d4cdd392
Jean Wolter pointed out that running RECORD_COMMANDS=1 twice could create circular symlinks. Hopefully fixed now, and some related cleanups/clarifications.
Rob Landley <rob@landley.net>
parents:
597
diff
changeset
|
51 # WRAPPY_LOGPATH is set unconditionally in case host-tools.sh needs to |
ab76d4cdd392
Jean Wolter pointed out that running RECORD_COMMANDS=1 twice could create circular symlinks. Hopefully fixed now, and some related cleanups/clarifications.
Rob Landley <rob@landley.net>
parents:
597
diff
changeset
|
52 # enable wrapping partway through its own build. Extra environment variables |
ab76d4cdd392
Jean Wolter pointed out that running RECORD_COMMANDS=1 twice could create circular symlinks. Hopefully fixed now, and some related cleanups/clarifications.
Rob Landley <rob@landley.net>
parents:
597
diff
changeset
|
53 # don't actually affect much, it's changing $PATH that changes behavior. |
ab76d4cdd392
Jean Wolter pointed out that running RECORD_COMMANDS=1 twice could create circular symlinks. Hopefully fixed now, and some related cleanups/clarifications.
Rob Landley <rob@landley.net>
parents:
597
diff
changeset
|
54 |
721
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
714
diff
changeset
|
55 [ -z "$STAGE_NAME" ] && STAGE_NAME=`echo $0 | sed 's@.*/\(.*\)\.sh@\1@'` |
608
ab76d4cdd392
Jean Wolter pointed out that running RECORD_COMMANDS=1 twice could create circular symlinks. Hopefully fixed now, and some related cleanups/clarifications.
Rob Landley <rob@landley.net>
parents:
597
diff
changeset
|
56 [ -z "$WRAPPY_LOGDIR" ] && WRAPPY_LOGDIR="$BUILD" |
357
5c61d556fe0c
Make forkbomb.sh --fork work with RECORD_COMMANDS.
Rob Landley <rob@landley.net>
parents:
352
diff
changeset
|
57 export WRAPPY_LOGPATH="$WRAPPY_LOGDIR/cmdlines.${STAGE_NAME}.setupfor" |
608
ab76d4cdd392
Jean Wolter pointed out that running RECORD_COMMANDS=1 twice could create circular symlinks. Hopefully fixed now, and some related cleanups/clarifications.
Rob Landley <rob@landley.net>
parents:
597
diff
changeset
|
58 if [ ! -z "$RECORD_COMMANDS" ] && [ -f "$BUILD/wrapdir/wrappy" ] |
352
1782b77fae15
Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
59 then |
1782b77fae15
Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
60 export WRAPPY_REALPATH="$PATH" |
1782b77fae15
Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
61 PATH="$BUILD/wrapdir" |
1782b77fae15
Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
62 fi |
1782b77fae15
Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
63 |
351
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
64 # Tell bash not to cache the $PATH because we modify it. Without this, bash |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
65 # won't find new executables added after startup. |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
66 set +h |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
67 |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
68 # Get target platform from first command line argument. |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
69 |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
70 if [ -z "$NO_ARCH" ] |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
71 then |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
72 ARCH_NAME="$1" |
705
04109e3f877e
Rename "details" to "settings" in sources/targets.
Rob Landley <rob@landley.net>
parents:
638
diff
changeset
|
73 if [ ! -f "${TOP}/sources/targets/${ARCH_NAME}/settings" ] |
351
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
74 then |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
75 echo "Supported architectures: " |
387
f0ceae67ebd0
Convert sources/configs/$ARCH files to sources/targets/$ARCH directories.
Rob Landley <rob@landley.net>
parents:
378
diff
changeset
|
76 (cd "${TOP}/sources/targets" && ls) |
351
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
77 exit 1 |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
78 fi |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
79 |
581
9dffdd74c186
More changes for initramfs and hw- targets with a base architecture.
Rob Landley <rob@landley.net>
parents:
578
diff
changeset
|
80 # Read the relevant config file. |
387
f0ceae67ebd0
Convert sources/configs/$ARCH files to sources/targets/$ARCH directories.
Rob Landley <rob@landley.net>
parents:
378
diff
changeset
|
81 |
578
715c94bd059e
Alas, bash won't leave variables set after a loop exits unless export every single one.
Rob Landley <rob@landley.net>
parents:
576
diff
changeset
|
82 ARCH="$ARCH_NAME" |
581
9dffdd74c186
More changes for initramfs and hw- targets with a base architecture.
Rob Landley <rob@landley.net>
parents:
578
diff
changeset
|
83 CONFIG_DIR="${TOP}/sources/targets" |
705
04109e3f877e
Rename "details" to "settings" in sources/targets.
Rob Landley <rob@landley.net>
parents:
638
diff
changeset
|
84 source "${CONFIG_DIR}/${ARCH}/settings" |
387
f0ceae67ebd0
Convert sources/configs/$ARCH files to sources/targets/$ARCH directories.
Rob Landley <rob@landley.net>
parents:
378
diff
changeset
|
85 |
351
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
86 # Which platform are we building for? |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
87 |
585
dd03aa5996e6
Two more $ARCH->$ARCH_NAME changes for hw- targets, add another example to config, and make hw-wrt610n build.
Rob Landley <rob@landley.net>
parents:
581
diff
changeset
|
88 export WORK="${BUILD}/temp-$ARCH_NAME" |
538
808ba1d186ac
Setup can delete the temporary directory now, nothing persistent in it.
Rob Landley <rob@landley.net>
parents:
513
diff
changeset
|
89 rm -rf "${WORK}" |
553
80f3356577fc
Move kernel building from mini-native to package-mini-native in preparation for initramfs packaging option.
Rob Landley <rob@landley.net>
parents:
538
diff
changeset
|
90 mkdir -p "${WORK}" || dienow |
387
f0ceae67ebd0
Convert sources/configs/$ARCH files to sources/targets/$ARCH directories.
Rob Landley <rob@landley.net>
parents:
378
diff
changeset
|
91 |
351
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
92 # Say "unknown" in two different ways so it doesn't assume we're NOT |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
93 # cross compiling when the host and target are the same processor. (If host |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
94 # and target match, the binutils/gcc/make builds won't use the cross compiler |
711
20ba34b54140
Rename mini-native.sh to root-filesystem.sh, since that's what it builds.
Rob Landley <rob@landley.net>
parents:
709
diff
changeset
|
95 # during root-filesystem.sh, and the host compiler links binaries against the |
351
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
96 # wrong libc.) |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
97 [ -z "$CROSS_HOST" ] && export CROSS_HOST=`uname -m`-walrus-linux |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
98 [ -z "$CROSS_TARGET" ] && export CROSS_TARGET=${ARCH}-unknown-linux |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
99 |
714
db04bd3c11e0
First pass at canadian cross toolchain build. Result doesn't actually work yet, but it builds.
Rob Landley <rob@landley.net>
parents:
711
diff
changeset
|
100 # Override these to perform a canadian cross in root-filesystem.sh |
db04bd3c11e0
First pass at canadian cross toolchain build. Result doesn't actually work yet, but it builds.
Rob Landley <rob@landley.net>
parents:
711
diff
changeset
|
101 |
726
db5cb617339a
Centrialize BUILD_STATIC and make it apply to more of root-filesystem.sh
Rob Landley <rob@landley.net>
parents:
721
diff
changeset
|
102 if [ -z "$FROM_ARCH" ] |
db5cb617339a
Centrialize BUILD_STATIC and make it apply to more of root-filesystem.sh
Rob Landley <rob@landley.net>
parents:
721
diff
changeset
|
103 then |
db5cb617339a
Centrialize BUILD_STATIC and make it apply to more of root-filesystem.sh
Rob Landley <rob@landley.net>
parents:
721
diff
changeset
|
104 FROM_ARCH="${ARCH}" |
729
1d2921810860
Fix the canadian cross stuff for arches that override CROSS_TARGET (ala ppc440)
Rob Landley <rob@landley.net>
parents:
726
diff
changeset
|
105 FROM_HOST="${CROSS_TARGET}" |
726
db5cb617339a
Centrialize BUILD_STATIC and make it apply to more of root-filesystem.sh
Rob Landley <rob@landley.net>
parents:
721
diff
changeset
|
106 else |
721
f0ede6d6c952
Do canadian cross static toolchains properly, via buildall.sh.
Rob Landley <rob@landley.net>
parents:
714
diff
changeset
|
107 [ -z "$PROGRAM_PREFIX" ] && PROGRAM_PREFIX="${ARCH}-" |
726
db5cb617339a
Centrialize BUILD_STATIC and make it apply to more of root-filesystem.sh
Rob Landley <rob@landley.net>
parents:
721
diff
changeset
|
108 fi |
714
db04bd3c11e0
First pass at canadian cross toolchain build. Result doesn't actually work yet, but it builds.
Rob Landley <rob@landley.net>
parents:
711
diff
changeset
|
109 |
351
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
110 # Setup directories and add the cross compiler to the start of the path. |
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
111 |
711
20ba34b54140
Rename mini-native.sh to root-filesystem.sh, since that's what it builds.
Rob Landley <rob@landley.net>
parents:
709
diff
changeset
|
112 [ -z "$NATIVE_ROOT" ] && export NATIVE_ROOT="${BUILD}/root-filesystem-$ARCH" |
581
9dffdd74c186
More changes for initramfs and hw- targets with a base architecture.
Rob Landley <rob@landley.net>
parents:
578
diff
changeset
|
113 export PATH="${BUILD}/cross-compiler-$ARCH/bin:$PATH" |
714
db04bd3c11e0
First pass at canadian cross toolchain build. Result doesn't actually work yet, but it builds.
Rob Landley <rob@landley.net>
parents:
711
diff
changeset
|
114 [ "$FROM_ARCH" != "$ARCH" ] && |
db04bd3c11e0
First pass at canadian cross toolchain build. Result doesn't actually work yet, but it builds.
Rob Landley <rob@landley.net>
parents:
711
diff
changeset
|
115 PATH="${BUILD}/cross-compiler-${FROM_ARCH}/bin:$PATH" |
576
036dbe218036
Add BASE_ARCH support, so a hardware architecture can specify a base architecture and just provide a different kernel.
Rob Landley <rob@landley.net>
parents:
553
diff
changeset
|
116 |
036dbe218036
Add BASE_ARCH support, so a hardware architecture can specify a base architecture and just provide a different kernel.
Rob Landley <rob@landley.net>
parents:
553
diff
changeset
|
117 if [ ! -z "${NATIVE_TOOLSDIR}" ] |
036dbe218036
Add BASE_ARCH support, so a hardware architecture can specify a base architecture and just provide a different kernel.
Rob Landley <rob@landley.net>
parents:
553
diff
changeset
|
118 then |
597
3d67228ceb1e
Rename $NATIVE to $NATIVE_ROOT and allow it to be supplied externally so system-image.sh can package up an arbitrary native root filesystem source dir.
Rob Landley <rob@landley.net>
parents:
585
diff
changeset
|
119 TOOLS="${NATIVE_ROOT}/tools" |
576
036dbe218036
Add BASE_ARCH support, so a hardware architecture can specify a base architecture and just provide a different kernel.
Rob Landley <rob@landley.net>
parents:
553
diff
changeset
|
120 else |
597
3d67228ceb1e
Rename $NATIVE to $NATIVE_ROOT and allow it to be supplied externally so system-image.sh can package up an arbitrary native root filesystem source dir.
Rob Landley <rob@landley.net>
parents:
585
diff
changeset
|
121 TOOLS="${NATIVE_ROOT}/usr" |
576
036dbe218036
Add BASE_ARCH support, so a hardware architecture can specify a base architecture and just provide a different kernel.
Rob Landley <rob@landley.net>
parents:
553
diff
changeset
|
122 fi |
351
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
123 else |
576
036dbe218036
Add BASE_ARCH support, so a hardware architecture can specify a base architecture and just provide a different kernel.
Rob Landley <rob@landley.net>
parents:
553
diff
changeset
|
124 HW_ARCH=host |
351
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
125 export WORK="${BUILD}/host-temp" |
553
80f3356577fc
Move kernel building from mini-native to package-mini-native in preparation for initramfs packaging option.
Rob Landley <rob@landley.net>
parents:
538
diff
changeset
|
126 mkdir -p "${WORK}" || dienow |
351
7f529baf0b57
Reorganize include.sh to put config options at the top, minor cleanups.
Rob Landley <rob@landley.net>
parents:
340
diff
changeset
|
127 fi |
709
64cc63ad26ce
Add BUILD_VERBOSE config option.
Rob Landley <rob@landley.net>
parents:
705
diff
changeset
|
128 |
726
db5cb617339a
Centrialize BUILD_STATIC and make it apply to more of root-filesystem.sh
Rob Landley <rob@landley.net>
parents:
721
diff
changeset
|
129 |
db5cb617339a
Centrialize BUILD_STATIC and make it apply to more of root-filesystem.sh
Rob Landley <rob@landley.net>
parents:
721
diff
changeset
|
130 [ ! -z "$BUILD_VERBOSE" ] && VERBOSITY="V=1" |
db5cb617339a
Centrialize BUILD_STATIC and make it apply to more of root-filesystem.sh
Rob Landley <rob@landley.net>
parents:
721
diff
changeset
|
131 |
db5cb617339a
Centrialize BUILD_STATIC and make it apply to more of root-filesystem.sh
Rob Landley <rob@landley.net>
parents:
721
diff
changeset
|
132 # This is an if instead of && so the exit code of include.sh is reliably 0 |
db5cb617339a
Centrialize BUILD_STATIC and make it apply to more of root-filesystem.sh
Rob Landley <rob@landley.net>
parents:
721
diff
changeset
|
133 if [ ! -z "$BUILD_STATIC" ] |
709
64cc63ad26ce
Add BUILD_VERBOSE config option.
Rob Landley <rob@landley.net>
parents:
705
diff
changeset
|
134 then |
726
db5cb617339a
Centrialize BUILD_STATIC and make it apply to more of root-filesystem.sh
Rob Landley <rob@landley.net>
parents:
721
diff
changeset
|
135 STATIC_FLAGS="--static" |
709
64cc63ad26ce
Add BUILD_VERBOSE config option.
Rob Landley <rob@landley.net>
parents:
705
diff
changeset
|
136 fi |