Mercurial > hg > aboriginal
comparison sources/sections/busybox.sh @ 910:f1671488c740
Split busybox and toybox builds, update toybox and linux package versions.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 01 Dec 2009 19:49:23 -0600 |
parents | 15522b490e53 |
children | 18f052489f5d |
comparison
equal
deleted
inserted
replaced
909:1720e1d988db | 910:f1671488c740 |
---|---|
1 #!/bin/bash | |
2 | |
3 [ ! -z "$ARCH" ] && DO_CROSS=CROSS_COMPILE=${ARCH}- | |
4 | |
5 # Build busybox statically by default, but don't statically link against | 1 # Build busybox statically by default, but don't statically link against |
6 # glibc because glibc is buggy and can't combine --static with --gc-sections. | 2 # glibc because glibc is buggy and can't combine --static with --gc-sections. |
7 | 3 |
8 [ "$BUILD_STATIC" != "none" ] && [ ! -z "$ARCH" ] && BUSYBOX_STATIC="--static" | 4 [ "$BUILD_STATIC" != "none" ] && [ ! -z "$ARCH" ] && BUSYBOX_STATIC="--static" |
5 [ ! -z "$ARCH" ] && DO_CROSS=CROSS_COMPILE=${ARCH}- | |
9 | 6 |
10 # Build busybox | 7 # Build busybox |
11 | 8 |
12 setupfor busybox | 9 setupfor busybox |
13 make allyesconfig KCONFIG_ALLCONFIG="${SOURCES}/trimconfig-busybox" && | 10 make allyesconfig KCONFIG_ALLCONFIG="${SOURCES}/trimconfig-busybox" && |
14 cp .config "$WORK"/config-busybox | 11 cp .config "$WORK"/config-busybox && |
15 LDFLAGS="$LDFLAGS $BUSYBOX_STATIC" make -j $CPUS $VERBOSITY $DO_CROSS && | 12 LDFLAGS="$LDFLAGS $BUSYBOX_STATIC" make -j $CPUS $VERBOSITY $DO_CROSS && |
16 make busybox.links && | 13 make busybox.links && |
17 cp busybox "${STAGE_DIR}" | 14 cp busybox "${STAGE_DIR}" || dienow |
18 | |
19 [ $? -ne 0 ] && dienow | |
20 | 15 |
21 for i in $(sed 's@.*/@@' busybox.links) | 16 for i in $(sed 's@.*/@@' busybox.links) |
22 do | 17 do |
23 [ ! -f "${STAGE_DIR}/$i" ] && | 18 [ ! -f "${STAGE_DIR}/$i" ] && |
24 (ln -sf busybox "${STAGE_DIR}/$i" || dienow) | 19 (ln -sf busybox "${STAGE_DIR}/$i" || dienow) |
25 done | 20 done |
26 | 21 |
27 cleanup | 22 cleanup |
28 | |
29 # Build toybox | |
30 | |
31 [ ! -z "$ARCH" ] && DO_CROSS=CROSS_COMPILE=${ARCH}- | |
32 | |
33 setupfor toybox | |
34 make defconfig && | |
35 CFLAGS="$CFLAGS $STATIC_FLAGS" make $DO_CROSS || dienow | |
36 if [ -z "$USE_TOYBOX" ] | |
37 then | |
38 mv toybox "$STAGE_DIR" && | |
39 ln -sf toybox "$STAGE_DIR"/patch && | |
40 ln -sf toybox "$STAGE_DIR"/oneit && | |
41 ln -sf toybox "$STAGE_DIR"/netcat || dienow | |
42 else | |
43 make install_flat PREFIX="$STAGE_DIR" || dienow | |
44 fi | |
45 | |
46 cleanup |