Saturday, 14 December 2013

ARM Assembly part 2 - Setting up a LAB

Posted by srini0x00 on 05:56

In this series of articles, we have started with the introduction to ARM. In this article let us setup a lab to start writing programs in ARM assembly. We could either set up a virtual environment on your system based on ARM architecture such as qemu, or you could buy an ARM based device such as RasberryPi.

Our focus is to set up a virtual lab environment with Qemu, rather than writing programs on a real hardware device.

What is Qemu?

QEMU (short for "Quick EMUlator") is a free and open-source hosted hypervisor that performs hardware virtualization. QEMU is a hosted virtual machine monitor: It emulates central processing units through dynamic binary translation and provides a set of device models, enabling it to run a variety of unmodified guest operating systems.

Simply put, it is an emulator which acts as a CPU.  Qemu supports ARM, PowerPC, MIPS and even x86 emulation.

Steps to be followed

Lets begin with setting up a lab.

Step 1: Download Qemu .

We can download Qemu from its official website - http://wiki.qemu.org/Download

Step 2: Install all the dependencies before installing Qemu.

We can use the following command to install dependencies.

$apt-get build-dep qemu

Step 3: Run the configuration script, to build Qemu for ARM processor.

Extract the downloaded Qemu archive and navigate to the qemu directory.  in my case, it is as shown below.

$cd qemu-1.7.0

Run the commands shown below

$./configure --target-list=arm-softmmu
$make
$sudo make install

Step 4: Create an ubuntu disk image of 10GB

$qemu-img create ubuntu.img 10G

The next step is to install Ubuntu (ISO image in my current working directory)

$qemu -hda ubuntu.img -cdrom ubuntu-12.04.3-desktop-i386.iso -m 512 -boot d

From here, follow the same installation steps you would use on a real machine.
Once installed, you could boot the created virtual environment with the following command.

$qemu -m 512 -hda ubuntu.img

Drop an email at srini0x00@gmail.com if you face problems in setting up the lab, so that I can write other ways of doing it or probably make a video of the whole process.

Kindly Bookmark and Share it:

0 comments :

Post a Comment

 

Recent posts

Recent Comments

Bookmark & Share