Yocto Project Discussions
 help / color / mirror / Atom feed
From: Peter Hoyes <peter.hoyes@arm.com>
To: yocto@lists.yoctoproject.org
Cc: diego.sueiro@arm.com, Peter Hoyes <Peter.Hoyes@arm.com>
Subject: [meta-zephyr][PATCH 4/5] zephyr-sdk: Add recipe to download and build the Zephyr SDK
Date: Tue,  6 Sep 2022 14:17:01 +0100	[thread overview]
Message-ID: <20220906131702.310027-4-peter.hoyes@arm.com> (raw)
In-Reply-To: <20220906131702.310027-1-peter.hoyes@arm.com>

From: Peter Hoyes <Peter.Hoyes@arm.com>

The Zephyr SDK (https://github.com/zephyrproject-rtos/sdk-ng) provides
pre-built toolchains for all of Zephyr's supported architectures.

Add a recipe to download SDK v0.14.2, in preparation for adding an
option to build Zephyr applications using this toolchain instead of the
Yocto-built one.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
---
 .../zephyr-sdk/zephyr-sdk_0.14.2.bb           | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 meta-zephyr-core/recipes-devtools/zephyr-sdk/zephyr-sdk_0.14.2.bb

diff --git a/meta-zephyr-core/recipes-devtools/zephyr-sdk/zephyr-sdk_0.14.2.bb b/meta-zephyr-core/recipes-devtools/zephyr-sdk/zephyr-sdk_0.14.2.bb
new file mode 100644
index 0000000..c893652
--- /dev/null
+++ b/meta-zephyr-core/recipes-devtools/zephyr-sdk/zephyr-sdk_0.14.2.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Zephyr SDK Bundle"
+DESCRIPTION = "Official SDK built using crosstool-ng, distributed by the \
+Zephyr project"
+COMPATIBLE_HOST = "(x86_64|aarch64).*-linux"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+INHIBIT_DEFAULT_DEPS = "1"
+# CMake is required by the setup script
+DEPENDS += "cmake"
+
+SDK_ARCHIVE = "zephyr-sdk-${PV}_linux-${BUILD_ARCH}.tar.gz"
+SDK_NAME = "${BUILD_ARCH}"
+SRC_URI = "https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${PV}/${SDK_ARCHIVE};subdir=${S};name=${SDK_NAME}"
+
+SRC_URI[x86_64.sha256sum] = "2ff0e4d79bffe1468247a3e1958aa9183a0252225ab721cf1c37188bd4b649a2"
+SRC_URI[aarch64.sha256sum] = "cbb616a50e940388ea737788d48dcea3624a85bb3ee04d9aae105496a21ae75e"
+
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+ZEPHYR_SDK_DIR = "${prefix}/zephyr-sdk"
+
+do_install() {
+    install -d ${D}${prefix}
+    cp -r ${S}/zephyr-sdk-${PV} ${D}${ZEPHYR_SDK_DIR}
+
+    # Install host tools
+    ${D}${ZEPHYR_SDK_DIR}/setup.sh -h
+}
+
+SYSROOT_DIRS += "${ZEPHYR_SDK_DIR}"
+INHIBIT_SYSROOT_STRIP = "1"
+BBCLASSEXTEND = "native"
-- 
2.25.1



  parent reply	other threads:[~2022-09-06 13:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-06 13:16 [meta-zephyr][PATCH 1/5] Cleanup README.txt files Peter Hoyes
2022-09-06 13:16 ` [meta-zephyr][PATCH 2/5] CI: Use the matrix to ovleray additional Kas files Peter Hoyes
2022-09-06 13:17 ` [meta-zephyr][PATCH 3/5] zephyr-kernel: Factor out Yocto toolchain specific variables Peter Hoyes
2022-09-06 13:17 ` Peter Hoyes [this message]
2022-09-06 13:17 ` [meta-zephyr][PATCH 5/5] zephyr-kernel: Add 'zephyr' toolchain variant Peter Hoyes
2022-09-07 20:08 ` [meta-zephyr][PATCH 1/5] Cleanup README.txt files Jon Mason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220906131702.310027-4-peter.hoyes@arm.com \
    --to=peter.hoyes@arm.com \
    --cc=diego.sueiro@arm.com \
    --cc=yocto@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox