Create obmc-phosphor-initfs startup and shutdown scripts

This recipe holds the key scripts for an initramfs image.
Written in sh to run with busybox, these three scripts handle
mounting, unmounting, and updating a set of mtd partitions to
form a read-write overlay on a read-only compressed base.

The init script will mount the base sysfs, proc, and devtmpfs as
well as run.  It copies the filesystem to run/initramfs to create
the shutdown and update environment.  It then mounts a base
read-only and read-write file system and then an overlay of them
combined, then continues with chroot into the overlay and execute
the normal /sbin/init.

The shutdown script will unmount the remaining nodev and root
filesystems from oldroot where systemd-shutdown pivots the old
file system, then looks for image- files. If any are found it
invokes update otherwise it performs the final reboot, powerdown,
or kexec, or halt.

The update script will attempt to mount the read/write overlay
and preserve selected files and directories based on a whitelist.
It then unmounts that fs and writes all image files to their
named mtd partition using flashcp, mounts and restores the saved
files, and finally unmounts the fs and performs the final reboot,
shutdown, kexec, or halt.

Signed-off-by: Milton Miller <miltonm@us.ibm.com>
6 files changed
tree: 7cc0284b25a6de5725b6c2137dcb21c5f3e6969c
  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