* [Makefile bug] make barebox.s : dead loop @ 2013-12-02 8:22 Kevin Du Huanpeng 2013-12-02 8:36 ` Kevin Du Huanpeng 0 siblings, 1 reply; 6+ messages in thread From: Kevin Du Huanpeng @ 2013-12-02 8:22 UTC (permalink / raw) To: barebox How to reproduce this: 1. edit Makefile > 169 ARCH ?= mips > 170 CROSS_COMPILE ?= mips-linux-gnu- 2. make some defconfig > make dlink-dir-320_defconfig 3. make barebox.s >make barebox.s 4. endless make.... PWDH include/generated/passwd.h CC common/password.o LD common/built-in.o LD barebox SYSMAP System.map DISASM barebox.S CHK include/generated/version.h CHK include/generated/utsrelease.h CHK include/generated/compile.h PWDH include/generated/passwd.h CC common/password.o LD common/built-in.o AS arch/mips/boot/start.o LD arch/mips/boot/built-in.o GEN .version CHK include/generated/compile.h UPD include/generated/compile.h CC common/version.o PWDH include/generated/passwd.h CC common/password.o LD common/built-in.o LD barebox SYSMAP System.map DISASM barebox.S CHK include/generated/version.h CHK include/generated/utsrelease.h CHK include/generated/compile.h PWDH include/generated/passwd.h CC common/password.o LD common/built-in.o AS arch/mips/boot/start.o LD arch/mips/boot/built-in.o GEN .version CHK include/generated/compile.h UPD include/generated/compile.h CC common/version.o PWDH include/generated/passwd.h CC common/password.o LD common/built-in.o LD barebox SYSMAP System.map DISASM barebox.S CHK include/generated/version.h CHK include/generated/utsrelease.h CHK include/generated/compile.h PWDH include/generated/passwd.h CC common/password.o LD common/built-in.o AS arch/mips/boot/start.o LD arch/mips/boot/built-in.o GEN .version CHK include/generated/compile.h UPD include/generated/compile.h CC common/version.o PWDH include/generated/passwd.h CC common/password.o LD common/built-in.o LD barebox SYSMAP System.map DISASM barebox.S CHK include/generated/version.h CHK include/generated/utsrelease.h CHK include/generated/compile.h PWDH include/generated/passwd.h CC common/password.o LD common/built-in.o AS arch/mips/boot/start.o LD arch/mips/boot/built-in.o GEN .version CHK include/generated/compile.h UPD include/generated/compile.h CC common/version.o PWDH include/generated/passwd.h CC common/password.o LD common/built-in.o LD barebox SYSMAP System.map DISASM barebox.S ^Cmake[9]: *** wait: No child processes. Stop. make[9]: *** Waiting for unfinished jobs.... make[9]: *** wait: No child processes. Stop. make[8]: *** [barebox.s] Error 2 make[7]: *** [barebox.s] Interrupt make[6]: *** [barebox.s] Interrupt make[5]: *** [barebox.s] Interrupt make[4]: *** [barebox.s] Interrupt make[3]: *** [barebox.s] Interrupt make[2]: *** [barebox.s] Interrupt make[1]: *** [barebox.s] Interrupt make: *** [barebox.s] Interrupt _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Makefile bug] make barebox.s : dead loop 2013-12-02 8:22 [Makefile bug] make barebox.s : dead loop Kevin Du Huanpeng @ 2013-12-02 8:36 ` Kevin Du Huanpeng 2013-12-02 9:13 ` Sascha Hauer 0 siblings, 1 reply; 6+ messages in thread From: Kevin Du Huanpeng @ 2013-12-02 8:36 UTC (permalink / raw) To: barebox I add barebox.s after the target barebox.S, It works. maybe should add the same thing with ---------- ifdef CONFIG_X86 barebox.S: barebox ifdef CONFIG_X86_HDBOOT ------------ @@ -723,7 +724,7 @@ endif @echo " * Init Calls content" >> barebox.S $(Q)$(OBJDUMP) -j .barebox_initcalls -d barebox >> barebox.S else -barebox.S: barebox FORCE +barebox.S barebox.s: barebox FORCE $(call if_changed,disasm) endif 2013/12/2 Kevin Du Huanpeng <u74147@gmail.com>: > How to reproduce this: > 1. edit Makefile >> 169 ARCH ?= mips >> 170 CROSS_COMPILE ?= mips-linux-gnu- > 2. make some defconfig >> make dlink-dir-320_defconfig > 3. make barebox.s >>make barebox.s > 4. endless make.... > PWDH include/generated/passwd.h > CC common/password.o > LD common/built-in.o > LD barebox > SYSMAP System.map > DISASM barebox.S > CHK include/generated/version.h > CHK include/generated/utsrelease.h > CHK include/generated/compile.h > PWDH include/generated/passwd.h > CC common/password.o > LD common/built-in.o > AS arch/mips/boot/start.o > LD arch/mips/boot/built-in.o > GEN .version > CHK include/generated/compile.h > UPD include/generated/compile.h > CC common/version.o > PWDH include/generated/passwd.h > CC common/password.o > LD common/built-in.o > LD barebox > SYSMAP System.map > DISASM barebox.S > CHK include/generated/version.h > CHK include/generated/utsrelease.h > CHK include/generated/compile.h > PWDH include/generated/passwd.h > CC common/password.o > LD common/built-in.o > AS arch/mips/boot/start.o > LD arch/mips/boot/built-in.o > GEN .version > CHK include/generated/compile.h > UPD include/generated/compile.h > CC common/version.o > PWDH include/generated/passwd.h > CC common/password.o > LD common/built-in.o > LD barebox > SYSMAP System.map > DISASM barebox.S > CHK include/generated/version.h > CHK include/generated/utsrelease.h > CHK include/generated/compile.h > PWDH include/generated/passwd.h > CC common/password.o > LD common/built-in.o > AS arch/mips/boot/start.o > LD arch/mips/boot/built-in.o > GEN .version > CHK include/generated/compile.h > UPD include/generated/compile.h > CC common/version.o > PWDH include/generated/passwd.h > CC common/password.o > LD common/built-in.o > LD barebox > SYSMAP System.map > DISASM barebox.S > CHK include/generated/version.h > CHK include/generated/utsrelease.h > CHK include/generated/compile.h > PWDH include/generated/passwd.h > CC common/password.o > LD common/built-in.o > AS arch/mips/boot/start.o > LD arch/mips/boot/built-in.o > GEN .version > CHK include/generated/compile.h > UPD include/generated/compile.h > CC common/version.o > PWDH include/generated/passwd.h > CC common/password.o > LD common/built-in.o > LD barebox > SYSMAP System.map > DISASM barebox.S > ^Cmake[9]: *** wait: No child processes. Stop. > make[9]: *** Waiting for unfinished jobs.... > make[9]: *** wait: No child processes. Stop. > make[8]: *** [barebox.s] Error 2 > make[7]: *** [barebox.s] Interrupt > make[6]: *** [barebox.s] Interrupt > make[5]: *** [barebox.s] Interrupt > make[4]: *** [barebox.s] Interrupt > make[3]: *** [barebox.s] Interrupt > make[2]: *** [barebox.s] Interrupt > make[1]: *** [barebox.s] Interrupt > make: *** [barebox.s] Interrupt _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Makefile bug] make barebox.s : dead loop 2013-12-02 8:36 ` Kevin Du Huanpeng @ 2013-12-02 9:13 ` Sascha Hauer 2013-12-02 12:27 ` Kevin Du Huanpeng 0 siblings, 1 reply; 6+ messages in thread From: Sascha Hauer @ 2013-12-02 9:13 UTC (permalink / raw) To: Kevin Du Huanpeng; +Cc: barebox On Mon, Dec 02, 2013 at 04:36:50PM +0800, Kevin Du Huanpeng wrote: > I add barebox.s after the target barebox.S, > It works. > maybe should add the same thing with > > ---------- > ifdef CONFIG_X86 > barebox.S: barebox > ifdef CONFIG_X86_HDBOOT > ------------ > > > @@ -723,7 +724,7 @@ endif > @echo " * Init Calls content" >> barebox.S > $(Q)$(OBJDUMP) -j .barebox_initcalls -d barebox >> barebox.S > else > -barebox.S: barebox FORCE > +barebox.S barebox.s: barebox FORCE > $(call if_changed,disasm) Normally you are supposed to call 'make barebox.S' (with uppercase 'S'), but I think it's fine to just add the same target with a lowercase 's' like you did to make both work. Care to send a proper patch with Signed-off-by? 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] 6+ messages in thread
* Re: [Makefile bug] make barebox.s : dead loop 2013-12-02 9:13 ` Sascha Hauer @ 2013-12-02 12:27 ` Kevin Du Huanpeng 2013-12-03 11:25 ` Sascha Hauer 0 siblings, 1 reply; 6+ messages in thread From: Kevin Du Huanpeng @ 2013-12-02 12:27 UTC (permalink / raw) To: Sascha Hauer; +Cc: barebox hi, Hauer: There is two targets of barebox.S, one is X86, I just try to compile the x86 barebox, to test if there is the same problem with x86 arch. but i got this: 0. my host & gcc: $ cat /proc/version Linux version 3.8.0-29-generic (buildd@akateko) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #42~precise1-Ubuntu SMP Wed Aug 14 15:31:16 UTC 2013 $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper Target: i686-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu Thread model: posix gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 1. edit Makefile ARCH=x86 CROSS_COMPILE= 2. $ make generic_defconfig 3. make LD arch/x86/boot/built-in.o GEN .version CHK include/generated/compile.h UPD include/generated/compile.h CC common/version.o LD common/built-in.o LD barebox ld: section .eh_frame loaded at [000000000001605c,000000000001f01b] overlaps section .barebox_initcalls loaded at [000000000001605c,00000000000160b7] make: *** [barebox] Error 1 dev@bogon:~/wr720n/bug.dis/x86$ 2013/12/2 Sascha Hauer <s.hauer@pengutronix.de>: > On Mon, Dec 02, 2013 at 04:36:50PM +0800, Kevin Du Huanpeng wrote: >> I add barebox.s after the target barebox.S, >> It works. >> maybe should add the same thing with >> >> ---------- >> ifdef CONFIG_X86 >> barebox.S: barebox >> ifdef CONFIG_X86_HDBOOT >> ------------ >> >> >> @@ -723,7 +724,7 @@ endif >> @echo " * Init Calls content" >> barebox.S >> $(Q)$(OBJDUMP) -j .barebox_initcalls -d barebox >> barebox.S >> else >> -barebox.S: barebox FORCE >> +barebox.S barebox.s: barebox FORCE >> $(call if_changed,disasm) > > Normally you are supposed to call 'make barebox.S' (with uppercase 'S'), > but I think it's fine to just add the same target with a lowercase 's' > like you did to make both work. Care to send a proper patch with > Signed-off-by? > > 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] 6+ messages in thread
* Re: [Makefile bug] make barebox.s : dead loop 2013-12-02 12:27 ` Kevin Du Huanpeng @ 2013-12-03 11:25 ` Sascha Hauer 2013-12-04 14:17 ` Kevin Du Huanpeng 0 siblings, 1 reply; 6+ messages in thread From: Sascha Hauer @ 2013-12-03 11:25 UTC (permalink / raw) To: Kevin Du Huanpeng; +Cc: barebox Hi Kevin, On Mon, Dec 02, 2013 at 08:27:39PM +0800, Kevin Du Huanpeng wrote: > > LD arch/x86/boot/built-in.o > GEN .version > CHK include/generated/compile.h > UPD include/generated/compile.h > CC common/version.o > LD common/built-in.o > LD barebox > ld: section .eh_frame loaded at [000000000001605c,000000000001f01b] > overlaps section .barebox_initcalls loaded at > [000000000001605c,00000000000160b7] > make: *** [barebox] Error 1 > dev@bogon:~/wr720n/bug.dis/x86$ Same here. Could you try the following patch? It resolves this for me and the resulting image works with qemu. Sascha 8<------------------------------------------------------- From 5be365b6b36372466f88815b97d38bc203c6e183 Mon Sep 17 00:00:00 2001 From: Sascha Hauer <s.hauer@pengutronix.de> Date: Tue, 3 Dec 2013 12:20:56 +0100 Subject: [PATCH] x86: Fix linker script Do not load sections to specific addresses. This fixes linking which otherwise fails with newer toolchains with: /opt/OSELAS.Toolchain-2012.12.1/i586-unknown-linux-gnu/gcc-4.7.2-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/i586-unknown-linux-gnu-ld: section .eh_frame loaded at [0000000000015fb4,000000000001b0bf] overlaps section .barebox_initcalls loaded at [0000000000015fb4,000000000001600f] Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> --- arch/x86/lib/barebox.lds.S | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/x86/lib/barebox.lds.S b/arch/x86/lib/barebox.lds.S index 05d0f77..83e991c 100644 --- a/arch/x86/lib/barebox.lds.S +++ b/arch/x86/lib/barebox.lds.S @@ -137,7 +137,7 @@ SECTIONS #endif /* the main barebox part (32 bit) */ - .text : AT ( LOADADDR(.bootstrapping) + SIZEOF(.bootstrapping) ) { + .text : { /* do not align here! It may fails with the LOADADDR! */ _stext = .; _text = .; @@ -154,38 +154,38 @@ SECTIONS BAREBOX_BARE_INIT_SIZE _sdata = .; - .data : AT ( LOADADDR(.text) + SIZEOF(.text) ) { + .data : { *(.data*) . = ALIGN(4); } > barebox - .got : AT ( LOADADDR(.data) + SIZEOF (.data) ) { + .got : { *(.got*) . = ALIGN(4); } > barebox - .barebox_cmd : AT ( LOADADDR(.got) + SIZEOF (.got) ) { + .barebox_cmd : { __barebox_cmd_start = .; BAREBOX_CMDS __barebox_cmd_end = .; . = ALIGN(4); } > barebox - .barebox_magicvars : AT ( LOADADDR(.barebox_cmd) + SIZEOF (.barebox_cmd) ) { + .barebox_magicvars : { __barebox_magicvar_start = .; BAREBOX_MAGICVARS __barebox_magicvar_end = .; . = ALIGN(4); } > barebox - .barebox_initcalls : AT ( LOADADDR(.barebox_magicvars) + SIZEOF (.barebox_magicvars) ) { + .barebox_initcalls : { __barebox_initcalls_start = .; INITCALLS __barebox_initcalls_end = .; . = ALIGN(4); } > barebox - .__usymtab : AT ( LOADADDR(.barebox_initcalls) + SIZEOF (.barebox_initcalls) ) { + .__usymtab : { __usymtab_start = .; BAREBOX_SYMS __usymtab_end = .; -- 1.8.4.3 -- 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] 6+ messages in thread
* Re: [Makefile bug] make barebox.s : dead loop 2013-12-03 11:25 ` Sascha Hauer @ 2013-12-04 14:17 ` Kevin Du Huanpeng 0 siblings, 0 replies; 6+ messages in thread From: Kevin Du Huanpeng @ 2013-12-04 14:17 UTC (permalink / raw) To: Sascha Hauer; +Cc: barebox Hi, I tested it. works. 1. save the patch to file named x86.patch 2. git apply x86.patch 3. export ARCH=x86 4. make generic_defconfig 5. make [ no error] 6. make barebox.s 7. endless loop again. - - - - - - CHK include/generated/compile.h CHK include/generated/version.h CHK include/generated/utsrelease.h CHK include/generated/compile.h ^Cmake[23]: *** [barebox.s] Interrupt make[22]: *** [barebox.s] Interrupt make[21]: *** [barebox.s] Interrupt make[20]: *** [barebox.s] Interrupt make[19]: *** [barebox.s] Interrupt make[18]: *** [barebox.s] Interrupt make[17]: *** [barebox.s] Interrupt make[16]: *** [barebox.s] Interrupt make[15]: *** [barebox.s] Interrupt make[14]: *** [barebox.s] Interrupt make[13]: *** [barebox.s] Interrupt make[12]: *** [barebox.s] Interrupt make[11]: *** [barebox.s] Interrupt make[10]: *** [barebox.s] Interrupt - - - - 8. edit Makefile ifdef CONFIG_X86 -barebox.S : barebox +barebox.S barebox.s: barebox ifdef CONFIG_X86_HDBOOT 9. [no error] 2013/12/3 Sascha Hauer <s.hauer@pengutronix.de>: > Hi Kevin, > > On Mon, Dec 02, 2013 at 08:27:39PM +0800, Kevin Du Huanpeng wrote: >> >> LD arch/x86/boot/built-in.o >> GEN .version >> CHK include/generated/compile.h >> UPD include/generated/compile.h >> CC common/version.o >> LD common/built-in.o >> LD barebox >> ld: section .eh_frame loaded at [000000000001605c,000000000001f01b] >> overlaps section .barebox_initcalls loaded at >> [000000000001605c,00000000000160b7] >> make: *** [barebox] Error 1 >> dev@bogon:~/wr720n/bug.dis/x86$ > > Same here. Could you try the following patch? It resolves this for me > and the resulting image works with qemu. > > Sascha > > 8<------------------------------------------------------- > > From 5be365b6b36372466f88815b97d38bc203c6e183 Mon Sep 17 00:00:00 2001 > From: Sascha Hauer <s.hauer@pengutronix.de> > Date: Tue, 3 Dec 2013 12:20:56 +0100 > Subject: [PATCH] x86: Fix linker script > > Do not load sections to specific addresses. This fixes linking which otherwise > fails with newer toolchains with: > > /opt/OSELAS.Toolchain-2012.12.1/i586-unknown-linux-gnu/gcc-4.7.2-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/i586-unknown-linux-gnu-ld: section .eh_frame loaded at [0000000000015fb4,000000000001b0bf] overlaps section .barebox_initcalls loaded at [0000000000015fb4,000000000001600f] > > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> > --- > arch/x86/lib/barebox.lds.S | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/arch/x86/lib/barebox.lds.S b/arch/x86/lib/barebox.lds.S > index 05d0f77..83e991c 100644 > --- a/arch/x86/lib/barebox.lds.S > +++ b/arch/x86/lib/barebox.lds.S > @@ -137,7 +137,7 @@ SECTIONS > #endif > > /* the main barebox part (32 bit) */ > - .text : AT ( LOADADDR(.bootstrapping) + SIZEOF(.bootstrapping) ) { > + .text : { > /* do not align here! It may fails with the LOADADDR! */ > _stext = .; > _text = .; > @@ -154,38 +154,38 @@ SECTIONS > BAREBOX_BARE_INIT_SIZE > > _sdata = .; > - .data : AT ( LOADADDR(.text) + SIZEOF(.text) ) { > + .data : { > *(.data*) > . = ALIGN(4); > } > barebox > > - .got : AT ( LOADADDR(.data) + SIZEOF (.data) ) { > + .got : { > *(.got*) > . = ALIGN(4); > } > barebox > > - .barebox_cmd : AT ( LOADADDR(.got) + SIZEOF (.got) ) { > + .barebox_cmd : { > __barebox_cmd_start = .; > BAREBOX_CMDS > __barebox_cmd_end = .; > . = ALIGN(4); > } > barebox > > - .barebox_magicvars : AT ( LOADADDR(.barebox_cmd) + SIZEOF (.barebox_cmd) ) { > + .barebox_magicvars : { > __barebox_magicvar_start = .; > BAREBOX_MAGICVARS > __barebox_magicvar_end = .; > . = ALIGN(4); > } > barebox > > - .barebox_initcalls : AT ( LOADADDR(.barebox_magicvars) + SIZEOF (.barebox_magicvars) ) { > + .barebox_initcalls : { > __barebox_initcalls_start = .; > INITCALLS > __barebox_initcalls_end = .; > . = ALIGN(4); > } > barebox > > - .__usymtab : AT ( LOADADDR(.barebox_initcalls) + SIZEOF (.barebox_initcalls) ) { > + .__usymtab : { > __usymtab_start = .; > BAREBOX_SYMS > __usymtab_end = .; > -- > 1.8.4.3 > > -- > 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] 6+ messages in thread
end of thread, other threads:[~2013-12-04 14:17 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-12-02 8:22 [Makefile bug] make barebox.s : dead loop Kevin Du Huanpeng 2013-12-02 8:36 ` Kevin Du Huanpeng 2013-12-02 9:13 ` Sascha Hauer 2013-12-02 12:27 ` Kevin Du Huanpeng 2013-12-03 11:25 ` Sascha Hauer 2013-12-04 14:17 ` Kevin Du Huanpeng
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox