commit | c88619fdecc799c38a95df5489a4fa09de09e71e | [log] [tgz] |
---|---|---|
author | Milton D. Miller II <miltonm@us.ibm.com> | Wed Mar 02 18:28:54 2016 -0600 |
committer | Milton D. Miller II <miltonm@us.ibm.com> | Fri Mar 04 11:25:38 2016 -0600 |
tree | 52eea1931c3441e518a347c76b14076e8d3ffb90 | |
parent | c77c92ac0fe2b2fa48d36190cee934359960d88e [diff] |
init: Add a hook to download files Add a hook to run a shell command line that is stored in a u-boot environment variable. Only execute this command if the previously established options file has a keyword trigger. Do not even consider the option if a build option flag is not set to y. This allows one to specify at u-boot commands that would download a read-only file system into memory for execution this boot instead of needing to create a custom initramfs to netboot or specifing debug-init-sh, entering the password, and doing the download from the shell. If the u-boot environment variable is empty or missing but both the build variable is set and the keyword trigger are set print a diagnostic message. If the command fails invoke standard debug_takeover for corrective action. An example script: fw_setenv openbmcinitdownload 'cp /proc/net/pnp /run/resolv.conf ; ln -snf ../run/resolv.conf /etc/resolv.conf ; wget -O /run/image-rofs http://server.example.com/path/image-test-rofs'
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.
On Ubuntu 14.04 the following packages are required to build the default target
sudo apt-get install -y git build-essential libsdl1.2-dev texinfo gawk chrpath diffstat
On Fedora 23 the following packages are required to build the default target:
sudo dnf install -y git patch diffstat texinfo chrpath SDL-devel bitbake sudo dnf groupinstall "C Development Tools and Libraries"
To start a build:
cd <builddir> . <repodir>/openbmc-env bitbake obmc-phosphor-image