Giter Site home page Giter Site logo

fb_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

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

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

  2. Clone Yocto repository:

$ git clone -b fido https://git.yoctoproject.org/git/poky
  1. Clone OpenEmbedded and OpenBMC repositories, in the new created poky directory:
$ cd poky
$ git clone -b fido https://github.com/openembedded/meta-openembedded.git
$ git clone -b fido https://git.yoctoproject.org/git/meta-security
$ git clone 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-wedge/conf
$ source oe-init-build-env

Choose between meta-wedge, meta-wedge100, and meta-yosemite. After this step, you will be dropped into a build directory, poky/build.

  1. Start the build within the build directory:
$ bitbake wedge-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/wedge. The root password will be 0penBmc, you may change this in the local configuration.

Build Artifacts

  • u-boot.bin - This is the u-boot image for the board.
  • uImage - This the Linux kernel for the board.
  • wedge-image-wedge.cpio.lzma.u-boot - This is the rootfs for the board
  • flash-wedge - 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-wedge/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-wedge \
  "
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 ??= "wedge"

# 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.

fb_openbmc's People

Contributors

jmehta avatar siutong avatar tfangit avatar vineelasmile avatar benwei13 avatar amithash avatar mcallahan avatar mikechoifb avatar aeckert avatar igor-prusov avatar petermartini avatar larryming avatar

Watchers

BonnieLo-wiwynn avatar

Forkers

mattwiw

fb_openbmc's Issues

yosemite4-n: some of the gpios' multi-function pin are not correct

The following GPIO pins are not correct.

Pin name Issue Status
GPIO04 wrong direction
GPIO05 wrong direction
GPIO06 wrong direction
GPIO09 wrong direction
SMB16_SCL wrong function
SMB16_SDA wrong function
GPIO12 wrong direction
GPIO13 wrong direction
GPIO14 wrong direction
GPIO15 wrong direction
PSPI_DI wrong function
PSPI_DO wrong function
PSPI_CK wrong function
GPIO24 wrong direction
GPI35_AHB2PCI_EN wrong function
GPIO44 wrong function
GPIO45 wrong function
GPIO46 wrong function
TPU_TXD wrong function
TPU_RXD wrong function
GPIO54 wrong function
GPIO55 wrong function
R1_RXERR wrong function
GPIO57 wrong direction
GPIO62 wrong function
R2_RXERR wrong function
GPIO93 wrong direction
GPIO96 wrong direction
BU4_RXD wrong function
BU4_TXD wrong function
BU5_RXD wrong function
BU5_TXD wrong function
GPIO108 wrong function
GPIO109 wrong function
GPIO110 wrong function
GPIO111 wrong function
GPIO112 wrong function
GPIO113 wrong function
GPIO120 wrong direction
GPIO122 wrong direction
GPIO125 wrong direction
GPIO126 wrong direction
GPIO148 wrong function
GPIO149 wrong function
GPIO150 wrong function
GPIO151 wrong function
GPIO152 wrong function
GPIO154 wrong function
GPIO156 wrong function
GPIO157 wrong function
GPIO158 wrong function
GPIO159 wrong function
GPIO162 wrong direction
GPIO183 wrong function
GPIO184 wrong function
GPIO188 wrong function
GPIO189 wrong function
GPIO190 wrong direction
GPIO194 wrong direction
GPIO196 wrong direction
GPIO203 wrong direction change function to PSPI?
GPIO208 wrong function
GPIO209 wrong function
GPIO210 wrong function
GPIO211 wrong function
GPIO212 wrong function
GPIO213 wrong function
GPIO214 wrong function
GPIO215 wrong function
GPIO216 wrong function
GPIO217 wrong function
WDO1# wrong function
WDO2# wrong function
GPIO228 wrong direction
GPIO233 wrong direction change function to PSPI?
GPIO235 wrong direction

yosemite4-n: jtag test failed

Used jtag-tool to test jtag of CPLD1 and CPLD2 but get following messages

root@yosemite4-n:~# jtag-tool id_code -c 0
Failed in jtag interface end_tap_state.
Error in getCpldIdCode in 107

root@yosemite4-n:~# jtag-tool user_code -c 0
Failed in jtag interface end_tap_state.
Failed in jtag interface xfer.
Error in getCpldUserCode in 51

root@yosemite4-n:~# gpioset gpiochip3 24=1
root@yosemite4-n:~# jtag-tool id_code -c 0
Failed in jtag interface end_tap_state.
Error in getCpldIdCode in 107

root@yosemite4-n:~# jtag-tool user_code -c 0
Failed in jtag interface end_tap_state.
Failed in jtag interface xfer.
Error in getCpldUserCode in 51

The Jtag driver was probed and the jtag device was created.

root@yosemite4-n:~# dmesg | grep jtag
jtag-master f0208000.jtm: npcm_jtm_probe

root@yosemite4-n:~# ls /dev/jtag0
/dev/jtag0

yosemite4-n: heartbeat LED not working

Need to enable phosphor-led-sysfs to control the heartbeat LED.
Set heartbeat LED in dts but it didn't be created in /sys/class/leds/heartbeat.

DTS:

	leds {
		compatible = "gpio-leds";
		heartbeat {
			label = "heartbeat";
			gpios = <&gpio7 4 GPIO_ACTIVE_LOW>; // GPIO228
		};
	};

yosemite4.cfg:

# LED
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
CONFIG_LEDS_GPIO=y
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_TIMER=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y

yosemite4-n: some management boards that couldn't boot into user space

Some management boards couldn't boot into user space.

We saw three phenomena:

  1. DDR failures
  2. Unstable system boot-up
  3. Watchdog timeout

We provided DDR Sweep testing on a failure board with three different frequencies for Nuvoton.

  1. 1025 Mhz
  2. 1000 Mhz
  3. 975 Mhz

We used 975 Mhz on the failure board and could boot into userspace and didn't get watchdog timeout.

Nuvoton is helping to investigate the test logs.

Cannot build yosemite or wedge project

Hi,

I have followed the build instruction in README.md

Set up the build environment based on the Yocto Project's [Quick Start Guide](http://www.yoctoproject.org/docs/1.6.1/yocto-project-qs/yocto-project-qs.html).

Clone Yocto repository:

$ git clone -b fido https://git.yoctoproject.org/git/poky
Clone OpenEmbedded and OpenBMC repositories, in the new created poky directory:
$ cd poky
$ git clone -b fido https://github.com/openembedded/meta-openembedded.git
$ git clone -b fido https://git.yoctoproject.org/git/meta-security
$ git clone https://github.com/facebook/openbmc.git meta-openbmc
Note that this project does not use Yocto release branch names.

Initialize a build directory. In the poky directory:
$ export TEMPLATECONF=meta-openbmc/meta-facebook/meta-wedge/conf
$ source oe-init-build-env
Choose between meta-wedge, meta-wedge100, and meta-yosemite. After this step, you will be dropped into a build directory, poky/build.

Start the build within the build directory:
$ bitbake wedge-image

but in the build/conf folder, there are only two file bblayers.con and templateconf.cfg present. There is no local.conf and other files.

When I run "bitbake wedge-image" or "bitbake yosemite-image" it showed

The BBPATH variable is not set
DEBUG: Removed the following variables from the environment: LESSOPEN, XDG_SESSION_TYPE, SSH_CLIENT, DISPLAY, LANG, SHLVL, TEMPLATECONF, XDG_SESSION_CLASS, MOTD_SHOWN, XDG_RUNTIME_DIR, TMUX, XDG_SESSION_ID, DBUS_SESSION_BUS_ADDRESS, _, SSH_CONNECTION, LESSCLOSE, BUILDDIR, SSH_TTY, OLDPWD, XDG_DATA_DIRS, LS_COLORS, TMUX_PANE
DEBUG: Found bblayers.conf (/storge/shares/quangn/wiwynn_obmc/poky/build/conf/bblayers.conf)

Is there any update on the repo to build the project yosemite or wedge? Thank you.

Best regards,
Quang

yosemite4-n: i2c issues

  1. I2C bus 9 would hang.
  2. Couldn't probe I2C mux driver (PCA9544).
  3. Didn't detect I2C mux of medusa board on bus 14.

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.