diff options
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-core/at-scale-debug')
4 files changed, 120 insertions, 0 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb new file mode 100644 index 000000000..10df9dd59 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/at-scale-debug_git.bb @@ -0,0 +1,34 @@ +inherit obmc-phosphor-systemd + +SUMMARY = "At Scale Debug Service" +DESCRIPTION = "At Scale Debug Service exposes remote JTAG target debug capabilities" + +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE;md5=0d1c657b2ba1e8877940a8d1614ec560" + + +inherit cmake +DEPENDS = "sdbusplus openssl libpam libgpiod safec" + +do_configure[depends] += "virtual/kernel:do_shared_workdir" + +SRC_URI = "git://github.com/Intel-BMC/asd;protocol=git" +SRC_URI += "file://0001-Fix-build-error-in-kernel-v5.10.patch" +SRCREV = "1.4.4" + +inherit useradd + +USERADD_PACKAGES = "${PN}" + +# add a special user asdbg +USERADD_PARAM_${PN} = "-u 999 asdbg" + +S = "${WORKDIR}/git" + +SYSTEMD_SERVICE_${PN} += "com.intel.AtScaleDebug.service" + +# Specify any options you want to pass to cmake using EXTRA_OECMAKE: +EXTRA_OECMAKE = "-DBUILD_UT=OFF" + +CFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include/uapi" +CFLAGS_append = " -I ${STAGING_KERNEL_DIR}/include/" diff --git a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/files/0001-Fix-build-error-in-kernel-v5.10.patch b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/files/0001-Fix-build-error-in-kernel-v5.10.patch new file mode 100644 index 000000000..7ebedeee3 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/files/0001-Fix-build-error-in-kernel-v5.10.patch @@ -0,0 +1,62 @@ +From 7ed9ba9738d8f27578ea2d00019f8245ee2a5556 Mon Sep 17 00:00:00 2001 +From: Jae Hyun Yoo <jae.hyun.yoo@intel.com> +Date: Mon, 22 Feb 2021 15:32:13 -0800 +Subject: [PATCH] Fix build error in kernel v5.10 + +Kernel headers should be added as last headers to prevent unexpected +build breaks. + +Change-Id: Ie7d1a054baf2af88b9c46f928d0d84a64d8febd9 +Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com> +--- + i2c_handler.c | 5 +++-- + i2c_msg_builder.c | 5 +++-- + 2 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/i2c_handler.c b/i2c_handler.c +index 21fb931..05470f4 100644 +--- a/i2c_handler.c ++++ b/i2c_handler.c +@@ -29,8 +29,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + #include <errno.h> + #include <fcntl.h> +-#include <linux/i2c-dev.h> +-#include <linux/i2c.h> + #include <stdint.h> + #include <stdio.h> + #include <stdlib.h> +@@ -40,6 +38,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + #include "logging.h" + ++#include <linux/i2c-dev.h> ++#include <linux/i2c.h> ++ + #define FILE_NAME "/dev/i2c" + #define MAX_I2C_DEV_FILENAME 256 + +diff --git a/i2c_msg_builder.c b/i2c_msg_builder.c +index 6ae06a0..05dc340 100644 +--- a/i2c_msg_builder.c ++++ b/i2c_msg_builder.c +@@ -27,13 +27,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + #include "i2c_msg_builder.h" + +-#include <linux/i2c-dev.h> +-#include <linux/i2c.h> + #include <stdint.h> + #include <stdlib.h> + + #include "logging.h" + ++#include <linux/i2c-dev.h> ++#include <linux/i2c.h> ++ + STATUS copy_i2c_to_asd(asd_i2c_msg* asd, struct i2c_msg* i2c); + STATUS copy_asd_to_i2c(const asd_i2c_msg* asd, struct i2c_msg* i2c); + +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/files/com.intel.AtScaleDebug.service b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/files/com.intel.AtScaleDebug.service new file mode 100644 index 000000000..4411de11c --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/files/com.intel.AtScaleDebug.service @@ -0,0 +1,12 @@ +[Unit] +Description=Intel BMC At Scale Debug +Requires=network-online.target + +[Service] +Restart=always +RestartSec=30 +ExecStart={bindir}/asd +Type=simple +SyslogIdentifier=asd + + diff --git a/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/files/com.intel.AtScaleDebugJtagTest.service b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/files/com.intel.AtScaleDebugJtagTest.service new file mode 100644 index 000000000..281d1a993 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-core/at-scale-debug/files/com.intel.AtScaleDebugJtagTest.service @@ -0,0 +1,12 @@ +[Unit] +Description=Intel BMC At Scale Debug JTAG test to check if remote debug setting is enabled + +[Service] +Type=oneshot +ExecStartPre=/bin/sleep 10 +ExecStart={bindir}/jtag_test +SyslogIdentifier=jtag_test +RemainAfterExit=true + +[Install] +WantedBy=obmc-host-start@0.target |