Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't get a working kernel compile.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc
View previous topic :: View next topic  
Author Message
gtj
n00b
n00b


Joined: 14 Apr 2014
Posts: 3

PostPosted: Mon Apr 14, 2014 9:41 pm    Post subject: Can't get a working kernel compile. Reply with quote

I recently resurrected a Sun Fire T1000 and was able to install using the "minimal" cd image. I haven't been able to compile a working kernel though and am still using the kernel and initrd from the install cd. The failure is a basic halt after "Allocated 64 Megs of memory at 0x40000000 for kernel". I've tried the current gentoo-source (3.12.13) and even the install image version (3.8.13) using the install image's config.

So, I'm thinking it's something simple like the compile environment...

The sparc handbook recommends non-multilib with sparc64-unknown linux-gnu- as the cross_compile prefix. The non-multilib stage3 has kgcc64. But no go.
I've also tried the multilib stage3 passing in "-m64" with CFLAGS_KERNEL but that didn't work either.

So now I'm stuck. Any hints? What's the currently accepted kernel compile environment?

Thanks.
Back to top
View user's profile Send private message
Randy Andy
Veteran
Veteran


Joined: 19 Jun 2007
Posts: 1151
Location: /dev/koelsch

PostPosted: Tue Apr 15, 2014 11:39 am    Post subject: Reply with quote

Welcome to Gentoo, gtj.

Some things and preconditions are not clear to me:

- Did you try to compile the new kernel on your already installed Sun Box, then I expect the enviroment should not be the problem and no cross compile prefix should be needed.
- Did you correct the symlink on this box, to the actual kernel sources, you wish to compile for?
- How did you get/extract the running kernel config and where do you copy it. Did you go on with make oldconfig?
- Do you still use an initrd, did you use genkernel for creating that?
- Which documentation did you follow to do that?


Questions over questions I know, but it could help us, to get on the right track.

Regards, Andy.
_________________
If you want to see a Distro done right, compile it yourself!
Back to top
View user's profile Send private message
gtj
n00b
n00b


Joined: 14 Apr 2014
Posts: 3

PostPosted: Tue Apr 15, 2014 2:46 pm    Post subject: Reply with quote

Hi Andy,

I've been following the guide at http://www.gentoo.org/doc/en/handbook/handbook-sparc.xml

Randy Andy wrote:

- Did you try to compile the new kernel on your already installed Sun Box, then I expect the enviroment should not be the problem and no cross compile prefix should be needed.

Yes, following the guide step 7. In the non-multilib environment, you have to set the cc prefix to sparc64-unknown linux-gnu- to get the 64 bit compiler. The guide fails to mention that you need to emerge kgcc64 to get sparc64-unknown linux-gnu-gcc but I figured that out.
Randy Andy wrote:

- Did you correct the symlink on this box, to the actual kernel sources, you wish to compile for?

When I emerged gentoo-sources, it unpacked the 3.12.13 sources and created the symlink.
When I tried 3.8.13, I recreated the link manually.
Randy Andy wrote:

- How did you get/extract the running kernel config and where do you copy it. Did you go on with make oldconfig?

From the running installation kernel (3.8.13): 'zcat /proc/config.gz > /usr/src/linux/.config'
Then 'make menuconfig' which does a silentoldconfig.
Randy Andy wrote:

- Do you still use an initrd, did you use genkernel for creating that?
- Which documentation did you follow to do that?

Yes. Because /usr is in its own partition an initrd is required even if all the drivers are compiled in.
I followed the guide referenced above and did a 'genkernel --install initramfs'
Randy Andy wrote:

Questions over questions I know, but it could help us, to get on the right track.


No worries. Thanks for the help!
Back to top
View user's profile Send private message
Randy Andy
Veteran
Veteran


Joined: 19 Jun 2007
Posts: 1151
Location: /dev/koelsch

PostPosted: Tue Apr 15, 2014 5:12 pm    Post subject: Reply with quote

So far so good, gtj.
Your approach and your arguments seems right to me.

Some more assumptions from my side...

I've seen that prefix option since some month in newer kernels, but I've never used until now and can't say if it works reliable.
But I guess, if you boot from an already locally installed system, there is no need to use it. It will use your loacal settings out of the make.conf.

Did you already set it to:
Code:

CHOST="sparc-unknown-linux-gnu"
CFLAGS="-mcpu=ultrasparc -O2 -pipe"
CXXFLAGS="${CFLAGS}"


By the way, I'm not practically experienced with the Sparc64 architecture and had never compiled a kernel for it, but I hope it is similar to the way I do it regularly on other platforms.

In the handbook I found a link to a Linux/SPARC64 Sun Hardware Compatibility List, where your box isn't mentioned...
http://www.gentoo.org/proj/en/base/sparc/sunhw.xml , but the fact that it boots fine with the kernel from the cd, should be proof enough that it should be possible.
Nevertheless it seems not that easy, beware the preconditions mentioned for the T2000.

And a non-multilib environment should be the right choice.

If your fail furthermore, next steps should be to post the kernel.config (please upload it with the help of wgetpaste) and the output of:
Code:
gcc-config -l

and
Code:
eselect profile list


Lets hope that anyone else here, has more ideas or experience on Sparc, to help you out.

Much success, Andy.
_________________
If you want to see a Distro done right, compile it yourself!
Back to top
View user's profile Send private message
gtj
n00b
n00b


Joined: 14 Apr 2014
Posts: 3

PostPosted: Tue Apr 15, 2014 8:39 pm    Post subject: Reply with quote

Well, I have a booting kernel now...

After having trying so many variables, I decided to start over with a clean install.

I used the multilib stage 3 and for the kernel configuration, I skipped the part about setting the cross-compile prefix and... wound up right back where I was. Given that the kernel wasn't even being loaded I though let me try the kernel "zImage" instead of the uncompressed "image" that the handbook says to use and... It loaded!

Next, it was getting stuck finding the MPT Fusion SAS controller even though the driver was loading. So, I downloaded stock 3.8.13 kernel from kernel.org (same version as the installer kernel) and... Yes!!! I now have a fully function T1000.

So, the handbook should probably be changed to use the zImage file instead of the image file.
Although I didn't test the non-multilib I expect that it'll work if you install kgcc64 and change the cross-compile prefix to sparc64-unknown-linux-gnu.

If I have time this week, I'll roll forward through the kernel versions to see where the MPT SAS stuff stopped working. Might just be my T1000's firmware is too old for newer kernels.

EDIT:

The 3.12.13 kernel that's the default when you emerge gentoo-sources doesn't find my MPT SAS controller, but a stock 3.14.1 kernel from kernel.org works just fine. Even better.
Back to top
View user's profile Send private message
Randy Andy
Veteran
Veteran


Joined: 19 Jun 2007
Posts: 1151
Location: /dev/koelsch

PostPosted: Wed Apr 16, 2014 6:07 am    Post subject: Reply with quote

Well done, gtj.

And if you had more time, maybe in two weeks or so, it would be great if you could send over your working specs to the Sparc Team, referenced in my post before.
Hopefully they are willing/interested in updating the outdated page with this actual results of your findings.

Furthermore much fun with your Sparc Box.


Best, Andy.
_________________
If you want to see a Distro done right, compile it yourself!
Back to top
View user's profile Send private message
cb88
n00b
n00b


Joined: 26 Dec 2011
Posts: 28

PostPosted: Tue Apr 29, 2014 7:48 pm    Post subject: Reply with quote

I don't remember exactly but I think kernels 3.9.11+ up to 3.15 were having deadlock problems on the T2000 and it hung near the SAS controller in the log... could be that is what was happening. I have been running 3.9.11 gentoo-sources for over a month of uptime.

The T1000 and T2000 are very similar after all.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc 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