Gentoo Installation

If you consider yourself exclusively a computer user, this guide is not for you…

Because hacking the AC100 is still in progress, especially regarding kernels, partitioning and booting, this is not yet a step by step guide for installing Gentoo.

Portage overlay:

emerge layman
layman -a gentosh-ac100

See http://gitorious.org/gentosh-ac100/pages/Home for details

The overlay has ebuilds for managing the boot image evolution LED notification plugin possibly more after this list is not maintained anymore

emerge evolution-ac100-leds
emerge eselect-ac100boot

Kernel boot

The easiest solution is to compile a custom kernel and initrd. There have been improvements, but this particular description is now outdated. The rootfs is stored on an sd card. The author currently uses the original kernel image, in combination with a modified initrd: add busybox executable along with some symlinks to it edit init.rc config file so it only starts adbd (example attached)

TODO: mount root filesystem automatically and run custom startup script stored on root filesystem

TODO: create custom kernel and initrd

Repartitioning

The best solution involves repartitioning. This way, the rootfs can be big and there can be access to the boot image. For a script that automates the kernel install process, see http://gitorious.org/gentosh-ac100/pages/Home

Root filesystem

Untar a stage3 tarball and portage snapshot from a gentoo mirror from the adb shell:

mount -t auto /dev/mmcblk1p1 /storage
mkdir /storage/data
# copy the wifi firmware
cp /data/RT2870STA.dat /storage/data/
# if you want to insert the network module from inside the chroot
cp /system/lib/hw/rtnet*.ko /storage/root/
mount -o bind the /dev /storage/dev
chroot /storage /usr/bin/env -i TERM=xterm /bin/bash -l

In the chroot:

  • mount the devpts, proc and sysfs filesystem manually

Using adb to upload packages

As the device does not have access to the net, you wil need to use adb to copy the files into

  • /storage/usr/portage/distfiles/
ac100# emerge --pretend --fetchonly mypackage \
| sed -r '/^(ht|f)tp:\/\//{s/ +/\n/g;p};d'  \
>/emerge-urls
host$ mkdir downloads
host$ adb pull /storage/emerge-urls .
host$ xargs wget -nc -nd -P downloads <emerge-urls
host$ adb push downloads/* /storage/usr/portage/distfiles/
ac100# emerge mypackage

You might want to use -va for big builds, to check if everything was downloaded properly. (Download size should be 0)

Workarounds

Thumb vs. ARM

The Thumb instruction set is somewhat more limited, but more memory-efficient than the ARM set. Some packages do not compile when the Thumb instruction set is used. GLib may fail to build because of inline asm that is not supported in Thumb. GConf may also fail.

Use CFLAGS="-Os -pipe -mcpu=cortex-a9 -mfpu=vfpv3-d16 -mthumb-interwork -mfloat-abi=softfp" \
emerge -1 glib gconf # to emerge these packages (leave -mthumb out from CFLAGS)

Wifi improperly detected

HAL did not properly detect that ra0 is a wifi interface. Insert the attached file 10-ralink.fdi into /etc/hal/fdi/information/10-hacks/ to change ra0 into a wifi interface. The ralink driver in wpa supplicant did not seem to work properly. wext is known to work.

Permission problems

The android kernel provides security for apps by granting 'permissions'. Apps run with different user ids and their groups define their permissions. Your user will need to be in (numeric) groups: 1001 .. 1010 (inclusive), 3001 .. 3002 (inclusive)

This will enable network access and possibly more. Sound still requires root (TODO).

Screen blanking

The backlight can be turned off when gnome-screensaver is active. Make sure you have SSH or ADB shell access in case of an error.

  • Copy attached file gnome-screensaver-dialog.wrapper to /usr/libexec
  • Copy attached file blankscreend to /usr/local/bin
  • Install ec-test program in /usr/local/bin
chmod 755 /usr/libexec/gnome-screensaver-dialog.wrapper /usr/local/bin/blankscreend
mv /usr/libexec/gnome-screensaver-dialog /usr/libexec/gnome-screensaver-dialog.real
ln -s gnome-screensaver-dialog.wrapper /usr/libexec/gnome-screensaver-dialog

Add blankscreend to your gnome startup. Verify that it starts when you log in.

Battery status

Make sure you start nvrm_daemon before starting hal

TODO build custom kernel and initrd for installation on internal storage

Log In