arch/xtensa: accept the overlay to be an URL
authorYann E. MORIN <yann.morin.1998@free.fr>
Sun, 9 Jul 2017 12:21:58 +0000 (05:21 -0700)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 9 Jul 2017 14:58:03 +0000 (16:58 +0200)
It can be interesting to get the overlay from a remote server, rather
than expect it to be present locally.

Since that file can be any URL, we can't know its hash, so we just
exclude it.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
[Thomas: use DL_DIR instead of BR2_DL_DIR.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
arch/arch.mk.xtensa
package/binutils/binutils.mk
package/gcc/gcc-final/gcc-final.mk
package/gcc/gcc-initial/gcc-initial.mk
package/gdb/gdb.mk

index ecb9c1086a703dbe252256662dc38c98577fb026..1bc700aac072468ed490787b6c3b68927eb382af 100644 (file)
@@ -9,7 +9,15 @@
 #       tar xf $(ARCH_XTENSA_OVERLAY_FILE) -C $(@D) --strip-components=1 gcc
 #   endif
 ################################################################################
-ARCH_XTENSA_OVERLAY_FILE = $(call qstrip,$(BR2_XTENSA_OVERLAY_FILE))
+BR_ARCH_XTENSA_OVERLAY_FILE = $(call qstrip,$(BR2_XTENSA_OVERLAY_FILE))
+ifneq ($(filter http://% https://% ftp://% scp://%,$(BR_ARCH_XTENSA_OVERLAY_FILE)),)
+ARCH_XTENSA_OVERLAY_URL = $(BR_ARCH_XTENSA_OVERLAY_FILE)
+ARCH_XTENSA_OVERLAY_FILE = $(DL_DIR)/$(notdir $(BR_ARCH_XTENSA_OVERLAY_FILE))
+# Do not check that file, we can't know its hash
+BR_NO_CHECK_HASH_FOR += $(notdir $(ARCH_XTENSA_OVERLAY_URL))
+else
+ARCH_XTENSA_OVERLAY_FILE = $(BR_ARCH_XTENSA_OVERLAY_FILE)
+endif
 
 ################################################################################
 # arch-xtensa-overlay-extract -- extract an extensa overlay
index 8e26394fbf51ffa508bd3dcf0d0b12e5372096ff..ec85ad69cbc0de2e86ed204ab41db90be6c8cf43 100644 (file)
@@ -127,7 +127,9 @@ define BINUTILS_XTENSA_OVERLAY_EXTRACT
        $(call arch-xtensa-overlay-extract,$(@D),binutils)
 endef
 BINUTILS_POST_EXTRACT_HOOKS += BINUTILS_XTENSA_OVERLAY_EXTRACT
+BINUTILS_EXTRA_DOWNLOADS += $(ARCH_XTENSA_OVERLAY_URL)
 HOST_BINUTILS_POST_EXTRACT_HOOKS += BINUTILS_XTENSA_OVERLAY_EXTRACT
+HOST_BINUTILS_EXTRA_DOWNLOADS += $(ARCH_XTENSA_OVERLAY_URL)
 endif
 
 ifeq ($(BR2_BINUTILS_ENABLE_LTO),y)
index f3bc72efc719b13b794b5f93d0dfbdda89deda36..8ca9847ed9d8630de38a341d91f95aabd3fbe352 100644 (file)
@@ -17,6 +17,7 @@ HOST_GCC_FINAL_POST_EXTRACT_HOOKS += HOST_GCC_FAKE_TESTSUITE
 
 ifneq ($(ARCH_XTENSA_OVERLAY_FILE),)
 HOST_GCC_FINAL_POST_EXTRACT_HOOKS += HOST_GCC_XTENSA_OVERLAY_EXTRACT
+HOST_GCC_FINAL_EXTRA_DOWNLOADS += $(ARCH_XTENSA_OVERLAY_URL)
 endif
 
 HOST_GCC_FINAL_POST_PATCH_HOOKS += HOST_GCC_APPLY_PATCHES
index dc7dff922818911b1452759258db09b7300c9dd7..c476b2faeb462f8513693b42e4d131d32d175297 100644 (file)
@@ -15,6 +15,7 @@ HOST_GCC_INITIAL_POST_EXTRACT_HOOKS += HOST_GCC_FAKE_TESTSUITE
 
 ifneq ($(ARCH_XTENSA_OVERLAY_FILE),)
 HOST_GCC_INITIAL_POST_EXTRACT_HOOKS += HOST_GCC_XTENSA_OVERLAY_EXTRACT
+HOST_GCC_INITIAL_EXTRA_DOWNLOADS += $(ARCH_XTENSA_OVERLAY_URL)
 endif
 
 HOST_GCC_INITIAL_POST_PATCH_HOOKS += HOST_GCC_APPLY_PATCHES
index 8ef01d6c12ea858de7c4e893641b7a0de9fe4ca7..73b0ea09d97d5df7106c851b277a48f44385b2f5 100644 (file)
@@ -49,7 +49,9 @@ define GDB_XTENSA_OVERLAY_EXTRACT
        $(call arch-xtensa-overlay-extract,$(@D),gdb)
 endef
 GDB_POST_EXTRACT_HOOKS += GDB_XTENSA_OVERLAY_EXTRACT
+GDB_EXTRA_DOWNLOADS += $(ARCH_XTENSA_OVERLAY_URL)
 HOST_GDB_POST_EXTRACT_HOOKS += GDB_XTENSA_OVERLAY_EXTRACT
+HOST_GDB_EXTRA_DOWNLOADS += $(ARCH_XTENSA_OVERLAY_URL)
 endif
 
 ifeq ($(GDB_FROM_GIT),y)