[Virtio-fs] [PATCH 1/5] build-qemu: Add support for ppc64le

Fabiano Rosas farosas at linux.ibm.com
Tue Dec 10 14:51:15 UTC 2019


Allow running the script on a ppc64le machine to build a ppc64le QEMU
binary.

The configuration differs from x86 in the following:

--enable-fdt:
We need to build with device-tree support because ppc relies on it.

--enable-tcg:
The ppc build without TCG is currently broken.

Signed-off-by: Fabiano Rosas <farosas at linux.ibm.com>
---
 build-qemu.sh | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/build-qemu.sh b/build-qemu.sh
index 2dc0580..ff78df9 100755
--- a/build-qemu.sh
+++ b/build-qemu.sh
@@ -7,6 +7,8 @@
 
 set -e
 
+arch=$(uname -m)
+
 if [ ! -f vl.c ]; then
 	echo 'This script must be run from a QEMU source tree.'
 	exit 1
@@ -15,8 +17,23 @@ fi
 rm -rf qemu
 mkdir qemu
 
-./configure --target-list=x86_64-softmmu \
-	--disable-fdt \
+case ${arch} in
+	ppc64le)
+		arch=${arch/le/}
+		arch_config_opts=(
+			--enable-fdt
+			--enable-tcg
+		)
+		;;
+	*)
+		arch_config_opts=(
+			--disable-fdt
+			--disable-tcg
+		)
+		;;
+esac
+
+./configure --target-list=${arch}-softmmu \
 	--disable-glusterfs \
 	--disable-guest-agent \
 	--disable-numa \
@@ -89,13 +106,13 @@ mkdir qemu
 	--disable-mpath \
 	--disable-virglrenderer \
 	--disable-xen-pci-passthrough \
-	--disable-tcg \
 	--disable-sanitizers \
 	--disable-hvf \
 	--disable-whpx \
 	--enable-malloc-trim \
 	--disable-membarrier \
-	--disable-vhost-crypto
+	--disable-vhost-crypto \
+	${arch_config_opts[@]}
 
 make "DESTDIR=$PWD/qemu" -j$(nproc) install
 
-- 
2.23.0





More information about the Virtio-fs mailing list