From patchwork Mon Nov 21 15:43:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jon Mason X-Patchwork-Id: 15816 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 4FB3BC352A1 for ; Mon, 21 Nov 2022 15:44:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.41978.1669045438554809144 for ; Mon, 21 Nov 2022 07:43:58 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: jon.mason@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 E414C1FB; Mon, 21 Nov 2022 07:44:03 -0800 (PST) Received: from localhost.localdomain (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 48A183F73B; Mon, 21 Nov 2022 07:43:57 -0800 (PST) From: Jon Mason To: meta-arm@lists.yoctoproject.org Cc: =?utf-8?q?Adri=C3=A1n_Herrera_Arcila?= Subject: [PATCH 1/7] atp: fix failing test_readme Date: Mon, 21 Nov 2022 10:43:46 -0500 Message-Id: <20221121154352.5061-1-jon.mason@arm.com> X-Mailer: git-send-email 2.17.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, 21 Nov 2022 15:44:08 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/4144 From: Adrián Herrera Arcila Test failed because there was no reference to maintainers in the meta-atp README. Following the common structure of other layers in the meta-arm repository, the README in meta-atp now refers to the top-level README, and a documentation directory contains the guidance that was present in the original meta-atp README. Signed-off-by: Adrián Herrera Arcila --- README.md | 2 +- meta-atp/README.md | 77 +----------------------- meta-atp/documentation/atp-standalone.md | 13 ++++ meta-atp/documentation/gem5-atp-arm64.md | 37 ++++++++++++ meta-atp/documentation/summary.md | 11 ++++ 5 files changed, 63 insertions(+), 77 deletions(-) create mode 100644 meta-atp/documentation/atp-standalone.md create mode 100644 meta-atp/documentation/gem5-atp-arm64.md create mode 100644 meta-atp/documentation/summary.md diff --git a/README.md b/README.md index 221633e0..e82f5532 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ This repository contains the Arm layers for OpenEmbedded. * meta-atp - This layer contains recipes for the Adaptive Traffic Generation integration into meta-gem5. + This layer contains recipes for the [AMBA Adaptive Traffic Profiles (ATP)](https://developer.arm.com/documentation/ihi0082/latest) generation integration into meta-gem5. * meta-gem5 diff --git a/meta-atp/README.md b/meta-atp/README.md index 15d0e29b..490ddca9 100644 --- a/meta-atp/README.md +++ b/meta-atp/README.md @@ -1,76 +1 @@ -# meta-atp layer - -The meta-atp layer supports building environments with traffic generation capabilities based on [AMBA Adaptive Traffic Profiles (ATP)](https://developer.arm.com/documentation/ihi0082/latest). - -## Recipes - -The meta-atp layer supports building the following software components: - -- Arm's implementation of the AMBA ATP specification, namely the [AMBA ATP Engine](https://github.com/ARM-software/ATP-Engine). -- Linux kernel modules and user API (UAPI) for programming ATP devices. -- Integration test suite for verification of kernel modules and UAPI. - -It is also possible to build the AMBA ATP Engine as part of the final [gem5](https://www.gem5.org/) executable. For this, meta-atp extends the `gem5-aarch64-native` recipe to add the AMBA ATP engine code as extra sources. - -## Machines - -The `gem5-atp-arm64` machine extends the `gem5-arm64` machine to instantiate a simulated platform with support for programmable AMBA ATP traffic generation. The platform includes the following models: - -- `ProfileGen` model. This is the adapter layer between gem5 and the AMBA ATP Engine. It is the source of traffic into the gem5 host platform. -- `ATPDevice` model. Software can program it using the Linux kernel modules and UAPI to control traffic generation. - -## Usage - -Users should add the meta-atp layer and layer dependencies to `conf/bblayers.conf`. See `conf/layer.conf` for dependencies. - -### Standalone Engine executable - -Users can build the AMBA ATP Engine as a standalone native executable as follows: - -```bash -bitbake atp-native -``` - -Users can run the executable through standard build scripts: - -```bash -oe-run-native atp-native atpeng [--help | args...] -``` - -## Integration of the Engine in gem5 - -Users should select the `gem5-atp-arm64` platform in their `conf/local.conf` file. - -Users can build the target image of preference, for example: - -```bash -bitbake core-image-minimal -``` - -The resulting gem5 native executable contains the AMBA ATP Engine. The resulting target image contains the kernel modules, UAPI and test suite. - -Users should run the environment as follows: - -```bash -./tmp/deploy/tools/start-gem5-atp.sh -``` - -This script launches a fast simulation to fast-forward Linux boot. Once Linux boot is completed, the fast simulation switches into a detailed simulation for the final usable environment. Users can connect and interact with the environment as follows: - -```bash -oe-run-native gem5-m5term-native m5term -``` - -The connection PORT is announced by the deploy script as: - -```bash -system.terminal: Listening for connections on port -``` - -This is usually port 3456. - -Users can verify access to the ATP device by running the integration test suite from within the simulated environment as follows: - -```bash -test_atp.out -``` +See ../README.md diff --git a/meta-atp/documentation/atp-standalone.md b/meta-atp/documentation/atp-standalone.md new file mode 100644 index 00000000..1ab4528a --- /dev/null +++ b/meta-atp/documentation/atp-standalone.md @@ -0,0 +1,13 @@ +# Standalone ATP Engine executable + +Users can build the AMBA ATP Engine as a standalone native executable as follows: + +```bash +bitbake atp-native +``` + +Users can run the executable through standard build scripts: + +```bash +oe-run-native atp-native atpeng [--help | args...] +``` diff --git a/meta-atp/documentation/gem5-atp-arm64.md b/meta-atp/documentation/gem5-atp-arm64.md new file mode 100644 index 00000000..39f2f3b0 --- /dev/null +++ b/meta-atp/documentation/gem5-atp-arm64.md @@ -0,0 +1,37 @@ +## ATP Engine integration in gem5, and the gem5-atp-arm64 machine + +Users should select the `gem5-atp-arm64` machine in their `conf/local.conf` file. + +Users can build the target image of preference, for example: + +```bash +bitbake core-image-minimal +``` + +The resulting gem5 native executable contains the AMBA ATP Engine. The resulting target image contains the kernel modules, UAPI and test suite. + +Users should run the environment as follows: + +```bash +./tmp/deploy/tools/start-gem5-atp.sh +``` + +This script launches a fast simulation to fast-forward Linux boot. Once Linux boot is completed, the fast simulation switches into a detailed simulation for the final usable environment. Users can connect and interact with the environment as follows: + +```bash +oe-run-native gem5-m5term-native m5term +``` + +The connection PORT is announced by the deploy script as: + +```bash +system.terminal: Listening for connections on port +``` + +This is usually port 3456. + +Users can verify access to the ATP device by running the integration test suite from within the simulated environment as follows: + +```bash +test_atp.out +``` diff --git a/meta-atp/documentation/summary.md b/meta-atp/documentation/summary.md new file mode 100644 index 00000000..7ac6c3f5 --- /dev/null +++ b/meta-atp/documentation/summary.md @@ -0,0 +1,11 @@ +# meta-atp summary + +The meta-atp layer supports building the following software components: + +- Arm's implementation of the AMBA ATP specification, namely the [AMBA ATP Engine](https://github.com/ARM-software/ATP-Engine). +- Linux kernel modules and user API (UAPI) for programming ATP devices. +- Integration test suite for verification of kernel modules and UAPI. + +It is also possible to build the AMBA ATP Engine as part of the final [gem5](https://www.gem5.org/) executable. For this, meta-atp extends the `gem5-aarch64-native` recipe to add the AMBA ATP engine code as extra sources. + +Users should add the meta-atp layer and layer dependencies to `conf/bblayers.conf`. See `conf/layer.conf` for dependencies. From patchwork Mon Nov 21 15:43:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jon Mason X-Patchwork-Id: 15815 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 3E955C4321E for ; Mon, 21 Nov 2022 15:44:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.41980.1669045438655544494 for ; Mon, 21 Nov 2022 07:43:58 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: jon.mason@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 3436923A; Mon, 21 Nov 2022 07:44:04 -0800 (PST) Received: from localhost.localdomain (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 8B8273F73B; Mon, 21 Nov 2022 07:43:57 -0800 (PST) From: Jon Mason To: meta-arm@lists.yoctoproject.org Cc: Adrian Herrera Subject: [PATCH 2/7] atp: decouple m5readfile from m5ops Date: Mon, 21 Nov 2022 10:43:47 -0500 Message-Id: <20221121154352.5061-2-jon.mason@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221121154352.5061-1-jon.mason@arm.com> References: <20221121154352.5061-1-jon.mason@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, 21 Nov 2022 15:44:08 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/4145 From: Adrian Herrera By making m5readfile into its own recipe, we avoid modifications to the m5ops recipe when using the meta-atp layer, which break the Yocto compatibility of the layer. Signed-off-by: Adrian Herrera --- meta-atp/conf/machine/gem5-atp-arm64.conf | 4 ++-- .../gem5/gem5-m5ops_20.bbappend | 14 -------------- .../recipes-devtools/gem5/gem5-m5readfile.bb | 17 +++++++++++++++++ .../m5-readfile.sh | 2 +- 4 files changed, 20 insertions(+), 17 deletions(-) delete mode 100644 meta-atp/recipes-devtools/gem5/gem5-m5ops_20.bbappend create mode 100644 meta-atp/recipes-devtools/gem5/gem5-m5readfile.bb rename meta-atp/recipes-devtools/gem5/{gem5-m5ops => gem5-m5readfile}/m5-readfile.sh (65%) diff --git a/meta-atp/conf/machine/gem5-atp-arm64.conf b/meta-atp/conf/machine/gem5-atp-arm64.conf index d5fe22a7..4d0adac8 100644 --- a/meta-atp/conf/machine/gem5-atp-arm64.conf +++ b/meta-atp/conf/machine/gem5-atp-arm64.conf @@ -5,7 +5,7 @@ MACHINEOVERRIDES =. "gem5-arm64:" GEM5_RUN_PROFILE = "configs/baremetal_atp.py" # Require m5term EXTRA_IMAGEDEPENDS += "gem5-m5term-native" -# Require ATP kernel modules, user API and gem5 m5ops -MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-module-atp atp-uapi gem5-m5ops" +# Require ATP kernel modules, user API and gem5 m5readfile +MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-module-atp atp-uapi gem5-m5readfile" # Optionally provide ATP kernel tests MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "atp-test" diff --git a/meta-atp/recipes-devtools/gem5/gem5-m5ops_20.bbappend b/meta-atp/recipes-devtools/gem5/gem5-m5ops_20.bbappend deleted file mode 100644 index 3ba0c3ca..00000000 --- a/meta-atp/recipes-devtools/gem5/gem5-m5ops_20.bbappend +++ /dev/null @@ -1,14 +0,0 @@ -inherit update-rc.d - -FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" - -# Add startup script calling m5 readfile for automatic checkpoint and restore -SRC_URI += "file://m5-readfile.sh" - -INITSCRIPT_NAME = "m5-readfile.sh" -INITSCRIPT_PARAMS = "defaults 99" - -do_install:append() { - install -d ${D}/${INIT_D_DIR} - install -m 755 ${WORKDIR}/m5-readfile.sh ${D}/${INIT_D_DIR} -} diff --git a/meta-atp/recipes-devtools/gem5/gem5-m5readfile.bb b/meta-atp/recipes-devtools/gem5/gem5-m5readfile.bb new file mode 100644 index 00000000..9cddc270 --- /dev/null +++ b/meta-atp/recipes-devtools/gem5/gem5-m5readfile.bb @@ -0,0 +1,17 @@ +inherit update-rc.d + +SUMMARY = "Enables reading any script at simulation launch time" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9" + +SRC_URI = "file://m5-readfile.sh" + +INITSCRIPT_NAME = "m5-readfile.sh" +INITSCRIPT_PARAMS = "defaults 99" + +do_install() { + install -d ${D}/${INIT_D_DIR} + install -m 755 ${WORKDIR}/m5-readfile.sh ${D}/${INIT_D_DIR} +} + +RDEPENDS:${PN} = "gem5-m5ops" diff --git a/meta-atp/recipes-devtools/gem5/gem5-m5ops/m5-readfile.sh b/meta-atp/recipes-devtools/gem5/gem5-m5readfile/m5-readfile.sh similarity index 65% rename from meta-atp/recipes-devtools/gem5/gem5-m5ops/m5-readfile.sh rename to meta-atp/recipes-devtools/gem5/gem5-m5readfile/m5-readfile.sh index 44477e96..edf79b84 100755 --- a/meta-atp/recipes-devtools/gem5/gem5-m5ops/m5-readfile.sh +++ b/meta-atp/recipes-devtools/gem5/gem5-m5readfile/m5-readfile.sh @@ -3,7 +3,7 @@ # Provides: m5-readfile # Required-Start: $all # Default-Start: 5 -# Description: Enables reading any script at simulation launch time. +# Description: Enables reading any script at simulation launch time. ### END INIT INFO m5 readfile | sh From patchwork Mon Nov 21 15:43:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Mason X-Patchwork-Id: 15813 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 399D1C43217 for ; Mon, 21 Nov 2022 15:44:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.41981.1669045438991451140 for ; Mon, 21 Nov 2022 07:43:59 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: jon.mason@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 6C5801477; Mon, 21 Nov 2022 07:44:04 -0800 (PST) Received: from localhost.localdomain (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CE5E03F73B; Mon, 21 Nov 2022 07:43:57 -0800 (PST) From: Jon Mason To: meta-arm@lists.yoctoproject.org Cc: Adrian Herrera Subject: [PATCH 3/7] atp: move m5readfile to meta-gem5 Date: Mon, 21 Nov 2022 10:43:48 -0500 Message-Id: <20221121154352.5061-3-jon.mason@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221121154352.5061-1-jon.mason@arm.com> References: <20221121154352.5061-1-jon.mason@arm.com> 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, 21 Nov 2022 15:44:08 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/4146 From: Adrian Herrera The m5 readfile recipe provides general utility for gem5 users to run any script on OS boot. We hence move it to the meta-gem5 layer. Signed-off-by: Adrian Herrera --- {meta-atp => meta-gem5}/recipes-devtools/gem5/gem5-m5readfile.bb | 0 .../recipes-devtools/gem5/gem5-m5readfile/m5-readfile.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename {meta-atp => meta-gem5}/recipes-devtools/gem5/gem5-m5readfile.bb (100%) rename {meta-atp => meta-gem5}/recipes-devtools/gem5/gem5-m5readfile/m5-readfile.sh (100%) diff --git a/meta-atp/recipes-devtools/gem5/gem5-m5readfile.bb b/meta-gem5/recipes-devtools/gem5/gem5-m5readfile.bb similarity index 100% rename from meta-atp/recipes-devtools/gem5/gem5-m5readfile.bb rename to meta-gem5/recipes-devtools/gem5/gem5-m5readfile.bb diff --git a/meta-atp/recipes-devtools/gem5/gem5-m5readfile/m5-readfile.sh b/meta-gem5/recipes-devtools/gem5/gem5-m5readfile/m5-readfile.sh similarity index 100% rename from meta-atp/recipes-devtools/gem5/gem5-m5readfile/m5-readfile.sh rename to meta-gem5/recipes-devtools/gem5/gem5-m5readfile/m5-readfile.sh From patchwork Mon Nov 21 15:43:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jon Mason X-Patchwork-Id: 15812 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 2D936C433FE for ; Mon, 21 Nov 2022 15:44:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.41979.1669045438638498215 for ; Mon, 21 Nov 2022 07:43:58 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: jon.mason@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 A74B11480; Mon, 21 Nov 2022 07:44:04 -0800 (PST) Received: from localhost.localdomain (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 14A133F73B; Mon, 21 Nov 2022 07:43:58 -0800 (PST) From: Jon Mason To: meta-arm@lists.yoctoproject.org Cc: =?utf-8?q?Adri=C3=A1n_Herrera_Arcila?= Subject: [PATCH 4/7] gem5: support for EXTRAS Date: Mon, 21 Nov 2022 10:43:49 -0500 Message-Id: <20221121154352.5061-4-jon.mason@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221121154352.5061-1-jon.mason@arm.com> References: <20221121154352.5061-1-jon.mason@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, 21 Nov 2022 15:44:08 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/4143 From: Adrián Herrera Arcila External models can be added to gem5 through EXTRAS: https://www.gem5.org/documentation/general_docs/building/EXTRAS Added GEM5_EXTRAS to the gem5-native recipe to support it. Signed-off-by: Adrián Herrera Arcila --- meta-gem5/recipes-devtools/gem5/gem5-native.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meta-gem5/recipes-devtools/gem5/gem5-native.inc b/meta-gem5/recipes-devtools/gem5/gem5-native.inc index 91a554bb..0f794b3f 100644 --- a/meta-gem5/recipes-devtools/gem5/gem5-native.inc +++ b/meta-gem5/recipes-devtools/gem5/gem5-native.inc @@ -12,10 +12,15 @@ GEM5_BUILD_VARIANT ?= "opt" # What gem5 binary are we building GEM5_BUILD_CONFIGS ?= "build/X86/gem5.{GEM5_BUILD_VARIANT}" +# Extra directories with sources for gem5 build. Intended to be used from +# machine configuration files, to add out-of-tree gem5 models of their +# hardware components. +GEM5_EXTRAS ?= "" + # Scons build arguments GEM5_SCONS_ARGS ?= "CC=${BUILD_CC} CXX=${BUILD_CXX} \ AS=${BUILD_AS} AR=${BUILD_AR} ${GEM5_BUILD_CONFIGS} \ - PYTHON_CONFIG=python3-config" + PYTHON_CONFIG=python3-config EXTRAS=${GEM5_EXTRAS}" # Default profile to run GEM5_RUN_PROFILE ?= "configs/example/fs.py" From patchwork Mon Nov 21 15:43:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jon Mason X-Patchwork-Id: 15814 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 3A649C4167E for ; Mon, 21 Nov 2022 15:44:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.41818.1669045438853851818 for ; Mon, 21 Nov 2022 07:43:59 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: jon.mason@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 E476814BF; Mon, 21 Nov 2022 07:44:04 -0800 (PST) Received: from localhost.localdomain (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 51B6C3F73B; Mon, 21 Nov 2022 07:43:58 -0800 (PST) From: Jon Mason To: meta-arm@lists.yoctoproject.org Cc: =?utf-8?q?Adri=C3=A1n_Herrera_Arcila?= Subject: [PATCH 5/7] atp: separate recipe for gem5 models Date: Mon, 21 Nov 2022 10:43:50 -0500 Message-Id: <20221121154352.5061-5-jon.mason@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221121154352.5061-1-jon.mason@arm.com> References: <20221121154352.5061-1-jon.mason@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, 21 Nov 2022 15:44:08 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/4147 From: Adrián Herrera Arcila Previously, meta-atp extended the original gem5 recipe to add the ATP Engine models; the .bbappend was complex, because it pulled from two sources, and it was not possible to make machine-based overrides, as it is a native recipe. To solve this, we use the recent EXTRAS feature to add the gem5 models from a different recipe. Signed-off-by: Adrián Herrera Arcila --- meta-atp/conf/machine/gem5-atp-arm64.conf | 4 ++++ meta-atp/documentation/gem5-atp-arm64.md | 2 +- .../atp/atp-gem5-native_3.1.bb | 24 +++++++++++++++++++ .../atp-gem5}/start-gem5-atp.sh | 0 .../gem5/gem5-aarch64-native_20.bbappend | 24 ------------------- 5 files changed, 29 insertions(+), 25 deletions(-) create mode 100644 meta-atp/recipes-devtools/atp/atp-gem5-native_3.1.bb rename meta-atp/recipes-devtools/{gem5/gem5-aarch64-native => atp/atp-gem5}/start-gem5-atp.sh (100%) delete mode 100644 meta-atp/recipes-devtools/gem5/gem5-aarch64-native_20.bbappend diff --git a/meta-atp/conf/machine/gem5-atp-arm64.conf b/meta-atp/conf/machine/gem5-atp-arm64.conf index 4d0adac8..6e6d49a9 100644 --- a/meta-atp/conf/machine/gem5-atp-arm64.conf +++ b/meta-atp/conf/machine/gem5-atp-arm64.conf @@ -9,3 +9,7 @@ EXTRA_IMAGEDEPENDS += "gem5-m5term-native" MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-module-atp atp-uapi gem5-m5readfile" # Optionally provide ATP kernel tests MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "atp-test" + +# Use ATP Engine gem5 models in gem5 build +DEPENDS:append:pn-gem5-aarch64-native = " atp-gem5-native" +GEM5_EXTRAS:pn-gem5-aarch64-native = "${STAGING_DATADIR_NATIVE}/atp" diff --git a/meta-atp/documentation/gem5-atp-arm64.md b/meta-atp/documentation/gem5-atp-arm64.md index 39f2f3b0..018f374c 100644 --- a/meta-atp/documentation/gem5-atp-arm64.md +++ b/meta-atp/documentation/gem5-atp-arm64.md @@ -13,7 +13,7 @@ The resulting gem5 native executable contains the AMBA ATP Engine. The resulting Users should run the environment as follows: ```bash -./tmp/deploy/tools/start-gem5-atp.sh +oe-run-native atp-gem5-native start-gem5-atp.sh ``` This script launches a fast simulation to fast-forward Linux boot. Once Linux boot is completed, the fast simulation switches into a detailed simulation for the final usable environment. Users can connect and interact with the environment as follows: diff --git a/meta-atp/recipes-devtools/atp/atp-gem5-native_3.1.bb b/meta-atp/recipes-devtools/atp/atp-gem5-native_3.1.bb new file mode 100644 index 00000000..634c9b11 --- /dev/null +++ b/meta-atp/recipes-devtools/atp/atp-gem5-native_3.1.bb @@ -0,0 +1,24 @@ +require atp-source_3.1.inc +inherit native + +SUMMARY = "AMBA ATP Engine gem5 models" + +S = "${WORKDIR}/git" +SRC_URI = "${ATP_SRC} file://start-gem5-atp.sh" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + install -d ${D}${datadir}/gem5/configs ${D}${datadir}/atp ${D}${bindir} + + # baremetal_atp.py machine configuration and sample stream.atp file + install ${S}/gem5/baremetal_atp.py ${S}/configs/stream.atp ${D}${datadir}/gem5/configs + # ATP Engine sources for gem5 to use + install ${S}/SConscript ${S}/*.hh ${S}/*.cc ${D}${datadir}/atp + cp -RL ${S}/gem5 ${S}/proto ${D}${datadir}/atp + + install ${WORKDIR}/start-gem5-atp.sh ${D}${bindir} +} + +addtask addto_recipe_sysroot after do_populate_sysroot before do_build diff --git a/meta-atp/recipes-devtools/gem5/gem5-aarch64-native/start-gem5-atp.sh b/meta-atp/recipes-devtools/atp/atp-gem5/start-gem5-atp.sh similarity index 100% rename from meta-atp/recipes-devtools/gem5/gem5-aarch64-native/start-gem5-atp.sh rename to meta-atp/recipes-devtools/atp/atp-gem5/start-gem5-atp.sh diff --git a/meta-atp/recipes-devtools/gem5/gem5-aarch64-native_20.bbappend b/meta-atp/recipes-devtools/gem5/gem5-aarch64-native_20.bbappend deleted file mode 100644 index 6607f0f8..00000000 --- a/meta-atp/recipes-devtools/gem5/gem5-aarch64-native_20.bbappend +++ /dev/null @@ -1,24 +0,0 @@ -require recipes-devtools/atp/atp-source_3.1.inc - -FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" - -SRC_URI += "${ATP_SRC};destsuffix=git/atp;name=atp \ - file://start-gem5-atp.sh" -SRCREV_FORMAT = "gem5_atp" -SRCREV_atp = "${ATP_REV}" -LICENSE += "& ${ATP_LIC}" -LIC_FILES_CHKSUM += "file://atp/LICENSE;md5=${ATP_LIC_MD5}" - -EXTRA_OESCONS += "EXTRAS=${S}/atp" - -do_install:append() { - # baremetal_atp.py machine configuration and sample stream.atp file - install -m 644 ${B}/atp/gem5/baremetal_atp.py \ - ${B}/atp/configs/stream.atp \ - ${D}${datadir}/gem5/configs -} - -do_deploy:append() { - # start-gem5-atp.sh launch script - install -m 755 ${WORKDIR}/start-gem5-atp.sh ${DEPLOYDIR} -} From patchwork Mon Nov 21 15:43:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jon Mason X-Patchwork-Id: 15811 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 2C6DBC4332F for ; Mon, 21 Nov 2022 15:44:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.41982.1669045439149969758 for ; Mon, 21 Nov 2022 07:43:59 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: jon.mason@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 2CC95150C; Mon, 21 Nov 2022 07:44:05 -0800 (PST) Received: from localhost.localdomain (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 89FD83F73B; Mon, 21 Nov 2022 07:43:58 -0800 (PST) From: Jon Mason To: meta-arm@lists.yoctoproject.org Cc: =?utf-8?q?Adri=C3=A1n_Herrera_Arcila?= Subject: [PATCH 6/7] atp: fix machine overrides in recipes Date: Mon, 21 Nov 2022 10:43:51 -0500 Message-Id: <20221121154352.5061-6-jon.mason@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221121154352.5061-1-jon.mason@arm.com> References: <20221121154352.5061-1-jon.mason@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, 21 Nov 2022 15:44:08 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/4148 From: Adrián Herrera Arcila Ensure meta-atp recipes are only performed if a compatible machine is selected. Signed-off-by: Adrián Herrera Arcila --- meta-atp/recipes-devtools/gem5/gem5-aarch64-dtb.bbappend | 8 +++++--- meta-atp/recipes-kernel/atp/atp-module_3.1.bb | 1 + meta-atp/recipes-kernel/atp/atp-test_3.1.bb | 1 + meta-atp/recipes-kernel/atp/atp-uapi_3.1.bb | 1 + meta-atp/recipes-kernel/linux/linux-yocto_%.bbappend | 4 ++-- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/meta-atp/recipes-devtools/gem5/gem5-aarch64-dtb.bbappend b/meta-atp/recipes-devtools/gem5/gem5-aarch64-dtb.bbappend index 2b55b892..c96f2cdc 100644 --- a/meta-atp/recipes-devtools/gem5/gem5-aarch64-dtb.bbappend +++ b/meta-atp/recipes-devtools/gem5/gem5-aarch64-dtb.bbappend @@ -1,3 +1,5 @@ -# Export datadir paths for baremetal_atp.py script -export GEM5_DATADIR = "${STAGING_DATADIR_NATIVE}/gem5" -export ATP_DATADIR = "${STAGING_DATADIR_NATIVE}/gem5" +do_compile:prepend:gem5-atp-arm64() { + # Export datadir paths for baremetal_atp.py script + export GEM5_DATADIR="${STAGING_DATADIR_NATIVE}/gem5" + export ATP_DATADIR="${STAGING_DATADIR_NATIVE}/gem5" +} diff --git a/meta-atp/recipes-kernel/atp/atp-module_3.1.bb b/meta-atp/recipes-kernel/atp/atp-module_3.1.bb index 0bf4949b..9b54e1c8 100644 --- a/meta-atp/recipes-kernel/atp/atp-module_3.1.bb +++ b/meta-atp/recipes-kernel/atp/atp-module_3.1.bb @@ -1,3 +1,4 @@ +COMPATIBLE_MACHINE = "gem5-atp-arm64" require recipes-devtools/atp/atp-source_3.1.inc inherit module diff --git a/meta-atp/recipes-kernel/atp/atp-test_3.1.bb b/meta-atp/recipes-kernel/atp/atp-test_3.1.bb index e98e13cd..3c88e08d 100644 --- a/meta-atp/recipes-kernel/atp/atp-test_3.1.bb +++ b/meta-atp/recipes-kernel/atp/atp-test_3.1.bb @@ -1,3 +1,4 @@ +COMPATIBLE_MACHINE = "gem5-atp-arm64" require recipes-devtools/atp/atp-source_3.1.inc SUMMARY = "End-to-end tests evaluating ATP kernel modules service correctness" diff --git a/meta-atp/recipes-kernel/atp/atp-uapi_3.1.bb b/meta-atp/recipes-kernel/atp/atp-uapi_3.1.bb index 140105f8..a8b14796 100644 --- a/meta-atp/recipes-kernel/atp/atp-uapi_3.1.bb +++ b/meta-atp/recipes-kernel/atp/atp-uapi_3.1.bb @@ -1,3 +1,4 @@ +COMPATIBLE_MACHINE = "gem5-atp-arm64" require recipes-devtools/atp/atp-source_3.1.inc SUMMARY = "User API for accessing services from ATP kernel modules" diff --git a/meta-atp/recipes-kernel/linux/linux-yocto_%.bbappend b/meta-atp/recipes-kernel/linux/linux-yocto_%.bbappend index f59f8d44..8cb86a97 100644 --- a/meta-atp/recipes-kernel/linux/linux-yocto_%.bbappend +++ b/meta-atp/recipes-kernel/linux/linux-yocto_%.bbappend @@ -1,2 +1,2 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/files:" -SRC_URI += "file://no_ftrace.cfg file://smmuv3.cfg" +FILESEXTRAPATHS:prepend:gem5-atp-arm64 := "${THISDIR}/files:" +SRC_URI:append:gem5-atp-arm64 = " file://no_ftrace.cfg file://smmuv3.cfg" From patchwork Mon Nov 21 15:43:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jon Mason X-Patchwork-Id: 15810 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 2E735C43219 for ; Mon, 21 Nov 2022 15:44:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.41983.1669045439315344659 for ; Mon, 21 Nov 2022 07:43:59 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: jon.mason@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 62E001FB; Mon, 21 Nov 2022 07:44:05 -0800 (PST) Received: from localhost.localdomain (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C6CBB3F73B; Mon, 21 Nov 2022 07:43:58 -0800 (PST) From: Jon Mason To: meta-arm@lists.yoctoproject.org Cc: =?utf-8?q?Adri=C3=A1n_Herrera_Arcila?= Subject: [PATCH 7/7] ci: add meta-atp to check-layers Date: Mon, 21 Nov 2022 10:43:52 -0500 Message-Id: <20221121154352.5061-7-jon.mason@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221121154352.5061-1-jon.mason@arm.com> References: <20221121154352.5061-1-jon.mason@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, 21 Nov 2022 15:44:08 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/4149 From: Adrián Herrera Arcila Signed-off-by: Adrián Herrera Arcila --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7d050a55..6bb42e85 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -210,7 +210,7 @@ check-layers: "yocto-check-layer-wrapper $CI_PROJECT_DIR/$LAYER --dependency $CI_PROJECT_DIR/meta-* $KAS_WORK_DIR/meta-openembedded/meta-oe --no-auto-dependency" parallel: matrix: - - LAYER: [meta-arm, meta-arm-bsp, meta-arm-toolchain, meta-gem5] + - LAYER: [meta-arm, meta-arm-bsp, meta-arm-toolchain, meta-gem5, meta-atp] pending-updates: extends: .setup