|
qemujz
How to use qemu-jz.
Introductionqemu-jz is the qemu folk for JZ Soc emulation. Currently JZ4740 and pavo demo board is supported. build qemu-jzDownload the qemu-jz from here. Please install the dependency library first. GCC-3.4 is suggested to build qemu-jz. wget http://jz-hacking.googlecode.com/files/qemu-JZ_20090207.tar.gz tar zxvf qemu-JZ_20090207.tar.gz cd qemu-JZ ./configure --target-list=mipsel-softmmu make Tips: In MAC, you can use the flowing compile flag: ./configure --disable-sdl --disable-aio --enable-cocoa --prefix=/opt/qemu --target-list=mipsel-softmmu build u-bootPrebuild image. Change its name to u-boot-nand.bin. wget http://jz-hacking.googlecode.com/files/jz_uboot_20090624.tar.bz2 tar jz_uboot_20090624.tar.bz2 cd jz_uboot Change line 46 of jz_uboot/borad/pavo/u-boot-nand.lds. 46 - __got_start = .; 46 + __got_start = ALIGN(16); make pavo_nand_config make build linuxPrebuild image. Change its name to uImage. wget http://jz-hacking.googlecode.com/files/jz_linux_2.6.24.3_20090624.tar.bz2 tar jxvf jz_linux_2.6.24.3_20090624.tar.bz2 cd jz_linux Download the config file of linux kernel. wget http://jz-hacking.googlecode.com/files/pavo_config_linux_2.6.24.3 mv pavo_config_linux_2.6.24.3 .config make uImage will be created in arch/mips/uboot/ directory. make the yaffs2 imageWe need mkyaffs2image tool to convert the rootfs into yaffs2 format. You CAN NOT use the tool from www.yaffs.net directly. Please use the utils from jz's linux patch. I strip the source code from jz's linux patch. Please download it first. wget http://jz-hacking.googlecode.com/files/yaffs2.tar.bz2 tar jxvf yaffs2.tar.bz2 cd yaffs2/utils make Download rootfs and convert it to yaffs2 format. wget http://jz-hacking.googlecode.com/files/root26.tar.bz2 tar jxvf root26.tar.bz2 mkyaffs2image 1 root26 rootfs.yaffs2 build jz_toolsThe tool 'pavo_nandflash' is used to generate the nand flash image used by pavo demo board. Libconfuse is needed to build jz_tools. wget http://jz-hacking.googlecode.com/files/jz_tools_20090207.tar.gz tar zxvf jz_tools_20090207.tar.gz cd jz_tools/nand_flash make clean make make the nand flash imageThe last step is to make the nand flash image for pavo emulation. Assume we are in directory jz_tools/nand_flash. Edit the pavo_nandflash.conf. # # pavo board nand flash configuration file. # Copyright (C) 2008 yajin(yajin@vm-kernel.org) # # comment the unwanted part flash_image = pavo-nand.bin uboot_image = u-boot-nand.bin uboot_start = 0x00000000 uboot_end = 0x00400000 uboot_add_ecc = 0 kernel_image = uImage kernel_start = 0x00400000 kernel_end = 0x00800000 kernel_add_ecc = 0 rootfs_image = rootfs.yaffs2 rootfs_start = 0x00800000 rootfs_end = 0x08000000 rootfs_oob = 1 rootfs_add_ecc = 0 Copy u-boot-nand.bin from uboot and uImage from linux to current directory. Copy rootfs.yaffs2 to currently directory too. Run pavo_nand_flash ./pavo_nandflash Nand flash image pavo-nand.bin will be generated. run qemu-jzCopy pavo-nand.bin to qemu-JZ/mipsel-softmmu directory. CD to qemu-JZ. ./qemu-system-mipsel -M pavo -mtdblock pavo-nand.bin Using ctl+alt+1 to switch lcd panel and ctl+alt+3 to serial console. When you enter linux 2.6 shell. Type 'runqpe'. Do not forget to calibrate touchscreen in qtopia before playing with it. Settings->recalibrate. Following is the screenshot of qtopia on qemu-jz.
git tree |
Sign in to add a comment
Excellent write up !!! Thanks :D
Would you give me some ideas about JZ4750 yaffs2 storeage data for me ? Thank you very much. Email:zhengsenlin@gmail.com QQ:137951467
Would it be possible to run qemu-jz on the dingoo? It has a jz4740 and linux ported on it. http://dingoo-scene.blogspot.com/
cheers!
@peterbong23: qemu-jz emulates a dingoo. It is not intended to run ON the dingoo. Regular mipsel-qemu can already run dingoo environment/applications. But not the same kernel.
The file rootfs.tgz is not avalable from ftp://ftp.ingenic.cn. Could you please give another link?
Thanks in advance.
Hi I have changed the rootfs link to jz-hacking. Please use this rootfs.
Hi here is a Qi Hardware http://www.qi-hardware.com have a project work on jz_4740 cpu. mailing list: http://lists.qi-hardware.com/cgi-bin/mailman/listinfo
we are Community Driven and Copyleft Hardware http://www.qi-hardware.com/2009/07/10/community-driven/ http://www.qi-hardware.com/2009/07/10/copyleft-hardware/
Hi i get an error "qemu: fatal: jz4740_lcdc_write undefined addr a0 value 4400" Who knows how to fix? This occurs after compiling on Debian 5 and winXP with MinGW. On Ubuntu 8.04 works, but there is another problem: after launching image on the root filesystem is very low space for create files and boot failed(At least qtopia does not start.). I tried to change "rootfs_end" at 0x09000000 or more in pavo_nandflash.conf, but the image (pavo-nand.bin) does not change (I see that on dmesg on vm).