meta-blackfinn: Unify layer structure
Signed-off-by: Thomas Klaehn <tkl@blackfinn.de>
This commit is contained in:
56
buildconf/blackfinn-init-build-env
Normal file
56
buildconf/blackfinn-init-build-env
Normal file
@@ -0,0 +1,56 @@
|
||||
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
|
||||
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-blackfinn/buildconf/$MACHINE"
|
||||
|
||||
source layers/poky/oe-init-build-env $BUILD_DIR
|
||||
|
||||
return 0
|
||||
|
Reference in New Issue
Block a user