diff options
author | Troy Lee <troy_lee@aspeedtech.com> | 2021-05-13 10:23:09 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2021-10-18 18:38:48 +0300 |
commit | 70c128d1bdea88f1d5ee2f1fdc9acce96b394694 (patch) | |
tree | aabf8606a0bdc8e7722d8440ecbfd45cc7c10b70 /meta-phosphor/recipes-phosphor | |
parent | c11c4e24951e967456759a01c41c79c6a0db6605 (diff) | |
download | openbmc-70c128d1bdea88f1d5ee2f1fdc9acce96b394694.tar.xz |
obmc-phosphor-sysd: using shell script as a dummy implementation
For evb-ast2500/evb-ast2600 machine, Python are introduced by
obmc-phosphor-sysd.py. Changing the implementation to shell script
can remove python completely from image.
Test with evb-ast2600:
```
root@evb-ast2500:~# systemctl status obmc-phosphor-sysd
* obmc-phosphor-sysd.service - Phosphor System Manager
Loaded: loaded (8;;file://evb-ast2500/lib/systemd/system/obmc-phosphor-sysd.service/lib/systemd/system/obmc)
Active: active (running) since Thu 1970-01-01 00:00:38 UTC; 51 years 9 months ago
Main PID: 168 (obmc-phosphor-s)
CGroup: /system.slice/obmc-phosphor-sysd.service
|-168 /bin/sh /usr/bin/obmc-phosphor-sysd
`-312 sleep 60
Jan 01 00:00:38 evb-ast2500 systemd[1]: Started Phosphor System Manager.
Jan 01 00:00:40 evb-ast2500 obmc-phosphor-sysd[168]: obmc-phosphor-sysd starting...
```
Signed-off-by: Troy Lee <troy_lee@aspeedtech.com>
Change-Id: I266bd73773483d5ceb2ba01a09d372942eddc939
Diffstat (limited to 'meta-phosphor/recipes-phosphor')
-rw-r--r-- | meta-phosphor/recipes-phosphor/system/obmc-phosphor-sysd.bb | 9 | ||||
-rw-r--r-- | meta-phosphor/recipes-phosphor/system/obmc-phosphor-sysd/obmc-phosphor-sysd.service (renamed from meta-phosphor/recipes-phosphor/system/files/obmc-phosphor-sysd.service) | 0 | ||||
-rw-r--r-- | meta-phosphor/recipes-phosphor/system/obmc-phosphor-sysd/obmc-phosphor-sysd.sh (renamed from meta-phosphor/recipes-phosphor/system/files/obmc-phosphor-sysd.py) | 17 |
3 files changed, 13 insertions, 13 deletions
diff --git a/meta-phosphor/recipes-phosphor/system/obmc-phosphor-sysd.bb b/meta-phosphor/recipes-phosphor/system/obmc-phosphor-sysd.bb index 41a4c1e24..06eb55ec2 100644 --- a/meta-phosphor/recipes-phosphor/system/obmc-phosphor-sysd.bb +++ b/meta-phosphor/recipes-phosphor/system/obmc-phosphor-sysd.bb @@ -4,10 +4,15 @@ PR = "r1" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" -inherit obmc-phosphor-pydbus-service +inherit obmc-phosphor-dbus-service PROVIDES += "virtual/obmc-system-mgmt" RPROVIDES:${PN} += "virtual-obmc-system-mgmt" S = "${WORKDIR}" -SRC_URI += "file://${PN}.py" +SRC_URI += "file://${BPN}.sh" + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${WORKDIR}/${BPN}.sh ${D}${bindir}/${BPN} +} diff --git a/meta-phosphor/recipes-phosphor/system/files/obmc-phosphor-sysd.service b/meta-phosphor/recipes-phosphor/system/obmc-phosphor-sysd/obmc-phosphor-sysd.service index 246d985ba..246d985ba 100644 --- a/meta-phosphor/recipes-phosphor/system/files/obmc-phosphor-sysd.service +++ b/meta-phosphor/recipes-phosphor/system/obmc-phosphor-sysd/obmc-phosphor-sysd.service diff --git a/meta-phosphor/recipes-phosphor/system/files/obmc-phosphor-sysd.py b/meta-phosphor/recipes-phosphor/system/obmc-phosphor-sysd/obmc-phosphor-sysd.sh index c8080ac2c..95488d04d 100644 --- a/meta-phosphor/recipes-phosphor/system/files/obmc-phosphor-sysd.py +++ b/meta-phosphor/recipes-phosphor/system/obmc-phosphor-sysd/obmc-phosphor-sysd.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/bin/sh # Contributors Listed Below - COPYRIGHT 2015 # [+] International Business Machines Corp. @@ -16,14 +16,9 @@ # implied. See the License for the specific language governing # permissions and limitations under the License. -import time -import sys -import dbus -import dbus.service -import dbus.mainloop.glib +echo "obmc-phosphor-sysd starting..." -if __name__ == '__main__': - print "obmc-phosphor-watchdogd starting..." - - while 1: - time.sleep(5) +while true +do + sleep 60 +done |