Hamid Fadishei's Blog

October 13, 2012

Emulate OLinuxino Archlinux Image

Filed under: Uncategorized — fadishei @ 11:14 pm
Tags: , , , ,

OLinuxino is getting more and more popular for offering a good price-performance-size tradeoff. Archlinux now officially supports OLinuxino which means you have access to many prebuilt packages (openjdk, multimedia recorders and players, web servers, etc, etc) ready to be installed by the ‘pacman’ command.
A problem that you may still face as a developer is that due to the limited board resources, compiling programs and building new packages consumes lots of time, if possible at all.
If you want to use the power of your PC in develping for OLinuxino you can either setup a cross compilation environment or an emulation environment. In this post I describe an easy method for emulating the official Archlinux image of OLinuxino.

1. Download kernel, initrd, and filesystem provided by aurel32 for debian emulation from here
kernel: vmlinuz-2.6.32-5-versatile
initrd: initrd.img-2.6.32-5-versatile
filesystem image: debian_squeeze_armel_standard.qcow2

2. mount the first partition of debian_squeeze_armel_standard.qcow2 in /mnt (see here if you don’nt know how)

3. backup /mnt/lib/modules/* somewhere safe, then remove all the files in /mnt

4. extract the official OLinuxino Archlinux filesystem as root into /mnt

5. restore the the backup modules/* folder into /mnt/usr/lib/modules

6. Adjust the filesystem for changes posed by the emulation environment, such as:
change ttyAMA0 to tty1 in /mnt/etc/inittab
change usb0 to eth0 in /etc/rc.conf

7. unmount debian_squeeze_armel_standard.qcow2 and rename it to archlinux_olinuxino.qcow2

8. startup your emulated environment:
sudo qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.32-5-versatile -initrd initrd.img-2.6.32-5-versatile -hda archlinux_olinuxino.qcow2 -append “root=/dev/sda1”

Create a free website or blog at WordPress.com.