summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kconfig4
-rw-r--r--Makefile2
-rw-r--r--kconfig/gmphost.kconfig56
-rw-r--r--kconfig/mpfrhost.kconfig6
-rw-r--r--mk/gmphost.mk40
-rw-r--r--mk/mpfrhost.mk42
-rw-r--r--mk/toolchain.mk31
7 files changed, 168 insertions, 13 deletions
diff --git a/Kconfig b/Kconfig
index 6c9a58b..2d8e624 100644
--- a/Kconfig
+++ b/Kconfig
@@ -54,6 +54,10 @@ menu "MPFR"
source "kconfig/mpfrhost.kconfig"
endmenu
+menu "GMP"
+source "kconfig/gmphost.kconfig"
+endmenu
+
menu "Linux kernel headers"
source "kconfig/linux.kconfig"
endmenu
diff --git a/Makefile b/Makefile
index 1f6c13c..48dbc32 100644
--- a/Makefile
+++ b/Makefile
@@ -78,7 +78,7 @@ clean: rmallpath
$(Q)$(MAKE) -f scripts/Makefile.clean obj=scripts/basic
$(Q)rm -rf .config kbuild.log
-startbuild: mkinitialpath mktoolchain
+startbuild: mkinitialpath buildtoolchain buildrootfs
include mk/target_mcu.mk
include mk/initialpath.mk
diff --git a/kconfig/gmphost.kconfig b/kconfig/gmphost.kconfig
new file mode 100644
index 0000000..22e752e
--- /dev/null
+++ b/kconfig/gmphost.kconfig
@@ -0,0 +1,56 @@
+#########################################################################################
+# 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 gmphost.kconfig
+# \brief gmphost.kconfig of Embtoolkit
+# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
+# \date May 2009
+#########################################################################################
+
+choice
+ prompt "Version of gmp you wish"
+ default EMBTK_GMP_HOST_VERSION_4_2_4
+ help
+ GMP is a free library for arbitrary precision arithmetic,
+ operating on signed integers, rational numbers,
+ and floating point numbers.
+ GMP is necessary in order to build MPFR.
+
+ config EMBTK_GMP_HOST_VERSION_4_3_1
+ bool "gmp-4.3.1"
+ config EMBTK_GMP_HOST_VERSION_4_3_0
+ bool "gmp-4.3.0"
+ config EMBTK_GMP_HOST_VERSION_4_2_4
+ bool "gmp-4.2.4"
+ config EMBTK_GMP_HOST_VERSION_4_2_3
+ bool "gmp-4.2.3"
+ config EMBTK_GMP_HOST_VERSION_4_2_2
+ bool "gmp-4.2.2"
+ config EMBTK_GMP_HOST_VERSION_4_2_1
+ bool "gmp-4.2.1"
+endchoice
+
+config EMBTK_GMP_HOST_VERSION_STRING
+string
+default "4.3.1" if EMBTK_GMP_HOST_VERSION_4_3_1
+default "4.3.0" if EMBTK_MPFR_HOST_VERSION_4_3_0
+default "4.2.4" if EMBTK_GMP_HOST_VERSION_4_2_4
+default "4.2.3" if EMBTK_GMP_HOST_VERSION_4_2_3
+default "4.2.2" if EMBTK_GMP_HOST_VERSION_4_2_2
+default "4.2.1" if EMBTK_GMP_HOST_VERSION_4_2_1
+
diff --git a/kconfig/mpfrhost.kconfig b/kconfig/mpfrhost.kconfig
index a391ba5..791be26 100644
--- a/kconfig/mpfrhost.kconfig
+++ b/kconfig/mpfrhost.kconfig
@@ -16,8 +16,8 @@
# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
#########################################################################################
#
-# \file mpfr.kconfig
-# \brief mpfr.kconfig of Embtoolkit
+# \file mpfrhost.kconfig
+# \brief mpfrhost.kconfig of Embtoolkit
# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
# \date May 2009
#########################################################################################
@@ -41,5 +41,3 @@ string
default "2.4.1" if EMBTK_MPFR_HOST_VERSION_2_4_1
default "2.4.0" if EMBTK_MPFR_HOST_VERSION_2_4_0
-
-
diff --git a/mk/gmphost.mk b/mk/gmphost.mk
index e69de29..444e6c7 100644
--- a/mk/gmphost.mk
+++ b/mk/gmphost.mk
@@ -0,0 +1,40 @@
+#########################################################################################
+# 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 gmphost.mk
+# \brief gmphost.mk of Embtoolkit. To build mpfr, we need gmp.
+# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
+# \date May 2009
+#########################################################################################
+
+GMP_HOST_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_GMP_HOST_VERSION_STRING)))
+GMP_HOST_SITE := ftp://ftp.gmplib.org/pub/
+GMP_HOST_PACKAGE := gmp-$(GMP_HOST_VERSION).tar.bz2
+GMP_HOST_BUILD_DIR := $(TOOLS_BUILD)/gmp
+
+$(GMP_HOST_BUILD_DIR)/.built: download_gmp_host $(GMP_HOST_BUILD_DIR)/.decompressed
+ @touch $@
+
+$(GMP_HOST_BUILD_DIR)/.decompressed:
+ @tar -C $(TOOLS_BUILD) -xjf $(DOWNLOAD_DIR)/$(GMP_HOST_PACKAGE)
+ @mkdir -p $(GMP_HOST_BUILD_DIR)
+ touch $@
+
+download_gmp_host:
+ @test -e $(DOWNLOAD_DIR)/$(GMP_HOST_PACKAGE) || \
+ wget -P $(DOWNLOAD_DIR) $(GMP_HOST_SITE)/$(GMP_HOST_PACKAGE)
diff --git a/mk/mpfrhost.mk b/mk/mpfrhost.mk
index d2def52..5418e6a 100644
--- a/mk/mpfrhost.mk
+++ b/mk/mpfrhost.mk
@@ -1,14 +1,40 @@
+#########################################################################################
+# 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 mpfrhost.mk
+# \brief mpfrhost.mk of Embtoolkit. To build gcc, we need mpfr.
+# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
+# \date May 2009
+#########################################################################################
MPFR_HOST_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_MPFR_HOST_VERSION_STRING)))
MPFR_HOST_SITE := http://www.mpfr.org/mpfr-$(MPFR_HOST_VERSION)
-MPFR_HOST_COMPRESSOR := tar.bz2
-MPFR_HOST_COMPRESSOR_FLAGS := -xjf
-MPFR_HOST_DECOMPRESSOR := tar
-MPFR_HOST_PACKAGE := mpfr-$(MPFR_HOST_VERSION).$(MPFR_HOST_COMPRESSOR)
-MPFR_HOST_BUILD_DIR := $(TOOLS_BUILD)/$(MPFR_HOST_PACKAGE)
+MPFR_HOST_PACKAGE := mpfr-$(MPFR_HOST_VERSION).tar.bz2
+MPFR_HOST_BUILD_DIR := $(TOOLS_BUILD)/mpfr
-DOWNLOAD_MPFR_HOST:
+$(MPFR_HOST_BUILD_DIR)/.built: download_mpfr_host $(MPFR_HOST_BUILD_DIR)/.decompressed
+ @touch $@
+
+$(MPFR_HOST_BUILD_DIR)/.decompressed:
+ @tar -C $(TOOLS_BUILD) -xjf $(DOWNLOAD_DIR)/$(MPFR_HOST_PACKAGE)
+ @mkdir -p $(MPFR_HOST_BUILD_DIR)
+ touch $@
+
+download_mpfr_host:
@test -e $(DOWNLOAD_DIR)/$(MPFR_HOST_PACKAGE) || \
wget -P $(DOWNLOAD_DIR) $(MPFR_HOST_SITE)/$(MPFR_HOST_PACKAGE)
-
-BUILD_MPFR_HOST: $(DECROMPRESS_MPFR_HOST) $()
diff --git a/mk/toolchain.mk b/mk/toolchain.mk
index e69de29..714daa3 100644
--- a/mk/toolchain.mk
+++ b/mk/toolchain.mk
@@ -0,0 +1,31 @@
+#########################################################################################
+# 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 toolchain.mk
+# \brief toolchain.mk of Embtoolkit
+# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
+# \date May 2009
+#########################################################################################
+
+
+
+#GMP on host
+include $(EMBTK_ROOT)/mk/gmphost.mk
+
+#MPFR
+include $(EMBTK_ROOT)/mk/mpfrhost.mk