Skip to content

lopper: assists: gen_domain_dts: Allow passing extra zephyr comp file…#776

Merged
zeddii merged 1 commit into
devicetree-org:masterfrom
KasperSloth99:kslo/patch-lopper-to-take-custom-comp
Jun 24, 2026
Merged

lopper: assists: gen_domain_dts: Allow passing extra zephyr comp file…#776
zeddii merged 1 commit into
devicetree-org:masterfrom
KasperSloth99:kslo/patch-lopper-to-take-custom-comp

Conversation

@KasperSloth99

Copy link
Copy Markdown

… through env

I ran into an issue of not being able to add my own zephyr_supported_comp.yaml file, without having to have my own fork and edit the upstream file. Instead it is much nicer to be able to be able to set the path to your own compatible schema, and have it be part of your own repository.

@KasperSloth99 KasperSloth99 force-pushed the kslo/patch-lopper-to-take-custom-comp branch from 4295530 to e515373 Compare June 22, 2026 13:45
@KasperSloth99

Copy link
Copy Markdown
Author

Hi @onkarharsh please review

@zeddii

zeddii commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

environment variable only options are clunky. You can keep the environment variable processing, but also passing it as a command line options makes it much more discoverable and obvious in logs and command lines.

@KasperSloth99

Copy link
Copy Markdown
Author

@zeddii I just followed how it is done with f.ex LOPPER_DTC_FLAGS. If you prefer i can do it as a CLI option?

@zeddii

zeddii commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

LOPPER_DTC_FLAGS is one of the few environment variables (and for what it is used for, it shouldn't be used like it is anymore, there's a command line equivalent).

For something down in the pipeline like an assist, having the option near the assist on the command line helps usability and understandability.

… via CLI

I ran into an issue of not being able to add my own
zephyr_supported_comp.yaml file, without having to have my own fork and
edit the upstream file. Instead it is much nicer to be able to set the
path to your own compatible schema, and have it be part of your own
repository.

Add a --extra-zephyr-comp <path> argument to the gen_domain_dts assist
that can be repeated to merge one or more user-provided YAML files on
top of the upstream zephyr_supported_comp.yaml. Later entries override
earlier same-key entries. Parsing follows the argparse pattern used in
parse_openamp_args so positional arguments to the assist are preserved.

Signed-off-by: Kasper Sloth <kslo@ambu.com>
@KasperSloth99 KasperSloth99 force-pushed the kslo/patch-lopper-to-take-custom-comp branch from e515373 to 9978b4b Compare June 23, 2026 14:57
@KasperSloth99

Copy link
Copy Markdown
Author

@zeddii I changed it to be a cli argument instead.

@zeddii

zeddii commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

This looks good to me. Still waiting on the other review before merging.

@kedareswararao kedareswararao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes looks fine to me

@zeddii zeddii merged commit f7e68ab into devicetree-org:master Jun 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants