なんだこれは

はてなダイアリーから移転しました。

せっかくなので qemu で Raspberry PI の仮想環境を整備したい

http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/ にある手順にしたがって、 Macqemuを使って Raspberry PIエミュレータ環境を整備することにした。


ところが 仮定(Assumptions) に qemu - Linux or Windows とある。これは、まあ、なんとかなるだろう。次に、disk image をとってくるとある。http://www.raspberrypi.org/downloads/ には Raspbian というのがあったので、これをDownload することにした。

qemu はどうするかというと、Macport をつかっているので、そのままインストールする。ARMなので、target_arm は必須だろう。

他は、まあ好みなのかもしれないが ssh 接続できたはずだし VNC もどこかでみたような気がしたので追加することにした。

sudo port info qemu

qemu @2.1.2 (emulators)
Variants: [+]cocoa, curses, ssh, target_alpha, target_arm,
target_cris, [+]target_i386, target_lm32, target_m68k,
target_microblaze, target_mips, target_or32, target_ppc,
target_s390x, target_sh4, target_sparc, target_unicore32,
[+]target_x86_64, target_xtensa, [+]usb, vde, vnc

Description: QEMU is a generic and open source machine emulator. It can
run OSes and programs made for one machine on a different
machine. By using dynamic translation, it achieves very
good performance.
Homepage: http://qemu.org

Build Dependencies: texinfo, libtool, pkgconfig, python27
Library Dependencies: curl, glib2, zlib, libpixman, libusb
Platforms: darwin
License: GPL-2+
Maintainers: raimue@macports.org, openmaintainer@macports.org

とりあえずインストールはこれでいいはず。

sudo port install qemu +ssh +target_arm +vnc

ちょっと試してみよう。

/opt/local/bin/qemu-system-arm -cpu ?

No machine specified, and there is no default.
Use -machine help to list supported machines!

machine を指定しないとだめ? versatilepb で CPU が arm1176 の環境のエミュレーションが必要なはず

/opt/local/bin/qemu-system-arm -M versatilepb -cpu help

Available CPUs:
arm1026
arm1136
arm1136-r2
arm1176
arm11mpcore
arm926
arm946
cortex-a15
cortex-a8
cortex-a9
cortex-m3
pxa250
pxa255
pxa260
pxa261
pxa262
pxa270-a0
pxa270-a1
pxa270
pxa270-b0
pxa270-b1
pxa270-c0
pxa270-c5
sa1100
sa1110
ti925t

おっとダウンロードがおわる前に時間がきてしまった。今日はここまで。