Blob Blame History Raw
Name:		opal-prd
Version:	5.2.0
Release:	3%{?dist}
Summary:	OPAL Processor Recovery Diagnostics Daemon

Group:		System Environment/Daemons
License:	ASL 2.0
URL:		http://github.com/open-power/skiboot

# Presently opal-prd is supported on ppc64le architecture only.
ExclusiveArch:	ppc64le

BuildRequires:	systemd

Requires(post):		systemd
Requires(preun):	systemd
Requires(postun):	systemd

Source0:	https://github.com/open-power/skiboot/archive/skiboot-%{version}.tar.gz
Source1:	opal-prd.service
Patch0:		skiboot-1.1.13-gcc6-builtin-frame-addr-fix.patch

%description
This package provides a daemon to load and run the OpenPower firmware's
Processor Recovery Diagnostics binary. This is responsible for run time
maintenance of OpenPower Systems hardware.


%package -n	opal-utils
Summary:	OPAL firmware utilities
Group:		Applications/System

%description -n opal-utils
This package contains utility programs.

The 'gard' utility, can read, parse and clear hardware gard partitions
on OpenPower platforms. The 'getscom' and 'putscom' utilities provide
an interface to query or modify the registers of the different chipsets
of an OpenPower system. 'pflash' is a tool to access the flash modules
on such systems and update the OpenPower firmware.

%package -n	opal-firmware
Summary:	OPAL firmware
BuildArch:	noarch

%description -n	opal-firmware
OPAL firmware, aka skiboot, loads the bootloader and provides runtime
services to the OS (Linux) on IBM Power and OpenPower systems.

%prep

%setup -q -n skiboot-skiboot-%{version}
%patch0 -p1 -b .gcc6-builtin-frame-addr-fix

%build
OPAL_PRD_VERSION=%{version} make V=1 CFLAGS="%{optflags}" -C external/opal-prd
GARD_VERSION=%{version} make V=1 CFLAGS="%{optflags}" -C external/gard
PFLASH_VERSION=%{version} make V=1 CFLAGS="%{optflags}" -C external/pflash
make V=1 CFLAGS="%{optflags}" -C external/xscom-utils
SKIBOOT_VERSION=%{version} CROSS= make V=1 %{?_smp_mflags}

%install
make -C external/opal-prd install DESTDIR=%{buildroot} prefix=/usr
make -C external/gard install DESTDIR=%{buildroot} prefix=/usr
cp external/pflash/pflash %{buildroot}%{_sbindir}
cp external/xscom-utils/{get,put}scom %{buildroot}%{_sbindir}

mkdir -p %{buildroot}%{_unitdir}
install -m 644 -p %{SOURCE1} %{buildroot}%{_unitdir}/opal-prd.service

mkdir -p %{buildroot}%{_datadir}/qemu
install -m 644 -p skiboot.lid %{buildroot}%{_datadir}/qemu/skiboot.lid

%post
%systemd_post opal-prd.service

%preun
%systemd_preun opal-prd.service

%postun
%systemd_postun_with_restart opal-prd.service

%files
%doc README
%license LICENCE
%{_sbindir}/opal-prd
%{_unitdir}/opal-prd.service
%{_mandir}/man8/*

%files -n opal-utils
%doc README
%license LICENCE
%{_sbindir}/opal-gard
%{_sbindir}/getscom
%{_sbindir}/putscom
%{_sbindir}/pflash
%{_mandir}/man1/*

%files -n opal-firmware
%doc README
%license LICENCE
%{_datadir}/qemu/

%changelog
* Thu Sep 22 2016 Rafael Fonseca <rdossant@redhat.com> - 5.2.0-3
- Resolves: rhbz#1375449

* Thu Aug 25 2016 Rafael Fonseca <rdossant@redhat.com> - 5.2.0-2
- Resolves: rhbz#1367342
- Remove systemd socket.

* Fri May 20 2016 Rafael dos Santos <rdossant@redhat.com> - 5.2.0-1
- Importing package from Fedora.