Skip to contentSkip to conversation

freescale: update userspace packages

PATCH Superseded Gary Bisson 3 participants 25 messages Jun 19, 2014 – Jun 29, 2014 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

cover freescale: update userspace packages

Yann, all,

All the packages are now updated to their latest stable version. Here is a serie of patches to update them all at once to be in sync.

It is to be noted that the packages version described in the release notes are wrong, therefore I used the versions from the Yocto layer tag 1.6 (daisy):
https://github.com/Freescale/meta-fsl-arm/tree/1.6/recipes-bsp
https://github.com/Freescale/meta-fsl-arm/tree/1.6/recipes-multimedia
https://github.com/Freescale/meta-fsl-arm/tree/1.6/recipes-graphics

Testing has been done on a Nitrogen6x using the kernel patch committed last week.

GPU test (gpu-viv-bin-mx6q):

# cd /usr/share/examples/viv_samples/vdk/
# ./tutorial7

VPU test (libfslvpuwrap, libfslcodec, gst-fsl-plugins, imx-vpu):

# gst-launch-0.10 filesrc location=trailer_1080p_h264_mp3.avi ! avidemux ! vpudec ! mfw_isink

If needed the output of the above tests as well as the video file (big buck bunny) can be provided.

Regards,
Gary

Gary Bisson (5):
freescale-imx: bump to version 3.10.17-1.0.0
libfslvpuwrap: bump to version 1.0.46
libfslcodec: bump to version 3.0.11
libfslparser: bump to version 3.0.11
gst-fsl-plugins: bump to version 3.0.11

 package/freescale-imx/Config.in                    |   1 +
 package/freescale-imx/freescale-imx.mk             |   2 +-
 package/freescale-imx/imx-lib/imx-lib.mk           |  26 +-
 package/freescale-imx/imx-vpu/Config.in            |  53 ++
 .../imx-vpu-0001-fix-IOSystemInit-failure.patch    |  21 +
 package/freescale-imx/imx-vpu/imx-vpu.mk           |  57 ++
 ...gins-0002-Fix-bashism-in-configure-script.patch |  25 +-
 .../gst-fsl-plugins-0003-Use-proper-objdump.patch  |   6 +-
 ...sl-linkage-add-lrt-for-shared-memory-func.patch |   2 +-
 ...-plugins-0005-build-Fix-out-of-tree-build.patch | 616 +++++++++++++++++++++
 .../gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk   |  13 +-
 package/libfslcodec/libfslcodec.mk                 |   2 +-
 package/libfslparser/libfslparser.mk               |   2 +-
 package/libfslvpuwrap/Config.in                    |   2 +-
 package/libfslvpuwrap/libfslvpuwrap.mk             |   4 +-
 15 files changed, 777 insertions(+), 55 deletions(-)
 create mode 100644 package/freescale-imx/imx-vpu/Config.in
 create mode 100644 package/freescale-imx/imx-vpu/imx-vpu-0001-fix-IOSystemInit-failure.patch
 create mode 100644 package/freescale-imx/imx-vpu/imx-vpu.mk
 create mode 100644 package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0005-build-Fix-out-of-tree-build.patch
Signature · 1 line
2.0.0
#1 lore raw

PATCH 1/5 freescale-imx: bump to version 3.10.17-1.0.0

---
 package/freescale-imx/Config.in                    |  1 +
 package/freescale-imx/freescale-imx.mk             |  2 +-
 package/freescale-imx/imx-lib/imx-lib.mk           | 26 ++--------
 package/freescale-imx/imx-vpu/Config.in            | 53 ++++++++++++++++++++
 .../imx-vpu-0001-fix-IOSystemInit-failure.patch    | 21 ++++++++
 package/freescale-imx/imx-vpu/imx-vpu.mk           | 57 ++++++++++++++++++++++
 6 files changed, 138 insertions(+), 22 deletions(-)
 create mode 100644 package/freescale-imx/imx-vpu/Config.in
 create mode 100644 package/freescale-imx/imx-vpu/imx-vpu-0001-fix-IOSystemInit-failure.patch
 create mode 100644 package/freescale-imx/imx-vpu/imx-vpu.mk
package/freescale-imx/Config.in +1 -0
index 7c22f79..0b3af89 100644
@@ -2,6 +2,7 @@ menu "Freescale i.MX libraries"
 	depends on BR2_arm
 
 source "package/freescale-imx/imx-lib/Config.in"
+source "package/freescale-imx/imx-vpu/Config.in"
 source "package/freescale-imx/firmware-imx/Config.in"
 source "package/freescale-imx/gpu-viv-bin-mx6q/Config.in"
 
package/freescale-imx/freescale-imx.mk +1 -1
index 39ffa8a..843ba61 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-FREESCALE_IMX_VERSION = 3.5.7-1.0.0
+FREESCALE_IMX_VERSION = 3.10.17-1.0.0
 FREESCALE_IMX_SITE    = http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/
 
 include $(sort $(wildcard package/freescale-imx/*/*.mk))
package/freescale-imx/imx-lib/imx-lib.mk +5 -21
index 4f605d7..253ed31 100644
@@ -6,18 +6,19 @@
 
 IMX_LIB_VERSION = $(FREESCALE_IMX_VERSION)
 IMX_LIB_SITE    = $(FREESCALE_IMX_SITE)
-IMX_LIB_LICENSE = Freescale License (vpu), LGPLv2.1+ (the rest)
+IMX_LIB_LICENSE = LGPLv2.1+
 IMX_LIB_LICENSE_FILES = EULA
-IMX_LIB_SOURCE = imx-lib-$(IMX_LIB_VERSION).bin
+IMX_LIB_SOURCE = imx-lib-$(IMX_LIB_VERSION).tar.gz
 
 IMX_LIB_INSTALL_STAGING = YES
 
 # imx-lib needs access to imx-specific kernel headers
 IMX_LIB_DEPENDENCIES += linux
 IMX_LIB_INCLUDE = \
+	-I$(LINUX_DIR)/include/uapi \
+	-I$(LINUX_DIR)/include \
 	-I$(LINUX_DIR)/drivers/mxc/security/rng/include \
-	-I$(LINUX_DIR)/drivers/mxc/security/sahara2/include \
-	-idirafter $(LINUX_DIR)/include
+	-I$(LINUX_DIR)/drivers/mxc/security/sahara2/include
 
 IMX_LIB_MAKE_ENV = \
 	$(TARGET_MAKE_ENV) \
@@ -26,23 +27,6 @@ IMX_LIB_MAKE_ENV = \
 	PLATFORM=$(BR2_PACKAGE_IMX_LIB_PLATFORM) \
 	INCLUDE="$(IMX_LIB_INCLUDE)"
 
-# The archive is a shell-self-extractor of a bzipped tar. It happens
-# to extract in the correct directory (imx-lib-x.y.z)
-# The --force makes sure it doesn't fail if the source dir already exists.
-# The --auto-accept skips the license check - not needed for us
-# because we have legal-info
-# Since there's a EULA in the bin file, extract it to imx-lib-x.y.z/EULA
-#
-define IMX_LIB_EXTRACT_CMDS
-	awk 'BEGIN      { start=0; } \
-	     /^EOEULA/  { start = 0; } \
-	                { if (start) print; } \
-	     /<<EOEULA/ { start=1; }'\
-	    $(DL_DIR)/$(IMX_LIB_SOURCE) > $(@D)/EULA
-	cd $(BUILD_DIR); \
-	sh $(DL_DIR)/$(IMX_LIB_SOURCE) --force --auto-accept
-endef
-
 define IMX_LIB_BUILD_CMDS
 	$(IMX_LIB_MAKE_ENV) $(MAKE1) -C $(@D)
 endef
package/freescale-imx/imx-vpu/Config.in new file +53 -0

53 lines not on this page · raw message

package/freescale-imx/imx-vpu/imx-vpu-0001-fix-IOSystemInit-failure.patch new file +21 -0
new file mode 100644
index 0000000..b73a959
@@ -0,0 +1,21 @@
+[PATCH] fix IOSystemInit failure
+
+Signed-off-by: Gary Bisson <[email protected]>
+---
+ vpu/vpu_io.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vpu/vpu_io.c b/vpu/vpu_io.c
+index 8cbb571..14759da 100644
+--- a/vpu/vpu_io.c
++++ b/vpu/vpu_io.c
+@@ -265,7 +265,7 @@ int IOSystemInit(void *callback)
+ 		goto err;
+ 	}
+ 
+-	if (IOGetVirtMem(&bit_work_addr) <= 0)
++	if (IOGetVirtMem(&bit_work_addr) == -1)
+ 		goto err;
+ #endif
+ 	UnlockVpu(vpu_semap);
+
package/freescale-imx/imx-vpu/imx-vpu.mk new file +57 -0

57 lines not on this page · raw message

Signature · 1 line
2.0.0
#2 lore raw

PATCH 1/5 freescale-imx: bump to version 3.10.17-1.0.0

Gary, All,

On 2014-06-18 21:03 -0700, Gary Bisson spake thusly:

Quoted 1 line

Please, provide a detailed commit log.

This patch does more than 'just' bumping the version, since it:
- bumps the version,
- adds a new package (imx-vpu),
- changes the build commands of imx-libs,
- breaks libfslvpuwrap as it changed versionning scheme.

I have a few comments for each parts, see below.

I'm a bit sceptic as to whether we should introduce imx-vpu in this patch, or introduce it with its own patch... Peter, what's your opinion?

package/freescale-imx/freescale-imx.mk line 7

Quoted 10 lines
package/freescale-imx/freescale-imx.mk +1 -1
index 39ffa8a..843ba61 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-FREESCALE_IMX_VERSION = 3.5.7-1.0.0
+FREESCALE_IMX_VERSION = 3.10.17-1.0.0

This change breaks libfslvpuwrap, because it does not exist in this new version.

I think it would be better to bump libfslvpywrap before this bump, or at least:
1- change libfslvpuwrap to use its own version string (3.5.7-1.0.0) 2- bump the freescale packages (this patch) to 3.10.17-1.0.0 3- bump libfslvpuwrap to its own version number.

It might even make sense to do patch 2+3 together...

Quoted 8 lines
package/freescale-imx/freescale-imx.mk +0 -0
 FREESCALE_IMX_SITE    = http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/
 
 include $(sort $(wildcard package/freescale-imx/*/*.mk))
package/freescale-imx/imx-lib/imx-lib.mk +0 -0
index 4f605d7..253ed31 100644

package/freescale-imx/imx-lib/imx-lib.mk line 11

Quoted 8 lines
package/freescale-imx/imx-lib/imx-lib.mk +2 -2
@@ -6,18 +6,19 @@
 
 IMX_LIB_VERSION = $(FREESCALE_IMX_VERSION)
 IMX_LIB_SITE    = $(FREESCALE_IMX_SITE)
-IMX_LIB_LICENSE = Freescale License (vpu), LGPLv2.1+ (the rest)
+IMX_LIB_LICENSE = LGPLv2.1+
 IMX_LIB_LICENSE_FILES = EULA
-IMX_LIB_SOURCE = imx-lib-$(IMX_LIB_VERSION).bin
+IMX_LIB_SOURCE = imx-lib-$(IMX_LIB_VERSION).tar.gz

Yeah! They switched! :-)

package/freescale-imx/imx-lib/imx-lib.mk line 21

Quoted 11 lines
package/freescale-imx/imx-lib/imx-lib.mk +3 -2
 IMX_LIB_INSTALL_STAGING = YES
 
 # imx-lib needs access to imx-specific kernel headers
 IMX_LIB_DEPENDENCIES += linux
 IMX_LIB_INCLUDE = \
+	-I$(LINUX_DIR)/include/uapi \
+	-I$(LINUX_DIR)/include \
 	-I$(LINUX_DIR)/drivers/mxc/security/rng/include \
-	-I$(LINUX_DIR)/drivers/mxc/security/sahara2/include \
-	-idirafter $(LINUX_DIR)/include
+	-I$(LINUX_DIR)/drivers/mxc/security/sahara2/include

This change is dubious. We really do want the include dirs from the kernel to only come _after_ the standard search dirs, hence the existing -idirafter directive.

Searching in the kernel dir is ugly, because those are non-sanitised headers, and we do favour headers from the toolchain (which are userland-clean) over those from the kernel tree.

Also, I think only using the uapi include dir should be enough.

Quoted 38 lines
package/freescale-imx/imx-vpu/Config.in new file +32 -0
new file mode 100644
index 0000000..e3e5823
@@ -0,0 +1,53 @@
+comment "imx-vpu needs an imx-specific Linux kernel to be built"
+	depends on BR2_arm && !BR2_LINUX_KERNEL
+
+config BR2_PACKAGE_IMX_VPU
+	bool "imx-vpu"
+	depends on BR2_LINUX_KERNEL
+	depends on BR2_arm # Only relevant for i.MX
+	help
+	  Library of userspace helpers specific for the Freescale i.MX
+	  platform. It wraps the kernel interfaces for the i.MX platform
+	  Video Processing Unit (VPU) driver. It requires a kernel that
+	  includes the i.MX specific headers to be built.
+
+	  This library is provided by Freescale as-is and doesn't have
+	  an upstream.
+
+if BR2_PACKAGE_IMX_VPU
+choice
+	prompt "i.MX platform"
+
+config BR2_PACKAGE_IMX_VPU_PLATFORM_IMX25_3STACK
+	bool "imx25-3stack"
+
+config BR2_PACKAGE_IMX_VPU_PLATFORM_IMX27ADS
+	bool "imx27ads"
+
+config BR2_PACKAGE_IMX_VPU_PLATFORM_IMX37_3STACK
+	bool "imx37-3stack"
+
+config BR2_PACKAGE_IMX_VPU_PLATFORM_IMX50
+	bool "imx50"
+

package/freescale-imx/imx-vpu/Config.in line 42

Quoted 10 lines
package/freescale-imx/imx-vpu/Config.in new file +10 -0
+config BR2_PACKAGE_IMX_VPU_PLATFORM_IMX51
+	bool "imx51"
+
+config BR2_PACKAGE_IMX_VPU_PLATFORM_IMX53
+	bool "imx53"
+
+config BR2_PACKAGE_IMX_VPU_PLATFORM_IMX6Q
+	bool "imx6q"
+
+endchoice

We already have this choice in the imx-lib package:
- if it no longer relevant to imx-lib, just remove it from imx-lib and keep it in imx-vpu
- if it is still valide for imx-lib, then we should make it a common choice, valid for both imx-lib and imx-vpu.

In the latter case, you'd have to move it into:
package/freescale-imx/Config.in

Rename options so they are no longer imx-lib specific, and use those new options both in imx-lib and imx-vpu. The new names could be somethng like (for example, with i.MX6Q):
BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q

Also applies to the following block, of course:

Quoted 16 lines
package/freescale-imx/imx-vpu/Config.in new file +10 -0
+config BR2_PACKAGE_IMX_VPU_PLATFORM
+	string
+	default "IMX25_3STACK" if BR2_PACKAGE_IMX_VPU_PLATFORM_IMX25_3STACK
+	default "IMX27ADS" if BR2_PACKAGE_IMX_VPU_PLATFORM_IMX27ADS
+	default "IMX37_3STACK" if BR2_PACKAGE_IMX_VPU_PLATFORM_IMX37_3STACK
+	default "IMX50" if BR2_PACKAGE_IMX_VPU_PLATFORM_IMX50
+	default "IMX51" if BR2_PACKAGE_IMX_VPU_PLATFORM_IMX51
+	default "IMX53" if BR2_PACKAGE_IMX_VPU_PLATFORM_IMX53
+	default "IMX6Q" if BR2_PACKAGE_IMX_VPU_PLATFORM_IMX6Q
+endif
package/freescale-imx/imx-vpu/imx-vpu-0001-fix-IOSystemInit-failure.patch new file +0 -0
new file mode 100644
index 0000000..b73a959

package/freescale-imx/imx-vpu/imx-vpu-0001-fix-IOSystemInit-failure.patch line 1

Quoted 1 line
package/freescale-imx/imx-vpu/imx-vpu-0001-fix-IOSystemInit-failure.patch new file +1 -0
@@ -0,0 +1,21 @@
+[PATCH] fix IOSystemInit failure

Please provide a more detailed comit log. Why do we need this?

Quoted 34 lines
package/freescale-imx/imx-vpu/imx-vpu-0001-fix-IOSystemInit-failure.patch new file +19 -0
+Signed-off-by: Gary Bisson <[email protected]>
+---
+ vpu/vpu_io.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vpu/vpu_io.c b/vpu/vpu_io.c
+index 8cbb571..14759da 100644
+--- a/vpu/vpu_io.c
++++ b/vpu/vpu_io.c
+@@ -265,7 +265,7 @@ int IOSystemInit(void *callback)
+ 		goto err;
+ 	}
+ 
+-	if (IOGetVirtMem(&bit_work_addr) <= 0)
++	if (IOGetVirtMem(&bit_work_addr) == -1)
+ 		goto err;
+ #endif
+ 	UnlockVpu(vpu_semap);
+
package/freescale-imx/imx-vpu/imx-vpu.mk new file +9 -0
new file mode 100644
index 0000000..fb72203
@@ -0,0 +1,57 @@
+################################################################################
+#
+# imx-vpu
+#
+################################################################################
+
+IMX_VPU_VERSION = $(FREESCALE_IMX_VERSION)
+IMX_VPU_SITE    = $(FREESCALE_IMX_SITE)
+IMX_VPU_LICENSE = Freescale License

package/freescale-imx/imx-vpu/imx-vpu.mk line 19

Quoted 10 lines
package/freescale-imx/imx-vpu/imx-vpu.mk new file +10 -0
+IMX_VPU_LICENSE_FILES = EULA
+IMX_VPU_SOURCE = imx-vpu-$(IMX_VPU_VERSION).bin
+
+IMX_VPU_INSTALL_STAGING = YES
+
+# imx-vpu needs access to imx-specific kernel headers
+IMX_VPU_DEPENDENCIES += linux
+IMX_VPU_INCLUDE = \
+	-I$(LINUX_DIR)/include/uapi \
+	-I$(LINUX_DIR)/include

Again, I believe this should be -idirafter instead of -I .

Quoted 27 lines
package/freescale-imx/imx-vpu/imx-vpu.mk new file +27 -0
+IMX_VPU_MAKE_ENV = \
+	$(TARGET_MAKE_ENV) \
+	$(TARGET_CONFIGURE_OPTS) \
+	CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" \
+	PLATFORM=$(BR2_PACKAGE_IMX_VPU_PLATFORM) \
+	INCLUDE="$(IMX_VPU_INCLUDE)"
+
+# The archive is a shell-self-extractor of a bzipped tar. It happens
+# to extract in the correct directory (imx-vpu-x.y.z)
+# The --force makes sure it doesn't fail if the source dir already exists.
+# The --auto-accept skips the license check - not needed for us
+# because we have legal-info
+# Since there's a EULA in the bin file, extract it to imx-vpu-x.y.z/EULA
+#
+define IMX_VPU_EXTRACT_CMDS
+	awk 'BEGIN      { start=0; } \
+	     /^EOEULA/  { start = 0; } \
+	                { if (start) print; } \
+	     /<<EOEULA/ { start=1; }'\
+	    $(DL_DIR)/$(IMX_VPU_SOURCE) > $(@D)/EULA
+	cd $(BUILD_DIR); \
+	sh $(DL_DIR)/$(IMX_VPU_SOURCE) --force --auto-accept
+endef
+
+define IMX_VPU_BUILD_CMDS
+	$(IMX_VPU_MAKE_ENV) $(MAKE1) -C $(@D)
+endef

package/freescale-imx/imx-vpu/imx-vpu.mk line 57

Quoted 10 lines
package/freescale-imx/imx-vpu/imx-vpu.mk new file +10 -0
+
+define IMX_VPU_INSTALL_STAGING_CMDS
+	$(IMX_VPU_MAKE_ENV) $(MAKE1) -C $(@D) DEST_DIR=$(STAGING_DIR) install
+endef
+
+define IMX_VPU_INSTALL_TARGET_CMDS
+	$(IMX_VPU_MAKE_ENV) $(MAKE1) -C $(@D) DEST_DIR=$(TARGET_DIR) install
+endef
+
+$(eval $(generic-package))

Otherwise, looks good.

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.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/5 freescale-imx: bump to version 3.10.17-1.0.0

Hi Yann,

Thanks for all the feedback! My comments below.

Quoted 5 lines · Yann E. MORIN

Gary, All,

On 2014-06-18 21:03 -0700, Gary Bisson spake thusly:

Quoted 1 line
Quoted 8 lines

Please, provide a detailed commit log.

This patch does more than 'just' bumping the version, since it:
- bumps the version,
- adds a new package (imx-vpu),
- changes the build commands of imx-libs,
- breaks libfslvpuwrap as it changed versionning scheme.

Next time I'll try to be more talkative ;-)

Quoted 6 lines

I have a few comments for each parts, see below.

I'm a bit sceptic as to whether we should introduce imx-vpu in this patch, or introduce it with its own patch... Peter, what's your opinion?

I almost made it in 2/3 commits, as the new package was implied by the change of version I figured it'd be ok. But it makes sense to separate the bump from the inside packages modifications.

Quoted 17 lines

Review

Quoted 2 lines
(quoted diff) +0 -0

b/package/freescale-imx/freescale-imx.mk

package/freescale-imx/freescale-imx.mk line 5

Quoted 6 lines

index 39ffa8a..843ba61 100644

package/freescale-imx/freescale-imx.mk +0 -0
@@ -4,7 +4,7 @@
 #
 

################################################################################

package/freescale-imx/freescale-imx.mk line 7

Quoted 3 lines
package/freescale-imx/freescale-imx.mk +1 -1
-FREESCALE_IMX_VERSION = 3.5.7-1.0.0
+FREESCALE_IMX_VERSION = 3.10.17-1.0.0

This change breaks libfslvpuwrap, because it does not exist in this new version.

Quoted 8 lines

I think it would be better to bump libfslvpywrap before this bump, or at least:
1- change libfslvpuwrap to use its own version string (3.5.7-1.0.0) 2- bump the freescale packages (this patch) to 3.10.17-1.0.0 3- bump libfslvpuwrap to its own version number.

It might even make sense to do patch 2+3 together...

Ok will re-order and separate those commits.

Quoted 37 lines

Review

Quoted 5 lines
package/freescale-imx/freescale-imx.mk +0 -0
 FREESCALE_IMX_SITE    = http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/
 
 include $(sort $(wildcard package/freescale-imx/*/*.mk))
(quoted diff) +0 -0

b/package/freescale-imx/imx-lib/imx-lib.mk

package/freescale-imx/imx-lib/imx-lib.mk line 11

Quoted 12 lines

index 4f605d7..253ed31 100644

package/freescale-imx/imx-lib/imx-lib.mk +2 -2
@@ -6,18 +6,19 @@
 
 IMX_LIB_VERSION = $(FREESCALE_IMX_VERSION)
 IMX_LIB_SITE    = $(FREESCALE_IMX_SITE)
-IMX_LIB_LICENSE = Freescale License (vpu), LGPLv2.1+ (the rest)
+IMX_LIB_LICENSE = LGPLv2.1+
 IMX_LIB_LICENSE_FILES = EULA
-IMX_LIB_SOURCE = imx-lib-$(IMX_LIB_VERSION).bin
+IMX_LIB_SOURCE = imx-lib-$(IMX_LIB_VERSION).tar.gz

Yeah! They switched! :-)

package/freescale-imx/imx-lib/imx-lib.mk line 21

Quoted 11 lines
package/freescale-imx/imx-lib/imx-lib.mk +3 -2
 IMX_LIB_INSTALL_STAGING = YES
 
 # imx-lib needs access to imx-specific kernel headers
 IMX_LIB_DEPENDENCIES += linux
 IMX_LIB_INCLUDE = \
+     -I$(LINUX_DIR)/include/uapi \
+     -I$(LINUX_DIR)/include \
      -I$(LINUX_DIR)/drivers/mxc/security/rng/include \
-     -I$(LINUX_DIR)/drivers/mxc/security/sahara2/include \
-     -idirafter $(LINUX_DIR)/include
+     -I$(LINUX_DIR)/drivers/mxc/security/sahara2/include

This change is dubious. We really do want the include dirs from the kernel to only come _after_ the standard search dirs, hence the existing -idirafter directive.

Quoted 6 lines

Searching in the kernel dir is ugly, because those are non-sanitised headers, and we do favour headers from the toolchain (which are userland-clean) over those from the kernel tree.

Also, I think only using the uapi include dir should be enough.

My bad, I actually just applied the same parameters as the Yocto recipe without even thinking about the -idirafter (which I didn't know). I will remove it.

Quoted 57 lines

Review

Quoted 2 lines
(quoted diff) +0 -0

b/package/freescale-imx/imx-vpu/Config.in

Quoted 37 lines

new file mode 100644
index 0000000..e3e5823

package/freescale-imx/imx-vpu/Config.in new file +32 -0
@@ -0,0 +1,53 @@
+comment "imx-vpu needs an imx-specific Linux kernel to be built"
+     depends on BR2_arm && !BR2_LINUX_KERNEL
+
+config BR2_PACKAGE_IMX_VPU
+     bool "imx-vpu"
+     depends on BR2_LINUX_KERNEL
+     depends on BR2_arm # Only relevant for i.MX
+     help
+       Library of userspace helpers specific for the Freescale i.MX
+       platform. It wraps the kernel interfaces for the i.MX platform
+       Video Processing Unit (VPU) driver. It requires a kernel that
+       includes the i.MX specific headers to be built.
+
+       This library is provided by Freescale as-is and doesn't have
+       an upstream.
+
+if BR2_PACKAGE_IMX_VPU
+choice
+     prompt "i.MX platform"
+
+config BR2_PACKAGE_IMX_VPU_PLATFORM_IMX25_3STACK
+     bool "imx25-3stack"
+
+config BR2_PACKAGE_IMX_VPU_PLATFORM_IMX27ADS
+     bool "imx27ads"
+
+config BR2_PACKAGE_IMX_VPU_PLATFORM_IMX37_3STACK
+     bool "imx37-3stack"
+
+config BR2_PACKAGE_IMX_VPU_PLATFORM_IMX50
+     bool "imx50"
+

package/freescale-imx/imx-vpu/Config.in line 42

Quoted 10 lines
package/freescale-imx/imx-vpu/Config.in new file +10 -0
+config BR2_PACKAGE_IMX_VPU_PLATFORM_IMX51
+     bool "imx51"
+
+config BR2_PACKAGE_IMX_VPU_PLATFORM_IMX53
+     bool "imx53"
+
+config BR2_PACKAGE_IMX_VPU_PLATFORM_IMX6Q
+     bool "imx6q"
+
+endchoice

We already have this choice in the imx-lib package:
- if it no longer relevant to imx-lib, just remove it from imx-lib and keep it in imx-vpu
- if it is still valide for imx-lib, then we should make it a common choice, valid for both imx-lib and imx-vpu.

Quoted 9 lines

In the latter case, you'd have to move it into:
package/freescale-imx/Config.in

Rename options so they are no longer imx-lib specific, and use those new options both in imx-lib and imx-vpu. The new names could be somethng like (for example, with i.MX6Q):
BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q

Makes sense, it looked weird in the menu to be able to select imx6q for imx-lib and something else for imx-vpu. FYI, imx-lib still needs the differentiation between the iMX platforms (IPU etc...)

Quoted 19 lines

Also applies to the following block, of course:

Quoted 11 lines
package/freescale-imx/imx-vpu/Config.in new file +10 -0
+config BR2_PACKAGE_IMX_VPU_PLATFORM
+     string
+     default "IMX25_3STACK" if BR2_PACKAGE_IMX_VPU_PLATFORM_IMX25_3STACK
+     default "IMX27ADS" if BR2_PACKAGE_IMX_VPU_PLATFORM_IMX27ADS
+     default "IMX37_3STACK" if BR2_PACKAGE_IMX_VPU_PLATFORM_IMX37_3STACK
+     default "IMX50" if BR2_PACKAGE_IMX_VPU_PLATFORM_IMX50
+     default "IMX51" if BR2_PACKAGE_IMX_VPU_PLATFORM_IMX51
+     default "IMX53" if BR2_PACKAGE_IMX_VPU_PLATFORM_IMX53
+     default "IMX6Q" if BR2_PACKAGE_IMX_VPU_PLATFORM_IMX6Q
+endif

diff --git

a/package/freescale-imx/imx-vpu/imx-vpu-0001-fix-IOSystemInit-failure.patch b/package/freescale-imx/imx-vpu/imx-vpu-0001-fix-IOSystemInit-failure.patch

Quoted 4 lines

new file mode 100644
index 0000000..b73a959
--- /dev/null
+++

Quoted 6 lines

b/package/freescale-imx/imx-vpu/imx-vpu-0001-fix-IOSystemInit-failure.patch

package/freescale-imx/imx-vpu/Config.in line 1

Quoted 2 lines
package/freescale-imx/imx-vpu/Config.in new file +1 -0
@@ -0,0 +1,21 @@
+[PATCH] fix IOSystemInit failure

Please provide a more detailed comit log. Why do we need this?

As I said in the first patch I used the nitrogen6x to do my testing, there is one "big" difference between freescale and boundary kernel which is the memory split (2G/2G for FSL, 3G/1G for Boundary). Clearly the VPU code has only been tested on Freescale kernels because there is no way it works on kernel with the latter splitting. The VPU init function returns an error if the allocated buffer address is < 0 which does not make any sense. Instead the test should be against MAP_FAILED (-1). Only after that patch I've been able to get the VPU decoding working. I will change the -1 into MAP_FAILED for the next patch.

Quoted 34 lines

Review

Quoted 21 lines
package/freescale-imx/imx-vpu/Config.in new file +19 -0
+Signed-off-by: Gary Bisson <[email protected]>
+---
+ vpu/vpu_io.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vpu/vpu_io.c b/vpu/vpu_io.c
+index 8cbb571..14759da 100644
+--- a/vpu/vpu_io.c
++++ b/vpu/vpu_io.c
+@@ -265,7 +265,7 @@ int IOSystemInit(void *callback)
+             goto err;
+     }
+
+-    if (IOGetVirtMem(&bit_work_addr) <= 0)
++    if (IOGetVirtMem(&bit_work_addr) == -1)
+             goto err;
+ #endif
+     UnlockVpu(vpu_semap);
+
(quoted diff) +0 -0

b/package/freescale-imx/imx-vpu/imx-vpu.mk

package/freescale-imx/imx-vpu/imx-vpu.mk

Quoted 6 lines

new file mode 100644
index 0000000..fb72203

package/freescale-imx/imx-vpu/imx-vpu.mk new file +0 -0
@@ -0,0 +1,57 @@

+################################################################################

package/freescale-imx/imx-vpu/imx-vpu.mk line 4

Quoted 4 lines
package/freescale-imx/imx-vpu/imx-vpu.mk new file +3 -0
+#
+# imx-vpu
+#

+################################################################################

Quoted 17 lines
Quoted 4 lines
package/freescale-imx/imx-vpu/imx-vpu.mk new file +4 -0
+
+IMX_VPU_VERSION = $(FREESCALE_IMX_VERSION)
+IMX_VPU_SITE    = $(FREESCALE_IMX_SITE)
+IMX_VPU_LICENSE = Freescale License

package/freescale-imx/imx-vpu/imx-vpu.mk line 19

Quoted 10 lines
package/freescale-imx/imx-vpu/imx-vpu.mk new file +10 -0
+IMX_VPU_LICENSE_FILES = EULA
+IMX_VPU_SOURCE = imx-vpu-$(IMX_VPU_VERSION).bin
+
+IMX_VPU_INSTALL_STAGING = YES
+
+# imx-vpu needs access to imx-specific kernel headers
+IMX_VPU_DEPENDENCIES += linux
+IMX_VPU_INCLUDE = \
+     -I$(LINUX_DIR)/include/uapi \
+     -I$(LINUX_DIR)/include

Again, I believe this should be -idirafter instead of -I .

Same as above, will fix it.

Quoted 58 lines

package/freescale-imx/imx-vpu/imx-vpu.mk

Quoted 11 lines
package/freescale-imx/imx-vpu/imx-vpu.mk new file +10 -0
+IMX_VPU_MAKE_ENV = \
+     $(TARGET_MAKE_ENV) \
+     $(TARGET_CONFIGURE_OPTS) \
+     CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" \
+     PLATFORM=$(BR2_PACKAGE_IMX_VPU_PLATFORM) \
+     INCLUDE="$(IMX_VPU_INCLUDE)"
+
+# The archive is a shell-self-extractor of a bzipped tar. It happens
+# to extract in the correct directory (imx-vpu-x.y.z)
+# The --force makes sure it doesn't fail if the source dir already

exists.

Quoted 10 lines
package/freescale-imx/imx-vpu/imx-vpu.mk new file +10 -0
+# The --auto-accept skips the license check - not needed for us
+# because we have legal-info
+# Since there's a EULA in the bin file, extract it to imx-vpu-x.y.z/EULA
+#
+define IMX_VPU_EXTRACT_CMDS
+     awk 'BEGIN      { start=0; } \
+          /^EOEULA/  { start = 0; } \
+                     { if (start) print; } \
+          /<<EOEULA/ { start=1; }'\
+         $(DL_DIR)/$(IMX_VPU_SOURCE) > $(@D)/EULA

package/freescale-imx/imx-vpu/imx-vpu.mk

Quoted 10 lines
package/freescale-imx/imx-vpu/imx-vpu.mk new file +10 -0
+     cd $(BUILD_DIR); \
+     sh $(DL_DIR)/$(IMX_VPU_SOURCE) --force --auto-accept
+endef
+
+define IMX_VPU_BUILD_CMDS
+     $(IMX_VPU_MAKE_ENV) $(MAKE1) -C $(@D)
+endef
+
+define IMX_VPU_INSTALL_STAGING_CMDS
+     $(IMX_VPU_MAKE_ENV) $(MAKE1) -C $(@D) DEST_DIR=$(STAGING_DIR)

install

package/freescale-imx/imx-vpu/imx-vpu.mk

Quoted 4 lines
package/freescale-imx/imx-vpu/imx-vpu.mk new file +4 -0
+endef
+
+define IMX_VPU_INSTALL_TARGET_CMDS
+     $(IMX_VPU_MAKE_ENV) $(MAKE1) -C $(@D) DEST_DIR=$(TARGET_DIR)

install

package/freescale-imx/imx-vpu/imx-vpu.mk line 57

Quoted 3 lines
package/freescale-imx/imx-vpu/imx-vpu.mk new file +3 -0
+endef
+
+$(eval $(generic-package))

Otherwise, looks good.

Regards,
Yann E. MORIN.

--
.-----------------.--------------------.------------------.-
-------------------.

|  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.  |
Quoted 2 lines

'------------------------------^-------^------------------^- -------------------'

Thanks,
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140619/786584ce/attachment.html>

#4 lore raw

PATCH 1/5 freescale-imx: bump to version 3.10.17-1.0.0

Gary, All,

On 2014-06-19 19:40 -0700, Gary Bisson spake thusly:

Quoted 14 lines
Quoted 7 lines
Quoted 1 line

diff --git

a/package/freescale-imx/imx-vpu/imx-vpu-0001-fix-IOSystemInit-failure.patch b/package/freescale-imx/imx-vpu/imx-vpu-0001-fix-IOSystemInit-failure.patch

Quoted 4 lines

new file mode 100644
index 0000000..b73a959
--- /dev/null
+++

Quoted 6 lines

b/package/freescale-imx/imx-vpu/imx-vpu-0001-fix-IOSystemInit-failure.patch

package/freescale-imx/imx-vpu/imx-vpu-0001-fix-IOSystemInit-failure.patch line 1

Quoted 2 lines
package/freescale-imx/imx-vpu/imx-vpu-0001-fix-IOSystemInit-failure.patch new file +1 -0
@@ -0,0 +1,21 @@
+[PATCH] fix IOSystemInit failure

Please provide a more detailed comit log. Why do we need this?

Quoted 9 lines

As I said in the first patch I used the nitrogen6x to do my testing, there is one "big" difference between freescale and boundary kernel which is the memory split (2G/2G for FSL, 3G/1G for Boundary). Clearly the VPU code has only been tested on Freescale kernels because there is no way it works on kernel with the latter splitting. The VPU init function returns an error if the allocated buffer address is < 0 which does not make any sense. Instead the test should be against MAP_FAILED (-1). Only after that patch I've been able to get the VPU decoding working. I will change the -1 into MAP_FAILED for the next patch.

OK, I see. You should also repeat this in the patch description, like:

vpu-io: fix IOSystemInit failure

There is one "big" difference between freescale and boundary kernel which is the memory split (2G/2G for FSL, 3G/1G for Boundary).

Clearly the VPU code has only been tested on Freescale kernels because there is no way it works on kernel with the latter splitting. The VPU init function returns an error if the allocated buffer address is < 0, which happens with the 3G/1G split.

Fix the test by checking against MAP_FAILED instead.

Signed-off-by You <you@there>

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.  |
'------------------------------^-------^------------------^--------------------'
#5 lore raw

PATCH 1/5 freescale-imx: bump to version 3.10.17-1.0.0

Hi Yann and Gary,

Quoted 26 lines · Yann E. MORIN

Gary, All,

On 2014-06-19 19:40 -0700, Gary Bisson spake thusly:

Quoted 23 lines
Quoted 7 lines
Quoted 1 line

diff --git

a/package/freescale-imx/imx-vpu/imx-vpu-0001-fix-IOSystemInit-failure.patch b/package/freescale-imx/imx-vpu/imx-vpu-0001-fix-IOSystemInit-failure.patch

Quoted 4 lines

new file mode 100644
index 0000000..b73a959
--- /dev/null
+++

Quoted 6 lines

b/package/freescale-imx/imx-vpu/imx-vpu-0001-fix-IOSystemInit-failure.patch

package/freescale-imx/imx-vpu/imx-vpu-0001-fix-IOSystemInit-failure.patch line 1

Quoted 2 lines
package/freescale-imx/imx-vpu/imx-vpu-0001-fix-IOSystemInit-failure.patch new file +1 -0
@@ -0,0 +1,21 @@
+[PATCH] fix IOSystemInit failure

Please provide a more detailed comit log. Why do we need this?

As I said in the first patch I used the nitrogen6x to do my testing, there is one "big" difference between freescale and boundary kernel which is the memory split (2G/2G for FSL, 3G/1G for Boundary). Clearly the VPU code has only been tested on Freescale kernels because there is no way it works on kernel with the latter splitting. The VPU init function returns an error if the allocated buffer address is < 0 which does not make any sense. Instead the test should be against MAP_FAILED (-1). Only after that patch I've been able to get the VPU decoding working. I will change the -1 into MAP_FAILED for the next patch.

Nice catch. I do think this should be split into a separate patch though.

A quick scan of this code shows that there are four other places that have the test for IOGetVirtMem() <= 0.

Quoted 22 lines

OK, I see. You should also repeat this in the patch description, like:

vpu-io: fix IOSystemInit failure

There is one "big" difference between freescale and boundary kernel which is the memory split (2G/2G for FSL, 3G/1G for Boundary).

Clearly the VPU code has only been tested on Freescale kernels because there is no way it works on kernel with the latter splitting. The VPU init function returns an error if the allocated buffer address is < 0, which happens with the 3G/1G split.

Fix the test by checking against MAP_FAILED instead.

Signed-off-by You <you@there>

Thanks! :-)

Regards,
Yann E. MORIN.

#6 lore raw

PATCH 2/5 libfslvpuwrap: bump to version 1.0.46

In reply to Gary Bisson
---
 package/libfslvpuwrap/Config.in        | 2 +-
 package/libfslvpuwrap/libfslvpuwrap.mk | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
package/libfslvpuwrap/Config.in +1 -1
index 9cf7633..fa85ce5 100644
@@ -6,7 +6,7 @@ config BR2_PACKAGE_LIBFSLVPUWRAP
 	bool "libfslvpuwrap"
 	depends on BR2_LINUX_KERNEL
 	depends on BR2_arm # Only relevant for i.MX
-	select BR2_PACKAGE_IMX_LIB
+	select BR2_PACKAGE_IMX_VPU
 	help
 	  Wrapper library for the vpu library, giving it a different API.
 
package/libfslvpuwrap/libfslvpuwrap.mk +2 -2
index 75c9887..c3a5c1c 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBFSLVPUWRAP_VERSION = $(FREESCALE_IMX_VERSION)
+LIBFSLVPUWRAP_VERSION = 1.0.46
 LIBFSLVPUWRAP_SITE = $(FREESCALE_IMX_SITE)
 LIBFSLVPUWRAP_SOURCE = libfslvpuwrap-$(LIBFSLVPUWRAP_VERSION).bin
 LIBFSLVPUWRAP_LICENSE = Freescale Semiconductor Software License Agreement
@@ -14,7 +14,7 @@ LIBFSLVPUWRAP_REDISTRIBUTE = NO
 
 LIBFSLVPUWRAP_INSTALL_STAGING = YES
 
-LIBFSLVPUWRAP_DEPENDENCIES += imx-lib
+LIBFSLVPUWRAP_DEPENDENCIES += imx-vpu
 
 # The archive is a shell-self-extractor of a bzipped tar. It happens
 # to extract in the correct directory (libfslvpuwrap-x.y.z)
Signature · 1 line
2.0.0
#7 lore raw

PATCH 3/5 libfslcodec: bump to version 3.0.11

In reply to Gary Bisson
---
 package/libfslcodec/libfslcodec.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/libfslcodec/libfslcodec.mk +1 -1
index d52158c..1a364bb 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBFSLCODEC_VERSION = $(FREESCALE_IMX_VERSION)
+LIBFSLCODEC_VERSION = 3.0.11
 LIBFSLCODEC_SITE = $(FREESCALE_IMX_SITE)
 LIBFSLCODEC_SOURCE = libfslcodec-$(LIBFSLCODEC_VERSION).bin
 LIBFSLCODEC_LICENSE = Freescale Semiconductor Software License Agreement, BSD-3c (flac, ogg headers)
Signature · 1 line
2.0.0
#8 lore raw

PATCH 4/5 libfslparser: bump to version 3.0.11

In reply to Gary Bisson
---
 package/libfslparser/libfslparser.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/libfslparser/libfslparser.mk +1 -1
index 0d92e02..d52b151 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBFSLPARSER_VERSION = $(FREESCALE_IMX_VERSION)
+LIBFSLPARSER_VERSION = 3.0.11
 LIBFSLPARSER_SITE = $(FREESCALE_IMX_SITE)
 LIBFSLPARSER_SOURCE = libfslparser-$(LIBFSLPARSER_VERSION).bin
 LIBFSLPARSER_LICENSE = Freescale Semiconductor Software License Agreement
Signature · 1 line
2.0.0
#9 lore raw

PATCH 5/5 gst-fsl-plugins: bump to version 3.0.11

In reply to Gary Bisson
---
 ...gins-0002-Fix-bashism-in-configure-script.patch |  25 +-
 .../gst-fsl-plugins-0003-Use-proper-objdump.patch  |   6 +-
 ...sl-linkage-add-lrt-for-shared-memory-func.patch |   2 +-
 ...-plugins-0005-build-Fix-out-of-tree-build.patch | 616 +++++++++++++++++++++
 .../gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk   |  13 +-
 5 files changed, 634 insertions(+), 28 deletions(-)
 create mode 100644 package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0005-build-Fix-out-of-tree-build.patch
package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0002-Fix-bashism-in-configure-script.patch +5 -20
index 8af3644..35617cd 100644
@@ -9,29 +9,14 @@ have the default dash as /bin/sh define a variable ending with
 
 Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
 ---
- configure.ac |   22 +++++++++++-----------
- 1 file changed, 11 insertions(+), 11 deletions(-)
+ configure.ac | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
 index 5968eb6..1a31a06 100755
 --- a/configure.ac
 +++ b/configure.ac
-@@ -60,10 +60,10 @@ AC_DEFUN([CHECK_DISABLE_FEATURE],
-         [use_[$1]=yes])
-     if test "$use_[$1]" = "yes"; then
-         SAVE_CPPFLAGS="$CPPFLAGS"
--        CPPFLAGS=`$PKG_CONFIG --cflags libfslaudiocodec`
--        CPPFLAGS+=`$PKG_CONFIG --cflags libfslvideocodec`
--        CPPFLAGS+=`$PKG_CONFIG --cflags libfslparser`
--        CPPFLAGS+=`$PKG_CONFIG --cflags libfslvpuwrap`
-+        CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags libfslaudiocodec`"
-+        CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags libfslvideocodec`"
-+        CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags libfslparser`"
-+        CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags libfslvpuwrap`"
-         AC_CHECK_HEADERS([$4], HAVE_[$3]=yes, HAVE_[$3]=no && break)
-         CPPFLAGS="$SAVE_CPPFLAGS"
-         if test "x$HAVE_[$3]" = "xyes"; then
-@@ -157,7 +157,7 @@ AC_SUBST(GST_PLUGINS_BASE_LIBS)
+@@ -152,7 +152,7 @@ AC_SUBST(GST_PLUGINS_BASE_LIBS)
  AC_CHECK_HEADERS([vpu_lib.h], [HAVE_VPU_LIB=yes], [HAVE_VPU_LIB=no])
  if test "x$HAVE_VPU_LIB" = "xyes"; then
      VPU_LIBS=`$PKG_CONFIG --libs libfslvpuwrap 2>/dev/null`
@@ -40,8 +25,8 @@ index 5968eb6..1a31a06 100755
  fi
  AC_SUBST(VPU_LIBS)
  
-@@ -173,15 +173,15 @@ AC_SUBST(IPU_CFLAGS)
- AC_SUBST(IPU_LIBS)
+@@ -176,15 +176,15 @@ AC_SUBST(RT_CFLAGS)
+ AC_SUBST(RT_LIBS)
  
  FSL_MM_CORE_CFLAGS=`$PKG_CONFIG --cflags libfslaudiocodec 2>/dev/null`
 -FSL_MM_CORE_CFLAGS+=`$PKG_CONFIG --cflags libfslvideocodec 2>/dev/null`
package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0003-Use-proper-objdump.patch +3 -3
index 8fce239..b7b8c9f 100644
@@ -18,16 +18,16 @@ index 1a31a06..cc7557d 100755
 @@ -17,7 +17,7 @@ AC_DEFUN([FIND_PARSER_SONAME],
      AC_MSG_CHECKING([for lib_$1_parser_$2_elinux.3.0.so soname])
      path=`$PKG_CONFIG --variable=libdir libfslparser`
-     SONAME=$( $CC -print-file-name=$path/lib_$1_parser_$2_elinux.so | \
+     SONAME=$( $CC -print-file-name=$PKG_CONFIG_SYSROOT_DIR$path/lib_$1_parser_$2_elinux.so | \
 -	    while read output; do objdump -p $output | \
 +	    while read output; do $OBJDUMP -p $output | \
  	    grep "SONAME" | \
  	    sed -e 's/ \+SONAME \+//'; done 2> /dev/null )
      if [[ -z "$SONAME" ]]; then
-@@ -37,7 +37,7 @@ AC_DEFUN([FIND_ACODEC_SONAME],
+@@ -36,7 +36,7 @@ AC_DEFUN([FIND_ACODEC_SONAME],
      AC_MSG_CHECKING([for lib_$1_wrap_$2_elinux.so soname])
      path=`$PKG_CONFIG --variable=libdir libfslaudiocodec`
-     SONAME=$( $CC -print-file-name=$path/wrap/lib_$1_wrap_$2_elinux.so | \
+     SONAME=$( $CC -print-file-name=$PKG_CONFIG_SYSROOT_DIR$path/wrap/lib_$1_wrap_$2_elinux.so | \
 -	    while read output; do objdump -p $output | \
 +	    while read output; do $OBJDUMP -p $output | \
  	    grep "SONAME" | \
package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0004-Fix-libgstfsl-linkage-add-lrt-for-shared-memory-func.patch +1 -1
index e58467e..763703c 100644
@@ -18,7 +18,7 @@ diff --git a/configure.ac b/configure.ac
 index a5d1655..7b5a7a6 100755
 --- a/configure.ac
 +++ b/configure.ac
-@@ -173,6 +173,9 @@ AC_CHECK_LIB(ipu, mxc_ipu_lib_task_init, [IPU_LIBS=-lipu], [echo "No libipu arou
+@@ -170,6 +170,9 @@ AC_CHECK_LIB(ipu, mxc_ipu_lib_task_init, [IPU_LIBS=-lipu], [echo "No libipu arou
  AC_SUBST(IPU_CFLAGS)
  AC_SUBST(IPU_LIBS)
  
package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0005-build-Fix-out-of-tree-build.patch new file +616 -0

616 lines not on this page · raw message

package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk +9 -4
index 9ec92d8..5b12ced 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-GST_FSL_PLUGINS_VERSION = $(FREESCALE_IMX_VERSION)
+GST_FSL_PLUGINS_VERSION = 3.0.11
 GST_FSL_PLUGINS_SITE = $(FREESCALE_IMX_SITE)
 
 # Most is LGPLv2+, but some sources are copied from upstream and are
@@ -16,13 +16,18 @@ GST_FSL_PLUGINS_INSTALL_STAGING = YES
 GST_FSL_PLUGINS_AUTORECONF = YES
 
 GST_FSL_PLUGINS_DEPENDENCIES += host-pkgconf gstreamer gst-plugins-base \
-	libfslvpuwrap imx-lib libfslparser libfslcodec
+	libfslvpuwrap imx-lib imx-vpu libfslparser libfslcodec
 
-GST_FSL_PLUGINS_CONF_ENV = PLATFORM=$(BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM)
+GST_FSL_PLUGINS_CONF_ENV = \
+	PLATFORM=$(BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM) \
+	CROSS_ROOT="$(STAGING_DIR)"
 
 # needs access to imx-specific kernel headers
 GST_FSL_PLUGINS_DEPENDENCIES += linux
-GST_FSL_PLUGINS_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -idirafter $(LINUX_DIR)/include"
+GST_FSL_PLUGINS_INCLUDE = \
+	-I$(LINUX_DIR)/include/uapi \
+	-I$(LINUX_DIR)/include
+GST_FSL_PLUGINS_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) $(GST_FSL_PLUGINS_INCLUDE)"
 
 ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
 GST_FSL_PLUGINS_DEPENDENCIES += xlib_libX11
Signature · 1 line
2.0.0
#10 lore raw

PATCH 5/5 gst-fsl-plugins: bump to version 3.0.11

Gary, All,

On 2014-06-18 21:03 -0700, Gary Bisson spake thusly:

Quoted 6 lines
---
 ...gins-0002-Fix-bashism-in-configure-script.patch |  25 +-
 .../gst-fsl-plugins-0003-Use-proper-objdump.patch  |   6 +-
 ...sl-linkage-add-lrt-for-shared-memory-func.patch |   2 +-
 ...-plugins-0005-build-Fix-out-of-tree-build.patch | 616 +++++++++++++++++++++

In Buildroot, we're not doing out-of-tree builds of packages, so we do not need the 0005 patch. Since it is a biggish piece, it's better to leave it out.

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.  |
'------------------------------^-------^------------------^--------------------'
#11 lore raw

v2 cover freescale: update userspace packages

In reply to Gary Bisson

Yann, all,

Here is the rework which I hope covers all the previous remarks. This time I tried to be more talkative in every patch but here is a summary:
1- first libfslvpuwrap gets independent as suggested
2- simply bump FREESCALE_IMX_VERSION to 3.10.17-1.0.0
3- update imx-lib: using idirafter just for uapi folder + remove unnecessary EULA
4- make the platform choice as a common option: made BR2_PACKAGE_FREESCALE_IMX a menuconfig not to get BR2_PACKAGE_FREESCALE_IMX_PLATFORM set in every config.
5- just adding the imx-vpu package from Freescale with no modification but using idirafter for uapi folder only
6- bump libfslvpuwrap: now depends on imx-vpu
7- bump libfslcodec: nothing special
8- bump libfslparser: same
9- gst-fsl-plugins: now depends on imx-vpu as well
10/11- fix imx-vpu for the IOGetVirtMem in case of a 3G/1G split: I finally decided not to go with the MAP_FAILED as the return value is an int. I think using -1 is as clear and avoids useless cast. That function could have been written in a simpler way but I didn't want to change the code too much.

Same as last time, testing has been done on a Nitrogen6x using the kernel patch committed previously.

GPU test (gpu-viv-bin-mx6q):

# cd /usr/share/examples/viv_samples/vdk/
# ./tutorial7

VPU test (libfslvpuwrap, libfslcodec, gst-fsl-plugins, imx-vpu):
# VSALPHA=1 gst-launch-0.10 filesrc location=trailer_1080p_h264_mp3.avi ! avidemux ! vpudec ! mfw_isink

Thanks,
Gary

Gary Bisson (11):
libfslvpuwrap: change version to be independent
freescale-imx: bump to version 3.10.17-1.0.0
freescale-imx: update imx-lib package
freescale-imx: change platform choice to be common
freescale-imx: add imx-vpu package
libfslvpuwrap: bump to version 1.0.46
libfslcodec: bump to version 3.0.11
libfslparser: bump to version 3.0.11
gst-fsl-plugins: bump to version 3.0.11
imx-vpu: fix IOSystemInit failure
imx-vpu: fix IOGetVirtMem return value checks

 package/freescale-imx/Config.in                    | 39 ++++++++++++++++
 package/freescale-imx/freescale-imx.mk             |  2 +-
 package/freescale-imx/imx-lib/Config.in            | 37 ---------------
 package/freescale-imx/imx-lib/imx-lib.mk           | 25 ++--------
 package/freescale-imx/imx-vpu/Config.in            | 16 +++++++
 ...-vpu-0001-vpu-io-fix-IOSystemInit-failure.patch | 24 ++++++++++
 ...-lib-fix-IOGetVirtMem-return-value-checks.patch | 51 +++++++++++++++++++++
 package/freescale-imx/imx-vpu/imx-vpu.mk           | 53 ++++++++++++++++++++++
 package/gstreamer/gst-fsl-plugins/Config.in        |  1 +
 ...gins-0002-Fix-bashism-in-configure-script.patch | 25 ++--------
 .../gst-fsl-plugins-0003-Use-proper-objdump.patch  |  6 +--
 ...sl-linkage-add-lrt-for-shared-memory-func.patch |  2 +-
 .../gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk   | 10 ++--
 package/libfslcodec/libfslcodec.mk                 |  2 +-
 package/libfslparser/libfslparser.mk               |  2 +-
 package/libfslvpuwrap/Config.in                    |  2 +-
 package/libfslvpuwrap/libfslvpuwrap.mk             |  4 +-
 17 files changed, 209 insertions(+), 92 deletions(-)
 create mode 100644 package/freescale-imx/imx-vpu/Config.in
 create mode 100644 package/freescale-imx/imx-vpu/imx-vpu-0001-vpu-io-fix-IOSystemInit-failure.patch
 create mode 100644 package/freescale-imx/imx-vpu/imx-vpu-0002-vpu-lib-fix-IOGetVirtMem-return-value-checks.patch
 create mode 100644 package/freescale-imx/imx-vpu/imx-vpu.mk
Signature · 1 line
2.0.0
#12 lore raw

PATCH v2 1/11 libfslvpuwrap: change version to be independent

in future releases, libfslvpuwrap will have a version number independent from freescale-imx package.

---
 package/libfslvpuwrap/libfslvpuwrap.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/libfslvpuwrap/libfslvpuwrap.mk +1 -1
index 75c9887..2299032 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBFSLVPUWRAP_VERSION = $(FREESCALE_IMX_VERSION)
+LIBFSLVPUWRAP_VERSION = 3.5.7-1.0.0
 LIBFSLVPUWRAP_SITE = $(FREESCALE_IMX_SITE)
 LIBFSLVPUWRAP_SOURCE = libfslvpuwrap-$(LIBFSLVPUWRAP_VERSION).bin
 LIBFSLVPUWRAP_LICENSE = Freescale Semiconductor Software License Agreement
Signature · 1 line
2.0.0
#13 lore raw

PATCH v2 1/11 libfslvpuwrap: change version to be independent

Gary, All,

On 2014-06-26 22:24 -0700, Gary Bisson spake thusly:

Quoted 4 lines

in future releases, libfslvpuwrap will have a version number independent from freescale-imx package.

Regards,
Yann E. MORIN.

Quoted 20 lines
---
 package/libfslvpuwrap/libfslvpuwrap.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/libfslvpuwrap/libfslvpuwrap.mk +1 -1
index 75c9887..2299032 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBFSLVPUWRAP_VERSION = $(FREESCALE_IMX_VERSION)
+LIBFSLVPUWRAP_VERSION = 3.5.7-1.0.0
 LIBFSLVPUWRAP_SITE = $(FREESCALE_IMX_SITE)
 LIBFSLVPUWRAP_SOURCE = libfslvpuwrap-$(LIBFSLVPUWRAP_VERSION).bin
 LIBFSLVPUWRAP_LICENSE = Freescale Semiconductor Software License Agreement
Signature · 1 line
2.0.0
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.  |
'------------------------------^-------^------------------^--------------------'
#14 lore raw

PATCH v2 2/11 freescale-imx: bump to version 3.10.17-1.0.0

In reply to Gary Bisson
---
 package/freescale-imx/freescale-imx.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/freescale-imx/freescale-imx.mk +1 -1
index 39ffa8a..843ba61 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-FREESCALE_IMX_VERSION = 3.5.7-1.0.0
+FREESCALE_IMX_VERSION = 3.10.17-1.0.0
 FREESCALE_IMX_SITE    = http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/
 
 include $(sort $(wildcard package/freescale-imx/*/*.mk))
Signature · 1 line
2.0.0
#15 lore raw

PATCH v2 3/11 freescale-imx: update imx-lib package

In reply to Gary Bisson

imx-lib no longer includes VPU code and therefore is now free from Freescale License.

---
 package/freescale-imx/imx-lib/imx-lib.mk | 23 +++--------------------
 1 file changed, 3 insertions(+), 20 deletions(-)
package/freescale-imx/imx-lib/imx-lib.mk +3 -20
index 4f605d7..2a94430 100644
@@ -6,9 +6,9 @@
 
 IMX_LIB_VERSION = $(FREESCALE_IMX_VERSION)
 IMX_LIB_SITE    = $(FREESCALE_IMX_SITE)
-IMX_LIB_LICENSE = Freescale License (vpu), LGPLv2.1+ (the rest)
+IMX_LIB_LICENSE = LGPLv2.1+
 IMX_LIB_LICENSE_FILES = EULA
-IMX_LIB_SOURCE = imx-lib-$(IMX_LIB_VERSION).bin
+IMX_LIB_SOURCE = imx-lib-$(IMX_LIB_VERSION).tar.gz
 
 IMX_LIB_INSTALL_STAGING = YES
 
@@ -17,7 +17,7 @@ IMX_LIB_DEPENDENCIES += linux
 IMX_LIB_INCLUDE = \
 	-I$(LINUX_DIR)/drivers/mxc/security/rng/include \
 	-I$(LINUX_DIR)/drivers/mxc/security/sahara2/include \
-	-idirafter $(LINUX_DIR)/include
+	-idirafter $(LINUX_DIR)/include/uapi
 
 IMX_LIB_MAKE_ENV = \
 	$(TARGET_MAKE_ENV) \
@@ -26,23 +26,6 @@ IMX_LIB_MAKE_ENV = \
 	PLATFORM=$(BR2_PACKAGE_IMX_LIB_PLATFORM) \
 	INCLUDE="$(IMX_LIB_INCLUDE)"
 
-# The archive is a shell-self-extractor of a bzipped tar. It happens
-# to extract in the correct directory (imx-lib-x.y.z)
-# The --force makes sure it doesn't fail if the source dir already exists.
-# The --auto-accept skips the license check - not needed for us
-# because we have legal-info
-# Since there's a EULA in the bin file, extract it to imx-lib-x.y.z/EULA
-#
-define IMX_LIB_EXTRACT_CMDS
-	awk 'BEGIN      { start=0; } \
-	     /^EOEULA/  { start = 0; } \
-	                { if (start) print; } \
-	     /<<EOEULA/ { start=1; }'\
-	    $(DL_DIR)/$(IMX_LIB_SOURCE) > $(@D)/EULA
-	cd $(BUILD_DIR); \
-	sh $(DL_DIR)/$(IMX_LIB_SOURCE) --force --auto-accept
-endef
-
 define IMX_LIB_BUILD_CMDS
 	$(IMX_LIB_MAKE_ENV) $(MAKE1) -C $(@D)
 endef
Signature · 1 line
2.0.0
#16 lore raw

PATCH v2 4/11 freescale-imx: change platform choice to be common

In reply to Gary Bisson

that way all the packages can inherit from that information plus the Vivante package will only be available for iMX6Q platforms.

---
 package/freescale-imx/Config.in          | 47 ++++++++++++++++++++++++++++++--
 package/freescale-imx/imx-lib/Config.in  | 37 -------------------------
 package/freescale-imx/imx-lib/imx-lib.mk |  2 +-
 3 files changed, 46 insertions(+), 40 deletions(-)
package/freescale-imx/Config.in +45 -2
index 7c22f79..0626a74 100644
@@ -1,8 +1,51 @@
-menu "Freescale i.MX libraries"
+menuconfig BR2_PACKAGE_FREESCALE_IMX
+	bool "Freescale i.MX libraries"
 	depends on BR2_arm
+	help
+	  Those packages provide hardware acceleration for GPU or VPU, hardware
+	  optimization or some hardware tools for Freescale i.MX platforms.
+
+if BR2_PACKAGE_FREESCALE_IMX
+choice
+	prompt "i.MX platform"
+
+config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX25_3STACK
+	bool "imx25-3stack"
+
+config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX27ADS
+	bool "imx27ads"
+
+config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX37_3STACK
+	bool "imx37-3stack"
+
+config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX50
+	bool "imx50"
+
+config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51
+	bool "imx51"
+
+config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53
+	bool "imx53"
+
+config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q
+	bool "imx6q"
+
+endchoice
+
+config BR2_PACKAGE_FREESCALE_IMX_PLATFORM
+	string
+	default "IMX25_3STACK" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX25_3STACK
+	default "IMX27ADS" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX27ADS
+	default "IMX37_3STACK" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX37_3STACK
+	default "IMX50" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX50
+	default "IMX51" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51
+	default "IMX53" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53
+	default "IMX6Q" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q
 
 source "package/freescale-imx/imx-lib/Config.in"
 source "package/freescale-imx/firmware-imx/Config.in"
+if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q
 source "package/freescale-imx/gpu-viv-bin-mx6q/Config.in"
+endif
 
-endmenu
+endif
package/freescale-imx/imx-lib/Config.in +0 -37
index 444060b..3b0f7a9 100644
@@ -14,40 +14,3 @@ config BR2_PACKAGE_IMX_LIB
 	  This library is provided by Freescale as-is and doesn't have
 	  an upstream.
 
-if BR2_PACKAGE_IMX_LIB
-choice
-	prompt "i.MX platform"
-
-config BR2_PACKAGE_IMX_LIB_PLATFORM_IMX25_3STACK
-	bool "imx25-3stack"
-
-config BR2_PACKAGE_IMX_LIB_PLATFORM_IMX27ADS
-	bool "imx27ads"
-
-config BR2_PACKAGE_IMX_LIB_PLATFORM_IMX37_3STACK
-	bool "imx37-3stack"
-
-config BR2_PACKAGE_IMX_LIB_PLATFORM_IMX50
-	bool "imx50"
-
-config BR2_PACKAGE_IMX_LIB_PLATFORM_IMX51
-	bool "imx51"
-
-config BR2_PACKAGE_IMX_LIB_PLATFORM_IMX53
-	bool "imx53"
-
-config BR2_PACKAGE_IMX_LIB_PLATFORM_IMX6Q
-	bool "imx6q"
-
-endchoice
-
-config BR2_PACKAGE_IMX_LIB_PLATFORM
-	string
-	default "IMX25_3STACK" if BR2_PACKAGE_IMX_LIB_PLATFORM_IMX25_3STACK
-	default "IMX27ADS" if BR2_PACKAGE_IMX_LIB_PLATFORM_IMX27ADS
-	default "IMX37_3STACK" if BR2_PACKAGE_IMX_LIB_PLATFORM_IMX37_3STACK
-	default "IMX50" if BR2_PACKAGE_IMX_LIB_PLATFORM_IMX50
-	default "IMX51" if BR2_PACKAGE_IMX_LIB_PLATFORM_IMX51
-	default "IMX53" if BR2_PACKAGE_IMX_LIB_PLATFORM_IMX53
-	default "IMX6Q" if BR2_PACKAGE_IMX_LIB_PLATFORM_IMX6Q
-endif
package/freescale-imx/imx-lib/imx-lib.mk +1 -1
index 2a94430..0d66759 100644
@@ -23,7 +23,7 @@ IMX_LIB_MAKE_ENV = \
 	$(TARGET_MAKE_ENV) \
 	$(TARGET_CONFIGURE_OPTS) \
 	CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" \
-	PLATFORM=$(BR2_PACKAGE_IMX_LIB_PLATFORM) \
+	PLATFORM=$(BR2_PACKAGE_FREESCALE_IMX_PLATFORM) \
 	INCLUDE="$(IMX_LIB_INCLUDE)"
 
 define IMX_LIB_BUILD_CMDS
Signature · 1 line
2.0.0
#17 lore raw

PATCH v2 5/11 freescale-imx: add imx-vpu package

In reply to Gary Bisson

as of 3.10.17-1.0.0 release, VPU code is now in its own package.

---
 package/freescale-imx/Config.in          |  1 +
 package/freescale-imx/imx-vpu/Config.in  | 16 ++++++++++
 package/freescale-imx/imx-vpu/imx-vpu.mk | 53 ++++++++++++++++++++++++++++++++
 3 files changed, 70 insertions(+)
 create mode 100644 package/freescale-imx/imx-vpu/Config.in
 create mode 100644 package/freescale-imx/imx-vpu/imx-vpu.mk
package/freescale-imx/Config.in +1 -0
index 0626a74..d8c6efc 100644
@@ -43,6 +43,7 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM
 	default "IMX6Q" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q
 
 source "package/freescale-imx/imx-lib/Config.in"
+source "package/freescale-imx/imx-vpu/Config.in"
 source "package/freescale-imx/firmware-imx/Config.in"
 if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q
 source "package/freescale-imx/gpu-viv-bin-mx6q/Config.in"
package/freescale-imx/imx-vpu/Config.in new file +16 -0
new file mode 100644
index 0000000..575383f
@@ -0,0 +1,16 @@
+comment "imx-vpu needs an imx-specific Linux kernel to be built"
+	depends on BR2_arm && !BR2_LINUX_KERNEL
+
+config BR2_PACKAGE_IMX_VPU
+	bool "imx-vpu"
+	depends on BR2_LINUX_KERNEL
+	depends on BR2_arm # Only relevant for i.MX
+	help
+	  Library of userspace helpers specific for the Freescale i.MX
+	  platform. It wraps the kernel interfaces for the i.MX platform
+	  Video Processing Unit (VPU) driver. It requires a kernel that
+	  includes the i.MX specific headers to be built.
+
+	  This library is provided by Freescale as-is and doesn't have
+	  an upstream.
+
package/freescale-imx/imx-vpu/imx-vpu.mk new file +53 -0

53 lines not on this page · raw message

Signature · 1 line
2.0.0
#18 lore raw

PATCH v2 6/11 libfslvpuwrap: bump to version 1.0.46

In reply to Gary Bisson

as VPU code is no longer in imx-lib, this package now depends on imx-vpu package.

---
 package/libfslvpuwrap/Config.in        | 2 +-
 package/libfslvpuwrap/libfslvpuwrap.mk | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
package/libfslvpuwrap/Config.in +1 -1
index 9cf7633..fa85ce5 100644
@@ -6,7 +6,7 @@ config BR2_PACKAGE_LIBFSLVPUWRAP
 	bool "libfslvpuwrap"
 	depends on BR2_LINUX_KERNEL
 	depends on BR2_arm # Only relevant for i.MX
-	select BR2_PACKAGE_IMX_LIB
+	select BR2_PACKAGE_IMX_VPU
 	help
 	  Wrapper library for the vpu library, giving it a different API.
 
package/libfslvpuwrap/libfslvpuwrap.mk +2 -2
index 2299032..c3a5c1c 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBFSLVPUWRAP_VERSION = 3.5.7-1.0.0
+LIBFSLVPUWRAP_VERSION = 1.0.46
 LIBFSLVPUWRAP_SITE = $(FREESCALE_IMX_SITE)
 LIBFSLVPUWRAP_SOURCE = libfslvpuwrap-$(LIBFSLVPUWRAP_VERSION).bin
 LIBFSLVPUWRAP_LICENSE = Freescale Semiconductor Software License Agreement
@@ -14,7 +14,7 @@ LIBFSLVPUWRAP_REDISTRIBUTE = NO
 
 LIBFSLVPUWRAP_INSTALL_STAGING = YES
 
-LIBFSLVPUWRAP_DEPENDENCIES += imx-lib
+LIBFSLVPUWRAP_DEPENDENCIES += imx-vpu
 
 # The archive is a shell-self-extractor of a bzipped tar. It happens
 # to extract in the correct directory (libfslvpuwrap-x.y.z)
Signature · 1 line
2.0.0
#19 lore raw

PATCH v2 7/11 libfslcodec: bump to version 3.0.11

In reply to Gary Bisson

this package version is now independent from freescale-imx package.

---
 package/libfslcodec/libfslcodec.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/libfslcodec/libfslcodec.mk +1 -1
index d52158c..1a364bb 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBFSLCODEC_VERSION = $(FREESCALE_IMX_VERSION)
+LIBFSLCODEC_VERSION = 3.0.11
 LIBFSLCODEC_SITE = $(FREESCALE_IMX_SITE)
 LIBFSLCODEC_SOURCE = libfslcodec-$(LIBFSLCODEC_VERSION).bin
 LIBFSLCODEC_LICENSE = Freescale Semiconductor Software License Agreement, BSD-3c (flac, ogg headers)
Signature · 1 line
2.0.0
#20 lore raw

PATCH v2 8/11 libfslparser: bump to version 3.0.11

In reply to Gary Bisson

this package version is now independent from freescale-imx package.

---
 package/libfslparser/libfslparser.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/libfslparser/libfslparser.mk +1 -1
index 0d92e02..d52b151 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBFSLPARSER_VERSION = $(FREESCALE_IMX_VERSION)
+LIBFSLPARSER_VERSION = 3.0.11
 LIBFSLPARSER_SITE = $(FREESCALE_IMX_SITE)
 LIBFSLPARSER_SOURCE = libfslparser-$(LIBFSLPARSER_VERSION).bin
 LIBFSLPARSER_LICENSE = Freescale Semiconductor Software License Agreement
Signature · 1 line
2.0.0
#21 lore raw

PATCH v2 9/11 gst-fsl-plugins: bump to version 3.0.11

In reply to Gary Bisson

as the VPU code is now apart from imx-lib, this package also depends on imx-vpu.

---
 package/gstreamer/gst-fsl-plugins/Config.in        |  1 +
 ...gins-0002-Fix-bashism-in-configure-script.patch | 25 +++++-----------------
 .../gst-fsl-plugins-0003-Use-proper-objdump.patch  |  6 +++---
 ...sl-linkage-add-lrt-for-shared-memory-func.patch |  2 +-
 .../gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk   | 10 +++++----
 5 files changed, 16 insertions(+), 28 deletions(-)
package/gstreamer/gst-fsl-plugins/Config.in +1 -0
index 19fa0da..fc0184e 100644
@@ -13,6 +13,7 @@ config BR2_PACKAGE_GST_FSL_PLUGINS
 	select BR2_PACKAGE_GST_PLUGINS_BASE
 	select BR2_PACKAGE_LIBFSLVPUWRAP
 	select BR2_PACKAGE_IMX_LIB
+	select BR2_PACKAGE_IMX_VPU
 	select BR2_PACKAGE_LIBFSLPARSER
 	select BR2_PACKAGE_LIBFSLCODEC
 	help
package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0002-Fix-bashism-in-configure-script.patch +5 -20
index 8af3644..35617cd 100644
@@ -9,29 +9,14 @@ have the default dash as /bin/sh define a variable ending with
 
 Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>
 ---
- configure.ac |   22 +++++++++++-----------
- 1 file changed, 11 insertions(+), 11 deletions(-)
+ configure.ac | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
 index 5968eb6..1a31a06 100755
 --- a/configure.ac
 +++ b/configure.ac
-@@ -60,10 +60,10 @@ AC_DEFUN([CHECK_DISABLE_FEATURE],
-         [use_[$1]=yes])
-     if test "$use_[$1]" = "yes"; then
-         SAVE_CPPFLAGS="$CPPFLAGS"
--        CPPFLAGS=`$PKG_CONFIG --cflags libfslaudiocodec`
--        CPPFLAGS+=`$PKG_CONFIG --cflags libfslvideocodec`
--        CPPFLAGS+=`$PKG_CONFIG --cflags libfslparser`
--        CPPFLAGS+=`$PKG_CONFIG --cflags libfslvpuwrap`
-+        CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags libfslaudiocodec`"
-+        CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags libfslvideocodec`"
-+        CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags libfslparser`"
-+        CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags libfslvpuwrap`"
-         AC_CHECK_HEADERS([$4], HAVE_[$3]=yes, HAVE_[$3]=no && break)
-         CPPFLAGS="$SAVE_CPPFLAGS"
-         if test "x$HAVE_[$3]" = "xyes"; then
-@@ -157,7 +157,7 @@ AC_SUBST(GST_PLUGINS_BASE_LIBS)
+@@ -152,7 +152,7 @@ AC_SUBST(GST_PLUGINS_BASE_LIBS)
  AC_CHECK_HEADERS([vpu_lib.h], [HAVE_VPU_LIB=yes], [HAVE_VPU_LIB=no])
  if test "x$HAVE_VPU_LIB" = "xyes"; then
      VPU_LIBS=`$PKG_CONFIG --libs libfslvpuwrap 2>/dev/null`
@@ -40,8 +25,8 @@ index 5968eb6..1a31a06 100755
  fi
  AC_SUBST(VPU_LIBS)
  
-@@ -173,15 +173,15 @@ AC_SUBST(IPU_CFLAGS)
- AC_SUBST(IPU_LIBS)
+@@ -176,15 +176,15 @@ AC_SUBST(RT_CFLAGS)
+ AC_SUBST(RT_LIBS)
  
  FSL_MM_CORE_CFLAGS=`$PKG_CONFIG --cflags libfslaudiocodec 2>/dev/null`
 -FSL_MM_CORE_CFLAGS+=`$PKG_CONFIG --cflags libfslvideocodec 2>/dev/null`
package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0003-Use-proper-objdump.patch +3 -3
index 8fce239..b7b8c9f 100644
@@ -18,16 +18,16 @@ index 1a31a06..cc7557d 100755
 @@ -17,7 +17,7 @@ AC_DEFUN([FIND_PARSER_SONAME],
      AC_MSG_CHECKING([for lib_$1_parser_$2_elinux.3.0.so soname])
      path=`$PKG_CONFIG --variable=libdir libfslparser`
-     SONAME=$( $CC -print-file-name=$path/lib_$1_parser_$2_elinux.so | \
+     SONAME=$( $CC -print-file-name=$PKG_CONFIG_SYSROOT_DIR$path/lib_$1_parser_$2_elinux.so | \
 -	    while read output; do objdump -p $output | \
 +	    while read output; do $OBJDUMP -p $output | \
  	    grep "SONAME" | \
  	    sed -e 's/ \+SONAME \+//'; done 2> /dev/null )
      if [[ -z "$SONAME" ]]; then
-@@ -37,7 +37,7 @@ AC_DEFUN([FIND_ACODEC_SONAME],
+@@ -36,7 +36,7 @@ AC_DEFUN([FIND_ACODEC_SONAME],
      AC_MSG_CHECKING([for lib_$1_wrap_$2_elinux.so soname])
      path=`$PKG_CONFIG --variable=libdir libfslaudiocodec`
-     SONAME=$( $CC -print-file-name=$path/wrap/lib_$1_wrap_$2_elinux.so | \
+     SONAME=$( $CC -print-file-name=$PKG_CONFIG_SYSROOT_DIR$path/wrap/lib_$1_wrap_$2_elinux.so | \
 -	    while read output; do objdump -p $output | \
 +	    while read output; do $OBJDUMP -p $output | \
  	    grep "SONAME" | \
package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0004-Fix-libgstfsl-linkage-add-lrt-for-shared-memory-func.patch +1 -1
index e58467e..763703c 100644
@@ -18,7 +18,7 @@ diff --git a/configure.ac b/configure.ac
 index a5d1655..7b5a7a6 100755
 --- a/configure.ac
 +++ b/configure.ac
-@@ -173,6 +173,9 @@ AC_CHECK_LIB(ipu, mxc_ipu_lib_task_init, [IPU_LIBS=-lipu], [echo "No libipu arou
+@@ -170,6 +170,9 @@ AC_CHECK_LIB(ipu, mxc_ipu_lib_task_init, [IPU_LIBS=-lipu], [echo "No libipu arou
  AC_SUBST(IPU_CFLAGS)
  AC_SUBST(IPU_LIBS)
  
package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk +6 -4
index 9ec92d8..1ae6596 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-GST_FSL_PLUGINS_VERSION = $(FREESCALE_IMX_VERSION)
+GST_FSL_PLUGINS_VERSION = 3.0.11
 GST_FSL_PLUGINS_SITE = $(FREESCALE_IMX_SITE)
 
 # Most is LGPLv2+, but some sources are copied from upstream and are
@@ -16,13 +16,15 @@ GST_FSL_PLUGINS_INSTALL_STAGING = YES
 GST_FSL_PLUGINS_AUTORECONF = YES
 
 GST_FSL_PLUGINS_DEPENDENCIES += host-pkgconf gstreamer gst-plugins-base \
-	libfslvpuwrap imx-lib libfslparser libfslcodec
+	libfslvpuwrap imx-lib imx-vpu libfslparser libfslcodec
 
-GST_FSL_PLUGINS_CONF_ENV = PLATFORM=$(BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM)
+GST_FSL_PLUGINS_CONF_ENV = \
+	PLATFORM=$(BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM) \
+	CROSS_ROOT="$(STAGING_DIR)"
 
 # needs access to imx-specific kernel headers
 GST_FSL_PLUGINS_DEPENDENCIES += linux
-GST_FSL_PLUGINS_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -idirafter $(LINUX_DIR)/include"
+GST_FSL_PLUGINS_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -idirafter $(LINUX_DIR)/include/uapi"
 
 ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
 GST_FSL_PLUGINS_DEPENDENCIES += xlib_libX11
Signature · 1 line
2.0.0
#22 lore raw

PATCH v2 10/11 imx-vpu: fix IOSystemInit failure

In reply to Gary Bisson

buffer address can be < 0 when using a 3G/1G split which makes IOSystemInit fail. Fix the test by checking against -1 instead.

---
 ...-vpu-0001-vpu-io-fix-IOSystemInit-failure.patch | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 package/freescale-imx/imx-vpu/imx-vpu-0001-vpu-io-fix-IOSystemInit-failure.patch
package/freescale-imx/imx-vpu/imx-vpu-0001-vpu-io-fix-IOSystemInit-failure.patch new file +24 -0
new file mode 100644
index 0000000..d8d2a69
@@ -0,0 +1,24 @@
+[PATCH] vpu-io: fix IOSystemInit failure
+
+buffer address can be < 0 when using a 3G/1G split which makes
+IOSystemInit fail. Fix the test by checking against -1 instead.
+
+Signed-off-by: Gary Bisson <[email protected]>
+---
+ vpu/vpu_io.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vpu/vpu_io.c b/vpu/vpu_io.c
+index 8cbb571..14759da 100644
+--- a/vpu/vpu_io.c
++++ b/vpu/vpu_io.c
+@@ -265,7 +265,7 @@ int IOSystemInit(void *callback)
+ 		goto err;
+ 	}
+ 
+-	if (IOGetVirtMem(&bit_work_addr) <= 0)
++	if (IOGetVirtMem(&bit_work_addr) == -1)
+ 		goto err;
+ #endif
+ 	UnlockVpu(vpu_semap);
+
Signature · 1 line
2.0.0
#23 lore raw

PATCH v2 11/11 imx-vpu: fix IOGetVirtMem return value checks

In reply to Gary Bisson

buffer address can be < 0 when using a 3G/1G split. Fix the test by checking against -1 instead.

---
 ...-lib-fix-IOGetVirtMem-return-value-checks.patch | 51 ++++++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 package/freescale-imx/imx-vpu/imx-vpu-0002-vpu-lib-fix-IOGetVirtMem-return-value-checks.patch
package/freescale-imx/imx-vpu/imx-vpu-0002-vpu-lib-fix-IOGetVirtMem-return-value-checks.patch new file +51 -0
new file mode 100644
index 0000000..306524f
@@ -0,0 +1,51 @@
+[PATCH] vpu-lib: fix IOGetVirtMem return value checks
+
+buffer address can be < 0 when using a 3G/1G split. Fix the test by
+checking against -1 instead.
+
+Signed-off-by: Gary Bisson <[email protected]>
+---
+ vpu/vpu_lib.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/vpu/vpu_lib.c b/vpu/vpu_lib.c
+index 1fb731b..7a7f42d 100644
+--- a/vpu/vpu_lib.c
++++ b/vpu/vpu_lib.c
+@@ -1764,7 +1764,7 @@ RetCode vpu_EncStartOneFrame(EncHandle handle, EncParam * param)
+ 				err_msg("Unable to obtain physical mem\n");
+ 				return RETCODE_FAILURE;
+ 			}
+-			if (IOGetVirtMem(&pEncInfo->picParaBaseMem) <= 0) {
++			if (IOGetVirtMem(&pEncInfo->picParaBaseMem) == -1) {
+ 				IOFreePhyMem(&pEncInfo->picParaBaseMem);
+ 				pEncInfo->picParaBaseMem.phy_addr = 0;
+ 				err_msg("Unable to obtain virtual mem\n");
+@@ -2982,7 +2982,7 @@ RetCode vpu_DecGetInitialInfo(DecHandle handle, DecInitialInfo * info)
+ 			UnlockVpu(vpu_semap);
+ 			return RETCODE_FAILURE;
+ 		}
+-		if (IOGetVirtMem(&pDecInfo->userDataBufMem) <= 0) {
++		if (IOGetVirtMem(&pDecInfo->userDataBufMem) == -1) {
+ 			IOFreePhyMem(&pDecInfo->userDataBufMem);
+ 			pDecInfo->userDataBufMem.phy_addr = 0;
+ 			err_msg("Unable to obtain virtual mem\n");
+@@ -4017,7 +4017,7 @@ RetCode vpu_DecStartOneFrame(DecHandle handle, DecParam * param)
+ 				UnlockVpu(vpu_semap);
+ 				return RETCODE_FAILURE;
+ 			}
+-			if (IOGetVirtMem(&pDecInfo->picParaBaseMem) <= 0) {
++			if (IOGetVirtMem(&pDecInfo->picParaBaseMem) == -1) {
+ 				IOFreePhyMem(&pDecInfo->picParaBaseMem);
+ 				pDecInfo->picParaBaseMem.phy_addr = 0;
+ 				err_msg("Unable to obtain virtual mem\n");
+@@ -4057,7 +4057,7 @@ RetCode vpu_DecStartOneFrame(DecHandle handle, DecParam * param)
+ 			UnlockVpu(vpu_semap);
+ 			return RETCODE_FAILURE;
+ 		}
+-		if (IOGetVirtMem(&pDecInfo->userDataBufMem) <= 0) {
++		if (IOGetVirtMem(&pDecInfo->userDataBufMem) == -1) {
+ 			IOFreePhyMem(&pDecInfo->userDataBufMem);
+ 			pDecInfo->userDataBufMem.phy_addr = 0;
+ 			err_msg("Unable to obtain virtual mem\n");
+
Signature · 1 line
2.0.0
#24 lore raw

v2 cover freescale: update userspace packages

In reply to Gary Bisson

Gary, All,

On 2014-06-26 22:24 -0700, Gary Bisson spake thusly:

Quoted 11 lines

Here is the rework which I hope covers all the previous remarks. This time I tried to be more talkative in every patch but here is a summary:
1- first libfslvpuwrap gets independent as suggested
2- simply bump FREESCALE_IMX_VERSION to 3.10.17-1.0.0
3- update imx-lib: using idirafter just for uapi folder + remove unnecessary EULA
4- make the platform choice as a common option: made BR2_PACKAGE_FREESCALE_IMX a menuconfig not to get BR2_PACKAGE_FREESCALE_IMX_PLATFORM set in every config.
5- just adding the imx-vpu package from Freescale with no modification but using idirafter for uapi folder only
6- bump libfslvpuwrap: now depends on imx-vpu
7- bump libfslcodec: nothing special
8- bump libfslparser: same
9- gst-fsl-plugins: now depends on imx-vpu as well
10/11- fix imx-vpu for the IOGetVirtMem in case of a 3G/1G split: I finally decided not to go with the MAP_FAILED as the return value is an int. I think using -1 is as clear and avoids useless cast. That function could have been written in a simpler way but I didn't want to change the code too much.

Great work!

I still have a few comments on this series, but I'll do the changes and repost an updated version.

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.  |
'------------------------------^-------^------------------^--------------------'