[U-Boot] AM3517 SPL fails with CONFIG_DM enabled

Simon Goldschmidt simon.k.r.goldschmidt at gmail.com
Wed May 15 18:53:18 UTC 2019


Am 15.05.2019 um 20:43 schrieb Adam Ford:
> On Wed, May 15, 2019 at 1:25 PM Simon Goldschmidt
> <simon.k.r.goldschmidt at gmail.com> wrote:
>>
>> Am 15.05.2019 um 20:12 schrieb Adam Ford:
>>> I am trying to add DM support in SPL along with device tree support
>>> similar to how it's being done for the omap3_logic boards.
>>> Unfortunately, I think something is going wrong in the initialization
>>> with CONFIG_DM enabled for SPL because I get no text data, and it
>>> doesn't appear to boot.
>>>
>>> I tried enabling DM in SPL and using the older platdata method without
>>> success.  I have disabled DM_SERIAL in SPL and tried enabling the
>>> serial debug stuff, and I get nothing.  I don't have a debugger, so
>>> it's a bit more difficult to troubleshoot.
>>>
>>> The main difference between the am35 and omap3 is the memory
>>> controller, and I've tried to model the am35 after the omap3 boards I
>>> also maintain.  I was hoping someone might have any suggestions on how
>>> to track down the issue.  As of right now, I have OF_CONTROL working
>>> in U-Boot and with DM disabled in SPL, everything is good.
>>
>> I don't know that mach, but reading the files, you're calling
>> 'spl_early_init()' from your 'board_init_f()'. The problem I had there
>> was that I did not have enough heap - and notice you need pre-reloc heap
>> enabled.
> 
> I have a device tree setup with a variety of pre-reloc entries.  There
> is an omap3-u-boot.dtsi file which sets this up.
> dtc -I dtb -O dts spl/u-boot-spl.dtb lists a bunch of nodes for gpio,
> mmc, serial, and some misc dependencies.
> 
> Is there somewhere else I need to enable the pre-reloc stuff?

None that I know of. But I haven't made the transition to DM SPL, I only 
suffered when adding more DM drivers...

Are you sure that omap3-u-boot.dtsi gets auto-included? I don't know 
exactly how that automatism works...

> 
>>
>> spl_early_init() parses the dts and binds the drivers, and even the
>> default CONFIG_SPL_SYS_MALLOC_F_LEN of 1 KiB wasn't enough for me. Oh,
>> and of course you need CONFIG_SYS_MALLOC_F enabled when calling
>> spl_early_ini() from board_init_f in SPL.
> 
> My updated defconfig file has:
> 
> CONFIG_SYS_MALLOC_F_LEN=0x4000
> CONFIG_SYS_MALLOC_F=y

That should probably be enough :-)

Anyway, before calling spl_early_init(), I thought there shouldn't be 
anything going wrong, so debug UART should work when initialized before 
spl_early_init() is called?

Have you double-checked you're not hitting some size limit of your platform?

Regards,
Simon


More information about the U-Boot mailing list