MIPS: start.S depends on banner
PATCH 1/1 MIPS: start.S depends on banner
--- arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/mips/Kconfig +1 -0
@@ -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
Signature · 7 lines
1.9.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 20 lines · On Wed, 16 Sep 2015 14:40:48 +0800 Kevin Du Huanpeng <[email protected]> wrote:
Signed-off-by Kevin Du Huanpeng <[email protected]>--- arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/mips/Kconfig +1
-0@@ -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_ENDIANSignature · 1 line
1.9.1
IMHO we can make banner use in start.S optional. E.g.:
arch/mips/boot/start.S +5 -0
@@ -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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Quoted 50 lines · On Wed, 16 Sep 2015 10:50:33 +0300 Antony Pavlov <[email protected]>…
Quoted 20 lines · On Wed, 16 Sep 2015 14:40:48 +0800 Kevin Du Huanpeng <[email protected]> wrote:
Signed-off-by Kevin Du Huanpeng <[email protected]>--- arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/mips/Kconfig +1
-0@@ -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_ENDIANSignature · 1 line
1.9.1IMHO we can make banner use in
start.Soptional. E.g.:arch/mips/boot/start.S +3
-0@@ -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
arch/mips/boot/start.S EXPORT(_start) · line 66
Quoted 4 lines
arch/mips/boot/start.S +1
-0@@ -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.
Quoted 10 lines
arch/mips/boot/start.S +1
-0+ __start: /* disable watchpoints */ mtc0 zero, CP0_WATCHLOOr even add an separate option to include utsrelease information into
start.S.--
Best regards,
Antony Pavlov
Signature · 8 lines
-- Best regards, Antony Pavlov _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 31 lines · Antony Pavlov
Quoted 20 lines · On Wed, 16 Sep 2015 14:40:48 +0800 Kevin Du Huanpeng <[email protected]> wrote:
Signed-off-by Kevin Du Huanpeng <[email protected]>--- arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/mips/Kconfig +1
-0@@ -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_ENDIANSignature · 1 line
1.9.1IMHO we can make banner use in
start.Soptional. E.g.:arch/mips/boot/start.S +0
-0
arch/mips/boot/start.S line 28
Quoted 7 lines
arch/mips/boot/start.S +2
-0@@ -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
Signature · 9 lines
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 [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 27 lines · On Wed, 16 Sep 2015 10:35:23 +0200 Sascha Hauer <[email protected]> wrote:
Quoted 26 lines · Antony Pavlov
Quoted 20 lines · On Wed, 16 Sep 2015 14:40:48 +0800 Kevin Du Huanpeng <[email protected]> wrote:
Signed-off-by Kevin Du Huanpeng <[email protected]>--- arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+)arch/mips/Kconfig +1
-0@@ -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_ENDIANSignature · 1 line
1.9.1IMHO we can make banner use in
start.Soptional. E.g.:
Quoted 15 lines
arch/mips/boot/start.S line 28
Quoted 12 lines
arch/mips/boot/start.S +2
-0@@ -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_BANNERand 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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox