aboutsummaryrefslogtreecommitdiffstats
path: root/org.openembedded.bc.ui/scripts/gumstix_install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'org.openembedded.bc.ui/scripts/gumstix_install.sh')
-rw-r--r--org.openembedded.bc.ui/scripts/gumstix_install.sh68
1 files changed, 68 insertions, 0 deletions
diff --git a/org.openembedded.bc.ui/scripts/gumstix_install.sh b/org.openembedded.bc.ui/scripts/gumstix_install.sh
new file mode 100644
index 0000000..84264ba
--- /dev/null
+++ b/org.openembedded.bc.ui/scripts/gumstix_install.sh
@@ -0,0 +1,68 @@
+#!/bin/bash
+# Installation script for Gumstix build system.
+# Adapted from instructions available at http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Setting-up-a-build-environment/111.html
+# This script should be executable after substituting ${} variables with real values.
+# 4/8/2010 Ken Gilmer, based on a script provided by Ash Charles
+
+# These are the variables that are queried in the UI. The following lines are parsed by the install wizard.
+# {|D|Install Directory|R|${HOME}/gumstix-oe|http://www.gumstix.net/Setup-and-Programming/view/Getting-started/Setting-up-a-build-environment/111.html|Location to install OE metadata.|}
+# {|D|Download Directory|R|${HOME}/gumstix-dl||Location to install source packages.|}
+# {|D|Build Directory|R|${HOME}/gumstix-build||Location for temporary build files.|}
+# {|D|Temp Directory|R|${HOME}/gumstix-tmp||}
+# {|T|Repository URL|R|git://gitorious.org/gumstix-oe/mainline.git org.openembedded.dev||}
+# {|C|Machine Type|R|overo,verdex||Gumstix device type.|}
+# {|T|Init Script|R|build/profile||Environment initialization script.|}
+# {|B|Configure Host|R|false||Modify the system configuration file sysctl.conf to work with OpenEmbedded.|}
+# {|B|Install Host Packages|R|false||Install required Ubunutu packages.|}
+
+which ssh-askpass
+# Installing OE Dependencies
+export SUDO_ASKPASS=`which ssh-askpass`
+test ${Install Host Packages} = true && sudo -A apt-get update
+test ${Install Host Packages} = true && sudo -A apt-get install -y git-core subversion build-essential help2man diffstat texi2html texinfo libncurses5-dev cvs gawk python-dev python-pysqlite2 unzip
+# Configuring Host Machine
+test ${Configure Host} = true && sudo -A ln -sf /bin/bash /bin/sh
+test ${Configure Host} = true && sudo -A sh -c 'echo -e "vm.vdso_enabled=0" >> /etc/sysctl.conf'
+test ${Configure Host} = true && sudo -A sh -c 'echo -e "vm.mmap_min_addr=0" >> /etc/sysctl.conf'
+test ${Configure Host} = true && sudo -A sysctl -p
+
+# Cloning OE Repository
+mkdir -p ${Install Directory}
+cd ${Install Directory}
+git clone --verbose --progress ${Repository URL}
+test ! -d org.openembedded.dev && echo "ERROR: Repository clone of ${Repository URL} failed. !!OTEWIZARDSTOP"
+
+# Configuring Machine Type
+cd org.openembedded.dev
+git checkout --track -b ${Machine Type} origin/${Machine Type}
+# Cloning Bitbake Repository
+cd ${Install Directory}
+git clone git://git.openembedded.net/bitbake bitbake
+cd bitbake
+git checkout 1.8.18
+
+cd ${Install Directory}
+
+# Setup environment
+cp -r org.openembedded.dev/contrib/gumstix/build .
+cd build/
+mv profile profile.orig
+echo '# Gumstix OE init file generated by OTE' > profile
+echo 'export BB_ENV_EXTRAWHITE="MACHINE DISTRO ANGSTROM_MODE OVEROTOP OEBRANCH USERBRANCH TITOOLSDIR"' >> profile
+echo 'export OVEROTOP="${Install Directory}"' >> profile
+echo 'export OEBRANCH="${OVEROTOP}/org.openembedded.dev"' >> profile
+echo 'export USERBRANCH="${OVEROTOP}/user.collection"' >> profile
+echo 'export PATH="${OVEROTOP}/bitbake/bin:$PATH"' >> profile
+echo 'export BBPATH="${OVEROTOP}/build:${USERBRANCH}:${OEBRANCH}"' >> profile
+echo 'export TITOOLSDIR="${OVEROTOP}/ti"' >> profile
+echo 'umask 0002' >> profile
+
+mkdir ${Install Directory}/user.collection
+
+# Fix the locations of the Download and sources directories
+cd ${Install Directory}/build/conf/
+sed 's|DL_DIR = "${OVEROTOP}/sources"|DL_DIR = "${Download Directory}"|' site.conf > site.conf2
+sed 's|TMPDIR = ${OVEROTOP}/tmp|TMPDIR = ${Temp Directory}|' site.conf2 > site.conf3
+mv site.conf site.conf.orig
+rm site.conf2
+mv site.conf3 site.conf