Skip to contentSkip to conversation

kodi: fix build when BR2_PACKAGE_LIBFSLVPUWRAP=y

PATCH New Sébastien Szymanski 4 participants 10 messages May 17, 2016 – Jun 9, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kodi: fix build when BR2_PACKAGE_LIBFSLVPUWRAP=y

Kodi now needs the following headers to sucessfully build on some i.MX platforms:

* ipu.h and mxcfb.h from the kernel
* g2d.h from the imx-gpu-viv package

Add the missing dependencies.

---
Note: I had to install .py files to test Kodi on my target (APF6D) with BR2_PACKAGE_PYTHON_PY_PYC otherwise Kodi complained that it couldn't find site.py and crashed at startup.

 package/kodi/Config.in | 1 +
 package/kodi/kodi.mk   | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
package/kodi/Config.in +1 -0
index ff2e75c..f27f6ed 100644
@@ -58,6 +58,7 @@ menuconfig BR2_PACKAGE_KODI
 	select BR2_PACKAGE_FONTCONFIG
 	select BR2_PACKAGE_FREETYPE
 	select BR2_PACKAGE_GIFLIB
+	select BR2_PACKAGE_IMX_GPU_VIV_G2D if BR2_PACKAGE_LIBFSLVPUWRAP
 	select BR2_PACKAGE_JASPER
 	select BR2_PACKAGE_JPEG
 	select BR2_PACKAGE_LIBASS
package/kodi/kodi.mk +3 -1
index e163c24..394b174 100644
@@ -54,8 +54,10 @@ KODI_CONF_ENV += INCLUDES="-I$(STAGING_DIR)/usr/include/interface/vcos/pthreads
 endif
 
 ifeq ($(BR2_PACKAGE_LIBFSLVPUWRAP),y)
-KODI_DEPENDENCIES += libfslvpuwrap
+# imx-lib needs access to imx-specific kernel headers
+KODI_DEPENDENCIES += imx-gpu-viv libfslvpuwrap linux
 KODI_CONF_OPTS += --enable-codec=imxvpu
+KODI_CONF_ENV += INCLUDES="-idirafter $(LINUX_DIR)/include/uapi"
 endif
 
 ifeq ($(BR2_PACKAGE_LIBCAP),y)
Signature · 1 line
2.3.6
#1 lore raw

PATCH 1/1 kodi: fix build when BR2_PACKAGE_LIBFSLVPUWRAP=y

Hi S?bastien,

Am Tue, 17 May 2016 17:54:00 +0200 schrieb S?bastien Szymanski:

Quoted 3 lines

Note: I had to install .py files to test Kodi on my target (APF6D) with BR2_PACKAGE_PYTHON_PY_PYC otherwise Kodi complained that it couldn't find site.py and crashed at startup.

please post your defconfig to help reproduce the problem. I remember Yann said something similar about a year ago.

Quoted 1 line

+KODI_DEPENDENCIES += imx-gpu-viv libfslvpuwrap linux

What happens if no kernel package is enabled? I have no contact with the i.MX platform besides seeing regular commits for it in OpenELEC so I am at a loss here ;)

Regards, Bernd

#2 lore raw

PATCH 1/1 kodi: fix build when BR2_PACKAGE_LIBFSLVPUWRAP=y

Hi Bernd,

Quoted 10 lines · Bernd Kuhls

Hi S?bastien,

Am Tue, 17 May 2016 17:54:00 +0200 schrieb S?bastien Szymanski:

Quoted 3 lines

Note: I had to install .py files to test Kodi on my target (APF6D) with BR2_PACKAGE_PYTHON_PY_PYC otherwise Kodi complained that it couldn't find site.py and crashed at startup.

please post your defconfig to help reproduce the problem. I remember Yann said something similar about a year ago.

My defconfig:

BR2_arm=y
BR2_cortex_a9=y
BR2_ARM_ENABLE_NEON=y
BR2_ARM_ENABLE_VFP=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_GIT=y BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.freescale.com/imx/linux-2.6-imx.git" BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_3.14.52_1.1.0_ga" BR2_LINUX_KERNEL_DEFCONFIG="imx_v7"
BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-wandboard imx6dl-wandboard" BR2_LINUX_KERNEL_INSTALL_TARGET=y
BR2_PACKAGE_KODI=y
BR2_PACKAGE_FREESCALE_IMX=y BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q=y BR2_PACKAGE_IMX_GPU_VIV=y
BR2_PACKAGE_LIBFSLVPUWRAP=y
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_PACKAGE_HOST_GENIMAGE=y

Quoted 6 lines
Quoted 2 lines

+KODI_DEPENDENCIES += imx-gpu-viv libfslvpuwrap linux

What happens if no kernel package is enabled? I have no contact with the i.MX platform besides seeing regular commits for it in OpenELEC so I am at a loss here ;)

You're right. I have to edit the Config.in file to add a "depends on the kernel" like the imx-lib package.

Thank you.

Regards,

Quoted 8 lines

Regards, Bernd

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 6 lines
S?bastien Szymanski
Software Engineer
Armadeus Systems - A new vision of the embedded world
sebastien.szymanski at armadeus.com
Tel: +33 (0)9 72 29 41 44
Fax: +33 (0)9 72 28 79 26
#3 lore raw

PATCH 1/1 kodi: fix build when BR2_PACKAGE_LIBFSLVPUWRAP=y

Quoted 41 lines · S?bastien Szymanski

Hi Bernd,

Quoted 10 lines · Bernd Kuhls

Hi S?bastien,

Am Tue, 17 May 2016 17:54:00 +0200 schrieb S?bastien Szymanski:

Quoted 3 lines

Note: I had to install .py files to test Kodi on my target (APF6D) with BR2_PACKAGE_PYTHON_PY_PYC otherwise Kodi complained that it couldn't find site.py and crashed at startup.

please post your defconfig to help reproduce the problem. I remember Yann said something similar about a year ago.

My defconfig:

BR2_arm=y
BR2_cortex_a9=y
BR2_ARM_ENABLE_NEON=y
BR2_ARM_ENABLE_VFP=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_GIT=y BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.freescale.com/imx/linux-2.6-imx.git" BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_3.14.52_1.1.0_ga" BR2_LINUX_KERNEL_DEFCONFIG="imx_v7"
BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-wandboard imx6dl-wandboard" BR2_LINUX_KERNEL_INSTALL_TARGET=y
BR2_PACKAGE_KODI=y
BR2_PACKAGE_FREESCALE_IMX=y BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q=y BR2_PACKAGE_IMX_GPU_VIV=y
BR2_PACKAGE_LIBFSLVPUWRAP=y
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_PACKAGE_HOST_GENIMAGE=y

Quoted 1 line
Quoted 8 lines
Quoted 5 lines
Quoted 1 line

+KODI_DEPENDENCIES += imx-gpu-viv libfslvpuwrap linux

What happens if no kernel package is enabled? I have no contact with the i.MX platform besides seeing regular commits for it in OpenELEC so I am at a loss here ;)

You're right. I have to edit the Config.in file to add a "depends on the kernel" like the imx-lib package.

Actually, if no kernel package is enabled BR2_PACKAGE_LIBFSLVPUWRAP is not available and then kodi will be compiled without vpu support.

Quoted 15 lines

Thank you.

Regards,

Quoted 8 lines

Regards, Bernd

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 6 lines
S?bastien Szymanski
Software Engineer
Armadeus Systems - A new vision of the embedded world
sebastien.szymanski at armadeus.com
Tel: +33 (0)9 72 29 41 44
Fax: +33 (0)9 72 28 79 26
#4 lore raw

PATCH 1/1 kodi: fix build when BR2_PACKAGE_LIBFSLVPUWRAP=y

In reply to Sébastien Szymanski

Hello,

Quoted 6 lines · S?bastien Szymanski

Kodi now needs the following headers to sucessfully build on some i.MX platforms:

* ipu.h and mxcfb.h from the kernel
* g2d.h from the imx-gpu-viv package

Quoted 7 lines

Add the missing dependencies.

---
Note: I had to install .py files to test Kodi on my target (APF6D) with BR2_PACKAGE_PYTHON_PY_PYC otherwise Kodi complained that it couldn't find site.py and crashed at startup.

This is a known bug in Kodi, which nobody has investigated so far.

Quoted 10 lines
 package/kodi/Config.in | 1 +
 package/kodi/kodi.mk   | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
package/kodi/Config.in +0 -0
index ff2e75c..f27f6ed 100644

package/kodi/Config.in menuconfig BR2_PACKAGE_KODI · line 61

Quoted 4 lines
package/kodi/Config.in +1 -0
@@ -58,6 +58,7 @@ menuconfig BR2_PACKAGE_KODI
 	select BR2_PACKAGE_FONTCONFIG
 	select BR2_PACKAGE_FREETYPE
 	select BR2_PACKAGE_GIFLIB
+	select BR2_PACKAGE_IMX_GPU_VIV_G2D if BR2_PACKAGE_LIBFSLVPUWRAP

I would prefer this to be:

select BR2_PACKAGE_IMX_GPU_VIV_G2D if BR2_PACKAGE_IMX_GPU_VIV

package/kodi/kodi.mk KODI_CONF_ENV += INCLUDES="-I$(STAGING_DIR)/usr/include/interface/vcos/pthreads · line 56

Quoted 11 lines
package/kodi/Config.in +0 -0
 	select BR2_PACKAGE_JASPER
 	select BR2_PACKAGE_JPEG
 	select BR2_PACKAGE_LIBASS
package/kodi/kodi.mk +0 -0
index e163c24..394b174 100644
@@ -54,8 +54,10 @@ KODI_CONF_ENV += INCLUDES="-I$(STAGING_DIR)/usr/include/interface/vcos/pthreads
 endif
 
 ifeq ($(BR2_PACKAGE_LIBFSLVPUWRAP),y)

Change this to:

ifeq ($(BR2_PACKAGE_IMX_GPU_VIV)$(BR2_PACKAGE_LIBFSLVPUWRAP),y)

package/kodi/kodi.mk KODI_CONF_ENV += INCLUDES="-I$(STAGING_DIR)/usr/include/interface/vcos/pthreads · line 57

Quoted 2 lines
package/kodi/kodi.mk +1 -1
-KODI_DEPENDENCIES += libfslvpuwrap
+# imx-lib needs access to imx-specific kernel headers

You're talking about imx-lib here, but it doesn't appear anywhere, so this comment is confusing, and can be removed IMO.

package/kodi/kodi.mk KODI_CONF_ENV += INCLUDES="-I$(STAGING_DIR)/usr/include/interface/vcos/pthreads · line 58

Quoted 1 line
package/kodi/kodi.mk +1 -0
+KODI_DEPENDENCIES += imx-gpu-viv libfslvpuwrap linux

Remove linux from this line. libfslvpuwrap already depends on it, so it's not really useful to have it.

package/kodi/kodi.mk KODI_CONF_ENV += INCLUDES="-I$(STAGING_DIR)/usr/include/interface/vcos/pthreads · line 60

Quoted 2 lines
package/kodi/kodi.mk +1 -0
 KODI_CONF_OPTS += --enable-codec=imxvpu
+KODI_CONF_ENV += INCLUDES="-idirafter $(LINUX_DIR)/include/uapi"

Maybe above this line:

# Kodi needs access to some specific kernel headers, which are # Freescale specific and therefore not part of the toolchain, so we have

# to access directly the headers from the kernel sources

I think this way your patch would be a bit easier to understand. Basically the logic is that as soon as libfslvpuwrap *and* the imx-gpu-viv packages are enabled, i.MX6 support in Kodi will be enabled.

Could you rework this, test that it works fine for you, and resubmit?

Thanks a lot!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH 1/1 kodi: fix build when BR2_PACKAGE_LIBFSLVPUWRAP=y

Thomas, S?bastien, All,

On 2016-06-09 22:42 +0200, Thomas Petazzoni spake thusly:

Quoted 9 lines · S?bastien Szymanski
Quoted 8 lines

Kodi now needs the following headers to sucessfully build on some i.MX platforms:

* ipu.h and mxcfb.h from the kernel
* g2d.h from the imx-gpu-viv package

Add the missing dependencies.

Quoted 7 lines
Quoted 5 lines

---
Note: I had to install .py files to test Kodi on my target (APF6D) with BR2_PACKAGE_PYTHON_PY_PYC otherwise Kodi complained that it couldn't find site.py and crashed at startup.

This is a known bug in Kodi, which nobody has investigated so far.

Saying that "nobody has investigated" is wrong. Both Bernd and I have done some research on the topic [0].

And we concluded that upstream is unwilling to take patches that will accept only .pyc or .pyo to be present. Upstream *wants* to have the .py files present. Period.

So indeed, noone has tried to fix it, because the fix has *zero* chance of getting upstream.

I however submitted two proposals that would make it impossible to have that situation, but you did not like them (FTR: one was to hide Kodi away when .py files were not present, the other was to add options for packages to require .py files to be kept).

So, unless we revise our position, the bug will stay. And it is a Buildroot bug, not an upstream one.

[0] this is somewhere in the archives, I'm a bit lazy at digging them up...

Quoted 32 lines

package/kodi/Config.in menuconfig BR2_PACKAGE_KODI · line 61

Quoted 5 lines
package/kodi/Config.in +1 -0
@@ -58,6 +58,7 @@ menuconfig BR2_PACKAGE_KODI
 	select BR2_PACKAGE_FONTCONFIG
 	select BR2_PACKAGE_FREETYPE
 	select BR2_PACKAGE_GIFLIB
+	select BR2_PACKAGE_IMX_GPU_VIV_G2D if BR2_PACKAGE_LIBFSLVPUWRAP

I would prefer this to be:

select BR2_PACKAGE_IMX_GPU_VIV_G2D if BR2_PACKAGE_IMX_GPU_VIV

package/kodi/kodi.mk KODI_CONF_ENV += INCLUDES="-I$(STAGING_DIR)/usr/include/interface/vcos/pthreads · line 56

Quoted 11 lines
package/kodi/Config.in +0 -0
 	select BR2_PACKAGE_JASPER
 	select BR2_PACKAGE_JPEG
 	select BR2_PACKAGE_LIBASS
package/kodi/kodi.mk +0 -0
index e163c24..394b174 100644
@@ -54,8 +54,10 @@ KODI_CONF_ENV += INCLUDES="-I$(STAGING_DIR)/usr/include/interface/vcos/pthreads
 endif
 
 ifeq ($(BR2_PACKAGE_LIBFSLVPUWRAP),y)

Change this to:

ifeq ($(BR2_PACKAGE_IMX_GPU_VIV)$(BR2_PACKAGE_LIBFSLVPUWRAP),y)

package/kodi/kodi.mk KODI_CONF_ENV += INCLUDES="-I$(STAGING_DIR)/usr/include/interface/vcos/pthreads · line 57

Quoted 2 lines
package/kodi/kodi.mk +1 -1
-KODI_DEPENDENCIES += libfslvpuwrap
+# imx-lib needs access to imx-specific kernel headers

You're talking about imx-lib here, but it doesn't appear anywhere, so this comment is confusing, and can be removed IMO.

Quoted 4 lines

package/kodi/kodi.mk KODI_CONF_ENV += INCLUDES="-I$(STAGING_DIR)/usr/include/interface/vcos/pthreads · line 58

Quoted 1 line
package/kodi/kodi.mk +1 -0
+KODI_DEPENDENCIES += imx-gpu-viv libfslvpuwrap linux

Remove linux from this line. libfslvpuwrap already depends on it, so it's not really useful to have it.

Note: it's not usefull because Kodi itself does not depend on the kernel sources.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#6 lore raw

PATCH 1/1 kodi: fix build when BR2_PACKAGE_LIBFSLVPUWRAP=y

Hello,

Quoted 4 lines · Yann E. MORIN
Quoted 1 line

This is a known bug in Kodi, which nobody has investigated so far.

Saying that "nobody has investigated" is wrong. Both Bernd and I have done some research on the topic [0].

True.

Quoted 3 lines

And we concluded that upstream is unwilling to take patches that will accept only .pyc or .pyo to be present. Upstream *wants* to have the .py files present. Period.

Another upstream project also rejected the idea of working just with .pyc files, until I showed the filesystem size difference between having .py+.pyc and having just .pyc. Have you tried this approach with the Kodi people?

(Though I admit it might be less impressive than what the case I had, due to the massive size of Kodi and its dependencies.)

Quoted 10 lines

So indeed, noone has tried to fix it, because the fix has *zero* chance of getting upstream.

I however submitted two proposals that would make it impossible to have that situation, but you did not like them (FTR: one was to hide Kodi away when .py files were not present, the other was to add options for packages to require .py files to be kept).

So, unless we revise our position, the bug will stay. And it is a Buildroot bug, not an upstream one.

It is and remains an upstream bug, there is absolutely no reason to not work with just .pyc/.pyo files.

However, since there has been apparently no movement on that side upstream, then let's just add the dependency that you suggested. It's a crappy solution, but our motto is to follow upstream, so when upstream is crappy, so we are :)

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#7 lore raw

PATCH 1/1 kodi: fix build when BR2_PACKAGE_LIBFSLVPUWRAP=y

Thomas, All,

On 2016-06-09 23:38 +0200, Thomas Petazzoni spake thusly:

Quoted 2 lines · Yann E. MORIN
Quoted 1 line
Quoted 1 line

This is a known bug in Kodi, which nobody has investigated so far.

[--SNIP--]

Quoted 5 lines
Quoted 2 lines

So, unless we revise our position, the bug will stay. And it is a Buildroot bug, not an upstream one.

It is and remains an upstream bug, there is absolutely no reason to not work with just .pyc/.pyo files.

What I meant was: given upstream position, the failure we observe at runtime can be considered a Buildroot bug (although it technically is an upstream bug, it is politicaly a Buildroot bug) ;-)

Quoted 2 lines

However, since there has been apparently no movement on that side upstream, then let's just add the dependency that you suggested.

OK, I guess you meant have Kodi depends on .py files to be presetn (not the other proposal to require .py files), right?

I'll cook up a patch.

Thanks!

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#8 lore raw

PATCH 1/1 kodi: fix build when BR2_PACKAGE_LIBFSLVPUWRAP=y

Hello,

Quoted 5 lines · Yann E. MORIN
Quoted 2 lines

However, since there has been apparently no movement on that side upstream, then let's just add the dependency that you suggested.

OK, I guess you meant have Kodi depends on .py files to be presetn (not the other proposal to require .py files), right?

Correct:

	depends on BR2_PACKAGE_PYTHON_PY_ONLY || BR2_PACKAGE_PYTHON_PY_PYC

or

depends on !BR2_PACKAGE_PYTHON_PYC_ONLY

not sure which one is best.

I am not sure what other way around is possible, but I'm probably missing something.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#9 lore raw

PATCH 1/1 kodi: fix build when BR2_PACKAGE_LIBFSLVPUWRAP=y

Thomas, All,

On 2016-06-09 23:50 +0200, Thomas Petazzoni spake thusly:

Quoted 8 lines · Yann E. MORIN
Quoted 6 lines
Quoted 3 lines

However, since there has been apparently no movement on that side upstream, then let's just add the dependency that you suggested.

OK, I guess you meant have Kodi depends on .py files to be presetn (not the other proposal to require .py files), right?

Quoted 6 lines

Correct:

	depends on BR2_PACKAGE_PYTHON_PY_ONLY || BR2_PACKAGE_PYTHON_PY_PYC

or
depends on !BR2_PACKAGE_PYTHON_PYC_ONLY

not sure which one is best.

I already choose the first.

Note however that this means we can no longer select python, or we'd have an impossible situation and a circular dependency. So we need to also depend on python... :-/

Quoted 2 lines

I am not sure what other way around is possible, but I'm probably missing something.

Not as far as I can see...

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'