summaryrefslogtreecommitdiff
path: root/tools/sfspl.c
AgeCommit message (Collapse)Author
2025-03-18dumpimage: fix handling of StarFive SPL too longHeinrich Schuchardt
The header of the StarFive U-Boot SPL file u-boot-spl.normal.out has a field indicating the payload size. When copying U-Boot SPL from a partition the copied file might be too long. Currently in this situation a misleading error message 'Incorrect CRC32' is written. We must use the payload size and not the file size when calculating the CRC32. Write a warning if the file is too long indicating the correct size. This enables the user to truncate the file accordingly. Signed-off-by: Heinrich Schuchardt <[email protected]>
2023-10-30tools: mkimage: fix sfspl_image_extract_subimage()Heinrich Schuchardt
Do not leak file descriptor if writing fails. Correct the error text if opening a file fails. Addresses-Coverity-ID: 467054 Resource leaks Fixes: 64fd30d367a1 ("tools: mkimage: Add StarFive SPL image support") Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-09-20tools: mkimage: Add StarFive SPL image supportHeinrich Schuchardt
The StarFive JH7110 base boards require a header to be prefixed to the SPL binary image. This has previously done with a vendor tool 'spl_tool' published under a GPL-2-or-later license. Integrate this capability into mkimage. Signed-off-by: Heinrich Schuchardt <[email protected]> Tested-by: Chanho Park <[email protected]> Tested-by: Milan P. Stanić <[email protected]>