From 9874fe349ecf50e99fa758ccb888075858e27716 Mon Sep 17 00:00:00 2001 From: Alexander Hansen Date: Wed, 8 May 2024 14:20:04 +0200 Subject: 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 --- .../meta-evb-fvp-base/conf/machine/fvp.conf | 1 + .../recipes-phosphor/mctp/files/mctp-local.service | 18 ++++++++++++++++++ .../recipes-phosphor/mctp/mctp_%.bbappend | 12 ++++++++++++ .../recipes-phosphor/pldm/files/host_eid | 2 +- .../recipes-phosphor/pldm/pldm_%.bbappend | 8 ++++++-- 5 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 meta-evb/meta-evb-arm/meta-evb-fvp-base/recipes-phosphor/mctp/files/mctp-local.service create mode 100644 meta-evb/meta-evb-arm/meta-evb-fvp-base/recipes-phosphor/mctp/mctp_%.bbappend (limited to 'meta-evb') 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 " -- cgit v1.2.3