summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2012-11-19 23:42:28 +0100
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2012-11-19 23:42:28 +0100
commit661d8dd700e560f12eebd577524ff5a874b89fb5 (patch)
tree78457257b79f3b4cc7c907ad0afa1964bef526ba
parentbcd99d9443ce8b3159909ebb8420ec21384dab12 (diff)
parent33ad056c3a1e6be0da7ca1aacf72c7cd46643cf3 (diff)
downloadembtoolkit-661d8dd700e560f12eebd577524ff5a874b89fb5.tar.gz
embtoolkit-661d8dd700e560f12eebd577524ff5a874b89fb5.tar.bz2
embtoolkit-661d8dd700e560f12eebd577524ff5a874b89fb5.tar.xz
Merge branch 'master' into llvm-support
-rw-r--r--kconfig/eglibc.kconfig16
-rw-r--r--mk/eglibc.mk129
-rw-r--r--mk/macros.packages.mk37
-rw-r--r--mk/toolchain.mk2
-rw-r--r--packages/busybox/busybox-kconfigs/busybox.kconfig7
5 files changed, 109 insertions, 82 deletions
diff --git a/kconfig/eglibc.kconfig b/kconfig/eglibc.kconfig
index 3b5f5dd..251b2f9 100644
--- a/kconfig/eglibc.kconfig
+++ b/kconfig/eglibc.kconfig
@@ -91,6 +91,22 @@ config EMBTK_EGLIBC_NEED_PATCH
bool
default y
+config EMBTK_EGLIBC_HEADERS_SVN_REVISION
+ int
+ default EMBTK_EGLIBC_SVN_REVISION
+config EMBTK_EGLIBC_HEADERS_SVN_BRANCH
+ string
+ default EMBTK_EGLIBC_SVN_BRANCH
+config EMBTK_EGLIBC_HEADEERS_VERSION_STRING
+ string
+ default EMBTK_EGLIBC_VERSION_STRING
+config EMBTK_EGLIBC_HEADERS_NEED_PATCH
+ bool
+ default EMBTK_EGLIBC_NEED_PATCH
+config EMBTK_EGLIBC_HEADERS_VERSION_SVN
+ bool
+ default EMBTK_EGLIBC_VERSION_SVN
+
comment "------------------------------------"
comment "----- EGLIBC options configuration"
comment "------------------------------------"
diff --git a/mk/eglibc.mk b/mk/eglibc.mk
index f11d1fc..236941d 100644
--- a/mk/eglibc.mk
+++ b/mk/eglibc.mk
@@ -24,13 +24,16 @@
################################################################################
EGLIBC_NAME := eglibc
-EGLIBC_HEADERS_NAME := eglibc_headers
EGLIBC_VERSION := $(call embtk_get_pkgversion,eglibc)
EGLIBC_SVN_SITE := http://www.eglibc.org/svn
-EGLIBC_BUILD_DIR := $(embtk_toolsb)/eglibc
EGLIBC_SRC_DIR := $(call __embtk_pkg_localsvn,eglibc)
-EGLIBC_HEADERS_BUILD_DIR := $(embtk_toolsb)/eglibc-headers
-EGLIBC_HEADERS_SRC_DIR := $(call __embtk_pkg_localsvn,eglibc)
+EGLIBC_BUILD_DIR := $(embtk_toolsb)/eglibc-build
+
+EGLIBC_HEADERS_NAME := eglibc_headers
+EGLIBC_HEADERS_VERSION := $(EGLIBC_VERSION)
+EGLIBC_HEADERS_SVN_SITE := $(EGLIBC_SVN_SITE)
+EGLIBC_HEADERS_SRC_DIR := $(EGLIBC_SRC_DIR)
+EGLIBC_HEADERS_BUILD_DIR := $(embtk_toolsb)/eglibc-headers-build
EGLIBC_HEADERS_KCONFIGS_NAME := EGLIBC
embtk_eglibc_cflags := $(TARGET_CFLAGS) $(EMBTK_TARGET_MCPU)
@@ -52,12 +55,38 @@ eglibc_headers_optgroups_f := $(EGLIBC_HEADERS_BUILD_DIR)/option-groups.config
#
# eglibc headers install
#
+
+define embtk_configure_eglibc_headers
+ cd $(EGLIBC_HEADERS_BUILD_DIR); \
+ BUILD_CC=$(HOSTCC_CACHED) \
+ CFLAGS="$(embtk_eglibc_cflags)" \
+ CC=$(TARGETCC) \
+ CXX=$(TARGETCXX) \
+ AR=$(TARGETAR) \
+ RANLIB=$(TARGETRANLIB) \
+ $(CONFIG_SHELL) $(EGLIBC_SRC_DIR)/libc/configure \
+ --prefix=/usr --with-headers=$(embtk_sysroot)/usr/include \
+ --host=$(STRICT_GNU_TARGET) --build=$(HOST_BUILD) \
+ $(embtk_eglibc_floattype) --disable-profile --without-gd --without-cvs \
+ --enable-add-ons --enable-kernel="2.6.27" $(embtk_eglibc_versioning-y) \
+ --with-bugurl=$(EMBTK_BUGURL)
+ touch touch $(call __embtk_pkg_dotconfigured_f,eglibc_headers)
+endef
+
define __embtk_install_eglibc_headers
$(call embtk_pinfo,"Installing eglibc headers...")
- $(embtk_download_eglibc)
+ $(call embtk_download_pkg,eglibc)
$(embtk_parse_eglibc_optgroups)
$(embtk_configure_eglibc_headers)
- $(embtk_install_eglibc_headers)
+ $(MAKE) -C $(EGLIBC_HEADERS_BUILD_DIR) install-headers \
+ install_root=$(embtk_sysroot) install-bootstrap-headers=yes && \
+ $(MAKE) -C $(EGLIBC_HEADERS_BUILD_DIR) csu/subdir_lib
+ cp $(EGLIBC_HEADERS_BUILD_DIR)/csu/crt1.o $(embtk_sysroot)/usr/$(LIBDIR)/
+ cp $(EGLIBC_HEADERS_BUILD_DIR)/csu/crti.o $(embtk_sysroot)/usr/$(LIBDIR)/
+ cp $(EGLIBC_HEADERS_BUILD_DIR)/csu/crtn.o $(embtk_sysroot)/usr/$(LIBDIR)/
+ $(TARGETCC) -nostdlib -nostartfiles -shared -x c /dev/null \
+ -o $(embtk_sysroot)/usr/lib/libc.so
+ touch $(call __embtk_pkg_dotinstalled_f,eglibc_headers)
endef
define embtk_install_eglibc_headers
@@ -68,43 +97,6 @@ endef
#
# eglibc install
#
-define __embtk_install_eglibc
- $(call embtk_pinfo,"Installing eglibc...")
- $(embtk_download_eglibc)
- $(embtk_parse_eglibc_optgroups)
- $(embtk_configure_eglibc)
- $(embtk_install_eglibc)
-endef
-define embtk_install_eglibc
- $(if $(call __embtk_pkg_installed-y,eglibc),true, \
- $(__embtk_install_eglibc))
-endef
-
-#
-# clean targets
-#
-define embtk_cleanup_eglibc
- rm -rf $(EGLIBC_BUILD_DIR)
-endef
-
-define embtk_cleanup_eglibc_headers
- rm -rf $(EGLIBC_HEADERS_BUILD_DIR)
-endef
-
-#
-# download and macros
-#
-define embtk_download_eglibc
- $(call embtk_download_pkg,eglibc)
- $(call __embtk_download_pkg_patches,eglibc)
- $(call __embtk_applypatch_pkg,eglibc)
- cd $(EGLIBC_SRC_DIR); touch `find . -name configure`
- [ -e $(EGLIBC_SRC_DIR)/libc/ports ] || \
- ln -sf $(EGLIBC_SRC_DIR)/ports $(EGLIBC_SRC_DIR)/libc/ports
-endef
-
-download_eglibc download_eglibc_headers:
- $(embtk_download_eglibc)
define embtk_configure_eglibc
cd $(EGLIBC_BUILD_DIR); \
@@ -122,44 +114,37 @@ define embtk_configure_eglibc
--with-bugurl=$(EMBTK_BUGURL) \
--with-pkgversion="EGLIBC from embtoolkit-$(EMBTK_VERSION)"
touch $(EGLIBC_BUILD_DIR)/.eglibc.embtk.conifgured
+ touch $(call __embtk_pkg_dotconfigured_f,eglibc)
endef
-define embtk_configure_eglibc_headers
- cd $(EGLIBC_HEADERS_BUILD_DIR); \
- BUILD_CC=$(HOSTCC_CACHED) \
- CFLAGS="$(embtk_eglibc_cflags)" \
- CC=$(TARGETCC) \
- CXX=$(TARGETCXX) \
- AR=$(TARGETAR) \
- RANLIB=$(TARGETRANLIB) \
- $(CONFIG_SHELL) $(EGLIBC_SRC_DIR)/libc/configure \
- --prefix=/usr --with-headers=$(embtk_sysroot)/usr/include \
- --host=$(STRICT_GNU_TARGET) --build=$(HOST_BUILD) \
- $(embtk_eglibc_floattype) --disable-profile --without-gd --without-cvs \
- --enable-add-ons --enable-kernel="2.6.27" $(embtk_eglibc_versioning-y) \
- --with-bugurl=$(EMBTK_BUGURL)
- touch $(EGLIBC_HEADERS_BUILD_DIR)/.eglibc_headers.embtk.configured
+define __embtk_install_eglibc
+ $(call embtk_pinfo,"Installing eglibc...")
+ $(embtk_configure_eglibc)
+ PATH=$(PATH):$(embtk_tools)/bin/ $(MAKE) -C $(EGLIBC_BUILD_DIR) $(J)
+ PATH=$(PATH):$(embtk_tools)/bin/ $(MAKE) -C $(EGLIBC_BUILD_DIR) \
+ install_root=$(embtk_sysroot) install
+ touch $(call __embtk_pkg_dotinstalled_f,eglibc)
endef
define embtk_install_eglibc
- PATH=$(PATH):$(embtk_tools)/bin/ $(MAKE) -C $(EGLIBC_BUILD_DIR) $(J)
- PATH=$(PATH):$(embtk_tools)/bin/ $(MAKE) -C $(EGLIBC_BUILD_DIR) install \
- install_root=$(embtk_sysroot)
- touch $(EGLIBC_BUILD_DIR)/.eglibc.embtk.installed
+ $(if $(call __embtk_pkg_installed-y,eglibc),true, \
+ $(__embtk_install_eglibc))
endef
-define embtk_install_eglibc_headers
- $(MAKE) -C $(EGLIBC_HEADERS_BUILD_DIR) install-headers \
- install_root=$(embtk_sysroot) install-bootstrap-headers=yes && \
- $(MAKE) -C $(EGLIBC_HEADERS_BUILD_DIR) csu/subdir_lib
- cp $(EGLIBC_HEADERS_BUILD_DIR)/csu/crt1.o $(embtk_sysroot)/usr/lib/
- cp $(EGLIBC_HEADERS_BUILD_DIR)/csu/crti.o $(embtk_sysroot)/usr/lib/
- cp $(EGLIBC_HEADERS_BUILD_DIR)/csu/crtn.o $(embtk_sysroot)/usr/lib/
- $(TARGETCC) -nostdlib -nostartfiles -shared -x c /dev/null \
- -o $(embtk_sysroot)/usr/lib/libc.so
- touch $(EGLIBC_HEADERS_BUILD_DIR)/.eglibc_headers.embtk.installed
+#
+# clean targets
+#
+define embtk_cleanup_eglibc
+ rm -rf $(EGLIBC_BUILD_DIR)
endef
+define embtk_cleanup_eglibc_headers
+ rm -rf $(EGLIBC_HEADERS_BUILD_DIR)
+endef
+
+#
+# options groups parsing
+#
__embtk_get_eglibc_optgroups = grep "CONFIG_KEMBTK_EGLIBC_" $(EMBTK_DOTCONFIG) \
| sed -e 's/CONFIG_KEMBTK_EGLIBC_*//g' | sed -e 's/"//g'
define embtk_parse_eglibc_optgroups
diff --git a/mk/macros.packages.mk b/mk/macros.packages.mk
index bf9c8fa..b5f44f1 100644
--- a/mk/macros.packages.mk
+++ b/mk/macros.packages.mk
@@ -146,7 +146,9 @@ __embtk_pkg_gitrev = $(or $(call __embtk_mk_uquote,$(CONFIG_EMBTK_$(PKGV)_GIT_R
__embtk_pkg_localgit = $(strip $(if $(__embtk_pkg_usegit), \
$(EMBTK_ROOT)/src/$(__embtk_pkg_refspec)/$(__embtk_pkg_name).git))
-__embtk_pkg_version = $(or $(__embtk_pkg_usegit),$(__embtk_pkg_usesvn),$(strip $($(PKGV)_VERSION)))
+# FIXME: __embtk_pkg_versionsvn: hack for eglibc, should work just as git
+__embtk_pkg_versionsvn = $(if $(__embtk_pkg_usesvn),$(or $(CONFIG_EMBTK_$(PKGV)_VERSION_STRING),$(__embtk_pkg_usesvn)))
+__embtk_pkg_version = $(or $(__embtk_pkg_usegit),$(__embtk_pkg_versionsvn),$(strip $($(PKGV)_VERSION)))
__embtk_pkg_package_f = $(strip $(embtk_dldir))/$(__embtk_pkg_package)
__embtk_pkg_srcdir = $(or $(__embtk_pkg_localgit),$(__embtk_pkg_localsvn),$(patsubst %/,%,$(strip $($(PKGV)_SRC_DIR))))
@@ -435,6 +437,22 @@ endef
#
define __embtk_install_paramsfailure
$(call embtk_perror,"!Not all needed variables defined for $(1)!")
+ $(call embtk_echo_red,"Summary of variables and their current values")
+ $(call embtk_echo_red,"$(PKGV)_NAME (needed) = $(or $(__embtk_pkg_name),not set)")
+ $(call embtk_echo_red,"$(PKGV)_SITE (needed if tarball) = $(or $(__embtk_pkg_site),not set)")
+ $(call embtk_echo_red,"$(PKGV)_VERSION (needed if tarball) = $(or $(__embtk_pkg_version),not set)")
+ $(call embtk_echo_red,"$(PKGV)_PACKAGE (needed if tarball) = $(or $(__embtk_pkg_package),not set)")
+ $(call embtk_echo_red,"$(PKGV)_GIT_SITE (needed if git) = $(or $(__embtk_pkg_gitsite),not set)")
+ $(call embtk_echo_red,"CONFIG_EMBTK_$(PKGV)_VERSION_GIT (needed if git) = $(or $(__embtk_pkg_usegit),not set)")
+ $(call embtk_echo_red,"CONFIG_EMBTK_$(PKGV)_GIT_REVISION (needed if git) = $(or $(__embtk_pkg_gitrev),not set)")
+ $(call embtk_echo_red,"CONFIG_EMBTK_$(PKGV)_GIT_BRANCH (needed if git) = $(or $(__embtk_pkg_gitbranch),not set)")
+ $(call embtk_echo_red,"$(PKGV)_SVN_SITE (needed if svn) = $(or $(__embtk_pkg_svnsite),not set)")
+ $(call embtk_echo_red,"CONFIG_EMBTK_$(PKGV)_VERSION_SVN (needed if svn) = $(or $(__embtk_pkg_usesvn),not set)")
+ $(call embtk_echo_red,"CONFIG_EMBTK_$(PKGV)_SVN_REVISION (needed if svn) = $(or $(__embtk_pkg_svnrev),not set)")
+ $(call embtk_echo_red,"CONFIG_EMBTK_$(PKGV)_SVN_BRANCH (needed if svn) = $(or $(__embtk_pkg_svnbranch),not set)")
+ $(call embtk_echo_red,"$(PKGV)_SRC_DIR (needed if tarball) = $(or $(__embtk_pkg_srcdir),not set)")
+ $(call embtk_echo_red,"$(PKGV)_BUILD_DIR (optional) = $(or $(__embtk_pkg_builddir),not set)")
+
exit 1
endef
@@ -541,13 +559,12 @@ __embtk_pkg_depof = $(strip $(foreach p,$(__embtk_pkgs_all-y) toolchain toolchai
__embtk_pkg_needpatch_yesno = $(if $(__embtk_pkg_needpatch),Yes,No)
define __embtk_download_pkg_patches
-if [ "x$(__embtk_pkg_needpatch)" = "xy" ]; then \
+ $(if $(__embtk_pkg_needpatch), \
test -e $(__embtk_pkg_patch_f) || \
$(call embtk_wget, \
$(__embtk_pkg_name)-$(__embtk_pkg_version).patch, \
$(__embtk_pkg_patch_site), \
- $(__embtk_pkg_name)-$(__embtk_pkg_version)-*.patch); \
-fi
+ $(__embtk_pkg_name)-$(__embtk_pkg_version)-*.patch))
endef
define __embtk_download_pkg_exitfailure
@@ -555,6 +572,10 @@ define __embtk_download_pkg_exitfailure
exit 1)
endef
+define __embtk_svncheckout_pkg
+ svn co $(__embtk_pkg_svnsite)/$(__embtk_pkg_svnbranch) \
+ -r$(__embtk_pkg_svnrev) $(__embtk_pkg_localsvn)
+endef
define __embtk_download_pkg_from_svn
$(call embtk_echo_blue,"$(__embtk_pkg_name) using SVN")
$(call embtk_echo_blue,"\tBranch : $(notdir $(__embtk_pkg_svnbranch))")
@@ -564,8 +585,12 @@ define __embtk_download_pkg_from_svn
$(call embtk_echo_blue,"\tPatched : $(__embtk_pkg_needpatch_yesno)")
$(call embtk_echo_blue,"\tDependency of : $(or $(__embtk_pkg_depof),N/A)")
test -e $(__embtk_pkg_localsvn) || \
- svn co $(__embtk_pkg_svnsite)/$(__embtk_pkg_svnbranch) \
- -r$(__embtk_pkg_svnrev) $(__embtk_pkg_localsvn)
+ $(call __embtk_svncheckout_pkg,$(1)) || \
+ $(call __embtk_download_pkg_exitfailure,$(__embtk_pkg_package_f))
+ $(call __embtk_download_pkg_patches,$(1)) || \
+ $(call __embtk_download_pkg_exitfailure,$(__embtk_pkg_patch_f))
+ $(call __embtk_applypatch_pkg,$(1))
+
endef
define __embtk_gitclone_pkg
diff --git a/mk/toolchain.mk b/mk/toolchain.mk
index 3a3b285..0e8bacb 100644
--- a/mk/toolchain.mk
+++ b/mk/toolchain.mk
@@ -143,7 +143,7 @@ endef
define __embtk_toolchain_compress
tar -cjf $(TOOLCHAIN_PACKAGE) \
- $(notdir $(embtk_sysroot)) $(notdir $(embtk_tools)) && \
+ $(notdir $(embtk_sysroot)) $(notdir $(embtk_tools)) && \
mv $(TOOLCHAIN_PACKAGE) $(TOOLCHAIN_DIR)/$(TOOLCHAIN_PACKAGE)
endef
diff --git a/packages/busybox/busybox-kconfigs/busybox.kconfig b/packages/busybox/busybox-kconfigs/busybox.kconfig
index b3df6d4..0494c42 100644
--- a/packages/busybox/busybox-kconfigs/busybox.kconfig
+++ b/packages/busybox/busybox-kconfigs/busybox.kconfig
@@ -471,7 +471,8 @@ config KEMBTK_BUSYB_PIE
Most people will leave this set to 'N'.
config KEMBTK_BUSYB_NOMMU
- bool "Force KEMBTK_BUSYB_NOMMU build"
+ bool
+ default n
help
Busybox tries to detect whether architecture it is being
built against supports MMU or not. If this detection fails,
@@ -569,7 +570,7 @@ config KEMBTK_BUSYB_LFS
than 2 Gigabytes, enable this option. Otherwise, leave it set to 'N'.
config KEMBTK_BUSYB_CROSS_COMPILER_PREFIX
- string "Cross Compiler prefix"
+ string
default ""
help
If you want to build BusyBox with a cross compiler, then you
@@ -749,7 +750,7 @@ config KEMBTK_BUSYB_INSTALL_SH_APPLET_SCRIPT_WRAPPER
endchoice
config KEMBTK_BUSYB_PREFIX
- string "BusyBox installation prefix"
+ string
default "./_install"
help
Define your directory to install BusyBox files/subdirs in.