[PATCH] config: define CONFIG to allow different defconfigs for each ARCH

Carmelo AMOROSO carmelo.amoroso at st.com
Wed Aug 24 15:54:25 UTC 2011


On 24/08/2011 17.50, Khem Raj wrote:
> On 8/24/2011 7:19 AM, Carmelo AMOROSO wrote:
>> Add a new option CONFIG to specify different defconfigs for each ARCH.
>> The naming convention assume that the defconfig are defined as
>> $(ARCH)_$(CONFIG)
>>
>> i.e.
>> make ARCH=sh CONFIG=prelink defconfig
>>
>> will look for extra/Configs/defconfigs/sh_prelink
> 
> while not opposed to this patch I think this fragmentation can lead to
> usage complexity something like what linux kernel does could be an option
>

Hi Khem,
sorry but I've not understood what you mean, regarding the "option".

If it can help, CONFIG is not mandatory.
It is still possible to use simply make ARCH=<arch> defconfig.

Cheers,
carmelo


>>
>> Signed-off-by: Carmelo Amoroso<carmelo.amoroso at st.com>
>> ---
>>   Makefile.help |    2 ++
>>   Makefile.in   |    6 +++++-
>>   2 files changed, 7 insertions(+), 1 deletions(-)
>>
>> diff --git a/Makefile.help b/Makefile.help
>> index d99cf96..006f0c7 100644
>> --- a/Makefile.help
>> +++ b/Makefile.help
>> @@ -50,6 +50,8 @@ help:
>>       @echo '  V=2            - Very verbose build'
>>       @echo '  CROSS=        - Override CROSS_COMPILER_PREFIX from
>> .config'
>>       @echo '  ARCH=         - Use given arch for config targets'
>> +    @echo '  CONFIG=        - Use given CONFIG to specify a specific
>> defconfig for the given ARCH'
>> +    @echo '              based on the following naming convention:
>> ARCH_CONFIG'
>>       @echo '  SHELL=        - Shell to use for make'
>>       @echo '  CONFIG_SHELL=        - Shell to use for menuconfig'
>>       @echo
>> diff --git a/Makefile.in b/Makefile.in
>> index ad9e629..4975598 100644
>> --- a/Makefile.in
>> +++ b/Makefile.in
>> @@ -447,9 +447,13 @@ allyesconfig: $(top_builddir)extra/config/conf
>>   allnoconfig: $(top_builddir)extra/config/conf
>>       $(Q)$(top_builddir)extra/config/conf -n extra/Configs/Config.in
>>
>> +ifdef CONFIG
>> +CONFIG_SFX=_$(CONFIG)
>> +endif
>> +
>>   defconfig: $(top_builddir)extra/config/conf
>>       $(Q)$(top_builddir)extra/config/conf \
>> -        -D extra/Configs/defconfigs/$(ARCH) extra/Configs/Config.in
>> +        -D extra/Configs/defconfigs/$(ARCH)$(CONFIG_SFX)
>> extra/Configs/Config.in
>>
>>   menuconfig-clean-y:
>>       $(Q)$(MAKE) -C extra/config CLEAN_extra/config
> 
> 



More information about the uClibc mailing list