From 68a7c6bccf6b807d103fc2e1ca50cb42d2f875d2 Mon Sep 17 00:00:00 2001 From: Abdoulaye Walsimou Gaye Date: Thu, 1 Jan 2015 17:34:04 +0100 Subject: Toolchain: linux headers: give ability use a git repository or and custom tarball source tree Signed-off-by: Abdoulaye Walsimou Gaye --- core/toolchain/linux/common.mk | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'core/toolchain/linux/common.mk') 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) -- cgit v1.2.3