diff options
author | John Wedig <johnwedig@google.com> | 2023-12-09 01:38:41 +0300 |
---|---|---|
committer | Yuxiao Zhang <yuxiaozhang@google.com> | 2023-12-15 21:18:11 +0300 |
commit | e519d6bc858d9a58b457827cf301d06c4c664b81 (patch) | |
tree | d19641a5d082380bc954a908e74857ff42fbe8e5 /meta-google/recipes-google | |
parent | ca818a384cbe9b1d0b62027113ad159d95d16e3b (diff) | |
download | openbmc-e519d6bc858d9a58b457827cf301d06c4c664b81.tar.xz |
meta-google: Service to enable/disable eSPI
Change-Id: I2ff0e6284e952e55f81e2c76fedb49c81f4855b2
Signed-off-by: John Wedig <johnwedig@google.com>
Diffstat (limited to 'meta-google/recipes-google')
-rw-r--r-- | meta-google/recipes-google/bare-metal-espi/bare-metal-espi.bb | 29 | ||||
-rw-r--r-- | meta-google/recipes-google/bare-metal-espi/bare-metal-espi/disable-espi.service | 13 |
2 files changed, 42 insertions, 0 deletions
diff --git a/meta-google/recipes-google/bare-metal-espi/bare-metal-espi.bb b/meta-google/recipes-google/bare-metal-espi/bare-metal-espi.bb new file mode 100644 index 0000000000..522c9bda2d --- /dev/null +++ b/meta-google/recipes-google/bare-metal-espi/bare-metal-espi.bb @@ -0,0 +1,29 @@ +SUMMARY = "Disable eSPI while the customer's host OS is running" +DESCRIPTION = "Disable eSPI 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-espi.service \ +" + +DEPENDS += "systemd" + +RDEPENDS:${PN}:append = " \ + bare-metal-active \ + espi-control \ + " + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN} = " \ + disable-espi.service \ + " + +do_install:append() { + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/disable-espi.service ${D}${systemd_system_unitdir} +} diff --git a/meta-google/recipes-google/bare-metal-espi/bare-metal-espi/disable-espi.service b/meta-google/recipes-google/bare-metal-espi/bare-metal-espi/disable-espi.service new file mode 100644 index 0000000000..0cb9994423 --- /dev/null +++ b/meta-google/recipes-google/bare-metal-espi/bare-metal-espi/disable-espi.service @@ -0,0 +1,13 @@ +[Unit] +Description=Disable eSPI bus +BindsTo=gbmc-bare-metal-active.target +Before=gbmc-bare-metal-active.target + +[Service] +Type=oneshot +RemainAfterExit=true +ExecStart=/usr/libexec/npcm7xx-espi-control -d +ExecStop=/usr/libexec/npcm7xx-espi-control + +[Install] +WantedBy=gbmc-bare-metal-active.target |