annotate sources/sections/busybox.build @ 1541:e4f766efa39f

Sort busybox config entries to group stuff toybox can replace. Also add ps.
author Rob Landley <rob@landley.net>
date Thu, 06 Sep 2012 03:44:47 -0500
parents 1261b8fd1ec9
children e2f722cc97a6
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
1481
1e494ad5c7fd Fix "cofnig" typo.
Rob Landley <rob@landley.net>
parents: 1477
diff changeset
7 if [ "$TOYBOX" == busybox_defconfig ]
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
1507
1261b8fd1ec9 Teach busybox.build to switch off toybox-supplied functionality when TOYBOX=toybox, and move one more config symbol after toybox marker.
Rob Landley <rob@landley.net>
parents: 1481
diff changeset
14 if [ "$TOYBOX" == toybox ]
1261b8fd1ec9 Teach busybox.build to switch off toybox-supplied functionality when TOYBOX=toybox, and move one more config symbol after toybox marker.
Rob Landley <rob@landley.net>
parents: 1481
diff changeset
15 then
1261b8fd1ec9 Teach busybox.build to switch off toybox-supplied functionality when TOYBOX=toybox, and move one more config symbol after toybox marker.
Rob Landley <rob@landley.net>
parents: 1481
diff changeset
16 getconfig busybox | sed '/toybox/q' > "$WORK/config-busybox" || dienow
1261b8fd1ec9 Teach busybox.build to switch off toybox-supplied functionality when TOYBOX=toybox, and move one more config symbol after toybox marker.
Rob Landley <rob@landley.net>
parents: 1481
diff changeset
17 else
1261b8fd1ec9 Teach busybox.build to switch off toybox-supplied functionality when TOYBOX=toybox, and move one more config symbol after toybox marker.
Rob Landley <rob@landley.net>
parents: 1481
diff changeset
18 getconfig busybox > "$WORK/config-busybox" || dienow
1261b8fd1ec9 Teach busybox.build to switch off toybox-supplied functionality when TOYBOX=toybox, and move one more config symbol after toybox marker.
Rob Landley <rob@landley.net>
parents: 1481
diff changeset
19 fi
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
20 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
21 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
22
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
23 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
24 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
25
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
26 [ -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
27
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
28 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
29
5dd1a99a0737 Factor out more common code: busybox and toybox builds.
Rob Landley <rob@landley.net>
parents:
diff changeset
30 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
31 do
1229
313c702a0984 Remove toybox.
Rob Landley <rob@landley.net>
parents: 1197
diff changeset
32 # busybox mke2fs/tune2fs don't support -j
313c702a0984 Remove toybox.
Rob Landley <rob@landley.net>
parents: 1197
diff changeset
33 if [ "$i" == mke2fs ] || [ "$i" == tune2fs ]
313c702a0984 Remove toybox.
Rob Landley <rob@landley.net>
parents: 1197
diff changeset
34 then
313c702a0984 Remove toybox.
Rob Landley <rob@landley.net>
parents: 1197
diff changeset
35 continue
313c702a0984 Remove toybox.
Rob Landley <rob@landley.net>
parents: 1197
diff changeset
36 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
37 [ ! -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
38 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
39
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
40 # 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
41
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
42 true