annotate sources/sections/toybox.build @ 1747:cb28b1d437b2 draft

Toybox 0.5.2.
author Rob Landley <rob@landley.net>
date Wed, 04 Mar 2015 22:02:37 -0600
parents 59c1495d5b5e
children acaa88463c0c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1482
b381adcd7968 Add ability to build toybox.
Rob Landley <rob@landley.net>
parents:
diff changeset
1 # Build toybox statically by default, but don't statically link against
b381adcd7968 Add ability to build toybox.
Rob Landley <rob@landley.net>
parents:
diff changeset
2 # glibc (during host-tools.sh build) because glibc is buggy and can't combine
b381adcd7968 Add ability to build toybox.
Rob Landley <rob@landley.net>
parents:
diff changeset
3 # --static with --gc-sections. See http://blah for details
b381adcd7968 Add ability to build toybox.
Rob Landley <rob@landley.net>
parents:
diff changeset
4
b381adcd7968 Add ability to build toybox.
Rob Landley <rob@landley.net>
parents:
diff changeset
5 # Build toybox
b381adcd7968 Add ability to build toybox.
Rob Landley <rob@landley.net>
parents:
diff changeset
6
1544
e2f722cc97a6 Make busybox build by default, switch override knob to BUSYBOX=1 to use defconfig busybox, always use toybox for oneit, cleanup/fix record-commands logic.
Rob Landley <rob@landley.net>
parents: 1503
diff changeset
7 for i in defconfig toybox \
e2f722cc97a6 Make busybox build by default, switch override knob to BUSYBOX=1 to use defconfig busybox, always use toybox for oneit, cleanup/fix record-commands logic.
Rob Landley <rob@landley.net>
parents: 1503
diff changeset
8 $( [ -z "$BUSYBOX" ] && echo install$([ -z "$ARCH" ] && echo _flat) )
1500
7e918ec092c9 Fix toybox build script.
Rob Landley <rob@landley.net>
parents: 1499
diff changeset
9 do
7e918ec092c9 Fix toybox build script.
Rob Landley <rob@landley.net>
parents: 1499
diff changeset
10 PREFIX="$STAGE_DIR" CFLAGS="$CFLAGS $STATIC_FLAGS" CC= STRIP= \
1503
ef9114dfbd2e The toybox build should also support BUILD_VERBOSE.
Rob Landley <rob@landley.net>
parents: 1500
diff changeset
11 CROSS_COMPILE=${ARCH:+${ARCH}-} make -j $CPUS $VERBOSITY $i || dienow
1500
7e918ec092c9 Fix toybox build script.
Rob Landley <rob@landley.net>
parents: 1499
diff changeset
12 done
7e918ec092c9 Fix toybox build script.
Rob Landley <rob@landley.net>
parents: 1499
diff changeset
13 cp .config "$WORK"/config-toybox || dienow
1482
b381adcd7968 Add ability to build toybox.
Rob Landley <rob@landley.net>
parents:
diff changeset
14
1544
e2f722cc97a6 Make busybox build by default, switch override knob to BUSYBOX=1 to use defconfig busybox, always use toybox for oneit, cleanup/fix record-commands logic.
Rob Landley <rob@landley.net>
parents: 1503
diff changeset
15 # We always need at least oneit
e2f722cc97a6 Make busybox build by default, switch override knob to BUSYBOX=1 to use defconfig busybox, always use toybox for oneit, cleanup/fix record-commands logic.
Rob Landley <rob@landley.net>
parents: 1503
diff changeset
16
e2f722cc97a6 Make busybox build by default, switch override knob to BUSYBOX=1 to use defconfig busybox, always use toybox for oneit, cleanup/fix record-commands logic.
Rob Landley <rob@landley.net>
parents: 1503
diff changeset
17 if [ ! -z "$BUSYBOX" ]
e2f722cc97a6 Make busybox build by default, switch override knob to BUSYBOX=1 to use defconfig busybox, always use toybox for oneit, cleanup/fix record-commands logic.
Rob Landley <rob@landley.net>
parents: 1503
diff changeset
18 then
1607
59c1495d5b5e The defconfig busybox build bit-rotted a bit, nail it back in place.
Rob Landley <rob@landley.net>
parents: 1544
diff changeset
19 ln -sf {$ARCH:+/usr/bin/}toybox "$STAGE_DIR/${ARCH:+sbin/}oneit" || dienow
1544
e2f722cc97a6 Make busybox build by default, switch override knob to BUSYBOX=1 to use defconfig busybox, always use toybox for oneit, cleanup/fix record-commands logic.
Rob Landley <rob@landley.net>
parents: 1503
diff changeset
20 fi
e2f722cc97a6 Make busybox build by default, switch override knob to BUSYBOX=1 to use defconfig busybox, always use toybox for oneit, cleanup/fix record-commands logic.
Rob Landley <rob@landley.net>
parents: 1503
diff changeset
21
1482
b381adcd7968 Add ability to build toybox.
Rob Landley <rob@landley.net>
parents:
diff changeset
22 if [ ! -z "$SKIP_STRIP" ]
b381adcd7968 Add ability to build toybox.
Rob Landley <rob@landley.net>
parents:
diff changeset
23 then
1747
cb28b1d437b2 Toybox 0.5.2.
Rob Landley <rob@landley.net>
parents: 1607
diff changeset
24 cp --remove-destination toybox_unstripped "$INSTDIR/toybox" || dienow
1482
b381adcd7968 Add ability to build toybox.
Rob Landley <rob@landley.net>
parents:
diff changeset
25 fi