qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Qemu on FreeBSD sparc64 unresponsive.


From: Super Bisquit
Subject: [Qemu-devel] Qemu on FreeBSD sparc64 unresponsive.
Date: Mon, 25 Apr 2011 19:28:33 -0400

I'm copying the entire conversation here and adding the files.

Qemu: why is it i386, amd64, powerpc only in ports?
   Inbox
Add star
Super Bisquit
<address@hidden>        Thu, Apr 21, 2011 at 7:57 PM
To: address@hidden
Reply | Reply to all | Forward | Print | Delete | Show original
There is --disable-kvm, --disable-xen, --disable-linux-aio,
--disable-linux-user, --disable-darwin-user, and --sparc_cpu=$VERSION.



Add star
Juergen Lock
<address@hidden>        Fri, Apr 22, 2011 at 4:41 AM
To: Super Bisquit <address@hidden>
Reply | Reply to all | Forward | Print | Delete | Show original
On Thu, Apr 21, 2011 at 07:57:20PM -0400, Super Bisquit wrote:
> There is --disable-kvm, --disable-xen, --disable-linux-aio,
> --disable-linux-user, --disable-darwin-user, and --sparc_cpu=$VERSION.

The simple answer is there just was no sparc64 user yet that submitted
patches to the port...  (Does that mean those configure options you
quoted are now all that's needed on sparc?  And if you excuse the
sparc noob, what should VERSION be for the port?)

 Thanx, :)
       Juergen

Add star
Super Bisquit
<address@hidden>        Fri, Apr 22, 2011 at 8:28 AM
To: Juergen Lock <address@hidden>
Reply | Reply to all | Forward | Print | Delete | Show original
qemu-timer.g:90:52 __FreeBSD_version is not defined

>=50000 I tried changing it to 90000 but it did nothing.
Also added --disable-bsd-usr, --disable-sdl --kerneldir=/boot/kernel .
It builds vmware parts. Disabling option is ?
os-posix.c:113 has
CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME undeclared.
os-posix.o has errors.

Wondering if this can be affected by madvise and posix_madvise from configure.

Doesn't seem like editing configure helps much.
- Show quoted text -

Add star
Juergen Lock
<address@hidden>        Fri, Apr 22, 2011 at 9:02 AM
To: Super Bisquit <address@hidden>
Reply | Reply to all | Forward | Print | Delete | Show original
On Fri, Apr 22, 2011 at 08:28:40AM -0400, Super Bisquit wrote:
> qemu-timer.g:90:52 __FreeBSD_version is not defined
>
Looks like you need this patch there:

       /usr/ports/emulators/qemu-devel/files/patch-qemu-timer.h

> >=50000 I tried changing it to 90000 but it did nothing.
> Also added --disable-bsd-usr, --disable-sdl --kerneldir=/boot/kernel .
> It builds vmware parts. Disabling option is ?
> os-posix.c:113 has
> CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME undeclared.
> os-posix.o has errors.
>
 And that looks like this patch:

       /usr/ports/emulators/qemu-devel/files/patch-os-posix.c

> Wondering if this can be affected by madvise and posix_madvise from
> configure.
>
> Doesn't seem like editing configure helps much.

 Good luck! :)
       Juergen
Reply | Reply to all | Forward | Print | Delete | Show original

Add star
Super Bisquit
<address@hidden>        Fri, Apr 22, 2011 at 9:43 AM
To: Juergen Lock <address@hidden>
Reply | Reply to all | Forward | Print | Delete | Show original

I did the building from a qemu src and not ports.

I'll need to remove the for $ARCH only and then build with patches
applied to configure and files before running make?
- Show quoted text -

Add star
Juergen Lock
<address@hidden>        Fri, Apr 22, 2011 at 10:32 AM
To: Super Bisquit <address@hidden>
Reply | Reply to all | Forward | Print | Delete | Show original
On Fri, Apr 22, 2011 at 09:43:09AM -0400, Super Bisquit wrote:
> I did the building from a qemu src and not ports.
>
Yeah ok, that's why you'd need to manually apply at least those
two patches.

> I'll need to remove the for $ARCH only and then build with patches applied
> to configure and files before running make?

 You can try that too (`make patch' will extract the distfile and
apply the port patches), tho I guess you'd at least need to add
sparc64 to the .if ${ARCH} in the post-patch target so that the
libmath stuff is skipped.

 Good luck! :)
       Juergen
Reply | Reply to all | Forward | Print | Delete | Show original

Add star
Super Bisquit
<address@hidden>        Sat, Apr 23, 2011 at 2:13 AM
To: Juergen Lock <address@hidden>
Reply | Reply to all | Forward | Print | Delete | Show original
I changed the powerpc to sparc64 in the math x86 patch section  and
added sparc 64 to the .if blah blah arch .endif section
- Show quoted text -

Add star
Juergen Lock
<address@hidden>        Sat, Apr 23, 2011 at 10:39 AM
To: Super Bisquit <address@hidden>
Reply | Reply to all | Forward | Print | Delete | Show original
On Sat, Apr 23, 2011 at 02:13:51AM -0400, Super Bisquit wrote:
> I changed the powerpc to sparc64 in the math x86 patch section  and added
> sparc 64 to the .if blah blah arch .endif section

 ..and that was enough to get it all working?  (Just making sure... :)

 To confirm, you did this?

Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/emulators/qemu-devel/Makefile,v
retrieving revision 1.119
diff -u -p -r1.119 Makefile
--- Makefile    1 Apr 2011 19:30:20 -0000       1.119
+++ Makefile    23 Apr 2011 14:35:47 -0000
@@ -25,7 +25,7 @@ PATCH_STRIP=  -p1
 MAKE_ENV+=     BSD_MAKE="${MAKE}" LDFLAGS="${LDFLAGS}"
 MAN1=          qemu.1 qemu-img.1
 MAN8=          qemu-nbd.8
-ONLY_FOR_ARCHS=        amd64 i386 powerpc
+ONLY_FOR_ARCHS=        amd64 i386 powerpc sparc64
 CONFLICTS=     qemu-[0-9]*
 MAKE_JOBS_SAFE=        yes

@@ -96,7 +96,7 @@ MAKE_ARGS+=   ARCH=x86_64
 MAKE_ARGS+=    ARCH=ppc
 .endif

-.if ${OSVERSION} < 900033 && ${ARCH} == "amd64"
+.if ${OSVERSION} < 900033 && (${ARCH} == "amd64" || ${ARCH} == "sparc64")
 BUILD_DEPENDS+=        ${LOCALBASE}/bin/as:${PORTSDIR}/devel/binutils
 CONFIGURE_ENV+=        COMPILER_PATH=${LOCALBASE}/bin
 MAKE_ENV+=     COMPILER_PATH=${LOCALBASE}/bin
@@ -108,7 +108,7 @@ pre-patch:
       done

 post-patch:
-.if ${ARCH} == "powerpc"
+.if (${ARCH} == "powerpc" || ${ARCH} == "sparc64")
 .if ${OSVERSION} < 800030
 # These OSVERSION don't have all the needed long double fns in their
 # libc so just disable 80 bit floats completely.

 Thanx!
       Juergen
Reply | Reply to all | Forward | Print | Delete | Show original

Add star
Super Bisquit
<address@hidden>        Sat, Apr 23, 2011 at 3:13 PM
To: Juergen Lock <address@hidden>
Reply | Reply to all | Forward | Print | Delete | Show original
- Show quoted text -
No, not that detailed.

Just tried the sparc emulator and it hangs.

Let me redo the port with the section you gave me.

Add star
Juergen Lock
<address@hidden>        Sat, Apr 23, 2011 at 7:12 PM
To: Super Bisquit <address@hidden>
Reply | Reply to all | Forward | Print | Delete | Show original
- Show quoted text -
Try the x86 ones first (qemu, qemu_system_x86_64), im not sure
how well qemu-system-sparc64 works yet, maybe only for linux guests...
(And the bsd-user ones like qemu-sparc64 only work for extremly
simple programs at all.)

> Let me redo the port with the section you gave me.

 Good luck once more, :)
       Juergen

Add star
Super Bisquit
<address@hidden>        Sat, Apr 23, 2011 at 8:41 PM
To: Juergen Lock <address@hidden>
Reply | Reply to all | Forward | Print | Delete | Show original
# New ports collection makefile for:    qemu
# Date created:                 2004/05/31
# Whom:                         Juergen Lock <address@hidden>
#
# $FreeBSD: ports/emulators/qemu-devel/Makefile,v 1.119 2011/04/01
19:30:20 nox Exp $
#

PORTNAME=       qemu
PORTVERSION=    0.14.0
CATEGORIES=     emulators
MASTER_SITES=   SAVANNAH:release \
               LOCAL:snapshot
MASTER_SITE_SUBDIR=     qemu/:release nox/:snapshot
PKGNAMESUFFIX=  -devel
DISTFILES=      ${DISTNAME}${EXTRACT_SUFX}:release
DIST_SUBDIR=    qemu

MAINTAINER=     address@hidden
COMMENT=        QEMU CPU Emulator - development version

HAS_CONFIGURE=  yes
USE_GMAKE=      yes
USE_PERL5_BUILD=        yes
PATCH_STRIP=    -p1
 MAKE_ENV+=     BSD_MAKE="${MAKE}" LDFLAGS="${LDFLAGS}"
 MAN1=          qemu.1 qemu-img.1
 MAN8=          qemu-nbd.8
-ONLY_FOR_ARCHS=        amd64 i386 powerpc
+ONLY_FOR_ARCHS=        amd64 i386 powerpc sparc64
 CONFLICTS=     qemu-[0-9]*
 MAKE_JOBS_SAFE=        yes
OPTIONS=        SAMBA "samba dependency (for -smb)" Off \
               SDL "SDL/X dependency (graphical output)" On \
               GNUTLS "gnutls dependency (vnc encryption)" On \
               CURL "libcurl dependency (remote images)" On \
               PCAP "pcap dependency (networking with bpf)" On \
               CDROM_DMA "IDE CDROM DMA" On \
               ADD_AUDIO "Emulate more audio hardware (experimental!)" Off \
               ALL_TARGETS "Also build non-x86 and user targets" On

.include <bsd.port.pre.mk>

.if defined(WITHOUT_ALL_TARGETS)
CONFIGURE_ARGS+=
--target-list=i386-softmmu,x86_64-softmmu,arm-softmmu,cris-softmmu,m68k-softmmu,mips-softmmu,mipsel-softmmu,mips64-softmmu,mips64el-softmmu,ppc-softmmu,ppcemb-softmmu,ppc64-softmmu,sh4-softmmu,sh4eb-softmmu,sparc-softmmu,sparc64-softmmu
PLIST_SUB+=     ALLTARGETS="@comment "
.else
PLIST_SUB+=     ALLTARGETS=""
.endif

WITHOUT_CPU_CFLAGS=yes  #to avoid problems with register allocation
CFLAGS:=        ${CFLAGS:C/-fno-tree-vrp//}
CONFIGURE_ARGS+=        --prefix=${PREFIX} --cc=${CC} --enable-docs
--disable-linux-user --disable-bsd-user --disable-linux-aio
--disable-darwin-user --disable-kvm --disable-xen --sparc_cpu=v9 \
       --extra-cflags=-DSMBD_COMMAND=\\\"${LOCALBASE}/sbin/smbd\\\"\
-I${WRKSRC}\ -I${LOCALBASE}/include\ -DPREFIX=\\\"${PREFIX}\\\"

.if defined(WITHOUT_SDL)
CONFIGURE_ARGS+=        --disable-sdl
.else
USE_SDL=        sdl
.endif

.if defined(WITHOUT_GNUTLS)
CONFIGURE_ARGS+=        --disable-vnc-tls
.else
LIB_DEPENDS+=   gnutls:${PORTSDIR}/security/gnutls
.endif

.if defined(WITHOUT_CURL)
CONFIGURE_ARGS+=        --disable-curl
.else
LIB_DEPENDS+=   curl:${PORTSDIR}/ftp/curl
.endif

.if defined(WITH_PCAP)
CONFIGURE_ARGS+=        --enable-pcap
.endif

.if defined(WITH_ADD_AUDIO)
CONFIGURE_ARGS+=        --audio-card-list=ac97,es1370,sb16,cs4231a,adlib,gus
.endif

.if defined(WITH_SAMBA)
RUN_DEPENDS+=   ${LOCALBASE}/sbin/smbd:${PORTSDIR}/net/samba34
.endif

.if defined(NOPORTDOCS)
MAKE_ARGS+=     NOPORTDOCS=${NOPORTDOCS}
.else
BUILD_DEPENDS+= texi2html:${PORTSDIR}/textproc/texi2html
.endif

.if ${ARCH} == "amd64"
MAKE_ARGS+=     ARCH=x86_64
.endif

.if ${ARCH} == "powerpc"
MAKE_ARGS+=     ARCH=ppc
.endif

.if ${ARCH} == "sparc64"
MAKE_ARGS+=     ARCH=sparc64
.endif


-.if ${OSVERSION} < 900033 && ${ARCH} == "amd64"
+.if ${OSVERSION} < 900033 && (${ARCH} == "amd64" || ${ARCH} == "sparc64")
 BUILD_DEPENDS+=        ${LOCALBASE}/bin/as:${PORTSDIR}/devel/binutils
 CONFIGURE_ENV+=        COMPILER_PATH=${LOCALBASE}/bin
 MAKE_ENV+=     COMPILER_PATH=${LOCALBASE}/bin
.endif

pre-patch:
       @for A in ${ONLY_FOR_ARCHS}; do \
               ${MKDIR} ${WRKSRC}/bsd/$$A; \
       done

post-patch:
-.if ${ARCH} == "powerpc"
+.if (${ARCH} == "powerpc" || ${ARCH} == "sparc64")
 .if ${OSVERSION} < 800030
       @cd ${WRKSRC} && ${PATCH} --quiet -R ${PATCH_STRIP} <
${FILESDIR}/patch-libmath_FreeBSD-version
       @cd ${WRKSRC} && ${PATCH} --quiet -R ${PATCH_STRIP} <
${FILESDIR}/patch-fbsd
.else
# ...else we only need to disable the libmath build. (since its
# x86-specific.)
       @cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/revert-fbsd-libmath-patch
.endif
.endif
.endif

.if defined(WITH_PCAP)
       @cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/pcap-patch
.endif
.if defined(WITHOUT_CDROM_DMA)
       @cd ${WRKSRC} && ${PATCH} --quiet < ${FILESDIR}/cdrom-dma-patch
.endif
       @${REINPLACE_CMD} -E \
               -e "s|^(CFLAGS=).*|\1${CFLAGS} -fno-strict-aliasing|" \
               -e "s|^(LDFLAGS=).*|\1${LDFLAGS}|" \
               ${WRKSRC}/Makefile.target
       @${REINPLACE_CMD} -E \
               -e "s|^(CFLAGS=).*|\1${CFLAGS} -fno-strict-aliasing -I.|" \
               -e "s|^(LDFLAGS=).*|\1${LDFLAGS}|" \
               ${WRKSRC}/Makefile
       @${REINPLACE_CMD} -E \
               -e "1s|^(#! )/usr/bin/perl|\1${PERL}|" \
               ${WRKSRC}/scripts/texi2pod.pl

.if ${OSVERSION} >= 800091
# XXX need to disable usb host code on head while it's not ported to the
# new usb stack yet
post-configure:
       @${REINPLACE_CMD} -E \
               -e "s|^(HOST_USB=)bsd|\1stub|" \
               ${WRKSRC}/config-host.mak
.endif

post-install:
       @${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifup.sample ${PREFIX}/etc
       @${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifdown.sample ${PREFIX}/etc
       @if [ ! -f ${PREFIX}/etc/qemu-ifup ]; then \
           ${CP} -p ${PREFIX}/etc/qemu-ifup.sample ${PREFIX}/etc/qemu-ifup ; \
       fi
       @if [ ! -f ${PREFIX}/etc/qemu-ifdown ]; then \
           ${CP} -p ${PREFIX}/etc/qemu-ifdown.sample
${PREFIX}/etc/qemu-ifdown ; \
       fi
       @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>



"Makefile", line 104: Need an operator
"Makefile", line 105: Missing dependency operator
"Makefile", line 109: if-less endif
"Makefile", line 117: Need an operator
"Makefile", line 118: Missing dependency operator
"Makefile", line 119: Need an operator
"Makefile", line 122: if-less else
"Makefile", line 126: if-less endif
"Makefile", line 127: if-less endif
"Makefile", line 128: if-less endif
make: fatal errors encountered -- cannot continue



I did something wrong here.
- Show quoted text -
Reply | Reply to all | Forward | Print | Delete | Show original

Add star
Juergen Lock
<address@hidden>        Attachment Sun, Apr 24, 2011 at 7:14 AM
To: Super Bisquit <address@hidden>
Reply | Reply to all | Forward | Print | Delete | Show original
- Show quoted text -
That does look a bit broken yeah... :)

 What I sent you was a diff which you'd apply using patch(1); I'll
attach a new diff and this time the patched files too for you to test.
- Show quoted text -

3 attachments — Scan and download all attachments
                sparc64.patch
4K Scan and download
                Makefile
5K View Scan and download
                pkg-plist
3K View Scan and download
Reply | Reply to all | Forward | Print | Delete | Show original

Add star
Super Bisquit
<address@hidden>        Sun, Apr 24, 2011 at 6:04 PM
To: Juergen Lock <address@hidden>
Reply | Reply to all | Forward | Print | Delete | Show original
The application wouldn't completely start. I disabled sdl in this
build. Installing gtk-vnc3. Already have x11vnc but, as usual, I'm
lost.

Let me do some searching for vnc connections and then tell you more.
- Show quoted text -

Add star
Juergen Lock
<address@hidden>        Sun, Apr 24, 2011 at 6:54 PM
To: Super Bisquit <address@hidden>
Reply | Reply to all | Forward | Print | Delete | Show original
On Sun, Apr 24, 2011 at 06:04:10PM -0400, Super Bisquit wrote:
> The application wouldn't completely start. I disabled sdl in this
> build. Installing gtk-vnc3. Already have x11vnc but, as usual, I'm
> lost.

The simplest vnc setup would be passing -vnc :0 to qemu, that should
then listen on port 5900 and you should be able to connect a vncviewer
to display <host ip>:0 without password.  And if you just want to
confirm qemu is working at all you could also take an i386 freebsd
install iso (or one of the new -current bsdinstaller ones, also i386)
and run something like:

       qemu -hda bsdinstall-i386-20110411/memstick -m 512 -curses

That image can be found here:  (bunzip2 first)

       http://people.freebsd.org/~nwhitehorn/bsdinstall-i386-20110411/

 HTH,
       Juergen
Reply | Reply to all | Forward | Print | Delete | Show original

Add star
Super Bisquit
<address@hidden>        Attachment Mon, Apr 25, 2011 at 3:32 AM
To: Juergen Lock <address@hidden>
Reply | Reply to all | Forward | Print | Delete | Show original
ssvncviewer with raw local, no output.
Qemu -ncurses, unresponsive .

Okay the terminal changes to what is in the screenshot- vga blank.
I also tried :
qemu -hda memstick -hdb test.img -vnc :0 -vga cirrus -curses -m512 -boot c

and

ssvncviwer -scale 800x600.

It's working but unresponsive.
I'm going to do a debug.

Debug done did. File attached.

On 4/24/11, Juergen Lock <address@hidden> wrote:
- Show quoted text -

3 attachments — Scan and download all attachments View all images
                screenshot-2011.04.25-04.10.58.png
38K View Scan and download
                qemu-debug-crash.txt
10K View Scan and download
                qemu-shot-2
107K Scan and download
Reply | Reply to all | Forward | Print | Delete | Show original

Add star
Juergen Lock
<address@hidden>        Mon, Apr 25, 2011 at 4:11 PM
To: Super Bisquit <address@hidden>
Cc: Juergen Lock <address@hidden>
Reply | Reply to all | Forward | Print | Delete | Show original
On Mon, Apr 25, 2011 at 03:32:37AM -0400, Super Bisquit wrote:
> ssvncviewer with raw local, no output.
> Qemu -ncurses, unresponsive .
>
> Okay the terminal changes to what is in the screenshot- vga blank.
> I also tried :
> qemu -hda memstick -hdb test.img -vnc :0 -vga cirrus -curses -m512 -boot c
>
> and
>
> ssvncviwer -scale 800x600.
>
> It's working but unresponsive.
> I'm going to do a debug.
>
> Debug done did. File attached.

I think vga blank mode means the guest has switched to a graphics
mode, i.e. out of vga textmode which is the only thing -curses can
handle.  Was this directly at start or did you see the qemu bios
boot messages and only later saw the vga blank mode?  If you didn't
see the qemu bios messages at all then something else is wrong,
but if you used e.g. a debian iso instead of a freebsd one then
it was likely just the linux bootloader that switched to a vga
graphics mode which -curses cannot display.

 HTH,
       Juergen
Reply | Reply to all | Forward | Print | Delete | Show original

Add star
Juergen Lock
<address@hidden>        Mon, Apr 25, 2011 at 5:52 PM
To: Juergen Lock <address@hidden>
Cc: Super Bisquit <address@hidden>
Reply | Reply to all | Forward | Print | Delete | Show original
On Mon, Apr 25, 2011 at 10:11:54PM +0200, Juergen Lock wrote:
> On Mon, Apr 25, 2011 at 03:32:37AM -0400, Super Bisquit wrote:
> > ssvncviewer with raw local, no output.
> > Qemu -ncurses, unresponsive .
> >
> > Okay the terminal changes to what is in the screenshot- vga blank.
> > I also tried :
> > qemu -hda memstick -hdb test.img -vnc :0 -vga cirrus -curses -m512 -boot c
> >
> > and
> >
> > ssvncviwer -scale 800x600.
> >
> > It's working but unresponsive.
> > I'm going to do a debug.
> >
> > Debug done did. File attached.

Oh and I only now noticed you used there -vnc _and_ -curses, that
I guess won't really work.

 HTH,
       Juergen
Reply | Reply to all | Forward | Print | Delete | Show original

Add star
Super Bisquit
<address@hidden>        Mon, Apr 25, 2011 at 7:14 PM
To: Juergen Lock <address@hidden>
Reply | Reply to all | Forward | Print | Delete | Show original
First reply: It happens also with the FreeBSD memstick image.

The terminal from which I issue the qemu -hda memstick -hdc test.img
-usbdevice tablet -m 512 -boot c does the vga blank mode.
The boot only cd does not work. Same thing.

Same occurance with NetBSD iso.

Attachment: qemu-debug-crash.txt
Description: Text document

Attachment: qemu.png
Description: PNG image

Attachment: screenshot-2011.04.25-04.10.58.png
Description: PNG image

Attachment: Makefile
Description: Binary data

Attachment: sparc64.patch
Description: Text Data

Attachment: pkg-plist
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]