From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lei Wen Date: Fri, 28 Jan 2011 14:59:42 +0800 Subject: [U-Boot] [PATCH V7 1/5] mv: seperate kirkwood and armada from common setting In-Reply-To: <4D426699.4080106@free.fr> References: <1295923240-26126-1-git-send-email-leiwen@marvell.com> <1296037875-19684-2-git-send-email-leiwen@marvell.com> <4D41BACB.9090506@free.fr> <4D426699.4080106@free.fr> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Albert, On Fri, Jan 28, 2011 at 2:47 PM, Albert ARIBAUD wrote: > Hi Lei, > > Le 28/01/2011 02:28, Lei Wen a ?crit : > >>>> diff --git a/arch/arm/include/asm/arch-kirkwood/config.h >>>> b/arch/arm/include/asm/arch-kirkwood/config.h >>>> new file mode 100644 >>>> index 0000000..7c6d63b >>>> --- /dev/null >>>> +++ b/arch/arm/include/asm/arch-kirkwood/config.h >>>> @@ -0,0 +1,145 @@ > > ... > >>>> +#ifndef CONFIG_SYS_KWD_CONFIG >>>> +#define ? ? ?CONFIG_SYS_KWD_CONFIG >>>> $(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage.cfg >>> >>> What are the '$()' operators doing here ? >> >> This definition is served as generating kirkwood special image, which >> I just move it from mv-common.h >> $(obj)u-boot.kwb: ? ? ? $(obj)u-boot.bin >> ? ? ? ? ? ? ? ? $(obj)tools/mkimage -n $(CONFIG_SYS_KWD_CONFIG) -T >> kwbimage \ >> ? ? ? ? ? ? ? ? -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -d >> $< ?$@ > > What I would like to understand is, the '$(X)' macro expansion operator > indeed has meaning and makes sense for some tools such as Make, but not for > a C preprocessor or compiler. Is this ?config.h file included by a makefile > somehow? > Yes, it would be included by the makefile as below: Makefile: line 471: $(obj)include/autoconf.mk: $(obj)include/config.h Take guruplug as example. Its guruplug.h would be include in the include/config.h. While guruplug would involve the mv-common.h, in which the arch/arm/include/asm/arch-kirkwood/config.h would be included. I know this maybe a little complicated, but that is what it works. Best regards, Lei