Meta-perinet: Initial commit
Signed-off-by: Thomas Klaehn <thomas.klaehn@perinet.io>
This commit is contained in:
49
buildconf/perinet-init-build-env
Normal file
49
buildconf/perinet-init-build-env
Normal file
@@ -0,0 +1,49 @@
|
||||
function print_help {
|
||||
echo ""
|
||||
echo "Prepare environment for perinet-based yocto builds."
|
||||
echo ""
|
||||
echo "Usage:"
|
||||
echo "source perinet-init-build-env <build_dir>"
|
||||
echo ""
|
||||
echo "<build_dir> is optional. If not specified it defaults to 'build'."
|
||||
echo ""
|
||||
}
|
||||
|
||||
function print_config {
|
||||
echo "Configuration:"
|
||||
echo " MACHINE: $1"
|
||||
echo " BUILD_DIR: $2"
|
||||
}
|
||||
|
||||
|
||||
DEFAULT_MACHINE=genericx86-64
|
||||
BUILD_DIR=build
|
||||
|
||||
#print_help
|
||||
|
||||
if [ -z "$MACHINE" ]; then
|
||||
MACH=$DEFAULT_MACHINE
|
||||
else
|
||||
MACH=$MACHINE
|
||||
fi
|
||||
|
||||
unset MACHINE
|
||||
|
||||
if [ $# -eq "1" ]; then
|
||||
BUILD_DIR=$1
|
||||
fi
|
||||
|
||||
print_config $MACH $BUILD_DIR
|
||||
|
||||
rm -f build/conf/bblayers.conf \
|
||||
build/conf/templateconf.cfg
|
||||
|
||||
mkdir -p $BUILD_DIR
|
||||
|
||||
export MACHINE=$MACH
|
||||
export TEMPLATECONF="../meta-perinet/buildconf/$MACHINE"
|
||||
|
||||
source layers/poky/oe-init-build-env $BUILD_DIR
|
||||
|
||||
return 0
|
||||
|
Reference in New Issue
Block a user