init: Add a hook to download files

Add a hook to download a read-only file system image file from
a URL using TFTP, HTTP, or FTP.  The URL is retrieved from a
u-boot environment variable unless the file is already in the
initramfs image.  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,
and allow each protocol to be disabled by simiar build options.

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 specifying
debug-init-sh, entering the password, and doing the download from
the shell.

Note: Access to set u-boot environment variables implys the
ability to replace the kernel and initramfs session.  Access to
the variables and the serial console likely gives full root access
to the system at this time.  The existing shutdown and update
scripts have paths that expose a root shell to the serial port
without a prior password challenge.

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