NOTE: It's not perfect, but you should be able to get started with this!
By following this tutorial you should end up with fully functional Arch Linux OS on your O2 Joggler powered by Gnome technologies.
This tutorial is heavily based on information found in other tutorials written in Joggler Wiki and assumes that you have actually installed Arch Linux before at least once.
You will need a USB stick at least 4GB in size. Don't forget to make backups before you begin!
Installing Arch Linux base system into the USB stick
Perhaps the easiest way to accomplish this is to start up a virtual machine.
Using Virtual Box (non-OSE version) is preferred. Just get Arch Linux [install iso], plug your USB stick into the computer, set Virtual Box to let the virtual machines to see the USB device, create new virtual system and start up the installation.
Do NOT install the boot loader, we are using our own instead. Also the kernel26 kernel is useless, it does not support booting from EFI, so we are using our own kernel package.
While you are at it create a ms-dos partition table on the USB stick with two partitions: 32MB fat16 partition in the beginning of disk and make rest an ext3 partition.
Set the mount point for root(/) file system to be your ext3 partition.
After finishing the base installation shutdown the virtual machine, we are not using it anymore (unless you really want to), and replug your USB-stick.
If you haven't already, you can create the FAT16 file system on the first partition with following command (make sure you are writing to the right device and partition!):
mkdosfs -n efiboot /dev/sdX1
Setting up the EFI boot loader
After creating the file system, mount the partition to location of your choice and unpack the following archive into it: http://www.ighea.com/joggler/efi_fat16.tar.gz . The archive contains EFI boot loader set to load kernel and initrd image from the USB sticks second partition (our Arch Linux system root).
Installing more software and setting up the system
Chancing the Arch root file system label
Before anything else lets make mounting the root file system a little easier and change/set its label to "archroot" (once again, check the device and change it accordingly):
e2label /dev/sdX2 archroot
Mounting USB sticks second partition and chrooting into it
Now lets mount our root partition, bind some essential file systems and chroot into it:
mkdir -p /mnt/archroot mount /dev/sdX2 /mnt/archroot cd /mnt/archroot cp /etc/resolv.conf etc/ mount -o bind /proc proc/ mount -o bind /dev dev/ mount -o bind /dev/pts dev/pts mount -o bind /sys/ sys/ chroot . /bin/bash
Now you should be inside the Arch Linux we are going to set up for O2 Joggler.
Installing kernel (kernel26-joggler)
I have created a kernel package patched with all known patches and EMGD driver support for us all to enjoy. You can grab the PKGBUILD and files from AUR, but in this tutorial we are going to use prebuild package to make the installation much more painless.
Following command will download and install the kernel and the EMGD for you.
pacman -U http://www.ighea.com/joggler/kernel26-joggler-2.6.37-1-i686.pkg.tar.xz http://www.ighea.com/joggler/emgd/emgd-1.5.2-2-i686.pkg.tar.xz
Installing software packages
We are going to build some applications from AUR, so installing base-devel is recommended:
pacman -S base-devel
Yaourt - AUR the easy way
First we install AUR repository tool, yaourt, to make installing some packages from AUR much easier. Append following into the end of /etc/pacman.conf.
[archlinuxfr] Server = http://repo.archlinux.fr/i686
Lets refresh our package repositories and install yaourt:
pacman -Sy pacman -S yaourt
SSH, alsa, networkmanager, Gnome and friends
pacman -S openssh alsa-utils alsa-oss gnome gnome-terminal network-manager-applet gdm
Chromium and flashplugin
Maximizing the Internet experience!
pacman -S chromium flashplugin
You may also want to install chromeTouch extension for Chromium. It makes scrolling pages with only touch screen much easier.
pacman -S ttf-dejavu
Since the release of EMGD 1.5.2 we can finally use more up-to-date kernel and Xorg in our system. There's no really much point using the alternative solutions anymore.
- Works with Xorg 1.9.x
- +Provides useful 2D/3D hardware acceleration. Don't expect miracles.
- +Hardware accelerated video playback for some video formats.
- -Backlight can be only controlled manually through /sys/class/backlight/openframe-bl/.*
Lets install the xorg package group and basic input device drivers:
pacman -S xorg xf86-input-mouse xf86-input-keyboard xf86-input-evdev
If you installed the emgd package also with the kernel26-joggler you should be ready to go. The emgd package also includes pre-configured xorg.conf.
On-screen keyboard: onboard
I have tried various on-screen keyboards and in my opinion florence is the best so far. It is available in AUR so you can install it easily with:
yaourt --aur -S aur/florence
Setting up the system
Now it is good time to update the DAEMONS array in /etc/rc.conf to look like someting similar to:
DAEMONS=(syslog-ng joggler dbus hal networkmanager sshd crond alsa gdm)
Add acpi-cpufreq into MODULES, this will enable automatic CPU frequency scaling:
Also upgrade the JOGGLER_HWADDR to match your MAC ID or network hardware address. The value can be found behind your device. The joggler service will update the value for you automaticly on startup.
It is also a good idea to add sshd:ALL into /etc/hosts.allow so you can ssh into your system.
Change the /etc/fstab to match something similar to following:
# <file system> <dir> <type> <options> <dump> <pass> devpts /dev/pts devpts defaults 0 0 shm /dev/shm tmpfs nodev,nosuid 0 0 LABEL="archroot" / ext3 defaults,noatime 0 1 tmpfs /tmp/ tmpfs defaults,nr_inodes=1M,size=256M 0 0
You may notice that the filesystem checking on startup is disabled for the root filesystem. We are using the filesystem label archroot to mount our root so make sure it matches your setup if you have done something another way. Also, tmpfs is mounted to tmp to reduce wearing. Take note that the small size of used tmpfs filesystem might affect some applications that use /tmp/ to store lots of data (yaourt).
If you installed GDM add following into /etc/gdm/custom.conf to enable auto-login for user archuser. Remove pre-existing [daemon] text or replace the content.
[daemon] AutomaticLoginEnable=true AutomaticLogin=archuser
To get ALSA and its daemon happy run alsaconf once and smash some return key:
Adding normal user
If you have not set the root password now it is good time to do that:
Create the user archuser
Add the archuser into various groups:
usermod -a -G audio,video,network,wheel,adm,games,users,storage archuser
Exiting chroot environment
Exit the chroot when ready with "exit" and then clean up the mounts:
exit umount sys/ proc/ dev/pts/ dev/ cd .. umount /mnt/archroot rmdir /mnt/archroot
Now just plug your USB-stick into O2 Joggler and power it on! Enjoy!
Tips and Tricks
- Using Synergy to control your Joggler http://wiki.archlinux.org/index.php/Synergy
Run ntpdate when network interface comes up
O2 Joggler does not store time or date so we have to upgrade them every boot. Easiest way to accomplish this is using ntpdate and networkmanager magic. First install ntpdate, it can be found in package ntp:
pacman -S ntp
Create file /etc/NetworkManager/dispatcher.d/10ntpdate.sh with following content:
#!/bin/bash case "$2" in up) logger "Interface $1 $2, running ntpdate" /usr/bin/ntpdate pool.ntp.org & ;; *) ;; esac exit 0
and make it executable:
chmod +x /etc/NetworkManager/dispatcher.d/10ntpdate.sh
Try hardware accelerated video playback with mplayer-vaapi
Install special mplayer-vaapi with libva-1.0.1 and patches for gma500 enabled:
And play your h.264 videos:
mplayer -vo vaapi -va vaapi -ao alsa video.mp4
With some videos it works really well.