mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-07-19 04:47:08 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a9d140e4e | |||
| 58952aa7ba | |||
| 54e8f00795 | |||
| eb41589aa1 | |||
| 7d50f71baa | |||
| 04071ec9f5 | |||
| 71f92f4df8 | |||
| 50c462da2d | |||
| 2792359e0a | |||
| 7a16491373 | |||
| ccf216ce4d |
@@ -43,6 +43,21 @@ stages:
|
||||
extends: .setup
|
||||
variables:
|
||||
KUBERNETES_CPU_REQUEST: $CPU_REQUEST
|
||||
rules:
|
||||
# Don't run MR pipelines
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
when: never
|
||||
# Don't run pipelines for tags
|
||||
- if: $CI_COMMIT_TAG
|
||||
when: never
|
||||
# Don't run if BUILD_ENABLE_REGEX is set, but the job doesn't match the regex
|
||||
- if: '$BUILD_ENABLE_REGEX != null && $CI_JOB_NAME !~ $BUILD_ENABLE_REGEX'
|
||||
when: never
|
||||
# Allow the dev kernels to fail and not fail the overall build
|
||||
- if: '$KERNEL == "linux-yocto-dev"'
|
||||
allow_failure: true
|
||||
# Catch all for everything else
|
||||
- if: '$KERNEL != "linux-yocto-dev"'
|
||||
script:
|
||||
- KASFILES=$(./ci/jobs-to-kas "$CI_JOB_NAME")
|
||||
- kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf'
|
||||
|
||||
@@ -6,10 +6,6 @@ This repository contains the Arm layers for OpenEmbedded.
|
||||
|
||||
This layer contains general recipes for the Arm architecture, such as firmware, FVPs, and Arm-specific integration.
|
||||
|
||||
* meta-arm-autonomy
|
||||
|
||||
This layer is the distribution for a reference stack for autonomous systems.
|
||||
|
||||
* meta-arm-bsp
|
||||
|
||||
This layer contains machines for Arm reference platforms, for example FVP Base, N1SDP, and Juno.
|
||||
|
||||
@@ -4,3 +4,7 @@ header:
|
||||
- ci/base.yml
|
||||
|
||||
machine: n1sdp
|
||||
|
||||
local_conf_header:
|
||||
unsupported_trusted_services: |
|
||||
MACHINE_FEATURES:remove = "ts-smm-gateway"
|
||||
|
||||
@@ -8,7 +8,8 @@ LICENSE = "BSD-3-Clause & Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://license.md;md5=e44b2531cd6ffe9dece394dbe988d9a0 \
|
||||
file://cmsis/LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e"
|
||||
|
||||
SRC_URI = "gitsm://git.gitlab.arm.com/arm-reference-solutions/corstone1000/external_system/rtx.git;protocol=https;branch=master"
|
||||
SRC_URI = "gitsm://git.gitlab.arm.com/arm-reference-solutions/corstone1000/external_system/rtx.git;protocol=https;branch=master \
|
||||
file://race.patch"
|
||||
SRCREV = "8c9dca74b104ff6c9722fb0738ba93dd3719c080"
|
||||
PV .= "+git${SRCPV}"
|
||||
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
Upstream-Status: Submitted [https://gitlab.arm.com/arm-reference-solutions/corstone1000/external_system/rtx/-/issues/1]
|
||||
Signed-off-by: Ross Burton <ross.burton@arm.com>
|
||||
|
||||
From 34e1c04534607f5605255f39fb46e26261fc9c4e Mon Sep 17 00:00:00 2001
|
||||
From: Ross Burton <ross.burton@arm.com>
|
||||
Date: Tue, 8 Sep 2020 11:49:08 +0100
|
||||
Subject: [PATCH] tools/gen_module_code: atomically rewrite the generated files
|
||||
|
||||
The gen_module rule in rules.mk is marked as .PHONY, so make will
|
||||
execute it whenever it is mentioned. This results in gen_module_code
|
||||
being executed 64 times for a Juno build.
|
||||
|
||||
However in heavily parallel builds there's a good chance that
|
||||
gen_module_code is writing a file whilst the compiler is reading it
|
||||
because make also doesn't know what files are generated by
|
||||
gen_module_code.
|
||||
|
||||
The correct fix is to adjust the Makefiles so that the dependencies are
|
||||
correct but this isn't trivial, so band-aid the problem by atomically
|
||||
writing the generated files.
|
||||
|
||||
Change-Id: I82d44f9ea6537a91002e1f80de8861d208571630
|
||||
Signed-off-by: Ross Burton <ross.burton@arm.com>
|
||||
---
|
||||
tools/gen_module_code.py | 19 ++++++++++++++-----
|
||||
1 file changed, 14 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/tools/gen_module_code.py b/tools/gen_module_code.py
|
||||
index 7b3953845..ee099b713 100755
|
||||
--- a/tools/gen_module_code.py
|
||||
+++ b/tools/gen_module_code.py
|
||||
@@ -17,6 +17,7 @@
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
+import tempfile
|
||||
|
||||
DEFAULT_PATH = 'build/'
|
||||
|
||||
@@ -53,13 +54,21 @@
|
||||
|
||||
def generate_file(path, filename, content):
|
||||
full_filename = os.path.join(path, filename)
|
||||
- with open(full_filename, 'a+') as f:
|
||||
- f.seek(0)
|
||||
- if f.read() != content:
|
||||
+
|
||||
+ try:
|
||||
+ with open(full_filename) as f:
|
||||
+ rewrite = f.read() != content
|
||||
+ except FileNotFoundError:
|
||||
+ rewrite = True
|
||||
+
|
||||
+ if rewrite:
|
||||
+ with tempfile.NamedTemporaryFile(prefix="gen-module-code",
|
||||
+ dir=path,
|
||||
+ delete=False,
|
||||
+ mode="wt") as f:
|
||||
print("[GEN] {}...".format(full_filename))
|
||||
- f.seek(0)
|
||||
- f.truncate()
|
||||
f.write(content)
|
||||
+ os.replace(f.name, full_filename)
|
||||
|
||||
|
||||
def generate_header(path, modules):
|
||||
@@ -7,10 +7,15 @@ COMPATIBLE_MACHINE = "corstone1000"
|
||||
|
||||
inherit image
|
||||
inherit wic_nopt tfm_sign_image
|
||||
inherit uefi_capsule
|
||||
|
||||
PACKAGE_INSTALL = ""
|
||||
|
||||
IMAGE_FSTYPES += "wic wic.nopt"
|
||||
IMAGE_FSTYPES += "wic wic.nopt uefi_capsule"
|
||||
|
||||
UEFI_FIRMWARE_BINARY = "${PN}-${MACHINE}.${CAPSULE_IMGTYPE}"
|
||||
UEFI_CAPSULE_CONFIG = "${THISDIR}/files/${PN}-capsule-update-image.json"
|
||||
CAPSULE_IMGTYPE = "wic.nopt"
|
||||
|
||||
do_sign_images() {
|
||||
# Sign TF-A BL2
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"Payloads": [
|
||||
{
|
||||
"FwVersion": "5",
|
||||
"Guid": "e2bb9c06-70e9-4b14-97a3-5a7913176e3f",
|
||||
"LowestSupportedVersion": "1",
|
||||
"Payload": "$UEFI_FIRMWARE_BINARY",
|
||||
"UpdateImageIndex": "0"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
# This class generates UEFI capsules
|
||||
# The current class supports generating a capsule with single firmware binary
|
||||
|
||||
DEPENDS += "gettext-native"
|
||||
inherit python3native
|
||||
|
||||
IMAGE_TYPES += "uefi_capsule"
|
||||
|
||||
# edk2 base tools should be installed in the native sysroot directory
|
||||
do_image_uefi_capsule[depends] += "edk2-basetools-native:do_populate_sysroot"
|
||||
|
||||
# By default the wic image is used to create a capsule
|
||||
CAPSULE_IMGTYPE ?= "wic"
|
||||
|
||||
# IMGDEPLOYDIR is used as the default location of firmware binary for which the capsule needs to be created
|
||||
CAPSULE_IMGLOCATION ?= "${IMGDEPLOYDIR}"
|
||||
|
||||
# The generated capsule by default has uefi.capsule extension
|
||||
CAPSULE_EXTENSION ?= "uefi.capsule"
|
||||
|
||||
# The following variables must be set to be able to generate a capsule update
|
||||
UEFI_FIRMWARE_BINARY ?= ""
|
||||
UEFI_CAPSULE_CONFIG ?= ""
|
||||
|
||||
# Check if the required variables are set
|
||||
python() {
|
||||
for var in ["UEFI_FIRMWARE_BINARY", "UEFI_CAPSULE_CONFIG"]:
|
||||
if not d.getVar(var):
|
||||
raise bb.parse.SkipRecipe(f"{var} not set")
|
||||
}
|
||||
|
||||
IMAGE_CMD:uefi_capsule(){
|
||||
|
||||
# Force the GenerateCapsule script to use python3
|
||||
export PYTHON_COMMAND=${PYTHON}
|
||||
|
||||
# Copy the firmware and the capsule config json to current directory
|
||||
if [ -e ${CAPSULE_IMGLOCATION}/${UEFI_FIRMWARE_BINARY} ]; then
|
||||
cp ${CAPSULE_IMGLOCATION}/${UEFI_FIRMWARE_BINARY} . ;
|
||||
fi
|
||||
|
||||
export UEFI_FIRMWARE_BINARY=${UEFI_FIRMWARE_BINARY}
|
||||
envsubst < ${UEFI_CAPSULE_CONFIG} > ./${MACHINE}-capsule-update-image.json
|
||||
|
||||
${STAGING_DIR_NATIVE}/usr/bin/edk2-BaseTools/BinWrappers/PosixLike/GenerateCapsule \
|
||||
-e -o ${IMGDEPLOYDIR}/${UEFI_FIRMWARE_BINARY}.${CAPSULE_EXTENSION} -j \
|
||||
${MACHINE}-capsule-update-image.json
|
||||
|
||||
# Remove the firmware to avoid contamination of IMGDEPLOYDIR
|
||||
rm ${UEFI_FIRMWARE_BINARY}
|
||||
|
||||
}
|
||||
|
||||
# The firmware binary should be created before generating the capsule
|
||||
IMAGE_TYPEDEP:uefi_capsule:append = "${CAPSULE_IMGTYPE}"
|
||||
@@ -0,0 +1,24 @@
|
||||
# Install EDK2 Base Tools in native sysroot. Currently the BaseTools are not
|
||||
# built, they are just copied to native sysroot. This is sufficient for
|
||||
# generating UEFI capsules as it only depends on some python scripts. Other
|
||||
# tools need to be built first before adding to sysroot.
|
||||
|
||||
SUMMARY = "EDK2 Base Tools"
|
||||
LICENSE = "BSD-2-Clause-Patent"
|
||||
|
||||
# EDK2
|
||||
SRC_URI = "git://github.com/tianocore/edk2.git;branch=master;protocol=https"
|
||||
LIC_FILES_CHKSUM = "file://License.txt;md5=2b415520383f7964e96700ae12b4570a"
|
||||
|
||||
SRCREV = "fff6d81270b57ee786ea18ad74f43149b9f03494"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit native
|
||||
|
||||
RDEPENDS:${PN} += "python3-core"
|
||||
|
||||
do_install () {
|
||||
mkdir -p ${D}${bindir}/edk2-BaseTools
|
||||
cp -r ${WORKDIR}/git/BaseTools/* ${D}${bindir}/edk2-BaseTools/
|
||||
}
|
||||
Reference in New Issue
Block a user