summaryrefslogtreecommitdiffstats
path: root/scripts/setup_environment.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/setup_environment.sh')
-rwxr-xr-xscripts/setup_environment.sh35
1 files changed, 15 insertions, 20 deletions
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() {
27 27
28clean() { 28clean() {
29 unset BUILDDIR 29 unset BUILDDIR
30 unset NEWBUILD
31 unset TEMPLATECONF 30 unset TEMPLATECONF
31 unset LAYERSCONF
32} 32}
33 33
34CWD=`pwd` 34CWD=`pwd`
@@ -57,42 +57,37 @@ if [ -z "$MACHINE" ]; then
57 return 1 57 return 1
58fi 58fi
59 59
60if [ ! -d ${CWD}/${BUILDDIR} ]; then 60if [ ! -f ${CWD}/${BUILDDIR}/conf/bblayers.conf ]; then
61 NEWBUILD=1
62fi
63
64export TEMPLATECONF=${CWD}/sources/meta-b2qt/conf
65cd sources/poky
66. ./oe-init-build-env ${CWD}/${BUILDDIR}
67
68if [ -n "${NEWBUILD}" ]; then
69 case ${MACHINE} in 61 case ${MACHINE} in
70 apalis-imx6) 62 apalis-imx6)
71 LAYERS="meta-raspberrypi meta-beagleboard meta-ti" 63 LAYERSCONF="bblayers.conf.toradex.sample"
72 ;; 64 ;;
73 imx53qsb|imx6qsabresd|nitrogen6x) 65 imx53qsb|imx6qsabresd|nitrogen6x)
74 LAYERS="meta-raspberrypi meta-beagleboard meta-toradex meta-ti" 66 LAYERSCONF="bblayers.conf.fsl.sample"
75 ;; 67 ;;
76 beagleboard|am335x-evm) 68 beagleboard|am335x-evm)
77 LAYERS="meta-raspberrypi meta-beagleboard meta-toradex meta-fsl" 69 LAYERSCONF="bblayers.conf.ti.sample"
78 ;; 70 ;;
79 beaglebone) 71 beaglebone)
80 LAYERS="meta-raspberrypi meta-toradex meta-fsl" 72 LAYERSCONF="bblayers.conf.bbb.sample"
81 ;; 73 ;;
82 raspberrypi) 74 raspberrypi)
83 LAYERS="meta-beagleboard meta-toradex meta-ti meta-fsl" 75 LAYERSCONF="bblayers.conf.rpi.sample"
84 ;; 76 ;;
85 emulator) 77 emulator)
86 LAYERS="meta-raspberrypi meta-beagleboard meta-toradex meta-ti meta-fsl" 78 LAYERSCONF="bblayers.conf.emulator.sample"
87 ;; 79 ;;
88 *) 80 *)
89 echo "Unknown MACHINE, bblayer.conf might need manual editing" 81 LAYERSCONF="bblayers.conf.sample"
82 echo "Unknown MACHINE, bblayers.conf might need manual editing"
90 ;; 83 ;;
91 esac 84 esac
92 85
93 for layer in ${LAYERS}; do 86 mkdir -p ${CWD}/${BUILDDIR}/conf
94 sed -i -e "/${layer}/d" conf/bblayers.conf 87 cp ${CWD}/sources/meta-b2qt/conf/${LAYERSCONF} ${CWD}/${BUILDDIR}/conf/bblayers.conf
95 done
96fi 88fi
97 89
90export TEMPLATECONF=${CWD}/sources/meta-b2qt/conf
91cd sources/poky
92. ./oe-init-build-env ${CWD}/${BUILDDIR}
98clean 93clean