annotate sources/sections/busybox.build @ 1719:78050a31d1ee draft

Sigh. Checked in the wrong version of the patch (typo fix).
author Rob Landley <rob@landley.net>
date Tue, 06 Jan 2015 13:15:33 -0600
parents e2f722cc97a6
children d33dcb246984
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
865
15522b490e53 Build busybox static by default (but not for host-tools.sh, since static glibc is buggy, and let .config to switch it off).
Rob Landley <rob@landley.net>
parents: 849
diff changeset
1 # Build busybox statically by default, but don't statically link against
1036
e021bba5e22e Yank ugly STAGE_DIR adjustment and instead teach busybox/toybox bilds to auto-detect "bin" directory on install. (And while we're at it, don't build hello-dynamic on static-only system.)
Rob Landley <rob@landley.net>
parents: 944
diff changeset
2 # glibc (during host_tools) build because glibc is buggy and can't combine
e021bba5e22e Yank ugly STAGE_DIR adjustment and instead teach busybox/toybox bilds to auto-detect "bin" directory on install. (And while we're at it, don't build hello-dynamic on static-only system.)
Rob Landley <rob@landley.net>
parents: 944
diff changeset
3 # --static with --gc-sections.
865
15522b490e53 Build busybox static by default (but not for host-tools.sh, since static glibc is buggy, and let .config to switch it off).
Rob Landley <rob@landley.net>
parents: 849
diff changeset
4
849
5dd1a99a0737 Factor out more common code: busybox and toybox builds.
Rob Landley <rob@landley.net>
parents:
diff changeset
5 # Build busybox
5dd1a99a0737 Factor out more common code: busybox and toybox builds.
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: 1507
diff changeset
7 if [ ! -z "$BUSYBOX" ]
1477
431d5b4ee537 Switch from busybox defconfig to baseconfig-busybox selecting just what we need, with a config variable to use defconfig instead if you really want that.
Rob Landley <rob@landley.net>
parents: 1229
diff changeset
8 then
431d5b4ee537 Switch from busybox defconfig to baseconfig-busybox selecting just what we need, with a config variable to use defconfig instead if you really want that.
Rob Landley <rob@landley.net>
parents: 1229
diff changeset
9 make defconfig &&
431d5b4ee537 Switch from busybox defconfig to baseconfig-busybox selecting just what we need, with a config variable to use defconfig instead if you really want that.
Rob Landley <rob@landley.net>
parents: 1229
diff changeset
10 # breaks on ubuntu 11.10
431d5b4ee537 Switch from busybox defconfig to baseconfig-busybox selecting just what we need, with a config variable to use defconfig instead if you really want that.
Rob Landley <rob@landley.net>
parents: 1229
diff changeset
11 sed -i -e 's/^\(CONFIG_UBI.*\)=y/# \1 is not set/' .config &&
431d5b4ee537 Switch from busybox defconfig to baseconfig-busybox selecting just what we need, with a config variable to use defconfig instead if you really want that.
Rob Landley <rob@landley.net>
parents: 1229
diff changeset
12 cp .config "$WORK"/config-busybox || dienow
431d5b4ee537 Switch from busybox defconfig to baseconfig-busybox selecting just what we need, with a config variable to use defconfig instead if you really want that.
Rob Landley <rob@landley.net>
parents: 1229
diff changeset
13 else
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: 1507
diff changeset
14 getconfig busybox | sed '/toybox/,$d' > "$WORK/config-busybox" &&
1477
431d5b4ee537 Switch from busybox defconfig to baseconfig-busybox selecting just what we need, with a config variable to use defconfig instead if you really want that.
Rob Landley <rob@landley.net>
parents: 1229
diff changeset
15 make allnoconfig KCONFIG_ALLCONFIG="$WORK/config-busybox" || dienow
431d5b4ee537 Switch from busybox defconfig to baseconfig-busybox selecting just what we need, with a config variable to use defconfig instead if you really want that.
Rob Landley <rob@landley.net>
parents: 1229
diff changeset
16 fi
431d5b4ee537 Switch from busybox defconfig to baseconfig-busybox selecting just what we need, with a config variable to use defconfig instead if you really want that.
Rob Landley <rob@landley.net>
parents: 1229
diff changeset
17
1083
cb4dbdb7f2cd Make BUILD_STATIC take comma separated list of packages, or "all" or "none". Default behavior should remain the same.
Rob Landley <rob@landley.net>
parents: 1036
diff changeset
18 LDFLAGS="$LDFLAGS $STATIC_FLAGS" make -j $CPUS $VERBOSITY $DO_CROSS &&
1036
e021bba5e22e Yank ugly STAGE_DIR adjustment and instead teach busybox/toybox bilds to auto-detect "bin" directory on install. (And while we're at it, don't build hello-dynamic on static-only system.)
Rob Landley <rob@landley.net>
parents: 944
diff changeset
19 make busybox.links || dienow
e021bba5e22e Yank ugly STAGE_DIR adjustment and instead teach busybox/toybox bilds to auto-detect "bin" directory on install. (And while we're at it, don't build hello-dynamic on static-only system.)
Rob Landley <rob@landley.net>
parents: 944
diff changeset
20
e021bba5e22e Yank ugly STAGE_DIR adjustment and instead teach busybox/toybox bilds to auto-detect "bin" directory on install. (And while we're at it, don't build hello-dynamic on static-only system.)
Rob Landley <rob@landley.net>
parents: 944
diff changeset
21 [ -d "$STAGE_DIR/bin" ] && INSTDIR="$STAGE_DIR/bin" || INSTDIR="$STAGE_DIR"
e021bba5e22e Yank ugly STAGE_DIR adjustment and instead teach busybox/toybox bilds to auto-detect "bin" directory on install. (And while we're at it, don't build hello-dynamic on static-only system.)
Rob Landley <rob@landley.net>
parents: 944
diff changeset
22
e021bba5e22e Yank ugly STAGE_DIR adjustment and instead teach busybox/toybox bilds to auto-detect "bin" directory on install. (And while we're at it, don't build hello-dynamic on static-only system.)
Rob Landley <rob@landley.net>
parents: 944
diff changeset
23 cp busybox${SKIP_STRIP:+_unstripped} "$INSTDIR/busybox" || dienow
849
5dd1a99a0737 Factor out more common code: busybox and toybox builds.
Rob Landley <rob@landley.net>
parents:
diff changeset
24
5dd1a99a0737 Factor out more common code: busybox and toybox builds.
Rob Landley <rob@landley.net>
parents:
diff changeset
25 for i in $(sed 's@.*/@@' busybox.links)
5dd1a99a0737 Factor out more common code: busybox and toybox builds.
Rob Landley <rob@landley.net>
parents:
diff changeset
26 do
1229
313c702a0984 Remove toybox.
Rob Landley <rob@landley.net>
parents: 1197
diff changeset
27 # busybox mke2fs/tune2fs don't support -j
313c702a0984 Remove toybox.
Rob Landley <rob@landley.net>
parents: 1197
diff changeset
28 if [ "$i" == mke2fs ] || [ "$i" == tune2fs ]
313c702a0984 Remove toybox.
Rob Landley <rob@landley.net>
parents: 1197
diff changeset
29 then
313c702a0984 Remove toybox.
Rob Landley <rob@landley.net>
parents: 1197
diff changeset
30 continue
313c702a0984 Remove toybox.
Rob Landley <rob@landley.net>
parents: 1197
diff changeset
31 fi
1177
7ca3dfbc9e06 Update to busybox 1.17.1 and switch to defconfig instead of trimconfig.
Rob Landley <rob@landley.net>
parents: 1083
diff changeset
32 [ ! -f "$INSTDIR/$i" ] && (ln -sf busybox "$INSTDIR/$i" || dienow)
849
5dd1a99a0737 Factor out more common code: busybox and toybox builds.
Rob Landley <rob@landley.net>
parents:
diff changeset
33 done
1477
431d5b4ee537 Switch from busybox defconfig to baseconfig-busybox selecting just what we need, with a config variable to use defconfig instead if you really want that.
Rob Landley <rob@landley.net>
parents: 1229
diff changeset
34
431d5b4ee537 Switch from busybox defconfig to baseconfig-busybox selecting just what we need, with a config variable to use defconfig instead if you really want that.
Rob Landley <rob@landley.net>
parents: 1229
diff changeset
35 # Reset error condition, the last file already existing is not an error
431d5b4ee537 Switch from busybox defconfig to baseconfig-busybox selecting just what we need, with a config variable to use defconfig instead if you really want that.
Rob Landley <rob@landley.net>
parents: 1229
diff changeset
36
431d5b4ee537 Switch from busybox defconfig to baseconfig-busybox selecting just what we need, with a config variable to use defconfig instead if you really want that.
Rob Landley <rob@landley.net>
parents: 1229
diff changeset
37 true