diff options
author | Samuli Piippo <samuli.piippo@digia.com> | 2014-09-24 18:18:06 +0300 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@digia.com> | 2014-09-26 11:41:53 +0300 |
commit | c6c57bf35d79a111ffb60cc4912b93c06c1a1afe (patch) | |
tree | 96b7ccbec9ff0bb8a5d471abb692135a48fc1f60 /scripts | |
parent | d5bdc310ef22ebbe336d5b0f8cbd12aeff94be9b (diff) | |
download | meta-boot2qt-c6c57bf35d79a111ffb60cc4912b93c06c1a1afe.tar.gz |
New initialization scripts
These initialization script will create a build environment which has only
the needed meta layers from upstream. Other repos are ignored and not even
downloaded.
Google's repo tool is used to fetch upstream repos and it can then be
used to manage the repos while developing. This has also support for
using local mirror repos.
The required repos are defined in the manifest.xml file, which can be
overwritten using a machine specific manifest_<device>.xml file.
Task-number: QTEE-760
Change-Id: I12ed9a6fddceb4de1217baaebf46277c6ef7224f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@digia.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/manifest.xml | 53 | ||||
-rwxr-xr-x | scripts/setup_environment.sh | 98 |
2 files changed, 151 insertions, 0 deletions
diff --git a/scripts/manifest.xml b/scripts/manifest.xml new file mode 100644 index 0000000..8f93116 --- /dev/null +++ b/scripts/manifest.xml | |||
@@ -0,0 +1,53 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <manifest> | ||
3 | |||
4 | <default sync-j="4" revision="daisy"/> | ||
5 | |||
6 | <remote fetch="git://git.yoctoproject.org" name="yocto"/> | ||
7 | <remote fetch="git://git.openembedded.org" name="oe"/> | ||
8 | <remote fetch="git://github.com/Freescale" name="freescale"/> | ||
9 | <remote fetch="git://github.com/beagleboard" name="beagleboard"/> | ||
10 | <remote fetch="git://git.toradex.com" name="toradex"/> | ||
11 | |||
12 | <project name="poky" | ||
13 | remote="yocto" | ||
14 | revision="b2f045c400fa8bd20b319c60137b1575f967cef1" | ||
15 | path="sources/poky"/> | ||
16 | <project name="meta-openembedded" | ||
17 | remote="oe" | ||
18 | revision="662cf409c1175450699d498085f3c894e0fe81d0" | ||
19 | path="sources/meta-openembedded"/> | ||
20 | |||
21 | <project name="meta-fsl-arm" | ||
22 | remote="yocto" | ||
23 | revision="e9bf647e10ff1e31f911d3236dbb22a1ad7ace9f" | ||
24 | path="sources/meta-fsl-arm" | ||
25 | groups="notdefault,fsl,toradex"/> | ||
26 | <project name="meta-ti" | ||
27 | remote="yocto" | ||
28 | revision="41457c50e21168faf04f3cdd4168954890d6cdab" | ||
29 | path="sources/meta-ti" | ||
30 | groups="notdefault,ti,bbb"/> | ||
31 | <project name="meta-raspberrypi" | ||
32 | remote="yocto" | ||
33 | revision="946b69299737cc2f1378c864f1b9075280db1b53" | ||
34 | path="sources/meta-raspberrypi" | ||
35 | groups="notdefault,rpi"/> | ||
36 | <project name="meta-fsl-arm-extra" | ||
37 | remote="freescale" | ||
38 | revision="e041d9a118c5eecf4010bcb41bb5c554636090ab" | ||
39 | path="sources/meta-fsl-arm-extra" | ||
40 | groups="notdefault,fsl,toradex"/> | ||
41 | <project name="meta-beagleboard" | ||
42 | remote="beagleboard" | ||
43 | revision="b5c709b2b6bd3bf236df923fa8f245a00fbb1b60" | ||
44 | path="sources/meta-beagleboard" | ||
45 | groups="notdefault,bbb"/> | ||
46 | <project name="meta-toradex" | ||
47 | remote="toradex" | ||
48 | revision="b47dad6cf9bd5be5287dac3835ea037a2fd30cf7" | ||
49 | path="sources/meta-toradex" | ||
50 | groups="notdefault,toradex"/> | ||
51 | |||
52 | </manifest> | ||
53 | |||
diff --git a/scripts/setup_environment.sh b/scripts/setup_environment.sh new file mode 100755 index 0000000..63f59cf --- /dev/null +++ b/scripts/setup_environment.sh | |||
@@ -0,0 +1,98 @@ | |||
1 | #!/bin/sh | ||
2 | ############################################################################# | ||
3 | ## | ||
4 | ## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). | ||
5 | ## | ||
6 | ## This file is part of the Qt Enterprise Embedded Scripts of the Qt | ||
7 | ## framework. | ||
8 | ## | ||
9 | ## $QT_BEGIN_LICENSE$ | ||
10 | ## Commercial License Usage Only | ||
11 | ## Licensees holding valid commercial Qt license agreements with Digia | ||
12 | ## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, | ||
13 | ## may use this file in accordance with the terms contained in said license | ||
14 | ## agreement. | ||
15 | ## | ||
16 | ## For further information use the contact form at | ||
17 | ## http://qt.digia.com/contact-us. | ||
18 | ## | ||
19 | ## | ||
20 | ## $QT_END_LICENSE$ | ||
21 | ## | ||
22 | ############################################################################# | ||
23 | |||
24 | usage() { | ||
25 | echo "source setup-environment <build-dir>" | ||
26 | } | ||
27 | |||
28 | clean() { | ||
29 | unset BUILDDIR | ||
30 | unset NEWBUILD | ||
31 | unset TEMPLATECONF | ||
32 | } | ||
33 | |||
34 | CWD=`pwd` | ||
35 | |||
36 | while test -n "$1"; do | ||
37 | case "$1" in | ||
38 | "--help" | "-h") | ||
39 | usage | ||
40 | return 0 | ||
41 | ;; | ||
42 | *) | ||
43 | BUILDDIR=$1 | ||
44 | ;; | ||
45 | esac | ||
46 | shift | ||
47 | done | ||
48 | |||
49 | if [ -z "${BUILDDIR}" ]; then | ||
50 | usage | ||
51 | return 1 | ||
52 | fi | ||
53 | |||
54 | if [ -z "$MACHINE" ]; then | ||
55 | echo "MACHINE environment variable not defined" | ||
56 | clean | ||
57 | return 1 | ||
58 | fi | ||
59 | |||
60 | if [ ! -d ${CWD}/${BUILDDIR} ]; then | ||
61 | NEWBUILD=1 | ||
62 | fi | ||
63 | |||
64 | export TEMPLATECONF=${CWD}/sources/meta-b2qt/conf | ||
65 | cd sources/poky | ||
66 | . ./oe-init-build-env ${CWD}/${BUILDDIR} | ||
67 | |||
68 | if [ -n "${NEWBUILD}" ]; then | ||
69 | case ${MACHINE} in | ||
70 | apalis-imx6) | ||
71 | LAYERS="meta-raspberrypi meta-beagleboard meta-ti" | ||
72 | ;; | ||
73 | imx53qsb|imx6qsabresd|nitrogen6x) | ||
74 | LAYERS="meta-raspberrypi meta-beagleboard meta-toradex meta-ti" | ||
75 | ;; | ||
76 | beagleboard|am335x-evm) | ||
77 | LAYERS="meta-raspberrypi meta-beagleboard meta-toradex meta-fsl" | ||
78 | ;; | ||
79 | beaglebone) | ||
80 | LAYERS="meta-raspberrypi meta-toradex meta-fsl" | ||
81 | ;; | ||
82 | raspberrypi) | ||
83 | LAYERS="meta-beagleboard meta-toradex meta-ti meta-fsl" | ||
84 | ;; | ||
85 | emulator) | ||
86 | LAYERS="meta-raspberrypi meta-beagleboard meta-toradex meta-ti meta-fsl" | ||
87 | ;; | ||
88 | *) | ||
89 | echo "Unknown MACHINE, bblayer.conf might need manual editing" | ||
90 | ;; | ||
91 | esac | ||
92 | |||
93 | for layer in ${LAYERS}; do | ||
94 | sed -i -e "/${layer}/d" conf/bblayers.conf | ||
95 | done | ||
96 | fi | ||
97 | |||
98 | clean | ||