diff options
author | Yuxiao Zhang <yuxiaozhang@google.com> | 2024-01-25 03:25:21 +0300 |
---|---|---|
committer | Yuxiao Zhang <yuxiaozhang@google.com> | 2024-01-26 20:33:23 +0300 |
commit | bd01c3b231ce53c9ab212a835196eb9b72c3b4c4 (patch) | |
tree | 68cee373ce870844b3e0ee6fe51614e7356c0412 | |
parent | 61406e477e345f14c6153ac55e8195ca39111f5b (diff) | |
download | openbmc-bd01c3b231ce53c9ab212a835196eb9b72c3b4c4.tar.xz |
meta-google: add recipe to disable ipmi kcs
Change-Id: I1954f9ac5361137ef42faed0ff271bdebd11e77d
Signed-off-by: Yuxiao Zhang <yuxiaozhang@google.com>
-rw-r--r-- | meta-google/recipes-google/bare-metal-ipmi-kcs/bare-metal-ipmi-kcs.bb | 36 | ||||
-rw-r--r-- | meta-google/recipes-google/bare-metal-ipmi-kcs/bare-metal-ipmi-kcs/disable-ipmi-kcs.service.in | 13 |
2 files changed, 49 insertions, 0 deletions
diff --git a/meta-google/recipes-google/bare-metal-ipmi-kcs/bare-metal-ipmi-kcs.bb b/meta-google/recipes-google/bare-metal-ipmi-kcs/bare-metal-ipmi-kcs.bb new file mode 100644 index 0000000000..3bf5935533 --- /dev/null +++ b/meta-google/recipes-google/bare-metal-ipmi-kcs/bare-metal-ipmi-kcs.bb @@ -0,0 +1,36 @@ +SUMMARY = "Disable ipmi kcs while in Guest Os" +DESCRIPTION = "Disable ipmi kcs while an untrusted host OS is running" +PR = "r1" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit systemd + +SRC_URI += " \ + file://disable-ipmi-kcs.service.in \ +" + +DEPENDS += "systemd" + +RDEPENDS:${PN}:append = " \ + bare-metal-active \ + " + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN} = " \ + disable-ipmi-kcs.service \ + " + +# This should be aligned with the phosphor-ipmi-kcs and override per platform +KCS_DEVICE ?= "ipmi_kcs1" + +do_install:append() { + + sed ${WORKDIR}/disable-ipmi-kcs.service.in \ + -e "s#@KCS_DEV@#${KCS_DEVICE}#" \ + > ${WORKDIR}/disable-ipmi-kcs.service + + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/disable-ipmi-kcs.service ${D}${systemd_system_unitdir} +} diff --git a/meta-google/recipes-google/bare-metal-ipmi-kcs/bare-metal-ipmi-kcs/disable-ipmi-kcs.service.in b/meta-google/recipes-google/bare-metal-ipmi-kcs/bare-metal-ipmi-kcs/disable-ipmi-kcs.service.in new file mode 100644 index 0000000000..7b215f02b3 --- /dev/null +++ b/meta-google/recipes-google/bare-metal-ipmi-kcs/bare-metal-ipmi-kcs/disable-ipmi-kcs.service.in @@ -0,0 +1,13 @@ +[Unit] +Description=Disable ipmi kcs +BindsTo=gbmc-bare-metal-active.target +Before=gbmc-bare-metal-active.target + +[Service] +Type=oneshot +RemainAfterExit=true +ExecStart=/bin/sh -c 'systemctl stop phosphor-ipmi-kcs@@KCS_DEV@' +ExecStop=/bin/sh -c 'systemctl start phosphor-ipmi-kcs@@KCS_DEV@' + +[Install] +WantedBy=gbmc-bare-metal-active.target |