From patchwork Fri Nov 3 09:49:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Debbie Martin X-Patchwork-Id: 33536 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 868AEC4332F for ; Fri, 3 Nov 2023 09:50:14 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.46329.1699005006701576651 for ; Fri, 03 Nov 2023 02:50:06 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: debbie.martin@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 AEB242F4 for ; Fri, 3 Nov 2023 02:50:48 -0700 (PDT) Received: from e127725.arm.com (unknown [10.57.2.89]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8141B3F64C for ; Fri, 3 Nov 2023 02:50:05 -0700 (PDT) From: Debbie Martin To: meta-arm@lists.yoctoproject.org Subject: [PATCH 1/5] arm/fvp-base: Update the default testsuites Date: Fri, 3 Nov 2023 09:49:35 +0000 Message-Id: <20231103094939.1290558-1-Debbie.Martin@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 ; Fri, 03 Nov 2023 09:50:14 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/5198 For fvp-base, update the DEFAULT_TEST_SUITES to include fvp_boot and fvp_devices. This is only the default behaviour; individual recipes can override this using the TEST_SUITES variable. Signed-off-by: Debbie Martin --- meta-arm-bsp/conf/machine/fvp-base.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-arm-bsp/conf/machine/fvp-base.conf b/meta-arm-bsp/conf/machine/fvp-base.conf index d202a79f..4e17a3cc 100644 --- a/meta-arm-bsp/conf/machine/fvp-base.conf +++ b/meta-arm-bsp/conf/machine/fvp-base.conf @@ -33,7 +33,7 @@ MACHINE_EXTRA_RRECOMMENDS += "ssh-pregen-hostkeys" TEST_TARGET = "OEFVPTarget" TEST_TARGET_IP = "127.0.0.1:2222" -TEST_SUITES:append = " fvp_boot fvp_devices" +DEFAULT_TEST_SUITES:append = " fvp_boot fvp_devices" TEST_FVP_DEVICES ?= "rtc watchdog networking virtiorng cpu_hotplug" FVP_PROVIDER ?= "fvp-base-a-aem-native" From patchwork Fri Nov 3 09:49:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Debbie Martin X-Patchwork-Id: 33535 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 88026C4167B for ; Fri, 3 Nov 2023 09:50:14 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.46330.1699005011768035582 for ; Fri, 03 Nov 2023 02:50:11 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: debbie.martin@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 EC9202F4; Fri, 3 Nov 2023 02:50:53 -0700 (PDT) Received: from e127725.arm.com (unknown [10.57.2.89]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 98E623F64C; Fri, 3 Nov 2023 02:50:09 -0700 (PDT) From: Debbie Martin To: meta-arm@lists.yoctoproject.org Cc: Diego Sueiro , Peter Hoyes , Qi Feng , Robbie Cao , Vineeth Raveendran Subject: [PATCH 2/5] arm-systemready: Introduce the Arm SystemReady layer Date: Fri, 3 Nov 2023 09:49:36 +0000 Message-Id: <20231103094939.1290558-2-Debbie.Martin@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231103094939.1290558-1-Debbie.Martin@arm.com> References: <20231103094939.1290558-1-Debbie.Martin@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 ; Fri, 03 Nov 2023 09:50:14 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/5199 Add the meta-arm-systemready layer. This provides the infrastructure to load and run the Arm SystemReady IR ACS v2.0.0 prebuilt image and analyze the results. The recipes included are as follows: 1. arm-systemready-firmware: Enables the ARM_SYSTEMREADY_FIRMWARE machine conf variable to be used to specify which firmware packages to deploy. 2. arm-systemready-ir-acs: Runs the Arm SystemReady IR ACS tests from the pre-built images and checks the results adhere to the specification. 3. arm-systemready-linux-distros-[debian|opensuse]: Install the distro of choice from CD/DVD image to target disk image. Signed-off-by: Debbie Martin Signed-off-by: Diego Sueiro Signed-off-by: Peter Hoyes Signed-off-by: Qi Feng Signed-off-by: Robbie Cao Signed-off-by: Tomás González --- .../classes/arm-systemready-acs.bbclass | 161 ++++++++++++++++++ .../classes/extra_imagedepends_only.bbclass | 25 +++ meta-arm-systemready/conf/layer.conf | 15 ++ .../runtime/cases/arm_systemready_ir_acs.py | 37 ++++ .../arm-systemready-firmware.bb | 14 ++ .../python3-construct-native_2.10.68.bb | 13 ++ .../arm-systemready-ir-acs.bb | 61 +++++++ .../arm-systemready-scripts-native.bb | 31 ++++ ...-Return-non-zero-exit-code-on-failur.patch | 37 ++++ ...-sr-results-Device-tree-improvements.patch | 77 +++++++++ .../edk2-test-parser-native.bb | 26 +++ .../arm-systemready-linux-distros-debian.bb | 41 +++++ .../arm-systemready-linux-distros-opensuse.bb | 69 ++++++++ .../arm-systemready-linux-distros.inc | 50 ++++++ 14 files changed, 657 insertions(+) create mode 100644 meta-arm-systemready/classes/arm-systemready-acs.bbclass create mode 100644 meta-arm-systemready/classes/extra_imagedepends_only.bbclass create mode 100644 meta-arm-systemready/conf/layer.conf create mode 100644 meta-arm-systemready/lib/oeqa/runtime/cases/arm_systemready_ir_acs.py create mode 100644 meta-arm-systemready/recipes-bsp/arm-systemready/arm-systemready-firmware.bb create mode 100644 meta-arm-systemready/recipes-devtools/python/python3-construct-native_2.10.68.bb create mode 100644 meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-ir-acs.bb create mode 100644 meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-scripts-native.bb create mode 100644 meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-scripts/0001-check-sr-results-Return-non-zero-exit-code-on-failur.patch create mode 100644 meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-scripts/0002-check-sr-results-Device-tree-improvements.patch create mode 100644 meta-arm-systemready/recipes-test/arm-systemready-acs/edk2-test-parser-native.bb create mode 100644 meta-arm-systemready/recipes-test/arm-systemready-linux-distros/arm-systemready-linux-distros-debian.bb create mode 100644 meta-arm-systemready/recipes-test/arm-systemready-linux-distros/arm-systemready-linux-distros-opensuse.bb create mode 100644 meta-arm-systemready/recipes-test/arm-systemready-linux-distros/arm-systemready-linux-distros.inc diff --git a/meta-arm-systemready/classes/arm-systemready-acs.bbclass b/meta-arm-systemready/classes/arm-systemready-acs.bbclass new file mode 100644 index 00000000..e9888023 --- /dev/null +++ b/meta-arm-systemready/classes/arm-systemready-acs.bbclass @@ -0,0 +1,161 @@ +# This class contains the common logic to deploy the SystemReady ACS pre-built +# image and set up the testimage environment. It is to be inherited by recipes +# which contains the URI to download the SystemReady ACS image. +# This class also contains a testimage "postfunc" called acs_logs_handle which +# performs the following functions after the tests have completed: +# * Extract the acs_results directory from the Wic image to +# ${WORKDIR}/testimage +# * Create a symlink to the acs_results in ${TMPDIR}/log/oeqa for ease of +# access +# * Run the test parser, format results, and check results routines + +INHIBIT_DEFAULT_DEPS = "1" +COMPATIBLE_HOST = "aarch64-*" +PACKAGE_ARCH = "${MACHINE_ARCH}" +inherit nopackages deploy rootfs-postcommands ${IMAGE_CLASSES} python3native + +do_configure[noexec] = "1" +do_compile[noexec] = "1" +do_install[noexec] = "1" +do_testimage[depends] += "mtools-native:do_populate_sysroot" + +# Deploy with this suffix so it is picked up in the machine configuration +IMAGE_DEPLOY_SUFFIX ?= ".wic" + +# Post-process commands may write to IMGDEPLOYDIR +IMGDEPLOYDIR = "${DEPLOYDIR}" +# Write the test data in IMAGE_POSTPROCESS_COMMAND +IMAGE_POSTPROCESS_COMMAND += "write_image_test_data; " + +python do_deploy() { + deploydir = d.getVar('DEPLOYDIR') + suffix = d.getVar('IMAGE_DEPLOY_SUFFIX') + imgfile = os.path.join(d.getVar('WORKDIR'), d.getVar('IMAGE_FILENAME')) + deployfile = os.path.join(deploydir, d.getVar('IMAGE_NAME') + suffix) + linkfile = os.path.join(deploydir, d.getVar('IMAGE_LINK_NAME') + suffix) + + # Install the image file in the deploy directory + import shutil + shutil.copyfile(imgfile, deployfile) + if os.path.lexists(linkfile): + os.remove(manifest_link) + os.symlink(os.path.basename(deployfile), linkfile) + + # Run the image post-process commands + from oe.utils import execute_pre_post_process + post_process_cmds = d.getVar("IMAGE_POSTPROCESS_COMMAND") + execute_pre_post_process(d, post_process_cmds) + + # Copy the report.txt to DEPLOYDIR + # The machine-specific implementation can optionally put the report file in + # ${WORKDIR}/report.txt. If there is no such file present, use the template. + workdir = d.getVar('WORKDIR') + report_file = os.path.join(workdir, "report.txt") + report_file_dest = os.path.join(deploydir, "report.txt") + if os.path.exists(report_file): + report_file_to_copy = report_file + else: + report_file_to_copy = os.path.join(workdir, "systemready-ir-template", + "report.txt") + shutil.copyfile(report_file_to_copy, report_file_dest) + + # Ensure an empty rootfs manifest exists (required by testimage) + fname = os.path.join(deploydir, d.getVar('IMAGE_LINK_NAME') + ".manifest") + open(fname, 'w').close() +} +addtask deploy after do_install before do_image_complete + +do_image_complete() { + true +} +addtask image_complete after do_deploy before do_build +do_image_complete[depends] += "arm-systemready-firmware:do_image_complete" + +ACS_LOG_NAME = "acs_results_${DATETIME}" +ACS_LOG_NAME[vardepsexclude] += "DATETIME" +ACS_LOG_DIR = "${TEST_LOG_DIR}/${ACS_LOG_NAME}" +ACS_LOG_LINK = "${TEST_LOG_DIR}/acs_results" +TEST_LOG_DIR = "${WORKDIR}/testimage" +RM_WORK_EXCLUDE_ITEMS += "${@ os.path.basename(d.getVar('TEST_LOG_DIR')) }" + +do_testimage[postfuncs] += "acs_logs_handle" +do_testimage[depends] += "edk2-test-parser-native:do_populate_sysroot \ + arm-systemready-scripts-native:do_populate_sysroot" + +# Process the logs +python acs_logs_handle() { + import logging + from oeqa.utils import make_logger_bitbake_compatible + import shutil + + deploy_dir_image = d.getVar('DEPLOY_DIR_IMAGE') + systemready_scripts_dir = os.path.join(d.getVar('STAGING_LIBDIR_NATIVE'), + "systemready_scripts") + edk2_test_parser_dir = os.path.join(d.getVar('STAGING_LIBDIR_NATIVE'), + "edk2_test_parser") + deployfile = os.path.join(deploy_dir_image, d.getVar('IMAGE_LINK_NAME') + + d.getVar('IMAGE_DEPLOY_SUFFIX')) + + testimage_dir = d.getVar('TEST_LOG_DIR') + logdir = d.getVar('ACS_LOG_DIR') + loglink = d.getVar('ACS_LOG_LINK') + + # Copy the report.txt file from DEPLOY_DIR_IMAGE + report_file = os.path.join(deploy_dir_image, "report.txt") + report_file_dest = os.path.join(testimage_dir, "report.txt") + shutil.copyfile(report_file, report_file_dest) + + # Extract the log files from the Wic image to the testimage logs directory + resultspath = deployfile + ':3/acs_results' + import subprocess + subprocess.run(['wic', 'cp', resultspath, logdir], check=True) + + # Create a symlink to the acs_results directory + if os.path.lexists(loglink): + os.remove(loglink) + os.symlink(os.path.basename(logdir), loglink) + + # Create a top-level symlink to the acs_results directory + top_logdir = os.path.join(get_testimage_json_result_dir(d), d.getVar("PN")) + log_name = d.getVar('ACS_LOG_NAME') + top_link = os.path.join(top_logdir, log_name) + log_target = os.path.relpath(logdir, top_logdir) + os.symlink(log_target, top_link) + + # Parse the logs and generate results file + logger = make_logger_bitbake_compatible(logging.getLogger("BitBake")) + + sct_log = os.path.join(logdir, 'sct_results', 'Overall', 'Summary.ekl') + sct_seq = os.path.join(logdir, 'sct_results', 'Sequence', 'EBBR.seq') + + parser_path = os.path.join(edk2_test_parser_dir, "parser.py") + # format-sr-results.py needs the output file to be called "result.md" + subprocess.run([parser_path, sct_log, sct_seq, "--md", + os.path.join(logdir, "result.md")], check=True) + + scripts_path = os.path.join(systemready_scripts_dir, + "format-sr-results.py") + summary_path = os.path.join(testimage_dir, "summary.md") + subprocess.run([scripts_path, "--dir", testimage_dir, "--md", summary_path], + check=True) + + # Symlink acs-console.log to default_log + subprocess.run(["ln", "-sf", os.path.join(testimage_dir, "default_log"), + os.path.join(testimage_dir, "acs-console.log")], check=True) + + # Run the check-sr-results.py systemready script to check the results + check_sr_results_log_path = os.path.join(testimage_dir, + "check_sr_results.log") + with open(check_sr_results_log_path, "w") as f: + check_sr_results_path = os.path.join(systemready_scripts_dir, + "check-sr-results.py") + try: + subprocess.run([check_sr_results_path, "--dir", testimage_dir, + "--print-meta", "--debug"], + stdout=f, stderr=f, text=True, check=True) + except subprocess.CalledProcessError: + logger.error(f"ACS run failed the check SystemReady results. See " + f"{summary_path} and {check_sr_results_log_path} for " + f"details of the error.") + raise bb.BBHandledException() +} diff --git a/meta-arm-systemready/classes/extra_imagedepends_only.bbclass b/meta-arm-systemready/classes/extra_imagedepends_only.bbclass new file mode 100644 index 00000000..bf06a9f4 --- /dev/null +++ b/meta-arm-systemready/classes/extra_imagedepends_only.bbclass @@ -0,0 +1,25 @@ +# This class is to be inherited by recipes interested in only deploying what is +# listed in the EXTRA_IMAGEDEPENDS. +# It is inheriting the image.bbclass to make sure that the +# image_license.manifest is generated. + +IMAGE_FSTYPES = "" + +inherit image + +IMAGE_FEATURES = "" +EXTRA_IMAGE_FEATURES = "" + +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS = "" +RDEPENDS = "" +RRECOMMENDS = "" + +deltask do_prepare_recipe_sysroot +deltask do_flush_pseudodb +deltask do_image_qa +do_rootfs[depends] = "" +do_rootfs[noexec] = "1" +do_image[noexec] = "1" +do_image_complete[noexec] = "1" +do_build[depends] = "" diff --git a/meta-arm-systemready/conf/layer.conf b/meta-arm-systemready/conf/layer.conf new file mode 100644 index 00000000..27bb568e --- /dev/null +++ b/meta-arm-systemready/conf/layer.conf @@ -0,0 +1,15 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "meta-arm-systemready" +BBFILE_PATTERN_meta-arm-systemready = "^${LAYERDIR}/" + +LAYERSERIES_COMPAT_meta-arm-systemready = "nanbield" + +LAYERDEPENDS_meta-arm-systemready = "core" + +addpylib ${LAYERDIR}/lib oeqa diff --git a/meta-arm-systemready/lib/oeqa/runtime/cases/arm_systemready_ir_acs.py b/meta-arm-systemready/lib/oeqa/runtime/cases/arm_systemready_ir_acs.py new file mode 100644 index 00000000..518d1aa2 --- /dev/null +++ b/meta-arm-systemready/lib/oeqa/runtime/cases/arm_systemready_ir_acs.py @@ -0,0 +1,37 @@ +from oeqa.runtime.case import OERuntimeTestCase + + +class SystemReadyACSTest(OERuntimeTestCase): + def setUp(self): + self.console = self.td.get('ARM_SYSTEMREADY_ACS_CONSOLE') + self.assertNotEqual(self.console, '', + msg='ARM_SYSTEMREADY_ACS_CONSOLE is not set') + + def test_acs(self): + """ + The purpose of this test case is to detect any issues with the ACS + tests themselves. The intention is to fail only if there is an issue + running the tests, not if an ACS test fails + """ + self.target.transition('on') + # The tests finish on a root shell + test_patterns = [r'([a-zA-Z0-9_ ]+): \[([a-zA-Z_ ]+)\]', + 'ACS run is completed'] # Signifies successful completion + + while True: + match_id = self.target.expect(self.console, test_patterns, + timeout=10*60*60) + if match_id == 0: + # A test group's result has been printed + matches = self.target.match(self.console) + group_name = matches[1].decode().strip() + status = matches[2].decode().strip() + self.logger.info(f'Test Group ({group_name}): {status}') + elif match_id == 1: + break + + # Workaround to ensure the model syncs the log files to disk + self.target.sendline(self.console, r'sync /mnt') + self.target.expect(self.console, r'root@generic-arm64:~#') + + self.logger.info('Linux tests complete') diff --git a/meta-arm-systemready/recipes-bsp/arm-systemready/arm-systemready-firmware.bb b/meta-arm-systemready/recipes-bsp/arm-systemready/arm-systemready-firmware.bb new file mode 100644 index 00000000..54ffc859 --- /dev/null +++ b/meta-arm-systemready/recipes-bsp/arm-systemready/arm-systemready-firmware.bb @@ -0,0 +1,14 @@ +SUMMARY = "Arm SystemReady Firmware Image" +DESCRIPTION = "This recipe ensures that all packages listed in \ +ARM_SYSTEMREADY_FIRMWARE variable (set at machine conf) are deployed." + +EXTRA_IMAGEDEPENDS = "${ARM_SYSTEMREADY_FIRMWARE}" + +inherit extra_imagedepends_only + +python() { + if not d.getVar("ARM_SYSTEMREADY_FIRMWARE"): + raise bb.parse.SkipRecipe("ARM_SYSTEMREADY_FIRMWARE needs to be set") +} + +do_testimage[noexec] = "1" diff --git a/meta-arm-systemready/recipes-devtools/python/python3-construct-native_2.10.68.bb b/meta-arm-systemready/recipes-devtools/python/python3-construct-native_2.10.68.bb new file mode 100644 index 00000000..5e39ae72 --- /dev/null +++ b/meta-arm-systemready/recipes-devtools/python/python3-construct-native_2.10.68.bb @@ -0,0 +1,13 @@ +SUMMARY = "A powerful declarative symmetric parser/builder for binary data" +HOMEPAGE = "https://github.com/construct/construct" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=202b39559c1c79fe4715ce81e9e0ac02" + +PYPI_PACKAGE = "construct" + +SRC_URI[sha256sum] = "7b2a3fd8e5f597a5aa1d614c3bd516fa065db01704c72a1efaaeec6ef23d8b45" + +inherit pypi +inherit setuptools3 +inherit native diff --git a/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-ir-acs.bb b/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-ir-acs.bb new file mode 100644 index 00000000..f9226c31 --- /dev/null +++ b/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-ir-acs.bb @@ -0,0 +1,61 @@ +SUMMARY = "Arm SystemReady IR ACS" +DESCRIPTION = "Arm SystemReady IR Architecture Compliance Suite prebuilt image" + +LICENSE = "AFL-2.1 & Apache-2.0 & BSD-2-Clause & BSD-2-Clause-Patent \ + & BSD-3-Clause & BSD-4-Clause & bzip2-1.0.4 & bzip2-1.0.6 & CC-BY-SA-4.0 \ + & curl & GPL-2.0-only & GPL-2.0-or-later & GPL-3.0-only \ + & GPL-3.0-or-later & GPL-3.0-with-GCC-exception & ISC \ + & LGPL-2.0-only & LGPL-2.0-or-later & LGPL-2.1-only \ + & LGPL-2.1-or-later & LGPL-3.0-only & MIT & MPL-2.0 & PD & PSF-2.0 \ + & Python-2.0 & Unicode-DFS-2016 & Unicode-TOU & Zlib" +LIC_FILES_CHKSUM = "\ +file://${COMMON_LICENSE_DIR}/AFL-2.1;md5=e40039b90e182a056bcd9ad3e47ddd71 \ +file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10 \ +file://${COMMON_LICENSE_DIR}/BSD-2-Clause;md5=cb641bc04cda31daea161b1bc15da69f \ +file://${COMMON_LICENSE_DIR}/BSD-2-Clause-Patent;md5=0518d409dae93098cca8dfa932f3ab1b \ +file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9 \ +file://${COMMON_LICENSE_DIR}/BSD-4-Clause;md5=624d9e67e8ac41a78f6b6c2c55a83a2b \ +file://${COMMON_LICENSE_DIR}/bzip2-1.0.4;md5=452e1b423688222dcfc3cb9462c92902 \ +file://${COMMON_LICENSE_DIR}/bzip2-1.0.6;md5=841c5495611ae95b13e80fa4a0627333 \ +file://${COMMON_LICENSE_DIR}/CC-BY-SA-4.0;md5=4084714af41157e38872e798eb3fe1b1 \ +file://${COMMON_LICENSE_DIR}/curl;md5=f7adb1397db248527ffed14d947e445c \ +file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6 \ +file://${COMMON_LICENSE_DIR}/GPL-2.0-or-later;md5=fed54355545ffd980b814dab4a3b312c \ +file://${COMMON_LICENSE_DIR}/GPL-3.0-only;md5=c79ff39f19dfec6d293b95dea7b07891 \ +file://${COMMON_LICENSE_DIR}/GPL-3.0-or-later;md5=1c76c4cc354acaac30ed4d5eefea7245 \ +file://${COMMON_LICENSE_DIR}/GPL-3.0-with-GCC-exception;md5=aef5f35c9272f508be848cd99e0151df \ +file://${COMMON_LICENSE_DIR}/ISC;md5=f3b90e78ea0cffb20bf5cca7947a896d \ +file://${COMMON_LICENSE_DIR}/LGPL-2.0-only;md5=9427b8ccf5cf3df47c29110424c9641a \ +file://${COMMON_LICENSE_DIR}/LGPL-2.0-or-later;md5=6d2d9952d88b50a51a5c73dc431d06c7 \ +file://${COMMON_LICENSE_DIR}/LGPL-2.1-only;md5=1a6d268fd218675ffea8be556788b780 \ +file://${COMMON_LICENSE_DIR}/LGPL-2.1-or-later;md5=2a4f4fd2128ea2f65047ee63fbca9f68 \ +file://${COMMON_LICENSE_DIR}/LGPL-3.0-only;md5=bfccfe952269fff2b407dd11f2f3083b \ +file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \ +file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad \ +file://${COMMON_LICENSE_DIR}/PD;md5=b3597d12946881e13cb3b548d1173851 \ +file://${COMMON_LICENSE_DIR}/PSF-2.0;md5=76c1502273262a5ebefb50dfb20d7c4f \ +file://${COMMON_LICENSE_DIR}/Python-2.0;md5=a5c8025e305fb49e6d405769358851f6 \ +file://${COMMON_LICENSE_DIR}/Unicode-DFS-2016;md5=907371994d651afe53e98adc27824669 \ +file://${COMMON_LICENSE_DIR}/Unicode-TOU;md5=666362dc5dba74f477af0f44fb85bd22 \ +file://${COMMON_LICENSE_DIR}/Zlib;md5=87f239f408daca8a157858e192597633 \ +" +IMAGE_CLASSES:remove = "license_image" + +COMPATIBLE_MACHINE = "fvp-*" + +TEST_SUITES = "arm_systemready_ir_acs" + +PV = "2.0.0" +PV_DATE = "23.03" +FULL_PV = "v${PV_DATE}_${PV}" +ARM_SYSTEMREADY_IR_ACS_BRANCH ?= "main" +IMAGE_FILENAME = "ir-acs-live-image-generic-arm64.wic" +SRC_URI = " \ + https://github.com/ARM-software/arm-systemready/raw/${ARM_SYSTEMREADY_IR_ACS_BRANCH}/IR/prebuilt_images/${FULL_PV}/${IMAGE_FILENAME}.xz;name=acs-img \ + git://git.gitlab.arm.com/systemready/systemready-ir-template.git;protocol=https;nobranch=1;destsuffix=systemready-ir-template;name=sr-ir-template \ +" +SRC_URI[acs-img.sha256sum] = "ea52f84dab44bde97de3e2d2224d883acaae35724dd8e2bdfb125de49040f9b3" +# Revision pointing to v2023.04 tag +SRCREV_sr-ir-template = "c714db178ddf72e5ae5017f15421095297d5bf0e" + +inherit arm-systemready-acs diff --git a/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-scripts-native.bb b/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-scripts-native.bb new file mode 100644 index 00000000..ccc87ed2 --- /dev/null +++ b/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-scripts-native.bb @@ -0,0 +1,31 @@ +SUMMARY = "System Ready Scripts" +DESCRIPTION = "A collection of scripts to help with SystemReady compliance." +HOMEPAGE = "https://gitlab.arm.com/systemready/systemready-scripts" + +inherit native + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=85b7d439a311c22626c2e3f05daf628e" + +RDEPENDS:${PN} = "python3-packaging-native python3-pyyaml-native \ +python3-chardet-native python3-requests-native python3-construct-native \ +dtc-native python3-dtschema-wrapper-native" + +PV = "v2023.04" +S = "${WORKDIR}/git" +SRC_URI = "\ + git://git.gitlab.arm.com/systemready/systemready-scripts.git;protocol=https;nobranch=1 \ + file://0001-check-sr-results-Return-non-zero-exit-code-on-failur.patch \ + file://0002-check-sr-results-Device-tree-improvements.patch \ +" + +# The SRCREV is at the v2023.04 tag +SRCREV = "f8244ab8da09f9e6005ceff81ebb234f35a2a698" + +do_install() { + install -d ${D}/${libdir}/systemready_scripts + cp -r ${S}/* ${D}/${libdir}/systemready_scripts +} + +do_configure[noexec] = "1" +do_compile[noexec] = "1" diff --git a/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-scripts/0001-check-sr-results-Return-non-zero-exit-code-on-failur.patch b/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-scripts/0001-check-sr-results-Return-non-zero-exit-code-on-failur.patch new file mode 100644 index 00000000..6a95881d --- /dev/null +++ b/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-scripts/0001-check-sr-results-Return-non-zero-exit-code-on-failur.patch @@ -0,0 +1,37 @@ +From ad8f2826f6e2cefb630f7fc2c7c99857f224e109 Mon Sep 17 00:00:00 2001 +From: Debbie Martin +Date: Tue, 5 Sep 2023 21:37:46 +0100 +Subject: [PATCH] check-sr-results: Return non-zero exit code on failure + +Return a non-zero exit code if there are any warnings or errors found. + +Upstream-Status: Pending +Signed-off-by: Debbie Martin +--- + check-sr-results.py | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/check-sr-results.py b/check-sr-results.py +index 12b89cd..48658f0 100755 +--- a/check-sr-results.py ++++ b/check-sr-results.py +@@ -185,6 +185,9 @@ class Stats: + def inc_error(self): + self._inc('error') + ++ def has_warnings_or_errors(self): ++ return self.data['warning'] or self.data['error'] ++ + + # Download (possibly large) file from URL. + # We raise an exception in case of issue. +@@ -1519,3 +1522,6 @@ if __name__ == '__main__': + if args.print_meta: + print() + print_meta() ++ ++ if stats.has_warnings_or_errors(): ++ exit(1) +-- +2.25.1 + diff --git a/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-scripts/0002-check-sr-results-Device-tree-improvements.patch b/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-scripts/0002-check-sr-results-Device-tree-improvements.patch new file mode 100644 index 00000000..f76a03ad --- /dev/null +++ b/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-scripts/0002-check-sr-results-Device-tree-improvements.patch @@ -0,0 +1,77 @@ +From 53ceb2d4167b05374678b966031b3d52fc5080a2 Mon Sep 17 00:00:00 2001 +From: Debbie Martin +Date: Fri, 29 Sep 2023 15:22:17 +0100 +Subject: [PATCH] check-sr-results: Device tree improvements + +Make check-sr-results.py accept 'extra_compat' configuration for +devicetree files, and pass these in the compat list given to +dt-parser.py. + +Update dt-parser.py to parse the GCC version line in the dtb log. + +Upstream-Status: Pending +Signed-off-by: Debbie Martin +--- + check-sr-results.py | 12 ++++++++++-- + dt-parser.py | 8 ++++++++ + 2 files changed, 18 insertions(+), 2 deletions(-) + +diff --git a/check-sr-results.py b/check-sr-results.py +index 48658f0..a207a39 100755 +--- a/check-sr-results.py ++++ b/check-sr-results.py +@@ -598,7 +598,7 @@ def need_regen(filename, deps, margin=0): + # We run dtc and dt-validate to produce the log when needed. + # We add markers to the log, which will be ignored by dt-parser.py. + # We return a Stats object. +-def check_devicetree(filename): ++def check_devicetree(filename, extra_compat=None): + logging.debug(f"Check Devicetree `{filename}'") + stats = Stats() + log = f"{filename}.log" +@@ -644,6 +644,9 @@ def check_devicetree(filename): + # We use the compatible strings extracted from Linux bindings to filter out + # more false positive. + compat = get_compat() ++ if extra_compat: ++ with open(compat, "a") as compat_file: ++ compat_file.write("\n".join(extra_compat)) + cp = run(f"{dt_parser} --compatibles '{compat}' '{log}'") + + if cp.returncode: +@@ -930,7 +933,12 @@ def check_file(conffile, filename): + stats.add(check_uefi_capsule(filename)) + + if 'devicetree' in conffile: +- stats.add(check_devicetree(filename)) ++ stats.add( ++ check_devicetree( ++ filename, ++ extra_compat=conffile.get("extra_compat") ++ ) ++ ) + + if 'uefi-sniff' in conffile: + stats.add(check_uefi_sniff(filename)) +diff --git a/dt-parser.py b/dt-parser.py +index 3eccd74..c1c0031 100755 +--- a/dt-parser.py ++++ b/dt-parser.py +@@ -181,6 +181,14 @@ def parse(filename): + } + continue + ++ # line [GCC ] ++ m = re.match(r'\[GCC [0-9\.]+\]', line) ++ if m: ++ logging.debug( ++ f"line {i}: GCC version (`{line}')" ++ ) ++ continue ++ + # If we could not parse the line we arrive here and complain. + logging.warning(f"Unparsed line {i}: `{line}'") + +-- +2.25.1 + diff --git a/meta-arm-systemready/recipes-test/arm-systemready-acs/edk2-test-parser-native.bb b/meta-arm-systemready/recipes-test/arm-systemready-acs/edk2-test-parser-native.bb new file mode 100644 index 00000000..ad93c41e --- /dev/null +++ b/meta-arm-systemready/recipes-test/arm-systemready-acs/edk2-test-parser-native.bb @@ -0,0 +1,26 @@ +SUMMARY = "EDK2 Test Parser" +DESCRIPTION = "EDK2 Test Parser for parsing the results of UEFI SCT tests" +HOMEPAGE = "https://gitlab.arm.com/systemready/edk2-test-parser" + +inherit native + +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c0550be4b3b9c0223efd0eaa70dc9085" + +RDEPENDS:${PN} = "python3-packaging-native python3-pyyaml-native \ + python3-jsonschema-native" + +PV = "v2023.04" +S = "${WORKDIR}/git" +SRC_URI = "git://git.gitlab.arm.com/systemready/edk2-test-parser.git;protocol=https;nobranch=1" + +# The SRCREV is at the v2023.04 tag +SRCREV = "e8cdb692592d2a152cb87cf4d9fbd7ba2ae8b405" + +do_install() { + install -d ${D}/${libdir}/edk2_test_parser + cp -r ${S}/* ${D}/${libdir}/edk2_test_parser +} + +do_configure[noexec] = "1" +do_compile[noexec] = "1" diff --git a/meta-arm-systemready/recipes-test/arm-systemready-linux-distros/arm-systemready-linux-distros-debian.bb b/meta-arm-systemready/recipes-test/arm-systemready-linux-distros/arm-systemready-linux-distros-debian.bb new file mode 100644 index 00000000..04faa3a9 --- /dev/null +++ b/meta-arm-systemready/recipes-test/arm-systemready-linux-distros/arm-systemready-linux-distros-debian.bb @@ -0,0 +1,41 @@ +require arm-systemready-linux-distros.inc + +LICENSE = "GPL-1.0-only & GPL-1.0-or-later & GPL-2.0-only & GPL-2.0-or-later \ + & GPL-3.0-only & GPL-3.0-or-later & LGPL-2.0-only \ + & LGPL-2.0-or-later & LGPL-2.1-only & LGPL-2.1-or-later \ + & LGPL-3.0-only & LGPL-3.0-or-later & BSD-3-Clause & BSD-4-Clause \ + & Artistic-1.0-Perl & Apache-1.0 & Apache-1.1 & Apache-2.0 & Zlib \ + & Python-2.0 & Ruby & PHP-3.01 & W3C-20150513 & OpenSSL & Sleepycat" +LIC_FILES_CHKSUM = "\ +file://${COMMON_LICENSE_DIR}/GPL-1.0-only;md5=e9e36a9de734199567a4d769498f743d \ +file://${COMMON_LICENSE_DIR}/GPL-1.0-or-later;md5=30c0b8a5048cc2f4be5ff15ef0d8cf61 \ +file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6 \ +file://${COMMON_LICENSE_DIR}/GPL-2.0-or-later;md5=fed54355545ffd980b814dab4a3b312c \ +file://${COMMON_LICENSE_DIR}/GPL-3.0-only;md5=c79ff39f19dfec6d293b95dea7b07891 \ +file://${COMMON_LICENSE_DIR}/GPL-3.0-or-later;md5=1c76c4cc354acaac30ed4d5eefea7245 \ +file://${COMMON_LICENSE_DIR}/LGPL-2.0-only;md5=9427b8ccf5cf3df47c29110424c9641a \ +file://${COMMON_LICENSE_DIR}/LGPL-2.0-or-later;md5=6d2d9952d88b50a51a5c73dc431d06c7 \ +file://${COMMON_LICENSE_DIR}/LGPL-2.1-only;md5=1a6d268fd218675ffea8be556788b780 \ +file://${COMMON_LICENSE_DIR}/LGPL-2.1-or-later;md5=2a4f4fd2128ea2f65047ee63fbca9f68 \ +file://${COMMON_LICENSE_DIR}/LGPL-3.0-only;md5=bfccfe952269fff2b407dd11f2f3083b \ +file://${COMMON_LICENSE_DIR}/LGPL-3.0-or-later;md5=c51d3eef3be114124d11349ca0d7e117 \ +file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9 \ +file://${COMMON_LICENSE_DIR}/BSD-4-Clause;md5=624d9e67e8ac41a78f6b6c2c55a83a2b \ +file://${COMMON_LICENSE_DIR}/Artistic-1.0-Perl;md5=8feedd169dbd5738981843bd7d931f9f \ +file://${COMMON_LICENSE_DIR}/Apache-1.0;md5=9f7a9503b805de9158a2a31a2cef4b70 \ +file://${COMMON_LICENSE_DIR}/Apache-1.1;md5=61cc638ff95ff4f38f243855bcec4317 \ +file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10 \ +file://${COMMON_LICENSE_DIR}/Zlib;md5=87f239f408daca8a157858e192597633 \ +file://${COMMON_LICENSE_DIR}/Python-2.0;md5=a5c8025e305fb49e6d405769358851f6 \ +file://${COMMON_LICENSE_DIR}/Ruby;md5=105fc57d3f4d3122db32912f3e6107d0 \ +file://${COMMON_LICENSE_DIR}/PHP-3.01;md5=3363e286b5882ec667a6ebd86e0d9d91 \ +file://${COMMON_LICENSE_DIR}/W3C-20150513;md5=9ff23a699fca546a380855dd40d12d4f \ +file://${COMMON_LICENSE_DIR}/OpenSSL;md5=4eb1764f3e65fafa1a25057f9082f2ae \ +file://${COMMON_LICENSE_DIR}/Sleepycat;md5=1cbb64231c94198653282f3ccab88ffb \ +" + +PV = "11.7.0" +# netinst, DVD-1 +ISO_TYPE = "netinst" +SRC_URI = "https://cdimage.debian.org/mirror/cdimage/archive/${PV}/arm64/iso-cd/debian-${PV}-arm64-${ISO_TYPE}.iso;unpack=0;downloadfilename=${ISO_IMAGE_NAME}.iso" +SRC_URI[sha256sum] = "174caba674fe3172938439257156b9cb8940bb5fd5ddf124256e81ec00ec460d" diff --git a/meta-arm-systemready/recipes-test/arm-systemready-linux-distros/arm-systemready-linux-distros-opensuse.bb b/meta-arm-systemready/recipes-test/arm-systemready-linux-distros/arm-systemready-linux-distros-opensuse.bb new file mode 100644 index 00000000..13e4355d --- /dev/null +++ b/meta-arm-systemready/recipes-test/arm-systemready-linux-distros/arm-systemready-linux-distros-opensuse.bb @@ -0,0 +1,69 @@ +require arm-systemready-linux-distros.inc + +LICENSE = "AGPL-3.0-only & Apache-2.0 & Artistic-1.0 & Artistic-2.0 \ + & BSD-2-Clause-Patent & BSD-2-Clause & BSD-3-Clause & BSD-4-Clause \ + & CC-BY-3.0 & CC-BY-4.0 & CC-BY-SA-1.0 & CC-BY-SA-3.0 \ + & CC-BY-SA-4.0 & CC0-1.0 & CDDL-1.0 & GFDL-1.1-only \ + & GFDL-1.2-only & GFDL-1.3-only & GFDL-1.3-or-later \ + & GPL-1.0-or-later & GPL-2.0-only & GPL-2.0-or-later \ + & GPL-3.0-only & GPL-3.0-or-later & HPND & ICU & IPA \ + & ISC & LGPL-2.0-only & LGPL-2.0-or-later & LGPL-2.1-only \ + & LGPL-2.1-or-later & LGPL-3.0-only & LGPL-3.0-or-later \ + & LPPL-1.3c & MIT & MPL-1.1 & MPL-2.0 & OFL-1.1 & OLDAP-2.8 \ + & OpenSSL & Python-2.0 & Vim & W3C" + +LIC_FILES_CHKSUM = "\ +file://${COMMON_LICENSE_DIR}/AGPL-3.0-only;md5=73f1eb20517c55bf9493b7dd6e480788 \ +file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10 \ +file://${COMMON_LICENSE_DIR}/Artistic-1.0;md5=cda03bbdc3c1951996392b872397b798 \ +file://${COMMON_LICENSE_DIR}/Artistic-2.0;md5=8bbc66f0ba93cec26ef526117e280266 \ +file://${COMMON_LICENSE_DIR}/BSD-2-Clause-Patent;md5=0518d409dae93098cca8dfa932f3ab1b \ +file://${COMMON_LICENSE_DIR}/BSD-2-Clause;md5=cb641bc04cda31daea161b1bc15da69f \ +file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9 \ +file://${COMMON_LICENSE_DIR}/BSD-4-Clause;md5=624d9e67e8ac41a78f6b6c2c55a83a2b \ +file://${COMMON_LICENSE_DIR}/CC-BY-3.0;md5=dfa02b5755629022e267f10b9c0a2ab7 \ +file://${COMMON_LICENSE_DIR}/CC-BY-4.0;md5=9b33bbd06fb58995fb0e299cd38d1838 \ +file://${COMMON_LICENSE_DIR}/CC-BY-SA-1.0;md5=681ffad43a0addd90f1bebf45675104e \ +file://${COMMON_LICENSE_DIR}/CC-BY-SA-3.0;md5=3248afbd148270ac7337a6f3e2558be5 \ +file://${COMMON_LICENSE_DIR}/CC-BY-SA-4.0;md5=4084714af41157e38872e798eb3fe1b1 \ +file://${COMMON_LICENSE_DIR}/CC0-1.0;md5=0ceb3372c9595f0a8067e55da801e4a1 \ +file://${COMMON_LICENSE_DIR}/CDDL-1.0;md5=d63dcc9297f2efd6c18d1e560b807bc6 \ +file://${COMMON_LICENSE_DIR}/GFDL-1.1-only;md5=03322744a1a73f36ebf29f98cced39a4 \ +file://${COMMON_LICENSE_DIR}/GFDL-1.2-only;md5=9f58808219e9a42ff1228309d6f83dc6 \ +file://${COMMON_LICENSE_DIR}/GFDL-1.3-only;md5=e0771ae6a62dc8a2e50b1d450fea66b7 \ +file://${COMMON_LICENSE_DIR}/GFDL-1.3-or-later;md5=e0771ae6a62dc8a2e50b1d450fea66b7 \ +file://${COMMON_LICENSE_DIR}/GPL-1.0-or-later;md5=30c0b8a5048cc2f4be5ff15ef0d8cf61 \ +file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6 \ +file://${COMMON_LICENSE_DIR}/GPL-2.0-or-later;md5=fed54355545ffd980b814dab4a3b312c \ +file://${COMMON_LICENSE_DIR}/GPL-3.0-only;md5=c79ff39f19dfec6d293b95dea7b07891 \ +file://${COMMON_LICENSE_DIR}/GPL-3.0-or-later;md5=1c76c4cc354acaac30ed4d5eefea7245 \ +file://${COMMON_LICENSE_DIR}/HPND;md5=faa364b3e3c6db0f74cc0e704ddf6b9c \ +file://${COMMON_LICENSE_DIR}/ICU;md5=4d85ad1f393add71dc66bcf78e3ee584 \ +file://${COMMON_LICENSE_DIR}/IPA;md5=17b18da2d8b2c43c598aa7583229ef1b \ +file://${COMMON_LICENSE_DIR}/ISC;md5=f3b90e78ea0cffb20bf5cca7947a896d \ +file://${COMMON_LICENSE_DIR}/LGPL-2.0-only;md5=9427b8ccf5cf3df47c29110424c9641a \ +file://${COMMON_LICENSE_DIR}/LGPL-2.0-or-later;md5=6d2d9952d88b50a51a5c73dc431d06c7 \ +file://${COMMON_LICENSE_DIR}/LGPL-2.1-only;md5=1a6d268fd218675ffea8be556788b780 \ +file://${COMMON_LICENSE_DIR}/LGPL-2.1-or-later;md5=2a4f4fd2128ea2f65047ee63fbca9f68 \ +file://${COMMON_LICENSE_DIR}/LGPL-3.0-only;md5=bfccfe952269fff2b407dd11f2f3083b \ +file://${COMMON_LICENSE_DIR}/LGPL-3.0-or-later;md5=c51d3eef3be114124d11349ca0d7e117 \ +file://${COMMON_LICENSE_DIR}/LPPL-1.3c;md5=ba2fa6fe055623756de43a298d88a8b3 \ +file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \ +file://${COMMON_LICENSE_DIR}/MPL-1.1;md5=1d38e87ed8d522c49f04e1efe0fab3ab \ +file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad \ +file://${COMMON_LICENSE_DIR}/OFL-1.1;md5=fac3a519e5e9eb96316656e0ca4f2b90 \ +file://${COMMON_LICENSE_DIR}/OLDAP-2.8;md5=bb28ada4fbb5c3f52c233899b2e410a5 \ +file://${COMMON_LICENSE_DIR}/OpenSSL;md5=4eb1764f3e65fafa1a25057f9082f2ae \ +file://${COMMON_LICENSE_DIR}/Python-2.0;md5=a5c8025e305fb49e6d405769358851f6 \ +file://${COMMON_LICENSE_DIR}/Vim;md5=676d28582e2dca824e7e309a9865eeb1 \ +file://${COMMON_LICENSE_DIR}/W3C;md5=4b1d0384b406508a63e51f7c69687700 \ +" + +ARM_SYSTEMREADY_LINUX_DISTRO_INSTALL_SIZE = "6144" + +PV = "15.4" +# possible value of ISO_TYPE: NET, DVD +ISO_TYPE = "DVD" +BUILD_NO = "243.2" +SRC_URI = "https://download.opensuse.org/distribution/leap/${PV}/iso/openSUSE-Leap-${PV}-${ISO_TYPE}-aarch64-Build${BUILD_NO}-Media.iso;unpack=0;downloadfilename=${ISO_IMAGE_NAME}.iso" +SRC_URI[sha256sum] = "d87f79b2b723f9baaeedd9e2be0365c04081e51a4f7f7f08c7ab3eee0c3e0fae" diff --git a/meta-arm-systemready/recipes-test/arm-systemready-linux-distros/arm-systemready-linux-distros.inc b/meta-arm-systemready/recipes-test/arm-systemready-linux-distros/arm-systemready-linux-distros.inc new file mode 100644 index 00000000..e247a427 --- /dev/null +++ b/meta-arm-systemready/recipes-test/arm-systemready-linux-distros/arm-systemready-linux-distros.inc @@ -0,0 +1,50 @@ +SUMMARY = "Arm SystemReady Linux distros installation" +DESCRIPTION = "Arm SystemReady Linux distro CD/DVD images and installation \ + target disk image" + +IMAGE_CLASSES:remove = "license_image testimage" + +INHIBIT_DEFAULT_DEPS = "1" +COMPATIBLE_HOST = "aarch64-*" +PACKAGE_ARCH = "${TARGET_ARCH}" + +inherit nopackages deploy rootfs-postcommands ${IMAGE_CLASSES} + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +ISO_IMAGE_NAME = "${PN}-${PV}" +IMAGE_LINK_NAME = "${PN}-${PV}-${MACHINE}" + +ARM_SYSTEMREADY_LINUX_DISTRO_ISO_IMAGE = \ + "${DEPLOY_DIR_IMAGE}/${ISO_IMAGE_NAME}.iso" +# Size of installation disk in MB +ARM_SYSTEMREADY_LINUX_DISTRO_INSTALL_SIZE ?= "4096" + +do_image() { + dd if=/dev/zero of=${WORKDIR}/${IMAGE_LINK_NAME}.wic \ + bs=1M count=${ARM_SYSTEMREADY_LINUX_DISTRO_INSTALL_SIZE} status=none +} + +do_deploy() { + # Deploy the iso and installation target disk image to the deploy folder + install -m 644 ${WORKDIR}/${ISO_IMAGE_NAME}.iso ${DEPLOYDIR} + install -m 644 ${WORKDIR}/${IMAGE_LINK_NAME}.wic ${DEPLOYDIR} +} + +addtask image before do_install +addtask deploy after do_install before do_image_complete + +# Post-process commands may write to IMGDEPLOYDIR +IMGDEPLOYDIR = "${DEPLOY_DIR_IMAGE}" + +python do_image_complete() { + # Run the image post-process commands + from oe.utils import execute_pre_post_process + post_process_cmds = d.getVar("IMAGE_POSTPROCESS_COMMAND") + execute_pre_post_process(d, post_process_cmds) +} +do_image_complete[nostamp] = "1" +addtask image_complete after do_deploy before do_build + +do_install[depends] += "arm-systemready-firmware:do_image_complete" From patchwork Fri Nov 3 09:49:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Debbie Martin X-Patchwork-Id: 33538 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 72A4CC4167D for ; Fri, 3 Nov 2023 09:50:24 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.46666.1699005018203489321 for ; Fri, 03 Nov 2023 02:50:18 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: debbie.martin@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 46D7D2F4 for ; Fri, 3 Nov 2023 02:51:00 -0700 (PDT) Received: from e127725.arm.com (unknown [10.57.2.89]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F3E043F64C for ; Fri, 3 Nov 2023 02:50:16 -0700 (PDT) From: Debbie Martin To: meta-arm@lists.yoctoproject.org Subject: [PATCH 3/5] arm-bsp/systemready: Bring up the Arm SystemReady IR ACS 2.0 suite on FVP base Date: Fri, 3 Nov 2023 09:49:37 +0000 Message-Id: <20231103094939.1290558-3-Debbie.Martin@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231103094939.1290558-1-Debbie.Martin@arm.com> References: <20231103094939.1290558-1-Debbie.Martin@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 ; Fri, 03 Nov 2023 09:50:24 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/5200 1. Configure FVP base to allow Arm SystemReady IR ACS console access. 2. Configure FVP base Arm SystemReady IR ACS firmware build. 3. Add the machine-specific report.txt for FVP base. 4. Patch the check-sr-results.yaml and format-sr-results.yaml files to handle the known differences between FVP base and the expected ACS functionality. 5. Add a README with instructions of how to use the meta-arm-systemready layer with fvp-base. Signed-off-by: Debbie Martin --- meta-arm-bsp/conf/layer.conf | 5 + meta-arm-bsp/conf/machine/fvp-base.conf | 7 +- .../arm-systemready-ir-acs-fvp-base.inc | 2 + .../arm-systemready-ir-acs.bbappend | 1 + ...rm-systemready-scripts-native-fvp-base.inc | 5 + .../arm-systemready-scripts-native.bbappend | 1 + ...-Change-the-expected-SR-result-confi.patch | 227 ++++++++++++++++++ .../files/fvp-base/report.txt | 34 +++ meta-arm-systemready/README.md | 126 ++++++++++ 9 files changed, 406 insertions(+), 2 deletions(-) create mode 100644 meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-ir-acs-fvp-base.inc create mode 100644 meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-ir-acs.bbappend create mode 100644 meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-scripts-native-fvp-base.inc create mode 100644 meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-scripts-native.bbappend create mode 100644 meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/files/fvp-base/0001-check-sr-results-Change-the-expected-SR-result-confi.patch create mode 100644 meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/files/fvp-base/report.txt create mode 100644 meta-arm-systemready/README.md -- 2.25.1 diff --git a/meta-arm-bsp/conf/layer.conf b/meta-arm-bsp/conf/layer.conf index 97d9728c..766b385d 100644 --- a/meta-arm-bsp/conf/layer.conf +++ b/meta-arm-bsp/conf/layer.conf @@ -19,3 +19,8 @@ LAYERDEPENDS_meta-arm-bsp:append:musca-s1 = " meta-python" # Additional license directories. LICENSE_PATH += "${LAYERDIR}/custom-licenses" + +BBFILES_DYNAMIC += " \ + meta-arm-systemready:${LAYERDIR}/dynamic-layers/meta-arm-systemready/*/*/*.bb \ + meta-arm-systemready:${LAYERDIR}/dynamic-layers/meta-arm-systemready/*/*/*.bbappend \ +" diff --git a/meta-arm-bsp/conf/machine/fvp-base.conf b/meta-arm-bsp/conf/machine/fvp-base.conf index 4e17a3cc..43f2a8d7 100644 --- a/meta-arm-bsp/conf/machine/fvp-base.conf +++ b/meta-arm-bsp/conf/machine/fvp-base.conf @@ -8,6 +8,10 @@ require conf/machine/include/arm/arch-armv8a.inc TUNE_FEATURES = "aarch64" +ARM_SYSTEMREADY_FIRMWARE = "trusted-firmware-a:do_deploy" +ARM_SYSTEMREADY_ACS_CONSOLE = "default" +EXTRA_IMAGEDEPENDS = "${ARM_SYSTEMREADY_FIRMWARE}" + MACHINE_FEATURES = "efi" IMAGE_NAME_SUFFIX = "" @@ -51,9 +55,8 @@ FVP_CONFIG[bp.virtioblockdevice.image_path] ?= "${IMAGE_NAME}.wic" # Set the baseline to ARMv8.4, as the default is 8.0. FVP_CONFIG[cluster0.has_arm_v8-4] = "1" FVP_CONFIG[cluster1.has_arm_v8-4] = "1" -FVP_CONSOLE ?= "terminal_0" +FVP_CONSOLES[default] = "terminal_0" FVP_TERMINALS[bp.terminal_0] ?= "Console" FVP_TERMINALS[bp.terminal_1] ?= "" FVP_TERMINALS[bp.terminal_2] ?= "" FVP_TERMINALS[bp.terminal_3] ?= "" - diff --git a/meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-ir-acs-fvp-base.inc b/meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-ir-acs-fvp-base.inc new file mode 100644 index 00000000..376f623a --- /dev/null +++ b/meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-ir-acs-fvp-base.inc @@ -0,0 +1,2 @@ +FILESEXTRAPATHS:append := "${THISDIR}/files/${MACHINE}:" +SRC_URI:append = " file://report.txt" diff --git a/meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-ir-acs.bbappend b/meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-ir-acs.bbappend new file mode 100644 index 00000000..397342f4 --- /dev/null +++ b/meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-ir-acs.bbappend @@ -0,0 +1 @@ +include arm-systemready-ir-acs-${MACHINE}.inc diff --git a/meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-scripts-native-fvp-base.inc b/meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-scripts-native-fvp-base.inc new file mode 100644 index 00000000..dc01d0a2 --- /dev/null +++ b/meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-scripts-native-fvp-base.inc @@ -0,0 +1,5 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/files/fvp-base:" + +SRC_URI:append = " \ + file://0001-check-sr-results-Change-the-expected-SR-result-confi.patch \ +" diff --git a/meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-scripts-native.bbappend b/meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-scripts-native.bbappend new file mode 100644 index 00000000..49c01ee9 --- /dev/null +++ b/meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/arm-systemready-scripts-native.bbappend @@ -0,0 +1 @@ +include arm-systemready-scripts-native-${MACHINE}.inc diff --git a/meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/files/fvp-base/0001-check-sr-results-Change-the-expected-SR-result-confi.patch b/meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/files/fvp-base/0001-check-sr-results-Change-the-expected-SR-result-confi.patch new file mode 100644 index 00000000..d2226cb1 --- /dev/null +++ b/meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/files/fvp-base/0001-check-sr-results-Change-the-expected-SR-result-confi.patch @@ -0,0 +1,227 @@ +From e3e0465a25f9b1607b2e5ed42afb7b556aa8b9bc Mon Sep 17 00:00:00 2001 +From: Debbie Martin +Date: Wed, 4 Oct 2023 18:40:18 +0100 +Subject: [PATCH] [PATCH] check-sr-results: Change the expected SR result + config + +Update the check-sr-results.yaml and format-sr-results.yaml files for the +Systemready IR suite. These changes are required because of the +following known differences of fvp-base outputs to those expected by the +SystemReady scripts. + +Changes to check-sr-results.yaml: + 1. acs-console.log: + a. must-have-esp: EFI partition/variable persistence not supported due to + FVP reset. + b. warn-once-if-contains "-dirty": BL1, BL2, and BL31 have dirty versions. + c. must-contain "efi: ESRT=0x" and "'esrt: Reserving ESRT space from 0x'": + Capsule updates are not supported. + d. error-if-contains: "No EFI system partition" and "Failed to persist + EFI variables": EFI partition/variable persistence not supported due to + FVP reset. + 2. acs_results/result.md: + a. must-contain "Failure: |0|": Capsule and EFI partition failures make + the total 20. + 3. acs_results/CapsuleApp_ESRT_table_info.log: + a. capsuleapp-esrt: Capsule updates are not supported. + b. must-contain "'EFI_SYSTEM_RESOURCE_TABLE:'" and + "EFI_SYSTEM_RESOURCE_ENTRY": EFI partition/variable persistence not + supported due to FVP reset. + c. must-contain "FwClass": Capsule updates are not supported. + d. error-if-contains "ESRT - Not Found": Capsule updates are not + supported. + 4. acs_results/CapsuleApp_FMP_protocol_info.log: + a. warn-if-contains "Aborted test": Capsule updates are not supported. + This patch also adds must-contain for the specific totals of the test + categories due to allowing the "Aborted test" string. + 5. acs_results/linux_dump/firmware/efi/esrt: + a. Remove whole directory because capsule updates are not supported. + 6. acs_results/uefi/temp: + a. Set min-entries to 0: this defaults to 1 despite the directory being + optional, so errors if a directory is empty. + 7. acs_results/uefi_dump: + a. min-entries is 13: change this to 11 due to smbiosview.log being + optional and the change to make map.log optional. + 8. acs_results/uefi_dump/dh.log: + a. must-contain "EFISystemPartition": EFI partition/variable persistence + not supported due to FVP reset. + b. must-contain "FirmwareManagement": Capsule updates are not supported. + 9. acs_results/uefi_dump/map.log: + a. Make optional because it isn't populated for IR. + 10. fw: + a. Make optional because capsule updates are not supported. + 11. os-logs: + a. Make optional because distro installation isn't done as part of ACS. + +Changes to format-sr-results.yaml: + 1. Remove the SIE section (not supported on fvp-base and, if present, causes + format-sr-results.py to error). + +Upstream-Status: Inappropriate +Signed-off-by: Debbie Martin +--- + check-sr-results.yaml | 34 ++++++++++++++-------------------- + format-sr-results.yaml | 15 --------------- + 2 files changed, 14 insertions(+), 35 deletions(-) + +diff --git a/check-sr-results.yaml b/check-sr-results.yaml +index a4235de..555fb71 100644 +--- a/check-sr-results.yaml ++++ b/check-sr-results.yaml +@@ -10,7 +10,6 @@ check-sr-results-configuration: + # The following tree applies to all ACS-IR 2.0 versions. + tree: + - file: acs-console.log +- must-have-esp: + must-contain: + - Booting `bbr/bsa' + - Press any key to stop the EFI SCT running +@@ -24,8 +23,6 @@ tree: + - 'EFI stub: Booting Linux Kernel...' + - 'EFI stub: Using DTB from configuration table' + - Linux version +- - 'efi: ESRT=0x' +- - 'esrt: Reserving ESRT space from 0x' + - systemd + - Executing FWTS for EBBR + - 'Test: UEFI' +@@ -36,13 +33,9 @@ tree: + - ACS run is completed + - Please press to continue ... + warn-once-if-contains: +- - -dirty + - 'EFI stub: ERROR:' + - 'FIRMWARE BUG:' + - OVERLAP DETECTED +- error-if-contains: +- - No EFI system partition +- - Failed to persist EFI variables + - dir: acs_results + min-entries: 8 # Allow missing result.md + max-entries: 9 +@@ -53,7 +46,7 @@ tree: + must-contain: + - SCT Summary + - Dropped:|0| +- - Failure:|0| ++ - Failure:|20| + - Warning:|0| + - Dropped by group + - Failure by group +@@ -64,16 +57,11 @@ tree: + max-entries: 2 + tree: + - file: CapsuleApp_ESRT_table_info.log +- capsuleapp-esrt: + must-contain: + - ESRT TABLE +- - 'EFI_SYSTEM_RESOURCE_TABLE:' +- - EFI_SYSTEM_RESOURCE_ENTRY +- - FwClass + error-if-contains: + - FwResourceCount - 0x0 + - FwResourceCountMax - 0x0 +- - ESRT - Not Found + - file: CapsuleApp_FMP_protocol_info.log + must-contain: + - FMP DATA +@@ -95,9 +83,14 @@ tree: + - 'Medium failures: NONE' + - 'Low failures: NONE' + - 'Other failures: NONE' ++ - 'dt_base | 3| | | | | |' ++ - 'esrt | | | 2| | | |' ++ - 'uefibootpath | | | | | | |' ++ - 'uefirtmisc | 1| | | | 8| |' ++ - 'uefirttime | 4| | | | 35| |' ++ - 'uefirtvariable | 2| | | | 10| |' ++ - 'uefivarinfo | | | | | 1| |' + - 'Total:' +- warn-if-contains: +- - Aborted test + error-if-contains: + - FAILED + - This is an invalid entry. +@@ -180,6 +173,7 @@ tree: + tree: + - file: OsIndicationsSupported-* + - dir: esrt ++ optional: + tree: + - dir: entries + tree: +@@ -314,8 +308,9 @@ tree: + - BSA tests complete. Reset the system. + - dir: temp # This sometimes remains; ignore it + optional: ++ min-entries: 0 + - dir: uefi_dump +- min-entries: 13 ++ min-entries: 11 + max-entries: 13 + tree: + - file: bcfg.log +@@ -331,8 +326,6 @@ tree: + must-contain: + - Handle dump + - DevicePath +- - EFISystemPartition +- - FirmwareManagement + - SimpleTextOut + - file: dmem.log + must-contain: +@@ -355,6 +348,7 @@ tree: + - DRIVER NAME + - file: ifconfig.log + - file: map.log ++ optional: + must-contain: + - Mapping table + - /HD(1,GPT, +@@ -392,7 +386,7 @@ tree: + - dir: docs + optional: + - dir: fw +- min-entries: 3 ++ optional: + tree: + - file: u-boot-sniff.log + must-contain: +@@ -500,7 +494,7 @@ tree: + - dir: manual-results + optional: + - dir: os-logs +- min-entries: 2 ++ optional: + tree: + - file: 'OS-image-download-links.txt' + optional: +diff --git a/format-sr-results.yaml b/format-sr-results.yaml +index dd34cd6..20b69de 100644 +--- a/format-sr-results.yaml ++++ b/format-sr-results.yaml +@@ -47,21 +47,6 @@ subs: + extract: + filename: "acs_results/linux_dump/firmware/devicetree/base/psci/\ + compatible" +- - heading: BBSR Compliance +- paragraph: TBD +- subs: +- - heading: SIE SCT +- extract: +- filename: acs_results/SIE/result.md +- find: '# SCT Summary' +- first-line: 4 +- last-line: +- paragraph: TBD +- - heading: SIE FWTS +- extract: +- filename: acs_results/SIE/fwts/FWTSResults.log +- find: Test Failure Summary +- paragraph: TBD + - heading: BSA Compliance (informative) + paragraph: TBD + subs: +-- +2.25.1 + diff --git a/meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/files/fvp-base/report.txt b/meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/files/fvp-base/report.txt new file mode 100644 index 00000000..f4363b70 --- /dev/null +++ b/meta-arm-bsp/dynamic-layers/meta-arm-systemready/recipes-test/arm-systemready-acs/files/fvp-base/report.txt @@ -0,0 +1,34 @@ +General information +------------------- +- Arm SystemReady Band: IR +- System name: FVP Base A AEM +- Prepared by: +- E-mail: +- Date: + +System information +------------------ +- Company: Arm +- System: FVP Base A AEM +- SoC: +- FW version: +- Memory: +- Storage devices / disks: +- Network controllers: +- Other Hardware information: + +Test Logs and Results +--------------------- +- ACS version used: 2.0 +- ACS URL (if pre-built binary): https://github.com/ARM-software/arm-systemready/blob/v23.03_IR_2.0.0/IR/prebuilt_images/v23.03_2.0.0/ir-acs-live-image-generic-arm64.wic.xz +- Changes to ACS (if built from source): + +- Test Logs collected +[X] ACS - SCT +[X] ACS - BSA - UEFI +[X] ACS - BSA - Linux +[X] ACS - FWTS +[X] ACS - Linux boot log +[X] ACS - Linux dumps +[X] ACS - UEFI Shell dumps +[ ] ACS - Capsule Update diff --git a/meta-arm-systemready/README.md b/meta-arm-systemready/README.md new file mode 100644 index 00000000..ed0da1bf --- /dev/null +++ b/meta-arm-systemready/README.md @@ -0,0 +1,126 @@ +# meta-arm-systemready Yocto Layer + +This layer contains classes and recipes for building and running +[Arm SystemReady][] validation on the supported machines. + +Information regarding contributing, reporting bugs, etc can be found in the +top-level meta-arm [README.md](../README.md) file. + +## Introduction + +This layer provides support for the following on supported machines: + +* Building the firmware for the [Arm SystemReady][] certification program +* Running [Arm SystemReady ACS][] (Architecture Compliance Suite) tests +* Running Linux distributions installation tests + +This layer is designed to work alongside with a BSP layer. For example, the +[`meta-arm-bsp`][] layer in the top-level meta-arm defines the +[`fvp-base`][] machine, which can be used with the recipes provided by this +layer to build the firmware, run the [Arm SystemReady IR][] ACS tests, and +run Linux distributions installation. **Note** that users can use this layer +with their BSP layer to perform the same build and tests. + +### Firmware Build + +The `arm-systemready-firmware.bb` recipe is to build the firmware. It requires +the `ARM_SYSTEMREADY_FIRMWARE` variable set at the MACHINE configuration level +to list the build dependencies. + +### ACS Tests + +The recipe to run the ACS tests fetches and deploys the prebuilt ACS test suite +disk image, and generates the necessary metadata to support executing the test +suite using the bitbake `testimage` task. A test case `SystemReadyACSTest` is +introduced in `lib/oeqa/runtime/cases` to monitor the ACS tests output from the +bitbake `testimage` task. The `ARM_SYSTEMREADY_ACS_CONSOLE` variable must be set +at the MACHINE configuration level for this test case. + +There are two additional recipes for generating the Arm SystemReady ACS tests +report files through the use of the [EDK2 SCT Results Parser][] and the +[Arm SystemReady scripts][]. These packages are installed in the +`edk2-test-parser-native.bb` and `arm-systemready-scripts-native.bb` recipes +respectively. + +The class `arm-systemready-acs.bbclass` implements the common logic to deploy +the Arm SystemReady ACS prebuilt image and set up the `testimage` environment. +This class also contains a `testimage` `"postfunc"` called `acs_logs_handle` +which generates report files and analyzes the test results. + +The test result analysis is performed by first using the EDK2 SCT Results +Parser to create a results.md file, then running the Arm SystemReady result +check script to check the contents of the result partition as well as the +console log. The result check will fail if any of the expected files or +directories are missing, or if any file's contents do not pass its file-specific +checks. + +The ACS test results which are checked by the script can be viewed in +`${TMPDIR}/work/aarch64-oe-linux/arm-systemready-ir-acs/2.0.0-r0/testimage/`. If +the check fails, the bitbake `testimage` task will fail. + + +### Linux Distributions Installation + +Recipes for testing the installation of Linux distributions are provided under +`recipes-test/arm-systemready-linux-distros`. These recipes help to download the +installation CD for the Linux distribution and generate an empty disk as the +target disk for the installation. + +## Supported Band and Machine + +Arm SystemReady has four bands: +* [Arm SystemReady SR][] +* [Arm SystemReady ES][] +* [Arm SystemReady IR][] +* [Arm SystemReady LS][] + +Currently, this layer only supports +[Arm SystemReady IR ACS version v23.03_2.0.0][], which is verified on the +[`fvp-base`][] machine. + +## Guidelines for Reusing and Extending + +Currently, this layer only supports the Arm SystemReady IR band running on the +`fvp-base` machine defined in the `meta-arm-bsp` layer. The supported Arm +SystemReady IR implementation can be reused on other machines. Furthermore, the +current implementation can be further extended to support SR, ES and LS bands. + +### Reuse + +To reuse the supported Arm SystemReady IR on other machines, you will need to: + +1. Set the `ARM_SYSTEMREADY_FIRMWARE` variable at the MACHINE configuration + level to list the build dependencies. The configuration file of the + [`fvp-base`][] machine can be used as a reference. +2. Set the `ARM_SYSTEMREADY_ACS_CONSOLE` variable at the MACHINE configuration + level for running the ACS tests in the bitbake `testimage` task. Also refer + to the configuration file of the [`fvp-base`][] machine. + +### Extend + +To extend support for other bands, you will need to: + +1. Add a new recipe to inherit `arm-systemready-acs.bbclass`. You can use + [`arm-systemready-ir-acs.bb`][] as a reference. +2. Add a new `testimage` test case for the newly added band. Refer to + [`arm_systemready_ir_acs.py`][]. +3. Set the necessary variables and prepare the ACS baseline files (as listed in + the above **Reuse** section) at the MACHINE configuration level from the BSP + layer for the machine to be supported. + +**Note**: When reusing and extending, the current classes and libs may need to +be modified or refactored as necessary. + +[Arm SystemReady]: https://www.arm.com/architecture/system-architectures/systemready-certification-program +[Arm SystemReady ACS]: https://github.com/ARM-software/arm-systemready +[Arm SystemReady SR]: https://www.arm.com/architecture/system-architectures/systemready-certification-program/sr +[Arm SystemReady ES]: https://www.arm.com/architecture/system-architectures/systemready-certification-program/es +[Arm SystemReady IR]: https://www.arm.com/architecture/system-architectures/systemready-certification-program/ir +[Arm SystemReady LS]: https://www.arm.com/architecture/system-architectures/systemready-certification-program/ls +[Arm SystemReady IR ACS version v23.03_2.0.0]: https://github.com/ARM-software/arm-systemready/tree/main/IR/prebuilt_images/v23.03_2.0.0 +[Arm SystemReady scripts]: https://gitlab.arm.com/systemready/systemready-scripts +[EDK2 SCT Results Parser]: https://gitlab.arm.com/systemready/edk2-test-parser +[`arm-systemready-ir-acs.bb`]: recipes-test/arm-systemready-acs/arm-systemready-ir-acs.bb +[`arm_systemready_ir_acs.py`]: lib/oeqa/runtime/cases/arm_systemready_ir_acs.py +[`meta-arm-bsp`]: ../meta-arm-bsp +[`fvp-base`]: ../meta-arm-bsp/conf/machine/fvp-base.conf From patchwork Fri Nov 3 09:49:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Debbie Martin X-Patchwork-Id: 33537 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 6AF43C4332F for ; Fri, 3 Nov 2023 09:50:24 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.46697.1699005020459876583 for ; Fri, 03 Nov 2023 02:50:20 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: debbie.martin@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 BD0B92F4 for ; Fri, 3 Nov 2023 02:51:02 -0700 (PDT) Received: from e127725.arm.com (unknown [10.57.2.89]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B21EA3F64C for ; Fri, 3 Nov 2023 02:50:19 -0700 (PDT) From: Debbie Martin To: meta-arm@lists.yoctoproject.org Subject: [PATCH 4/5] kas: Add kas configuration for Arm SystemReady and fvp-base Date: Fri, 3 Nov 2023 09:49:38 +0000 Message-Id: <20231103094939.1290558-4-Debbie.Martin@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231103094939.1290558-1-Debbie.Martin@arm.com> References: <20231103094939.1290558-1-Debbie.Martin@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 ; Fri, 03 Nov 2023 09:50:24 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/5201 Add systemready firmware, systemready ACS, systemready distros, and fvp-base kas configurations. Update the README file with instructions on how to build and run using them. Signed-off-by: Debbie Martin --- kas/arm-systemready-firmware.yml | 12 ++++++ kas/arm-systemready-ir-acs.yml | 17 ++++++++ kas/arm-systemready-linux-distros-debian.yml | 7 +++ ...arm-systemready-linux-distros-opensuse.yml | 7 +++ kas/fvp-base.yml | 43 +++++++++++++++++++ meta-arm-systemready/README.md | 22 ++++++++++ 6 files changed, 108 insertions(+) create mode 100644 kas/arm-systemready-firmware.yml create mode 100644 kas/arm-systemready-ir-acs.yml create mode 100644 kas/arm-systemready-linux-distros-debian.yml create mode 100644 kas/arm-systemready-linux-distros-opensuse.yml create mode 100644 kas/fvp-base.yml diff --git a/kas/arm-systemready-firmware.yml b/kas/arm-systemready-firmware.yml new file mode 100644 index 00000000..8b0b9fd5 --- /dev/null +++ b/kas/arm-systemready-firmware.yml @@ -0,0 +1,12 @@ +header: + version: 13 + +repos: + meta-arm: + layers: + meta-arm-systemready: + +distro: nodistro + +target: + - arm-systemready-firmware diff --git a/kas/arm-systemready-ir-acs.yml b/kas/arm-systemready-ir-acs.yml new file mode 100644 index 00000000..38604d7f --- /dev/null +++ b/kas/arm-systemready-ir-acs.yml @@ -0,0 +1,17 @@ +header: + version: 13 + includes: + - kas/arm-systemready-firmware.yml + +env: + TESTIMAGE_AUTO: "1" + # The full testimage run typically takes around 12-24h on fvp-base. + TEST_OVERALL_TIMEOUT: "${@ 24*60*60}" + +local_conf_header: + systemready-ir-acs: | + IMAGE_CLASSES:append = " testimage" + + +target: + - arm-systemready-ir-acs diff --git a/kas/arm-systemready-linux-distros-debian.yml b/kas/arm-systemready-linux-distros-debian.yml new file mode 100644 index 00000000..38cc74b2 --- /dev/null +++ b/kas/arm-systemready-linux-distros-debian.yml @@ -0,0 +1,7 @@ +header: + version: 13 + includes: + - kas/arm-systemready-firmware.yml + +target: + - arm-systemready-linux-distros-debian diff --git a/kas/arm-systemready-linux-distros-opensuse.yml b/kas/arm-systemready-linux-distros-opensuse.yml new file mode 100644 index 00000000..cffbdb92 --- /dev/null +++ b/kas/arm-systemready-linux-distros-opensuse.yml @@ -0,0 +1,7 @@ +header: + version: 13 + includes: + - kas/arm-systemready-firmware.yml + +target: + - arm-systemready-linux-distros-opensuse diff --git a/kas/fvp-base.yml b/kas/fvp-base.yml new file mode 100644 index 00000000..18b9134b --- /dev/null +++ b/kas/fvp-base.yml @@ -0,0 +1,43 @@ +header: + version: 13 + includes: + - kas/fvp-eula.yml + +env: + DISPLAY: + WAYLAND_DISPLAY: + XAUTHORITY: + + +distro: poky +machine: fvp-base + +defaults: + repos: + refspec: master + +repos: + meta-arm: + layers: + meta-arm: + meta-arm-bsp: + meta-arm-toolchain: + + poky: + url: https://git.yoctoproject.org/git/poky + path: layers/poky + layers: + meta: + meta-poky: + +local_conf_header: + base: | + CONF_VERSION = "2" + PACKAGE_CLASSES = "package_ipk" + PACKAGECONFIG:remove:pn-qemu-system-native = "gtk+ sdl" + EXTRA_IMAGE_FEATURES:append = " debug-tweaks ssh-server-openssh" + CORE_IMAGE_EXTRA_INSTALL:append = " ssh-pregen-hostkeys" + IMAGE_CLASSES:append = " testimage fvpboot" + +target: + - core-image-minimal diff --git a/meta-arm-systemready/README.md b/meta-arm-systemready/README.md index ed0da1bf..49cfed6e 100644 --- a/meta-arm-systemready/README.md +++ b/meta-arm-systemready/README.md @@ -78,6 +78,28 @@ Currently, this layer only supports [Arm SystemReady IR ACS version v23.03_2.0.0][], which is verified on the [`fvp-base`][] machine. +## Build and Run + +To build the firmware for Arm SystemReady on the supported machines (take the +`fvp-base` machine as an example): + + kas build kas/fvp-base.yml:kas/arm-systemready-firmware.yml + + +To run the Arm SystemReady ACS tests on the supported machines (take running +Arm SystemReady IR on the `fvp-base` machine as an example): + + kas build kas/fvp-base.yml:kas/arm-systemready-ir-acs.yml + +To run the Linux distributions installation on the supported machines (take +installing openSUSE on the `fvp-base` machine as an example): + + kas build kas/fvp-base.yml:kas/arm-systemready-linux-distros-opensuse.yml + + kas shell \ + kas/fvp-base.yml:kas/arm-systemready-linux-distros-opensuse.yml \ + -c "../scripts/runfvp --verbose --console" + ## Guidelines for Reusing and Extending Currently, this layer only supports the Arm SystemReady IR band running on the From patchwork Fri Nov 3 09:49:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Debbie Martin X-Patchwork-Id: 33539 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 73D4CC41535 for ; Fri, 3 Nov 2023 09:50:24 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.46733.1699005023134492102 for ; Fri, 03 Nov 2023 02:50:23 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: debbie.martin@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 6355D2F4 for ; Fri, 3 Nov 2023 02:51:05 -0700 (PDT) Received: from e127725.arm.com (unknown [10.57.2.89]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1CE923F64C for ; Fri, 3 Nov 2023 02:50:21 -0700 (PDT) From: Debbie Martin To: meta-arm@lists.yoctoproject.org Subject: [PATCH 5/5] ci: Add fvpboot to IMAGE_CLASSES Date: Fri, 3 Nov 2023 09:49:39 +0000 Message-Id: <20231103094939.1290558-5-Debbie.Martin@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231103094939.1290558-1-Debbie.Martin@arm.com> References: <20231103094939.1290558-1-Debbie.Martin@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 ; Fri, 03 Nov 2023 09:50:24 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/5202 Use IMAGE_CLASSES rather than a direct INHERIT for fvpboot. This is Yocto best practice as it is used to enable functionality across all image recipes. Signed-off-by: Debbie Martin --- ci/fvp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/fvp.yml b/ci/fvp.yml index 81a5caa6..e9f3fa94 100644 --- a/ci/fvp.yml +++ b/ci/fvp.yml @@ -4,7 +4,7 @@ header: local_conf_header: testimagefvp: | LICENSE_FLAGS_ACCEPTED += "Arm-FVP-EULA" - INHERIT += "fvpboot" + IMAGE_CLASSES += "fvpboot" failing_tests: | # This fails but we can't add to the ignorelist from meta-arm yet # https://bugzilla.yoctoproject.org/show_bug.cgi?id=14604