From f31046d26a4491f6f967ca16d262e7f67626fc98 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Wed, 21 Feb 2018 13:24:20 +0000 Subject: [PATCH] Don't compile qemu when gem5 is used --- build | 3 +++ buildroot_config_fragment | 8 -------- buildroot_config_fragment_qemu | 6 ++++++ rootfs_post_image_script | 5 +++-- 4 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 buildroot_config_fragment_qemu diff --git a/build b/build index 308d244..94973c1 100755 --- a/build +++ b/build @@ -94,6 +94,9 @@ fi if $x11; then cat ../buildroot_config_fragment_x11 >> "${outdir}/.config" fi +if ! "$gem5"; then + cat ../buildroot_config_fragment_qemu >> "${outdir}/.config" +fi if [ "$arch" = 'mips64' ]; then # Workaround for: # http://lists.busybox.net/pipermail/buildroot/2017-August/201053.html diff --git a/buildroot_config_fragment b/buildroot_config_fragment index 99ba1ad..df5c7de 100644 --- a/buildroot_config_fragment +++ b/buildroot_config_fragment @@ -27,14 +27,6 @@ BR2_OPTIMIZE_0=y BR2_PACKAGE_GDB=y BR2_PTHREAD_DEBUG=y -# QEMU -BR2_PACKAGE_HOST_QEMU=y -# False because otherwise we need the host to be as recent as guest, and the build fails with: -# package/qemu/qemu.mk:110: *** "Refusing to build qemu-user: target Linux version newer than host's.". Stop. -BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE=n -BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y -BR2_PACKAGE_HOST_QEMU_VDE2=y - # ftrace BR2_PACKAGE_TRACE_CMD=y diff --git a/buildroot_config_fragment_qemu b/buildroot_config_fragment_qemu new file mode 100644 index 0000000..7ca33df --- /dev/null +++ b/buildroot_config_fragment_qemu @@ -0,0 +1,6 @@ +BR2_PACKAGE_HOST_QEMU=y +# False because otherwise we need the host to be as recent as guest, and the build fails with: +# package/qemu/qemu.mk:110: *** "Refusing to build qemu-user: target Linux version newer than host's.". Stop. +BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE=n +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y +BR2_PACKAGE_HOST_QEMU_VDE2=y diff --git a/rootfs_post_image_script b/rootfs_post_image_script index 8ec6eee..282c129 100755 --- a/rootfs_post_image_script +++ b/rootfs_post_image_script @@ -2,6 +2,7 @@ images_dir="$1" cd "$images_dir" f=rootfs.ext2 -if [ -f "$f" ]; then - "${HOST_DIR}/bin/qemu-img" convert -f raw -O qcow2 "$f" "${f}.qcow2" +exe="${HOST_DIR}/bin/qemu-img" +if [ -f "$exe" ] && [ -f "$f" ]; then + "$exe" convert -f raw -O qcow2 "$f" "${f}.qcow2" fi