Mercurial > hg > aboriginal
annotate mini-native.sh @ 414:42faea138734
Save the expanded .config files for uClibc and linux in each build/temp-$ARCH dir after the build.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 19 Oct 2008 02:47:44 -0500 |
parents | b80a0ed1837d |
children | 6dd7e870b1d4 |
rev | line source |
---|---|
177 | 1 #!/bin/bash |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
2 |
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
3 # Get lots of predefined environment variables and shell functions. |
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
4 |
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
5 source include.sh |
96
137ba51ee993
Delete output directories on re-run, teach build to log and build multiple
Rob Landley <rob@landley.net>
parents:
85
diff
changeset
|
6 |
395
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
7 # Purple. And why not? |
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
8 echo -e "\e[35m" |
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
9 |
96
137ba51ee993
Delete output directories on re-run, teach build to log and build multiple
Rob Landley <rob@landley.net>
parents:
85
diff
changeset
|
10 rm -rf "${NATIVE}" |
137ba51ee993
Delete output directories on re-run, teach build to log and build multiple
Rob Landley <rob@landley.net>
parents:
85
diff
changeset
|
11 |
331
d2820523ee06
When doing BUILD_SHORT (without development tools), use / instead of /tools.
Rob Landley <rob@landley.net>
parents:
326
diff
changeset
|
12 if [ -z "${BUILD_SHORT}" ] |
d2820523ee06
When doing BUILD_SHORT (without development tools), use / instead of /tools.
Rob Landley <rob@landley.net>
parents:
326
diff
changeset
|
13 then |
d2820523ee06
When doing BUILD_SHORT (without development tools), use / instead of /tools.
Rob Landley <rob@landley.net>
parents:
326
diff
changeset
|
14 TOOLS="${NATIVE}/tools" |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
15 |
331
d2820523ee06
When doing BUILD_SHORT (without development tools), use / instead of /tools.
Rob Landley <rob@landley.net>
parents:
326
diff
changeset
|
16 # Tell the wrapper script where to find the dynamic linker. |
d2820523ee06
When doing BUILD_SHORT (without development tools), use / instead of /tools.
Rob Landley <rob@landley.net>
parents:
326
diff
changeset
|
17 export UCLIBC_DYNAMIC_LINKER=/tools/lib/ld-uClibc.so.0 |
d2820523ee06
When doing BUILD_SHORT (without development tools), use / instead of /tools.
Rob Landley <rob@landley.net>
parents:
326
diff
changeset
|
18 export UCLIBC_RPATH=/tools/lib |
d2820523ee06
When doing BUILD_SHORT (without development tools), use / instead of /tools.
Rob Landley <rob@landley.net>
parents:
326
diff
changeset
|
19 else |
395
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
20 TOOLS="${NATIVE}/usr" && |
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
21 mkdir -p "$TOOLS" && |
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
22 mkdir "${NATIVE}"/{tmp,proc,sys,dev,etc} && |
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
23 ln -s usr/bin "${NATIVE}/bin" && |
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
24 ln -s usr/sbin "${NATIVE}/sbin" && |
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
25 ln -s usr/lib "${NATIVE}/lib" || dienow |
331
d2820523ee06
When doing BUILD_SHORT (without development tools), use / instead of /tools.
Rob Landley <rob@landley.net>
parents:
326
diff
changeset
|
26 fi |
395
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
27 |
331
d2820523ee06
When doing BUILD_SHORT (without development tools), use / instead of /tools.
Rob Landley <rob@landley.net>
parents:
326
diff
changeset
|
28 mkdir -p "${TOOLS}/bin" || dienow |
63
89cf9497824e
Teach the native build about ld-uClibc.so.0 can living in /tools.
Rob Landley <rob@landley.net>
parents:
62
diff
changeset
|
29 |
50
5aeba79b8f5f
Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents:
46
diff
changeset
|
30 # Build and install Linux kernel. |
5aeba79b8f5f
Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents:
46
diff
changeset
|
31 |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
32 setupfor linux |
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
33 # Install Linux kernel headers (for use by uClibc). |
278
f878f79763c7
Use make -j to install kernel headers.
Rob Landley <rob@landley.net>
parents:
223
diff
changeset
|
34 make headers_install -j "$CPUS" ARCH="${KARCH}" INSTALL_HDR_PATH="${TOOLS}" && |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
35 # build bootable kernel for target |
387
f0ceae67ebd0
Convert sources/configs/$ARCH files to sources/targets/$ARCH directories.
Rob Landley <rob@landley.net>
parents:
374
diff
changeset
|
36 make ARCH="${KARCH}" KCONFIG_ALLCONFIG="${CONFIG_DIR}/miniconfig-linux" \ |
f0ceae67ebd0
Convert sources/configs/$ARCH files to sources/targets/$ARCH directories.
Rob Landley <rob@landley.net>
parents:
374
diff
changeset
|
37 allnoconfig && |
414
42faea138734
Save the expanded .config files for uClibc and linux in each build/temp-$ARCH dir after the build.
Rob Landley <rob@landley.net>
parents:
409
diff
changeset
|
38 cp .config ../config-linux && |
182
fc827ab6166f
Autodetect number of processors and feed appropriate -j to make.
Rob Landley <rob@landley.net>
parents:
177
diff
changeset
|
39 make -j $CPUS ARCH="${KARCH}" CROSS_COMPILE="${ARCH}-" && |
306
358ef8a27085
Break up run-$ARCH.sh, move more temp files into temp dir, fix deletion logic.
Rob Landley <rob@landley.net>
parents:
301
diff
changeset
|
40 cp "${KERNEL_PATH}" "${WORK}/zImage-${ARCH}" && |
301
309b574a5059
Redo the $CLEANUP logic to a cleanup function in include.sh (meaning if a
Rob Landley <rob@landley.net>
parents:
295
diff
changeset
|
41 cd .. |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
42 |
301
309b574a5059
Redo the $CLEANUP logic to a cleanup function in include.sh (meaning if a
Rob Landley <rob@landley.net>
parents:
295
diff
changeset
|
43 cleanup linux |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
44 |
50
5aeba79b8f5f
Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents:
46
diff
changeset
|
45 # Build and install uClibc. (We could just copy the one from the compiler |
5aeba79b8f5f
Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents:
46
diff
changeset
|
46 # toolchain, but this is cleaner.) |
5aeba79b8f5f
Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents:
46
diff
changeset
|
47 |
5aeba79b8f5f
Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents:
46
diff
changeset
|
48 setupfor uClibc |
400
f60b1189c0ea
Teach build to use recent uClibc snapshot when USE_UNSTABLE=uClibc
Rob Landley <rob@landley.net>
parents:
395
diff
changeset
|
49 if unstable uClibc |
f60b1189c0ea
Teach build to use recent uClibc snapshot when USE_UNSTABLE=uClibc
Rob Landley <rob@landley.net>
parents:
395
diff
changeset
|
50 then |
f60b1189c0ea
Teach build to use recent uClibc snapshot when USE_UNSTABLE=uClibc
Rob Landley <rob@landley.net>
parents:
395
diff
changeset
|
51 CONFIGFILE=miniconfig-alt-uClibc |
f60b1189c0ea
Teach build to use recent uClibc snapshot when USE_UNSTABLE=uClibc
Rob Landley <rob@landley.net>
parents:
395
diff
changeset
|
52 BUILDIT="install -j $CPUS" |
f60b1189c0ea
Teach build to use recent uClibc snapshot when USE_UNSTABLE=uClibc
Rob Landley <rob@landley.net>
parents:
395
diff
changeset
|
53 else |
f60b1189c0ea
Teach build to use recent uClibc snapshot when USE_UNSTABLE=uClibc
Rob Landley <rob@landley.net>
parents:
395
diff
changeset
|
54 CONFIGFILE=miniconfig-uClibc |
409 | 55 BUILDIT="all install_runtime install_dev utils" |
400
f60b1189c0ea
Teach build to use recent uClibc snapshot when USE_UNSTABLE=uClibc
Rob Landley <rob@landley.net>
parents:
395
diff
changeset
|
56 fi |
f60b1189c0ea
Teach build to use recent uClibc snapshot when USE_UNSTABLE=uClibc
Rob Landley <rob@landley.net>
parents:
395
diff
changeset
|
57 make KCONFIG_ALLCONFIG="${CONFIG_DIR}"/$CONFIGFILE allnoconfig && |
68
fd2cf40fcd02
Install the uClibc utils install into /tools/bin. (Including readelf.)
Rob Landley <rob@landley.net>
parents:
66
diff
changeset
|
58 make CROSS="${ARCH}-" KERNEL_HEADERS="${TOOLS}/include" PREFIX="${TOOLS}/" \ |
400
f60b1189c0ea
Teach build to use recent uClibc snapshot when USE_UNSTABLE=uClibc
Rob Landley <rob@landley.net>
parents:
395
diff
changeset
|
59 RUNTIME_PREFIX=/ DEVEL_PREFIX=/ UCLIBC_LDSO_NAME=ld-uClibc $BUILDIT && |
68
fd2cf40fcd02
Install the uClibc utils install into /tools/bin. (Including readelf.)
Rob Landley <rob@landley.net>
parents:
66
diff
changeset
|
60 # utils_install wants to put stuff in usr/bin instead of bin. |
400
f60b1189c0ea
Teach build to use recent uClibc snapshot when USE_UNSTABLE=uClibc
Rob Landley <rob@landley.net>
parents:
395
diff
changeset
|
61 # make BLAH=blah utils |
f60b1189c0ea
Teach build to use recent uClibc snapshot when USE_UNSTABLE=uClibc
Rob Landley <rob@landley.net>
parents:
395
diff
changeset
|
62 # install -m 755 utils/{readelf,ldd,ldconfig} "${TOOLS}/bin" && |
301
309b574a5059
Redo the $CLEANUP logic to a cleanup function in include.sh (meaning if a
Rob Landley <rob@landley.net>
parents:
295
diff
changeset
|
63 cd .. |
50
5aeba79b8f5f
Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents:
46
diff
changeset
|
64 |
301
309b574a5059
Redo the $CLEANUP logic to a cleanup function in include.sh (meaning if a
Rob Landley <rob@landley.net>
parents:
295
diff
changeset
|
65 cleanup uClibc |
50
5aeba79b8f5f
Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents:
46
diff
changeset
|
66 |
311
a791ca629d9c
Upgrade to toybox-0.0.5 and linux-2.6.25-rc7. Remove use of perl in the kernel
Rob Landley <rob@landley.net>
parents:
310
diff
changeset
|
67 # Build and install toybox |
a791ca629d9c
Upgrade to toybox-0.0.5 and linux-2.6.25-rc7. Remove use of perl in the kernel
Rob Landley <rob@landley.net>
parents:
310
diff
changeset
|
68 |
a791ca629d9c
Upgrade to toybox-0.0.5 and linux-2.6.25-rc7. Remove use of perl in the kernel
Rob Landley <rob@landley.net>
parents:
310
diff
changeset
|
69 setupfor toybox |
a791ca629d9c
Upgrade to toybox-0.0.5 and linux-2.6.25-rc7. Remove use of perl in the kernel
Rob Landley <rob@landley.net>
parents:
310
diff
changeset
|
70 make defconfig && |
389
becb1084a427
Add USE_TOYBOX option (enabled by default), to use toybox commands where
Rob Landley <rob@landley.net>
parents:
387
diff
changeset
|
71 if [ -z "$USE_TOYBOX" ] |
becb1084a427
Add USE_TOYBOX option (enabled by default), to use toybox commands where
Rob Landley <rob@landley.net>
parents:
387
diff
changeset
|
72 then |
becb1084a427
Add USE_TOYBOX option (enabled by default), to use toybox commands where
Rob Landley <rob@landley.net>
parents:
387
diff
changeset
|
73 make CROSS="${ARCH}-" && |
becb1084a427
Add USE_TOYBOX option (enabled by default), to use toybox commands where
Rob Landley <rob@landley.net>
parents:
387
diff
changeset
|
74 cp toybox "$TOOLS/bin" && |
becb1084a427
Add USE_TOYBOX option (enabled by default), to use toybox commands where
Rob Landley <rob@landley.net>
parents:
387
diff
changeset
|
75 ln -s toybox "$TOOLS/bin/patch" && |
becb1084a427
Add USE_TOYBOX option (enabled by default), to use toybox commands where
Rob Landley <rob@landley.net>
parents:
387
diff
changeset
|
76 ln -s toybox "$TOOLS/bin/oneit" && |
becb1084a427
Add USE_TOYBOX option (enabled by default), to use toybox commands where
Rob Landley <rob@landley.net>
parents:
387
diff
changeset
|
77 cd .. |
becb1084a427
Add USE_TOYBOX option (enabled by default), to use toybox commands where
Rob Landley <rob@landley.net>
parents:
387
diff
changeset
|
78 else |
becb1084a427
Add USE_TOYBOX option (enabled by default), to use toybox commands where
Rob Landley <rob@landley.net>
parents:
387
diff
changeset
|
79 make install_flat PREFIX="${TOOLS}"/bin CROSS="${ARCH}-" && |
becb1084a427
Add USE_TOYBOX option (enabled by default), to use toybox commands where
Rob Landley <rob@landley.net>
parents:
387
diff
changeset
|
80 rm "${TOOLS}"/bin/sh && # Bash won't install if this exists. |
becb1084a427
Add USE_TOYBOX option (enabled by default), to use toybox commands where
Rob Landley <rob@landley.net>
parents:
387
diff
changeset
|
81 cd .. |
becb1084a427
Add USE_TOYBOX option (enabled by default), to use toybox commands where
Rob Landley <rob@landley.net>
parents:
387
diff
changeset
|
82 fi |
311
a791ca629d9c
Upgrade to toybox-0.0.5 and linux-2.6.25-rc7. Remove use of perl in the kernel
Rob Landley <rob@landley.net>
parents:
310
diff
changeset
|
83 |
a791ca629d9c
Upgrade to toybox-0.0.5 and linux-2.6.25-rc7. Remove use of perl in the kernel
Rob Landley <rob@landley.net>
parents:
310
diff
changeset
|
84 cleanup toybox |
a791ca629d9c
Upgrade to toybox-0.0.5 and linux-2.6.25-rc7. Remove use of perl in the kernel
Rob Landley <rob@landley.net>
parents:
310
diff
changeset
|
85 |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
86 # Build and install busybox |
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
87 |
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
88 setupfor busybox |
368
2c5b02b47c8e
Switch to building defconfig busybox. (Keep trimmed config anyway.)
Rob Landley <rob@landley.net>
parents:
358
diff
changeset
|
89 #make allnoconfig KCONFIG_ALLCONFIG="${SOURCES}/config-busybox" .config && |
2c5b02b47c8e
Switch to building defconfig busybox. (Keep trimmed config anyway.)
Rob Landley <rob@landley.net>
parents:
358
diff
changeset
|
90 make defconfig && |
358
9829e6cc8637
Update busybox from 1.2.2 to 1.11.0. Toybox i still used for oneit and patch,
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
91 make -j $CPUS CROSS_COMPILE="${ARCH}-" && |
9829e6cc8637
Update busybox from 1.2.2 to 1.11.0. Toybox i still used for oneit and patch,
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
92 make busybox.links && |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
93 cp busybox "${TOOLS}/bin" |
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
94 [ $? -ne 0 ] && dienow |
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
95 for i in $(sed 's@.*/@@' busybox.links) |
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
96 do |
358
9829e6cc8637
Update busybox from 1.2.2 to 1.11.0. Toybox i still used for oneit and patch,
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
97 ln -s busybox "${TOOLS}/bin/$i" # || dienow |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
98 done |
301
309b574a5059
Redo the $CLEANUP logic to a cleanup function in include.sh (meaning if a
Rob Landley <rob@landley.net>
parents:
295
diff
changeset
|
99 cd .. |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
100 |
301
309b574a5059
Redo the $CLEANUP logic to a cleanup function in include.sh (meaning if a
Rob Landley <rob@landley.net>
parents:
295
diff
changeset
|
101 cleanup busybox |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
102 |
395
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
103 # Copy qemu setup script and so on. |
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
104 |
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
105 cp -r "${SOURCES}/native/." "${TOOLS}/" || dienow |
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
106 |
310
3a1ae92d6f6a
Teach BUILD_SHORT to remove include files (saving ~5 megs), and move the
Rob Landley <rob@landley.net>
parents:
306
diff
changeset
|
107 if [ ! -z "${BUILD_SHORT}" ] |
50
5aeba79b8f5f
Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents:
46
diff
changeset
|
108 then |
395
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
109 |
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
110 sed -i -e 's@/tools/@/usr/@g' -e 's@/bin/bash@/bin/ash@' \ |
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
111 "${TOOLS}/bin/qemu-setup.sh" || dienow |
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
112 |
331
d2820523ee06
When doing BUILD_SHORT (without development tools), use / instead of /tools.
Rob Landley <rob@landley.net>
parents:
326
diff
changeset
|
113 # If you want to use tinycc, you need to keep the headers but don't need gcc. |
395
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
114 if [ "$BUILD_SHORT" != "headers" ] |
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
115 then |
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
116 rm -rf "${TOOLS}"/include && |
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
117 rm -rf "${TOOLS}/src" || dienow |
c2b290c1df40
Upgrade BUILD_SHORT to make a small busybox+uClibc system in /usr, with top level symlinks (/bin, /lib, etc) and adjustments to boot script and run-emulator.
Rob Landley <rob@landley.net>
parents:
390
diff
changeset
|
118 fi |
310
3a1ae92d6f6a
Teach BUILD_SHORT to remove include files (saving ~5 megs), and move the
Rob Landley <rob@landley.net>
parents:
306
diff
changeset
|
119 else |
50
5aeba79b8f5f
Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents:
46
diff
changeset
|
120 |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
121 # Build and install native binutils |
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
122 |
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
123 setupfor binutils build-binutils |
62
4125b672b00c
Get i686 cross-compiling to work like armv4l cross-compiling by lying to
Rob Landley <rob@landley.net>
parents:
53
diff
changeset
|
124 CC="${ARCH}-gcc" AR="${ARCH}-ar" "${CURSRC}/configure" --prefix="${TOOLS}" \ |
4125b672b00c
Get i686 cross-compiling to work like armv4l cross-compiling by lying to
Rob Landley <rob@landley.net>
parents:
53
diff
changeset
|
125 --build="${CROSS_HOST}" --host="${CROSS_TARGET}" --target="${CROSS_TARGET}" \ |
4125b672b00c
Get i686 cross-compiling to work like armv4l cross-compiling by lying to
Rob Landley <rob@landley.net>
parents:
53
diff
changeset
|
126 --disable-nls --disable-shared --disable-multilib --program-prefix= \ |
4125b672b00c
Get i686 cross-compiling to work like armv4l cross-compiling by lying to
Rob Landley <rob@landley.net>
parents:
53
diff
changeset
|
127 $BINUTILS_FLAGS && |
293
cdd26f8acc35
Update to gcc 4.1.2->4.2.2. Still doesn't fix the internal compiler error
Rob Landley <rob@landley.net>
parents:
284
diff
changeset
|
128 make -j $CPUS configure-host && |
182
fc827ab6166f
Autodetect number of processors and feed appropriate -j to make.
Rob Landley <rob@landley.net>
parents:
177
diff
changeset
|
129 make -j $CPUS && |
293
cdd26f8acc35
Update to gcc 4.1.2->4.2.2. Still doesn't fix the internal compiler error
Rob Landley <rob@landley.net>
parents:
284
diff
changeset
|
130 make -j $CPUS install && |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
131 cd .. && |
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
132 mkdir -p "${TOOLS}/include" && |
301
309b574a5059
Redo the $CLEANUP logic to a cleanup function in include.sh (meaning if a
Rob Landley <rob@landley.net>
parents:
295
diff
changeset
|
133 cp binutils/include/libiberty.h "${TOOLS}/include" |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
134 |
301
309b574a5059
Redo the $CLEANUP logic to a cleanup function in include.sh (meaning if a
Rob Landley <rob@landley.net>
parents:
295
diff
changeset
|
135 cleanup binutils build-binutils |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
136 |
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
137 # Build and install native gcc, with c++ support this time. |
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
138 |
223
f6973e090c4f
Update mini-native for the new tarball strategy.
Rob Landley <rob@landley.net>
parents:
221
diff
changeset
|
139 setupfor gcc-core build-gcc |
f6973e090c4f
Update mini-native for the new tarball strategy.
Rob Landley <rob@landley.net>
parents:
221
diff
changeset
|
140 setupfor gcc-g++ build-gcc gcc-core |
50
5aeba79b8f5f
Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents:
46
diff
changeset
|
141 # GCC tries to "help out in the kitchen" by screwing up the linux include |
5aeba79b8f5f
Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents:
46
diff
changeset
|
142 # files. Cut out those bits with sed and throw them away. |
295
bbfb6e7bf7e6
Add first pass at Super Hitachi platform.
Rob Landley <rob@landley.net>
parents:
294
diff
changeset
|
143 sed -i 's@^STMP_FIX.*@@' "${CURSRC}/gcc/Makefile.in" && |
46
eeddef87a747
Still doesn't work, but doesn't work better.
Rob Landley <rob@landley.net>
parents:
44
diff
changeset
|
144 # GCC has some deep assumptions about the name of the cross-compiler it should |
eeddef87a747
Still doesn't work, but doesn't work better.
Rob Landley <rob@landley.net>
parents:
44
diff
changeset
|
145 # be using. These assumptions are wrong, and lots of redundant corrections |
294
87df194d555d
Back to gcc 4.1.2 until I find a large enough rock to fix the soft-float thing.
Rob Landley <rob@landley.net>
parents:
293
diff
changeset
|
146 # are required to make it stop. |
87df194d555d
Back to gcc 4.1.2 until I find a large enough rock to fix the soft-float thing.
Rob Landley <rob@landley.net>
parents:
293
diff
changeset
|
147 CC="${ARCH}-gcc" GCC_FOR_TARGET="${ARCH}-gcc" CC_FOR_TARGET="${ARCH}-gcc" \ |
87df194d555d
Back to gcc 4.1.2 until I find a large enough rock to fix the soft-float thing.
Rob Landley <rob@landley.net>
parents:
293
diff
changeset
|
148 AR="${ARCH}-ar" AR_FOR_TARGET="${ARCH}-ar" AS="${ARCH}-as" LD="${ARCH}-ld" \ |
87df194d555d
Back to gcc 4.1.2 until I find a large enough rock to fix the soft-float thing.
Rob Landley <rob@landley.net>
parents:
293
diff
changeset
|
149 NM="${ARCH}-nm" NM_FOR_TARGET="${ARCH}-nm" \ |
87df194d555d
Back to gcc 4.1.2 until I find a large enough rock to fix the soft-float thing.
Rob Landley <rob@landley.net>
parents:
293
diff
changeset
|
150 "${CURSRC}/configure" --prefix="${TOOLS}" --disable-multilib \ |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
151 --build="${CROSS_HOST}" --host="${CROSS_TARGET}" --target="${CROSS_TARGET}" \ |
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
152 --enable-long-long --enable-c99 --enable-shared --enable-threads=posix \ |
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
153 --enable-__cxa_atexit --disable-nls --enable-languages=c,c++ \ |
293
cdd26f8acc35
Update to gcc 4.1.2->4.2.2. Still doesn't fix the internal compiler error
Rob Landley <rob@landley.net>
parents:
284
diff
changeset
|
154 --disable-libstdcxx-pch --program-prefix="" $GCC_FLAGS && |
cdd26f8acc35
Update to gcc 4.1.2->4.2.2. Still doesn't fix the internal compiler error
Rob Landley <rob@landley.net>
parents:
284
diff
changeset
|
155 make -j $CPUS configure-host && |
182
fc827ab6166f
Autodetect number of processors and feed appropriate -j to make.
Rob Landley <rob@landley.net>
parents:
177
diff
changeset
|
156 make -j $CPUS all-gcc && |
293
cdd26f8acc35
Update to gcc 4.1.2->4.2.2. Still doesn't fix the internal compiler error
Rob Landley <rob@landley.net>
parents:
284
diff
changeset
|
157 make -j $CPUS install-gcc && |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
158 ln -s gcc "${TOOLS}/bin/cc" && |
301
309b574a5059
Redo the $CLEANUP logic to a cleanup function in include.sh (meaning if a
Rob Landley <rob@landley.net>
parents:
295
diff
changeset
|
159 cd .. |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
160 |
301
309b574a5059
Redo the $CLEANUP logic to a cleanup function in include.sh (meaning if a
Rob Landley <rob@landley.net>
parents:
295
diff
changeset
|
161 cleanup gcc-core build-gcc |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
162 |
301
309b574a5059
Redo the $CLEANUP logic to a cleanup function in include.sh (meaning if a
Rob Landley <rob@landley.net>
parents:
295
diff
changeset
|
163 # Move the gcc internal libraries and headers somewhere sane, and |
309b574a5059
Redo the $CLEANUP logic to a cleanup function in include.sh (meaning if a
Rob Landley <rob@landley.net>
parents:
295
diff
changeset
|
164 # build and install gcc wrapper script. |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
165 |
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
166 mkdir -p "${TOOLS}"/gcc && |
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
167 mv "${TOOLS}"/lib/gcc/*/*/include "${TOOLS}"/gcc/include && |
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
168 mv "${TOOLS}"/lib/gcc/*/* "${TOOLS}"/gcc/lib && |
390
a9a9eee9e620
Teach the wrapper script to do the libgcc_s --as-needed stuff when
Rob Landley <rob@landley.net>
parents:
389
diff
changeset
|
169 mv "${TOOLS}/bin/gcc" "${TOOLS}/bin/rawgcc" && |
a9a9eee9e620
Teach the wrapper script to do the libgcc_s --as-needed stuff when
Rob Landley <rob@landley.net>
parents:
389
diff
changeset
|
170 "${ARCH}-gcc" "${SOURCES}"/toys/gcc-uClibc.c -Os -s -o "${TOOLS}/bin/gcc" \ |
a9a9eee9e620
Teach the wrapper script to do the libgcc_s --as-needed stuff when
Rob Landley <rob@landley.net>
parents:
389
diff
changeset
|
171 -DGCC_UNWRAPPED_NAME='"rawgcc"' -DGIMME_AN_S |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
172 |
301
309b574a5059
Redo the $CLEANUP logic to a cleanup function in include.sh (meaning if a
Rob Landley <rob@landley.net>
parents:
295
diff
changeset
|
173 cleanup "${TOOLS}"/{lib/gcc,gcc/lib/install-tools} |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
174 |
52
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
175 # Build and install make |
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
176 |
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
177 setupfor make |
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
178 CC="${ARCH}-gcc" ./configure --prefix="${TOOLS}" --build="${CROSS_HOST}" \ |
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
179 --host="${CROSS_TARGET}" && |
182
fc827ab6166f
Autodetect number of processors and feed appropriate -j to make.
Rob Landley <rob@landley.net>
parents:
177
diff
changeset
|
180 make -j $CPUS && |
293
cdd26f8acc35
Update to gcc 4.1.2->4.2.2. Still doesn't fix the internal compiler error
Rob Landley <rob@landley.net>
parents:
284
diff
changeset
|
181 make -j $CPUS install && |
301
309b574a5059
Redo the $CLEANUP logic to a cleanup function in include.sh (meaning if a
Rob Landley <rob@landley.net>
parents:
295
diff
changeset
|
182 cd .. |
52
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
183 |
301
309b574a5059
Redo the $CLEANUP logic to a cleanup function in include.sh (meaning if a
Rob Landley <rob@landley.net>
parents:
295
diff
changeset
|
184 cleanup make |
52
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
185 |
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
186 # Build and install bash. (Yes, this is an old version. I prefer it.) |
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
187 # I plan to replace it with toysh anyway. |
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
188 |
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
189 setupfor bash |
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
190 # wire around some tests ./configure can't run when cross-compiling. |
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
191 cat > config.cache << EOF && |
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
192 ac_cv_func_setvbuf_reversed=no |
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
193 bash_cv_sys_named_pipes=yes |
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
194 bash_cv_have_mbstate_t=yes |
66
57f77c25b39d
Hit uClibc build with a large rock so it stops inserting hardwired paths in
Rob Landley <rob@landley.net>
parents:
63
diff
changeset
|
195 bash_cv_getenv_redef=no |
52
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
196 EOF |
157
dff36fab9e7e
Of course there's a bug. (The ranlib fix was apparently a NOP, this should
Rob Landley <rob@landley.net>
parents:
155
diff
changeset
|
197 CC="${ARCH}-gcc" RANLIB="${ARCH}-ranlib" ./configure --prefix="${TOOLS}" \ |
153
106f3875f606
The bash build continues to be stupid. Force RANLIB.
Rob Landley <rob@landley.net>
parents:
131
diff
changeset
|
198 --build="${CROSS_HOST}" --host="${CROSS_TARGET}" --cache-file=config.cache \ |
106f3875f606
The bash build continues to be stupid. Force RANLIB.
Rob Landley <rob@landley.net>
parents:
131
diff
changeset
|
199 --without-bash-malloc --disable-readline && |
183
d2a27709d3b6
Fixup the -j stuff to actually work. (typo in gcc, and uClibc can't use it.)
Rob Landley <rob@landley.net>
parents:
182
diff
changeset
|
200 # note: doesn't work with -j |
d2a27709d3b6
Fixup the -j stuff to actually work. (typo in gcc, and uClibc can't use it.)
Rob Landley <rob@landley.net>
parents:
182
diff
changeset
|
201 make && |
52
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
202 make install && |
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
203 # Make bash the default shell. |
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
204 ln -s bash "${TOOLS}/bin/sh" && |
301
309b574a5059
Redo the $CLEANUP logic to a cleanup function in include.sh (meaning if a
Rob Landley <rob@landley.net>
parents:
295
diff
changeset
|
205 cd .. |
52
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
206 |
301
309b574a5059
Redo the $CLEANUP logic to a cleanup function in include.sh (meaning if a
Rob Landley <rob@landley.net>
parents:
295
diff
changeset
|
207 cleanup bash |
52
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
208 |
280
00ee362817e1
Cross-compile a native distcc for target.
Rob Landley <rob@landley.net>
parents:
278
diff
changeset
|
209 setupfor distcc |
00ee362817e1
Cross-compile a native distcc for target.
Rob Landley <rob@landley.net>
parents:
278
diff
changeset
|
210 ./configure --host="${ARCH}" --prefix="${TOOLS}" --with-included-popt && |
293
cdd26f8acc35
Update to gcc 4.1.2->4.2.2. Still doesn't fix the internal compiler error
Rob Landley <rob@landley.net>
parents:
284
diff
changeset
|
211 make -j $CPUS && |
cdd26f8acc35
Update to gcc 4.1.2->4.2.2. Still doesn't fix the internal compiler error
Rob Landley <rob@landley.net>
parents:
284
diff
changeset
|
212 make -j $CPUS install && |
284
353d72c420cc
Native-side symlinks for distcc to use.
Rob Landley <rob@landley.net>
parents:
280
diff
changeset
|
213 mkdir -p "${TOOLS}/distcc" && |
353d72c420cc
Native-side symlinks for distcc to use.
Rob Landley <rob@landley.net>
parents:
280
diff
changeset
|
214 ln -s ../bin/distcc "${TOOLS}/distcc/gcc" && |
353d72c420cc
Native-side symlinks for distcc to use.
Rob Landley <rob@landley.net>
parents:
280
diff
changeset
|
215 ln -s ../bin/distcc "${TOOLS}/distcc/cc" |
301
309b574a5059
Redo the $CLEANUP logic to a cleanup function in include.sh (meaning if a
Rob Landley <rob@landley.net>
parents:
295
diff
changeset
|
216 cd .. |
280
00ee362817e1
Cross-compile a native distcc for target.
Rob Landley <rob@landley.net>
parents:
278
diff
changeset
|
217 |
301
309b574a5059
Redo the $CLEANUP logic to a cleanup function in include.sh (meaning if a
Rob Landley <rob@landley.net>
parents:
295
diff
changeset
|
218 cleanup distcc |
280
00ee362817e1
Cross-compile a native distcc for target.
Rob Landley <rob@landley.net>
parents:
278
diff
changeset
|
219 |
83
8fb80545fe84
Move the "hello world" source into sources/toys. Build (in mini-native)
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
220 # Put statically and dynamically linked hello world programs on there for |
315
7fe514d773b9
Install setup script even for BUILD_SHORT.
Rob Landley <rob@landley.net>
parents:
311
diff
changeset
|
221 # test purposes. |
83
8fb80545fe84
Move the "hello world" source into sources/toys. Build (in mini-native)
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
222 |
8fb80545fe84
Move the "hello world" source into sources/toys. Build (in mini-native)
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
223 "${ARCH}-gcc" "${SOURCES}/toys/hello.c" -Os -s -o "${TOOLS}/bin/hello-dynamic" && |
315
7fe514d773b9
Install setup script even for BUILD_SHORT.
Rob Landley <rob@landley.net>
parents:
311
diff
changeset
|
224 "${ARCH}-gcc" "${SOURCES}/toys/hello.c" -Os -s -static -o "${TOOLS}/bin/hello-static" |
83
8fb80545fe84
Move the "hello world" source into sources/toys. Build (in mini-native)
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
225 |
8fb80545fe84
Move the "hello world" source into sources/toys. Build (in mini-native)
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
226 [ $? -ne 0 ] && dienow |
8fb80545fe84
Move the "hello world" source into sources/toys. Build (in mini-native)
Rob Landley <rob@landley.net>
parents:
81
diff
changeset
|
227 |
50
5aeba79b8f5f
Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents:
46
diff
changeset
|
228 fi |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
229 |
75
38e7e0cc3b9f
Build mksquashfs in the non-short cross-compiler, and use it at the end of
Rob Landley <rob@landley.net>
parents:
68
diff
changeset
|
230 # Clean up and package the result |
43
6d16887ec084
Intermediate snapshot. Doesn't work yet.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
231 |
53
3fd961e31444
Build a gcc wrapper for _target_, and add a "strip" command to halve the
Rob Landley <rob@landley.net>
parents:
52
diff
changeset
|
232 "${ARCH}-strip" "${TOOLS}"/{bin/*,sbin/*,libexec/gcc/*/*/*} |
3fd961e31444
Build a gcc wrapper for _target_, and add a "strip" command to halve the
Rob Landley <rob@landley.net>
parents:
52
diff
changeset
|
233 |
75
38e7e0cc3b9f
Build mksquashfs in the non-short cross-compiler, and use it at the end of
Rob Landley <rob@landley.net>
parents:
68
diff
changeset
|
234 cd "${BUILD}" |
81
6dd38c925bc4
Upgrade some packages, and other cleanups.
Rob Landley <rob@landley.net>
parents:
75
diff
changeset
|
235 #echo -n "Creating tools.sqf" |
6dd38c925bc4
Upgrade some packages, and other cleanups.
Rob Landley <rob@landley.net>
parents:
75
diff
changeset
|
236 #("${WORK}/mksquashfs" "${NATIVE}/tools" "tools-${ARCH}.sqf" \ |
6dd38c925bc4
Upgrade some packages, and other cleanups.
Rob Landley <rob@landley.net>
parents:
75
diff
changeset
|
237 # -noappend -all-root -info || dienow) | dotprogress |
75
38e7e0cc3b9f
Build mksquashfs in the non-short cross-compiler, and use it at the end of
Rob Landley <rob@landley.net>
parents:
68
diff
changeset
|
238 |
38e7e0cc3b9f
Build mksquashfs in the non-short cross-compiler, and use it at the end of
Rob Landley <rob@landley.net>
parents:
68
diff
changeset
|
239 echo -n creating mini-native-"${ARCH}".tar.bz2 && |
38e7e0cc3b9f
Build mksquashfs in the non-short cross-compiler, and use it at the end of
Rob Landley <rob@landley.net>
parents:
68
diff
changeset
|
240 { tar cjvf "mini-native-${ARCH}.tar.bz2" "mini-native-${ARCH}" || dienow |
38e7e0cc3b9f
Build mksquashfs in the non-short cross-compiler, and use it at the end of
Rob Landley <rob@landley.net>
parents:
68
diff
changeset
|
241 } | dotprogress |
38e7e0cc3b9f
Build mksquashfs in the non-short cross-compiler, and use it at the end of
Rob Landley <rob@landley.net>
parents:
68
diff
changeset
|
242 |
50
5aeba79b8f5f
Remove qemu build (it's in cross-compiler.sh now), move uClibc build right
Rob Landley <rob@landley.net>
parents:
46
diff
changeset
|
243 # Color back to normal |
52
6d6551a37687
Add make to mini-native (required one more option switched on in uClibc), add
Rob Landley <rob@landley.net>
parents:
51
diff
changeset
|
244 echo -e "\e[0mBuild complete" |