OpenWRT under Qemu on FreeBSD

Inspired by this post, I decided to try running OpenWRT under Qemu on FreeBSD. In particular, ARM versions of OpenWRT’s Attitude Adjustment r29537 (December 2011) and r34778 (December 2012) as Qemu 1.1.1 virtual machines on FreeBSD 8.3-STABLE (r242546). I focused on Qemu 1.1.1 because that was the current latest version of Qemu in the FreeBSD Ports tree as of December 2012.

Overview

Building a MIPS image of OpenWRT and running it under Qemu has already been noted here. I was thus inspired to explore whether OpenWRT’s Qemu-compatible ARM image would likewise be easy to get running under Qemu 1.1.1.

Short version? Yes. Build OpenWRT’s “ARM Ltd. Realview board (qemu)” Target System and you can run it under Qemu’s “-M realview-pbx-a9” and “-M realview-eb-mpcore” virtual machines.

OpenWRT build environment

My OpenWRT build environment is itself an Ubuntu Server 10.04 virtual machine (VM), initially created for CAIA’s Diffuse4OpenWRT project (download the ~382MB VirtualBox .ova file here, and installation/use instructions here).

CAIA’s Ubuntu VM image comes with OpenWRT Attitude Adjustment (r29537) pre-installed (under ~/openwrt). I also downloaded OpenWRT Attitude Adjustment r34778 (December 19th 2012) separately under ~/newopenwrt (using the svn checkout steps described here).

Building a new Qemu-compatible ARM instance of OpenWRT Attitude Adjustment r34778

I tested Attitude Adjustment r34778 because it was recent, and Attitude Adjustment r29537 to see if CAIA’s Diffuse4OpenWRT project could be trialled as-is under Qemu. All the discussion below applies equally (except where noted) to the Qemu-compatible ARM images built under both Attitude Adjustment r29537 and r34778. I will document the specific outputs observed with r34778.

Run ‘make menuconfig’ to build the “ARM Ltd. Realview board (qemu)” as the Target System, with Target Image set to Ramdisk.

diffuse@diffuse:~$ cd newopenwrt/attitude_adjustment/
diffuse@diffuse:~/newopenwrt/attitude_adjustment$ make defconfig
  [...]
diffuse@diffuse:~/newopenwrt/attitude_adjustment$ make prereq
diffuse@diffuse:~/newopenwrt/attitude_adjustment$ make menuconfig
  [...Selected "ARM Ltd. Realview board (qemu)" as Target System, with
	all other settings left as defaults (in particular, Target Image
	is set to Ramdisk) ...]

Now make the actual target:

diffuse@diffuse:~/newopenwrt/attitude_adjustment$ make
  [..blah...may take an hour+ if complete toolchain build required, or much
	faster if incrementally adding/removing options...]
diffuse@diffuse:~/newopenwrt/attitude_adjustment$
diffuse@diffuse:~/newopenwrt/attitude_adjustment$

The result we care about is the ramdisk-resident kernel image openwrt-realview-vmlinux.elf which the OpenWRT build environment stores under ~/newopenwrt/attitude_adjustment/bin/realview/

diffuse@diffuse:~/newopenwrt/attitude_adjustment$ ll ~/newopenwrt/attitude_adjustment/bin/realview/
total 1448
drwxr-xr-x 3 diffuse diffuse    4096 2013-01-06 09:02 ./
drwxr-xr-x 3 diffuse diffuse    4096 2013-01-06 08:46 ../
-rw-r--r-- 1 diffuse diffuse      63 2013-01-06 09:02 md5sums
-rwxr-xr-x 1 diffuse diffuse 1459792 2013-01-06 09:02 openwrt-realview-vmlinux.elf*
drwxr-xr-x 2 diffuse diffuse    4096 2013-01-06 09:02 packages/
diffuse@diffuse:~/newopenwrt/attitude_adjustment$

Booting openwrt-realview-vmlinux.elf under Qemu’s realview-pbx-a9 machine

After some trial and error I can say that Qemu’s emulated “ARM RealView Platform Baseboard Explore for Cortex-A9” (realview-pbx-a9) system seems to work.

I copied openwrt-realview-vmlinux.elf to a FreeBSD 8.3-STABLE host that has Qemu 1.1.1 installed (actually the December 2012 qemu-devel Port installed inside a FreeBSD Jail configured to allow qemu networking to the outside world).

Launch qemu, giving the virtual machine 128Mbyte RAM and requesting the emulated serial console be on TCP port 4000. Qemu’s system emulation actually begins as soon as an external process (such as telnet or nc) connects to local TCP port 4000 — this becomes the serial console port as far as OpenWRT is concerned.

% qemu-system-arm -M realview-pbx-a9 -kernel openwrt-realview-vmlinux.elf -nographic -m 128 -net nic -net tap -nographic -serial tcp::4000,server
QEMU waiting for connection on: tcp:0.0.0.0:4000,server
	  [Once I connect to port 4000 from a different host, the qemu console spits out the following...]
oss: Could not initialize DAC
oss: Failed to open `/dev/dsp'
oss: Reason: No such file or directory
oss: Could not initialize DAC
oss: Failed to open `/dev/dsp'
oss: Reason: No such file or directory
audio: Failed to create voice `lm4549.out'
QEMU 1.1.1 monitor - type 'help' for more information
(qemu) l2x0_priv_write: Bad offset 900
l2x0_priv_write: Bad offset 904

(qemu)

Once the emulation starts, qemu console reports two “Bad offset” errors (which are not reported when emulating the same realview-pbx-a9 under Attitude Adjustment r29537), but otherwise the emulated OpenWRT system appears to boot just fine!

 [gja@gjadesktop] ~% nc 10.1.1.10 4000
 Uncompressing Linux... done, booting the kernel.
 [ 0.000000] Booting Linux on physical CPU 0
 [ 0.000000] Linux version 3.3.8 (diffuse@diffuse) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 SMP Sun Jan 6 09:02:37 EST 2013
 [ 0.000000] CPU: ARMv7 Processor [410fc090] revision 0 (ARMv7), cr=10c53c7d
 [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
 [ 0.000000] Machine: ARM-RealView PBX
 [ 0.000000] Ignoring unrecognised tag 0x00000000
 [ 0.000000] Memory policy: ECC disabled, Data cache writealloc
 [ 0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
 [ 0.000000] PERCPU: Embedded 7 pages/cpu @c063d000 s4992 r8192 d15488 u32768
 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
 [ 0.000000] Kernel command line: console=ttyAMA0 mem=128M
 [ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
 [ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
 [ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
 [ 0.000000] Memory: 128MB = 128MB total
 [ 0.000000] Memory: 125504k/125504k available, 5568k reserved, 0K highmem
 [ 0.000000] Virtual kernel memory layout:
 [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
 [ 0.000000] DTCM : 0xfffe8000 - 0xfffe8000 ( 0 kB)
 [ 0.000000] ITCM : 0xfffe0000 - 0xfffe0000 ( 0 kB)
 [ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
 [ 0.000000] vmalloc : 0xc8800000 - 0xff000000 ( 872 MB)
 [ 0.000000] lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
 [ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
 [ 0.000000] .text : 0xc0008000 - 0xc0262000 (2408 kB)
 [ 0.000000] .init : 0xc0262000 - 0xc03f3380 (1605 kB)
 [ 0.000000] .data : 0xc03f4000 - 0xc0410460 ( 114 kB)
 [ 0.000000] .bss : 0xc0411024 - 0xc043bd5c ( 172 kB)
 [ 0.000000] Hierarchical RCU implementation.
 [ 0.000000] NR_IRQS:128
 [ 0.026652] Calibrating delay loop... 579.99 BogoMIPS (lpj=2899968)
 [ 0.216657] pid_max: default: 32768 minimum: 301
 [ 0.224931] Mount-cache hash table entries: 512
 [ 0.234747] CPU: Testing write buffer coherency: ok
 [ 0.240487] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
 [ 0.240769] Setting up static identity map for 0x21ef80 - 0x21efcc
 [ 0.245053] Brought up 1 CPUs
 [ 0.245131] SMP: Total of 1 processors activated (579.99 BogoMIPS).
 [ 0.260736] NET: Registered protocol family 16
 [ 0.270160] L310 cache controller enabled
 [ 0.270207] l2x0: 8 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x02520000, Cache size: 131072 B
 [ 0.282758] Serial: AMBA PL011 UART driver
 [ 0.284436] dev:uart0: ttyAMA0 at MMIO 0x10009000 (irq = 44) is a PL011 rev1
 [ 0.288618] console [ttyAMA0] enabled
 [ 0.289981] dev:uart1: ttyAMA1 at MMIO 0x1000a000 (irq = 45) is a PL011 rev1
 [ 0.290696] dev:uart2: ttyAMA2 at MMIO 0x1000b000 (irq = 46) is a PL011 rev1
 [ 0.291407] fpga:uart3: ttyAMA3 at MMIO 0x1000c000 (irq = 47) is a PL011 rev1
 [ 0.317424] bio: create slab <bio-0> at 0
 [ 0.326175] Advanced Linux Sound Architecture Driver Version 1.0.24.
 [ 0.337929] Switching to clocksource timer3
 [ 0.352951] NET: Registered protocol family 2
 [ 0.356403] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
 [ 0.362156] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
 [ 0.362468] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
 [ 0.362769] TCP: Hash tables configured (established 4096 bind 4096)
 [ 0.362933] TCP reno registered
 [ 0.363067] UDP hash table entries: 128 (order: 0, 4096 bytes)
 [ 0.363295] UDP-Lite hash table entries: 128 (order: 0, 4096 bytes)
 [ 0.367452] NET: Registered protocol family 1
 [ 0.453919] squashfs: version 4.0 (2009/01/31) Phillip Lougher
 [ 0.454066] JFFS2 version 2.2 (NAND) (SUMMARY) (ZLIB) (LZO) (LZMA) (RTIME) (RUBIN) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
 [ 0.466017] msgmni has been set to 245
 [ 0.466358] io scheduler noop registered
 [ 0.466467] io scheduler deadline registered (default)
 [ 0.466928] clcd-pl11x issp:clcd: PL111 rev2 at 0x10020000
 [ 0.472057] clcd-pl11x issp:clcd: RealView hardware, XVGA display
 [ 0.501615] brd: module loaded
 [ 0.507426] smsc911x: Driver version 2008-10-21
 [ 0.515316] smsc911x-mdio: probed
 [ 0.515729] smsc911x smsc911x.0: eth0: attached PHY driver [SMSC LAN911x Internal PHY] (mii_bus:phy_addr=smsc911x-0:01, irq=-1)
 [ 0.516688] smsc911x smsc911x.0: eth0: MAC Address: 52:54:00:12:34:56
 [ 0.518697] ALSA device list:
 [ 0.518788] No soundcards found.
 [ 0.519668] TCP cubic registered
 [ 0.519761] NET: Registered protocol family 17
 [ 0.521385] 8021q: 802.1Q VLAN Support v1.8
 [ 0.522407] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 0
 [ 0.542898] Freeing init memory: 1604K
 - preinit -
 Press the [f] key and hit [enter] to enter failsafe mode
 - regular preinit -
 - init -

 Please press Enter to activate this console. [ 8.523333] smsc911x smsc911x.0: eth0: SMSC911x/921x identified at 0xc88e0000, IRQ: 60
 [ 8.527416] device eth0 entered promiscuous mode
 [ 8.531148] br-lan: port 1(eth0) entered forwarding state
 [ 8.531459] br-lan: port 1(eth0) entered forwarding state
 [ 10.530287] br-lan: port 1(eth0) entered forwarding state

 BusyBox v1.19.4 (2013-01-06 08:49:55 EST) built-in shell (ash)
 Enter 'help' for a list of built-in commands.

 _______ ________ __
 | |.-----.-----.-----.| | | |.----.| |_
 | - || _ | -__| || | | || _|| _|
 |_______|| __|_____|__|__||________||__| |____|
 |__| W I R E L E S S F R E E D O M
 -----------------------------------------------------
 ATTITUDE ADJUSTMENT (Attitude Adjustment, r34778)
 -----------------------------------------------------
 * 1/4 oz Vodka Pour all ingredients into mixing
 * 1/4 oz Gin tin with ice, strain into glass.
 * 1/4 oz Amaretto
 * 1/4 oz Triple sec
 * 1/4 oz Peach schnapps
 * 1/4 oz Sour mix
 * 1 splash Cranberry juice
 -----------------------------------------------------
 root@OpenWrt:/#

Yay!

CPU info and networking

OpenWRT is running a ramdisk image, but otherwise appears fully functional.

  root@OpenWrt:/# df -h
  df -h
  Filesystem                Size      Used Available Use% Mounted on
  tmpfs                    62.1M     32.0K     62.0M   0% /tmp
  tmpfs                   512.0K         0    512.0K   0% /dev
  root@OpenWrt:/#
  root@OpenWrt:/# cat /proc/cpuinfo
  cat /proc/cpuinfo
  Processor       : ARMv7 Processor rev 0 (v7l)
  processor       : 0
  BogoMIPS        : 579.99

  Features        : swp half thumb fastmult vfp edsp vfpv3 tls
  CPU implementer : 0x41
  CPU architecture: 7
  CPU variant     : 0x0
  CPU part        : 0xc09
  CPU revision    : 0

  Hardware        : ARM-RealView PBX
  Revision        : 0000
  Serial          : 0000000000000000
  root@OpenWrt:/#

Check networking (with qemu using the FreeBSD jail’s underlying tap interface, set up previously for other networking experiments).

  root@OpenWrt:/# ifconfig
  ifconfig
  br-lan    Link encap:Ethernet  HWaddr 52:54:00:12:34:56
	    inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
	    UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
	    RX packets:3174 errors:0 dropped:37 overruns:0 frame:0
	    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
	    collisions:0 txqueuelen:0
	    RX bytes:991387 (968.1 KiB)  TX bytes:0 (0.0 B)

  eth0      Link encap:Ethernet  HWaddr 52:54:00:12:34:56
	    UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
	    RX packets:3175 errors:0 dropped:0 overruns:0 frame:0
	    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
	    collisions:0 txqueuelen:1000
	    RX bytes:1035883 (1011.6 KiB)  TX bytes:0 (0.0 B)
	    Interrupt:60

  lo        Link encap:Local Loopback
	    inet addr:127.0.0.1  Mask:255.0.0.0
	    UP LOOPBACK RUNNING  MTU:16436  Metric:1
	    RX packets:22176 errors:0 dropped:0 overruns:0 frame:0
	    TX packets:22176 errors:0 dropped:0 overruns:0 carrier:0
	    collisions:0 txqueuelen:0
	    RX bytes:1818432 (1.7 MiB)  TX bytes:1818432 (1.7 MiB)

  root@OpenWrt:/#

Start DHCP

  root@OpenWrt:/# udhcpc -i br-lan
  udhcpc -i br-lan
  udhcpc (v1.19.4) started
  Sending discover...
  Sending select for 10.1.1.58...
  Lease of 10.1.1.58 obtained, lease time 1800
  udhcpc: ifconfig br-lan 10.1.1.58 netmask 255.255.255.0 broadcast +
  udhcpc: setting default routers: 10.1.1.12
  root@OpenWrt:/#

And ping caia.swin.edu.au (need to explicitly specify IP addr as DNS wasn’t configured by udhcpc)

  root@OpenWrt:/# route
  route
  Kernel IP routing table
  Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  default         10.1.1.12       0.0.0.0         UG    0      0        0 br-lan
  10.1.1.0        *               255.255.255.0   U     0      0        0 br-lan
  root@OpenWrt:/#ping -c 1 136.186.229.16
  ping -c 1 136.186.229.16
  PING 136.186.229.16 (136.186.229.16): 56 data bytes
  64 bytes from 136.186.229.16: seq=0 ttl=62 time=59.261 ms

  --- 136.186.229.16 ping statistics ---
  1 packets transmitted, 1 packets received, 0% packet loss
  round-trip min/avg/max = 59.261/59.261/59.261 ms
  root@OpenWrt:/#

Yay++. Basic IP networking appears functional from my OpenWRT VM running inside Qemu 1.1.1 inside  a FreeBSD 8 jail.

Booting openwrt-realview-vmlinux.elf under Qemu’s realview-eb-mpcore machine

Just for kicks, we also try running the OpenWRT image under Qemu’s emulated “ARM RealView Emulation Baseboard (ARM11MPCore)” (realview-eb-mpcore) system. This does work, although Qemu spits out two more error messages as the emulated machine starts up.

Start qemu with realview-eb-mpcore emulation, 128M RAM and serial console on TCP port 4000:

% qemu-system-arm -M realview-eb-mpcore -kernel openwrt-realview-vmlinux.elf -nographic -m 128 -net nic -net tap -nographic -serial tcp::4000,server
QEMU waiting for connection on: tcp:0.0.0.0:4000,server
oss: Could not initialize DAC
oss: Failed to open `/dev/dsp'
oss: Reason: No such file or directory
oss: Could not initialize DAC
oss: Failed to open `/dev/dsp'
oss: Reason: No such file or directory
audio: Failed to create voice `lm4549.out'
QEMU 1.1.1 monitor - type 'help' for more information
(qemu) arm_sysctl_read: Bad register offset 0xd8
arm_sysctl_write: Bad register offset 0xd8
l2x0_priv_write: Bad offset 900
l2x0_priv_write: Bad offset 904

(qemu)

(Once the emulation starts, there’s two “Bad register offset” errors reported which were not reported when emulating realview-pbx-a9. That’s in addition to the two “Bad offset” errors which were reported with realview-pbx-a9 this time but not under Attitude Adjustment r29537.)

  [gja@gjadesktop] ~% nc 10.1.1.10 4000
  Uncompressing Linux... done, booting the kernel.
  [    0.000000] Booting Linux on physical CPU 0
  [    0.000000] Linux version 3.3.8 (diffuse@diffuse) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 SMP Sun Jan 6 09:02:37 EST 2013
  [    0.000000] CPU: ARMv6-compatible processor [410fb022] revision 2 (ARMv7), cr=00c0387d
  [    0.000000] CPU: VIPT aliasing data cache, unknown instruction cache
  [    0.000000] Machine: ARM-RealView EB
  [    0.000000] Ignoring unrecognised tag 0x00000000
  [    0.000000] Memory policy: ECC disabled, Data cache writealloc
  [    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
  [    0.000000] PERCPU: Embedded 7 pages/cpu @c063d000 s4992 r8192 d15488 u32768
  [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
  [    0.000000] Kernel command line: console=ttyAMA0 mem=128M
  [    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
  [    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
  [    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
  [    0.000000] Memory: 128MB = 128MB total
  [    0.000000] Memory: 125528k/125528k available, 5544k reserved, 0K highmem
  [    0.000000] Virtual kernel memory layout:
  [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
  [    0.000000]     DTCM    : 0xfffe8000 - 0xfffe8000   (   0 kB)
  [    0.000000]     ITCM    : 0xfffe0000 - 0xfffe0000   (   0 kB)
  [    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
  [    0.000000]     vmalloc : 0xc8800000 - 0xff000000   ( 872 MB)
  [    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
  [    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
  [    0.000000]       .text : 0xc0008000 - 0xc0262000   (2408 kB)
  [    0.000000]       .init : 0xc0262000 - 0xc03f3380   (1605 kB)
  [    0.000000]       .data : 0xc03f4000 - 0xc0410460   ( 114 kB)
  [    0.000000]        .bss : 0xc0411024 - 0xc043bd5c   ( 172 kB)
  [    0.000000] Hierarchical RCU implementation.
  [    0.000000] NR_IRQS:128
  [    0.026330] Calibrating delay loop... 579.99 BogoMIPS (lpj=2899968)
  [    0.196620] pid_max: default: 32768 minimum: 301
  [    0.204960] Mount-cache hash table entries: 512
  [    0.214838] CPU: Testing write buffer coherency: ok
  [    0.220591] CPU0: thread -1, cpu 0, socket -1, mpidr 0
  [    0.220875] Setting up static identity map for 0x21ef80 - 0x21efcc
  [    0.225188] Brought up 1 CPUs
  [    0.225268] SMP: Total of 1 processors activated (579.99 BogoMIPS).
  [    0.238981] NET: Registered protocol family 16
  [    0.248629] L310 cache controller enabled
  [    0.248676] l2x0: 16 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x02790000, Cache size: 2097152 B
  [    0.261153] Serial: AMBA PL011 UART driver
  [    0.262845] dev:uart0: ttyAMA0 at MMIO 0x10009000 (irq = 36) is a PL011 rev1
  [    0.267087] console [ttyAMA0] enabled
  [    0.268495] dev:uart1: ttyAMA1 at MMIO 0x1000a000 (irq = 37) is a PL011 rev1
  [    0.269224] dev:uart2: ttyAMA2 at MMIO 0x1000b000 (irq = -1) is a PL011 rev1
  [    0.269938] fpga:uart3: ttyAMA3 at MMIO 0x1000c000 (irq = -1) is a PL011 rev1
  [    0.296745] bio: create slab <bio-0> at 0
  [    0.305106] Advanced Linux Sound Architecture Driver Version 1.0.24.
  [    0.317072] Switching to clocksource timer3
  [    0.332210] NET: Registered protocol family 2
  [    0.335654] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
  [    0.341424] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
  [    0.341719] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
  [    0.342033] TCP: Hash tables configured (established 4096 bind 4096)
  [    0.342209] TCP reno registered
  [    0.342349] UDP hash table entries: 128 (order: 0, 4096 bytes)
  [    0.342582] UDP-Lite hash table entries: 128 (order: 0, 4096 bytes)
  [    0.346763] NET: Registered protocol family 1
  [    0.441756] squashfs: version 4.0 (2009/01/31) Phillip Lougher
  [    0.441912] JFFS2 version 2.2 (NAND) (SUMMARY) (ZLIB) (LZO) (LZMA) (RTIME) (RUBIN) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
  [    0.453702] msgmni has been set to 245
  [    0.454047] io scheduler noop registered
  [    0.454157] io scheduler deadline registered (default)
  [    0.454626] clcd-pl11x dev:clcd: PL111 rev2 at 0x10020000
  [    0.458904] clcd-pl11x dev:clcd: RealView hardware, VGA display
  [    0.487946] brd: module loaded
  [    0.494340] smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@fluxnic.net>
  [    0.508333] eth0: SMC91C11xFD (rev 1) at c88de000 IRQ 41 [nowait]
  [    0.508593] eth0: Ethernet addr: 52:54:00:12:34:56
  [    0.511396] ALSA device list:
  [    0.511493]   No soundcards found.
  [    0.512194] TCP cubic registered
  [    0.512295] NET: Registered protocol family 17
  [    0.513925] 8021q: 802.1Q VLAN Support v1.8
  [    0.514951] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 4
  [    0.536564] Freeing init memory: 1604K
  - preinit -
  Press the [f] key and hit [enter] to enter failsafe mode
  - regular preinit -
  - init -

  Please press Enter to activate this console. [    8.257280] eth0: link up
  [    8.262595] device eth0 entered promiscuous mode
  [    8.267328] br-lan: port 1(eth0) entered forwarding state
  [    8.267685] br-lan: port 1(eth0) entered forwarding state
  [   10.259582] br-lan: port 1(eth0) entered forwarding state

  BusyBox v1.19.4 (2013-01-06 08:49:55 EST) built-in shell (ash)
  Enter 'help' for a list of built-in commands.

    _______                     ________        __
  |       |.-----.-----.-----.|  |  |  |.----.|  |_
  |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
  |_______||   __|_____|__|__||________||__|  |____|
	    |__| W I R E L E S S   F R E E D O M
  -----------------------------------------------------
  ATTITUDE ADJUSTMENT (Attitude Adjustment, r34778)
  -----------------------------------------------------
    * 1/4 oz Vodka      Pour all ingredients into mixing
    * 1/4 oz Gin        tin with ice, strain into glass.
    * 1/4 oz Amaretto
    * 1/4 oz Triple sec
    * 1/4 oz Peach schnapps
    * 1/4 oz Sour mix
    * 1 splash Cranberry juice
  -----------------------------------------------------
  root@OpenWrt:/#

  root@OpenWrt:/# cat /proc/cpuinfo
  cat /proc/cpuinfo
  Processor       : ARMv6-compatible processor rev 2 (v6l)
  processor       : 0
  BogoMIPS        : 579.99

  Features        : swp half thumb fastmult vfp edsp java tls
  CPU implementer : 0x41
  CPU architecture: 7
  CPU variant     : 0x0
  CPU part        : 0xb02
  CPU revision    : 2

  Hardware        : ARM-RealView EB
  Revision        : 0000
  Serial          : 0000000000000000
  root@OpenWrt:/#

(Not shown here, but networking works just the same as when running under Qemu’s emulated realview-pbx-a9 system.)

Qemu systems that did not work

Note, I also tried running this .elf image using Qemu’s “-M realview-eb” and “-M realview-pb-a8” systems.

With “-M realview-eb” the emulation got stuck in a loop repeating  “Uncompressing Linux…” to the screen for a long time until I quit qemu. With “-M realview-pb-a8” the emulation finished “Uncompressing…” but hung after “done, booting kernel…”.

Don’t use these two.

Advertisements

One comment

  1. Assign more memory than 128MB if you want to boot. Otherwise it stucks at kernel booting/decompression

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: