2018-02-10 11:48:31 +01:00
|
|
|
VERSION="1.28.0"
|
2017-12-09 21:51:48 +01:00
|
|
|
SRCDIR="busybox-$VERSION"
|
|
|
|
TARBALL="busybox-$VERSION.tar.bz2"
|
|
|
|
URL="https://busybox.net/downloads"
|
2018-02-10 11:48:31 +01:00
|
|
|
SHA256SUM="604553b7dbd59ded9e3ad7c6af49ed2cff599adf3e54d9463e5e0027b362019c"
|
2018-02-15 23:47:54 +01:00
|
|
|
DEPENDS="toolchain"
|
2017-12-09 21:51:48 +01:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
local INPUT="$1"
|
|
|
|
local OUTPUT="$2"
|
|
|
|
|
2018-02-09 18:06:16 +01:00
|
|
|
local CFGFILE="$SCRIPTDIR/board/$BOARD/bbstatic.config"
|
2017-12-09 21:51:48 +01:00
|
|
|
local SYSROOT="$TCDIR/$TARGET"
|
|
|
|
|
|
|
|
cp "$CFGFILE" "$OUTPUT/.config"
|
|
|
|
|
|
|
|
export KBUILD_OUTPUT="$OUTPUT"
|
|
|
|
|
2018-02-09 18:18:51 +01:00
|
|
|
make -C "$INPUT" O="$OUTPUT" CROSS_COMPILE="${TARGET}-" oldconfig
|
2017-12-09 21:51:48 +01:00
|
|
|
sed -i "$OUTPUT/.config" -e 's,^CONFIG_CROSS_COMPILE=.*,CONFIG_CROSS_COMPILE="'$TARGET'-",'
|
|
|
|
sed -i "$OUTPUT/.config" -e 's,^CONFIG_SYSROOT=.*,CONFIG_SYSROOT="'$SYSROOT'",'
|
|
|
|
|
2018-02-09 18:18:51 +01:00
|
|
|
make -C "$INPUT" O="$OUTPUT" CROSS_COMPILE="${TARGET}-" -j $NUMJOBS
|
2017-12-09 21:51:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
deploy() {
|
|
|
|
local SOURCE="$1"
|
|
|
|
local BUILD="$2"
|
|
|
|
local DEPLOY="$3"
|
|
|
|
|
|
|
|
mkdir -p "$DEPLOY/bin"
|
|
|
|
cp "$BUILD/busybox" "$DEPLOY/bin"
|
|
|
|
ln -s "/bin/busybox" "$DEPLOY/bin/sh"
|
|
|
|
}
|