zephyr-kernel.inc: use own Makefile

Zephyr RTOS uses the environmental variable ZEPHYR_GCC_VARIANT to
determine which Makefile to use to build images. This allows different
Makefiles for different toolchains, so the toolchains can co-exist.
Rather than patching the included Makefile.toolchain.zephyr, we use
our own file Makefile.toolchain.yocto. This Makefile will be used as
long as Zephyr recipes set:

export ZEPHYR_GCC_VARIANT="yocto"

(Also removed some BOARD definitions)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
This commit is contained in:
Juro Bystricky
2016-12-28 11:56:45 -08:00
parent f7e9b19e1d
commit d1627ac39b
3 changed files with 12 additions and 29 deletions

View File

@@ -1,26 +0,0 @@
If CROSS_COMPILE is set, that means the user is trying to specify the
compiler manually. So don't error out when YOCTO_SDK_INSTALL_DIR isn't
set but CROSS_COMPILE is set.
Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
---
diff --git a/scripts/Makefile.toolchain.zephyr b/scripts/Makefile.toolchain.zephyr
index b964abf..69093f3 100644
--- a/scripts/Makefile.toolchain.zephyr
+++ b/scripts/Makefile.toolchain.zephyr
@@ -12,6 +12,7 @@
#
#######################################################################
+ifndef CROSS_COMPILE
REQUIRED_SDK_VER=0.8.2
ifndef ZEPHYR_SDK_INSTALL_DIR
@@ -25,6 +26,7 @@ ifeq ($(SDK_CHECK),1)
$(error (The SDK version you are using is old, please update your SDK. You need at least SDK version $(REQUIRED_SDK_VER)))
endif
endif
+endif
ifeq ($(HOST_OS),MINGW)
TOOLCHAIN_HOME = ${ZEPHYR_SDK_INSTALL_DIR}/sysroots/i686-pokysdk-mingw32

View File

@@ -0,0 +1,8 @@
LIBGCC_DIR = $(shell dirname `$(CC)gcc -print-libgcc-file-name`)
LIB_INCLUDE_DIR += -L $(LIBGCC_DIR)
#TOOLCHAIN_CFLAGS = -I $(SYSROOT)/usr/include
TOOLCHAIN_LIBS = gcc
export LIB_INCLUDE_DIR CROSS_COMPILE TOOLCHAIN_LIBS
#export TOOLCHAIN_CFLAGS

View File

@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
# tag v1.6.0
SRCREV="d4e799d77a36eaf6d678b357c207411ec32b2d62"
SRC_URI = "git://gerrit.zephyrproject.org/r/zephyr.git;protocol=https;branch=v1.6.0-branch"
SRC_URI += "file://0001-Makefile.toolchain.yocto-Don-t-error-out-if-CROSS_CO.patch"
SRC_URI += "file://Makefile.toolchain.yocto"
PV = "1.6.0"
@@ -14,5 +14,6 @@ S = "${WORKDIR}/git"
# filesystem.
IMAGE_NO_MANIFEST = "1"
BOARD_arm ?= "qemu_cortex_m3"
BOARD_x86 ?= "qemu_x86"
do_compile_prepend() {
cp ${WORKDIR}/Makefile.toolchain.yocto ${S}/scripts
}