Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Request help: x86 to AMD64 conversion
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
acerbix
n00b
n00b


Joined: 28 Apr 2003
Posts: 26
Location: Phoenix, AZ

PostPosted: Tue Dec 13, 2005 5:45 am    Post subject: Request help: x86 to AMD64 conversion Reply with quote

Hi,

I have a 32 bit gentoo install ("emerge -Du world" performed at least weekly) on a laptop with an athlon 3200+ processor: I would like to convert the install to 64bit. However, I am unable to find any guide or help on how to do that. Is it at all possible to "upgrade" an existing install to 64 bit, or do I have to scratch and rebuild? Is there any thread/link/reference I can use?

Currently I have:

CHOST="i686-pc-linux-gnu"
CFLAGS="-O3 -march=athlon-xp ..."

Thanks in advance
Back to top
View user's profile Send private message
Gentee
n00b
n00b


Joined: 13 Dec 2005
Posts: 5

PostPosted: Tue Dec 13, 2005 10:26 am    Post subject: Reply with quote

I suggest you back up everything in /home (you can probably re-use it) and everything in /etc (*not* to restore completely, but just so that various files like xorg.conf can be copied back instead of re-typed) and any other bits and pieces you can think of...and then build a shiny new 64-bit system from scratch.

If you build the underlying system with the same desktop environment, applications and so on, then you should find that you can simply attach it to your old /home and all your menus, preferences, panels, mixer settings etc. will work as before. Of course, some things won't work quite as they did before (you'll need to install 32-bit binaries, or even a whole 32-bit chroot, to run OpenOffice or play certain 32-bit multimedia formats, macromedia flash and so on) but, depending on your particular setup, it shouldn't take nearly as long to get your 64-bit system fully configured as it did your original x86 system...simply because so much tuning and tweaking is likely to have gone into /home, which can be moved straight across.

Good luck!
Back to top
View user's profile Send private message
acerbix
n00b
n00b


Joined: 28 Apr 2003
Posts: 26
Location: Phoenix, AZ

PostPosted: Tue Dec 13, 2005 11:58 pm    Post subject: Which is the "community recommended" install appro Reply with quote

Hi,

The gentoo-wiki does not talk too much about a favored AMD64 install process. After a brief search, I was able to dig up livecd based install mechanisms (i.e ahorn type livecds) or the official livecd based install by using the handbook. However, I could not find an official AMD64 stage 3 image, only an athlon-xp based image. So I guess I am a bit stuck trying to figure out which way I should go.

Any recommendation will be greatfully accepted. I did try to search the forum for guidance before posting this, however, the search did not turn up anything helpful.

Thanks
Back to top
View user's profile Send private message
Isaiah
Guru
Guru


Joined: 25 Feb 2003
Posts: 359

PostPosted: Wed Dec 14, 2005 12:03 am    Post subject: Reply with quote

Easiest update from x86 to AMD64
Building a new AMD64 system
Glibc overlay with amd64 performance patches and more!
Good luck :wink:
Back to top
View user's profile Send private message
pgilbert
n00b
n00b


Joined: 03 Dec 2005
Posts: 17
Location: Ottawa

PostPosted: Wed Dec 14, 2005 4:20 am    Post subject: Reply with quote

Definitely start from scratch, but keep a few files around like xorg.conf. I just went through an attempt to convert and learned a lot, but had to start from scatch in the end. One problem is that all your binaries are 32 bit. Another is the the setup for the kernel config is not right, so you don't even seem to get the right questions in make menuconfig. You end up with a 32bit kernel and $HOSTTYPE=x86 rather than x86_64.

You might keep the 32 bit system on a separate partition if you have space.

If you have a fast Internet connection you can start with the instal-amd64-mininial CD and roughtly follow the Quick Install Reference but skip the stage tarball, unpack the portage tree straight from the net, pick mirrors, etc, then just do emerge --update --deep system in the chroot. Then emerge gentoo-sources and compile the kernel, grub, etc., all in chroot. This gets you to an up-to-date system immediately, rather than installing old stages from a CD and then updating.

I didn't try this, but you might copy your old /var/lib/portage/world to the new system and then do emerge --update --deep world, so you get right back to your old world setup. Has anyone tried this?
Back to top
View user's profile Send private message
acerbix
n00b
n00b


Joined: 28 Apr 2003
Posts: 26
Location: Phoenix, AZ

PostPosted: Wed Dec 14, 2005 6:23 am    Post subject: Thanks muchly... Reply with quote

Isaiah, thanks so much for the pointers... I am currently building the cross compiled kernel. Once that is done, I am guessing I need to boot into the new kernel, and then using the cross compiler, rebuild the toolchain and compiler, then using the rebuilt compiler rehost the compier. This is what I am thinking of doing:

USE Flags:
Code:

use flags
USE="amd64 nptl emul-linux-x86 ..."

chost
CHOST="x86_64-pc-linux-gnu"

cflags
CFLAGS="-O3 -march=k8 -mtune=k8 -fforce-addr -fomit-frame-pointer -ftracer -pipe"
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"


Build sequence:

Code:
# emerge gcc-config glibc binutils libstdc++-v3 gcc

<.. set appropriate gcc version using gcc-config, env-update and source /etc/profile ..>

# emerge glibc binutils libstdc++-v3 gcc portage

#emerge -e system && emerge -e system

<... check gcc-config to reconfirm  new compiler and prune old compiler ...>

#emerge -P gcc


Please let me know if this is wrong...

Thanks again
Back to top
View user's profile Send private message
pgilbert
n00b
n00b


Joined: 03 Dec 2005
Posts: 17
Location: Ottawa

PostPosted: Wed Dec 14, 2005 3:53 pm    Post subject: Reply with quote

Make sure you change the architecture and default settings for portage, determined by the sym link
/etc/make.profile -> /usr/portage/profiles/default-linux/arch/make.defaults/200x.x
and check emerge --info [--verbose].
Good luck, and let us know how it goes. You are about at the point I decided it was easier to start from scratch.
Back to top
View user's profile Send private message
Isaiah
Guru
Guru


Joined: 25 Feb 2003
Posts: 359

PostPosted: Thu Dec 15, 2005 1:09 am    Post subject: Re: Thanks muchly... Reply with quote

acerbix wrote:
Isaiah, thanks so much for the pointers...

You're welcome.
I built from scatch using most of that "glibc overlay" configuration stuff from nxsty.
His setup is rocking here. Lots of good info there.
I'd use it :wink:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 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