Patchwork [U-Boot] Top config.mk: add include/config.mk

login
register
mail settings
Submitter Joakim Tjernlund
Date Jan. 17, 2011, 10:39 p.m.
Message ID <1295303966-8409-1-git-send-email-Joakim.Tjernlund@transmode.se>
Download mbox | patch
Permalink /patch/79228/
State Accepted
Commit 5e987ddf855b959f1f112da49082e3c4235cef59
Headers show

Comments

Joakim Tjernlund - Jan. 17, 2011, 10:39 p.m.
Seems to that the top level config.mk should include
the auto generated include/config.mk so that all Makefile's
pickup those definitions.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
---
 config.mk |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Joakim Tjernlund - Jan. 23, 2011, 7:17 p.m.
>
> Seems to that the top level config.mk should include
> the auto generated include/config.mk so that all Makefile's
> pickup those definitions.
>
> Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> ---
>  config.mk |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/config.mk b/config.mk
> index bcda776..c7534fb 100644
> --- a/config.mk
> +++ b/config.mk
> @@ -117,6 +117,7 @@ RANLIB   = $(CROSS_COMPILE)RANLIB
>
>  # Load generated board configuration
>  sinclude $(OBJTREE)/include/autoconf.mk
> +sinclude $(OBJTREE)/include/config.mk
>
>  # Some architecture config.mk files need to know what CPUDIR is set to,
>  # so calculate CPUDIR before including ARCH/SOC/CPU config.mk files.
> --
> 1.7.3.4

Ping?
Wolfgang Denk - Jan. 23, 2011, 7:35 p.m.
Dear Joakim Tjernlund,

In message <OF749BBC82.7AA2F037-ONC1257821.0069EDA0-C1257821.0069FC15@transmode.se> you wrote:
> 
> >
> > Seems to that the top level config.mk should include
> > the auto generated include/config.mk so that all Makefile's
> > pickup those definitions.
> >
> > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> > ---
> >  config.mk |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/config.mk b/config.mk
> > index bcda776..c7534fb 100644
> > --- a/config.mk
> > +++ b/config.mk
> > @@ -117,6 +117,7 @@ RANLIB   = $(CROSS_COMPILE)RANLIB
> >
> >  # Load generated board configuration
> >  sinclude $(OBJTREE)/include/autoconf.mk
> > +sinclude $(OBJTREE)/include/config.mk
> >
> >  # Some architecture config.mk files need to know what CPUDIR is set to,
> >  # so calculate CPUDIR before including ARCH/SOC/CPU config.mk files.
> > --
> > 1.7.3.4
> 
> Ping?

What is the exact problem you are trying to fix?  Do you have a test
case?

Best regards,

Wolfgang Denk
Joakim Tjernlund - Jan. 23, 2011, 8:23 p.m.
Wolfgang Denk <wd@denx.de> wrote on 2011/01/23 20:35:48:
>
> Dear Joakim Tjernlund,
>
> In message <OF749BBC82.7AA2F037-ONC1257821.0069EDA0-C1257821.0069FC15@transmode.se> you wrote:
> >
> > >
> > > Seems to that the top level config.mk should include
> > > the auto generated include/config.mk so that all Makefile's
> > > pickup those definitions.
> > >
> > > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> > > ---
> > >  config.mk |    1 +
> > >  1 files changed, 1 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/config.mk b/config.mk
> > > index bcda776..c7534fb 100644
> > > --- a/config.mk
> > > +++ b/config.mk
> > > @@ -117,6 +117,7 @@ RANLIB   = $(CROSS_COMPILE)RANLIB
> > >
> > >  # Load generated board configuration
> > >  sinclude $(OBJTREE)/include/autoconf.mk
> > > +sinclude $(OBJTREE)/include/config.mk
> > >
> > >  # Some architecture config.mk files need to know what CPUDIR is set to,
> > >  # so calculate CPUDIR before including ARCH/SOC/CPU config.mk files.
> > > --
> > > 1.7.3.4
> >
> > Ping?
>
> What is the exact problem you are trying to fix?  Do you have a test
> case?

Example from my board/config.mk, I have:
ifeq ($(SUBBOARD),cu)
  LUMENTIS_CPPFLAGS=-DCONFIG_IDENT_STRING=\"\\nCBX-0001A:cuboot02a:p1a:99\"
else
  LUMENTIS_CPPFLAGS=-Dinclude/config.mk=\"\\nCBX-0001A:tuboot02a:p1a:99\"
endif

My generated include/config.mk has
 SUBBOARD  = cu

SUBBOARD will not be defined in all Makefiles unless I
add the above patch, in this case arch/powerpc/cpu/mpc83xx/Makefile
will not see it.

 Jocke
Wolfgang Denk - Jan. 23, 2011, 10:50 p.m.
Dear Joakim Tjernlund,

In message <OF0949C72E.59C831F7-ONC1257821.006EE01D-C1257821.006FFF7C@transmode.se> you wrote:
>
> > What is the exact problem you are trying to fix?  Do you have a test
> > case?
> 
> Example from my board/config.mk, I have:
> ifeq ($(SUBBOARD),cu)
>   LUMENTIS_CPPFLAGS=-DCONFIG_IDENT_STRING=\"\\nCBX-0001A:cuboot02a:p1a:99\"
> else
>   LUMENTIS_CPPFLAGS=-Dinclude/config.mk=\"\\nCBX-0001A:tuboot02a:p1a:99\"
> endif
> 
> My generated include/config.mk has
>  SUBBOARD  = cu
> 
> SUBBOARD will not be defined in all Makefiles unless I
> add the above patch, in this case arch/powerpc/cpu/mpc83xx/Makefile
> will not see it.

You should move all this config stuff into your board config file and
get rid of this board/config.mk alltogether.

Best regards,

Wolfgang Denk
Joakim Tjernlund - Jan. 23, 2011, 11:27 p.m.
Wolfgang Denk <wd@denx.de> wrote on 2011/01/23 23:50:03:
> Dear Joakim Tjernlund,
>
> In message <OF0949C72E.59C831F7-ONC1257821.006EE01D-C1257821.006FFF7C@transmode.se> you wrote:
> >
> > > What is the exact problem you are trying to fix?  Do you have a test
> > > case?
> >
> > Example from my board/config.mk, I have:
> > ifeq ($(SUBBOARD),cu)
> >   LUMENTIS_CPPFLAGS=-DCONFIG_IDENT_STRING=\"\\nCBX-0001A:cuboot02a:p1a:99\"
> > else
> >   LUMENTIS_CPPFLAGS=-Dinclude/config.mk=\"\\nCBX-0001A:tuboot02a:p1a:99\"
> > endif
> >
> > My generated include/config.mk has
> >  SUBBOARD  = cu
> >
> > SUBBOARD will not be defined in all Makefiles unless I
> > add the above patch, in this case arch/powerpc/cpu/mpc83xx/Makefile
> > will not see it.
>
> You should move all this config stuff into your board config file and
> get rid of this board/config.mk alltogether.

Yes I can, in fact I stated to do this. Then it occurred to
me that stuff defined in include/config.mk should be globally
available, hence this patch.

 Jocke
Wolfgang Denk - March 22, 2011, 8:22 p.m.
Dear Joakim Tjernlund,

In message <1295303966-8409-1-git-send-email-Joakim.Tjernlund@transmode.se> you wrote:
> Seems to that the top level config.mk should include
> the auto generated include/config.mk so that all Makefile's
> pickup those definitions.
> 
> Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> ---
>  config.mk |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/config.mk b/config.mk
index bcda776..c7534fb 100644
--- a/config.mk
+++ b/config.mk
@@ -117,6 +117,7 @@  RANLIB	= $(CROSS_COMPILE)RANLIB
 
 # Load generated board configuration
 sinclude $(OBJTREE)/include/autoconf.mk
+sinclude $(OBJTREE)/include/config.mk
 
 # Some architecture config.mk files need to know what CPUDIR is set to,
 # so calculate CPUDIR before including ARCH/SOC/CPU config.mk files.