From: Kever Yang Date: Fri, 5 Jul 2019 19:38:42 +0800 Subject: [U-Boot] [PATCH] rockchip: make_fit_atf.py: fix loadables property set error In-Reply-To: <8bc69115-16ac-7d1f-2607-684bf8d5bfe8@theobroma-systems.com> References: <20190704094440.30896-1-andy.yan@rock-chips.com> <8bc69115-16ac-7d1f-2607-684bf8d5bfe8@theobroma-systems.com> Message-ID: <8a60419f-35fa-c562-4b30-98b67ba10a9f@rock-chips.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de Hi Christoph, On 07/05/2019 05:15 PM, Christoph Müllner wrote: > > On 04.07.19 11:44, Andy Yan wrote: >> Commit b238e4b00ced ("rockchip: Cleanup of make_fit_atf.py.") set >> firmware = "atf_1"; >> loadables = "uboot","atf_1","atf_2"; >> >> Actually it should be: >> firmware = "atf_1"; >> loadables = "uboot","atf_2","atf_3"; > Does "atf_1" not need to be among loadables as well? The "atf_1" not need to be among loadables, or else it will be loaded twice. The loadables suppose to be those firmware not have a entry but need to load by SPL. > My version of the script produces: > > loadables = "uboot","atf_1","atf_2","atf_3"; > > And with that I was able to boot mainline ATF. The mainline ATF now have 4 segments instead of 3, I don't know why there is a stand alone 'GNU_STACK' section, so it's able to boot there is one extra segment help, it loads all atf_1, atf_2 and atf_3. Rockchip elf and older mainline ATF do not have the extra 'GNU_STACK' section, and the last atf_3 is not loaded, which lead to the ATF not able to run. Program Headers:   Type           Offset             VirtAddr           PhysAddr                  FileSiz            MemSiz              Flags Align   LOAD           0x0000000000000000 0x0000000000000000 0x0000000000000000                  0x0000000000014058 0x0000000000044000  RWE 10000   LOAD           0x0000000000020000 0x00000000ff3b0000 0x00000000ff3b0000                  0x0000000000001f58 0x0000000000001f58  RWE 10000   LOAD           0x0000000000030000 0x00000000ff8c0000 0x00000000ff8c0000                  0x0000000000002000 0x0000000000003000  RWE 10000   GNU_STACK      0x0000000000000000 0x0000000000000000 0x0000000000000000                  0x0000000000000000 0x0000000000000000  RW     10 I will apply this patch as a fix. Thanks, - Kever > >> Signed-off-by: Andy Yan >> --- >> >> arch/arm/mach-rockchip/make_fit_atf.py | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/arch/arm/mach-rockchip/make_fit_atf.py b/arch/arm/mach-rockchip/make_fit_atf.py >> index 45ec105887..db0ae96ca8 100755 >> --- a/arch/arm/mach-rockchip/make_fit_atf.py >> +++ b/arch/arm/mach-rockchip/make_fit_atf.py >> @@ -94,7 +94,7 @@ def append_conf_section(file, cnt, dtname, segments): >> if segments != 0: >> file.write(',') >> for i in range(1, segments): >> - file.write('"atf_%d"' % (i)) >> + file.write('"atf_%d"' % (i + 1)) >> if i != (segments - 1): >> file.write(',') >> else: >>