summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-intel
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-intel')
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control.bb24
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/images/intel-platforms.bb17
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/bmc_config.xml48
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/csk_prv.pem8
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/csk_pub.pem4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfm_config.xml48
-rwxr-xr-xmeta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_image.py374
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_manifest.json120
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/rk_prv.pem8
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/rk_pub.pem4
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-blocksign-native.bb20
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-pfr-manager_git.bb22
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/obmc-intel-pfr-image-native.bb37
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/ipccli/ipccli_svn.bb14
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-intel-apps.bb39
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-obmc-apps.bbappend1
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb26
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb33
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1/smbios-mdrv1.service13
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb33
-rw-r--r--meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2/smbios-mdrv2.service12
21 files changed, 905 insertions, 0 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control.bb b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control.bb
new file mode 100644
index 000000000..f727b4536
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-intel/chassis/intel-chassis-control.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Chassis Power Control service for Intel based platform"
+DESCRIPTION = "Chassis Power Control service for Intel based platfrom"
+
+SRC_URI = "git://git@github.com/Intel-BMC/intel-chassis-control.git;protocol=ssh"
+SRCREV = "b9e1b13e42359baf21592480874a176548071cf2"
+
+S = "${WORKDIR}/git/services/chassis/"
+
+PV = "1.0+git${SRCPV}"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+inherit cmake systemd
+
+SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.Chassis.Control.Power.service"
+
+DEPENDS += " \
+ boost \
+ i2c-tools \
+ libgpiod \
+ sdbusplus \
+ phosphor-logging \
+ "
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/images/intel-platforms.bb b/meta-openbmc-mods/meta-common/recipes-intel/images/intel-platforms.bb
new file mode 100644
index 000000000..545ecae7f
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-intel/images/intel-platforms.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "Image with Intel content based upon Phosphor, an OpenBMC framework."
+
+inherit obmc-phosphor-full-fitimage
+inherit obmc-phosphor-image-common
+inherit obmc-phosphor-image-dev
+inherit ${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'image_types_intel_pfr', '', d)}
+
+DEPENDS += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'obmc-intel-pfr-image-native', '', d)}"
+DEPENDS += "${@bb.utils.contains('IMAGE_FSTYPES', 'intel-pfr', 'intel-pfr-manager', '', d)}"
+
+FEATURE_PACKAGES_obmc-sensors = ""
+
+fix_shadow_perms() {
+ chgrp shadow ${IMAGE_ROOTFS}${sysconfdir}/shadow
+ chmod u=rw,g+r ${IMAGE_ROOTFS}${sysconfdir}/shadow
+}
+ROOTFS_POSTPROCESS_COMMAND += "fix_shadow_perms ; "
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/bmc_config.xml b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/bmc_config.xml
new file mode 100644
index 000000000..9e7d3f82d
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/bmc_config.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- XML file for Block Sign Tool -->
+<blocksign>
+ <version>1</version>
+ <!-- Block 0 -->
+ <block0>
+ <magic>0xB6EAFD19</magic>
+ <pctype>4</pctype>
+ </block0>
+ <!-- Block 1 -->
+ <block1>
+ <magic>0xF27F28D7</magic>
+ <!-- Root key -->
+ <rkey>
+ <magic>0xA757A046</magic>
+ <curvemagic>0xC7B88C74</curvemagic>
+ <permissions>-1</permissions>
+ <keyid>-1</keyid>
+ <pubkey>rk_pub.pem</pubkey>
+ </rkey>
+ <!-- Code signing key -->
+ <cskey>
+ <magic>0x14711C2F</magic>
+ <curvemagic>0xC7B88C74</curvemagic>
+ <permissions>8</permissions>
+ <keyid>1</keyid>
+ <pubkey>csk_pub.pem</pubkey>
+ <sigmagic>0xDE64437D</sigmagic>
+ <hashalg>sha256</hashalg>
+ <signkey>rk_prv.pem</signkey>
+ <!--<script>./sign_external.sh</script>-->
+ </cskey>
+ <!-- Signature over Block 0 -->
+ <b0_sig>
+ <magic>0x15364367</magic>
+ <sigmagic>0xDE64437D</sigmagic>
+ <hashalg>sha256</hashalg>
+ <signkey>csk_prv.pem</signkey>
+ </b0_sig>
+ </block1>
+ <!-- CPLD Bitstream Specific -->
+ <padding>
+ <!-- Pad block1 such that combined block length is 1024b -->
+ <blockpad>1024</blockpad>
+ <!-- Align total package to 128 bytes -->
+ <align>128</align>
+ </padding>
+</blocksign>
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/csk_prv.pem b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/csk_prv.pem
new file mode 100644
index 000000000..a46fa2a2b
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/csk_prv.pem
@@ -0,0 +1,8 @@
+-----BEGIN EC PARAMETERS-----
+BggqhkjOPQMBBw==
+-----END EC PARAMETERS-----
+-----BEGIN EC PRIVATE KEY-----
+MHcCAQEEIFjPqxcb6tfFWyFVaQCVjeN9MtcISpYIbNlkQoODrHTUoAoGCCqGSM49
+AwEHoUQDQgAERGJveRnhIp7I5cvmjO74MJLbUJjTfvTDKlzK0hJB0WRBEFScpb9d
+xWLrwj9TNcO+EexnNcjEkF1RYNs6lHavRQ==
+-----END EC PRIVATE KEY-----
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/csk_pub.pem b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/csk_pub.pem
new file mode 100644
index 000000000..cc70d6e28
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/csk_pub.pem
@@ -0,0 +1,4 @@
+-----BEGIN PUBLIC KEY-----
+MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAERGJveRnhIp7I5cvmjO74MJLbUJjT
+fvTDKlzK0hJB0WRBEFScpb9dxWLrwj9TNcO+EexnNcjEkF1RYNs6lHavRQ==
+-----END PUBLIC KEY-----
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfm_config.xml b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfm_config.xml
new file mode 100644
index 000000000..78c816191
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfm_config.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- XML file for Block Sign Tool -->
+<blocksign>
+ <version>1</version>
+ <!-- Block 0 -->
+ <block0>
+ <magic>0xB6EAFD19</magic>
+ <pctype>3</pctype>
+ </block0>
+ <!-- Block 1 -->
+ <block1>
+ <magic>0xF27F28D7</magic>
+ <!-- Root key -->
+ <rkey>
+ <magic>0xA757A046</magic>
+ <curvemagic>0xC7B88C74</curvemagic>
+ <permissions>-1</permissions>
+ <keyid>-1</keyid>
+ <pubkey>rk_pub.pem</pubkey>
+ </rkey>
+ <!-- Code signing key -->
+ <cskey>
+ <magic>0x14711C2F</magic>
+ <curvemagic>0xC7B88C74</curvemagic>
+ <permissions>4</permissions>
+ <keyid>1</keyid>
+ <pubkey>csk_pub.pem</pubkey>
+ <sigmagic>0xDE64437D</sigmagic>
+ <hashalg>sha256</hashalg>
+ <signkey>rk_prv.pem</signkey>
+ <!--<script>./sign_external.sh</script>-->
+ </cskey>
+ <!-- Signature over Block 0 -->
+ <b0_sig>
+ <magic>0x15364367</magic>
+ <sigmagic>0xDE64437D</sigmagic>
+ <hashalg>sha256</hashalg>
+ <signkey>csk_prv.pem</signkey>
+ </b0_sig>
+ </block1>
+ <!-- CPLD Bitstream Specific -->
+ <padding>
+ <!-- Pad block1 such that combined block length is 1024b -->
+ <blockpad>1024</blockpad>
+ <!-- Align total package to 128 bytes -->
+ <align>128</align>
+ </padding>
+</blocksign>
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_image.py b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_image.py
new file mode 100755
index 000000000..5cda38b79
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_image.py
@@ -0,0 +1,374 @@
+#/usr/bin/env python3
+# coding: utf-8
+# our image is contained as parts, including the hash
+# then it gets zipped up and signed again
+
+# this internal signature is for boot and recovery, but
+# will be checked prior to writing to flash as well.
+
+# the internal signature format is a PFR-specific block
+# including a hash bitmap, certificates (public keys),
+# and the actual signature data as well, for both active
+# and recovery images
+
+# TODO: figure out if active and recovery actually have different sigs
+# TODO: build hashmap from payload manifest
+# TODO: figure out exact struct layout for PFR metadata
+import os, hashlib, struct, json, sys, subprocess, mmap, io, array, binascii, copy, shutil, re
+from array import array
+from binascii import unhexlify
+from hashlib import sha1, sha256, sha512
+from shutil import copyfile
+# Flash Map
+# -----------------------------------------------
+# Start addr Contents
+# 0x00000000 S U-Boot
+# 0x00080000 S+ PFM
+# 0x000a0000 U U-boot Env
+# 0x000C0000 U SOFS
+# 0x002c0000 U RWFS
+# 0x00b00000 S fit-image
+# 0x02a00000 S+ rc-image
+# 0x04a00000 U staging-image
+# * partially signed (not full 64k page)
+# + unsigned, owned by pfr
+
+# TODO: The below defines should go to manifest files.
+# Keeping it here hard coded for now.
+# The pages to be skipped for HASH and PBC
+# Pages: 0x80 to 0x9f - starting PFM region until end of pfm
+# Pages: 0x2a00 to 0x7FFF - starting RC-image until end of flash
+EXCLUDE_PAGES =[[0x80, 0x9f],[0x2a00,0x7fff]]
+
+# SPI PFM globals
+PFM_OFFSET = 0x80000
+PFM_SPI = 0x1
+PFM_I2C = 0x2
+SHA256 = 0x1
+SHA256_SIZE = 32
+PFM_DEF_SIZE = 16
+PFM_SPI_SIZE_DEF = 16 # 16 bytes of SPI PFM
+PFM_SPI_SIZE_HASH = 32 # 32 bytes of SPI region HASH
+PFM_I2C_SIZE = 40 # 40 bytes of i2c rules region in PFM
+
+PAGE_SIZE = 0x1000 # 4KB size of page
+
+def load_manifest(fname):
+ manifest = {}
+ with open(fname, 'r') as fd:
+ manifest = json.load(fd)
+ return manifest
+
+class pfm_spi(object):
+
+ def __init__(self, prot_mask, start_addr, end_addr, hash, hash_pres):
+ self.spi_pfm = PFM_SPI
+ self.spi_prot_mask = prot_mask
+ self.spi_hash_pres = hash_pres
+ if hash_pres == 1:
+ self.spi_hash = hash
+ self.spi_pfm_rsvd = 0xffffffff # b'\xff'*4
+ self.spi_start_addr = start_addr
+ self.spi_end_addr = end_addr
+
+class pfm_i2c(object):
+
+ def __init__(self, bus_id, rule_id, address, cmd_map):
+ self.i2c_pfm = PFM_I2C
+ self.i2c_pfm_rsvd = 0xffffffff # b'\xff'*4
+ self.i2c_bus_id = bus_id
+ self.i2c_rule_id = rule_id
+ self.i2c_address = address
+ self.i2c_cmd_whitelist = cmd_map
+
+class pfr_bmc_image(object):
+
+# json_file, firmware_file
+ def __init__(self, manifest, firmware_file, build_ver, build_num, build_hash):
+
+ self.manifest = load_manifest(manifest)
+ self.firmware_file = firmware_file
+ self.build_version = build_ver
+ self.build_number = build_num
+ self.build_hash = build_hash
+
+ self.pfr_rom_file = 'image-mtd-pfr'
+ open(self.pfr_rom_file, 'a').close()
+
+ self.page_size = PAGE_SIZE
+ self.empty = b'\xff' * self.page_size
+
+ self.image_parts = []
+ for p in self.manifest['image-parts']:
+ # the json should have in the order- filename, index, offset, size and protection byte
+ self.image_parts.append((p['name'], p['index'], p['offset'], p['size'], p['prot_mask'], p['pfm'], p['hash'], p['compress']))
+ print(self.image_parts)
+
+ self.act_dgst = hashlib.sha256()
+
+ # SPI regions PFM array
+ self.pfm_spi_regions = []
+ self.pfm_bytes = PFM_DEF_SIZE # PFM definition bytes (SPI regions + SMBUS)
+
+ # hash, erase and compression bit maps for 128MB
+ self.pbc_erase_bitmap = bytearray(4096)
+ self.pbc_comp_bitmap = bytearray(4096)
+
+ self.pbc_comp_payload = 0
+ self.sec_rev = 1
+
+ # fill in the calculated data
+ self.hash_and_map()
+
+ self.i2c_rules = []
+ for i in self.manifest['i2c-rules']:
+ # the json should have in the order- bus-id, rule-id, address, size and cmd-whitelist
+ self.i2c_rules.append((i['bus-id'], i['rule-id'], i['address'], i['cmd-whitelist']))
+ print(self.i2c_rules)
+
+ # I2C rules PFM array
+ self.pfm_i2c_rules = []
+
+ # Generate the i2c rules
+ self.build_i2c_rules()
+
+ # Generate PFM region binary - pfm.bin
+ self.build_pfm()
+ print("PFM build done")
+
+ # Generate PBC region - pbc.bin
+ self.pbc_hdr()
+ print("PBC build done")
+
+ def hash_compress_regions(self, p, upd):
+
+ # JSON format as below
+ # 0. "name": <image region name>
+ # 1. "index": 1,
+ # 2. "offset": <start addr>,
+ # 3. "size": <size of the region>,
+ # 4. "prot_mask": <PFR protection mask>,
+ # 5. "pfm": <1|0 -add in PFM or not>,
+ # 6. "hash": <hashing of the region needed>,
+ # 7. "compress": <region to be compressed>
+
+ image_name = p[0]
+ start_addr = int(p[2],16) #image part start address
+ size = int(p[3],16) #size of the image part
+ pfm_prot_mask = p[4] # pfm protection mask
+ pfm_flag = p[5] # pfm needed?
+ hash_flag = p[6] #to be hashed?
+ compress = p[7] #compress flag
+ index = p[1] # image part index
+ # 1 page is 4KB
+ page = start_addr >> 12
+
+ with open(self.firmware_file, "rb") as f:
+ f.seek(start_addr)
+ skip = False
+
+ if hash_flag == 1:
+ hash_dgst = hashlib.sha256()
+
+ for chunk in iter(lambda: f.read(self.page_size), b''):
+ chunk_len = len(chunk)
+ if chunk_len != self.page_size:
+ chunk = b''.join([chunk, b'\xff' * (self.page_size - chunk_len)])
+
+ for p in EXCLUDE_PAGES:
+ if (page >= p[0]) and (page <= p[1]):
+ #print("Exclude page={}".format(page))
+ skip = True
+ break
+
+ if not skip:
+ # add to the hash
+ if hash_flag == 1:
+ # HASH for the region
+ self.act_dgst.update(chunk)
+ hash_dgst.update(chunk)
+
+ if compress == 1:
+ self.pbc_erase_bitmap[page >> 3] |= 1 << (7- (page % 8)) # Big endian bit map
+ # add to the pbc map
+ if chunk != self.empty:
+ #print("compressed page ={}".format(page))
+ upd.write(chunk)
+ self.pbc_comp_bitmap[page >> 3] |= 1 << (7- (page % 8)) # Big Endian bit map
+ self.pbc_comp_payload += chunk_len # compressed payload bytes
+
+ page += 1
+
+ if (page * self.page_size) >= (size + start_addr):
+ break
+
+ if pfm_flag == 1:
+ self.pfm_bytes += PFM_SPI_SIZE_DEF
+
+ hash = b'\x00' * 32
+ hash_pres = 0
+
+ if hash_flag == 1:
+ # region's hash
+ hash = hash_dgst.hexdigest()
+ hash_pres = SHA256
+ self.pfm_bytes += PFM_SPI_SIZE_HASH
+
+ # append to SPI regions in PFM
+ self.pfm_spi_regions.append(pfm_spi(pfm_prot_mask, start_addr, (start_addr+size), hash, hash_pres))
+
+ def add_i2c_rules(self, i):
+ bus_id = i[0] # I2C Bus number
+ rule_id = i[1] # I2C rule number
+ addr = i[2] # I2C device address
+ cmds = i[3] # I2C white listed commands for which i2c write to be allowed
+ whitelist_map = bytearray(32)
+
+ self.pfm_bytes += PFM_I2C_SIZE # add upto PFM size
+
+ for c in cmds:
+ if c == "all":
+ for i in range(32):
+ whitelist_map[i] = 0xff
+ break
+ else:
+ idx = int(c,16) / 8 # index in the 32 bytes of white list i2c cmds
+ bit = int(c,16) % 8 # bit position to set
+ whitelist_map[idx] |= (1 << bit)
+
+ # append to I2C rules in PFM
+ self.pfm_i2c_rules.append(pfm_i2c(bus_id, rule_id, addr, whitelist_map))
+
+ def build_i2c_rules(self):
+ for i in self.i2c_rules:
+ print(i[0], i[1], i[2], i[3])
+ self.add_i2c_rules(i)
+
+ def hash_and_map(self):
+
+ # have copy of the update file for appending with PFR meta and compression
+ copyfile(self.firmware_file, self.pfr_rom_file)
+ with open("bmc_compressed.bin", "wb+") as upd:
+ for p in self.image_parts:
+ #filename, index, offset, size, protection.
+ print(p[0], p[1], p[2], p[3], p[4])
+ self.hash_compress_regions(p, upd)
+
+ def pbc_hdr(self):
+ '''
+ typedef struct {
+ uint8_t tag[4]; /* PBC tag */
+ uint32_t version; /* PBC Version- 0x0000_0002 */
+ uint32_t page_size; /* NOR Flash page size = 0x0000_1000 */
+ uint32_t pattern_size; /* 0xFF as pattern 1byte = 0x0000_0001 */
+ uint32_t pattern; /* 0xFF pattern = 0x0000_00FF */
+ uint32_t bitmap_size; /* 32768 pages for 128MB- 0x0000_8000 */
+ uint32_t payload_length /* payload */
+ uint8_t reserved[100]; /* Reserved 100bytes */
+ uint8_t erase_bitmap[4096]; /* erase bit map for 32768 pages */
+ uint8_t comp_bitmap[4096]; /* compression bit map for 32768 pages */
+ uint8_t comp_payload; /* compressed payload */
+ '''
+ names = [
+ 'tag', 'pbc_ver', 'page_sz', 'pattern_sz', 'pattern', 'bitmap_sz',
+ 'payload_size', 'resvd0', 'erase_bitmap', 'comp_bitmap',
+ ]
+ parts = {
+ 'tag': b'CBP_',
+ 'pbc_ver': struct.pack('<i',0x00000002),
+ 'page_sz': struct.pack('<i',0x00001000),
+ 'pattern_sz': struct.pack('<i',0x00000001),
+ 'pattern': struct.pack('<i',0x000000FF),
+ 'bitmap_sz': struct.pack('<i',0x00008000),
+ 'payload_size': struct.pack('<i',self.pbc_comp_payload),
+ 'resvd0' : b'\x00'*100,
+ 'erase_bitmap': bytes(self.pbc_erase_bitmap),
+ 'comp_bitmap': bytes(self.pbc_comp_bitmap),
+ }
+
+ with open("pbc.bin", "wb+") as pbf:
+ pbf.write(b''.join([parts[n] for n in names]))
+ pbf.seek(0) # rewind to beginning of PBC file
+ self.act_dgst.update(pbf.read()) # add up PBC data for hashing
+
+ def build_pfm(self):
+ '''
+ typedef struct {
+ uint32_t tag; /* PFM_HDR_TAG above, no terminating null */
+ uint8_t SVN; /* SVN- security revision of associated image data */
+ uint8_t bkc; /* bkc */
+ uint8_t pfm_ver_major; /* PFM revision */
+ uint8_t pfm_ver_minor;
+ uint8_t reserved0[4];
+ uint8_t build_num;
+ uint8_t build_hash[3];
+ uint8_t reserved1[12]; /* reserved */
+ uint32_t pfm_length; /* PFM size in bytes */
+ pfm_spi pfm_spi[2]; /* PFM SPI regions - u-boot & fit-image */
+ pfm_smbus pfm_smbus[4]; /* defined smbus rules for PSUs and HSBP */
+ } __attribute__((packed)) pfm_hdr;
+ '''
+ names = [
+ 'tag', 'sec_rev', 'bkc', 'pfm_ver_major', 'pfm_ver_minor', 'resvd0', 'build_num', 'build_hash1', 'build_hash2', 'build_hash3', 'resvd1', 'pfm_len',
+ ]
+ parts = {
+ 'tag': struct.pack("<I", 0x02b3ce1d),
+ 'sec_rev': struct.pack('<B', self.sec_rev),
+ 'bkc': struct.pack('<B', 0x01),
+ 'pfm_ver_major': struct.pack('<B', ((int(self.build_version) >> 8) & 0xff)),
+ 'pfm_ver_minor': struct.pack('<B', (int(self.build_version) & 0x00ff)),
+ 'resvd0': b'\xff'* 4,
+ 'build_num': struct.pack('<B', int(self.build_number,16)),
+ 'build_hash1': struct.pack('<B', (int(self.build_hash) & 0xff)),
+ 'build_hash2': struct.pack('<B', ((int(self.build_hash) >> 8) & 0xff)),
+ 'build_hash3': struct.pack('<B', ((int(self.build_hash) >> 16) & 0xff)),
+ 'resvd1': b'\xff'* 12,
+ 'pfm_len': ''
+ }
+
+ # PFM should be 128bytes aligned, find the padding bytes
+ padding_bytes = 128 - (self.pfm_bytes % 128)
+ self.pfm_bytes += padding_bytes
+ parts['pfm_len'] = struct.pack('<I', self.pfm_bytes)
+ print("PFM size={}".format(self.pfm_bytes))
+
+ with open("pfm.bin", "wb+") as f:
+ f.write(b''.join([parts[n] for n in names]))
+ for i in self.pfm_spi_regions:
+ f.write(struct.pack('<B', int(i.spi_pfm)))
+ f.write(struct.pack('<B', int(i.spi_prot_mask)))
+ f.write(struct.pack('<h', int(i.spi_hash_pres)))
+ f.write(struct.pack('<I', int(i.spi_pfm_rsvd)))
+ f.write(struct.pack('<I', int(i.spi_start_addr)))
+ f.write(struct.pack('<I', int(i.spi_end_addr)))
+
+ if i.spi_hash_pres == 1:
+ f.write(i.spi_hash.decode('hex'))
+
+ for r in self.pfm_i2c_rules:
+ f.write(struct.pack('<B', int(r.i2c_pfm)))
+ f.write(struct.pack('<I', int(r.i2c_pfm_rsvd)))
+ f.write(struct.pack('<B', int(r.i2c_bus_id)))
+ f.write(struct.pack('<B', int(r.i2c_rule_id)))
+ f.write(struct.pack('<B', int(r.i2c_address, 16)))
+ f.write(r.i2c_cmd_whitelist)
+
+ # write the padding bytes at the end
+ f.write(b'\xff' * padding_bytes)
+
+def main():
+ if len(sys.argv) != 6: #< pfr_image.py manifest.json> <update.bin> <build_version> <build_number> <build_hash>
+ print('usage: {} <manifest.json> <firmware.bin> <build_version> <build_number> <build_hash>'.format(sys.argv[0]))
+ return
+
+ json_file = sys.argv[1]
+ firmware_file = sys.argv[2]
+ build_ver = sys.argv[3]
+ build_num = sys.argv[4]
+ build_hash = sys.argv[5]
+
+ # function to generate BMC PFM, PBC header and BMC compressed image
+ pfr_bmc_image(json_file, firmware_file, build_ver, build_num, build_hash)
+
+if __name__ == '__main__':
+ main()
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_manifest.json b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_manifest.json
new file mode 100644
index 000000000..adea41eab
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/pfr_manifest.json
@@ -0,0 +1,120 @@
+{
+ "image-parts": [{
+ "name": "u-boot",
+ "index": 0,
+ "offset": "0",
+ "size": "0x80000",
+ "prot_mask": 29,
+ "pfm": 1,
+ "hash": 1,
+ "compress": 1
+ },
+ {
+ "name": "pfm",
+ "index": 1,
+ "offset": "0x80000",
+ "size": "0x20000",
+ "prot_mask": 0,
+ "pfm": 1,
+ "hash": 0,
+ "compress": 0
+ },
+ {
+ "name": "u-boot-env",
+ "index": 2,
+ "offset": "0xa0000",
+ "size": "0x20000",
+ "prot_mask": 31,
+ "pfm": 1,
+ "hash": 0,
+ "compress": 1
+ },
+ {
+ "name": "sofs",
+ "index": 3,
+ "offset": "0xc0000",
+ "size": "0x200000",
+ "prot_mask": 31,
+ "pfm": 1,
+ "hash": 0,
+ "compress": 1
+ },
+ {
+ "name": "rwfs",
+ "index": 4,
+ "offset": "0x2c0000",
+ "size": "0x840000",
+ "prot_mask": 31,
+ "pfm": 1,
+ "hash": 0,
+ "compress": 1
+ },
+ {
+ "name": "fit-image-a",
+ "index": 5,
+ "offset": "0xb00000",
+ "size": "0x1f00000",
+ "prot_mask": 29,
+ "pfm": 1,
+ "hash": 1,
+ "compress": 1
+ },
+ {
+ "name": "rc-image",
+ "index": 6,
+ "offset": "0x2a00000",
+ "size": "0x2000000",
+ "prot_mask": 0,
+ "pfm": 1,
+ "hash": 0,
+ "compress": 0
+ },
+ {
+ "name": "image-stg",
+ "index": 7,
+ "offset": "0x4a00000",
+ "size": "0x3600000",
+ "prot_mask": 3,
+ "pfm": 1,
+ "hash": 0,
+ "compress": 0
+ }
+ ],
+ "i2c-rules": [{
+ "bus-id": 5,
+ "rule-id": 1,
+ "address": "0xD0",
+ "cmd-whitelist": ["0x00", "0x01", "0x02", "0x03", "0x04", "0x09", "0x0A", "0x0B", "0x0C", "0x0D", "0x0E", "0x0F",
+ "0x10", "0x13", "0x17", "0x1B", "0x1C", "0x1D", "0x02", "0x021", "0x22", "0x23", "0x25", "0x30",
+ "0x31", "0x32", "0x33", "0x035", "0x36", "0x37", "0x38", "0x39", "0x3A", "0x3B", "0x3C", "0x3D"]
+ },
+ {
+ "bus-id": 5,
+ "rule-id": 2,
+ "address": "0xD6",
+ "cmd-whitelist": ["0x00", "0x01", "0x02", "0x03", "0x04", "0x09", "0x0A", "0x0B", "0x0C", "0x0D", "0x0E", "0x0F",
+ "0x10", "0x13", "0x17", "0x1B", "0x1C", "0x1D", "0x02", "0x021", "0x22", "0x23", "0x25", "0x30",
+ "0x31", "0x32", "0x33", "0x035", "0x36", "0x37", "0x38", "0x39", "0x3A", "0x3B", "0x3C", "0x3D"]
+ },
+ {
+ "bus-id": 8,
+ "rule-id": 3,
+ "address": "0xB0",
+ "cmd-whitelist": ["0x03", "0x05", "0x06", "0x19", "0x1A", "0x30", "0x3A", "0x3B", "0x3C", "0x3D", "0x3E", "0x3F",
+ "0x79", "0x7A", "0x7B", "0x7C", "0x7D", "0x7E", "0x7F", "0x81", "0x82", "0x86", "0x87", "0x88",
+ "0x89", "0x8C", "0x8D", "0x8E", "0x8F", "0x90", "0x91", "0x92", "0x93", "0x94", "0x95", "0x96",
+ "0x97", "0x98", "0x9A", "0xA6", "0xA7", "0xD0", "0xD3", "0xD4", "0xD5", "0xD6", "0xD7", "0xD8",
+ "0xD9", "0xDC", "0xDD", "0xDE", "0xDE"]
+ },
+ {
+ "bus-id": 8,
+ "rule-id": 4,
+ "address": "0xB2",
+ "cmd-whitelist": ["0x03", "0x05", "0x06", "0x19", "0x1A", "0x30", "0x3A", "0x3B", "0x3C", "0x3D", "0x3E", "0x3F",
+ "0x79", "0x7A", "0x7B", "0x7C", "0x7D", "0x7E", "0x7F", "0x81", "0x82", "0x86", "0x87", "0x88",
+ "0x89", "0x8C", "0x8D", "0x8E", "0x8F", "0x90", "0x91", "0x92", "0x93", "0x94", "0x95", "0x96",
+ "0x97", "0x98", "0x9A", "0xA6", "0xA7", "0xD0", "0xD3", "0xD4", "0xD5", "0xD6", "0xD7", "0xD8",
+ "0xD9", "0xDC", "0xDD", "0xDE", "0xDE"]
+ }
+ ]
+}
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/rk_prv.pem b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/rk_prv.pem
new file mode 100644
index 000000000..9e8616795
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/rk_prv.pem
@@ -0,0 +1,8 @@
+-----BEGIN EC PARAMETERS-----
+BggqhkjOPQMBBw==
+-----END EC PARAMETERS-----
+-----BEGIN EC PRIVATE KEY-----
+MHcCAQEEIHVbq5CmT4Vr4Jb0eJK0+KhUxDOWy1kh9QYAClV5MH1GoAoGCCqGSM49
+AwEHoUQDQgAEZUL6ZcF0YN590Pq/bKPYjfa3F4E44XiKcqvS6+l2GfSdCLRhXWHw
+iV803vFkTsZ1CfpzFdZGwfbwg7nvG5UpSQ==
+-----END EC PRIVATE KEY-----
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/rk_pub.pem b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/rk_pub.pem
new file mode 100644
index 000000000..117e08bae
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/files/rk_pub.pem
@@ -0,0 +1,4 @@
+-----BEGIN PUBLIC KEY-----
+MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEZUL6ZcF0YN590Pq/bKPYjfa3F4E4
+4XiKcqvS6+l2GfSdCLRhXWHwiV803vFkTsZ1CfpzFdZGwfbwg7nvG5UpSQ==
+-----END PUBLIC KEY-----
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-blocksign-native.bb b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-blocksign-native.bb
new file mode 100644
index 000000000..12394dd91
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-blocksign-native.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Intel Blocksign tool for PFR image"
+DESCRIPTION = "Image signing tool for BMC PFR image"
+
+inherit native cmake
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
+
+DEPENDS = "openssl-native libxml2-native "
+
+SRC_URI = "git://git@github.com/Intel-BMC/blocksign;protocol=ssh"
+
+SRCREV = "60d76db038a0d85851098b13451246abb0d876ed"
+
+S = "${WORKDIR}/git/"
+
+do_install_append() {
+ install -d ${STAGING_DIR}/intel-pfr-files
+ install -m 775 ${B}/blocksign ${STAGING_DIR}/intel-pfr-files
+}
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-pfr-manager_git.bb b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-pfr-manager_git.bb
new file mode 100644
index 000000000..96bfec0a8
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/intel-pfr-manager_git.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Intel PFR Manager Service"
+DESCRIPTION = "Daemon to handle all PFR functionalities"
+
+PV = "1.0+git${SRCPV}"
+
+S = "${WORKDIR}/git/intel-pfr-manager"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
+SRCREV = "226ca2842e0a14ad56b4ebeedfd82ac2ea7e145e"
+
+inherit cmake systemd
+SYSTEMD_SERVICE_${PN} = "xyz.openbmc_project.Intel.PFR.Manager.service"
+
+DEPENDS += " \
+ sdbusplus \
+ phosphor-logging \
+ boost \
+ i2c-tools \
+ "
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/obmc-intel-pfr-image-native.bb b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/obmc-intel-pfr-image-native.bb
new file mode 100644
index 000000000..307fe1829
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-intel/intel-pfr/obmc-intel-pfr-image-native.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Intel PFR manifest and signing key for development and testing"
+DESCRIPTION = "Do not use this signing keys to sign CI and release images."
+
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
+
+inherit native
+
+PFR_KEY_NAME ?= "pfr-dev-key"
+PFR_SIGN_UTIL ?= "blocksign"
+DEPENDS += " intel-blocksign-native"
+
+SRC_URI = " \
+ file://pfr_manifest.json \
+ file://pfr_image.py \
+ file://pfm_config.xml \
+ file://bmc_config.xml \
+ file://csk_prv.pem \
+ file://csk_pub.pem \
+ file://rk_pub.pem \
+ file://rk_prv.pem \
+ "
+
+do_install() {
+ bbplain "Copying the intel pfr image generation scripts and image signing keys"
+
+ install -d ${STAGING_DIR}/intel-pfr-files
+ install -m 400 ${WORKDIR}/pfr_manifest.json ${STAGING_DIR}/intel-pfr-files
+ install -m 400 ${WORKDIR}/pfm_config.xml ${STAGING_DIR}/intel-pfr-files
+ install -m 400 ${WORKDIR}/bmc_config.xml ${STAGING_DIR}/intel-pfr-files
+ install -m 775 ${WORKDIR}/pfr_image.py ${STAGING_DIR}/intel-pfr-files
+ install -m 400 ${WORKDIR}/csk_prv.pem ${STAGING_DIR}/intel-pfr-files
+ install -m 400 ${WORKDIR}/csk_pub.pem ${STAGING_DIR}/intel-pfr-files
+ install -m 400 ${WORKDIR}/rk_pub.pem ${STAGING_DIR}/intel-pfr-files
+ install -m 400 ${WORKDIR}/rk_prv.pem ${STAGING_DIR}/intel-pfr-files
+}
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/ipccli/ipccli_svn.bb b/meta-openbmc-mods/meta-common/recipes-intel/ipccli/ipccli_svn.bb
new file mode 100644
index 000000000..ce7d79975
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-intel/ipccli/ipccli_svn.bb
@@ -0,0 +1,14 @@
+SUMMARY = "ipccli"
+HOMEPAGE = "https://www.intel.com"
+LICENSE = "CLOSED"
+LIC_FILES_CHKSUM = ""
+
+SRC_URI[md5sum] = "917092bfe4244aa4312b572c2c9c303f"
+SRC_URI = "svn://ssvn.pdx.intel.com/deg/pve/csv/pythonsv/subprojects/;module=ipccli;rev=804701;protocol=https;user=etanous;pswd=Cardinal2bali!"
+
+DEPENDS_${PN} += "python-setuptools-native"
+
+S = "${WORKDIR}/ipccli/trunk"
+inherit setuptools
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-intel-apps.bb b/meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-intel-apps.bb
new file mode 100644
index 000000000..06cc3b972
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-intel-apps.bb
@@ -0,0 +1,39 @@
+SUMMARY = "OpenBMC for Intel - Applications"
+PR = "r1"
+
+inherit packagegroup
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${INTELBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
+
+PROVIDES = "${PACKAGES}"
+PACKAGES = " \
+ ${PN}-chassis \
+ ${PN}-fans \
+ ${PN}-flash \
+ ${PN}-system \
+ "
+
+PROVIDES += "virtual/obmc-chassis-mgmt"
+PROVIDES += "virtual/obmc-fan-mgmt"
+PROVIDES += "virtual/obmc-flash-mgmt"
+PROVIDES += "virtual/obmc-system-mgmt"
+
+RPROVIDES_${PN}-chassis += "virtual-obmc-chassis-mgmt"
+RPROVIDES_${PN}-fans += "virtual-obmc-fan-mgmt"
+RPROVIDES_${PN}-flash += "virtual-obmc-flash-mgmt"
+RPROVIDES_${PN}-system += "virtual-obmc-system-mgmt"
+
+SUMMARY_${PN}-chassis = "Intel Chassis"
+RDEPENDS_${PN}-chassis = " \
+ intel-chassis-control \
+ obmc-host-failure-reboots \
+ "
+
+SUMMARY_${PN}-fans = "Intel Fans"
+RDEPENDS_${PN}-fans = " \
+ phosphor-pid-control \
+ "
+
+SUMMARY_${PN}-flash = "Intel Flash"
+RDEPENDS_${PN}-flash = ""
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-obmc-apps.bbappend b/meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-obmc-apps.bbappend
new file mode 100644
index 000000000..d3b283202
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-intel/packagegroups/packagegroup-obmc-apps.bbappend
@@ -0,0 +1 @@
+RDEPENDS_${PN}-extrasdevtools = "libgpiod-tools"
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb b/meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb
new file mode 100644
index 000000000..63576a3de
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-intel/psu-manager/psu-manager.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Power supply manager for Intel based platform"
+DESCRIPTION = "Power supply manager which include PSU Cold Redundancy service"
+
+SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh;nobranch=1"
+SRCREV = "fe33964c744f871f3e024dd8d0b6ffba67394c30"
+
+S = "${WORKDIR}/git/psu-manager/"
+
+PV = "1.0+git${SRCPV}"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+inherit cmake
+inherit systemd
+
+SYSTEMD_SERVICE_${PN} += "cold-redundancy.service"
+
+DEPENDS += " \
+ systemd \
+ sdbusplus \
+ phosphor-dbus-interfaces \
+ phosphor-logging \
+ boost \
+ i2c-tools \
+ "
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb
new file mode 100644
index 000000000..0f6893ed6
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1.bb
@@ -0,0 +1,33 @@
+SUMMARY = "SMBIOS MDR version 1 service for Intel based platform"
+DESCRIPTION = "SMBIOS MDR version 1 service for Intel based platfrom"
+
+SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
+SRCREV = "226ca2842e0a14ad56b4ebeedfd82ac2ea7e145e"
+
+S = "${WORKDIR}/git/services/smbios/"
+
+PV = "1.0+git${SRCPV}"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+inherit cmake pkgconfig pythonnative
+inherit obmc-phosphor-systemd
+
+SYSTEMD_SERVICE_${PN} += "smbios-mdrv1.service"
+
+DEPENDS += " \
+ autoconf-archive-native \
+ systemd \
+ sdbusplus \
+ sdbusplus-native \
+ phosphor-dbus-interfaces \
+ phosphor-dbus-interfaces-native \
+ phosphor-logging \
+ "
+RDEPENDS_${PN} += " \
+ libsystemd \
+ sdbusplus \
+ phosphor-dbus-interfaces \
+ phosphor-logging \
+ "
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1/smbios-mdrv1.service b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1/smbios-mdrv1.service
new file mode 100644
index 000000000..edfd3bf70
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv1/smbios-mdrv1.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Intel BMC SMBIOS MDR V1
+
+[Service]
+Restart=always
+RestartSec=5
+StartLimitBurst=10
+ExecStartPre=/bin/mkdir -p /etc/smbios
+ExecStart=/usr/bin/env smbiosapp
+SyslogIdentifier=smbiosapp
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb
new file mode 100644
index 000000000..71ac31348
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2.bb
@@ -0,0 +1,33 @@
+SUMMARY = "SMBIOS MDR version 2 service for Intel based platform"
+DESCRIPTION = "SMBIOS MDR version 2 service for Intel based platfrom"
+
+SRC_URI = "git://git@github.com/Intel-BMC/provingground.git;protocol=ssh"
+SRCREV = "226ca2842e0a14ad56b4ebeedfd82ac2ea7e145e"
+
+S = "${WORKDIR}/git/services/smbios-mdrv2/"
+
+PV = "1.0+git${SRCPV}"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+inherit cmake pkgconfig pythonnative
+inherit obmc-phosphor-systemd
+
+SYSTEMD_SERVICE_${PN} += "smbios-mdrv2.service"
+
+DEPENDS += " \
+ autoconf-archive-native \
+ systemd \
+ sdbusplus \
+ sdbusplus-native \
+ phosphor-dbus-interfaces \
+ phosphor-dbus-interfaces-native \
+ phosphor-logging \
+ "
+RDEPENDS_${PN} += " \
+ libsystemd \
+ sdbusplus \
+ phosphor-dbus-interfaces \
+ phosphor-logging \
+ "
diff --git a/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2/smbios-mdrv2.service b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2/smbios-mdrv2.service
new file mode 100644
index 000000000..b72873406
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-intel/smbios/smbios-mdrv2/smbios-mdrv2.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Intel BMC SMBIOS MDR V2
+
+[Service]
+Restart=always
+RestartSec=5
+StartLimitBurst=10
+ExecStart=/usr/bin/env smbiosmdrv2app
+SyslogIdentifier=smbiosmdrv2app
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}