freescale-imx.mk 1.3 KB

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