I'm trying to emulate a TP-Link WR740N in Qemu (MIPS). I have extracted the rootfs.img from the firmware, and downloaded vmlinux-2.6.32-5-4kc-malta from here: http://people.debian.org/~aurel32/qemu/mips/.Then, I started Qemu with these parameters:qemu-system-mips -M malta -kernel 'vmlinux-2.6.32-5-4kc-malta' -hda 'rootfs.img' -append root=/dev/sda1 console=tty0 -nographicAnd it got stuck on:[0.000000] console [tty0] enabled, bootconsole disabledI've also tried to run it like this:sudo qemu-system-mips -M malta -initrd 'rootfs.img' -kernel 'vmlinux-2.6.32-5-4kc-malta' -nographic -append console=ttyS0,115200 root=/dev/sda rootfstype=jffs2 init=/sbin/init -hda 'hda.img' and I get this error:[    0.796000]  sda: unknown partition table[    0.808000] sd 0:0:0:0: [sda] Attached SCSI disk[    0.812000] RAMDISK: squashfs filesystem found at block 0[    0.812000] RAMDISK: Loading 2556KiB [1 disk] into ram disk... done.[    0.928000] VFS: Cannot open root device sda or unknown-block(8,0)[    0.928000] Please append a correct root= boot option; here are the available partitions:[    0.928000] 0800           65536 sda driver: sd[    0.932000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,0)New try after answer from 6EQUJ5 [I still get the same error though (the second one)]:This is what I'm trying:sudo qemu-system-mips -M malta -kernel 'vmlinux-2.6.32-5-4kc-malta' -nographic -append init=/bin/sh -hda 'myFileSystem.img'And this is a link to download the filesystem I've created:http://speedy.sh/vBUEQ/myFileSystem.imgRunning file on my filesystem:Linux rev 1.0 ext2 filesystem data (mounted or unclean), UUID=dac7072e-2c8b-408f-a080-57ea60cfd9eaThose are the commands I've used to create it and move the files into it:dd if=/dev/zero of=~/myFileSystem.img bs=1024 count=65536mke2fs myFileSystem.imgmkdir /mnt/virtualmount -o loop ~/myFileSystem.img /mnt/virtual
Emulate TP-LINK WR740N with QEMU
firmware;qemu;mips
I was able to get that firmware to a shell by doing the following:Unpacking the squashfs imageCreate a filesystem image formatted to ext2 and copying the unpacked squashfs contents into that, and using that as -hdaRunning without -initrd ... and appending init=/bin/sh to the kernel command lineAlthough you are not fully emulating the WR740N because most of the hardware is missing and it is a different kernel.  Emulating a router in qemu is always going to be a partial process because of that.