From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lpyl9-00066T-6d for qemu-devel@nongnu.org; Sat, 04 Apr 2009 01:49:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lpyl3-00065J-CE for qemu-devel@nongnu.org; Sat, 04 Apr 2009 01:49:37 -0400 Received: from [199.232.76.173] (port=38854 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lpyl3-00065G-5F for qemu-devel@nongnu.org; Sat, 04 Apr 2009 01:49:33 -0400 Received: from mail-fx0-f169.google.com ([209.85.220.169]:60935) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lpyl2-0001wo-F3 for qemu-devel@nongnu.org; Sat, 04 Apr 2009 01:49:32 -0400 Received: by fxm17 with SMTP id 17so1107907fxm.34 for ; Fri, 03 Apr 2009 22:49:31 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <5c3e8b1b0904031402i7fd71dfbw327b3c7ae708e29e@mail.gmail.com> References: <5c3e8b1b0903282143i47583269pbbd2c50df2449dcc@mail.gmail.com> <5c3e8b1b0903312204v7473a523i3c33bcb676f19ee4@mail.gmail.com> <5c3e8b1b0904011258g389eaf6cvc7c38791f99fd25e@mail.gmail.com> <5c3e8b1b0904011429h5bdf3c3ei949da7d1505b623c@mail.gmail.com> <5c3e8b1b0904011517v5fa230b5m4e5ed25dbd6be3ee@mail.gmail.com> <5c3e8b1b0904022140k6e214491q701e3b2a64b0ee2e@mail.gmail.com> <5c3e8b1b0904031249u748e5e64y6c9239cab47ce38a@mail.gmail.com> <5c3e8b1b0904031402i7fd71dfbw327b3c7ae708e29e@mail.gmail.com> Date: Sat, 4 Apr 2009 08:49:31 +0300 Message-ID: Subject: Re: [Qemu-devel] qemu working openbsd/sparc64 yet? From: Blue Swirl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On 4/4/09, Vivek Ayer wrote: > okay i run: qemu-sparc -m 256 -boot d -cdrom linux.img using the > sample sparc-linux image and I get: > > Illegal Instruction (core dumped). qemu-sparc is the BSD user emulator, which can run single BSD programs, like /bin/ls. You should use qemu-system-sparc instead. > Exactly, what steps did you take to get the linux image to run on > openbsd/sparc64. Could you show it with numbered steps so I can > troubleshoot and try to replicate your setup. Commands are prefixed with $, comments with #. # here's the list of packages, you don't need all of them, I just have libxml because OpenBIOS build uses it $ pkg_info aalib-1.4p1 ascii art library apr-1.2.11p1 Apache Portable Runtime apr-util-1.2.10p0 companion library to APR autoconf-2.59p1 automatically configure source code on many Un*x platforms bash-3.2.48 GNU Bourne Again Shell db-4.6.21 Berkeley DB package, revision 4 gettext-0.17p0 GNU gettext gmake-3.81p0 GNU make help2man-1.29p0 GNU help2man libiconv-1.9.2p5 character set conversion library libltdl-1.5.22p3 GNU libtool system independent dlopen wrapper libtool-1.5.22p14 generic shared library support script libxml-2.6.30 XML parsing library metaauto-0.7 wrapper for gnu auto* sdl-1.2.13p3 cross-platform multimedia library texi2html-1.64 texinfo to HTML converter # this setup uses an object directory because I use the source directory to build on other hosts also $ mkdir obj-sparc64-obsd $ cd obj-sparc64-obsd # the only target is sparc-softmmu $ ../configure --target-list="sparc-softmmu" --source-path=/src/qemu Install prefix /usr/local BIOS directory /usr/local/share/qemu binary directory /usr/local/bin Manual directory /usr/local/share/man ELF interp prefix /usr/gnemul/qemu-%M Source path /src/qemu C compiler gcc Host C compiler gcc ARCH_CFLAGS -m64 -mcpu=ultrasparc -D__sparc_v9__ make gmake install install host CPU sparc64 host big endian yes target list sparc-softmmu gprof enabled no sparse enabled no profiler no static build no -Werror enabled no SDL support yes SDL static link no curses support yes mingw32 support no Audio drivers oss Extra audio cards ac97 es1370 sb16 Mixer emulation no VNC TLS support no VNC SASL support no kqemu support no brlapi support no Documentation yes NPTL support no vde support no AIO support yes Install blobs yes KVM support no fdt support no The error log from compiling the libSDL test is: /usr/X11R6/lib/libXau.so.9.0: warning: strcpy() is almost always misused, please use strlcpy() /usr/X11R6/lib/libXau.so.9.0: warning: strcat() is almost always misused, please use strlcat() /usr/X11R6/lib/libX11.so.11.1: warning: sprintf() is often misused, please use snprintf() # check that SDL support is "yes" in the configure output # skip building of qemu-img and docs for faster build: $ gmake TOOLS= DOCS= # skipped most of gmake output, there should be no warnings except for the lines below LINK sparc-softmmu/qemu-system-sparc /usr/X11R6/lib/libX11.so.11.1: warning: strcpy() is almost always misused, please use strlcpy() /usr/X11R6/lib/libX11.so.11.1: warning: sprintf() is often misused, please use snprintf() /usr/X11R6/lib/libX11.so.11.1: warning: strcat() is almost always misused, please use strlcat() gmake[1]: Leaving directory `/src/qemu/obj-sparc64-obsd/sparc-softmmu' $ cd .. $ ./obj-sparc64-obsd/sparc-softmmu/qemu-system-sparc -L pc-bios -kernel ../vmlinux-2.6.11+tcx -initrd ../linux.img -append 'root=/dev/ram' # you should get the shell prompt # now with -nographic $ ./obj-sparc64-obsd/sparc-softmmu/qemu-system-sparc -L pc-bios -kernel ../vmlinux-2.6.11+tcx -initrd ../linux.img -append 'root=/dev/ram' -nographic Configuration device id QEMU version 1 machine id 32 UUID: 00000000-0000-0000-0000-000000000000 CPUs: 1 x FMI,MB86904 Welcome to OpenBIOS v1.0 built on Mar 31 2009 15:36 Type 'help' for detailed information [sparc] Kernel already loaded PROMLIB: obio_ranges 1 Booting Linux... PROMLIB: Sun Boot Prom Version 3 Revision 2 Linux version 2.6.11 (test@host) (gcc version 2.95.4 20010319 (prerelease)) #3 Tue Mar 15 18:21:10 UTC 2005 ARCH: SUN4M TYPE: SPARCstation 5 Ethernet address: 52:54:0:12:34:56 Boot time fixup v1.6. 4/Mar/98 Jakub Jelinek (jj@ultra.linux.cz). Patching kernel for srmmu[Fujitsu TurboSparc]/iommu Power off control detected. Built 1 zonelists Kernel command line: root=/dev/ram PID hash table entries: 512 (order: 9, 8192 bytes) Console: colour dummy device 80x25 Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) Memory: 119836k/130124k available (1848k kernel code, 10144k reserved, 496k data, 156k init, 0k highmem) Mount-cache hash table entries: 512 (order: 0, 4096 bytes) checking if image is initramfs...it isn't (bad gzip magic numbers); looks like an initrd Freeing initrd memory: 4096k freed NET: Registered protocol family 16 SCSI subsystem initialized IOMMU: impl 0 vers 5 table 0xf0b40000[262144 B] map [65536 b] sbus0: Clock 21.1250 MHz dma0: Revision 2 dma1: Revision 0 ioremap: done with statics, switching to malloc apc: power management initialized Initializing Cryptographic API Console: switching to colour frame buffer device 128x48 tcx: SUNW,tcx at 0:50800000, 8-bit only lp: driver loaded but no devices found zs2 at 0xfd018004 (irq = 44) is a SunZilog zs3 at 0xfd018000 (irq = 44) is a SunZilog Console: ttyS0 (SunZilog zs0) ttyS0 at MMIO 0x0 (irq = 44) is a SunZilog ttyS1 at MMIO 0x0 (irq = 44) is a SunZilog io scheduler noop registered Floppy drive(s): fd0 is 1.44M FDC 0 is a S82078B RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize loop: loaded (max 8 devices) sunlance.c:v2.02 24/Aug/03 Miguel de Icaza (miguel@nuclecu.unam.mx) SunLance: using auto-carrier-detection. eth0: LANCE 52:54:00:12:34:56 esp0: IRQ 36 SCSI ID 7 Clk 40MHz CCYC=25000 CCF=8 TOut 167 NCR53C9XF(espfast) ESP: Total of 1 ESP hosts found, 1 actually in use. scsi0 : Sparc ESP100A-FAST Vendor: QEMU Model: QEMU CD-ROM Rev: 0.10 Type: CD-ROM ANSI SCSI revision: 03 sr0: scsi3-mmc drive: 16x/50x cd/rw xa/form2 cdda tray Uniform CD-ROM driver Revision: 3.20 Attached scsi generic sg0 at scsi0, channel 0, id 2, lun 0, type 5 mice: PS/2 mouse device common for all mice input: Sun Mouse on zs/serio1 NET: Registered protocol family 2 IP: routing cache hash table of 1024 buckets, 8Kbytes TCP established hash table entries: 4096 (order: 3, 32768 bytes) TCP bind hash table entries: 4096 (order: 3, 32768 bytes) TCP: Hash tables configured (established 4096 bind 4096) NET: Registered protocol family 1 NET: Registered protocol family 17 RAMDISK: ext2 filesystem found at block 0 RAMDISK: Loading 4096KiB [1 disk] into ram disk... done. VFS: Mounted root (ext2 filesystem) readonly. Freeing unused kernel memory: 156k freed sh: can't access tty; job control turned off # uname -a Linux (none) 2.6.11 #3 Tue Mar 15 18:21:10 UTC 2005 sparc unknown # The above # line is not a comment, but Linux shell prompt command