-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
board: cavs15: Add a option to control signing ways #31902
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! Just a bit of clarification / clean up maybe
scripts/west_commands/sign.py
Outdated
@@ -112,6 +112,8 @@ def do_add_parser(self, parser_adder): | |||
help='''path to the tool itself, if needed''') | |||
group.add_argument('-D', '--tool-data', default=None, | |||
help='''path to tool data/configuration directory, if needed''') | |||
group.add_argument('-X', '--no-xman', action='store_true', | |||
help='''signing image without xman, if needed''') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe just '''do not add extended manifest'''
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, improved the description.
@@ -38,7 +38,7 @@ def copy(self, data, size): | |||
raise ValueError("Not enough buffer. allocated: %d requested: %d" | |||
% (self.alloc_size, size)) | |||
logging.debug("Copying Data to DMA buffer") | |||
self.buf[:] = data[:] | |||
self.buf[:size] = data[:size] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this related or needed? Was the original version wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old version only can assign sequence of same size , buffer and data not same size, so need this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it changed now because you removed the manifest from the image?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is not due to remove manifest. Even if add manifest, the buffer and data size still not same, it is fix for load firmware process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, so it isn't really related to the main topic of this commit...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, should I use a new commit for this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that would be easier to understand, yes. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, do you think it's ok?
fafecb2
to
f53699f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing comments!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--no-xman
should not be added to the common arguments, because it doesn't apply to imgtool. Please use tool_args
.
source code:
From source code, I saw the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be at best an optimization of just a few bytes in image transferred over DMA. The manifest doesn't go into SRAM and shouldn't change runtime behavior at all. Not that it's a bad idea, but why do we care? Is something breaking? +1 regardless.
That said: Marti's criticism is correct: this is a tool-specific thing with rimage and doesn't belong in the global signing arguments.
f53699f
to
8c91c6b
Compare
@mbolivar-nordic address your comment, could you help to approve or add any comments? |
I would like to see it fxied in 2.5 release. @mbolivar-nordic , please take look at the code change again. |
8c91c6b
to
05fca3d
Compare
@mbolivar-nordic Hi, could you help to review again? |
When load firmware by script, the buffer size and data size are not same, so specify size when copy data to buffer. Signed-off-by: Jian Kang <[email protected]>
05fca3d
to
d7c5a1b
Compare
Zephyr testcases(not SOF case) not use kernel DSP driver to load image on ADSP board, thus do not need signing with xman. So add a input '--no-manifest' to specify signing without xman in image. If use DSP driver load image, we should not specify this. Signed-off-by: Jian Kang <[email protected]> Signed-off-by: Anas Nashif <[email protected]>
d7c5a1b
to
6bef024
Compare
Fixed #31819
Zephyr testcases(not SOF case) not use kernel DSP driver to load image
on ADSP board, thus do not need signing with xman. So add a 'no-manifest'
to specify signing without xman in image. If use DSP driver load image,
we should not specify.
And fixed a syntax error in script when download firmware. When copy the data to buffer, the old script can not assign sequence of same size, so specify size.
Signed-off-by: Jian Kang [email protected]