summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2015-09-16 09:22:10 -0500
committerPatrick Williams <patrick@stwcx.xyz>2015-09-16 09:22:10 -0500
commit37eda0c49a9fc0a15002500e40da9c8bec70ebf3 (patch)
tree4a7513c85cb3b3ebd8a2814709f8f24c45b3d232
parent885cdf3f44f8a7a4f1972cb3adc18b1e80d606ce (diff)
downloadtalos-openbmc-37eda0c49a9fc0a15002500e40da9c8bec70ebf3.tar.gz
talos-openbmc-37eda0c49a9fc0a15002500e40da9c8bec70ebf3.zip
Environment helper utility.
-rw-r--r--.gitignore1
-rw-r--r--README.md12
-rw-r--r--openbmc-env16
3 files changed, 29 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index a007feab0..1a84b1b90 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
build/*
+customrc
diff --git a/README.md b/README.md
index e69de29bb..c4306b095 100644
--- a/README.md
+++ b/README.md
@@ -0,0 +1,12 @@
+## Building ##
+
+OpenBMC uses Yocto/Open-Embedded for a build system, which supports an
+out-of-tree build. It is recommended that you create an empty directory
+somewhere to hold the build. This directory will get big.
+
+To start a build:
+
+ cd <builddir>
+ . <repodir>/openbmc-env
+ bitbake obmc-phosphor-image
+
diff --git a/openbmc-env b/openbmc-env
new file mode 100644
index 000000000..03e8628e1
--- /dev/null
+++ b/openbmc-env
@@ -0,0 +1,16 @@
+if [ -n "$BASH_SOURCE" ]; then
+ OBMCROOT="`dirname $BASH_SOURCE`"
+elif [ -n "$ZSH_NAME" ]; then
+ OBMCROOT="`dirname $0`"
+else
+ OBMCROOT="`pwd`"
+fi
+
+if [ -f $OBMCROOT/customrc ]; then
+ echo "### Sourcing customrc ###"
+ . $OBMCROOT/customrc
+fi
+
+echo "### Initializing OE build env ###"
+. $OBMCROOT/oe-init-build-env
+
OpenPOWER on IntegriCloud