diff options
author | Abdoulaye Walsimou Gaye <walsimou@walsimou.com> | 2009-05-15 14:14:41 +0200 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <walsimou@walsimou.com> | 2009-05-15 14:14:41 +0200 |
commit | e10f6ff4a3fced4e8a57f9b93596ff13032bae51 (patch) | |
tree | fdea7b28e6e07a00b82e7e06a8d37eb526bd113f /mk | |
parent | d10b01a3c8d4915a849b6801017278fa97375819 (diff) | |
download | embtoolkit-e10f6ff4a3fced4e8a57f9b93596ff13032bae51.tar.gz embtoolkit-e10f6ff4a3fced4e8a57f9b93596ff13032bae51.tar.bz2 embtoolkit-e10f6ff4a3fced4e8a57f9b93596ff13032bae51.tar.xz |
Toolchain: linux kernel download and headers install
Signed-off-by: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
Diffstat (limited to 'mk')
-rw-r--r-- | mk/kernel-headers.mk | 44 | ||||
-rw-r--r-- | mk/toolchain.mk | 3 |
2 files changed, 47 insertions, 0 deletions
diff --git a/mk/kernel-headers.mk b/mk/kernel-headers.mk new file mode 100644 index 0000000..fb2e14e --- /dev/null +++ b/mk/kernel-headers.mk @@ -0,0 +1,44 @@ +######################################################################################### +# GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> +# Copyright(C) 2009 GAYE Abdoulaye Walsimou. All rights reserved. +# +# This program is free software; you can distribute it and/or modify it +# under the terms of the GNU General Public License +# (Version 2 or later) published by the Free Software Foundation. +# +# This program is distributed in the hope it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. +######################################################################################### +# +# \file kernel-headers.mk +# \brief kernel-headers.mk of Embtoolkit +# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> +# \date May 2009 +######################################################################################### + +LINUX_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_LINUX_VERSION_STRING))) +LINUX_SITE := ftp://ftp.kernel.org/pub/linux/kernel/v2.6 +LINUX_PACKAGE := linux-$(LINUX_VERSION).tar.bz2 +LINUX_BUILD_DIR := $(TOOLS_BUILD)/linux-$(LINUX_VERSION) + +kernel-headers_install: download_linux $(LINUX_BUILD_DIR)/.decompressed + $(call INSTALL_MESSAGE,"headers linux-$(LINUX_VERSION)") + PATH=$(PATH):$(TOOLS)/bin/ $(MAKE) -C $(LINUX_BUILD_DIR) \ + headers_install ARCH=$(LINUX_ARCH) CROSS_COMPILE=$(GNU_TARGET)- \ + INSTALL_HDR_PATH=$(SYSROOT)/usr + +download_linux: + @test -e $(DOWNLOAD_DIR)/$(LINUX_PACKAGE) || \ + wget -O $(DOWNLOAD_DIR)/$(LINUX_PACKAGE) $(LINUX_SITE)/$(LINUX_PACKAGE) + +$(LINUX_BUILD_DIR)/.decompressed: + $(call DECOMPRESS_MESSAGE,$(LINUX_PACKAGE)) + @tar -C $(TOOLS_BUILD) -xjf $(DOWNLOAD_DIR)/$(LINUX_PACKAGE) + @touch $@ + diff --git a/mk/toolchain.mk b/mk/toolchain.mk index cf37e15..4bae83f 100644 --- a/mk/toolchain.mk +++ b/mk/toolchain.mk @@ -34,6 +34,9 @@ include $(EMBTK_ROOT)/mk/binutils.mk #GCC include $(EMBTK_ROOT)/mk/gcc.mk +#linux kernel headers +include $(EMBTK_ROOT)/mk/kernel-headers.mk + #targets buildtoolchain: gmphost_install mpfrhost_install binutils_install gcc1_install |