freescale-imx: add BR2_PACKAGE_FREESCALE_IMX_HAS_VPU config
authorGary Bisson <gary.bisson@boundarydevices.com>
Wed, 9 Mar 2016 15:05:09 +0000 (16:05 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 29 Mar 2016 14:24:18 +0000 (16:24 +0200)
Since the imx-vpu package build is skipped if the platform doesn't
have a VPU, libraries dependent on the package such as libimxvpuapi
can fail although the imx-vpu package build went "fine".

This patch therefore adds a BR2_PACKAGE_FREESCALE_IMX_HAS_VPU config
which is used in every package selecting imx-vpu directly or indrectly.

It fixes the following build errors:
http://autobuild.buildroot.net/results/892/8924b17f3aa5eba1a8016d84d4478ecb0a96b236/
http://autobuild.buildroot.net/results/86f/86fef2a30065d5bc0d7755706e9ca3332426834d/
http://autobuild.buildroot.net/results/b47/b47eb03e93e2f1af85caebb707f7b4667f7e3d74/
http://autobuild.buildroot.net/results/4c9/4c9b22b33533132fd9f88917cc341ae2c2e171a8/
http://autobuild.buildroot.net/results/a8b/a8b33bfd099d9b9cd383cc568ea70846eb13c34d/

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/freescale-imx/Config.in
package/freescale-imx/imx-vpu/Config.in
package/gstreamer/gst-fsl-plugins/Config.in
package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk
package/libfslvpuwrap/Config.in
package/libimxvpuapi/Config.in

index dfb6cc4a3fc76f8f2f9404e2009b1e09f8fa4bef..4a086ae2eb0456ddf71c20f31cdf0e4980bac61e 100644 (file)
@@ -42,6 +42,13 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM
        default "IMX53" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53
        default "IMX6Q" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q
 
+config BR2_PACKAGE_FREESCALE_IMX_HAS_VPU
+       bool
+       default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX27ADS || \
+               BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51 || \
+               BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53 || \
+               BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q
+
 source "package/freescale-imx/imx-kobs/Config.in"
 source "package/freescale-imx/imx-lib/Config.in"
 source "package/freescale-imx/imx-vpu/Config.in"
index 220385cec83d558ba90a3b846e90a2401656c61f..779717f5ed96764b904f2e781316ab146801ffd1 100644 (file)
@@ -1,6 +1,11 @@
+comment "imx-vpu needs an i.MX platform with VPU support"
+       depends on BR2_arm
+       depends on !BR2_PACKAGE_FREESCALE_IMX_HAS_VPU
+
 config BR2_PACKAGE_IMX_VPU
        bool "imx-vpu"
        depends on BR2_arm # Only relevant for i.MX
+       depends on BR2_PACKAGE_FREESCALE_IMX_HAS_VPU
        select BR2_PACKAGE_FIRMWARE_IMX
        help
          Library of userspace helpers specific for the Freescale i.MX
index a4a260681f8f8dd385c5145e19add23afd8cd1f5..0407dc525197ceae986a5f170b1dd76d4982a8dd 100644 (file)
@@ -11,9 +11,8 @@ config BR2_PACKAGE_GST_FSL_PLUGINS
        depends on BR2_arm # Only relevant for i.MX
        depends on BR2_TOOLCHAIN_USES_GLIBC # libfslcodec
        select BR2_PACKAGE_GST_PLUGINS_BASE
-       select BR2_PACKAGE_LIBFSLVPUWRAP
+       select BR2_PACKAGE_LIBFSLVPUWRAP if BR2_PACKAGE_FREESCALE_IMX_HAS_VPU
        select BR2_PACKAGE_IMX_LIB
-       select BR2_PACKAGE_IMX_VPU
        select BR2_PACKAGE_LIBFSLPARSER
        select BR2_PACKAGE_LIBFSLCODEC
        select BR2_PACKAGE_FREESCALE_IMX
index 2ac558a2fb82199438fb759d98e5fc85fdcc9dee..fa0e093a969ee97c7c5f389b807531060bd099b4 100644 (file)
@@ -16,7 +16,11 @@ GST_FSL_PLUGINS_INSTALL_STAGING = YES
 GST_FSL_PLUGINS_AUTORECONF = YES
 
 GST_FSL_PLUGINS_DEPENDENCIES += host-pkgconf gstreamer gst-plugins-base \
-       libfslvpuwrap imx-lib imx-vpu libfslparser libfslcodec
+       imx-lib libfslparser libfslcodec
+
+ifeq ($(BR2_PACKAGE_FREESCALE_IMX_HAS_VPU),y)
+GST_FSL_PLUGINS_DEPENDENCIES += libfslvpuwrap
+endif
 
 GST_FSL_PLUGINS_CONF_ENV = \
        PLATFORM=$(BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM) \
index 9cc15d5cdf8020a6c648b3818bc074eb7469d65a..72f712630718cce4e5ea9ecb19db8f9eba64f255 100644 (file)
@@ -2,11 +2,15 @@ comment "libfslvpuwrap needs an imx-specific Linux kernel to be built"
        depends on BR2_arm
        depends on !BR2_LINUX_KERNEL
 
+comment "libfslvpuwrap needs an i.MX platform with VPU support"
+       depends on BR2_arm
+       depends on BR2_LINUX_KERNEL && !BR2_PACKAGE_FREESCALE_IMX_HAS_VPU
+
 config BR2_PACKAGE_LIBFSLVPUWRAP
        bool "libfslvpuwrap"
        depends on BR2_LINUX_KERNEL
        depends on BR2_arm # Only relevant for i.MX
-       select BR2_PACKAGE_FREESCALE_IMX
+       depends on BR2_PACKAGE_FREESCALE_IMX_HAS_VPU
        select BR2_PACKAGE_IMX_VPU
        help
          Wrapper library for the vpu library, giving it a different API.
index 85467f201504ce16f893a458e7944635c6c33ef9..8b8b839ce84df97d17e34e0e5d587deeb55f9263 100644 (file)
@@ -1,7 +1,11 @@
+comment "libimxvpuapi needs an i.MX platform with VPU support"
+       depends on BR2_arm
+       depends on !BR2_PACKAGE_FREESCALE_IMX_HAS_VPU
+
 config BR2_PACKAGE_LIBIMXVPUAPI
        bool "libimxvpuapi"
        depends on BR2_arm # Only relevant for i.MX
-       select BR2_PACKAGE_FREESCALE_IMX
+       depends on BR2_PACKAGE_FREESCALE_IMX_HAS_VPU
        select BR2_PACKAGE_IMX_VPU
        help
          This library provides an API for using the iMX6 VPU video