Re: [U-Boot] where is malloc()?

2016-02-18 Thread quantumlight
Thanks I see it now.



--
View this message in context: 
http://u-boot.10912.n7.nabble.com/where-is-malloc-tp246389p246393.html
Sent from the U-Boot mailing list archive at Nabble.com.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] U-Boot loading kernel from mmc question

2016-02-18 Thread quantumlight
I am trying to figure out how the bootm command in U-Boot works. It seems to
be a state machine that goes from start->findos->findother (fdt)->loados
etc.

However I am having trouble understanding how, since my linux image is
stored in some partition on the device (eMMC), does that get loaded into
memory?

Originally I thought this was what bootm_find_os and bootm_load_os does, but
they don't seem to access the block devices or filesystem or contain code
that reads in the linux and fdt images into memory. 

Am I missing a step here? 



--
View this message in context: 
http://u-boot.10912.n7.nabble.com/U-Boot-loading-kernel-from-mmc-question-tp246390.html
Sent from the U-Boot mailing list archive at Nabble.com.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] where is malloc()?

2016-02-18 Thread quantumlight
I can find malloc.h describing that it uses a specific malloc. But I can't
seem to find where the u-boot source keeps the malloc implementation. 

I see that in include/_exports.h it is defined:

   EXPORT_FUNC(malloc)

Also there seems to be a dlmalloc.c that should define a void* malloc(size)
function but I can't seem to find it in here. Is there some macro magic
here?




--
View this message in context: 
http://u-boot.10912.n7.nabble.com/where-is-malloc-tp246389.html
Sent from the U-Boot mailing list archive at Nabble.com.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] how does board_init_f() -> board_init_r?

2016-02-14 Thread quantumlight
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.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot