Re: [Qemu-devel] Poking at m68k gitorious branch.
On 04/19/2012 05:47 AM, Laurent Vivier wrote: Hi Rob, you need to do a fresh clone because I rebase the branch frequently on the qemu/master instead of merging it. It is easier to manage for me. Ok. (Did that.) BTW, qemu-system-m68k is not working currently. Did it ever? :) I'm working on it on the branch q800 to emulate a macintosh quadra 800. I'm able to boot until the first process (1), then I have some issues with the MMU. Well that's further than I've gotten, and I'd like to reproduce it. The serial line is working (ttyS0 is in fact the second port, use -serial none -serial stdio to see it), the framebuffer too. A) Um... why? B) So if I just say -nographic I should use /dev/ttyS1 as the console? The ADB emulation needs some more work to be correctly attached to m68k VIA instead of PPC CUDA. Ok. For the SCSI, we can use ESP, but the pseudo-dma mode used by q800 is not implemented. Does it have a PIO option? To compile my m68k kernel I use a chroot and the m68k linux-user qemu mode, that seems to work well... perhaps you can test your tools inside this. I'm using my aboriginal linux thing that's already doing working systems for arm, mips, powerpc, sh4, x86, and so on. The config attached last time is what I'm building. That's a miniconfig combining the following target-specific config symbols: LINUX_CONFIG= CONFIG_MMU=y CONFIG_MAC=y CONFIG_M68020=y #CONFIG_M68030=y #CONFIG_M68040=y CONFIG_PROC_HARDWARE=y CONFIG_BLK_DEV_MAC_IDE=y CONFIG_BLK_DEV_SR_VENDOR=y CONFIG_MAC_SCSI=y CONFIG_SCSI_MAC_ESP=y CONFIG_MACINTOSH_DRIVERS=y CONFIG_ADB=y CONFIG_ADB_MACII=y CONFIG_MAC8390=y CONFIG_SERIAL_PMACZILOG=y CONFIG_SERIAL_PMACZILOG_TTYS=y CONFIG_SERIAL_PMACZILOG_CONSOLE=y With the following target-generic symbols: CONFIG_EXPERIMENTAL=y CONFIG_NO_HZ=y CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_PCI=y CONFIG_BINFMT_ELF=y CONFIG_NET=y CONFIG_PACKET=y CONFIG_UNIX=y CONFIG_INET=y CONFIG_BLK_DEV=y CONFIG_BLK_DEV_LOOP=y CONFIG_IDE=y CONFIG_IDE_GD=y CONFIG_IDE_GD_ATA=y CONFIG_BLK_DEV_IDECD=y CONFIG_SCSI=y CONFIG_BLK_DEV_SD=y CONFIG_BLK_DEV_SR=y CONFIG_SCSI_LOWLEVEL=y CONFIG_NETDEVICES=y CONFIG_NET_ETHERNET=y CONFIG_NET_PCI=y CONFIG_8139CP=y CONFIG_HW_RANDOM=y CONFIG_RTC_CLASS=y CONFIG_RTC_HCTOSYS=y CONFIG_RTC_INTF_SYSFS=y CONFIG_RTC_INTF_DEV=y CONFIG_EXT4_FS=y CONFIG_EXT4_USE_FOR_EXT23=y CONFIG_TMPFS=y CONFIG_MISC_FILESYSTEMS=y CONFIG_SQUASHFS=y CONFIG_SQUASHFS_ZLIB=y CONFIG_MAGIC_SYSRQ=y CONFIG_DEVTMPFS=y CONFIG_VIRTUALIZATION=y CONFIG_VIRTIO_PCI=y CONFIG_VIRTIO_NET=y CONFIG_NET_9P=y CONFIG_NET_9P_VIRTIO=y CONFIG_NETWORK_FILESYSTEMS=y CONFIG_9P_FS=y CONFIG_9P_FS_POSIX_ACL=y # More random (inexplicable) guard symbols added in 3.2. TODO: write # miniconfig expander that automatically sets guard symbols when setting a # dependent symbol. CONFIG_ETHERNET=y CONFIG_NET_VENDOR_INTEL=y CONFIG_NET_VENDOR_REALTEK=y CONFIG_NET_VENDOR_AMD=y CONFIG_NET_VENDOR_NATSEMI=y CONFIG_NET_VENDOR_8390=y For the moment I'm not even passing it a root filesystem, but just trying to get it to give me console messages. And it did! $ m68k-softmmu/qemu-system-m68k -nographic -no-reboot -kernel ~/aboriginal/ab2/build/system-image-m68k/vmlinux -append console=ttyS1 root=/dev/sda panic=1 PATH=/sbin:/bin root=/sbin/init.sh ABCFGHIJK Linux version 3.3.0 (landley@brillig) (gcc version 4.2.1) #1 Thu Apr 19 16:38:04 CDT 2012 bootconsole [early0] enabled Detected Macintosh model: 35 VIA1 at 50f0 is a 6522 or clone VIA2 at 50f02000 is a 6522 or clone Xwriteb: 1 vBufB = 3e Xwriteb: 1 vBufB = 3e Apple Macintosh Quadra 800 qemu: fatal: Illegal instruction: 7f45 @ D0 = A0 = 0024f000 F0 = 7fff D1 = 0400 A1 = 1d00 F1 = 7fff D2 = 0001 A2 = 001e42d8 F2 = 7fff D3 = 00225f8c A3 = 00225f8c F3 = 7fff D4 = 8000 A4 = F4 = 7fff D5 = 001f5ac0 A5 = 0022af2e F5 = 7fff D6 = 001f5124 A6 = 001e3fb8 F6 = 7fff D7 = 00225d9a A7 = 001e3f80 F7 = 7fff PC = SR = 2700 - Aborted I have no idea what this illegal instruction is (should I be doing 68030 instead of 68020 maybe?), but that's farther than qemu has ever booted this stuff before! Is there anything useful I can do at this point to help development of this target along? Rob -- GNU/Linux isn't: Linux=GPLv2, GNU=GPLv3+, they can't share code. Either it's mere aggregation, or a license violation. Pick one.
Re: [Qemu-devel] Poking at m68k gitorious branch.
Hi Rob, you need to do a fresh clone because I rebase the branch frequently on the qemu/master instead of merging it. It is easier to manage for me. BTW, qemu-system-m68k is not working currently. I'm working on it on the branch q800 to emulate a macintosh quadra 800. I'm able to boot until the first process (1), then I have some issues with the MMU. The serial line is working (ttyS0 is in fact the second port, use -serial none -serial stdio to see it), the framebuffer too. The ADB emulation needs some more work to be correctly attached to m68k VIA instead of PPC CUDA. For the SCSI, we can use ESP, but the pseudo-dma mode used by q800 is not implemented. To compile my m68k kernel I use a chroot and the m68k linux-user qemu mode, that seems to work well... perhaps you can test your tools inside this. Regards, Laurent Le 19 avril 2012 à 01:24, Rob Landley r...@landley.net a écrit : My aboriginal linux project has bootable system images for a bunch of targets (see http://landley.net/aboriginal/bin) and I want to add m68k. For years it's been building a stub m68k system image, but the run-emulator.sh script that should theoretically launch it is just a stub. A user once got my m68k root filesystem running under the Aranym emulator, so I know my cross compiler and root filesystem work. But I haven't got an m68k kernel qemu can boot, or a qemu that can boot it. A year or so back I poked at the m68k gitorious branch: git://gitorious.org/qemu-m68k/qemu-m68k But it wasn't finished and I got distracted. I just did a fresh clone of the branch (for some reason pull said I'd diverged by ~100 commits and there was a conflict? I'm guessing the patch series that got posted here, maybe?), built a kernel with the attached .config and the cross-compiler-m68k from the above aboriginal binary directory url, and took a wild guess at qemu/kernel command line arguments, currently just trying to get boot messages on the serial console: qemu-system-m68k -nographic -no-reboot -kernel vmlinux \ -append console=ttyS0 panic=1 The result was: QEMU 1.0,1 monitor - type 'help' for more information (qemu) QEMU 1.0,1 monitor - type 'help' for more information (qemu) qemu: fatal: Illegal instruction: 7f45 @ D0 = 0808 A0 = 0021e744 F0 = 7fff D1 = c4653600 A1 = 0021e6ae F1 = 7fff D2 = 2721 A2 = 1000 F2 = 7fff D3 = e768002c A3 = 00233000 F3 = 7fff D4 = A4 = F4 = 7fff D5 = A5 = F5 = 7fff D6 = A6 = 0ff8 F6 = 7fff D7 = 0022db50 A7 = 0ff0 F7 = 7fff PC = SR = 2700 - Aborted Which is a bit of a dead end. I'd guess that vmlinux isn't the right binary, except there isn't an arch/m68k/boot directory... Laurent: do you have any hints for me? Thanks, Rob -- GNU/Linux isn't: Linux=GPLv2, GNU=GPLv3+, they can't share code. Either it's mere aggregation, or a license violation. Pick one.