public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] how does board_init_f() -> board_init_r?
@ 2016-02-14  1:52 quantumlight
  2016-02-16 16:01 ` Simon Glass
  0 siblings, 1 reply; 4+ messages in thread
From: quantumlight @ 2016-02-14  1:52 UTC (permalink / raw)
  To: u-boot

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-tp245816.html
Sent from the U-Boot mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-02-17  7:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-14  1:52 [U-Boot] how does board_init_f() -> board_init_r? quantumlight
2016-02-16 16:01 ` Simon Glass
2016-02-16 16:41   ` Stephen Warren
2016-02-17  7:19     ` Peter Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox