[U-Boot] __FILE__ usage and and SPL limits for SRAM

Wolfgang Denk wd at denx.de
Wed Apr 5 11:27:41 UTC 2017


Dear Tom,

In message <20170404190647.GH19897 at bill-the-cat> you wrote:
> 
> Why?  I'm not sure that in most cases __FILE__ is providing any more
> useful infomration on top of what we have from __func__ and __LINE__.

Is there not quite a lot of functions that are implemented in many
files?   I expect there are several hundrets of files which include
an implementation of  board_init() , for example. Similar for things
like dram_init(), cpu_eth_init(), board_eth_init(),

OK, you can argument that you know which board this is so you can pin
this down easily, but it basically makes all tool based access (say,
grep) very hard or impossible.

Having the file name is somthing that is _really_ helpful in
identifying where the code comes from.

If we cannot find a way to use short file names (relative to the top
level source directory or such), maybe we can use some other uniqe
identifier for this file?

For example, we could use the output of "git hash-object",
eventually truncated so some reasonable length - 8 characters?

Similar to:

	-> ID=`git hash-object Makefile | head -c 8`
	-> echo $ID
	d44af786
	-> git show $ID

?

OK, this requires the code to be in a git repository, but should we
really care about people who don't use git? ;-)

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The greatest threat towards future is indifference.


More information about the U-Boot mailing list