From 38969313d6afd54e9f3222aeb02a8c5fe3ef1368123330e747c57352135120f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Tue, 13 Oct 2015 16:39:07 +0000 Subject: [PATCH] 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 --- SLOF_ppc64le.patch | 48 ++++++++++++++++++++++++++++++++++++++++++ qemu-testsuite.changes | 10 ++++++++- qemu-testsuite.spec | 40 +++++++++++++++++++++++++++++------ qemu.changes | 10 ++++++++- qemu.spec | 40 +++++++++++++++++++++++++++++------ qemu.spec.in | 40 +++++++++++++++++++++++++++++------ 6 files changed, 168 insertions(+), 20 deletions(-) create mode 100644 SLOF_ppc64le.patch diff --git a/SLOF_ppc64le.patch b/SLOF_ppc64le.patch new file mode 100644 index 0000000..46464b1 --- /dev/null +++ b/SLOF_ppc64le.patch @@ -0,0 +1,48 @@ +From 14f14004dd8f7a9be63510284c10445c7a8be5d7 Mon Sep 17 00:00:00 2001 +From: Dinar Valeev +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 +Signed-off-by: Alexey Kardashevskiy +--- + 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 + diff --git a/qemu-testsuite.changes b/qemu-testsuite.changes index b2e8122..41516d5 100644 --- a/qemu-testsuite.changes +++ b/qemu-testsuite.changes @@ -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 diff --git a/qemu-testsuite.spec b/qemu-testsuite.spec index b724bc1..7e321da 100644 --- a/qemu-testsuite.spec +++ b/qemu-testsuite.spec @@ -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" diff --git a/qemu.changes b/qemu.changes index b2e8122..41516d5 100644 --- a/qemu.changes +++ b/qemu.changes @@ -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 diff --git a/qemu.spec b/qemu.spec index 1a7f528..6f330b3 100644 --- a/qemu.spec +++ b/qemu.spec @@ -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" diff --git a/qemu.spec.in b/qemu.spec.in index ac1d3b8..884b4b9 100644 --- a/qemu.spec.in +++ b/qemu.spec.in @@ -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"