1 2# OpenBMC cheatsheet 3 4This document is intended to provide a set of recipes for common OpenBMC 5customisation tasks, without having to know the full yocto build process. 6 7## Using a local kernel build 8 9The kernel recipe is in: 10 11``` 12 meta-phosphor/common/recipes-kernel/linux/linux-obmc_4.2.bb 13``` 14 15To use a local git tree, change the `SRC_URI` to a git:// URL without 16a hostname. For example: 17 18``` 19SRC_URI = "git:///home/jk/devel/linux;protocol=git;branch=${KBRANCH}" 20``` 21 22The `SRCREV` variable can be used to set an explicit git commit. The 23default (`${AUTOREV}`) will use the latest commit in `KBRANCH`. 24 25## Building for Palmetto 26 27The Palmetto target is `palmetto`. 28 29If you are starting from scratch without a `build/conf` directory you can just: 30``` 31$ cd openbmc 32$ TEMPLATECONF=meta-openbmc-machines/meta-openpower/meta-ibm/meta-palmetto/conf . oe-init-build-env 33$ bitbake obmc-phosphor-image 34``` 35 36## Building the OpenBMC SDK 37Looking for a way to compile your programs for 'ARM' but you happen to be running on a 'PPC' or 'x86' system? You can build the sdk receive a fakeroot environment. 38``` 39$ bitbake -c populate_sdk obmc-phosphor-image 40$ ./tmp/deploy/sdk/openbmc-phosphor-glibc-x86_64-obmc-phosphor-image-armv5e-toolchain-1.8+snapshot.sh 41``` 42Follow the prompts. After it has been installed the default to setup your env will be similar to this command 43``` 44. /opt/openbmc-phosphor/1.8+snapshot/environment-setup-armv5e-openbmc-linux-gnueabi 45``` 46 47## Rebuilds & Reconfiguration 48 49You can reconfigure your build by removing the build/conf dir: 50``` 51rm -rf build/conf 52``` 53and running `oe-init-build-env` again (possibly with `TEMPLATECONF` set). 54 55## Useful dbus CLI tools 56 57## `busctl` 58 59http://www.freedesktop.org/software/systemd/man/busctl.html 60 61Great tool to issue dbus commands via cli. That way you don't have to wait for 62the code to hit the path on the system. Great for running commands with QEMU 63too! 64 65Run as: 66 67``` 68busctl call <path> <interface> <object> <method> <parameters> 69``` 70 71* \<parameters\> example : sssay "t1" "t2" "t3" 2 2 3 72