diff mbox series

DT: Add "IBM" version property under ibm, firmware-versions node

Message ID 20171206165941.28865-1-hegdevasant@linux.vnet.ibm.com
State Superseded
Headers show
Series DT: Add "IBM" version property under ibm, firmware-versions node | expand

Commit Message

Vasant Hegde Dec. 6, 2017, 4:59 p.m. UTC
Looks like latest firmware (at least IBM build) has IBM release string
in VERSION section of PNOR. Lets add that to device tree.

Sample output:
--------------
/proc/device-tree/ibm,firmware-versions# lsprop
occ              "dbb4d7e"
skiboot          "v5.9"
buildroot        "2017.08-8-g5e23247"
IBM              "witherspoon-ibm-OP9_v1.19_1.73"
.....


Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
 core/flash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stewart Smith Jan. 17, 2018, 8:56 a.m. UTC | #1
Vasant Hegde <hegdevasant@linux.vnet.ibm.com> writes:
> Looks like latest firmware (at least IBM build) has IBM release string
> in VERSION section of PNOR. Lets add that to device tree.
>
> Sample output:
> --------------
> /proc/device-tree/ibm,firmware-versions# lsprop
> occ              "dbb4d7e"
> skiboot          "v5.9"
> buildroot        "2017.08-8-g5e23247"
> IBM              "witherspoon-ibm-OP9_v1.19_1.73"
> .....

(Adding in Pam who does the builds for the IBM firmware mentioned above,
as I have questions/thoughts, and Sam, as he gets to be the poor person
implementing a bunch of the comparison, as well as Adrianna who may care
about it from an OpenBMC perspective.)

Our current documentation on what should be in the
/ibm,firmware-versions device tree node is up at:
https://github.com/open-power/skiboot/blob/master/doc/device-tree/ibm%2Cfirmware-versions.rst
(originally posted/discussed up at
https://patchwork.ozlabs.org/patch/730916/ )

The purpose of writing all of it down in a really strict fashion was to
set expectations for both IBM and others so that we could write *really*
reliable code to work out if the new firmware we're about to flash is
newer/older than what we're running.

So, say from a UI in Petitboot (or out of band I guess), we could
suitably display a warning if the user is trying to downgrade firmware.

We'd also be able to implement a web service to provide firmware
updates, automatically downloading/applying (or on user request) any
update that was newer.

(and Sam has prototypes of this for Petitboot, if we're *really* lucky
we could ship it at some point)

The spec is *heavily* inspired by debian/fedora package versioning
schemes.

I see a couple of issues with this patch as-is:

a) The property should be 'version' rather than IBM. This allows all
software doing the compare to find the global version string easily.

In this spec, the underscores aren't mentioned, so we either need to:
1) Change the documentation to say "underscores treated as dashes"
2) Change the build to use dashes.

Pam: what are your thoughts here? Any strong feelings one way or
another? Does anything rely on the underscores? I think the dashes end
up conforming a bit better to what we specced out in the docs above, and
it's a bit simpler than adding an extra burden on code parsing the
version string.

Sam: any thoughts/input on it?

Adriana: Anything from the OpenBMC side where you may want to do
anything interesting with comparing host firmware version numbers with <
rather than just = or not? I'm guessing the Web UI may want to warn on
downgrade or something in the future?
diff mbox series

Patch

diff --git a/core/flash.c b/core/flash.c
index 2744496..ee7097c 100644
--- a/core/flash.c
+++ b/core/flash.c
@@ -162,7 +162,7 @@  static void __flash_dt_add_fw_version(struct dt_node *fw_version, char* data)
 	const char * version_str[] = {"open-power", "buildroot", "skiboot",
 				      "hostboot-binaries", "hostboot", "linux",
 				      "petitboot", "occ", "capp-ucode", "sbe",
-				      "machine-xml"};
+				      "machine-xml", "IBM"};
 
 	/*
 	 * PNOR version strings are not easily consumable. Split them into