can someone explain to me how U-boot is loaded and DDR is configured? I have studied the code and some documentation and now the following picture appears to me:
- when turned on, we go to _start (start.S file)
- go to the lowlevel_init function (lowlevel_init.S file)
- then we get to _main (crt0_64 file.S or crt0.S)
3.1. go to the board_init_f() function, in which we configure DDR?
3.2. go to the relocate_code function (file relocate_64.S or relocate.S) in which we copy U-boot to ram (our configured DDR)
3.3. go to the board_init_r() function
Is it so? I see in the U-boot source code the board_init_f() function that performs certain actions and uses printf, very similar to what I see in the terminal at 1500000. But I also see before this (U-boot SPL board init) messages that are also somehow related to the DDR setup. I also found code that is very close to what I see in messages over the serial port. But this code is from the sdram_init() function in the sdram_rv1126.c file and as I understand it, RV1126 is a different processor because I use RK3568. How can it be connected at all? Why exactly this sequence? And why can’t I find the idbloader source code anywhere? Can I somehow assemble it myself?