Git Product home page Git Product logo

olofj / openbmc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bcran/openbmc

0.0 0.0 0.0 150.84 MB

Ampere Computing Openbmc

License: Other

Shell 9.58% JavaScript 1.53% C++ 2.34% Python 45.36% Perl 1.93% C 3.69% PHP 0.25% Lua 0.01% Fortran 0.01% Clojure 0.44% Assembly 0.02% Rust 0.01% Awk 0.01% CSS 0.13% Pascal 0.51% BlitzBasic 0.10% Pawn 0.01% SourcePawn 0.03% Makefile 0.26% BitBake 33.82%

openbmc's Introduction

OpenBMC

Build Status

OpenBMC is a Linux distribution for management controllers used in devices such as servers, top of rack switches or RAID appliances. It uses Yocto, OpenEmbedded, systemd, and D-Bus to allow easy customization for your platform.

This repository provides early access to Ampere Computing's BMC implementation for Ampere's server platform reference designs. It is the intention to submit all features in this repository to the OpenBMC main project (github/openbmc) in due course.

For open questions and support, please contact [email protected].

Setting up your OpenBMC project

1) Prerequisite

See the Yocto documentation for the latest requirements

Ubuntu

$ sudo apt install git python3-distutils gcc g++ make file wget \
    gawk diffstat bzip2 cpio chrpath zstd lz4 bzip2

Fedora

$ sudo dnf install git python3 gcc g++ gawk which bzip2 chrpath cpio
hostname file diffutils diffstat lz4 wget zstd rpcgen patch

2) Download the source

git clone https://github.com/bcran/openbmc.git
cd openbmc

3) Target your hardware

Source the setup script and use one of the following for Ampere's platform:

  • mtjade
  • mtmitchell
  • comhpcalt

For example:

. setup mtjade

4) Build

bitbake obmc-phosphor-image

On successful build, the BMC image will be located in

tmp/deploy/images/<platform>/

as

obmc-phosphor-image-<platform>-<datetime>.static.mtd
obmc-phosphor-image-<platform>-<datetime>.static.mtd.tar

where <platform> = mtjade, mtmitchell or comhpcalt

Installing BMC firmware

If there is no firmware pre-installed on the system, you will need to program it to the BMC's SPI NOR using an external SPI programmer like Dediprog using obmc-phosphor-image-.static.mtd.

If a previous version of Ampere's OpenBMC has been installed, perform the following steps to update BMC firmware.

  • Open new Redfish token:
$ export token=`curl -k -H "Content-Type: application/json" -X POST https://${BMC_IP}/login -d '{"username" :  "root", "password" :  "0penBmc"}' | grep token | awk '{print $2;}' | tr -d '"'`
  • Use Redfish UpdateService to flash the BMC firmware
$ curl -k -H "X-Auth-Token: $token" \
       -H "Content-Type: application/octet-stream" \
       -X POST -T ${BMC_FW}.mtd.tar https://${BMC_IP}/redfish/v1/UpdateService
  • Reboot BMC to start the firmware update
$ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT \
       -d '{"data": "xyz.openbmc_project.State.BMC.Transition.Reboot"}' \
        https://root:0penBmc@${BMC_IP}/xyz/openbmc_project/state/bmc0/attr/RequestedBMCTransition`

Will OpenBMC run on my Acme Server Corp. XYZ5000 motherboard?

This is a common question, particularly regarding boards from popular COTS (commercial off-the-shelf) vendors such as Supermicro and ASRock. You can see the list of supported boards by running . setup (with no further arguments) in the root of the OpenBMC source tree. Most of the platforms supported by OpenBMC are specialized servers operated by companies running large datacenters, but some more generic COTS servers are supported to varying degrees.

If your motherboard is not listed in the output of . setup it is not currently supported. Porting OpenBMC to a new platform is a non-trivial undertaking, ideally done with the assistance of schematics and other documentation from the manufacturer (it is not completely infeasible to take on a porting effort without documentation via reverse engineering, but it is considerably more difficult, and probably involves a greater risk of hardware damage).

However, even if your motherboard is among those listed in the output of . setup, there are two significant caveats to bear in mind. First, not all ports are equally mature -- some platforms are better supported than others, and functionality on some "supported" boards may be fairly limited. Second, support for a motherboard is not the same as support for a complete system -- in particular, fan control is critically dependent on not just the motherboard but also the fans connected to it and the chassis that the board and fans are housed in, both of which can vary dramatically between systems using the same board model. So while you may be able to compile and install an OpenBMC build on your system and get some basic functionality, rough edges (such as your cooling fans running continuously at full throttle) are likely.

Features of OpenBMC

Installing SCP/SYS firmware to EEPROM

To install SCP or SYS firmware to boot EEPROM, need to copy it (in *.slim or *.bin format) into the BMC via scp from BMC console:

# scp 10.38.12.53:/tftpboot/altra/altra_scp_1.01.20201019.slim /tmp

Then, use the ampere_firmware_upgrade.sh utility to flash the firmware into the Boot EEPROM:

# ampere_firmware_upgrade.sh smpmpro /tmp/altra_scp_1.01.20201019.slim 1

Installing UEFI firmware

UEFI firmware can be flashed via Redfish UpdateService interface. It uses the tar format which include the firmware image (in *.img format) and a MANIFEST file. The following steps can be used to create the tar file and install UEFI firmware via Redfish

  • Create MANIFEST file with the following content
purpose=xyz.openbmc_project.Software.Version.VersionPurpose.Host
version= jade_tianocore_atf_1.99.20201021.img
KeyType=OpenBMC
HashType=RSA-SHA256
MachineName=mtjade
  • Then create tar file including the firmware image and MANIFEST file:
$ tar -cvf jade_tianocore_atf_1.99.20201021.tar jade_tianocore_atf_1.99.20201021.img MANIFEST
  • Open new Redfish token:
$ export token=`curl -k -H "Content-Type: application/json" -X POST https://${BMC_IP}/login -d '{"username" :  "root", "password" :  "0penBmc"}' | grep token | awk '{print $2;}' | tr -d '"'`
  • Use Redfish UpdateService to flash the UEFI firmware
$ curl -k -H "X-Auth-Token: $token" \
       -H "Content-Type: application/octet-stream" \
       -X POST -T jade_tianocore_atf_1.99.20201021.tar \
        https://${BMC_IP}/redfish/v1/UpdateService

openbmc's People

Contributors

amboar avatar anoo1 avatar bradbishop avatar chaul-ampere avatar chnguyen-ampere avatar dcao-ampere avatar edtanous avatar geissonator avatar georgehung1210 avatar gtmills avatar hieuhuynh-ampere avatar lxwinspur avatar mdmillerii avatar mine260309 avatar msbarth avatar nest1ing avatar nkskjames avatar potinlai avatar pstrinkle avatar shenki avatar spinler avatar thangqn-ampere avatar thangtran-ampere avatar thubanguyen avatar timlee66 avatar tungnguyen-amp avatar vijaykhemka avatar vishwabmc avatar wak-google avatar williamspatrick 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.