From patchwork Wed Dec 24 06:46:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lee, Chee Yang" X-Patchwork-Id: 77379 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95B68E7491C for ; Wed, 24 Dec 2025 06:47:09 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.115949.1766558823446130229 for ; Tue, 23 Dec 2025 22:47:03 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.com header.s=Intel header.b=HoW/YRbo; spf=pass (domain: intel.com, ip: 198.175.65.13, mailfrom: chee.yang.lee@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1766558823; x=1798094823; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=UX3LCLSe8Yq/4yPkP2pfLXexeeUqzywEGbTwF2ENMcI=; b=HoW/YRboJaulK4UQBP+PncllNQ2PkbxPW+tuoZEpFyz42mrb+2rBBr3i ouvY0erM2vnvGs8dINYFuuceQMTgaS9BPgj4UWvOYPIYDtqLlZMxn/9o/ i910m0lSIDwFBNh0ohsp7thZ8LlKWcO14m6YqlLnR8oG572aZ/nCzejdU OPukfQ3hQHpMLtf0ShqfA4DpuIphbXPC0ztavqzehJ2Fl4EB4/n1NWzjk Z+tg4sO6Am9iYkzPTBMT29D4Dce6cgUG3/5J5B4qfySK6u8T+X8foEhdg 7nmVFU1NS/FvntZ56Ea6G+r9YxsZJ4MG8rf/eRHk/ngc/98HZ/X2Q0j4x Q==; X-CSE-ConnectionGUID: X16pUMKMR8CqMORIDRYJlA== X-CSE-MsgGUID: yb7EOCWLQKiMlj7jyFEKyA== X-IronPort-AV: E=McAfee;i="6800,10657,11651"; a="79518829" X-IronPort-AV: E=Sophos;i="6.21,173,1763452800"; d="scan'208";a="79518829" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Dec 2025 22:47:02 -0800 X-CSE-ConnectionGUID: VeGQPYQURvuAgjG19iZaTg== X-CSE-MsgGUID: MWAqMWMQTuSsuej5Br7qXQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,173,1763452800"; d="scan'208";a="230614379" Received: from cheeyang-desk4.png.intel.com ([10.107.249.123]) by orviesa002.jf.intel.com with ESMTP; 23 Dec 2025 22:47:01 -0800 From: chee.yang.lee@intel.com To: yocto-patches@lists.yoctoproject.org Subject: [meta-zephyr][PATCH 1/4] libgloss: update bbappend to match 4.5.0 Date: Wed, 24 Dec 2025 14:46:32 +0800 Message-ID: <20251224064635.1187089-1-chee.yang.lee@intel.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 24 Dec 2025 06:47:09 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/2867 From: Lee Chee Yang the patch no longer applies, remove it and append the build flags to CFLAGS Signed-off-by: Lee Chee Yang --- ...loss-i386-Disable-warnings-as-errors.patch | 41 ------------------- .../recipes-core/newlib/libgloss_git.bbappend | 4 +- 2 files changed, 2 insertions(+), 43 deletions(-) delete mode 100644 meta-zephyr-core/recipes-core/newlib/files/0001-libgloss-i386-Disable-warnings-as-errors.patch diff --git a/meta-zephyr-core/recipes-core/newlib/files/0001-libgloss-i386-Disable-warnings-as-errors.patch b/meta-zephyr-core/recipes-core/newlib/files/0001-libgloss-i386-Disable-warnings-as-errors.patch deleted file mode 100644 index c512dde..0000000 --- a/meta-zephyr-core/recipes-core/newlib/files/0001-libgloss-i386-Disable-warnings-as-errors.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 5dd8c118c904f5dd956ac754a10faddd35d22df2 Mon Sep 17 00:00:00 2001 -From: Naveen Saini -Date: Thu, 26 Sep 2024 16:43:43 +0800 -Subject: [PATCH] libgloss/i386: Disable warnings as errors - -i586-yocto-elf/libgloss/4.4.0+git/git/libgloss/i386/cygmon-gmon.c:109:21: warning: implicit declaration of function 'sbrk' [-Wimplicit-function-declaration] - 109 | buffer = (char *) sbrk (monsize); - | ^~~~ -i586-yocto-elf/libgloss/4.4.0+git/git/libgloss/i386/cygmon-gmon.c:112:7: warning: implicit declaration of function 'write'; did you mean 'fwrite'? [-Wimplicit-function-declaration] - 112 | write (2, MSG , sizeof(MSG)); - | ^~~~~ - | fwrite -i586-yocto-elf/libgloss/4.4.0+git/git/libgloss/i386/cygmon-gmon.c:113:7: warning: 'return' with no value, in function returning non-void [-Wreturn-mismatch] - 113 | return; - | ^~~~~~ -i586-yocto-elf/libgloss/4.4.0+git/git/libgloss/i386/cygmon-gmon.c:198:1: warning: return type defaults to 'int' [-Wimplicit-int] - 198 | _mcount() - -Upstream-Status: Inappropriate [OE-Specific] - -Signed-off-by: Naveen Saini ---- - libgloss/i386/Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libgloss/i386/Makefile.in b/libgloss/i386/Makefile.in -index 7ed0b075f..729f33d90 100644 ---- a/libgloss/i386/Makefile.in -+++ b/libgloss/i386/Makefile.in -@@ -69,7 +69,7 @@ OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \ - CRT0 = cygmon-crt0.o - CYGMON_OBJS = cygmon-salib.o cygmon-gmon.o - --CFLAGS = -g -+CFLAGS = @CFLAGS@ -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=return-mismatch - - GCC_LDFLAGS = `if [ -d ${objroot}/../gcc ] ; \ - then echo -L${objroot}/../gcc ; fi` --- -2.37.3 - diff --git a/meta-zephyr-core/recipes-core/newlib/libgloss_git.bbappend b/meta-zephyr-core/recipes-core/newlib/libgloss_git.bbappend index 756ef35..6488e53 100644 --- a/meta-zephyr-core/recipes-core/newlib/libgloss_git.bbappend +++ b/meta-zephyr-core/recipes-core/newlib/libgloss_git.bbappend @@ -1,2 +1,2 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/files:" -SRC_URI:append:qemu-x86 = " file://0001-libgloss-i386-Disable-warnings-as-errors.patch" +CFLAGS:append:qemu-x86 = " -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=return-mismatch " + From patchwork Wed Dec 24 06:46:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lee, Chee Yang" X-Patchwork-Id: 77376 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 932D6E74ADE for ; Wed, 24 Dec 2025 06:47:09 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.115949.1766558823446130229 for ; Tue, 23 Dec 2025 22:47:03 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.com header.s=Intel header.b=AUg8Kxc0; spf=pass (domain: intel.com, ip: 198.175.65.13, mailfrom: chee.yang.lee@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1766558824; x=1798094824; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=xGmo5U99tC99kVfjG4zczUuHkOL9eRtW9rxt0FqYmww=; b=AUg8Kxc0zqhV00+2GBdu/1gzdCg+SpSAPSrlL66+kiJp43KMaevokTwZ 9F2UXJgjpe2omuAmho8lfmT3obOudyUBiAEt1TVzy7rIetnYid25CqecX e3CHOvTEt3725Zx3dlfubXXoD5dg+GplqXmuoY2+NiZ65L68GtHVBNZMa yrV+QDsYlLvMUeUKPgCvOuS3JDDz1nv3DWk5aP1iNzOQX1O5JxuUnS62w arkOWdAEqb9gMFwK3URyB9fn8Q2ricZYD/qnUODBBtCzyVCcbdWXlafqS B3DZtn5FQQSYbyt4dFYJ3YtnOjSWBgAa/oSc34SkGsR12AgjpnhNdtypH A==; X-CSE-ConnectionGUID: uetW7zp5SweNO9IrlbSmRQ== X-CSE-MsgGUID: 2KoR/PlCSKOX0zK5LQRrcg== X-IronPort-AV: E=McAfee;i="6800,10657,11651"; a="79518833" X-IronPort-AV: E=Sophos;i="6.21,173,1763452800"; d="scan'208";a="79518833" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Dec 2025 22:47:04 -0800 X-CSE-ConnectionGUID: zgoWrsT7TLGhwQPTFjfLhw== X-CSE-MsgGUID: L8maorqpQIqtaxBSjwi/jg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,173,1763452800"; d="scan'208";a="230614383" Received: from cheeyang-desk4.png.intel.com ([10.107.249.123]) by orviesa002.jf.intel.com with ESMTP; 23 Dec 2025 22:47:02 -0800 From: chee.yang.lee@intel.com To: yocto-patches@lists.yoctoproject.org Subject: [meta-zephyr][PATCH 2/4] zephyr-kernel-4.2.0: fix unable to find gen_kobject_list.py Date: Wed, 24 Dec 2025 14:46:33 +0800 Message-ID: <20251224064635.1187089-2-chee.yang.lee@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251224064635.1187089-1-chee.yang.lee@intel.com> References: <20251224064635.1187089-1-chee.yang.lee@intel.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 24 Dec 2025 06:47:09 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/2868 From: Lee Chee Yang Fix error when build using Yocto toolchain. | Run Build Command(s): ninja -v -j 22 all | ninja: error: 'zephyr/GEN_KOBJECT_LIST-NOTFOUND', needed by 'zephyr/include/generated/zephyr/driver-validation.h', missing and no known rule to make it Signed-off-by: Lee Chee Yang --- ...-fix-unable-find-gen_kobject_list.py.patch | 30 +++++++++++++++++++ .../zephyr-kernel/zephyr-kernel-src-4.2.0.inc | 1 + 2 files changed, 31 insertions(+) create mode 100644 meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-fix-unable-find-gen_kobject_list.py.patch diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-fix-unable-find-gen_kobject_list.py.patch b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-fix-unable-find-gen_kobject_list.py.patch new file mode 100644 index 0000000..f5c550c --- /dev/null +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-fix-unable-find-gen_kobject_list.py.patch @@ -0,0 +1,30 @@ +From 0a9f8fedd237c4783ca3bf5c5721a1c940988984 Mon Sep 17 00:00:00 2001 +From: Lee Chee Yang +Date: Wed, 17 Dec 2025 12:27:39 +0800 +Subject: [PATCH] fix unable find gen_kobject_list.py + +| Run Build Command(s): ninja -v -j 22 all +| ninja: error: 'zephyr/GEN_KOBJECT_LIST-NOTFOUND', needed by 'zephyr/include/generated/zephyr/driver-validation.h', missing and no known rule to make it + +Upstream-Status: Inappropriate [Cross-compilation specific] + +Signed-off-by: Lee Chee Yang +--- + cmake/kobj.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmake/kobj.cmake b/cmake/kobj.cmake +index 6ccb85245fc..fa757509cfa 100644 +--- a/cmake/kobj.cmake ++++ b/cmake/kobj.cmake +@@ -1,6 +1,6 @@ + # SPDX-License-Identifier: Apache-2.0 + +-find_program(GEN_KOBJECT_LIST NAMES gen_kobject_list gen_kobject_list.py PATHS ${ZEPHYR_BASE}/scripts/build) ++find_program(GEN_KOBJECT_LIST NAMES gen_kobject_list gen_kobject_list.py PATHS ${ZEPHYR_BASE}/scripts/build NO_CMAKE_FIND_ROOT_PATH) + message(STATUS "Found gen_kobject_list: ${GEN_KOBJECT_LIST}") + if(GEN_KOBJECT_LIST MATCHES "\.py$") + set(GEN_KOBJECT_LIST_INTERPRETER ${PYTHON_EXECUTABLE}) +-- +2.43.0 + diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-4.2.0.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-4.2.0.inc index 40bfb6c..9ec8c88 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-4.2.0.inc +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-4.2.0.inc @@ -146,6 +146,7 @@ SRC_URI_ZEPHYR_ZCBOR ?= "git://github.com/zephyrproject-rtos/zcbor;protocol=http SRC_URI_PATCHES ?= "\ file://0001-v4.2.0-x86-fix-efi-binary-generation-issue-in-cross-compila.patch;patchdir=zephyr \ + file://0001-fix-unable-find-gen_kobject_list.py.patch;patchdir=zephyr \ " SRC_URI = "\ From patchwork Wed Dec 24 06:46:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lee, Chee Yang" X-Patchwork-Id: 77378 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94230E74AE0 for ; Wed, 24 Dec 2025 06:47:09 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.115951.1766558825047135001 for ; Tue, 23 Dec 2025 22:47:05 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.com header.s=Intel header.b=AawXLExS; spf=pass (domain: intel.com, ip: 198.175.65.13, mailfrom: chee.yang.lee@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1766558825; x=1798094825; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=x51JE2TiUlipTrcK0Z+yOqBYVz914hiEwd0fSCqw65w=; b=AawXLExSrindZ5pohPs8797kyho9HQsYSBqDawAVZIWJAMOrEFU244xH dAwzUQ4F9u7zYGJupcRUYhhE8z/Cpz/VKYRA0w6+sYJ0iJYuGv+88DiYY hOkbEHZaeaKhUXXybB3cCzF4y7hqs4dA/1D1d+NR77sftGHOXVDRGnMnH v8cgRbpp7cgDNF/Dtuaj8VTCqedomuerclEYN3HVY0nw2KtFitZCf5AkN OPPG1yMKOLkaHwOX7pB0d+Jxq4dimUsHJbOMdv7KhJ41LCowBzbLohUH7 RuXHQtqloyKNinpGH/RRl1mSJiS0/xY+qEvJn6wEDyrdWlIG3kXYXkSXa w==; X-CSE-ConnectionGUID: liK2QG/JRJyD/V/gwXkflg== X-CSE-MsgGUID: vaXehV4wQhyAFuyB1bg4pg== X-IronPort-AV: E=McAfee;i="6800,10657,11651"; a="79518836" X-IronPort-AV: E=Sophos;i="6.21,173,1763452800"; d="scan'208";a="79518836" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Dec 2025 22:47:05 -0800 X-CSE-ConnectionGUID: T/1JsWKFSJKosXYIFzdLdA== X-CSE-MsgGUID: u3w/QGs1Sym4pPYItbiQEw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,173,1763452800"; d="scan'208";a="230614388" Received: from cheeyang-desk4.png.intel.com ([10.107.249.123]) by orviesa002.jf.intel.com with ESMTP; 23 Dec 2025 22:47:04 -0800 From: chee.yang.lee@intel.com To: yocto-patches@lists.yoctoproject.org Subject: [meta-zephyr][PATCH 3/4] zephyr-master.conf.json: add config for bitbake-setup Date: Wed, 24 Dec 2025 14:46:34 +0800 Message-ID: <20251224064635.1187089-3-chee.yang.lee@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251224064635.1187089-1-chee.yang.lee@intel.com> References: <20251224064635.1187089-1-chee.yang.lee@intel.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 24 Dec 2025 06:47:09 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/2869 From: Lee Chee Yang Signed-off-by: Lee Chee Yang --- zephyr-master.conf.json | 82 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 zephyr-master.conf.json diff --git a/zephyr-master.conf.json b/zephyr-master.conf.json new file mode 100644 index 0000000..f8dd18b --- /dev/null +++ b/zephyr-master.conf.json @@ -0,0 +1,82 @@ +{ + "description": "Meta-zephyr default configuration", + "sources": { + "bitbake": { + "git-remote": { + "remotes": { + "origin": { + "uri": "https://git.openembedded.org/bitbake" + } + }, + "branch": "master", + "rev": "master" + } + }, + "openembedded-core": { + "git-remote": { + "remotes": { + "origin": { + "uri": "https://git.openembedded.org/openembedded-core" + } + }, + "branch": "master", + "rev": "master" + } + }, + "meta-openembedded": { + "git-remote": { + "remotes": { + "origin": { + "uri": "https://git.openembedded.org/meta-openembedded" + } + }, + "branch": "master", + "rev": "master" + } + }, + "meta-zephyr": { + "git-remote": { + "remotes": { + "origin": { + "uri": "https://git.yoctoproject.org/meta-zephyr" + } + }, + "branch": "master", + "rev": "master" + } + } + }, + "bitbake-setup": { + "configurations": [ + { + "name": "zephyr-default", + "description": "Base zephyr configuration", + "setup-dir-name": "zephyr-master", + "bb-layers": [ + "openembedded-core/meta", + "meta-openembedded/meta-oe", + "meta-openembedded/meta-python" , + "meta-zephyr/meta-zephyr-core", + "meta-zephyr/meta-zephyr-bsp" + ], + "oe-fragments-one-of": { + "machine": { + "description": "Target machines", + "options" : [ + "machine/96b-nitrogen", + "machine/intel-x86-64", + "machine/qemu-cortex-m3", + "machine/qemu-x86" + ] + }, + "distro": { + "description": "Distribution configuration variants", + "options" : ["distro/zephyr"] + } + } + + } + ] + }, + "version": "1.0" +} From patchwork Wed Dec 24 06:46:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lee, Chee Yang" X-Patchwork-Id: 77377 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5706E74AE1 for ; Wed, 24 Dec 2025 06:47:09 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.115951.1766558825047135001 for ; Tue, 23 Dec 2025 22:47:06 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.com header.s=Intel header.b=CQjue1HM; spf=pass (domain: intel.com, ip: 198.175.65.13, mailfrom: chee.yang.lee@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1766558826; x=1798094826; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=R+NyMMj8ZPT2fkDSWPLMpMu3OVhW2/vPvfF5ls1pMwI=; b=CQjue1HMdHEPf4pVvB/gzbG+SHtHnkD5xhu2dEjKiBJqRDEHCcNEW+ph 0z5hFuiK1mRh0dDeY9mwicScKxtFhox9p6PQktJd27MtnhbwQvNQujBov fEx1IcWKCOy5ijbYa2JEyB8aajrqeSbQkd4wTZDOxNRoJDv4uoLlibifK TTXGp5MLQHfokbt1WXsh+dlz1XvNwap7mOjRnemqXfhEXthOrEx9JGNRP LT3Liyc+WjBTuJgvb8fczH8ODanKcLPSs8rQ89LHbJbBkPWQdMvVtdG4s E+wv5FwIGpIQnJRYG1eg+sgJfyo5mwFgbZhZLTk3UoY1hxgCBzYYrHdCu w==; X-CSE-ConnectionGUID: CVJSHao6RLyuDOlso9ix/w== X-CSE-MsgGUID: P/CD4YtcSMOp57x/xGArgg== X-IronPort-AV: E=McAfee;i="6800,10657,11651"; a="79518838" X-IronPort-AV: E=Sophos;i="6.21,173,1763452800"; d="scan'208";a="79518838" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Dec 2025 22:47:06 -0800 X-CSE-ConnectionGUID: 2yJ3YwUgQVy/0hW23WmrHQ== X-CSE-MsgGUID: 0cI9zc35TaqyN1X7GoPV+A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,173,1763452800"; d="scan'208";a="230614394" Received: from cheeyang-desk4.png.intel.com ([10.107.249.123]) by orviesa002.jf.intel.com with ESMTP; 23 Dec 2025 22:47:05 -0800 From: chee.yang.lee@intel.com To: yocto-patches@lists.yoctoproject.org Subject: [meta-zephyr][PATCH 4/4] README: update build guide with bitbake-setup Date: Wed, 24 Dec 2025 14:46:35 +0800 Message-ID: <20251224064635.1187089-4-chee.yang.lee@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251224064635.1187089-1-chee.yang.lee@intel.com> References: <20251224064635.1187089-1-chee.yang.lee@intel.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 24 Dec 2025 06:47:09 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/2870 From: cheeyanglee update build guide to use bitbake-setup. also drop the reference to poky Signed-off-by: Lee Chee Yang --- README.md | 121 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 78 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 669e921..4094eb8 100644 --- a/README.md +++ b/README.md @@ -6,76 +6,111 @@ This layer enables building Zephyr using Yocto Project. This layer depends on: - URI: https://git.yoctoproject.org/poky - layers: meta - branch: master + URI: https://git.openembedded.org/bitbake + branch: master - URI: https://git.openembedded.org/meta-openembedded - layers: meta-oe, meta-python - branch: master + URI: https://git.openembedded.org/openembedded-core + layers: meta + branch: master + + URI: https://git.openembedded.org/meta-openembedded + layers: meta-oe, meta-python + branch: master ## Building Zephyr Images via bitbake recipes -More detailed and up-to-date information can be found here: +### Quick Build -https://wiki.yoctoproject.org/wiki/TipsAndTricks/BuildingZephyrImages +Ensure your build host meets the +[Yocto Project system requirements](https://docs.yoctoproject.org/ref-manual/system-requirements.html) +and follow the +[Quick Build setup guide](https://docs.yoctoproject.org/brief-yoctoprojectqs/index.html#yocto-project-quick-build) +to setup the host enviroment. -> **Pre-requisites:** -1. Refer [Yocto Project Quick Build]( https://docs.yoctoproject.org/dev/singleindex.html#yocto-project-quick-build) documentation. +Clone the following repos: -2. Clone and add following layers to BBLAYERS - * meta-openembedded/meta-oe - * meta-openembedded/meta-python - * meta-zephyr-core - * meta-zephyr-bsp -``` - $ mkdir sources - $ git clone -b https://git.yoctoproject.org/poky - $ git clone -b https://git.openembedded.org/meta-openembedded - $ git clone -b https://git.yoctoproject.org/meta-zephyr - $ source poky/oe-init-build-env - $ bitbake-layers add-layer ../meta-openembedded/meta-oe - $ bitbake-layers add-layer ../meta-openembedded/meta-python - $ bitbake-layers add-layer ../meta-zephyr/meta-zephyr-core - $ bitbake-layers add-layer ../meta-zephyr/meta-zephyr-bsp -``` +- bitbake +- meta-zephyr -### Building and Running Zephyr Samples +```console +git clone https://git.openembedded.org/bitbake +git clone https://git.yoctoproject.org/meta-zephyr +``` -You can build Zephyr samples. There are several sample recipes. +Initialize default build configuration with bitbake-setup: -To use the Yocto toolchain, modify local conf by adding: -``` - DISTRO = "zephyr" +```console +./bitbake/bin/bitbake-setup init --non-interactive \ + ./meta-zephyr/zephyr-master.conf.json \ + zephyr-default distro/zephy machine/qemu-x86 ``` -To use the Zephyr pre-built toolchain, modify local conf by adding: +Alternatively, run bitbake-setup with interactive mode to choose for +different configuration: + +```console +./bitbake/bin/bitbake-setup init ./meta-zephyr/zephyr-master.conf.json ``` - ZEPHYR_TOOLCHAIN_VARIANT = "zephyr" + +Initialize build environment + +```console +source ./bitbake-builds/zephyr-master/build/init-build-env ``` -For example, to build the Zephyr "philosophers" sample: +build the Zephyr "helloworld" sample: + +```console +bitbake zephyr-helloworld ``` - $ MACHINE=qemu-x86 bitbake zephyr-philosophers + +### Building and Running other Zephyr Samples + +You can build other Zephyr samples. There are several sample recipes +[available here](https://git.yoctoproject.org/meta-zephyr/tree/meta-zephyr-core/recipes-kernel/zephyr-kernel). + +For example, to build the +[Zephyr "philosophers" sample](https://git.yoctoproject.org/meta-zephyr/tree/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb): + +```console +bitbake zephyr-philosophers ``` You can then run the created "philosophers" image in qemu: + +```console +runqemu ``` - $ runqemu qemu-x86 -``` -The same sample, for ARM image: +The same sample can be built for other machines/boards, for example ARM Cortex-M3: + +```console +bitbake-config-build enable-fragment machine/qemu-cortex-m3 +bitbake zephyr-philosophers +runqemu ``` - $ MACHINE=qemu-cortex-m3 bitbake zephyr-philosophers - $ runqemu qemu-cortex-m3 + +Alternatively, you can use the MACHINE variable to define the target machine, +you will need to disable the machine fragment to prevent conflict: + +```console +bitbake-config-build disable-fragment machine/qemu-x86 +MACHINE=qemu-cortex-m3 bitbake zephyr-philosophers +runqemu qemu-cortex-m3 ``` -The same sample, for Nios2 image: +The default configuration (with `zephyr` DISTRO) uses the Yocto Project toolchain +to compile Zephyr applications. To use the Zephyr pre-built toolchain instead, +modify `local.conf` by adding: + ``` - $ MACHINE=qemu-nios2 bitbake zephyr-philosophers - $ runqemu qemu-nios2 +ZEPHYR_TOOLCHAIN_VARIANT = "zephyr" ``` +Other Tips and Tricks for building zephyr image can be found +[here](https://wiki.yoctoproject.org/wiki/TipsAndTricks/BuildingZephyrImages). + + ### Flashing You can flash Zephyr samples to boards. Currently, the following MACHINEs