Microblaze and Sparc boards are broken because of common timer func
Hello, Rob, Tom, Michal, Daniel.
Commit 8dfafdde88eb (Introduce common timer functions) broke Microblaze and Sparc boards.
$ git checkout 8dfafdde88eb $ CROSS_COMPILE=microblaze-unknown-linux-gnu- ./MAKEALL -a microblaze <snipped> lib/time.c:45: undefined reference to `timer_read_counter' lib/libgeneric.o: In function `__udelay': lib/time.c:86: relocation truncated to fit: R_MICROBLAZE_32_PCREL_LO against symbol `get_ticks' defined in .text section in arch/microblaze/cpu/libmicroblaze.o lib/time.c:88: relocation truncated to fit: R_MICROBLAZE_32_PCREL_LO against symbol `get_ticks' defined in .text section in arch/microblaze/cpu/libmicroblaze.o lib/libgeneric.o: In function `udelay': lib/time.c:101: relocation truncated to fit: R_MICROBLAZE_32_PCREL_LO against symbol `__udelay' defined in .text section in arch/microblaze/cpu/libmicroblaze.o lib/libgeneric.o: In function `timer_get_us': lib/time.c:70: relocation truncated to fit: R_MICROBLAZE_32_PCREL_LO against symbol `get_ticks' defined in .text section in arch/microblaze/cpu/libmicroblaze.o lib/libgeneric.o: In function `get_timer': lib/time.c:65: relocation truncated to fit: R_MICROBLAZE_32_PCREL_LO against symbol `get_ticks' defined in .text section in arch/microblaze/cpu/libmicroblaze.o
$ CROSS_COMPILE=sparc-elf- ./MAKEALL grsim_leon2 Configuring for grsim_leon2 board... sparc-elf-size: './u-boot': No such file lib/libgeneric.o: In function `tick_to_time': /home/yamada/workspace/arm-linux-pf/u-boot/lib/time.c:56: undefined reference to `get_tbclk' lib/libgeneric.o: In function `get_ticks': /home/yamada/workspace/arm-linux-pf/u-boot/lib/time.c:45: undefined reference to `timer_read_counter' lib/libgeneric.o: In function `usec_to_tick': /home/yamada/workspace/arm-linux-pf/u-boot/lib/time.c:74: undefined reference to `get_tbclk' /home/yamada/workspace/arm-linux-pf/u-boot/lib/time.c:75: undefined reference to `get_tbclk'
(I can notice broken boards because I quite often build all boards for the test of Kbuild porting.)
Best Regards
Masahiro Yamada
Quoted 44 lines · Masahiro Yamada
Hello, Rob, Tom, Michal, Daniel.
Commit
8dfafdde88eb(Introduce common timer functions) broke Microblaze and Sparc boards.$ git checkout 8dfafdde88eb $ CROSS_COMPILE=microblaze-unknown-linux-gnu- ./MAKEALL -a microblaze <snipped> lib/time.c:45: undefined reference to `timer_read_counter' lib/libgeneric.o: In function `__udelay': lib/time.c:86: relocation truncated to fit: R_MICROBLAZE_32_PCREL_LO against symbol `get_ticks' defined in .text section in arch/microblaze/cpu/libmicroblaze.o lib/time.c:88: relocation truncated to fit: R_MICROBLAZE_32_PCREL_LO against symbol `get_ticks' defined in .text section in arch/microblaze/cpu/libmicroblaze.o lib/libgeneric.o: In function `udelay': lib/time.c:101: relocation truncated to fit: R_MICROBLAZE_32_PCREL_LO against symbol `__udelay' defined in .text section in arch/microblaze/cpu/libmicroblaze.o lib/libgeneric.o: In function `timer_get_us': lib/time.c:70: relocation truncated to fit: R_MICROBLAZE_32_PCREL_LO against symbol `get_ticks' defined in .text section in arch/microblaze/cpu/libmicroblaze.o lib/libgeneric.o: In function `get_timer': lib/time.c:65: relocation truncated to fit: R_MICROBLAZE_32_PCREL_LO against symbol `get_ticks' defined in .text section in arch/microblaze/cpu/libmicroblaze.o$ CROSS_COMPILE=sparc-elf- ./MAKEALL grsim_leon2 Configuring for grsim_leon2 board... sparc-elf-size: './u-boot': No such file lib/libgeneric.o: In function `tick_to_time': /home/yamada/workspace/arm-linux-pf/u-boot/lib/time.c:56: undefined reference to `get_tbclk' lib/libgeneric.o: In function `get_ticks': /home/yamada/workspace/arm-linux-pf/u-boot/lib/time.c:45: undefined reference to `timer_read_counter' lib/libgeneric.o: In function `usec_to_tick': /home/yamada/workspace/arm-linux-pf/u-boot/lib/time.c:74: undefined reference to `get_tbclk' /home/yamada/workspace/arm-linux-pf/u-boot/lib/time.c:75: undefined reference to `get_tbclk'
Quoted 2 lines
(I can notice broken boards because I quite often build all boards for the test of
Kbuildporting.)
This should be fixed by this patch - at least for microblaze.
commit 65ba7add0d609bbd035b8d42fafdaf428ac24751
Author: Rob Herring <[email protected]> Date: Fri Nov 8 08:40:43 2013 -0600
time: add weak annotation to timer_read_counter declaration
A weak annotation is needed in order to prevent link errors when get_ticks is overridden. This fixes sandbox build.
Thanks,
Michal
Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 263 bytes Desc: OpenPGP digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131112/e0ebb7ae/attachment.pgp>
Hello Michal
Quoted 6 lines
This should be fixed by this patch - at least for microblaze.
commit
65ba7add0d609bbd035b8d42fafdaf428ac24751Author: Rob Herring <[email protected]> Date: Fri Nov 8 08:40:43 2013 -0600
Quoted 6 lines
time: add weak annotation to
timer_read_counterdeclarationA weak annotation is needed in order to prevent link errors when
get_ticksis overridden. This fixes sandbox build.Signed-off-by Rob Herring <[email protected]>
No.
I tried both the current u-boot/master and commit 65ba7add0d, but Microblaze board failed with the same error message.
Best Regards
Masahiro Yamada
Hi Masahiro,
Quoted 11 lines · Masahiro Yamada
Hello Michal
Quoted 8 lines
This should be fixed by this patch - at least for microblaze.
commit
65ba7add0d609bbd035b8d42fafdaf428ac24751Author: Rob Herring <[email protected]> Date: Fri Nov 8 08:40:43 2013 -0600time: add weak annotation to
timer_read_counterdeclaration
Quoted 9 lines
Quoted 4 lines
A weak annotation is needed in order to prevent link errors when
get_ticksis overridden. This fixes sandbox build.Signed-off-by Rob Herring <[email protected]>No.
I tried both the current u-boot/master and commit65ba7add0d, but Microblaze board failed with the same error message.
Look at this log - uboot section.
http://www.monstr.eu/wiki/doku.php?id=log:2013-11-12_13_29_22
Which toolchain do you use?
Thanks,
Michal
Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 263 bytes Desc: OpenPGP digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131112/3ff2419f/attachment.pgp>
Quoted 24 lines · Michal Simek
Hi Masahiro,
Quoted 11 lines · Masahiro Yamada
Hello Michal
Quoted 8 lines
This should be fixed by this patch - at least for microblaze.
commit
65ba7add0d609bbd035b8d42fafdaf428ac24751Author: Rob
Herring <[email protected]> Date: Fri Nov 8 08:40:43
2013 -0600time: add weak annotation to
timer_read_counterdeclarationQuoted 9 lines
Quoted 4 lines
A weak annotation is needed in order to prevent link errors when
get_ticksis overridden. This fixes sandbox build.Signed-off-by Rob Herring <[email protected]>No. I tried both the current u-boot/master and commit
65ba7add0d, but Microblaze board failed with the same error message.
Quoted 4 lines
Look at this log - uboot section.
http://www.monstr.eu/wiki/doku.php?id=log:2013-11-12_13_29_22Which toolchain do you use?
It builds for me with 4.8.0 from kernel.org, but I had to disable systemace driver otherwise I get this error:
/opt/gcc-4.8.0-nolibc/microblaze-linux/bin/microblaze-linux-gcc -g
-Os -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x29000000
-I/home/rob/proj/git/u-boot-arm/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/gcc-4.8.0-nolibc/microblaze-linux/bin/../lib/gcc/microblaze-linux/4.8.0/include -pipe -ffixed-r31 -D__microblaze__ -mno-xl-soft-mul -mno-xl-soft-div -mxl-barrel-shift -Wall -Wstrict-prototypes -fno-stack-protector
-Wno-format-nonliteral -Wno-format-security -fstack-usage -o
systemace.o systemace.c -csystemace.c: In function 'ace_readw':
systemace.c:70:1: warning: stack usage computation not supported for this target [enabled by default]
}
^
{standard input}: Assembler messages:
{standard input}:2499: Error: operation combines symbols in different segments
{standard input}:2500: Error: operation combines symbols in different segments
{standard input}:2503: Error: operation combines symbols in different segments
{standard input}:2504: Error: operation combines symbols in different segments
{standard input}:2509: Error: operation combines symbols in different segments
{standard input}:2510: Error: operation combines symbols in different segments
{standard input}:2519: Error: operation combines symbols in different segments
{standard input}:2520: Error: operation combines symbols in different segments
{standard input}:2523: Error: operation combines symbols in different segments
{standard input}:2524: Error: operation combines symbols in different segments
{standard input}:2533: Error: operation combines symbols in different segments
{standard input}:2534: Error: operation combines symbols in different segments
{standard input}:2537: Error: operation combines symbols in different segments
{standard input}:2538: Error: operation combines symbols in different segments
{standard input}:2543: Error: operation combines symbols in different segments
{standard input}:2544: Error: operation combines symbols in different segments
{standard input}:2553: Error: operation combines symbols in different segments
{standard input}:2554: Error: operation combines symbols in different segments
make[3]: *** [systemace.o] Error 1
Rob
Quoted 25 lines · Rob Herring
Quoted 24 lines · Michal Simek
Hi Masahiro,
Quoted 20 lines · Masahiro Yamada
Hello Michal
Quoted 6 lines
This should be fixed by this patch - at least for microblaze.
commit
65ba7add0d609bbd035b8d42fafdaf428ac24751Author: Rob
Herring <[email protected]> Date: Fri Nov 8 08:40:43
2013 -0600Quoted 6 lines
time: add weak annotation to
timer_read_counterdeclarationA weak annotation is needed in order to prevent link errors when
get_ticksis overridden. This fixes sandbox build.Signed-off-by Rob Herring <[email protected]>No. I tried both the current u-boot/master and commit
65ba7add0d, but Microblaze board failed with the same error message.
Quoted 7 lines
Quoted 4 lines
Look at this log - uboot section.
http://www.monstr.eu/wiki/doku.php?id=log:2013-11-12_13_29_22Which toolchain do you use?
It builds for me with 4.8.0 from kernel.org, but I had to disable systemace driver otherwise I get this error:
yes. That's my behaviour too when I use this toolchain. I have to ping toolchain people to find out status of stack support in mainline gcc.
Thanks,
Michal
Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 263 bytes Desc: OpenPGP digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131112/3c4f361b/attachment.pgp>
Quoted 29 lines · Michal Simek
Quoted 28 lines · Rob Herring
Quoted 27 lines · Michal Simek
Hi Masahiro,
Quoted 11 lines · Masahiro Yamada
Hello Michal
Quoted 8 lines
This should be fixed by this patch - at least for microblaze.
commit
65ba7add0d609bbd035b8d42fafdaf428ac24751Author: Rob
Herring <[email protected]> Date: Fri Nov 8 08:40:43
2013 -0600time: add weak annotation to
timer_read_counterdeclarationQuoted 9 lines
Quoted 4 lines
A weak annotation is needed in order to prevent link errors when
get_ticksis overridden. This fixes sandbox build.Signed-off-by Rob Herring <[email protected]>No. I tried both the current u-boot/master and commit
65ba7add0d, but Microblaze board failed with the same error message.Look at this log - uboot section.
http://www.monstr.eu/wiki/doku.php?id=log:2013-11-12_13_29_22
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Which toolchain do you use?
It builds for me with 4.8.0 from kernel.org, but I had to disable systemace driver otherwise I get this error:
yes. That's my behaviour too when I use this toolchain. I have to ping toolchain people to find out status of stack support in mainline gcc.
Well, why is the assembler part failing? And what is the toolchain people should use here?
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131118/47bac817/attachment.pgp>
Quoted 35 lines · Tom Rini
Quoted 34 lines · Michal Simek
Quoted 32 lines · Rob Herring
Quoted 24 lines · Michal Simek
Hi Masahiro,
Quoted 11 lines · Masahiro Yamada
Hello Michal
Quoted 8 lines
This should be fixed by this patch - at least for microblaze.
commit
65ba7add0d609bbd035b8d42fafdaf428ac24751Author: Rob
Herring <[email protected]> Date: Fri Nov 8 08:40:43
2013 -0600time: add weak annotation to
timer_read_counterdeclarationQuoted 9 lines
Quoted 4 lines
A weak annotation is needed in order to prevent link errors when
get_ticksis overridden. This fixes sandbox build.Signed-off-by Rob Herring <[email protected]>No. I tried both the current u-boot/master and commit
65ba7add0d, but Microblaze board failed with the same error message.Quoted 4 lines
Look at this log - uboot section.
http://www.monstr.eu/wiki/doku.php?id=log:2013-11-12_13_29_22Which toolchain do you use?
It builds for me with 4.8.0 from kernel.org, but I had to disable systemace driver otherwise I get this error:
Quoted 7 lines
Quoted 3 lines
yes. That's my behaviour too when I use this toolchain. I have to ping toolchain people to find out status of stack support in mainline gcc.
Well, why is the assembler part failing? And what is the toolchain people should use here?
That's not question to me but to our toolchain guys what it is missing in the mainline gcc. I have sent them an email. Will see what I get.
I do use these two toolchains[1] depends if you want to compile little or big endian targets. Mainline u-boot, because of ll_temac driver, must be compiled by big endian toolchains.
[1] http://www.monstr.eu/20131118-microblaze-toolchains.tar.gz
md5sum 20131118-microblaze-toolchains.tar.gz 940b8464154d3f1b58fe977156203b2a 20131118-microblaze-toolchains.tar.gz
Thanks,
Michal
Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 263 bytes Desc: OpenPGP digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131118/2fe1df41/attachment.pgp>
Hello Michal.
Quoted 18 lines
Quoted 8 lines
Quoted 8 lines
This should be fixed by this patch - at least for microblaze.
commit
65ba7add0d609bbd035b8d42fafdaf428ac24751Author: Rob Herring <[email protected]> Date: Fri Nov 8 08:40:43 2013 -0600time: add weak annotation to
timer_read_counterdeclarationQuoted 9 lines
Quoted 4 lines
A weak annotation is needed in order to prevent link errors when
get_ticksis overridden. This fixes sandbox build.Signed-off-by Rob Herring <[email protected]>No.
I tried both the current u-boot/master and commit65ba7add0d, but Microblaze board failed with the same error message.
Quoted 4 lines
Look at this log - uboot section.
http://www.monstr.eu/wiki/doku.php?id=log:2013-11-12_13_29_22Which toolchain do you use?
Microblaze crosstools I use is available at:
http://dev.gentoo.org/~vapier/u-boot/microblaze.tar.xz
Before commit 8dfafdde88eb, I could build the microblaze-generic board with it.
But I can't build for the current u-boot/master.
Best Regards
Masahiro Yamada
Quoted 20 lines · Masahiro Yamada
Hello Michal.
Quoted 18 lines
Quoted 17 lines
Quoted 6 lines
This should be fixed by this patch - at least for microblaze.
commit
65ba7add0d609bbd035b8d42fafdaf428ac24751Author: Rob Herring <[email protected]> Date: Fri Nov 8 08:40:43 2013 -0600Quoted 6 lines
time: add weak annotation to
timer_read_counterdeclarationA weak annotation is needed in order to prevent link errors when
get_ticksis overridden. This fixes sandbox build.Signed-off-by Rob Herring <[email protected]>No.
I tried both the current u-boot/master and commit65ba7add0d, but Microblaze board failed with the same error message.
Quoted 8 lines
Quoted 4 lines
Look at this log - uboot section.
http://www.monstr.eu/wiki/doku.php?id=log:2013-11-12_13_29_22Which toolchain do you use?
Microblaze crosstools I use is available at:
http://dev.gentoo.org/~vapier/u-boot/microblaze.tar.xz
Not sure if Mike maintains this toolchain.
Quoted 3 lines
Before commit
8dfafdde88eb, I could build the microblaze-generic board with it.
But I can't build for the current u-boot/master.
You can use this one and follow Rob's comments.
https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.8.0/
Thanks,
Michal
Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 263 bytes Desc: OpenPGP digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131118/c3cd71e4/attachment.pgp>
Hello Michal
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Which toolchain do you use?
Microblaze crosstools I use is available at:
http://dev.gentoo.org/~vapier/u-boot/microblaze.tar.xzNot sure if Mike maintains this toolchain.
Stefan Roses told me about this pre-built cross tool in a thread:
http://u-boot.10912.n7.nabble.com/Suggestion-for-building-all-boards-td165285.html
Accoding to this thread, it was built by Mike Frysinger.
Quoted 6 lines
Quoted 3 lines
Before commit
8dfafdde88eb, I could build the microblaze-generic board with it.
But I can't build for the current u-boot/master.You can use this one and follow Rob's comments.
https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.8.0/
Worked for me.
OK. Going forward I will use this. Thanks!
Best Regards
Masahiro Yamada
Quoted 22 lines · Masahiro Yamada
Hello Michal
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Which toolchain do you use?
Microblaze crosstools I use is available at:
http://dev.gentoo.org/~vapier/u-boot/microblaze.tar.xzNot sure if Mike maintains this toolchain.
Stefan Roses told me about this pre-built cross tool in a thread:
http://u-boot.10912.n7.nabble.com/Suggestion-for-building-all-boards-td165285.htmlAccoding to this thread, it was built by Mike Frysinger.
Quoted 4 lines
Quoted 3 lines
Before commit
8dfafdde88eb, I could build the microblaze-generic board with it.
But I can't build for the current u-boot/master.
Quoted 5 lines
Quoted 2 lines
You can use this one and follow Rob's comments.
https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.8.0/Worked for me.
OK. Going forward I will use this. Thanks!
Great.
Thanks,
Michal
Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 263 bytes Desc: OpenPGP digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131118/07af1aca/attachment.pgp>