Monday, April 6, 2015

Building qemu for arm architecture

Obtaining qemu source code

This is quite simple task. Just go to qemu homepage and get latest tarball. Other way is to clone qemu repository:
 git clone git://git.qemu-project.org/qemu.git
This command should fetch whole qemu repository into qemu directory. In case git clone you should switch to desired version which will be marked with appropriate tag. E.g.:
git checkout -b v2.3.0-rc2 v2.3.0-rc2
This command will create new branch (v2.3.0-rc2) from specified tag (v2.3.0-rc2) and automatically switch into it. Personally I prefer the git-way because I can track every changes I made in qemu source code.

Building

Requirements:
  • gcc compiler
  • GNU make
  • libfdt
  • ... [TODO: fill this list]
Building is simple, but first we need to choose whether we want to install qemu for whole system or just for current user. In second case we should prepare some directory in our home for additional software, in my case this directory will be ~/opt. Now, we should run configure script as follows:
./configure --target-list="arm-linux-user arm-softmmu" --prefix=$HOME/opt
If you want to install qemu for everyone in the system just omit --prefix argument. Now simply run make command followed by make install:
make && make install
Done! 

No comments:

Post a Comment