From 6c7560604612a4a9826c09d05fb6ea266fc4e2fc Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Mon, 29 Sep 2014 13:51:20 +0300 Subject: Use device specific bblayers.conf files Intead of modifying one commong bblayers.conf.sample file, create separate configs for each device type that uses different set of meta layers. Unknown devices now use all meta layers by default. Change-Id: I2bbcf803951c0c8c787b789420c325166b2ebbd5 Reviewed-by: Andy Nichols --- b2qt-init-build-env | 4 ++-- conf/bblayers.conf.bbb.sample | 44 +++++++++++++++++++++++++++++++++++++ conf/bblayers.conf.emulator.sample | 40 +++++++++++++++++++++++++++++++++ conf/bblayers.conf.fsl.sample | 43 ++++++++++++++++++++++++++++++++++++ conf/bblayers.conf.rpi.sample | 41 ++++++++++++++++++++++++++++++++++ conf/bblayers.conf.sample | 33 ++++++++++++++-------------- conf/bblayers.conf.ti.sample | 42 +++++++++++++++++++++++++++++++++++ conf/bblayers.conf.toradex.sample | 45 ++++++++++++++++++++++++++++++++++++++ scripts/setup_environment.sh | 35 +++++++++++++---------------- 9 files changed, 289 insertions(+), 38 deletions(-) create mode 100644 conf/bblayers.conf.bbb.sample create mode 100644 conf/bblayers.conf.emulator.sample create mode 100644 conf/bblayers.conf.fsl.sample create mode 100644 conf/bblayers.conf.rpi.sample create mode 100644 conf/bblayers.conf.ti.sample create mode 100644 conf/bblayers.conf.toradex.sample diff --git a/b2qt-init-build-env b/b2qt-init-build-env index 03c6439..2deb8a4 100755 --- a/b2qt-init-build-env +++ b/b2qt-init-build-env @@ -101,8 +101,8 @@ get_groups() { GROUPS="emulator" ;; *) - echo "Unknown device configuration, no matching repo group defined" - exit 1 + echo "Unknown device configuration, including all meta layers" + GROUPS="all" ;; esac diff --git a/conf/bblayers.conf.bbb.sample b/conf/bblayers.conf.bbb.sample new file mode 100644 index 0000000..69f65e6 --- /dev/null +++ b/conf/bblayers.conf.bbb.sample @@ -0,0 +1,44 @@ +############################################################################# +## +## 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$ +## +############################################################################# + +# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +LCONF_VERSION = "6" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" +BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}" + +BBLAYERS ?= " \ + ${BSPDIR}/sources/poky/meta \ + ${BSPDIR}/sources/poky/meta-yocto \ + ${BSPDIR}/sources/meta-beagleboard/common-bsp \ + ${BSPDIR}/sources/meta-ti \ + ${BSPDIR}/sources/meta-openembedded/meta-oe \ + ${BSPDIR}/sources/meta-b2qt \ + ${BSPDIR}/sources/meta-b2qt/meta-ti-extras \ + ${BSPDIR}/sources/meta-b2qt/meta-beagleboard-extras \ + " +BBLAYERS_NON_REMOVABLE ?= " \ + ${BSPDIR}/sources/poky/meta \ + ${BSPDIR}/sources/poky/meta-yocto \ + " diff --git a/conf/bblayers.conf.emulator.sample b/conf/bblayers.conf.emulator.sample new file mode 100644 index 0000000..76a49d5 --- /dev/null +++ b/conf/bblayers.conf.emulator.sample @@ -0,0 +1,40 @@ +############################################################################# +## +## 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$ +## +############################################################################# + +# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +LCONF_VERSION = "6" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" +BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}" + +BBLAYERS ?= " \ + ${BSPDIR}/sources/poky/meta \ + ${BSPDIR}/sources/poky/meta-yocto \ + ${BSPDIR}/sources/meta-openembedded/meta-oe \ + ${BSPDIR}/sources/meta-b2qt \ + " +BBLAYERS_NON_REMOVABLE ?= " \ + ${BSPDIR}/sources/poky/meta \ + ${BSPDIR}/sources/poky/meta-yocto \ + " diff --git a/conf/bblayers.conf.fsl.sample b/conf/bblayers.conf.fsl.sample new file mode 100644 index 0000000..a9711ca --- /dev/null +++ b/conf/bblayers.conf.fsl.sample @@ -0,0 +1,43 @@ +############################################################################# +## +## 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$ +## +############################################################################# + +# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +LCONF_VERSION = "6" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" +BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}" + +BBLAYERS ?= " \ + ${BSPDIR}/sources/poky/meta \ + ${BSPDIR}/sources/poky/meta-yocto \ + ${BSPDIR}/sources/meta-fsl-arm \ + ${BSPDIR}/sources/meta-fsl-arm-extra \ + ${BSPDIR}/sources/meta-openembedded/meta-oe \ + ${BSPDIR}/sources/meta-b2qt \ + ${BSPDIR}/sources/meta-b2qt/meta-fsl-extras \ + " +BBLAYERS_NON_REMOVABLE ?= " \ + ${BSPDIR}/sources/poky/meta \ + ${BSPDIR}/sources/poky/meta-yocto \ + " diff --git a/conf/bblayers.conf.rpi.sample b/conf/bblayers.conf.rpi.sample new file mode 100644 index 0000000..b7310f8 --- /dev/null +++ b/conf/bblayers.conf.rpi.sample @@ -0,0 +1,41 @@ +############################################################################# +## +## 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$ +## +############################################################################# + +# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +LCONF_VERSION = "6" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" +BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}" + +BBLAYERS ?= " \ + ${BSPDIR}/sources/poky/meta \ + ${BSPDIR}/sources/poky/meta-yocto \ + ${BSPDIR}/sources/meta-raspberrypi \ + ${BSPDIR}/sources/meta-openembedded/meta-oe \ + ${BSPDIR}/sources/meta-b2qt \ + " +BBLAYERS_NON_REMOVABLE ?= " \ + ${BSPDIR}/sources/poky/meta \ + ${BSPDIR}/sources/poky/meta-yocto \ + " diff --git a/conf/bblayers.conf.sample b/conf/bblayers.conf.sample index 3636297..42c84d2 100644 --- a/conf/bblayers.conf.sample +++ b/conf/bblayers.conf.sample @@ -26,24 +26,25 @@ LCONF_VERSION = "6" BBPATH = "${TOPDIR}" BBFILES ?= "" +BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}" BBLAYERS ?= " \ - ##COREBASE##/meta \ - ##COREBASE##/meta-yocto \ - ##COREBASE##/../meta-fsl-arm \ - ##COREBASE##/../meta-fsl-arm-extra \ - ##COREBASE##/../meta-beagleboard/common-bsp \ - ##COREBASE##/../meta-ti \ - ##COREBASE##/../meta-raspberrypi \ - ##COREBASE##/../meta-toradex \ - ##COREBASE##/../meta-openembedded/meta-oe \ - ##COREBASE##/../meta-b2qt \ - ##COREBASE##/../meta-b2qt/meta-ti-extras \ - ##COREBASE##/../meta-b2qt/meta-fsl-extras \ - ##COREBASE##/../meta-b2qt/meta-beagleboard-extras \ - ##COREBASE##/../meta-b2qt/meta-toradex-extras \ + ${BSPDIR}/sources/poky/meta \ + ${BSPDIR}/sources/poky/meta-yocto \ + ${BSPDIR}/sources/meta-fsl-arm \ + ${BSPDIR}/sources/meta-fsl-arm-extra \ + ${BSPDIR}/sources/meta-beagleboard/common-bsp \ + ${BSPDIR}/sources/meta-ti \ + ${BSPDIR}/sources/meta-raspberrypi \ + ${BSPDIR}/sources/meta-toradex \ + ${BSPDIR}/sources/meta-openembedded/meta-oe \ + ${BSPDIR}/sources/meta-b2qt \ + ${BSPDIR}/sources/meta-b2qt/meta-ti-extras \ + ${BSPDIR}/sources/meta-b2qt/meta-fsl-extras \ + ${BSPDIR}/sources/meta-b2qt/meta-beagleboard-extras \ + ${BSPDIR}/sources/meta-b2qt/meta-toradex-extras \ " BBLAYERS_NON_REMOVABLE ?= " \ - ##COREBASE##/meta \ - ##COREBASE##/meta-yocto \ + ${BSPDIR}/sources/poky/meta \ + ${BSPDIR}/sources/poky/meta-yocto \ " diff --git a/conf/bblayers.conf.ti.sample b/conf/bblayers.conf.ti.sample new file mode 100644 index 0000000..f1a4557 --- /dev/null +++ b/conf/bblayers.conf.ti.sample @@ -0,0 +1,42 @@ +############################################################################# +## +## 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$ +## +############################################################################# + +# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +LCONF_VERSION = "6" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" +BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}" + +BBLAYERS ?= " \ + ${BSPDIR}/sources/poky/meta \ + ${BSPDIR}/sources/poky/meta-yocto \ + ${BSPDIR}/sources/meta-ti \ + ${BSPDIR}/sources/meta-openembedded/meta-oe \ + ${BSPDIR}/sources/meta-b2qt \ + ${BSPDIR}/sources/meta-b2qt/meta-ti-extras \ + " +BBLAYERS_NON_REMOVABLE ?= " \ + ${BSPDIR}/sources/poky/meta \ + ${BSPDIR}/sources/poky/meta-yocto \ + " diff --git a/conf/bblayers.conf.toradex.sample b/conf/bblayers.conf.toradex.sample new file mode 100644 index 0000000..30c79d6 --- /dev/null +++ b/conf/bblayers.conf.toradex.sample @@ -0,0 +1,45 @@ +############################################################################# +## +## 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$ +## +############################################################################# + +# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +LCONF_VERSION = "6" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" +BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}" + +BBLAYERS ?= " \ + ${BSPDIR}/sources/poky/meta \ + ${BSPDIR}/sources/poky/meta-yocto \ + ${BSPDIR}/sources/meta-fsl-arm \ + ${BSPDIR}/sources/meta-fsl-arm-extra \ + ${BSPDIR}/sources/meta-toradex \ + ${BSPDIR}/sources/meta-openembedded/meta-oe \ + ${BSPDIR}/sources/meta-b2qt \ + ${BSPDIR}/sources/meta-b2qt/meta-fsl-extras \ + ${BSPDIR}/sources/meta-b2qt/meta-toradex-extras \ + " +BBLAYERS_NON_REMOVABLE ?= " \ + ${BSPDIR}/sources/poky/meta \ + ${BSPDIR}/sources/poky/meta-yocto \ + " diff --git a/scripts/setup_environment.sh b/scripts/setup_environment.sh index 63f59cf..aaba070 100755 --- a/scripts/setup_environment.sh +++ b/scripts/setup_environment.sh @@ -27,8 +27,8 @@ usage() { clean() { unset BUILDDIR - unset NEWBUILD unset TEMPLATECONF + unset LAYERSCONF } CWD=`pwd` @@ -57,42 +57,37 @@ if [ -z "$MACHINE" ]; then return 1 fi -if [ ! -d ${CWD}/${BUILDDIR} ]; then - NEWBUILD=1 -fi - -export TEMPLATECONF=${CWD}/sources/meta-b2qt/conf -cd sources/poky -. ./oe-init-build-env ${CWD}/${BUILDDIR} - -if [ -n "${NEWBUILD}" ]; then +if [ ! -f ${CWD}/${BUILDDIR}/conf/bblayers.conf ]; then case ${MACHINE} in apalis-imx6) - LAYERS="meta-raspberrypi meta-beagleboard meta-ti" + LAYERSCONF="bblayers.conf.toradex.sample" ;; imx53qsb|imx6qsabresd|nitrogen6x) - LAYERS="meta-raspberrypi meta-beagleboard meta-toradex meta-ti" + LAYERSCONF="bblayers.conf.fsl.sample" ;; beagleboard|am335x-evm) - LAYERS="meta-raspberrypi meta-beagleboard meta-toradex meta-fsl" + LAYERSCONF="bblayers.conf.ti.sample" ;; beaglebone) - LAYERS="meta-raspberrypi meta-toradex meta-fsl" + LAYERSCONF="bblayers.conf.bbb.sample" ;; raspberrypi) - LAYERS="meta-beagleboard meta-toradex meta-ti meta-fsl" + LAYERSCONF="bblayers.conf.rpi.sample" ;; emulator) - LAYERS="meta-raspberrypi meta-beagleboard meta-toradex meta-ti meta-fsl" + LAYERSCONF="bblayers.conf.emulator.sample" ;; *) - echo "Unknown MACHINE, bblayer.conf might need manual editing" + LAYERSCONF="bblayers.conf.sample" + echo "Unknown MACHINE, bblayers.conf might need manual editing" ;; esac - for layer in ${LAYERS}; do - sed -i -e "/${layer}/d" conf/bblayers.conf - done + mkdir -p ${CWD}/${BUILDDIR}/conf + cp ${CWD}/sources/meta-b2qt/conf/${LAYERSCONF} ${CWD}/${BUILDDIR}/conf/bblayers.conf fi +export TEMPLATECONF=${CWD}/sources/meta-b2qt/conf +cd sources/poky +. ./oe-init-build-env ${CWD}/${BUILDDIR} clean -- cgit v1.2.3-54-g00ecf