Editing Gentoo/N900
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
This is the official page for the unofficial port of Gentoo to N900 internet tablets. | This is the official page for the unofficial port of Gentoo to N900 internet tablets. | ||
- | If you have any questions/troubles, you can find | + | If you have any questions/troubles, you can find me on freenode [irc://chat.freenode.net/maemo #maemo] and [irc://chat.freenode.net/gentoo-embededded #gentoo-embedded] ([http://webchat.freenode.net/?channels=%23Maemo,%23Gentoo-Embedded webchat]). |
'''Bootable with X, WiFi, SMS, and GPRS''' | '''Bootable with X, WiFi, SMS, and GPRS''' | ||
Line 62: | Line 62: | ||
/dev/mmcblk0p4 : start= 4194368, size= 52436992, Id= 5 | /dev/mmcblk0p4 : start= 4194368, size= 52436992, Id= 5 | ||
/dev/mmcblk0p5 : start= 4194384, size= 20971568, Id=83 | /dev/mmcblk0p5 : start= 4194384, size= 20971568, Id=83 | ||
- | /dev/mmcblk0p6 : start= 25165968, size= 31465392, Id=83 | + | /dev/mmcblk0p6 : start= 25165968, size= 31465392, Id=83</blockquote> |
If you're more conforable with standard Linux fdisk, [https://garage.maemo.org/plugins/wiki/index.php?RepartitionInstructions&id=1382&type=g supposedly] [http://archive.debian.org/debian/pool/main/u/util-linux/util-linux_2.13.1.1-1_armel.deb the deb from Debian Lenny] works. | If you're more conforable with standard Linux fdisk, [https://garage.maemo.org/plugins/wiki/index.php?RepartitionInstructions&id=1382&type=g supposedly] [http://archive.debian.org/debian/pool/main/u/util-linux/util-linux_2.13.1.1-1_armel.deb the deb from Debian Lenny] works. | ||
Line 70: | Line 70: | ||
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. | 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 | + | 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). | I recommend making swap on an external MicroSD so when you destroy it, it can be replaced (unlike the internal one). | ||
Line 84: | Line 84: | ||
Be sure your system clock is correct before proceeding. Weird things happen when it's not. | Be sure your system clock is correct before proceeding. Weird things happen when it's not. | ||
- | Download [http://distfiles.gentoo.org/ | + | Download [http://distfiles.gentoo.org/releases/arm/autobuilds/current-stage3-armv7a_hardfp/ 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 [http://distfiles.gentoo.org/releases/arm/autobuilds/current-stage3-armv7a/ 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: | Just in case, download the .DIGESTS file too, and verify your download with: | ||
- | + | sha1sum -c *.DIGEST | |
Now, proceed to unpack the stage3: | Now, proceed to unpack the stage3: | ||
Line 97: | Line 95: | ||
Configure your compile options (/media/gentoo/etc/portage/make.conf) next. | Configure your compile options (/media/gentoo/etc/portage/make.conf) next. | ||
- | Recommended (only safe to use unmodified for | + | Recommended (only safe to use unmodified for hardfp ABI!): |
- | CHOST="armv7a-hardfloat-linux- | + | CHOST="armv7a-hardfloat-linux-gnueabi" |
- | + | CFLAGS="-O2 -pipe -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard" | |
- | CFLAGS="-O2 -pipe -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard | + | |
CXXFLAGS="${CFLAGS}" | CXXFLAGS="${CFLAGS}" | ||
- | ASFLAGS="-mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard | + | ASFLAGS="-mcpu=cortex-a8 -mfpu=neon -mfloat-abi=hard" |
# Distcc is a good idea, if you [http://www.gentoo.org/doc/en/cross-compiling-distcc.xml setup a cross-compiler on another Gentoo system] | # Distcc is a good idea, if you [http://www.gentoo.org/doc/en/cross-compiling-distcc.xml setup a cross-compiler on another Gentoo system] | ||
Line 111: | Line 108: | ||
# Since the N900 doesn't have a lot of RAM, you'll probably need to sacrifice some CPU time to minimize memory usage | # 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" | LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" | ||
- | |||
CFLAGS="${CFLAGS} --param ggc-min-expand=0 --param ggc-min-heapsize=32768" | CFLAGS="${CFLAGS} --param ggc-min-expand=0 --param ggc-min-heapsize=32768" | ||
PORTAGE_NICENESS="10" | PORTAGE_NICENESS="10" | ||
PORTAGE_IONICE_COMMAND="ionice -c 3 -p \${PID}" | 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" | ||
===Chroot=== | ===Chroot=== | ||
Line 129: | Line 128: | ||
===Install and configure the Portage tree, with N900 overlay=== | ===Install and configure the Portage tree, with N900 overlay=== | ||
emerge --sync --quiet | emerge --sync --quiet | ||
- | + | emerge layman | |
- | + | layman -a n900 | |
- | + | rm /etc/make.profile | |
- | + | ln -s /var/lib/layman/n900/profiles/default/linux/arm/10.0/n900/ /etc/make.profile | |
- | + | ||
===Configure timezone=== | ===Configure timezone=== | ||
- | |||
ls /usr/share/zoneinfo | ls /usr/share/zoneinfo | ||
+ | cp /usr/share/zoneinfo/UTC /etc/localtime | ||
echo "UTC" > /etc/timezone | echo "UTC" > /etc/timezone | ||
- | + | ||
==Booting== | ==Booting== | ||
===Configuring your kernel=== | ===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) | + | 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: | 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 | + | emerge fremantle-power-sources # regular fremantle-sources is also available |
cd /usr/src/linux | cd /usr/src/linux | ||
make menuconfig | make menuconfig | ||
Line 156: | Line 154: | ||
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. | 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. | ||
- | + | You can skip the compiling (but you still need to install the sources!) if you want, by using [http://luke.dashjr.org/programs/gentoo-n900/kernels/ one of my prebuilt kernels]. | |
- | + | ||
+ | ===Configuring your system etc=== | ||
The following steps from Gentoo's official handbook are just fine here: | The following steps from Gentoo's official handbook are just fine here: | ||
- | * [ | + | * [http://www.gentoo.org/doc/en/handbook/handbook-arm.xml?part=1&chap=8 Configuring your System] |
- | + | * [http://www.gentoo.org/doc/en/handbook/handbook-arm.xml?part=1&chap=9 Installing Necessary System Tools] | |
- | * [ | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
===Installing N900-required stuff=== | ===Installing N900-required stuff=== |
Learn more about Contributing to the wiki.