-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fiptool: Add --pad command line option #952
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.
Thanks, but "dp-arm" is not an acceptable Signed-off-by.
All of my patches use that form. I will change it for new submissions. |
It violates contributing.md and the Linux DCO. |
From this statement, it was not clear whether If I understood the source code correctly, it looks like Here, I mean |
Allow each image to reserve some padding space before alignment. Use case is --align 0x4000 --pad 64 to make sure sufficient room is available to prepend (or append) vendor-specific headers. Helps resolve afaerber/meson-tools#3. Change-Id: I31e59456600b72cd30cde0f653ec6523480a5823 Signed-off-by: Andreas Färber <[email protected]> Signed-off-by: Dimitris Papastamos <[email protected]>
Yes, I think it is --post-pad according to this definition. I guess the reason --pre-pad is not going to be particularly useful is because the image will not run correctly if the start of the image contains extra headers (offsets will be incorrect). There's no magic done in the TF loader to cope with this situation. |
Actually the Amlogic firmware does need a pre-pad, but the proprietary tool (and currently my tool) assumes a post-pad. For a --pre-pad much more code would need to be changed than just the alignment lines. Not sure if it's worth implementing that, given that a simple cat command could achieve the same effect for a fixed size header. On the other hand, by that argument, I could just cat a dd if=/dev/zero of=pad bs=1 count=N file to the end of my blobs and use unmodified --align and drop the PR. Thoughts? |
Yeah, I was also thinking this. Append (or prepend) headers, then put the images into FIP |
Hi @afaerber. We don't have a strong view on whether it's better to use |
@@ -729,7 +749,8 @@ static void create_usage(void) | |||
printf("fiptool create [opts] FIP_FILENAME\n"); | |||
printf("\n"); | |||
printf("Options:\n"); | |||
printf(" --align <value>\t\tEach image is aligned to <value> (default: 1).\n"); | |||
printf(" --align <bytes>\t\tEach image is aligned to <bytes> (default: 1).\n"); | |||
printf(" --pad <bytes>\t\t\tEach image is padded by <bytes> (default: 0).\n"); |
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.
minor: Could say "... padded at the end by...". Same for other cases below.
jenkins: retest this please |
@afaerber ping |
@afaerber |
Closing PR - it has not been confirmed that this change will be used. Please re-open if this PR is still required. |
Allow each image to reserve some padding space before alignment.
Use case is --align 0x4000 --pad 64 to make sure sufficient
room is available to prepend (or append) vendor-specific headers.
Helps resolve afaerber/meson-tools#3.
Change-Id: I31e59456600b72cd30cde0f653ec6523480a5823
Signed-off-by: Andreas Färber [email protected]
Signed-off-by: Dimitris Papastamos [email protected]