Creating Filesystems

Since you are installing on a SSD that may very well queue its writes out of order, ext3 and other journaling filesystems designed for magnetic/write-in-order drives are generally a bad idea and may be very dangerous to use.
If you're using an old kernel, such as the original Fremantle kernel, you'll have to stick to ext2. If you are using a recent "power" kernel (or modern kernel), you can use ext4 without journal support.

I recommend making swap on an external MicroSD so when you destroy it, it can be replaced (unlike the internal one).

Mounting

Due to Maemo using the FHS /media for other partitions, I chose to use it for the Gentoo mount too. You can use Gentoo's standard /mnt here if you want, I think.

mount -t ext2 /dev/mmcblk0p5 /mnt/gentoo

Installing Gentoo

Be sure your system clock is correct before proceeding. Weird things happen when it's not.

Download the latest armv7a_hardfp stage3 from Gentoo, or, if you want to run the softfp ABI (still hardware-accelerated) for some reason (like better binary compatibility with Maemo), you can use the armv7a stage3. Note that I only run hardfp, so can't support problems specific to the softfp ABI and don't provide prebuilt binary packages for it.

Just in case, download the .DIGESTS file too, and verify your download with:

CHOST="armv7a-hardfloat-linux-gnueabi"
CFLAGS="-O2 -pipe -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard"
CXXFLAGS="${CFLAGS}"
ASFLAGS="-mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard"
# Distcc is a good idea, if you setup a cross-compiler on another Gentoo system
FEATURES="${FEATURES} distcc"
# MAKEOPTS -jN should probably be the number of systems in your distcc array; but never more than 2 when building KDE software (meinproc uses a lot of memory and won't be distributed)!
MAKEOPTS="-j2"
# Since the N900 doesn't have a lot of RAM, you'll probably need to sacrifice some CPU time to minimize memory usage
LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
CFLAGS="${CFLAGS} --param ggc-min-expand=0 --param ggc-min-heapsize=32768"
PORTAGE_NICENESS="10"
PORTAGE_IONICE_COMMAND="ionice -c 3 -p \${PID}"
PORTAGE_BINHOST="http://luke.dashjr.org/programs/gentoo-n900/packages/hardfp/gcc45/"
EMERGE_DEFAULT_OPTS="--getbinpkg y"

Configure timezone

Booting

Configuring your kernel

If you just want to use your Maemo kernel, simply copy /lib/modules/* from your Maemo partition into Gentoo (you'll need to exit the chroot first).

However, if you want to build one yourself (required for any custom kernel modules, or non-X11 console), follow these steps:

emerge fremantle-power-sources # regular fremantle-sources is also available
cd /usr/src/linux
make menuconfig
# (configure the kernel as you like here)
make && make modules_install
# (copy arch/arm/boot/zImage to your host system to flash as the N900's kernel)

Note that this kernel will not boot Maemo without setting up the modules on the Maemo partition. I believe this is as simple as copying the directory and running depmod on that side, but I'll have to review it before I'm sure.

Sound setup

This basically "just works", but be careful when unmuting - it's possible to play audio that destroys the internal speakers! If you're experienced in writing highpass filters, please contact me to help resolve this.

Bluetooth setup

It's on my todo list, but not very high priority since I don't really use anything Bluetooth...

GPS setup

I've reverse engineered the cellmo GPS protocols, and written a NMEA proxy that mostly works with gpsd. When I get to properly integrating GPS support, I plan to write an actual gpsd driver so a proxy isn't needed.

Known issues

Webkit linking memory usage

WebKit requires an absurd amount of memory to link. I build binary packages inside qemu when it needs to be bumped. I suggest you use them.