From efcf674342d151cb0e09dd16459aa05e51687f26 Mon Sep 17 00:00:00 2001 From: Thales Elero Cervi Date: Tue, 6 Aug 2024 16:01:00 -0300 Subject: [PATCH] Update QEMU 7.2 build instructions This change adds the use of the configure flag --target-list to filter our build targets, mapping only targets currently required on the StarlingX virtualization context. This reduces both the time and the required disk space for for build: * BEFORE: Build needed 00:17:34, 7709532k disk space * AFTER : Build needed 00:16:27, 2394216k disk space Also, this change updates patch 0006 by adding an extra, and now required, library to configure LIBS. Because of that, the patch name is also reworded. TEST PLAN: PASS - build-pkgs -c -p qemu PASS - build-image PASS - bootstrap a virtual AIO-SX PASS - apply stx-openstack PASS - 'openstack hypervisor list' shows a QEMU hypervisor UP Story: 2010781 Task: 50764 Change-Id: I0362546606ad26bececf810c7c9e9ef2eb9b08fb Signed-off-by: Thales Elero Cervi --- ...Customize-Debian-build-files-for-STX.patch | 24 +++++++++++++------ ... => 0006-Add-DPDK-link-dependencies.patch} | 10 ++++++-- qemu/debian/patches/series | 2 +- 3 files changed, 26 insertions(+), 10 deletions(-) rename qemu/debian/patches/{0006-STX-add-libdl.patch => 0006-Add-DPDK-link-dependencies.patch} (84%) diff --git a/qemu/debian/deb_patches/0001-Customize-Debian-build-files-for-STX.patch b/qemu/debian/deb_patches/0001-Customize-Debian-build-files-for-STX.patch index e4f6894..a8611fa 100644 --- a/qemu/debian/deb_patches/0001-Customize-Debian-build-files-for-STX.patch +++ b/qemu/debian/deb_patches/0001-Customize-Debian-build-files-for-STX.patch @@ -26,13 +26,15 @@ Removed packages: Signed-off-by: Thales Elero Cervi [Rebased original changes to the qemu 7.2 version] Signed-off-by: david.liu +[Aligned with 7.2, updated configure with --target-list] +Signed-off-by: Thales Elero Cervi --- debian/control | 232 +++---------------------------------------------- - debian/rules | 93 +------------------- - 2 files changed, 15 insertions(+), 310 deletions(-) + debian/rules | 94 +------------------- + 2 files changed, 16 insertions(+), 310 deletions(-) diff --git a/debian/control b/debian/control -index 9a5a3fab..32600f51 100644 +index 9a5a3fab..adf89468 100644 --- a/debian/control +++ b/debian/control @@ -23,14 +23,14 @@ Build-Depends: debhelper-compat (= 13), @@ -319,7 +321,7 @@ index 9a5a3fab..32600f51 100644 Package: qemu-utils Architecture: amd64 arm arm64 armel armhf hppa i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el riscv64 s390x sparc sparc64 x32 diff --git a/debian/rules b/debian/rules -index d2cd28e9..908b643a 100755 +index 0be82012..1c4b28f4 100755 --- a/debian/rules +++ b/debian/rules @@ -84,14 +84,10 @@ endif @@ -354,7 +356,15 @@ index d2cd28e9..908b643a 100755 endif # enable_linux_user sysdata-components := -@@ -441,39 +431,6 @@ endif +@@ -132,6 +122,7 @@ b/qemu/configured: configure + ../../configure ${common_configure_opts} --disable-user \ + --${enable_system}-system \ + --${enable_linux_user}-linux-user \ ++ --target-list=i386-softmmu,x86_64-softmmu \ + --disable-xen \ + --enable-modules \ + --enable-module-upgrades \ +@@ -442,39 +433,6 @@ endif ############################################## ### firmware, qemu-user-data package @@ -394,7 +404,7 @@ index d2cd28e9..908b643a 100755 build-vof: b/vof/vof.bin b/vof/vof.bin: | b -@@ -535,50 +492,6 @@ install-palcode-clipper: b/qemu-palcode/palcode-clipper +@@ -536,50 +494,6 @@ install-palcode-clipper: b/qemu-palcode/palcode-clipper install -m 0644 $< ${sysdataidir}/palcode-clipper sysdata-components += palcode-clipper @@ -446,5 +456,5 @@ index d2cd28e9..908b643a 100755 build-vbootrom: b/vbootrom/.built b/vbootrom/.built: | b -- -2.30.2 +2.34.1 diff --git a/qemu/debian/patches/0006-STX-add-libdl.patch b/qemu/debian/patches/0006-Add-DPDK-link-dependencies.patch similarity index 84% rename from qemu/debian/patches/0006-STX-add-libdl.patch rename to qemu/debian/patches/0006-Add-DPDK-link-dependencies.patch index 56819aa..dceb488 100644 --- a/qemu/debian/patches/0006-STX-add-libdl.patch +++ b/qemu/debian/patches/0006-Add-DPDK-link-dependencies.patch @@ -1,7 +1,7 @@ From 95ba02087f976256a91045286628fb797e3f0af1 Mon Sep 17 00:00:00 2001 From: Amy Fong Date: Fri, 26 Apr 2019 17:41:04 -0300 -Subject: [PATCH] STX: add libdl +Subject: [PATCH] Add DPDK link dependencies qemu/dpdk 1.7* compile errors @@ -17,11 +17,17 @@ undefined reference to symbol 'dlopen@@GLIBC_2.2.5' /lib64/libdl.so.2: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status +qemu7.2.0/ link errors +librte needs -lnuma (DPDK related library) + + Signed-off-by: Amy Fong Signed-off-by: Jim Somerville Signed-off-by: Rafael Falcao [Rebased original changes to the qemu 7.2 version] Signed-off-by: david.liu +[Updated linker libs on QEMU 7.2] +Signed-off-by: Thales Elero Cervi --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) @@ -35,7 +41,7 @@ index 49e6ca1e..f61a8d3d 100755 echo " \$(dpdk_lib_dir)/librte_ring.a \\" >> $config_host_mak echo " \$(dpdk_lib_dir)/librte_malloc.a" >> $config_host_mak - LIBS="\$(dpdk_libs) $LIBS" -+ LIBS="\$(dpdk_libs) -ldl $LIBS" ++ LIBS="\$(dpdk_libs) -ldl -lnuma $LIBS" QEMU_INCLUDES="-I\$(dpdk_inc_dir) $QEMU_INCLUDES" fi diff --git a/qemu/debian/patches/series b/qemu/debian/patches/series index 71ff990..f225c81 100644 --- a/qemu/debian/patches/series +++ b/qemu/debian/patches/series @@ -3,7 +3,7 @@ 0003-STX-qemu-dpdk-changes-for-openvswitch-dpdk.patch 0004-STX-qemu-add-enable-dpdk-runtime-flag.patch 0005-STX-qemu-add-compile-define-for-CONFIG_DPDK.patch -0006-STX-add-libdl.patch +0006-Add-DPDK-link-dependencies.patch 0007-STX-qemu-dpdk-custom-config.patch 0008-STX-realtime-uses-mlock-instead-of-mlockall.patch 0009-STX-Suspend-Resume-for-VMs-with-PCIPT-Virtio.patch