From Openmoko

Jump to: navigation, search


Archlinux on ARM:

We moved here: LINK). This page is probably outdated.


Needed packages:

  • sbox2
  • qemu
  • crosstool-ng (for building the toolchain)

Toolchain for cross-compiling

yaourt -S crosstool-ng-svn
  • Make a directory for building the toolchain
mkdir ~/toolchain-build
cd ~/toolchain-build
  • Copy the configuration for Arch Cross Toolchain
wget LINK)
  • Now you can change the settings with command
ct-ng menuconfig
  • And build it with
ct-ng build

If you used default settings, you should now have the toolchain in the directory "arm-unknown-linux-gnueabi" in your home directory



"Scratchbox 2 is a cross-compilation engine".

tar xjf sbox2-
cd sbox2-
./configure && make && sudo make install


pacman -Sy qemu

(should be 0.10, for 0.9 read this:

Setting up Scratchbox buildroot

If you changed the paths from toolchain configuration, you need to change these commands too

cp -R ~/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sys-root/ ~/arch-arm-buildroot
cd ~/arch-arm-buildroot
sb2-init -c "/usr/bin/qemu-arm" arm ~/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc

Preparing Arch Build System


After all copy build tree to buildroot:

cp -R /var/abs/ ~/arch-arm-buildroot

Now customize your makepkg.conf:

cp /etc/makepkg.conf ~/.makepkg.conf

Edit file ~/.makepkg.conf, change:

CFLAGS="-march=armv4t -mtune=arm920t -O2 -pipe"
CXXFLAGS="-march=armv4t -mtune=arm920t -O2 -pipe"
PACKAGER="me <>"

read more here:

Compiling packages

All packages in repository:

cd ~/arch-arm-buildroot
mkdir pkgs
makeworld --clean --ignorearch --syncdeps --rmdeps --noconfirm pkgs/core abs/core/

One package, from PKGBUILD:

cd ~/arch-arm-buildroot
cd mypackage
makepkg -A

(where "-A" means ignore architecture)

Installing missing dependencies

(well.. You have to build them first :P).

cd ~/arch-arm-buildroot
tar xzf pkgs/$REPO/$PACKAGE
#maybe pacman --root=~/arch-arm-buildroot -U pkgs/$REPO/$PACKAGE or something..

Synchronizing your repo

todo: How we will share? rsync / svn / git / some kind of web gui? What is better for big binary files?

hiciu's repository browser:


  • Part I: Make packages from base and base-devel groups with scratchbox: 101 / 171
    • install them on qemu-arm machine: 0 / 1
  • Part II: rebuild all packages from "core" repository using Arch on qemu-arm machine 0 / 171
  • Part III: make qemu image with Arch on armv4t (for compiling, packaging, etc.), install Arch on GTA02: 0 / 2


Who's involved?

  • YourNameHere!
  • hiciu - responsible for making qemu image with Arch on arm
  • Beini - Most likely helping with PKGBUILDs, installer script, etc. whatever I'm capable of doing ;)


  • Installer script could be just `pacman -Sy base --root /media/card --dbpath /media/card/... --config arm.conf`
Personal tools