Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions dtschema/schemas/bootph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,23 @@ properties:
description:
Include this node in all phases (for U-Boot see enum u_boot_phase).

allOf:
- if:
anyOf:
- required: [ bootph-pre-sram ]
- required: [ bootph-verify ]
- required: [ bootph-pre-ram ]
- required: [ bootph-some-ram ]
- required: [ bootph-all ]
then:
description: Parent nodes don't need bootph tags
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They don't need the same tag, but they might need a different one. I think the rule will be that if a child has a particular phase tag then it is implied in all its parents

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should be doable. What about a child with bootph-all and parent with something else?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case we are implying bootph-all in the parent so it doesn't matter what tags are present

patternProperties:
'.*':
properties:
bootph-pre-sram: false
bootph-verify: false
bootph-pre-ram: false
bootph-some-ram: false
bootph-all: false

additionalProperties: true