meta-blackfinn/buildconf/blackfinn-init-build-env
Thomas Klaehn d7c9c952a5 meta-blackfinn: Unify layer structure
Signed-off-by: Thomas Klaehn <tkl@blackfinn.de>
2019-03-12 16:32:13 +01:00

53 lines
1.1 KiB
Plaintext

function print_help {
echo ""
echo "Prepare environment for blackfinn-based yocto builds."
echo ""
echo "Usage:"
echo "MACHINE=<my_machine> source blackfinn-init-build-env <build_dir>"
echo ""
echo "MACHINE is optional. if not specified it defaults to 'qemuarm-64'."
echo "Supported machines:"
echo -e "\tqemuarm\n\tqemuarm64\n\tqemumips\n\tqemumips64\n\tqemuppc"
echo -e "\tqemux86\n\tqemux86-64\n"
echo -e "\tbeaglebone-yocto\n\tedgerouter\n\tgenericx86\n\tgenericx86-64\n\tmpc8315e-rdb\n"
echo -e "\traspberrypi3-64\n\tbananapi-m3"
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=qemux86-64
BUILD_DIR=build
print_help
if [ -z "$MACHINE" ]; then
MACHINE=$DEFAULT_MACHINE
fi
if [ $# -eq "1" ]; then
BUILD_DIR=$1
fi
print_config $MACHINE $BUILD_DIR
rm -f build/conf/bblayers.conf \
build/conf/templateconf.cfg
mkdir -p $BUILD_DIR
export MACHINE="$MACHINE"
export TEMPLATECONF="../meta-blackfinn/buildconf/$MACHINE"
source layers/poky/oe-init-build-env $BUILD_DIR
return 0