From bf1b2042365a9f2c2c7a1dfd6bf6ba74d13c7447 Mon Sep 17 00:00:00 2001 From: Vasant Hegde Date: Tue, 9 Mar 2021 15:31:03 +0530 Subject: opal-prd: Load opal-prd service after systemd-modules-load service MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In some cases opal-prd daemon is failing to start during boot. This is because systemd is trying to start service before `opal-prd` kernel module load. Sample failure message: ---------------------- Feb 21 19:03:09 grsp1 opal-prd: FW: Can't open PRD device /dev/opal-prd: No such file or directory Feb 21 19:03:09 grsp1 opal-prd: FW: Error initialising PRD channel Lets start opal-prd service after systemd-modules-load is started. Also create conf file to load opal-prd module during boot. This will make sure systemd tries to start opal-prd daemon after opal-prd kernel module load. Signed-off-by: Vasant Hegde Signed-off-by: Cédric Le Goater --- external/opal-prd/opal-prd.service | 1 + skiboot.spec | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/external/opal-prd/opal-prd.service b/external/opal-prd/opal-prd.service index dce0dd2..cf514e4 100644 --- a/external/opal-prd/opal-prd.service +++ b/external/opal-prd/opal-prd.service @@ -2,6 +2,7 @@ Description=OPAL PRD daemon ConditionVirtualization=false ConditionPathExists=/sys/firmware/devicetree/base/ibm,opal/diagnostics +After=systemd-modules-load.service [Service] ExecStart=/usr/sbin/opal-prd diff --git a/skiboot.spec b/skiboot.spec index 38c6868..fbb21b5 100644 --- a/skiboot.spec +++ b/skiboot.spec @@ -1,5 +1,5 @@ Name: opal-prd -Version: 5.10 +Version: 6.7 Release: 1%{?dist} Summary: OPAL Processor Recovery Diagnostics Daemon @@ -11,6 +11,7 @@ ExclusiveArch: ppc64le BuildRequires: systemd Requires: systemd +Requires: systemd-udev Source0: https://github.com/open-power/skiboot/archive/v%{version}.tar.gz @@ -62,6 +63,10 @@ make -C external/pflash install DESTDIR=%{buildroot} prefix=/usr mkdir -p %{buildroot}%{_unitdir} install -m 644 -p external/opal-prd/opal-prd.service %{buildroot}%{_unitdir}/opal-prd.service +# Auto-load kernel module after boot/reboot +mkdir -p %{buildroot}/%{_sysconfdir}/modules-load.d +echo 'opal-prd' > %{buildroot}/%{_sysconfdir}/modules-load.d/%{name}.conf + mkdir -p %{buildroot}%{_datadir}/qemu install -m 644 -p skiboot.lid %{buildroot}%{_datadir}/qemu/skiboot.lid @@ -91,6 +96,7 @@ fi %{_sbindir}/opal-prd %{_unitdir}/opal-prd.service %{_mandir}/man8/* +%config(noreplace) %{_sysconfdir}/modules-load.d/%{name}.conf %files -n opal-utils %doc README.md @@ -108,6 +114,10 @@ fi %{_datadir}/qemu/ %changelog +* Tue Mar 9 2021 Vasant Hegde - 6.7 +- Update to v6.7 release +- Create conf file to load opal-prd module at boot + * Thu Mar 01 2018 Murilo Opsfelder Araujo - 5.10-1 - Update to v5.10 release -- cgit v1.1