meta-xilinx: subtree update:68eacd5636..391c7054e8

Alejandro Enedino Hernandez Samaniego (2):
      qemu-xilinx: split recipes for native (system, usermode) and target
      README.building: Update building instructions for multiconfig builds

Manjukumar Matha (2):
      machine-xilinx-default.inc: Deploy u-boot.elf for Versal devices
      meta-xilinx-contrib: Fix drm patch for v4.19 kernel

Change-Id: I1bc00353e9fb0ce4035ef42aa100ab2162093608
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-xilinx/meta-xilinx-bsp/README.building.md b/meta-xilinx/meta-xilinx-bsp/README.building.md
index b127db3..230037c 100644
--- a/meta-xilinx/meta-xilinx-bsp/README.building.md
+++ b/meta-xilinx/meta-xilinx-bsp/README.building.md
@@ -56,33 +56,40 @@
 Using multiconfig to build ZU+
 ------------------------------
 
-multiconfig dependency has to be added in image file or local.conf.
-For example in core-image-minimal you will need  
-do_image[mcdepends] = "multiconfig:zcu102:pmu:pmu-firmware:do_deploy"
+In your local.conf multiconfig should be enabled by:
 
-Add conf/multiconfig in the build directory and create pmu.conf and zcu102.conf
+`BBMULTICONFIG ?= "pmu"`
 
-Add the following in pmu.conf:  
-	MACHINE="zynqmp-pmu"  
-	DISTRO="xilinx-standalone"  
-    	GCCVERSION="7.%"  
-    	TMPDIR="${TOPDIR}/pmutmp"  
+Add a directory conf/multiconfig in the build directory and create pmu.conf inside it.
 
-Add the following in zcu102.conf:  
-	MACHINE="zcu102-zynqmp"  
-    	DISTRO="poky"  
+Add the following in pmu.conf: 
 
-In local.conf multiconfig is enabled by: BBMULTICONFIG ?= "zcu102 pmu"
+	MACHINE="zynqmp-pmu" 
+	DISTRO="xilinx-standalone" 
+	TMPDIR="${TOPDIR}/pmutmp" 
 
-bitbake multiconfig:zcu102:core-image-minimal  
+Add the following in your local.conf
+
+	MACHINE="zcu102-zynqmp" 
+	DISTRO="poky" 
+
+A multiconfig dependency has to be added in the image recipe or local.conf.
+
+For example in core-image-minimal you would need: 
+
+	do_image[mcdepends] = "multiconfig::pmu:pmu-firmware:do_deploy"
+
+This creates a multiconfig dependency between the task do_image from the default multiconfig '' (which has no name)
+to the task do_deploy() from the package pmu-firmware from the pmu multiconfig which was just created above.
+
+	$ bitbake core-image-minimal
+
+This will build both core-image-minimal and pmu-firmware.
+
 
 More information about multiconfig:
 https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#dev-building-images-for-multiple-targets-using-multiple-configurations
 
-Workaround:  
-There is additional workaround required in u-boot-xlnx recipe. Add the below dependency  
-do_compile[mcdepends] = "multiconfig:zcu102:pmu:pmu-firmware:do_deploy"
-
 
 Additional Information
 ----------------------
diff --git a/meta-xilinx/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc
index 2ffd5b2..1367e57 100644
--- a/meta-xilinx/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc
+++ b/meta-xilinx/meta-xilinx-bsp/conf/machine/include/machine-xilinx-default.inc
@@ -25,6 +25,7 @@
 UBOOT_ELF ?= "u-boot"
 UBOOT_ELF_zynq ?= "u-boot.elf"
 UBOOT_ELF_aarch64 ?= "u-boot.elf"
+UBOOT_ELF_versal ?= "u-boot.elf"
 
 #Hardware accelaration
 PREFERRED_PROVIDER_virtual/libgles1_mali400 = "libmali-xlnx"
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 0000000..8f41f74
--- /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/qemu-xilinx-helper-native_1.0.bb b/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb
index 55b35b5..ecc9652 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 @@
 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 0000000..aae607f
--- /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 0000000..bc5a385
--- /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 0000000..a138704
--- /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 daff5ff..ad44f09 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 @@
-QEMU_TARGETS = "aarch64 arm microblaze microblazeel"
-
-require recipes-devtools/qemu/qemu.inc
-
 SUMMARY = "Xilinx's fork of a fast open source processor emulator"
 HOMEPAGE = "https://github.com/xilinx/qemu/"
 
+QEMU_TARGETS = "aarch64 arm microblaze microblazeel"
+
+XILINX_RELEASE_VERSION = "v2019.1"
+XILINX_QEMU_VERSION ?= "v2.11.1"
+BRANCH ?= "branch/xilinx-v2019.1"
+SRCREV ?= "5f38ea92fb697b94ad43f01fe162f3ed6e6b0e16"
+
+
 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_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_2019.1.bb b/meta-xilinx/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx_2019.1.bb
index 2dcf35b..c158b18 100644
--- 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
@@ -1,6 +1,13 @@
+require recipes-devtools/qemu/qemu.inc
 require qemu-xilinx.inc
 
-XILINX_RELEASE_VERSION = "v2019.1"
-XILINX_QEMU_VERSION ?= "v2.11.1"
-BRANCH ?= "branch/xilinx-v2019.1"
-SRCREV ?= "5f38ea92fb697b94ad43f01fe162f3ed6e6b0e16"
+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)}
+}
diff --git a/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2019.1/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch b/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2019.1/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch
index b8ba70e..660bc21 100644
--- a/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2019.1/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch
+++ b/meta-xilinx/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2019.1/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch
@@ -1,4 +1,4 @@
-From c1bf9e8c50baa237b514715dcb9c8fd367694c93 Mon Sep 17 00:00:00 2001
+From 21cc8144efdaa3cd8dbd7279f87b14fa3432fae4 Mon Sep 17 00:00:00 2001
 From: Jason Wu <jason.wu.misc@gmail.com>
 Date: Sun, 10 Apr 2016 13:14:13 +1000
 Subject: [PATCH 1/3] drm: xilinx: Add encoder for Digilent boards
@@ -21,7 +21,7 @@
 
 diff --git a/Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt b/Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt
 new file mode 100644
-index 0000000000..242b24e482
+index 0000000..242b24e
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt
 @@ -0,0 +1,23 @@
@@ -49,21 +49,24 @@
 +		dglnt,edid-i2c = <&i2c1>;
 +	};
 diff --git a/drivers/gpu/drm/xilinx/Kconfig b/drivers/gpu/drm/xilinx/Kconfig
-index 12b548c2a9..c3e2562e53 100644
+index 57e18a9..d9ecff2 100644
 --- a/drivers/gpu/drm/xilinx/Kconfig
 +++ b/drivers/gpu/drm/xilinx/Kconfig
-@@ -57,3 +57,9 @@ config DRM_XILINX_SDI
- 	depends on DRM_XILINX
+@@ -33,6 +33,12 @@ config DRM_XILINX_DP_SUB
  	help
  	  DRM driver for Xilinx Display Port Subsystem.
-+
+ 
 +config DRM_DIGILENT_ENCODER
 +   tristate "Digilent VGA/HDMI DRM Encoder Driver"
 +   depends on DRM_XILINX
 +   help
 +     DRM slave encoder for Video-out on Digilent boards.
++
+ config DRM_XILINX_DP_SUB_DEBUG_FS
+ 	bool "Xilinx DRM DPSUB debugfs"
+ 	depends on DEBUG_FS && DRM_XILINX_DP_SUB
 diff --git a/drivers/gpu/drm/xilinx/Makefile b/drivers/gpu/drm/xilinx/Makefile
-index 19bc1541ca..c2717e40ea 100644
+index 19bc154..c2717e40 100644
 --- a/drivers/gpu/drm/xilinx/Makefile
 +++ b/drivers/gpu/drm/xilinx/Makefile
 @@ -7,6 +7,7 @@ xilinx_drm-y := xilinx_drm_crtc.o xilinx_drm_connector.o xilinx_drm_drv.o \
@@ -76,7 +79,7 @@
  obj-$(CONFIG_DRM_XILINX_DP_SUB) += xilinx_drm_dp_sub.o
 diff --git a/drivers/gpu/drm/xilinx/dglnt_encoder.c b/drivers/gpu/drm/xilinx/dglnt_encoder.c
 new file mode 100644
-index 0000000000..26a23986f9
+index 0000000..cb9fc7d
 --- /dev/null
 +++ b/drivers/gpu/drm/xilinx/dglnt_encoder.c
 @@ -0,0 +1,217 @@
@@ -177,7 +180,7 @@
 +
 +	if (dglnt->i2c_present) {
 +		edid = drm_get_edid(connector, dglnt->i2c_bus);
-+		drm_mode_connector_update_edid_property(connector, edid);
++		drm_connector_update_edid_property(connector, edid);
 +		if (edid) {
 +			num_modes = drm_add_edid_modes(connector, edid);
 +			kfree(edid);
@@ -298,5 +301,5 @@
 +MODULE_DESCRIPTION("DRM slave encoder for Video-out on Digilent boards");
 +MODULE_LICENSE("GPL v2");
 -- 
-2.14.2
+2.7.4