aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2013-11-02 12:12:22 -0700
committerKhem Raj <raj.khem@gmail.com>2013-11-02 12:12:22 -0700
commit454250b85ddf701c8b9b37c039a8861f67362277 (patch)
tree0486eab25ea9f2191d33fabe18ad8c66c3255f9f
parent545425112a0d7722381b7906308e99937c0b5d56 (diff)
fix environment script and point meta-angstrom to right repo
environment script needs to create a whole lot of stuff for build to get going. This is first stab at it Change-Id: If04787e9eca464543c355f320b2897f16b540c64 Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--default.xml2
-rw-r--r--setup-environment70
2 files changed, 46 insertions, 26 deletions
diff --git a/default.xml b/default.xml
index 82597ba..561b5bc 100644
--- a/default.xml
+++ b/default.xml
@@ -31,7 +31,7 @@
<project remote="github" revision="master" name="meta-qt5/meta-qt5" path="sources/meta-qt5"/>
<project remote="github" revision="master" name="shr-distribution/meta-smartphone" path="sources/meta-smartphone"/>
- <project remote="github" revision="master" name="kraj/meta-angstrom" path="sources/meta-angstrom">
+ <project remote="github" revision="master" name="Angstrom-distribution/meta-angstrom" path="sources/meta-angstrom">
<copyfile dest="README" src="README"/>
<copyfile dest="setup-environment" src="../../.repo/manifests/setup-environment"/>
</project>
diff --git a/setup-environment b/setup-environment
index e49ffb5..0ffb1e2 100644
--- a/setup-environment
+++ b/setup-environment
@@ -1,8 +1,9 @@
#!/bin/sh
# -*- mode: shell-script-mode; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
#
-# Copyright (C) 2012 O.S. Systems Software LTDA.
+# Copyright (C) 2012-13 O.S. Systems Software LTDA.
# Authored-by: Otavio Salvador <otavio@ossystems.com.br>
+# Adopted to Angstrom: Khem Raj <raj.khem@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -30,20 +31,19 @@ if [ -z "$SDKMACHINE" ]; then
SDKMACHINE='x86-64'
fi
-if [ -z "$DISTRO" ]; then
- DISTRO='angstrom-next'
-fi
-
CWD=$PWD
OEROOT=$CWD
-# Ensure all files in sources/base are kept in sync with project root
+# Ensure all files in base are kept in sync with project root
updated=
-for f in $CWD/sources/base/*; do
+for f in `find $CWD/.repo/manifests/ -type f`; do
file="$(basename $f)"
- if [ "$file" = "conf" ] || echo $file | grep -q '~$'; then
- continue
- fi
+ case $file in
+ *.xml)
+ continue;;
+ *)
+ ;;
+ esac
if ! cmp -s "$file" "$f"; then
updated="true"
@@ -61,24 +61,45 @@ cd $OEROOT
# Clean up PATH, because if it includes tokens to current directories somehow,
# wrong binaries can be used instead of the expected ones during task execution
export PATH="`echo $PATH | sed 's/\(:.\|:\)*:/:/g;s/^.\?://;s/:.\?$//'`"
+export PATH=${OEROOT}/sources/openembedded-core/scripts:${OEROOT}/sources/bitbake/bin:${PATH}
-# Generate the local.conf based on the Yocto defaults
-TEMPLATES=$CWD/sources/base/conf
-NCPU=`grep -c processor /proc/cpuinfo`
-grep -v '^#\|^$' conf/local.conf.sample > conf/local.conf
-echo 'BBMASK = "meta-star/recipes-zollapps"' >> conf/local.conf
-cat >> conf/auto.conf <<EOF
+mkdir -p conf
-BB_NUMBER_THREADS = '$NCPU'
-PARALLEL_MAKE = '-j $NCPU'
+ln -sf $TEMPLATES/local.conf conf/local.conf
+ln -sf $TEMPLATES/bblayers.conf conf/bblayers.conf
+
+DISTRO=$(grep -w DISTRO conf/local.conf | grep -v '^#' | awk -F\" '{print $2}')
+export DISTRO_DIRNAME=`echo $DISTRO | sed s#[.-]#_#g`
+
+TEMPLATES=$CWD/.repo/manifests/conf
+NCPU=`grep -c processor /proc/cpuinfo`
+cat > conf/auto.conf <<EOF
+BB_NUMBER_THREADS = "$NCPU"
+PARALLEL_MAKE = "-j $NCPU"
+MACHINE ?= "$MACHINE"
+SDKMACHINE ?= "$SDKMACHINE"
EOF
- # Change settings according environment
-sed -e "s,MACHINE ??=.*,MACHINE ??= '$MACHINE',g" \
- -e "s,SDKMACHINE ??=.*,SDKMACHINE ??= '$SDKMACHINE',g" \
- -e "s,DISTRO ?=.*,DISTRO ?= '$DISTRO',g" \
- -i conf/local.conf
+if [ ! -e conf/site.conf ]; then
+ cat > conf/site.conf <<_EOF
-cp $TEMPLATES/* conf/
+SCONF_VERSION = "1"
+
+# Where to store sources
+DL_DIR = "${OEROOT}/downloads"
+
+# Where to save shared state
+SSTATE_DIR = "${OEROOT}/build/sstate-cache"
+
+# Which files do we want to parse:
+BBFILES ?= "${OEROOT}/sources/openembedded-core/meta/recipes-*/*/*.bb"
+
+TMPDIR = "${OEROOT}/build/tmp-${DISTRO_DIRNAME}"
+
+# Go through the Firewall
+#HTTP_PROXY = "http://${PROXYHOST}:${PROXYPORT}/"
+
+_EOF
+fi
cat <<EOF
@@ -103,7 +124,6 @@ Your build environemnt has been configured with:
MACHINE=$MACHINE
SDKMACHINE=$SDKMACHINE
- DISTRO=$DISTRO
EOF
else
echo "Your configuration files at $1 has not been touched."