--- /dev/null
+#!/bin/bash
+
+# Preferred way of using this script is 'source baikal-oe-init'
+# Rather than just running it in terminal.
+
+# Download OpenEmbedded Core project.
+
+rm -rf tmp
+git clone git://git.openembedded.org/openembedded-core tmp
+
+
+cd tmp
+git checkout bed837c23ead
+cd ..
+
+
+rm -rf meta
+rm -rf meta-s*
+rm -rf cont*
+rm L*
+rm R*
+rm M*
+rm -rf scripts
+
+
+mv tmp/* -t .
+mv tmp/.templateconf -t .
+
+# Openembedded project is developed separately.
+
+# Open Embedded build tool.
+# Separate project that is developed separately as well.
+git clone git://git.openembedded.org/bitbake bitbake
+
+cd bitbake
+git checkout 209f7ba352b
+cd ../
+
+# Certain variables must be seen by Bitbake
+# and BB_ENV_PASSTHROUGH just does not work
+export BB_PRESERVE_ENV=1
+
+# Prepare build directory and setup all required configs in place.
+# You may need to run this command again manualy if this script was run
+# rather than sourced.
+BITBAKEDIR=bitbake TEMPLATECONF=meta-baikal/conf/templates/default source oe-init-build-env
+