i.MX: Updates to Freescale acceleration
v5 cover i.MX: Updates to Freescale acceleration
This series updates the GStreamer and GPU packages from Freescale to a recent release.
At the time of initial post (October 2013), this was the current release.
Now, it's a couple of versions behind, but should function with the kernel references in place for the Boundary Devices Nitrogen6X, Freescale Sabre SD and Wandboard.
A follow-on patch set will bring things closer to the currently suggested production version of i.MX components, but the mostly structural parts of this patch set will help make that easy.
The first patch in the series consolidates the use of FREESCALE_IMX_SITE across the packages.
The second updates each to use FREESCALE_IMX_VERSION for the package versions.
The third addresses some warning messages generated by the self-extractors for some packages.
Eric Nelson (3):
i.MX: Use FREESCALE_IMX_SITE for Freescale packages i.MX: Update versions to match latest Freescale release i.MX: use temp directory for Freescale self-extractors
package/freescale-imx/firmware-imx/firmware-imx.mk | 2 +- package/freescale-imx/freescale-imx.mk | 6 ++--- .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk | 15 ++++++++--- package/freescale-imx/imx-lib/imx-lib.mk | 27 +++++++++++++++++--- .../gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk | 5 ++-- package/libfslcodec/libfslcodec.mk | 14 ++++++----- package/libfslparser/libfslparser.mk | 17 ++++++++----- package/libfslvpuwrap/libfslvpuwrap.mk | 29 +++++++++++++++++++--- 8 files changed, 84 insertions(+), 31 deletions(-)
Signature · 1 line
1.8.3.2
PATCH v5 1/3 i.MX: Use FREESCALE_IMX_SITE for Freescale packages
This patch consolidates the URLs for various Freescale-supplied packages to use FREESCALE_IMX_SITE.
---
No changes in V4.
No changes in V5.
package/freescale-imx/firmware-imx/firmware-imx.mk | 2 +- package/freescale-imx/freescale-imx.mk | 2 +- package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk | 2 +- package/freescale-imx/imx-lib/imx-lib.mk | 2 +- package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk | 3 +-- package/libfslcodec/libfslcodec.mk | 3 +-- package/libfslparser/libfslparser.mk | 3 +-- package/libfslvpuwrap/libfslvpuwrap.mk | 3 +-- 8 files changed, 8 insertions(+), 12 deletions(-)
package/freescale-imx/firmware-imx/firmware-imx.mk +1 -1
@@ -5,7 +5,7 @@ ################################################################################ FIRMWARE_IMX_VERSION = $(FREESCALE_IMX_VERSION) -FIRMWARE_IMX_SITE = $(FREESCALE_IMX_MIRROR_SITE) +FIRMWARE_IMX_SITE = $(FREESCALE_IMX_SITE) FIRMWARE_IMX_SOURCE = firmware-imx-$(FIRMWARE_IMX_VERSION).bin FIRMWARE_IMX_LICENSE = Freescale Semiconductor Software License Agreement, \ Atheros license (ath6k)
package/freescale-imx/freescale-imx.mk +1 -1
@@ -7,6 +7,6 @@ FREESCALE_IMX_VERSION = 1.1.0 # No official download site from freescale, just this mirror -FREESCALE_IMX_MIRROR_SITE = http://download.ossystems.com.br/bsp/freescale/source +FREESCALE_IMX_SITE = http://download.ossystems.com.br/bsp/freescale/source include $(sort $(wildcard package/freescale-imx/*/*.mk))
package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk +1 -1
@@ -5,7 +5,7 @@ ################################################################################ GPU_VIV_BIN_MX6Q_VERSION = $(FREESCALE_IMX_VERSION) -GPU_VIV_BIN_MX6Q_SITE = $(FREESCALE_IMX_MIRROR_SITE) +GPU_VIV_BIN_MX6Q_SITE = $(FREESCALE_IMX_SITE) GPU_VIV_BIN_MX6Q_SOURCE = gpu-viv-bin-mx6q-$(GPU_VIV_BIN_MX6Q_VERSION).bin GPU_VIV_BIN_MX6Q_INSTALL_STAGING = YES
package/freescale-imx/imx-lib/imx-lib.mk +1 -1
@@ -5,7 +5,7 @@ ################################################################################ IMX_LIB_VERSION = $(FREESCALE_IMX_VERSION) -IMX_LIB_SITE = $(FREESCALE_IMX_MIRROR_SITE) +IMX_LIB_SITE = $(FREESCALE_IMX_SITE) IMX_LIB_LICENSE = LGPLv2.1+ # No license file included
package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk +1 -2
@@ -5,8 +5,7 @@ ################################################################################ GST_FSL_PLUGINS_VERSION = 3.0.1 -# No official download site from freescale, just this mirror -GST_FSL_PLUGINS_SITE = http://download.ossystems.com.br/bsp/freescale/source +GST_FSL_PLUGINS_SITE = $(FREESCALE_IMX_SITE) # Most is LGPLv2+, but some sources are copied from upstream and are # LGPLv2.1+, which essentially makes it LGPLv2.1+
package/libfslcodec/libfslcodec.mk +1 -2
@@ -5,8 +5,7 @@ ################################################################################ LIBFSLCODEC_VERSION = 3.0.1 -# No official download site from freescale, just this mirror -LIBFSLCODEC_SITE = http://download.ossystems.com.br/bsp/freescale/source +LIBFSLCODEC_SITE = $(FREESCALE_IMX_SITE) LIBFSLCODEC_SOURCE = libfslcodec-$(LIBFSLCODEC_VERSION).bin LIBFSLCODEC_LICENSE = Freescale Semiconductor Software License Agreement, BSD-3c (flac, ogg headers) LIBFSLCODEC_LICENSE_FILES = EULA EULA.txt
package/libfslparser/libfslparser.mk +1 -2
@@ -5,8 +5,7 @@ ################################################################################ LIBFSLPARSER_VERSION = 3.0.1 -# No official download site from freescale, just this mirror -LIBFSLPARSER_SITE = http://download.ossystems.com.br/bsp/freescale/source +LIBFSLPARSER_SITE = $(FREESCALE_IMX_SITE) LIBFSLPARSER_SOURCE = libfslparser-$(LIBFSLPARSER_VERSION).bin LIBFSLPARSER_LICENSE = Freescale Semiconductor Software License Agreement LIBFSLPARSER_LICENSE_FILES = EULA EULA.txt
package/libfslvpuwrap/libfslvpuwrap.mk +1 -2
@@ -5,8 +5,7 @@ ################################################################################ LIBFSLVPUWRAP_VERSION = 1.0.17 -# No official download site from freescale, just this mirror -LIBFSLVPUWRAP_SITE = http://download.ossystems.com.br/bsp/freescale/source +LIBFSLVPUWRAP_SITE = $(FREESCALE_IMX_SITE) LIBFSLVPUWRAP_LICENSE = Freescale Semiconductor Software License Agreement LIBFSLVPUWRAP_LICENSE_FILES = EULA.txt LIBFSLVPUWRAP_REDISTRIBUTE = NO
Signature · 1 line
1.8.3.2
PATCH v5 1/3 i.MX: Use FREESCALE_IMX_SITE for Freescale packages
Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Eric" == Eric Nelson <[email protected]> writes:
This patch consolidates the URLs for various Freescale-supplied packages to use
FREESCALE_IMX_SITE.Signed-off-by Eric Nelson <[email protected]>Reviewed-by "Thomas Petazzoni" <[email protected]>Reviewed-by "Yann E. MORIN" <[email protected]>---
No changes in V4.
No changes in V5.
Quoted 9 lines
package/freescale-imx/firmware-imx/firmware-imx.mk | 2 +- package/freescale-imx/freescale-imx.mk | 2 +- package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk | 2 +- package/freescale-imx/imx-lib/imx-lib.mk | 2 +- package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk | 3 +-- package/libfslcodec/libfslcodec.mk | 3 +-- package/libfslparser/libfslparser.mk | 3 +-- package/libfslvpuwrap/libfslvpuwrap.mk | 3 +-- 8 files changed, 8 insertions(+), 12 deletions(-)
Committed to next, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v5 2/3 i.MX: Update versions to match latest Freescale release
In reply to Eric Nelson---
V4 addresses comments from Arnout Vandecappelle:
- Reworks license statement and extracts EULA for imx-lib
- Adds comment about AUTORECONF to libfslparser
- Adds EULA to LIBFSLVPUWRAP_LICENSE_FILES
V5 addresses comments from Yann E. MORIN:
- IMX_LIB_LICENSE was listed twice and verbose
- extraneous comment lines in libfslparser
- Added note about EULA in libfslvpuwrap
package/freescale-imx/freescale-imx.mk | 6 ++---- .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk | 6 +++++- package/freescale-imx/imx-lib/imx-lib.mk | 22 +++++++++++++++++++-- .../gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk | 2 +- package/libfslcodec/libfslcodec.mk | 2 +- package/libfslparser/libfslparser.mk | 5 ++++- package/libfslvpuwrap/libfslvpuwrap.mk | 23 ++++++++++++++++++++-- 7 files changed, 54 insertions(+), 12 deletions(-)
package/freescale-imx/freescale-imx.mk +2 -4
@@ -4,9 +4,7 @@ # ################################################################################ -FREESCALE_IMX_VERSION = 1.1.0 - -# No official download site from freescale, just this mirror -FREESCALE_IMX_SITE = http://download.ossystems.com.br/bsp/freescale/source +FREESCALE_IMX_VERSION = 3.5.7-1.0.0 +FREESCALE_IMX_SITE = http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/ include $(sort $(wildcard package/freescale-imx/*/*.mk))
package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk +5 -1
@@ -4,7 +4,11 @@ # ################################################################################ -GPU_VIV_BIN_MX6Q_VERSION = $(FREESCALE_IMX_VERSION) +ifeq ($(BR2_ARM_EABIHF),y) +GPU_VIV_BIN_MX6Q_VERSION = $(FREESCALE_IMX_VERSION)-hfp +else +GPU_VIV_BIN_MX6Q_VERSION = $(FREESCALE_IMX_VERSION)-sfp +endif GPU_VIV_BIN_MX6Q_SITE = $(FREESCALE_IMX_SITE) GPU_VIV_BIN_MX6Q_SOURCE = gpu-viv-bin-mx6q-$(GPU_VIV_BIN_MX6Q_VERSION).bin
package/freescale-imx/imx-lib/imx-lib.mk +20 -2
@@ -6,8 +6,9 @@ IMX_LIB_VERSION = $(FREESCALE_IMX_VERSION) IMX_LIB_SITE = $(FREESCALE_IMX_SITE) -IMX_LIB_LICENSE = LGPLv2.1+ -# No license file included +IMX_LIB_LICENSE = Freescale License (vpu), LGPLv2.1+ (the rest) +IMX_LIB_LICENSE_FILES = EULA +IMX_LIB_SOURCE = imx-lib-$(IMX_LIB_VERSION).bin IMX_LIB_INSTALL_STAGING = YES
@@ -25,6 +26,23 @@ 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/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -GST_FSL_PLUGINS_VERSION = 3.0.1 +GST_FSL_PLUGINS_VERSION = $(FREESCALE_IMX_VERSION) GST_FSL_PLUGINS_SITE = $(FREESCALE_IMX_SITE) # Most is LGPLv2+, but some sources are copied from upstream and are
package/libfslcodec/libfslcodec.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -LIBFSLCODEC_VERSION = 3.0.1 +LIBFSLCODEC_VERSION = $(FREESCALE_IMX_VERSION) LIBFSLCODEC_SITE = $(FREESCALE_IMX_SITE) LIBFSLCODEC_SOURCE = libfslcodec-$(LIBFSLCODEC_VERSION).bin LIBFSLCODEC_LICENSE = Freescale Semiconductor Software License Agreement, BSD-3c (flac, ogg headers)
package/libfslparser/libfslparser.mk +4 -1
@@ -4,7 +4,7 @@ # ################################################################################ -LIBFSLPARSER_VERSION = 3.0.1 +LIBFSLPARSER_VERSION = $(FREESCALE_IMX_VERSION) LIBFSLPARSER_SITE = $(FREESCALE_IMX_SITE) LIBFSLPARSER_SOURCE = libfslparser-$(LIBFSLPARSER_VERSION).bin LIBFSLPARSER_LICENSE = Freescale Semiconductor Software License Agreement
@@ -36,4 +36,7 @@ endef # The Makefile installs several versions of the libraries, but we only # need one of them, depending on the platform. +# without AUTORECONF, configure fails to find install-sh. +LIBFSLPARSER_AUTORECONF = YES + $(eval $(autotools-package))
package/libfslvpuwrap/libfslvpuwrap.mk +21 -2
@@ -4,14 +4,33 @@ # ################################################################################ -LIBFSLVPUWRAP_VERSION = 1.0.17 +LIBFSLVPUWRAP_VERSION = $(FREESCALE_IMX_VERSION) LIBFSLVPUWRAP_SITE = $(FREESCALE_IMX_SITE) +LIBFSLVPUWRAP_SOURCE = libfslvpuwrap-$(LIBFSLVPUWRAP_VERSION).bin LIBFSLVPUWRAP_LICENSE = Freescale Semiconductor Software License Agreement -LIBFSLVPUWRAP_LICENSE_FILES = EULA.txt +# N.B.: the content of the two license files is different +LIBFSLVPUWRAP_LICENSE_FILES = EULA EULA.txt LIBFSLVPUWRAP_REDISTRIBUTE = NO LIBFSLVPUWRAP_INSTALL_STAGING = YES LIBFSLVPUWRAP_DEPENDENCIES += imx-lib +# The archive is a shell-self-extractor of a bzipped tar. It happens +# to extract in the correct directory (libfslvpuwrap-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 the EULA in the bin file differs from the one in the tar file, +# extract the one from the bin file as well. +define LIBFSLVPUWRAP_EXTRACT_CMDS + awk 'BEGIN { start=0; } \ + /^EOEULA/ { start = 0; } \ + { if (start) print; } \ + /<<EOEULA/ { start=1; }'\ + $(DL_DIR)/$(LIBFSLVPUWRAP_SOURCE) > $(@D)/EULA + cd $(BUILD_DIR); \ + sh $(DL_DIR)/$(LIBFSLVPUWRAP_SOURCE) --force --auto-accept +endef + $(eval $(autotools-package))
Signature · 1 line
1.8.3.2
PATCH v5 2/3 i.MX: Update versions to match latest Freescale release
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Eric" == Eric Nelson <[email protected]> writes:
Signed-off-by Eric Nelson <[email protected]>---
V4 addresses comments from Arnout Vandecappelle:
- Reworks license statement and extracts EULA for imx-lib
- Adds comment about AUTORECONF to libfslparser
- Adds EULA toLIBFSLVPUWRAP_LICENSE_FILES
Quoted 4 lines
V5 addresses comments from Yann E. MORIN:
-IMX_LIB_LICENSEwas listed twice and verbose
- extraneous comment lines in libfslparser
- Added note about EULA in libfslvpuwrap
Committed to next, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v5 3/3 i.MX: use temp directory for Freescale self-extractors
In reply to Eric NelsonThe Freescale packages imx-lib, libfslcodec, libfslparser, and libfslvpuwrap are each bundled as self-extracting tar-balls that contain a shell script and a EULA in their package headers.
These self-extractors also contain a command to create the destination directory using "mkdir" (no -p) prior to extraction.
Since we want to place the output into the build directory, which has already been created at the time of extraction, this causes a warning message from "mkdir".
This patch changes things so that each package is extracted first into a sub-directory, and the content is moved into the eventual build directory.
---
This patch is new in V5.
package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk | 13 ++++++++----- package/freescale-imx/imx-lib/imx-lib.mk | 11 +++++++---- package/libfslcodec/libfslcodec.mk | 9 ++++++--- package/libfslparser/libfslparser.mk | 9 ++++++--- package/libfslvpuwrap/libfslvpuwrap.mk | 9 ++++++--- 5 files changed, 33 insertions(+), 18 deletions(-)
package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk +8 -5
@@ -4,13 +4,14 @@ # ################################################################################ +GPU_VIV_BIN_MX6Q_VERSION = $(FREESCALE_IMX_VERSION) ifeq ($(BR2_ARM_EABIHF),y) -GPU_VIV_BIN_MX6Q_VERSION = $(FREESCALE_IMX_VERSION)-hfp +GPU_VIV_BIN_MX6Q_EXTRACT = gpu-viv-bin-mx6q-$(FREESCALE_IMX_VERSION)-hfp else -GPU_VIV_BIN_MX6Q_VERSION = $(FREESCALE_IMX_VERSION)-sfp +GPU_VIV_BIN_MX6Q_EXTRACT = gpu-viv-bin-mx6q-$(FREESCALE_IMX_VERSION)-sfp endif GPU_VIV_BIN_MX6Q_SITE = $(FREESCALE_IMX_SITE) -GPU_VIV_BIN_MX6Q_SOURCE = gpu-viv-bin-mx6q-$(GPU_VIV_BIN_MX6Q_VERSION).bin +GPU_VIV_BIN_MX6Q_SOURCE = $(GPU_VIV_BIN_MX6Q_EXTRACT).bin GPU_VIV_BIN_MX6Q_INSTALL_STAGING = YES
@@ -37,8 +38,10 @@ endif # The --auto-accept skips the license check - not needed for us # because we have legal-info. define GPU_VIV_BIN_MX6Q_EXTRACT_CMDS - (cd $(BUILD_DIR); \ - sh $(DL_DIR)/$(GPU_VIV_BIN_MX6Q_SOURCE) --force --auto-accept) + (cd $(@D); \ + sh $(DL_DIR)/$(GPU_VIV_BIN_MX6Q_SOURCE) --force --auto-accept ; \ + mv $(GPU_VIV_BIN_MX6Q_EXTRACT)/* ./ ; \ + rm -rf $(GPU_VIV_BIN_MX6Q_EXTRACT)/) endef # Instead of building, we fix up the inconsistencies that exist
package/freescale-imx/imx-lib/imx-lib.mk +7 -4
@@ -8,7 +8,8 @@ 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_FILES = EULA -IMX_LIB_SOURCE = imx-lib-$(IMX_LIB_VERSION).bin +IMX_LIB_EXTRACT = imx-lib-$(IMX_LIB_VERSION) +IMX_LIB_SOURCE = $(IMX_LIB_EXTRACT).bin IMX_LIB_INSTALL_STAGING = YES
@@ -34,13 +35,15 @@ IMX_LIB_MAKE_ENV = \ # Since there's a EULA in the bin file, extract it to imx-lib-x.y.z/EULA # define IMX_LIB_EXTRACT_CMDS + cd $(@D); \ + sh $(DL_DIR)/$(IMX_LIB_SOURCE) --force --auto-accept ; \ + mv $(IMX_LIB_EXTRACT)/* ./; \ + rm -rf $(IMX_LIB_EXTRACT); \ 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 + $(DL_DIR)/$(IMX_LIB_SOURCE) > EULA endef define IMX_LIB_BUILD_CMDS
package/libfslcodec/libfslcodec.mk +6 -3
@@ -6,7 +6,8 @@ LIBFSLCODEC_VERSION = $(FREESCALE_IMX_VERSION) LIBFSLCODEC_SITE = $(FREESCALE_IMX_SITE) -LIBFSLCODEC_SOURCE = libfslcodec-$(LIBFSLCODEC_VERSION).bin +LIBFSLCODEC_EXTRACT = libfslcodec-$(LIBFSLCODEC_VERSION) +LIBFSLCODEC_SOURCE = $(LIBFSLCODEC_EXTRACT).bin LIBFSLCODEC_LICENSE = Freescale Semiconductor Software License Agreement, BSD-3c (flac, ogg headers) LIBFSLCODEC_LICENSE_FILES = EULA EULA.txt # This is a legal minefield: the EULA in the bin file specifies that
@@ -24,13 +25,15 @@ LIBFSLCODEC_INSTALL_STAGING = YES # Since the EULA in the bin file differs from the one in the tar file, # extract the one from the bin file as well. define LIBFSLCODEC_EXTRACT_CMDS + cd $(@D); \ + sh $(DL_DIR)/$(LIBFSLCODEC_SOURCE) --force --auto-accept ; \ + mv $(LIBFSLCODEC_EXTRACT)/* ./ ; \ + rm -rf $(LIBFSLCODEC_EXTRACT)/* ; \ awk 'BEGIN { start=0; } \ /^EOEULA/ { start = 0; } \ { if (start) print; } \ /<<EOEULA/ { start=1; }'\ $(DL_DIR)/$(LIBFSLCODEC_SOURCE) > $(@D)/EULA - cd $(BUILD_DIR); \ - sh $(DL_DIR)/$(LIBFSLCODEC_SOURCE) --force --auto-accept endef # FIXME The Makefile installs both the arm9 and arm11 versions of the
package/libfslparser/libfslparser.mk +6 -3
@@ -6,7 +6,8 @@ LIBFSLPARSER_VERSION = $(FREESCALE_IMX_VERSION) LIBFSLPARSER_SITE = $(FREESCALE_IMX_SITE) -LIBFSLPARSER_SOURCE = libfslparser-$(LIBFSLPARSER_VERSION).bin +LIBFSLPARSER_EXTRACT = libfslparser-$(LIBFSLPARSER_VERSION) +LIBFSLPARSER_SOURCE = $(LIBFSLPARSER_EXTRACT).bin LIBFSLPARSER_LICENSE = Freescale Semiconductor Software License Agreement LIBFSLPARSER_LICENSE_FILES = EULA EULA.txt # This is a legal minefield: the EULA in the bin file specifies that
@@ -24,13 +25,15 @@ LIBFSLPARSER_INSTALL_STAGING = YES # Since the EULA in the bin file differs from the one in the tar file, # extract the one from the bin file as well. define LIBFSLPARSER_EXTRACT_CMDS + cd $(@D); \ + sh $(DL_DIR)/$(LIBFSLPARSER_SOURCE) --force --auto-accept; \ + mv $(LIBFSLPARSER_EXTRACT)/* ./; \ + rm -rf $(LIBFSLPARSER_EXTRACT)/; \ awk 'BEGIN { start=0; } \ /^EOEULA/ { start = 0; } \ { if (start) print; } \ /<<EOEULA/ { start=1; }'\ $(DL_DIR)/$(LIBFSLPARSER_SOURCE) > $(@D)/EULA - cd $(BUILD_DIR); \ - sh $(DL_DIR)/$(LIBFSLPARSER_SOURCE) --force --auto-accept endef # The Makefile installs several versions of the libraries, but we only
package/libfslvpuwrap/libfslvpuwrap.mk +6 -3
@@ -6,7 +6,8 @@ LIBFSLVPUWRAP_VERSION = $(FREESCALE_IMX_VERSION) LIBFSLVPUWRAP_SITE = $(FREESCALE_IMX_SITE) -LIBFSLVPUWRAP_SOURCE = libfslvpuwrap-$(LIBFSLVPUWRAP_VERSION).bin +LIBFSLVPUWRAP_EXTRACT = libfslvpuwrap-$(LIBFSLVPUWRAP_VERSION) +LIBFSLVPUWRAP_SOURCE = $(LIBFSLVPUWRAP_EXTRACT).bin LIBFSLVPUWRAP_LICENSE = Freescale Semiconductor Software License Agreement # N.B.: the content of the two license files is different LIBFSLVPUWRAP_LICENSE_FILES = EULA EULA.txt
@@ -24,13 +25,15 @@ LIBFSLVPUWRAP_DEPENDENCIES += imx-lib # Since the EULA in the bin file differs from the one in the tar file, # extract the one from the bin file as well. define LIBFSLVPUWRAP_EXTRACT_CMDS + cd $(@D); \ + sh $(DL_DIR)/$(LIBFSLVPUWRAP_SOURCE) --force --auto-accept; \ + mv $(LIBFSLVPUWRAP_EXTRACT)/* ./; \ + rm -rf $(LIBFSLVPUWRAP_EXTRACT); \ awk 'BEGIN { start=0; } \ /^EOEULA/ { start = 0; } \ { if (start) print; } \ /<<EOEULA/ { start=1; }'\ $(DL_DIR)/$(LIBFSLVPUWRAP_SOURCE) > $(@D)/EULA - cd $(BUILD_DIR); \ - sh $(DL_DIR)/$(LIBFSLVPUWRAP_SOURCE) --force --auto-accept endef $(eval $(autotools-package))
Signature · 1 line
1.8.3.2
PATCH v5 3/3 i.MX: use temp directory for Freescale self-extractors
Dear Eric Nelson,
package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk endif · line 44
Quoted 3 lines · Eric Nelson
package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk +3
-0+ sh $(DL_DIR)/$(GPU_VIV_BIN_MX6Q_SOURCE) --force --auto-accept ; \ + mv $(GPU_VIV_BIN_MX6Q_EXTRACT)/* ./ ; \ + rm -rf $(GPU_VIV_BIN_MX6Q_EXTRACT)/)
I must say I would prefer if there was no slash at the end here, so that if the GPU_VIV_BIN_MX6Q_EXTRACT variable is empty (for example due to a bug in the package, or due to changes being made to the package that make it non-working) it doesn't do a rm -rf /.
I'd go even further: if the directory is empty, then is a simple "rmdir" should do the trick, and is a lot less disastrous than a "rm -rf" should something go wrong with the argument that is passed.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v5 3/3 i.MX: use temp directory for Freescale self-extractors
Thanks Thomas,
Quoted 4 lines · Thomas Petazzoni
Dear Eric Nelson,
On Thu, 13 Feb 2014 17:26:20 -0700, Eric Nelson wrote:
Quoted 9 lines
package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk endif · line 44
Quoted 3 lines
package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk +3
-0+ sh $(DL_DIR)/$(GPU_VIV_BIN_MX6Q_SOURCE) --force --auto-accept ; \ + mv $(GPU_VIV_BIN_MX6Q_EXTRACT)/* ./ ; \ + rm -rf $(GPU_VIV_BIN_MX6Q_EXTRACT)/)I must say I would prefer if there was no slash at the end here, so that if the
GPU_VIV_BIN_MX6Q_EXTRACTvariable is empty (for example due to a bug in the package, or due to changes being made to the package that make it non-working) it doesn't do a rm -rf /.
Good catch.
Quoted 4 lines
I'd go even further: if the directory is empty, then is a simple "rmdir" should do the trick, and is a lot less disastrous than a "rm -rf" should something go wrong with the argument that is passed.
Yep.
I do think this is moot though. Yann had another option that I'll try to follow.
Regards,
Eric
PATCH v5 3/3 i.MX: use temp directory for Freescale self-extractors
In reply to Eric NelsonEric, All,
On 2014-02-13 17:26 -0700, Eric Nelson spake thusly:
Quoted 7 lines
The Freescale packages imx-lib, libfslcodec, libfslparser, and libfslvpuwrap are each bundled as self-extracting tar-balls that contain a shell script and a EULA in their package headers.
These self-extractors also contain a command to create the destination directory using "mkdir" (no -p) prior to extraction.
Quoted 6 lines
Since we want to place the output into the build directory, which has already been created at the time of extraction, this causes a warning message from "mkdir".
This patch changes things so that each package is extracted first into a sub-directory, and the content is moved into the eventual build directory.
In fact, I was not clear in my previous reply: as your testing shows, and as Arnout suggested, we can well leave with this warning.
So, to make it clear this time: I don;t think we should try to play it smart with this whole directory mess: the archives do extract in a properly-named directory, so lets just accept the little warning.
The changes introduced by this patch, although not too complex, are not trivial either.
I suggest we just drop this patch, unless Peter really wants it.
Sorry I was not explicit enough in my previous mail. Thank you for staying with us all along the journey! :-)
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. | '------------------------------^-------^------------------^--------------------'
PATCH v5 3/3 i.MX: use temp directory for Freescale self-extractors
Thanks Yann,
Quoted 14 lines · Yann E. MORIN
Eric, All,
On 2014-02-13 17:26 -0700, Eric Nelson spake thusly:
Quoted 11 lines
The Freescale packages imx-lib, libfslcodec, libfslparser, and libfslvpuwrap are each bundled as self-extracting tar-balls that contain a shell script and a EULA in their package headers.
These self-extractors also contain a command to create the destination directory using "mkdir" (no -p) prior to extraction.
Since we want to place the output into the build directory, which has already been created at the time of extraction, this causes a warning message from "mkdir".
Quoted 6 lines
Quoted 2 lines
This patch changes things so that each package is extracted first into a sub-directory, and the content is moved into the eventual build directory.
In fact, I was not clear in my previous reply: as your testing shows, and as Arnout suggested, we can well leave with this warning.
That works for me.
Quoted 4 lines
So, to make it clear this time: I don;t think we should try to play it smart with this whole directory mess: the archives do extract in a properly-named directory, so lets just accept the little warning.
Cool.
I have contacted Freescale to see if we can at least get "mkdir -p" into the next release, and hopefully also address the awk-wardness of extracting the EULA.
Quoted 3 lines
The changes introduced by this patch, although not too complex, are not trivial either.
Agreed. This is a lot of change for a couple of small warnings.
Quoted 2 lines
I suggest we just drop this patch, unless Peter really wants it.
+1
Quoted 2 lines
Sorry I was not explicit enough in my previous mail. Thank you for staying with us all along the journey! :-)
I'm glad to help.
Regards,
Eric
PATCH v5 3/3 i.MX: use temp directory for Freescale self-extractors
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Eric" == Eric Nelson <[email protected]> writes:
Hi,
Quoted 4 lines
Quoted 2 lines
I suggest we just drop this patch, unless Peter really wants it.
+1
Ok, I'll drop it then.
Signature · 1 line
Bye, Peter Korsgaard