[U-Boot] [PATCH] binman: tegra: Adjust symbol calculation depending on end-at-4gb

Stephen Warren swarren at wwwdotorg.org
Fri Nov 8 22:30:37 UTC 2019


On 11/7/19 9:25 AM, Stephen Warren wrote:
> On 11/6/19 5:22 PM, Simon Glass wrote:
>> A recent change adjusted the symbol calculation to work on x86 but broke
>> it for Tegra. In fact this is because they have different needs.
>>
>> On x86 devices the code is linked to a ROM address and the end-at-4gb
>> property is used for the image. In this case there is no need to add the
>> base address of the image, since the base address is already built into
>> the offset and image-pos properties.
>>
>> On other devices we must add the base address since the offsets start at
>> zero.
>>
>> In addition the base address is currently added to the 'offset' and 
>> 'size'
>> values. It should in fact only be added to 'image-pos', since 'offset' is
>> relative to its parent and 'size' is not actually an address. This code
>> should have been adjusted when support for 'image-pos' and 'size' was
>> added, but it was not.
>>
>> To correct these problems:
>> - move the code that handles adding the base address to section.py, which
>>    can check the end-at-4gb property and which property
>>    (offset/size/image-pos) is being read
>> - add the base address only when needed (only for image-pos and not if 
>> the
>>    image uses end-at-4gb)
>> - add a note to the documentation
>> - add a separate test to cover x86 behaviour
>>
>> Fixes: 15c981cc (binman: Correct symbol calculation with non-zero 
>> image base)
> 
> Tested-by: Stephen Warren <swarren at nvidia.com>
> Thanks!

Can we please get this fix into u-boot/master ASAP? As I mentioned, 
without this, all jetson-tk1 testing is broken (in a way that causes 
tests to time out and take ages instead of just failing too, thus taking 
up test system time), and many other custodian branches have also picked 
up the bad patch, so the breakage is seen all over now:-( Thanks.


More information about the U-Boot mailing list