64f3b6b571eae0caaf3f97b7880afb4d14ed76de
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / freescale-imx / freescale-imx.mk
1 ################################################################################
2 #
3 # freescale-imx
4 #
5 ################################################################################
6
7 FREESCALE_IMX_VERSION = 3.10.17-1.0.0
8 FREESCALE_IMX_SITE = http://www.freescale.com/lgfiles/NMG/MAD/YOCTO
9
10 # Helper for self-extracting binaries distributed by Freescale.
11 #
12 # The --force option makes sure it doesn't fail if the source
13 # directory already exists. The --auto-accept skips the license check,
14 # as it is not needed in Buildroot because we have legal-info. Since
15 # there's a EULA in the binary file, we extract it in this macro, and
16 # it should therefore be added to the LICENSE_FILES variable of
17 # packages using this macro. Also, remember to set REDISTRIBUTE to
18 # "NO". Indeed, this is a legal minefield: the EULA specifies that the
19 # Board Support Package includes software and hardware (sic!) for
20 # which a separate license is needed...
21 #
22 # $(1): full path to the archive file
23 #
24 define FREESCALE_IMX_EXTRACT_HELPER
25         awk 'BEGIN      { start = 0; } \
26              /^EOEULA/  { start = 0; } \
27                         { if (start) print; } \
28              /<<EOEULA/ { start = 1; }' \
29             $(1) > $(@D)/EULA
30         cd $(@D) && sh $(1) --force --auto-accept
31         find $(@D)/$(basename $(notdir $(1))) -mindepth 1 -maxdepth 1 -exec mv {} $(@D) \;
32         rmdir $(@D)/$(basename $(notdir $(1)))
33 endef
34
35 include $(sort $(wildcard package/freescale-imx/*/*.mk))