52 lines
1.1 KiB
Plaintext
52 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 TEMPLATECONF="../meta-blackfinn/buildconf/$MACHINE"
|
||
|
|
||
|
source layers/poky/oe-init-build-env $BUILD_DIR
|
||
|
|
||
|
return 0
|
||
|
|