[U-Boot] [PATCH v2 2/2] spl: socfpga: stratix10: add hex file output for spl image

Marek Vasut marex at denx.de
Thu Sep 6 18:16:23 UTC 2018


On 09/06/2018 07:40 PM, Dalon L Westergreen wrote:
> On Thu, 2018-09-06 at 15:41 +0200, Marek Vasut wrote:
>> On 09/06/2018 03:39 PM, Dalon L Westergreen wrote:
>> On Thu, 2018-09-06 at 12:09 +0200, Marek Vasut wrote:
>> On 09/06/2018 05:02 AM, Dalon Westergreen wrote:
>> Stratix10 requires a hex image of the spl for boot.  The hex
>> image is added to the FPGA configuration image and loaded to
>> the processor memory by the configuration engine.
>>
>> v2:
>>   -> add CONFIG_OF_EMBED to include dtb in elf
>>   -> generate hex from elf source
>>
>> Signed-off-by: Dalon Westergreen <dwesterg at gmail.com <mailto:dwesterg at gmail.com> <mailto:dwesterg at gmail.com <mailto:dwesterg at gmail.com>>>
>> ---
>>  configs/socfpga_stratix10_defconfig | 1 +
>>  scripts/Makefile.spl                | 6 ++++++
>>  2 files changed, 7 insertions(+)
>>
>> diff --git a/configs/socfpga_stratix10_defconfig b/configs/socfpga_stratix10_defconfig
>> index dceadff439..17cc732cbe 100644
>> --- a/configs/socfpga_stratix10_defconfig
>> +++ b/configs/socfpga_stratix10_defconfig
>> @@ -56,3 +56,4 @@ CONFIG_DM_USB=y
>>  CONFIG_USB_DWC2=y
>>  CONFIG_USB_STORAGE=y
>>  CONFIG_USE_TINY_PRINTF=y
>> +CONFIG_OF_EMBED=y
>>
>> Why is this needed ? And where did the objcopy hack go ? What is the
>> explanation here ?
>>
>> You suggested the use of CONFIG_OF_EMBED as an alternative to using the
>> u-boot-spl-dtb.bin for objcopy.
>> The intent is to ensure that the spl elf has the dtb included, and then
>> a simple objcopy to elf to hex is fine.
>> You no longer need the --change-address as the elf indicates the correct
>> start address, unlike the binary.
>>
>> And that's fine with your usecase ? Fine be me then ...
> 
> Is it possible to apply CONFIG_OF_EMBED=y only to the SPL build?

I think so, and if not, create CONFIG_SPL_OF_EMBED

-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list