arch.mk.xtensa 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. BR_ARCH_XTENSA_OVERLAY_FILE = $(call qstrip,$(BR2_XTENSA_OVERLAY_FILE))
  2. ifeq ($(BR_BUILDING)$(BR2_XTENSA_CUSTOM)$(BR2_TOOLCHAIN_BUILDROOT):$(BR_ARCH_XTENSA_OVERLAY_FILE),yyy:)
  3. $(error No xtensa overlay file provided. Check your BR2_XTENSA_OVERLAY_FILE setting)
  4. endif
  5. ################################################################################
  6. # This variable can be used by packages that need to extract the overlay.
  7. #
  8. # ARCH_XTENSA_OVERLAY_FILE is the path to the overlay tarball; empty if not
  9. # using any overlay
  10. #
  11. # Example:
  12. # ifneq ($(ARCH_XTENSA_OVERLAY_FILE),)
  13. # tar xf $(ARCH_XTENSA_OVERLAY_FILE) -C $(@D) --strip-components=1 gcc
  14. # endif
  15. ################################################################################
  16. ifneq ($(filter http://% https://% ftp://% scp://%,$(BR_ARCH_XTENSA_OVERLAY_FILE)),)
  17. ARCH_XTENSA_OVERLAY_URL = $(BR_ARCH_XTENSA_OVERLAY_FILE)
  18. ARCH_XTENSA_OVERLAY_FILE = $($(PKG)_DL_DIR)/$(notdir $(BR_ARCH_XTENSA_OVERLAY_FILE))
  19. # Do not check that file, we can't know its hash
  20. BR_NO_CHECK_HASH_FOR += $(notdir $(ARCH_XTENSA_OVERLAY_URL))
  21. else
  22. ARCH_XTENSA_OVERLAY_FILE = $(BR_ARCH_XTENSA_OVERLAY_FILE)
  23. endif
  24. ################################################################################
  25. # arch-xtensa-overlay-extract -- extract an extensa overlay
  26. #
  27. # argument 1 is the path in which to extract
  28. # argument 2 is the component to extract, one of: gcc, binutils, gdb, linux,
  29. # u-boot
  30. #
  31. # Example:
  32. # $(call arch-xtensa-overlay-extract,/path/to/overlay.tar,$(@D),gcc)
  33. ################################################################################
  34. define arch-xtensa-overlay-extract
  35. $(call suitable-extractor,$(ARCH_XTENSA_OVERLAY_FILE)) \
  36. $(ARCH_XTENSA_OVERLAY_FILE) | \
  37. $(TAR) --strip-components=1 -C $(1) $(TAR_OPTIONS) - $(2)
  38. endef