commit | 0e77514678f66cde28a00a7618c9d20c88c92a5a | [log] [tgz] |
---|---|---|
author | Milton D. Miller II <miltonm@us.ibm.com> | Wed Jan 20 14:57:54 2016 -0600 |
committer | Milton D. Miller II <miltonm@us.ibm.com> | Thu Jan 28 15:45:20 2016 -0600 |
tree | 7cc0284b25a6de5725b6c2137dcb21c5f3e6969c | |
parent | 1af7dcca3b1e9e4904b3a386ccb18b8526da9ba9 [diff] |
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>
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