* [PATCH] MIPS: start.S depends on banner
@ 2015-09-16 6:40 Kevin Du Huanpeng
2015-09-16 7:50 ` Antony Pavlov
0 siblings, 1 reply; 5+ messages in thread
From: Kevin Du Huanpeng @ 2015-09-16 6:40 UTC (permalink / raw)
To: barebox; +Cc: Kevin Du Huanpeng
Signed-off-by: Kevin Du Huanpeng <u74147@gmail.com>
---
arch/mips/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index aeb5c04..fde4c2e 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -6,6 +6,7 @@ config MIPS
select HAS_KALLSYMS
select HAVE_CONFIGURABLE_MEMORY_LAYOUT
select HAVE_CONFIGURABLE_TEXT_BASE
+ select BANNER
default y
config SYS_SUPPORTS_BIG_ENDIAN
--
1.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS: start.S depends on banner
2015-09-16 6:40 [PATCH] MIPS: start.S depends on banner Kevin Du Huanpeng
@ 2015-09-16 7:50 ` Antony Pavlov
2015-09-16 7:57 ` Antony Pavlov
2015-09-16 8:35 ` Sascha Hauer
0 siblings, 2 replies; 5+ messages in thread
From: Antony Pavlov @ 2015-09-16 7:50 UTC (permalink / raw)
To: Kevin Du Huanpeng; +Cc: barebox
On Wed, 16 Sep 2015 14:40:48 +0800
Kevin Du Huanpeng <u74147@gmail.com> wrote:
> Signed-off-by: Kevin Du Huanpeng <u74147@gmail.com>
> ---
> arch/mips/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index aeb5c04..fde4c2e 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -6,6 +6,7 @@ config MIPS
> select HAS_KALLSYMS
> select HAVE_CONFIGURABLE_MEMORY_LAYOUT
> select HAVE_CONFIGURABLE_TEXT_BASE
> + select BANNER
> default y
>
> config SYS_SUPPORTS_BIG_ENDIAN
> --
> 1.9.1
>
IMHO we can make banner use in start.S optional. E.g.:
diff --git a/arch/mips/boot/start.S b/arch/mips/boot/start.S
index 7e2ae5e..f3a6a00 100644
--- a/arch/mips/boot/start.S
+++ b/arch/mips/boot/start.S
@@ -22,8 +22,10 @@
#include <asm/mipsregs.h>
#include <asm/asm.h>
#include <asm-generic/memory_layout.h>
+#ifdef CONFIG_BANNER
#include <generated/compile.h>
#include <generated/utsrelease.h>
+#endif
/*
* ADR macro instruction (inspired by ARM)
@@ -52,6 +54,7 @@ _pc: addiu \rd, ra, \label - _pc # label is assumed to be
EXPORT(_start)
+#ifdef CONFIG_BANNER
b __start
nop
@@ -60,6 +63,8 @@ EXPORT(_start)
.byte 0
.align 4
+#endif /* CONFIG_BANNER */
+
__start:
/* disable watchpoints */
mtc0 zero, CP0_WATCHLO
Or even add an separate option to include utsrelease information into start.S.
--
Best regards,
Antony Pavlov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS: start.S depends on banner
2015-09-16 7:50 ` Antony Pavlov
@ 2015-09-16 7:57 ` Antony Pavlov
2015-09-16 8:35 ` Sascha Hauer
1 sibling, 0 replies; 5+ messages in thread
From: Antony Pavlov @ 2015-09-16 7:57 UTC (permalink / raw)
To: Antony Pavlov; +Cc: barebox, Kevin Du Huanpeng
On Wed, 16 Sep 2015 10:50:33 +0300
Antony Pavlov <antonynpavlov@gmail.com> wrote:
> On Wed, 16 Sep 2015 14:40:48 +0800
> Kevin Du Huanpeng <u74147@gmail.com> wrote:
>
> > Signed-off-by: Kevin Du Huanpeng <u74147@gmail.com>
> > ---
> > arch/mips/Kconfig | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> > index aeb5c04..fde4c2e 100644
> > --- a/arch/mips/Kconfig
> > +++ b/arch/mips/Kconfig
> > @@ -6,6 +6,7 @@ config MIPS
> > select HAS_KALLSYMS
> > select HAVE_CONFIGURABLE_MEMORY_LAYOUT
> > select HAVE_CONFIGURABLE_TEXT_BASE
> > + select BANNER
> > default y
> >
> > config SYS_SUPPORTS_BIG_ENDIAN
> > --
> > 1.9.1
> >
>
> IMHO we can make banner use in start.S optional. E.g.:
>
> diff --git a/arch/mips/boot/start.S b/arch/mips/boot/start.S
> index 7e2ae5e..f3a6a00 100644
> --- a/arch/mips/boot/start.S
> +++ b/arch/mips/boot/start.S
> @@ -22,8 +22,10 @@
> #include <asm/mipsregs.h>
> #include <asm/asm.h>
> #include <asm-generic/memory_layout.h>
> +#ifdef CONFIG_BANNER
> #include <generated/compile.h>
> #include <generated/utsrelease.h>
> +#endif
>
> /*
> * ADR macro instruction (inspired by ARM)
> @@ -52,6 +54,7 @@ _pc: addiu \rd, ra, \label - _pc # label is assumed to be
>
> EXPORT(_start)
>
> +#ifdef CONFIG_BANNER
> b __start
> nop
>
> @@ -60,6 +63,8 @@ EXPORT(_start)
> .byte 0
>
> .align 4
> +#endif /* CONFIG_BANNER */
I see just the same code in the mips_barebox_10h macro from arch/mips/include/asm/pbl_macros.h.
> +
> __start:
> /* disable watchpoints */
> mtc0 zero, CP0_WATCHLO
>
> Or even add an separate option to include utsrelease information into start.S.
>
> --
> Best regards,
> Antony Pavlov
--
--
Best regards,
Antony Pavlov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS: start.S depends on banner
2015-09-16 7:50 ` Antony Pavlov
2015-09-16 7:57 ` Antony Pavlov
@ 2015-09-16 8:35 ` Sascha Hauer
2015-09-16 9:06 ` Antony Pavlov
1 sibling, 1 reply; 5+ messages in thread
From: Sascha Hauer @ 2015-09-16 8:35 UTC (permalink / raw)
To: Antony Pavlov; +Cc: barebox, Kevin Du Huanpeng
On Wed, Sep 16, 2015 at 10:50:33AM +0300, Antony Pavlov wrote:
> On Wed, 16 Sep 2015 14:40:48 +0800
> Kevin Du Huanpeng <u74147@gmail.com> wrote:
>
> > Signed-off-by: Kevin Du Huanpeng <u74147@gmail.com>
> > ---
> > arch/mips/Kconfig | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> > index aeb5c04..fde4c2e 100644
> > --- a/arch/mips/Kconfig
> > +++ b/arch/mips/Kconfig
> > @@ -6,6 +6,7 @@ config MIPS
> > select HAS_KALLSYMS
> > select HAVE_CONFIGURABLE_MEMORY_LAYOUT
> > select HAVE_CONFIGURABLE_TEXT_BASE
> > + select BANNER
> > default y
> >
> > config SYS_SUPPORTS_BIG_ENDIAN
> > --
> > 1.9.1
> >
>
> IMHO we can make banner use in start.S optional. E.g.:
>
> diff --git a/arch/mips/boot/start.S b/arch/mips/boot/start.S
> index 7e2ae5e..f3a6a00 100644
> --- a/arch/mips/boot/start.S
> +++ b/arch/mips/boot/start.S
> @@ -22,8 +22,10 @@
> #include <asm/mipsregs.h>
> #include <asm/asm.h>
> #include <asm-generic/memory_layout.h>
> +#ifdef CONFIG_BANNER
> #include <generated/compile.h>
> #include <generated/utsrelease.h>
> +#endif
CONFIG_BANNER and this compilation failure have nothing to do with each
other.
The problem we have is that start.S may get compiled before
generated/compile.h is generated. This is because there is no
Make dependency from start.S to generated/compile.h. Look at
common/Makefile. There we have:
$(obj)/version.o: include/generated/compile.h
This makes sure that generated/compile.h is generated before compiling
version.c.
In arch/mips/boot/Makefile we would need:
$(obj)/start.o: include/generated/compile.h
The problem is that we do not have the rule to generate compile.h
available in this Makefile, so we would also need:
chk_compile.h = :
quiet_chk_compile.h = echo ' CHK $@'
silent_chk_compile.h = :
include/generated/compile.h: FORCE
@$($(quiet)chk_compile.h)
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
"$(UTS_MACHINE)" "$(CC) $(KBUILD_CFLAGS)"
in arch/mips/boot/Makefile.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] MIPS: start.S depends on banner
2015-09-16 8:35 ` Sascha Hauer
@ 2015-09-16 9:06 ` Antony Pavlov
0 siblings, 0 replies; 5+ messages in thread
From: Antony Pavlov @ 2015-09-16 9:06 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox, Kevin Du Huanpeng
On Wed, 16 Sep 2015 10:35:23 +0200
Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Wed, Sep 16, 2015 at 10:50:33AM +0300, Antony Pavlov wrote:
> > On Wed, 16 Sep 2015 14:40:48 +0800
> > Kevin Du Huanpeng <u74147@gmail.com> wrote:
> >
> > > Signed-off-by: Kevin Du Huanpeng <u74147@gmail.com>
> > > ---
> > > arch/mips/Kconfig | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> > > index aeb5c04..fde4c2e 100644
> > > --- a/arch/mips/Kconfig
> > > +++ b/arch/mips/Kconfig
> > > @@ -6,6 +6,7 @@ config MIPS
> > > select HAS_KALLSYMS
> > > select HAVE_CONFIGURABLE_MEMORY_LAYOUT
> > > select HAVE_CONFIGURABLE_TEXT_BASE
> > > + select BANNER
> > > default y
> > >
> > > config SYS_SUPPORTS_BIG_ENDIAN
> > > --
> > > 1.9.1
> > >
> >
> > IMHO we can make banner use in start.S optional. E.g.:
> >
> > diff --git a/arch/mips/boot/start.S b/arch/mips/boot/start.S
> > index 7e2ae5e..f3a6a00 100644
> > --- a/arch/mips/boot/start.S
> > +++ b/arch/mips/boot/start.S
> > @@ -22,8 +22,10 @@
> > #include <asm/mipsregs.h>
> > #include <asm/asm.h>
> > #include <asm-generic/memory_layout.h>
> > +#ifdef CONFIG_BANNER
> > #include <generated/compile.h>
> > #include <generated/utsrelease.h>
> > +#endif
>
> CONFIG_BANNER and this compilation failure have nothing to do with each
> other.
Yes, but now I see that some parts of MIPS start.S and PBL need a code refactoring.
:)
--
Best regards,
Antony Pavlov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-09-16 8:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-16 6:40 [PATCH] MIPS: start.S depends on banner Kevin Du Huanpeng
2015-09-16 7:50 ` Antony Pavlov
2015-09-16 7:57 ` Antony Pavlov
2015-09-16 8:35 ` Sascha Hauer
2015-09-16 9:06 ` Antony Pavlov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox