zephyr-kernel: add Zephyr RTOS version 2.3.0 support

Signed-off-by: Mah, Yock Gen <yock.gen.mah@intel.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
This commit is contained in:
Mah, Yock Gen
2020-09-22 15:27:57 +08:00
committed by Naveen Saini
parent 4dd1f5b782
commit 6bfb2769b4
6 changed files with 39 additions and 42 deletions

View File

@@ -1,13 +1,19 @@
#Set relevant variables based on Zephyr kernel version
PREFERRED_VERSION_zephyr-kernel ??= "2.2.0"
PREFERRED_VERSION_zephyr-kernel ??= "2.3.0"
SRCREV = "d39cb42d0920d5658fad358ad5b91de75d747a20"
SRCREV_FORMAT = "default_cmsis"
SRCREV_default = "b8c78e254ff875680e99c9f131fbe285c4575927"
SRCREV_cmsis = "542b2296e6d515b265e25c6b7208e8fea3014f90"
SRC_URI = "git://github.com/zephyrproject-rtos/zephyr.git;protocol=https;branch=v2.2-branch \
SRC_URI = "git://github.com/zephyrproject-rtos/zephyr.git;protocol=https;branch=v2.3-branch;name=default \
git://github.com/zephyrproject-rtos/cmsis.git;protocol=https;destsuffix=git/modules/cmsis;name=cmsis \
file://0001-cmake-add-yocto-toolchain.patch \
"
PV = "2.2.0"
PV = "2.3.0+git${SRCPV}"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
@@ -15,7 +21,7 @@ ZEPHYR_TEST_SRCDIR = "tests/legacy/kernel/"
python () {
src_pn = d.getVar('PREFERRED_VERSION_zephyr-kernel', True)
if src_pn == '2.2.0':
if src_pn == '2.3.0':
return
else:
bb.error("Unsupported Zephyr kernel version requested")

View File

@@ -15,13 +15,14 @@ ZEPHYR_MAKE_OUTPUT = "zephyr.elf"
EXTRA_OECMAKE = " -DZEPHYR_BASE=${S} -DZEPHYR_GCC_VARIANT=yocto -DBOARD=${BOARD} -DARCH=${ARCH} -DCROSS_COMPILE=${CROSS_COMPILE} -DZEPHYR_SYSROOT=${ZEPHYR_SYSROOT} -DZEPHYR_TOOLCHAIN_VARIANT=yocto"
EXTRA_OECMAKE_append_arm = " -DZEPHYR_MODULES=${S}/modules/cmsis"
export ZEPHYR_BASE="${S}"
# We always need a toolchain to cross-compile.
INHIBIT_DEFAULT_DEPS = "1"
DEPENDS += "gcc-cross-${TARGET_ARCH} libgcc ${TOOLCHAIN_TARGET_TASK} gperf-native"
DEPENDS += " python3-pyelftools-native python3-pyyaml-native"
DEPENDS += " python3-pyelftools-native python3-pyyaml-native python3-pykwalify-native"
CROSS_COMPILE = "${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}"
DEPENDS_append_qemuall = " qemu-native qemu-helper-native"

View File

@@ -1,33 +0,0 @@
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
# tag v2.2
SRCREV="d39cb42d0920d5658fad358ad5b91de75d747a20"
SRC_URI = "git://github.com/zephyrproject-rtos/zephyr.git;protocol=https;branch=v2.2-branch \
file://0001-cmake-add-yocto-toolchain.patch \
"
inherit cmake
PV = "2.2.0"
S = "${WORKDIR}/git"
IMAGE_NO_MANIFEST = "1"
INHIBIT_DEFAULT_DEPS = "1"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_compile () {
}
do_install () {
kerneldir=${D}/usr/src/zephyr
install -d $kerneldir
cp -r ${S}/* $kerneldir
}
PACKAGES = "${PN}"
FILES_${PN} = "/usr/src/zephyr"
SYSROOT_DIRS += "/usr/src/zephyr"

View File

@@ -0,0 +1,24 @@
inherit zephyr-kernel-src
inherit cmake
S = "${WORKDIR}/git"
IMAGE_NO_MANIFEST = "1"
INHIBIT_DEFAULT_DEPS = "1"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_install () {
kerneldir=${D}/usr/src/zephyr
install -d $kerneldir
cp -r ${S}/* $kerneldir
}
PACKAGES = "${PN}"
FILES_${PN} = "/usr/src/zephyr"
SYSROOT_DIRS += "/usr/src/zephyr"

View File

@@ -1,4 +1,4 @@
ZEPHYRTESTS_remove = "fifo fp_sharing lifo mbox mem_heap mem_pool \
ZEPHYRTESTS_remove = "fifo fpu_sharing lifo mbox mem_heap mem_pool \
mem_protect mem_slab msgq mutex pipe profiling sched semaphore \
stack threads tickless timer workq"
@@ -23,12 +23,11 @@ ZEPHYRTESTS_remove = "gen_isr_table spinlock smp mp"
ZEPHYRTESTS = " \
common \
context \
critical \
device \
early_sleep \
fatal \
fifo \
fp_sharing \
fpu_sharing \
gen_isr_table \
interrupt \
lifo \