diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-23 04:40:54 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 19:39:42 +0300 |
commit | 194ff4f1f5d44b12e9cb06ddafa6adb20174a13c (patch) | |
tree | 823835cd29daf8901a31ac14c7e6534abf199be3 /meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/ipmi/witherspoon-ipmi-config.bb | |
parent | 4feb727cd6b77a68bdaca63e121b378d814f5eaf (diff) | |
download | openbmc-194ff4f1f5d44b12e9cb06ddafa6adb20174a13c.tar.xz |
[Subtree] Bring openbmc machines to top level
The new subtree model brings the subtrees up from the openbmc-machines
layer.
Change-Id: I58a03ae1be374bc79ae1438e65e888375d12d0c0
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/ipmi/witherspoon-ipmi-config.bb')
-rw-r--r-- | meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/ipmi/witherspoon-ipmi-config.bb | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/ipmi/witherspoon-ipmi-config.bb b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/ipmi/witherspoon-ipmi-config.bb deleted file mode 100644 index 8ab47c631..000000000 --- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/ipmi/witherspoon-ipmi-config.bb +++ /dev/null @@ -1,82 +0,0 @@ -SUMMARY = "Witherspoon IPMI daemon configuration" -PR = "r1" - -inherit obmc-phosphor-license -inherit allarch - -SRC_URI = " \ - file://cipher_list.json \ - file://dcmi_cap.json \ - file://dcmi_sensors.json \ - file://dev_id.json \ - file://power_reading.json \ - " - -FILES_${PN} = " \ - ${datadir}/ipmi-providers/cipher_list.json \ - ${datadir}/ipmi-providers/dcmi_cap.json \ - ${datadir}/ipmi-providers/dcmi_sensors.json \ - ${datadir}/ipmi-providers/dev_id.json \ - ${datadir}/ipmi-providers/power_reading.json \ - " - -do_fetch[noexec] = "1" -do_configure[noexec] = "1" -do_compile[noexec] = "1" - -# Calculate the auxiliary firmware revision to be updated in the dev_id.json -# file. It is calculated from the VERSION_ID field which currently has two -# formats. The revision field is 4 bytes, the first two bytes represent the -# count of commits from the tagging and next two bytes represent the version. -# Both fields are represented in BCD encoded format, so 9999 is the maximum -# value both fields can take. With the format "v2.1-216-ga78ace8", Petitboot -# would display the firmware revision as "Firmware version: 2.01.02160000", -# "0216" is count and the revision is "0000". With the format -# "ibm-v2.0-10-r41-0-gd0c319e" Petitboot would display the firmware revision -# as "Firmware version: 2.00.00100041", "0010" is count and the revision -# is "0041". - -inherit image_version - -do_patch[depends] = "os-release:do_populate_sysroot" - -python do_patch() { - import json - import re - from shutil import copyfile - version_id = do_get_version(d) - - # count from the commit version - count = re.findall("-(\d{1,4})-", version_id) - - release = re.findall("-r(\d{1,4})", version_id) - if release: - auxVer = count[0] + "{0:0>4}".format(release[0]) - else: - auxVer = count[0] + "0000" - - workdir = d.getVar('WORKDIR', True) - file = os.path.join(workdir, 'dev_id.json') - - # Update dev_id.json with the auxiliary firmware revision - with open(file, "r+") as jsonFile: - data = json.load(jsonFile) - jsonFile.seek(0) - jsonFile.truncate() - data["aux"] = int(auxVer, 16) - json.dump(data, jsonFile) -} - -do_install() { - install -d ${D}${datadir}/ipmi-providers - install -m 0644 -D ${WORKDIR}/cipher_list.json \ - ${D}${datadir}/ipmi-providers/cipher_list.json - install -m 0644 -D ${WORKDIR}/dcmi_cap.json \ - ${D}${datadir}/ipmi-providers/dcmi_cap.json - install -m 0644 -D ${WORKDIR}/dcmi_sensors.json \ - ${D}${datadir}/ipmi-providers/dcmi_sensors.json - install -m 0644 -D ${WORKDIR}/dev_id.json \ - ${D}${datadir}/ipmi-providers/dev_id.json - install -m 0644 -D ${WORKDIR}/power_reading.json \ - ${D}${datadir}/ipmi-providers/power_reading.json -} |