Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/snagrecover.md
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,9 @@ configuration:
Detailed instructions for building the required boot images can be found in the
[Xilinx documentation](https://xilinx.github.io/Embedded-Design-Tutorials), in
the "boot-and-configuration" section for ZynqMP SoCs. Please note that the
first boot image containing only the FSBL and PMUFW should not be required, as
Snagboot is capable of extracting a working first-stage boot image from the
full boot image.
first boot image containing only the FSBL and PMUFW is only required if the
boot image is signed, as Snagboot is capable of extracting a working
first-stage boot image from an unsigned full boot image.

The following images are required for all ZynqMP SoCs:

Expand Down
4 changes: 4 additions & 0 deletions src/snagrecover/firmware/zynqmp_fw.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ def drop_images(boot_bin: bytearray, keep_images):

img_table_offset = find_img_table(boot_bin)
img_table = ZynqMPImageTable.read(boot_bin, img_table_offset)
if img_table.auth_cert != 0:
raise ValueError(
"Cannot extract FSBL stage from a signed image, provide a custom FSBL image"
)

kept_images = []
next_image = 4 * img_table.image_hdr
Expand Down
Loading