Skip to contentSkip to conversation

Machine overrides extender - reduce code duplication

PATCH Superseded Otavio Salvador 3 participants 41 messages Sep 1, 2016 – Sep 6, 2016 Arm i.MX and Layerscape

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Machine overrides extender - reduce code duplication

We spent some time trying to come up with something which would make easier to extend the tune-arch support. All we could come up was way too complex or did not work.

Instead We did a MACHINEOVERRIDES extender.

This enables the machine overrides extender for the i.MX6 devices. It maps (spaces are used to easy the read):

- mx6q -> imxipu imxvpu imxgpu2d imxgpu3d
- mx6dl -> imxpxp imxipu imxvpu imxgpu2d imxgpu3d imxepdc
- mx6sx -> imxpxp imxgpu2d imxgpu3d
- mx6sl -> imxpxp imxgpu2d imxepdc
- mx6ul -> imxpxp
- mx7d -> imxpxp imxepdc

So it allows for reusing of overrides while keeps this control at the BSP side. For example, a PACKAGECONFIG setting which is common for mx6q, mx6dl and mx6sx used to look as:

PACKAGECONFIG_mx6q = "option"
PACKAGECONFIG_mx6dl = "option"

Now it can be replaced by:

PACKAGECONFIG_imxvpu = "option"

Changes in v2:
- Use BitBake event to insert the extends
- New patch.

Otavio Salvador (16):
Convert SOC_FAMILY to MACHINEOVERRIDES
imx-lib: Stop using generic SoC overrides
imx-test: Stop using generic SoC overrides machine-overrides-extender.bbclass: Automatically set extend the
MACHINEOVERRIDES
imx-base.inc: Enable machine overrides extender for i.MX6
chromium: Refactor code to use the the new overrides
glmark2: Refactor code to use the new overrides
qtbase: Refactor code to use the new overrides
cairo: Refactor code to use the new overrides
eglinfo: Refactor code to use the new overrides
imx-gpu-viv: Refactor code to use the new overrides
mesa-gl: Refactor code to use the new overrides
weston: Refactor code to use the new overrides gstreamer1.0-plugins-imx: Refactor code to use the new overrides
imx-codec: Refactor code to use the new overrides gstreamer1.0-plugins-imx: Change EGL platform preference order

 .../recipes-browser/chromium/chromium-imx.inc      |  3 +-
 .../chromium/chromium_48.0.2548.0.bbappend         |  5 +-
 classes/machine-overrides-extender.bbclass         | 29 ++++++++++
 conf/machine/imx23evk.conf                         |  4 +-
 conf/machine/imx28evk.conf                         |  4 +-
 conf/machine/imx51evk.conf                         |  4 +-
 conf/machine/imx53ard.conf                         |  4 +-
 conf/machine/imx53qsb.conf                         |  4 +-
 conf/machine/imx6dlsabreauto.conf                  |  4 +-
 conf/machine/imx6dlsabresd.conf                    |  4 +-
 conf/machine/imx6qpsabreauto.conf                  |  4 +-
 conf/machine/imx6qpsabresd.conf                    |  4 +-
 conf/machine/imx6qsabreauto.conf                   |  4 +-
 conf/machine/imx6qsabresd.conf                     |  4 +-
 conf/machine/imx6slevk.conf                        |  4 +-
 conf/machine/imx6solosabreauto.conf                |  4 +-
 conf/machine/imx6solosabresd.conf                  |  4 +-
 conf/machine/imx6sxsabreauto.conf                  |  4 +-
 conf/machine/imx6sxsabresd.conf                    |  4 +-
 conf/machine/imx6ulevk.conf                        |  4 +-
 conf/machine/imx7dsabresd.conf                     |  4 +-
 conf/machine/include/imx-base.inc                  | 11 +++-
 conf/machine/include/qoriq-arm.inc                 |  2 -
 conf/machine/ls1021atwr.conf                       |  4 +-
 conf/machine/twr-vf65gs10.conf                     |  4 +-
 .../recipes-benchmark/glmark2/glmark2_%.bbappend   |  8 +--
 qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc      |  2 +-
 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend         | 19 +++----
 recipes-bsp/imx-lib/imx-lib.inc                    |  6 ++-
 recipes-bsp/imx-test/imx-test.inc                  |  7 +--
 recipes-graphics/cairo/cairo_%.bbappend            | 16 +++---
 recipes-graphics/eglinfo/eglinfo-fb_%.bbappend     |  4 +-
 recipes-graphics/eglinfo/eglinfo-x11_%.bbappend    |  4 +-
 recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc       | 13 +++--
 recipes-graphics/mesa/mesa-gl_%.bbappend           |  5 +-
 recipes-graphics/wayland/weston_%.bbappend         | 61 +++++++++++-----------
 .../gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb   | 19 ++++---
 recipes-multimedia/imx-codec/imx-codec.inc         |  3 +-
 38 files changed, 160 insertions(+), 137 deletions(-)
 create mode 100644 classes/machine-overrides-extender.bbclass
Signature · 1 line
2.9.3
#1 lore raw

PATCH v2 1/16 Convert SOC_FAMILY to MACHINEOVERRIDES

The SOC_FAMILY is an indirection which makes the understanding, from OpenEmbedded versed developers and users, more difficult. Instead of using the SOC_FAMILY indirection which is rarely used, we now move to the MACHINEOVERRIDES mechanism as this is in fact what is in use.

---

Changes in v2: None

 conf/machine/imx23evk.conf                    | 4 ++--
 conf/machine/imx28evk.conf                    | 4 ++--
 conf/machine/imx51evk.conf                    | 4 ++--
 conf/machine/imx53ard.conf                    | 4 ++--
 conf/machine/imx53qsb.conf                    | 4 ++--
 conf/machine/imx6dlsabreauto.conf             | 4 ++--
 conf/machine/imx6dlsabresd.conf               | 4 ++--
 conf/machine/imx6qpsabreauto.conf             | 4 ++--
 conf/machine/imx6qpsabresd.conf               | 4 ++--
 conf/machine/imx6qsabreauto.conf              | 4 ++--
 conf/machine/imx6qsabresd.conf                | 4 ++--
 conf/machine/imx6slevk.conf                   | 4 ++--
 conf/machine/imx6solosabreauto.conf           | 4 ++--
 conf/machine/imx6solosabresd.conf             | 4 ++--
 conf/machine/imx6sxsabreauto.conf             | 4 ++--
 conf/machine/imx6sxsabresd.conf               | 4 ++--
 conf/machine/imx6ulevk.conf                   | 4 ++--
 conf/machine/imx7dsabresd.conf                | 4 ++--
 conf/machine/include/imx-base.inc             | 2 --
 conf/machine/include/qoriq-arm.inc            | 2 --
 conf/machine/ls1021atwr.conf                  | 4 ++--
 conf/machine/twr-vf65gs10.conf                | 4 ++--
 qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc | 2 +-
 23 files changed, 41 insertions(+), 45 deletions(-)
conf/machine/imx23evk.conf +2 -2
index 6ec1f14..6c4daa5 100644
@@ -4,11 +4,11 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX23 Evaluation Kit
 #@MAINTAINER: Otavio Salvador <[email protected]>
 
+MACHINEOVERRIDES =. "mxs:mx23:"
+
 include conf/machine/include/imx-base.inc
 include conf/machine/include/tune-arm926ejs.inc
 
-SOC_FAMILY = "mxs:mx23"
-
 IMXBOOTLETS_MACHINE = "stmp378x_dev"
 UBOOT_MACHINE = "mx23evk_config"
 
conf/machine/imx28evk.conf +2 -2
index ac4cef5..5bdbcad 100644
@@ -4,11 +4,11 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX28 Evaluation Kit
 #@MAINTAINER: Otavio Salvador <[email protected]>
 
+MACHINEOVERRIDES =. "mxs:mx28:"
+
 include conf/machine/include/imx-base.inc
 include conf/machine/include/tune-arm926ejs.inc
 
-SOC_FAMILY = "mxs:mx28"
-
 IMXBOOTLETS_MACHINE = "iMX28_EVK"
 
 UBOOT_CONFIG ??= "sd"
conf/machine/imx51evk.conf +2 -2
index 9d7d06c..e6904f9 100644
@@ -4,11 +4,11 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX51 Evaluation Kit
 #@MAINTAINER: Daiane Angolini <[email protected]>
 
+MACHINEOVERRIDES =. "mx5:mx51:"
+
 include conf/machine/include/imx-base.inc
 include conf/machine/include/tune-cortexa8.inc
 
-SOC_FAMILY = "mx5:mx51"
-
 # Disable perf features as 2.6.35.3 fails to build otherwise
 PERF_FEATURES_ENABLE = ""
 
conf/machine/imx53ard.conf +2 -2
index c338d6b..f416c95 100644
@@ -4,11 +4,11 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX53 SABRE Automotive Board
 #@MAINTAINER: Daiane Angolini <[email protected]>
 
+MACHINEOVERRIDES =. "mx5:mx53:"
+
 include conf/machine/include/imx-base.inc
 include conf/machine/include/tune-cortexa8.inc
 
-SOC_FAMILY = "mx5:mx53"
-
 # Disable perf features as 2.6.35.3 fails to build otherwise
 PERF_FEATURES_ENABLE = ""
 
conf/machine/imx53qsb.conf +2 -2
index 5df85a9..dc264c4 100644
@@ -4,11 +4,11 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX53 Quick Start Board
 #@MAINTAINER: Trevor Woerner <[email protected]>
 
+MACHINEOVERRIDES =. "mx5:mx53:"
+
 include conf/machine/include/imx-base.inc
 include conf/machine/include/tune-cortexa8.inc
 
-SOC_FAMILY = "mx5:mx53"
-
 KERNEL_DEVICETREE = "imx53-qsb.dtb imx53-qsrb.dtb"
 
 UBOOT_MACHINE = "mx53loco_config"
conf/machine/imx6dlsabreauto.conf +2 -2
index a9bdfe5..3df479b 100644
@@ -4,9 +4,9 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX6DL SABRE Automotive
 #@MAINTAINER: Daiane Angolini <[email protected]>
 
-require conf/machine/include/imx6sabreauto-common.inc
+MACHINEOVERRIDES =. "mx6:mx6dl:"
 
-SOC_FAMILY = "mx6:mx6dl"
+require conf/machine/include/imx6sabreauto-common.inc
 
 KERNEL_DEVICETREE = "imx6dl-sabreauto.dtb imx6dl-sabreauto-gpmi-weim.dtb imx6dl-sabreauto-ecspi.dtb \
                      imx6dl-sabreauto-flexcan1.dtb imx6dl-sabreauto-enetirq.dtb"
conf/machine/imx6dlsabresd.conf +2 -2
index f832666..9943246 100644
@@ -4,9 +4,9 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX6DL SABRE Smart Device
 #@MAINTAINER: Otavio Salvador <[email protected]>
 
-require conf/machine/include/imx6sabresd-common.inc
+MACHINEOVERRIDES =. "mx6:mx6dl:"
 
-SOC_FAMILY = "mx6:mx6dl"
+require conf/machine/include/imx6sabresd-common.inc
 
 KERNEL_DEVICETREE = "imx6dl-sabresd.dtb imx6dl-sabresd-ldo.dtb imx6dl-sabresd-hdcp.dtb \
                      imx6dl-sabresd-enetirq.dtb imx6dl-sabresd-btwifi.dtb"
conf/machine/imx6qpsabreauto.conf +2 -2
index b227338..f8e914a 100644
@@ -4,9 +4,9 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX6QP SABRE Automotive
 #@MAINTAINER: Lauren Post <[email protected]>
 
-require conf/machine/include/imx6sabreauto-common.inc
+MACHINEOVERRIDES =. "mx6:mx6q:"
 
-SOC_FAMILY = "mx6:mx6q"
+require conf/machine/include/imx6sabreauto-common.inc
 
 KERNEL_DEVICETREE = "imx6qp-sabreauto.dtb imx6qp-sabreauto-ecspi.dtb imx6qp-sabreauto-flexcan1.dtb \
                      imx6qp-sabreauto-gpmi-weim.dtb"
conf/machine/imx6qpsabresd.conf +2 -2
index 2e7ee47..123a435 100644
@@ -4,9 +4,9 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX6QP SABRE Smart Device
 #@MAINTAINER: Lauren Post <[email protected]>
 
-require conf/machine/include/imx6sabresd-common.inc
+MACHINEOVERRIDES =. "mx6:mx6q:"
 
-SOC_FAMILY = "mx6:mx6q"
+require conf/machine/include/imx6sabresd-common.inc
 
 KERNEL_DEVICETREE = "imx6qp-sabresd.dtb imx6qp-sabresd-ldo.dtb imx6qp-sabresd-btwifi.dtb imx6qp-sabresd-hdcp.dtb"
 
conf/machine/imx6qsabreauto.conf +2 -2
index 3429551..e25a733 100644
@@ -4,9 +4,9 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX6Q SABRE Automotive
 #@MAINTAINER: Daiane Angolini <[email protected]>
 
-require conf/machine/include/imx6sabreauto-common.inc
+MACHINEOVERRIDES =. "mx6:mx6q:"
 
-SOC_FAMILY = "mx6:mx6q"
+require conf/machine/include/imx6sabreauto-common.inc
 
 KERNEL_DEVICETREE = "imx6q-sabreauto.dtb imx6q-sabreauto-gpmi-weim.dtb imx6q-sabreauto-ecspi.dtb \
                      imx6q-sabreauto-flexcan1.dtb imx6q-sabreauto-enetirq.dtb"
conf/machine/imx6qsabresd.conf +2 -2
index 8115dfa..33fff89 100644
@@ -4,9 +4,9 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX6Q SABRE Smart Device
 #@MAINTAINER: Otavio Salvador <[email protected]>
 
-require conf/machine/include/imx6sabresd-common.inc
+MACHINEOVERRIDES =. "mx6:mx6q:"
 
-SOC_FAMILY = "mx6:mx6q"
+require conf/machine/include/imx6sabresd-common.inc
 
 KERNEL_DEVICETREE = "imx6q-sabresd.dtb imx6q-sabresd-ldo.dtb imx6q-sabresd-hdcp.dtb \
                      imx6q-sabresd-enetirq.dtb imx6q-sabresd-btwifi.dtb"
conf/machine/imx6slevk.conf +2 -2
index 98402f7..02cb8f0 100644
@@ -4,11 +4,11 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX6SL Evaluation Kit
 #@MAINTAINER: Otavio Salvador <[email protected]>
 
+MACHINEOVERRIDES =. "mx6:mx6sl:"
+
 include conf/machine/include/imx-base.inc
 include conf/machine/include/tune-cortexa9.inc
 
-SOC_FAMILY = "mx6:mx6sl"
-
 KERNEL_DEVICETREE = "imx6sl-evk.dtb imx6sl-evk-csi.dtb imx6sl-evk-ldo.dtb \
                      imx6sl-evk-uart.dtb imx6sl-evk-btwifi.dtb"
 
conf/machine/imx6solosabreauto.conf +2 -2
index ead787d..3ced78d 100644
@@ -3,9 +3,9 @@
 #@SOC: i.MX6S
 #@DESCRIPTION: Machine configuration for Freescale i.MX6Solo SABRE Automotive
 
-require conf/machine/include/imx6sabresd-common.inc
+MACHINEOVERRIDES =. "mx6:mx6dl:"
 
-SOC_FAMILY = "mx6:mx6dl"
+require conf/machine/include/imx6sabresd-common.inc
 
 KERNEL_DEVICETREE = "imx6dl-sabreauto.dtb"
 
conf/machine/imx6solosabresd.conf +2 -2
index b123d8c..24fa649 100644
@@ -4,9 +4,9 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX6Solo SABRE Smart Device
 #@MAINTAINER: Otavio Salvador <[email protected]>
 
-require conf/machine/include/imx6sabresd-common.inc
+MACHINEOVERRIDES =. "mx6:mx6dl:"
 
-SOC_FAMILY = "mx6:mx6dl"
+require conf/machine/include/imx6sabresd-common.inc
 
 KERNEL_DEVICETREE = "imx6dl-sabresd.dtb imx6dl-sabresd-ldo.dtb"
 
conf/machine/imx6sxsabreauto.conf +2 -2
index 9c8a01f..4f399a3 100644
@@ -4,9 +4,9 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX6SoloX Sabre Automotive
 #@MAINTAINER: Lauren Post <[email protected]>
 
-require conf/machine/include/imx6sabreauto-common.inc
+MACHINEOVERRIDES =. "mx6:mx6sx:"
 
-SOC_FAMILY = "mx6:mx6sx"
+require conf/machine/include/imx6sabreauto-common.inc
 
 KERNEL_DEVICETREE = "imx6sx-sabreauto.dtb imx6sx-sabreauto-m4.dtb"
 
conf/machine/imx6sxsabresd.conf +2 -2
index 2243d1f..857b735 100644
@@ -4,9 +4,9 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX6SoloX Sabre SD
 #@MAINTAINER: Lauren Post <[email protected]>
 
-require conf/machine/include/imx6sabresd-common.inc
+MACHINEOVERRIDES =. "mx6:mx6sx:"
 
-SOC_FAMILY = "mx6:mx6sx"
+require conf/machine/include/imx6sabresd-common.inc
 
 KERNEL_DEVICETREE = "imx6sx-sdb.dtb imx6sx-sdb-emmc.dtb imx6sx-sdb-m4.dtb \
                      imx6sx-sdb-sai.dtb imx6sx-sdb-lcdif1.dtb imx6sx-sdb-ldo.dtb \
conf/machine/imx6ulevk.conf +2 -2
index 8e2fef0..7ab0963 100644
@@ -4,13 +4,13 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX6UL EVK
 #@MAINTAINER: Lauren Post <[email protected]>
 
+MACHINEOVERRIDES =. "mx6ul:"
+
 include conf/machine/include/imx-base.inc
 include conf/machine/include/tune-cortexa7.inc
 
 MACHINE_FEATURES += " pci wifi bluetooth"
 
-SOC_FAMILY = "mx6ul"
-
 KERNEL_DEVICETREE = "imx6ul-14x14-evk.dtb imx6ul-14x14-evk-csi.dtb imx6ul-14x14-evk-btwifi.dtb"
 
 UBOOT_SUFFIX = "img"
conf/machine/imx7dsabresd.conf +2 -2
index 673207f..5d74997 100644
@@ -4,13 +4,13 @@
 #@DESCRIPTION: Machine configuration for Freescale i.MX7D SABRE Smart Device
 #@MAINTAINER: Lauren Post <[email protected]>
 
+MACHINEOVERRIDES =. "mx7:mx7d:"
+
 require conf/machine/include/imx-base.inc
 require conf/machine/include/tune-cortexa7.inc
 
 MACHINE_FEATURES += " pci wifi bluetooth"
 
-SOC_FAMILY = "mx7:mx7d"
-
 KERNEL_DEVICETREE = "imx7d-sdb.dtb imx7d-sdb-epdc.dtb imx7d-sdb-gpmi-weim.dtb \
                      imx7d-sdb-m4.dtb imx7d-sdb-mipi-dsi.dtb imx7d-sdb-qspi.dtb \
                      imx7d-sdb-reva.dtb imx7d-sdb-reva-epdc.dtb imx7d-sdb-reva-gpmi-weim.dtb \
conf/machine/include/imx-base.inc +0 -2
index 1d7993c..a6db038 100644
@@ -3,8 +3,6 @@
 include conf/machine/include/fsl-default-settings.inc
 include conf/machine/include/fsl-default-versions.inc
 
-include conf/machine/include/soc-family.inc
-
 # Set specific make target and binary suffix
 PREFERRED_PROVIDER_u-boot ??= "u-boot-fslc"
 PREFERRED_PROVIDER_virtual/bootloader ??= "u-boot-fslc"
conf/machine/include/qoriq-arm.inc +0 -2
index 20a7594..2ae1963 100644
@@ -1,5 +1,3 @@
-require conf/machine/include/soc-family.inc
-
 # Freescale BSP default providers
 PREFERRED_PROVIDER_u-boot_ls102xa ?= "u-boot-ls1"
 PREFERRED_PROVIDER_virtual/bootloader_ls102xa ?= "u-boot-ls1"
conf/machine/ls1021atwr.conf +2 -2
index 4478e95..2cf5916 100644
@@ -4,11 +4,11 @@
 #@DESCRIPTION: Machine configuration for running LS1021ATWR in 32-bit mode
 #@MAINTAINER: Zhenhua Luo <[email protected]>
 
+MACHINEOVERRIDES =. "ls102xa:"
+
 require conf/machine/include/qoriq-arm.inc
 require conf/machine/include/tune-cortexa7.inc
 
-SOC_FAMILY = "ls102xa"
-
 UBOOT_CONFIG ??= "nor"
 UBOOT_CONFIG[nor] = "ls1021atwr_nor_config"
 UBOOT_CONFIG[sdcard] = "ls1021atwr_sdcard_config,sdcard"
conf/machine/twr-vf65gs10.conf +2 -2
index dd5a21a..c14ee5b 100644
@@ -4,11 +4,11 @@
 #@DESCRIPTION: Machine configuration for Freescale Vybrid TWR-VF65GS10
 #@MAINTAINER: Stefan Agner <[email protected]>
 
+MACHINEOVERRIDES =. "vf:vf60:"
+
 include conf/machine/include/imx-base.inc
 include conf/machine/include/tune-cortexa5.inc
 
-SOC_FAMILY = "vf:vf60"
-
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-fslc"
 
 UBOOT_MACHINE = "vf610twr_config"
qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc +1 -1
index 0efb564..5c4a39c 100644
@@ -2,7 +2,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/qt4:"
 
 python __anonymous () {
     families = ['mx6']
-    cur_families = (d.getVar('SOC_FAMILY', True) or '').split(':')
+    cur_families = (d.getVar('MACHINEOVERRIDES', True) or '').split(':')
     if any(map(lambda x: x in cur_families,
                families)):
         d.appendVarFlag('do_configure', 'depends', ' virtual/kernel:do_shared_workdir')
Signature · 1 line
2.9.3
#2 lore raw

PATCH v2 2/16 imx-lib: Stop using generic SoC overrides

In reply to Otavio Salvador

The recipe has been changed to use the SoC specific override. It makes the recipe easier to read and to maintain.

---

Changes in v2: None

 recipes-bsp/imx-lib/imx-lib.inc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
recipes-bsp/imx-lib/imx-lib.inc +4 -2
index ff42713..0b21d94 100644
@@ -1,4 +1,5 @@
 # Copyright (C) 2012-2013 Freescale Semiconductor
+# Copyright (C) 2012-2016 O.S. Systems Software LTDA.
 
 DESCRIPTION = "Platform specific libraries for imx platform"
 LICENSE = "LGPLv2.1"
@@ -7,10 +8,11 @@ DEPENDS = "virtual/kernel"
 
 LIC_FILES_CHKSUM = "file://COPYING-LGPL-2.1;md5=fbc093901857fcd118f065f900982c24"
 
-PLATFORM_mx6 = "IMX6Q"
+PLATFORM_mx6q  = "IMX6Q"
+PLATFORM_mx6dl = "IMX6Q"
 PLATFORM_mx6sl = "IMX6S"
 PLATFORM_mx6sx = "IMX6S"
-PLATFORM_mx7   = "IMX7"
+PLATFORM_mx7d  = "IMX7"
 PLATFORM_mx6ul = "IMX6UL"
 
 PARALLEL_MAKE="-j 1"
Signature · 1 line
2.9.3
#3 lore raw

PATCH v2 3/16 imx-test: Stop using generic SoC overrides

In reply to Otavio Salvador

The recipe has been changed to use the SoC specific override. It makes the recipe easier to read and to maintain.

---

Changes in v2: None

 recipes-bsp/imx-test/imx-test.inc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
recipes-bsp/imx-test/imx-test.inc +4 -3
index f0b26a1..ce24860 100644
@@ -9,7 +9,7 @@ DEPENDS_mx6dl = "virtual/kernel imx-lib imx-vpu"
 DEPENDS_mx6sl = "virtual/kernel imx-lib"
 DEPENDS_mx6sx = "virtual/kernel imx-lib"
 DEPENDS_mx6ul = "virtual/kernel imx-lib"
-DEPENDS_mx7   = "virtual/kernel imx-lib"
+DEPENDS_mx7d  = "virtual/kernel imx-lib"
 
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
@@ -23,10 +23,11 @@ inherit module-base
 INHIBIT_PACKAGE_STRIP = "1"
 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
 
-PLATFORM_mx6 = "IMX6Q"
+PLATFORM_mx6q  = "IMX6Q"
+PLATFORM_mx6dl = "IMX6Q"
 PLATFORM_mx6sl = "IMX6SL"
 PLATFORM_mx6sx = "IMX6SX"
-PLATFORM_mx7 = "IMX7D"
+PLATFORM_mx7d  = "IMX7D"
 PLATFORM_mx6ul = "IMX6UL"
 
 PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
Signature · 1 line
2.9.3
#4 lore raw

PATCH v2 4/16 machine-overrides-extender.bbclass: Automatically set extend the MACHINEOVERRIDES

In reply to Otavio Salvador

This allow to grouping of different settings for similar platforms.

To use the class, specify, for example:

MACHINEOVERRIDES_EXTENDER_soc = "group1:group2"

---

Changes in v2:
- Use BitBake event to insert the extends

 classes/machine-overrides-extender.bbclass | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 classes/machine-overrides-extender.bbclass
classes/machine-overrides-extender.bbclass new file +29 -0
new file mode 100644
index 0000000..89ff99c
@@ -0,0 +1,29 @@
+# -*- python -*-
+# Automatically set extend the MACHINEOVERRIDES
+#
+# This allow to grouping of different settings for similar platforms.
+#
+# To use the class, specify, for example:
+#
+# MACHINEOVERRIDES_EXTENDER_soc = "group1:group2"
+#
+# Copyright 2016 (C) O.S. Systems Software LTDA.
+
+def machine_overrides_extender(d):
+    machine_overrides = (d.getVar('MACHINEOVERRIDES', True) or '').split(':')
+    for o in machine_overrides:
+        extender = d.getVar('MACHINEOVERRIDES_EXTENDER_%s' % o, True)
+        if extender:
+            extender = extender.split(':')
+            extender.reverse()
+            if not set(extender).issubset(set(machine_overrides)):
+                index = machine_overrides.index(o)
+                for e in extender:
+                    machine_overrides.insert(index, e)
+    d.setVar('MACHINEOVERRIDES', ':'.join(machine_overrides))
+
+python machine_overrides_extender_handler() {
+    machine_overrides_extender(e.data)
+}
+machine_overrides_extender_handler[eventmask] = "bb.event.ConfigParsed"
+addhandler machine_overrides_extender_handler
Signature · 1 line
2.9.3
#5 lore raw

PATCH v2 5/16 imx-base.inc: Enable machine overrides extender for i.MX6

In reply to Otavio Salvador

This enables the machine overrides extender for the i.MX6 devices. It maps (spaces are used to easy the read):

- mx6q -> imxipu imxvpu imxgpu2d imxgpu3d
- mx6dl -> imxpxp imxipu imxvpu imxgpu2d imxgpu3d imxepdc
- mx6sx -> imxpxp imxgpu2d imxgpu3d
- mx6sl -> imxpxp imxgpu2d imxepdc
- mx6ul -> imxpxp
- mx7d -> imxpxp imxepdc

So it allows for reusing of overrides while keeps this control at the BSP side.

---

Changes in v2: None

 conf/machine/include/imx-base.inc | 9 +++++++++
 1 file changed, 9 insertions(+)
conf/machine/include/imx-base.inc +9 -0
index a6db038..b54b7f5 100644
@@ -48,6 +48,15 @@ DEFAULTTUNE_mx6ul ?= "cortexa7thf-neon"
 DEFAULTTUNE_mx7 ?= "cortexa7thf-neon"
 DEFAULTTUNE_vf ?= "cortexa5thf-neon"
 
+INHERIT += "machine-overrides-extender"
+
+MACHINEOVERRIDES_EXTENDER_mx6q  = "imxipu:imxvpu:imxgpu2d:imxgpu3d"
+MACHINEOVERRIDES_EXTENDER_mx6dl = "imxpxp:imxipu:imxvpu:imxgpu2d:imxgpu3d:imxepdc"
+MACHINEOVERRIDES_EXTENDER_mx6sx = "imxpxp:imxgpu2d:imxgpu3d"
+MACHINEOVERRIDES_EXTENDER_mx6sl = "imxpxp:imxgpu2d:imxepdc"
+MACHINEOVERRIDES_EXTENDER_mx6ul = "imxpxp"
+MACHINEOVERRIDES_EXTENDER_mx7d  = "imxpxp:imxepdc"
+
 # Sub-architecture support
 MACHINE_SOCARCH_SUFFIX ?= ""
 MACHINE_SOCARCH_SUFFIX_mx6q = "-mx6qdl"
Signature · 1 line
2.9.3
#6 lore raw

PATCH v2 6/16 chromium: Refactor code to use the the new overrides

In reply to Otavio Salvador

The recipe has been reworked to use the 'imxvpu' feature override.

---

Changes in v2: None

 browser-layer/recipes-browser/chromium/chromium-imx.inc              | 3 +--
 browser-layer/recipes-browser/chromium/chromium_48.0.2548.0.bbappend | 5 +----
 2 files changed, 2 insertions(+), 6 deletions(-)
browser-layer/recipes-browser/chromium/chromium-imx.inc +1 -2
index 6b63165..f8ba268 100644
@@ -1,5 +1,4 @@
-DEPENDS_append_mx6q = " imx-vpuwrap"
-DEPENDS_append_mx6dl = " imx-vpuwrap"
+DEPENDS_append_imxvpu = " imx-vpuwrap"
 
 # Additional imx code and patches are included in the chromium-imx git repository.
 # The code below fetches this repository, copies the extra source over to the main
browser-layer/recipes-browser/chromium/chromium_48.0.2548.0.bbappend +1 -4
index 8c8f801..54a0a99 100644
@@ -4,9 +4,6 @@ CHROMIUM_IMX_BRANCH = "master"
 CHROMIUM_IMX_SRCREV = "4a2d15ab899b9944bb3adb2ddd250530da5b2e1a"
 CHROMIUM_IMX_COMMON_PATCHES += "file://${PATCH_BASE_DIR}/common/0001-Enable-share-group-workaround-for-Vivante-GPUs.patch"
 
-VPU_PATCHES = "file://${PATCH_BASE_DIR}/common/0002-Add-VPU-video-decode-accelerator-to-Chromium-GPU-.patch"
-
-CHROMIUM_IMX_VPU_PATCHES_mx6q += "${VPU_PATCHES}"
-CHROMIUM_IMX_VPU_PATCHES_mx6dl += "${VPU_PATCHES}"
+CHROMIUM_IMX_VPU_PATCHES_imxvpu += "file://${PATCH_BASE_DIR}/common/0002-Add-VPU-video-decode-accelerator-to-Chromium-GPU-.patch"
 
 CHROMIUM_IMX_WAYLAND_PATCHES += "file://${PATCH_BASE_DIR}/wayland/0001-Modify-eglwayland-versions-for-Vivante-GPUs.patch"
Signature · 1 line
2.9.3
#7 lore raw

PATCH v2 7/16 glmark2: Refactor code to use the new overrides

In reply to Otavio Salvador

The recipe has been reworked to use the 'imxgpu2d' and 'imxgpu3d' feature overrides, while on that, the '_remove' operator usage has been removed as it is impossible to override using a bbappend file.

---

Changes in v2: None

 openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend +4 -4
index 69106a7..b579028 100644
@@ -1,4 +1,4 @@
-PACKAGECONFIG_mx6 = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland opengl', 'wayland-gles2', \
-                        bb.utils.contains('DISTRO_FEATURES', 'x11 opengl',     'x11-gl x11-gles2', \
-                                                                               '', d), d)}"
-PACKAGECONFIG_remove_mx6sl = "wayland-gles2 x11-gles2"
+PACKAGECONFIG_imxgpu3d = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland opengl', 'wayland-gles2', \
+                                bb.utils.contains('DISTRO_FEATURES', 'x11 opengl',     'x11-gl x11-gles2', '', d), d)}"
+PACKAGECONFIG_imxgpu2d = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland opengl', '', \
+                                bb.utils.contains('DISTRO_FEATURES', 'x11 opengl',     'x11-gl', '', d), d)}"
Signature · 1 line
2.9.3
#8 lore raw

PATCH v2 8/16 qtbase: Refactor code to use the new overrides

In reply to Otavio Salvador

The recipe has been reworked to use the 'imxgpu2d' and 'imxgpu3d' feature overrides. While on that, the i.MX6SL specific code has been reworked to used when only 2D GPU support is available.

---

Changes in v2: None

 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)
qt5-layer/recipes-qt/qt5/qtbase_%.bbappend +8 -11
index d336c0f..fd7cc39 100644
@@ -1,25 +1,22 @@
 # Copyright (C) 2013 Eric Bénard - Eukréa Electromatique
+# Copyright (C) 2016 O.S. Systems Software LTDA.
 
 HAS_X11 = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 1, 0, d)}"
 
-IS_MX6SL = "0"
-IS_MX6SL_mx6sl = "1"
+IMXGPU_imxgpu3d = "3d"
+IMXGPU_imxgpu2d = "2d"
 
-PACKAGECONFIG_GL_mx6q = "gles2"
-PACKAGECONFIG_GL_mx6dl = "gles2"
-PACKAGECONFIG_GL_mx6sx = "gles2"
-PACKAGECONFIG_GL_mx6sl = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' gl', '', d)}"
-QT_CONFIG_FLAGS_append_mx6q = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' -no-eglfs', ' -eglfs', d)}"
-QT_CONFIG_FLAGS_append_mx6dl = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' -no-eglfs', ' -eglfs', d)}"
-QT_CONFIG_FLAGS_append_mx6sx = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' -no-eglfs', ' -eglfs', d)}"
-QT_CONFIG_FLAGS_append_mx6sl = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' -no-eglfs', \
+PACKAGECONFIG_GL_imxgpu3d = "gles2"
+PACKAGECONFIG_GL_imxgpu2d = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' gl', '', d)}"
+QT_CONFIG_FLAGS_append_imxgpu3d = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' -no-eglfs', ' -eglfs', d)}"
+QT_CONFIG_FLAGS_append_imxgpu2d = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' -no-eglfs', \
                                                  ' -no-opengl -linuxfb -no-eglfs', d)}"
 
 do_configure_prepend_mx6() {
     # adapt qmake.conf to our needs
     sed -i 's!load(qt_config)!!' ${S}/mkspecs/linux-oe-g++/qmake.conf
     if test ${HAS_X11} -eq 0; then
-        if test ${IS_MX6SL} -eq 0; then
+        if [ "${IMXGPU}" = "3d"; then
     
             cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
 IMX6_CFLAGS             = -DLINUX=1 -DEGL_API_FB=1
Signature · 1 line
2.9.3
#9 lore raw

PATCH v2 9/16 cairo: Refactor code to use the new overrides

In reply to Otavio Salvador

The recipe has been reworked to use the 'imxgpu2d' and 'imxgpu3d' feature overrides.

---

Changes in v2: None

 recipes-graphics/cairo/cairo_%.bbappend | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
recipes-graphics/cairo/cairo_%.bbappend +9 -7
index 6f9e09d..c062dba 100644
@@ -1,8 +1,10 @@
-CFLAGS_append_mx6 = " -DLINUX \
-                      ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', \
-                                        bb.utils.contains('DISTRO_FEATURES', 'wayland', \
-                                                      '-DEGL_API_FB -DEGL_API_WL',  '-DEGL_API_FB', d), d)}"
+CFLAGS_append_imxgpu2d = " \
+    -DLINUX \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', \
+                          '', \
+                          bb.utils.contains('DISTRO_FEATURES', 'wayland', \
+                                            '-DEGL_API_FB -DEGL_API_WL', \
+                                            '-DEGL_API_FB', d), d)} \
+"
 
-PACKAGECONFIG_append_mx6q = " egl glesv2"
-PACKAGECONFIG_append_mx6dl = " egl glesv2"
-PACKAGECONFIG_append_mx6sx = " egl glesv2"
+PACKAGECONFIG_append_imxgpu3d = " egl glesv2"
Signature · 1 line
2.9.3
#10 lore raw

PATCH v2 10/16 eglinfo: Refactor code to use the new overrides

In reply to Otavio Salvador

The recipe has been reworked to use the 'imxgpu3d' feature override.

---

Changes in v2: None

 recipes-graphics/eglinfo/eglinfo-fb_%.bbappend  | 4 +---
 recipes-graphics/eglinfo/eglinfo-x11_%.bbappend | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)
recipes-graphics/eglinfo/eglinfo-fb_%.bbappend +1 -3
index 0fd6781..7aa0e50 100644
@@ -1,4 +1,2 @@
 # Set i.MX specific dependencies and device type
-EGLINFO_DEVICE_mx6q  = "imx6"
-EGLINFO_DEVICE_mx6dl = "imx6"
-EGLINFO_DEVICE_mx6sx = "imx6"
+EGLINFO_DEVICE_imxgpu3d = "imx6"
recipes-graphics/eglinfo/eglinfo-x11_%.bbappend +1 -3
index 0fd6781..7aa0e50 100644
@@ -1,4 +1,2 @@
 # Set i.MX specific dependencies and device type
-EGLINFO_DEVICE_mx6q  = "imx6"
-EGLINFO_DEVICE_mx6dl = "imx6"
-EGLINFO_DEVICE_mx6sx = "imx6"
+EGLINFO_DEVICE_imxgpu3d = "imx6"
Signature · 1 line
2.9.3
#11 lore raw

PATCH v2 11/16 imx-gpu-viv: Refactor code to use the new overrides

In reply to Otavio Salvador

The recipe has been reworked to use the 'imxgpu2d' and 'imxgpu3d' feature overrides. While on that, the i.MX6SL specific code has been reworked to used when only 2D GPU support is available.

---

Changes in v2: None

 recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc +6 -7
index e99c4a1..8536461 100644
@@ -13,9 +13,7 @@ DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxd
             libpng"
 
 EXTRA_PROVIDES = ""
-EXTRA_PROVIDES_mx6q  = " virtual/libgl virtual/libgles1 virtual/libgles2"
-EXTRA_PROVIDES_mx6dl  = " virtual/libgl virtual/libgles1 virtual/libgles2"
-EXTRA_PROVIDES_mx6sx  = " virtual/libgl virtual/libgles1 virtual/libgles2"
+EXTRA_PROVIDES_imxgpu3d = " virtual/libgl virtual/libgles1 virtual/libgles2"
 PROVIDES += "virtual/wayland-egl virtual/libgal-x11 virtual/egl virtual/libopenvg virtual/libg2d ${EXTRA_PROVIDES}"
 
 PE = "1"
@@ -94,8 +92,8 @@ python __anonymous() {
         d.appendVar("RCONFLICTS_" + fullp, pkgs)
 }
 
-IS_MX6SL = "0"
-IS_MX6SL_mx6sl = "1"
+IMXGPU_imxgpu3d = "3d"
+IMXGPU_imxgpu2d = "2d"
 
 do_install () {
     install -d ${D}${libdir}
@@ -182,8 +180,9 @@ do_install () {
         find ${D}${libdir} -name "*.$backend.so" -exec rm '{}' ';'
     done
 
-    # FIXME: MX6SL does not have 3D support; hack it for now
-    if [ "${IS_MX6SL}" = "1" ]; then
+    # FIXME: For 2D only GPU, we need to remove some content which is
+    #        3D specific.
+    if [ "${IMXGPU}" = "2d" ]; then
         rm -rf ${D}${libdir}/libCLC* ${D}${includedir}/CL \
                \
                ${D}${libdir}/libGL* ${D}${includedir}/GL* \ 
Signature · 1 line
2.9.3
#12 lore raw

Re: [meta-fsl-arm PATCH v2 11/16] imx-gpu-viv: Refactor code to use the new overrides

Quoted 31 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Thursday, September 01, 2016 5:21 PM

The recipe has been reworked to use the 'imxgpu2d' and 'imxgpu3d' feature overrides. While on that, the i.MX6SL specific code has been reworked to used when only 2D GPU support is available.

---

Changes in v2: None

 recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc +1 -3
index e99c4a1..8536461 100644
@@ -13,9 +13,7 @@ DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxd
             libpng"
 
 EXTRA_PROVIDES = ""
-EXTRA_PROVIDES_mx6q  = " virtual/libgl virtual/libgles1 virtual/libgles2"
-EXTRA_PROVIDES_mx6dl  = " virtual/libgl virtual/libgles1 virtual/libgles2"
-EXTRA_PROVIDES_mx6sx  = " virtual/libgl virtual/libgles1 virtual/libgles2"
+EXTRA_PROVIDES_imxgpu3d = " virtual/libgl virtual/libgles1 virtual/libgles2"
 PROVIDES += "virtual/wayland-egl virtual/libgal-x11 virtual/egl virtual/libopenvg virtual/libg2d ${EXTRA_PROVIDES}"
 
 PE = "1"

recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc python __anonymous() { · line 96

Quoted 7 lines
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc +2 -2
@@ -94,8 +92,8 @@ python __anonymous() {
         d.appendVar("RCONFLICTS_" + fullp, pkgs)
 }
 
-IS_MX6SL = "0"
-IS_MX6SL_mx6sl = "1"
+IMXGPU_imxgpu3d = "3d"
+IMXGPU_imxgpu2d = "2d"

I thought the 'bare' variable was required as well, no?

IMXGPU = ""

Otherwise, I'm not sure if I understand the logic of the 2d/3d overrides. It looks like the intent is that we will have two cases, either 2d only or 2d and 3d, right? Perhaps a variable name change would make this logic a bit clearer:

IMXGPU2D_ONLY = "yes"
IMXGPU2D_ONLY_imxgpu3d = "no"

Quoted 17 lines
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc +3 -3
 do_install () {
     install -d ${D}${libdir}
@@ -182,8 +180,9 @@ do_install () {
         find ${D}${libdir} -name "*.$backend.so" -exec rm '{}' ';'
     done
 
-    # FIXME: MX6SL does not have 3D support; hack it for now
-    if [ "${IS_MX6SL}" = "1" ]; then
+    # FIXME: For 2D only GPU, we need to remove some content which is
+    #        3D specific.
+    if [ "${IMXGPU}" = "2d" ]; then
         rm -rf ${D}${libdir}/libCLC* ${D}${includedir}/CL \
                \
                ${D}${libdir}/libGL* ${D}${includedir}/GL* \
--

2.9.3

#13 lore raw

Re: [meta-fsl-arm PATCH v2 11/16] imx-gpu-viv: Refactor code to use the new overrides

Quoted 41 lines · Tom Hochstein
Quoted 31 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Thursday, September 01, 2016 5:21 PM

The recipe has been reworked to use the 'imxgpu2d' and 'imxgpu3d' feature overrides. While on that, the i.MX6SL specific code has been reworked to used when only 2D GPU support is available.

---

Changes in v2: None

 recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc +1 -3
index e99c4a1..8536461 100644
@@ -13,9 +13,7 @@ DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxd
             libpng"
 
 EXTRA_PROVIDES = ""
-EXTRA_PROVIDES_mx6q  = " virtual/libgl virtual/libgles1 virtual/libgles2"
-EXTRA_PROVIDES_mx6dl  = " virtual/libgl virtual/libgles1 virtual/libgles2"
-EXTRA_PROVIDES_mx6sx  = " virtual/libgl virtual/libgles1 virtual/libgles2"
+EXTRA_PROVIDES_imxgpu3d = " virtual/libgl virtual/libgles1 virtual/libgles2"
 PROVIDES += "virtual/wayland-egl virtual/libgal-x11 virtual/egl virtual/libopenvg virtual/libg2d ${EXTRA_PROVIDES}"
 
 PE = "1"

recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc python __anonymous() { · line 96

Quoted 7 lines
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc +2 -2
@@ -94,8 +92,8 @@ python __anonymous() {
         d.appendVar("RCONFLICTS_" + fullp, pkgs)
 }
 
-IS_MX6SL = "0"
-IS_MX6SL_mx6sl = "1"
+IMXGPU_imxgpu3d = "3d"
+IMXGPU_imxgpu2d = "2d"

I thought the 'bare' variable was required as well, no?

Quoted 3 lines

IMXGPU = ""

Otherwise, I'm not sure if I understand the logic of the 2d/3d overrides. It looks like the intent is that we will have two cases, either 2d only or 2d and 3d, right? Perhaps a variable name change would make this logic a bit clearer:

Only if it is possible to have other value and this is not the case here.

Quoted 2 lines

IMXGPU2D_ONLY = "yes"
IMXGPU2D_ONLY_imxgpu3d = "no"

IMXGPU = "2d" or "3d" is clear enough no?

Quoted 11 lines

recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc do_install () { · line 185

Quoted 11 lines
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc +3 -2
 do_install () {
     install -d ${D}${libdir}
@@ -182,8 +180,9 @@ do_install () {
         find ${D}${libdir} -name "*.$backend.so" -exec rm '{}' ';'
     done
 
-    # FIXME: MX6SL does not have 3D support; hack it for now
-    if [ "${IS_MX6SL}" = "1" ]; then
+    # FIXME: For 2D only GPU, we need to remove some content which is
+    #        3D specific.
+    if [ "${IMXGPU}" = "2d" ]; then

and this is also clear here.

Quoted 6 lines
Quoted 5 lines
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc +0 -1
         rm -rf ${D}${libdir}/libCLC* ${D}${includedir}/CL \
                \
                ${D}${libdir}/libGL* ${D}${includedir}/GL* \
--

2.9.3

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#14 lore raw

Re: [meta-fsl-arm PATCH v2 11/16] imx-gpu-viv: Refactor code to use the new overrides

Quoted 68 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Tuesday, September 06, 2016 9:54 AM
To: Tom Hochstein <[email protected]>
Cc: Otavio Salvador <[email protected]>; meta-freescale Mailing List <[email protected]>; Neena Busireddy <[email protected]>; Daiane Angolini <[email protected]>; Prabhu Sundararaj <[email protected]>; Zhenhua Luo <[email protected]>; White Weng <[email protected]>; Lauren Post <[email protected]>
Subject: Re: [meta-fsl-arm PATCH v2 11/16] imx-gpu-viv: Refactor code to use the new overrides

Quoted 41 lines · Tom Hochstein
Quoted 31 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Thursday, September 01, 2016 5:21 PM

The recipe has been reworked to use the 'imxgpu2d' and 'imxgpu3d' feature overrides. While on that, the i.MX6SL specific code has been reworked to used when only 2D GPU support is available.

---

Changes in v2: None

 recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc +1 -3
index e99c4a1..8536461 100644
@@ -13,9 +13,7 @@ DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxd
             libpng"
 
 EXTRA_PROVIDES = ""
-EXTRA_PROVIDES_mx6q  = " virtual/libgl virtual/libgles1 virtual/libgles2"
-EXTRA_PROVIDES_mx6dl  = " virtual/libgl virtual/libgles1 virtual/libgles2"
-EXTRA_PROVIDES_mx6sx  = " virtual/libgl virtual/libgles1 virtual/libgles2"
+EXTRA_PROVIDES_imxgpu3d = " virtual/libgl virtual/libgles1 virtual/libgles2"
 PROVIDES += "virtual/wayland-egl virtual/libgal-x11 virtual/egl virtual/libopenvg virtual/libg2d ${EXTRA_PROVIDES}"
 
 PE = "1"

recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc python __anonymous() { · line 96

Quoted 7 lines
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc +2 -2
@@ -94,8 +92,8 @@ python __anonymous() {
         d.appendVar("RCONFLICTS_" + fullp, pkgs)
 }
 
-IS_MX6SL = "0"
-IS_MX6SL_mx6sl = "1"
+IMXGPU_imxgpu3d = "3d"
+IMXGPU_imxgpu2d = "2d"

I thought the 'bare' variable was required as well, no?

Quoted 3 lines

IMXGPU = ""

Otherwise, I'm not sure if I understand the logic of the 2d/3d overrides. It looks like the intent is that we will have two cases, either 2d

only or 2d and 3d, right? Perhaps a variable name change would make this logic a bit clearer:

Only if it is possible to have other value and this is not the case here.

Quoted 2 lines

IMXGPU2D_ONLY = "yes"
IMXGPU2D_ONLY_imxgpu3d = "no"

IMXGPU = "2d" or "3d" is clear enough no?

Quoted 6 lines
Quoted 6 lines
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc +0 -0
 do_install () {
     install -d ${D}${libdir}
@@ -182,8 +180,9 @@ do_install () {
         find ${D}${libdir} -name "*.$backend.so" -exec rm '{}' ';'
     done
 
Quoted 7 lines
Quoted 5 lines

recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc do_install () { · line 185

Quoted 5 lines
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc +3 -2
-    # FIXME: MX6SL does not have 3D support; hack it for now
-    if [ "${IS_MX6SL}" = "1" ]; then
+    # FIXME: For 2D only GPU, we need to remove some content which is
+    #        3D specific.
+    if [ "${IMXGPU}" = "2d" ]; then

and this is also clear here.

The logic looks like 'gpu has 2d', but In fact what it is doing is 'gpu does not have 3d', right? This is not clear at all.

Quoted 12 lines
Quoted 7 lines
Quoted 6 lines
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc +0 -1
         rm -rf ${D}${libdir}/libCLC* ${D}${includedir}/CL \
                \
                ${D}${libdir}/libGL* ${D}${includedir}/GL* \
--

2.9.3

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750

#15 lore raw

Re: [meta-fsl-arm PATCH v2 11/16] imx-gpu-viv: Refactor code to use the new overrides

Quoted 76 lines · Tom Hochstein
Quoted 68 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Tuesday, September 06, 2016 9:54 AM
To: Tom Hochstein <[email protected]>
Cc: Otavio Salvador <[email protected]>; meta-freescale Mailing List <[email protected]>; Neena Busireddy <[email protected]>; Daiane Angolini <[email protected]>; Prabhu Sundararaj <[email protected]>; Zhenhua Luo <[email protected]>; White Weng <[email protected]>; Lauren Post <[email protected]>
Subject: Re: [meta-fsl-arm PATCH v2 11/16] imx-gpu-viv: Refactor code to use the new overrides

Quoted 41 lines · Tom Hochstein
Quoted 31 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Thursday, September 01, 2016 5:21 PM

The recipe has been reworked to use the 'imxgpu2d' and 'imxgpu3d' feature overrides. While on that, the i.MX6SL specific code has been reworked to used when only 2D GPU support is available.

---

Changes in v2: None

 recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc +1 -3
index e99c4a1..8536461 100644
@@ -13,9 +13,7 @@ DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxd
             libpng"
 
 EXTRA_PROVIDES = ""
-EXTRA_PROVIDES_mx6q  = " virtual/libgl virtual/libgles1 virtual/libgles2"
-EXTRA_PROVIDES_mx6dl  = " virtual/libgl virtual/libgles1 virtual/libgles2"
-EXTRA_PROVIDES_mx6sx  = " virtual/libgl virtual/libgles1 virtual/libgles2"
+EXTRA_PROVIDES_imxgpu3d = " virtual/libgl virtual/libgles1 virtual/libgles2"
 PROVIDES += "virtual/wayland-egl virtual/libgal-x11 virtual/egl virtual/libopenvg virtual/libg2d ${EXTRA_PROVIDES}"
 
 PE = "1"

recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc python __anonymous() { · line 96

Quoted 7 lines
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc +2 -2
@@ -94,8 +92,8 @@ python __anonymous() {
         d.appendVar("RCONFLICTS_" + fullp, pkgs)
 }
 
-IS_MX6SL = "0"
-IS_MX6SL_mx6sl = "1"
+IMXGPU_imxgpu3d = "3d"
+IMXGPU_imxgpu2d = "2d"

I thought the 'bare' variable was required as well, no?

Quoted 3 lines

IMXGPU = ""

Otherwise, I'm not sure if I understand the logic of the 2d/3d overrides. It looks like the intent is that we will have two cases, either 2d

only or 2d and 3d, right? Perhaps a variable name change would make this logic a bit clearer:

Only if it is possible to have other value and this is not the case here.

Quoted 2 lines

IMXGPU2D_ONLY = "yes"
IMXGPU2D_ONLY_imxgpu3d = "no"

IMXGPU = "2d" or "3d" is clear enough no?

Quoted 6 lines
Quoted 6 lines
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc +0 -0
 do_install () {
     install -d ${D}${libdir}
@@ -182,8 +180,9 @@ do_install () {
         find ${D}${libdir} -name "*.$backend.so" -exec rm '{}' ';'
     done
 
Quoted 7 lines
Quoted 5 lines

recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc do_install () { · line 185

Quoted 5 lines
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc +3 -2
-    # FIXME: MX6SL does not have 3D support; hack it for now
-    if [ "${IS_MX6SL}" = "1" ]; then
+    # FIXME: For 2D only GPU, we need to remove some content which is
+    #        3D specific.
+    if [ "${IMXGPU}" = "2d" ]; then

and this is also clear here.

Quoted 1 line

The logic looks like 'gpu has 2d', but In fact what it is doing is 'gpu does not have 3d', right? This is not clear at all.

This is a HACK! and ought to be fixed by the GPU Team; ideally we should have different tarballs or subdirs for it. I used same logic here as I did in Qt Base recipe.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#16 lore raw

PATCH v2 12/16 mesa-gl: Refactor code to use the new overrides

In reply to Otavio Salvador

The recipe has been reworked to use the 'imxgpu2d' feature override. This override has been taken as it is the common only on the matching overrides.

---

Changes in v2: None

 recipes-graphics/mesa/mesa-gl_%.bbappend | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
recipes-graphics/mesa/mesa-gl_%.bbappend +1 -4
index 881702e..465c893 100644
@@ -1,4 +1 @@
-COMPATIBLE_MACHINE_mx6q  = "(-)"
-COMPATIBLE_MACHINE_mx6dl = "(-)"
-COMPATIBLE_MACHINE_mx6sx = "(-)"
-COMPATIBLE_MACHINE_mx6sl = "(-)"
+COMPATIBLE_MACHINE_imxgpu2d = "(-)"
Signature · 1 line
2.9.3
#17 lore raw

PATCH v2 13/16 weston: Refactor code to use the new overrides

In reply to Otavio Salvador

The recipe has been reworked to use the 'imxpxp', 'imxgpu2d' and 'imxgpu3d' feature overrides. While on that, the i.MX6UL specific code has been reworked to used when only PXP-only support is available, fixing the i.MX7D support as well.

---

Changes in v2: None

 recipes-graphics/wayland/weston_%.bbappend | 61 +++++++++++++++---------------
 1 file changed, 31 insertions(+), 30 deletions(-)
recipes-graphics/wayland/weston_%.bbappend +31 -30
index f7bfd35..1b813ab 100644
@@ -1,50 +1,51 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-SRC_URI_append_mx6 = " \
+SRC_URI_append_imxgpu2d = " \
     file://0002-MGS-1111-Add-GPU-VIV-suport-for-wayland-and-weston-1.patch \
     file://0003-MGS-1192-xwld-g2d-compositor-dose-not-work.patch \
     file://0004-MGS-1235-Fix-setenv-and-clear-environments.patch \
     file://0005-MGS-1252-Fix-for-Qt5_CinematicExperience-will-meet-s.patch \
     file://0006-MGS-1236-imx6qp-imx6dl-First-frame-distored-when-som.patch \
     file://0007-MGS-1236-1-imx6qp-imx6dl-First-frame-distored-when-s.patch \
-    "
-PACKAGECONFIG_append_mx6q = " cairo-glesv2"
-PACKAGECONFIG_append_mx6dl = " cairo-glesv2"
-PACKAGECONFIG_append_mx6sx = " cairo-glesv2"
-PACKAGECONFIG_remove_mx6sl = "egl"
-PACKAGECONFIG_remove_mx6ul = "egl"
-
-EXTRA_OECONF_append_mx6 = " \
-    --disable-libunwind \
-    --disable-xwayland-test \
-    WESTON_NATIVE_BACKEND=fbdev-backend.so \
 "
-EXTRA_OECONF_append_mx6ul = " \
+
+PACKAGECONFIG_IMX_TO_APPEND = ""
+PACKAGECONFIG_IMX_TO_APPEND_imxgpu3d = "cairo-glesv2"
+PACKAGECONFIG_IMX_TO_REMOVE = ""
+PACKAGECONFIG_IMX_TO_REMOVE_imxpxp   = "egl"
+PACKAGECONFIG_IMX_TO_REMOVE_imxgpu2d = ""
+
+PACKAGECONFIG_append = " ${PACKAGECONFIG_IMX_TO_APPEND}"
+PACKAGECONFIG_remove = " ${PACKAGECONFIG_IMX_TO_REMOVE}"
+
+
+EXTRA_OECONF_IMX = " \
     --disable-libunwind \
     --disable-xwayland-test \
     WESTON_NATIVE_BACKEND=fbdev-backend.so \
 "
 
-EXTRA_OEMAKE_append_mx6 = " \
+EXTRA_OECONF_append_imxpxp   = " ${EXTRA_OECONF_IMX}"
+EXTRA_OECONF_append_imxgpu2d = " ${EXTRA_OECONF_IMX}"
+
+# Use a intermediate step to configure the linking flags
+IMXGPU_LIBS = ""
+IMXGPU_LIBS_imxgpu2d = " \
+    COMPOSITOR_LIBS="-lEGL -lGAL -lwayland-server -lxkbcommon -lpixman-1" \
+    FB_COMPOSITOR_LIBS="-lEGL -lwayland-server -lxkbcommon" \
+"
+IMXGPU_LIBS_imxgpu3d = " \
+    COMPOSITOR_LIBS="-lGLESv2 -lEGL -lGAL -lwayland-server -lxkbcommon -lpixman-1" \
+    FB_COMPOSITOR_LIBS="-lGLESv2 -lEGL -lwayland-server -lxkbcommon" \
+"
+
+# Use the linking flags according to the GPU support
+EXTRA_OEMAKE_append_imxgpu2d = " \
     COMPOSITOR_CFLAGS="-I ${STAGING_INCDIR}/pixman-1 -DLINUX=1 -DEGL_API_FB -DEGL_API_WL" \
     FB_COMPOSITOR_CFLAGS="-DLINUX=1 -DEGL_API_FB -DEGL_API_WL" \
     SIMPLE_EGL_CLIENT_CFLAGS="-DLINUX -DEGL_API_FB -DEGL_API_WL" \
     EGL_TESTS_CFLAGS="-DLINUX -DEGL_API_FB -DEGL_API_WL" \
     CLIENT_CFLAGS="-I ${STAGING_INCDIR}/cairo -I ${STAGING_INCDIR}/pixman-1 -DLINUX -DEGL_API_FB -DEGL_API_WL" \
-"
-EXTRA_OEMAKE_append_mx6q = " \
-    COMPOSITOR_LIBS="-lGLESv2 -lEGL -lGAL -lwayland-server -lxkbcommon -lpixman-1" \
-    FB_COMPOSITOR_LIBS="-lGLESv2 -lEGL -lwayland-server -lxkbcommon" \
-"
-EXTRA_OEMAKE_append_mx6dl = " \
-    COMPOSITOR_LIBS="-lGLESv2 -lEGL -lGAL -lwayland-server -lxkbcommon -lpixman-1" \
-    FB_COMPOSITOR_LIBS="-lGLESv2 -lEGL -lwayland-server -lxkbcommon" \
-"
-EXTRA_OEMAKE_append_mx6sx = " \
-    COMPOSITOR_LIBS="-lGLESv2 -lEGL -lGAL -lwayland-server -lxkbcommon -lpixman-1" \
-    FB_COMPOSITOR_LIBS="-lGLESv2 -lEGL -lwayland-server -lxkbcommon" \
-"
-EXTRA_OEMAKE_append_mx6sl = " \
-    COMPOSITOR_LIBS="-lEGL -lGAL -lwayland-server -lxkbcommon -lpixman-1" \
-    FB_COMPOSITOR_LIBS="-lEGL -lwayland-server -lxkbcommon" \
+    \
+    ${IMXGPU_LIBS} \
 "
Signature · 1 line
2.9.3
#18 lore raw

PATCH v2 14/16 gstreamer1.0-plugins-imx: Refactor code to use the new overrides

In reply to Otavio Salvador

The recipe has been reworked to use the 'imxpxp', 'imxipu', 'imxvpu' and 'imxgpu2d' feature overrides.

---

Changes in v2: None

 .../gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb              | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb +5 -6
index eb609bb..e7aeff8 100644
@@ -40,12 +40,11 @@ EGLVIVSINK_DEPENDS = " \
        bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \
        '', d),d)}"
 
-PACKAGECONFIG ?= ""
-PACKAGECONFIG_mx6q = "uniaudiodec mp3encoder v4l2src g2d eglvivsink ipu vpu"
-PACKAGECONFIG_mx6dl = "uniaudiodec mp3encoder v4l2src pxp g2d eglvivsink ipu vpu"
-PACKAGECONFIG_mx6sx = "uniaudiodec mp3encoder v4l2src pxp g2d eglvivsink"
-PACKAGECONFIG_mx6sl = "uniaudiodec mp3encoder v4l2src pxp g2d"
-PACKAGECONFIG_mx7 = "uniaudiodec mp3encoder v4l2src pxp"
+PACKAGECONFIG ?= "uniaudiodec mp3encoder v4l2src"
+PACKAGECONFIG_append_imxgpu2d = " g2d eglvivsink"
+PACKAGECONFIG_append_imxipu   = " ipu"
+PACKAGECONFIG_append_imxvpu   = " vpu"
+PACKAGECONFIG_append_imxpxp   = " pxp"
 
 PACKAGECONFIG[g2d] = ",--disable-g2d,imx-gpu-viv"
 PACKAGECONFIG[pxp] = ",--disable-pxp,"
Signature · 1 line
2.9.3
#19 lore raw

Re: [meta-fsl-arm PATCH v2 14/16] gstreamer1.0-plugins-imx: Refactor code to use the new overrides

Quoted 21 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Thursday, September 01, 2016 5:21 PM

The recipe has been reworked to use the 'imxpxp', 'imxipu', 'imxvpu' and 'imxgpu2d' feature overrides.

---

Changes in v2: None

 .../gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb              | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
recipes-multimedia/gstreamer/gstreamer1.0-plugins- renamed from recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb +0 -0

imx_0.12.2.bb
index eb609bb..e7aeff8 100644

recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb +0 -0
@@ -40,12 +40,11 @@ EGLVIVSINK_DEPENDS = " \
        bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \

recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb EGLVIVSINK_DEPENDS = " \ · line 44

Quoted 10 lines
recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb +2 -6
        '', d),d)}"
 
-PACKAGECONFIG ?= ""
-PACKAGECONFIG_mx6q = "uniaudiodec mp3encoder v4l2src g2d eglvivsink ipu vpu"
-PACKAGECONFIG_mx6dl = "uniaudiodec mp3encoder v4l2src pxp g2d eglvivsink ipu vpu"
-PACKAGECONFIG_mx6sx = "uniaudiodec mp3encoder v4l2src pxp g2d eglvivsink"
-PACKAGECONFIG_mx6sl = "uniaudiodec mp3encoder v4l2src pxp g2d"
-PACKAGECONFIG_mx7 = "uniaudiodec mp3encoder v4l2src pxp"
+PACKAGECONFIG ?= "uniaudiodec mp3encoder v4l2src"
+PACKAGECONFIG_append_imxgpu2d = " g2d eglvivsink"

This doesn't look equivalent to me. It adds eglvivsink to mx6sl, right?

Quoted 8 lines
recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb +3 -1
+PACKAGECONFIG_append_imxipu   = " ipu"
+PACKAGECONFIG_append_imxvpu   = " vpu"
+PACKAGECONFIG_append_imxpxp   = " pxp"
 
 PACKAGECONFIG[g2d] = ",--disable-g2d,imx-gpu-viv"
 PACKAGECONFIG[pxp] = ",--disable-pxp,"
--

2.9.3

#20 lore raw

Re: [meta-fsl-arm PATCH v2 14/16] gstreamer1.0-plugins-imx: Refactor code to use the new overrides

Quoted 23 lines · Tom Hochstein
Quoted 23 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Thursday, September 01, 2016 5:21 PM

The recipe has been reworked to use the 'imxpxp', 'imxipu', 'imxvpu' and 'imxgpu2d' feature overrides.

---

Changes in v2: None

 .../gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb              | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
recipes-multimedia/gstreamer/gstreamer1.0-plugins- renamed from recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb +0 -0

imx_0.12.2.bb
index eb609bb..e7aeff8 100644

recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb +0 -0
@@ -40,12 +40,11 @@ EGLVIVSINK_DEPENDS = " \
        bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \
        '', d),d)}"
 
Quoted 10 lines

recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb EGLVIVSINK_DEPENDS = " \ · line 44

Quoted 8 lines
recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb +2 -6
-PACKAGECONFIG ?= ""
-PACKAGECONFIG_mx6q = "uniaudiodec mp3encoder v4l2src g2d eglvivsink ipu vpu"
-PACKAGECONFIG_mx6dl = "uniaudiodec mp3encoder v4l2src pxp g2d eglvivsink ipu vpu"
-PACKAGECONFIG_mx6sx = "uniaudiodec mp3encoder v4l2src pxp g2d eglvivsink"
-PACKAGECONFIG_mx6sl = "uniaudiodec mp3encoder v4l2src pxp g2d"
-PACKAGECONFIG_mx7 = "uniaudiodec mp3encoder v4l2src pxp"
+PACKAGECONFIG ?= "uniaudiodec mp3encoder v4l2src"
+PACKAGECONFIG_append_imxgpu2d = " g2d eglvivsink"

This doesn't look equivalent to me. It adds eglvivsink to mx6sl, right?

Indeed :-) I will fix this for v3 :-D \m/ Thanks for catching it :-)

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#21 lore raw

PATCH v2 15/16 imx-codec: Refactor code to use the new overrides

In reply to Otavio Salvador

The recipe has been reworked to use the 'imxvpu' feature override.

---

Changes in v2: None

 recipes-multimedia/imx-codec/imx-codec.inc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
recipes-multimedia/imx-codec/imx-codec.inc +1 -2
index 7711661..2bbb2e3 100644
@@ -16,8 +16,7 @@ SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true"
 EXTRA_OECONF = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--enable-fhw', '', d)}"
 
 PACKAGECONFIG ?= ""
-PACKAGECONFIG_mx6q = "vpu"
-PACKAGECONFIG_mx6dl = "vpu"
+PACKAGECONFIG_imxvpu = "vpu"
 
 PACKAGECONFIG[vpu] = "--enable-vpu,--disable-vpu,imx-vpu"
 
Signature · 1 line
2.9.3
#22 lore raw

PATCH v2 16/16 gstreamer1.0-plugins-imx: Change EGL platform preference order

In reply to Otavio Salvador

The i.MX BSP now defaults for XWayland when both X11 and Wayland support is available, so we ought to use the Wayland backend for this case as well.

---

Changes in v2:
- New patch.

 recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb +4 -4
index e7aeff8..22ad011 100644
@@ -24,11 +24,11 @@ inherit waf
 do_compile[depends] += "virtual/kernel:do_shared_workdir"
 
 # configure the eglvivsink element to use the appropriate EGL platform code
-# X11 if x11 is present in DISTRO_FEATURES
-# Wayland if x11 is not present in DISTRO_FEATURES, but wayland is
+# Wayland if 'wayland' is present in DISTRO_FEATURES, if not,
+# X11 if x11 is present in DISTRO_FEATURES,
 # Framebuffer otherwise
-EGLVIVSINK_PLATFORM = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', \
-                          bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \
+EGLVIVSINK_PLATFORM = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \
+                          bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', \
                           'fb', d),d)}"
 
 EGL_PLATFORM_CONF = "--egl-platform=${EGLVIVSINK_PLATFORM}"
Signature · 1 line
2.9.3
#23 lore raw
In reply to Otavio Salvador

Hi Otavio,

This looks good, but what do you think of implementing the new items as MACHINE_FEATURES instead of overrides?

Tom

-----Original Message-----
From: Otavio Salvador [mailto:[email protected]]
Sent: Thursday, September 01, 2016 5:20 PM
To: meta-freescale Mailing List <[email protected]>
Cc: Neena Busireddy <[email protected]>; Daiane Angolini <[email protected]>; Prabhu Sundararaj <[email protected]>; Tom Hochstein <[email protected]>; Zhenhua Luo <[email protected]>; White Weng <[email protected]>; Lauren Post <[email protected]>; Otavio Salvador <[email protected]>
Subject: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication

We spent some time trying to come up with something which would make easier to extend the tune-arch support. All we could come up was way too complex or did not work.

Instead We did a MACHINEOVERRIDES extender.

This enables the machine overrides extender for the i.MX6 devices. It maps (spaces are used to easy the read):

- mx6q -> imxipu imxvpu imxgpu2d imxgpu3d
- mx6dl -> imxpxp imxipu imxvpu imxgpu2d imxgpu3d imxepdc
- mx6sx -> imxpxp imxgpu2d imxgpu3d
- mx6sl -> imxpxp imxgpu2d imxepdc
- mx6ul -> imxpxp
- mx7d -> imxpxp imxepdc

So it allows for reusing of overrides while keeps this control at the BSP side. For example, a PACKAGECONFIG setting which is common for mx6q, mx6dl and mx6sx used to look as:

PACKAGECONFIG_mx6q = "option"
PACKAGECONFIG_mx6dl = "option"

Now it can be replaced by:

PACKAGECONFIG_imxvpu = "option"

Changes in v2:
- Use BitBake event to insert the extends
- New patch.

Otavio Salvador (16):
Convert SOC_FAMILY to MACHINEOVERRIDES
imx-lib: Stop using generic SoC overrides
imx-test: Stop using generic SoC overrides machine-overrides-extender.bbclass: Automatically set extend the
MACHINEOVERRIDES
imx-base.inc: Enable machine overrides extender for i.MX6
chromium: Refactor code to use the the new overrides
glmark2: Refactor code to use the new overrides
qtbase: Refactor code to use the new overrides
cairo: Refactor code to use the new overrides
eglinfo: Refactor code to use the new overrides
imx-gpu-viv: Refactor code to use the new overrides
mesa-gl: Refactor code to use the new overrides
weston: Refactor code to use the new overrides gstreamer1.0-plugins-imx: Refactor code to use the new overrides
imx-codec: Refactor code to use the new overrides gstreamer1.0-plugins-imx: Change EGL platform preference order

 .../recipes-browser/chromium/chromium-imx.inc      |  3 +-
 .../chromium/chromium_48.0.2548.0.bbappend         |  5 +-
 classes/machine-overrides-extender.bbclass         | 29 ++++++++++
 conf/machine/imx23evk.conf                         |  4 +-
 conf/machine/imx28evk.conf                         |  4 +-
 conf/machine/imx51evk.conf                         |  4 +-
 conf/machine/imx53ard.conf                         |  4 +-
 conf/machine/imx53qsb.conf                         |  4 +-
 conf/machine/imx6dlsabreauto.conf                  |  4 +-
 conf/machine/imx6dlsabresd.conf                    |  4 +-
 conf/machine/imx6qpsabreauto.conf                  |  4 +-
 conf/machine/imx6qpsabresd.conf                    |  4 +-
 conf/machine/imx6qsabreauto.conf                   |  4 +-
 conf/machine/imx6qsabresd.conf                     |  4 +-
 conf/machine/imx6slevk.conf                        |  4 +-
 conf/machine/imx6solosabreauto.conf                |  4 +-
 conf/machine/imx6solosabresd.conf                  |  4 +-
 conf/machine/imx6sxsabreauto.conf                  |  4 +-
 conf/machine/imx6sxsabresd.conf                    |  4 +-
 conf/machine/imx6ulevk.conf                        |  4 +-
 conf/machine/imx7dsabresd.conf                     |  4 +-
 conf/machine/include/imx-base.inc                  | 11 +++-
 conf/machine/include/qoriq-arm.inc                 |  2 -
 conf/machine/ls1021atwr.conf                       |  4 +-
 conf/machine/twr-vf65gs10.conf                     |  4 +-
 .../recipes-benchmark/glmark2/glmark2_%.bbappend   |  8 +--
 qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc      |  2 +-
 qt5-layer/recipes-qt/qt5/qtbase_%.bbappend         | 19 +++----
 recipes-bsp/imx-lib/imx-lib.inc                    |  6 ++-
 recipes-bsp/imx-test/imx-test.inc                  |  7 +--
 recipes-graphics/cairo/cairo_%.bbappend            | 16 +++---
 recipes-graphics/eglinfo/eglinfo-fb_%.bbappend     |  4 +-
 recipes-graphics/eglinfo/eglinfo-x11_%.bbappend    |  4 +-
 recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc       | 13 +++--
 recipes-graphics/mesa/mesa-gl_%.bbappend           |  5 +-
 recipes-graphics/wayland/weston_%.bbappend         | 61 +++++++++++-----------
 .../gstreamer/gstreamer1.0-plugins-imx_0.12.2.bb   | 19 ++++---
 recipes-multimedia/imx-codec/imx-codec.inc         |  3 +-
 38 files changed, 160 insertions(+), 137 deletions(-)
 create mode 100644 classes/machine-overrides-extender.bbclass
Signature · 1 line
2.9.3
#24 lore raw
Quoted 1 line · Tom Hochstein

This looks good, but what do you think of implementing the new items as MACHINE_FEATURES instead of overrides?

It should be possible indeed however, thinking about it, I think using overrides offers an easier to use mechanism.

For example, using the overrides we can:

PACKAGECONFIG_append_imxgpu3d = " egl"

To use the MACHINE_FEATURES we would need to use:

PACKAGECONFIG_append = " $@{bb.utils.contains('MACHINE_FEATURES', 'imxgpu3d', 'egl', '', d}"

Another benefit is that with the extender, we define the features on a single place (imx-base.inc) and every board using the respective SoC will use it. For machine features we would need to set it in every board which is easy to get wrong.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#25 lore raw
Quoted 5 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Friday, September 02, 2016 5:13 AM

It should be possible indeed however, thinking about it, I think using overrides offers an easier to use mechanism.

It's shorter, but I don't see the difference in syntax as a problem. The 'bb.utils.contains('*FEATURES'' is an existing idiom.

The way I see it is the Yocto framework has a high level construct of machines and a finer grained mechanism for specifying the features supported by a machine.

What you are proposing is to take our list of i.MX-specific 'items' and add them through an extension of the machine mechanism. The downside of this is it dilutes the existing Yocto framework, and makes it harder to understand.

On the other hand, it seems correct to just treat these 'items' as machine features, with no changes to the existing Yocto framework required. Furthermore, by implementing this as a set of machine features, we gain the existing capabilities of the framework, mainly that the user can choose to not use an i.MX machine feature even if it is on his SOC. (See the COMBINED_FEATURES variable.)

Quoted 4 lines

Another benefit is that with the extender, we define the features on a single place (imx-base.inc) and every board using the respective SoC will use it. For machine features we would need to set it in every board which is easy to get wrong.

We would need an extra require line from each machine configuration file to specify the SOC configuration. This line replaces the proposed MACHINEOVERRIDES line in the machine configuration file, and so it is no easier to get wrong.

Tom

#26 lore raw
Quoted 12 lines · Tom Hochstein
Quoted 5 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Friday, September 02, 2016 5:13 AM

It should be possible indeed however, thinking about it, I think using overrides offers an easier to use mechanism.

It's shorter, but I don't see the difference in syntax as a problem. The 'bb.utils.contains('*FEATURES'' is an existing idiom.

The way I see it is the Yocto framework has a high level construct of machines and a finer grained mechanism for specifying the features supported by a machine.

What you are proposing is to take our list of i.MX-specific 'items' and add them through an extension of the machine mechanism. The downside of this is it dilutes the existing Yocto framework, and makes it harder to understand.

Quoted 8 lines

On the other hand, it seems correct to just treat these 'items' as machine features, with no changes to the existing Yocto framework required. Furthermore, by implementing this as a set of machine features, we gain the existing capabilities of the framework, mainly that the user can choose to not use an i.MX machine feature even if it is on his SOC. (See the COMBINED_FEATURES variable.)

Quoted 4 lines

Another benefit is that with the extender, we define the features on a single place (imx-base.inc) and every board using the respective SoC will use it. For machine features we would need to set it in every board which is easy to get wrong.

We would need an extra require line from each machine configuration file to specify the SOC configuration. This line replaces the proposed MACHINEOVERRIDES line in the machine configuration file, and so it is no easier to get wrong.

The MACHINE_FEATURES including that kind of information will have a huge impact on the number of machine specific package. In summary we would not be able to share the binaries across different machines of same SoC. Currently we share the Q, DL binaries as they are binary compatible however if this could change on the board we would need to make they are machine specific (Qt, Chromium, GStreamer, ...)

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#27 lore raw
Quoted 9 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Friday, September 02, 2016 1:55 PM

The MACHINE_FEATURES including that kind of information will have a huge impact on the number of machine specific package. In summary we would not be able to share the binaries across different machines of same SoC. Currently we share the Q, DL binaries as they are binary compatible however if this could change on the board we would need to make they are machine specific (Qt, Chromium, GStreamer, ...)

Not sure I understand. Those recipes work today across different machines, and it seems like using MACHINE_FEATURES doesn't change that at all. Each binary will vary only because of different machine features, so if Q and DL have the same features, the binary will still be compatible. Do I misunderstand how this works?

Tom

#28 lore raw
Quoted 11 lines · Tom Hochstein
Quoted 9 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Friday, September 02, 2016 1:55 PM

The MACHINE_FEATURES including that kind of information will have a huge impact on the number of machine specific package. In summary we would not be able to share the binaries across different machines of same SoC. Currently we share the Q, DL binaries as they are binary compatible however if this could change on the board we would need to make they are machine specific (Qt, Chromium, GStreamer, ...)

Not sure I understand. Those recipes work today across different machines, and it seems like using MACHINE_FEATURES doesn't change that at all. Each binary will vary only because of different machine features, so if Q and DL have the same features, the binary will still be compatible. Do I misunderstand how this works?

Yes; see the packages generated and how we enable the MACHINE_SOCARCH; it shares binaries across same SoC families[1]

1. https://github.com/Freescale/meta-fsl-arm/blob/master/conf/machine/include/imx-base.inc#L53

So what would happens is that all recipes we have on -mx6qdl would change and be MACHINE_ARCH. This is a bad side effect.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#29 lore raw
Quoted 26 lines

-----Original Message-----
From: Otavio Salvador [mailto:[email protected]]
Sent: Friday, September 02, 2016 3:12 PM
To: Tom Hochstein <[email protected]>
Cc: Otavio Salvador <[email protected]>; meta-freescale Mailing List <[email protected]>; Neena Busireddy <[email protected]>; Daiane Angolini <[email protected]>; Prabhu Sundararaj <[email protected]>; Zhenhua Luo <[email protected]>; White Weng <[email protected]>; Lauren Post <[email protected]>
Subject: Re: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication

Quoted 11 lines · Tom Hochstein
Quoted 9 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Friday, September 02, 2016 1:55 PM

The MACHINE_FEATURES including that kind of information will have a huge impact on the number of machine specific package. In summary we would not be able to share the binaries across different machines of same SoC. Currently we share the Q, DL binaries as they are binary compatible however if this could change on the board we would need to make they are machine specific (Qt, Chromium, GStreamer, ...)

Not sure I understand. Those recipes work today across different machines, and it seems like using MACHINE_FEATURES doesn't change

that at all. Each binary will vary only because of different machine features, so if Q and DL have the same features, the binary will still be compatible. Do I misunderstand how this works?

Quoted 7 lines

Yes; see the packages generated and how we enable the MACHINE_SOCARCH; it shares binaries across same SoC families[1]

1. https://github.com/Freescale/meta-fsl-arm/blob/master/conf/machine/include/imx-base.inc#L53

So what would happens is that all recipes we have on -mx6qdl would change and be MACHINE_ARCH. This is a bad side effect.

Okay, so now I know a little about packaging levels :-)

I found a comment in poky packagegroup_base.bb that seems relevant here. It basically says "set PACKAGE_ARCH to MACHINE_ARCH to use MACHINE_FEATURES". I guess that's why there could be a problem since we rely on MACHINE_SOCARCH for increased reuse.

However, I wonder if the rule is overstated and can be relaxed to say "set PACKAGE_ARCH to a machine-specific value to use MACHINE FEATURES". If so then we could continue to use MACHINE_SOCARCH with a MACHINE_FEATURES-based design and no loss of binary reuse.

Tom

#30 lore raw
Quoted 31 lines · Tom Hochstein
Quoted 31 lines

-----Original Message-----
From: Otavio Salvador [mailto:[email protected]]
Sent: Friday, September 02, 2016 3:12 PM
To: Tom Hochstein <[email protected]>
Cc: Otavio Salvador <[email protected]>; meta-freescale Mailing List <[email protected]>; Neena Busireddy <[email protected]>; Daiane Angolini <[email protected]>; Prabhu Sundararaj <[email protected]>; Zhenhua Luo <[email protected]>; White Weng <[email protected]>; Lauren Post <[email protected]>
Subject: Re: [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication

Quoted 11 lines · Tom Hochstein
Quoted 9 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Friday, September 02, 2016 1:55 PM

The MACHINE_FEATURES including that kind of information will have a huge impact on the number of machine specific package. In summary we would not be able to share the binaries across different machines of same SoC. Currently we share the Q, DL binaries as they are binary compatible however if this could change on the board we would need to make they are machine specific (Qt, Chromium, GStreamer, ...)

Not sure I understand. Those recipes work today across different machines, and it seems like using MACHINE_FEATURES doesn't change

that at all. Each binary will vary only because of different machine features, so if Q and DL have the same features, the binary will still be compatible. Do I misunderstand how this works?

Yes; see the packages generated and how we enable the MACHINE_SOCARCH; it shares binaries across same SoC families[1]

1. https://github.com/Freescale/meta-fsl-arm/blob/master/conf/machine/include/imx-base.inc#L53

Quoted 8 lines
Quoted 2 lines

So what would happens is that all recipes we have on -mx6qdl would change and be MACHINE_ARCH. This is a bad side effect.

Okay, so now I know a little about packaging levels :-)

I found a comment in poky packagegroup_base.bb that seems relevant here. It basically says "set PACKAGE_ARCH to MACHINE_ARCH to use MACHINE_FEATURES". I guess that's why there could be a problem since we rely on MACHINE_SOCARCH for increased reuse.

However, I wonder if the rule is overstated and can be relaxed to say "set PACKAGE_ARCH to a machine-specific value to use MACHINE FEATURES". If so then we could continue to use MACHINE_SOCARCH with a MACHINE_FEATURES-based design and no loss of binary reuse.

It cannot as it would generate same package with different compile options every time its value is changed.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#31 lore raw
Quoted 32 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Saturday, September 03, 2016 3:24 PM

Quoted 28 lines · Tom Hochstein
Quoted 18 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Friday, September 02, 2016 3:12 PM

Quoted 11 lines · Tom Hochstein
Quoted 9 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Friday, September 02, 2016 1:55 PM

The MACHINE_FEATURES including that kind of information will have a huge impact on the number of machine specific package. In summary we would not be able to share the binaries across different machines of same SoC. Currently we share the Q, DL binaries as they are binary compatible however if this could change on the board we would need to make they are machine specific (Qt, Chromium, GStreamer, ...)

Not sure I understand. Those recipes work today across different machines, and it seems like using MACHINE_FEATURES doesn't change

that at all. Each binary will vary only because of different machine features, so if Q and DL have the same features, the binary will still be compatible. Do I misunderstand how this works?

Quoted 7 lines

Yes; see the packages generated and how we enable the MACHINE_SOCARCH; it shares binaries across same SoC families[1]

1. https://github.com/Freescale/meta-fsl-arm/blob/master/conf/machine/include/imx-base.inc#L53

So what would happens is that all recipes we have on -mx6qdl would change and be MACHINE_ARCH. This is a bad side effect.

Okay, so now I know a little about packaging levels :-)

Quoted 8 lines
Quoted 1 line

I found a comment in poky packagegroup_base.bb that seems relevant here. It basically says "set PACKAGE_ARCH to MACHINE_ARCH to

use MACHINE_FEATURES". I guess that's why there could be a problem since we rely on MACHINE_SOCARCH for increased reuse.

Quoted 2 lines

However, I wonder if the rule is overstated and can be relaxed to say "set PACKAGE_ARCH to a machine-specific value to use MACHINE

FEATURES". If so then we could continue to use MACHINE_SOCARCH with a MACHINE_FEATURES-based design and no loss of binary reuse.

It cannot as it would generate same package with different compile options every time its value is changed.

To be sure I understand, when you say 'its value is changed', do you mean 'MACHINE value is changed'?

I tested the MACHINE_FEATURES idea with the following steps to see if I could detect any changes in reuse:

1. Set MACHINE=imx6qsabresd in local.conf
2. bitbake gstreamer1.0-plugins-imx imx-gst1.0-plugin
3. Set MACHINE=imx6dlsabresd in local.conf
4. bitbake gstreamer1.0-plugins-imx imx-gst1.0-plugin
5. Repeat steps 1-4 and observe behavior
6. Add MACHINE_FEATURES += "imx-vpu" to imx6qsabresd.conf and imx6dlsabresd.conf
7. Add DISTRO_FEATURES_append = " imx-vpu" to local.conf
8. Replace PACKAGECONFIG overrides in gstreamer1.0-plugins-imx_0.12.2.bb with:

PACKAGECONFIG ?= "uniaudiodec mp3encoder v4l2src g2d eglvivsink ipu \
    ${@bb.utils.contains('COMBINED_FEATURES', 'imx-vpu', 'vpu', '', d)}"
9. Replace DEPENDS and DEPENDS_append overrides in imx-gst1.0-plugin_4.0.9.bb with:
DEPENDS = "imx-codec imx-parser virtual/kernel gstreamer1.0 gstreamer1.0-plugins-base imx-lib \
    ${@bb.utils.contains('COMBINED_FEATURES', 'imx-vpu', 'imx-vpu imx-vpuwrap', '', d)}"

10. Repeat steps 1-5

The original implementation and the MACHINE_FEATURES implementation behaved identically as far as I could tell. No tasks were performed at step 5 when the MACHINE was changed from DL to Q and back, and packages seemed to be in the correct place for reuse:

r60874@tx30imx-01:~/upstream/build-xwayland/tmp/work$ for i in `find . -maxdepth 2 -name gstreamer1.0-plugins*`; do ls -d -l $i/*/deploy-rpms/*; done
drwxr-xr-x 2 r60874 r60874 4096 Sep  4 10:43 ./imx6qsabresd-poky-linux-gnueabi/gstreamer1.0-plugins-imx/0.12.2-r0/deploy-rpms/imx6qsabresd
drwxr-xr-x 2 r60874 r60874 4096 Sep  4 10:45 ./imx6dlsabresd-poky-linux-gnueabi/gstreamer1.0-plugins-imx/0.12.2-r0/deploy-rpms/imx6dlsabresd
drwxr-xr-x 2 r60874 r60874 24576 Sep  4 09:22 ./cortexa9hf-neon-poky-linux-gnueabi/gstreamer1.0-plugins-good/1.8.2-r0/deploy-rpms/cortexa9hf_neon
drwxr-xr-x 2 r60874 r60874 20480 Sep  4 09:20 ./cortexa9hf-neon-mx6qdl-poky-linux-gnueabi/gstreamer1.0-plugins-base/1.8.2-r0/deploy-rpms/cortexa9hf_neon_mx6qdl
drwxr-xr-x 2 r60874 r60874 36864 Sep  4 09:23 ./cortexa9hf-neon-mx6qdl-poky-linux-gnueabi/gstreamer1.0-plugins-bad/1.8.2-r0/deploy-rpms/cortexa9hf_neon_mx6qdl

Am I missing something?

Tom

#32 lore raw
Quoted 1 line · Tom Hochstein

Am I missing something?

Yes; you are :-)

The problem of the use of a machine setting is the meaning of it. It says you can change it for every machine and you can't.

Imagine following case:

Machine A - imxgpu3d
Machine B - without imxgpu3d

and consider both are Quad. How qtbase will be build? Both will end on cortexa9hf_neon_mx6qdl causing the package to be generated with different contents for A and B. This is the reason I said it end being machine specific.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#33 lore raw
Quoted 6 lines

-----Original Message-----
From: Otavio Salvador [mailto:[email protected]]
Sent: Monday, September 05, 2016 7:56 AM

The problem of the use of a machine setting is the meaning of it. It says you can change it for every machine and you can't.

This is not the meaning of a machine feature. The manual gives the definition as a "hardware feature the MACHINE is capable of supporting [1]". Note the word 'capable'. A machine feature is in fact inherent to a given machine and not something that can vary.

Quoted 7 lines

Machine A - imxgpu3d
Machine B - without imxgpu3d

and consider both are Quad. How qtbase will be build? Both will end on cortexa9hf_neon_mx6qdl causing the package to be generated with different contents for A and B. This is the reason I said it end being machine specific.

This example should not be implemented through MACHINE_FEATURES solely, but instead through a combination of MACHINE_FEATURES, DISTRO_FEATURES, and COMBINED_FEATURES. COMBINED_FEATURES is defined thus:

Provides a list of hardware features that are enabled in both MACHINE_FEATURES and DISTRO_FEATURES. This select list of features contains features that make sense to be controlled both at the machine and distribution configuration level. For example, the "bluetooth" feature requires hardware support but should also be optional at the distribution level, in case the hardware supports Bluetooth but you do not ever intend to use it. [2]

To express this succinctly: MACHINE_FEATURES = capability, DISTRO_FEATURES = enablement, and COMBINED_FEATURES = capability and enablement. This is how the example should be implemented:

MACHINE_FEATURES - contains imxgpu3d for Machine A and Machine B
DISTRO_FEATURES - contains imxgpu3d for Machine A only
COMBINED_FEATURES - contains imxgpu3d for Machine A only

So, different distro, different tmpdir, and no reuse problem :-)

Tom

[1] http://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#var-MACHINE_FEATURES
[2] http://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#var-COMBINED_FEATURES

#34 lore raw
Quoted 5 lines · Tom Hochstein

To express this succinctly: MACHINE_FEATURES = capability, DISTRO_FEATURES = enablement, and COMBINED_FEATURES = capability and enablement. This is how the example should be implemented:

MACHINE_FEATURES - contains imxgpu3d for Machine A and Machine B
DISTRO_FEATURES - contains imxgpu3d for Machine A only
COMBINED_FEATURES - contains imxgpu3d for Machine A only

I know how this works BUT people assumes machine features are to be enabled/disabled on machine basis, that is the main reason I did not use it.

The way I designed it, the extender is applied on the BSP level so it provides the lift of features the SoC supports. If you want to change something in a recipe or so, it will be applied globally and then making it harder for people to make a frankenstein.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#35 lore raw
Quoted 6 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Monday, September 05, 2016 12:18 PM

I know how this works BUT people assumes machine features are to be enabled/disabled on machine basis, that is the main reason I did not use it.

Okay, so assume we chose to implement using machine features, and a user has disabled a machine feature using MACHINE_FEATURES_remove. I guess he will have no problem (other than his faulty understanding) since the feature will be disabled as he wants. Is there some other problem?

Quoted 4 lines

The way I designed it, the extender is applied on the BSP level so it provides the lift of features the SoC supports. If you want to change something in a recipe or so, it will be applied globally and then making it harder for people to make a frankenstein.

Okay, but an implementation using MACHINE_FEATURES would not be any different. Each machine configuration file would include a new SOC configuration file, like this one for 6 Quad:

GPU_FEATURES = "imxipu imxvpu imxgpu2d imxgpu3d"
MACHINE_FEATURES += "${GPU_FEATURES}"
DISTRO_FEATURES_DEFAULT += "${GPU_FEATURES}"

And here's how the gstreamer1.0-plugins-imx recipe would set its package config:

PACKAGECONFIG ?= "uniaudiodec mp3encoder v4l2src \
    ${@bb.utils.contains('COMBINED_FEATURES', 'imxpxp', 'pxp', '', d)} \
    ${@bb.utils.contains('COMBINED_FEATURES', 'imxgpu2d', 'g2d', '', d)} \
    ${@bb.utils.contains('COMBINED_FEATURES', 'imxgpu3d', 'eglvivsink', '', d)} \
    ${@bb.utils.contains('COMBINED_FEATURES', 'imxipu', 'ipu', '', d)} \
    ${@bb.utils.contains('COMBINED_FEATURES', 'imxvpu', 'vpu', '', d)} \

"

I see no problems with this design. It provides all the required functionality, plus it relies on a well-defined, existing model for enabling and disabling hardware features.

On the other hand, the override extender design adds complexity to the implementation of MACHINE, and complicates the model by adding this new SOC type of hardware feature. Also, relying on the variable override mechanism is a weakness, as we have seen the existing SOC override design to be error-prone due to the intricacies of the override mechanism. The override extender design does reduce the use of overrides, but it seems to me like we could still have some trouble with the 2d and 3d overrides.

Tom

#36 lore raw
Quoted 14 lines · Tom Hochstein
Quoted 6 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Monday, September 05, 2016 12:18 PM

I know how this works BUT people assumes machine features are to be enabled/disabled on machine basis, that is the main reason I did not use it.

Okay, so assume we chose to implement using machine features, and a user has disabled a machine feature using MACHINE_FEATURES_remove. I guess he will have no problem (other than his faulty understanding) since the feature will be disabled as he wants. Is there some other problem?

Quoted 4 lines

The way I designed it, the extender is applied on the BSP level so it provides the lift of features the SoC supports. If you want to change something in a recipe or so, it will be applied globally and then making it harder for people to make a frankenstein.

Quoted 5 lines

Okay, but an implementation using MACHINE_FEATURES would not be any different. Each machine configuration file would include a new SOC configuration file, like this one for 6 Quad:

GPU_FEATURES = "imxipu imxvpu imxgpu2d imxgpu3d"
MACHINE_FEATURES += "${GPU_FEATURES}"
DISTRO_FEATURES_DEFAULT += "${GPU_FEATURES}"

Adding DISTRO things in a machine file is a clear indication something is wrong. Anything related to distro features cannot be change in machine level or it makes it incompatible across different machines.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#37 lore raw
Quoted 6 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Tuesday, September 06, 2016 7:40 AM

Adding DISTRO things in a machine file is a clear indication something is wrong. Anything related to distro features cannot be change in machine level or it makes it incompatible across different machines.

Yes, I wasn't sure if that would be a problem. Lauren has advocated for adding distros, and I guess that would be a better location for this. What is the latest status on that?

Tom

#38 lore raw
Quoted 8 lines · Tom Hochstein
Quoted 6 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Tuesday, September 06, 2016 7:40 AM

Adding DISTRO things in a machine file is a clear indication something is wrong. Anything related to distro features cannot be change in machine level or it makes it incompatible across different machines.

Yes, I wasn't sure if that would be a problem. Lauren has advocated for adding distros, and I guess that would be a better location for this. What is the latest status on that?

A BSP must be DISTRO agnostic; I won't merge something that does not preserve that.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#39 lore raw
Quoted 15 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Tuesday, September 06, 2016 8:45 AM
To: Tom Hochstein <[email protected]>
Cc: Otavio Salvador <[email protected]>; Prabhu Sundararaj <[email protected]>; meta-freescale Mailing List <meta- [email protected]>; White Weng <[email protected]>
Subject: Re: [meta-freescale] [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication

Quoted 7 lines · Tom Hochstein
Quoted 6 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Tuesday, September 06, 2016 7:40 AM

Adding DISTRO things in a machine file is a clear indication something is wrong. Anything related to distro features cannot be change in machine level or it makes it incompatible across different machines.

Quoted 5 lines
Quoted 1 line

Yes, I wasn't sure if that would be a problem. Lauren has advocated for adding distros, and I guess that would be a better location for this.

What is the latest status on that?

A BSP must be DISTRO agnostic; I won't merge something that does not preserve that.

Okay, then that is a problem. Can we push these hardware features into poky so that they are treated identical to the other COMBINED_FEATURES?

Tom

#40 lore raw
Quoted 15 lines · Tom Hochstein
Quoted 15 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Tuesday, September 06, 2016 8:45 AM
To: Tom Hochstein <[email protected]>
Cc: Otavio Salvador <[email protected]>; Prabhu Sundararaj <[email protected]>; meta-freescale Mailing List <meta- [email protected]>; White Weng <[email protected]>
Subject: Re: [meta-freescale] [meta-fsl-arm PATCH v2 00/16] Machine overrides extender - reduce code duplication

Quoted 7 lines · Tom Hochstein
Quoted 6 lines

From: Otavio Salvador [mailto:[email protected]]
Sent: Tuesday, September 06, 2016 7:40 AM

Adding DISTRO things in a machine file is a clear indication something is wrong. Anything related to distro features cannot be change in machine level or it makes it incompatible across different machines.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Yes, I wasn't sure if that would be a problem. Lauren has advocated for adding distros, and I guess that would be a better location for this.

What is the latest status on that?

A BSP must be DISTRO agnostic; I won't merge something that does not preserve that.

Okay, then that is a problem. Can we push these hardware features into poky so that they are treated identical to the other COMBINED_FEATURES?

DISTRO agnostic does not mean Poky; at O.S. Systems we have a number of custom distros based on OE-Core.

As I said, machine features are not intended for this use.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750