openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Joseph Reynolds <jrey@linux.ibm.com>
To: Richard Hughes <hughsient@gmail.com>,
	openbmc@lists.ozlabs.org, Adriana Kobylak <anoo@linux.ibm.com>
Subject: Re: Redfish implementation does not supply SoftwareId
Date: Wed, 17 Nov 2021 13:36:53 -0600	[thread overview]
Message-ID: <d6654531-a50b-665f-36a8-0ad1b27bcf88@linux.ibm.com> (raw)
In-Reply-To: <CAD2FfiGpG_J5W8Ftdp5wE2wLB=7Tfmvfmivy0_4vW=D0fYdw3g@mail.gmail.com>

On 11/11/21 8:16 AM, Richard Hughes wrote:
> Hi all,
>
> My name is Richard Hughes and I'm the upstream maintainer of fwupd
> which is a linux program that allows flashing hardware. It's used by a
> few million people already and there's recently been a lot of interest
> about getting fwupd to run on the actual BMC chip, rather than on the
> host OS. That's not really what this email is about, but might explain
> the bigger picture. I'll come back to this in a few weeks time :)

Richard,

Thanks for your email!  I don't have any answers, and my intention for 
this email is to stir up some discussion.  There was some previous work 
in this area described here: 
https://lists.ozlabs.org/pipermail/openbmc/2020-May/021573.html

Where can we learn more about the interest in getting `fwupd` to run on 
the BMC?  Links to chat room, email archive, etc?

Background: OpenBMC's current documented [features][] for [firmware 
update][] is given here:
[features]: https://github.com/openbmc/docs/blob/master/features.md
[firmware update]: 
https://github.com/openbmc/docs/blob/master/architecture/code-update/code-update.md

In this context, I understand you are interested in either (A) adding 
support for a new fwupd method or (B) creating a new OpenBMC function to 
update the firmware for various host components, or (C) both.  That 
seems to me like a good fit with OpenBMC.

And please note I am not familiar with [fwupd][].
[fwupd]: https://github.com/fwupd/fwupd


> At the moment fwupd runs on the host OS and uses a plugin to
> communicate with various Redfish implementations, for example iDRAC
> for Dell or XClarity for Lenovo. Teddy Reed kindly donated (loaned?)
> me some hardware so I could test the fwupd plugin against the Redfish
> implementation of OpenBMC, more specifically git master on a
> evb-ast2500 board.
>
> With a small patch to fwupd (setting CURLOPT_SSL_VERIFYHOST=0) it
> seems to load and enumerate correctly, but doesn't add any devices.

Do I infer correctly that you got `fwupd` running on the BMC, for 
example having a working `fwupdmgr` command?

> The reason I found was that the SoftwareId property is missing from
> the /redfish/v1/UpdateService/FirmwareInventory/7d021ade path. The
> SoftwareId is the "key" that maps the hardware to a specific firmware
> *stream*, so for instance it could be something like
> "USB\VID_17EF&PID_3083" for a peripheral or some other kind of
> vendor-specific string, e.g. "SAMSUNG MZVLB2T0HALB-000L7". The idea is
> that vendors then upload firmware to the LVFS website with a defined
> *stream* and updates get deployed onto matching hardware
> automatically. I'm not so sure that makes a huge amount of sense for
> the OpenBMC BMC image itself. Or maybe it does; getting new official
> OpenBMC images from the LVFS would be way cool, but I don't think we
> want to flash the entire MTD image. Anyway, I digress.

Use cases:

I understand OpenPOWER system firmware has two firmware packages which 
are typically packaged together: (1) the BMC firmware image and (2) the 
host firmware image.  The host image itself contains multiple parts but 
the BMC does not handle them separately.  Given this, firmware updates 
are monoliotic and are not done to individual components.  (But note my 
understanding is limited.)

I understand the other systems (mentioned above) support updating the 
firmware for various individual host components.

> I guess my question is if I could get a SoftwareId set for 7d021ade --
> e.g. "evb-ast2500" -- that at least allows the device to enumerate in
> fwupd and gives me something to test against. I guess my next question
> is how a OpenBMC distributor adds a new device into
> /redfish/v1/UpdateService/FirmwareInventory.Members -- and if there's
> a way to set SoftwareId for that new device too.

I don't understand enough background in this area.  OpenBMC's [BMCWeb][] 
has pulled in the Redfish [SoftwareInventory schema][] and has an 
[update service implementation][] but has not yet implemented the 
`SoftwareId` property.  I think you want that.  But I don't know if that 
will give you what you need.

[BMCWeb]: https://github.com/openbmc/bmcweb
[SoftwareInventory schema]: 
https://github.com/openbmc/bmcweb/blob/master/static/redfish/v1/JsonSchemas/SoftwareInventory/SoftwareInventory.json
[update service implementation]: 
https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/update_service.hpp

One more thing I don't know... :-) Where is the right place (via 
Yocto/bitbake recipes) to set the SoftwareId?  Somewhere around here?:
- Base OpenBMC support: 
https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-phosphor/images/obmc-phosphor-image.bb
- Customization for IBM machines: 
https://github.com/openbmc/openbmc/blob/master/meta-ibm/recipes-phosphor/images/obmc-phosphor-image.bbappend
- In the class for the above: 
https://github.com/openbmc/openbmc/blob/master/meta-phosphor/classes/image_types_phosphor.bbclass

I hope this helps.

Joseph

>
> Sorry if all these are newbie questions, and I appreciate any
> pointers; I'm happy to send patches. Thanks.
>
> Richard.


  reply	other threads:[~2021-11-17 19:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11 14:16 Redfish implementation does not supply SoftwareId Richard Hughes
2021-11-17 19:36 ` Joseph Reynolds [this message]
2021-11-17 21:25   ` Richard Hughes
2021-11-17 22:01     ` Ed Tanous
2021-11-18 16:49       ` Richard Hughes
2021-11-17 21:49 ` Ed Tanous

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d6654531-a50b-665f-36a8-0ad1b27bcf88@linux.ibm.com \
    --to=jrey@linux.ibm.com \
    --cc=anoo@linux.ibm.com \
    --cc=hughsient@gmail.com \
    --cc=openbmc@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).