LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: xlwcat

最新的ATI测试驱动支持Xorg 7.1了

[复制链接]
发表于 2006-7-1 12:55:00 | 显示全部楼层
你的问题我遇到了,今天发现 xorg-x11 7.0 进入 x86 了。

于是就开始升级,情况和你的一样,VIDEO_CARDS 和 INPUT 的值都是黄色显示,后面带 % 号。
我 emerge --unmerge xorg-x11 后,再用 emerge -vp xorg-x11 就发现那些值都变成蓝色,前面有减号,应该是不起作用的,我定义的那几个关键字是红色的,应该是起作用的。
回复 支持 反对

使用道具 举报

发表于 2006-7-1 17:06:46 | 显示全部楼层
~amd64
测试没有通过。
起动的时候报drm 没有 /dev/dri/card0

没找到fglrx的内核模块。

自己编译,这个错误:
yangtse build_mod # ./make.sh
./make.sh: line 45: [: 4: unary operator expected
ATI module generator V 2.0
==========================
initializing...
cleaning...
patching 'highmem.h'...
assuming new VMA API since we do have kernel 2.6.x...
Assuming default VMAP API
doing Makefile based build for kernel 2.6.x and higher
Makefile:49: *** 混和的隐含和普通规则。 停止。
build failed with return value 2
回复 支持 反对

使用道具 举报

发表于 2006-7-1 18:55:17 | 显示全部楼层
Post by 三翻领
在装gentoo的时候就不打算装这两个东西,但是实在无奈啊
你的意思难道是说不装nvidia-kernel(glx),而只用sh装驱动就可以升级到xorg 7.1?
我的make.conf里面是video_cards,手误,不过还是不解为什么要依赖这一堆显卡驱动!!
对不起,我没说清楚,用sh 装驱时,他会问你要不要装32位gl库(具体的不记得了),装上去就相当于装上nvidia-glx包了,nvidia-glx与 >=x11-base/xorg-server-1.0.99冲突,无论如何都是装不上的。
回复 支持 反对

使用道具 举报

发表于 2006-7-1 21:38:58 | 显示全部楼层
刚作了个ati-drivers-8.27.4.ebuild,图方便去掉64位支持。
  1. # Copyright 1999-2006 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.26.18.ebuild,v 1.1 2006/06/27 23:56:44 lu_zero Exp $
  4. IUSE="opengl"
  5. inherit eutils rpm multilib linux-mod linux-info toolchain-funcs
  6. DESCRIPTION="Ati precompiled drivers for r350, r300, r250 and r200 chipsets"
  7. HOMEPAGE="http://www.ati.com"
  8. SRC_URI="x86? ( mirror://gentoo/ati-driver-installer-${PV}-x86.run )"
  9. LICENSE="ATI"
  10. KEYWORDS="-* ~x86"
  11. RDEPEND="|| ( x11-base/xorg-server virtual/x11 )
  12.          !<x11-base/xorg-server-1.0.99
  13.          app-admin/eselect-opengl
  14.          || ( sys-libs/libstdc++-v3 =sys-devel/gcc-3.3* )"
  15. DEPEND=">=virtual/linux-sources-2.4
  16.         ${RDEPEND}"
  17. PROVIDE="virtual/opengl"
  18. ATIBIN="${D}/opt/ati/bin"
  19. RESTRICT="nostrip multilib-pkg-force stricter"
  20. MODULE_NAMES="fglrx(video:${WORKDIR}/common/lib/modules/fglrx/build_mod)"
  21. QA_EXECSTACK_x86="usr/lib/xorg/modules/dri/fglrx_dri.so"
  22. QA_TEXTREL_x86="usr/lib/xorg/modules/dri/fglrx_dri.so usr/lib/opengl/ati/lib/libGL.so.1.2"
  23. choose_driver_paths() {
  24.         ARCH_DIR="${WORKDIR}/arch/x86"
  25.         COMMON_DIR="${WORKDIR}/common"
  26.         #new modular X paths, 0 is a workaround.
  27.         if has_version "x11-base/xorg-server"; then
  28.                 BASE_DIR="${WORKDIR}/x710"
  29.                 xlibdir="xorg"
  30.         else
  31.                 BASE_DIR="${WORKDIR}/x$(get_version_component_range 1 ${X11_IMPLEM_V})"
  32.                 xlibdir=""
  33.         fi
  34. }
  35. pkg_setup(){
  36.         #check kernel and sets up KV_OBJ
  37.         linux-mod_pkg_setup
  38.         local agp
  39.         ebegin "Checking for MTRR support enabled"
  40.         linux_chkconfig_present MTRR
  41.         eend $?
  42.         if [[ $? -ne 0 ]] ; then
  43.         ewarn "You don't have MTRR support enabled, the direct rendering"
  44.         ewarn "will not work."
  45.         fi
  46.         ebegin "Checking for AGP support enabled"
  47.         linux_chkconfig_present AGP
  48.         eend $?
  49.         if [[ $? -ne 0 ]] ; then
  50.                 ebegin "Checking for PCI Express support enabled"
  51.                 linux_chkconfig_present PCIEPORTBUS
  52.                 eend $?
  53.                 if [[ $? -ne 0 ]] ; then
  54.                         ewarn "If you don't have either AGP or PCI Express support enabled, direct rendering"
  55.                         ewarn "could work only using the internal support."
  56.                 fi
  57.         fi
  58.         ebegin "Checking for DRM support disabled"
  59.         ! linux_chkconfig_builtin DRM
  60.         eend $?
  61.         if [[ $? -ne 0 ]] ; then
  62.         ewarn "You have DRM support enabled builtin, the direct rendering"
  63.         ewarn "will not work."
  64.         fi
  65.         # Set up X11 implementation
  66.         if has_version "x11-base/xorg-server"; then
  67.                 X11_IMPLEM=xorg-x11
  68.         else
  69.                 X11_IMPLEM_P="$(best_version virtual/x11)"
  70.                 X11_IMPLEM="${X11_IMPLEM_P%-[0-9]*}"
  71.                 X11_IMPLEM="${X11_IMPLEM##*\/}"
  72.                 X11_IMPLEM_V="${X11_IMPLEM_P/${X11_IMPLEM}-/}"
  73.                 X11_IMPLEM_V="${X11_IMPLEM_V##*\/}"
  74.         fi
  75.         einfo "X11 implementation is ${X11_IMPLEM}."
  76.         choose_driver_paths
  77. }
  78. src_unpack() {
  79.         local OLDBIN="/usr/X11R6/bin"
  80.         ebegin "Unpacking Ati drivers"
  81.         sh ${DISTDIR}/${A} --extract ${WORKDIR} &> /dev/null
  82.         eend $? || die "unpack failed"
  83.         rm -rf ${ARCH_DIR}/usr/X11R6/bin/{fgl_glxgears,fireglcontrolpanel}
  84.         cd ${WORKDIR}/common/lib/modules/fglrx/build_mod
  85.         #if kernel_is ge 2 6 16; then
  86.         #        epatch ${FILESDIR}/${PN}-8.22.5-intermodule.patch
  87.         #        epatch ${FILESDIR}/${PN}-8.23.7-noiommu.patch
  88.         #        epatch ${FILESDIR}/${PN}-8.23.7-gcc41.patch
  89.         #fi
  90. }
  91. src_compile() {
  92.         einfo "Building the DRM module..."
  93.         cd ${WORKDIR}/common/lib/modules/fglrx/build_mod
  94.         ln -s \
  95.         ${ARCH_DIR}/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \
  96.         || die "cannot find precompiled core"
  97.         if kernel_is 2 6
  98.         then
  99.                 set_arch_to_kernel
  100.                 addwrite "/usr/src/${FK}"
  101.                 cp 2.6.x/Makefile .
  102.                 export _POSIX2_VERSION="199209"
  103.                 if use_m ;
  104.                 then
  105.                         make -C ${KV_DIR} M="`pwd`" GCC_VER_MAJ=$(gcc-major-version) \
  106.                                 modules || ewarn "DRM module not built"
  107.                 else
  108.                         make -C ${KV_DIR} SUBDIRS="`pwd`" GCC_VER_MAJ=$(gcc-major-version) \
  109.                                 modules || ewarn "DRM module not built"
  110.                 fi
  111.                 set_arch_to_portage
  112.         else
  113.                 export _POSIX2_VERSION="199209"
  114.                 # That is the dirty way to avoid the id -u check
  115.                 sed -e 's:`id -u`:0:' \
  116.                         -e "s:\`uname -r\`:${KV_FULL}:" \
  117.                         -i make.sh
  118.                 chmod +x make.sh
  119.                 ./make.sh || ewarn "DRM module not built"
  120.         fi
  121. }
  122. pkg_preinst() {
  123.         # Clean the dynamic libGL stuff's home to ensure
  124.         # we don't have stale libs floating around ...
  125.         if [ -d "${ROOT}/usr/lib/opengl/ati" ]
  126.         then
  127.                 rm -rf ${ROOT}/usr/lib/opengl/ati/*
  128.         fi
  129. }
  130. src_install() {
  131.         local ATI_LIBGL_PATH=""
  132.         cd ${WORKDIR}/common/lib/modules/fglrx/build_mod
  133.         linux-mod_src_install
  134.         cd ${WORKDIR}
  135.         local native_dir
  136.         use x86 && native_dir="lib"
  137.         # Install the libs
  138.         # MULTILIB-CLEANUP: Fix this when FEATURES=multilib-pkg is in portage
  139.         local MLTEST=$(type dyn_unpack)
  140.         if [ "${MLTEST/set_abi/}" = "${MLTEST}" ] && has_multilib_profile; then
  141.                 local OABI=${ABI}
  142.                 for ABI in $(get_install_abis); do
  143.                         src_install-libs
  144.                 done
  145.                 ABI=${OABI}
  146.                 unset OABI
  147.         elif has_multilib_profile; then
  148.                 src_install-libs
  149.         elif use amd64; then
  150.                 src_install-libs lib $(get_multilibdir)
  151.                 src_install-libs lib64 $(get_libdir)
  152.         else
  153.                 src_install-libs
  154.         fi &> /dev/null
  155.         #apps
  156.         exeinto /opt/ati/bin
  157.         doexe ${ARCH_DIR}/usr/X11R6/bin/*
  158.         #ati custom stuff
  159.         insinto /usr
  160.         doins -r ${WORKDIR}/common/usr/include
  161.         #env.d entry
  162.         cp ${FILESDIR}/09ati ${T}/
  163.         #Work around hardcoded path in 32bit libGL.so on amd64, bug 101539
  164.         if has_multilib_profile && [ $(get_abi_LIBDIR x86) = "lib32" ] ; then
  165.                 ATI_LIBGL_PATH="/usr/lib/dri:/usr/$(get_libdir)/dri:/usr/lib32/${xlibdir}/modules/dri/:/usr/$(get_libdir)/${xlibdir}/modules/dri"
  166.         fi
  167.                 cat >>${T}/09ati <<EOF
  168. LIBGL_DRIVERS_PATH="\$LIBGL_DRIVERS_PATH:$ATI_LIBGL_PATH"
  169. EOF
  170.         doenvd ${T}/09ati
  171. }
  172. src_install-libs() {
  173.         local pkglibdir=lib
  174.         local inslibdir="$(get_libdir)/${xlibdir}"
  175.         ATI_LIBGL_PATH="${ATI_LIBGL_PATH}:/usr/$(get_libdir)/${xlibdir}/modules/dri"
  176.         if [ ${#} -eq 2 ]; then
  177.                 pkglibdir=${1}
  178.                 inslibdir=${2}
  179.         elif has_multilib_profile && [ "${ABI}" == "amd64" ]; then
  180.                 pkglibdir=lib64
  181.         fi
  182.         einfo "${pkglibdir} -> ${inslibdir}"
  183.         local ATI_ROOT="/usr/$(get_libdir)/opengl/ati"
  184.         # The GLX libraries
  185.         exeinto ${ATI_ROOT}/lib
  186.         doexe ${ARCH_DIR}/usr/X11R6/${pkglibdir}/libGL.so.1.2
  187.         dosym libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so.1
  188.         dosym libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so
  189.         # Don't do this... see bug #47598
  190.         #dosym libGL.so.1.2 ${ATI_ROOT}/lib/libMesaGL.so
  191.         # same as the xorg implementation
  192.         dosym ../${X11_IMPLEM}/extensions ${ATI_ROOT}/extensions
  193.         #Workaround
  194.         if use opengl ; then
  195.         sed -e "s:libdir=.*:libdir=${ATI_ROOT}/lib:" \
  196.                 /usr/$(get_libdir)/opengl/${X11_IMPLEM}/lib/libGL.la \
  197.                 > $D/${ATI_ROOT}/lib/libGL.la
  198.         dosym ../${X11_IMPLEM}/include ${ATI_ROOT}/include
  199.         fi
  200.         # X and DRI driver
  201.         if has_version "<x11-base/xorg-x11-6.8.0-r4"
  202.         then
  203.                 local X11_DIR="/usr/X11R6/"
  204.         else
  205.                 local X11_DIR="/usr/"
  206.         fi
  207.         local X11_LIB_DIR="${X11_DIR}${inslibdir}"
  208.         exeinto ${X11_LIB_DIR}/modules/drivers
  209.         # In X.org 6.8.99 / 6.9 this is a .so
  210.         doexe ${BASE_DIR}/usr/X11R6/${pkglibdir}/modules/drivers/fglrx_drv.*o
  211.         exeinto ${X11_LIB_DIR}/modules/dri
  212.         doexe ${ARCH_DIR}/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so
  213.         doexe ${ARCH_DIR}/usr/X11R6/${pkglibdir}/modules/dri/atiogl_a_dri.so
  214.         exeinto ${X11_LIB_DIR}/modules/linux
  215.         # In X.org 6.8.99 / 6.9 this is a .so
  216.         if has_version ">=x11-base/xorg-x11-6.8.99" || \
  217.                 has_version "x11-base/xorg-server"
  218.         then
  219.                 doexe ${BASE_DIR}/usr/X11R6/${pkglibdir}/modules/linux/libfglrxdrm.so
  220.         else
  221.                 doexe ${BASE_DIR}/usr/X11R6/${pkglibdir}/modules/linux/libfglrxdrm.a
  222.         fi
  223.         if has_version ">=x11-base/xorg-x11-6.8.99" || \
  224.                 has_version "x11-base/xorg-server"
  225.         then
  226.                 cp -pPR ${ARCH_DIR}/usr/X11R6/${pkglibdir}/lib{fglrx_*,aticonfig} \
  227.                         ${D}/usr/$(get_libdir)
  228.         else
  229.                 cp -pPR ${ARCH_DIR}/usr/X11R6/${pkglibdir}/lib{fglrx_*,aticonfig.a} \
  230.                         ${D}/usr/$(get_libdir)
  231.         fi
  232.         #Not the best place
  233.         insinto ${X11_DIR}/include/X11/extensions
  234.         doins ${COMMON_DIR}/usr/X11R6/include/X11/extensions/fglrx_gamma.h
  235.         dodir /etc
  236.         cp -pPR ${COMMON_DIR}/etc/* ${D}/etc/
  237. }
  238. pkg_postinst() {
  239.         /usr/bin/eselect opengl set --use-old ati
  240.         echo
  241.         einfo "To switch to ATI OpenGL, run "eselect opengl set ati""
  242.         einfo "To change your xorg.conf you can use the bundled "aticonfig""
  243.         if use !opengl ; then
  244.         ewarn "You don't have the opengl useflag enabled, you won't be able to build"
  245.         ewarn "opengl applications nor use opengl driver features, if that isn't"
  246.         ewarn "the intended behaviour please add opengl to your useflag and issue"
  247.         ewarn "# emerge -Nu ati-drivers"
  248.         fi
  249.         echo
  250.         einfo "If you experience unexplained segmentation faults and kernel crashes"
  251.         einfo "with this driver and multi-threaded applications such as wine,"
  252.         einfo "set UseFastTLS in xorg.conf to either 0 or 1, but not 2."
  253.         # DRM module
  254.         linux-mod_pkg_postinst
  255. }
  256. pkg_postrm() {
  257.         linux-mod_pkg_postrm
  258.         /usr/bin/eselect opengl set --use-old xorg-x11
  259. }
复制代码
回复 支持 反对

使用道具 举报

发表于 2006-7-1 22:13:59 | 显示全部楼层
有问题阿,驱动下载不到。

Post by midx
刚作了个ati-drivers-8.27.4.ebuild,图方便去掉64位支持。
  1. # Copyright 1999-2006 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.26.18.ebuild,v 1.1 2006/06/27 23:56:44 lu_zero Exp $

  4. IUSE="opengl"

  5. inherit eutils rpm multilib linux-mod linux-info toolchain-funcs

  6. DESCRIPTION="Ati precompiled drivers for r350, r300, r250 and r200 chipsets"
  7. HOMEPAGE="http://www.ati.com"
  8. SRC_URI="x86? ( mirror://gentoo/ati-driver-installer-${PV}-x86.run )"

  9. LICENSE="ATI"
  10. KEYWORDS="-* ~x86"

  11. RDEPEND="|| ( x11-base/xorg-server virtual/x11 )
  12.          !<x11-base/xorg-server-1.0.99
  13.          app-admin/eselect-opengl
  14.          || ( sys-libs/libstdc++-v3 =sys-devel/gcc-3.3* )"

  15. DEPEND=">=virtual/linux-sources-2.4
  16.         ${RDEPEND}"

  17. PROVIDE="virtual/opengl"

  18. ATIBIN="${D}/opt/ati/bin"
  19. RESTRICT="nostrip multilib-pkg-force stricter"

  20. MODULE_NAMES="fglrx(video:${WORKDIR}/common/lib/modules/fglrx/build_mod)"

  21. QA_EXECSTACK_x86="usr/lib/xorg/modules/dri/fglrx_dri.so"
  22. QA_TEXTREL_x86="usr/lib/xorg/modules/dri/fglrx_dri.so usr/lib/opengl/ati/lib/libGL.so.1.2"

  23. choose_driver_paths() {
  24.         ARCH_DIR="${WORKDIR}/arch/x86"
  25.         COMMON_DIR="${WORKDIR}/common"

  26.         #new modular X paths, 0 is a workaround.
  27.         if has_version "x11-base/xorg-server"; then
  28.                 BASE_DIR="${WORKDIR}/x690"
  29.                 xlibdir="xorg"
  30.         else
  31.                 BASE_DIR="${WORKDIR}/x$(get_version_component_range 1 ${X11_IMPLEM_V})"
  32.                 xlibdir=""

  33.                 # Determine if we are facing X.org 6.8.99 aka 6.9
  34.                 if [ "$(get_version_component_range 1 ${X11_IMPLEM_V})" = 6 ] &&
  35.                    [ "$(get_version_component_range 2 ${X11_IMPLEM_V})" = 8 ] &&
  36.                    [ "$(get_version_component_range 3 ${X11_IMPLEM_V})" = 99 ]
  37.                 then
  38.                         BASE_DIR="${BASE_DIR}90"
  39.                 else
  40.                         BASE_DIR="${BASE_DIR}$(get_version_component_range 2 ${X11_IMPLEM_V})0"
  41.                 fi
  42.         fi
  43. }

  44. pkg_setup(){
  45.         #check kernel and sets up KV_OBJ
  46.         linux-mod_pkg_setup
  47.         local agp
  48.         ebegin "Checking for MTRR support enabled"
  49.         linux_chkconfig_present MTRR
  50.         eend $?
  51.         if [[ $? -ne 0 ]] ; then
  52.         ewarn "You don't have MTRR support enabled, the direct rendering"
  53.         ewarn "will not work."
  54.         fi

  55.         ebegin "Checking for AGP support enabled"
  56.         linux_chkconfig_present AGP
  57.         eend $?

  58.         if [[ $? -ne 0 ]] ; then

  59.                 ebegin "Checking for PCI Express support enabled"
  60.                 linux_chkconfig_present PCIEPORTBUS
  61.                 eend $?

  62.                 if [[ $? -ne 0 ]] ; then
  63.                         ewarn "If you don't have either AGP or PCI Express support enabled, direct rendering"
  64.                         ewarn "could work only using the internal support."
  65.                 fi

  66.         fi
  67.         ebegin "Checking for DRM support disabled"
  68.         ! linux_chkconfig_builtin DRM
  69.         eend $?
  70.         if [[ $? -ne 0 ]] ; then
  71.         ewarn "You have DRM support enabled builtin, the direct rendering"
  72.         ewarn "will not work."
  73.         fi

  74.         # Set up X11 implementation
  75.         if has_version "x11-base/xorg-server"; then
  76.                 X11_IMPLEM=xorg-x11
  77.         elif has_version "<x11-base/xorg-x11-6.8.99"; then
  78.                 X11_IMPLEM=xorg-x11
  79.                 X11_IMPLEM_V="$(best_version x11-base/xorg-x11)"
  80.                 X11_IMPLEM_V="${X11_IMPLEM_V/${X11_IMPLEM}-/}"
  81.                 X11_IMPLEM_V="${X11_IMPLEM_V##*\/}"
  82.         else
  83.                 X11_IMPLEM_P="$(best_version virtual/x11)"
  84.                 X11_IMPLEM="${X11_IMPLEM_P%-[0-9]*}"
  85.                 X11_IMPLEM="${X11_IMPLEM##*\/}"
  86.                 X11_IMPLEM_V="${X11_IMPLEM_P/${X11_IMPLEM}-/}"
  87.                 X11_IMPLEM_V="${X11_IMPLEM_V##*\/}"
  88.         fi
  89.         einfo "X11 implementation is ${X11_IMPLEM}."
  90.         choose_driver_paths
  91. }

  92. src_unpack() {
  93.         local OLDBIN="/usr/X11R6/bin"

  94.         ebegin "Unpacking Ati drivers"
  95.         sh ${DISTDIR}/${A} --extract ${WORKDIR} &> /dev/null
  96.         eend $? || die "unpack failed"

  97.         rm -rf ${ARCH_DIR}/usr/X11R6/bin/{fgl_glxgears,fireglcontrolpanel}

  98.         cd ${WORKDIR}/common/lib/modules/fglrx/build_mod

  99.         #if kernel_is ge 2 6 16; then
  100.         #        epatch ${FILESDIR}/${PN}-8.22.5-intermodule.patch
  101.         #        epatch ${FILESDIR}/${PN}-8.23.7-noiommu.patch
  102.         #        epatch ${FILESDIR}/${PN}-8.23.7-gcc41.patch
  103.         #fi
  104. }


  105. src_compile() {
  106.         einfo "Building the DRM module..."
  107.         cd ${WORKDIR}/common/lib/modules/fglrx/build_mod
  108.         ln -s \
  109.         ${ARCH_DIR}/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \
  110.         || die "cannot find precompiled core"

  111.         if kernel_is 2 6
  112.         then
  113.                 set_arch_to_kernel
  114.                 addwrite "/usr/src/${FK}"
  115.                 cp 2.6.x/Makefile .
  116.                 export _POSIX2_VERSION="199209"
  117.                 if use_m ;
  118.                 then
  119.                         make -C ${KV_DIR} M="`pwd`" GCC_VER_MAJ=$(gcc-major-version) \
  120.                                 modules || ewarn "DRM module not built"
  121.                 else
  122.                         make -C ${KV_DIR} SUBDIRS="`pwd`" GCC_VER_MAJ=$(gcc-major-version) \
  123.                                 modules || ewarn "DRM module not built"
  124.                 fi
  125.                 set_arch_to_portage
  126.         else
  127.                 export _POSIX2_VERSION="199209"
  128.                 # That is the dirty way to avoid the id -u check
  129.                 sed -e 's:`id -u`:0:' \
  130.                         -e "s:\`uname -r\`:${KV_FULL}:" \
  131.                         -i make.sh
  132.                 chmod +x make.sh
  133.                 ./make.sh || ewarn "DRM module not built"
  134.         fi
  135. }

  136. pkg_preinst() {
  137.         # Clean the dynamic libGL stuff's home to ensure
  138.         # we don't have stale libs floating around ...
  139.         if [ -d "${ROOT}/usr/lib/opengl/ati" ]
  140.         then
  141.                 rm -rf ${ROOT}/usr/lib/opengl/ati/*
  142.         fi
  143. }

  144. src_install() {
  145.         local ATI_LIBGL_PATH=""
  146.         cd ${WORKDIR}/common/lib/modules/fglrx/build_mod
  147.         linux-mod_src_install

  148.         cd ${WORKDIR}

  149.         local native_dir
  150.         use x86 && native_dir="lib"

  151.         # Install the libs
  152.         # MULTILIB-CLEANUP: Fix this when FEATURES=multilib-pkg is in portage
  153.         local MLTEST=$(type dyn_unpack)
  154.         if [ "${MLTEST/set_abi/}" = "${MLTEST}" ] && has_multilib_profile; then
  155.                 local OABI=${ABI}
  156.                 for ABI in $(get_install_abis); do
  157.                         src_install-libs
  158.                 done
  159.                 ABI=${OABI}
  160.                 unset OABI
  161.         elif has_multilib_profile; then
  162.                 src_install-libs
  163.         elif use amd64; then
  164.                 src_install-libs lib $(get_multilibdir)
  165.                 src_install-libs lib64 $(get_libdir)
  166.         else
  167.                 src_install-libs
  168.         fi &> /dev/null

  169.         #apps
  170.         exeinto /opt/ati/bin
  171.         doexe ${ARCH_DIR}/usr/X11R6/bin/*

  172.         #ati custom stuff
  173.         insinto /usr
  174.         doins -r ${WORKDIR}/common/usr/include

  175.         #env.d entry
  176.         cp ${FILESDIR}/09ati ${T}/

  177.         #Work around hardcoded path in 32bit libGL.so on amd64, bug 101539
  178.         if has_multilib_profile && [ $(get_abi_LIBDIR x86) = "lib32" ] ; then
  179.                 ATI_LIBGL_PATH="/usr/lib/dri:/usr/$(get_libdir)/dri:/usr/lib32/${xlibdir}/modules/dri/:/usr/$(get_libdir)/${xlibdir}/modules/dri"
  180.         fi
  181.                 cat >>${T}/09ati <<EOF

  182. LIBGL_DRIVERS_PATH="\$LIBGL_DRIVERS_PATH:$ATI_LIBGL_PATH"
  183. EOF

  184.         doenvd ${T}/09ati
  185. }

  186. src_install-libs() {
  187.         local pkglibdir=lib
  188.         local inslibdir="$(get_libdir)/${xlibdir}"
  189.         ATI_LIBGL_PATH="${ATI_LIBGL_PATH}:/usr/$(get_libdir)/${xlibdir}/modules/dri"
  190.         if [ ${#} -eq 2 ]; then
  191.                 pkglibdir=${1}
  192.                 inslibdir=${2}
  193.         elif has_multilib_profile && [ "${ABI}" == "amd64" ]; then
  194.                 pkglibdir=lib64
  195.         fi

  196.         einfo "${pkglibdir} -> ${inslibdir}"

  197.         local ATI_ROOT="/usr/$(get_libdir)/opengl/ati"

  198.         # The GLX libraries
  199.         exeinto ${ATI_ROOT}/lib
  200.         doexe ${ARCH_DIR}/usr/X11R6/${pkglibdir}/libGL.so.1.2
  201.         dosym libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so.1
  202.         dosym libGL.so.1.2 ${ATI_ROOT}/lib/libGL.so

  203.         # Don't do this... see bug #47598
  204.         #dosym libGL.so.1.2 ${ATI_ROOT}/lib/libMesaGL.so

  205.         # same as the xorg implementation
  206.         dosym ../${X11_IMPLEM}/extensions ${ATI_ROOT}/extensions
  207.         #Workaround
  208.         if use opengl ; then
  209.         sed -e "s:libdir=.*:libdir=${ATI_ROOT}/lib:" \
  210.                 /usr/$(get_libdir)/opengl/${X11_IMPLEM}/lib/libGL.la \
  211.                 > $D/${ATI_ROOT}/lib/libGL.la
  212.         dosym ../${X11_IMPLEM}/include ${ATI_ROOT}/include
  213.         fi
  214.         # X and DRI driver
  215.         if has_version "<x11-base/xorg-x11-6.8.0-r4"
  216.         then
  217.                 local X11_DIR="/usr/X11R6/"
  218.         else
  219.                 local X11_DIR="/usr/"
  220.         fi

  221.         local X11_LIB_DIR="${X11_DIR}${inslibdir}"

  222.         exeinto ${X11_LIB_DIR}/modules/drivers
  223.         # In X.org 6.8.99 / 6.9 this is a .so
  224.         doexe ${BASE_DIR}/usr/X11R6/${pkglibdir}/modules/drivers/fglrx_drv.*o

  225.         exeinto ${X11_LIB_DIR}/modules/dri
  226.         doexe ${ARCH_DIR}/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so
  227.         doexe ${ARCH_DIR}/usr/X11R6/${pkglibdir}/modules/dri/atiogl_a_dri.so

  228.         exeinto ${X11_LIB_DIR}/modules/linux
  229.         # In X.org 6.8.99 / 6.9 this is a .so
  230.         if has_version ">=x11-base/xorg-x11-6.8.99" || \
  231.                 has_version "x11-base/xorg-server"
  232.         then
  233.                 doexe ${BASE_DIR}/usr/X11R6/${pkglibdir}/modules/linux/libfglrxdrm.so
  234.         else
  235.                 doexe ${BASE_DIR}/usr/X11R6/${pkglibdir}/modules/linux/libfglrxdrm.a
  236.         fi

  237.         if has_version ">=x11-base/xorg-x11-6.8.99" || \
  238.                 has_version "x11-base/xorg-server"
  239.         then
  240.                 cp -pPR ${ARCH_DIR}/usr/X11R6/${pkglibdir}/lib{fglrx_*,aticonfig} \
  241.                         ${D}/usr/$(get_libdir)
  242.         else
  243.                 cp -pPR ${ARCH_DIR}/usr/X11R6/${pkglibdir}/lib{fglrx_*,aticonfig.a} \
  244.                         ${D}/usr/$(get_libdir)
  245.         fi

  246.         #Not the best place
  247.         insinto ${X11_DIR}/include/X11/extensions
  248.         doins ${COMMON_DIR}/usr/X11R6/include/X11/extensions/fglrx_gamma.h

  249.         dodir /etc
  250.         cp -pPR ${COMMON_DIR}/etc/* ${D}/etc/
  251. }


  252. pkg_postinst() {
  253.         /usr/bin/eselect opengl set --use-old ati

  254.         echo
  255.         einfo "To switch to ATI OpenGL, run "eselect opengl set ati""
  256.         einfo "To change your xorg.conf you can use the bundled "aticonfig""
  257.         if use !opengl ; then
  258.         ewarn "You don't have the opengl useflag enabled, you won't be able to build"
  259.         ewarn "opengl applications nor use opengl driver features, if that isn't"
  260.         ewarn "the intended behaviour please add opengl to your useflag and issue"
  261.         ewarn "# emerge -Nu ati-drivers"
  262.         fi
  263.         echo
  264.         einfo "If you experience unexplained segmentation faults and kernel crashes"
  265.         einfo "with this driver and multi-threaded applications such as wine,"
  266.         einfo "set UseFastTLS in xorg.conf to either 0 or 1, but not 2."
  267.         # DRM module
  268.         linux-mod_pkg_postinst
  269. }

  270. pkg_postrm() {
  271.         linux-mod_pkg_postrm
  272.         /usr/bin/eselect opengl set --use-old xorg-x11
  273. }
复制代码
回复 支持 反对

使用道具 举报

发表于 2006-7-2 13:41:13 | 显示全部楼层
不知道这个叫装没装好驱动。"~amd64" xorg7.1

  1. yangtse@yangtse ~ $ fglrxinfo
  2. display: :0.0  screen: 0
  3. OpenGL vendor string: ATI Technologies Inc.
  4. OpenGL renderer string: RADEON X300/X550 Series Generic
  5. OpenGL version string: 2.0.5946 (8.27.4)
复制代码

  1. yangtse@yangtse ~ $ fgl_glxgears
  2. Using GLX_SGIX_pbuffer
  3. 2390 frames in 5.0 seconds = 478.000 FPS
  4. 2929 frames in 5.0 seconds = 585.800 FPS
  5. 2943 frames in 5.0 seconds = 588.600 FPS
  6. 2943 frames in 5.0 seconds = 588.600 FPS
  7. 2932 frames in 5.0 seconds = 586.400 FPS
  8. 2947 frames in 5.0 seconds = 589.400 FPS
  9. yangtse@yangtse ~ $ glxgears
  10. 1258 frames in 5.0 seconds = 251.418 FPS
  11. 1256 frames in 5.0 seconds = 251.190 FPS
  12. 1255 frames in 5.0 seconds = 250.985 FPS
  13. 1256 frames in 5.0 seconds = 251.184 FPS
  14. 1258 frames in 5.0 seconds = 251.585 FPS
  15. 1261 frames in 5.0 seconds = 252.184 FPS
复制代码
回复 支持 反对

使用道具 举报

发表于 2006-7-2 15:36:28 | 显示全部楼层
yangtse@yangtse ~ $ fgl_glxgears
Using GLX_SGIX_pbuffer
2390 frames in 5.0 seconds = 478.000 FPS

yangtse@yangtse ~ $ glxgears
1258 frames in 5.0 seconds = 251.418 FPS


见鬼了, 有 fgl_glxgears 跑的比 glxgears 快的吗?

一般 glxgears 速度应该是 fgl_glxgears 5倍左右
回复 支持 反对

使用道具 举报

发表于 2006-7-2 16:01:54 | 显示全部楼层
所以俺才有疑问,俺滴显卡是装好了,还是没
回复 支持 反对

使用道具 举报

发表于 2006-7-2 19:54:58 | 显示全部楼层
Post by 夕角
对不起,我没说清楚,用sh 装驱时,他会问你要不要装32位gl库(具体的不记得了),装上去就相当于装上nvidia-glx包了,nvidia-glx与 >=x11-base/xorg-server-1.0.99冲突,无论如何都是装不上的。

可以用emerge --nodpes nvidia-glx装上的,只是要把xorg.conf中的RenderAccel改成false,不然可能会出现一些问题。ABI问题可以在startx时加-- -ignoreABI忽略。
不过我把Xorg降回了7.0,等nv9xxx出来再升级不迟。
回复 支持 反对

使用道具 举报

发表于 2006-7-2 19:56:58 | 显示全部楼层
Post by 种草得草
不知道这个叫装没装好驱动。"~amd64" xorg7.1

  1. yangtse@yangtse ~ $ fglrxinfo
  2. display: :0.0  screen: 0
  3. OpenGL vendor string: ATI Technologies Inc.
  4. OpenGL renderer string: RADEON X300/X550 Series Generic
  5. OpenGL version string: 2.0.5946 (8.27.4)
复制代码

  1. yangtse@yangtse ~ $ fgl_glxgears
  2. Using GLX_SGIX_pbuffer
  3. 2390 frames in 5.0 seconds = 478.000 FPS
  4. 2929 frames in 5.0 seconds = 585.800 FPS
  5. 2943 frames in 5.0 seconds = 588.600 FPS
  6. 2943 frames in 5.0 seconds = 588.600 FPS
  7. 2932 frames in 5.0 seconds = 586.400 FPS
  8. 2947 frames in 5.0 seconds = 589.400 FPS
  9. yangtse@yangtse ~ $ glxgears
  10. 1258 frames in 5.0 seconds = 251.418 FPS
  11. 1256 frames in 5.0 seconds = 251.190 FPS
  12. 1255 frames in 5.0 seconds = 250.985 FPS
  13. 1256 frames in 5.0 seconds = 251.184 FPS
  14. 1258 frames in 5.0 seconds = 251.585 FPS
  15. 1261 frames in 5.0 seconds = 252.184 FPS
复制代码



我的也是这种情况
我的8.27提示安装好了
但是glxgears比8.26的时候底了好多
是三位数和四位数的差别
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表