[U-Boot] qemu-mips usage

Hi ML,
I'm evaluating the qemu-mips to simulate a mips 4kec/24kec board. I'm working on the high level booting sequence (linux init scripts), and qemu+uboot should be a good choice to emulate a basic system (flash + dram + 4kec cpu).
Furthermore, also following the doc/README.qemu_mips, I'm not able to see the u-boot prompt on my qemu because the flash is not recognized. I haven't experience with qemu-mips and I don't understand where the flash is placed (canonical 0xbfxxxx address?) and how it is managed. Reading the configs/qemu_mips.h, It seems that the flash is managed as a common CFI flash placed to 0xbfc00000 address... but u-boot shows always "Unknown FLASH on Bank 1" on startup.
Has anyone tried to use qemu-mips to boot a standard u-boot image (qemu_mips target on u-boot)?
Thanks for any suggestion.
luigi
########### Useful Infos ############
This is the qemu banner (on Ubuntu 8.10):
EMU PC emulator version 0.9.1, Copyright (c) 2003-2008 Fabrice Bellard
This is the execution log:
$ cp ../u-boot-vanilla/u-boot.bin mips_bios.bin $ dd of=flash bs=1k count=4k if=/dev/zero 4096+0 records in 4096+0 records out 4194304 bytes (4,2 MB) copied, 0,046865 s, 89,5 MB/s $ dd of=flash bs=1k conv=notrunc if=../u-boot-vanilla/u-boot.bin 163+1 records in 163+1 records out 167076 bytes (167 kB) copied, 0,00124954 s, 134 MB/s $ qemu-system-mips -M mips -pflash flash -monitor null -nographic qemu: Warning, could not load MIPS bios '/usr/share/qemu/mips_bios.bin' Terminated
$ qemu-system-mips -L . -M mips -pflash flash -monitor null -nographic
U-Boot 2009.01-00080-g8f86a36 (gen 26 2009 - 09:23:04)
Board: Qemu -M mips CPU: 24Kf proc_id=0x19300 DRAM: 128 MB ## Unknown FLASH on Bank 1 - Size = 0x00000000 = 0 MB Terminated $

Hi,
Luigi 'Comio' Mantellini wrote:
Hi ML,
I'm evaluating the qemu-mips to simulate a mips 4kec/24kec board. I'm working on the high level booting sequence (linux init scripts), and qemu+uboot should be a good choice to emulate a basic system (flash + dram + 4kec cpu).
Furthermore, also following the doc/README.qemu_mips, I'm not able to see the u-boot prompt on my qemu because the flash is not recognized. I haven't experience with qemu-mips and I don't understand where the flash is placed (canonical 0xbfxxxx address?) and how it is managed. Reading the configs/qemu_mips.h, It seems that the flash is managed as a common CFI flash placed to 0xbfc00000 address... but u-boot shows always "Unknown FLASH on Bank 1" on startup.
Has anyone tried to use qemu-mips to boot a standard u-boot image (qemu_mips target on u-boot)?
Please check this thread. http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/42669
Best regards, Nobuhiro

On 10:13 Mon 26 Jan , Luigi 'Comio' Mantellini wrote:
Hi ML,
I'm evaluating the qemu-mips to simulate a mips 4kec/24kec board. I'm working on the high level booting sequence (linux init scripts), and qemu+uboot should be a good choice to emulate a basic system (flash + dram + 4kec cpu).
Furthermore, also following the doc/README.qemu_mips, I'm not able to see the u-boot prompt on my qemu because the flash is not recognized. I haven't experience with qemu-mips and I don't understand where the flash is placed (canonical 0xbfxxxx address?) and how it is managed. Reading the configs/qemu_mips.h, It seems that the flash is managed as a common CFI flash placed to 0xbfc00000 address... but u-boot shows always "Unknown FLASH on Bank 1" on startup.
Has anyone tried to use qemu-mips to boot a standard u-boot image (qemu_mips target on u-boot)?
Thanks for any suggestion.
luigi
########### Useful Infos ############
This is the qemu banner (on Ubuntu 8.10):
EMU PC emulator version 0.9.1, Copyright (c) 2003-2008 Fabrice Bellard
Please use the SVN version of qemu for the current u-boot version
I'll update the README.qemu_mips to specify the last u-boot version for the old qemu
Best Regards, J.

Dear All,
thanks for the help. I used the last svn copy and it works fine: URL: svn://svn.savannah.nongnu.org/qemu/trunk Repository Root: svn://svn.savannah.nongnu.org/qemu Repository UUID: c046a42c-6fe2-441c-8c8c-71466251a162 Revision: 6436
Anyway I created a trivial patch in order to permit to have an arbitrary flash size on mips board (I'm need to simulate a board with 32MB instead the usual 4M). Using the patch, the flash memory placed at the end of 0xbfxxxxxxxx memory space:
4MB flash: start bfc00000 -> end bfffffff 8MB flash: start bf800000 -> end bfffffff 16MB flash: start bf000000 -> end bfffffff 32MB flash: start be000000 -> end bfffffff
The firmware must be placed always at address 0xbfc00000. these are the relative address on the file:
4MB flash: firmware offset +0 8MB flash: firmware offset +4MB 16MB flash: firmware offset +12MB 32MB flash: firmware offset +28MB
To create the image files, use the following trivial script:
dd if=/dev/zero of=flash.img bs=$flashsize count=1 conv=sync dd if=u-boot.bi of=flash.img bs=1 seek=$biosbase conv=notrunc
Thanks again for your support.
luigi
On Monday 26 January 2009 13:53:07 Jean-Christophe PLAGNIOL-VILLARD wrote:
On 10:13 Mon 26 Jan , Luigi 'Comio' Mantellini wrote:
Hi ML,
I'm evaluating the qemu-mips to simulate a mips 4kec/24kec board. I'm working on the high level booting sequence (linux init scripts), and qemu+uboot should be a good choice to emulate a basic system (flash + dram + 4kec cpu).
Furthermore, also following the doc/README.qemu_mips, I'm not able to see the u-boot prompt on my qemu because the flash is not recognized. I haven't experience with qemu-mips and I don't understand where the flash is placed (canonical 0xbfxxxx address?) and how it is managed. Reading the configs/qemu_mips.h, It seems that the flash is managed as a common CFI flash placed to 0xbfc00000 address... but u-boot shows always "Unknown FLASH on Bank 1" on startup.
Has anyone tried to use qemu-mips to boot a standard u-boot image (qemu_mips target on u-boot)?
Thanks for any suggestion.
luigi
########### Useful Infos ############
This is the qemu banner (on Ubuntu 8.10):
EMU PC emulator version 0.9.1, Copyright (c) 2003-2008 Fabrice Bellard
Please use the SVN version of qemu for the current u-boot version
I'll update the README.qemu_mips to specify the last u-boot version for the old qemu
Best Regards, J.
participants (3)
-
Jean-Christophe PLAGNIOL-VILLARD
-
Luigi 'Comio' Mantellini
-
Nobuhiro Iwamatsu