Accepting request 338512 from home:a_faerber:branches:Virtualization

Allow building SLOF on ppc64le (bsc#949016) and add two checks for DictZip and tar qemu-img behavior (bsc#945778)

OBS-URL: https://build.opensuse.org/request/show/338512
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=274
This commit is contained in:
Andreas Färber 2015-10-13 16:39:07 +00:00 committed by Git OBS Bridge
parent 8692514bef
commit 15d50565ca
6 changed files with 168 additions and 20 deletions

48
SLOF_ppc64le.patch Normal file
View File

@ -0,0 +1,48 @@
From 14f14004dd8f7a9be63510284c10445c7a8be5d7 Mon Sep 17 00:00:00 2001
From: Dinar Valeev <dvaleev@suse.com>
Date: Fri, 9 Oct 2015 13:01:12 +0200
Subject: [PATCH] Allow to build SLOF on Little Endian host
Don't require cross compiler in order to build SLOF on ppc64le platform.
Native compiler is capable to build ELFv1 BE binary. We just need to
instruct it how to do it. By adding -mbig and -mabi=elfv1 flags
Signed-off-by: Dinar Valeev <dvaleev@suse.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
make.rules | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/make.rules b/make.rules
index aebc4e3..cbc6353 100644
--- a/make.rules
+++ b/make.rules
@@ -19,8 +19,12 @@
ARCH := $(shell uname -p)
# Auto-detect ppc64
-ifeq ($(ARCH), ppc64)
-CROSS = ""
+ifeq (ppc64,$(findstring ppc64,$(ARCH)))
+ ifeq ($(ARCH), ppc64le)
+ EXTRA_CC = -mbig -mabi=elfv1
+ EXTRA_LD = -mbig
+ endif
+CROSS ?=
else
CROSS ?= powerpc64-linux-
endif
@@ -31,8 +35,8 @@ HOSTCC ?= gcc
HOSTCFLAGS = -g -Wall -W -O2 -I. -I../include
DD = dd
-ONLY_CC = $(CROSS)gcc -m$(CELLSIZE)
-ONLY_AS = $(CROSS)as -m$(CELLSIZE)
+ONLY_CC = $(CROSS)gcc -m$(CELLSIZE) $(EXTRA_CC)
+ONLY_AS = $(CROSS)as -m$(CELLSIZE) $(EXTRA_LD)
ONLY_LD = $(CROSS)ld -melf$(CELLSIZE)ppc
# Verbose level:
--
2.1.4

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Oct 12 16:05:28 UTC 2015 - afaerber@suse.de
- Allow building SLOF on ppc64le (bsc#949016)
SLOF_ppc64le.patch
- Add two checks for DictZip and tar qemu-img behavior (bsc#945778)
* Clean up qemu-testsuite build/installation
-------------------------------------------------------------------
Thu Oct 8 16:29:28 UTC 2015 - afaerber@suse.de
@ -17,7 +25,7 @@ Thu Oct 8 14:35:03 UTC 2015 - afaerber@suse.de
-------------------------------------------------------------------
Thu Oct 8 13:11:07 UTC 2015 - afaerber@suse.de
- Build SLOF on ppc64 (thanks to k0da)
- Build SLOF on ppc64 (bsc#949016, thanks to k0da)
* Simplify x86 fw logic while at it
- No need to enable KVM for armv6hl
- Add notice about pre_checkin.sh to update_git.sh

View File

@ -111,6 +111,7 @@ Patch1002: seabios_avoid_smbios_signature_string.patch
%endif
Patch1100: gcc5-ipxe-add-missing-const-qualifiers.patch
Patch1101: gcc5-ipxe-ath9k-Remove-confusing-logic-inversion-in-an-ANI-var.patch
Patch2000: SLOF_ppc64le.patch
# this is to make lint happy
Source300: qemu-rpmlintrc
@ -637,6 +638,9 @@ pushd roms/ipxe
popd
%if %{build_slof_from_source}
pushd roms/SLOF
%patch2000 -p1
popd
rm -f pc-bios/slof.bin
%endif
@ -793,17 +797,18 @@ for conf in default-configs/*-softmmu.mak; do
ln -s %{_bindir}/qemu-system-$arch $arch-softmmu/qemu-system-$arch
done
%endif
%check
%if "%{name}" == "qemu-testsuite"
%if 0%{?suse_version} >= 1310
make check-report.html V=1
install -D -m 644 check-report.html %{buildroot}%{_datadir}/qemu/check-report.html
%else
make check-report.xml V=1
%endif
install -D -m 644 check-report.xml %{buildroot}%{_datadir}/qemu/check-report.xml
%endif
%check
%if "%{name}" == "qemu-testsuite"
%ifnarch %ix86 x64_64
export QEMU_PROG=%{_bindir}/qemu-system-x86_64
%endif
@ -819,10 +824,25 @@ pushd tests/qemu-iotests
# ./check -v -T $fmt -file -g quick || true
#done
popd
%endif
# Create minimal gzip format file
echo "Test" > test.txt
cat test.txt | gzip - > test.gz
# Check qemu-img info output (bsc#945778)
format=`qemu-img info test.gz | grep "file format:" | cut -d ':' -f 2 | tr -d '[:space:]'`
[ "$format" == "raw" ] || false
# Create minimal tar format file
tar cf test.tar test.txt
# Check qemu-img info output (bsc#945778)
format=`qemu-img info test.tar | grep "file format:" | cut -d ':' -f 2 | tr -d '[:space:]'`
[ "$format" == "raw" ] || false
%endif # qemu-testsuite
%install
%if "%{name}" != "qemu-testsuite"
make install DESTDIR=$RPM_BUILD_ROOT
rm -fr $RPM_BUILD_ROOT/%_datadir/doc
rm $RPM_BUILD_ROOT/%_libdir/libcacard*
@ -865,6 +885,14 @@ install -D -m 644 %{SOURCE5} %{buildroot}%{_udevrulesdir}/60-kvm.rules
%endif
install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
%fdupes -s $RPM_BUILD_ROOT
%else # qemu-testsuite
%if 0%{?suse_version} >= 1310
install -D -m 644 check-report.html %{buildroot}%{_datadir}/qemu/check-report.html
%endif
install -D -m 644 check-report.xml %{buildroot}%{_datadir}/qemu/check-report.xml
%endif
%if "%{name}" != "qemu-testsuite"

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Oct 12 16:05:28 UTC 2015 - afaerber@suse.de
- Allow building SLOF on ppc64le (bsc#949016)
SLOF_ppc64le.patch
- Add two checks for DictZip and tar qemu-img behavior (bsc#945778)
* Clean up qemu-testsuite build/installation
-------------------------------------------------------------------
Thu Oct 8 16:29:28 UTC 2015 - afaerber@suse.de
@ -17,7 +25,7 @@ Thu Oct 8 14:35:03 UTC 2015 - afaerber@suse.de
-------------------------------------------------------------------
Thu Oct 8 13:11:07 UTC 2015 - afaerber@suse.de
- Build SLOF on ppc64 (thanks to k0da)
- Build SLOF on ppc64 (bsc#949016, thanks to k0da)
* Simplify x86 fw logic while at it
- No need to enable KVM for armv6hl
- Add notice about pre_checkin.sh to update_git.sh

View File

@ -111,6 +111,7 @@ Patch1002: seabios_avoid_smbios_signature_string.patch
%endif
Patch1100: gcc5-ipxe-add-missing-const-qualifiers.patch
Patch1101: gcc5-ipxe-ath9k-Remove-confusing-logic-inversion-in-an-ANI-var.patch
Patch2000: SLOF_ppc64le.patch
# this is to make lint happy
Source300: qemu-rpmlintrc
@ -637,6 +638,9 @@ pushd roms/ipxe
popd
%if %{build_slof_from_source}
pushd roms/SLOF
%patch2000 -p1
popd
rm -f pc-bios/slof.bin
%endif
@ -793,17 +797,18 @@ for conf in default-configs/*-softmmu.mak; do
ln -s %{_bindir}/qemu-system-$arch $arch-softmmu/qemu-system-$arch
done
%endif
%check
%if "%{name}" == "qemu-testsuite"
%if 0%{?suse_version} >= 1310
make check-report.html V=1
install -D -m 644 check-report.html %{buildroot}%{_datadir}/qemu/check-report.html
%else
make check-report.xml V=1
%endif
install -D -m 644 check-report.xml %{buildroot}%{_datadir}/qemu/check-report.xml
%endif
%check
%if "%{name}" == "qemu-testsuite"
%ifnarch %ix86 x64_64
export QEMU_PROG=%{_bindir}/qemu-system-x86_64
%endif
@ -819,10 +824,25 @@ pushd tests/qemu-iotests
# ./check -v -T $fmt -file -g quick || true
#done
popd
%endif
# Create minimal gzip format file
echo "Test" > test.txt
cat test.txt | gzip - > test.gz
# Check qemu-img info output (bsc#945778)
format=`qemu-img info test.gz | grep "file format:" | cut -d ':' -f 2 | tr -d '[:space:]'`
[ "$format" == "raw" ] || false
# Create minimal tar format file
tar cf test.tar test.txt
# Check qemu-img info output (bsc#945778)
format=`qemu-img info test.tar | grep "file format:" | cut -d ':' -f 2 | tr -d '[:space:]'`
[ "$format" == "raw" ] || false
%endif # qemu-testsuite
%install
%if "%{name}" != "qemu-testsuite"
make install DESTDIR=$RPM_BUILD_ROOT
rm -fr $RPM_BUILD_ROOT/%_datadir/doc
rm $RPM_BUILD_ROOT/%_libdir/libcacard*
@ -865,6 +885,14 @@ install -D -m 644 %{SOURCE5} %{buildroot}%{_udevrulesdir}/60-kvm.rules
%endif
install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
%fdupes -s $RPM_BUILD_ROOT
%else # qemu-testsuite
%if 0%{?suse_version} >= 1310
install -D -m 644 check-report.html %{buildroot}%{_datadir}/qemu/check-report.html
%endif
install -D -m 644 check-report.xml %{buildroot}%{_datadir}/qemu/check-report.xml
%endif
%if "%{name}" != "qemu-testsuite"

View File

@ -72,6 +72,7 @@ Patch1002: seabios_avoid_smbios_signature_string.patch
%endif
Patch1100: gcc5-ipxe-add-missing-const-qualifiers.patch
Patch1101: gcc5-ipxe-ath9k-Remove-confusing-logic-inversion-in-an-ANI-var.patch
Patch2000: SLOF_ppc64le.patch
# this is to make lint happy
Source300: qemu-rpmlintrc
@ -559,6 +560,9 @@ pushd roms/ipxe
popd
%if %{build_slof_from_source}
pushd roms/SLOF
%patch2000 -p1
popd
rm -f pc-bios/slof.bin
%endif
@ -715,17 +719,18 @@ for conf in default-configs/*-softmmu.mak; do
ln -s %{_bindir}/qemu-system-$arch $arch-softmmu/qemu-system-$arch
done
%endif
%check
%if "%{name}" == "qemu-testsuite"
%if 0%{?suse_version} >= 1310
make check-report.html V=1
install -D -m 644 check-report.html %{buildroot}%{_datadir}/qemu/check-report.html
%else
make check-report.xml V=1
%endif
install -D -m 644 check-report.xml %{buildroot}%{_datadir}/qemu/check-report.xml
%endif
%check
%if "%{name}" == "qemu-testsuite"
%ifnarch %ix86 x64_64
export QEMU_PROG=%{_bindir}/qemu-system-x86_64
%endif
@ -741,10 +746,25 @@ pushd tests/qemu-iotests
# ./check -v -T $fmt -file -g quick || true
#done
popd
%endif
# Create minimal gzip format file
echo "Test" > test.txt
cat test.txt | gzip - > test.gz
# Check qemu-img info output (bsc#945778)
format=`qemu-img info test.gz | grep "file format:" | cut -d ':' -f 2 | tr -d '[:space:]'`
[ "$format" == "raw" ] || false
# Create minimal tar format file
tar cf test.tar test.txt
# Check qemu-img info output (bsc#945778)
format=`qemu-img info test.tar | grep "file format:" | cut -d ':' -f 2 | tr -d '[:space:]'`
[ "$format" == "raw" ] || false
%endif # qemu-testsuite
%install
%if "%{name}" != "qemu-testsuite"
make install DESTDIR=$RPM_BUILD_ROOT
rm -fr $RPM_BUILD_ROOT/%_datadir/doc
rm $RPM_BUILD_ROOT/%_libdir/libcacard*
@ -787,6 +807,14 @@ install -D -m 644 %{SOURCE5} %{buildroot}%{_udevrulesdir}/60-kvm.rules
%endif
install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
%fdupes -s $RPM_BUILD_ROOT
%else # qemu-testsuite
%if 0%{?suse_version} >= 1310
install -D -m 644 check-report.html %{buildroot}%{_datadir}/qemu/check-report.html
%endif
install -D -m 644 check-report.xml %{buildroot}%{_datadir}/qemu/check-report.xml
%endif
%if "%{name}" != "qemu-testsuite"