openBmc Code Structure

Joseph Reynolds jrey at linux.ibm.com
Thu Mar 3 00:58:31 AEDT 2022


On 3/2/22 1:48 AM, Sandeep Kumar wrote:
> Hi Joseph,
>
> Thanks for a very clear explanation. I am more interested in openBMC  customization layers. Also, would appreciate some info related to redfish modules, new API creation, etc.  More information on this would help us immensely.

You're welcome.  The OpenBMC docs repository has some info.  Start with 
the README, features.md, and docs under the architecture folder:
- https://github.com/openbmc/docs/blob/master/README.md
- https://github.com/openbmc/docs/blob/master/features.md
- https://github.com/openbmc/docs/tree/master/architecture/ (each 
document in this folder)

For specifics, see how the project README says to build 
obmc-phosphor-image, and how the obmc-phosphor-image bitbake recipe 
provides the applications:
- https://github.com/openbmc/openbmc/blob/master/README.md
- 
https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/images/obmc-phosphor-image.bb

To get started with development, see CONTRIBUTING in the docs repo: 
https://github.com/openbmc/docs/blob/master/CONTRIBUTING.md

I suggest getting started by making some improvements to OpenBMC 
documentation.

- Joseph

> Regards,
> Sandeep.
>
> -----Original Message-----
> From: Joseph Reynolds <jrey at linux.ibm.com>
> Sent: Wednesday, March 2, 2022 1:43 AM
> To: Mike Jones <proclivis at gmail.com>; Sandeep Kumar <sandeep.pkumar at tcs.com>
> Cc: openbmc at lists.ozlabs.org
> Subject: Re: openBmc Code Structure
>
> "External email. Open with Caution"
>
> On 2/25/22 7:31 AM, Mike Jones wrote:
>> Sandeep, I think that is like asking what the source code structure of
>> a linux distribution is. Obmc is built from a linux kernel and many
>> application, each with it’s own structure. I’m still learning OBMC
>> myself, but I would look at the obmc ZjQcmQRYFpfptBannerStart This
>> Message Is From an External Sender This message came from outside your
>> organization.
>> ZjQcmQRYFpfptBannerEnd
>> Sandeep,
>>
>> I think that is like asking what the source code structure of a linux
>> distribution is. Obmc is built from a linux kernel and many
>> application, each with it’s own structure.
>>
>> I’m still learning OBMC myself, but I would look at the obmc design
>> docs and learn its architecture, which is basically a dbus system with
>> services, and to the outside world, Redfish. Yocto is the glue that
>> makes a complete image.
>>
>> Mike
>>
>>> On Feb 24, 2022, at 11:42 PM, Sandeep Kumar <sandeep.pkumar at tcs.com>
>>> wrote:
>>>
>>> Hi,
>>> I have just started looking into the openBmc source code. Could
>>> anyone explain the source code structure for openBMC?
> Here is how I explain its most basic structure:
> OpenBMC has a complex source code structure.  It uses the bitbake build system which runs on your build host and processes recipes to produce the firmware image.  In this sense, the OpenBMC source code consists of a set of recipes.  A typical recipe tells bitbake to fetch a package, unpack, patch, and configure it, and build it into the firmware image. In this sense, the OpenBMC source code consists of the recipes actually used together with the packages they fetch.  Naturally, the exact source code used in any given build depends on which version you are building from (as daily changes are made to the master branch) and which platform you are building for.
> * The downstream flow for the recipes is: OpenEmbedded --> Yocto/Poky
> --> OpenBMC --> IBM product forks.  (Details for IBM product forks are
> below.)  Each project along the stream customizes the recipes and adds new recipes.
> * The OpenEmbedded (OE) project is seminal.  It provides the bitbake tool and recipes for many thousands of open source projects.
> * The Yocto/Poky project is downstream from OE.  It organizes the recipes into a Linux distribution suitable for embedded systems.
> * The OpenBMC project (https://github.com/openbmc/) is downstream from Poky.  It adds BMC's specialized functions in bitbake layers:
>       - meta-phosphor (and other layers) - provide common/core BMC function
>       - meta-openpower - adds support for OpenPOWER
>       - meta-ibm - adds support common to IBM systems
>       - meta-witherspoon (as an example) - adds support for specific host machines
>
> Are you more interested in the Yocto/bitbake structure, or interested in the OpenBMC customization layers?
>
> Joseph
>
>>> Thanks,
>>> Sandeep.
>>>
>>> =====-----=====-----=====
>>> Notice: The information contained in this e-mail message and/or
>>> attachments to it may contain confidential or privileged information.
>>> If you are not the intended recipient, any dissemination, use,
>>> review, distribution, printing or copying of the information
>>> contained in this e-mail message and/or attachments to it are
>>> strictly prohibited. If you have received this communication in
>>> error, please notify us by reply e-mail or telephone and immediately
>>> and permanently delete the message and any attachments. Thank you
>>>



More information about the openbmc mailing list