[U-Boot] [PATCH V7 1/5] mv: seperate kirkwood and armada from common setting

Albert ARIBAUD albert.aribaud at free.fr
Fri Jan 28 08:27:47 CET 2011


Le 28/01/2011 07:59, Lei Wen a écrit :
> Hi Albert,
>
> On Fri, Jan 28, 2011 at 2:47 PM, Albert ARIBAUD<albert.aribaud at free.fr>  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.

Understood. Maybe a comment right before the surprising '$()' line 
indicating why they're here would avoid other people wondering as I did.

> I know this maybe a little complicated, but that is what it works.

So be it. :)

> Best regards,
> Lei

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list