From fb62a68f16d3fa64b242bd8c65abf64ef8088889 Mon Sep 17 00:00:00 2001 From: Adriana Kobylak Date: Mon, 28 Oct 2019 16:03:12 -0500 Subject: image_types_phosphor: Make Version Purpose configurable The current version purpose is set to BMC[1]. Make it a configurable variable for cases where other Purpose value is more appropriate, like setting it to System if the machine includes the host-fw package that would package the BMC and host firmware code into a combined image. 1: https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/Software/Version.interface.yaml Tested: Verified the purpose is still BMC, then verifed that setting the variable from a machine.conf file changed its value. (From meta-phosphor rev: 356265535d268858840ddbe52ff8c1e37f084188) Change-Id: I159e73f9b9c310321dda885b10dbc1cd56a674ee Signed-off-by: Adriana Kobylak Signed-off-by: Brad Bishop --- meta-phosphor/classes/image_types_phosphor.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meta-phosphor/classes/image_types_phosphor.bbclass b/meta-phosphor/classes/image_types_phosphor.bbclass index 23ff3475c..e29f4ff47 100644 --- a/meta-phosphor/classes/image_types_phosphor.bbclass +++ b/meta-phosphor/classes/image_types_phosphor.bbclass @@ -57,6 +57,8 @@ SIGNING_KEY ?= "${STAGING_DIR_NATIVE}${datadir}/OpenBMC.priv" INSECURE_KEY = "${@'${SIGNING_KEY}' == '${STAGING_DIR_NATIVE}${datadir}/OpenBMC.priv'}" SIGNING_KEY_DEPENDS = "${@oe.utils.conditional('INSECURE_KEY', 'True', 'phosphor-insecure-signing-key-native:do_populate_sysroot', '', d)}" +VERSION_PURPOSE ?= "xyz.openbmc_project.Software.Version.VersionPurpose.BMC" + UBOOT_SUFFIX ?= "bin" python() { @@ -418,10 +420,11 @@ def get_pubkey_path(d): 'publickey') python do_generate_phosphor_manifest() { + purpose = d.getVar('VERSION_PURPOSE', True) version = do_get_version(d) target_machine = d.getVar('MACHINE', True) with open('MANIFEST', 'w') as fd: - fd.write('purpose=xyz.openbmc_project.Software.Version.VersionPurpose.BMC\n') + fd.write('purpose={}\n'.format(purpose)) fd.write('version={}\n'.format(version.strip('"'))) fd.write('KeyType={}\n'.format(get_pubkey_type(d))) fd.write('HashType=RSA-SHA256\n') -- cgit v1.2.3