File skiboot.spec of Package skiboot
#
# spec file for package skiboot
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: skiboot
Version: 5.2.0
Release: 0
Summary: Tools for OpenPower platform
License: Apache-2.0
Group: System/Management
Url: https://github.com/open-power/skiboot
Source: https://github.com/open-power/skiboot/archive/%{name}-%{version}.tar.gz
Patch0: 0001-Make-links-target-reusable.patch
Patch1: skiboot_gcc6_backtrace.patch
BuildRequires: linux-glibc-devel
BuildRequires: systemd-rpm-macros
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{?systemd_requires}
ExclusiveArch: ppc64 ppc64le
%description
OPAL firmware (OpenPower Abstraction Layer)
%package -n opal-prd
Summary: OPAL Processor Recovery Diagnostics daemon
Group: System/Management
%description -n opal-prd
This package provides a daemon to load and run the OpenPower firmware's
Processor Recovery Diagnostics binary. This is responsible for runtime
maintenance of Power hardware.
%package -n opal-utils
Summary: OPAL firmware utilities
Group: System/Management
%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
Group: System/Management
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 %{name}-%{name}-%{version}
%patch0 -p1
%patch1 -p1
%build
SKIBOOT_VERSION=%version CROSS= make V=1 %{?_smp_mflags}
OPAL_PRD_VERSION=%version make V=1 %{?_smp_mflags} -C external/opal-prd
GARD_VERSION=%version make V=1 %{?_smp_mflags} -C external/gard
PFLASH_VERSION=%version make V=1 %{?_smp_mflags} -C external/pflash
make V=1 -C external/xscom-utils
%install
make install DESTDIR=%{buildroot} %{?_smp_mflags} -C external/opal-prd/ prefix=%{_prefix} install
make install DESTDIR=%{buildroot} %{?_smp_mflags} -C external/gard/ prefix=%{_prefix} install
cp external/xscom-utils/{get,put}scom %{buildroot}%{_sbindir}
cp external/pflash/pflash %{buildroot}%{_sbindir}
mkdir -p %{buildroot}/%{_unitdir}
install -D -m 444 external/opal-prd/opal-prd.{socket,service} %{buildroot}%{_unitdir}/
mkdir -p %{buildroot}%{_datadir}/qemu
install -m 644 -p skiboot.lid %{buildroot}%{_datadir}/qemu/skiboot.lid
%pre -n opal-prd
%service_add_pre opal-prd.service opal-prd.socket
%post -n opal-prd
%service_add_post opal-prd.service opal-prd.socket
%preun -n opal-prd
%service_del_preun opal-prd.service opal-prd.socket
%postun -n opal-prd
%service_del_postun opal-prd.service opal-prd.socket
%files -n opal-prd
%defattr(-,root,root)
%doc README LICENCE
%{_sbindir}/opal-prd
%{_mandir}/man8/opal-prd.8.gz
%{_unitdir}/opal-prd.service
%{_unitdir}/opal-prd.socket
%files -n opal-utils
%defattr(-,root,root)
%doc README LICENCE
%{_sbindir}/opal-gard
%{_sbindir}/getscom
%{_sbindir}/putscom
%{_sbindir}/pflash
%{_mandir}/man1/opal-gard.1.gz
%files -n opal-firmware
%doc README LICENCE
%{_datadir}/qemu/
%changelog