Better handling of freescale self-extractible binaries
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"
J?r?me Pouiller (7):
freescale-imx: Add helper to extract self-extractible binaries
firmware-imx: Use self-extractible helper
imx-vpu: Use self-extractible helper
libfsl*: 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 1/7 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; }' \ + $(DL_DIR)/$(1) > $(@D)/EULA + cd $(@D) && sh $(DL_DIR)/$(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 1/7 freescale-imx: Add helper to extract self-extractible binaries
J?r?me, All,
Coming back on that one...
On 2014-11-07 17:03 +0100, J?r?me Pouiller spake thusly:
Quoted 18 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 +5
-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
package/freescale-imx/freescale-imx.mk line 24
Quoted 10 lines
package/freescale-imx/freescale-imx.mk +10
-0+# 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; }' \ + $(DL_DIR)/$(1) > $(@D)/EULA
I wonder if we would not be better off passing the full path to the firmware file, from the caller, i.e.:
$(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(firmware_file))
Regards,
Yann E. MORIN.
Quoted 14 lines
package/freescale-imx/freescale-imx.mk +6
-0+ cd $(@D) && sh $(DL_DIR)/$(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 · 6 lines
1.9.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
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 2/7 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,$(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 2/7 firmware-imx: Use self-extractible helper
J?r?me, All,
On 2014-11-07 17:03 +0100, J?r?me Pouiller spake thusly:
Quoted 25 lines
Signed-off-by J?r?me Pouiller <[email protected]>--- package/freescale-imx/firmware-imx/firmware-imx.mk | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-)package/freescale-imx/firmware-imx/firmware-imx.mk +3
-4@@ -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
package/freescale-imx/firmware-imx/firmware-imx.mk line 20
Quoted 10 lines
package/freescale-imx/firmware-imx/firmware-imx.mk +1
-7-# 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,$(FIRMWARE_IMX_SOURCE))
Pass the full path from here.
Otherwise, looks good. On your v2, your can add my:
Reviewed-by: "Yann E. MORIN" <[email protected]>
Regards,
Yann E. MORIN.
Quoted 13 lines
package/freescale-imx/firmware-imx/firmware-imx.mk +0
-1endef - define FIRMWARE_IMX_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/lib/firmware for blobdir in $(FIRMWARE_IMX_BLOBS); do \Signature · 6 lines
1.9.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
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 3/7 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,$(IMX_VPU_SOURCE)) endef define IMX_VPU_BUILD_CMDS
Signature · 1 line
1.9.1
PATCH 3/7 imx-vpu: Use self-extractible helper
J?r?me, All,
On 2014-11-07 17:03 +0100, J?r?me Pouiller spake thusly:
Quoted 33 lines
Signed-off-by J?r?me Pouiller <[email protected]>--- package/freescale-imx/imx-vpu/imx-vpu.mk | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-)package/freescale-imx/imx-vpu/imx-vpu.mk +4
-9@@ -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
package/freescale-imx/imx-vpu/imx-vpu.mk IMX_VPU_MAKE_ENV = \ · line 28
Quoted 10 lines
package/freescale-imx/imx-vpu/imx-vpu.mk +2
-7+ 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,$(IMX_VPU_SOURCE))
Ditto, pass the full path from here.
For the v2:
Reviewed-by: "Yann E. MORIN" <[email protected]>
Regards,
Yann E. MORIN.
Quoted 10 lines
package/freescale-imx/imx-vpu/imx-vpu.mk +0
-0endef define IMX_VPU_BUILD_CMDSSignature · 6 lines
1.9.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
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 4/7 libfsl*: Use self-extractible helper
In reply to Jérôme Pouiller--- package/libfslcodec/libfslcodec.mk | 23 ++++------------------- package/libfslparser/libfslparser.mk | 23 ++++------------------- package/libfslvpuwrap/libfslvpuwrap.mk | 24 +++++------------------- 3 files changed, 13 insertions(+), 57 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,$(LIBFSLCODEC_SOURCE)) endef # FIXME The Makefile installs both the arm9 and arm11 versions of the
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,$(LIBFSLPARSER_SOURCE)) endef # The Makefile installs several versions of the libraries, but we only
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,$(LIBFSLVPUWRAP_SOURCE)) endef $(eval $(autotools-package))
Signature · 1 line
1.9.1
PATCH 4/7 libfsl*: Use self-extractible helper
J?r?me, All,
On 2014-11-07 17:03 +0100, J?r?me Pouiller spake thusly:
Quoted 5 lines
Signed-off-by J?r?me Pouiller <[email protected]>--- package/libfslcodec/libfslcodec.mk | 23 ++++------------------- package/libfslparser/libfslparser.mk | 23 ++++------------------- package/libfslvpuwrap/libfslvpuwrap.mk | 24 +++++-------------------
Can you split this into three separate patches, please?
As far as I can see, the three changes do not depend on each other, so can safely be splitted.
Regards,
Yann E. MORIN.
Quoted 127 lines
3 files changed, 13 insertions(+), 57 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,$(LIBFSLCODEC_SOURCE)) endef # FIXME The Makefile installs both the arm9 and arm11 versions of thepackage/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,$(LIBFSLPARSER_SOURCE)) endef # The Makefile installs several versions of the libraries, but we onlypackage/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,$(LIBFSLVPUWRAP_SOURCE)) endef $(eval $(autotools-package))Signature · 6 lines
1.9.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
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 5/7 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,$(GPU_VIV_BIN_MX6Q_SOURCE)) endef # Instead of building, we fix up the inconsistencies that exist
Signature · 1 line
1.9.1
PATCH 6/7 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,$(LIBZ160_SOURCE)) endef define LIBZ160_INSTALL_STAGING_CMDS
Signature · 1 line
1.9.1
PATCH 7/7 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,$(GPU_AMD_BIN_MX51_SOURCE)) endef define GPU_AMD_BIN_MX51_BUILD_CMDS
Signature · 1 line
1.9.1
cover Better handling of freescale self-extractible binaries
In reply to Jérôme PouillerJ?r?me, All,
On 2014-11-07 17:03 +0100, J?r?me Pouiller spake thusly:
Quoted 2 lines
This serie introduce an helper fonction for freescale self-extractible binaries.
Thanks, that makes for a pretty nice cleanup! :-)
Quoted 2 lines
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"
I haven't reviewed the last three patches in this series.
I think patches 1-4 can be applied now (barring the few comments I made), and then you can directly use that from your other series.
Of course, my comments are not definitive, others may prefer the way you did, so my reviewed-by tags are still valid.
Regards,
Yann E. MORIN.
Quoted 27 lines
J?r?me Pouiller (7):
freescale-imx: Add helper to extract self-extractible binaries
firmware-imx: Use self-extractible helper
imx-vpu: Use self-extractible helper
libfsl*: Use self-extractible helper
gpu-viv-bin-mx6q: Use self-extractible helper
libz160: Use self-extractible helper
gpu-amd-bin-mx51: Use self-extractible helperpackage/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 · 6 lines
1.9.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
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. | '------------------------------^-------^------------------^--------------------'
cover Better handling of freescale self-extractible binaries
Quoted 8 lines · Yann E. MORIN
J?r?me, All,
On 2014-11-07 17:03 +0100, J?r?me Pouiller spake thusly:
Quoted 2 lines
This serie introduce an helper fonction for freescale self-extractible binaries.
Thanks, that makes for a pretty nice cleanup! :-)
+1
Nicely done, J?r?me!