diff --git a/qemu-testsuite.changes b/qemu-testsuite.changes index 7b085a0e..a7ace4ca 100644 --- a/qemu-testsuite.changes +++ b/qemu-testsuite.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Mon Oct 16 14:50:03 UTC 2017 - brogers@suse.com + +- Don't tie glusterfs support to specific arch +- Build skiboot firmware (OPAL), particularly since it's fairly + easy to do so + +------------------------------------------------------------------- +Fri Oct 13 10:57:49 UTC 2017 - henrik.kuhn@origenis.de + +- Added the global macro 'with_glusterfs' in order to re-enable + glusterfs support. The macro enable easier future adjustments + for various ARCH/targets/requiremnets. + At first glusterfs support is enabled for openSUSE Leap 42.x and + Factory for ARCH x86_64. + ------------------------------------------------------------------- Wed Oct 4 16:21:04 UTC 2017 - brogers@suse.com diff --git a/qemu-testsuite.spec b/qemu-testsuite.spec index b90f1c85..b688a411 100644 --- a/qemu-testsuite.spec +++ b/qemu-testsuite.spec @@ -19,6 +19,7 @@ %define noarch_supported 1110 %define build_x86_firmware_from_source 0 +%define build_skiboot_from_source 0 %define build_slof_from_source 0 %define kvm_available 0 %define legacy_qemu_kvm 0 @@ -38,11 +39,13 @@ %endif %ifarch ppc64 +%define build_skiboot_from_source 1 %define build_slof_from_source 1 %endif %ifarch ppc64le %if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315 +%define build_skiboot_from_source 1 %define build_slof_from_source 1 %endif %endif @@ -59,6 +62,10 @@ %define with_systemd 1 %endif +%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?is_opensuse} ) +%define with_glusterfs 1 +%endif + %ifarch x86_64 %if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && ( 0%{?is_opensuse} == 0 || 0%{?sle_version} > 120100 ) ) %define with_rbd 1 @@ -193,6 +200,10 @@ Patch1200: sgabios-stable-buildid.patch # SLOF (Currently no patches) +# skiboot +Patch1400: skiboot-GCC7-fixes-for-Wimplicit-fallthr.patch +Patch1401: skiboot-libc-stdio-vsnprintf.c-add-expli.patch + # this is to make lint happy Source300: qemu-rpmlintrc Source301: ipxe-stub-out-the-SAN-req-s-in-int13.patch @@ -227,7 +238,7 @@ BuildRequires: gcc6 %endif %endif BuildRequires: glib2-devel -%if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315 +%if 0%{?with_glusterfs} BuildRequires: glusterfs-devel %endif %if 0%{?suse_version} >= 1220 @@ -367,7 +378,7 @@ BuildRequires: qemu-ppc = %version BuildRequires: qemu-s390 = %version BuildRequires: qemu-tools = %version BuildRequires: qemu-x86 = %version -%if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315 +%if 0%{?with_glusterfs} BuildRequires: qemu-block-gluster = %version %endif %if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 ) @@ -413,7 +424,7 @@ Recommends: qemu-arm Suggests: qemu-arm %endif Suggests: qemu-block-dmg -%if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315 +%if 0%{?with_glusterfs} Suggests: qemu-block-gluster %endif %if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 ) @@ -431,10 +442,17 @@ Suggests: qemu-lang Recommends: qemu-ksm = %{version} %endif -%if %{build_slof_from_source} %define ppc_default_built_firmware {%nil} +%if %{build_skiboot_from_source} && %{build_slof_from_source} +%define ppc_extra_built_firmware {skiboot.lid slof.bin} +%else +%if %{build_skiboot_from_source} +%define ppc_extra_built_firmware {skiboot.lid} +%endif +%if %{build_slof_from_source} %define ppc_extra_built_firmware {slof.bin} %endif +%endif %ifarch ppc64 %define ppc64_only_default_built_firmware {spapr-rtas.bin} @@ -647,7 +665,7 @@ as PC and PowerMac systems. This sub-package contains a module for accessing Mac OS X image files from qemu-img tool and QEMU system emulation. -%if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315 +%if 0%{?with_glusterfs} %package block-gluster Summary: Universal CPU emulator -- GlusterFS block support Group: System/Emulators/PC @@ -884,6 +902,11 @@ popd pushd roms/SLOF popd +pushd roms/skiboot +%patch1400 -p1 +%patch1401 -p1 +popd + # as a safeguard, delete the firmware files that we intend to build for i in %built_firmware do @@ -927,7 +950,7 @@ echo '%{version}' > roms/seabios/.version --enable-gcrypt \ --disable-nettle \ %endif -%if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315 +%if 0%{?with_glusterfs} --enable-glusterfs \ %else --disable-glusterfs \ @@ -1132,6 +1155,10 @@ for i in %supported_nics_small done %endif +%if %{build_skiboot_from_source} +make %{?_smp_mflags} -C roms skiboot SKIBOOT_VERSION=skiboot-5.3.7 +%endif + %if %{build_slof_from_source} make %{?_smp_mflags} -C roms slof %endif @@ -1509,7 +1536,7 @@ fi %dir %_libdir/%name %_libdir/%name/block-dmg-bz2.so -%if 0%{?suse_version} >= 1310 && 0%{?suse_version} != 1315 +%if 0%{?with_glusterfs} %files block-gluster %defattr(-, root, root) %dir %_libdir/%name diff --git a/qemu.changes b/qemu.changes index d5fb14ae..a7ace4ca 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Oct 16 14:50:03 UTC 2017 - brogers@suse.com + +- Don't tie glusterfs support to specific arch +- Build skiboot firmware (OPAL), particularly since it's fairly + easy to do so + ------------------------------------------------------------------- Fri Oct 13 10:57:49 UTC 2017 - henrik.kuhn@origenis.de diff --git a/qemu.spec b/qemu.spec index 3773af06..f24ece52 100644 --- a/qemu.spec +++ b/qemu.spec @@ -19,6 +19,7 @@ %define noarch_supported 1110 %define build_x86_firmware_from_source 0 +%define build_skiboot_from_source 0 %define build_slof_from_source 0 %define kvm_available 0 %define legacy_qemu_kvm 0 @@ -38,11 +39,13 @@ %endif %ifarch ppc64 +%define build_skiboot_from_source 1 %define build_slof_from_source 1 %endif %ifarch ppc64le %if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315 +%define build_skiboot_from_source 1 %define build_slof_from_source 1 %endif %endif @@ -59,13 +62,14 @@ %define with_systemd 1 %endif +%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?is_opensuse} ) +%define with_glusterfs 1 +%endif + %ifarch x86_64 %if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && ( 0%{?is_opensuse} == 0 || 0%{?sle_version} > 120100 ) ) %define with_rbd 1 %endif -%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?is_opensuse} ) -%define with_glusterfs 1 -%endif %endif %ifarch aarch64 @@ -196,6 +200,10 @@ Patch1200: sgabios-stable-buildid.patch # SLOF (Currently no patches) +# skiboot (OPAL) +Patch1400: skiboot-GCC7-fixes-for-Wimplicit-fallthr.patch +Patch1401: skiboot-libc-stdio-vsnprintf.c-add-expli.patch + # this is to make lint happy Source300: qemu-rpmlintrc Source301: ipxe-stub-out-the-SAN-req-s-in-int13.patch @@ -434,10 +442,17 @@ Suggests: qemu-lang Recommends: qemu-ksm = %{version} %endif -%if %{build_slof_from_source} %define ppc_default_built_firmware {%nil} +%if %{build_skiboot_from_source} && %{build_slof_from_source} +%define ppc_extra_built_firmware {skiboot.lid slof.bin} +%else +%if %{build_skiboot_from_source} +%define ppc_extra_built_firmware {skiboot.lid} +%endif +%if %{build_slof_from_source} %define ppc_extra_built_firmware {slof.bin} %endif +%endif %ifarch ppc64 %define ppc64_only_default_built_firmware {spapr-rtas.bin} @@ -887,6 +902,11 @@ popd pushd roms/SLOF popd +pushd roms/skiboot +%patch1400 -p1 +%patch1401 -p1 +popd + # as a safeguard, delete the firmware files that we intend to build for i in %built_firmware do @@ -1135,6 +1155,10 @@ for i in %supported_nics_small done %endif +%if %{build_skiboot_from_source} +make %{?_smp_mflags} -C roms skiboot SKIBOOT_VERSION=skiboot-5.3.7 +%endif + %if %{build_slof_from_source} make %{?_smp_mflags} -C roms slof %endif diff --git a/qemu.spec.in b/qemu.spec.in index 5cc97bba..3ab2eab4 100644 --- a/qemu.spec.in +++ b/qemu.spec.in @@ -19,6 +19,7 @@ %define noarch_supported 1110 %define build_x86_firmware_from_source 0 +%define build_skiboot_from_source 0 %define build_slof_from_source 0 %define kvm_available 0 %define legacy_qemu_kvm 0 @@ -38,11 +39,13 @@ %endif %ifarch ppc64 +%define build_skiboot_from_source 1 %define build_slof_from_source 1 %endif %ifarch ppc64le %if 0%{?suse_version} > 1320 || 0%{?suse_version} == 1315 +%define build_skiboot_from_source 1 %define build_slof_from_source 1 %endif %endif @@ -59,13 +62,14 @@ %define with_systemd 1 %endif +%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?is_opensuse} ) +%define with_glusterfs 1 +%endif + %ifarch x86_64 %if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && ( 0%{?is_opensuse} == 0 || 0%{?sle_version} > 120100 ) ) %define with_rbd 1 %endif -%if 0%{?suse_version} > 1320 || ( 0%{?suse_version} == 1315 && 0%{?is_opensuse} ) -%define with_glusterfs 1 -%endif %endif %ifarch aarch64 @@ -158,6 +162,10 @@ Patch1200: sgabios-stable-buildid.patch # SLOF (Currently no patches) +# skiboot +Patch1400: skiboot-GCC7-fixes-for-Wimplicit-fallthr.patch +Patch1401: skiboot-libc-stdio-vsnprintf.c-add-expli.patch + # this is to make lint happy Source300: qemu-rpmlintrc Source301: ipxe-stub-out-the-SAN-req-s-in-int13.patch @@ -396,10 +404,17 @@ Suggests: qemu-lang Recommends: qemu-ksm = %{version} %endif -%if %{build_slof_from_source} %define ppc_default_built_firmware {%nil} +%if %{build_skiboot_from_source} && %{build_slof_from_source} +%define ppc_extra_built_firmware {skiboot.lid slof.bin} +%else +%if %{build_skiboot_from_source} +%define ppc_extra_built_firmware {skiboot.lid} +%endif +%if %{build_slof_from_source} %define ppc_extra_built_firmware {slof.bin} %endif +%endif %ifarch ppc64 %define ppc64_only_default_built_firmware {spapr-rtas.bin} @@ -811,6 +826,11 @@ popd pushd roms/SLOF popd +pushd roms/skiboot +%patch1400 -p1 +%patch1401 -p1 +popd + # as a safeguard, delete the firmware files that we intend to build for i in %built_firmware do @@ -1059,6 +1079,10 @@ for i in %supported_nics_small done %endif +%if %{build_skiboot_from_source} +make %{?_smp_mflags} -C roms skiboot SKIBOOT_VERSION=skiboot-5.3.7 +%endif + %if %{build_slof_from_source} make %{?_smp_mflags} -C roms slof %endif diff --git a/skiboot-GCC7-fixes-for-Wimplicit-fallthr.patch b/skiboot-GCC7-fixes-for-Wimplicit-fallthr.patch new file mode 100644 index 00000000..a533cf2d --- /dev/null +++ b/skiboot-GCC7-fixes-for-Wimplicit-fallthr.patch @@ -0,0 +1,64 @@ +From d2c3aad5b260f52dbc87dc93e81733daad154051 Mon Sep 17 00:00:00 2001 +From: Stewart Smith +Date: Wed, 10 May 2017 19:33:52 +1000 +Subject: [PATCH] GCC7: fixes for -Wimplicit-fallthrough expected regexes + +It turns out GCC7 adds a useful warning and does fancy things like +parsing your comments to work out that you intended to do the fallthrough. +There's a few places where we don't match the regex. Fix them, as it's +harmless to do so. + +Found by building on Fedora Rawhide in Travis. + +Signed-off-by: Stewart Smith +Signed-off-by: Bruce Rogers +--- + core/pcie-slot.c | 3 ++- + hw/fsp/fsp-sysparam.c | 2 +- + platforms/ibm-fsp/firenze-pci.c | 3 ++- + 3 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/core/pcie-slot.c b/core/pcie-slot.c +index 62933a40..80972a6f 100644 +--- a/core/pcie-slot.c ++++ b/core/pcie-slot.c +@@ -383,7 +383,8 @@ static int64_t pcie_slot_sm_freset(struct pci_slot *slot) + PCI_SLOT_STATE_FRESET_POWER_OFF); + return pci_slot_set_sm_timeout(slot, msecs_to_tb(50)); + } +- /* No power state change, fall through */ ++ /* No power state change, */ ++ /* fallthrough */ + case PCI_SLOT_STATE_FRESET_POWER_OFF: + PCIE_SLOT_DBG(slot, "FRESET: Power is off, turn on\n"); + if (slot->ops.set_power_state) +diff --git a/hw/fsp/fsp-sysparam.c b/hw/fsp/fsp-sysparam.c +index 2dbf05c6..5d7ae91e 100644 +--- a/hw/fsp/fsp-sysparam.c ++++ b/hw/fsp/fsp-sysparam.c +@@ -100,7 +100,7 @@ static int fsp_sysparam_process(struct sysparam_req *r) + case 0x00: /* XXX Is that even possible ? */ + case 0x11: /* Data in request */ + memcpy(r->ubuf, &r->resp.data.words[2], len); +- /* pass through */ ++ /* fallthrough */ + case 0x12: /* Data in TCE */ + stlen = len; + break; +diff --git a/platforms/ibm-fsp/firenze-pci.c b/platforms/ibm-fsp/firenze-pci.c +index fd15e88a..66f6efa9 100644 +--- a/platforms/ibm-fsp/firenze-pci.c ++++ b/platforms/ibm-fsp/firenze-pci.c +@@ -507,7 +507,8 @@ static int64_t firenze_pci_slot_freset(struct pci_slot *slot) + msecs_to_tb(FIRENZE_PCI_SLOT_DELAY)); + } + +- /* Fall through: Power is off, turn it on */ ++ /* Power is off, turn it on */ ++ /* Fallthrough */ + case FIRENZE_PCI_SLOT_FRESET_POWER_OFF: + /* Update last power status */ + pval = (uint8_t *)(plat_slot->req->rw_buf); +-- +2.14.1 + diff --git a/skiboot-libc-stdio-vsnprintf.c-add-expli.patch b/skiboot-libc-stdio-vsnprintf.c-add-expli.patch new file mode 100644 index 00000000..92f1907c --- /dev/null +++ b/skiboot-libc-stdio-vsnprintf.c-add-expli.patch @@ -0,0 +1,28 @@ +From bfb0e54f493d4003a397d5c1b50fc77195e7ffb5 Mon Sep 17 00:00:00 2001 +From: Stewart Smith +Date: Thu, 2 Feb 2017 16:35:40 +1100 +Subject: [PATCH] libc/stdio/vsnprintf.c: add explicit fallthrough + +silences recent GCC warning + +Signed-off-by: Stewart Smith +Signed-off-by: Bruce Rogers +--- + libc/stdio/vsnprintf.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libc/stdio/vsnprintf.c b/libc/stdio/vsnprintf.c +index fbb84a0b..e83cee84 100644 +--- a/libc/stdio/vsnprintf.c ++++ b/libc/stdio/vsnprintf.c +@@ -164,6 +164,7 @@ print_format(char **buffer, size_t bufsize, const char *format, void *var) + break; + case 'X': + upper = true; ++ /* fallthrough */ + case 'x': + sizec[i] = '\0'; + value = (unsigned long) var & convert[length_mod]; +-- +2.14.1 +