summaryrefslogtreecommitdiff
path: root/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu
diff options
context:
space:
mode:
authorjmbills <42755197+jmbills@users.noreply.github.com>2019-10-25 19:18:16 +0300
committerGitHub <noreply@github.com>2019-10-25 19:18:16 +0300
commit0dbb60593ebb5a62190c0e6cff7f1770493303a2 (patch)
tree0df2ce67404dbca3ddc4ee063dbfd9ae455be682 /meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu
parent34a3942845ac3264ce27c648ae5486d302c3e6d8 (diff)
parentcc9cea46d74d280de03c713c8b555153fd811f09 (diff)
downloadopenbmc-0dbb60593ebb5a62190c0e6cff7f1770493303a2.tar.xz
Merge branch 'intel' into intel2
Diffstat (limited to 'meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu')
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/files/0001-linux-user-disable-qemu-bridge-helper-and-socket_scm.patch56
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch37
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-devicetrees_2018.3.bb6
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-devicetrees_2019.1.bb6
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb6
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-native.inc7
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-native_2019.1.bb7
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-system-native_2019.1.bb16
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx.inc14
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx_2018.3.bb6
-rw-r--r--meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx_2019.1.bb13
11 files changed, 143 insertions, 31 deletions
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/files/0001-linux-user-disable-qemu-bridge-helper-and-socket_scm.patch b/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/files/0001-linux-user-disable-qemu-bridge-helper-and-socket_scm.patch
new file mode 100644
index 000000000..8f41f7469
--- /dev/null
+++ b/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/files/0001-linux-user-disable-qemu-bridge-helper-and-socket_scm.patch
@@ -0,0 +1,56 @@
+From 206d1b9c38daed50fcc08d2e743e649fbb82d60b Mon Sep 17 00:00:00 2001
+From: Laurent Vivier <laurent@vivier.eu>
+Date: Tue, 5 Jun 2018 18:09:58 +0200
+Subject: [PATCH] linux-user: disable qemu-bridge-helper and socket_scm_helper
+ build
+
+linux-user targets don't need them, and if we ask to build statically
+linked binaries, some static libraries they need are not available.
+
+Signed-off-by: Laurent Vivier <laurent@vivier.eu>
+Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
+Message-Id: <20180605160958.5434-1-laurent@vivier.eu>
+
+Upstream-Status: Pending
+
+
+With the split of qemu-xilinx into target,native and system-native recipes,
+we need to avoid duplicating providers for qemu-brigde-helper.
+
+Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
+
+
+---
+ Makefile | 2 +-
+ tests/Makefile.include | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 023b343..e4bc34a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -351,7 +351,7 @@ $(call set-vpath, $(SRC_PATH))
+
+ LIBS+=-lz $(LIBS_TOOLS)
+
+-HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF)
++HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = qemu-bridge-helper$(EXESUF)
+
+ ifdef BUILD_DOCS
+ DOCS=qemu-doc.html qemu-doc.txt qemu.1 qemu-img.1 qemu-nbd.8 qemu-ga.8
+diff --git a/tests/Makefile.include b/tests/Makefile.include
+index d098a10..10397ed 100644
+--- a/tests/Makefile.include
++++ b/tests/Makefile.include
+@@ -930,7 +930,7 @@ check-report.html: check-report.xml
+
+ # Other tests
+
+-QEMU_IOTESTS_HELPERS-$(CONFIG_LINUX) = tests/qemu-iotests/socket_scm_helper$(EXESUF)
++QEMU_IOTESTS_HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = tests/qemu-iotests/socket_scm_helper$(EXESUF)
+
+ .PHONY: check-tests/qemu-iotests-quick.sh
+ check-tests/qemu-iotests-quick.sh: tests/qemu-iotests-quick.sh qemu-img$(EXESUF) qemu-io$(EXESUF) $(QEMU_IOTESTS_HELPERS-y)
+--
+2.7.4
+
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch b/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch
index 2c92c686f..ba0e27430 100644
--- a/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch
+++ b/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch
@@ -13,15 +13,27 @@ mach_path = tempfile.mkdtemp()
# Separate PMU and APU arguments
APU_args = sys.argv[1:]
-PMU_args = APU_args[APU_args.index('-pmu-args')+1]
-APU_args.remove('-pmu-args')
-APU_args.remove(PMU_args)
-PMU_args = PMU_args.split()
+mbtype=''
-PMU_rom = PMU_args[PMU_args.index('-kernel')+1]
-error_msg = None
+if '-pmu-args' in APU_args:
+ MB_args = APU_args[APU_args.index('-pmu-args')+1]
+ APU_args.remove('-pmu-args')
+ APU_args.remove(MB_args)
+ MB_args = MB_args.split()
+ PMU_rom = MB_args[MB_args.index('-kernel')+1]
+ mbtype='PMU'
+elif '-plm-args' in APU_args:
+ MB_args = APU_args[APU_args.index('-plm-args')+1]
+ APU_args.remove('-plm-args')
+ APU_args.remove(MB_args)
+ MB_args = MB_args.split()
+ mbtype='PLM'
+else:
+ error_msg = '\nMultiarch not setup properly.'
+ sys.exit(error_msg)
-if os.path.exists(PMU_rom):
+error_msg = None
+if (mbtype == 'PMU' and os.path.exists(PMU_rom)) or mbtype == 'PLM':
# We need to switch tcp serial arguments (if they exist, e.g. qemurunner) to get the output correctly
tcp_serial_ports = [i for i, s in enumerate(APU_args) if 'tcp:127.0.0.1:' in s]
@@ -30,16 +42,16 @@ if os.path.exists(PMU_rom):
if len(tcp_serial_ports) == 2:
APU_args[tcp_serial_ports[0]],APU_args[tcp_serial_ports[1]] = APU_args[tcp_serial_ports[1]],APU_args[tcp_serial_ports[0]]
- pmu_cmd = binpath + '/qemu-system-microblazeel ' + ' '.join(PMU_args) + ' -machine-path ' + mach_path
+ mb_cmd = binpath + '/qemu-system-microblazeel ' + ' '.join(MB_args) + ' -machine-path ' + mach_path
apu_cmd = binpath + '/qemu-system-aarch64 ' + ' '.join(APU_args) + ' -machine-path ' + mach_path
# Debug prints
- print('\nPMU instance cmd: %s\n' % pmu_cmd)
+ print('\n%s instance cmd: %s\n' % (mbtype, mb_cmd))
print('APU instance cmd: %s\n' % apu_cmd)
# Invoke QEMU pmu instance
- process_pmu = subprocess.Popen(pmu_cmd, shell=True, stderr=subprocess.PIPE)
+ process_pmu = subprocess.Popen(mb_cmd, shell=True, stderr=subprocess.PIPE)
# Invoke QEMU APU instance
process_apu = subprocess.Popen(apu_cmd, shell=True, stderr=subprocess.PIPE)
@@ -47,8 +59,9 @@ if os.path.exists(PMU_rom):
error_msg = '\nQEMU APU instance failed:\n%s' % process_apu.stderr.read().decode()
else:
- error_msg = '\nError: Missing PMU ROM: %s' % PMU_rom
- error_msg += '\nSee "meta-xilinx/README.qemu.md" for more information on accquiring the PMU ROM.\n'
+ if mbtype == 'PMU':
+ error_msg = '\nError: Missing PMU ROM: %s' % PMU_rom
+ error_msg += '\nSee "meta-xilinx/README.qemu.md" for more information on accquiring the PMU ROM.\n'
shutil.rmtree(mach_path)
sys.exit(error_msg)
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-devicetrees_2018.3.bb b/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-devicetrees_2018.3.bb
deleted file mode 100644
index 6f8eda2f6..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-devicetrees_2018.3.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require qemu-devicetrees.inc
-
-XILINX_RELEASE_VERSION = "v2018.3"
-
-BRANCH ?= "master"
-SRCREV ?= "e3e40b8829894a479c7d7380fc8137886645dda8"
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-devicetrees_2019.1.bb b/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-devicetrees_2019.1.bb
new file mode 100644
index 000000000..064816609
--- /dev/null
+++ b/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-devicetrees_2019.1.bb
@@ -0,0 +1,6 @@
+require qemu-devicetrees.inc
+
+XILINX_RELEASE_VERSION = "v2019.1"
+
+BRANCH ?= "branch/xilinx-v2019.1"
+SRCREV ?= "445406ef4d06303f00387f7d81e8718255336fd0"
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb b/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb
index 55b35b53e..ecc965216 100644
--- a/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb
+++ b/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb
@@ -20,9 +20,11 @@ FILESEXTRAPATHS_prepend := "${@get_filespath_extra(d, 'recipes-devtools/qemu/qem
PROVIDES += "qemu-helper-native"
# replace qemu with qemu-xilinx
-DEPENDS_remove = "qemu-native"
+DEPENDS_remove = "qemu-system-native"
DEPENDS_append = " \
- qemu-xilinx-native \
+ qemu-xilinx-system-native \
qemu-xilinx-multiarch-helper-native \
"
+RDEPENDS_${PN}_remove = "qemu-system-native"
+RDEPENDS_${PN}_append = " qemu-xilinx-system-native"
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-native.inc b/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-native.inc
new file mode 100644
index 000000000..aae607f56
--- /dev/null
+++ b/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-native.inc
@@ -0,0 +1,7 @@
+require recipes-devtools/qemu/qemu-native.inc
+require qemu-xilinx.inc
+
+DEPENDS = "glib-2.0-native zlib-native"
+
+SRC_URI_remove = "file://0012-fix-libcap-header-issue-on-some-distro.patch"
+SRC_URI_remove = "file://0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch" \ No newline at end of file
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-native_2019.1.bb b/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-native_2019.1.bb
new file mode 100644
index 000000000..bc5a3850c
--- /dev/null
+++ b/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-native_2019.1.bb
@@ -0,0 +1,7 @@
+require qemu-xilinx-native.inc
+BPN = "qemu-xilinx"
+
+EXTRA_OECONF_append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent"
+
+
+SRC_URI_append = "file://0001-linux-user-disable-qemu-bridge-helper-and-socket_scm.patch"
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-system-native_2019.1.bb b/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-system-native_2019.1.bb
new file mode 100644
index 000000000..a138704e0
--- /dev/null
+++ b/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-system-native_2019.1.bb
@@ -0,0 +1,16 @@
+require qemu-xilinx-native.inc
+
+EXTRA_OECONF_append = " --target-list=${@get_qemu_system_target_list(d)}"
+
+PACKAGECONFIG ??= "fdt alsa kvm"
+
+PACKAGECONFIG_remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}"
+
+DEPENDS += "pixman-native qemu-xilinx-native"
+
+do_install_append() {
+ # The following is also installed by qemu-native
+ rm -f ${D}${datadir}/${BPN}/trace-events-all
+ rm -rf ${D}${datadir}/${BPN}/keymaps
+}
+
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx.inc b/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx.inc
index daff5ffc9..ad44f098c 100644
--- a/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx.inc
+++ b/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx.inc
@@ -1,14 +1,19 @@
+SUMMARY = "Xilinx's fork of a fast open source processor emulator"
+HOMEPAGE = "https://github.com/xilinx/qemu/"
+
QEMU_TARGETS = "aarch64 arm microblaze microblazeel"
-require recipes-devtools/qemu/qemu.inc
+XILINX_RELEASE_VERSION = "v2019.1"
+XILINX_QEMU_VERSION ?= "v2.11.1"
+BRANCH ?= "branch/xilinx-v2019.1"
+SRCREV ?= "5f38ea92fb697b94ad43f01fe162f3ed6e6b0e16"
-SUMMARY = "Xilinx's fork of a fast open source processor emulator"
-HOMEPAGE = "https://github.com/xilinx/qemu/"
LIC_FILES_CHKSUM = " \
file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913 \
"
+DEPENDS = "glib-2.0 zlib pixman"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
@@ -45,5 +50,4 @@ do_configure_prepend() {
do_install_append() {
# Prevent QA warnings about installed ${localstatedir}/run
if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi
-}
-
+} \ No newline at end of file
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx_2018.3.bb b/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx_2018.3.bb
deleted file mode 100644
index 57547dff5..000000000
--- a/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx_2018.3.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require qemu-xilinx.inc
-
-XILINX_RELEASE_VERSION = "v2018.3"
-XILINX_QEMU_VERSION ?= "v2.11.0"
-BRANCH ?= "master"
-SRCREV ?= "f70bd86859c7a1a075ac864b4765168f821f1aae"
diff --git a/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx_2019.1.bb b/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx_2019.1.bb
new file mode 100644
index 000000000..c158b1857
--- /dev/null
+++ b/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx_2019.1.bb
@@ -0,0 +1,13 @@
+require recipes-devtools/qemu/qemu.inc
+require qemu-xilinx.inc
+
+BBCLASSEXTEND = "nativesdk"
+
+RDEPENDS_${PN}_class-target += "bash"
+
+EXTRA_OECONF_append_class-target = " --target-list=${@get_qemu_target_list(d)}"
+EXTRA_OECONF_append_class-nativesdk = " --target-list=${@get_qemu_target_list(d)}"
+
+do_install_append_class-nativesdk() {
+ ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)}
+}