zephyr/scripts/schemas/soc-schema.yml
Jamie McCrae a0267d2f48 west: runners: Add run once commands and deferred reset
This adds supports for flashing images with sysbuild where there
are multiple images per board to prevent using the same command per
image flash which might cause issues if they are not ran just once
per flash per unique board name. A deferred reset feature is also
introduced that prevents a board (or multiple) from being reset if
multiple images are to be flashed until the final one has been
flashed which prevents issues with e.g. security bits being enabled
that then prevent flashing further images.

These options can be set at a board level (in board.yml) or a SoC
level (in soc.yml), if both are present then the board configuration
will be used instead of the SoC, and regex can be used for matching
of partial names which allows for matching specific SoCs or CPU cores
regardless of the board being used

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-04-29 17:56:19 +01:00

124 lines
3.7 KiB
YAML

# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) 2023, Nordic Semiconductor ASA
## A pykwalify schema for basic validation of the structure of a SoC
## metadata YAML file.
##
# The soc.yml file is a simple list of key value pairs containing SoCs
# located and the current structure level.
schema;cpucluster-schema:
required: false
type: seq
sequence:
- type: map
mapping:
name:
required: true
type: str
schema;soc-schema:
required: false
type: seq
sequence:
- type: map
mapping:
name:
required: true
type: str
cpuclusters:
include: cpucluster-schema
schema;series-schema:
required: false
type: seq
sequence:
- type: map
mapping:
name:
required: true
type: str
socs:
required: false
include: soc-schema
type: map
mapping:
family:
required: false
type: seq
sequence:
- type: map
mapping:
name:
required: true
type: str
series:
include: series-schema
socs:
include: soc-schema
series:
include: series-schema
socs:
include: soc-schema
vendor:
required: false
type: str
desc: SoC series of the SoC.
This field is of informational use and can be used for filtering of SoCs.
comment:
required: false
type: str
desc: Free form comment with extra information regarding the SoC.
runners:
type: map
mapping:
run_once:
type: map
desc: |
Allows for restricting west flash commands when using sysbuild to run once per given
grouping of board targets. This is to allow for future image program cycles to not
erase the flash of a device which has just been programmed by another image.
mapping:
regex;(.*):
type: seq
desc: |
A dictionary of commands which should be limited to running once per invocation
of west flash for a given set of flash runners and board targets.
sequence:
- type: map
mapping:
run:
required: true
type: str
enum: ['first', 'last']
desc: |
If first, will run this command once when the first image is flashed, if
last, will run this command once when the final image is flashed.
runners:
required: true
type: seq
sequence:
- type: str
desc: |
A list of flash runners that this applies to, can use `all` to apply
to all runners.
groups:
required: true
type: seq
sequence:
- type: map
desc: |
A grouping of board targets which the command should apply to. Can
be used multiple times to have multiple groups.
mapping:
qualifiers:
required: true
type: seq
sequence:
- type: str
desc: |
A board qualifier to match against in regex form. Must be one
entry per board target, a single regex entry will not match
two board targets even if they both match.