Initial commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
SUMMARY = "Library and Host-side tool for talking to OpenBMC IPMI BLOB handlers."
|
||||
DESCRIPTION = "This package provides a library for the BMC and host for core blob mechanics and host-side binaries for talking to OpenBMC IPMI BLOB handlers."
|
||||
HOMEPAGE = "http://github.com/openbmc/ipmi-blob-tool"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
|
||||
SRCREV = "58a690ab954135761d4448b807b9c1d7fedba02e"
|
||||
PV = "0.1+git${SRCPV}"
|
||||
PR = "r1"
|
||||
|
||||
SRC_URI = "git://github.com/openbmc/ipmi-blob-tool;branch=master;protocol=https"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit meson pkgconfig
|
||||
|
||||
EXTRA_OEMESON = "-Dtests=disabled"
|
||||
+262
@@ -0,0 +1,262 @@
|
||||
From 066f647fbec1f3177d673d157b18ff0c0f517627 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Schendel <alex.schendel@intel.com>
|
||||
Date: Fri, 9 Jun 2023 16:35:24 -0700
|
||||
Subject: [PATCH] Fru: Fix edit field not checking area existence
|
||||
|
||||
The current implementation of ipmitool fru edit does not perform proper
|
||||
checks when attempting to resize the FRU. This results in undesireable
|
||||
changes to the FRU in several instances:
|
||||
1. If the FRU is shrinking and a FRU area does not exist (offset 0),
|
||||
ipmitool may attempt to shift it forwards (decrementing the offset).
|
||||
This results in a wraparound to 0xFF, leaving an erroneous field offset.
|
||||
2. If the areas are not in the exact order given as an example in the
|
||||
FRU spec, ipmitool may shift the wrong fields, which would cause data
|
||||
loss. (the FRU spec does not specify a required order for FRU fields)
|
||||
3. If the FRU is being enlarged after a fru field edit, the FRU size is
|
||||
not properly modified before writing the FRU, so the end of the FRU
|
||||
becomes truncated, resulting in data loss.
|
||||
|
||||
This commit addresses these three issues by:
|
||||
1. Confirming that a area's does not have an offset of 0x00 before
|
||||
attempting to shift it.
|
||||
2. Ensuring that the area's offset is after the area that was modified
|
||||
before attempting to shift it.
|
||||
3. Properly edit the size of the FRU before the FRU is written.
|
||||
|
||||
Tested:
|
||||
Shrinking a FRU was tested with and without the change:
|
||||
New Header without change:
|
||||
01 00 00 01 0a ff 00 f5
|
||||
^^
|
||||
Note that the Multi Record area now has an offset of 0xFF.
|
||||
|
||||
New Header with change:
|
||||
01 00 00 01 0a 00 00 f4
|
||||
^^
|
||||
Note that the Multi Record area retains its offset of 0x00.
|
||||
|
||||
This change also includes printouts specifying what offsets are found
|
||||
and when they are being shifted, as well as data being erased if the FRU
|
||||
is being shrunk:
|
||||
Offset: 0
|
||||
Offset: 0
|
||||
Offset: 8
|
||||
Offset: 88 moving by -8 bytes.
|
||||
Offset: 0
|
||||
Erasing leftover data from 200 to 208
|
||||
|
||||
After shrinking the FRU, the FRU was reverted to its original state with
|
||||
the fix in place:
|
||||
01 00 00 01 0b 00 00 f3
|
||||
^^
|
||||
This resulted in only the product area offset being updated as expected.
|
||||
Offset: 0
|
||||
Offset: 0
|
||||
Offset: 8
|
||||
Offset: 80 moving by 8 bytes.
|
||||
Offset: 0
|
||||
|
||||
The implementation of IPMI FRU write used in these tests errors out
|
||||
without writing the FRU if a checksum fails to pass, so without this
|
||||
fix, it was impossible to enlarge the FRU. This is because without the
|
||||
change, the last 8 bytes of the FRU would be truncated which would
|
||||
result in the checksum of the final FRU area being lost which would thus
|
||||
trigger this FRU write failure.
|
||||
|
||||
Signed-off-by: Alex Schendel <alex.schendel@intel.com>
|
||||
---
|
||||
include/ipmitool/ipmi_fru.h | 3 +-
|
||||
lib/ipmi_fru.c | 143 +++++++++++++++++++++++-------------
|
||||
2 files changed, 93 insertions(+), 53 deletions(-)
|
||||
|
||||
diff --git a/include/ipmitool/ipmi_fru.h b/include/ipmitool/ipmi_fru.h
|
||||
index 4d4d6c6..e7e8876 100644
|
||||
--- a/include/ipmitool/ipmi_fru.h
|
||||
+++ b/include/ipmitool/ipmi_fru.h
|
||||
@@ -46,6 +46,7 @@
|
||||
#define GET_FRU_INFO 0x10
|
||||
#define GET_FRU_DATA 0x11
|
||||
#define SET_FRU_DATA 0x12
|
||||
+#define FRU_AREA_COUNT 5
|
||||
|
||||
enum {
|
||||
FRU_CHASSIS_PARTNO,
|
||||
@@ -82,7 +83,7 @@ struct fru_header {
|
||||
uint8_t product;
|
||||
uint8_t multi;
|
||||
} offset;
|
||||
- uint8_t offsets[5];
|
||||
+ uint8_t offsets[FRU_AREA_COUNT];
|
||||
};
|
||||
uint8_t pad;
|
||||
uint8_t checksum;
|
||||
diff --git a/lib/ipmi_fru.c b/lib/ipmi_fru.c
|
||||
index 3d1d8a1..2687635 100644
|
||||
--- a/lib/ipmi_fru.c
|
||||
+++ b/lib/ipmi_fru.c
|
||||
@@ -5044,43 +5044,91 @@ ipmi_fru_set_field_string_rebuild(struct ipmi_intf * intf, uint8_t fruId,
|
||||
#endif
|
||||
|
||||
/* Must move sections */
|
||||
- /* Section that can be modified are as follow
|
||||
- Chassis
|
||||
- Board
|
||||
- product */
|
||||
-
|
||||
- /* Chassis type field */
|
||||
- if (f_type == 'c' )
|
||||
+ /* IPMI FRU Spec does not specify the order of areas in the FRU.
|
||||
+ * Therefore, we must check each section's current offset in order to determine
|
||||
+ * which areas much be adjusted.
|
||||
+ */
|
||||
+
|
||||
+ /* The Internal Use Area does not require the area length be provided, so we must
|
||||
+ * work to calculate the length.
|
||||
+ */
|
||||
+ bool internal_move = false;
|
||||
+ uint8_t nearest_area = fru.size;
|
||||
+ uint8_t last_area = 0x00;
|
||||
+ uint32_t end_of_fru;
|
||||
+ if (header.offset.internal != 0 && header.offset.internal > header_offset)
|
||||
{
|
||||
- printf("Moving Section Chassis, from %i to %i\n",
|
||||
- ((header.offset.board) * 8),
|
||||
- ((header.offset.board + change_size_by_8) * 8)
|
||||
- );
|
||||
- memcpy(
|
||||
- (fru_data_new + ((header.offset.board + change_size_by_8) * 8)),
|
||||
- (fru_data_old + (header.offset.board) * 8),
|
||||
- board_len
|
||||
- );
|
||||
- header.offset.board += change_size_by_8;
|
||||
+ internal_move = true;
|
||||
}
|
||||
- /* Board type field */
|
||||
- if ((f_type == 'c' ) || (f_type == 'b' ))
|
||||
+ /* Check Chassis, Board, Product, and Multirecord Area offsets to see if they need
|
||||
+ * to be moved.
|
||||
+ */
|
||||
+ for (int i = 0; i < FRU_AREA_COUNT; i++)
|
||||
{
|
||||
- printf("Moving Section Product, from %i to %i\n",
|
||||
- ((header.offset.product) * 8),
|
||||
- ((header.offset.product + change_size_by_8) * 8)
|
||||
- );
|
||||
- memcpy(
|
||||
- (fru_data_new + ((header.offset.product + change_size_by_8) * 8)),
|
||||
- (fru_data_old + (header.offset.product) * 8),
|
||||
- product_len
|
||||
- );
|
||||
- header.offset.product += change_size_by_8;
|
||||
+ #ifdef DBG_RESIZE_FRU
|
||||
+ printf("Offset: %i", header.offsets[i] * 8);
|
||||
+ #endif
|
||||
+ /* Offset of zero means area does not exist.
|
||||
+ * Internal Use Area must be handled separately
|
||||
+ */
|
||||
+ if (header.offsets[i] <= 0 || header.offsets[i] == header.offset.internal)
|
||||
+ {
|
||||
+#ifdef DBG_RESIZE_FRU
|
||||
+ printf("\n");
|
||||
+#endif
|
||||
+ continue;
|
||||
+ }
|
||||
+ /* Internal Use Area length will be calculated by finding the closest area
|
||||
+ * following it.
|
||||
+ */
|
||||
+ if (internal_move && header.offsets[i] > header.offset.internal &&
|
||||
+ header.offsets[i] < nearest_area)
|
||||
+ {
|
||||
+ nearest_area = header.offsets[i];
|
||||
+ }
|
||||
+ if (last_area < header.offsets[i])
|
||||
+ {
|
||||
+ last_area = header.offsets[i];
|
||||
+ end_of_fru = (header.offsets[i] + *(fru_data_old + (header.offsets[i] * 8) + 1)) * 8;
|
||||
+ if (header.offsets[i] == header.offset.multi)
|
||||
+ {
|
||||
+ end_of_fru = (header.offsets[i] + *(fru_data_old + (header.offsets[i] * 8) + 1)) * 8;
|
||||
+ }
|
||||
+ }
|
||||
+ if ((header.offsets[i] * 8) > header_offset)
|
||||
+ {
|
||||
+#ifdef DBG_RESIZE_FRU
|
||||
+ printf(" moving by %i bytes.", change_size_by_8 * 8);
|
||||
+#endif
|
||||
+ uint32_t length = *(fru_data_old + (header.offsets[i] * 8) + 1) * 8;
|
||||
+ /* MultiRecord Area length is third byte rather than second. */
|
||||
+ if(header.offsets[i] == header.offset.multi)
|
||||
+ {
|
||||
+ length = *(fru_data_old + (header.offsets[i] * 8) + 2) * 8;
|
||||
+ }
|
||||
+ memcpy(
|
||||
+ (fru_data_new + ((header.offsets[i] + change_size_by_8) * 8)),
|
||||
+ (fru_data_old + (header.offsets[i]) * 8),
|
||||
+ length
|
||||
+ );
|
||||
+ header.offsets[i] += change_size_by_8;
|
||||
+ }
|
||||
+#ifdef DBG_RESIZE_FRU
|
||||
+ printf("\n");
|
||||
+#endif
|
||||
}
|
||||
-
|
||||
- if ((f_type == 'c' ) || (f_type == 'b' ) || (f_type == 'p' )) {
|
||||
- printf("Change multi offset from %d to %d\n", header.offset.multi, header.offset.multi + change_size_by_8);
|
||||
- header.offset.multi += change_size_by_8;
|
||||
+ if (internal_move)
|
||||
+ {
|
||||
+ /* If the internal area is the final area in the FRU, then the only bearing
|
||||
+ * we have for the length of the FRU is the size of the FRU.
|
||||
+ */
|
||||
+ uint32_t length = nearest_area - header.offset.internal;
|
||||
+ memcpy(
|
||||
+ (fru_data_new + ((header.offset.internal + change_size_by_8) * 8)),
|
||||
+ (fru_data_old + (header.offset.internal) * 8),
|
||||
+ length
|
||||
+ );
|
||||
+ header.offset.internal += change_size_by_8;
|
||||
}
|
||||
|
||||
/* Adjust length of the section */
|
||||
@@ -5110,27 +5158,18 @@ ipmi_fru_set_field_string_rebuild(struct ipmi_intf * intf, uint8_t fruId,
|
||||
memcpy(fru_data_new, pfru_header, sizeof(struct fru_header));
|
||||
}
|
||||
|
||||
- /* Move remaining sections in 1 copy */
|
||||
- printf("Moving Remaining Bytes (Multi-Rec , etc..), from %i to %i\n",
|
||||
- remaining_offset,
|
||||
- ((header.offset.product) * 8) + product_len_new
|
||||
- );
|
||||
- if(((header.offset.product * 8) + product_len_new - remaining_offset) < 0)
|
||||
- {
|
||||
- memcpy(
|
||||
- fru_data_new + (header.offset.product * 8) + product_len_new,
|
||||
- fru_data_old + remaining_offset,
|
||||
- fru.size - remaining_offset
|
||||
- );
|
||||
- }
|
||||
- else
|
||||
+ /* If FRU has shrunk in size, zero-out any leftover data */
|
||||
+ if (change_size_by_8 < 0)
|
||||
{
|
||||
- memcpy(
|
||||
- fru_data_new + (header.offset.product * 8) + product_len_new,
|
||||
- fru_data_old + remaining_offset,
|
||||
- fru.size - ((header.offset.product * 8) + product_len_new)
|
||||
- );
|
||||
+ end_of_fru += change_size_by_8 * 8;
|
||||
+ int length_of_erase = change_size_by_8 * -1 * 8;
|
||||
+#ifdef DBG_RESIZE_FRU
|
||||
+ printf("Erasing leftover data from %i to %i\n", end_of_fru, end_of_fru + length_of_erase);
|
||||
+#endif
|
||||
+ memset(fru_data_new + end_of_fru, 0, length_of_erase);
|
||||
}
|
||||
+ /* Step 7 assumes fru.size is the size of the new FRU. */
|
||||
+ fru.size += (change_size_by_8 * 8);
|
||||
}
|
||||
|
||||
/* Update only if it's fits padding length as defined in the spec, otherwise, it's an internal
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
PRIVATE ENTERPRISE NUMBERS
|
||||
|
||||
(last updated 2023-01-25)
|
||||
|
||||
SMI Network Management Private Enterprise Codes:
|
||||
|
||||
Prefix: iso.org.dod.internet.private.enterprise (1.3.6.1.4.1)
|
||||
|
||||
This file is https://www.iana.org/assignments/enterprise-numbers.txt
|
||||
This file has been reduced to entities signing CLAs with OpenBMC
|
||||
https://drive.google.com/drive/folders/1Ooi0RdTcaOWF1DWFJUAJDdN7tRKde7Nl
|
||||
|
||||
Decimal
|
||||
| Organization
|
||||
| | Contact
|
||||
| | | Email
|
||||
| | | |
|
||||
0
|
||||
Reserved
|
||||
Internet Assigned Numbers Authority
|
||||
iana&iana.org
|
||||
2
|
||||
IBM (https://w3.ibm.com/standards )
|
||||
Glenn Daly
|
||||
gdaly&us.ibm.com
|
||||
343
|
||||
Intel Corporation
|
||||
Adam Kaminski
|
||||
adam.kaminski&intel.com
|
||||
674
|
||||
Dell Inc.
|
||||
David L. Douglas
|
||||
david_l_douglas&dell.com
|
||||
1694
|
||||
HCL Technologies Limited
|
||||
Ms. Bindu Dandapani
|
||||
bindud&hcl.in
|
||||
2487
|
||||
Phoenix Technologies Ltd.
|
||||
Ian Anderson
|
||||
ian_anderson&phoenix.com
|
||||
4128
|
||||
ARM Ltd.
|
||||
Jon Brawn
|
||||
jbrawn&arm.com
|
||||
6569
|
||||
INVENTEC CORPORATION
|
||||
JH CHYAN
|
||||
chyan.jh&inventec.com
|
||||
7244
|
||||
Quanta Computer Inc.
|
||||
Strong Chen
|
||||
&strong.chen&quantatw.com
|
||||
8554
|
||||
Departement Elektrotechnik, ETH Zuerich
|
||||
Simon Moser
|
||||
smoser&ee.ethz.ch
|
||||
11129
|
||||
Google, Inc.
|
||||
Ben Laurie
|
||||
benl&google.com
|
||||
11183
|
||||
Mitac International Corp.
|
||||
P.C. Wang
|
||||
p.c.wang&mic.com.tw
|
||||
19046
|
||||
Lenovo Enterprise Business Group
|
||||
Joe Bolan
|
||||
jbolan&lenovo.com
|
||||
20974
|
||||
American Megatrends, Inc
|
||||
Kenny Chiang
|
||||
kennychiang&ami.com.tw
|
||||
33049
|
||||
Mellanox Technologies LTD
|
||||
Sagi Rotem
|
||||
sagir&mellanox.co.il
|
||||
40092
|
||||
Wiwynn Corporation
|
||||
Zong Bing, Wu
|
||||
bing_wu&wiwynn.com
|
||||
40981
|
||||
Facebook, Inc.
|
||||
Neal Poole
|
||||
iana-assign&fb.com
|
||||
42817
|
||||
IBM Platform Firmware Division
|
||||
Jayashankar Padath
|
||||
jayashankar.padath&in.ibm.com
|
||||
45065
|
||||
Insyde
|
||||
Y.C. Lin
|
||||
yc.lin&insyde.com
|
||||
48482
|
||||
Linaro Ltd
|
||||
Dave Pigott
|
||||
dave.pigott&linaro.org
|
||||
48512
|
||||
Inspur Group Co.,Ltd.
|
||||
Chunpeng Mao
|
||||
Maochp&inspur.com
|
||||
49150
|
||||
Vertiv Co
|
||||
John Bogdan
|
||||
john.bogdan&vertivco.com
|
||||
49622
|
||||
ASRock Rack Incorporation
|
||||
Jeff Chan
|
||||
jeff9_chan&asrockrack.com
|
||||
49769
|
||||
YADRO
|
||||
Support
|
||||
snmp&yadro.com
|
||||
51974
|
||||
Raptor Computing Systems, LLC
|
||||
Support Department
|
||||
support&raptorcs.com
|
||||
52538
|
||||
Ampere Computing
|
||||
AJ Shah
|
||||
aj&erecomputing.com
|
||||
52893
|
||||
Inspur Power Systems Co.,Ltd.
|
||||
Bing Liu
|
||||
liubing&inspur.com
|
||||
@@ -0,0 +1,71 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from typing import List
|
||||
|
||||
from sh import curl # type: ignore
|
||||
|
||||
ENTERPRISES = {
|
||||
0: "Reserved",
|
||||
2: "IBM",
|
||||
343: "Intel Corporation",
|
||||
674: "Dell Inc.",
|
||||
1694: "HCL Technologies Limited",
|
||||
2487: "Phoenix Technologies Ltd.",
|
||||
4128: "ARM Ltd.",
|
||||
6569: "INVENTEC CORPORATION",
|
||||
7244: "Quanta Computer Inc.",
|
||||
8554: "Departement Elektrotechnik, ETH Zuerich",
|
||||
11129: "Google, Inc.",
|
||||
11183: "Mitac International Corp.",
|
||||
19046: "Lenovo Enterprise Business Group",
|
||||
20974: "American Megatrends, Inc",
|
||||
33049: "Mellanox Technologies LTD",
|
||||
40092: "Wiwynn Corporation",
|
||||
40981: "Facebook, Inc.",
|
||||
42817: "IBM Platform Firmware Division",
|
||||
45065: "Insyde",
|
||||
48482: "Linaro Ltd",
|
||||
48512: "Inspur Group Co.,Ltd.",
|
||||
49150: "Vertiv Co",
|
||||
49622: "ASRock Rack Incorporation",
|
||||
49769: "YADRO",
|
||||
51974: "Raptor Computing Systems, LLC",
|
||||
52538: "Ampere Computing",
|
||||
52893: "Inspur Power Systems Co.,Ltd.",
|
||||
}
|
||||
|
||||
HEADER = """\
|
||||
This file has been reduced to entities signing CLAs with OpenBMC
|
||||
https://drive.google.com/drive/folders/1Ooi0RdTcaOWF1DWFJUAJDdN7tRKde7Nl\
|
||||
"""
|
||||
|
||||
found_first: bool = False
|
||||
org: List[str] = []
|
||||
|
||||
for ln in curl(
|
||||
"-L", "https://www.iana.org/assignments/enterprise-numbers.txt"
|
||||
).splitlines():
|
||||
line = ln.rstrip()
|
||||
|
||||
# Look for Reserved/EN-0 as the start of the data.
|
||||
if "0" == line:
|
||||
found_first = True
|
||||
|
||||
# Haven't found EN-0, emit as is.
|
||||
if not found_first:
|
||||
print(line)
|
||||
# Look for magic string.
|
||||
if line.startswith("This file is "):
|
||||
print(HEADER)
|
||||
continue
|
||||
|
||||
# Add line into 'org' set.
|
||||
org.append(line)
|
||||
|
||||
# Every 4 lines (EN, Org, Contact, Email) make an org.
|
||||
if len(org) == 4:
|
||||
if int(org[0]) in ENTERPRISES:
|
||||
for g in org:
|
||||
print(g)
|
||||
|
||||
org = []
|
||||
@@ -0,0 +1,39 @@
|
||||
LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=9aa91e13d644326bf281924212862184"
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
|
||||
DEPENDS += "systemd"
|
||||
SRCREV = "c3939dac2c060651361fc71516806f9ab8c38901"
|
||||
PV = "1.8.18+git${SRCPV}"
|
||||
|
||||
SRC_URI = "git://github.com/ipmitool/ipmitool.git;protocol=https;branch=master"
|
||||
|
||||
# Temporary patch for https://codeberg.org/IPMITool/ipmitool/pulls/1
|
||||
SRC_URI += " \
|
||||
file://0001-Fru-Fix-edit-field-not-checking-area-existence.patch \
|
||||
"
|
||||
|
||||
# TODO: when a new company joins the OpenBMC project by signing
|
||||
# a CLA, if they have an enterprise number on file with the
|
||||
# IANA, the versioned file, $PWD/ipmitool/enterprise-numbers
|
||||
# needs to be updated to add their entry. The canonical
|
||||
# version of the file is locatede here:
|
||||
# https://www.iana.org/assignments/enterprise-numbers
|
||||
#
|
||||
# This file is manually downloaded so it can be versioned
|
||||
# instead of having the makefile download it during do_compile
|
||||
SRC_URI += " \
|
||||
file://enterprise-numbers \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
EXTRA_OECONF:append = " --disable-ipmishell --enable-intf-dbus DEFAULT_INTF=dbus "
|
||||
|
||||
do_compile:prepend() {
|
||||
# copy the SRC_URI version of enterprise-numbers
|
||||
# to the build dir to prevent a fetch
|
||||
mkdir -p "${WORKDIR}/build"
|
||||
cp "${WORKDIR}/enterprise-numbers" "${WORKDIR}/build/enterprise-numbers"
|
||||
}
|
||||
|
||||
# make sure that the enterprise-numbers file gets installed in the root FS
|
||||
FILES:${PN} += "${datadir}/misc/enterprise-numbers"
|
||||
@@ -0,0 +1,28 @@
|
||||
SUMMARY = "BMC Generic Binary Blob Store via OEM IPMI Blob Transport"
|
||||
DESCRIPTION = "This package provides a read/write/serialize abstraction for storing binary data through IPMI blobs"
|
||||
HOMEPAGE = "http://github.com/openbmc/phosphor-ipmi-blobs-binarystore"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
|
||||
DEPENDS += "autoconf-archive-native"
|
||||
DEPENDS += "phosphor-ipmi-blobs"
|
||||
DEPENDS += "phosphor-logging"
|
||||
DEPENDS += "protobuf-native"
|
||||
DEPENDS += "protobuf"
|
||||
SRCREV = "53992e85d2dc5864db7a7e4a8ee6f6676974e9ba"
|
||||
PACKAGECONFIG ??= ""
|
||||
PACKAGECONFIG[blobtool] = "-Dblobtool=enabled,-Dblobtool=disabled"
|
||||
PV = "1.0+git${SRCPV}"
|
||||
PR = "r1"
|
||||
|
||||
SRC_URI = "git://github.com/openbmc/phosphor-ipmi-blobs-binarystore;branch=master;protocol=https"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit meson pkgconfig
|
||||
|
||||
EXTRA_OEMESON:append = " -Dtests=disabled"
|
||||
|
||||
FILES:${PN}:append = " ${libdir}/ipmid-providers"
|
||||
FILES:${PN}:append = " ${libdir}/blob-ipmid"
|
||||
|
||||
BLOBIPMI_PROVIDER_LIBRARY += "libbinarystore.so"
|
||||
@@ -0,0 +1,26 @@
|
||||
SUMMARY = "Phosphor OEM IPMI BLOBS Protocol Implementation"
|
||||
DESCRIPTION = "This package handles a series of OEM IPMI commands that implement the BLOB protocol for sending and receiving data over IPMI."
|
||||
HOMEPAGE = "http://github.com/openbmc/phosphor-ipmi-blobs"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
|
||||
DEPENDS += " \
|
||||
ipmi-blob-tool \
|
||||
phosphor-ipmi-host \
|
||||
phosphor-logging \
|
||||
"
|
||||
SRCREV = "2f4575937b91bd62648b3545a2ee7331c4bc8dac"
|
||||
PV = "0.1+git${SRCPV}"
|
||||
PR = "r1"
|
||||
|
||||
SRC_URI = "git://github.com/openbmc/phosphor-ipmi-blobs;branch=master;protocol=https"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit meson pkgconfig
|
||||
|
||||
EXTRA_OEMESON:append = " \
|
||||
-Dtests=disabled \
|
||||
-Dexamples=false \
|
||||
"
|
||||
|
||||
FILES:${PN} += "${libdir}/ipmid-providers"
|
||||
@@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Phosphor IPMI BT DBus Bridge
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
ExecStart=/usr/bin/env btbridged
|
||||
SyslogIdentifier=btbridged
|
||||
Type=dbus
|
||||
BusName={BUSNAME}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,23 @@
|
||||
SUMMARY = "Phosphor OpenBMC BT to DBUS"
|
||||
DESCRIPTION = "Phosphor OpenBMC BT to DBUS."
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
|
||||
DEPENDS += "autoconf-archive-native"
|
||||
DEPENDS += "systemd"
|
||||
PROVIDES += "virtual/obmc-host-ipmi-hw"
|
||||
SRCREV = "4aa837395933e7072a935e3aa4f14c86f5551cef"
|
||||
PV = "1.0+git${SRCPV}"
|
||||
PR = "r1"
|
||||
|
||||
SRC_URI = "git://github.com/openbmc/btbridge;branch=master;protocol=https"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools pkgconfig
|
||||
inherit obmc-phosphor-dbus-service
|
||||
|
||||
RRECOMMENDS:${PN} += "phosphor-ipmi-host"
|
||||
|
||||
RPROVIDES:${PN} += "virtual-obmc-host-ipmi-hw"
|
||||
|
||||
DBUS_SERVICE:${PN} = "org.openbmc.HostIpmi.service"
|
||||
@@ -0,0 +1,56 @@
|
||||
SUMMARY = "Phosphor IPMI daemon configuration"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
PR = "r1"
|
||||
|
||||
SRC_URI = " \
|
||||
file://cipher_list.json \
|
||||
file://dcmi_cap.json \
|
||||
file://dcmi_sensors.json \
|
||||
file://dev_id.json \
|
||||
file://power_reading.json \
|
||||
file://channel_access.json \
|
||||
file://channel_config.json \
|
||||
file://entity-map.json \
|
||||
file://cs_privilege_levels.json \
|
||||
"
|
||||
|
||||
inherit allarch
|
||||
|
||||
do_fetch[noexec] = "1"
|
||||
do_patch[noexec] = "1"
|
||||
do_configure[noexec] = "1"
|
||||
do_compile[noexec] = "1"
|
||||
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
|
||||
install -m 0644 -D ${WORKDIR}/channel_access.json \
|
||||
${D}${datadir}/ipmi-providers/channel_access.json
|
||||
install -m 0644 -D ${WORKDIR}/channel_config.json \
|
||||
${D}${datadir}/ipmi-providers/channel_config.json
|
||||
install -m 0644 -D ${WORKDIR}/entity-map.json \
|
||||
${D}${datadir}/ipmi-providers/entity-map.json
|
||||
install -m 0644 -D ${WORKDIR}/cs_privilege_levels.json \
|
||||
${D}${datadir}/ipmi-providers/cs_privilege_levels.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 \
|
||||
${datadir}/ipmi-providers/channel_access.json \
|
||||
${datadir}/ipmi-providers/channel_config.json \
|
||||
${datadir}/ipmi-providers/entity-map.json \
|
||||
${datadir}/ipmi-providers/cs_privilege_levels.json \
|
||||
"
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"1" : {
|
||||
"access_mode" : "always_available",
|
||||
"user_auth_disabled" : false,
|
||||
"per_msg_auth_disabled" : false,
|
||||
"alerting_disabled" : false,
|
||||
"priv_limit" : "priv-admin"
|
||||
},
|
||||
"2" : {
|
||||
"access_mode" : "always_available",
|
||||
"user_auth_disabled" : false,
|
||||
"per_msg_auth_disabled" : false,
|
||||
"alerting_disabled" : false,
|
||||
"priv_limit" : "priv-admin"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
{
|
||||
"0" : {
|
||||
"name" : "IPMB",
|
||||
"is_valid" : true,
|
||||
"active_sessions" : 0,
|
||||
"channel_info" : {
|
||||
"medium_type" : "ipmb",
|
||||
"protocol_type" : "ipmb-1.0",
|
||||
"session_supported" : "session-less",
|
||||
"is_ipmi" : true
|
||||
}
|
||||
},
|
||||
"1" : {
|
||||
"name" : "eth0",
|
||||
"is_valid" : true,
|
||||
"active_sessions" : 0,
|
||||
"channel_info" : {
|
||||
"medium_type" : "lan-802.3",
|
||||
"protocol_type" : "ipmb-1.0",
|
||||
"session_supported" : "multi-session",
|
||||
"is_ipmi" : true
|
||||
}
|
||||
},
|
||||
"2" : {
|
||||
"name" : "eth1",
|
||||
"is_valid" : true,
|
||||
"active_sessions" : 0,
|
||||
"channel_info" : {
|
||||
"medium_type" : "lan-802.3",
|
||||
"protocol_type" : "ipmb-1.0",
|
||||
"session_supported" : "multi-session",
|
||||
"is_ipmi" : true
|
||||
}
|
||||
},
|
||||
"3" : {
|
||||
"name" : "RESERVED",
|
||||
"is_valid" : false,
|
||||
"active_sessions" : 0,
|
||||
"channel_info" : {
|
||||
"medium_type" : "reserved",
|
||||
"protocol_type" : "na",
|
||||
"session_supported" : "session-less",
|
||||
"is_ipmi" : true
|
||||
}
|
||||
},
|
||||
"4" : {
|
||||
"name" : "RESERVED",
|
||||
"is_valid" : false,
|
||||
"active_sessions" : 0,
|
||||
"channel_info" : {
|
||||
"medium_type" : "reserved",
|
||||
"protocol_type" : "na",
|
||||
"session_supported" : "session-less",
|
||||
"is_ipmi" : true
|
||||
}
|
||||
},
|
||||
"5" : {
|
||||
"name" : "RESERVED",
|
||||
"is_valid" : false,
|
||||
"active_sessions" : 0,
|
||||
"channel_info" : {
|
||||
"medium_type" : "reserved",
|
||||
"protocol_type" : "na",
|
||||
"session_supported" : "session-less",
|
||||
"is_ipmi" : true
|
||||
}
|
||||
},
|
||||
"6" : {
|
||||
"name" : "RESERVED",
|
||||
"is_valid" : false,
|
||||
"active_sessions" : 0,
|
||||
"channel_info" : {
|
||||
"medium_type" : "reserved",
|
||||
"protocol_type" : "na",
|
||||
"session_supported" : "session-less",
|
||||
"is_ipmi" : true
|
||||
}
|
||||
},
|
||||
"7" : {
|
||||
"name" : "RESERVED",
|
||||
"is_valid" : false,
|
||||
"active_sessions" : 0,
|
||||
"channel_info" : {
|
||||
"medium_type" : "reserved",
|
||||
"protocol_type" : "na",
|
||||
"session_supported" : "session-less",
|
||||
"is_ipmi" : true
|
||||
}
|
||||
},
|
||||
"8" : {
|
||||
"name" : "INTRABMC",
|
||||
"is_valid" : true,
|
||||
"active_sessions" : 0,
|
||||
"channel_info" : {
|
||||
"medium_type" : "oem",
|
||||
"protocol_type" : "oem",
|
||||
"session_supported" : "session-less",
|
||||
"is_ipmi" : true
|
||||
}
|
||||
},
|
||||
"9" : {
|
||||
"name" : "RESERVED",
|
||||
"is_valid" : false,
|
||||
"active_sessions" : 0,
|
||||
"channel_info" : {
|
||||
"medium_type" : "reserved",
|
||||
"protocol_type" : "na",
|
||||
"session_supported" : "session-less",
|
||||
"is_ipmi" : true
|
||||
}
|
||||
},
|
||||
"10" : {
|
||||
"name" : "RESERVED",
|
||||
"is_valid" : false,
|
||||
"active_sessions" : 0,
|
||||
"channel_info" : {
|
||||
"medium_type" : "reserved",
|
||||
"protocol_type" : "na",
|
||||
"session_supported" : "session-less",
|
||||
"is_ipmi" : true
|
||||
}
|
||||
},
|
||||
"11" : {
|
||||
"name" : "RESERVED",
|
||||
"is_valid" : false,
|
||||
"active_sessions" : 0,
|
||||
"channel_info" : {
|
||||
"medium_type" : "reserved",
|
||||
"protocol_type" : "na",
|
||||
"session_supported" : "session-less",
|
||||
"is_ipmi" : true
|
||||
}
|
||||
},
|
||||
"12" : {
|
||||
"name" : "RESERVED",
|
||||
"is_valid" : false,
|
||||
"active_sessions" : 0,
|
||||
"channel_info" : {
|
||||
"medium_type" : "reserved",
|
||||
"protocol_type" : "na",
|
||||
"session_supported" : "session-less",
|
||||
"is_ipmi" : true
|
||||
}
|
||||
},
|
||||
"13" : {
|
||||
"name" : "RESERVED",
|
||||
"is_valid" : false,
|
||||
"active_sessions" : 0,
|
||||
"channel_info" : {
|
||||
"medium_type" : "reserved",
|
||||
"protocol_type" : "na",
|
||||
"session_supported" : "session-less",
|
||||
"is_ipmi" : true
|
||||
}
|
||||
},
|
||||
"14" : {
|
||||
"name" : "SELF",
|
||||
"is_valid" : false,
|
||||
"active_sessions" : 0,
|
||||
"channel_info" : {
|
||||
"medium_type" : "ipmb",
|
||||
"protocol_type" : "ipmb-1.0",
|
||||
"session_supported" : "session-less",
|
||||
"is_ipmi" : true
|
||||
}
|
||||
},
|
||||
"15" : {
|
||||
"name" : "ipmi_kcs3",
|
||||
"is_valid" : true,
|
||||
"active_sessions" : 0,
|
||||
"channel_info" : {
|
||||
"medium_type" : "system-interface",
|
||||
"protocol_type" : "kcs",
|
||||
"session_supported" : "session-less",
|
||||
"is_ipmi" : true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"b":{
|
||||
"cipher":17,
|
||||
"authentication":3,
|
||||
"integrity":4,
|
||||
"confidentiality":1
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"PowerManagement": 1,
|
||||
"OOBSecondaryLan": 0,
|
||||
"SerialTMODE": 0,
|
||||
"InBandSystemInterfaceChannel": 1,
|
||||
"SELAutoRollOver": 1,
|
||||
"FlushEntireSELUponRollOver": 0,
|
||||
"RecordLevelSELFlushUponRollOver": 0,
|
||||
"NumberOfSELEntries": 200,
|
||||
"TempMonitoringSamplingFreq":0,
|
||||
"PowerMgmtDeviceSlaveAddress": 0,
|
||||
"BMCChannelNumber": 0,
|
||||
"DeviceRivision": 0,
|
||||
"MandatoryPrimaryLanOOBSupport": 1,
|
||||
"OptionalSecondaryLanOOBSupport": 255,
|
||||
"OptionalSerialOOBMTMODECapability": 255
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"inlet": [
|
||||
],
|
||||
"baseboard": [
|
||||
],
|
||||
"cpu": [
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
{"id": 0, "revision": 0, "addn_dev_support": 0,
|
||||
"manuf_id": 0, "prod_id": 0, "aux": 0}
|
||||
@@ -0,0 +1,15 @@
|
||||
[
|
||||
{
|
||||
"id" : 1,
|
||||
"containerEntityId" : 30,
|
||||
"containerEntityInstance" : 1,
|
||||
"isList" : true,
|
||||
"isLinked" : false,
|
||||
"entities" : [
|
||||
{"id" : 3, "instance" : 1},
|
||||
{"id" : 4, "instance" : 1},
|
||||
{"id" : 0, "instance" : 0},
|
||||
{"id" : 0, "instance" : 0}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"path": ""
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
SUMMARY = "Phosphor OEM IPMI Ethernet Stats Implementation"
|
||||
DESCRIPTION = "This package handles receiving OEM IPMI commands to provide ethernet device statistics."
|
||||
HOMEPAGE = "http://github.com/openbmc/phosphor-ipmi-ethstats"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
|
||||
DEPENDS += "phosphor-ipmi-host"
|
||||
SRCREV = "48d6b06ea5911aabc7126f3bbf808305f1399c25"
|
||||
PV = "0.1+git${SRCPV}"
|
||||
PR = "r1"
|
||||
|
||||
SRC_URI = "git://github.com/openbmc/phosphor-ipmi-ethstats;branch=master;protocol=https"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit meson pkgconfig
|
||||
inherit obmc-phosphor-ipmiprovider-symlink
|
||||
|
||||
EXTRA_OEMESON:append = " -Dtests=disabled"
|
||||
|
||||
PACKAGECONFIG[google-oen] = "-Dgoogle_oen=true,-Dgoogle_oen=false"
|
||||
|
||||
FILES:${PN}:append = " ${libdir}/ipmid-providers/lib*${SOLIBS}"
|
||||
FILES:${PN}:append = " ${libdir}/host-ipmid/lib*${SOLIBS}"
|
||||
FILES:${PN}:append = " ${libdir}/net-ipmid/lib*${SOLIBS}"
|
||||
FILES:${PN}-dev:append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV} ${libdir}/ipmid-providers/*.la"
|
||||
|
||||
HOSTIPMI_PROVIDER_LIBRARY += "libethstatscmd.so"
|
||||
@@ -0,0 +1,70 @@
|
||||
SUMMARY = "Phosphor OEM IPMI In-band Firmware Update over BLOB"
|
||||
DESCRIPTION = "This package handles a series of OEM IPMI commands that implement the firmware update handler over the BLOB protocol."
|
||||
HOMEPAGE = "http://github.com/openbmc/phosphor-ipmi-flash"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
|
||||
DEPENDS += " \
|
||||
phosphor-ipmi-blobs \
|
||||
phosphor-logging \
|
||||
sdbusplus \
|
||||
systemd \
|
||||
ipmi-blob-tool \
|
||||
"
|
||||
SRCREV = "8c31624dfc9599a3df663394a2faeedba3f0e397"
|
||||
PACKAGECONFIG ?= "cleanup-delete"
|
||||
PACKAGECONFIG[cleanup-delete] = "-Dcleanup-delete=enabled,-Dcleanup-delete=disabled"
|
||||
# If using static-layout, reboot-update is a good option to handle updating.
|
||||
# To be able to track the update status, update-status option can be used.
|
||||
# Note that both reboot-update and update-status cannot be enabled at the same time.
|
||||
PACKAGECONFIG[reboot-update] = "-Dreboot-update=true,-Dreboot-update=false"
|
||||
PACKAGECONFIG[update-status] = "-Dupdate-status=true,-Dupdate-status=false"
|
||||
# Default options for supporting various flash types:
|
||||
PACKAGECONFIG[static-bmc] = "-Dupdate-type=static-layout,-Dupdate-type=none"
|
||||
PACKAGECONFIG[ubitar-bmc] = "-Dupdate-type=tarball-ubi,-Dupdate-type=none"
|
||||
PACKAGECONFIG[host-bios] = "-Dhost-bios=true,-Dhost-bios=false"
|
||||
# Hardware options to enable transmitting the data from the host.
|
||||
# Only one type of p2a or lpc can be enabled.
|
||||
PACKAGECONFIG[aspeed-p2a] = "-Dp2a-type=aspeed-p2a,,,,,aspeed-lpc nuvoton-lpc nuvoton-p2a-vga nuvoton-p2a-mbox"
|
||||
PACKAGECONFIG[aspeed-lpc] = "-Dlpc-type=aspeed-lpc,,,,,aspeed-p2a nuvoton-lpc nuvoton-p2a-vga nuvoton-p2a-mbox"
|
||||
PACKAGECONFIG[nuvoton-lpc] = "-Dlpc-type=nuvoton-lpc,,,,,aspeed-p2a aspeed-lpc nuvoton-p2a-vga nuvoton-p2a-mbox"
|
||||
PACKAGECONFIG[nuvoton-p2a-vga] = "-Dp2a-type=nuvoton-p2a-vga,,,,,aspeed-p2a aspeed-lpc nuvoton-lpc nuvoton-p2a-mbox"
|
||||
PACKAGECONFIG[nuvoton-p2a-mbox] = "-Dp2a-type=nuvoton-p2a-mbox,,,,,aspeed-p2a aspeed-lpc nuvoton-lpc nuvoton-p2a-vga"
|
||||
PACKAGECONFIG[net-bridge] = "-Dnet-bridge=true,-Dnet-bridge=false"
|
||||
PV = "1.0+git${SRCPV}"
|
||||
PR = "r1"
|
||||
|
||||
SRC_URI = "git://github.com/openbmc/phosphor-ipmi-flash;branch=master;protocol=https"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
SYSTEMD_PACKAGES = "${PN}"
|
||||
SYSTEMD_SERVICE:${PN} += " \
|
||||
phosphor-ipmi-flash-bmc-prepare.target \
|
||||
phosphor-ipmi-flash-bmc-verify.target \
|
||||
phosphor-ipmi-flash-bmc-update.target \
|
||||
"
|
||||
SYSTEMD_SERVICE:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'host-bios', '${HOST_BIOS_TARGETS}', '', d)}"
|
||||
|
||||
inherit meson pkgconfig systemd
|
||||
|
||||
EXTRA_OEMESON = "-Dtests=disabled -Dhost-tool=disabled"
|
||||
EXTRA_OEMESON:append = " -Dmapped-address=${IPMI_FLASH_BMC_ADDRESS}"
|
||||
|
||||
do_configure[depends] += "virtual/kernel:do_shared_workdir"
|
||||
|
||||
FILES:${PN}:append = " ${libdir}/ipmid-providers"
|
||||
FILES:${PN}:append = " ${libdir}/blob-ipmid"
|
||||
FILES:${PN}:append = " ${libdir}/tmpfiles.d"
|
||||
|
||||
BLOBIPMI_PROVIDER_LIBRARY += "libfirmwareblob.so"
|
||||
BLOBIPMI_PROVIDER_LIBRARY += "libversionblob.so"
|
||||
BLOBIPMI_PROVIDER_LIBRARY += "liblogblob.so"
|
||||
BLOBIPMI_PROVIDER_LIBRARY += "${@bb.utils.contains('PACKAGECONFIG', 'cleanup-delete', 'libfirmwarecleanupblob.so', '', d)}"
|
||||
|
||||
# Set this variable in your recipe to set it instead of using MAPPED_ADDRESS directly.
|
||||
IPMI_FLASH_BMC_ADDRESS ?= "0"
|
||||
# If they enabled host-bios, add those three extra targets.
|
||||
HOST_BIOS_TARGETS = " \
|
||||
phosphor-ipmi-flash-bios-prepare.target \
|
||||
phosphor-ipmi-flash-bios-verify.target \
|
||||
phosphor-ipmi-flash-bios-update.target \
|
||||
"
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
SUMMARY = "Sample hostfw inventory map for phosphor-ipmi-fru"
|
||||
PROVIDES += "virtual/phosphor-ipmi-fru-hostfw-config"
|
||||
PV = "1.0+git${SRCPV}"
|
||||
PR = "r1"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit phosphor-ipmi-fru
|
||||
inherit native
|
||||
|
||||
do_install() {
|
||||
DEST=${D}${hostfw_datadir}
|
||||
install -d ${DEST}
|
||||
# TODO: copy example hostfw yaml to ${DEST}/config.yaml
|
||||
# install fru-types.yaml ${DEST}/config.yaml
|
||||
}
|
||||
|
||||
require phosphor-ipmi-fru.inc
|
||||
@@ -0,0 +1,20 @@
|
||||
SUMMARY = "Sample inventory map for phosphor-ipmi-fru"
|
||||
PROVIDES += "virtual/phosphor-ipmi-fru-inventory"
|
||||
PV = "1.0+git${SRCPV}"
|
||||
PR = "r1"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit phosphor-ipmi-fru
|
||||
inherit native
|
||||
|
||||
do_install() {
|
||||
# TODO: install this to inventory_datadir
|
||||
# after ipmi-fru-parser untangles the host
|
||||
# firmware config from the machine inventory.
|
||||
DEST=${D}${config_datadir}
|
||||
install -d ${DEST}
|
||||
install scripts/example.yaml ${DEST}/config.yaml
|
||||
}
|
||||
|
||||
require phosphor-ipmi-fru.inc
|
||||
@@ -0,0 +1,26 @@
|
||||
SUMMARY = "Generate inventory map for phosphor-ipmi-fru from an MRW."
|
||||
DEPENDS += "mrw-native mrw-perl-tools-native"
|
||||
# TODO: remove this dependency after the MRW script
|
||||
# has been updated to not require the hostfw metadata.
|
||||
DEPENDS += "virtual/phosphor-ipmi-fru-hostfw-config"
|
||||
PROVIDES += "virtual/phosphor-ipmi-fru-inventory"
|
||||
PV = "1.0+git${SRCPV}"
|
||||
PR = "r1"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit phosphor-ipmi-fru
|
||||
inherit mrw-xml
|
||||
inherit native
|
||||
|
||||
do_install() {
|
||||
DEST=${D}${config_datadir}
|
||||
install -d ${DEST}
|
||||
${bindir}/perl-native/perl \
|
||||
${bindir}/gen_ipmi_fru.pl \
|
||||
-i ${mrw_datadir}/${MRW_XML} \
|
||||
-m ${hostfw_datadir}/config.yaml \
|
||||
-o ${DEST}/config.yaml
|
||||
}
|
||||
|
||||
require phosphor-ipmi-fru.inc
|
||||
@@ -0,0 +1,20 @@
|
||||
SUMMARY = "To merge the Host and BMC config files generated from MRW "
|
||||
DESCRIPTION = "Merge host provided FRU info config file, fru info config, \
|
||||
which is not sent by host config, and BMC accessible FRU info config \
|
||||
files generated by gen-ipmi-fru.pl into a single config file. \
|
||||
fru-gen parser parses the merged config file and generates cpp file"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
DEPENDS += "virtual/phosphor-ipmi-fru-read-inventory"
|
||||
PROVIDES += "virtual/phosphor-ipmi-fru-merge-config"
|
||||
PR = "r1"
|
||||
|
||||
inherit phosphor-ipmi-host
|
||||
inherit native
|
||||
|
||||
do_install:append() {
|
||||
SRC=${config_datadir}
|
||||
DEST=${D}${config_datadir}
|
||||
install -d ${DEST}
|
||||
cat ${SRC}/config.yaml > ${DEST}/fru_config.yaml
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
SUMMARY = "FRU properties config for ipmi-fru-parser"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
DEPENDS += " \
|
||||
mrw-native \
|
||||
mrw-perl-tools-native \
|
||||
"
|
||||
PROVIDES += "virtual/phosphor-ipmi-fru-properties"
|
||||
PR = "r1"
|
||||
|
||||
SRC_URI += "file://config.yaml"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
inherit phosphor-ipmi-fru
|
||||
inherit mrw-xml
|
||||
inherit native
|
||||
|
||||
do_install() {
|
||||
DEST=${D}${properties_datadir}
|
||||
install -d ${DEST}
|
||||
${bindir}/perl-native/perl \
|
||||
${bindir}/gen_fru_properties.pl \
|
||||
-m ${mrw_datadir}/${MRW_XML} \
|
||||
-c config.yaml \
|
||||
-o ${DEST}/extra-properties.yaml
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
PROC:
|
||||
xyz.openbmc_project.Inventory.Decorator.Replaceable:
|
||||
FieldReplaceable: 'false'
|
||||
xyz.openbmc_project.Inventory.Decorator.Cacheable:
|
||||
Cached: 'false'
|
||||
xyz.openbmc_project.Inventory.Item:
|
||||
Present: 'true'
|
||||
|
||||
DIMM:
|
||||
xyz.openbmc_project.Inventory.Decorator.Replaceable:
|
||||
FieldReplaceable: 'false'
|
||||
xyz.openbmc_project.Inventory.Decorator.Cacheable:
|
||||
Cached: 'false'
|
||||
xyz.openbmc_project.Inventory.Item:
|
||||
Present: 'true'
|
||||
|
||||
SYS:
|
||||
xyz.openbmc_project.Inventory.Decorator.Replaceable:
|
||||
FieldReplaceable: 'false'
|
||||
xyz.openbmc_project.Inventory.Decorator.Cacheable:
|
||||
Cached: 'false'
|
||||
xyz.openbmc_project.Inventory.Item:
|
||||
Present: 'true'
|
||||
|
||||
NODE:
|
||||
xyz.openbmc_project.Inventory.Decorator.Replaceable:
|
||||
FieldReplaceable: 'false'
|
||||
xyz.openbmc_project.Inventory.Decorator.Cacheable:
|
||||
Cached: 'false'
|
||||
xyz.openbmc_project.Inventory.Item:
|
||||
Present: 'true'
|
||||
|
||||
TPM:
|
||||
xyz.openbmc_project.Inventory.Decorator.Replaceable:
|
||||
FieldReplaceable: 'true'
|
||||
xyz.openbmc_project.Inventory.Decorator.Cacheable:
|
||||
Cached: 'false'
|
||||
xyz.openbmc_project.Inventory.Item:
|
||||
Present: 'true'
|
||||
@@ -0,0 +1,21 @@
|
||||
SUMMARY = "FRU properties config for ipmi-fru-parser"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
PROVIDES += "virtual/phosphor-ipmi-fru-properties"
|
||||
PR = "r1"
|
||||
|
||||
SRC_URI += "file://extra-properties.yaml"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
inherit phosphor-ipmi-fru
|
||||
inherit native
|
||||
|
||||
do_install() {
|
||||
# This recipe is supposed to create an output yaml file with
|
||||
# FRU property values extracted from the MRW. This example recipe
|
||||
# provides a sample output file.
|
||||
DEST=${D}${properties_datadir}
|
||||
install -d ${DEST}
|
||||
install extra-properties.yaml ${DEST}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
/system/chassis/motherboard/cpu0:
|
||||
xyz.openbmc_project.Inventory.Decorator.Replaceable:
|
||||
FieldReplaceable: 'true'
|
||||
xyz.openbmc_project.Inventory.Decorator.Cacheable:
|
||||
Cached: 'true'
|
||||
|
||||
/system/chassis/motherboard/dimm0:
|
||||
xyz.openbmc_project.Inventory.Decorator.Replaceable:
|
||||
FieldReplaceable: 'true'
|
||||
xyz.openbmc_project.Inventory.Decorator.Cacheable:
|
||||
Cached: 'true'
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
SUMMARY = "Sample inventory map for phosphor-ipmi-host"
|
||||
PROVIDES += "virtual/phosphor-ipmi-fru-read-inventory"
|
||||
PV = "1.0+git${SRCPV}"
|
||||
PR = "r1"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit phosphor-ipmi-host
|
||||
inherit native
|
||||
|
||||
do_install() {
|
||||
DEST=${D}${config_datadir}
|
||||
install -d ${DEST}
|
||||
install scripts/fru-read-example.yaml ${DEST}/config.yaml
|
||||
}
|
||||
|
||||
require phosphor-ipmi-host.inc
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
SUMMARY = "Generate inventory map for phosphor-ipmi-host from a MRW."
|
||||
DEPENDS += "mrw-native mrw-perl-tools-native"
|
||||
DEPENDS += "virtual/phosphor-ipmi-fru-hostfw-config"
|
||||
PROVIDES += "virtual/phosphor-ipmi-fru-read-inventory"
|
||||
PV = "1.0+git${SRCPV}"
|
||||
PR = "r1"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit phosphor-ipmi-host
|
||||
inherit mrw-xml
|
||||
inherit native
|
||||
|
||||
do_install() {
|
||||
DEST=${D}${config_datadir}
|
||||
install -d ${DEST}
|
||||
${bindir}/perl-native/perl \
|
||||
${bindir}/gen_ipmi_fru.pl \
|
||||
-i ${mrw_datadir}/${MRW_XML} \
|
||||
-m ${hostfw_datadir}/config.yaml \
|
||||
-o ${DEST}/config.yaml
|
||||
}
|
||||
|
||||
require phosphor-ipmi-host.inc
|
||||
@@ -0,0 +1,7 @@
|
||||
SUMMARY = "Whitelisted IPMI FRU Parser commands"
|
||||
DESCRIPTION = "Whitelisted IPMI FRU Parser commands for OpenBMC"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
|
||||
inherit phosphor-ipmi-host-whitelist
|
||||
inherit native
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
#<NetFn>:<Command>
|
||||
0x0A:0x12 //<Storage>:<Write FRU Data>
|
||||
@@ -0,0 +1,5 @@
|
||||
HOMEPAGE = "https://github.com/openbmc/ipmi-fru-parser"
|
||||
LICENSE = "GPL-3.0-or-later"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=7702f203b58979ebbc31bfaeb44f219c"
|
||||
SRC_URI += "git://github.com/openbmc/ipmi-fru-parser;branch=master;protocol=https"
|
||||
SRCREV = "440d84d4fec389bca0610b39eadd89f824d9e6a6"
|
||||
@@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Read %I EEPROM
|
||||
Wants=mapper-wait@-xyz-openbmc_project-inventory.service
|
||||
After=mapper-wait@-xyz-openbmc_project-inventory.service
|
||||
StartLimitBurst=10
|
||||
|
||||
[Service]
|
||||
Restart=on-failure
|
||||
Type=oneshot
|
||||
EnvironmentFile={envfiledir}/obmc/eeproms/%I
|
||||
ExecStartPre={bindir}/of-name-to-eeprom.sh {envfiledir}/obmc/eeproms/%I
|
||||
ExecStart=/usr/bin/env phosphor-read-eeprom --eeprom $SYSFS_PATH --fruid $FRUID
|
||||
SyslogIdentifier=phosphor-read-eeprom
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash -eu
|
||||
[ -n "${OF_NAME+1}" ] || exit 0
|
||||
path="$(grep -xl "$OF_NAME" /sys/bus/i2c/devices/*/of_node/name)"
|
||||
eeprom="${path%/of_node/name}/eeprom"
|
||||
sed -i "s,^SYSFS_PATH=.*$,SYSFS_PATH=$eeprom," "$1"
|
||||
@@ -0,0 +1,50 @@
|
||||
SUMMARY = "Phosphor IPMI Inventory Plugin"
|
||||
DESCRIPTION = "A Phosphor IPMI plugin that updates inventory."
|
||||
DEPENDS += " \
|
||||
virtual/phosphor-ipmi-fru-inventory \
|
||||
virtual/phosphor-ipmi-fru-properties \
|
||||
sdbusplus \
|
||||
${PYTHON_PN}-mako-native \
|
||||
${PYTHON_PN}-pyyaml-native \
|
||||
phosphor-ipmi-host \
|
||||
phosphor-logging \
|
||||
cli11 \
|
||||
"
|
||||
PV = "1.0+git${SRCPV}"
|
||||
PR = "r1"
|
||||
|
||||
SRC_URI += "file://of-name-to-eeprom.sh"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} += "obmc-read-eeprom@.service"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit meson pkgconfig
|
||||
inherit obmc-phosphor-systemd
|
||||
inherit obmc-phosphor-ipmiprovider-symlink
|
||||
inherit phosphor-ipmi-fru
|
||||
inherit python3native
|
||||
|
||||
IPMI_FRU_YAML ?= "${STAGING_DIR_NATIVE}${config_datadir}/config.yaml"
|
||||
IPMI_FRU_PROP_YAML ?= "${STAGING_DIR_NATIVE}${properties_datadir}/extra-properties.yaml"
|
||||
|
||||
|
||||
EXTRA_OEMESON = " \
|
||||
-Dfru_yaml=${IPMI_FRU_YAML} \
|
||||
-Dproperties_yaml=${IPMI_FRU_PROP_YAML} \
|
||||
"
|
||||
|
||||
do_install:append() {
|
||||
install -d ${D}${bindir}
|
||||
install -m 0755 ${WORKDIR}/of-name-to-eeprom.sh ${D}${bindir}
|
||||
}
|
||||
|
||||
RDEPENDS:${PN} += "bash"
|
||||
|
||||
FILES:${PN} += "${bindir}/of-name-to-eeprom.sh"
|
||||
FILES:${PN}:append = " ${libdir}/ipmid-providers/lib*${SOLIBS}"
|
||||
FILES:${PN}:append = " ${libdir}/host-ipmid/lib*${SOLIBS}"
|
||||
FILES:${PN}-dev:append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV} ${libdir}/ipmid-providers/*.la"
|
||||
|
||||
require ${BPN}.inc
|
||||
|
||||
HOSTIPMI_PROVIDER_LIBRARY += "libstrgfnhandler.so"
|
||||
@@ -0,0 +1,5 @@
|
||||
HOMEPAGE = "http://github.com/openbmc/phosphor-host-ipmid"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
|
||||
SRC_URI += "git://github.com/openbmc/phosphor-host-ipmid;branch=master;protocol=https"
|
||||
SRCREV = "f020c444e7c95fe9ae12cbf83a152d80ab1d754c"
|
||||
@@ -0,0 +1,66 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Copied from phosphor-settings-manager
|
||||
Loads a "target" YAML file and overwrites its values with values from
|
||||
"override" YAML files.
|
||||
|
||||
Override files are processed in the order given.
|
||||
|
||||
Usage:
|
||||
merge_settings.py <target yaml> [override yamls]
|
||||
"""
|
||||
import sys
|
||||
import yaml
|
||||
import copy
|
||||
|
||||
# Custom representer for None types. This is to handle empty dictionaries.
|
||||
# By default Pyyaml outputs these as "null", whereas we want an empty character.
|
||||
def represent_none(self, _):
|
||||
return self.represent_scalar('tag:yaml.org,2002:null', '')
|
||||
|
||||
def dict_merge(target, source):
|
||||
"""Deep merge for dicts.
|
||||
|
||||
Works like dict.update() that recursively updates any dict values present in
|
||||
both parameters.
|
||||
|
||||
Args:
|
||||
target (dict): Values to be overwritten by corresponding values from
|
||||
`source`.
|
||||
source (dict): Overriding values. Not changed by call.
|
||||
|
||||
Returns:
|
||||
`target` with values overwritten from those in `source` at any and all
|
||||
levels of nested dicts.
|
||||
"""
|
||||
if not isinstance(source, dict):
|
||||
return source
|
||||
for k, v in source.items():
|
||||
if k in target and isinstance(target[k], dict):
|
||||
dict_merge(target[k], v)
|
||||
else:
|
||||
target[k] = copy.deepcopy(v)
|
||||
return target
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
sys.exit('Argument required: target yaml')
|
||||
|
||||
if len(sys.argv) == 2:
|
||||
# No overrides to handle
|
||||
sys.exit(0)
|
||||
|
||||
yaml.add_representer(type(None), represent_none)
|
||||
|
||||
target_filename = sys.argv[1]
|
||||
with open(target_filename) as target_file:
|
||||
data = yaml.safe_load(target_file)
|
||||
print('Loaded target YAML file ' + target_filename)
|
||||
|
||||
for override_filename in sys.argv[2:]:
|
||||
with open(override_filename) as override_file:
|
||||
override = yaml.safe_load(override_file)
|
||||
dict_merge(data, override)
|
||||
print('Merged override YAML file ' + override_filename)
|
||||
|
||||
with open(target_filename, 'w') as target_file:
|
||||
yaml.dump(data, target_file, default_flow_style=False)
|
||||
print('Wrote merged target YAML file ' + target_filename)
|
||||
@@ -0,0 +1,21 @@
|
||||
[Unit]
|
||||
Description=Phosphor Inband IPMI
|
||||
Wants=clear-once.service
|
||||
Wants=xyz.openbmc_project.Settings.service
|
||||
After=xyz.openbmc_project.Settings.service
|
||||
After=clear-once.service
|
||||
After=org.openbmc.HostIpmi.service
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
ExecStart=/usr/bin/env ipmid
|
||||
SyslogIdentifier=ipmid
|
||||
RuntimeDirectory = ipmi
|
||||
RuntimeDirectoryPreserve = yes
|
||||
StateDirectory = ipmi
|
||||
Type=dbus
|
||||
BusName=xyz.openbmc_project.Control.Host
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Alias=xyz.openbmc_project.Control.Host.service
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Soft power off of the host
|
||||
Wants=mapper-wait@-org-openbmc-HostIpmi-1.service
|
||||
After=mapper-wait@-org-openbmc-HostIpmi-1.service
|
||||
Wants=obmc-host-stop-pre@0.target
|
||||
Before=obmc-host-stop-pre@0.target
|
||||
Conflicts=obmc-host-start@0.target
|
||||
ConditionPathExists=!/run/openbmc/host@0-request
|
||||
ConditionPathExists=!/lib/systemd/system/pldmSoftPowerOff.service
|
||||
|
||||
[Service]
|
||||
Restart=no
|
||||
ExecStart=/usr/bin/env phosphor-softpoweroff
|
||||
SyslogIdentifier=phosphor-softpoweroff
|
||||
Type=oneshot
|
||||
@@ -0,0 +1,178 @@
|
||||
SUMMARY = "Phosphor OpenBMC IPMI daemon"
|
||||
DESCRIPTION = "Phosphor OpenBMC IPMI router and plugin libraries"
|
||||
PR = "r1"
|
||||
PV = "1.0+git${SRCPV}"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
|
||||
|
||||
RRECOMMENDS:${PN} += "packagegroup-obmc-ipmid-providers-libs"
|
||||
|
||||
inherit meson pkgconfig
|
||||
inherit obmc-phosphor-ipmiprovider-symlink
|
||||
inherit obmc-phosphor-sdbus-service
|
||||
inherit obmc-phosphor-systemd
|
||||
inherit phosphor-ipmi-host
|
||||
inherit python3native
|
||||
|
||||
def ipmi_whitelists(d):
|
||||
whitelists = d.getVar(
|
||||
'VIRTUAL-RUNTIME_phosphor-ipmi-providers', True) or ''
|
||||
whitelists = whitelists.split()
|
||||
whitelists = [ '{}-whitelist-native'.format(x) for x in whitelists ]
|
||||
return ' '.join(whitelists)
|
||||
|
||||
PACKAGECONFIG ??= "allowlist i2c-allowlist boot-flag-safe-mode softoff libuserlayer entity-manager-decorators"
|
||||
PACKAGECONFIG[dynamic-sensors] = "-Ddynamic-sensors=enabled,-Ddynamic-sensors=disabled"
|
||||
PACKAGECONFIG[hybrid-sensors] = "-Dhybrid-sensors=enabled,-Dhybrid-sensors=disabled"
|
||||
PACKAGECONFIG[sel-logger-clears-sel] = "-Dsel-logger-clears-sel=enabled,-Dsel-logger-clears-sel=disabled"
|
||||
PACKAGECONFIG[allowlist] = "-Dipmi-whitelist=enabled,-Dipmi-whitelist=disabled"
|
||||
PACKAGECONFIG[i2c-allowlist] = "-Di2c-whitelist-check=enabled,-Di2c-whitelist-check=disabled"
|
||||
PACKAGECONFIG[transport-oem] = "-Dtransport-oem=enabled,-Dtransport-oem=disabled"
|
||||
PACKAGECONFIG[boot-flag-safe-mode] = "-Dboot-flag-safe-mode-support=enabled,-Dboot-flag-safe-mode-support=disabled"
|
||||
PACKAGECONFIG[softoff] = "-Dsoftoff=enabled,-Dsoftoff=disabled"
|
||||
PACKAGECONFIG[update-functional-on-fail] = "-Dupdate-functional-on-fail=enabled,-Dupdate-functional-on-fail=disabled"
|
||||
PACKAGECONFIG[libuserlayer] = "-Dlibuserlayer=enabled,-Dlibuserlayer=disabled"
|
||||
PACKAGECONFIG[sensors-cache] = "-Dsensors-cache=enabled,-Dsensors-cache=disabled"
|
||||
PACKAGECONFIG[entity-manager-decorators] = "-Dentity-manager-decorators=enabled,-Dentity-manager-decorators=disabled"
|
||||
PACKAGECONFIG[dynamic-storages-only] = "-Ddynamic-storages-only=enabled,-Ddynamic-storages-only=disabled"
|
||||
|
||||
DEPENDS += "nlohmann-json"
|
||||
DEPENDS += "openssl"
|
||||
DEPENDS += "phosphor-state-manager"
|
||||
DEPENDS += "${@ipmi_whitelists(d)}"
|
||||
DEPENDS += "phosphor-dbus-interfaces"
|
||||
DEPENDS += "phosphor-logging"
|
||||
DEPENDS += "libmapper"
|
||||
DEPENDS += "sdbusplus"
|
||||
DEPENDS += "${PYTHON_PN}-sdbus++-native"
|
||||
DEPENDS += "virtual/phosphor-ipmi-inventory-sel"
|
||||
DEPENDS += "virtual/phosphor-ipmi-fru-merge-config"
|
||||
DEPENDS += "virtual/phosphor-ipmi-sensor-inventory"
|
||||
DEPENDS += "boost"
|
||||
DEPENDS += "sdeventplus"
|
||||
DEPENDS += "${PYTHON_PN}-native"
|
||||
DEPENDS += "${PYTHON_PN}-pyyaml-native"
|
||||
DEPENDS += "${PYTHON_PN}-mako-native"
|
||||
|
||||
VIRTUAL-RUNTIME_ipmi-config ?= "phosphor-ipmi-config"
|
||||
|
||||
RDEPENDS:${PN} += "clear-once"
|
||||
RDEPENDS:${PN} += "phosphor-network"
|
||||
RDEPENDS:${PN} += "phosphor-time-manager"
|
||||
RDEPENDS:${PN} += "${VIRTUAL-RUNTIME_ipmi-config}"
|
||||
RDEPENDS:${PN} += "phosphor-watchdog"
|
||||
RDEPENDS:${PN} += "${VIRTUAL-RUNTIME_obmc-bmc-state-manager}"
|
||||
RDEPENDS:${PN} += "phosphor-software-manager-version"
|
||||
RDEPENDS:${PN} += "phosphor-software-manager-updater"
|
||||
|
||||
inherit useradd
|
||||
|
||||
USERADD_PACKAGES = "${PN}"
|
||||
# add ipmi group
|
||||
GROUPADD_PARAM:${PN} = "ipmi"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} += "xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service phosphor-ipmi-host.service"
|
||||
|
||||
RRECOMMENDS:${PN} += "phosphor-settings-manager"
|
||||
|
||||
|
||||
require ${BPN}.inc
|
||||
|
||||
# Setup IPMI Whitelist Conf files
|
||||
WHITELIST_CONF = " \
|
||||
${STAGING_DATADIR_NATIVE}/phosphor-ipmi-host/*.conf \
|
||||
${S}/host-ipmid-whitelist.conf \
|
||||
"
|
||||
EXTRA_OEMESON = " \
|
||||
-Dsensor-yaml-gen=${STAGING_DIR_NATIVE}${sensor_datadir}/sensor.yaml \
|
||||
-Dinvsensor-yaml-gen=${STAGING_DIR_NATIVE}${sensor_datadir}/invsensor.yaml \
|
||||
-Dfru-yaml-gen=${STAGING_DIR_NATIVE}${config_datadir}/fru_config.yaml \
|
||||
"
|
||||
EXTRA_OEMESON:append = " \
|
||||
-Dwhitelist-conf="${WHITELIST_CONF}" \
|
||||
"
|
||||
|
||||
EXTRA_OEMESON:append = " -Dtests=disabled"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
SRC_URI += "file://merge_yamls.py "
|
||||
|
||||
HOSTIPMI_PROVIDER_LIBRARY += "libipmi20.so"
|
||||
HOSTIPMI_PROVIDER_LIBRARY += "libsysintfcmds.so"
|
||||
HOSTIPMI_PROVIDER_LIBRARY += "libusercmds.so"
|
||||
|
||||
NETIPMI_PROVIDER_LIBRARY += "libipmi20.so"
|
||||
NETIPMI_PROVIDER_LIBRARY += "libusercmds.so"
|
||||
|
||||
FILES:${PN}:append = " ${libdir}/host-ipmid/lib*${SOLIBS}"
|
||||
FILES:${PN}:append = " ${libdir}/ipmid-providers/lib*${SOLIBS}"
|
||||
FILES:${PN}:append = " ${libdir}/net-ipmid/lib*${SOLIBS}"
|
||||
FILES:${PN}:append = " ${systemd_system_unitdir}/phosphor-ipmi-host.service.d/*.conf"
|
||||
FILES:${PN}-dev:append = " ${libdir}/ipmid-providers/lib*${SOLIBSDEV} ${libdir}/ipmid-providers/*.la"
|
||||
|
||||
# Soft Power Off
|
||||
# install the soft power off service in the host shutdown target
|
||||
SOFT_SVC = "xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service"
|
||||
SOFT_TGTFMT = "obmc-host-shutdown@{0}.target"
|
||||
SOFT_FMT = "../${SOFT_SVC}:${SOFT_TGTFMT}.requires/${SOFT_SVC}"
|
||||
SYSTEMD_LINK:${PN} += "${@compose_list_zip(d, 'SOFT_FMT', 'OBMC_HOST_INSTANCES')}"
|
||||
|
||||
#Collect all hardcoded sensor yamls from different recipes and
|
||||
#merge all of them with sensor.yaml.
|
||||
python do_merge_sensors () {
|
||||
import subprocess
|
||||
|
||||
# TODO: Perform the merge in a temporary directory?
|
||||
workdir = d.getVar('WORKDIR', True)
|
||||
nativedir = d.getVar('STAGING_DIR_NATIVE', True)
|
||||
sensorsdir = d.getVar('sensor_datadir', True)
|
||||
sensorsdir = sensorsdir[1:]
|
||||
sensorsdir = os.path.join(nativedir, sensorsdir)
|
||||
cmd = []
|
||||
cmd.append(os.path.join(workdir, 'merge_yamls.py'))
|
||||
cmd.append(os.path.join(sensorsdir, 'sensor.yaml'))
|
||||
|
||||
if os.stat(os.path.join(sensorsdir, 'sensor.yaml')).st_size == 0:
|
||||
return
|
||||
fetch = bb.fetch2.Fetch([], d)
|
||||
override_urls = [url for url in fetch.urls if url.endswith('.hardcoded.yaml')]
|
||||
for url in override_urls:
|
||||
bb.debug(2, 'Overriding with source: ' + url)
|
||||
local_base = os.path.basename(fetch.localpath(url))
|
||||
filename = os.path.join(workdir, local_base)
|
||||
cmd.append(filename)
|
||||
|
||||
# Invoke the script and don't catch any resulting exception.
|
||||
subprocess.check_call(cmd)
|
||||
}
|
||||
|
||||
# python-pyyaml-native is installed by do_configure, so put this task after
|
||||
addtask merge_sensors after do_configure before do_compile
|
||||
|
||||
IPMI_HOST_NEEDED_SERVICES = "\
|
||||
mapper-wait@-xyz-openbmc_project-control-host{}-boot.service \
|
||||
mapper-wait@-xyz-openbmc_project-control-host{}-boot-one_time.service \
|
||||
mapper-wait@-xyz-openbmc_project-control-host{}-power_restore_policy.service \
|
||||
mapper-wait@-xyz-openbmc_project-control-host{}-restriction_mode.service \
|
||||
"
|
||||
|
||||
do_install:append() {
|
||||
|
||||
# Create service override file.
|
||||
override_dir=${D}${systemd_system_unitdir}/phosphor-ipmi-host.service.d
|
||||
override_file=${override_dir}/10-override.conf
|
||||
mkdir -p ${override_dir}
|
||||
echo "[Unit]" > ${override_file}
|
||||
|
||||
# Insert host-instance based service dependencies.
|
||||
for i in ${OBMC_HOST_INSTANCES};
|
||||
do
|
||||
for s in ${IPMI_HOST_NEEDED_SERVICES};
|
||||
do
|
||||
service=$(echo ${s} | sed "s/{}/${i}/g")
|
||||
echo "Wants=${service}" >> ${override_file}
|
||||
echo "After=${service}" >> ${override_file}
|
||||
done
|
||||
done
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
SUMMARY = "Inventory to Sensor config for phosphor-host-ipmi"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
DEPENDS += " \
|
||||
mrw-native \
|
||||
mrw-perl-tools-native \
|
||||
"
|
||||
PROVIDES += "virtual/phosphor-ipmi-inventory-sel"
|
||||
PR = "r1"
|
||||
|
||||
SRC_URI += "file://config.yaml"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
inherit phosphor-ipmi-host
|
||||
inherit mrw-xml
|
||||
inherit native
|
||||
|
||||
do_install() {
|
||||
DEST=${D}${sensor_datadir}
|
||||
install -d ${DEST}
|
||||
${bindir}/perl-native/perl \
|
||||
${bindir}/gen_ipmi_sel.pl \
|
||||
-i ${mrw_datadir}/${MRW_XML} \
|
||||
-m config.yaml \
|
||||
-o ${DEST}/invsensor.yaml
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
# Maps the Entity ID to the interested Sensor Type & Offset
|
||||
0x01:
|
||||
SensorType: 0x12
|
||||
Offset: 0x02
|
||||
|
||||
0x03:
|
||||
SensorType: 0x07
|
||||
Offset: 0x08
|
||||
|
||||
0x07:
|
||||
SensorType: 0xC7
|
||||
Offset: 0x00
|
||||
|
||||
0x20:
|
||||
SensorType: 0x0C
|
||||
Offset: 0x04
|
||||
|
||||
0xD0:
|
||||
SensorType: 0x07
|
||||
Offset: 0x08
|
||||
|
||||
0xD8:
|
||||
SensorType: 0x17
|
||||
Offset: 0x08
|
||||
@@ -0,0 +1,20 @@
|
||||
SUMMARY = "Inventory to Sensor config for non-mrw machines"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
PROVIDES += "virtual/phosphor-ipmi-inventory-sel"
|
||||
PR = "r1"
|
||||
|
||||
SRC_URI += "file://config.yaml"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
inherit phosphor-ipmi-host
|
||||
inherit native
|
||||
|
||||
do_install() {
|
||||
# This recipe would provide the sample inventory to sensor config
|
||||
# mapping, for non-mrw machines.
|
||||
DEST=${D}${sensor_datadir}
|
||||
install -d ${DEST}
|
||||
install config.yaml ${DEST}/invsensor.yaml
|
||||
}
|
||||
@@ -0,0 +1,340 @@
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm0:
|
||||
sensorID: 0xa6
|
||||
sensorType: 0x0C
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x04
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm1:
|
||||
sensorID: 0xa8
|
||||
sensorType: 0x0C
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x04
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm10:
|
||||
sensorID: 0xba
|
||||
sensorType: 0x0C
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x04
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm11:
|
||||
sensorID: 0xbc
|
||||
sensorType: 0x0C
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x04
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm12:
|
||||
sensorID: 0xbe
|
||||
sensorType: 0x0C
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x04
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm13:
|
||||
sensorID: 0xc0
|
||||
sensorType: 0x0C
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x04
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm14:
|
||||
sensorID: 0xc2
|
||||
sensorType: 0x0C
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x04
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm15:
|
||||
sensorID: 0xc4
|
||||
sensorType: 0x0C
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x04
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm2:
|
||||
sensorID: 0xaa
|
||||
sensorType: 0x0C
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x04
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm3:
|
||||
sensorID: 0xac
|
||||
sensorType: 0x0C
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x04
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm4:
|
||||
sensorID: 0xae
|
||||
sensorType: 0x0C
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x04
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm5:
|
||||
sensorID: 0xb0
|
||||
sensorType: 0x0C
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x04
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm6:
|
||||
sensorID: 0xb2
|
||||
sensorType: 0x0C
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x04
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm7:
|
||||
sensorID: 0xb4
|
||||
sensorType: 0x0C
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x04
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm8:
|
||||
sensorID: 0xb6
|
||||
sensorType: 0x0C
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x04
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm9:
|
||||
sensorID: 0xb8
|
||||
sensorType: 0x0C
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x04
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0:
|
||||
sensorID: 0x5a
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core0:
|
||||
sensorID: 0x12
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core1:
|
||||
sensorID: 0x15
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core2:
|
||||
sensorID: 0x18
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core3:
|
||||
sensorID: 0x1b
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core4:
|
||||
sensorID: 0x1e
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core5:
|
||||
sensorID: 0x21
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core6:
|
||||
sensorID: 0x24
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core7:
|
||||
sensorID: 0x27
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core8:
|
||||
sensorID: 0x2a
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core9:
|
||||
sensorID: 0x2d
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core10:
|
||||
sensorID: 0x30
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core11:
|
||||
sensorID: 0x33
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core12:
|
||||
sensorID: 0x36
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core13:
|
||||
sensorID: 0x39
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core14:
|
||||
sensorID: 0x3c
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core15:
|
||||
sensorID: 0x3f
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core16:
|
||||
sensorID: 0x42
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core17:
|
||||
sensorID: 0x45
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core18:
|
||||
sensorID: 0x48
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core19:
|
||||
sensorID: 0x4b
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core20:
|
||||
sensorID: 0x4e
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core21:
|
||||
sensorID: 0x51
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core22:
|
||||
sensorID: 0x54
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core23:
|
||||
sensorID: 0x57
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1:
|
||||
sensorID: 0xa4
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core0:
|
||||
sensorID: 0x5c
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core1:
|
||||
sensorID: 0x5f
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core2:
|
||||
sensorID: 0x62
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core3:
|
||||
sensorID: 0x65
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core4:
|
||||
sensorID: 0x68
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core5:
|
||||
sensorID: 0x6b
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core6:
|
||||
sensorID: 0x6e
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core7:
|
||||
sensorID: 0x71
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core8:
|
||||
sensorID: 0x74
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core9:
|
||||
sensorID: 0x77
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core10:
|
||||
sensorID: 0x7a
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core11:
|
||||
sensorID: 0x7d
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core12:
|
||||
sensorID: 0x80
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core13:
|
||||
sensorID: 0x83
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core14:
|
||||
sensorID: 0x86
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core15:
|
||||
sensorID: 0x89
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core16:
|
||||
sensorID: 0x8c
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core17:
|
||||
sensorID: 0x8f
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core18:
|
||||
sensorID: 0x92
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core19:
|
||||
sensorID: 0x95
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core20:
|
||||
sensorID: 0x98
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core21:
|
||||
sensorID: 0x9b
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core22:
|
||||
sensorID: 0x9e
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1/core23:
|
||||
sensorID: 0xa1
|
||||
sensorType: 0x07
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x08
|
||||
/xyz/openbmc_project/inventory/system/chassis/motherboard:
|
||||
sensorID: 0x0c
|
||||
sensorType: 0xC7
|
||||
eventReadingType: 0x03
|
||||
offset: 0x00
|
||||
/xyz/openbmc_project/inventory/system:
|
||||
sensorID: 0x01
|
||||
sensorType: 0x12
|
||||
eventReadingType: 0x6F
|
||||
offset: 0x02
|
||||
@@ -0,0 +1,21 @@
|
||||
SUMMARY = "IPMB bridge"
|
||||
DESCRIPTION = "The IPMB bridge implements a Dbus compliant interface for \
|
||||
implementing IPMB interfaces"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
|
||||
DEPENDS = "sdbusplus \
|
||||
phosphor-logging \
|
||||
i2c-tools \
|
||||
boost \
|
||||
nlohmann-json"
|
||||
SRCREV = "e6b07fafc9489772f24925fed80f8bbf640b2f26"
|
||||
PV = "0.1+git${SRCPV}"
|
||||
|
||||
SRC_URI = "git://github.com/openbmc/ipmbbridge.git;branch=master;protocol=https"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "ipmb.service"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit meson pkgconfig systemd
|
||||
|
||||
FILES:${PN} += "${datadir}/ipmbbridge/ipmb-channels.json"
|
||||
@@ -0,0 +1,31 @@
|
||||
SUMMARY = "Phosphor OpenBMC KCS to DBUS"
|
||||
DESCRIPTION = "Phosphor OpenBMC KCS to DBUS."
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=b1beb00e508e89da1ed2a541934f28c0"
|
||||
DEPENDS += " \
|
||||
fmt \
|
||||
sdbusplus \
|
||||
sdeventplus \
|
||||
stdplus \
|
||||
systemd \
|
||||
"
|
||||
PROVIDES += "virtual/obmc-host-ipmi-hw"
|
||||
SRCREV = "43c83c56507cd35982537e5a646ee716f8335b6c"
|
||||
PV = "1.0+git${SRCPV}"
|
||||
PR = "r1"
|
||||
|
||||
SRC_URI = "git://github.com/openbmc/kcsbridge.git;branch=master;protocol=https"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "${PN}@${KCS_DEVICE}.service"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit meson pkgconfig
|
||||
inherit systemd
|
||||
|
||||
RRECOMMENDS:${PN} += "phosphor-ipmi-host"
|
||||
|
||||
RPROVIDES:${PN} += "virtual-obmc-host-ipmi-hw"
|
||||
|
||||
FILES:${PN} += "${systemd_system_unitdir}/${PN}@.service"
|
||||
|
||||
KCS_DEVICE ?= "ipmi-kcs3"
|
||||
@@ -0,0 +1,54 @@
|
||||
# To add another RMCPP interface, add similar lines to the
|
||||
# following lines in a bbappend:
|
||||
#
|
||||
# ALT_RMCPP_IFACE = "eth1"
|
||||
# SYSTEMD_SERVICE:${PN} += " \
|
||||
# ${PN}@${ALT_RMCPP_IFACE}.service \
|
||||
# ${PN}@${ALT_RMCPP_IFACE}.socket \
|
||||
# "
|
||||
# Also, be sure to enable a corresponding entry in the channel
|
||||
# config file with the same 'name' as the interfaces above
|
||||
# Override the default phosphor-ipmi-config.bb with a bbappend
|
||||
SUMMARY = "Phosphor Network IPMI Daemon"
|
||||
DESCRIPTION = "Daemon to support IPMI protocol over network"
|
||||
HOMEPAGE = "https://github.com/openbmc/phosphor-net-ipmid"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
|
||||
DEPENDS += "cli11"
|
||||
DEPENDS += "libmapper"
|
||||
DEPENDS += "systemd"
|
||||
DEPENDS += "phosphor-ipmi-host"
|
||||
SRCREV = "36e3c539df647d579f00f1cba6b482692a4ed634"
|
||||
PV = "1.0+git${SRCPV}"
|
||||
PR = "r1"
|
||||
|
||||
SRC_URI = "git://github.com/openbmc/phosphor-net-ipmid;branch=master;protocol=https"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
# install parameterized service and socket files
|
||||
SYSTEMD_SERVICE:${PN} = " \
|
||||
${PN}@${RMCPP_IFACE}.service \
|
||||
${PN}@${RMCPP_IFACE}.socket \
|
||||
"
|
||||
|
||||
inherit meson pkgconfig
|
||||
inherit systemd
|
||||
|
||||
PACKAGECONFIG ??= "pam-authenticate rmcp-ping"
|
||||
PACKAGECONFIG[rmcp-ping] = "-Drmcp_ping=enabled,-Drmcp_ping=disabled"
|
||||
PACKAGECONFIG[pam-authenticate] = "-Dpam_authenticate=enabled,-Dpam_authenticate=disabled"
|
||||
|
||||
EXTRA_OEMESON = " \
|
||||
-Dtests=disabled \
|
||||
"
|
||||
|
||||
RRECOMMENDS:${PN} = "pam-ipmi"
|
||||
|
||||
FILES:${PN} += " \
|
||||
${systemd_system_unitdir}/${PN}@.service \
|
||||
${systemd_system_unitdir}/${PN}@.socket \
|
||||
"
|
||||
|
||||
# If RMCPP_IFACE is not set by bbappend, set it to default
|
||||
DEFAULT_RMCPP_IFACE = "eth0"
|
||||
RMCPP_IFACE ?= "${DEFAULT_RMCPP_IFACE}"
|
||||
@@ -0,0 +1,9 @@
|
||||
SUMMARY = "OpenBMC - IPMI sensors"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
DEPENDS:append = " ${OBMC_IPMI_SENSORS_PROVIDERS} "
|
||||
PR = "r1"
|
||||
|
||||
inherit native
|
||||
|
||||
OBMC_IPMI_SENSORS_PROVIDERS = "phosphor-ipmi-sensor-inventory-mrw-config-native"
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
SUMMARY = "sensor config for phosphor-host-ipmid"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
PR = "r1"
|
||||
|
||||
SRC_URI += "file://config.yaml"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
inherit phosphor-ipmi-host
|
||||
inherit native
|
||||
|
||||
do_install() {
|
||||
DEST=${D}${sensor_yamldir}
|
||||
install -d ${DEST}
|
||||
install config.yaml ${DEST}/config.yaml
|
||||
}
|
||||
+357
@@ -0,0 +1,357 @@
|
||||
boot_count_sensor:
|
||||
path: /xyz/openbmc_project/state/host0
|
||||
serviceInterface: org.freedesktop.DBus.Properties
|
||||
readingType: readingAssertion
|
||||
mutability: Mutability::Write|Mutability::Read
|
||||
sensorNamePattern: nameProperty
|
||||
interfaces:
|
||||
xyz.openbmc_project.Control.Boot.RebootAttempts:
|
||||
AttemptsLeft:
|
||||
Offsets:
|
||||
0xFF:
|
||||
type: uint32_t
|
||||
|
||||
ps_redundancy_state_sensor:
|
||||
path: /xyz/openbmc_project/control/power_supply_redundancy
|
||||
serviceInterface: org.freedesktop.DBus.Properties
|
||||
readingType: assertion
|
||||
mutability: Mutability::Read
|
||||
sensorNamePattern: nameProperty
|
||||
interfaces:
|
||||
xyz.openbmc_project.Control.PowerSupplyRedundancy:
|
||||
PowerSupplyRedundancyEnabled:
|
||||
Offsets:
|
||||
0x00:
|
||||
type: "bool"
|
||||
assert: false
|
||||
0x01:
|
||||
type: "bool"
|
||||
assert: true
|
||||
|
||||
os_boot_sensor:
|
||||
path: /xyz/openbmc_project/state/host0
|
||||
serviceInterface: org.freedesktop.DBus.Properties
|
||||
readingType: assertion
|
||||
mutability: Mutability::Write|Mutability::Read
|
||||
sensorNamePattern: nameProperty
|
||||
interfaces:
|
||||
xyz.openbmc_project.State.OperatingSystem.Status:
|
||||
OperatingSystemState:
|
||||
Offsets:
|
||||
0x01:
|
||||
assert: "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.CBoot"
|
||||
type: string
|
||||
0x02:
|
||||
assert: "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.PXEBoot"
|
||||
type: string
|
||||
0x03:
|
||||
assert: "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.DiagBoot"
|
||||
type: string
|
||||
0x04:
|
||||
assert: "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.CDROMBoot"
|
||||
type: string
|
||||
0x05:
|
||||
assert: "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.ROMBoot"
|
||||
type: string
|
||||
0x06:
|
||||
assert: "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.BootComplete"
|
||||
type: string
|
||||
|
||||
fw_boot_sensor:
|
||||
path: /xyz/openbmc_project/state/host0
|
||||
serviceInterface: org.freedesktop.DBus.Properties
|
||||
readingType: eventdata2
|
||||
mutability: Mutability::Write|Mutability::Read
|
||||
sensorNamePattern: nameProperty
|
||||
interfaces:
|
||||
xyz.openbmc_project.State.Boot.Progress:
|
||||
BootProgress:
|
||||
Offsets:
|
||||
0x00:
|
||||
type: string
|
||||
set: "xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified"
|
||||
0x01:
|
||||
type: string
|
||||
set: "xyz.openbmc_project.State.Boot.Progress.ProgressStages.MemoryInit"
|
||||
0x03:
|
||||
type: string
|
||||
set: "xyz.openbmc_project.State.Boot.Progress.ProgressStages.SecondaryProcInit"
|
||||
0x07:
|
||||
type: string
|
||||
set: "xyz.openbmc_project.State.Boot.Progress.ProgressStages.PCIInit"
|
||||
0x13:
|
||||
type: string
|
||||
set: "xyz.openbmc_project.State.Boot.Progress.ProgressStages.OSStart"
|
||||
0x14:
|
||||
type: string
|
||||
set: "xyz.openbmc_project.State.Boot.Progress.ProgressStages.MotherboardInit"
|
||||
|
||||
dimm_func_sensor:
|
||||
serviceInterface: xyz.openbmc_project.Inventory.Manager
|
||||
readingType: assertion
|
||||
mutability: Mutability::Write|Mutability::Read
|
||||
sensorNamePattern: nameLeaf
|
||||
interfaces:
|
||||
xyz.openbmc_project.State.Decorator.OperationalStatus:
|
||||
Functional:
|
||||
Offsets:
|
||||
0x04:
|
||||
type: "bool"
|
||||
assert: false
|
||||
deassert: true
|
||||
Prereqs:
|
||||
0x06:
|
||||
type: "bool"
|
||||
assert: true
|
||||
deassert: false
|
||||
xyz.openbmc_project.Inventory.Item:
|
||||
Present:
|
||||
Offsets:
|
||||
0x06:
|
||||
type: "bool"
|
||||
assert: true
|
||||
deassert: false
|
||||
|
||||
cpu_func_sensor:
|
||||
serviceInterface: xyz.openbmc_project.Inventory.Manager
|
||||
readingType: assertion
|
||||
mutability: Mutability::Write|Mutability::Read
|
||||
sensorNamePattern: nameLeaf
|
||||
interfaces:
|
||||
xyz.openbmc_project.State.Decorator.OperationalStatus:
|
||||
Functional:
|
||||
Offsets:
|
||||
0x08:
|
||||
type: "bool"
|
||||
assert: false
|
||||
deassert: true
|
||||
Prereqs:
|
||||
0x07:
|
||||
type: "bool"
|
||||
assert: true
|
||||
deassert: false
|
||||
xyz.openbmc_project.Inventory.Item:
|
||||
Present:
|
||||
Offsets:
|
||||
0x07:
|
||||
type: "bool"
|
||||
assert: true
|
||||
deassert: false
|
||||
|
||||
cpucore_func_sensor:
|
||||
serviceInterface: xyz.openbmc_project.Inventory.Manager
|
||||
readingType: assertion
|
||||
mutability: Mutability::Write|Mutability::Read
|
||||
sensorNamePattern: nameParentLeaf
|
||||
interfaces:
|
||||
xyz.openbmc_project.State.Decorator.OperationalStatus:
|
||||
Functional:
|
||||
Offsets:
|
||||
0x08:
|
||||
type: "bool"
|
||||
assert: false
|
||||
deassert: true
|
||||
Prereqs:
|
||||
0x07:
|
||||
type: "bool"
|
||||
assert: true
|
||||
deassert: false
|
||||
xyz.openbmc_project.Inventory.Item:
|
||||
Present:
|
||||
Offsets:
|
||||
0x07:
|
||||
type: "bool"
|
||||
assert: true
|
||||
deassert: false
|
||||
skipOn: "deassert"
|
||||
|
||||
tpm_required_sensor:
|
||||
path: /xyz/openbmc_project/control/host0/TPMEnable
|
||||
serviceInterface: org.freedesktop.DBus.Properties
|
||||
readingType: assertion
|
||||
mutability: Mutability::Write|Mutability::Read
|
||||
sensorNamePattern: nameLeaf
|
||||
interfaces:
|
||||
xyz.openbmc_project.Control.TPM.Policy:
|
||||
TPMEnable:
|
||||
Offsets:
|
||||
0x00:
|
||||
type: "bool"
|
||||
assert: false
|
||||
0x01:
|
||||
type: "bool"
|
||||
assert: true
|
||||
|
||||
gpu_func_sensor:
|
||||
serviceInterface: xyz.openbmc_project.Inventory.Manager
|
||||
readingType: assertion
|
||||
mutability: Mutability::Write|Mutability::Read
|
||||
sensorNamePattern: nameLeaf
|
||||
interfaces:
|
||||
xyz.openbmc_project.State.Decorator.OperationalStatus:
|
||||
Functional:
|
||||
Offsets:
|
||||
0x08:
|
||||
type: "bool"
|
||||
assert: false
|
||||
deassert: true
|
||||
Prereqs:
|
||||
0x07:
|
||||
type: "bool"
|
||||
assert: true
|
||||
deassert: false
|
||||
xyz.openbmc_project.Inventory.Item:
|
||||
Present:
|
||||
Offsets:
|
||||
0x07:
|
||||
type: "bool"
|
||||
assert: true
|
||||
deassert: false
|
||||
xyz.openbmc_project.Inventory.Item.Accelerator:
|
||||
# Field replaceable doesn't come as a sensor data
|
||||
# but we know that GPU is Field replaceable so setting
|
||||
# true in both cases.
|
||||
xyz.openbmc_project.Inventory.Decorator.Replaceable:
|
||||
FieldReplaceable:
|
||||
Offsets:
|
||||
0x07:
|
||||
type: "bool"
|
||||
assert: true
|
||||
deassert: true
|
||||
|
||||
host_auto_reboot_control_sensor:
|
||||
path: /xyz/openbmc_project/control/host0/auto_reboot
|
||||
serviceInterface: org.freedesktop.DBus.Properties
|
||||
readingType: assertion
|
||||
mutability: Mutability::Write|Mutability::Read
|
||||
sensorNamePattern: nameLeaf
|
||||
interfaces:
|
||||
xyz.openbmc_project.Control.Boot.RebootPolicy:
|
||||
AutoReboot:
|
||||
Offsets:
|
||||
0x00:
|
||||
type: "bool"
|
||||
assert: false
|
||||
0x01:
|
||||
type: "bool"
|
||||
assert: true
|
||||
|
||||
turbo_allowed_sensor:
|
||||
path: /xyz/openbmc_project/control/host0/turbo_allowed
|
||||
serviceInterface: org.freedesktop.DBus.Properties
|
||||
readingType: assertion
|
||||
mutability: Mutability::Read
|
||||
sensorNamePattern: nameLeaf
|
||||
interfaces:
|
||||
xyz.openbmc_project.Control.Host.TurboAllowed:
|
||||
TurboAllowed:
|
||||
Offsets:
|
||||
0x00:
|
||||
assert: false
|
||||
deassert: true
|
||||
type: bool
|
||||
0x01:
|
||||
assert: true
|
||||
deassert: false
|
||||
type: bool
|
||||
|
||||
cpucore_temp_sensor:
|
||||
serviceInterface: org.freedesktop.DBus.Properties
|
||||
readingType: readingData
|
||||
mutability: Mutability::Write|Mutability::Read
|
||||
sensorNamePattern: nameLeaf
|
||||
multiplierM: 1
|
||||
offsetB: -127
|
||||
bExp: 0
|
||||
rExp: 0
|
||||
unit: xyz.openbmc_project.Sensor.Value.Unit.DegreesC
|
||||
scale: -3
|
||||
interfaces:
|
||||
xyz.openbmc_project.Sensor.Value:
|
||||
Value:
|
||||
Offsets:
|
||||
0xFF:
|
||||
type: double
|
||||
|
||||
dimm_temp_sensor:
|
||||
serviceInterface: org.freedesktop.DBus.Properties
|
||||
readingType: readingData
|
||||
mutability: Mutability::Write|Mutability::Read
|
||||
sensorNamePattern: nameLeaf
|
||||
multiplierM: 1
|
||||
offsetB: -127
|
||||
bExp: 0
|
||||
rExp: 0
|
||||
unit: xyz.openbmc_project.Sensor.Value.Unit.DegreesC
|
||||
scale: -3
|
||||
interfaces:
|
||||
xyz.openbmc_project.Sensor.Value:
|
||||
Value:
|
||||
Offsets:
|
||||
0xFF:
|
||||
type: double
|
||||
|
||||
vrm_vdd_temp_sensor:
|
||||
serviceInterface: org.freedesktop.DBus.Properties
|
||||
readingType: readingData
|
||||
mutability: Mutability::Write|Mutability::Read
|
||||
sensorNamePattern: nameLeaf
|
||||
multiplierM: 1
|
||||
offsetB: -127
|
||||
bExp: 0
|
||||
rExp: 0
|
||||
unit: xyz.openbmc_project.Sensor.Value.Unit.DegreesC
|
||||
scale: -3
|
||||
interfaces:
|
||||
xyz.openbmc_project.Sensor.Value:
|
||||
Value:
|
||||
Offsets:
|
||||
0xFF:
|
||||
type: double
|
||||
|
||||
gpu_temp_sensor:
|
||||
serviceInterface: org.freedesktop.DBus.Properties
|
||||
readingType: readingData
|
||||
mutability: Mutability::Write|Mutability::Read
|
||||
sensorNamePattern: nameLeaf
|
||||
multiplierM: 1
|
||||
offsetB: -127
|
||||
bExp: 0
|
||||
rExp: 0
|
||||
unit: xyz.openbmc_project.Sensor.Value.Unit.DegreesC
|
||||
scale: -3
|
||||
interfaces:
|
||||
xyz.openbmc_project.Sensor.Value:
|
||||
Value:
|
||||
Offsets:
|
||||
0xFF:
|
||||
type: double
|
||||
|
||||
memory_temp_sensor:
|
||||
serviceInterface: org.freedesktop.DBus.Properties
|
||||
readingType: readingData
|
||||
mutability: Mutability::Write|Mutability::Read
|
||||
sensorNamePattern: nameLeaf
|
||||
multiplierM: 1
|
||||
offsetB: -127
|
||||
bExp: 0
|
||||
rExp: 0
|
||||
unit: xyz.openbmc_project.Sensor.Value.Unit.DegreesC
|
||||
scale: -3
|
||||
interfaces:
|
||||
xyz.openbmc_project.Sensor.Value:
|
||||
Value:
|
||||
Offsets:
|
||||
0xFF:
|
||||
type: double
|
||||
ps_derating_sensor:
|
||||
serviceInterface: org.freedesktop.DBus.Properties
|
||||
readingType: assertion
|
||||
mutability: Mutability::Read
|
||||
sensorNamePattern: nameProperty
|
||||
interfaces:
|
||||
xyz.openbmc_project.Control.PowerSupplyAttributes:
|
||||
DeratingFactor:
|
||||
Offsets:
|
||||
0xFF:
|
||||
type: uint32_t
|
||||
@@ -0,0 +1,57 @@
|
||||
SUMMARY = "sensor config for phosphor-host-ipmid"
|
||||
PR = "r1"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
|
||||
inherit phosphor-ipmi-host
|
||||
inherit python3native
|
||||
inherit mrw-xml
|
||||
inherit native
|
||||
|
||||
DEPENDS += " \
|
||||
mrw-native \
|
||||
mrw-perl-tools-native \
|
||||
phosphor-ipmi-sensor-config-native \
|
||||
phosphor-ipmi-sensor-inventory-mrw-config-native \
|
||||
${PYTHON_PN}-pyyaml-native \
|
||||
"
|
||||
|
||||
PROVIDES += "virtual/phosphor-ipmi-sensor-inventory"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
SRC_URI += "file://merge_sensor_config.py"
|
||||
|
||||
do_install() {
|
||||
DEST=${D}${sensor_datadir}
|
||||
install -d ${DEST}
|
||||
|
||||
${bindir}/perl-native/perl \
|
||||
${bindir}/gen_ipmi_sensor.pl \
|
||||
-i ${mrw_datadir}/${MRW_XML} \
|
||||
-m ${sensor_yamldir}/config.yaml \
|
||||
-o ${DEST}/sensor.yaml
|
||||
}
|
||||
|
||||
python do_merge_sensor_config () {
|
||||
import subprocess
|
||||
|
||||
# TODO: Perform the merge in a temporary directory?
|
||||
workdir = d.getVar('WORKDIR', True)
|
||||
nativedir = d.getVar('STAGING_DIR_NATIVE', True)
|
||||
sensoryamldir = d.getVar('sensor_yamldir', True)
|
||||
cmd = []
|
||||
cmd.append(os.path.join(workdir, 'merge_sensor_config.py'))
|
||||
cmd.append(os.path.join(sensoryamldir, 'config.yaml'))
|
||||
|
||||
fetch = os.listdir(sensoryamldir)
|
||||
override_urls = [url for url in fetch if url.endswith('-config.yaml')]
|
||||
for url in override_urls:
|
||||
bb.debug(2, 'Merging extra configurations: ' + url)
|
||||
filename = os.path.join(sensoryamldir, url)
|
||||
cmd.append(filename)
|
||||
|
||||
# Invoke the script and don't catch any resulting exception.
|
||||
subprocess.check_call(cmd)
|
||||
}
|
||||
# python-pyyaml-native is installed by do_configure, so put this task after
|
||||
addtask merge_sensor_config after do_configure before do_compile
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../phosphor-ipmi-host/merge_yamls.py
|
||||
@@ -0,0 +1,21 @@
|
||||
SUMMARY = "Sensor config for phosphor-host-ipmi"
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
PROVIDES += "virtual/phosphor-ipmi-sensor-inventory"
|
||||
PR = "r1"
|
||||
|
||||
SRC_URI += "file://config.yaml"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
inherit phosphor-ipmi-host
|
||||
inherit native
|
||||
|
||||
do_install() {
|
||||
# This recipe is supposed to create an output yaml file with
|
||||
# sensor data extracted from the mrw.
|
||||
# provides a sample output file.
|
||||
DEST=${D}${sensor_datadir}
|
||||
install -d ${DEST}
|
||||
install config.yaml ${DEST}/sensor.yaml
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,24 @@
|
||||
SUMMARY = "Phosphor OpenBMC SSIF to DBUS"
|
||||
DESCRIPTION = "Phosphor OpenBMC SSIF to DBUS."
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
|
||||
DEPENDS += "systemd"
|
||||
DEPENDS += "phosphor-logging"
|
||||
DEPENDS += "sdbusplus"
|
||||
DEPENDS += "cli11"
|
||||
PROVIDES += "virtual/obmc-host-ipmi-hw"
|
||||
SRCREV = "16592b3d0a2e4295f2eca8131e404380d44259bc"
|
||||
PV = "1.0+git${SRCPV}"
|
||||
PR = "r1"
|
||||
|
||||
SRC_URI = "git://github.com/openbmc/ssifbridge.git;protocol=https;branch=master"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "ssifbridge.service"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit meson pkgconfig
|
||||
inherit systemd
|
||||
|
||||
RRECOMMENDS:${PN} += "phosphor-ipmi-host"
|
||||
|
||||
RPROVIDES:${PN} += "virtual-obmc-host-ipmi-hw"
|
||||
Reference in New Issue
Block a user