Skip to content

Commit

Permalink
image builder: allow passing commands directly by using % prefix
Browse files Browse the repository at this point in the history
With this change you can hand-craft commands which normally would be
parsed by `image_builder.py`, eg:

%app flash0 -x psh;-i;/etc/rc.psh ddr ddr;nonexistent
(will not generate corresponding `alias`, will not add `psh` to the
target image automatically)

This usage is discouraged and should be used only in testing and some
extremely hackish use cases.

JIRA: CI-494
  • Loading branch information
nalajcie committed Oct 17, 2024
1 parent 9624fa5 commit c0b1416
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/image_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ def build(cls, cmd: str = "", **kwargs):

# TODO: add compile-time checks for scripts validity (eg. memory regions cross-check)?

# allow passing commands directly without parsing them by using `%` prefix
if cmd.startswith("%"):
return PloCmdGeneric(cmd[1:].strip())

# generic PLO command - treated for now as string
return PloCmdGeneric(cmd)

Expand Down

0 comments on commit c0b1416

Please sign in to comment.