mirror of
https://github.com/pygos/build.git
synced 2024-11-22 19:19:46 +01:00
ffacb26218
Instead of having a "depends" file with a list of packages, add a "DEPENDS" variable to the build script. Generate the rootfs dependencies from a config file stored in the cfg directory. Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
39 lines
987 B
Text
Executable file
39 lines
987 B
Text
Executable file
VERSION="1.27.2"
|
|
SRCDIR="busybox-$VERSION"
|
|
TARBALL="busybox-$VERSION.tar.bz2"
|
|
URL="https://busybox.net/downloads"
|
|
SHA256SUM="9d4be516b61e6480f156b11eb42577a13529f75d3383850bb75c50c285de63df"
|
|
DEPENDS=""
|
|
|
|
prepare() {
|
|
return
|
|
}
|
|
|
|
build() {
|
|
local INPUT="$1"
|
|
local OUTPUT="$2"
|
|
|
|
local CFGFILE="$SCRIPTDIR/cfg/$CFG/bbstatic.config"
|
|
local BB_CPU=$(head -1 "$CFGFILE" | cut -b 3-)
|
|
local SYSROOT="$TCDIR/$TARGET"
|
|
|
|
cp "$CFGFILE" "$OUTPUT/.config"
|
|
|
|
export KBUILD_OUTPUT="$OUTPUT"
|
|
|
|
make -C "$INPUT" O="$OUTPUT" ARCH="$BB_CPU" 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" ARCH="$BB_CPU" 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"
|
|
}
|