summaryrefslogtreecommitdiff
path: root/core/toolchain
diff options
context:
space:
mode:
Diffstat (limited to 'core/toolchain')
-rw-r--r--core/toolchain/linux/common.mk25
-rw-r--r--core/toolchain/linux/headers.mk9
-rw-r--r--core/toolchain/linux/linux.mk9
3 files changed, 27 insertions, 16 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)
diff --git a/core/toolchain/linux/headers.mk b/core/toolchain/linux/headers.mk
index 866d039..0a4518b 100644
--- a/core/toolchain/linux/headers.mk
+++ b/core/toolchain/linux/headers.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
@@ -27,8 +27,9 @@ LINUX_HEADERS_NAME := linux
LINUX_HEADERS_VERSION := $(LINUX_VERSION)
LINUX_HEADERS_SITE := $(LINUX_SITE)
LINUX_HEADERS_PACKAGE := $(LINUX_PACKAGE)
-LINUX_HEADERS_SRC_DIR := $(LINUX_SRC_DIR)
-LINUX_HEADERS_BUILD_DIR := $(LINUX_BUILD_DIR)
+LINUX_HEADERS_SRC_DIR := $(call embtk_pkg_srcdir,linux)
+LINUX_HEADERS_BUILD_DIR := $(call embtk_pkg_srcdir,linux)
+
LINUX_HEADERS_KEEP_SRC_DIR := $(LINUX_KEEP_SRC_DIR)
LINUX_HEADERS_KCONFIGS_NAME := LINUX
@@ -48,5 +49,5 @@ define embtk_install_linux_headers
endef
define embtk_cleanup_linux_headers
- [ -d $(LINUX_BUILD_DIR) ] && $(call __embtk_unsetinstalled_pkg,linux_headers) ||:
+ [ -d $(LINUX_HEADERS_BUILD_DIR) ] && $(call __embtk_unsetinstalled_pkg,linux_headers) ||:
endef
diff --git a/core/toolchain/linux/linux.mk b/core/toolchain/linux/linux.mk
index 1fe8fcc..d3d2ede 100644
--- a/core/toolchain/linux/linux.mk
+++ b/core/toolchain/linux/linux.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
@@ -64,7 +64,7 @@ endef
ifeq ($(embtk_buildhost_os),macos)
define embtk_beforeinstall_linux
cp $(EMBTK_ROOT)/scripts/unifdef.c \
- $(LINUX_SRC_DIR)/scripts/unifdef.c
+ $(pembtk_linux_srcdir)/scripts/unifdef.c
endef
endif
@@ -114,8 +114,9 @@ LINUX_MODULES_NAME := linux
LINUX_MODULES_VERSION := $(LINUX_VERSION)
LINUX_MODULES_SITE := $(LINUX_SITE)
LINUX_MODULES_PACKAGE := $(LINUX_PACKAGE)
-LINUX_MODULES_SRC_DIR := $(LINUX_SRC_DIR)
-LINUX_MODULES_BUILD_DIR := $(LINUX_BUILD_DIR)
+LINUX_MODULES_SRC_DIR := $(pembtk_linux_srcdir)
+LINUX_MODULES_BUILD_DIR := $(pembtk_linux_srcdir)
+
LINUX_MODULES_KCONFIGS_NAME := LINUX
LINUX_MODULES_KEEP_SRC_DIR := $(LINUX_KEEP_SRC_DIR)