Ongoing Questions about OpenBMC

Stephen Beckwith embeddedsteve at gmail.com
Sat Dec 7 08:49:37 AEDT 2019


Hi Emily,
   Thank you very much for your comments and suggestions.  Some have have
been helpful.  However, I've seemed to have run into an issue with the
"devtool modify" setup.   Please let me explain:
I have setup what I will call an "external build" setup (which is similar
to how we handle our current development).  As an example:
~/home/sbeckwit/yocto_dev    is the "root"
├── obmc-build
│   ├── downloads
│   ├── sstate-cache
│   ├── tmp
│   └── workspace
├── obmc-dev
│   └── openbmc    This contains the openbmc git repo - all the meta, etc.

The bblaysers.conf file sits in the obmc-dev/openbmc/build/conf directory -
it includes a path to the workspace directory.
There is a devtool.conf also in this obmc-dev/openbmc/build/conf directory,
defines the "workspace_path" to point to the workspace directory.

I have tried run devtool modify from the "dev" directory (in the build
directory) and also from the obmc-build directory.  I've added the - -
bbpath parameter as well as trying the - - basepath, in all cases I get the
failure below.

Synopsis:
 -  The files devtool is looking for exist, in a directory in the path, but
for some reason it's just not able to "figure it out".  Maybe because of
the external build setup??
 - Is this something for the Yocto team??
We did an experiment with a "poky" (separate stand-alone setup we started
with) and this did seem to work, but this was a "self-contained" setup,
i.e. it does not use a "external build directory" setup.

You insights are greatly appreciated!

Regards,
Stephen Beckwith



Initialising tasks: 100%
|###########################################################| Time: 0:00:00
NOTE: Executing RunQueue Tasks
ERROR: Function failed: do_replace_entity_default (log file is located at
/home/sbeckwit/yocto_dev/obmc-build/tmp
/work/armv6-openbmc-linux-gnueabi/phosphor-ipmi-host/1.0+gitAUTOINC+455ee0b99c-
r1/devtooltmp-s45iteon/temp/log.do_patch.6941)
ERROR: Logfile of failure stored in:
/home/sbeckwit/yocto_dev/obmc-build/tmp/work/armv6-openbmc-linux-gnueabi/phosphor-ipmi-host/1.0+gitAUTOINC+455ee0b99c-r1/devtooltmp-s45iteon/temp/log.do_patch.6941
Log data follows:
| DEBUG: Executing python function devtool_pre_patch
| DEBUG: Python function devtool_pre_patch finished
| DEBUG: Executing python function patch_task_patch_prefunc
| DEBUG: Python function patch_task_patch_prefunc finished
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are []
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: []
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing python function do_patch
| DEBUG: Executing python function patch_do_patch

File being looked for in the output: - yet these are IN the specified
directory that is in the path list:

| DEBUG: Searching for entity.yaml in paths:
| DEBUG: Searching for merge_yamls.py in paths:
| DEBUG: Searching for
xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service in paths:
| DEBUG: Searching for phosphor-ipmi-host.service in paths:

==> This path shows up in each of the 4 sets of files listed for each of
the searches above.


*|
/home/sbeckwit/yocto_dev/obmc-dev/openbmc/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host/*
| DEBUG: Python function patch_do_patch finished
| DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common', 'arm-32',
'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi', 'common']
| DEBUG: Executing shell function do_replace_entity_default
| cp: cannot stat 'entity.yaml': No such file or directory
| WARNING: exit code 1 from a shell command.
| DEBUG: Python function do_patch finished
| ERROR: Function failed: do_replace_entity_default (log file is located at
/home/sbeckwit/yocto_dev/obmc-build/tmp/work/armv6-openbmc-linux-gnueabi/phosphor-ipmi-host/1.0+gitAUTOINC+455ee0b99c-r1/devtooltmp-s45iteon/temp/log.do_patch.6941)
NOTE: Tasks Summary: Attempted 3 tasks of which 0 didn't need to be rerun
and 1 failed.
ERROR: Extracting source for phosphor-ipmi-host failed




*sbeckwit at ubuntu:~/yocto_dev/obmc-dev/openbmc/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host$
lsentity.yaml     phosphor-ipmi-host.servicemerge_yamls.py
 xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service*


On Mon, Nov 25, 2019 at 4:43 PM Emily Shaffer <emilyshaffer at google.com>
wrote:

> On Mon, Nov 25, 2019 at 1:41 PM Emily Shaffer <emilyshaffer at google.com>
> wrote:
> >
> > On Mon, Nov 25, 2019 at 1:28 PM Stephen Beckwith
> > <embeddedsteve at gmail.com> wrote:
> > >
> > > Greetings,
> > >      I have some additional/newbie type questions here that are
> blocking my progress with this Proof-of-Concept.
> >
> > Hi and welcome. I can't answer every question you have but I'll reply
> > where I can and hope for the community to fill in more blanks. :)
> >
> > > We currently have an OpenBMC image booting in QEMU (version 4.1.0) and
> have been investigating certain aspects of this image, namely IPMI command
> support and sensors, as these are 2 areas we will need to modify prior to
> porting this onto our target platform. (AST2500 based).
> > >
> > > Sensors:
> > > We’ve read through the documentation and pieced together the following:
> > >  -  Sensors get defined in the DTS file, which is “consumed” by the
> Linux kernel.  This defines the physical device’s aspects (i.e. on which
> I2C bus at what address).
> > >  -  These sensors are inputs to the Linux Kernel’s hwmon sub-system.
> Access is exported via sysfs entries for access by ???
> > >  -  There are some .conf and .yaml files that contain the
> limits/ranges/properties for these devices. This information is
> “initialized” (?) into dbus objects, where the name of the sensor’s
> configuration file is the exported sysfs name, correct?
> > >  -  systemd is used to start up the various services associated with
> these objects, as defined in dbus.
> > >  -  It was stated on the documentation that the sensors become
> “objects” that will broadcast their state change on the dbus for others to
> know about this change.  What is it that “detects” this change?  An
> interrupt from the Sensors? (which seems odd to me, in my 30+ years, I’ve
> not seen too many temp sensors that are interrupt driven).  Are these
> objects polled?  By whom?  Our best guess so far seems to indicate that the
> phosphor-hwmon service is what polls these.
> >
> > phosphor-hwmon is responsible for most of these, yeah.
> >
> > >  -  Is there a sensor cache where polled readings are stored? It
> seemed to be hinted at but never stated explicitly.
> > >
> > >
> > > The reason for these questions are:
> > >  -  In poking around the image loaded in QEMU, we don’t seem to be
> seeing any Sensor updates occurring.  We would like to be able to “stub”
> these for simulation purposes, as we need to add in all of the platform
> sensors we need to monitor (~ 100).
> > >  -  There is an lm75 defined.  It shows up in the sysfs.  However, it
> does not show up in the IPMI listing of the sensors or on the dbus.
>
> Ah, I skimmed in my first pass and neglected this. It's likely that
> this sensor isn't in your sensor list yaml, which IPMI draws on. See
>
> https://github.com/openbmc/phosphor-host-ipmid/blob/master/scripts/sensor-example.yaml
> .
>
> > >  -  It seems that maybe the sensor monitoring is not running?  Could
> it be that some service is not being started, due to this being QEMU?  Any
> insights on this?
> > >  -  If this is simply a limitation of Qemu, is there a recommended
> method/scheme to handle the “stubbing” of sensors?  (i.e. running a
> background script that writes to the sysfs entries to periodically change
> the readings?)
> > >
> > >
> > > IPMI Commands:
> > >  -  We’ve tracked through the code and believe we’ve found the code
> responsible for some of the commands.
> > >  -  As an experiment, we’d like to modify this source code accordingly
> to verify this is the code executing the command.  This then brought up the
> question:  How is this done?
> > >  -  We’ve identified the following:
> > > the “openbmc” meta directory is just that:  meta-data - no code here.
> > > “ALL” code is fetched from the various GitHub repos for this project.
> > > So if we wanted to modify, say phosphor-ipmi-host, we would:
> > > a) clone this repo and populate it with the code
> > > b) make the modifications necessary.
> > > c) How then to tell the build system to use this modified code for the
> build?  Modify the bitbake recipe in the meta- directory to point the
> SRC_URI here?
> >
> > During hacking, you can use 'devtool' which is used to help configure
> > the bitbake run. I think 'devtool modify' is what you're looking for
> > to ask for your local copy instead of the SRC_URI destination.
> >
> > >  -  Which then brought up the following question(s):
> > > How does one go about adding in new code in this setup?  (assuming
> that we’re NOT just trying to append to existing functionality, but adding
> entirely new proprietary functionality to the system both inside our layer
> and in other repos).
> >
> > As I understand it, when you write the recipe for your internal
> > platform (which you will need to do anyway - for example a Zaius
> > builds differently than a Tioga Pass) you will point the SRC_URI to
> > the internal branch or fork of, say, phosphor-host-ipmi. That branch
> > carries your patches - proprietary features that can't be upstreamed,
> > or hotfixes you couldn't wait for upstream to merge. Then, your
> > internal branch of each project should be rebased regularly against
> > what is happening upstream.  I'll try not to get into upstreaming best
> > practices, but you should keep in mind when you're checking things in
> > downstream that should really be sent upstream - i.e., bug fixes that
> > affect everyone - that your downstream branch needs to be able to cope
> > once those patches make it into the upstream you're rebasing against.
> >
> > > Would we need to do this for each and every Repo we are adding and/or
> modifying as part of our system?
> >
> > If there are changes from upstream, those changes have to go
> > somewhere, and your recipe needs to reference them. If there's no
> > changes from upstream but you want to include different 100%-upstream
> > packages, you'd change that in your recipe, AIUI.
> >
> > > Is there a “global” way to handle this? (Yocto documentation talks
> about the EXTERNALSRC capability and the .bbclass to include)
> >
> > Take it with a grain of salt from me; it's been some time since I did
> > much with bitbake recipes. These days I'm just a humble IPMI hospice
> > carer :)
> >
> >  - Emily
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20191206/c5fd36c1/attachment.htm>


More information about the openbmc mailing list