!566 增加system-aarch64 system-arm system-x86_64包生成
From: @saarloos Reviewed-by: @kevinzhu1 Signed-off-by: @kevinzhu1
This commit is contained in:
commit
accd81d09e
100
acpi-modify-build_ppt-del-macro-add-arm-build_pptt.patch
Normal file
100
acpi-modify-build_ppt-del-macro-add-arm-build_pptt.patch
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
From 69564ae0e54345391ceceadb6cde9a09db01c2d9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: saarloos <9090-90-90-9090@163.com>
|
||||||
|
Date: Mon, 23 May 2022 20:59:51 +0800
|
||||||
|
Subject: [PATCH] arm/acpi: Fix when make qemu-system-aarch64 at x86_64 host
|
||||||
|
bios_tables_test fail reason: __aarch64__ macro let build_pptt at x86_64 and
|
||||||
|
aarch64 host build different function that let bios_tables_test fail.
|
||||||
|
|
||||||
|
Signed-off-by: Yangzi Zhang <zhangziyang1@huawei.com>
|
||||||
|
---
|
||||||
|
hw/acpi/aml-build.c | 5 +----
|
||||||
|
hw/arm/virt-acpi-build.c | 2 +-
|
||||||
|
include/hw/acpi/aml-build.h | 7 +++----
|
||||||
|
3 files changed, 5 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
|
||||||
|
index c4edaafa4a..39b8d807c0 100644
|
||||||
|
--- a/hw/acpi/aml-build.c
|
||||||
|
+++ b/hw/acpi/aml-build.c
|
||||||
|
@@ -2016,7 +2016,6 @@ static void build_processor_hierarchy_node(GArray *tbl, uint32_t flags,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef __aarch64__
|
||||||
|
/*
|
||||||
|
* ACPI spec, Revision 6.3
|
||||||
|
* 5.2.29.2 Cache Type Structure (Type 1)
|
||||||
|
@@ -2072,7 +2071,7 @@ static void build_cache_hierarchy_node(GArray *tbl, uint32_t next_level,
|
||||||
|
* ACPI spec, Revision 6.3
|
||||||
|
* 5.2.29 Processor Properties Topology Table (PPTT)
|
||||||
|
*/
|
||||||
|
-void build_pptt(GArray *table_data, BIOSLinker *linker, MachineState *ms,
|
||||||
|
+void build_pptt_arm(GArray *table_data, BIOSLinker *linker, MachineState *ms,
|
||||||
|
const char *oem_id, const char *oem_table_id)
|
||||||
|
{
|
||||||
|
MachineClass *mc = MACHINE_GET_CLASS(ms);
|
||||||
|
@@ -2172,7 +2171,6 @@ void build_pptt(GArray *table_data, BIOSLinker *linker, MachineState *ms,
|
||||||
|
acpi_table_end(linker, &table);
|
||||||
|
}
|
||||||
|
|
||||||
|
-#else
|
||||||
|
/*
|
||||||
|
* ACPI spec, Revision 6.3
|
||||||
|
* 5.2.29 Processor Properties Topology Table (PPTT)
|
||||||
|
@@ -2263,7 +2261,6 @@ void build_pptt(GArray *table_data, BIOSLinker *linker, MachineState *ms,
|
||||||
|
g_queue_free(list);
|
||||||
|
acpi_table_end(linker, &table);
|
||||||
|
}
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
/* build rev1/rev3/rev5.1 FADT */
|
||||||
|
void build_fadt(GArray *tbl, BIOSLinker *linker, const AcpiFadtData *f,
|
||||||
|
diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
|
||||||
|
index 1101161d70..89cecdd8e6 100644
|
||||||
|
--- a/hw/arm/virt-acpi-build.c
|
||||||
|
+++ b/hw/arm/virt-acpi-build.c
|
||||||
|
@@ -1070,7 +1070,7 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables)
|
||||||
|
|
||||||
|
if (!vmc->no_cpu_topology) {
|
||||||
|
acpi_add_table(table_offsets, tables_blob);
|
||||||
|
- build_pptt(tables_blob, tables->linker, ms,
|
||||||
|
+ build_pptt_arm(tables_blob, tables->linker, ms,
|
||||||
|
vms->oem_id, vms->oem_table_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
|
||||||
|
index 2e00d2e208..5e9b72c024 100644
|
||||||
|
--- a/include/hw/acpi/aml-build.h
|
||||||
|
+++ b/include/hw/acpi/aml-build.h
|
||||||
|
@@ -221,9 +221,7 @@ struct AcpiBuildTables {
|
||||||
|
BIOSLinker *linker;
|
||||||
|
} AcpiBuildTables;
|
||||||
|
|
||||||
|
-#ifdef __aarch64__
|
||||||
|
/* Definitions of the hardcoded cache info*/
|
||||||
|
-
|
||||||
|
typedef enum {
|
||||||
|
ARM_L1D_CACHE,
|
||||||
|
ARM_L1I_CACHE,
|
||||||
|
@@ -266,8 +264,6 @@ struct offset_status {
|
||||||
|
uint32_t l1i_offset;
|
||||||
|
};
|
||||||
|
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
typedef
|
||||||
|
struct CrsRangeEntry {
|
||||||
|
uint64_t base;
|
||||||
|
@@ -542,6 +538,9 @@ void build_slit(GArray *table_data, BIOSLinker *linker, MachineState *ms,
|
||||||
|
void build_pptt(GArray *table_data, BIOSLinker *linker, MachineState *ms,
|
||||||
|
const char *oem_id, const char *oem_table_id);
|
||||||
|
|
||||||
|
+void build_pptt_arm(GArray *table_data, BIOSLinker *linker, MachineState *ms,
|
||||||
|
+ const char *oem_id, const char *oem_table_id);
|
||||||
|
+
|
||||||
|
void build_fadt(GArray *tbl, BIOSLinker *linker, const AcpiFadtData *f,
|
||||||
|
const char *oem_id, const char *oem_table_id);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.35.1.windows.2
|
||||||
|
|
||||||
78
qemu.spec
78
qemu.spec
@ -1,6 +1,6 @@
|
|||||||
Name: qemu
|
Name: qemu
|
||||||
Version: 6.2.0
|
Version: 6.2.0
|
||||||
Release: 36
|
Release: 37
|
||||||
Epoch: 2
|
Epoch: 2
|
||||||
Summary: QEMU is a generic and open source machine emulator and virtualizer
|
Summary: QEMU is a generic and open source machine emulator and virtualizer
|
||||||
License: GPLv2 and BSD and MIT and CC-BY-SA-4.0
|
License: GPLv2 and BSD and MIT and CC-BY-SA-4.0
|
||||||
@ -247,6 +247,7 @@ Patch0233: ui-cursor-fix-integer-overflow-in-cursor_alloc-CVE-2.patch
|
|||||||
Patch0234: hw-intc-arm_gicv3-Check-for-MEMTX_OK-instead-of-MEMT.patch
|
Patch0234: hw-intc-arm_gicv3-Check-for-MEMTX_OK-instead-of-MEMT.patch
|
||||||
Patch0235: softmmu-physmem-Simplify-flatview_write-and-address_.patch
|
Patch0235: softmmu-physmem-Simplify-flatview_write-and-address_.patch
|
||||||
Patch0236: softmmu-physmem-Introduce-MemTxAttrs-memory-field-an.patch
|
Patch0236: softmmu-physmem-Introduce-MemTxAttrs-memory-field-an.patch
|
||||||
|
Patch0237: acpi-modify-build_ppt-del-macro-add-arm-build_pptt.patch
|
||||||
|
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
@ -294,10 +295,8 @@ BuildRequires: librbd-devel
|
|||||||
BuildRequires: krb5-devel
|
BuildRequires: krb5-devel
|
||||||
BuildRequires: libssh-devel
|
BuildRequires: libssh-devel
|
||||||
BuildRequires: glib2
|
BuildRequires: glib2
|
||||||
%ifarch aarch64
|
|
||||||
BuildRequires: libfdt-devel
|
BuildRequires: libfdt-devel
|
||||||
BuildRequires: virglrenderer-devel
|
BuildRequires: virglrenderer-devel
|
||||||
%endif
|
|
||||||
|
|
||||||
Requires(post): /usr/bin/getent
|
Requires(post): /usr/bin/getent
|
||||||
Requires(post): /usr/sbin/groupadd
|
Requires(post): /usr/sbin/groupadd
|
||||||
@ -377,6 +376,24 @@ Summary: QEMU seabios
|
|||||||
This package include bios-256k.bin and bios.bin of seabios
|
This package include bios-256k.bin and bios.bin of seabios
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%package system-aarch64
|
||||||
|
Summary: Qemu-system-aarch64
|
||||||
|
Requires: qemu
|
||||||
|
%description system-aarch64
|
||||||
|
This package provides the QEMU system emulator for AArch64.
|
||||||
|
|
||||||
|
%package system-arm
|
||||||
|
Summary: Qemu-system-arm
|
||||||
|
Requires: qemu
|
||||||
|
%description system-arm
|
||||||
|
This package provides the QEMU system emulator for ARM.
|
||||||
|
|
||||||
|
%package system-x86_64
|
||||||
|
Summary: Qemu-system-x86_64
|
||||||
|
Requires: qemu
|
||||||
|
%description system-x86_64
|
||||||
|
This package provides the QEMU system emulator for x86_64.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n qemu-%{version}%{?rcstr}
|
%setup -q -n qemu-%{version}%{?rcstr}
|
||||||
%autopatch -p1
|
%autopatch -p1
|
||||||
@ -384,9 +401,11 @@ This package include bios-256k.bin and bios.bin of seabios
|
|||||||
%build
|
%build
|
||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
buildarch="x86_64-softmmu"
|
buildarch="x86_64-softmmu"
|
||||||
|
targetarch="aarch64-softmmu arm-softmmu"
|
||||||
%endif
|
%endif
|
||||||
%ifarch aarch64
|
%ifarch aarch64
|
||||||
buildarch="aarch64-softmmu"
|
buildarch="aarch64-softmmu"
|
||||||
|
targetarch="x86_64-softmmu arm-softmmu"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
buildldflags="VL_LDFLAGS=-Wl,--build-id"
|
buildldflags="VL_LDFLAGS=-Wl,--build-id"
|
||||||
@ -400,7 +419,7 @@ cd ../
|
|||||||
|
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=%{_prefix} \
|
--prefix=%{_prefix} \
|
||||||
--target-list=${buildarch} \
|
--target-list="${buildarch} ${targetarch}" \
|
||||||
--extra-cflags="%{optflags} -fPIE -DPIE -fPIC -ftls-model=initial-exec" \
|
--extra-cflags="%{optflags} -fPIE -DPIE -fPIC -ftls-model=initial-exec" \
|
||||||
--extra-ldflags="-Wl,--build-id -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack" \
|
--extra-ldflags="-Wl,--build-id -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack" \
|
||||||
--datadir=%{_datadir} \
|
--datadir=%{_datadir} \
|
||||||
@ -431,10 +450,8 @@ cd ../
|
|||||||
--enable-tpm \
|
--enable-tpm \
|
||||||
--enable-modules \
|
--enable-modules \
|
||||||
--enable-libssh \
|
--enable-libssh \
|
||||||
%ifarch aarch64
|
|
||||||
--enable-fdt \
|
--enable-fdt \
|
||||||
--enable-virglrenderer \
|
--enable-virglrenderer \
|
||||||
%endif
|
|
||||||
--enable-cap-ng \
|
--enable-cap-ng \
|
||||||
--enable-libusb \
|
--enable-libusb \
|
||||||
--disable-dmg \
|
--disable-dmg \
|
||||||
@ -463,7 +480,6 @@ make %{?_smp_mflags} DESTDIR=%{buildroot} \
|
|||||||
install -m 0755 qemu-kvm %{buildroot}%{_libexecdir}/
|
install -m 0755 qemu-kvm %{buildroot}%{_libexecdir}/
|
||||||
ln -s %{_libexecdir}/qemu-kvm %{buildroot}/%{_bindir}/qemu-kvm
|
ln -s %{_libexecdir}/qemu-kvm %{buildroot}/%{_bindir}/qemu-kvm
|
||||||
|
|
||||||
rm %{buildroot}/%{_bindir}/qemu-system-*
|
|
||||||
install -D -p -m 0644 contrib/systemd/qemu-pr-helper.service %{buildroot}%{_unitdir}/qemu-pr-helper.service
|
install -D -p -m 0644 contrib/systemd/qemu-pr-helper.service %{buildroot}%{_unitdir}/qemu-pr-helper.service
|
||||||
install -D -p -m 0644 contrib/systemd/qemu-pr-helper.socket %{buildroot}%{_unitdir}/qemu-pr-helper.socket
|
install -D -p -m 0644 contrib/systemd/qemu-pr-helper.socket %{buildroot}%{_unitdir}/qemu-pr-helper.socket
|
||||||
install -D -p -m 0644 qemu.sasl %{buildroot}%{_sysconfdir}/sasl2/qemu.conf
|
install -D -p -m 0644 qemu.sasl %{buildroot}%{_sysconfdir}/sasl2/qemu.conf
|
||||||
@ -487,23 +503,9 @@ rm -rf %{buildroot}%{qemudocdir}/index.html
|
|||||||
install -D -p -m 0644 -t %{buildroot}%{qemudocdir} README.rst COPYING COPYING.LIB LICENSE
|
install -D -p -m 0644 -t %{buildroot}%{qemudocdir} README.rst COPYING COPYING.LIB LICENSE
|
||||||
chmod -x %{buildroot}%{_mandir}/man1/*
|
chmod -x %{buildroot}%{_mandir}/man1/*
|
||||||
|
|
||||||
|
|
||||||
%ifarch aarch64
|
|
||||||
rm -rf %{buildroot}%{_datadir}/%{name}/vgabios*bin
|
|
||||||
rm -rf %{buildroot}%{_datadir}/%{name}/bios*.bin
|
|
||||||
rm -rf %{buildroot}%{_datadir}/%{name}/linuxboot.bin
|
|
||||||
rm -rf %{buildroot}%{_datadir}/%{name}/kvmvapic.bin
|
|
||||||
rm -rf %{buildroot}%{_datadir}/%{name}/sgabios.bin
|
|
||||||
rm -rf %{buildroot}%{_datadir}/%{name}/multiboot.bin
|
|
||||||
rm -rf %{buildroot}%{_datadir}/%{name}/linuxboot_dma.bin
|
|
||||||
rm -rf %{buildroot}%{_datadir}/%{name}/pvh.bin
|
|
||||||
%endif
|
|
||||||
%ifarch x86_64
|
|
||||||
rm -rf %{buildroot}%{_datadir}/%{name}/vgabios-ati.bin
|
rm -rf %{buildroot}%{_datadir}/%{name}/vgabios-ati.bin
|
||||||
%endif
|
|
||||||
rm -rf %{buildroot}%{_datadir}/%{name}/bios-microvm.bin
|
rm -rf %{buildroot}%{_datadir}/%{name}/bios-microvm.bin
|
||||||
rm -rf %{buildroot}%{_datadir}/%{name}/multiboot_dma.bin
|
rm -rf %{buildroot}%{_datadir}/%{name}/multiboot_dma.bin
|
||||||
rm -rf %{buildroot}%{_datadir}/%{name}/npcm7xx_bootrom.bin
|
|
||||||
rm -rf %{buildroot}%{_datadir}/%{name}/openbios-*
|
rm -rf %{buildroot}%{_datadir}/%{name}/openbios-*
|
||||||
rm -rf %{buildroot}%{_datadir}/%{name}/slof.bin
|
rm -rf %{buildroot}%{_datadir}/%{name}/slof.bin
|
||||||
rm -rf %{buildroot}%{_datadir}/%{name}/QEMU,*.bin
|
rm -rf %{buildroot}%{_datadir}/%{name}/QEMU,*.bin
|
||||||
@ -644,6 +646,37 @@ getent passwd qemu >/dev/null || \
|
|||||||
%exclude %{_datadir}/%{name}/core3-reset
|
%exclude %{_datadir}/%{name}/core3-reset
|
||||||
%exclude %{_datadir}/%{name}/uefi-bios-sw
|
%exclude %{_datadir}/%{name}/uefi-bios-sw
|
||||||
|
|
||||||
|
%files system-aarch64
|
||||||
|
%{_bindir}/qemu-system-aarch64
|
||||||
|
|
||||||
|
%files system-arm
|
||||||
|
%{_bindir}/qemu-system-arm
|
||||||
|
%{_datadir}/%{name}/npcm7xx_bootrom.bin
|
||||||
|
|
||||||
|
%files system-x86_64
|
||||||
|
%{_bindir}/qemu-system-x86_64
|
||||||
|
%ifnarch x86_64
|
||||||
|
%{_libdir}/%{name}/accel-tcg-*.so
|
||||||
|
%{_libdir}/%{name}/hw-display-virtio-vga-gl.so
|
||||||
|
%{_libdir}/%{name}/hw-display-virtio-vga.so
|
||||||
|
%{_datadir}/%{name}/bios.bin
|
||||||
|
%{_datadir}/%{name}/bios-256k.bin
|
||||||
|
%{_datadir}/%{name}/vgabios.bin
|
||||||
|
%{_datadir}/%{name}/vgabios-cirrus.bin
|
||||||
|
%{_datadir}/%{name}/vgabios-qxl.bin
|
||||||
|
%{_datadir}/%{name}/vgabios-stdvga.bin
|
||||||
|
%{_datadir}/%{name}/vgabios-vmware.bin
|
||||||
|
%{_datadir}/%{name}/vgabios-virtio.bin
|
||||||
|
%{_datadir}/%{name}/vgabios-ramfb.bin
|
||||||
|
%{_datadir}/%{name}/vgabios-bochs-display.bin
|
||||||
|
%{_datadir}/%{name}/linuxboot.bin
|
||||||
|
%{_datadir}/%{name}/linuxboot_dma.bin
|
||||||
|
%{_datadir}/%{name}/pvh.bin
|
||||||
|
%{_datadir}/%{name}/multiboot.bin
|
||||||
|
%{_datadir}/%{name}/kvmvapic.bin
|
||||||
|
%{_datadir}/%{name}/sgabios.bin
|
||||||
|
%endif
|
||||||
|
|
||||||
%files help
|
%files help
|
||||||
%dir %{qemudocdir}
|
%dir %{qemudocdir}
|
||||||
%doc %{qemudocdir}/about
|
%doc %{qemudocdir}/about
|
||||||
@ -706,6 +739,9 @@ getent passwd qemu >/dev/null || \
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon May 30 2022 zhangziyang <zhangziyang1@huawei.com> - 2:6.2.0-37
|
||||||
|
- add qemu-system-x86_64, qemu-system-aarch64, qemu-system-arm rpm package build
|
||||||
|
|
||||||
* Thu May 26 2022 Jun Yang <jun.yang@suse.com> - 2:6.2.0-36
|
* Thu May 26 2022 Jun Yang <jun.yang@suse.com> - 2:6.2.0-36
|
||||||
- Remove unnecessary dependency of kernel package
|
- Remove unnecessary dependency of kernel package
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user