[U-Boot] [PATCH v2] spl: add overall SPL size check

Simon Goldschmidt simon.k.r.goldschmidt at gmail.com
Tue May 28 18:05:53 UTC 2019


Am 27.05.2019 um 18:25 schrieb Masahiro Yamada:
> On Fri, May 24, 2019 at 5:17 AM Tom Rini <trini at konsulko.com> wrote:
>>
>> On Thu, May 23, 2019 at 10:08:54PM +0200, Simon Goldschmidt wrote:
>>> Am 13.05.2019 um 14:45 schrieb Simon Goldschmidt:
>>>> On Sat, May 11, 2019 at 3:55 AM Tom Rini <trini at konsulko.com> wrote:
>>>>>
>>>>> On Mon, Apr 22, 2019 at 10:27:21PM +0200, Simon Goldschmidt wrote:
>>>>>
>>>>>> This adds a size check for SPL that can dynamically check generated
>>>>>> SPL binaries (including devicetree) for a size limit that ensures
>>>>>> this image plus global data, heap and stack fit in initial SRAM.
>>>>>>
>>>>>> Since some of these sizes are not available to make, a new host tool
>>>>>> 'spl_size_limit' is added that dumps the resulting maximum size for
>>>>>> an SPL binary to stdout. This tool is used in toplevel Makefile to
>>>>>> implement the size check on SPL binaries.
>>>>>>
>>>>>> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com>
>>>>>
>>>>> OK, this has a race / dependency problem:
>>>>> https://travis-ci.org/trini/u-boot/jobs/530803338
>>>>
>>>> Hmm, let me check that.
>>>
>>> OK, so as I see it, this is not a race but a dependency problem: the
>>> "tools-only" target just does not generate the "generic-asm-offsets.h" file.
>>>
>>> However, just adding a dependency to include/generated/generic-asm-offsets.h
>>> leads to an error (no rule to build that file) since that file is generated
>>> by Kbuild magic that I don't really get...
>>>
>>> Any idea how to make this depend on /Kbuild being run?
>>
>> For context, https://patchwork.ozlabs.org/patch/1088885/
>>
>> Yamada-san, do you have any ideas?  Thanks!
> 
> No, I have no idea.
> 
> 'tools' depends on 'prepare', which depends on 'prepare0'.
> 
> So, the dependency should be correct, but I do not see
> CHK     include/generated/generic-asm-offsets.h
> in the log at all.
> 
> I do not know why.

Thanks for the hint! The target in question was 'tools-only', not 
'tools'. And in contrast to 'tools', 'tools-only' is missing the 
dependency to 'prepare'. We could just add that unless we go JJ's python 
way.

Regards,
Simon


More information about the U-Boot mailing list