From 55df455ae7102e301e596b374ca9c87f58aeec71 Mon Sep 17 00:00:00 2001 From: Johnny Hughes Date: Nov 15 2019 00:34:44 +0000 Subject: build on armhfp --- diff --git a/SPECS/qemu-kvm.spec b/SPECS/qemu-kvm.spec index 0fc26de..e38901f 100644 --- a/SPECS/qemu-kvm.spec +++ b/SPECS/qemu-kvm.spec @@ -13,7 +13,7 @@ %global have_usbredir 0 %endif -%ifnarch s390x +%ifnarch s390x %{arm} %global have_librdma 1 %else %global have_librdma 0 @@ -47,6 +47,10 @@ %global kvm_target aarch64 %global have_fdt 1 %endif +%ifarch %{arm} + %global kvm_target arm + %global have_fdt 1 +%endif #Versions of various parts: @@ -73,7 +77,7 @@ Epoch: 15 License: GPLv2 and GPLv2+ and CC-BY Group: Development/Tools URL: http://www.qemu.org/ -ExclusiveArch: x86_64 %{power64} aarch64 s390x +ExclusiveArch: x86_64 %{power64} aarch64 s390x %{arm} Source0: http://wiki.qemu.org/download/qemu-2.12.0.tar.xz @@ -104,6 +108,7 @@ Source35: udev-kvm-check.c Source36: README.tests +Source9999: kvm-arm-fixes.patch Patch0001: 0001-Initial-redhat-build.patch Patch0002: 0002-Enable-disable-devices-for-RHEL-7.patch @@ -1754,7 +1759,7 @@ BuildRequires: cpp # For compressed guest memory dumps BuildRequires: lzo-devel snappy-devel # For NUMA memory binding -%ifnarch s390x +%ifnarch s390x %{arm} BuildRequires: numactl-devel %endif BuildRequires: libgcrypt-devel @@ -1813,7 +1818,7 @@ Requires: edk2-ovmf Requires: edk2-aarch64 %endif -%ifnarch aarch64 s390x +%ifnarch aarch64 s390x %{arm} Requires: seavgabios-bin >= 1.10.2-1 Requires: ipxe-roms-qemu >= 20170123-1 %endif @@ -1962,6 +1967,10 @@ the Secure Shell (SSH) protocol. %setup -q -n qemu-%{version} %autopatch -p1 +%ifarch %{arm} +patch -p1 < %{SOURCE9999} +%endif + %build %global buildarch %{kvm_target}-softmmu @@ -1998,7 +2007,7 @@ buildldflags="VL_LDFLAGS=-Wl,--build-id" --disable-glusterfs \ %endif --enable-guest-agent \ -%ifnarch s390x +%ifnarch s390x %{arm} --enable-numa \ %else --disable-numa \ @@ -2331,7 +2340,7 @@ pxe_link() { ln -s ../ipxe.efi/$2.rom %{buildroot}%{_datadir}/%{name}/efi-$1.rom } -%ifnarch aarch64 s390x +%ifnarch aarch64 s390x %{arm} pxe_link e1000 8086100e pxe_link ne2k_pci 10ec8029 pxe_link pcnet 10222000 @@ -2344,7 +2353,7 @@ rom_link() { ln -s $1 %{buildroot}%{_datadir}/%{name}/$2 } -%ifnarch aarch64 s390x +%ifnarch aarch64 s390x %{arm} rom_link ../seavgabios/vgabios-isavga.bin vgabios.bin rom_link ../seavgabios/vgabios-cirrus.bin vgabios-cirrus.bin rom_link ../seavgabios/vgabios-qxl.bin vgabios-qxl.bin @@ -2382,7 +2391,9 @@ find $RPM_BUILD_ROOT -name '*.la' -or -name '*.a' | xargs rm -f chmod +x $RPM_BUILD_ROOT%{_libdir}/qemu-kvm/block-*.so %check +%ifnarch %{arm} export DIFF=diff; make check V=1 +%endif %post -n qemu-kvm-core # load kvm modules now, so we can make sure no reboot is needed. @@ -2494,7 +2505,7 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %{_datadir}/%{name}/s390-ccw.img %{_datadir}/%{name}/s390-netboot.img %endif -%ifnarch aarch64 s390x +%ifnarch aarch64 s390x %{arm} %{_datadir}/%{name}/vgabios.bin %{_datadir}/%{name}/vgabios-cirrus.bin %{_datadir}/%{name}/vgabios-qxl.bin