Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't build kernel on AlphaServer ES40 :(
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
dknoto
n00b
n00b


Joined: 01 Apr 2012
Posts: 13

PostPosted: Sun Apr 01, 2012 11:27 am    Post subject: Can't build kernel on AlphaServer ES40 :( Reply with quote

Hello All,

After replacing the drive I started to install Gentoo from scratch.
I installed the package stage3-alpha-2012-03-10 and latest portage.
I preparing system to compile kernel. And then start command:

Code:
# genkernel all


After 18 minutes commpilation aborted with errors:

Code:
arch/alpha/kernel/built-in.o: In function `rx164_enable_irq':
(.text+0x18434): relocation truncated to fit: GPREL16 against `.sbss'
arch/alpha/kernel/built-in.o: In function `rx164_enable_irq':
(.text+0x18440): relocation truncated to fit: GPREL16 against `.sbss'
arch/alpha/kernel/built-in.o: In function `rx164_disable_irq':
(.text+0x18484): relocation truncated to fit: GPREL16 against `.sbss'
arch/alpha/kernel/built-in.o: In function `rx164_disable_irq':
(.text+0x18490): relocation truncated to fit: GPREL16 against `.sbss'
arch/alpha/kernel/built-in.o: In function `sable_lynx_enable_irq':
(.text+0x1866c): relocation truncated to fit: GPREL16 against `.sbss'
arch/alpha/kernel/built-in.o: In function `sable_lynx_enable_irq':
(.text+0x18670): relocation truncated to fit: GPREL16 against symbol `sable_lynx_irq_lock' defined in .sbss section in arch/alpha/kernel/built-in.o
arch/alpha/kernel/built-in.o: In function `sable_lynx_enable_irq':
(.text+0x186a4): relocation truncated to fit: GPREL16 against `.sbss'
arch/alpha/kernel/built-in.o: In function `sable_lynx_enable_irq':
(.text+0x186d8): relocation truncated to fit: GPREL16 against symbol `sable_lynx_irq_lock' defined in .sbss section in arch/alpha/kernel/built-in.o
arch/alpha/kernel/built-in.o: In function `sable_lynx_mask_and_ack_irq':
(.text+0x1870c): relocation truncated to fit: GPREL16 against `.sbss'
arch/alpha/kernel/built-in.o: In function `sable_lynx_mask_and_ack_irq':
(.text+0x18710): relocation truncated to fit: GPREL16 against symbol `sable_lynx_irq_lock' defined in .sbss section in arch/alpha/kernel/built-in.o
arch/alpha/kernel/built-in.o: In function `sable_lynx_mask_and_ack_irq':
(.text+0x18744): additional relocation overflows omitted from the output
make: *** [.tmp_vmlinux1] Error 1
* Gentoo Linux Genkernel; Version 3.4.20ESC[0m
* Running with options: all


Do you have any ideas?

Best regards
Dariusz Knociński.
_________________
My Alphas: ES40 4x833 MHz EV68AL, 4 GB RAM, 4-way, main memory, Radeon HD4350 1 GB RAM/ 3dfx Voodoo3 3000, Seagate 36 GB hard disk/ 8 x 146.8 GB on Smart Array 5300A.
PWS 500au, 500 MHz EV56, 192 MB RAM, Elsa Gloria


Last edited by dknoto on Mon Apr 02, 2012 6:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
windscape
n00b
n00b


Joined: 27 Feb 2012
Posts: 18
Location: Littleton, MA USA

PostPosted: Mon Apr 02, 2012 2:51 pm    Post subject: Reply with quote

dknoto,

I no longer own an Alpha, but I'm a fan of the architecture.

A Google search revealed this: http://lkml.indiana.edu/hypermail/linux/kernel/1003.2/00341.html

It seems that you're hitting a very old bug in the kernel. I would suggest applying that patch, filing a bug, or emailing the Linux Kernel Mailing List.
Back to top
View user's profile Send private message
dknoto
n00b
n00b


Joined: 01 Apr 2012
Posts: 13

PostPosted: Mon Apr 02, 2012 6:41 pm    Post subject: Reply with quote

Thank you for reply.
I changed flag manually from "-msmalldat" to "-mlargedata" and I ran the compile again.
Unfortunately for me again there were errors with relocation:

Code:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
  GEN     .version
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
kernel/built-in.o: In function `alarm_timer_nsleep_restart':
(.sched.text+0x2fd4): relocation truncated to fit: BRSGP against symbol `__copy_user' defined in .text section in arch/alpha/lib/lib.a(copy_user.o)
net/built-in.o: In function `cache_do_downcall':
(.text+0xe38b4): relocation truncated to fit: BRSGP against symbol `__copy_user' defined in .text section in arch/alpha/lib/lib.a(copy_user.o)
net/built-in.o: In function `read_flush.clone.9':
(.text+0xe4b78): relocation truncated to fit: BRSGP against symbol `__copy_user' defined in .text section in arch/alpha/lib/lib.a(copy_user.o)
net/built-in.o: In function `cache_read.clone.15':
(.text+0xe5c28): relocation truncated to fit: BRSGP against symbol `__copy_user' defined in .text section in arch/alpha/lib/lib.a(copy_user.o)
net/built-in.o: In function `write_flush.clone.16':
(.text+0xe6468): relocation truncated to fit: BRSGP against symbol `__copy_user' defined in .text section in arch/alpha/lib/lib.a(copy_user.o)
net/built-in.o: In function `rpc_pipe_generic_upcall':
(.text+0xe79a0): relocation truncated to fit: BRSGP against symbol `__copy_user' defined in .text section in arch/alpha/lib/lib.a(copy_user.o)
net/built-in.o: In function `proc_dodebug':
(.text+0xeda50): relocation truncated to fit: BRSGP against symbol `__copy_user' defined in .text section in arch/alpha/lib/lib.a(copy_user.o)
net/built-in.o: In function `proc_dodebug':
(.text+0xedab4): relocation truncated to fit: BRSGP against symbol `__copy_user' defined in .text section in arch/alpha/lib/lib.a(copy_user.o)
net/built-in.o: In function `gss_pipe_downcall':
(.text+0xf0770): relocation truncated to fit: BRSGP against symbol `__copy_user' defined in .text section in arch/alpha/lib/lib.a(copy_user.o)
net/built-in.o: In function `vlan_ioctl_handler':
(.text+0xf6f5c): relocation truncated to fit: BRSGP against symbol `__copy_user' defined in .text section in arch/alpha/lib/lib.a(copy_user.o)
net/built-in.o: In function `vlan_ioctl_handler':
(.text+0xf731c): additional relocation overflows omitted from the output


I found some info on this bug but I don't fully understand why this done, yet :)

Regards
DKnoto.
_________________
My Alphas: ES40 4x833 MHz EV68AL, 4 GB RAM, 4-way, main memory, Radeon HD4350 1 GB RAM/ 3dfx Voodoo3 3000, Seagate 36 GB hard disk/ 8 x 146.8 GB on Smart Array 5300A.
PWS 500au, 500 MHz EV56, 192 MB RAM, Elsa Gloria
Back to top
View user's profile Send private message
dknoto
n00b
n00b


Joined: 01 Apr 2012
Posts: 13

PostPosted: Fri Apr 06, 2012 5:38 pm    Post subject: Reply with quote

Problem solved :-D

I changed few lines in "arch/alpha/Makefile" and then I compiled kernel successfully.
Those lines in kernel sources version 3.2.1-gentoo-r2:
Code:

15: cflags-y   := -pipe -mno-fp-regs -ffixed-8 -mlarge-data -mlarge-text # add -mlarge-data and -mlarge-text
29: cpuflags-$(CONFIG_ALPHA_GENERIC)   := -mcpu=ev67 # ev5 -> ev67
37: KBUILD_CFLAGS += $(cflags-y) -Wa,-mev67 # ev6 -> ev67


Best Regards for All Readers
Dariusz Knociński.
_________________
My Alphas: ES40 4x833 MHz EV68AL, 4 GB RAM, 4-way, main memory, Radeon HD4350 1 GB RAM/ 3dfx Voodoo3 3000, Seagate 36 GB hard disk/ 8 x 146.8 GB on Smart Array 5300A.
PWS 500au, 500 MHz EV56, 192 MB RAM, Elsa Gloria
Back to top
View user's profile Send private message
mattst88
Developer
Developer


Joined: 28 Oct 2004
Posts: 422

PostPosted: Fri Apr 06, 2012 9:32 pm    Post subject: Reply with quote

This problem is because your kernel is too big.

Try reducing the size (strip out things you don't need, build stuff as modules). Using that patch causes extra instructions to be generated to do loads and stores.
_________________
My Wiki page
Back to top
View user's profile Send private message
dknoto
n00b
n00b


Joined: 01 Apr 2012
Posts: 13

PostPosted: Fri Apr 06, 2012 10:36 pm    Post subject: Reply with quote

That is what I feared. I tried, but it was too little. To which size I need to reduce the kernel? 4 MB?
_________________
My Alphas: ES40 4x833 MHz EV68AL, 4 GB RAM, 4-way, main memory, Radeon HD4350 1 GB RAM/ 3dfx Voodoo3 3000, Seagate 36 GB hard disk/ 8 x 146.8 GB on Smart Array 5300A.
PWS 500au, 500 MHz EV56, 192 MB RAM, Elsa Gloria
Back to top
View user's profile Send private message
mattst88
Developer
Developer


Joined: 28 Oct 2004
Posts: 422

PostPosted: Sat Apr 07, 2012 12:39 am    Post subject: Reply with quote

dknoto wrote:
That is what I feared. I tried, but it was too little. To which size I need to reduce the kernel? 4 MB?


I don't know exactly. The situation isn't totally clear to me.

The relevant -msmall-{data,text} options are described here: http://gcc.gnu.org/onlinedocs/gcc/DEC-Alpha-Options.html

Since removing -msmall-data avoids the error, it seems that 4MB code size isn't the limiting factor.

I'm glad to see that you have such a nice alpha equipped with such a nice graphics card! You should definitely hang out with us on irc.freenode.net #gentoo-alpha.
_________________
My Wiki page
Back to top
View user's profile Send private message
dknoto
n00b
n00b


Joined: 01 Apr 2012
Posts: 13

PostPosted: Sat Apr 07, 2012 2:30 pm    Post subject: Reply with quote

mattst88 wrote:
I don't know exactly. The situation isn't totally clear to me.

The relevant -msmall-{data,text} options are described here: http://gcc.gnu.org/onlinedocs/gcc/DEC-Alpha-Options.html

Yesterday I read gcc manual on my Gentoo Alpha Install CD, it was the same.

mattst88 wrote:
Since removing -msmall-data avoids the error, it seems that 4MB code size isn't the limiting factor.

In my situation, error was due to for two flags in compiler command line:
-mcpu=ev5 and -Wa,-mev6. This was strange for me because I selected DP264 system in kernel config.

mattst88 wrote:
I'm glad to see that you have such a nice alpha equipped with such a nice graphics card!

This machine is great but unfortunately terrible roar :(. I have another one AlphaServer ES40, but it hasn't motherboard.

mattst88 wrote:
You should definitely hang out with us on irc.freenode.net #gentoo-alpha.

A long time I was not there. After losing the disk is not yet installed the xchat.
_________________
My Alphas: ES40 4x833 MHz EV68AL, 4 GB RAM, 4-way, main memory, Radeon HD4350 1 GB RAM/ 3dfx Voodoo3 3000, Seagate 36 GB hard disk/ 8 x 146.8 GB on Smart Array 5300A.
PWS 500au, 500 MHz EV56, 192 MB RAM, Elsa Gloria
Back to top
View user's profile Send private message
LinuxFreakus
n00b
n00b


Joined: 23 Jan 2004
Posts: 30

PostPosted: Sat Jan 26, 2013 4:25 pm    Post subject: Reply with quote

This relocation error seems to be quite a thorn in people's side. Is there something we can do to make these workarounds part of the default or does that mess up stuff and cause more problems than it fixes?

Also, the roar of the alpha is one of its endearing qualities :)

Unfortunately my wife does not agree (even if I closed my office door, etc, you could still hear it from the upstairs bedroom) so mine has to live out in my shop/garage. But the heat is nice in the winter :)
Back to top
View user's profile Send private message
dknoto
n00b
n00b


Joined: 01 Apr 2012
Posts: 13

PostPosted: Sat Jan 26, 2013 10:38 pm    Post subject: Reply with quote

LinuxFreakus wrote:
This relocation error seems to be quite a thorn in people's side. Is there something we can do to make these workarounds part of the default or does that mess up stuff and cause more problems than it fixes?


I successfully resolved this problem. At the moment I don't remember exactly how I did it, but it was mistake in my configuration.

LinuxFreakus wrote:

Also, the roar of the alpha is one of its endearing qualities :)


I know.

LinuxFreakus wrote:

Unfortunately my wife does not agree (even if I closed my office door, etc, you could still hear it from the upstairs bedroom) so mine has to live out in my shop/garage. But the heat is nice in the winter :)


In the spring I move my Alpha in the attic and I'm going to build a mute:-D
_________________
My Alphas: ES40 4x833 MHz EV68AL, 4 GB RAM, 4-way, main memory, Radeon HD4350 1 GB RAM/ 3dfx Voodoo3 3000, Seagate 36 GB hard disk/ 8 x 146.8 GB on Smart Array 5300A.
PWS 500au, 500 MHz EV56, 192 MB RAM, Elsa Gloria
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum