From owner-freebsd-emulation@FreeBSD.ORG Tue Apr 4 14:48:03 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A604C16A401 for ; Tue, 4 Apr 2006 14:48:03 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from mail.ipt.ru (mail.ipt.ru [80.253.10.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA5D043D55 for ; Tue, 4 Apr 2006 14:48:02 +0000 (GMT) (envelope-from bsam@ipt.ru) Received: from doc.sem.ipt.ru ([192.168.12.1] helo=srv.sem.ipt.ru) by mail.ipt.ru with esmtp (Exim 4.54 (FreeBSD)) id 1FQmp1-000Ogw-K8; Tue, 04 Apr 2006 18:47:56 +0400 Received: from bsam by srv.sem.ipt.ru with local (Exim 4.60 (FreeBSD)) (envelope-from ) id 1FQmpE-00023Y-UE; Tue, 04 Apr 2006 18:48:08 +0400 To: mag@intron.ac References: <44326626.8060803@orchid.homeunix.org> <200604041356.k34DuQ2H035438@zhao.intron.ac> From: Boris Samorodov Date: Tue, 04 Apr 2006 18:48:08 +0400 In-Reply-To: <200604041356.k34DuQ2H035438@zhao.intron.ac> (mag@intron.ac's message of "Tue, 04 Apr 2006 20:42:44 +0800") Message-ID: <03974327@srv.sem.ipt.ru> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: freebsd-emulation@freebsd.org Subject: Re: DRI under Linux compat problem X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Apr 2006 14:48:03 -0000 --=-=-= On Tue, 04 Apr 2006 20:42:44 +0800 mag@intron.ac wrote: > I also hope linux-XFree86-libs may be upgraded to X.org libraries > in Fedora Core 3. XFree86 4.3.99 is too legacy to support many > current pieces of software. Actually, some work is already done. As soon as new releases of FreeBSD are out, linux-xorg-libs port may be committed. If you want to test it, here you are. All needed patches are at the attachments. The first one is a new port: 1. uudecode attachment 2. copy to ports/x11 2. cd ports/X11 3. tar xyvf linux-xorg-libs.tar.bz2 The second and third are patches for ports/Mk: 1. cd ports/Mk 2. patch < _two_patches_ The second patch prepares bsd.linux-rpm.mk and the third one makes linux-xorg-libs the default port for x11 libraries with linuxolator. All those patches are tested with linux_base-fc3 port. Then you may try to install a new port or replace an old one, say by "portupgrade -o x11/linux-xorg-libs linux-XFree86-libs". Any feedback is appreciated. > At the same time, Linux module in FreeBSD kernel should also be > upgraded to keep up with Linus Torvalds. Currently, too much Linux > system calls haven't been supported by FreeBSD kernel yet. > I am learning the programming environment of FreeBSD kernel to make > my own contribution to the module. > Karol Kwiatkowski wrote: > > Good day all, > > I hope this is the appropriate list. I'm trying to get DRI working > > under Linux emulation but it fails. > > I'm using linux_base-fc3 right now, but with linux_base-8 it was the > > same. I guess there's some conflict between linux_dri-4.4.0 and > > linux-XFree86-libs-4.3.99.902_7. Linux's libGL fails with: > > 'DDX DRI driver expected R200 version 4.0.x but got version 5.0.3' Karol, I can't say for sure if those patches may help you. But you may give it a try. > > Details below. > > In FreeBSD DRI is working, the video card is Radeon 9000Pro and it > > is > > using radeon driver. Any help appreciated. > > Cheers, > > Karol > > $ uname -spr > > FreeBSD 6.1-PRERELEASE i386 > > /etc/X11/xorg.conf : > > Section "Device" > > Identifier "Card0" > > Driver "ati" > > VendorName "ATI Technologies Inc" > > BoardName "Radeon RV250 If [Radeon 9000]" > > BusID "PCI:1:0:0" > > Option "AGPMode" "4" > > Option "EnableDepthMoves" "on" > > Option "EnablePageFlip" "on" > > Option "RenderAccel" "on" > > # Option "AccelMethod" "EXA" > > EndSection > > /var/log/Xorg.0.log : > > [...] > > (--) Chipset ATI Radeon 9000/PRO If (AGP/PCI) found > > (II) Loading sub module "radeon" > > (II) LoadModule: "radeon" > > (II) Loading /usr/X11R6/lib/modules/drivers/radeon_drv.so > > (II) Module radeon: vendor="X.Org Foundation" > > [...] > > (II) RADEON(0): [drm] installed DRM signal handler > > (II) RADEON(0): [DRI] installation complete > > (II) RADEON(0): [drm] Added 32 65536 byte vertex/indirect buffers > > (II) RADEON(0): [drm] Mapped 32 vertex/indirect buffers > > (II) RADEON(0): [drm] dma control initialized, using IRQ 16 > > (II) RADEON(0): [drm] Initialized kernel GART heap manager, 5111808 > > (II) RADEON(0): Direct rendering enabled > > FreeBSD' DRI: > > $ LIBGL_DEBUG=verbose glxinfo > > name of display: :0.0 > > libGL: XF86DRIGetClientDriverName: 5.0.3 r200 (screen 0) > > libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/r200_dri.so > > drmOpenByBusid: Searching for BusID pci:0000:01:00.0 > > drmOpenDevice: node name is /dev/dri/card0 > > drmOpenDevice: open result is 4, (OK) > > drmOpenByBusid: drmOpenMinor returns 4 > > drmOpenByBusid: drmGetBusid reports pci:0000:01:00.0 > > libGL error: > > Can't open configuration file /etc/drirc: No such file or directory. > > libGL error: > > Can't open configuration file /home/karol/.drirc: No such file or > > directory. > > display: :0 screen: 0 > > direct rendering: Yes > > [...] > > OpenGL vendor string: Tungsten Graphics, Inc. > > OpenGL renderer string: Mesa DRI R200 20041207 AGP 4x TCL > > OpenGL version string: 1.3 Mesa 6.4.1 > > [...] > > DRI under Linux compat: > > $ LIBGL_DEBUG=verbose /compat/linux/usr/X11R6/bin/glxinfo > > libGL: XF86DRIGetClientDriverName: 5.0.3 r200 (screen 0) > > libGL: OpenDriver: trying /usr/X11R6/lib/modules/dri/r200_dri.so > > drmOpenByBusid: busid is pci:0000:01:00.0 > > drmOpenDevice: minor is 0 > > drmOpenDevice: node name is /dev/dri/card0 > > drmOpenDevice: open result is 4, (OK) > > drmOpenByBusid: drmOpenMinor returns 4 > > drmOpenByBusid: drmGetBusid reports pci:0000:01:00.0 > > libGL error: > > DDX DRI driver expected R200 version 4.0.x but got version 5.0.3 > > libGL error: InitDriver failed > > display: :0.0 screen:0 > > direct rendering: No > > [...] > > OpenGL vendor string: Mesa project: www.mesa3d.org > > OpenGL renderer string: Mesa GLX Indirect > > OpenGL version string: 1.2 (1.5 Mesa 6.4.1) > > [...] > > $ pkg_info | cut -d " " -f 1 | grep -E "xorg|linux" | grep -v > > "xorg-fonts" > > linux-XFree86-libs-4.3.99.902_7 > > linux-aspell-0.50.4.1_1 > > linux-atk-1.8.0_1 > > linux-expat-1.95.7 > > linux-flashplugin-7.0r63 > > linux-fontconfig-2.2.3_2 > > linux-glib2-2.4.8_1 > > linux-gtk2-2.4.14_3 > > linux-jpeg-6b.33 > > linux-openmotif-2.2.4_2 > > linux-opera-8.52.20060201 > > linux-pango-1.6.0_1 > > linux-png-1.2.8 > > linux-realplayer-10.0.7.785.20060201 > > linux-tiff-3.6.1_5 > > linux_base-fc-3_1 > > linux_dri-4.4.0 > > linuxpluginwrapper-20051113 > > xorg-6.9.0 > > xorg-clients-6.9.0_2 > > xorg-documents-6.9.0 > > xorg-libraries-6.9.0 > > xorg-manpages-6.9.0 > > xorg-nestserver-6.9.0 > > xorg-printserver-6.9.0 > > xorg-server-6.9.0_1 > > xorg-vfbserver-6.9.0 WBR -- Boris B. Samorodov, Research Engineer InPharmTech Co, http://www.ipt.ru Telephone & Internet Service Provider --=-=-= Content-Disposition: attachment; filename=linux-xorg-libs.tar.bz2.uu Content-Description: linux-xorg-libs port begin 644 linux-xorg-libs.tar.bz2 M0EIH.3%!62936>%4?\P`%>E_D/RP`,!>9__W?___T/__W_I$```(8`J>;O%> M^T^N^AQ][0"ZPDEUH$JI$*/B8:(T23VB-"C9OU2%--E,&AJ--#>J,@`#!``" MJ>32>*>DT:!H````#0```:`T`!J84]%3TGJ/1E#]4>D`````--`````&95*: M0#U&F30&@::8AH,@``#0TTTQ`R!%(@1I,3T3U4_$;4IY1[35-/4R,TFC3)A# M1Y1H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=>\F&&Q`O->3W#`:1^LRV@5@!,Z`SJ`T@[0BI7;@L'+"R`T2#@X.`;8M5SX MHJP`VW_MA,.DP.(<^0Z47'Y?X''K[=.0GLYP MYA4&>?;;]UUNYN%Z-.OTO&!SFT^'6CBKV(0LE6(K=P,X&6B0&_H_KZ3^T"NRHNZA0L4>;0M1O+`L>G,WA]E05%Q]'<'`"M[R<_'O],9@4\W06HLF8E[()?(\4$PSJ;;?:TFT'% M`]X_.'H,`)`?`?D`=PH4Q,NN/8FAGQ/CNS!W'(R7Y302;[N'XI,AO!Z`-P'< M452@(!+=Z%+)Q(7"]28<)0)?GL.`7H/H@/)U`NB:`#5ID99IIB26JIJLSE"N M:TALSA`&TZB]K4.!YE-EA1LL@@@A0@6-`ME1`DD5,R.8*`@[>3]?G]WLNK65 MJN8B#CIHP060Z0NUDP*<_=E(+<8`:;W%-#])V0!8(HE5`D%1@"ZR*@@@)X,N M=<`6+#);D"3!@:OF1&"#3@E^0K4`'TZLR]5>!!AS`WUC+KY2 MI=*IQA%`>VR"(A.3L;A2'4UNP)#1RM):"&4I9&5122BR0R'%2H)!0+S@5WE$ M>L)F`ZJ%0MA()[F009;@-=:Q.N_$I MU;BPA=O`DC>8%9L[1C&P;;3:;3:"!`H4(%"A0H4*%"A0H4*0H2A`H0*%"D)( M$"!`H0*$(2!`H4A`E`(0@6RV&,`&VVVW[D5FT1OR&,'0#5!L#F7A.?><`]R- MJ"U_!N05@<4_\7 ${PLIST} && \ ${FIND} * -type d | ${SORT} | ${SED} -e 's|^|@dirrm |' > ${PLIST}.dirs @${GREP} '^@dirrm ' ${PORTSDIR}/emulators/linux_base-${_LINUX_BASE_SUFFIX}/pkg-plist | ${SORT} > ${PLIST}.shared-dirs @${COMM} -1 -3 ${PLIST}.shared-dirs ${PLIST}.dirs | ${SORT} -r >> ${PLIST} - +. endif . endif . if !target(do-install) do-install: +. if ${BRANDELF_DIRS} + @cd ${WRKSRC} && ${FIND} ${BRANDELF_DIRS} -type f -print0 \ + | ${XARGS} -0 ${FILE} | ${GREP} ELF | ${CUT} -d : -f 1 \ + | ${XARGS} ${BRANDELF} -t Linux +. endif +. if ${BRANDELF_FILES} + @cd ${WRKSRC} && ${BRANDELF} -t Linux ${BRANDELF_FILES} +. endif cd ${WRKSRC} && ${FIND} * -type d -exec ${MKDIR} "${PREFIX}/{}" \; cd ${WRKSRC} && ${FIND} * ! -type d | ${CPIO} -pm -R root:wheel ${PREFIX} . endif . if !target(new-plist) -new-plist: - @${RM} -rf ${WRKDIR}/.new-plist - @${MKDIR} ${WRKDIR}/.new-plist - @cd ${WRKDIR}/.new-plist && \ - for f in ${DISTFILES}; do \ - ${RPM2CPIO} ${_DISTDIR}/$$f | ${CPIO} -id --quiet; \ +new-plist: build + @${RM} -f ${PLIST}.new + @cd ${WRKSRC} && \ ${FIND} * ! type d | ${SORT} > ${PLIST}.new; \ ${FIND} -d * -type d | ${SED} -e 's|^|@dirrm |' >> ${PLIST}.new; \ done --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=bsd.port.mk.patch Content-Description: port.mk patch --- bsd.port.mk.orig Mon Mar 20 03:20:52 2006 +++ bsd.port.mk Mon Mar 20 03:21:09 2006 @@ -1831,7 +1831,7 @@ .if defined(USE_XLIB) . if defined(USE_LINUX) -RUN_DEPENDS+= ${LINUXBASE}/usr/X11R6/lib/libXrender.so.1:${PORTSDIR}/x11/linux-XFree86-libs +RUN_DEPENDS+= ${LINUXBASE}/usr/X11R6/lib/libXrender.so.1:${PORTSDIR}/x11/linux-xorg-libs . else LIB_DEPENDS+= X11.6:${X_LIBRARIES_PORT} . endif --=-=-=--