[U-Boot] setting TEXT_BASE via make target name
Wolfgang Wegner
wolfgang at leila.ping.de
Tue Dec 22 13:19:40 CET 2009
Hi,
I am in the process of cleaning up my board code, and just noticed
some strange (for me) behaviour when trying to set TEXT_BASE
depending on the make target name.
Here is what works:
Makefile:
astro_mcf5373l_config \
astro_mcf5373l_RAM_config : unconfig
@$(MKCONFIG) -t $(@:_config=) astro_mcf5373l m68k mcf532x mcf5373l astro
include/configs/board_config.h:
#ifdef CONFIG_MK_RAM
#define CONFIG_MONITOR_IS_IN_RAM
#define CONFIG_TEXT_BASE 0x40020000
#else
#define CONFIG_TEXT_BASE 0x00000000
#endif
board_dir/config.mk
TEXT_BASE = $(CONFIG_TEXT_BASE)
PLATFORM_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
It seems a bit strange that I have to use the intermediate variable
CONFIG_TEXT_BASE, but setting TEXT_BASE directly in my board_config.h
simply does not work, and of course I have to set TEXT_BASE in config.mk
to have it exported [to the linking stage].
Is the above "code" ok, or is there a more elegant and thus
preferrable way to set TEXT_BASE?
Best regards,
Wolfgang
More information about the U-Boot
mailing list