From 1d951aca19b0c65c79ee6239a95d28dbf467198a Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Wed, 5 Feb 2014 10:19:14 +0200 Subject: Add script to initialize yocto build env Clone all necessary repos and symlink meta-b2qt in correct place. Change-Id: I09c21e0bb07d67901b4456194e365f93541b5842 Reviewed-by: Eirik Aavitsland --- scripts/b2qt-init-build-env | 76 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100755 scripts/b2qt-init-build-env diff --git a/scripts/b2qt-init-build-env b/scripts/b2qt-init-build-env new file mode 100755 index 0000000..43229e1 --- /dev/null +++ b/scripts/b2qt-init-build-env @@ -0,0 +1,76 @@ +#!/bin/sh +############################################################################# +## +## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +## +## This file is part of the Qt Enterprise Embedded Scripts of the Qt +## framework. +## +## $QT_BEGIN_LICENSE$ +## Commercial License Usage Only +## Licensees holding valid commercial Qt license agreements with Digia +## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, +## may use this file in accordance with the terms contained in said license +## agreement. +## +## For further information use the contact form at +## http://qt.digia.com/contact-us. +## +## +## $QT_END_LICENSE$ +## +############################################################################# + +set -e + +if [ $# -ne 1 ]; then + echo "Usage: $0 " + exit 1 +fi + +mkdir -p ${1} + +DIR=$(readlink -f $(dirname $0)/..) +BUILDDIR=$(readlink -f $1) + +if [ ! -d ${BUILDDIR}/poky ]; then + git clone git://git.yoctoproject.org/poky ${BUILDDIR}/poky -b dora +fi + +if [ ! -d ${BUILDDIR}/poky/meta-openembedded ]; then + git clone git://git.openembedded.org/meta-openembedded ${BUILDDIR}/poky/meta-openembedded -b dora +fi + +if [ ! -d ${BUILDDIR}/poky/meta-ti ]; then + git clone git://git.yoctoproject.org/meta-ti ${BUILDDIR}/poky/meta-ti -b master +fi + +if [ ! -d ${BUILDDIR}/poky/meta-fsl-arm ]; then + git clone git://git.yoctoproject.org/meta-fsl-arm ${BUILDDIR}/poky/meta-fsl-arm -b dora +fi + +if [ ! -d ${BUILDDIR}/poky/meta-fsl-arm-extra ]; then + git clone git://github.com/Freescale/meta-fsl-arm-extra.git ${BUILDDIR}/poky/meta-fsl-arm-extra -b dora +fi + +if [ ! -d ${BUILDDIR}/poky/meta-raspberrypi ]; then + git clone git://git.yoctoproject.org/meta-raspberrypi ${BUILDDIR}/poky/meta-raspberrypi -b master +fi + +if [ ! -d ${BUILDDIR}/poky/meta-b2qt ]; then + ln -s ${DIR} ${BUILDDIR}/poky/meta-b2qt +fi + +echo +echo "Yocto build system is ready" +echo "next initialize the build env for your target machine, for example:" +echo +echo "cd ${BUILDDIR}/poky" +echo "export TEMPLATECONF=${DIR}/conf" +echo "export MACHINE=raspberrypi" +echo ". ./oe-init-build-env" +echo +echo "and build B2Qt image with:" +echo +echo "bitbake b2qt-embedded-image" +echo -- cgit v1.2.3-54-g00ecf