update: Add command line parsing to clean or preserve saved files

Because update now returns to shutdown for the final halt or
reboot system call it does not need to handle systemd arguments.
Instead update is being invoked from multiple environments, and
further environments will need alternate behaviors.

Add a code to start parsing the command line.  Start wtih a flag
to clean the saved files at the end of the update process.

This will reclaim the space and prevent stale saved files
from being restored without requiring the calling script to
know the location of the saved files directory.

Parse true and complement actions in case we decide to change
the defaults later.

For now keep the user feature of calling update, flashing some
files by hand, then a final call to update with a possibly
empty image file will have the original saved files merged
into the rwfs.

Signed-off-by: Milton Miller <miltonm@us.ibm.com>
1 file changed
tree: f36dd0a8e133a81474df83814109b4dfacb707c1
  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