From 8eba8e144c52922f6ad94e5c4580f12fe0b2cdb0 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Tue, 14 Mar 2017 11:30:35 -0700 Subject: [PATCH] arch/xtensa: add macro to extract the overlay Signed-off-by: "Yann E. MORIN" Cc: Thomas Petazzoni Signed-off-by: Max Filippov Signed-off-by: Thomas Petazzoni --- arch/arch.mk.xtensa | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arch.mk.xtensa b/arch/arch.mk.xtensa index 7c8beb194d..2843333b58 100644 --- a/arch/arch.mk.xtensa +++ b/arch/arch.mk.xtensa @@ -13,3 +13,16 @@ ################################################################################ ARCH_XTENSA_CORE_NAME = $(call qstrip,$(BR2_XTENSA_CORE_NAME)) ARCH_XTENSA_OVERLAY_TAR = $(call qstrip,$(BR2_XTENSA_OVERLAY_DIR))/xtensa_$(ARCH_XTENSA_CORE_NAME).tar + +################################################################################ +# arch-xtensa-overlay-extract -- extract an extensa overlay +# +# argument 1 is the path in which to extract +# argument 2 is the component to extract, one of: gcc, binutils, gdb +# +# Example: +# $(call arch-xtensa-overlay-extract,/path/to/overlay.tar,$(@D),gcc) +################################################################################ +define arch-xtensa-overlay-extract + tar xf $(ARCH_XTENSA_OVERLAY_TAR) -C $(1) --strip-components=1 $(2) +endef -- 2.30.2