[PATCH v2 4/5] binman: Convert FIT entry type to a subclass of Section entry type

Jan Kiszka jan.kiszka at siemens.com
Tue Feb 15 18:06:56 CET 2022


On 15.02.22 17:50, Jan Kiszka wrote:
> On 15.02.22 13:27, Alper Nebi Yasak wrote:
>> On 14/02/2022 12:09, Jan Kiszka wrote:
>>> On 07.02.22 23:08, Alper Nebi Yasak wrote:
>>>> The binman FIT entry type shares some code with the Section entry type.
>>>> This shared code is bound to grow, since FIT entries are conceptually a
>>>> variation of Section entries.
>>>>
>>>> Make FIT entry type a subclass of Section entry type, simplifying it a
>>>> bit and providing us the features that Section implements. Also fix the
>>>> subentry alignment test which now attempts to write symbols to a
>>>> nonexistent SPL ELF test file by creating it first.
>>>>
>>>> Signed-off-by: Alper Nebi Yasak <alpernebiyasak at gmail.com>
>>>> Reviewed-by: Simon Glass <sjg at chromium.org>
>>>> ---
>>>
>>> Only came to testing this now, and it causes a regression.
>>>
>>> Before this commit (I've added fdtmap to
>>> arch/arm/dts/k3-am65-iot2050-boot-image.dtsi for this):
>>>
>>> $ source/tools/binman/binman -D ls -i flash.bin
>>> Name                 Image-pos  Size     Entry-type         Offset   Uncomp-size
>>> ----------------------------------------------------------------------------------
>>> main-section                 0   8c0000  section                  0
>>>   blob-ext at 0x000000          0    37373  blob-ext at 0x000000        0
>>>   blob at 0x080000          80000    84484  blob at 0x080000        80000
>>>   fit at 0x280000          280000    f445f  fit at 0x280000        280000
>>>   fdtmap                37445f      cf9  fdtmap              37445f
>>>   fill at 0x680000         680000    20000  fill at 0x680000       680000
>>>   fill at 0x6a0000         6a0000    20000  fill at 0x6a0000       6a0000
>>>   blob-ext at 0x6c0000     6c0000    415de  blob-ext at 0x6c0000   6c0000
>>>   blob-ext at 0x740000     740000    43952  blob-ext at 0x740000   740000
>>>   blob-ext at 0x7c0000     7c0000    415e2  blob-ext at 0x7c0000   7c0000
>>>   blob-ext at 0x840000     840000    4395a  blob-ext at 0x840000   840000
>>>
>>> With this commit:
>>>
>>> $ source/tools/binman/binman -D ls -i flash.bin
>>> Name                          Image-pos  Size     Entry-type         Offset   Uncomp-size
>>> -------------------------------------------------------------------------------------------
>>> main-section                          0   8c0000  section                  0
>>>   blob-ext at 0x000000                   0    37373  blob-ext at 0x000000        0
>>>   blob at 0x080000                   80000    84484  blob at 0x080000        80000
>>>   fit at 0x280000                                    fit at 0x280000        280000
>>>     u-boot                                        section
>>>       u-boot-nodtb                                u-boot-nodtb
>>>     fdt-iot2050-basic                             section
>>>       blob                                        blob
>>>     fdt-iot2050-basic-pg2                         section
>>>       blob                                        blob
>>>     fdt-iot2050-advanced                          section
>>>       blob                                        blob
>>>     fdt-iot2050-advanced-pg2                      section
>>>       blob                                        blob
>>>     k3-rti-wdt-firmware                           section
>>>       blob-ext                                    blob-ext
>>>   fdtmap                         37445f      cd9  fdtmap              37445f
>>>   fill at 0x680000                  680000    20000  fill at 0x680000       680000
>>>   fill at 0x6a0000                  6a0000    20000  fill at 0x6a0000       6a0000
>>>   blob-ext at 0x6c0000              6c0000    415de  blob-ext at 0x6c0000   6c0000
>>>   blob-ext at 0x740000              740000    43952  blob-ext at 0x740000   740000
>>>   blob-ext at 0x7c0000              7c0000    415e2  blob-ext at 0x7c0000   7c0000
>>>   blob-ext at 0x840000              840000    4395a  blob-ext at 0x840000   840000
>>>
>>
>> The AddMissingProperties() and SetCalculatedProperties() methods were
>> disabled for FIT as a fixup to this patch, that's why image-pos etc.
>> aren't available. See comments at [1] for some context.
>>
>> Hopefully my two patches [2][3] fix things, can you test with them?
>>
>> [1] "binman: Correct the error message for a bad hash algorithm"
>> https://patchwork.ozlabs.org/project/uboot/patch/20220208105941.1.I8f212a1150defebaf8b7b15a79f7a2fc62c276b2@changeid/
>>
>> [2] "binman: Skip processing "hash" subnodes of FIT subsections"
>> https://patchwork.ozlabs.org/project/uboot/patch/20220209190236.26479-1-alpernebiyasak@gmail.com/
>>
> 
> This one helped, indeed.
> 

...not completely:

$ source/tools/binman/binman replace -i flash.bin -f fit at 0x380000.fit
fit at 0x380000binman: [Errno 13] Permission denied: '/.fit at 0x380000.itb'

Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux


More information about the U-Boot mailing list