qemu emulator for the mini2440
Posted: Mon Feb 23, 2009 3:30 pm
I have done some work to have s3c2440 support into qemu, and have added the support for the mini2440 board. Right now u-boot starts, finds the nand etc, the dm9000 'almost' work (not very reliably) and I can boot the kernel. The kernel seems happy enough to run as if it was on the real hardware!
Still need to flash something on the fake flash and try it more in depth. It's really cool to be able to simulate the whole board like that
Still need to flash something on the fake flash and try it more in depth. It's really cool to be able to simulate the whole board like that

Code: Select all
[michel@yap /opt/qemu/qemu-trunk.git]% . ./mini2440_start.sh
s3c_gpio_write: Bad register 0xd0
U-Boot 1.3.2-moko12 (Feb 3 2009 - 18:53:41)
I2C: ready
DRAM: 64 MB
Flash: 2 MB
NAND: 64 MiB
Found Environment offset in OOB..
USB: S3C2410 USB Deviced
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
MINI2440 # s3c24xx speed get
FCLK = 405 MHz, HCLK = 101 MHz, PCLK = 50 MHz, UCLK = 48 MHz
MINI2440 # printenv
bootcmd=
bootdelay=3
baudrate=115200
ethaddr=08:08:11:18:12:27
ipaddr=10.0.0.111
serverip=10.0.0.4
netmask=255.255.255.0
usbtty=cdc_acm
bootargs_base=rootfstype=jffs2 root=/dev/mtdblock4 console=ttySAC0,115200
mtdids=nand0=mini2440-nand
mtdparts=mtdparts=mini2440-nand:256k@0(u-boot),128k(env),5m(kernel),-(root)
mini2440=4tb
bootargs=root=/dev/mtdblock4 rootfstype=jffs2 console=ttySAC0,115200 mini2440=4tb
partition=nand0,0
mtddevnum=0
mtddevname=u-boot
Environment size: 456/65532 bytes
MINI2440 # bootm
## Booting kernel from Legacy Image at 32000000 ...
Image Name:
Created: 2009-02-23 8:28:41 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2474204 Bytes = 2.4 MB
Load Address: 30008000
Entry Point: 30008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux............................................................................................................................................................. done, booting the kernel.
s3c_timers_write: Bad register 0x40
Initializing cgroup subsys cpu
Linux version 2.6.29-rc6-michel (michel@yap) (gcc version 4.2.4) #193 PREEMPT Mon Feb 23 08:28:38 GMT 2009
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: MINI2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, (c) 2004 Simtec Electronics
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: root=/dev/mtdblock4 rootfstype=jffs2 console=ttySAC0,115200 mini2440=4tb
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console [ttySAC0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
allocated 327680 bytes of page_cgroup
please try cgroup_disable=memory option if you don't want
Memory: 64MB = 64MB total
Memory: 59220KB available (4592K code, 574K data, 160K init)
SLUB: Genslabs=12, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 395.67 BogoMIPS (lpj=989184)
Mount-cache hash table entries: 512
Initializing cgroup subsys ns
Initializing cgroup subsys cpuacct
Initializing cgroup subsys memory
CPU: Testing write buffer coherency: ok
net_namespace: 672 bytes
NET: Registered protocol family 16
MINI2440: Option string mini2440=4tb
MINI2440: LCD 0:240x320 1:800x480 2:1024x768 3:800x600 [4:640x480]
s3c24xx-pwm s3c24xx-pwm.1: tin at 25312500, tdiv at 25312500, tin=divclk, base 8
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4808000, irq 33
DMA channel 1 at c4808040, irq 34
DMA channel 2 at c4808080, irq 35
DMA channel 3 at c48080c0, irq 36
S3C244X: Clock Support, DVS off
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Bluetooth: Core ver 2.14
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (extended precision)
audit: initializing netlink socket (disabled)
type=2000 audit(0.315:1): initialized
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 115
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 160x80
fb0: s3c2410fb frame buffer device
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
loop: module loaded
nbd: registered device at major 43
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
dm9000 Ethernet Driver, V1.31
eth0 (dm9000): not using net_device_ops yet
eth0: dm9000e at c486a300,c486e304 IRQ 51 MAC: 52:54:00:12:34:56 (chip)
Driver 'sd' needs updating - please use bus_type methods
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=1, 9ns Twrph0=3 29ns, Twrph1=2 19ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x36 (Samsung NAND 64MiB 1,8V 8-bit)
Scanning device for bad blocks
Creating 4 MTD partitions on "NAND 64MiB 1,8V 8-bit":
0x000000000000-0x000000040000 : "u-boot"
uncorrectable error : <3>uncorrectable error : <5>0x000000040000-0x000000060000 : "u-boot-env"
uncorrectable error : <5>0x000000060000-0x000000560000 : "kernel"
uncorrectable error : <3>uncorrectable error : <5>0x000000560000-0x000004000000 : "root"
uncorrectable error : <3>uncorrectable error : <6>ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
s3c2410-ohci s3c2410-ohci: init err (00000000 0000)
ohci_hcd: can't start s3c24xx
s3c2410-ohci s3c2410-ohci: startup error -75
s3c2410-ohci s3c2410-ohci: USB bus 1 deregistered
s3c2410-ohci: probe of s3c2410-ohci failed with error -75
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver libusual
mice: PS/2 mouse device common for all mice
s3c2440-ts s3c2440-ts: Starting
s3c_adc_write: Bad register 0x8
Created group ts filter len 12 depth 2 close 10 thresh 6
Created Median ts filter len 20 depth 2 dec 24
Created Mean ts filter len 4 depth 2 thresh 65535
Created Linear ts filter depth 2
s3c2440-ts s3c2440-ts: 4 filter(s) initialized
s3c2440-ts s3c2440-ts: successfully loaded
input: s3c2410 TouchScreen as /devices/virtual/input/input0
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c2410-rtc s3c2410-rtc: rtc disabled, re-enabling
s3c2410-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
i2c /dev entries driver
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 98 KHz
s3c_i2c_write: Bad register 0x10
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
Bluetooth: Generic Bluetooth USB driver ver 0.4
usbcore: registered new interface driver btusb
Bluetooth: Generic Bluetooth SDIO driver ver 0.1
cpuidle: using governor ladder
mapped channel 0 to 0
s3c2440-sdi s3c2440-sdi: powered down.
s3c2440-sdi s3c2440-sdi: initialisation done.
s3c2440-sdi s3c2440-sdi: running at 0kHz (requested: 0kHz).
s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).
s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).
s3c_mmci_readw: FIFO underrun
Registered led device: led1
Registered led device: led2
Registered led device: led3
Registered led device: led4
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.18a.
No device for DAI UDA134X
No device for DAI s3c24xx-i2s
S3C24XX_UDA134X SoC Audio driver
UDA134X SoC Audio Codec
asoc: UDA134X <-> s3c24xx-i2s mapping ok
ALSA device list:
#0: S3C24XX_UDA134X (UDA134X)
TCP cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 17
NET: Registered protocol family 15
Bridge firewalling registered
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
registered taskstats version 1
s3c2410-rtc s3c2410-rtc: setting system clock to 2009-02-23 23:21:21 UTC (1235431281)
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
List of all partitions:
1f00 256 mtdblock0 (driver?)
1f01 128 mtdblock1 (driver?)
1f02 5120 mtdblock2 (driver?)
1f03 60032 mtdblock3 (driver?)
No filesystem could mount root, tried: jffs2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)