zephyr-core/classes: Remove West-based logic from zephyr.bbclass

For a given release tag, ZEPHYR_MODULES is constant. It is therefore now
populated by the generate-version.py script, the output of which is
stored in the repository, so the build-time logic to populate
ZEPHYR_MODULES is no longer needed.

Remove the do_get_zmods task, but retain the Python dependencies which
are still required by Python scripts in the Zephyr repository that are
trigerred by CMake.

The above means that West is now only required as a host dependency to
run generate-version.py, so remove the West Yocto recipe.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Tested-by: Jon Mason <jon.mason@arm.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
This commit is contained in:
Peter Hoyes
2022-09-16 10:03:17 +01:00
committed by Naveen Saini
parent 0d2830b7cd
commit 93e94e57ec
2 changed files with 1 additions and 53 deletions

View File

@@ -2,6 +2,7 @@ inherit terminal
inherit python3native
PYTHONPATH="${STAGING_DIR_HOST}${libdir}/${PYTHON_DIR}/site-packages"
DEPENDS += "python3-pyelftools-native python3-pyyaml-native python3-pykwalify-native"
OE_TERMINAL_EXPORTS += "HOST_EXTRACFLAGS HOSTLDFLAGS TERMINFO CROSS_CURSES_LIB CROSS_CURSES_INC"
HOST_EXTRACFLAGS = "${BUILD_CFLAGS} ${BUILD_LDFLAGS}"
@@ -24,39 +25,8 @@ python () {
d.setVar('BOARD',board)
}
do_get_zmods() {
export PYTHONPATH="${RECIPE_SYSROOT_NATIVE}/${libdir}/${PYTHON_DIR}/site-packages:${RECIPE_SYSROOT_NATIVE}/${libdir}/${PYTHON_DIR}"
cd ${S}
# I really dislike how tied in this is to west, but without reimplementing their script, this seems to be the
# easiest way to do this
rm -rf .west; mkdir .west
cat << EOF >> ${S}/.west/config
[manifest]
path = zephyr
file = west.yml
EOF
# Get all available modules and add them to ZEPHYR_MODULES
for i in $(west list|awk 'NR>1 {print $2}'); do
ZEPHYR_MODULES="${S}/$i\;${ZEPHYR_MODULES}"
done
export ZEPHYR_MODULES
}
do_get_zmods[nostamp] = "1"
do_get_zmods[dirs] = "${B}"
EXTRA_OECMAKE:append = " -DZEPHYR_MODULES=${ZEPHYR_MODULES}"
addtask get_zmods after do_patch before do_configure
do_get_zmods[depends] += "west-native:do_populate_sysroot"
do_get_zmods[depends] += "python3-pyyaml-native:do_populate_sysroot"
do_get_zmods[depends] += "python3-pykwalify-native:do_populate_sysroot"
do_get_zmods[depends] += "python3-colorama-native:do_populate_sysroot"
do_get_zmods[depends] += "python3-pyelftools-native:do_populate_sysroot"
python do_menuconfig() {
os.chdir(d.getVar('ZEPHYR_SRC_DIR', True))
configdir = d.getVar('ZEPHYR_SRC_DIR', True) + '/outdir/' + d.getVar('BOARD', True)

View File

@@ -1,22 +0,0 @@
# SPDX-FileCopyrightText: Huawei Inc.
# SPDX-License-Identifier: Apache-2.0
SUMMARY = "Zephyr RTOS Project meta-tool"
HOMEPAGE = "https://github.com/zephyrproject-rtos/west"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "git://github.com/zephyrproject-rtos/west;protocol=https;branch=main"
PV = "0.12.99"
SRCREV = "38e656b05ea8f4c8d80b953f6d88b1ed604d11f8"
PROVIDES = "virtual/west"
S = "${WORKDIR}/git"
inherit setuptools3 python3native
DEPENDS_${PN} += "python3-pyyaml python3-core python3-packaging python3-colorama python3-pyparsing"
RDEPENDS_${PN} += "python3-pyyaml python3-core python3-packaging python3-colorama python3-pyparsing"
BBCLASSEXTEND = "native nativesdk"
TOOLCHAIN_HOST_TASK:append = " nativesdk-west"