View previous topic :: View next topic |
Author |
Message |
sunnykoh n00b
Joined: 02 Oct 2004 Posts: 7
|
Posted: Sat Nov 27, 2004 1:45 am Post subject: SS20 recommanded config options? (Cross Compile/Distcc) |
|
|
Hello All,
I would like to know what would be the recommanded make.conf to optimised the settings for my SS20? (This is the first time I'm using Gentoo on my Sparc as I have used RedHat 6.2 and Solaris on it before)
Is there anyway to speed up compilation? Looking at the other threads here I want to get KDE or GNOME up (The latest version of course, one of the reason to change distros) And would like to do it in under 10 days or shorter. Is it possible to do a distcc type enviroment where I can use my PCs to assist?
The last question would be how should I partition my HDD. I have a 4GB Drive for this and would want to know what would be the best ratio for a XFree, Openoffice, Firefox and Gnome/KDE type workstation. (I'm considering to use it also as my local rsync server)
Thanks in advance
Regards
Sunny koh
Last edited by sunnykoh on Tue Nov 30, 2004 8:30 pm; edited 1 time in total |
|
Back to top |
|
|
zappa_the_great n00b
Joined: 30 Dec 2003 Posts: 17 Location: Konstanz, Germany
|
Posted: Mon Nov 29, 2004 7:57 pm Post subject: Re: SS20 recommanded config options? |
|
|
sunnykoh wrote: |
Is it possible to do a distcc type enviroment where I can use my PCs to assist? |
Yup, works fine here - much easier than normal cross compiling. Just remember to disable building of the runtime libraries when you configure gcc, since you need the sparc-linux runtime libraries - for distcc, it's not needed.
I'm just putting together some documentation about this, since I also did a setup for mips-sgi-irix as target - might take some time, though. _________________ "I haven't lost my mind -- it's backed up on tape somewhere." |
|
Back to top |
|
|
sunnykoh n00b
Joined: 02 Oct 2004 Posts: 7
|
Posted: Tue Nov 30, 2004 2:27 am Post subject: |
|
|
Based on some research I have done, the following should be in my make.conf file
Quote: |
CHOST="sparc-unknown-linux-gnu"
CFLAGS="-O3 -pipe -fomit-frame-pointer -mcpu=v8 -mtune=supersparc"
CXXFLAGS="${CFLAGS}"
|
This is based on me doing a cat /proc/cpuinfo and it reporting a supersparc processor. Any comments on how to improve it?
Second is the Harddisk Paritioning system. I'm going for a EXT3 system but how should I divide it. I did a installation with / as most of the disk and swap having 512 MB but it cannot boot because I have found out that you need to have the boot under the 2 GB Limit.
What be the best approach here? Have a Parition for booting which is only 100MB and the rest as / ?
Thanks for the info on distcc, now to get more information on howto actucally do it.
Regards |
|
Back to top |
|
|
zappa_the_great n00b
Joined: 30 Dec 2003 Posts: 17 Location: Konstanz, Germany
|
Posted: Tue Nov 30, 2004 7:49 am Post subject: |
|
|
sunnykoh wrote: |
Second is the Harddisk Paritioning system. I'm going for a EXT3 system but how should I divide it. I did a installation with / as most of the disk and swap having 512 MB but it cannot boot because I have found out that you need to have the boot under the 2 GB Limit.
What be the best approach here? Have a Parition for booting which is only 100MB and the rest as / ?
|
Umm, I think 20MB or so are more than enough for /boot. Just remember to read all posts and docs regarding separate /boot-partitions and SILO.
For distcc, here's what I did:
- On your PC, create separate directory $(CROSS) for cross toolchain (used /opt/crossdev/sparc-unknown-linux-gnu)
- configure&&install binutils with
Code: | ./configure --prefix=$(CROSS) --target=sparc-unknown-linux-gnu |
- Code: | export PATH=$(CROSS)/bin:$PATH |
- Now, I DID want to do some cross compiling also, so I just copied the contents of /usr/include, /lib and /usr/lib from my sparc to $(CROSS)/sysroot, and symlinked $(CROSS)/sysroot/lib/* to $(CROSS)/sparc-unknown-linux-gnu/lib. When you want to do only distcc, you should be able to get away without this and save several hundred MB on your disk
- create directory gcc-obj not in gcc source directory, change there, configure gcc with
Code: | $(gcc source directory)/configure --prefix=$(CROSS) --target=sparc-unknown-linux-gnu --with-sysroot=$(CROSS)/sysroot/ --disable-shared --enable-languages=c,c++ |
- build gcc (make && make install). Do NOT make bootstrap. Might bomb out in libstdc++ directory (happened when building for irix target). Just change to gcc subdir in this case and try again.
- Now setup distcc on your PC. emerge as usual. Since I wanted to keep my cross building environment out of the way, I copied the distccd script in /etc/init.d to distccd-sparc, added
Code: |
TMPDIR="${TMPDIR}" \
PATH="/opt/crossdev/sparc-unknown-linux-gnu/bin:${PATH}"\
/sbin/start-stop-daemon --start --quiet --startas ${DISTCCD_EXEC}
|
copied /etc/conf.d/distccd to distccd-sparc and changed port and PIDFILE to something different.
- cd to $(CROSS)/bin, create links from all files sparc-unknown-linux-gnu-XXX to XXX
- fire up distccd-sparc
- now setup distcc on your sparc, just use FEATURE="distcc ...." an MAKEOPTS="-jNN" in your /etc/make.conf. I used NN=6. Setup distcc hosts on your sparc with distcc-config, according to distcc documentation. If you did change your distccd port above, remember to change it in your host list, too. I also did put my PC first in the list, so even builds that can't be parallelized are done on my PC.
I'm pretty sure most of this isn't really needed or can be done differently. However, I couldn't get distcc to run just with sparc-unknown-linux-gnu-gcc on my sparc side, so I ended up creating all those symlinks in $(CROSS)/bin. This has the advantage that it works also for stupid programs that override CC and CXX.
I also didn't try this for bootstrapping my sparc, so your mileage may vary there.
Hope this helps
JM _________________ "I haven't lost my mind -- it's backed up on tape somewhere." |
|
Back to top |
|
|
sunnykoh n00b
Joined: 02 Oct 2004 Posts: 7
|
Posted: Tue Nov 30, 2004 8:43 pm Post subject: |
|
|
I have found this link
http://dev.gentoo.org/~ciaranm/docs/crossdistcc/
Okay, I have script my sparc to bootstrap the system and do an emerge system. (I'm using a 2004.2 stage 1) It amases me that a simple idea like writing a short installation script would allow you to leave the computer unattended.
Code: |
#!/bin/sh
emerge --sync
emerge portage
cd /usr/portage
scripts/bootstrap.sh -f
emerge system --fetchonly
# emerge development-sources --fetchonly
# emerge development-sources
emerge postfix --fetchonly
emerge metalog --fetchonly
emerge vixie-cron --fetchonly
emerge logrotate --fetchonly
emerge lynx --fetchonly
emerge xfree --fetchonly
emerge qt --fetchonly
emerge kde --fetchonly
emerge openoffice --fetchonly
scripts/bootstrap.sh
emerge system
|
I'm abit lost from your reply. I understand the second half about creating the daemon to do the cross compilation but am unsure about the first part. Basically want want to speed up the process as fast as possible after the basis is done. I'm sure many people would want to do this as well as sad to say their PCs tend to be lots faster then the old sparcs they have. (Maybe someone should create a Gentoo Live-CD for this purpose for the x86 and sparc platforms with a simple howto)
Thanks for your help |
|
Back to top |
|
|
|
|
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
|
|