1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-23 03:29:46 +01:00
build/pkg/bbstatic/build

39 lines
922 B
Text
Raw Normal View History

VERSION="1.28.0"
SRCDIR="busybox-$VERSION"
TARBALL="busybox-$VERSION.tar.bz2"
URL="https://busybox.net/downloads"
SHA256SUM="604553b7dbd59ded9e3ad7c6af49ed2cff599adf3e54d9463e5e0027b362019c"
DEPENDS="toolchain"
prepare() {
return
}
build() {
local INPUT="$1"
local OUTPUT="$2"
local CFGFILE="$SCRIPTDIR/board/$BOARD/bbstatic.config"
local SYSROOT="$TCDIR/$TARGET"
cp "$CFGFILE" "$OUTPUT/.config"
export KBUILD_OUTPUT="$OUTPUT"
make -C "$INPUT" O="$OUTPUT" CROSS_COMPILE="${TARGET}-" oldconfig
sed -i "$OUTPUT/.config" -e 's,^CONFIG_CROSS_COMPILE=.*,CONFIG_CROSS_COMPILE="'$TARGET'-",'
sed -i "$OUTPUT/.config" -e 's,^CONFIG_SYSROOT=.*,CONFIG_SYSROOT="'$SYSROOT'",'
make -C "$INPUT" O="$OUTPUT" CROSS_COMPILE="${TARGET}-" -j $NUMJOBS
}
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"
}