summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--target/Makefile20
-rw-r--r--target/config/Config.in3
-rw-r--r--target/config/Config.in.adk7
-rw-r--r--toolchain/binutils/Makefile2
-rw-r--r--toolchain/gcc/Makefile7
5 files changed, 30 insertions, 9 deletions
diff --git a/target/Makefile b/target/Makefile
index 470e9e4e9..9222cd3bc 100644
--- a/target/Makefile
+++ b/target/Makefile
@@ -6,6 +6,12 @@ include $(TOPDIR)/mk/rootfs.mk
all: install
+ifeq (${ADK_64BIT_KERNEL},y)
+KERNEL_CFG:=kernel64.config
+else
+KERNEL_CFG:=kernel.config
+endif
+
### Kernel .config Creation
# The following target combines all kernel-related variables and
# config files into a single one to be used as the final kernel
@@ -48,15 +54,15 @@ config-prepare: $(TOPDIR)/.config
>${BUILD_DIR}/.kernelconfig.nokernel
ifeq ($(ADK_NATIVE),y)
@if [ -f /etc/adktarget ];then \
- cp $(TOPDIR)/target/$(ARCH)/kernel.config ${BUILD_DIR}/.kernelconfig.board; \
+ cp $(TOPDIR)/target/$(ARCH)/${KERNEL_CFG} ${BUILD_DIR}/.kernelconfig.board; \
else \
if [ -f /proc/config.gz ];then zcat /proc/config.gz > ${BUILD_DIR}/.kernelconfig.board; else cp ${ADK_TARGET}/kernel.config.$(ARCH) ${BUILD_DIR}/.kernelconfig.board; fi; \
fi
else
- if [ -f ${ADK_TARGET_ARCH}/kernel.config.$(ADK_TARGET_SYSTEM) ];then \
- cp ${ADK_TARGET_ARCH}/kernel.config.$(ADK_TARGET_SYSTEM) ${BUILD_DIR}/.kernelconfig.board; \
+ if [ -f ${ADK_TARGET_ARCH}/${KERNEL_CFG}.$(ADK_TARGET_SYSTEM) ];then \
+ cp ${ADK_TARGET_ARCH}/${KERNEL_CFG}.$(ADK_TARGET_SYSTEM) ${BUILD_DIR}/.kernelconfig.board; \
else \
- cp ${ADK_TARGET_ARCH}/kernel.config ${BUILD_DIR}/.kernelconfig.board; \
+ cp ${ADK_TARGET_ARCH}/${KERNEL_CFG} ${BUILD_DIR}/.kernelconfig.board; \
fi
endif
@(cat ${BUILD_DIR}/.kernelconfig.{modules,kernel} | \
@@ -89,10 +95,10 @@ endif
@-rm -f ${BUILD_DIR}/.kernelconfig.tmp
else
config-prepare: $(TOPDIR)/.config
- if [ -f ${ADK_TARGET_ARCH}/kernel.config.$(ADK_TARGET_SYSTEM) ];then \
- cp ${ADK_TARGET_ARCH}/kernel.config.$(ADK_TARGET_SYSTEM) ${BUILD_DIR}/.kernelconfig.board; \
+ if [ -f ${ADK_TARGET_ARCH}/${KERNEL_CFG}.$(ADK_TARGET_SYSTEM) ];then \
+ cp ${ADK_TARGET_ARCH}/${KERNEL_CFG}.$(ADK_TARGET_SYSTEM) ${BUILD_DIR}/.kernelconfig.board; \
else \
- cp ${ADK_TARGET_ARCH}/kernel.config ${BUILD_DIR}/.kernelconfig.board; \
+ cp ${ADK_TARGET_ARCH}/${KERNEL_CFG} ${BUILD_DIR}/.kernelconfig.board; \
fi
endif
diff --git a/target/config/Config.in b/target/config/Config.in
index a9f994772..b31113ec5 100644
--- a/target/config/Config.in
+++ b/target/config/Config.in
@@ -204,6 +204,9 @@ config ADK_TARGET_WITH_DSL
config ADK_TARGET_WITH_USB_BOOT
boolean
+config ADK_TARGET_KERNEL_MAY_64BIT
+ boolean
+
# global symbols
config ADK_TOOLCHAIN_ONLY
boolean
diff --git a/target/config/Config.in.adk b/target/config/Config.in.adk
index 6c7176bf8..ea139b7ec 100644
--- a/target/config/Config.in.adk
+++ b/target/config/Config.in.adk
@@ -110,4 +110,11 @@ config ADK_HOST_CYGWIN
boolean
endchoice
+
+config ADK_64BIT_KERNEL
+ prompt "Build a 64bit Kernel"
+ boolean
+ default n
+ depends on ADK_TARGET_KERNEL_MAY_64BIT
+
endmenu
diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile
index ba67263ef..36e5b51d6 100644
--- a/toolchain/binutils/Makefile
+++ b/toolchain/binutils/Makefile
@@ -12,7 +12,7 @@ else
CONFOPTS+= --disable-libssp
endif
-ifeq ($(ADK_LINUX_64),y)
+ifneq ($(strip $(ADK_LINUX_64)$(ADK_64BIT_KERNEL)),)
CONFOPTS+= --enable-64-bit-bfd
endif
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index b2e8842d9..67a2b1b76 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -20,7 +20,6 @@ GCC_CONFOPTS= --prefix=$(STAGING_HOST_DIR) \
--disable-multilib \
--disable-libmudflap \
--disable-libgomp \
- --disable-biarch \
--disable-decimal-float \
--disable-libstdcxx-pch \
--disable-ppl-version-check \
@@ -35,6 +34,12 @@ else
GCC_CONFOPTS+= --disable-sjlj-exceptions
endif
+ifeq ($(ADK_64BIT_KERNEL),y)
+GCC_CONFOPTS+= --enable-targets=all
+else
+GCC_CONFOPTS+= --disable-biarch
+endif
+
ifeq ($(ADK_TOOLCHAIN_GCC_SSP),y)
GCC_CONFOPTS+= --enable-libssp
else