
Hi Chris,
On 18.02.19 23:23, Chris Packham wrote:
On Mon, Feb 18, 2019 at 8:13 PM Stefan Roese sr@denx.de wrote:
Hi Chris,
On 15.02.19 23:49, Chris Packham wrote:
For the time being the Armada MSYS SoCs need to use the bin_hdr from the Marvell U-Boot. Because of this the binary.0 does not contain the image header that a proper u-boot SPL would so the adjustment introduced by commit 94084eea3bd3 ("tools: kwbimage: Fix dest addr") does not apply.
Thanks for the explanation. I'm wondering if it would be better (if possible) to auto detect this situation of using a bin_hdr from Marvell vs U-Boot SPL instead in this tool. This would help especially if we have full DDR init support in mainline U-Boot for this SoC at some time, as we then need to differentiate between those two options for this SoC.
Would this be possible?
One way would be to check the filename, binary.0 means don't adjust it whereas u-boot-spl.img does. I also considered modifying the process to create binary.0 to prepend sizeof(image_header_t) bytes to allow it to work but I went with the quickest option for me to implement.
If it's an acceptable solution the filename thing would be quite easy to implement. Adding a flag or parameter in the kwbimage.cfg would also be relatively easy.
I'm okay with using the filename to decide here. Please go ahead with this change and perhaps add a warning / error, if none of the standard names is provided (u-boot-spl.* vs binary.0).
Thanks, Stefan