Compare commits

...

No commits in common. "c8" and "c10s-private-than" have entirely different histories.

15 changed files with 339 additions and 85 deletions

32
.gitignore vendored
View File

@ -1 +1,31 @@
SOURCES/skiboot-6.7.1.tar.gz
/skiboot-5.1.13.tar.gz
/skiboot-5.2.0.tar.gz
/skiboot-5.5.0.tar.gz
/v5.7.tar.gz
/v5.9.8.tar.gz
/skiboot-5.10.tar.gz
/skiboot-5.10.1.tar.gz
/skiboot-5.10.2.tar.gz
/skiboot-5.11.tar.gz
/skiboot-6.0.1.tar.gz
/skiboot-6.0.4.tar.gz
/skiboot-6.1.tar.gz
/skiboot-6.2.tar.gz
/skiboot-6.3.1.tar.gz
/skiboot-6.4.tar.gz
/skiboot-6.5.tar.gz
/skiboot-6.5.1.tar.gz
/skiboot-6.5.2.tar.gz
/skiboot-6.5.3.tar.gz
/skiboot-6.5.4.tar.gz
/skiboot-6.6.tar.gz
/skiboot-6.6.1.tar.gz
/skiboot-6.6.2.tar.gz
/skiboot-6.6.3.tar.gz
/skiboot-6.6.4.tar.gz
/skiboot-6.7.tar.gz
/skiboot-6.7.1.tar.gz
/skiboot-6.8.tar.gz
/skiboot-6.8.1.tar.gz
/skiboot-7.0.tar.gz
/skiboot-7.1.tar.gz

View File

@ -1 +0,0 @@
1fddbe662d1e08e35640203876328fad6f70f392 SOURCES/skiboot-6.7.1.tar.gz

43
ffspart.man Normal file
View File

@ -0,0 +1,43 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.3.
.TH ffspart "1" "Mai 2021" "Open-Power FFS format tool 6.7.1" "User Commands"
.SH NAME
Open-Power \- manual page for Open-Power FFS format tool 6.7.1
.SH SYNOPSIS
.B ffspart
[\fI\,options\/\fR] \fI\,-e -s size -c num -i layout_file -p pnor_file \/\fR...
.SH DESCRIPTION
Open\-Power FFS format tool 6.7.1
.SH OPTIONS
.HP
\fB\-e\fR, \fB\-\-allow_empty\fR
.IP
Create partition as blank if not specified (sets ECC if flag set)
.HP
\fB\-s\fR, \fB\-\-block_size\fR=\fI\,size\/\fR
.IP
Size (in hex with leading 0x) of the blocks on the flash in bytes
.HP
\fB\-c\fR, \fB\-\-block_count\fR=\fI\,num\/\fR
.IP
Number of blocks on the flash
.HP
\fB\-i\fR, \fB\-\-input\fR=\fI\,file\/\fR
.IP
File containing the required partition data
.HP
\fB\-p\fR, \fB\-\-pnor\fR=\fI\,file\/\fR
.IP
Output file to write data
.PP
.SH "SEE ALSO"
The full documentation for
.B ffspart
is maintained as a Texinfo manual. If the
.B info
and
.B ffspart
programs are properly installed at your site, the command
.IP
.B info ffspart
.PP
should give you access to the complete manual.

View File

@ -0,0 +1,11 @@
diff -up skiboot-7.1/external/ffspart/Makefile.me skiboot-7.1/external/ffspart/Makefile
diff -up skiboot-7.1/external/ffspart/rules.mk.me skiboot-7.1/external/ffspart/rules.mk
--- skiboot-7.1/external/ffspart/rules.mk.me 2024-04-24 17:08:41.442757994 -0400
+++ skiboot-7.1/external/ffspart/rules.mk 2024-04-24 17:15:25.754621756 -0400
@@ -33,5 +33,5 @@ $(LIBFLASH_OBJS): libflash-%.o : libflas
$(Q_CC)$(CC) $(CFLAGS) -c $< -o $@
$(EXE): $(OBJS)
- $(Q_CC)$(CC) $(CFLAGS) $^ -lrt -o $@
+ $(Q_CC)$(CC) $(LDFLAGS) $^ -lrt -o $@

View File

@ -1,3 +1,3 @@
if $programname == 'opal-prd' then /var/log/opal-prd.log
if $programname == 'opal-prd' and $syslogseverity <= 4 then /var/log/messages
if $programname == 'opal-prd' then ~
if $programname == 'opal-prd' then stop

View File

@ -1,35 +1,33 @@
%global project skiboot
Name: opal-prd
Version: 6.7.1
Release: 1%{?dist}
Summary: OPAL Processor Recovery Diagnostics Daemon
Name: opal-prd
Version: 7.1
Release: 4%{?dist}
Summary: OPAL Processor Recovery Diagnostics Daemon
Group: System Environment/Daemons
License: ASL 2.0
URL: http://github.com/open-power/skiboot
License: Apache-2.0
URL: http://github.com/open-power/skiboot
# Presently opal-prd is supported on ppc64le architecture only.
ExclusiveArch: ppc64le
ExclusiveArch: ppc64le
BuildRequires: systemd
BuildRequires: openssl
BuildRequires: gcc
%if 0%{?fedora}
BuildRequires: gcc-powerpc64-linux-gnu
%endif
BuildRequires: openssl-devel
BuildRequires: python3-devel
BuildRequires: systemd
BuildRequires: openssl
BuildRequires: gcc
BuildRequires: openssl-devel
BuildRequires: python3-devel
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Source0: https://github.com/open-power/%{project}/archive/v%{version}/%{project}-%{version}.tar.gz
Source1: opal-prd-rsyslog
Source2: opal-prd-logrotate
Source3: ffspart.man
# upstream fix
# Annocheck FAIL: bind-now fortify pie
Patch0: opal-prd-ffspart-annocheck.patch
%description
This package provides a daemon to load and run the OpenPower firmware's
@ -39,7 +37,6 @@ 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.
@ -50,31 +47,18 @@ 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 %{project}-%{version}
%autosetup -p1 -n %{project}-%{version}
%build
OPAL_PRD_VERSION=%{version} make V=1 CC="gcc" CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" ASFLAGS="-m64 -Wa,--generate-missing-build-notes=yes" -C external/opal-prd
GARD_VERSION=%{version} make V=1 CC="gcc" CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" -C external/gard
PFLASH_VERSION=%{version} make V=1 CC="gcc" CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" -C external/pflash
XSCOM_VERSION=%{version} make V=1 CC="gcc" CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" -C external/xscom-utils
GARD_VERSION=%{version} make V=1 CC="gcc" CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" -C external/gard
PFLASH_VERSION=%{version} make V=1 CC="gcc" CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" -C external/pflash
XSCOM_VERSION=%{version} make V=1 CC="gcc" CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" -C external/xscom-utils
FFSPART_VERSION=%{version} make V=1 CC="gcc" CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" -C external/ffspart
# build skiboot with a cross-compiler on Fedora and with system compiler otherwise
# and always use upstream compiler flags for the firmware (no CFLAGS override)
%if 0%{?fedora}
SKIBOOT_VERSION=%{version} make V=1 CROSS="powerpc64-linux-gnu-"
%else
SKIBOOT_VERSION=%{version} make V=1 CROSS=
%endif
%install
OPAL_PRD_VERSION=%{version} make -C external/opal-prd install DESTDIR=%{buildroot} prefix=/usr
@ -86,19 +70,18 @@ FFSPART_VERSION=%{version} make -C external/ffspart install DESTDIR=%{buildroot
mkdir -p %{buildroot}%{_unitdir}
install -m 644 -p external/opal-prd/opal-prd.service %{buildroot}%{_unitdir}/opal-prd.service
mkdir -p %{buildroot}%{_datadir}/qemu
install -m 644 -p skiboot.lid %{buildroot}%{_datadir}/qemu/skiboot.lid
install -m 644 -p skiboot.lid.xz %{buildroot}%{_datadir}/qemu/skiboot.lid.xz
# log opal-prd messages to /var/log/opal-prd.log
mkdir -p %{buildroot}%{_sysconfdir}/{rsyslog.d,logrotate.d}
install -m 644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/rsyslog.d/opal-prd.conf
install -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/logrotate.d/opal-prd
install -m 644 -p %{SOURCE1} %{buildroot}/%{_sysconfdir}/rsyslog.d/opal-prd.conf
install -m 644 -p %{SOURCE2} %{buildroot}/%{_sysconfdir}/logrotate.d/opal-prd
# install phberr script
install -D -p -m 644 external/pci-scripts/ppc.py %{buildroot}%{python3_sitelib}/ppc/__init__.py
install -D -p -m 755 external/pci-scripts/phberr.py %{buildroot}%{_bindir}/phberr
# install ffspart manpage
install -m 644 -p %{SOURCE3} %{buildroot}%{_mandir}/man1/ffspart.1
%post
%systemd_post opal-prd.service
@ -108,11 +91,12 @@ install -D -p -m 755 external/pci-scripts/phberr.py %{buildroot}%{_bindir}/phber
%postun
%systemd_postun_with_restart opal-prd.service
%files
%doc README.md
%license LICENCE
%config(noreplace) %{_sysconfdir}/logrotate.d/opal-prd
%config(noreplace) %{_sysconfdir}/rsyslog.d/opal-prd.conf
%config(noreplace) %{_sysconfdir}/rsyslog.d/opal-prd.conf
%{_sbindir}/opal-prd
%{_unitdir}/opal-prd.service
%{_mandir}/man8/*
@ -130,60 +114,143 @@ install -D -p -m 755 external/pci-scripts/phberr.py %{buildroot}%{_bindir}/phber
%{python3_sitelib}/ppc/
%{_mandir}/man1/*
%files -n opal-firmware
%doc README.md
%license LICENCE
%{_datadir}/qemu/
%changelog
* Mon May 10 2021 Than Ngo <than@redhat.com> - 6.7.1-1
- Resolves: #1921665, rebase to 6.7.1
* Wed Apr 24 2024 Than Ngo <than@redhat.com> - 7.1-4
- Resolves: RHEL-33512, fixed Annocheck FAIL: bind-now fortify pie
* Mon Oct 05 2020 Than Ngo <than@redhat.com> - 6.6.3-2
- Resolves: #1885134, fix which makes the actual page off lining asynchronous
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 7.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Oct 01 2020 Than Ngo <than@redhat.com> - 6.6.3-1
- Resolves: #1844427, rebase to 6.6.3
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 7.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Apr 24 2020 Than Ngo <than@redhat.com> - 6.6-1
- Resolves: #1779211, rebase to 6.6
* Tue Sep 19 2023 Than Ngo <than@redhat.com> - 7.1-1
- update to 7.1
* Mon Oct 28 2019 Than Ngo <than@redhat.com> - 6.5.1-1
- Resolves: #1731434. rebase to 6.5.1
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 7.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu May 23 2019 Than Ngo <than@redhat.com> - 6.3.1-2
- Related: #1664099, log messages to /var/log/opal-prd.log
* Mon Jul 10 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 7.0-6
- Rebuilt for Python 3.12
* Tue May 14 2019 Than Ngo <than@redhat.com> - 6.3.1-1
- Resolves: #1664099, rebase to 6.3.1
* Thu Feb 16 2023 Than Ngo <than@redhat.com> - 7.0-5
- migrated to SPDX license
* Mon Mar 25 2019 Than Ngo <than@redhat.com> - 6.2-3
- Related: #1664099. add missing man pages
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 7.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Mar 21 2019 Than Ngo <than@redhat.com> - 6.2-2
- Related: #1682400, bump release for gating on tests
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 7.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue Mar 19 2019 Than Ngo <than@redhat.com> - 6.2-1
- Resolves: #1664099, rebase to 6.2
- Resolves: #1682400, add gating on tests
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 7.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Dec 14 2018 Than Ngo <than@redhat.com> - 6.1-5
- Resolves: #1659458, opal-prd occ reset causes hardlockup
* Tue Oct 26 2021 Dan Horák <dan@danny.cz> - 7.0-1
- update to 7.0
* Thu Jul 22 2021 Dan Horák <dan@danny.cz> - 6.8.1-1
- update to 6.8.1
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Jul 12 2021 Dan Horák <dan@danny.cz> - 6.8-2
- drop the firmware subpackage
* Mon May 31 2021 Vasant Hegde <hegdevasant@linux.vnet.ibm.com> - 6.8-1
- update to 6.8 (#1965683)
* Wed May 26 2021 Than Ngo <than@redhat.com> - 6.7.1-4
- using stop instead ~ action as it's deprecated in rsyslog
* Mon May 10 2021 Than Ngo <than@redhat.com> - 6.7.1-3
- Add missing manpage for ffspart
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.7.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Thu Jan 07 2021 Dan Horák <dan@danny.cz> - 6.7.1-1
- update to 6.7.1 (#1913304)
* Tue Nov 03 2020 Dan Horák <dan@danny.cz> - 6.7-2
- install phberr script
- fix %%install to avoid recompilation
* Tue Nov 03 2020 Dan Horák <dan@danny.cz> - 6.7-1
- update to 6.7
* Fri Oct 23 2020 Dan Horák <dan@danny.cz> - 6.6.4-1
- update to 6.6.4 (#1890868)
* Thu Sep 10 2020 Dan Horák <dan@danny.cz> - 6.6.3-1
- update to 6.6.3
* Mon Aug 10 2020 Dan Horák <dan@danny.cz> - 6.6.2-3
- build and install ffspart
- add BR: openssl for skibot image signing
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.6.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jul 03 2020 Dan Horák <dan@danny.cz> - 6.6.2-1
- update to 6.6.2
* Tue Jun 09 2020 Dan Horák <dan@danny.cz> - 6.6.1-1
- update to 6.6.1
* Thu Apr 23 2020 Dan Horák <dan@danny.cz> - 6.6-1
- update to 6.6
* Fri Mar 20 2020 Dan Horák <dan@danny.cz> - 6.5.4-1
- update to 6.5.4
* Wed Mar 11 2020 Dan Horák <dan@danny.cz> - 6.5.3-1
- update to 6.5.3
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.5.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Dec 12 2019 Dan Horák <dan@danny.cz> - 6.5.2-1
- update to 6.5.2
* Thu Oct 24 2019 Dan Horák <dan@danny.cz> - 6.5.1-1
- update to 6.5.1
* Mon Aug 19 2019 Dan Horák <dan@danny.cz> - 6.5-1
- update to 6.5
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue Jul 16 2019 Dan Horák <dan@danny.cz> - 6.4-1
- update to 6.4
* Fri May 24 2019 Than Ngo <than@redhat.com> - 6.3.1-1
- update to 6.3.1
- log messages to /var/log/opal-prd.log
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Dec 20 2018 Than Ngo <than@redhat.com> - 6.2-2
- add man pages
* Thu Dec 20 2018 Than Ngo <than@redhat.com> - 6.2-1
- update to 6.2
* Thu Sep 27 2018 Than Ngo <than@redhat.com> - 6.1-4
- opal-prd messages to /var/log/opal-prd.log
- log opal-prd messages to /var/log/opal-prd.log
* Fri Sep 21 2018 Than Ngo <than@redhat.com> - 6.1-3
- Resolves: #1630612 - annocheck distro flag failures
- Fixed opal-prd crash
- Fixed annocheck distro flag failures
* Mon Jul 30 2018 Than Ngo <than@redhat.com> - 6.1-2
- fixed bz#1568027, opal-prd crash
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Jul 16 2018 Than Ngo <than@redhat.com> - 6.1-1
- update to 6.1
* Fri Jun 29 2018 Than Ngo <than@redhat.com> - 6.0.4-2
- Resolves: #1596245, "diag_encl -d" creates xml file with blank space in file name
* Thu Jul 12 2018 Dan Horák <dan@danny.cz> - 6.1-1
- Update to latest upstream 6.1
* Mon May 28 2018 Dan Horák <dan@danny.cz> - 6.0.4-1
- Update to latest upstream 6.0.4

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (skiboot-7.1.tar.gz) = 3f7907de0d9a26b5a806b70a1757e9e0ae1a7bff6c086e2b33fdc7745338f87c774e81ee9f10fe5277175ce5842271b2028a52f91a8d1d380126cac1d6e1b48d

View File

@ -0,0 +1,43 @@
TOPLEVEL_NAMESPACE=/CoreOS
PACKAGE_NAME=opal-prd
RELATIVE_PATH=smoke-functionality
export TEST=$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH)
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
chmod a+x ./runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
# You may need to add other taregts e.g. to build executables from source code
# Add them here:
# Include Common Makefile
include /usr/share/rhts/lib/rhts-make.include
# Generate the testinfo.desc here:
$(METADATA): Makefile
@touch $(METADATA)
@echo "Owner: Than Ngo <than@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Description: Basic sanity and function tests">> $(METADATA)
@echo "Type: Sanity and function" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: $(PACKAGE_NAME)" >> $(METADATA) # add any other packages for which your test ought to run here
@echo "Requires: $(PACKAGE_NAME)" >> $(METADATA) # add any other requirements for the script to run here
@echo "Requires: opal-prd" >> $(METADATA)
@echo "Requires: opal-utils" >> $(METADATA)
@echo "License: ASL 2.0" >> $(METADATA)

View File

@ -0,0 +1,3 @@
PURPOSE of /CoreOS/opal-prd/smoke-functionality
Description: Smoke, Sanity and function tests
Author: Than Ngo <than@redhat.com>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,44 @@
#!/bin/sh
# customize this where needed
PACKAGE="opal-prd opal-utils"
SERVICE="opal-prd"
# source the test script helpers
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
rlJournalStart
rlPhaseStartSetup
for p in $PACKAGE ; do
rlAssertRpm $p
done
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "cp * $TmpDir" 0 "Copying test files"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest "Smoke, sanity and function tests"
for i in getscom putscom opal-prd pflash; do
rlRun "/usr/sbin/$i -h" 0 "It ought show the usage"
done
for i in getscom putscom; do
rlRun "/usr/sbin/$i -v" 0 "It ought show the version"
done
rlAssertExists "/usr/lib/systemd/system/opal-prd.service"
# opal-prd only runs on bare-metal (powernv) machines
if [ -d /sys/firmware/devicetree/base/ibm,opal/diagnostics ] ; then
rlServiceStart $SERVICE
rlRun "systemctl status -l $SERVICE"
rlServiceStop $SERVICE
fi
rlRun "/usr/sbin/opal-gard -p -e -8 -f data1.bin list" 0
rlRun "/usr/sbin/opal-gard -p -e -8 -f data1.bin show 1" 0
rlRun "/usr/sbin/opal-gard -p -e -f data-p9.bin --p9 show 1" 0
rlRun "/usr/sbin/opal-gard -p -e -f blank.bin create $TmpDir/doesnt_exist0" "1-255" "It ought to be failed"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -fr $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

13
tests/tests.yml Normal file
View File

@ -0,0 +1,13 @@
---
# Tests that run in classic context
- hosts: localhost
roles:
- role: standard-test-beakerlib
tags:
- classic
tests:
- smoke-functionality
required_packages:
- findutils # beakerlib needs find command
- opal-prd
- opal-utils