archive mirror
 help / color / mirror / Atom feed
From: Thomas Petazzoni <>
To: Refik Tuzakli <>
Cc: Gary Bisson <>,
	Peter Seiderer <>,
Subject: Re: [Buildroot] [PATCH v1 3/3] package/freescale-imx/imx-gpu-viv: add options for new feture
Date: Thu, 5 Aug 2021 23:36:15 +0200	[thread overview]
Message-ID: <20210805233615.4e69d63d@windsurf> (raw)
In-Reply-To: <>

Hello Refik,

On Sun,  9 Feb 2020 16:44:08 +0300
Refik Tuzakli <> wrote:

> NXP supply new fetures with new gpu driver. This patch adds options to select
> the library needed and saves space on target.
> Signed-off-by: Refik Tuzakli <>

Thanks a lot for this patch. I started looking into it, and realized
that now due to the massive amount of libraries installed by
imx-gpu-viv, the TARGET_DIR/usr/lib folder weights a total of 190 MB!
This is really huge, and we definitely want to make this more
conditional as not everybody needs OpenVX, Vulkan, or the neural
network stuff.

However, I think we would need to do that step by step, in multiple
patches. First we should make conditional what the package already
supports. The package currently provides:

IMX_GPU_VIV_PROVIDES = libegl libgles libopencl libopenvg

I think libegl and libgles should remain unconditional. However, we
should make libopencl and libopenvg optional. When they are not
enabled, then the libraries and headers should not be installed to
STAGING_DIR. Indeed, we really want a hard build/link failure if
somebody tries to build an OpenCL or OpenVG application and the
corresponding options are not enabled. We cannot install "the whole
imx-gpu-viv" to STAGING_DIR and only conditionally install to
TARGET_DIR, because it means someone not enabling OpenCL would be able
to build/link the application and it would only fail at runtime which
is not great.

Then once we have this imx-gpu-viv package that has options for
libopencl and libopenvg, you can create additional patches adding
options for libvulkan, for libopenvx, for the neural network stuff.

Would you be willing to work on something like this ?

Also, one question is: are all these features available for all i.MX
platforms? Vulkan, neural network stuff is available even on the older
i.MX6 platforms that also use imx-gpu-viv ?

> +	cp -dpfr $(@D)/gpu-core/usr/lib/ $(TARGET_DIR)/usr/lib
> +	cp -dpfr $(@D)/gpu-core/usr/lib/ $(TARGET_DIR)/usr/lib
> +	cp -dpfr $(@D)/gpu-core/usr/lib/ $(TARGET_DIR)/usr/lib
> +	cp -dpfr $(@D)/gpu-core/usr/lib/ $(TARGET_DIR)/usr/lib
> +	cp -dpfr $(@D)/gpu-core/usr/lib/ $(TARGET_DIR)/usr/lib
> +	cp -dpfr $(@D)/gpu-core/usr/lib/ $(TARGET_DIR)/usr/lib
> +	cp -dpfr $(@D)/gpu-core/usr/lib/ $(TARGET_DIR)/usr/lib

Do we need *all* those libraries in the target? Several of them have
very similar names, they somehow look like alternatives of each other.

>  endef

Should have been LIBNN I guess.

> +	cp -dpfr $(@D)/gpu-core/usr/include/nnrt $(STAGING_DIR)/usr/include/
> +endef
> +endif
>  ifeq ($(IMX_GPU_VIV_LIB_TARGET),fb)
> @@ -88,7 +143,10 @@ endef
>  endif
> -	cp -r $(@D)/gpu-core/usr/* $(STAGING_DIR)/usr
> +	cp -dpfr $(@D)/gpu-core/usr/lib $(STAGING_DIR)/usr

See here? You are installing all libraries to $(STAGING_DIR), even the
ones that are not in TARGET_DIR. It means you won't get link failures,
but runtime failures (as I explained above).

Are you interested in improving your patch series along those lines ?

Also, Peter Seiderer comment on your patch in December, but you never

Best regards,

Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
buildroot mailing list

      parent reply	other threads:[~2021-08-05 21:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-09 13:44 [Buildroot] [PATCH v1 1/3] package/opengl/libopenvx: new virtual package Refik Tuzakli
2020-02-09 13:44 ` [Buildroot] [PATCH v1 2/3] package/opengl/libvulkan: " Refik Tuzakli
2020-12-30 15:18   ` Peter Seiderer
2020-02-09 13:44 ` [Buildroot] [PATCH v1 3/3] package/freescale-imx/imx-gpu-viv: add options for new feture Refik Tuzakli
2020-12-30 15:41   ` Peter Seiderer
2021-08-05 21:36   ` Thomas Petazzoni [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210805233615.4e69d63d@windsurf \ \ \ \ \ \
    --subject='Re: [Buildroot] [PATCH v1 3/3] package/freescale-imx/imx-gpu-viv: add options for new feture' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).