
I am trying to modify the bootloader code for NVIDIA's jetson board.
So I am looking at crt0.S. It seems that two builds happen, one with CONFIG_SPL_BUILD and one without. So you end up with two file, u-boot.bin and spl/u-boot-spl.bin.
However, I am unable to find the code path that calls board_init_r() after board_init_f() finishes, although there are several candidates:
1) crt0.S - if CONFIG_SPL_BUILD was not defined, then it would fall straight through to board_init_r() - HOWEVER, for u-boot.bin, isn't CONFIG_SPL_BUILD defined in autoconf.h? Or is this some clever magic between how u-boot.bin and spl/u-boot-spl.bin are stitched together? 2) _weak board_init_f in arch/arm/lib/spl.c - HOWEVER, shouldn't this be overloaded by board_init_f in common/board_f.c? 3) board_init_f_r in common/board_f.c - HOWEVER, nothing calls board_init_f_r().
Can someone illuminate me on how this happens?
-- View this message in context: http://u-boot.10912.n7.nabble.com/how-does-board-init-f-board-init-r-tp24581... Sent from the U-Boot mailing list archive at Nabble.com.