mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-30 00:21:06 +00:00
rockchip: make_fit_atf.py: fix .its generation for a single atf image
The commit619f002db8
("rockchip: make_fit_atf.py: fix loadables property set error") fixed the double-loading of the primary atf-image, but didn't take into account that there may be rare atf images with only that main section present. Right now this will result in a broken its due to the loadables section not getting closed correctly, so fix that by adapting the guards around the loop. The guards now protect against 0 segments when the bl31 binary doesn't contain any section and 1 segment when only a core atf section is present. Fixes:619f002db8
("rockchip: make_fit_atf.py: fix loadables property set error") Signed-off-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
This commit is contained in:
parent
03f98b75e4
commit
d46b548290
1 changed files with 2 additions and 2 deletions
|
@ -82,7 +82,7 @@ def append_conf_section(file, cnt, dtname, segments):
|
|||
file.write('\t\t\tdescription = "%s";\n' % dtname)
|
||||
file.write('\t\t\tfirmware = "atf_1";\n')
|
||||
file.write('\t\t\tloadables = "uboot"')
|
||||
if segments != 0:
|
||||
if segments > 1:
|
||||
file.write(',')
|
||||
for i in range(1, segments):
|
||||
file.write('"atf_%d"' % (i + 1))
|
||||
|
@ -90,7 +90,7 @@ def append_conf_section(file, cnt, dtname, segments):
|
|||
file.write(',')
|
||||
else:
|
||||
file.write(';\n')
|
||||
if segments == 0:
|
||||
if segments <= 1:
|
||||
file.write(';\n')
|
||||
file.write('\t\t\tfdt = "fdt_1";\n')
|
||||
file.write('\t\t};\n')
|
||||
|
|
Loading…
Reference in a new issue