[Skiboot] [PATCH] opal-prd: Load opal-prd service after systemd-modules-load service

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Tue Mar 9 21:01:03 AEDT 2021


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 <hegdevasant at linux.vnet.ibm.com>
---
 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 dce0dd262..cf514e498 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 38c686811..fbb21b562 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 <hegdevasant at linux.vnet.ibm.com> - 6.7
+- Update to v6.7 release
+- Create conf file to load opal-prd module at boot
+
 * Thu Mar 01 2018 Murilo Opsfelder Araujo <muriloo at linux.vnet.ibm.com> - 5.10-1
 - Update to v5.10 release
 
-- 
2.26.2



More information about the Skiboot mailing list