Enable riscv64 as host (incl. WIP riscv backend patch)
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
This commit is contained in:
parent
97eed6b145
commit
2e42dab32b
2182
qemu-2.12.0-riscv64-backend.patch
Normal file
2182
qemu-2.12.0-riscv64-backend.patch
Normal file
File diff suppressed because it is too large
Load Diff
30
qemu.spec
30
qemu.spec
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
# Matches numactl ExcludeArch
|
# Matches numactl ExcludeArch
|
||||||
%global have_numactl 1
|
%global have_numactl 1
|
||||||
%ifarch s390 %{arm}
|
%ifarch s390 %{arm} riscv64
|
||||||
%global have_numactl 0
|
%global have_numactl 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ Requires: %{name}-ui-sdl = %{epoch}:%{version}-%{release}
|
|||||||
Summary: QEMU is a FAST! processor emulator
|
Summary: QEMU is a FAST! processor emulator
|
||||||
Name: qemu
|
Name: qemu
|
||||||
Version: 2.12.0
|
Version: 2.12.0
|
||||||
Release: 1%{?rcrel}%{?dist}
|
Release: 1%{?rcrel}.0.riscv64%{?dist}
|
||||||
Epoch: 2
|
Epoch: 2
|
||||||
License: GPLv2 and BSD and MIT and CC-BY
|
License: GPLv2 and BSD and MIT and CC-BY
|
||||||
URL: http://www.qemu.org/
|
URL: http://www.qemu.org/
|
||||||
@ -137,13 +137,20 @@ Source21: 50-kvm-s390x.conf
|
|||||||
# /etc/security/limits.d/95-kvm-ppc64-memlock.conf
|
# /etc/security/limits.d/95-kvm-ppc64-memlock.conf
|
||||||
Source22: 95-kvm-ppc64-memlock.conf
|
Source22: 95-kvm-ppc64-memlock.conf
|
||||||
|
|
||||||
|
# riscv backend
|
||||||
|
# Source: https://github.com/riscv/riscv-qemu/commit/0805ad337785f0cce29ecf162bad9e1c477051f3.patch
|
||||||
|
# Development: https://github.com/riscv/riscv-qemu/commits/wip-riscv-tcg-backend
|
||||||
|
Patch0: qemu-2.12.0-riscv64-backend.patch
|
||||||
|
|
||||||
# documentation deps
|
# documentation deps
|
||||||
BuildRequires: texinfo
|
BuildRequires: texinfo
|
||||||
# For /usr/bin/pod2man
|
# For /usr/bin/pod2man
|
||||||
BuildRequires: perl-podlators
|
BuildRequires: perl-podlators
|
||||||
# For sanity test
|
# For sanity test
|
||||||
BuildRequires: qemu-sanity-check-nodeps
|
BuildRequires: qemu-sanity-check-nodeps
|
||||||
|
%ifnarch riscv64
|
||||||
BuildRequires: kernel
|
BuildRequires: kernel
|
||||||
|
%endif
|
||||||
%if %{have_iasl}
|
%if %{have_iasl}
|
||||||
# For acpi compilation
|
# For acpi compilation
|
||||||
BuildRequires: iasl
|
BuildRequires: iasl
|
||||||
@ -191,15 +198,19 @@ BuildRequires: spice-protocol >= 0.12.2
|
|||||||
BuildRequires: spice-server-devel >= 0.12.0
|
BuildRequires: spice-server-devel >= 0.12.0
|
||||||
%endif
|
%endif
|
||||||
# seccomp containment support
|
# seccomp containment support
|
||||||
|
%ifnarch riscv64
|
||||||
BuildRequires: libseccomp-devel >= 2.3.0
|
BuildRequires: libseccomp-devel >= 2.3.0
|
||||||
|
%endif
|
||||||
# For network block driver
|
# For network block driver
|
||||||
BuildRequires: libcurl-devel
|
BuildRequires: libcurl-devel
|
||||||
# For rbd block driver
|
# For rbd block driver
|
||||||
BuildRequires: librados2-devel
|
BuildRequires: librados2-devel
|
||||||
BuildRequires: librbd1-devel
|
BuildRequires: librbd1-devel
|
||||||
# We need both because the 'stap' binary is probed for by configure
|
# We need both because the 'stap' binary is probed for by configure
|
||||||
|
%ifnarch riscv64
|
||||||
BuildRequires: systemtap
|
BuildRequires: systemtap
|
||||||
BuildRequires: systemtap-sdt-devel
|
BuildRequires: systemtap-sdt-devel
|
||||||
|
%endif
|
||||||
# For VNC JPEG support
|
# For VNC JPEG support
|
||||||
BuildRequires: libjpeg-devel
|
BuildRequires: libjpeg-devel
|
||||||
# For VNC PNG support
|
# For VNC PNG support
|
||||||
@ -247,7 +258,9 @@ BuildRequires: virglrenderer-devel
|
|||||||
# qemu 2.6: Needed for gtk GL support
|
# qemu 2.6: Needed for gtk GL support
|
||||||
BuildRequires: mesa-libgbm-devel
|
BuildRequires: mesa-libgbm-devel
|
||||||
# qemu 2.11: preferred disassembler for TCG
|
# qemu 2.11: preferred disassembler for TCG
|
||||||
|
%ifnarch riscv64
|
||||||
BuildRequires: capstone-devel
|
BuildRequires: capstone-devel
|
||||||
|
%endif
|
||||||
# qemu 2.12: parallels disk images require libxml2 now
|
# qemu 2.12: parallels disk images require libxml2 now
|
||||||
BuildRequires: libxml2-devel
|
BuildRequires: libxml2-devel
|
||||||
# python scripts in the build process
|
# python scripts in the build process
|
||||||
@ -839,7 +852,7 @@ This package provides the QEMU system emulator for Xtensa boards.
|
|||||||
%build
|
%build
|
||||||
|
|
||||||
# drop -g flag to prevent memory exhaustion by linker
|
# drop -g flag to prevent memory exhaustion by linker
|
||||||
%ifarch s390
|
%ifarch s390 riscv64
|
||||||
%global optflags %(echo %{optflags} | sed 's/-g//')
|
%global optflags %(echo %{optflags} | sed 's/-g//')
|
||||||
sed -i.debug 's/"-g $CFLAGS"/"$CFLAGS"/g' configure
|
sed -i.debug 's/"-g $CFLAGS"/"$CFLAGS"/g' configure
|
||||||
%endif
|
%endif
|
||||||
@ -875,12 +888,20 @@ run_configure() {
|
|||||||
--with-pkgversion=%{name}-%{version}-%{release} \
|
--with-pkgversion=%{name}-%{version}-%{release} \
|
||||||
--disable-strip \
|
--disable-strip \
|
||||||
--disable-werror \
|
--disable-werror \
|
||||||
|
%ifnarch riscv64
|
||||||
--enable-kvm \
|
--enable-kvm \
|
||||||
|
%endif
|
||||||
--python=/usr/bin/python3 \
|
--python=/usr/bin/python3 \
|
||||||
%ifarch s390 %{mips64}
|
%ifarch s390 %{mips64}
|
||||||
--enable-tcg-interpreter \
|
--enable-tcg-interpreter \
|
||||||
%endif
|
%endif
|
||||||
|
%ifarch riscv64
|
||||||
|
--disable-capstone \
|
||||||
|
--disable-seccomp \
|
||||||
|
%endif
|
||||||
|
%ifnarch riscv64
|
||||||
--enable-trace-backend=$tracebackends \
|
--enable-trace-backend=$tracebackends \
|
||||||
|
%endif
|
||||||
--extra-ldflags="$extraldflags -Wl,-z,relro -Wl,-z,now" \
|
--extra-ldflags="$extraldflags -Wl,-z,relro -Wl,-z,now" \
|
||||||
--extra-cflags="%{optflags}" \
|
--extra-cflags="%{optflags}" \
|
||||||
"$@" || cat config.log
|
"$@" || cat config.log
|
||||||
@ -1663,6 +1684,9 @@ getent passwd qemu >/dev/null || \
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed May 09 2018 David Abdurachmanov <david.abdurachmanov@gmail.com> - 2:2.12.0-1.0.riscv64
|
||||||
|
- Enable riscv64 as host
|
||||||
|
|
||||||
* Mon Apr 30 2018 Cole Robinson <crobinso@redhat.com> - 2:2.12.0-1
|
* Mon Apr 30 2018 Cole Robinson <crobinso@redhat.com> - 2:2.12.0-1
|
||||||
- Update to qemu-2.12.0 GA
|
- Update to qemu-2.12.0 GA
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user