Coder Social home page Coder Social logo

pranoygoru / openbmc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from facebook/openbmc

0.0 0.0 0.0 8.2 MB

OpenBMC is an open software framework to build a complete Linux image for a Board Management Controller (BMC).

Makefile 0.85% C 64.91% BitBake 3.42% Shell 6.54% Python 13.01% C++ 10.89% CMake 0.19% JavaScript 0.02% Assembly 0.05% PHP 0.12% Perl 0.01%

openbmc's Introduction

OpenBMC

OpenBMC is an open software framework to build a complete Linux image for a Board Management Controller (BMC).

OpenBMC uses the Yocto Project as the underlying building and distro generation framework.

Board Status Description
Wedge100 Build Status A 32x100G TOR switch
Lightning Build Status A flexible NVMe JBOF
Yosemite Build Status An open source modular chassis for high-powered microservers
Wedge Build Status A 40G OS-agnostic TOR switch
Bryce Canyon Build Status Disk Storage platform

Contents

This repository includes 3 set of layers:

  • OpenBMC Common Layer - Common packages and recipes can be used in different types of BMC.
  • BMC System-on-Chip (SoC) Layer - SoC specific drivers and tools. This layer includes the bootloader (u-boot) and the Linux kernel. Both the bootloader and Linux kernel shall include the hardware drivers specific for the SoC.
  • Board Specific Layer - Board specific drivers, configurations, and tools. This layer defines how to configure the image. It also defines what packages to be installed for an OpenBMC image for this board. Any board specific initialization and tools are also included in this layer.

File structure

The Yocto naming pattern is used in this repository. A "meta-layer" is used to name a layer or a category of layers. And recipe-abc is used to name a recipe. The project will exist as a meta layer itself! Within the Yocto Project's distribution call this project meta-openbmc.

The recipes for OpenBMC common layer are found in common.

The BMC SoC layer and board specific layer are grouped together based on the vendor/manufacturer name. For example, all Facebook boards specific code should be in meta-facebook. Likewise, meta-aspeed includes source code for Aspeed SoCs.

How to build

Note: In the instruction set below, references to for some of the steps is an example only and need to be replaced with the respective platform when setting up for a different platform.

  1. Set up the build environment based on the Yocto Project's Quick Start Guide.

  2. Clone Yocto repository:

$ git clone -b krogoth https://git.yoctoproject.org/git/poky
  1. Clone OpenEmbedded and OpenBMC repositories, in the new created poky directory:
$ cd poky
$ git clone -b krogoth https://github.com/openembedded/meta-openembedded.git
$ git clone -b krogoth https://git.yoctoproject.org/git/meta-security
$ git clone -b helium https://github.com/facebook/openbmc.git meta-openbmc

Note that this project does not use Yocto release branch names.

  1. Initialize a build directory. In the poky directory:
$ export TEMPLATECONF=meta-openbmc/meta-facebook/meta-<platform>/conf
$ source oe-init-build-env

Choose between meta-wedge, meta-wedge100, meta-yosemite, or any of the other platforms listed in the meta-openbmc/meta-facebook directory. After this step, you will be dropped into a build directory, poky/build.

  1. Start the build within the build directory: In general to build for the platform:
$ bitbake <platform>-image

The build process automatically fetches all necessary packages and builds the complete image. The final build results are in poky/build/tmp/deploy/images/<platform>. The root password will be 0penBmc, you may change this in the local configuration.

Kernel Development

By default, OpenBMC build process fetches and build Linux kernel directly from GitHub repository. To make local kernel changes and build with the modified kernel:

  1. Clone kernel source
$ cd poky
$ git clone -b openbmc/helium/4.1 https://github.com/theopolis/linux.git meta-openbmc/meta-aspeed/recipes-kernel/linux/files/linux-aspeed-4.1
  1. Update build recipes to point to local kernel source directory in meta-aspeed/conf/machine/include/ast2520.inc, add these 2 lines below the PREFERRED_PROVIDER_virtual/kernel ?= "linux-aspeed line

(check meta-facebook/meta-<platfom>/conf/machine/<platfom>.conf for the correct astxxxx.inc file to modify)

INHERIT += "externalsrc"
EXTERNALSRC_pn-linux-aspeed = "<dir>/meta-openbmc/meta-aspeed/recipes-kernel/linux/files/linux-aspeed-4.1"

Build Artifacts

  • u-boot.bin - This is the u-boot image for the board.
  • uImage - This the Linux kernel for the board.
  • -image-.cpio.lzma.u-boot - This is the rootfs for the board
  • flash- - This is the complete flash image including u-boot, kernel, and the rootfs.

Yocto Configuration

It is recommended to setup a new Yocto distribution (a checkout of poky). The initialization script oe-init-build-env can read the included TEMPLATECONF and set up a local build/conf/local.conf along with the associated layer/build configuration.

If you have previously set up and built poky, you may change your local configuration:

When using the example TEMPLATECONF for Wedge, the ./build/conf/templateconf.cfg:

meta-openbmc/meta-facebook/meta-<platform>/conf

The layers config ./build/conf/bblayers.conf, will contain:

BBPATH = "${TOPDIR}"
BBFILES ?= ""

BBLAYERS ?= " \
  /PREFIX/poky/meta \
  /PREFIX/poky/meta-yocto \
  /PREFIX/poky/meta-yocto-bsp \
  /PREFIX/poky/meta-openembedded/meta-oe \
  /PREFIX/poky/meta-openembedded/meta-networking \
  /PREFIX/poky/meta-openembedded/meta-python \
  /PREFIX/poky/meta-openbmc \
  /PREFIX/poky/meta-openbmc/meta-aspeed \
  /PREFIX/poky/meta-openbmc/meta-facebook/meta-<platform> \
  "
BBLAYERS_NON_REMOVABLE ?= " \
  /PREFIX/poky/meta \
  /PREFIX/poky/meta-yocto \
  "

And finally the ./build/config/local.conf will include important configuration options:

# Machine Selection
MACHINE ??= "<platform>"

# OpenBMC distro settings
DISTRO ?= "openbmc-fb"

How can I contribute

If you have an application that can be used by different BMCs, you can contribute your application to the OpenBMC common layer.

If you are a BMC SoC vendor, you can contribute your SoC specific drivers to the BMC SoC layer.

If you are a board vendor, you can contribute your board specific configurations and tools to the Board specific layer. If the board uses a new BMC SoC that is not part of the BMC SoC layer, the SoC specific driver contribution to the BMC SoC layer is also required.

openbmc's People

Contributors

jmehta avatar amithash avatar benwei13 avatar tfangit avatar vineelasmile avatar siutong avatar maheshbk avatar lyy1106 avatar covracer avatar mikechoifb avatar aeckert avatar mcallahan avatar anpetrovfb avatar squeakbat avatar facebook-github-bot avatar linhbui avatar ss18 avatar sivabmc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.