into the void

ソフトウェアに関する雑多な調査日記

qemu上でDebian on ARM (armhf) を動かす

qemu上でARMv7(hardfloat)環境をエミューレートして、その上でDebian Linuxを動かしてみる。
qemuを動かす環境はVMWare上のUbuntu14.04。

まずはqemuをインストール。

$ sudo apt-get install qemu

次に ARM用のqemuイメージを下記のサイトからダウンロードしてくる。
カーネルイメージとinitrdイメージと、rootfsイメージ。
https://people.debian.org/~aurel32/qemu/armhf/

$ wget https://people.debian.org/~aurel32/qemu/armhf/debian_wheezy_armhf_standard.qcow2 .
$ wget https://people.debian.org/~aurel32/qemu/armhf/initrd.img-3.2.0-4-vexpress .
$ wget https://people.debian.org/~aurel32/qemu/armhf/vmlinuz-3.2.0-4-vexpress .

実行。

qemu-system-arm -M vexpress-a9 -kernel vmlinuz-3.2.0-4-vexpress -initrd initrd.img-3.2.0-4-vexpress -drive if=sd,file=debian_wheezy_armhf_standard.qcow2 -append "root=/dev/mmcblk0p2"

サクッと起動した。なぜかネットワークも使えて、apt-getもいける。

qemuwikiに書いてあった。
Documentation/Networking - QEMU

ホストと相互に通信したい場合は、bridgeの設定が必要。また今度やる。