Better handling of freescale self-extractible binaries
v2 cover Better handling of freescale self-extractible binaries
This serie introduce an helper fonction for freescale self-extractible binaries.
Obviously, last 3 patches of this serie apply on top of my previous
series: "Add Xorg support for imx6" and "Add support for iMX5 GPU"
v2:
- Split patch on libfsl* in 3 patches (suggested by Yann)
- Pass full path to helper instead of just archive name (suggested by Yann)
J?r?me Pouiller (9):
freescale-imx: Add helper to extract self-extractible binaries
firmware-imx: Use self-extractible helper
imx-vpu: Use self-extractible helper
libfslcodec: Use self-extractible helper
libfslparser: Use self-extractible helper
libfslvpuwrap: Use self-extractible helper
gpu-viv-bin-mx6q: Use self-extractible helper
libz160: Use self-extractible helper
gpu-amd-bin-mx51: Use self-extractible helper
package/freescale-imx/firmware-imx/firmware-imx.mk | 16 ++++--------- package/freescale-imx/freescale-imx.mk | 21 +++++++++++++++++ .../gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk | 27 ++++++++-------------- .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk | 22 ++++-------------- package/freescale-imx/imx-vpu/imx-vpu.mk | 22 +++++------------- package/freescale-imx/libz160/libz160.mk | 19 ++++----------- package/libfslcodec/libfslcodec.mk | 23 ++++-------------- package/libfslparser/libfslparser.mk | 23 ++++-------------- package/libfslvpuwrap/libfslvpuwrap.mk | 24 ++++--------------- 9 files changed, 62 insertions(+), 135 deletions(-)
Signature · 1 line
1.9.1
PATCH v2 1/9 freescale-imx: Add helper to extract self-extractible binaries
--- package/freescale-imx/freescale-imx.mk | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
package/freescale-imx/freescale-imx.mk +21 -0
@@ -7,4 +7,25 @@ FREESCALE_IMX_VERSION = 3.10.17-1.0.0 FREESCALE_IMX_SITE = http://www.freescale.com/lgfiles/NMG/MAD/YOCTO +# Helper for self-extracting binaries distributed by Freescale. +# 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 +# If you use this macro, don't forget to add "EULA" to LICENSE_FILES and set +# REDISTRIBUTE to "NO". Indeed, this is a legal minefield: +# the EULA specifies that the Board Support Package includes software +# and hardware (sic!) for which a separate license is needed... +define FREESCALE_IMX_EXTRACT_HELPER + awk 'BEGIN { start = 0; } \ + /^EOEULA/ { start = 0; } \ + { if (start) print; } \ + /<<EOEULA/ { start = 1; }' \ + $(1) > $(@D)/EULA + cd $(@D) && sh $(1) --force --auto-accept; + find $(@D)/$(basename $(1)) -mindepth 1 -maxdepth 1 -exec mv {} $(@D) \; + rmdir $(@D)/$(basename $(1)) +endef + + include $(sort $(wildcard package/freescale-imx/*/*.mk))
Signature · 1 line
1.9.1
PATCH v2 1/9 freescale-imx: Add helper to extract self-extractible binaries
J?r?me, All,
On 2014-11-19 22:30 +0100, J?r?me Pouiller spake thusly:
Quoted 12 lines
Signed-off-by J?r?me Pouiller <[email protected]>--- package/freescale-imx/freescale-imx.mk | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)package/freescale-imx/freescale-imx.mk +0
-0@@ -7,4 +7,25 @@ FREESCALE_IMX_VERSION = 3.10.17-1.0.0 FREESCALE_IMX_SITE = http://www.freescale.com/lgfiles/NMG/MAD/YOCTO
package/freescale-imx/freescale-imx.mk line 18
Quoted 10 lines
package/freescale-imx/freescale-imx.mk +9
-0+# Helper for self-extracting binaries distributed by Freescale. +# 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 +# If you use this macro, don't forget to add "EULA" to LICENSE_FILES and set +# REDISTRIBUTE to "NO". Indeed, this is a legal minefield: +# the EULA specifies that the Board Support Package includes software +# and hardware (sic!) for which a separate license is needed...
It would have been great to add to the comment the expected argument:
# $(1): full path to the archive file
Otherwise:
Regards,
Yann E. MORIN.
Quoted 16 lines
package/freescale-imx/freescale-imx.mk +12
-0+define FREESCALE_IMX_EXTRACT_HELPER + awk 'BEGIN { start = 0; } \ + /^EOEULA/ { start = 0; } \ + { if (start) print; } \ + /<<EOEULA/ { start = 1; }' \ + $(1) > $(@D)/EULA + cd $(@D) && sh $(1) --force --auto-accept; + find $(@D)/$(basename $(1)) -mindepth 1 -maxdepth 1 -exec mv {} $(@D) \; + rmdir $(@D)/$(basename $(1)) +endef + + include $(sort $(wildcard package/freescale-imx/*/*.mk))Signature · 1 line
1.9.1
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 v2 2/9 firmware-imx: Use self-extractible helper
In reply to Jérôme Pouiller--- package/freescale-imx/firmware-imx/firmware-imx.mk | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-)
package/freescale-imx/firmware-imx/firmware-imx.mk +4 -12
@@ -7,27 +7,19 @@ FIRMWARE_IMX_VERSION = $(FREESCALE_IMX_VERSION) FIRMWARE_IMX_SITE = $(FREESCALE_IMX_SITE) FIRMWARE_IMX_SOURCE = firmware-imx-$(FIRMWARE_IMX_VERSION).bin + +# See freescale-imx.mk FIRMWARE_IMX_LICENSE = Freescale Semiconductor Software License Agreement, \ Atheros license (ath6k) -FIRMWARE_IMX_LICENSE_FILES = licenses/vpu/EULA licenses/ath6k/AR6102/License.txt -# This is a legal minefield: the EULA specifies that -# the Board Support Package includes software and hardware (sic!) -# for which a separate license is needed... +FIRMWARE_IMX_LICENSE_FILES = EULA licenses/vpu/EULA licenses/ath6k/AR6102/License.txt FIRMWARE_IMX_REDISTRIBUTE = NO FIRMWARE_IMX_BLOBS = ath6k sdma vpu -# The archive is a shell-self-extractor of a bzipped tar. It happens -# to extract in the correct directory (firmware-imx-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. define FIRMWARE_IMX_EXTRACT_CMDS - cd $(BUILD_DIR); \ - sh $(DL_DIR)/$(FIRMWARE_IMX_SOURCE) --force --auto-accept + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(FIRMWARE_IMX_SOURCE)) endef - define FIRMWARE_IMX_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/lib/firmware for blobdir in $(FIRMWARE_IMX_BLOBS); do \
Signature · 1 line
1.9.1
PATCH v2 2/9 firmware-imx: Use self-extractible helper
J?r?me, All,
On 2014-11-19 22:30 +0100, J?r?me Pouiller spake thusly:
Quoted 1 line
Signed-off-by J?r?me Pouiller <[email protected]>
Regards,
Yann E. MORIN.
Quoted 43 lines
--- package/freescale-imx/firmware-imx/firmware-imx.mk | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-)package/freescale-imx/firmware-imx/firmware-imx.mk +4
-12@@ -7,27 +7,19 @@ FIRMWARE_IMX_VERSION = $(FREESCALE_IMX_VERSION) FIRMWARE_IMX_SITE = $(FREESCALE_IMX_SITE) FIRMWARE_IMX_SOURCE = firmware-imx-$(FIRMWARE_IMX_VERSION).bin + +# See freescale-imx.mk FIRMWARE_IMX_LICENSE = Freescale Semiconductor Software License Agreement, \ Atheros license (ath6k) -FIRMWARE_IMX_LICENSE_FILES = licenses/vpu/EULA licenses/ath6k/AR6102/License.txt -# This is a legal minefield: the EULA specifies that -# the Board Support Package includes software and hardware (sic!) -# for which a separate license is needed... +FIRMWARE_IMX_LICENSE_FILES = EULA licenses/vpu/EULA licenses/ath6k/AR6102/License.txt FIRMWARE_IMX_REDISTRIBUTE = NO FIRMWARE_IMX_BLOBS = ath6k sdma vpu -# The archive is a shell-self-extractor of a bzipped tar. It happens -# to extract in the correct directory (firmware-imx-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. define FIRMWARE_IMX_EXTRACT_CMDS - cd $(BUILD_DIR); \ - sh $(DL_DIR)/$(FIRMWARE_IMX_SOURCE) --force --auto-accept + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(FIRMWARE_IMX_SOURCE)) endef - define FIRMWARE_IMX_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/lib/firmware for blobdir in $(FIRMWARE_IMX_BLOBS); do \Signature · 1 line
1.9.1
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 v2 3/9 imx-vpu: Use self-extractible helper
In reply to Jérôme Pouiller--- package/freescale-imx/imx-vpu/imx-vpu.mk | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-)
package/freescale-imx/imx-vpu/imx-vpu.mk +6 -16
@@ -6,8 +6,6 @@ IMX_VPU_VERSION = $(FREESCALE_IMX_VERSION) IMX_VPU_SITE = $(FREESCALE_IMX_SITE) -IMX_VPU_LICENSE = Freescale License -IMX_VPU_LICENSE_FILES = EULA vpu/EULA.txt IMX_VPU_SOURCE = imx-vpu-$(IMX_VPU_VERSION).bin IMX_VPU_INSTALL_STAGING = YES
@@ -21,21 +19,13 @@ IMX_VPU_MAKE_ENV = \ PLATFORM=$(BR2_PACKAGE_FREESCALE_IMX_PLATFORM) \ INCLUDE="-idirafter $(LINUX_DIR)/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 -# +# See freescale-imx.mk +IMX_VPU_LICENSE = Freescale Semiconductor Software License Agreement +IMX_VPU_LICENSE_FILES = EULA vpu/EULA.txt +IMX_VPU_REDISTRIBUTE = NO + 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 + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(IMX_VPU_SOURCE)) endef define IMX_VPU_BUILD_CMDS
Signature · 1 line
1.9.1
PATCH v2 3/9 imx-vpu: Use self-extractible helper
J?r?me, All,
On 2014-11-19 22:30 +0100, J?r?me Pouiller spake thusly:
Quoted 1 line
Signed-off-by J?r?me Pouiller <[email protected]>
Regards,
Yann E. MORIN.
Quoted 48 lines
--- package/freescale-imx/imx-vpu/imx-vpu.mk | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-)package/freescale-imx/imx-vpu/imx-vpu.mk +6
-16@@ -6,8 +6,6 @@ IMX_VPU_VERSION = $(FREESCALE_IMX_VERSION) IMX_VPU_SITE = $(FREESCALE_IMX_SITE) -IMX_VPU_LICENSE = Freescale License -IMX_VPU_LICENSE_FILES = EULA vpu/EULA.txt IMX_VPU_SOURCE = imx-vpu-$(IMX_VPU_VERSION).bin IMX_VPU_INSTALL_STAGING = YES@@ -21,21 +19,13 @@ IMX_VPU_MAKE_ENV = \ PLATFORM=$(BR2_PACKAGE_FREESCALE_IMX_PLATFORM) \ INCLUDE="-idirafter $(LINUX_DIR)/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 -# +# See freescale-imx.mk +IMX_VPU_LICENSE = Freescale Semiconductor Software License Agreement +IMX_VPU_LICENSE_FILES = EULA vpu/EULA.txt +IMX_VPU_REDISTRIBUTE = NO + 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 + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(IMX_VPU_SOURCE)) endef define IMX_VPU_BUILD_CMDSSignature · 1 line
1.9.1
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 v2 4/9 libfslcodec: Use self-extractible helper
In reply to Jérôme Pouiller--- package/libfslcodec/libfslcodec.mk | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-)
package/libfslcodec/libfslcodec.mk +4 -19
@@ -7,30 +7,15 @@ LIBFSLCODEC_VERSION = 3.0.11 LIBFSLCODEC_SITE = $(FREESCALE_IMX_SITE) LIBFSLCODEC_SOURCE = libfslcodec-$(LIBFSLCODEC_VERSION).bin +LIBFSLCODEC_INSTALL_STAGING = YES + +# See freescale-imx.mk 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 -# the Board Support Package includes software and hardware (sic!) -# for which a separate license is needed... LIBFSLCODEC_REDISTRIBUTE = NO -LIBFSLCODEC_INSTALL_STAGING = YES - -# The archive is a shell-self-extractor of a bzipped tar. It happens -# to extract in the correct directory (libfslcodec-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 LIBFSLCODEC_EXTRACT_CMDS - 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 + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(LIBFSLCODEC_SOURCE)) endef # FIXME The Makefile installs both the arm9 and arm11 versions of the
Signature · 1 line
1.9.1
PATCH v2 4/9 libfslcodec: Use self-extractible helper
J?r?me, All,
On 2014-11-19 22:30 +0100, J?r?me Pouiller spake thusly:
Quoted 1 line
Signed-off-by J?r?me Pouiller <[email protected]>
The variable re-ordering is a bit superfluous, but OK:
Regards,
Yann E. MORIN.
Quoted 46 lines
--- package/libfslcodec/libfslcodec.mk | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-)package/libfslcodec/libfslcodec.mk +4
-19@@ -7,30 +7,15 @@ LIBFSLCODEC_VERSION = 3.0.11 LIBFSLCODEC_SITE = $(FREESCALE_IMX_SITE) LIBFSLCODEC_SOURCE = libfslcodec-$(LIBFSLCODEC_VERSION).bin +LIBFSLCODEC_INSTALL_STAGING = YES + +# See freescale-imx.mk 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 -# the Board Support Package includes software and hardware (sic!) -# for which a separate license is needed... LIBFSLCODEC_REDISTRIBUTE = NO -LIBFSLCODEC_INSTALL_STAGING = YES - -# The archive is a shell-self-extractor of a bzipped tar. It happens -# to extract in the correct directory (libfslcodec-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 LIBFSLCODEC_EXTRACT_CMDS - 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 + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(LIBFSLCODEC_SOURCE)) endef # FIXME The Makefile installs both the arm9 and arm11 versions of theSignature · 1 line
1.9.1
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 v2 5/9 libfslparser: Use self-extractible helper
In reply to Jérôme Pouiller--- package/libfslparser/libfslparser.mk | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-)
package/libfslparser/libfslparser.mk +4 -19
@@ -7,30 +7,15 @@ LIBFSLPARSER_VERSION = 3.0.11 LIBFSLPARSER_SITE = $(FREESCALE_IMX_SITE) LIBFSLPARSER_SOURCE = libfslparser-$(LIBFSLPARSER_VERSION).bin +LIBFSLPARSER_INSTALL_STAGING = YES + +# See freescale-imx.mk 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 -# the Board Support Package includes software and hardware (sic!) -# for which a separate license is needed... LIBFSLPARSER_REDISTRIBUTE = NO -LIBFSLPARSER_INSTALL_STAGING = YES - -# The archive is a shell-self-extractor of a bzipped tar. It happens -# to extract in the correct directory (libfslparser-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 LIBFSLPARSER_EXTRACT_CMDS - 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 + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(LIBFSLPARSER_SOURCE)) endef # The Makefile installs several versions of the libraries, but we only
Signature · 1 line
1.9.1
PATCH v2 5/9 libfslparser: Use self-extractible helper
J?r?me, All,
On 2014-11-19 22:30 +0100, J?r?me Pouiller spake thusly:
Quoted 1 line
Signed-off-by J?r?me Pouiller <[email protected]>
Ditto the variable re-ordering.
Regards,
Yann E. MORIN.
Quoted 46 lines
--- package/libfslparser/libfslparser.mk | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-)package/libfslparser/libfslparser.mk +4
-19@@ -7,30 +7,15 @@ LIBFSLPARSER_VERSION = 3.0.11 LIBFSLPARSER_SITE = $(FREESCALE_IMX_SITE) LIBFSLPARSER_SOURCE = libfslparser-$(LIBFSLPARSER_VERSION).bin +LIBFSLPARSER_INSTALL_STAGING = YES + +# See freescale-imx.mk 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 -# the Board Support Package includes software and hardware (sic!) -# for which a separate license is needed... LIBFSLPARSER_REDISTRIBUTE = NO -LIBFSLPARSER_INSTALL_STAGING = YES - -# The archive is a shell-self-extractor of a bzipped tar. It happens -# to extract in the correct directory (libfslparser-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 LIBFSLPARSER_EXTRACT_CMDS - 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 + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(LIBFSLPARSER_SOURCE)) endef # The Makefile installs several versions of the libraries, but we onlySignature · 1 line
1.9.1
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 v2 6/9 libfslvpuwrap: Use self-extractible helper
In reply to Jérôme Pouiller--- package/libfslvpuwrap/libfslvpuwrap.mk | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-)
package/libfslvpuwrap/libfslvpuwrap.mk +5 -19
@@ -7,30 +7,16 @@ LIBFSLVPUWRAP_VERSION = 1.0.46 LIBFSLVPUWRAP_SITE = $(FREESCALE_IMX_SITE) LIBFSLVPUWRAP_SOURCE = libfslvpuwrap-$(LIBFSLVPUWRAP_VERSION).bin +LIBFSLVPUWRAP_DEPENDENCIES = imx-vpu +LIBFSLVPUWRAP_INSTALL_STAGING = YES + +# See freescale-imx.mk LIBFSLVPUWRAP_LICENSE = Freescale Semiconductor Software License Agreement -# 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-vpu - -# 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 + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(LIBFSLVPUWRAP_SOURCE)) endef $(eval $(autotools-package))
Signature · 1 line
1.9.1
PATCH v2 6/9 libfslvpuwrap: Use self-extractible helper
J?r?me, All,
On 2014-11-19 22:30 +0100, J?r?me Pouiller spake thusly:
Quoted 1 line
Signed-off-by J?r?me Pouiller <[email protected]>
Ditto the variable re-ordering...
Regards,
Yann E. MORIN.
Quoted 47 lines
--- package/libfslvpuwrap/libfslvpuwrap.mk | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-)package/libfslvpuwrap/libfslvpuwrap.mk +5
-19@@ -7,30 +7,16 @@ LIBFSLVPUWRAP_VERSION = 1.0.46 LIBFSLVPUWRAP_SITE = $(FREESCALE_IMX_SITE) LIBFSLVPUWRAP_SOURCE = libfslvpuwrap-$(LIBFSLVPUWRAP_VERSION).bin +LIBFSLVPUWRAP_DEPENDENCIES = imx-vpu +LIBFSLVPUWRAP_INSTALL_STAGING = YES + +# See freescale-imx.mk LIBFSLVPUWRAP_LICENSE = Freescale Semiconductor Software License Agreement -# 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-vpu - -# 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 + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(LIBFSLVPUWRAP_SOURCE)) endef $(eval $(autotools-package))Signature · 1 line
1.9.1
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 v2 7/9 gpu-viv-bin-mx6q: Use self-extractible helper
In reply to Jérôme Pouiller--- .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-)
package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk +5 -17
@@ -12,29 +12,17 @@ GPU_VIV_BIN_MX6Q_VERSION = $(GPU_VIV_BIN_MX6Q_BASE_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_INSTALL_STAGING = YES +GPU_VIV_BIN_MX6Q_PROVIDES = libegl libgles libopenvg +GPU_VIV_BIN_MX6Q_LIB_TARGET = $(call qstrip,$(BR2_PACKAGE_GPU_VIV_BIN_MX6Q_OUTPUT)) +# See freescale-imx.mk GPU_VIV_BIN_MX6Q_LICENSE = Freescale Semiconductor Software License Agreement - -# No license file is included in the archive; we could extract it from -# the self-extractor, but that's just too much effort. -# This is a legal minefield: the EULA specifies that -# the Board Support Package includes software and hardware (sic!) -# for which a separate license is needed... +GPU_VIV_BIN_MX6Q_LICENSE_FILES = EULA GPU_VIV_BIN_MX6Q_REDISTRIBUTE = NO -GPU_VIV_BIN_MX6Q_PROVIDES = libegl libgles libopenvg -GPU_VIV_BIN_MX6Q_LIB_TARGET = $(call qstrip,$(BR2_PACKAGE_GPU_VIV_BIN_MX6Q_OUTPUT)) - -# The archive is a shell-self-extractor of a bzipped tar. It happens -# to extract in the correct directory (gpu-viv-bin-mx6q-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. define GPU_VIV_BIN_MX6Q_EXTRACT_CMDS - (cd $(BUILD_DIR); \ - sh $(DL_DIR)/$(GPU_VIV_BIN_MX6Q_SOURCE) --force --auto-accept) + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(GPU_VIV_BIN_MX6Q_SOURCE)) endef # Instead of building, we fix up the inconsistencies that exist
Signature · 1 line
1.9.1
PATCH v2 7/9 gpu-viv-bin-mx6q: Use self-extractible helper
J?r?me, All,
On 2014-11-19 22:30 +0100, J?r?me Pouiller spake thusly:
Quoted 1 line
Signed-off-by J?r?me Pouiller <[email protected]>
Ditto the variable re-ordering...
Regards,
Yann E. MORIN.
Quoted 46 lines
--- .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-)package/freescale-imx/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.mk +5
-17@@ -12,29 +12,17 @@ GPU_VIV_BIN_MX6Q_VERSION = $(GPU_VIV_BIN_MX6Q_BASE_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_INSTALL_STAGING = YES +GPU_VIV_BIN_MX6Q_PROVIDES = libegl libgles libopenvg +GPU_VIV_BIN_MX6Q_LIB_TARGET = $(call qstrip,$(BR2_PACKAGE_GPU_VIV_BIN_MX6Q_OUTPUT)) +# See freescale-imx.mk GPU_VIV_BIN_MX6Q_LICENSE = Freescale Semiconductor Software License Agreement - -# No license file is included in the archive; we could extract it from -# the self-extractor, but that's just too much effort. -# This is a legal minefield: the EULA specifies that -# the Board Support Package includes software and hardware (sic!) -# for which a separate license is needed... +GPU_VIV_BIN_MX6Q_LICENSE_FILES = EULA GPU_VIV_BIN_MX6Q_REDISTRIBUTE = NO -GPU_VIV_BIN_MX6Q_PROVIDES = libegl libgles libopenvg -GPU_VIV_BIN_MX6Q_LIB_TARGET = $(call qstrip,$(BR2_PACKAGE_GPU_VIV_BIN_MX6Q_OUTPUT)) - -# The archive is a shell-self-extractor of a bzipped tar. It happens -# to extract in the correct directory (gpu-viv-bin-mx6q-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. define GPU_VIV_BIN_MX6Q_EXTRACT_CMDS - (cd $(BUILD_DIR); \ - sh $(DL_DIR)/$(GPU_VIV_BIN_MX6Q_SOURCE) --force --auto-accept) + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(GPU_VIV_BIN_MX6Q_SOURCE)) endef # Instead of building, we fix up the inconsistencies that existSignature · 1 line
1.9.1
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 v2 8/9 libz160: Use self-extractible helper
In reply to Jérôme Pouiller--- package/freescale-imx/libz160/libz160.mk | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-)
package/freescale-imx/libz160/libz160.mk +4 -15
@@ -7,25 +7,14 @@ LIBZ160_VERSION = 11.09.01 LIBZ160_SOURCE = libz160-bin-$(LIBZ160_VERSION).bin LIBZ160_SITE = $(FREESCALE_IMX_SITE) LIBZ160_INSTALL_STAGING = YES -LIBZ160_LICENSE = Freescale Semiconductor Software License Agreement -# No license file is included in the archive; we could extract it from -# the self-extractor, but that's just too much effort. -# This is a legal minefield: the EULA specifies that -# the Board Support Package includes software and hardware (sic!) -# for which a separate license is needed... +# See freescale-imx +LIBZ160_LICENSE = Freescale Semiconductor Software License Agreement +LIBZ160_LICENSE_FILES = EULA LIBZ160_REDISTRIBUTE = NO -# The archive is a shell-self-extractor of a bzipped tar. Output directory -# depends of version of source. -# 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. define LIBZ160_EXTRACT_CMDS - (cd $(@D); \ - sh $(DL_DIR)/$(LIBZ160_SOURCE) --force --auto-accept) - mv $(@D)/libz160-bin-$(LIBZ160_VERSION)/* $(@D) - rmdir $(@D)/libz160-bin-$(LIBZ160_VERSION) + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(LIBZ160_SOURCE)) endef define LIBZ160_INSTALL_STAGING_CMDS
Signature · 1 line
1.9.1
PATCH v2 9/9 gpu-amd-bin-mx51: Use self-extractible helper
In reply to Jérôme Pouiller--- .../gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk | 27 ++++++++-------------- 1 file changed, 9 insertions(+), 18 deletions(-)
package/freescale-imx/gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk +9 -18
@@ -3,36 +3,27 @@ # gpu-amd-bin-mx51 # ############################################################# -GPU_AMD_BIN_MX51_VERSION = 11.09.01 GPU_AMD_BIN_MX51_SITE = $(FREESCALE_IMX_SITE) +GPU_AMD_BIN_MX51_BASE_VERSION = 11.09.01 ifeq ($(BR2_PACKAGE_GPU_AMD_BIN_MX51_OUTPUT_FB),y) -GPU_AMD_BIN_MX51_SOURCE = amd-gpu-bin-mx51-$(GPU_AMD_BIN_MX51_VERSION).bin +GPU_AMD_BIN_MX51_VERSION = $(GPU_AMD_BIN_MX51_BASE_VERSION)-fb +GPU_AMD_BIN_MX51_SOURCE = amd-gpu-bin-mx51-$(GPU_AMD_BIN_MX51_BASE_VERSION).bin else -GPU_AMD_BIN_MX51_SOURCE = amd-gpu-x11-bin-mx51-$(GPU_AMD_BIN_MX51_VERSION).bin +GPU_AMD_BIN_MX51_VERSION = $(GPU_AMD_BIN_MX51_BASE_VERSION)-x11 +GPU_AMD_BIN_MX51_SOURCE = amd-gpu-x11-bin-mx51-$(GPU_AMD_BIN_MX51_BASE_VERSION).bin GPU_AMD_BIN_MX51_DEPENDENCIES = libxcb xlib_libX11 xlib_libXext \ xlib_libXrender xlib_libXau xlib_libXdmcp endif GPU_AMD_BIN_MX51_PROVIDES = libegl libgles libopenvg -GPU_AMD_BIN_MX51_LICENSE = Freescale Semiconductor Software License Agreement GPU_AMD_BIN_MX51_INSTALL_STAGING = YES -# No license file is included in the archive; we could extract it from -# the self-extractor, but that's just too much effort. -# This is a legal minefield: the EULA specifies that -# the Board Support Package includes software and hardware (sic!) -# for which a separate license is needed... +# See freescale-imx.mk +GPU_AMD_BIN_MX51_LICENSE = Freescale Semiconductor Software License Agreement +GPU_AMD_BIN_MX51_LICENSE_FILES = EULA GPU_AMD_BIN_MX51_REDISTRIBUTE = NO -# The archive is a shell-self-extractor of a bzipped tar. Output directory -# depends of version of source. -# 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. define GPU_AMD_BIN_MX51_EXTRACT_CMDS - (cd $(@D); \ - sh $(DL_DIR)/$(GPU_AMD_BIN_MX51_SOURCE) --force --auto-accept) - mv $(@D)/amd-gpu*-bin-mx51-$(GPU_AMD_BIN_MX51_VERSION)/* $(@D) - rmdir $(@D)/amd-gpu*-bin-mx51-$(GPU_AMD_BIN_MX51_VERSION) + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(GPU_AMD_BIN_MX51_SOURCE)) endef define GPU_AMD_BIN_MX51_BUILD_CMDS
Signature · 1 line
1.9.1
Thomas Petazzoni
Appliedv2 cover Better handling of freescale self-extractible binaries
In reply to Jérôme PouillerDear J?r?me Pouiller,
Quoted 2 lines · J?r?me Pouiller
J?r?me Pouiller (9):
freescale-imx: Add helper to extract self-extractible binaries
Applied, after doing several fixes. One of the fix was very important, since without it, your patch was simply not working. It would be good to at least minimally test build patches before sending them. See my changelog:
[Thomas:
- reword the comment of the new macro, and add details about the expected arguments, as suggested by Yann E. Morin.
- rework the logic to move the files in $(@D), as it was simply not working in the original patch. $(basename $(1)) was used to get the filename without the extension, but it also contains the full path. $(basename $(notdir $(1))) is needed.]
Quoted 5 lines
firmware-imx: Use self-extractible helper
imx-vpu: Use self-extractible helper
libfslcodec: Use self-extractible helper
libfslparser: Use self-extractible helper
libfslvpuwrap: Use self-extractible helper
All applied, after removing the useless "See freescale-imx.mk" comment.
Quoted 1 line
gpu-viv-bin-mx6q: Use self-extractible helper
This patch does not apply to the next branch. Could you respin?
Quoted 1 line
libz160: Use self-extractible helper
Applied, but merged into the patch adding libz160.
Quoted 1 line
gpu-amd-bin-mx51: Use self-extractible helper
I haven't handled this new package yet.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com