From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dr. Philipp Tomsich Date: Wed, 14 Feb 2018 01:08:11 +0100 Subject: [U-Boot] rk3288: broken boot In-Reply-To: References: <2145B975-8719-4A80-A18D-205EC0834B73@theobroma-systems.com> <4F5E4507-57AA-4C33-BCBF-69A638D5092E@theobroma-systems.com> Message-ID: <6F29BF54-F25E-4CF4-8EB2-36AAE096FA4B@theobroma-systems.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de Jagan, > On 13 Feb 2018, at 13:20, Jagan Teki wrote: > > On Tue, Feb 13, 2018 at 5:29 PM, Dr. Philipp Tomsich > wrote: >> I verified the build for evb-rk3288_defconfig and everything looks fine: >> >> spl/u-boot-spl.bin: file format binary >> >> >> Disassembly of section .data: >> >> 00000000 <.data>: >> 0: eaffffff b 0x4 <— this is the extra branch inserted (to be overwritten by mkimage) >> 4: ea000016 b 0x64 > > I saw this on SPL, but I'm using TPL where I'm using mkimage to tp binary > >> ... >> 20: ea00000f b 0x64 >> 24: e59ff014 ldr pc, [pc, #20] ; 0x40 >> 28: e59ff014 ldr pc, [pc, #20] ; 0x44 >> 2c: e59ff014 ldr pc, [pc, #20] ; 0x48 >> 30: e59ff014 ldr pc, [pc, #20] ; 0x4c >> 34: e59ff014 ldr pc, [pc, #20] ; 0x50 >> 38: e59ff014 ldr pc, [pc, #20] ; 0x54 >> 3c: e59ff014 ldr pc, [pc, #20] ; 0x58 > > I can see the difference of size by 8 bytes with spl/u-boot-spl-dtb.bin > > with tparams->header_size = RK_SPL_HDR_START + 4; (working scenario) > $ ls -l spl/u-boot-spl-dtb.bin > -rw-r--r-- 1 root root 37571 > > normal build have > $ ls -l spl/u-boot-spl-dtb.bin > -rw-r--r-- 1 root root 37563 In order to find the issue, I’d recommend to look at both the ELF file and the binary for your TPL stage. Disassembling the binary will show whether the extra branch is indeed added as the first instruction and if the second instruction is a branch to the reset entry-point. Regards, Philipp.