diff options
| author | Jérôme Pouiller <jezz@sysmic.org> | 2014-11-19 22:30:34 +0100 |
|---|---|---|
| committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2014-11-27 21:59:46 +0100 |
| commit | f2a8f79c0257f35af75c61ecd9f7fd4266f72513 (patch) | |
| tree | 06b6ffa24a3eb089c588890f491b0dcb026f98bb | |
| parent | 46ede997d4d152d47cdd6f7af47bdc1cf4ed96b6 (diff) | |
| download | buildroot-f2a8f79c0257f35af75c61ecd9f7fd4266f72513.tar.gz buildroot-f2a8f79c0257f35af75c61ecd9f7fd4266f72513.zip | |
freescale-imx: Add helper to extract self-extractible binaries
[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.]
Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
| -rw-r--r-- | package/freescale-imx/freescale-imx.mk | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/package/freescale-imx/freescale-imx.mk b/package/freescale-imx/freescale-imx.mk index c52fc1169e..64f3b6b571 100644 --- a/package/freescale-imx/freescale-imx.mk +++ b/package/freescale-imx/freescale-imx.mk @@ -7,4 +7,29 @@ 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 option makes sure it doesn't fail if the source +# directory already exists. The --auto-accept skips the license check, +# as it is not needed in Buildroot because we have legal-info. Since +# there's a EULA in the binary file, we extract it in this macro, and +# it should therefore be added to the LICENSE_FILES variable of +# packages using this macro. Also, remember to 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... +# +# $(1): full path to the archive file +# +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 $(notdir $(1))) -mindepth 1 -maxdepth 1 -exec mv {} $(@D) \; + rmdir $(@D)/$(basename $(notdir $(1))) +endef + include $(sort $(wildcard package/freescale-imx/*/*.mk)) |

