mirror of
https://github.com/pygos/build.git
synced 2024-11-22 11:09:46 +01:00
72512d6bac
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
46 lines
906 B
Text
Executable file
46 lines
906 B
Text
Executable file
VERSION="0.1"
|
|
SRCDIR="init-${VERSION}"
|
|
TARBALL="${SRCDIR}.tar.xz"
|
|
URL="http://infraroot.at/pygos"
|
|
SHA256SUM="eb317583e0fb8bb8a50e1229128e0fea0c4f18cbedbeec79fcf3e742679a45e1"
|
|
DEPENDS="toolchain"
|
|
|
|
prepare() {
|
|
return
|
|
}
|
|
|
|
build() {
|
|
local SOURCE="$1"
|
|
local DEPLOY="$2"
|
|
|
|
$SOURCE/configure --prefix="" --host="$TARGET" --sbindir=/bin
|
|
|
|
make -j $NUMJOBS
|
|
}
|
|
|
|
deploy() {
|
|
local SOURCE="$1"
|
|
local DEPLOY="$2"
|
|
local svc
|
|
|
|
make DESTDIR="$DEPLOY" install-strip
|
|
|
|
mkdir -p "$DEPLOY/etc/init.d"
|
|
|
|
if [ -e "$SCRIPTDIR/board/$BOARD/INIT" ]; then
|
|
source "$SCRIPTDIR/board/$BOARD/INIT"
|
|
fi
|
|
if [ -e "$SCRIPTDIR/product/$PRODUCT/INIT" ]; then
|
|
source "$SCRIPTDIR/product/$PRODUCT/INIT"
|
|
fi
|
|
|
|
if [ "x$HWCLOCK" == "xyes" ]; then
|
|
ln -s "/share/init/hwclock" "$DEPLOY/etc/init.d/hwclock"
|
|
fi
|
|
|
|
for svc in $GETTY_TTY; do
|
|
ln -s "/share/init/agetty" "$DEPLOY/etc/init.d/agetty@$svc"
|
|
done
|
|
|
|
unset -v i GETTY_TTY HWCLOCK
|
|
}
|