Home
Name Modified Size InfoDownloads / Week
linux-ar7-2.6.19.2.bin 2007-03-31 804.4 kB
openwrt-runtime-SINUS154_DSL_BASIC_3-20080527.bin 2006-05-27 1.1 MB
openwrt-ar7-2.4-runtime-lzma-SINUS154_DSL_BASIC_3.bin 2006-05-20 1.1 MB
openwrt-ar7-2.4-runtime-lzma-SINUS154_DSL_BASIC_SE.bin 2006-05-20 1.1 MB
vmlinux.bz2 2006-05-13 624.1 kB
qemu-system-mipsel.bz2 2006-05-13 246.2 kB
qemu-ar7.tar.bz2 2006-05-13 1.4 MB
flashimage.bin.bz2 2006-05-13 585.3 kB
README 2006-05-13 2.6 kB
openwrt-ar7-2.4-kernel.raw 2006-01-06 508.9 kB
Totals: 10 Items   7.6 MB 1
Running Linux for AR7 in QEMU MIPS emulation
============================================

The QEMU MIPS emulation permits running AR7 firmware without
a real system. This package contains everything needed for a
first start under Linux (tested with Debian).



Filelist
--------

flashimage.bin		FLASH image with SQUASHFS (compressed filesystem)
qemu-ar7.tar.bz2	sources of patched QEMU
qemu-system-mipsel	precompiled QEMU
README			this file
vmlinux			precompiled Linux kernel

Put these files in one directory. The examples given below
are started from this directory.

The Linux kernel and SQUASHFS are based on OpenWrt.
Other distributions work, too.



How to run QEMU for AR7
-----------------------

Run QEMU from a command shell like this:

./qemu-system-mipsel -L . -kernel vmlinux -nographic

You should see the boot messages from the Linux kernel and get
a shell prompt after pressing ENTER.

You may also try the QEMU GUI like this:

./qemu-system-mipsel -L . -kernel vmlinux

If you want to connect a debugger to the emulated system, use

./qemu-system-mipsel -L . -kernel vmlinux -s -S

See the QEMU documentation (part of the sources) for more options.



How to compile QEMU for AR7 (not needed for first try)
---------------------------

Unpack the patched QEMU sources, change into directory qemu,
configure and compile with

./configure --cc=gcc-3.3 --target-list=mipsel-ar7-softmmu
make



How to test other firmware
--------------------------

The emulation uses several locations for the firmware to run:

* mips_bios.bin
  This file is optional. It is a binary image of the firmware
  in the AR7 internal ROM (located at 0x1fc00000).

* flashimage.bin
  This file is a binary image of the FLASH. 2 MiB and 4 MiB flash were tested
  with images from different AR7 based routers.
  You will need this file if your kernel wants a filesystem in FLASH,
  but also if you want to test bootloaders.

* vmlinux
  This is an elf image of the kernel to run. If you have a full flashimage
  (one with bootloader and kernel), vmlinux is optional.



What works, what does not work
------------------------------

AR7 hardware is only emulated partially. Only the serial ports work nearly
fully (they emulate a 16450 instead of 16550).

Ethernet hardware emulation is partially available, but still not usable.

There is a rudimentary flash emulation, so Linux detects a 4 MiB Intel flash.



Useful links
------------

http://ar7-firmware.berlios.de/
http://www.linux-mips.org/wiki/AR7
http://openwrt.org/


Have fun!

(C) Copyright 2006 Stefan Weil

2006-05-12
Source: README, updated 2006-05-13