[gentoo-user] Hardware upgrade and Gentoo

2007-07-18 Thread Daniel da Veiga

Hello list,

I just got a new box for use at work, its an Intel Core Duo 1.8, 1GB
RAM, with an Intel graphic card, its a IBM Lenovo machine. My old one
is an Itautec Athlon XP 1.1GHz with 512MB RAM and an Nvidia AGP
graphic card.

My make.conf (intersting part):
CFLAGS="-mno-tls-direct-seg-refs -O2 -pipe -fomit-frame-pointer
-march=athlon-xp"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"

What I want to know is, will my software, compiled with the above
settings, run in the new processor?

Cause if it does, I may be able to compile a generic kernel set (using
genkernel) and udev should take care of most module loading, and I
won't need to rebuild all my stuff. I've tested some binary packages
with an old Pentium III processor, and it worked...

Anyway, should I start from scratch or there's an easy way to migrate
all this stuff?

--
Daniel da Veiga
Computer Operator - RS - Brazil
-BEGIN GEEK CODE BLOCK-
Version: 3.1
GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
--END GEEK CODE BLOCK--
--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Hardware upgrade and Gentoo

2007-07-18 Thread Joshua Doll

Daniel da Veiga wrote:

Hello list,

I just got a new box for use at work, its an Intel Core Duo 1.8, 1GB
RAM, with an Intel graphic card, its a IBM Lenovo machine. My old one
is an Itautec Athlon XP 1.1GHz with 512MB RAM and an Nvidia AGP
graphic card.

My make.conf (intersting part):
CFLAGS="-mno-tls-direct-seg-refs -O2 -pipe -fomit-frame-pointer
-march=athlon-xp"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"

I'd look at what optimizations the march athlon-xp uses and compare that 
with the march you are going to there maybe some that you want to enable 
for the Core Duo. The CHOST shouldn't be an issue. It should be noted 
that you won't have an 64bit support if the new CPU even supports this 
don't remember off the top of my head. I suspect it will run without 
issues though.



What I want to know is, will my software, compiled with the above
settings, run in the new processor?

Cause if it does, I may be able to compile a generic kernel set (using
genkernel) and udev should take care of most module loading, and I
won't need to rebuild all my stuff. I've tested some binary packages
with an old Pentium III processor, and it worked...

Anyway, should I start from scratch or there's an easy way to migrate
all this stuff?



--Joshua Doll
--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Hardware upgrade and Gentoo

2007-07-18 Thread Alex Schuster
Daniel da Veiga writes:

> I just got a new box for use at work, its an Intel Core Duo 1.8, 1GB
> RAM, with an Intel graphic card, its a IBM Lenovo machine. My old one
> is an Itautec Athlon XP 1.1GHz with 512MB RAM and an Nvidia AGP
> graphic card.
>
> My make.conf (intersting part):
> CFLAGS="-mno-tls-direct-seg-refs -O2 -pipe -fomit-frame-pointer
> -march=athlon-xp"
> CHOST="i686-pc-linux-gnu"
> CXXFLAGS="${CFLAGS}"
> MAKEOPTS="-j2"
>
> What I want to know is, will my software, compiled with the above
> settings, run in the new processor?

I think this will not work well, because your current system has 
Athlon-specific CPU instructions which the Intel machine dows not know 
of. You probably get "illegal instruction" errors with many binaries. I 
even had this when I replaced my athlon-something with a just slightly 
less powerful Sempron CPU. 

> Anyway, should I start from scratch or there's an easy way to migrate
> all this stuff?

This should help, if you have exchanged the hardware and experience 
problems:
http://www.gentoo.org/proj/en/portage/doc/manually-fixing-portage.xml

However, see this thread, where it did not seem to work:
http://archives.gentoo.org/gentoo-user/msg_114280.xml

Another method, which I would use, would be to change your CFLAGS to what 
you would like for the new processor, but use mtune= instead of march=. 
This will also optimize for the cpu, but the code will run on any x86 
CPU. emerge world --emptytree to re-compile everything, then switch your 
hardware. This will give you flexibility, at the cost of lesser 
optimization. Depends on how you use your system, most applications will 
not show a noticeable speed ddifference I guess. 
You could also change to march= later, when the system ist up, and 
re-compile everything again to get full optimization.

Alex
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Hardware upgrade and Gentoo

2007-07-18 Thread Daniel da Veiga

On 7/18/07, Alex Schuster <[EMAIL PROTECTED]> wrote:

Another method, which I would use, would be to change your CFLAGS to what
you would like for the new processor, but use mtune= instead of march=.
This will also optimize for the cpu, but the code will run on any x86
CPU. emerge world --emptytree to re-compile everything, then switch your
hardware. This will give you flexibility, at the cost of lesser
optimization. Depends on how you use your system, most applications will
not show a noticeable speed ddifference I guess.
You could also change to march= later, when the system ist up, and
re-compile everything again to get full optimization.


Oh, that's good to know, I guess that's the best option, since after
the system is up and running I can do whatever optimizations it needs,
as long as I'm able to boot and work with it in the new hardware.

Tonight I'll start the (long and boring) process of recompiling the
whole stuff with "-mtune" instead of "-march".

Thanks to all that replied so far... Maybe more suggestions comming?!

--
Daniel da Veiga
Computer Operator - RS - Brazil
-BEGIN GEEK CODE BLOCK-
Version: 3.1
GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
--END GEEK CODE BLOCK--
--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Hardware upgrade and Gentoo

2007-07-18 Thread Volker Armin Hemmann
On Mittwoch, 18. Juli 2007, Daniel da Veiga wrote:
> On 7/18/07, Alex Schuster <[EMAIL PROTECTED]> wrote:
> > Another method, which I would use, would be to change your CFLAGS to what
> > you would like for the new processor, but use mtune= instead of march=.
> > This will also optimize for the cpu, but the code will run on any x86
> > CPU. emerge world --emptytree to re-compile everything, then switch your
> > hardware. This will give you flexibility, at the cost of lesser
> > optimization. Depends on how you use your system, most applications will
> > not show a noticeable speed ddifference I guess.
> > You could also change to march= later, when the system ist up, and
> > re-compile everything again to get full optimization.
>
> Oh, that's good to know, I guess that's the best option, since after
> the system is up and running I can do whatever optimizations it needs,
> as long as I'm able to boot and work with it in the new hardware.
>
> Tonight I'll start the (long and boring) process of recompiling the
> whole stuff with "-mtune" instead of "-march".
>
> Thanks to all that replied so far... Maybe more suggestions comming?!

instead of two emerge --emptytree it would be faster to just nuke the 
installation
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Hardware upgrade and Gentoo

2007-07-18 Thread Dale
Volker Armin Hemmann wrote:
> On Mittwoch, 18. Juli 2007, Daniel da Veiga wrote:
>   
>> On 7/18/07, Alex Schuster <[EMAIL PROTECTED]> wrote:
>> 
>>> Another method, which I would use, would be to change your CFLAGS to what
>>> you would like for the new processor, but use mtune= instead of march=.
>>> This will also optimize for the cpu, but the code will run on any x86
>>> CPU. emerge world --emptytree to re-compile everything, then switch your
>>> hardware. This will give you flexibility, at the cost of lesser
>>> optimization. Depends on how you use your system, most applications will
>>> not show a noticeable speed ddifference I guess.
>>> You could also change to march= later, when the system ist up, and
>>> re-compile everything again to get full optimization.
>>>   
>> Oh, that's good to know, I guess that's the best option, since after
>> the system is up and running I can do whatever optimizations it needs,
>> as long as I'm able to boot and work with it in the new hardware.
>>
>> Tonight I'll start the (long and boring) process of recompiling the
>> whole stuff with "-mtune" instead of "-march".
>>
>> Thanks to all that replied so far... Maybe more suggestions comming?!
>> 
>
> instead of two emerge --emptytree it would be faster to just nuke the 
> installation
>   

I agree.  Just back up /etc, make a copy of your world file and any
other config files you may need and start from scratch.  At least then
you KNOW for sure where you started from and that something didn't get
missed somewhere.

Oh, don't forget /home either.

Dale

:-)  :-)  :-)


Re: [gentoo-user] Hardware upgrade and Gentoo

2007-07-18 Thread Daniel da Veiga

On 7/18/07, Dale <[EMAIL PROTECTED]> wrote:

 instead of two emerge --emptytree it would be faster to just nuke the
installation

 I agree.  Just back up /etc, make a copy of your world file and any other
config files you may need and start from scratch.  At least then you KNOW
for sure where you started from and that something didn't get missed
somewhere.

 Oh, don't forget /home either.



I was just going to reply about that when you remind me I can keep the
world file, and all the portage configs...

Maybe I'll start from scratch then, copy the configs back and start an
"emerge -uDN world" to get it all back, I guess this will save me some
time, as I have all the tarballs from this two years at a network
storage  using NTFS.

--
Daniel da Veiga
Computer Operator - RS - Brazil
-BEGIN GEEK CODE BLOCK-
Version: 3.1
GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
--END GEEK CODE BLOCK--
--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Hardware upgrade and Gentoo

2007-07-18 Thread Mike Williams
On Wednesday 18 July 2007 18:49:00 Alex Schuster wrote:
> > What I want to know is, will my software, compiled with the above
> > settings, run in the new processor?
>
> I think this will not work well, because your current system has
> Athlon-specific CPU instructions which the Intel machine dows not know
> of. You probably get "illegal instruction" errors with many binaries. I
> even had this when I replaced my athlon-something with a just slightly
> less powerful Sempron CPU.

Actually, I'd not be surprised if everything, or at worst a large percentage 
of everything, works properly.
I make large use of binary packages on the production servers I run, and I 
recently encountered something "interesting".
Everything was built CHOST=i686-pc-linux-gnu, CFLAGS=--march=opteron, 
correctly on a dual Opteron. Those packages were then used to build an 
install on a pair of old dual P4 Xeon boxes (not the current Core Xeons), and 
everything worked fine (and continues to work fine).
It wasn't until I came to use those packages on a P3, where there were loads 
of "illegal instructions", which very nearly forced me to drive 45 miles to 
go fix it locally.
All of these are headless servers though, so naturally have no X or 
any "desktop" software. However, you're going the opposite way, an "old" 
instruction set, to a "new" one.

Basically, don't jump in to reinstalling, or rebuilding. Try it first, you 
might be pleasently surprised.

-- 
Mike Williams
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Hardware upgrade and Gentoo

2007-07-18 Thread Mick
On Wednesday 18 July 2007 20:38, Daniel da Veiga wrote:
> On 7/18/07, Dale <[EMAIL PROTECTED]> wrote:
> >  instead of two emerge --emptytree it would be faster to just nuke the
> > installation
> >
> >  I agree.  Just back up /etc, make a copy of your world file and any
> > other config files you may need and start from scratch.  At least then
> > you KNOW for sure where you started from and that something didn't get
> > missed somewhere.
> >
> >  Oh, don't forget /home either.
>
> I was just going to reply about that when you remind me I can keep the
> world file, and all the portage configs...
>
> Maybe I'll start from scratch then, copy the configs back and start an
> "emerge -uDN world" to get it all back, I guess this will save me some
> time, as I have all the tarballs from this two years at a network
> storage  using NTFS.

You could always set your flags as you need them for the new machine and the 
cross compile into a chroot.  Finally, tar your new chrooted fs, transfer it 
over to the new machine and untar.  That's the theory anyway.  I have not 
practised what I preach, but I'm sure it is described somewhere in the forums 
and Wiki.

Good luck.
-- 
Regards,
Mick


pgpbo2A6Q8suc.pgp
Description: PGP signature


Re: [gentoo-user] Hardware upgrade and Gentoo

2007-07-18 Thread Neil Bothwick
On Wed, 18 Jul 2007 20:37:34 +0200, Volker Armin Hemmann wrote:

> instead of two emerge --emptytree it would be faster to just nuke the 
> installation

Except you can continue to use the machine this way.


-- 
Neil Bothwick

Do not underestimate the power of the Force.


signature.asc
Description: PGP signature


Re: [gentoo-user] Hardware upgrade and Gentoo

2007-07-18 Thread Neil Bothwick
On Wed, 18 Jul 2007 19:49:00 +0200, Alex Schuster wrote:

> Another method, which I would use, would be to change your CFLAGS to
> what you would like for the new processor, but use mtune= instead of
> march=. This will also optimize for the cpu, but the code will run on
> any x86 CPU. emerge world --emptytree to re-compile everything, then
> switch your hardware. 

Recompiling everything is unnecessary, you only need to recompile those
packages that are necessary to get your system booting with the new
hardware. emerge -e system should do that, along with recompiling the
kernel. As long as you have a working toolchain, you can then recompile
anything important to you that fails to work on the new hardware before
resetting the CFLAGS and doing a background emerge -e world while getting
on with whatever you use the computer for.

Don't forget to set PORTAGE_NICENESS in make.conf before you emerge -e
world.


-- 
Neil Bothwick

Nymphomania-- an illness you hear about but never encounter.


signature.asc
Description: PGP signature


Re: [gentoo-user] Hardware upgrade and Gentoo

2007-07-18 Thread Daniel da Veiga

On 7/18/07, Neil Bothwick <[EMAIL PROTECTED]> wrote:

On Wed, 18 Jul 2007 19:49:00 +0200, Alex Schuster wrote:

> Another method, which I would use, would be to change your CFLAGS to
> what you would like for the new processor, but use mtune= instead of
> march=. This will also optimize for the cpu, but the code will run on
> any x86 CPU. emerge world --emptytree to re-compile everything, then
> switch your hardware.

Recompiling everything is unnecessary, you only need to recompile those
packages that are necessary to get your system booting with the new
hardware. emerge -e system should do that, along with recompiling the
kernel. As long as you have a working toolchain, you can then recompile
anything important to you that fails to work on the new hardware before
resetting the CFLAGS and doing a background emerge -e world while getting
on with whatever you use the computer for.

Don't forget to set PORTAGE_NICENESS in make.conf before you emerge -e
world.



I have read some docs that suggest what Mike said could happen to me,
because some intructions set are not compatible,  along with Neil
suggestion and Alex advice, I decided to recompile "system" with the
new "-mtune" instead of "-march" tonight. I'll just see if it works by
simply booting the new hardware and starting tunning.

If something goes wrong, I can always go with Neil and Dale suggestion
and start fresh, get /etc and /home, along with the world file, and
let portage do the hard work.

--
Daniel da Veiga
Computer Operator - RS - Brazil
-BEGIN GEEK CODE BLOCK-
Version: 3.1
GCM/IT/P/O d-? s:- a? C++$ UBLA++ P+ L++ E--- W+++$ N o+ K- w O M- V-
PS PE Y PGP- t+ 5 X+++ R+* tv b+ DI+++ D+ G+ e h+ r+ y++
--END GEEK CODE BLOCK--
--
[EMAIL PROTECTED] mailing list