summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Hansen <alexander.hansen@9elements.com>2024-05-08 15:20:04 +0300
committerAlexander <alexander.hansen@9elements.com>2024-05-16 19:25:16 +0300
commit9874fe349ecf50e99fa758ccb888075858e27716 (patch)
treee7531377f95d6bd21445432d19989cae4bf819ad
parentb698c5062bd14b7b12edd4932ccc70c15b0ce7e7 (diff)
downloadopenbmc-9874fe349ecf50e99fa758ccb888075858e27716.tar.xz
meta-evb: meta-evb-arm: use kernel mctp stack
create mctp-local.service to - configure serial parameters for /dev/ttyAMA1 - create the link with 'mctp' command - configure local and remote EID for the link - setup the endpoint with mctpd Tested: pldm commands work and response is received from the MCP Change-Id: If924376c4775229c1701924e154894e4eaefa362 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
-rw-r--r--meta-evb/meta-evb-arm/meta-evb-fvp-base/conf/machine/fvp.conf1
-rw-r--r--meta-evb/meta-evb-arm/meta-evb-fvp-base/recipes-phosphor/mctp/files/mctp-local.service18
-rw-r--r--meta-evb/meta-evb-arm/meta-evb-fvp-base/recipes-phosphor/mctp/mctp_%.bbappend12
-rw-r--r--meta-evb/meta-evb-arm/meta-evb-fvp-base/recipes-phosphor/pldm/files/host_eid2
-rw-r--r--meta-evb/meta-evb-arm/meta-evb-fvp-base/recipes-phosphor/pldm/pldm_%.bbappend8
5 files changed, 38 insertions, 3 deletions
diff --git a/meta-evb/meta-evb-arm/meta-evb-fvp-base/conf/machine/fvp.conf b/meta-evb/meta-evb-arm/meta-evb-fvp-base/conf/machine/fvp.conf
index 1a65c6f5ec..bccea33ab3 100644
--- a/meta-evb/meta-evb-arm/meta-evb-fvp-base/conf/machine/fvp.conf
+++ b/meta-evb/meta-evb-arm/meta-evb-fvp-base/conf/machine/fvp.conf
@@ -6,6 +6,7 @@ include fvp-config.inc
require conf/distro/include/phosphor-mmc.inc
require conf/machine/include/arm/arch-armv8-4a.inc
+require conf/distro/include/mctp.inc
require conf/distro/include/pldm.inc
require conf/machine/include/obmc-evb-common.inc
require conf/machine/include/obmc-bsp-common.inc
diff --git a/meta-evb/meta-evb-arm/meta-evb-fvp-base/recipes-phosphor/mctp/files/mctp-local.service b/meta-evb/meta-evb-arm/meta-evb-fvp-base/recipes-phosphor/mctp/files/mctp-local.service
new file mode 100644
index 0000000000..9f96750789
--- /dev/null
+++ b/meta-evb/meta-evb-arm/meta-evb-fvp-base/recipes-phosphor/mctp/files/mctp-local.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=MCTP configuration for serial ttyAMA1
+After=mctpd.service
+Before=pldmd.service
+BindTo=mctpd.service
+
+[Service]
+Type=simple
+ExecStartPre=stty -F /dev/ttyAMA1 115200 litout -crtscts -ixon -echo raw
+ExecStart=mctp link serial /dev/ttyAMA1
+ExecStartPost=sleep 3
+ExecStartPost=mctp link set mctpserial0 up
+ExecStartPost=mctp addr add 8 dev mctpserial0
+ExecStartPost=mctp route add 18 via mctpserial0
+ExecStartPost=busctl call xyz.openbmc_project.MCTP /xyz/openbmc_project/mctp au.com.CodeConstruct.MCTP SetupEndpoint say mctpserial0 0
+
+[Install]
+WantedBy=mctpd.service
diff --git a/meta-evb/meta-evb-arm/meta-evb-fvp-base/recipes-phosphor/mctp/mctp_%.bbappend b/meta-evb/meta-evb-arm/meta-evb-fvp-base/recipes-phosphor/mctp/mctp_%.bbappend
new file mode 100644
index 0000000000..1267b0a8bc
--- /dev/null
+++ b/meta-evb/meta-evb-arm/meta-evb-fvp-base/recipes-phosphor/mctp/mctp_%.bbappend
@@ -0,0 +1,12 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+
+SRC_URI:append = " \
+ file://mctp-local.service \
+"
+
+SYSTEMD_SERVICE:${PN} += "mctp-local.service"
+
+do_install:append() {
+ install -m 0644 ${WORKDIR}/mctp-local.service ${D}${systemd_system_unitdir}/
+}
+
diff --git a/meta-evb/meta-evb-arm/meta-evb-fvp-base/recipes-phosphor/pldm/files/host_eid b/meta-evb/meta-evb-arm/meta-evb-fvp-base/recipes-phosphor/pldm/files/host_eid
index 573541ac97..3c032078a4 100644
--- a/meta-evb/meta-evb-arm/meta-evb-fvp-base/recipes-phosphor/pldm/files/host_eid
+++ b/meta-evb/meta-evb-arm/meta-evb-fvp-base/recipes-phosphor/pldm/files/host_eid
@@ -1 +1 @@
-0
+18
diff --git a/meta-evb/meta-evb-arm/meta-evb-fvp-base/recipes-phosphor/pldm/pldm_%.bbappend b/meta-evb/meta-evb-arm/meta-evb-fvp-base/recipes-phosphor/pldm/pldm_%.bbappend
index 8388b841fb..9883cf425a 100644
--- a/meta-evb/meta-evb-arm/meta-evb-fvp-base/recipes-phosphor/pldm/pldm_%.bbappend
+++ b/meta-evb/meta-evb-arm/meta-evb-fvp-base/recipes-phosphor/pldm/pldm_%.bbappend
@@ -1,8 +1,12 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+# increase the timeouts for our use-case,
+# refer to this layer's README.md
+
EXTRA_OEMESON:append = " \
- -Doem-ibm=disabled \
- "
+ -Dresponse-time-out=4800 \
+ -Ddbus-timeout-value=10 \
+"
SRC_URI:append = " file://host_eid "