Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Latest decent kernel for ultrasparcs?
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
Sugarat
Guru
Guru


Joined: 24 Jul 2002
Posts: 348

PostPosted: Thu Jan 06, 2005 8:07 pm    Post subject: Latest decent kernel for ultrasparcs? Reply with quote

I'd like a 2.6 kernel on my U5, which should I use, and whats the best way to go about installing it?
_________________
--[ UltraSPARC ]--
Accept no imitations
Back to top
View user's profile Send private message
rchan00
n00b
n00b


Joined: 30 Jun 2004
Posts: 29

PostPosted: Fri Jan 07, 2005 12:41 am    Post subject: Reply with quote

Here's what I use - YMMV -

0. emerge udev / hotplug / module-init-tools
1. gentoo-dev-sources-2.6.10-r1 (though -r2 is out)
- make menuconfig -- choose whatever you need
- I put ext3 / sym53c8xx / tg3 in the kernel to avoid having
to have a initrd; less to go wrong
- exploit building in a separate object tree - allows you to
build multiple kernels from the same src tree, won't clutter
up your /usr/src/linux-2.6.10-gentoo-r1, and it is as good
a time to learn this trick. Say you build in /usr/src/build
cd /usr/src/build
make -C /usr/src/linux-2.6.10-gentoo-r1 O=$PWD EXTRAVERSION=?????? menuconfig
....confiigure your kernel.....
make -C /usr/src/linux-2.6.10-gentoo-r1 O=$PWD EXTRAVERSION=???????
make -C /usr/src/linux-2.6.10-gentoo-r1 O=$PWD EXTRAVERSION=??????? \
modules_install
make -C /usr/src/linux-2.6.10-gentoo-r1 O=$PWD EXTRAVERSION=??????? \
image
cp arch/sparc64/build/image /boot/kernel-??????????????
2. Edit /etc/silo.conf
and reboot! (Replace ???????? with whatever is sensible for your system)
3. DEVFS may bite you - since it is deprecated in 2.6 I recommend unconfiguring
out of your kernel. 2.6-ers need to learn to live without devfs anyway.
If you leave it configured in you may need to boot with t he kernel line
append="nodevfs devfs=nomount"
to experiment with udev otherwise the boot scripts may try to set you up for
devfs instead of udev. (Actually devfs doesn't even work for me on 2.6 as
the boot script gets majorly confused.) Besides udev is officially The-Blessed-Way (tm)
4. If you have fast x86 in the neighbourhood I recommend building
the kernel using a crosscompiler - in this case copy over the source
tree and use the additional lines
make ... ARCH=sparc64 CROSS_COMPILE=sparc64-unknown-linux-gnu-...
When you install modules add
...INSTALL_MOD_PATH=/var/tmp/gentoo-sparc-root
to put the modules in a sane place. You need to copy over
the kernel, installed modules tree and System.map.
Trust me - the kernel build is an order of magnitude faster - it takes
5min on a dual Xeon 3GHz machine.

You will need to obtain a x86/sparc64 crosscompiler to do this.
Option A.
I am using gcc 3.3.5. The magic is in gcc configure's --with-sysroot=DIR
option which takes a directory DIR that has a tree of the target's /usr/include, /lib, /usr/lib - this magic makes building crosscompilers
much easier now.
You also need to copy the sparc headers/libs
to the host machine. Note that libs/headers are not necessary for kernel builds but building the crosscompiler is much easier when target libs/headers exist. If you baulk at copying your entire /usr/include,
/lib /usr/lib over you can use glibc(devel,headers,kernheaders) rpms from Aurora Linux - as I said the only function of this junk is to build the crosscompiler. They are never actually used in a kernel build.

For the record I build a crosscompiler that mimics the
Redhat behaviour, i.e., 64 bit compiler with 32 bits as default,
32 bit libraries in /lib /usr/lib, 64 bit libraries in /lib64 /usr/lib64

binutils: configure --prefix=PREFIX --target=sparc64-unknown-linux-gnu
--enable-multilib --with-sysroot=SYSROOT
(SYSROOT is a directory where you have an image of /lib, /usr/lib,
/usr/include from the sparc target).

gcc: configure --prefix=PREFIX --target=sparc64-unknown-linux-gnu
--enable-multilib --enable-languages=c,c++ --enable-shared
--enable-threads=posix --enable-__cxa_atexit --with-system-zlib
--with-cpu=v7
--with-sysroot=SYSROOT --disable-checking --disable-libunwind-exceptions

The above actually builds a complete Aurora-type compiler
that can build userspace C and C++ binaries.
To be honest a kernel-only-building compiler needs only C and
and not all the shared/threads/__cxa_atexit stuff. However
I'm too lazy to figure the minimalist/bootstrap compiler (which is done by
Option B below).



Option B.
http://www.kegel.com/crosstool/ is your friend


:D .
Back to top
View user's profile Send private message
Mark Clegg
Apprentice
Apprentice


Joined: 05 Jan 2004
Posts: 269
Location: ZZ9 Plural Z Alpha

PostPosted: Fri Jan 07, 2005 4:37 pm    Post subject: Reply with quote

Depending on your model of U5 you might be better with 2.6.9....

https://forums.gentoo.org/viewtopic.php?t=271438
Back to top
View user's profile Send private message
Sugarat
Guru
Guru


Joined: 24 Jul 2002
Posts: 348

PostPosted: Fri Jan 07, 2005 10:53 pm    Post subject: Reply with quote

Exeellent. I'll try to get 2.6.9 working then I think. Many thanks for your help chaps!
_________________
--[ UltraSPARC ]--
Accept no imitations
Back to top
View user's profile Send private message
Sugarat
Guru
Guru


Joined: 24 Jul 2002
Posts: 348

PostPosted: Sat Jan 08, 2005 12:53 pm    Post subject: Reply with quote

Hmm.. ?

Code:
root@hobnob gentoo-dev-sources # emerge gentoo-dev-sources-2.6.9
Calculating dependencies

!!! Problem in sys-kernel/gentoo-dev-sources-2.6.9 dependencies.
!!! "Specific key requires an operator (sys-kernel/gentoo-dev-sources-2.6.9) (try adding an '=')" exceptions


UPDATE: Fixed with KEYWORDS="~sparc"
_________________
--[ UltraSPARC ]--
Accept no imitations
Back to top
View user's profile Send private message
rchan00
n00b
n00b


Joined: 30 Jun 2004
Posts: 29

PostPosted: Sun Jan 09, 2005 2:41 am    Post subject: Reply with quote

One way to build a minimalist sparc64 crosscompiler
for kernel builds is to use the configure in gcc-sparc64 ebuild.

First build sparc64 binutils on your host
configure --target=sparc64-unknown-linux-gnu --prefix=PREFIX

PATH=PREFIX/bin:$PATH

Then build gcc

configure --target=sparc64-unknown-linux-gnu --enable-languages=c
--disable-multilib --disable-shared --enable-threads=single

The resulting compiler will be good enough for kernel builds.
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