Allow builds with intree firmware

This commit is contained in:
Lubomir Rintel 2012-11-14 20:59:48 +01:00
parent 26c36f3aed
commit 10c2f33ae7

View File

@ -19,6 +19,18 @@
# Install systemd unit files instead of sysvinit scripts. # Install systemd unit files instead of sysvinit scripts.
# #
# Enabled by default. # Enabled by default.
#
# = intree_roms =
# Install non-pc (openbios and slof) firmware from QEMU tree instead of using
# separately packaged images.
#
# Disabled by default.
#
# = intree_pc_roms =
# Install pc firmware (vgabios, bios, boot roms, etc.) from QEMU tree instead
# of using separately packaged images.
#
# Disabled by default.
%if 0%{?rhel} %if 0%{?rhel}
# RHEL-specific defaults: # RHEL-specific defaults:
@ -28,6 +40,8 @@
%bcond_without spice # enabled %bcond_without spice # enabled
%bcond_without seccomp # enabled %bcond_without seccomp # enabled
%bcond_without systemd # enabled %bcond_without systemd # enabled
%bcond_with intree_roms # disabled
%bcond_with intree_pc_roms # disabled
%else %else
# General defaults: # General defaults:
%bcond_with kvmonly # disabled %bcond_with kvmonly # disabled
@ -36,6 +50,8 @@
%bcond_without spice # enabled %bcond_without spice # enabled
%bcond_without seccomp # enabled %bcond_without seccomp # enabled
%bcond_without systemd # enabled %bcond_without systemd # enabled
%bcond_with intree_roms # disabled
%bcond_with intree_pc_roms # disabled
%endif %endif
%global SLOF_gittagdate 20120731 %global SLOF_gittagdate 20120731
@ -730,10 +746,12 @@ Group: Development/Tools
Requires: %{name}-common = %{epoch}:%{version}-%{release} Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: kvm = 85 Provides: kvm = 85
Obsoletes: kvm < 85 Obsoletes: kvm < 85
%if %{without intree_pc_roms}
Requires: vgabios >= 0.6c-2 Requires: vgabios >= 0.6c-2
Requires: seabios-bin >= 0.6.0-2 Requires: seabios-bin >= 0.6.0-2
Requires: sgabios-bin Requires: sgabios-bin
Requires: ipxe-roms-qemu Requires: ipxe-roms-qemu
%endif
%if 0%{?have_seccomp:1} %if 0%{?have_seccomp:1}
Requires: libseccomp >= 1.0.0 Requires: libseccomp >= 1.0.0
%endif %endif
@ -872,7 +890,9 @@ This package provides the system emulator for SH4 boards.
Summary: QEMU system emulator for SPARC Summary: QEMU system emulator for SPARC
Group: Development/Tools Group: Development/Tools
Requires: %{name}-common = %{epoch}:%{version}-%{release} Requires: %{name}-common = %{epoch}:%{version}-%{release}
%if %{without intree_roms}
Requires: openbios Requires: openbios
%endif
%description %{system_sparc} %description %{system_sparc}
QEMU is a generic and open source processor emulator which achieves a good QEMU is a generic and open source processor emulator which achieves a good
emulation speed by using dynamic translation. emulation speed by using dynamic translation.
@ -885,8 +905,10 @@ This package provides the system emulator for SPARC and SPARC64 systems.
Summary: QEMU system emulator for PPC Summary: QEMU system emulator for PPC
Group: Development/Tools Group: Development/Tools
Requires: %{name}-common = %{epoch}:%{version}-%{release} Requires: %{name}-common = %{epoch}:%{version}-%{release}
%if %{without intree_roms}
Requires: openbios Requires: openbios
Requires: SLOF = 0.1.git%{SLOF_gittagdate} Requires: SLOF = 0.1.git%{SLOF_gittagdate}
%endif
%description %{system_ppc} %description %{system_ppc}
QEMU is a generic and open source processor emulator which achieves a good QEMU is a generic and open source processor emulator which achieves a good
emulation speed by using dynamic translation. emulation speed by using dynamic translation.
@ -1409,12 +1431,14 @@ install -D -p -m 0644 -t ${RPM_BUILD_ROOT}%{qemudocdir} Changelog README TODO CO
install -D -p -m 0644 qemu.sasl $RPM_BUILD_ROOT%{_sysconfdir}/sasl2/qemu.conf install -D -p -m 0644 qemu.sasl $RPM_BUILD_ROOT%{_sysconfdir}/sasl2/qemu.conf
%if %{without intree_roms}
# Provided by package openbios # Provided by package openbios
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/openbios-ppc rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/openbios-ppc
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/openbios-sparc32 rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/openbios-sparc32
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/openbios-sparc64 rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/openbios-sparc64
# Provided by package SLOF # Provided by package SLOF
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/slof.bin rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/slof.bin
%endif
# Remove possibly unpackaged files. Unlike others that are removed # Remove possibly unpackaged files. Unlike others that are removed
# unconditionally, these firmware files are still distributed as a binary # unconditionally, these firmware files are still distributed as a binary
@ -1436,6 +1460,7 @@ rm -f ${RPM_BUILD_ROOT}%{_datadir}/%{name}/spapr-rtas.bin
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/s390-zipl.rom rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/s390-zipl.rom
%endif %endif
%if %{without intree_pc_roms}
# Provided by package ipxe # Provided by package ipxe
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/pxe*rom rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}/pxe*rom
# Provided by package vgabios # Provided by package vgabios
@ -1454,6 +1479,7 @@ pxe_link() {
} }
pxe_link e1000 8086100e pxe_link e1000 8086100e
pxe_link eepro100 80861209
pxe_link ne2k_pci 10ec8029 pxe_link ne2k_pci 10ec8029
pxe_link pcnet 10222000 pxe_link pcnet 10222000
pxe_link rtl8139 10ec8139 pxe_link rtl8139 10ec8139
@ -1471,6 +1497,7 @@ rom_link ../vgabios/VGABIOS-lgpl-latest.vmware.bin vgabios-vmware.bin
rom_link ../seabios/bios.bin bios.bin rom_link ../seabios/bios.bin bios.bin
rom_link ../sgabios/sgabios.bin sgabios.bin rom_link ../sgabios/sgabios.bin sgabios.bin
%endif %endif
%endif
%if %{with systemd} %if %{with systemd}
%if 0%{?user:1} %if 0%{?user:1}
@ -1758,6 +1785,7 @@ fi
%{_datadir}/%{name}/pxe-pcnet.rom %{_datadir}/%{name}/pxe-pcnet.rom
%{_datadir}/%{name}/pxe-rtl8139.rom %{_datadir}/%{name}/pxe-rtl8139.rom
%{_datadir}/%{name}/pxe-ne2k_pci.rom %{_datadir}/%{name}/pxe-ne2k_pci.rom
%{_datadir}/%{name}/pxe-eepro100.rom
%{_datadir}/%{name}/cpus-x86_64.conf %{_datadir}/%{name}/cpus-x86_64.conf
%{_datadir}/%{name}/qemu-icon.bmp %{_datadir}/%{name}/qemu-icon.bmp
%config(noreplace) %{_sysconfdir}/qemu/target-x86_64.conf %config(noreplace) %{_sysconfdir}/qemu/target-x86_64.conf
@ -1867,6 +1895,10 @@ fi
%{_bindir}/qemu-system-sparc64 %{_bindir}/qemu-system-sparc64
%{_datadir}/systemtap/tapset/qemu-system-sparc.stp %{_datadir}/systemtap/tapset/qemu-system-sparc.stp
%{_datadir}/systemtap/tapset/qemu-system-sparc64.stp %{_datadir}/systemtap/tapset/qemu-system-sparc64.stp
%if %{with intree_roms}
%{_datadir}/%{name}/openbios-sparc32
%{_datadir}/%{name}/openbios-sparc64
%endif
%endif %endif
%if 0%{?system_ppc:1} %if 0%{?system_ppc:1}
@ -1879,6 +1911,10 @@ fi
%{_datadir}/systemtap/tapset/qemu-system-ppc.stp %{_datadir}/systemtap/tapset/qemu-system-ppc.stp
%{_datadir}/systemtap/tapset/qemu-system-ppc64.stp %{_datadir}/systemtap/tapset/qemu-system-ppc64.stp
%{_datadir}/systemtap/tapset/qemu-system-ppcemb.stp %{_datadir}/systemtap/tapset/qemu-system-ppcemb.stp
%if %{with intree_roms}
%{_datadir}/%{name}/openbios-ppc
%{_datadir}/%{name}/slof.bin
%endif
%endif %endif
%{_datadir}/%{name}/bamboo.dtb %{_datadir}/%{name}/bamboo.dtb
%{_datadir}/%{name}/ppc_rom.bin %{_datadir}/%{name}/ppc_rom.bin