diff options
author | Adriana Kobylak <anoo@us.ibm.com> | 2021-10-25 18:58:19 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2021-11-10 00:54:55 +0300 |
commit | cdd91ad2909116d136f5152b645f87592f39a1db (patch) | |
tree | 805ac0036be2747115a4dc57233f232479ea05f5 /meta-phosphor/classes/image_types_phosphor.bbclass | |
parent | 5577bf45a23118c3d5e34fd35921c59985641c95 (diff) | |
download | openbmc-cdd91ad2909116d136f5152b645f87592f39a1db.tar.xz |
image_types: Add BUILD_ID to MANIFEST
Add the BUILD_ID value to the MANIFEST so that it can be used alongside
the VERSION value to generate a version id during firmware updates.
Add a function to read BUILD_ID from the os-release file instead of
reading it from a variable because the BUILD_ID value could be set via a
os_release.bbappend file instead of a .conf file.
Tested: Verified the BUILD_ID value was added to the MANIFEST by
default, and when BUILD_ID was specified in a .conf file, and on a
os-release.bbappend. Ex:
$ cat MANIFEST
purpose=xyz.openbmc_project.Software.Version.VersionPurpose.BMC
version=2.11.0-dev-566-g263df7f852
BuildId=20211025151654
ExtendedVersion=
KeyType=OpenBMC
HashType=RSA-SHA256
MachineName=p10bmc
Change-Id: I3b7beaccbbd47d8820d499180ccdf021b004cf85
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Diffstat (limited to 'meta-phosphor/classes/image_types_phosphor.bbclass')
-rw-r--r-- | meta-phosphor/classes/image_types_phosphor.bbclass | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/meta-phosphor/classes/image_types_phosphor.bbclass b/meta-phosphor/classes/image_types_phosphor.bbclass index be3bbdf50..64fec000b 100644 --- a/meta-phosphor/classes/image_types_phosphor.bbclass +++ b/meta-phosphor/classes/image_types_phosphor.bbclass @@ -502,11 +502,13 @@ def get_pubkey_path(d): python do_generate_phosphor_manifest() { purpose = d.getVar('VERSION_PURPOSE', True) version = do_get_version(d) + build_id = do_get_buildID(d) target_machine = d.getVar('MACHINE', True) extended_version = (d.getVar('EXTENDED_VERSION', True) or "") with open('MANIFEST', 'w') as fd: fd.write('purpose={}\n'.format(purpose)) fd.write('version={}\n'.format(version.strip('"'))) + fd.write('BuildId={}\n'.format(build_id.strip('"'))) fd.write('ExtendedVersion={}\n'.format(extended_version)) fd.write('KeyType={}\n'.format(get_pubkey_type(d))) fd.write('HashType=RSA-SHA256\n') |