[PATCH v1] colibri_imx7: disable HAB and CAAM support
Stefano Babic
sbabic at denx.de
Fri Jan 3 12:23:11 CET 2020
Hi Igor,
On 27/12/19 10:23, Igor Opaniuk wrote:
> Hi Breno,
>
> On Mon, Dec 23, 2019 at 7:07 PM Breno Matheus Lima
> <brenomatheus at gmail.com> wrote:
>>
>> Hi Igor,
>>
>> Em qui., 19 de dez. de 2019 às 07:55, Igor Opaniuk
>> <igor.opaniuk at gmail.com> escreveu:
>>>
>>> From: Igor Opaniuk <igor.opaniuk at toradex.com>
>>>
>>> Currently Colibri iMX7 NAND version doesn't boot at all with
>>> HABv4 support enabled. If CSF section is included in the final
>>> imx binary, BootROM every time switches to usb recovery mode.
>>> However eMMC version of the same SoM works without any issues.
>>>
>>> Disable HAB and CAAM support for now until the problem is properly
>>> investigated and fixed.
>>>
>>
>> This issue is also happening with i.MX6ULL, seems that padding the
>> U-Boot binary to the size defined in boot data is addressing this
>> issue.
>>
>> Please follow example below.
>>
>> 1. Dump boot data:
>>
>> $ hexdump u-boot-dtb.imx | head
>> 0000000 00d1 4020 0000 8780 0000 0000 f42c 877f
>> 0000010 f420 877f f400 877f 6000 878d 0000 0000
>> 0000020 f000 877f b000 000d 0000 0000 01d2 40e8
>> 0000030 01cc 04e4 0c02 6840 ffff ffff 0c02 6c40
>>
>> IVT self = 0x877ff400
>> Boot data addr = 0x877ff000
>> Boot data size = 0x000db000
>>
>> 2. Calculate image size:
>>
>> Image offset = IVT self(0x877ff400) - Boot data addr(0x877ff000) = 0x400
>> Total image size = Boot data size(0x000db000) - Image offset(0x400) = 0xdac00
>>
>> 3. Pad U-Boot image:
>>
>> $ objcopy -I binary -O binary --pad-to 0xdac00 --gap-fill=0x00
>> u-boot-dtb.imx u-boot-dtb.imx.pad
>>
>> Could you please try similar in your i.MX7D board?
>>
>> Thanks,
>> Breno Lima
>
> Finally, it works!
>
> Thanks a lot for your help! This should be documented (I'll create a
> patch for this)
> or padding should implicitly be done in makefiles when building the
> final imx image,
> including initial padding for 0x400, like here [1].
I left [1] in my queue and I have always asked myself if we really need
it. Frankly speaking, I prefer that the case should be clearly
documented instead of adding an initial padding. Padding could forbid
(or makes more difficult) to pack u-boot inside another container.
Regards,
Stefano
>
> Regards,
> Igor
>
> [1] https://patchwork.ozlabs.org/patch/1136343/
>
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
More information about the U-Boot
mailing list