qemu emulator for the mini2440

LeshaK
Posts: 35
Joined: Wed Jan 14, 2009 1:01 am

Re: qemu emulator for the mini2440

Post by LeshaK » Fri Feb 27, 2009 10:52 am

I'm waiting nfs for rootfs... ;)
My qq2440 page
Sorry, it's russian, but you can use http://translate.google.com/ (ru > en/...)

buserror
Posts: 92
Joined: Thu Jan 22, 2009 12:28 am

Re: qemu emulator for the mini2440

Post by buserror » Fri Feb 27, 2009 2:37 pm

hey move you ass, I need help ! :-)

It might be that the network in fact works (works great in u-boot now!), but qemu is unhappy about my dhcp setup. I'll look at that tomorrow.

Otherwise it looks pretty exciting, we're getting close to a lot of fun :D

scootklein
Posts: 7
Joined: Tue Feb 24, 2009 3:35 pm

Re: qemu emulator for the mini2440

Post by scootklein » Fri Feb 27, 2009 5:24 pm

thanks for the updates!

LeshaK
Posts: 35
Joined: Wed Jan 14, 2009 1:01 am

Re: qemu emulator for the mini2440

Post by LeshaK » Sat Feb 28, 2009 7:10 am

thanks,
u-boot tftp work better,
but kernel can't mount nfs :(

Did you work with sd?
My qq2440 page
Sorry, it's russian, but you can use http://translate.google.com/ (ru > en/...)

buserror
Posts: 92
Joined: Thu Jan 22, 2009 12:28 am

Re: qemu emulator for the mini2440

Post by buserror » Sat Feb 28, 2009 7:43 am

Have not tried the SD yet. I think I need to map the IRQ properly for it to work, I'll try that next actualy, that could help a lot until I figure out the nfs..

LeshaK
Posts: 35
Joined: Wed Jan 14, 2009 1:01 am

Re: qemu emulator for the mini2440

Post by LeshaK » Sat Feb 28, 2009 7:50 am

Can I help you?
I don't know qemu inside, but may be I can do something?
My qq2440 page
Sorry, it's russian, but you can use http://translate.google.com/ (ru > en/...)

buserror
Posts: 92
Joined: Thu Jan 22, 2009 12:28 am

Re: qemu emulator for the mini2440

Post by buserror » Sat Feb 28, 2009 10:11 am

Yes you can help I'm sure; I don't know qemu either you know. it's the first time I hack it :D

look at the source, it's mostly in hw/mini2440* hw/s3c* hw/dm9000* etc, it is in fact rather easy to understand if you understand the s3c, the kernel etc... you can understand what is happening by looking at the s3c2440 datasheet. Same with the dm9000. What I do is I add a LOT of printf() call to the registers to see what u-boot/kernel is doing, then I try to see the datasheet to see what it's supposed to do...

Things that need to be done:
+ Fix the hardware ECC in s3c2440_nand.c -- the kernel complains about invalid erase blocks because of that
+ Fix the SD support (I will do that)
+ Test USB support
+ Fix the networking for the kernel
+ ...

LeshaK
Posts: 35
Joined: Wed Jan 14, 2009 1:01 am

Re: qemu emulator for the mini2440

Post by LeshaK » Sat Feb 28, 2009 10:22 am

Ok, I will try...
My qq2440 page
Sorry, it's russian, but you can use http://translate.google.com/ (ru > en/...)

buserror
Posts: 92
Joined: Thu Jan 22, 2009 12:28 am

Re: qemu emulator for the mini2440

Post by buserror » Sat Feb 28, 2009 4:27 pm

Pushed a few more changes to my branch. I reworked the NAND code to try to find why kernel reports bad blocks. Also why I can't seem to boot from NAND direct. Made plenty of cleanups.
Seems u-boot loads itself from NAND just fine (I checked) but fails to jump to new code. If I load a 'fake' copy in SDRAM already, it seems happy to start. It's bizare, it looks like some cache problem

The SD card pin/card detect seems inverted.. If I select a -sd image the kernel deselects the interface, maybe I need a NOT somewhere, or a trampoline IRQ. I'll check that tomorrow.

dbrazeau

Re: qemu emulator for the mini2440

Post by dbrazeau » Sat Feb 28, 2009 7:47 pm

I successfully built the uImage, u-boot, and the qemu for the mini2440, but I believe I still have an issue with the mini2440_nand.bin. I downloaded the mini2440_2_6_29_rc5_nand_opie.bin, but its not working I get:

------------------------------------------------------------------------------------------------------------------------'
Scanning device for bad blocks
Bad eraseblock 0 at 0x000000000000
Bad eraseblock 1 at 0x000000004000
Bad eraseblock 2 at 0x000000008000
Bad eraseblock 3 at 0x00000000c000
Bad eraseblock 4 at 0x000000010000
Bad eraseblock 5 at 0x000000014000
...
Bad eraseblock 4089 at 0x000003fe4000
Bad eraseblock 4090 at 0x000003fe8000
Bad eraseblock 4091 at 0x000003fec000
Bad eraseblock 4092 at 0x000003ff0000
Bad eraseblock 4093 at 0x000003ff4000
Bad eraseblock 4094 at 0x000003ff8000
Bad eraseblock 4095 at 0x000003ffc000
Creating 4 MTD partitions on "NAND 64MiB 1,8V 8-bit":
0x000000000000-0x000000040000 : "u-boot"
uncorrectable error : <5>0x000000040000-0x000000060000 : "u-boot-env"
uncorrectable error : <5>0x000000060000-0x000000560000 : "kernel"
uncorrectable error : <5>0x000000560000-0x000004000000 : "root"
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-03-01 03:37:58 UTC (1235878678)
Waiting 1sec before mounting root device...
VFS: Mounted root (jffs2 filesystem) on device 31:3.
Freeing init memory: 160K
Warning: unable to open an initial console.
Failed to execute /sbin/init. Attempting defaults...
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
------------------------------------------------------------------------------------------------------------------------

I think my issue is the fact that I didn't build my own mini2440_nand.bin. This may be a simple question but how do I build the mini2440_nand binary, and do you think this is really the issue?

Thanks.

P.S. Nice work! :D

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests