summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kconfig/linux.kconfig2
-rw-r--r--mk/macros.mk13
2 files changed, 9 insertions, 6 deletions
diff --git a/kconfig/linux.kconfig b/kconfig/linux.kconfig
index 19d1c25..52f1b6a 100644
--- a/kconfig/linux.kconfig
+++ b/kconfig/linux.kconfig
@@ -142,7 +142,7 @@ config EMBTK_LINUX_HAVE_MIRROR
config EMBTK_LINUX_HAVE_MIRROR_SITE
depends on EMBTK_LINUX_HAVE_MIRROR
string "Mirror site"
- default "ftp://ftp.free.fr/pub/linux/kernel/v2.6"
+ default "ftp://ftp.embtoolkit.org/embtoolkit.org/packages-mirror"
help
specify an alternate location where to download linux sources
diff --git a/mk/macros.mk b/mk/macros.mk
index 519c26a..4ae3164 100644
--- a/mk/macros.mk
+++ b/mk/macros.mk
@@ -62,12 +62,15 @@ __embtk_mk_strcmp=$(shell [ $(strip $(1)) = $(strip $(2)) ] && echo y)
# wget wrapper
# usage: $(call embtk_wget,$(OUTPUT_FILE),$(SITE),$(FOREIGN_FILE))
#
-__wget_opts = --tries=5 --timeout=10 --waitretry=5
+__wget_outfile = $(patsubst %/,%,$(DOWNLOAD_DIR))/$(strip $(1))
+__wget_remotesite = $(patsubst %/,%,$(strip $(2)))
+__wget_foreignfiles = $(strip $(3))
+__wget_opts = --tries=5 --timeout=10 --waitretry=5
define embtk_wget
- wget $(__wget_opts) -O $(DOWNLOAD_DIR)/$(strip $(1)) \
- $(strip $(2))/$(strip $(3)) || \
- wget $(__WGET_OPTS) --no-passive-ftp -O \
- $(DOWNLOAD_DIR)/$(strip $(1)) $(strip $(2))/$(strip $(3))
+ wget $(__wget_opts) -O $(__wget_outfile) \
+ $(__wget_remotesite)/$(__wget_foreignfiles) || \
+ wget $(__wget_opts) --no-passive-ftp -O $(__wget_outfile) \
+ $(__wget_remotesite)/$(__wget_foreignfiles)
endef
#Decompress message