Fix up i.MX8MQ EVK configuration 25/28925/2
authorScott Murray <scott.murray@konsulko.com>
Tue, 23 May 2023 21:48:49 +0000 (17:48 -0400)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tue, 30 May 2023 12:50:35 +0000 (12:50 +0000)
Changes:
- Since linux-fslc-lts does not boot on the EVK at the moment,
  and both it and linux-fslc still do not have support for the
  HDMI output, switch back to using linux-fslc-imx with tweaks
  to use etnaviv as we did pre-kirkstone.
- A bbappend has been added for linux-fslc-lts since that was
  missed in a previous upgrade, and even though we are not using
  it now, it is possibly useful for other i.MX variants.
- A machine template for using the NXP BSP with the Vivante GPU
  driver, imx8mq-evk-viv, has been restored, as testing shows it
  now works with the current panel-less homescreens.  As before,
  the intent of this configuration is for testing or as an example
  of potential production use of meta-freescale where NXP support
  is available.
- Start up of Bluetooth support has been disabled, as it currently
  causes kernel oopses or panics (both have been seen in testing).
  This happens with both machine templates.  SPEC-4807 has been
  opened to track this issue.

Bug-AGL: SPEC-4799

Change-Id: I38e4e720643714541efb0fed08d5ab64545bb02d
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/28925
Tested-by: Jenkins Job builder account
ci-image-build: Jenkins Job builder account
ci-image-boot-test: Jenkins Job builder account
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
14 files changed:
meta-agl-bsp/conf/include/agl_imx8mq-evk-common.inc
meta-agl-bsp/conf/include/agl_imx8mq-evk-viv.inc [new file with mode: 0644]
meta-agl-bsp/conf/include/agl_imx8mq-evk.inc
meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston_10.0.1.imx.bbappend [new file with mode: 0644]
meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx/0001-enable-mhdp-with-etnaviv.patch
meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx/0002-dts-enable-etnaviv.patch
meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-imx_%.bbappend
meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-lts_%.bbappend [new file with mode: 0644]
meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc.inc [new file with mode: 0644]
meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc_%.bbappend
templates/machine/imx8mq-evk-viv/40_bblayers.conf.inc [new file with mode: 0644]
templates/machine/imx8mq-evk-viv/50_local.conf.inc [new file with mode: 0644]
templates/machine/imx8mq-evk-viv/50_setup.sh [new file with mode: 0644]
templates/machine/imx8mq-evk-viv/README_machine_imx8mq-evk-viv.md [new file with mode: 0644]

index ac7fc0e..b3faadd 100644 (file)
@@ -1,13 +1,8 @@
 require agl_imx-common.inc
 
-# Force use of the community supported LTS kernel instead of the
-# default linux-fslc
-IMX_DEFAULT_KERNEL:imx8mq-evk = "linux-fslc-lts"
-
-# For EVKB wifi support
-#MACHINE_FEATURES:append = " bcm4356"
-
 # Add helper to drive setting up HCI UART device
-MACHINE_EXTRA_RRECOMMENDS:append = " hci-uart-helper"
+# NOTE: Disabled 2023/05 due to kernel oops, further investigation
+#       required, see SPEC-4807 in JIRA.
+#MACHINE_EXTRA_RRECOMMENDS:append = " hci-uart-helper"
 
 AGL_DEFAULT_INITRAMFS_FSTYPES := ""
diff --git a/meta-agl-bsp/conf/include/agl_imx8mq-evk-viv.inc b/meta-agl-bsp/conf/include/agl_imx8mq-evk-viv.inc
new file mode 100644 (file)
index 0000000..3988fcd
--- /dev/null
@@ -0,0 +1,8 @@
+require agl_imx8mq-evk-common.inc
+
+IMX_DEFAULT_BSP = "nxp"
+
+# NOTE:
+# There is some potential benefit to using the community supported
+# linux-fslc-imx hybrid kernel here, but keeping the configuration
+# close to upstream to ease maintenance seems worthwhile.
index d04ee41..620ee0f 100644 (file)
@@ -1,23 +1,23 @@
-include agl_imx8mq-evk-common.inc
+require agl_imx8mq-evk-common.inc
 
-# NOTE: currently not using IMX_DEFAULT_BSP = "mainline", as it
-#       requires more changes than this approach of disabling
-#       Vivante.
+# NOTE:
+# Currently using the upstream default of IMX_DEFAULT_BSP = "mainline",
+# since we want to use the etnaviv driver and upstream Mesa + weston
+# stack.  More tweaks are required to accomplish that if the BSP is set
+# to "nxp".
 
-# Add our own over-ride for use in a few recipes where there is
-# conflicting Vivante vs etnaviv configuration.
-#MACHINEOVERRIDES .= ":etnaviv"
-
-# Knock out Vivante overrides
-#MACHINEOVERRIDES_EXTENDER:mx8mq:forcevariable = ""
-#PREFERRED_VERSION_weston_mx8 = "8.0.0"
-#PREFERRED_VERSION_wayland-protocols_mx8 = "1.20"
-#PREFERRED_VERSION_libdrm_mx8 = "2.4.101"
+# Force use of the community supported hybrid NXP/LTS kernel instead of
+# the default linux-fslc.  This is required to get the drivers required
+# for HDMI output.
+IMX_DEFAULT_KERNEL:imx8mq-evk = "linux-fslc-imx"
 
-#CORE_IMAGE_EXTRA_INSTALL += "libdrm-etnaviv"
+# Tweaks to allow using linux-fslc-imx on its own without the whole
+# NXP BSP.  Just the DISTROOVERRIDES change on its own is not enough,
+# as COMPATIBLE_MACHINE is evaluated early enough that the recipe is
+# not seen as compatible without an explicit override.
+COMPATIBLE_MACHINE:pn-linux-fslc-imx = "(imx8mq-evk)"
+DISTROOVERRIDES:pn-linux-fslc-imx:append = "mx8-nxp-bsp"
 
-#PREFERRED_VERSION_gstreamer1.0_mx8 = "1.16.3"
-#PREFERRED_VERSION_gstreamer1.0-plugins-base_mx8 = "1.16.3"
-#PREFERRED_VERSION_gstreamer1.0-plugins-good_mx8 = "1.16.3"
-#PREFERRED_VERSION_gstreamer1.0-plugins-bad_mx8 = "1.16.3"
-#PREFERRED_VERSION_gstreamer1.0-plugins-ugly_mx8 = "1.16.3"
+# Add our own over-ride for use in a few recipes where there is
+# conflicting Vivante vs etnaviv configuration.
+MACHINEOVERRIDES .= ":etnaviv"
diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston_10.0.1.imx.bbappend b/meta-agl-bsp/meta-freescale-layer/recipes-graphics/wayland/weston_10.0.1.imx.bbappend
new file mode 100644 (file)
index 0000000..07a43f9
--- /dev/null
@@ -0,0 +1,10 @@
+# Work around PACKAGECONFIG:remove of "x11 wayland" added to the recipe
+# in meta-freescale commit 5a5c5dd.  This can be removed once the issue
+# has been resolved by a revert of that breakage upstream.
+# What is done below is effectively a disabling of the "wayland"
+# PACKAGECONFIG option and then open coding what its effects would
+# normally be, since the :remove prevents specifying it in the usual way.
+PACKAGECONFIG[wayland] = ""
+DEPENDS:append = " virtual/egl virtual/libgles2"
+PACKAGECONFIG_CONFARGS:append = " -Dbackend-wayland=true"
+
index 23ca047..f95891a 100644 (file)
@@ -8,16 +8,15 @@ Upstream-Status: pending
 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
 ---
 
-diff --git a/drivers/gpu/drm/imx/Kconfig b/drivers/gpu/drm/imx/Kconfig
-index 63d5f1b532ee..a18ba56aa218 100644
---- a/drivers/gpu/drm/imx/Kconfig
-+++ b/drivers/gpu/drm/imx/Kconfig
-@@ -85,7 +85,7 @@ config DRM_IMX_CDNS_MHDP
-       select DRM_CDNS_DP
+diff --git a/drivers/gpu/drm/imx/mhdp/Kconfig b/drivers/gpu/drm/imx/mhdp/Kconfig
+index 225ccc3638a8..164b42f04e94 100644
+--- a/drivers/gpu/drm/imx/mhdp/Kconfig
++++ b/drivers/gpu/drm/imx/mhdp/Kconfig
+@@ -7,6 +7,6 @@ config DRM_IMX_CDNS_MHDP
        select DRM_CDNS_HDMI
        select DRM_CDNS_AUDIO
+       select DRM_CDNS_HDMI_HDCP
 -      depends on DRM_IMX
 +      depends on DRM_IMX || DRM_ETNAVIV
        help
          Choose this if you want to use HDMI on i.MX8.
index 4ce9b9d..4ed4b68 100644 (file)
@@ -4,15 +4,14 @@ Some further investigation is required into how to manage this upstream
 in meta-freescale, as it is not required for the i.MX6 platforms AFAIK.
 
 Upstream-Status: pending
-
 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
 ---
 
 diff --git a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts
-index f2a7e4069a0d..c0b6c5052656 100755
+index c3f8a24c3943..754fbfe30f0a 100755
 --- a/arch/arm64/boot/dts/freescale/imx8mq-evk.dts
 +++ b/arch/arm64/boot/dts/freescale/imx8mq-evk.dts
-@@ -1074,7 +1074,7 @@
+@@ -1224,7 +1224,7 @@ &vpu_v4l2 {
        status = "okay";
  };
  
index cc26e25..0772a98 100644 (file)
@@ -1,6 +1,6 @@
-FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:${THISDIR}/files:"
+FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
 
-require recipes-kernel/linux/linux-yocto-agl.inc
+require linux-fslc.inc
 
 # These patches and the configuration fragment below will need to be
 # revisited if/when using IMX_DEFAULT_BSP = "mainline" with i.MX8
@@ -10,22 +10,8 @@ SRC_URI:append:etnaviv = " \
     file://0002-dts-enable-etnaviv.patch \
 "
 
-# Make sure these are enabled so that AGL systemd configuration works
-AGL_KCONFIG_FRAGMENTS += " \
-    tmpfs.cfg \
-    namespace.cfg \
-    cgroup.cfg \
-"
-
-# Support for CFG80211 subsystem
-AGL_KCONFIG_FRAGMENTS += "cfg80211.cfg"
-
-# Turn off a couple of things enabled by default by Freescale
-# (lock debugging and userspace firmware loader fallback)
-AGL_KCONFIG_FRAGMENTS += "fixups.cfg"
-
 # Support for i.MX8MQ EVKB (e.g. Broadcom wifi)
-AGL_KCONFIG_FRAGMENTS:append:imx8mqevk = " imx8mq-evkb.cfg"
+AGL_KCONFIG_FRAGMENTS:append:imx8mq-evk = " imx8mq-evkb.cfg"
 
 # Build in etnaviv if required
 AGL_KCONFIG_FRAGMENTS:append:etnaviv = " etnaviv.cfg"
diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-lts_%.bbappend b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc-lts_%.bbappend
new file mode 100644 (file)
index 0000000..1007f3c
--- /dev/null
@@ -0,0 +1 @@
+require linux-fslc.inc
diff --git a/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc.inc b/meta-agl-bsp/meta-freescale-layer/recipes-kernel/linux/linux-fslc.inc
new file mode 100644 (file)
index 0000000..948b8c2
--- /dev/null
@@ -0,0 +1,22 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+
+require recipes-kernel/linux/linux-yocto-agl.inc
+
+# Make sure these are enabled so that AGL systemd configuration works
+AGL_KCONFIG_FRAGMENTS += " \
+    tmpfs.cfg \
+    namespace.cfg \
+    cgroup.cfg \
+"
+
+# Support for CFG80211 subsystem
+AGL_KCONFIG_FRAGMENTS += "cfg80211.cfg"
+
+# Turn off a couple of things enabled by default by Freescale
+# (lock debugging and userspace firmware loader fallback)
+AGL_KCONFIG_FRAGMENTS += "fixups.cfg"
+
+do_install:append:cubox-i() {
+    # Add symlink to work with default Hummingboard 2 u-boot configuration
+    ln -sf imx6q-hummingboard2.dtb ${D}/boot/imx6q-hummingboard2-emmc.dtb
+}
index 948b8c2..1007f3c 100644 (file)
@@ -1,22 +1 @@
-FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
-
-require recipes-kernel/linux/linux-yocto-agl.inc
-
-# Make sure these are enabled so that AGL systemd configuration works
-AGL_KCONFIG_FRAGMENTS += " \
-    tmpfs.cfg \
-    namespace.cfg \
-    cgroup.cfg \
-"
-
-# Support for CFG80211 subsystem
-AGL_KCONFIG_FRAGMENTS += "cfg80211.cfg"
-
-# Turn off a couple of things enabled by default by Freescale
-# (lock debugging and userspace firmware loader fallback)
-AGL_KCONFIG_FRAGMENTS += "fixups.cfg"
-
-do_install:append:cubox-i() {
-    # Add symlink to work with default Hummingboard 2 u-boot configuration
-    ln -sf imx6q-hummingboard2.dtb ${D}/boot/imx6q-hummingboard2-emmc.dtb
-}
+require linux-fslc.inc
diff --git a/templates/machine/imx8mq-evk-viv/40_bblayers.conf.inc b/templates/machine/imx8mq-evk-viv/40_bblayers.conf.inc
new file mode 100644 (file)
index 0000000..edcb6a3
--- /dev/null
@@ -0,0 +1,5 @@
+# This must be parsed after qt5, etc. layers so that they are correctly
+# recognized by meta-freescale/dynamic-layers
+BBLAYERS =+ "\
+  ${METADIR}/bsp/meta-freescale \
+  "
diff --git a/templates/machine/imx8mq-evk-viv/50_local.conf.inc b/templates/machine/imx8mq-evk-viv/50_local.conf.inc
new file mode 100644 (file)
index 0000000..7504c11
--- /dev/null
@@ -0,0 +1,3 @@
+MACHINE = "imx8mq-evk"
+#see meta-agl/meta-agl-bsp/conf/include/agl_imx8mq-evk-viv.inc
+require conf/include/agl_imx8mq-evk-viv.inc
diff --git a/templates/machine/imx8mq-evk-viv/50_setup.sh b/templates/machine/imx8mq-evk-viv/50_setup.sh
new file mode 100644 (file)
index 0000000..eefd1eb
--- /dev/null
@@ -0,0 +1,2 @@
+find_and_ack_eula $METADIR/bsp/meta-freescale EULA
+export EULA_FLAG_NAME="ACCEPT_FSL_EULA"
diff --git a/templates/machine/imx8mq-evk-viv/README_machine_imx8mq-evk-viv.md b/templates/machine/imx8mq-evk-viv/README_machine_imx8mq-evk-viv.md
new file mode 100644 (file)
index 0000000..be30e00
--- /dev/null
@@ -0,0 +1,9 @@
+---
+description: i.MX8MQ EVK with Vivante GPU driver
+authors: Scott Murray <scott.murray@konsulko.com>
+---
+
+### Machine imx8mqevk-viv
+
+i.MX8MQ EVK and EVKB boards with Vivante GPU driver support.
+