Hack to make fw_setenv work

The fw_setenv is not working with the kernel mtd driver.  It works
on a plain flat file, and flashcp which is used in /update works.

Find the u-boot-env mtd, link it in run and copy the contents to a
plain file in /run during init.  In shutdown, check for the link,
the file having data, no current image update for the u-boot-env,
and that the content differs from the mtd via the link.  If all
are true create a symlink to the file and trigger the update.

Along wtih changing the fw_env.config this causes the fw_setenv
and fw_printenv utilities to set and update this cached file which
will be synced during a normal bmc reboot.  This will allow us to
set the ethaddr variable which already requires a reboot to activate.

Note: the links are directly in /run because the fw_{set,print}env
utilities limit the env file name to 16 characters.

Signed-off-by: Milton Miller <miltonmm@us.ibm.com>
3 files changed
tree: cba4f8f829bb04ba87cdd5dbcff0589025050a8c
  1. meta-openbmc-bsp/
  2. meta-openbmc-machines/
  3. meta-phosphor/
  4. yocto-poky/
  5. .gitignore
  6. .templateconf
  7. openbmc-env
  8. README.md
README.md

OpenBMC

Build Status

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.

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