From: Wolfgang Wegner Date: Tue, 22 Dec 2009 13:19:40 +0100 Subject: [U-Boot] setting TEXT_BASE via make target name Message-ID: <20091222121939.GG30882@leila.ping.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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