summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kconfig/linux.kconfig45
-rw-r--r--mk/kernel-headers.mk44
-rw-r--r--mk/toolchain.mk3
3 files changed, 92 insertions, 0 deletions
diff --git a/kconfig/linux.kconfig b/kconfig/linux.kconfig
index e69de29..a618df5 100644
--- a/kconfig/linux.kconfig
+++ b/kconfig/linux.kconfig
@@ -0,0 +1,45 @@
+#########################################################################################
+# 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 gcc.kconfig
+# \brief gcc.kconfig of Embtoolkit
+# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
+# \date May 2009
+#########################################################################################
+
+choice
+ prompt "Linux kernel headers you wish to use"
+ default EMBTK_LINUX_VERSION_2_6_29_2
+ help
+ Here you can choose which Linux kernel headers you
+ you want to use.
+
+ config EMBTK_LINUX_VERSION_2_6_29_2
+ bool "linux-2.6.29.2"
+ config EMBTK_LINUX_VERSION_2_6_29_1
+ bool "linux-2.6.29.1"
+ config EMBTK_LINUX_VERSION_2_6_29
+ bool "linux-2.6.29"
+endchoice
+
+config EMBTK_LINUX_VERSION_STRING
+ string
+ default "2.6.29.2" if EMBTK_LINUX_VERSION_2_6_29_2
+ default "2.6.29.1" if EMBTK_LINUX_VERSION_2_6_29_1
+ default "2.6.29" if EMBTK_LINUX_VERSION_2_6_29
+
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