This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM437X: PROCESSOR-SDK-AM437X: Fairly extreme kernel boot time increase from SDK version 07 to 08

Part Number: PROCESSOR-SDK-AM437X


I was promised an answer on this but never got one, but now the thread is locked.   That seems wrong.

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1137927/processor-sdk-am437x-fairly-extreme-kernel-boot-time-increase-from-sdk-version-07-to-08

Please either re-open and get rid of this thread or answer here.   Pasting entire contents of post.

ORIGINAL POST BELOW:

Hi:

So I found this closed thread without any response:

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1098879/am4376-linux-boottime-increased

and this one which also seemed related but didn't really address the issue since at the time kernel 5.10 wasn't supported.   However, it is now the version of SDK 08.

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1051951/linux-am335x-kernel-boot-time-optimization

I had noticed some bizarre slowness in boot on my custom board and recipes, and dug into that for quite awhile, but then just decided to fall back to just the EVM and to the pre-built TI images.

So the rest of this post is purely about the vanilla TI-released SDK w/o any modifications.

For tisdk-08-default-image-am437x-evm.wic.xz kernel boots and starts systemd after about 2.2 seconds.  Determined from dmesg output with initcall_debug turned on in /boot/uEnv.txt.

A key issue on tisdk-08 is in customize_machine:

root@am437x-evm:~# dmesg | grep customize
[    0.091801] calling  customize_machine+0x0/0x30 @ 1
[    0.925154] initcall customize_machine+0x0/0x30 returned 0 after 810546 usecs

The other major culprit is this:
root@am437x-evm:~# dmesg | grep sysc_init
[    0.979597] calling  sysc_init+0x0/0x2c @ 1
[    1.450701] initcall sysc_init+0x0/0x2c returned 0 after 460029 usecs

For tisdk-07-default-image-am437x-evm.wic.xz kernel (v5.4) boots and starts systemd after about 1.1 seconds.  Determined from dmesg output with initcall_debug turned on in /boot/uEnv.txt.

customize_machine:

root@am437x-evm:~# dmesg | grep customize
[    0.105016] calling  customize_machine+0x0/0x30 @ 1
[    0.123832] initcall customize_machine+0x0/0x30 returned 0 after 19531 usecs

and

root@am437x-evm:~# dmesg | grep sysc_init
[    0.169355] calling  sysc_init+0x0/0x2c @ 1
[    0.227342] initcall sysc_init+0x0/0x2c returned 0 after 56601 usecs

So basically all of the kernel boot time increase can be attributed to these two items, and it is something to do with SDK 08.

I don't view this as an exercise for the reader, since I would not expect a +1 release to have 2x worse kernel boot time.

I'm fairly certain everything I presented here is easily reproducible on your end.   

I am seeing all the same stuff on my custom board and recipe based on base-image rather than default-image.   So presumably if you can tell me how to fix it for the EVM it should translate to my stuff easily.

Thanks

Howard