Patchwork [U-Boot,V3,4/4,MIPS] Disable standalone while building MIPS64

login
register
mail settings
Submitter Zhi-zhou Zhang
Date Aug. 20, 2012, 2:22 p.m.
Message ID <1345472551-1546-5-git-send-email-etou.zh@gmail.com>
Download mbox | patch
Permalink /patch/178830/
State Superseded
Delegated to: Daniel Schwierzeck
Headers show

Comments

Zhi-zhou Zhang - Aug. 20, 2012, 2:22 p.m.
I think copy mips.lds to mips64.lds with only one line changed is not
good. So I disable it in top Makefile.
Signed-off-by: Zhizhou Zhang <etou.zh@gmail.com>
---
 Makefile |    2 ++
 1 file changed, 2 insertions(+)
Daniel Schwierzeck - Aug. 24, 2012, 12:23 a.m.
2012/8/20 Zhizhou Zhang <etou.zh@gmail.com>:
> I think copy mips.lds to mips64.lds with only one line changed is not
> good. So I disable it in top Makefile.
> Signed-off-by: Zhizhou Zhang <etou.zh@gmail.com>
> ---
>  Makefile |    2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 5ce5cc3..626d888 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -155,8 +155,10 @@ sinclude $(obj)include/autoconf.mk.dep
>  sinclude $(obj)include/autoconf.mk
>
>  ifndef CONFIG_SANDBOX
> +ifndef CONFIG_MIPS64
>  SUBDIRS += $(SUBDIR_EXAMPLES)
>  endif
> +endif
>
>  # load ARCH, BOARD, and CPU configuration
>  include $(obj)include/config.mk
> --
> 1.7.9.5
>

NAK.

Please do what you have done in v1 of your patch series. This is possible now
if you use current master of git://git.denx.de/u-boot-mips.git.
Zhi-zhou Zhang - Aug. 26, 2012, 12:45 p.m.
On Fri, Aug 24, 2012 at 8:23 AM, Daniel Schwierzeck <
daniel.schwierzeck@gmail.com> wrote:

> 2012/8/20 Zhizhou Zhang <etou.zh@gmail.com>:
> > I think copy mips.lds to mips64.lds with only one line changed is not
> > good. So I disable it in top Makefile.
> > Signed-off-by: Zhizhou Zhang <etou.zh@gmail.com>
> > ---
> >  Makefile |    2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/Makefile b/Makefile
> > index 5ce5cc3..626d888 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -155,8 +155,10 @@ sinclude $(obj)include/autoconf.mk.dep
> >  sinclude $(obj)include/autoconf.mk
> >
> >  ifndef CONFIG_SANDBOX
> > +ifndef CONFIG_MIPS64
> >  SUBDIRS += $(SUBDIR_EXAMPLES)
> >  endif
> > +endif
> >
> >  # load ARCH, BOARD, and CPU configuration
> >  include $(obj)include/config.mk
> > --
> > 1.7.9.5
> >
>
> NAK.
>
> Please do what you have done in v1 of your patch series. This is possible
> now
> if you use current master of git://git.denx.de/u-boot-mips.git.
>
> --
> Best regards,
> Daniel
>

when I add below in examples/standalone/mips.lds,
#ifdef CONFIG_64BIT
OUTPUT_FORMAT("elf64-tradbigmips", "elf64-tradbigmips",
"elf64-tradlittlemips")
#else
OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips",
"elf32-tradlittlemips")
#endif
I will get a error:
/home/zhangzz/work/clfs/sys_root/cross-tools/bin/mips64el-unknown-linux-gnu-ld:mips.lds:27:
ignoring invalid character `#' in expression
/home/zhangzz/work/clfs/sys_root/cross-tools/bin/mips64el-unknown-linux-gnu-ld:mips.lds:27:
syntax error

So I find these in top Makefile:
$(obj)u-boot.lds: $(LDSCRIPT)
                $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P -
<$^ >$@
It seems that I can't make mips.lds configurable without a lot
modifications in example/standalone/Makefile.
So could you give a tip?
Daniel Schwierzeck - Aug. 26, 2012, 1:33 p.m.
2012/8/26 Zhi-zhou Zhang <etou.zh@gmail.com>:
>
>
> On Fri, Aug 24, 2012 at 8:23 AM, Daniel Schwierzeck
> <daniel.schwierzeck@gmail.com> wrote:
>>
>> 2012/8/20 Zhizhou Zhang <etou.zh@gmail.com>:
>> > I think copy mips.lds to mips64.lds with only one line changed is not
>> > good. So I disable it in top Makefile.
>> > Signed-off-by: Zhizhou Zhang <etou.zh@gmail.com>
>> > ---
>> >  Makefile |    2 ++
>> >  1 file changed, 2 insertions(+)
>> >
>> > diff --git a/Makefile b/Makefile
>> > index 5ce5cc3..626d888 100644
>> > --- a/Makefile
>> > +++ b/Makefile
>> > @@ -155,8 +155,10 @@ sinclude $(obj)include/autoconf.mk.dep
>> >  sinclude $(obj)include/autoconf.mk
>> >
>> >  ifndef CONFIG_SANDBOX
>> > +ifndef CONFIG_MIPS64
>> >  SUBDIRS += $(SUBDIR_EXAMPLES)
>> >  endif
>> > +endif
>> >
>> >  # load ARCH, BOARD, and CPU configuration
>> >  include $(obj)include/config.mk
>> > --
>> > 1.7.9.5
>> >
>>
>> NAK.
>>
>> Please do what you have done in v1 of your patch series. This is possible
>> now
>> if you use current master of git://git.denx.de/u-boot-mips.git.
>>
>> --
>> Best regards,
>> Daniel
>
>
> when I add below in examples/standalone/mips.lds,
> #ifdef CONFIG_64BIT
> OUTPUT_FORMAT("elf64-tradbigmips", "elf64-tradbigmips",
> "elf64-tradlittlemips")
> #else
> OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips",
> "elf32-tradlittlemips")
> #endif
> I will get a error:
> /home/zhangzz/work/clfs/sys_root/cross-tools/bin/mips64el-unknown-linux-gnu-ld:mips.lds:27:
> ignoring invalid character `#' in expression
> /home/zhangzz/work/clfs/sys_root/cross-tools/bin/mips64el-unknown-linux-gnu-ld:mips.lds:27:
> syntax error
>
> So I find these in top Makefile:
> $(obj)u-boot.lds: $(LDSCRIPT)
>                 $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P -
> <$^ >$@
> It seems that I can't make mips.lds configurable without a lot modifications
> in example/standalone/Makefile.
> So could you give a tip?

yes, in my previous comment I thought that mips.lds is also
preprocessed like u-boot.lds.
But sadly that is not the case. You have added a mips64.lds in your
first patch series.
I guess that was already the correct solution without changing
standalone/Makefile.

Patch

diff --git a/Makefile b/Makefile
index 5ce5cc3..626d888 100644
--- a/Makefile
+++ b/Makefile
@@ -155,8 +155,10 @@  sinclude $(obj)include/autoconf.mk.dep
 sinclude $(obj)include/autoconf.mk
 
 ifndef CONFIG_SANDBOX
+ifndef CONFIG_MIPS64
 SUBDIRS += $(SUBDIR_EXAMPLES)
 endif
+endif
 
 # load ARCH, BOARD, and CPU configuration
 include $(obj)include/config.mk