-
Notifications
You must be signed in to change notification settings - Fork 28
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
Dependency on Amlogic's fip_create #3
Comments
Hardkernel's fip_create is based on the tool of the same name in ARM Trusted Platform, version 0.4 Amlogic has made the following changes: image_offset and toc_size have hard coded values (0x4000). toc_entry_lookup_list contains an Amlogic specific entry:
I agree it would be preferable to rely on the original ARM code enhanced by the missing UUID. Thank you for working in this direction. Best regards Heinrich Schuchardt |
Thanks, I am well aware of arm-trusted-firmware, that's what "fork" referred to. You will find comments of mine related to the introduction of fiptool complicating forward-porting of As pointed out in bdo#860834, that assessment about a fixed 0x4000 is incorrect. Here is my last diff from around the introduction of
You are overlooking the second hunk. Only the first hunk hardcodes 0x4000, in the knowledge that the TOC will be smaller. Note how that is different from a simple An optimized implementation of On second thoughts it might be easier to add some |
When using
When implementing bl301 in fiptool in between bl2 and bl31 it succeeds, so there appear to be hardcoded offset (0x0001c200) and size (0x000017c0) assumptions for bl301.
|
Does your test really prove that the address is hard coded? Or does it only imply that the code does not care about the UUIDs in the tasble of contents and assumes a certain sequence of the binaries? I guess first we need a signing tool that can work around the 0x4000 alignment to figure that out. Best regards Heinrich Schuchardt |
The --blob uuid=AABBCCDD-ABCD-EFEF-ABCD-12345678ABCD,file=... option places the TOC entry last, but firmware blobs expect an offset resulting from ordering it between bl3 (aka scp-fw) and bl31 (soc-fw). Place the UUID inline to avoid mistaking this for anything official, and name the commandline option "amlogic-bl301-fw" for now. See afaerber/meson-tools#3 for more background. Signed-off-by: Andreas Färber <[email protected]>
Allow each image to reserve some space before alignment. Use case is --align 0x4000 --align-reserve 64 to make sure sufficient room is available to prepend (or append) vendor-specific headers. Helps resolve afaerber/meson-tools#3. Signed-off-by: Andreas Färber <[email protected]>
Allow each image to reserve some space before alignment. Use case is --align 0x4000 --align-reserve 64 to make sure sufficient room is available to prepend (or append) vendor-specific headers. Helps resolve afaerber/meson-tools#3. Signed-off-by: Andreas Färber <[email protected]>
The --blob uuid=AABBCCDD-ABCD-EFEF-ABCD-12345678ABCD,file=... option places this custom TOC entry last. This is because pack_images() walks through the list of image descriptions sequentially, and the --blob option appends to the end of the list in create_cmd(). The command line order of options is thereby not taken into account. But firmware blobs expect a load offset resulting from ordering bl301 between bl30 (aka scp-fw) and bl31 (soc-fw). Therefore add an entry to toc_entries[] for usage by fill_image_descs(). Place the UUID inline to avoid mistaking it for anything official, and name the commandline option "amlogic-scu_task-fw" for now. See afaerber/meson-tools#3 for more background. Signed-off-by: Andreas Färber <[email protected]>
The size proves that it is not taking the n-th TOC entry, otherwise it would be larger. I've pushed patches against latest arm-trusted-firmware - the last test result above was already using an earlier version of the UUID addition (even without 64 byte alignment tweak). With those fiptool-side changes no complicated resizing should be necessary in amlbootsig any more. Did I miss something? |
The --blob uuid=AABBCCDD-ABCD-EFEF-ABCD-12345678ABCD,file=... option places this custom TOC entry last. This is because pack_images() walks through the list of image descriptions sequentially, and the --blob option appends to the end of the list in create_cmd(). The command line order of options is thereby not taken into account. But firmware blobs expect a load offset resulting from ordering bl301 between bl30 (aka scp-fw) and bl31 (soc-fw). Therefore add an entry to toc_entries[] for usage by fill_image_descs(). Place the UUID inline to avoid mistaking it for anything official, and name the commandline option "amlogic-scp-task-fw". See afaerber/meson-tools#3 for more background. Signed-off-by: Andreas Färber <[email protected]>
Allow each image to reserve some space before alignment. Use case is --align 0x4000 --align-reserve 64 to make sure sufficient room is available to prepend (or append) vendor-specific headers. Helps resolve afaerber/meson-tools#3. Signed-off-by: Andreas Färber <[email protected]>
The --blob uuid=AABBCCDD-ABCD-EFEF-ABCD-12345678ABCD,file=... option places this custom TOC entry last. This is because pack_images() walks through the list of image descriptions sequentially, and the --blob option appends to the end of the list in create_cmd(). The command line order of options is thereby not taken into account. But firmware blobs expect a load offset resulting from ordering bl301 between bl30 (aka scp-fw) and bl31 (soc-fw). Therefore add an entry to toc_entries[] for usage by fill_image_descs(). Place the UUID inline to avoid mistaking it for anything official, and name the commandline option "amlogic-scp-task-fw". See afaerber/meson-tools#3 for more background. Signed-off-by: Andreas Färber <[email protected]>
Allow each image to reserve some space before alignment. Use case is --align 0x4000 --align-reserve 64 to make sure sufficient room is available to prepend (or append) vendor-specific headers. Helps resolve afaerber/meson-tools#3. Signed-off-by: Andreas Färber <[email protected]>
The --blob uuid=AABBCCDD-ABCD-EFEF-ABCD-12345678ABCD,file=... option places this custom TOC entry last. This is because pack_images() walks through the list of image descriptions sequentially, and the --blob option appends to the end of the list in create_cmd(). The command line order of options is thereby not taken into account. But firmware blobs expect a load offset resulting from ordering bl301 between bl30 (aka scp-fw) and bl31 (soc-fw). Therefore add an entry to toc_entries[] for usage by fill_image_descs(). Place the UUID inline to avoid mistaking it for anything official, and name the commandline option "amlogic-scp-task-fw". See afaerber/meson-tools#3 for more background. Signed-off-by: Andreas Färber <[email protected]>
The --blob uuid=AABBCCDD-ABCD-EFEF-ABCD-12345678ABCD,file=... option places this custom TOC entry last. This is because pack_images() walks through the list of image descriptions sequentially, and the --blob option appends to the end of the list in create_cmd(). The command line order of options is thereby not taken into account. But firmware blobs expect a load offset resulting from ordering bl301 between bl30 (aka scp-fw) and bl31 (soc-fw). Therefore add an entry to toc_entries[] for usage by fill_image_descs(). Place the UUID inline to avoid mistaking it for anything official, and name the commandline option "amlogic-scp-task-fw". See afaerber/meson-tools#3 for more background. Signed-off-by: Andreas Färber <[email protected]>
The
amlbootsig
tool depends on pre-aligned input specific to thefip_create
tool in the Hardkernel fork.The tool should be amended to do the necessary alignment itself, based on an upstream
fiptool
input (modulo the Amlogic BL3-0-1 UUID).That would avoid distros needing to build and package a custom
fip_create
tool.The text was updated successfully, but these errors were encountered: