I was just looking over gentoo.org, trying to find out how to port the different stages (at least stage 1) to another architecture (m68k), but couldn't find this information anywhere (maybe I'm just blind). Could someone point me to the right direction?

I would start with trying to compile the non-Python bits of Portage, which are notably libsandbox and the missingos Python extension. The source code to Portage is contained in /usr/portage/sys-apps/portage/files/ on a Gentoo system, or that can be extracted out of a portage tree snapshot from http://cvs.gentoo.org/snapshots/._________________For every higher wall, there is a taller ladder

Here is how I am doing it (working on MIPS based (MIPSEL, to be exact)) and here is the steps I have taken thus far to get it working:

First off have a semi-modern working distrobution that you are developing on. (The first mistake I made was trying to get things to work on a Linux 2.0 kernel with very old libraries. Not a good idea.)

Second, I got a copy of Python 2.2 compiled for the machine.

Third, is to get a copy of portage installed on your machine. I looked at the portage ebuild file to figure out how to install it and where the different parts should go. Once the portage files are resting happily in thier correct directories, run an emerge rsync. I ran into a problem with this right off the bat, and had to make a small comment in the code for it to work. Sorry I dont remember it off the top of my head, but it had to do with trying to free a variable "x" that hadent been used. If you get some error like this let me know I can probbably talk you through it.

Fourth DONT RSYNC again.... (at least not for now, any changes you make will be erased if you do). Go into the /usr/portage/profiles directory and create a new directory for your architechture (in my case I created a default-mipsel-1.4 directory) Copy the files from one of the other profile directories into your newly created one and start editing....

Fifth, create a new "root" directory for your new system (in my case I created a /u01/gentooroot directory). Set ROOT=<your new gentoo root> and export it. After that you will need to start editing the ebuild files ... I found that if you editied the "Keyword" entry in each of the e-build files and added your architecture name to them, that you could get the files to build.

I found that after doing this, and then doing an emerge -p portage, and editing the ebuilds for each of the requirements specified that I was able to get a system to "emerge". I am still in the early stages of this, (it takes a while to build on a 250MHz MIPS processor) but I will be more than happy to help answer any questions if I can.

--NOTE-- I don't know if this is the correct way to do this, I will not be held responsible if you fsck your system, or if all the work you do is in vain and never works ... etc... etc.... etc...

Hmm, I will definitely have to pay attention to this thread. I won an eBay auction for a second-hand SGI Indigo2 R4600 machine, and I plan on trying to give linux a shot on it. I guess I'll have to also start off with debian's mips port and see if I can get gentoo's portage system running....Should be interesting, to say the least.

I just started yesterday with making a gentoo for my Indy, before i discovered some valuable info here in the forums ;)

Now I'm thinking about trying to automatize the process to simplify it for not only ourselves but those that come after us.
This process is obviously not easy (if possible) to fully automatize, but alot can be done - with building a boot-image, a stage1-system, and some scripts to automatize updating KEYWORD in the ebuilds.
This, accompanied with info on how to get a working kernel and a bootable medium (floppy,cdrom,tftp) - future porting should be way easier..

Step by step cross compile would also be nice. (so you can compile on a fast mechine and cross it over to a slow one)_________________I'm so small, I can fit under the door.
I was here yesterday, this is a recording.

I'm wondering if the code base is currently set up to make cross compiling straightforward.

If there are existing scripts for building the CD images and the tarballs, I'm wondering where
they can be found.

It certainly is feasible to build for any architecture on any architecture; gcc certainly can handle that, and it should be possible to build a disk on one paltform, and then boot off it
on another.

it's even possible that it could be done with a combination of cflags and path tricks; just a matter of keeping the current runtime from tripping over the new builds.

I'd like to try to do it, and would like to know how to buiild the CD's for some cross platform testing. It would be straiightforward from there to be able to build a binary install CD, that just dumps the stage 3 tarball. I already have some code that might be useful here.

...emerge rsync. I ran into a problem with this right off the bat, and had to make a small comment in the code for it to work. Sorry I dont remember it off the top of my head, but it had to do with trying to free a variable "x" that hadent been used. If you get some error like this let me know I can probbably talk you through it.

:]

I'm trying to get gentoo on working on my Netwinder(ARM). I've got Debian 3.0 installed, and semi-successfully got portage working. I'm having two problems.

1) there is a problem calculating dependencies.

Code:

Calculating dependencies \
!!! all ebuilds that could satisfy ">=sys-libs/ncurses-5.2-r2" have been masked.
!!! (dependency required by "app-editors/joe-2.9.5" [ebuild])

!!! Error calculating dependancies. Please correct.

2) emerge has trouble wget-ing packages, which seems to have to do with ${x} in portage.py. When getting sources, emerge complains: