From patchwork Mon Aug 8 07:42:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Hoyes X-Patchwork-Id: 11125 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 1B92AC00140 for ; Mon, 8 Aug 2022 07:43:27 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.22931.1659944598656191193 for ; Mon, 08 Aug 2022 00:43:18 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: peter.hoyes@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6E288D6E; Mon, 8 Aug 2022 00:43:18 -0700 (PDT) Received: from e125920.arm.com (unknown [10.57.84.163]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F0B013F70D; Mon, 8 Aug 2022 00:43:16 -0700 (PDT) From: Peter Hoyes To: yocto@lists.yoctoproject.org Cc: diego.sueiro@arm.com, Peter Hoyes Subject: [meta-zephyr][PATCH 1/3] zephyr-kernel: Remove redundant ZEPHYR_BASE definitions Date: Mon, 8 Aug 2022 08:42:54 +0100 Message-Id: <20220808074256.3081464-1-peter.hoyes@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 08 Aug 2022 07:43:27 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/57794 From: Peter Hoyes zephyr-image.inc and zephyr-sample.inc both include zephyr-kernel-common.inc, which already defines ZEPHYR_BASE. Remove the redundant definitions. Also, pass -DZEPHYR_BASE=${ZEPHYR_BASE} instead of ${S} in EXTRA_OECMAKE. Signed-off-by: Peter Hoyes --- meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc | 1 - .../recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc | 2 +- meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-sample.inc | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc index 2d4c6ff..d4127d6 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc @@ -3,7 +3,6 @@ inherit testimage QEMU_BIN_PATH = "${STAGING_BINDIR_NATIVE}" -ZEPHYR_BASE = "${S}" OECMAKE_SOURCEPATH = "${S}/${ZEPHYR_SRC_DIR}" addtask deploy after do_compile diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc index e69ba3c..1c80fe0 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc @@ -15,7 +15,7 @@ ZEPHYR_MAKE_BIN_OUTPUT = "zephyr.bin" ZEPHYR_MAKE_EFI_OUTPUT = "zephyr.efi" EXTRA_OECMAKE = "\ - -DZEPHYR_BASE=${S} \ + -DZEPHYR_BASE=${ZEPHYR_BASE} \ -DZEPHYR_GCC_VARIANT=yocto \ -DBOARD=${BOARD} \ -DARCH=${ARCH} \ diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-sample.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-sample.inc index 77fa5ad..10c25c5 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-sample.inc +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-sample.inc @@ -2,7 +2,6 @@ require zephyr-kernel-src.inc require zephyr-kernel-common.inc inherit deploy -ZEPHYR_BASE = "${S}" OECMAKE_SOURCEPATH = "${ZEPHYR_SRC_DIR}" do_install[noexec] = "1" From patchwork Mon Aug 8 07:42:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Hoyes X-Patchwork-Id: 11126 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 1CCF1C25B06 for ; Mon, 8 Aug 2022 07:43:27 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.22598.1659944603037918236 for ; Mon, 08 Aug 2022 00:43:23 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: peter.hoyes@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7616AD6E; Mon, 8 Aug 2022 00:43:23 -0700 (PDT) Received: from e125920.arm.com (unknown [10.57.84.163]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C34553F70D; Mon, 8 Aug 2022 00:43:21 -0700 (PDT) From: Peter Hoyes To: yocto@lists.yoctoproject.org Cc: diego.sueiro@arm.com, Peter Hoyes Subject: [meta-zephyr][PATCH 2/3] zephyr-kernel: Use ZEPHYR_BASE in all application recipes Date: Mon, 8 Aug 2022 08:42:55 +0100 Message-Id: <20220808074256.3081464-2-peter.hoyes@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220808074256.3081464-1-peter.hoyes@arm.com> References: <20220808074256.3081464-1-peter.hoyes@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 08 Aug 2022 07:43:27 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/57795 From: Peter Hoyes Change ${S} -> ${ZEPHYR_BASE} in all application recipes, as Zephyr might not always be found at the root of the source directory. Signed-off-by: Peter Hoyes --- meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-blinky.bb | 2 +- .../recipes-kernel/zephyr-kernel/zephyr-coap-client.bb | 2 +- .../recipes-kernel/zephyr-kernel/zephyr-coap-server.bb | 2 +- .../recipes-kernel/zephyr-kernel/zephyr-echo-client.bb | 2 +- .../recipes-kernel/zephyr-kernel/zephyr-hci-uart.bb | 2 +- .../recipes-kernel/zephyr-kernel/zephyr-helloworld.bb | 2 +- .../recipes-kernel/zephyr-kernel/zephyr-http-client.bb | 2 +- meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc | 2 +- meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-lvgl.bb | 2 +- .../recipes-kernel/zephyr-kernel/zephyr-mqtt-publisher.bb | 2 +- .../recipes-kernel/zephyr-kernel/zephyr-openamp-rsc-table.bb | 2 +- .../zephyr-kernel/zephyr-openthread-echo-client.bb | 2 +- .../recipes-kernel/zephyr-kernel/zephyr-openthread-rcp.bb | 2 +- .../recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb | 2 +- .../recipes-kernel/zephyr-kernel/zephyr-peripheral-hr.bb | 2 +- .../recipes-kernel/zephyr-kernel/zephyr-philosophers.bb | 2 +- .../recipes-kernel/zephyr-kernel/zephyr-synchronization.bb | 2 +- .../recipes-kernel/zephyr-kernel/zephyr-websocket-client.bb | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-blinky.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-blinky.bb index bd5ce4f..c2a1e55 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-blinky.bb +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-blinky.bb @@ -1,3 +1,3 @@ include zephyr-sample.inc -ZEPHYR_SRC_DIR = "${S}/samples/basic/blinky" +ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/basic/blinky" diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-coap-client.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-coap-client.bb index d7ea837..7796f6b 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-coap-client.bb +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-coap-client.bb @@ -1,3 +1,3 @@ include zephyr-sample.inc -ZEPHYR_SRC_DIR = "${S}/samples/net/sockets/coap_client" +ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/coap_client" diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-coap-server.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-coap-server.bb index dece67d..5e345d4 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-coap-server.bb +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-coap-server.bb @@ -1,3 +1,3 @@ include zephyr-sample.inc -ZEPHYR_SRC_DIR = "${S}/samples/net/sockets/coap_server" +ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/coap_server" diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-echo-client.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-echo-client.bb index 53d1ef3..73187cf 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-echo-client.bb +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-echo-client.bb @@ -1,3 +1,3 @@ include zephyr-sample.inc -ZEPHYR_SRC_DIR = "${S}/samples/net/sockets/echo_client" +ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/echo_client" diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-hci-uart.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-hci-uart.bb index c66c7ec..ebc6dc3 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-hci-uart.bb +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-hci-uart.bb @@ -1,5 +1,5 @@ include zephyr-sample.inc -ZEPHYR_SRC_DIR = "${S}/samples/bluetooth/hci_uart" +ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/bluetooth/hci_uart" COMPATIBLE_MACHINE = "(96b-nitrogen)" diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-helloworld.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-helloworld.bb index 20d1700..68b42aa 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-helloworld.bb +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-helloworld.bb @@ -4,4 +4,4 @@ console" include zephyr-sample.inc -ZEPHYR_SRC_DIR = "${S}/samples/hello_world" +ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/hello_world" diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-http-client.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-http-client.bb index bf99bbd..8bff2be 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-http-client.bb +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-http-client.bb @@ -1,4 +1,4 @@ include zephyr-sample.inc -ZEPHYR_SRC_DIR = "${S}/samples/net/sockets/http_client" +ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/http_client" diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc index d4127d6..f4c9db1 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-image.inc @@ -3,7 +3,7 @@ inherit testimage QEMU_BIN_PATH = "${STAGING_BINDIR_NATIVE}" -OECMAKE_SOURCEPATH = "${S}/${ZEPHYR_SRC_DIR}" +OECMAKE_SOURCEPATH = "${ZEPHYR_BASE}/${ZEPHYR_SRC_DIR}" addtask deploy after do_compile do_install[noexec] = "1" diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-lvgl.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-lvgl.bb index efe2154..a635da2 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-lvgl.bb +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-lvgl.bb @@ -1,6 +1,6 @@ include zephyr-sample.inc -ZEPHYR_SRC_DIR = "${S}/samples/subsys/display/lvgl" +ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/subsys/display/lvgl" # TODO Once more machines and displays are supported, add a PACKAGECONFIG. EXTRA_OECMAKE:append =" -DSHIELD=adafruit_2_8_tft_touch_v2" diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-mqtt-publisher.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-mqtt-publisher.bb index c679798..f314841 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-mqtt-publisher.bb +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-mqtt-publisher.bb @@ -1,3 +1,3 @@ include zephyr-sample.inc -ZEPHYR_SRC_DIR = "${S}/samples/net/mqtt_publisher" +ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/mqtt_publisher" diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openamp-rsc-table.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openamp-rsc-table.bb index 3eec58a..5e51c23 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openamp-rsc-table.bb +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openamp-rsc-table.bb @@ -5,6 +5,6 @@ ZEPHYR_MAKE_OUTPUT = "zephyr_openamp_rsc_table.elf" ZEPHYR_MAKE_BIN_OUTPUT = "zephyr_openamp_rsc_table.bin" ZEPHYR_MAKE_EFI_OUTPUT = "zephyr_openamp_rsc_table.efi" -ZEPHYR_SRC_DIR = "${S}/samples/subsys/ipc/openamp_rsc_table" +ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/subsys/ipc/openamp_rsc_table" COMPATIBLE_MACHINE = "(stm32mp157c-dk2)" diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openthread-echo-client.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openthread-echo-client.bb index b83c6b3..e2b3efd 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openthread-echo-client.bb +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openthread-echo-client.bb @@ -1,6 +1,6 @@ include zephyr-sample.inc -ZEPHYR_SRC_DIR = "${S}/samples/net/sockets/echo_client" +ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/echo_client" EXTRA_OECMAKE += "-DOVERLAY_CONFIG=overlay-ot.conf" diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openthread-rcp.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openthread-rcp.bb index 6d3f860..ed86a9b 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openthread-rcp.bb +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-openthread-rcp.bb @@ -1,6 +1,6 @@ include zephyr-sample.inc -ZEPHYR_SRC_DIR = "${S}/samples/net/openthread/coprocessor" +ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/openthread/coprocessor" EXTRA_OECMAKE += "-DCONF_FILE="prj.conf overlay-rcp.conf overlay-usb-nrf-br.conf" -DDTC_OVERLAY_FILE="usb.overlay" -DCONFIG_OPENTHREAD_THREAD_VERSION_1_2=y" diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb index 14655e5..0aac7f6 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-peripheral-esp.bb @@ -1,3 +1,3 @@ include zephyr-sample.inc -ZEPHYR_SRC_DIR = "${S}/samples/bluetooth/peripheral_esp" +ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/bluetooth/peripheral_esp" diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-peripheral-hr.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-peripheral-hr.bb index 53fc771..80e3505 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-peripheral-hr.bb +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-peripheral-hr.bb @@ -1,3 +1,3 @@ include zephyr-sample.inc -ZEPHYR_SRC_DIR = "${S}/samples/bluetooth/peripheral_hr" +ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/bluetooth/peripheral_hr" diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb index 5a2ac70..2b4fca3 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-philosophers.bb @@ -5,4 +5,4 @@ operate correctly by printing a greeting to the console from two threads." include zephyr-sample.inc -ZEPHYR_SRC_DIR = "${S}/samples/philosophers" +ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/philosophers" diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-synchronization.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-synchronization.bb index 4cb207d..a55736b 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-synchronization.bb +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-synchronization.bb @@ -5,4 +5,4 @@ operate correctly by printing a greeting to the console from two threads." include zephyr-sample.inc -ZEPHYR_SRC_DIR = "${S}/samples/synchronization" +ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/synchronization" diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-websocket-client.bb b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-websocket-client.bb index c2c47d0..b92e986 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-websocket-client.bb +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-websocket-client.bb @@ -1,3 +1,3 @@ include zephyr-sample.inc -ZEPHYR_SRC_DIR = "${S}/samples/net/sockets/websocket_client" +ZEPHYR_SRC_DIR = "${ZEPHYR_BASE}/samples/net/sockets/websocket_client" From patchwork Mon Aug 8 07:42:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Hoyes X-Patchwork-Id: 11127 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 37338C3F6B0 for ; Mon, 8 Aug 2022 07:43:27 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.22599.1659944606425308946 for ; Mon, 08 Aug 2022 00:43:26 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: peter.hoyes@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C533DD6E; Mon, 8 Aug 2022 00:43:26 -0700 (PDT) Received: from e125920.arm.com (unknown [10.57.84.163]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5E1B93F881; Mon, 8 Aug 2022 00:43:25 -0700 (PDT) From: Peter Hoyes To: yocto@lists.yoctoproject.org Cc: diego.sueiro@arm.com, Peter Hoyes Subject: [meta-zephyr][PATCH 3/3] zephyr-kernel: Checkout zephyr in subdir to match West usage Date: Mon, 8 Aug 2022 08:42:56 +0100 Message-Id: <20220808074256.3081464-3-peter.hoyes@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220808074256.3081464-1-peter.hoyes@arm.com> References: <20220808074256.3081464-1-peter.hoyes@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 08 Aug 2022 07:43:27 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/57796 From: Peter Hoyes When using West, Zephyr is checked out in a "zephyr" subdirectory of the working directory. At the moment Zephyr is checked out at the root, meaning a workaround is required to extract the module information. In order to remove the workaround, change the Zephyr destsuffix in SRC_URI and ZEPHYR_BASE. As a result of this change, modify patchdir for the patches and the path to the LICENSE file. Signed-off-by: Peter Hoyes --- meta-zephyr-core/classes/zephyr.bbclass | 8 +------- .../recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc | 2 +- .../zephyr-kernel/zephyr-kernel-src-2.7.2.inc | 6 +++--- .../zephyr-kernel/zephyr-kernel-src-3.1.0.inc | 4 ++-- .../recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc | 4 ++-- 5 files changed, 9 insertions(+), 15 deletions(-) diff --git a/meta-zephyr-core/classes/zephyr.bbclass b/meta-zephyr-core/classes/zephyr.bbclass index f3d16b7..8030456 100644 --- a/meta-zephyr-core/classes/zephyr.bbclass +++ b/meta-zephyr-core/classes/zephyr.bbclass @@ -34,16 +34,10 @@ do_get_zmods() { rm -rf .west; mkdir .west cat << EOF >> ${S}/.west/config [manifest] -path = . +path = zephyr file = west.yml EOF - # Because of how we structure things, we need to either structure this more like a west workspace or just tweak - # the manifest in order to get access to the west extentions like build and whatnot. Tweaking the manifest is the - # easier path here and minimizes the amount of breakage that might occur. - - sed -i 's/path: zephyr/path: ./' west.yml - # 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}" diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc index 1c80fe0..a970abf 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-common.inc @@ -30,7 +30,7 @@ ZEPHYR_EXTRA_MODULES = "" EXTRA_OECMAKE:append = " -DZEPHYR_EXTRA_MODULES=${ZEPHYR_EXTRA_MODULES}" -export ZEPHYR_BASE="${S}" +export ZEPHYR_BASE="${S}/zephyr" DEPENDS += "gperf-native" diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.7.2.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.7.2.inc index 537a565..cbe761f 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.7.2.inc +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.7.2.inc @@ -63,8 +63,8 @@ ZEPHYR_BRANCH = "v2.7-branch" PV = "2.7.2+git${SRCPV}" SRC_URI:append = " \ - file://dtc.patch \ - file://0001-x86-fix-efi-binary-generation-issue-in-cross-compila.patch \ - file://0001-2.7-cmake-add-yocto-toolchain.patch \ + file://dtc.patch;patchdir=zephyr \ + file://0001-x86-fix-efi-binary-generation-issue-in-cross-compila.patch;patchdir=zephyr \ + file://0001-2.7-cmake-add-yocto-toolchain.patch;patchdir=zephyr \ git://github.com/zephyrproject-rtos/hal_cypress.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/cypress;name=cypress \ " diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-3.1.0.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-3.1.0.inc index 612cfd7..c0fe5f2 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-3.1.0.inc +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-3.1.0.inc @@ -72,6 +72,6 @@ ZEPHYR_BRANCH = "v3.1-branch" PV = "3.1.0+git${SRCPV}" SRC_URI += " \ - file://0001-3.1-cmake-add-yocto-toolchain.patch \ - file://0001-3.1-x86-fix-efi-binary-generation-issue-in-cross-compila.patch \ + file://0001-3.1-cmake-add-yocto-toolchain.patch;patchdir=zephyr \ + file://0001-3.1-x86-fix-efi-binary-generation-issue-in-cross-compila.patch;patchdir=zephyr \ " diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc index e9b35c9..a4bab22 100644 --- a/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc +++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc @@ -1,5 +1,5 @@ LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc" +LIC_FILES_CHKSUM = "file://zephyr/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc" CVE_PRODUCT = "zephyr" @@ -11,7 +11,7 @@ inherit cmake FILESEXTRAPATHS:prepend := "${THISDIR}/files:" SRC_URI = "\ - git://github.com/zephyrproject-rtos/zephyr.git;protocol=https;branch=${ZEPHYR_BRANCH};name=default \ + git://github.com/zephyrproject-rtos/zephyr.git;protocol=https;branch=${ZEPHYR_BRANCH};name=default;destsuffix=git/zephyr \ git://github.com/zephyrproject-rtos/canopennode.git;protocol=https;nobranch=1;destsuffix=git/modules/lib/canopennode;name=canopennode \ git://github.com/zephyrproject-rtos/civetweb.git;protocol=https;nobranch=1;destsuffix=git/modules/lib/civetweb;name=civetweb \ git://github.com/zephyrproject-rtos/cmsis.git;protocol=https;nobranch=1;destsuffix=git/modules/hal/cmsis;name=cmsis \