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