From 99acb7602f454fd0175812ff62f5cbcc26d9a944 Mon Sep 17 00:00:00 2001 From: George Liu Date: Tue, 9 Mar 2021 13:59:35 +0800 Subject: dump: Add ramoops service - Create a new package for the ramoops service and only load it once when the debug-collector daemon starts - Fix openbmc/phosphor-debug-collector#15 Tested: - Built obmc-phosphor-image and saw the ramoops-monitor run successfully. Signed-off-by: George Liu Change-Id: Ic616408b834a257a981f0e0ef24ad030ccffc616 --- .../dump/phosphor-debug-collector/ramoops-monitor.service | 13 +++++++++++++ .../recipes-phosphor/dump/phosphor-debug-collector_git.bb | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector/ramoops-monitor.service diff --git a/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector/ramoops-monitor.service b/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector/ramoops-monitor.service new file mode 100644 index 000000000..efb95c39e --- /dev/null +++ b/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector/ramoops-monitor.service @@ -0,0 +1,13 @@ +[Unit] +Description=Ramoops monitor. +ConditionPathExists=/var/lib/systemd/pstore +After=xyz.openbmc_project.Dump.Manager.service + +[Service] +Type=oneshot +ExecStart=/usr/bin/phosphor-ramoops-monitor +SyslogIdentifier=ramoops-monitor + +[Install] +WantedBy=multi-user.target + diff --git a/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector_git.bb b/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector_git.bb index fb799f2d6..41b2370e3 100644 --- a/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector_git.bb +++ b/meta-phosphor/recipes-phosphor/dump/phosphor-debug-collector_git.bb @@ -64,11 +64,13 @@ FILES_${PN}-manager += " \ ${datadir}/dump/ \ " FILES_${PN}-monitor += "${bindir}/phosphor-dump-monitor" +FILES_${PN}-monitor += "${bindir}/phosphor-ramoops-monitor" FILES_${PN}-dreport += "${bindir}/dreport" FILES_${PN}-scripts += "${dreport_dir}" DBUS_SERVICE_${PN}-manager += "${MGR_SVC}" SYSTEMD_SERVICE_${PN}-monitor += "obmc-dump-monitor.service" +SYSTEMD_SERVICE_${PN}-monitor += "ramoops-monitor.service" EXTRA_OEMESON = " \ -DBMC_DUMP_PATH=${bmc_dump_path} \ -- cgit v1.2.3