summaryrefslogtreecommitdiff
path: root/core/toolchain/linux/common.mk
diff options
context:
space:
mode:
Diffstat (limited to 'core/toolchain/linux/common.mk')
-rw-r--r--core/toolchain/linux/common.mk25
1 files changed, 17 insertions, 8 deletions
diff --git a/core/toolchain/linux/common.mk b/core/toolchain/linux/common.mk
index 61c8917..7b3accb 100644
--- a/core/toolchain/linux/common.mk
+++ b/core/toolchain/linux/common.mk
@@ -1,6 +1,6 @@
################################################################################
# Embtoolkit
-# Copyright(C) 2009-2014 Abdoulaye Walsimou GAYE.
+# Copyright(C) 2009-2015 Abdoulaye Walsimou GAYE.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,19 +23,28 @@
# \date May 2009
################################################################################
-pembtk_linux_site = $(or $(pembtk_linux_site_mirror),$(pembtk_linux_site_full))
-pembtk_linux_site_mirror = $(call embtk_uquote,$(CONFIG_EMBTK_LINUX_HAVE_MIRROR))
-pembtk_linux_site_full = $(pembtk_linux_site_base)/$(LINUX_MAJORV)$(pembtk_linux_longterm_v)
-pembtk_linux_site_base = http://ftp.kernel.org/pub/linux/kernel
-pembtk_linux_longterm_v = $(if $(LINUX_LONGTERMV),/longterm/$(LINUX_LONGTERMV))
+pembtk_linux_site = $(or $(pembtk_linux_site_mirror),$(pembtk_linux_site_custom),$(pembtk_linux_site_full))
+pembtk_linux_site_mirror = $(call embtk_uquote,$(CONFIG_EMBTK_LINUX_HAVE_MIRROR))
+pembtk_linux_site_custom = $(dir $(call embtk_uquote,$(CONFIG_EMBTK_LINUX_SRC_CUSTOM_URL)))
+pembtk_linux_site_full = $(pembtk_linux_site_base)/$(LINUX_MAJORV)$(pembtk_linux_longterm_v)
+pembtk_linux_site_base = http://ftp.kernel.org/pub/linux/kernel
+pembtk_linux_longterm_v = $(if $(LINUX_LONGTERMV),/longterm/$(LINUX_LONGTERMV))
+
+pembtk_linux_package = $(or $(pembtk_linux_package_custom),$(pembtk_linux_package_generic))
+pembtk_linux_package_custom = $(notdir $(call embtk_uquote,$(CONFIG_EMBTK_LINUX_SRC_CUSTOM_URL)))
+pembtk_linux_package_generic = linux-$(LINUX_VERSION).tar.xz
+
+pembtk_commonlinux_srcdir = $(or $(pembtk_linux_srcdir_custom),$(pembtk_linux_srcdir_generic))
+pembtk_linux_srcdir_custom = $(patsubst %.$(call embtk_pkg_tarball_fmt,linux),%,$(pembtk_linux_package_custom))
+pembtk_linux_srcdir_generic = linux-$(LINUX_VERSION)
LINUX_NAME := linux
LINUX_MAJORV := $(call embtk_pkg_version,linux_major)
LINUX_LONGTERMV := $(call embtk_pkg_version,linux_longterm)
LINUX_VERSION := $(call embtk_pkg_version,linux)
LINUX_SITE := $(pembtk_linux_site)
-LINUX_PACKAGE := linux-$(LINUX_VERSION).tar.xz
-LINUX_SRC_DIR := $(embtk_toolsb)/linux-$(LINUX_VERSION)
+LINUX_PACKAGE := $(pembtk_linux_package)
+LINUX_SRC_DIR := $(embtk_toolsb)/$(pembtk_commonlinux_srcdir)
LINUX_BUILD_DIR := $(call embtk_pkg_srcdir,linux)
LINUX_KEEP_SRC_DIR := $(CONFIG_EMBTK_BUILD_LINUX_KERNEL)