diff --git a/CHANGELOG b/CHANGELOG index 8b13789179..e69de29bb2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1 +0,0 @@ - diff --git a/Makefile b/Makefile index 5ca3295dfd..10ab9b0c07 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,24 @@ BUILD_DIRS="build.*" -all: system +all: squashfs system: - ./scripts/install image system + ./scripts/image release: - ./scripts/install image release + ./scripts/image_release -addons: - ./scripts/install image addons +squashfs: + ./scripts/image_squashfs qemu: - ./scripts/install image qemu + ./scripts/image_qemu + +vmware: + ./scripts/image_vmware + +addons: + ./scripts/image_addons clean: rm -rf $(BUILD_DIRS) diff --git a/README b/README new file mode 100644 index 0000000000..e4ea56c5ea --- /dev/null +++ b/README @@ -0,0 +1,55 @@ +http://www.OpenELEC.tv + +The Open Embedded Linux Enterainment Center – OpenELEC.tv + +OpenELEC.tv runs XBMC, a complete media center solution (xbmc.org). +The base system has been designed and built from the ground up to be as +efficient as possible – consuming only a tiny footprint, cutting edge +hardware support and a set-top box experience. + +Source code: +- https://github.com/OpenELEC/OpenELEC.tv + +Installation: +- Please read INSTALL for instructions how to install. + +Known issues: +- Testing snapshot + +Features: +- System size ~ 90MB +- Minimal hardware requirements +- Simple configuration + +Software: +- xbmc HTPC software – View/Manage all your media. +- samba server – File transfer from any PC client +- Transmission – bittorrent client +- IR/Bluetooth Remote Control + +Notes: +- Login details for SSH are user: “root” password: “openelec” + SSH allows command line access to your openelec.tv machine for configuration + and file transfer. Linux/mac clients can natively use SSH, windows users + might want to try PuTTY for their terminal access. +- $HOME is mounted on /storage (the second ext4 partition on the drive). All + data that you transfer to the machine will go here, the rest of the system is + read-only with the exception of /var (which contains runtime configuration + data). +- Manual update/downgrade procedure is as follows: + Extract the snapshot and navigate to the 'target' directory + Copy KERNEL and SYSTEM to the 'Update' network share (or /storage/.update) on + your openelec machine. + Your system will automatically upgrade during the next reboot. +- Automatic mounting of filesystems is supported. Devices such as USB Flash + Sticks can be plugged into a running machine and will be mounted to /media, + showing up in xbmc’s GUI. +- Comments and questions are more than welcome, help is even better and patches + are absolutely perfect!! + +Please visit http://www.openelec.tv or log onto our IRC chatroom #openelec on +freenode. + +Happy XBMC'ing + +OpenELEC.tv Development Team diff --git a/config/functions b/config/functions new file mode 100644 index 0000000000..949d768384 --- /dev/null +++ b/config/functions @@ -0,0 +1,153 @@ +setup_toolchain() { + if [ "$1" = "--optimize" ]; then + OPTIMIZE=yes + shift + fi + + if [ "$1" = target ]; then + export DESTIMAGE="target" + + export CC=$TARGET_CC + export CXX=$TARGET_CXX + export LD=$TARGET_LD + export AS=$TARGET_AS + export AR=$TARGET_AR + export NM=$TARGET_NM + export RANLIB=$TARGET_RANLIB + export OBJCOPY=$TARGET_OBJCOPY + export STRIP=$TARGET_STRIP + export CPPFLAGS="$TARGET_CPPFLAGS" + export CFLAGS="$TARGET_CFLAGS" + export CXXFLAGS="$TARGET_CXXFLAGS" + export LDFLAGS="$TARGET_LDFLAGS" + export PKG_CONFIG_PATH="$TARGET_PKG_CONFIG_PATH" + export PKG_CONFIG_LIBDIR="$TARGET_PKG_CONFIG_LIBDIR" + export PKG_CONFIG_SYSROOT_DIR="$TARGET_PKG_CONFIG_SYSROOT_DIR" + + # set CMAKE configfile for target + export CMAKE_CONF=$ROOT/$TOOLCHAIN/etc/cmake-$TARGET_NAME.conf + + elif [ "$1" = host ]; then + export DESTIMAGE="host" + + export AWK=$HOST_AWK + export CC=$HOST_CC + export CXX=$HOST_CXX + export LD=$HOST_LD + export AS=$HOST_AS + export AR=$HOST_AR + export NM=$HOST_NM + export RANLIB=$HOST_RANLIB + export OBJCOPY=$HOST_OBJCOPY + export STRIP=$HOST_STRIP + export CPPFLAGS="$HOST_CPPFLAGS" + export CFLAGS="$HOST_CFLAGS" + export CXXFLAGS="$HOST_CXXFLAGS" + export LDFLAGS="$HOST_LDFLAGS" + export PKG_CONFIG_PATH="$HOST_PKG_CONFIG_PATH" + export PKG_CONFIG_LIBDIR="$HOST_PKG_CONFIG_LIBDIR" + export PKG_CONFIG_SYSROOT_DIR="$HOST_PKG_CONFIG_SYSROOT_DIR" + + # set CMAKE configfile for host + export CMAKE_CONF=$ROOT/$TOOLCHAIN/etc/cmake-$HOST_NAME.conf + + fi +} + +kernel_path() { + ls -d $ROOT/$BUILD/linux-[0-9]* +} + +tolower(){ + echo "$@" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz +} + +require_eglibc() { + if [ "$TARGET_LIBC" != eglibc ]; then + echo "$1 requires eglibc, aborting." + exit 1 + fi +} + +require_cxx() { + if [ "$TOOLCHAIN_CXX" != yes ]; then + echo "$1 requires C++ toolchain support, aborting." + exit 1 + fi +} + +xorg_drv_configure_prepend() { + incdir=${SYSROOT_PREFIX}/usr/include/xorg + for f in dri.h sarea.h dristruct.h exa.h damage.h xf86Module.h; do + incfile="$incdir/$f" + if [ -f "$incfile" ]; then + p=`echo "$incfile" | sed 'y%*+%pp%;s%[^_[:alnum:]]%_%g'` + eval "export ac_cv_file_$p=yes" + fi + done +} + +add_user() { + # Usage: add_user "username" "password" "userid" "groupid" "description" "home" "shell" + mkdir -p ${INSTALL}/etc + touch ${INSTALL}/etc/passwd + if [ -z "`grep "$1:" ${INSTALL}/etc/passwd`" ]; then + echo "$1:$2:$3:$4:$5:$6:$7" >> ${INSTALL}/etc/passwd + fi +} + +add_group() { + # Usage: add_group "groupname" "groupid" ("members") + mkdir -p ${INSTALL}/etc + touch ${INSTALL}/etc/group + if [ -z "`grep "$1:" ${INSTALL}/etc/group`" ]; then + echo "$1:x:$2:$3" >> ${INSTALL}/etc/group + fi +} + +get_version() { + if [ "$OPENELEC_VERSION" = devel -o "$OPENELEC_VERSION" = debug ]; then + BUILD_DATE=`date +%Y%m%d` + GIT_BUILD=`git log --pretty=format:'' | wc -l` + OPENELEC_VERSION=$OPENELEC_VERSION-$BUILD_DATE-r$GIT_BUILD + fi + + TARGET_VERSION="$PROJECT.$TARGET_ARCH-$OPENELEC_VERSION" +} + +do_autoreconf() { + if [ -e $ROOT/$TOOLCHAIN/bin/autoreconf ] && + [ -e $ROOT/$TOOLCHAIN/bin/autoconf ] && + [ -e $ROOT/$TOOLCHAIN/bin/automake ] && + [ -e $ROOT/$TOOLCHAIN/bin/libtoolize ] && + [ -e $ROOT/$TOOLCHAIN/bin/intltoolize ]; then + export LIBTOOL=$ROOT/$TOOLCHAIN/bin/libtool + export LIBTOOLIZE=$ROOT/$TOOLCHAIN/bin/libtoolize + export AUTOMAKE=$ROOT/$TOOLCHAIN/bin/automake + export ACLOCAL_DIR=$SYSROOT_PREFIX/usr/share/aclocal + export ACLOCAL="$ROOT/$TOOLCHAIN/bin/aclocal -I $ACLOCAL_DIR" + export AUTOCONF=$ROOT/$TOOLCHAIN/bin/autoconf + export AUTOHEADER=$ROOT/$TOOLCHAIN/bin/autoheader + export AUTORECONF="$ROOT/$TOOLCHAIN/bin/autoreconf -v -f -i -I $ACLOCAL_DIR" + + mkdir -p $ACLOCAL_DIR + autoreconf --verbose --force --install -I $ACLOCAL_DIR $@ + fi +} + +strip_lto() { + # strip out LTO optimization from *FLAGS + CFLAGS=`echo $CFLAGS | sed -e "s|-flto||"` + CXXFLAGS=`echo $CXXFLAGS | sed -e "s|-flto||"` + LDFLAGS=`echo $LDFLAGS | sed -e "s|-flto||"` +} + +strip_gold() { + # strip out usage from GOLD linker + LDFLAGS=`echo $LDFLAGS | sed -e "s|-fuse-ld=gold||" -e "s|-fuse-linker-plugin||"` +} + +strip_linker_plugin() { + # strip out usage from linker plugin + LDFLAGS=`echo $LDFLAGS | sed -e "s|-fuse-linker-plugin||"` +} diff --git a/config/issue b/config/issue index f072d5948f..7b7a66e92a 100644 --- a/config/issue +++ b/config/issue @@ -1 +1 @@ -Welcome to OpenELEC - the powerfull Mediacenter4you +Welcome to OpenELEC - the powerful Mediacenter4you diff --git a/config/optimize b/config/optimize new file mode 100644 index 0000000000..206a7ef1d9 --- /dev/null +++ b/config/optimize @@ -0,0 +1,28 @@ +if [ "$OPTIMIZATIONS" = speed ];then + GCC_OPTIM="-O4" + LD_OPTIM="" +fi + +if [ "$OPTIMIZATIONS" = normal ];then + GCC_OPTIM="-O2" + LD_OPTIM="" +fi + +if [ "$OPTIMIZATIONS" = size ];then + GCC_OPTIM="-Os" + LD_OPTIM="" +fi + +GCC_OPTIM="$GCC_OPTIM -ffast-math" +GCC_OPTIM="$GCC_OPTIM -ftree-loop-distribution" +GCC_OPTIM="$GCC_OPTIM -floop-interchange" +GCC_OPTIM="$GCC_OPTIM -floop-strip-mine" +GCC_OPTIM="$GCC_OPTIM -floop-block" +GCC_OPTIM="$GCC_OPTIM -fgraphite-identity" +GCC_OPTIM="$GCC_OPTIM -fexcess-precision=fast" +GCC_OPTIM="$GCC_OPTIM -flto" + +LD_OPTIM="$LD_OPTIM -fuse-linker-plugin" +LD_OPTIM="$LD_OPTIM -fuse-ld=gold" +LD_OPTIM="$LD_OPTIM -Wl,--as-needed" + diff --git a/config/options b/config/options index d01e02ad60..cfeca9ce85 100644 --- a/config/options +++ b/config/options @@ -57,6 +57,9 @@ fi # multi-processor computer (like hyperthreading SMP CPU) CONCURRENCY_MAKE_LEVEL=`cat /proc/cpuinfo | grep -c '^processor[[:cntrl:]]*:'` +# forcing install of all packages (yes/no) + FORCE_INSTALL=no + # set jpeg library depending on ARCH if [ "$TARGET_ARCH" = "i386" -o "$TARGET_ARCH" = "x86_64" ]; then LIBJPEG="libjpeg-turbo" @@ -67,7 +70,7 @@ fi get_graphicdrivers() { if [ "$GRAPHIC_DRIVERS" = all ]; then - GRAPHIC_DRIVERS="i915 i965 r200 r300 r600 radeon nvidia" + GRAPHIC_DRIVERS="i915 i965 r200 r300 r600 radeon nvidia vmware" fi for drv in $GRAPHIC_DRIVERS; do @@ -81,23 +84,24 @@ get_graphicdrivers() { if [ $drv = i915 -o $drv = i965 ]; then XORG_DRIVERS="$XORG_DRIVERS intel" - DRM_DRIVERS="$DRM_DRIVERS intel" fi if [ $drv = r200 -o $drv = r300 -o $drv = r600 -o $drv = radeon ]; then XORG_DRIVERS="$XORG_DRIVERS ati" - DRM_DRIVERS="$DRM_DRIVERS radeon" fi if [ $drv = nouveau ]; then XORG_DRIVERS="$XORG_DRIVERS nouveau" - DRM_DRIVERS="$DRM_DRIVERS nouveau" - fi + fi if [ $drv = nvidia ]; then XORG_DRIVERS="$XORG_DRIVERS nvidia" XINERAMA_SUPPORT="yes" fi + + if [ $drv = vmware ]; then + XINERAMA_SUPPORT="yes" + fi done } diff --git a/config/path b/config/path index cf9ad9de54..bbfa2a486a 100644 --- a/config/path +++ b/config/path @@ -1,7 +1,5 @@ set -e -test -f config/target-$TARGET_PLATFORM && . config/target-$TARGET_PLATFORM - # determine architecture's family case $TARGET_ARCH in i386) @@ -26,24 +24,26 @@ if [ -z "$TARGET_CPU" ]; then esac fi +# setup initial directorys + CONFIG=config + SCRIPTS=scripts + PACKAGES=packages + SOURCES=sources + BUILD_BASE=build + TARGET=target + ADDONS=addons + +HOST_NAME=`$SCRIPTS/configtools/config.guess` TARGET_NAME=$TARGET_FAMILY-openelec-linux-gnu OPENELEC_SRC=http://sources.openelec.tv/src/$OPENELEC_VERSION -CONFIG=config -SCRIPTS=scripts -PACKAGES=packages -SOURCES=sources -BUILD_BASE=build -TARGET=target -ADDONS=addons BUILD=$BUILD_BASE.OpenELEC-$PROJECT.$TARGET_ARCH.$OPENELEC_VERSION -[ -n "$TARGET_PLATFORM" ] && BUILD=$BUILD.$TARGET_PLATFORM TARGET_IMG=$ROOT/$TARGET TARGET_ADDONS="$TARGET_IMG/$ADDONS/$ADDON_PATH" ADDON_BUILD="$BUILD/$ADDONS/$1" STAMPS_NOARCH=.stamps STAMPS=$BUILD/.stamps -INSTALLSTAMPS=$BUILD/.install +STAMPS_INSTALL=$BUILD/image/.stamps DOCS=DOCS TOOLCHAIN=$BUILD/toolchain SYSROOT_PREFIX=$ROOT/$TOOLCHAIN/$TARGET_NAME/sysroot @@ -60,13 +60,6 @@ elif [ "$OPENELEC_VERSION" = debug ]; then DEVTOOLS=yes fi -HOST_NAME_CACHE=$BUILD/configtools/host_name -if [ -f $HOST_NAME_CACHE ]; then - HOST_NAME=`cat $HOST_NAME_CACHE` -elif [ -x $BUILD/configtools/config.guess ]; then - HOST_NAME=`$BUILD/configtools/config.guess` -fi - MAKE="$ROOT/$TOOLCHAIN/bin/make" MAKEINSTALL="$ROOT/$TOOLCHAIN/bin/make -j1 DESTDIR=$SYSROOT_PREFIX install" SED="sed -i" @@ -92,11 +85,8 @@ SED="sed -i" [ -r $PKG_DIR/meta ] && . $PKG_DIR/meta [ "$PKG_IS_ADDON" = "yes" ] && PKG_ADDON_ID="addon.$PKG_SECTION.$PKG_NAME" -if [ -r $PKG_DIR/meta ]; then - PKG_BUILD=$BUILD/${PKG_NAME}\[-_]${PKG_VERSION} -else - PKG_BUILD=$BUILD/$1\[-_][0-9]* -fi + [ -d $BUILD/${PKG_NAME}[-_.]${PKG_VERSION} ] && PKG_BUILD=`ls -d $BUILD/${PKG_NAME}[-_.]${PKG_VERSION}` + [ -d $BUILD/${PKG_NAME}${PKG_VERSION} ] && PKG_BUILD=`ls -d $BUILD/${PKG_NAME}${PKG_VERSION}` XORG_PATH_ENCODINGS=/usr/share/X11/encodings XORG_PATH_FONTS=/usr/share/X11/fonts @@ -111,21 +101,7 @@ XORG_PATH_DRIVERS=/usr/lib/xorg/modules/drivers TOOLCHAIN_LANGUAGES=c [ "$TOOLCHAIN_CXX" = yes ] && TOOLCHAIN_LANGUAGES=${TOOLCHAIN_LANGUAGES},c++ -if [ "$OPTIMIZATIONS" = speed ];then - GCC_OPTIM="-O3 -ffast-math $PROJECT_CFLAGS" - GCC_OPTIM="$GCC_OPTIM -ftree-loop-distribution" - GCC_OPTIM="$GCC_OPTIM -floop-interchange" - GCC_OPTIM="$GCC_OPTIM -floop-strip-mine" - GCC_OPTIM="$GCC_OPTIM -floop-block" - GCC_OPTIM="$GCC_OPTIM -fgraphite-identity" -else - GCC_OPTIM="-Os -ffast-math $PROJECT_CFLAGS" - GCC_OPTIM="$GCC_OPTIM -ftree-loop-distribution" - GCC_OPTIM="$GCC_OPTIM -floop-interchange" - GCC_OPTIM="$GCC_OPTIM -floop-strip-mine" - GCC_OPTIM="$GCC_OPTIM -floop-block" - GCC_OPTIM="$GCC_OPTIM -fgraphite-identity" -fi +. config/optimize TARGET_CC=${TARGET_PREFIX}gcc TARGET_CXX=${TARGET_PREFIX}g++ @@ -136,33 +112,37 @@ TARGET_NM=${TARGET_PREFIX}nm TARGET_RANLIB=${TARGET_PREFIX}ranlib TARGET_OBJCOPY=${TARGET_PREFIX}objcopy TARGET_STRIP=${TARGET_PREFIX}strip + TARGET_CPPFLAGS= -TARGET_CFLAGS="$GCC_OPTIM -Wall -pipe" +TARGET_CFLAGS="-Wall -pipe $GCC_OPTIM $PROJECT_CFLAGS" TARGET_CXXFLAGS="$TARGET_CFLAGS" -TARGET_LDFLAGS="" -TARGET_PKG_CONFIG_PATH="" -TARGET_PKG_CONFIG_LIBDIR="$SYSROOT_PREFIX/usr/lib/pkgconfig:$SYSROOT_PREFIX/usr/share/pkgconfig" -TARGET_PKG_CONFIG_SYSROOT_DIR="$SYSROOT_PREFIX" +TARGET_LDFLAGS="$GCC_OPTIM $LD_OPTIM" case $TARGET_ARCH in i386) - TARGET_CFLAGS="$TARGET_CFLAGS -march=$TARGET_CPU -m32 -fexcess-precision=fast" - TARGET_CXXFLAGS="$TARGET_CXXFLAGS -march=$TARGET_CPU -m32 -fexcess-precision=fast" + TARGET_CFLAGS="$TARGET_CFLAGS -march=$TARGET_CPU -m32" + TARGET_CXXFLAGS="$TARGET_CXXFLAGS -march=$TARGET_CPU -m32" + TARGET_LDFLAGS="$TARGET_LDFLAGS -march=$TARGET_CPU -m32" ;; x86_64) - TARGET_CFLAGS="$TARGET_CFLAGS -fPIC -march=$TARGET_CPU -m64 -fexcess-precision=fast" - TARGET_CXXFLAGS="$TARGET_CXXFLAGS -fPIC -march=$TARGET_CPU -m64 -fexcess-precision=fast" + TARGET_CFLAGS="$TARGET_CFLAGS -fPIC -march=$TARGET_CPU -m64" + TARGET_CXXFLAGS="$TARGET_CXXFLAGS -fPIC -march=$TARGET_CPU -m64" + TARGET_LDFLAGS="$TARGET_LDFLAGS -fPIC -march=$TARGET_CPU -m64" ;; esac +TARGET_PKG_CONFIG_PATH="" +TARGET_PKG_CONFIG_LIBDIR="$SYSROOT_PREFIX/usr/lib/pkgconfig:$SYSROOT_PREFIX/usr/share/pkgconfig" +TARGET_PKG_CONFIG_SYSROOT_DIR="$SYSROOT_PREFIX" + if [ "$DEBUG" = yes ]; then TARGET_CFLAGS="$TARGET_CFLAGS -ggdb" TARGET_CXXFLAGS="$TARGET_CXXFLAGS -ggdb" TARGET_LDFLAGS="$TARGET_LDFLAGS -ggdb" else - TARGET_CFLAGS="$TARGET_CFLAGS -s -fomit-frame-pointer" - TARGET_CXXFLAGS="$TARGET_CXXFLAGS -s -fomit-frame-pointer" - TARGET_LDFLAGS="$TARGET_LDFLAGS -s -Wl,--as-needed" + TARGET_CFLAGS="$TARGET_CFLAGS -fomit-frame-pointer" + TARGET_CXXFLAGS="$TARGET_CXXFLAGS -fomit-frame-pointer" + TARGET_LDFLAGS="$TARGET_LDFLAGS -s" fi HOST_AWK=gawk @@ -175,22 +155,25 @@ HOST_NM=nm HOST_RANLIB=ranlib HOST_OBJCOPY=objcopy HOST_STRIP=strip + HOST_CPPFLAGS="" HOST_CFLAGS="-O2 -Wall -pipe -I$ROOT/$TOOLCHAIN/include" HOST_CXXFLAGS="$HOST_CFLAGS" HOST_LDFLAGS="-Wl,-rpath,$ROOT/$TOOLCHAIN/lib -L$ROOT/$TOOLCHAIN/lib" -HOST_PKG_CONFIG_PATH="" -HOST_PKG_CONFIG_LIBDIR="$ROOT/$TOOLCHAIN/lib/pkgconfig:$ROOT/$TOOLCHAIN/share/pkgconfig" -HOST_PKG_CONFIG_SYSROOT_DIR="" # use -fPIC when necessary case "`uname -m`" in x86_64|ppc64|arm|armeb|armel) HOST_CFLAGS="$HOST_CFLAGS -fPIC" HOST_CXXFLAGS="$HOST_CXXFLAGS -fPIC" + HOST_LDFLAGS="$HOST_LDFLAGS -fPIC" ;; esac +HOST_PKG_CONFIG_PATH="" +HOST_PKG_CONFIG_LIBDIR="$ROOT/$TOOLCHAIN/lib/pkgconfig:$ROOT/$TOOLCHAIN/share/pkgconfig" +HOST_PKG_CONFIG_SYSROOT_DIR="" + export CCACHE_DIR=$ROOT/$BUILD/.ccache export MAKEFLAGS=-j$CONCURRENCY_MAKE_LEVEL export PKG_CONFIG=$ROOT/$TOOLCHAIN/bin/pkg-config @@ -199,74 +182,10 @@ if [ -z "$PATH" -o "$PATH" = "${PATH#$ROOT/$TOOLCHAIN/bin:}" ]; then export PATH="$ROOT/$TOOLCHAIN/bin:$PATH" fi -if [ -f $ROOT/$TOOLCHAIN/bin/libtool ]; then - export LIBTOOL=$ROOT/$TOOLCHAIN/bin/libtool - export LIBTOOLIZE=$ROOT/$TOOLCHAIN/bin/libtoolize -fi +VERSION_SUFFIX=$TARGET_ARCH -if [ -f $ROOT/$TOOLCHAIN/bin/automake ]; then - export AUTOMAKE=$ROOT/$TOOLCHAIN/bin/automake - export ACLOCAL_DIR=$SYSROOT_PREFIX/usr/share/aclocal - export ACLOCAL="$ROOT/$TOOLCHAIN/bin/aclocal -I $ACLOCAL_DIR" -fi +. config/functions -if [ -f $ROOT/$TOOLCHAIN/bin/autoconf ]; then - export AUTOCONF=$ROOT/$TOOLCHAIN/bin/autoconf - export AUTOHEADER=$ROOT/$TOOLCHAIN/bin/autoheader - export AUTORECONF="$ROOT/$TOOLCHAIN/bin/autoreconf -v -f -i -I $ACLOCAL_DIR" -fi - -setup_toolchain() { - if [ "$1" = "--optimize" ]; then - OPTIMIZE=yes - shift - fi - - if [ "$1" = target ]; then - export CC=$TARGET_CC - export CXX=$TARGET_CXX - export LD=$TARGET_LD - export AS=$TARGET_AS - export AR=$TARGET_AR - export NM=$TARGET_NM - export RANLIB=$TARGET_RANLIB - export OBJCOPY=$TARGET_OBJCOPY - export STRIP=$TARGET_STRIP - export CPPFLAGS="$TARGET_CPPFLAGS" - export CFLAGS="$TARGET_CFLAGS" - export CXXFLAGS="$TARGET_CXXFLAGS" - export LDFLAGS="$TARGET_LDFLAGS" - export PKG_CONFIG_PATH="$TARGET_PKG_CONFIG_PATH" - export PKG_CONFIG_LIBDIR="$TARGET_PKG_CONFIG_LIBDIR" - export PKG_CONFIG_SYSROOT_DIR="$TARGET_PKG_CONFIG_SYSROOT_DIR" - - # set CMAKE configfile for target - export CMAKE_CONF=$ROOT/$TOOLCHAIN/etc/cmake-$TARGET_NAME.conf - - elif [ "$1" = host ]; then - export AWK=$HOST_AWK - export CC=$HOST_CC - export CXX=$HOST_CXX - export LD=$HOST_LD - export AS=$HOST_AS - export AR=$HOST_AR - export NM=$HOST_NM - export RANLIB=$HOST_RANLIB - export OBJCOPY=$HOST_OBJCOPY - export STRIP=$HOST_STRIP - export CPPFLAGS="$HOST_CPPFLAGS" - export CFLAGS="$HOST_CFLAGS" - export CXXFLAGS="$HOST_CXXFLAGS" - export LDFLAGS="$HOST_LDFLAGS" - export PKG_CONFIG_PATH="$HOST_PKG_CONFIG_PATH" - export PKG_CONFIG_LIBDIR="$HOST_PKG_CONFIG_LIBDIR" - export PKG_CONFIG_SYSROOT_DIR="$HOST_PKG_CONFIG_SYSROOT_DIR" - - # set CMAKE configfile for host - export CMAKE_CONF=$ROOT/$TOOLCHAIN/etc/cmake-$HOST_NAME.conf - - fi -} setup_toolchain target SILENT_OUT=3 @@ -280,71 +199,3 @@ else fi INDENT_SIZE=4 -VERSION_SUFFIX=$TARGET_ARCH -[ -n "$TARGET_PLATFORM" ] && VERSION_SUFFIX=$TARGET_PLATFORM - -# read generic personal options if available - if [ -f ~/.openelec/options ]; then - . ~/.openelec/options - fi - -# read project based personal options if available - if [ -f ~/.openelec/$PROJECT/options ]; then - . ~/.openelec/$PROJECT/options - fi - -PACKAGE_URL="$PKG_DIR/url" -[ -r "$PACKAGE_URL.$TARGET_ARCH" ] && PACKAGE_URL="$PACKAGE_URL.$TARGET_ARCH" -[ -n "$TARGET_PLATFORM" -a -r "$PACKAGE_URL.$TARGET_PLATFORM" ] && \ -PACKAGE_URL="$PACKAGE_URL.$TARGET_PLATFORM" - -kernel_path() { - ls -d $ROOT/$BUILD/linux-[0-9]* -} - -tolower(){ - echo "$@" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz -} - -require_eglibc() { - if [ "$TARGET_LIBC" != eglibc ]; then - echo "$1 requires eglibc, aborting." - exit 1 - fi -} - -require_cxx() { - if [ "$TOOLCHAIN_CXX" != yes ]; then - echo "$1 requires C++ toolchain support, aborting." - exit 1 - fi -} - -xorg_drv_configure_prepend() { - incdir=${SYSROOT_PREFIX}/usr/include/xorg - for f in dri.h sarea.h dristruct.h exa.h damage.h xf86Module.h; do - incfile="$incdir/$f" - if [ -f "$incfile" ]; then - p=`echo "$incfile" | sed 'y%*+%pp%;s%[^_[:alnum:]]%_%g'` - eval "export ac_cv_file_$p=yes" - fi - done -} - -add_user() { - # Usage: add_user "username" "password" "userid" "groupid" "description" "home" "shell" - mkdir -p ${INSTALL}/etc - touch ${INSTALL}/etc/passwd - if [ -z "`grep "$1:" ${INSTALL}/etc/passwd`" ]; then - echo "$1:$2:$3:$4:$5:$6:$7" >> ${INSTALL}/etc/passwd - fi -} - -add_group() { - # Usage: add_group "groupname" "groupid" ("members") - mkdir -p ${INSTALL}/etc - touch ${INSTALL}/etc/group - if [ -z "`grep "$1:" ${INSTALL}/etc/group`" ]; then - echo "$1:x:$2:$3" >> ${INSTALL}/etc/group - fi -} diff --git a/config/release/3rdparty/md5sum/README b/config/release/3rdparty/md5sum/README new file mode 100644 index 0000000000..9111d59617 --- /dev/null +++ b/config/release/3rdparty/md5sum/README @@ -0,0 +1 @@ +http://www.etree.org/md5com.html diff --git a/config/release/3rdparty/md5sum/md5sum.exe b/config/release/3rdparty/md5sum/md5sum.exe new file mode 100644 index 0000000000..64e879b7ed Binary files /dev/null and b/config/release/3rdparty/md5sum/md5sum.exe differ diff --git a/config/release/README b/config/release/README deleted file mode 100644 index fa8d29e56b..0000000000 --- a/config/release/README +++ /dev/null @@ -1,18 +0,0 @@ -This is an embedded Linux distribution based on the OpenELEC.tv Project. -(http://www.openelec.tv). - -The goal of this tarball is the testing of XBMC with the OpenELEC.tv -distribution. More information about OpenELEC.tv you can find on -http://www.openelec.tv. - -Sourcecode: - Sourcecode you can find on https://code.launchpad.net/~sraue/openelec/devel. - -Installation: - Please read INSTALL for instructions how to install. - -Known issues: -- find issue in this release - -ToDo: -- test this release diff --git a/config/release/create_installstick b/config/release/create_installstick index faebd19fd6..c0692da16b 100755 --- a/config/release/create_installstick +++ b/config/release/create_installstick @@ -56,6 +56,25 @@ echo "# Please read the instructions and use very carefully.. #" echo "# #" echo "#########################################################" +# check MD5 sums + echo "checking MD5 sum..." + md5sum -c target/KERNEL.md5 + MD5_ERROR=$? + md5sum -c target/SYSTEM.md5 + MD5_ERROR=$? + +if [ $MD5_ERROR = 1 ]; then + echo "#########################################################" + echo "# #" + echo "# OpenELEC.tv failed md5 check - Installation will quit #" + echo "# #" + echo "# Your original download was probably corrupt. #" + echo "# Please visit www.openelec.tv and get another copy #" + echo "# #" + echo "#########################################################" + exit 1 +fi + # (TODO) umount anything umount $PART @@ -92,7 +111,9 @@ echo "#########################################################" # copy files echo "copy files to $PART..." cp target/KERNEL /tmp/usb_install + cp target/KERNEL.md5 /tmp/usb_install cp target/SYSTEM /tmp/usb_install + cp target/SYSTEM.md5 /tmp/usb_install cp sample.conf/syslinux_installer.cfg /tmp/usb_install/syslinux.cfg # syncing disk diff --git a/config/release/create_installstick.bat b/config/release/create_installstick.bat index dfc71eac71..a78c4c9525 100644 --- a/config/release/create_installstick.bat +++ b/config/release/create_installstick.bat @@ -49,6 +49,10 @@ cmd /k "start %CD%\3rdparty\syslinux\win32" GOTO END :INSTALL +3rdparty\md5sum\md5sum.exe -c --status %CD%\target\SYSTEM.md5 +IF ERRORLEVEL 1 GOTO BADMD5 +3rdparty\md5sum\md5sum.exe -c --status %CD%\target\KERNEL.md5 +IF ERRORLEVEL 1 GOTO BADMD5 CLS ECHO. ECHO OpenELEC.tv USB Installer @@ -72,8 +76,22 @@ format %DRIVE% /V:INSTALL /Q /FS:FAT32 3rdparty\syslinux\win32\syslinux.exe -f -m -a %DRIVE% copy target\* %DRIVE% copy sample.conf\syslinux_installer.cfg %DRIVE%\syslinux.cfg -SET DRIVE= GOTO END +:BADMD5 +CLS +ECHO. +ECHO. +ECHO ***** OpenELEC.tv failed md5 check - Installation will quit ***** +ECHO. +ECHO. +ECHO. +ECHO Your original download was probably corrupt. +ECHO Please visit www.openelec.tv and get another copy +ECHO. +ECHO. +PAUSE + :END +SET DRIVE= SET OS= \ No newline at end of file diff --git a/config/release/sample.conf/extlinux.conf b/config/release/sample.conf/extlinux.conf index 851f2592d7..2a52c077cb 100644 --- a/config/release/sample.conf/extlinux.conf +++ b/config/release/sample.conf/extlinux.conf @@ -3,10 +3,4 @@ PROMPT 0 LABEL linux KERNEL /KERNEL - APPEND boot=/dev/sda1 disk=/dev/sdb2 quiet -LABEL text - KERNEL /KERNEL - APPEND boot=/dev/sda1 disk=/dev/sdb2 quiet textmode -LABEL debug - KERNEL /KERNEL - APPEND boot=/dev/sda1 disk=/dev/sdb2 quiet textmode debugging + APPEND boot=LABEL=BOOT disk=LABEL=STORAGE quiet diff --git a/config/release/sample.conf/grub.conf b/config/release/sample.conf/grub.conf index 6e5711f0bc..3cf75126be 100644 --- a/config/release/sample.conf/grub.conf +++ b/config/release/sample.conf/grub.conf @@ -4,12 +4,4 @@ hiddenmenu title OpenELEC.tv root (hd0,0) - kernel /KERNEL boot=/dev/sda1 disk=/dev/sda2 quiet - -title OpenELEC.tv (Textmode) - root (hd0,0) - kernel /KERNEL boot=/dev/sda1 disk=/dev/sda2 textmode quiet - -title OpenELEC.tv (Debugmode) - root (hd0,0) - kernel /KERNEL boot=/dev/sda1 disk=/dev/sda2 debugging textmode quiet + kernel /KERNEL boot=LABEL=BOOT disk=LABEL=STORAGE quiet diff --git a/config/release/sample.conf/syslinux.cfg b/config/release/sample.conf/syslinux.cfg index 804ae866c2..7fbc8700c2 100644 --- a/config/release/sample.conf/syslinux.cfg +++ b/config/release/sample.conf/syslinux.cfg @@ -3,10 +3,4 @@ PROMPT 0 LABEL linux KERNEL /KERNEL - APPEND boot=/dev/sda1 disk=/dev/sdb2 quiet -LABEL text - KERNEL /KERNEL - APPEND boot=/dev/sda1 disk=/dev/sdb2 quiet textmode -LABEL debug - KERNEL /KERNEL - APPEND boot=/dev/sda1 disk=/dev/sdb2 quiet textmode debugging + APPEND boot=LABEL=BOOT disk=LABEL=STORAGE quiet diff --git a/config/vmware/OpenELEC.nvram b/config/vmware/OpenELEC.nvram new file mode 100644 index 0000000000..6b610e10fb Binary files /dev/null and b/config/vmware/OpenELEC.nvram differ diff --git a/config/vmware/OpenELEC.vmx b/config/vmware/OpenELEC.vmx new file mode 100755 index 0000000000..4b60dec6f1 --- /dev/null +++ b/config/vmware/OpenELEC.vmx @@ -0,0 +1,55 @@ +.encoding = "UTF-8" +config.version = "8" +virtualHW.version = "7" + +displayName = "OpenELEC.tv - VMWare build" +guestOS = "other26xlinux" +nvram = "OpenELEC.nvram" +numvcpus = "2" +memsize = "1024" +mks.enable3d = "TRUE" +virtualHW.productCompatibility = "hosted" + +ide0:0.present = "TRUE" +ide0:0.fileName = "OpenELEC.flash" +ide0:1.present = "TRUE" +ide0:1.fileName = "OpenELEC.storage" +ide1:0.present = "TRUE" +ide1:0.autodetect = "TRUE" +ide1:0.startConnected = "FALSE" +ide1:0.deviceType = "cdrom-raw" +ide1:1.present = "FALSE" +scsi0.present = "FALSE" +floppy0.present = "FALSE" + +ethernet0.present = "TRUE" +ethernet0.connectionType = "nat" +ethernet0.wakeOnPcktRcv = "FALSE" +ethernet0.addressType = "generated" + +usb.present = "TRUE" +ehci.present = "TRUE" + +sound.present = "TRUE" +sound.startConnected = "TRUE" +sound.fileName = "-1" +sound.autodetect = "TRUE" + +extendedConfigFile = "OpenELEC.vmxf" +ethernet0.generatedAddress = "00:0c:29:39:05:27" +uuid.location = "56 4d 6b b5 e7 5c 8d 13-cc 60 70 2d 4f 39 05 27" +uuid.bios = "56 4d 6b b5 e7 5c 8d 13-cc 60 70 2d 4f 39 05 27" +cleanShutdown = "TRUE" +replay.supported = "FALSE" +replay.filename = "" +ide0:0.redo = "" +ide0:1.redo = "" +usb.pciSlotNumber = "16" +ethernet0.pciSlotNumber = "17" +sound.pciSlotNumber = "18" +ehci.pciSlotNumber = "19" +vmotion.checkpointFBSize = "134217728" +ethernet0.generatedAddressOffset = "0" +debugStub.linuxOffsets = "0x0,0xffffffff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0" +tools.remindInstall = "TRUE" +ide1:0.fileName = "auto detect" diff --git a/packages/accessibility/atk/meta b/packages/accessibility/atk/meta index 260ed4d18f..61d92e227b 100644 --- a/packages/accessibility/atk/meta +++ b/packages/accessibility/atk/meta @@ -4,7 +4,7 @@ PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://library.gnome.org/devel/atk/" -PKG_URL="http://ftp.gnome.org/pub/gnome/sources/$PKG_NAME/1.30/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_URL="http://ftp.gnome.org/pub/gnome/sources/$PKG_NAME/1.32/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="glib" PKG_BUILD_DEPENDS="toolchain glib" PKG_PRIORITY="optional" @@ -12,3 +12,5 @@ PKG_SECTION="accessibility" PKG_SHORTDESC="ATK - Accessibility Toolkit" PKG_LONGDESC="ATK provides the set of accessibility interfaces that are implemented by other toolkits and applications. Using the ATK interfaces, accessibility tools have full access to view and control running applications." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/addons/emulators/mame/addon b/packages/addons/emulators/mame/addon deleted file mode 100755 index e04f1ed1c4..0000000000 --- a/packages/addons/emulators/mame/addon +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -. config/options $1 - -mkdir -p $ADDON_BUILD/mkimage - cp $PKG_DIR/config/mame.ini $ADDON_BUILD/mkimage - -mkdir -p $ADDON_BUILD/mkimage/bin - cp $PKG_BUILD/mame $ADDON_BUILD/mkimage/bin diff --git a/packages/addons/emulators/mame/build b/packages/addons/emulators/mame/build deleted file mode 100755 index 1ce9eaf819..0000000000 --- a/packages/addons/emulators/mame/build +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh - -. config/options $1 - -cd $PKG_BUILD - -# some hacks to build hosttools - setup_toolchain host - - mkdir -p obj/sdl/mame/build \ - obj/sdl/mame/osd/sdl \ - obj/sdl/mame/lib/util \ - obj/sdl/mame/lib/zlib \ - obj/sdl/mame/emu/cpu/m68000 \ - obj/sdl/mame/emu/cpu/tms57002 - - make BUILD_EXPAT=1 SDL_INSTALL_ROOT="/usr" obj/sdl/mame/build/file2str - make BUILD_EXPAT=1 SDL_INSTALL_ROOT="/usr" obj/sdl/mame/build/png2bdc - make BUILD_EXPAT=1 SDL_INSTALL_ROOT="/usr" obj/sdl/mame/build/m68kmake - make BUILD_EXPAT=1 SDL_INSTALL_ROOT="/usr" obj/sdl/mame/build/tmsmake - - cp obj/sdl/mame/build/file2str $ROOT/$TOOLCHAIN/bin/mame-file2str - cp obj/sdl/mame/build/png2bdc $ROOT/$TOOLCHAIN/bin/mame-png2bdc - cp obj/sdl/mame/build/m68kmake $ROOT/$TOOLCHAIN/bin/mame-m68kmake - cp obj/sdl/mame/build/tmsmake $ROOT/$TOOLCHAIN/bin/mame-tmsmake - - make clean - -# now build - setup_toolchain target - - if [ "$TARGET_ARCH" = x86_64 ]; then - ARCH_OPTS="PTR64=1" - else - ARCH_OPTS="PTR64=0" - fi - - if [ "$DEBUG" = yes ]; then - DEBUG_OPTS="OPTIMIZE=0 DEBUG=1 SYMBOLS=1 PROFILER=1 PROFILE=1" - else - DEBUG_OPTS="OPTIMIZE=3" - fi - - make CC="$TARGET_CC" \ - AR="$TARGET_AR" \ - LD="$TARGET_CXX" \ - ARCHOPTS="$TARGET_CFLAGS" \ - OPT_FLAGS='-DINI_PATH="\".\""' \ - NO_DEBUGGER=1 \ - NOWERROR=1 \ - BUILD_EXPAT=0 \ - BUILD_ZLIB=0 \ - SUFFIX64="" \ - $ARCH_OPTS \ - $DEBUG_OPTS diff --git a/packages/addons/emulators/mame/changelog.txt b/packages/addons/emulators/mame/changelog.txt deleted file mode 100644 index b4cb93ca4c..0000000000 --- a/packages/addons/emulators/mame/changelog.txt +++ /dev/null @@ -1,5 +0,0 @@ -0.90.2 - - update to MAME 0.139s - -0.90.1 - - initial version MAME 0.138s diff --git a/packages/addons/emulators/mame/config/mame.ini b/packages/addons/emulators/mame/config/mame.ini deleted file mode 100644 index d2dde9be10..0000000000 --- a/packages/addons/emulators/mame/config/mame.ini +++ /dev/null @@ -1,266 +0,0 @@ - - -# -# CORE CONFIGURATION OPTIONS -# -readconfig 1 - -# -# CORE SEARCH PATH OPTIONS -# -rompath $HOME/emulators/mame/roms -samplepath $HOME/emulators/mame/samples -artpath $HOME/emulators/mame/artwork -ctrlrpath $HOME/emulators/mame/ctrlr -inipath /etc/mame;$HOME/.config -fontpath $HOME/emulators/mame/fonts -cheatpath $HOME/emulators/mame/cheat -crosshairpath $HOME/emulators/mame/crosshair - -# -# CORE OUTPUT DIRECTORY OPTIONS -# -cfg_directory $HOME/emulators/mame/cfg -nvram_directory $HOME/emulators/mame/nvram -memcard_directory $HOME/emulators/mame/memcard -input_directory $HOME/emulators/mame/inp -state_directory $HOME/emulators/mame/sta -snapshot_directory $HOME/emulators/mame/snap -diff_directory $HOME/emulators/mame/diff -comment_directory $HOME/emulators/mame/comments - -# -# CORE STATE/PLAYBACK OPTIONS -# -state -autosave 1 -playback -record -mngwrite -aviwrite -wavwrite -snapname %g/%i -snapsize auto -snapview internal -burnin 0 - -# -# CORE PERFORMANCE OPTIONS -# -autoframeskip 0 -frameskip 0 -seconds_to_run 0 -throttle 1 -sleep 1 -speed 1.0 -refreshspeed 0 - -# -# CORE ROTATION OPTIONS -# -rotate 1 -ror 0 -rol 0 -autoror 0 -autorol 0 -flipx 0 -flipy 0 - -# -# CORE ARTWORK OPTIONS -# -artwork_crop 0 -use_backdrops 1 -use_overlays 1 -use_bezels 1 - -# -# CORE SCREEN OPTIONS -# -brightness 1.0 -contrast 1.0 -gamma 1.0 -pause_brightness 0.65 - -# -# CORE VECTOR OPTIONS -# -antialias 1 -beam 1.0 -flicker 0 - -# -# CORE SOUND OPTIONS -# -sound 1 -samplerate 48000 -samples 1 -volume 0 - -# -# CORE INPUT OPTIONS -# -coin_lockout 1 -ctrlr -mouse 0 -joystick 1 -lightgun 0 -multikeyboard 0 -multimouse 0 -steadykey 0 -offscreen_reload 0 -joystick_map auto -joystick_deadzone 0.3 -joystick_saturation 0.85 -natural 0 -uimodekey auto - -# -# CORE INPUT AUTOMATIC ENABLE OPTIONS -# -paddle_device keyboard -adstick_device keyboard -pedal_device keyboard -dial_device keyboard -trackball_device keyboard -lightgun_device keyboard -positional_device keyboard -mouse_device mouse - -# -# CORE DEBUGGING OPTIONS -# -log 0 -verbose 0 -update_in_pause 0 -debug 0 -debugscript -debug_internal 0 - -# -# CORE MISC OPTIONS -# -bios -cheat 0 -skip_gameinfo 0 - -# -# DEBUGGING OPTIONS -# -oslog 0 - -# -# PERFORMANCE OPTIONS -# -multithreading 1 -numprocessors auto -sdlvideofps 0 - -# -# VIDEO OPTIONS -# -video opengl -numscreens 1 -window 0 -maximize 1 -keepaspect 1 -unevenstretch 1 -effect none -centerh 1 -centerv 1 -waitvsync 0 -scalemode none - -# -# OpenGL-SPECIFIC OPTIONS -# -filter 1 -prescale 1 -gl_forcepow2texture 0 -gl_notexturerect 0 -gl_vbo 1 -gl_pbo 1 -gl_glsl 0 -gl_glsl_filter 1 -glsl_shader_mame0 none -glsl_shader_mame1 none -glsl_shader_mame2 none -glsl_shader_mame3 none -glsl_shader_mame4 none -glsl_shader_mame5 none -glsl_shader_mame6 none -glsl_shader_mame7 none -glsl_shader_mame8 none -glsl_shader_mame9 none -glsl_shader_screen0 none -glsl_shader_screen1 none -glsl_shader_screen2 none -glsl_shader_screen3 none -glsl_shader_screen4 none -glsl_shader_screen5 none -glsl_shader_screen6 none -glsl_shader_screen7 none -glsl_shader_screen8 none -glsl_shader_screen9 none -gl_glsl_vid_attr 1 - -# -# PER-WINDOW VIDEO OPTIONS -# -screen auto -aspect auto -resolution auto -view auto -screen0 auto -aspect0 auto -resolution0 auto -view0 auto -screen1 auto -aspect1 auto -resolution1 auto -view1 auto -screen2 auto -aspect2 auto -resolution2 auto -view2 auto -screen3 auto -aspect3 auto -resolution3 auto -view3 auto - -# -# FULL SCREEN OPTIONS -# -switchres 0 -useallheads 0 - -# -# SOUND OPTIONS -# -audio_latency 3 - -# -# SDL KEYBOARD MAPPING -# -keymap 0 -keymap_file keymap.dat - -# -# SDL JOYSTICK MAPPING -# -joy_idx1 auto -joy_idx2 auto -joy_idx3 auto -joy_idx4 auto -joy_idx5 auto -joy_idx6 auto -joy_idx7 auto -joy_idx8 auto -sixaxis 0 - -# -# SDL LOWLEVEL DRIVER OPTIONS -# -videodriver auto -audiodriver auto -gl_lib auto diff --git a/packages/addons/emulators/mame/icon/icon.png b/packages/addons/emulators/mame/icon/icon.png deleted file mode 100644 index c16a233fe9..0000000000 Binary files a/packages/addons/emulators/mame/icon/icon.png and /dev/null differ diff --git a/packages/addons/emulators/mame/meta b/packages/addons/emulators/mame/meta deleted file mode 100644 index a25dfb510b..0000000000 --- a/packages/addons/emulators/mame/meta +++ /dev/null @@ -1,14 +0,0 @@ -PKG_NAME="mame" -PKG_VERSION="0139s" -PKG_REV="2" -PKG_ARCH="any" -PKG_LICENSE="free" -PKG_SITE="http://www.mame.org" -PKG_URL="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="libX11 libXinerama SDL expat zlib" -PKG_BUILD_DEPENDS="toolchain libX11 libXinerama SDL expat zlib" -PKG_PRIORITY="optional" -PKG_SECTION="emulators" -PKG_SHORTDESC="(Emulator) MAME: Multiple Arcade Machine Emulator" -PKG_LONGDESC="MAME stands for Multiple Arcade Machine Emulator. When used in conjunction with images of the original arcade game's ROM and disk data, MAME attempts to reproduce that game as faithfully as possible on a more modern general-purpose computer. MAME can currently emulate several thousand different classic arcade video games from the late 1970s through the modern era." -PKG_IS_ADDON="yes" diff --git a/packages/addons/emulators/mame/patches/mame-0138s-cross.diff b/packages/addons/emulators/mame/patches/mame-0138s-cross.diff deleted file mode 100644 index 6e56e84c68..0000000000 --- a/packages/addons/emulators/mame/patches/mame-0138s-cross.diff +++ /dev/null @@ -1,84 +0,0 @@ -diff -Naur mame-0138s/makefile mame-0138s.patch/makefile ---- mame-0138s/makefile 2010-05-13 11:12:54.000000000 +0200 -+++ mame-0138s.patch/makefile 2010-07-13 01:04:52.722999679 +0200 -@@ -206,10 +206,10 @@ - # BIGENDIAN = 1 - - # uncomment next line to build expat as part of MAME build --BUILD_EXPAT = 1 -+# BUILD_EXPAT = 1 - - # uncomment next line to build zlib as part of MAME build --BUILD_ZLIB = 1 -+# BUILD_ZLIB = 1 - - # uncomment next line to include the symbols - # SYMBOLS = 1 -@@ -439,7 +439,7 @@ - ifneq ($(OPTIMIZE),0) - ifneq ($(TARGETOS),os2) - ifndef NOWERROR --CCOMFLAGS += -Werror -fno-strict-aliasing $(ARCHOPTS) -+CCOMFLAGS += -fno-strict-aliasing $(ARCHOPTS) - else - CCOMFLAGS += -fno-strict-aliasing $(ARCHOPTS) - endif -@@ -706,12 +706,12 @@ - - $(OBJ)/%.lh: $(SRC)/%.lay $(FILE2STR) - @echo Converting $<... -- @$(FILE2STR) $< $@ layout_$(basename $(notdir $<)) -+ @mame-file2str $< $@ layout_$(basename $(notdir $<)) - - $(OBJ)/%.fh: $(SRC)/%.png $(PNG2BDC) $(FILE2STR) - @echo Converting $<... -- @$(PNG2BDC) $< $(OBJ)/temp.bdc -- @$(FILE2STR) $(OBJ)/temp.bdc $@ font_$(basename $(notdir $<)) UINT8 -+ @mame-png2bdc $< $(OBJ)/temp.bdc -+ @mame-file2str $(OBJ)/temp.bdc $@ font_$(basename $(notdir $<)) UINT8 - - $(OBJ)/%.a: - @echo Archiving $@... -diff -Naur mame-0138s/src/emu/cpu/cpu.mak mame-0138s.patch/src/emu/cpu/cpu.mak ---- mame-0138s/src/emu/cpu/cpu.mak 2010-02-03 22:20:20.000000000 +0100 -+++ mame-0138s.patch/src/emu/cpu/cpu.mak 2010-07-12 23:04:03.416999399 +0200 -@@ -1019,7 +1019,7 @@ - # rule to generate the C files - $(CPUOBJ)/m68000/m68kops.c: $(M68KMAKE) $(CPUSRC)/m68000/m68k_in.c - @echo Generating M68K source files... -- $(M68KMAKE) $(CPUOBJ)/m68000 $(CPUSRC)/m68000/m68k_in.c -+ mame-m68kmake$(EXE) $(CPUOBJ)/m68000 $(CPUSRC)/m68000/m68k_in.c - - # rule to build the generator - ifneq ($(CROSS_BUILD),1) -@@ -1548,7 +1548,7 @@ - # rule to generate the C file - $(CPUOBJ)/tms57002/tms57002.inc: $(TMSMAKE) $(CPUSRC)/tms57002/tmsinstr.lst - @echo Generating TMS57002 source file... -- $(TMSMAKE) $(CPUSRC)/tms57002/tmsinstr.lst $@ -+ mame-tmsmake$(EXE) $(CPUSRC)/tms57002/tmsinstr.lst $@ - - # rule to build the generator - ifneq ($(CROSS_BUILD),1) -diff -Naur mame-0138s/src/osd/sdl/sdl.mak mame-0138s.patch/src/osd/sdl/sdl.mak ---- mame-0138s/src/osd/sdl/sdl.mak 2010-02-14 04:47:30.000000000 +0100 -+++ mame-0138s.patch/src/osd/sdl/sdl.mak 2010-07-13 01:07:47.158999892 +0200 -@@ -454,14 +454,14 @@ - - # the new debugger relies on GTK+ in addition to the base SDLMAME needs - # Non-X11 builds can not use the debugger --CCOMFLAGS += `pkg-config --cflags gtk+-2.0` `pkg-config --cflags gconf-2.0` --LIBS += `pkg-config --libs gtk+-2.0` `pkg-config --libs gconf-2.0` -+#CCOMFLAGS += `pkg-config --cflags gtk+-2.0` `pkg-config --cflags gconf-2.0` -+#LIBS += `pkg-config --libs gtk+-2.0` `pkg-config --libs gconf-2.0` - #CCOMFLAGS += -DGTK_DISABLE_DEPRECATED - - # some systems still put important things in a different prefix --LIBS += -L/usr/X11/lib -L/usr/X11R6/lib -L/usr/openwin/lib -+#LIBS += -L/usr/X11/lib -L/usr/X11R6/lib -L/usr/openwin/lib - # make sure we can find X headers --CCOMFLAGS += -I/usr/X11/include -I/usr/X11R6/include -I/usr/openwin/include -+# CCOMFLAGS += -I/usr/X11/include -I/usr/X11R6/include -I/usr/openwin/include - endif # NO_X11 - - #------------------------------------------------- diff --git a/packages/addons/games/megaglest-data/meta b/packages/addons/games/megaglest-data/meta index a2769deef1..b19d1410b1 100644 --- a/packages/addons/games/megaglest-data/meta +++ b/packages/addons/games/megaglest-data/meta @@ -1,6 +1,6 @@ PKG_NAME="megaglest-data" -PKG_VERSION="3.3.5" -PKG_REV="1" +PKG_VERSION="3.3.7.2" +PKG_REV="2" PKG_ARCH="any" PKG_LICENSE="OSS" PKG_SITE="http://www.glest.org" @@ -12,3 +12,5 @@ PKG_SECTION="games" PKG_SHORTDESC="(Game) MegaGlest: a free 3D real-time strategy game" PKG_LONGDESC="Glest is a free 3D real-time strategy game, where you control the armies of two different factions: Tech, which is mainly composed of warriors and mechanical devices, and Magic, that prefers mages and summoned creatures in the battlefield." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/addons/games/megaglest-source/meta b/packages/addons/games/megaglest-source/meta index c2e0659af4..98262e0e32 100644 --- a/packages/addons/games/megaglest-source/meta +++ b/packages/addons/games/megaglest-source/meta @@ -1,14 +1,16 @@ PKG_NAME="megaglest-source" -PKG_VERSION="3.3.5" -PKG_REV="1" +PKG_VERSION="3.3.7.2" +PKG_REV="2" PKG_ARCH="any" PKG_LICENSE="OSS" PKG_SITE="http://www.glest.org" PKG_URL="http://downloads.sourceforge.net/project/megaglest/current_release/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="curl xerces-c $LIBJPEG libpng libvorbis libogg SDL openal-soft libX11 $MESA" -PKG_BUILD_DEPENDS="toolchain lua curl xerces-c $LIBJPEG libpng libvorbis libogg SDL openal-soft libX11 $MESA" +PKG_DEPENDS="curl xerces-c $LIBJPEG libpng libvorbis libogg SDL openal-soft libX11 Mesa" +PKG_BUILD_DEPENDS="toolchain lua curl xerces-c $LIBJPEG libpng libvorbis libogg SDL openal-soft libX11 Mesa" PKG_PRIORITY="optional" PKG_SECTION="games" PKG_SHORTDESC="(Game) MegaGlest: a free 3D real-time strategy game" PKG_LONGDESC="Glest is a free 3D real-time strategy game, where you control the armies of two different factions: Tech, which is mainly composed of warriors and mechanical devices, and Magic, that prefers mages and summoned creatures in the battlefield." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/addons/games/megaglest-source/patches/megaglest-3.5.5-add_missing_icons-0.1.diff b/packages/addons/games/megaglest-source/patches/megaglest-3.5.5-add_missing_icons-0.1.diff deleted file mode 100644 index 7f95265319..0000000000 --- a/packages/addons/games/megaglest-source/patches/megaglest-3.5.5-add_missing_icons-0.1.diff +++ /dev/null @@ -1,1950 +0,0 @@ -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_gradient_0.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_gradient_0.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_gradient_0.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_gradient_0.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_gradient_0[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #FF0000", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXX XX X", -+"XXXXXXXXXXX XX X", -+"XXXXXXXXXXX XX X", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+" ", -+"................", -+"................", -+"................", -+"................", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_gradient_n1.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_gradient_n1.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_gradient_n1.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_gradient_n1.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_gradient_n1[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #FF0000", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXX XX", -+"XXXXXXXXXXXXX XX", -+"XXXXXXXXX X XX", -+"XXXXXXXXXXXXX XX", -+"XXXXXXXXXXXXX XX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+" XXXXXXX ", -+"... ......", -+"................", -+"................", -+"................", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_gradient_n2.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_gradient_n2.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_gradient_n2.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_gradient_n2.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_gradient_n2[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #FF0000", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXXXXX X", -+"XXXXXXX X X", -+"XXXXXXXXXXX XXXX", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+" XXXXXXXXX ", -+".. XXXXXXX .....", -+"... ......", -+"................", -+"................", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_gradient_n3.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_gradient_n3.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_gradient_n3.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_gradient_n3.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_gradient_n3[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #FF0000", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXXXXX X", -+"XXXXXXX X X", -+"XXXXXXXXXXXXXX X", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+" XXXXXXXXX ", -+".. XXXXXXX .....", -+"... XXXXX ......", -+".... .......", -+"................", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_gradient_n4.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_gradient_n4.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_gradient_n4.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_gradient_n4.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_gradient_n4[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #FF0000", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXX XX X", -+"XXXXXXXXXXX XX X", -+"XXXXXXX X X", -+"XXXXXXXXXXXXXX X", -+"XXXXXXXXXXXXXX X", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+" XXXXXXXXXXX ", -+". XXXXXXXXX ....", -+".. XXXXXXX .....", -+"... XXXXX ......", -+".... .......", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_gradient_n5.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_gradient_n5.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_gradient_n5.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_gradient_n5.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_gradient_n5[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #FF0000", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXX XXXX", -+"XXXXXXX X X", -+"XXXXXXXXXXXXXX X", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+" XXXXXXXXXXX ", -+". XXXXXXXXX ....", -+".. XXXXXXX .....", -+"... XXXXX ......", -+".... XXX .......", -+"..... ........", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_gradient_p1.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_gradient_p1.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_gradient_p1.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_gradient_p1.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_gradient_p1[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #FF0000", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXX XX", -+"XXXXXXXXXXXXX XX", -+"XXXXXXXXXXXXX XX", -+"XXXXXXXXXXXXX XX", -+"XXXXXXXXXXXXX XX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXX XXXXXX", -+" ....... ", -+"................", -+"................", -+"................", -+"................", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_gradient_p2.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_gradient_p2.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_gradient_p2.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_gradient_p2.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_gradient_p2[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #FF0000", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXXXXX X", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXX XXXX", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXXXXXXX", -+"XXX XXXXXX", -+"XX ....... XXXXX", -+" ......... ", -+"................", -+"................", -+"................", -+"................", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_gradient_p3.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_gradient_p3.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_gradient_p3.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_gradient_p3.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_gradient_p3[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #FF0000", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXXXXX X", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXXXXX X", -+"XXXXXXXXXXX X", -+"XXXX XXXXXXX", -+"XXX ..... XXXXXX", -+"XX ....... XXXXX", -+" ......... ", -+"................", -+"................", -+"................", -+"................", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_gradient_p4.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_gradient_p4.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_gradient_p4.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_gradient_p4.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_gradient_p4[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #FF0000", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXX XX X", -+"XXXXXXXXXXX XX X", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXXXXX X", -+"XXXX XXXXX X", -+"XXX ..... XXXXXX", -+"XX ....... XXXXX", -+"X ......... XXXX", -+" ........... ", -+"................", -+"................", -+"................", -+"................", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_gradient_p5.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_gradient_p5.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_gradient_p5.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_gradient_p5.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_gradient_p5[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #FF0000", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXX XXXX", -+"XXXXXXXXXXX X", -+"XXXXX XXXXXX X", -+"XXXX ... XX X", -+"XXX ..... XXXXXX", -+"XX ....... XXXXX", -+"X ......... XXXX", -+" ........... ", -+"................", -+"................", -+"................", -+"................", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_height_0.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_height_0.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_height_0.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_height_0.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_height_0[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #0000FF", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXX XX X", -+"XXXXXXXXXXX XX X", -+"XXXXXXXXXXX XX X", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+" ", -+"................", -+"................", -+"................", -+"................", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_height_n1.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_height_n1.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_height_n1.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_height_n1.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_height_n1[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #0000FF", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXX XX", -+"XXXXXXXXXXXXX XX", -+"XXXXXXXXX X XX", -+"XXXXXXXXXXXXX XX", -+"XXXXXXXXXXXXX XX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+" XXXXXXX ", -+"... ......", -+"................", -+"................", -+"................", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_height_n2.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_height_n2.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_height_n2.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_height_n2.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_height_n2[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #0000FF", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXXXXX X", -+"XXXXXXX X X", -+"XXXXXXXXXXX XXXX", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+" XXXXXXX ", -+"...XXXXXXX......", -+"... ......", -+"................", -+"................", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_height_n3.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_height_n3.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_height_n3.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_height_n3.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_height_n3[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #0000FF", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXXXXX X", -+"XXXXXXX X X", -+"XXXXXXXXXXXXXX X", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+" XXXXXXX ", -+"...XXXXXXX......", -+"...XXXXXXX......", -+"... ......", -+"................", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_height_n4.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_height_n4.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_height_n4.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_height_n4.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_height_n4[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #0000FF", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXX XX X", -+"XXXXXXXXXXX XX X", -+"XXXXXXX X X", -+"XXXXXXXXXXXXXX X", -+"XXXXXXXXXXXXXX X", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+" XXXXXXX ", -+"...XXXXXXX......", -+"...XXXXXXX......", -+"...XXXXXXX......", -+"... ......", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_height_n5.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_height_n5.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_height_n5.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_height_n5.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_height_n5[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #0000FF", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXX XXXX", -+"XXXXXXX X X", -+"XXXXXXXXXXXXXX X", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+" XXXXXXX ", -+"...XXXXXXX......", -+"...XXXXXXX......", -+"...XXXXXXX......", -+"...XXXXXXX......", -+"... ......", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_height_p1.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_height_p1.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_height_p1.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_height_p1.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_height_p1[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #0000FF", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXX XX", -+"XXXXXXXXXXXXX XX", -+"XXXXXXXXXXXXX XX", -+"XXXXXXXXXXXXX XX", -+"XXXXXXXXXXXXX XX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXX XXXXXX", -+" ....... ", -+"................", -+"................", -+"................", -+"................", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_height_p2.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_height_p2.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_height_p2.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_height_p2.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_height_p2[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #0000FF", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXXXXX X", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXX XXXX", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXXXXXXX", -+"XXX XXXXXX", -+"XXX.......XXXXXX", -+" ....... ", -+"................", -+"................", -+"................", -+"................", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_height_p3.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_height_p3.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_height_p3.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_height_p3.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_height_p3[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #0000FF", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXXXXX X", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXXXXX X", -+"XXXXXXXXXXX X", -+"XXX XXXXXX", -+"XXX.......XXXXXX", -+"XXX.......XXXXXX", -+" ....... ", -+"................", -+"................", -+"................", -+"................", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_height_p4.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_height_p4.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_height_p4.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_height_p4.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_height_p4[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #0000FF", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXX XX X", -+"XXXXXXXXXXX XX X", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXXXXX X", -+"XXX XXXX X", -+"XXX.......XXXXXX", -+"XXX.......XXXXXX", -+"XXX.......XXXXXX", -+" ....... ", -+"................", -+"................", -+"................", -+"................", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_height_p5.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_height_p5.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_height_p5.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_height_p5.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_height_p5[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #0000FF", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXX X", -+"XXXXXXXXXXX XXXX", -+"XXXXXXXXXXX X", -+"XXX XXXX X", -+"XXX.......X X", -+"XXX.......XXXXXX", -+"XXX.......XXXXXX", -+"XXX.......XXXXXX", -+" ....... ", -+"................", -+"................", -+"................", -+"................", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_none.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_none.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_none.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_none.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,26 @@ -+/* XPM */ -+static const char *brush_none[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 4 1", -+" c #FF0000", -+". c #008000", -+"X c #000080", -+"o c None", -+/* pixels */ -+"oo oooXXooo oo", -+"oo oXXXXo oo", -+"ooo XXXX ooo", -+"oooo XX oooo", -+"ooooo ooooo", -+"oooooo oooooo", -+"oooooo oooooo", -+"ooooo ooooo", -+"oooo XX oooo", -+"ooo XXXX ooo", -+"oo oXXXXo oo", -+"oo ooXXXXoo oo", -+"ooooo......ooooo", -+"................", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_object_bush.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_object_bush.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_object_bush.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_object_bush.xpm 2010-05-05 00:55:22.000000000 +0200 -@@ -0,0 +1,27 @@ -+/* XPM */ -+static const char *brush_object_bush[] = { -+"20 20 4 1", -+" c None", -+". c #0000FF", -+"+ c #008000", -+"@ c #00FF00", -+"....................", -+"....................", -+".. ..", -+".. ..", -+".. ..", -+".. ..", -+".. ..", -+".. ..", -+".. ..", -+".. +@+ + ..", -+".. +@+@+@@ ..", -+".. @+@+@+@ ..", -+".. +@ + + ++ ..", -+".. @+@+@++ + ..", -+".. +@+ +@@+ ..", -+".. + +@++@ ..", -+".. ++++++++++++++ ..", -+".. ..", -+"....................", -+"...................."}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_object_c1-bigtree.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_object_c1-bigtree.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_object_c1-bigtree.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_object_c1-bigtree.xpm 2010-05-05 00:55:22.000000000 +0200 -@@ -0,0 +1,28 @@ -+/* XPM */ -+static const char *brush_object_c1_bigtree[] = { -+"20 20 5 1", -+" c None", -+". c #FFCC7F", -+"+ c #808000", -+"@ c #008000", -+"# c #800000", -+"....................", -+"....................", -+".. ++@+ ..", -+".. @+++++@+ ..", -+".. +++@+@+++@ ..", -+".. +@++@++@++ ..", -+".. ++++++++++@+ ..", -+".. +@@+@++@@@+@ ..", -+".. ++++@+++++ ..", -+".. ++@+++@@+@ ..", -+".. ++++@+++ ..", -+".. @+++ ..", -+".. #### ..", -+".. #### ..", -+".. #### ..", -+".. #### ..", -+".. ###### ..", -+".. ######### ..", -+"....................", -+"...................."}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_object_c2-hanged.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_object_c2-hanged.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_object_c2-hanged.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_object_c2-hanged.xpm 2010-05-05 00:55:22.000000000 +0200 -@@ -0,0 +1,31 @@ -+/* XPM */ -+static const char *brush_object_c2_hanged[] = { -+"20 20 8 1", -+" c None", -+". c #00FFFF", -+"+ c #800000", -+"@ c #C0C0C0", -+"# c #808080", -+"$ c #FFFF00", -+"% c #0000FF", -+"& c #008000", -+"....................", -+"....................", -+".. + ..", -+".. +++++++++ ..", -+".. @ + + + @ ..", -+".. ## +++ @ ..", -+".. @@@ + ### ..", -+".. @#@#@ + # @ # ..", -+".. @@#@@ + #+@ # ..", -+".. $@@@$ + #+@+# ..", -+".. %$% + #+@+# ..", -+".. %$% + # @+# ..", -+".. @@@ + ###+#+ ..", -+".. @ @ + + + ..", -+".. + ..", -+".. + ..", -+".. &+# ..", -+"..&&&&&&&&&&&&&&&&..", -+"....................", -+"...................."}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_object_c3-statue.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_object_c3-statue.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_object_c3-statue.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_object_c3-statue.xpm 2010-05-05 00:55:22.000000000 +0200 -@@ -0,0 +1,29 @@ -+/* XPM */ -+static const char *brush_object_c3_statue[] = { -+"20 20 6 1", -+" c None", -+". c #B2194C", -+"+ c #C0C0C0", -+"@ c #808080", -+"# c #808000", -+"$ c #008000", -+"....................", -+"....................", -+".. ..", -+".. + ..", -+".. +@@ ..", -+".. +@ ..", -+".. ###+@ ..", -+".. #+#@+@ ..", -+".. ###@ ..", -+".. @@@ ..", -+".. @@@ ..", -+".. @ @ ..", -+".. @ @ ..", -+".. @ @ ..", -+".. ++++++ ..", -+".. @@@@ ..", -+".. @@@@ ..", -+"..$$$$$$$$$$$$$$$$..", -+"....................", -+"...................."}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_object_c4-bigrock.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_object_c4-bigrock.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_object_c4-bigrock.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_object_c4-bigrock.xpm 2010-05-05 00:55:22.000000000 +0200 -@@ -0,0 +1,28 @@ -+/* XPM */ -+static const char *brush_object_c4_bigrock[] = { -+"20 20 5 1", -+" c None", -+". c #7fff19", -+"+ c #808080", -+"@ c #C0C0C0", -+"# c #008000", -+"....................", -+"....................", -+".. ..", -+".. ..", -+".. ..", -+".. +@ ..", -+".. @+++ +@ ..", -+".. +++@###++ ..", -+".. +@+@###++ ..", -+".. @++++@###+ ..", -+".. ++@+@+###+@ ..", -+".. ++##+++##++ ..", -+".. +@##++++@++ ..", -+".. @++##+@++@+@ ..", -+".. ++++#++###++ ..", -+".. +@++++++#### ..", -+".. +++++###++++ ..", -+"..################..", -+"....................", -+"...................."}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_object_c5-blocking.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_object_c5-blocking.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_object_c5-blocking.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_object_c5-blocking.xpm 2010-05-05 00:55:22.000000000 +0200 -@@ -0,0 +1,27 @@ -+/* XPM */ -+static const char *brush_object_c5_blocking[] = { -+"20 20 4 1", -+" c None", -+". c #FF33CC", -+"+ c #C0C0C0", -+"@ c #008000", -+"....................", -+"....................", -+".. ..", -+".. ++++++++++++ ..", -+".. + + ..", -+".. + + ..", -+".. + + ..", -+".. + + ..", -+".. + + ..", -+".. + + ..", -+".. + + ..", -+".. + + ..", -+".. + + ..", -+".. + + ..", -+".. + + ..", -+".. + + ..", -+".. + + ..", -+"..@@@@@@@@@@@@@@@@..", -+"....................", -+"...................."}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_object_dead-tree.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_object_dead-tree.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_object_dead-tree.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_object_dead-tree.xpm 2010-05-05 00:55:22.000000000 +0200 -@@ -0,0 +1,26 @@ -+/* XPM */ -+static const char *brush_object_dead_tree[] = { -+"20 20 3 1", -+" c None", -+". c #FFFFFF", -+"+ c #800000", -+"....................", -+"....................", -+".. ..", -+".. + + ..", -+".. + + + + ..", -+".. + ++ ..", -+".. ++++ + + + ..", -+".. +++ ++ ..", -+".. + ++ +++ ..", -+".. + ++++ + ..", -+".. +++ +++ ..", -+".. +++++ ++ ..", -+".. ++++++ ..", -+".. ++++ ..", -+".. ++++ ..", -+".. ++++ ..", -+".. ++++++ ..", -+".. +++++++++ ..", -+"....................", -+"...................."}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_object_stone.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_object_stone.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_object_stone.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_object_stone.xpm 2010-05-05 00:55:22.000000000 +0200 -@@ -0,0 +1,28 @@ -+/* XPM */ -+static const char *brush_object_stone[] = { -+"20 20 5 1", -+" c None", -+". c #7F7FFF", -+"+ c #808080", -+"@ c #C0C0C0", -+"# c #008000", -+"....................", -+"....................", -+".. ..", -+".. ..", -+".. ..", -+".. ..", -+".. ..", -+".. ..", -+".. ..", -+".. +@ ..", -+".. +++@++ ..", -+".. @++++@+@ ..", -+".. +++++++++@ ..", -+".. +++@+++++@@ ..", -+".. ++++++@++@@ ..", -+".. +@++++++++@ ..", -+".. ############## ..", -+".. ..", -+"....................", -+"...................."}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_object_tree.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_object_tree.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_object_tree.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_object_tree.xpm 2010-05-05 00:55:22.000000000 +0200 -@@ -0,0 +1,28 @@ -+/* XPM */ -+static const char * brush_object_tree[] = { -+"20 20 5 1", -+" c None", -+". c #FF0000", -+"+ c #008000", -+"@ c #00FF00", -+"# c #800000", -+"....................", -+"....................", -+".. ++ ..", -+".. ++++++ ..", -+".. ++++@+++ ..", -+".. ++++++++ ..", -+".. +@++@@++@+ ..", -+".. ++++++@+++ ..", -+".. +++@++++ ..", -+".. ++++++++ ..", -+".. ++++++ ..", -+".. #++# ..", -+".. #### ..", -+".. #### ..", -+".. #### ..", -+".. #### ..", -+".. ###### ..", -+".. ######### ..", -+"....................", -+"...................."}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_object_water-object.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_object_water-object.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_object_water-object.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_object_water-object.xpm 2010-05-05 00:55:22.000000000 +0200 -@@ -0,0 +1,28 @@ -+/* XPM */ -+static const char *brush_object_water_object[] = { -+"20 20 5 1", -+" c None", -+". c #7F7F7F", -+"+ c #008000", -+"@ c #00FFFF", -+"# c #0000FF", -+"....................", -+"....................", -+".. ..", -+".. ..", -+".. ..", -+".. ..", -+".. ..", -+".. ..", -+".. + ..", -+".. + + ..", -+".. + + + + ..", -+".. + ++ + ..", -+".. + + + ..", -+".. + ++ ..", -+"..@@@@@@@++@@@@@@@..", -+"..@#@@@#@@@#@@@#@@..", -+"..#@#@#@#@#@#@#@#@..", -+"..################..", -+"....................", -+"...................."}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_players_blue.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_players_blue.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_players_blue.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_players_blue.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,26 @@ -+/* XPM */ -+static const char *brush_players_blue[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 4 1", -+" c #000000", -+". c #000080", -+"X c #0000FF", -+"o c None", -+/* pixels */ -+"oo oo", -+"oo .......... oo", -+"oo XXXXXXXXXX oo", -+"oo XX.XXXX.XX oo", -+"oo X...XX...X oo", -+"oo XX.XXXX.XX oo", -+"oo XXXXXXXXXX oo", -+"oo XXXXXXXXXX oo", -+"oo X........X oo", -+"oo XXXXXXXXXX oo", -+"oo XXXXXXXXXX oo", -+"oo XXXX..XXXX oo", -+"ooo XX....XX ooo", -+"ooo X......X ooo", -+"oooo .... oooo", -+"oooooo oooooo" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_players_cyan.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_players_cyan.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_players_cyan.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_players_cyan.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,26 @@ -+/* XPM */ -+static const char *brush_players_cyan[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 4 1", -+" c #000000", -+". c #008080", -+"X c #00FFFF", -+"o c None", -+/* pixels */ -+"oo oo", -+"oo .......... oo", -+"oo ....XX.... oo", -+"oo ...XXXX... oo", -+"oo ...XXXX... oo", -+"oo ....XX.... oo", -+"oo .......... oo", -+"oo .XX....XX. oo", -+"oo ..XXXXXX.. oo", -+"oo ...XXXX... oo", -+"oo .......... oo", -+"oo .......... oo", -+"ooo ........ ooo", -+"ooo ........ ooo", -+"oooo .... oooo", -+"oooooo oooooo" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_players_green.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_players_green.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_players_green.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_players_green.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,26 @@ -+/* XPM */ -+static const char *brush_players_green[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 4 1", -+" c #000000", -+". c #008000", -+"X c #00FF00", -+"o c None", -+/* pixels */ -+"oo oo", -+"oo .X.X..X.X. oo", -+"oo .X.X..X.X. oo", -+"oo .X.X..X.X. oo", -+"oo .X.X..X.X. oo", -+"oo .X.X..X.X. oo", -+"oo .X.X..X.X. oo", -+"oo .X.X..X.X. oo", -+"oo .X.X..X.X. oo", -+"oo .......... oo", -+"oo .XXX..XXX. oo", -+"oo ...X..X... oo", -+"ooo ..XXXX.. ooo", -+"ooo ........ ooo", -+"oooo .... oooo", -+"oooooo oooooo" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_players_orange.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_players_orange.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_players_orange.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_players_orange.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,26 @@ -+/* XPM */ -+static const char *brush_players_orange[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 4 1", -+" c #000000", -+". c #804000", -+"X c #FF8000", -+"o c None", -+/* pixels */ -+"oo oo", -+"oo XXXX.X.XXX oo", -+"oo XXX.X.XXXX oo", -+"oo XX.X.XXXXX oo", -+"oo X.X.XXXXXX oo", -+"oo .X.XXXXXXX oo", -+"oo X.XXXXX..X oo", -+"oo .XXXXX...X oo", -+"oo XXXXX...XX oo", -+"oo XXX....XXX oo", -+"oo XXXX..XXXX oo", -+"oo XXX.X.XXXX oo", -+"ooo XXXXXXXX ooo", -+"ooo XXXXXXXX ooo", -+"oooo XXXX oooo", -+"oooooo oooooo" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_players_pink.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_players_pink.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_players_pink.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_players_pink.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,26 @@ -+/* XPM */ -+static const char *brush_players_pink[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 4 1", -+" c #000000", -+". c #800080", -+"X c #FF00FF", -+"o c None", -+/* pixels */ -+"oo oo", -+"oo ..X....X.. oo", -+"oo X...XX...X oo", -+"oo XX.XXXX.XX oo", -+"oo X...XX...X oo", -+"oo ..X....X.. oo", -+"oo X...XX...X oo", -+"oo XX.XXXX.XX oo", -+"oo X...XX...X oo", -+"oo ..X....X.. oo", -+"oo X...XX...X oo", -+"oo XX.XXXX.XX oo", -+"ooo ...XX... ooo", -+"ooo .X....X. ooo", -+"oooo .XX. oooo", -+"oooooo oooooo" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_players_player.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_players_player.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_players_player.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_players_player.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_players_player[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #FFFF00", -+". c #008080", -+"X c None", -+/* pixels */ -+"XXXXX......XXXXX", -+"XXX..........XXX", -+"XX............XX", -+"X..............X", -+"X.... ....X", -+"...... .. ....", -+"...... .. ....", -+"...... .. ....", -+"...... .....", -+"...... ........", -+"...... ........", -+"X..... .......X", -+"X.... ......X", -+"XX............XX", -+"XXX..........XXX", -+"XXXXX......XXXXX" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_players_red.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_players_red.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_players_red.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_players_red.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,26 @@ -+/* XPM */ -+static const char *brush_players_red[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 4 1", -+" c #000000", -+". c #800000", -+"X c #FF0000", -+"o c None", -+/* pixels */ -+"oo oo", -+"oo .......... oo", -+"oo .......... oo", -+"oo .......... oo", -+"oo XXXXXXXXXX oo", -+"oo .......... oo", -+"oo .......... oo", -+"oo XXXXXXXXXX oo", -+"oo XXXXXXXXXX oo", -+"oo .......... oo", -+"oo .......... oo", -+"oo XXXXXXXXXX oo", -+"ooo ........ ooo", -+"ooo ........ ooo", -+"oooo .... oooo", -+"oooooo oooooo" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_players_white.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_players_white.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_players_white.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_players_white.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,26 @@ -+/* XPM */ -+static const char *brush_players_white[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 4 1", -+" c #000000", -+". c #808080", -+"X c #C0C0C0", -+"o c None", -+/* pixels */ -+"oo oo", -+"oo XXXXXXXXXX oo", -+"oo ....XX.... oo", -+"oo X.X.XX.X.X oo", -+"oo ....XX.... oo", -+"oo XXXXXXXXXX oo", -+"oo XX..XX..XX oo", -+"oo XXXXXXXXXX oo", -+"oo .......... oo", -+"oo XXXXXXXXXX oo", -+"oo .......... oo", -+"oo XXXXXXXXXX oo", -+"ooo XXXXXXXX ooo", -+"ooo XXXXXXXX ooo", -+"oooo XXXX oooo", -+"oooooo oooooo" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_players_yellow.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_players_yellow.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_players_yellow.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_players_yellow.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,26 @@ -+/* XPM */ -+static const char *brush_players_yellow[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 4 1", -+" c #000000", -+". c #808000", -+"X c #FFFF00", -+"o c None", -+/* pixels */ -+"oo oo", -+"oo .........X oo", -+"oo .XXX....X. oo", -+"oo .XXX...X.. oo", -+"oo .XXX..X..X oo", -+"oo .....X..X. oo", -+"oo ....X..X.. oo", -+"oo ...X..X..X oo", -+"oo ..X..X..X. oo", -+"oo .X..X..X.. oo", -+"oo X..X..X... oo", -+"oo ..X..X.... oo", -+"ooo X..X.... ooo", -+"ooo ..X..... ooo", -+"oooo .... oooo", -+"oooooo oooooo" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_resource_1-gold.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_resource_1-gold.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_resource_1-gold.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_resource_1-gold.xpm 2010-05-05 00:55:22.000000000 +0200 -@@ -0,0 +1,24 @@ -+/* XPM */ -+static const char *brush_resource_1_gold[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 2 1", -+" c #dddd00", -+". c None", -+/* pixels */ -+"................", -+". .......... .", -+". ........ .", -+".. ...... ..", -+"... .... ...", -+".... .. ....", -+"..... .....", -+"...... ......", -+"...... ......", -+"..... .....", -+".... .. ....", -+"... .... ...", -+".. ...... ..", -+". ........ .", -+". .......... .", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_resource_2-stone.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_resource_2-stone.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_resource_2-stone.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_resource_2-stone.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,24 @@ -+/* XPM */ -+static const char *brush_resource_2_stone[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 2 1", -+" c #808080", -+". c None", -+/* pixels */ -+"................", -+". .......... .", -+". ........ .", -+".. ...... ..", -+"... .... ...", -+".... .. ....", -+"..... .....", -+"...... ......", -+"...... ......", -+"..... .....", -+".... .. ....", -+"... .... ...", -+".. ...... ..", -+". ........ .", -+". .......... .", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_resource_3.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_resource_3.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_resource_3.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_resource_3.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,24 @@ -+/* XPM */ -+static const char *brush_resource_3[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 2 1", -+" c #FF0000", -+". c None", -+/* pixels */ -+"................", -+". .......... .", -+". ........ .", -+".. ...... ..", -+"... .... ...", -+".... .. ....", -+"..... .....", -+"...... ......", -+"...... ......", -+"..... .....", -+".... .. ....", -+"... .... ...", -+".. ...... ..", -+". ........ .", -+". .......... .", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_resource_4.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_resource_4.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_resource_4.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_resource_4.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,24 @@ -+/* XPM */ -+static const char *brush_resource_4[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 2 1", -+" c #0000FF", -+". c None", -+/* pixels */ -+"................", -+". .......... .", -+". ........ .", -+".. ...... ..", -+"... .... ...", -+".... .. ....", -+"..... .....", -+"...... ......", -+"...... ......", -+"..... .....", -+".... .. ....", -+"... .... ...", -+".. ...... ..", -+". ........ .", -+". .......... .", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_resource_5.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_resource_5.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_resource_5.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_resource_5.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,24 @@ -+/* XPM */ -+static const char *brush_resource_5[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 2 1", -+" c #008080", -+". c None", -+/* pixels */ -+"................", -+". .......... .", -+". ........ .", -+".. ...... ..", -+"... .... ...", -+".... .. ....", -+"..... .....", -+"...... ......", -+"...... ......", -+"..... .....", -+".... .. ....", -+"... .... ...", -+".. ...... ..", -+". ........ .", -+". .......... .", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_surface_custom.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_surface_custom.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_surface_custom.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_surface_custom.xpm 2010-05-05 00:55:22.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_surface_custom[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #7c4645", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+" ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" ", -+"XXXXXXXXXXXXXXXX" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_surface_grass1.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_surface_grass1.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_surface_grass1.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_surface_grass1.xpm 2010-05-05 00:55:22.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_surface_grass1[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #00a000", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+" ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" ", -+"XXXXXXXXXXXXXXXX" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_surface_grass2.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_surface_grass2.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_surface_grass2.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_surface_grass2.xpm 2010-05-05 00:55:22.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_surface_grass2[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #536e0b", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+" ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" ", -+"XXXXXXXXXXXXXXXX" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_surface_road.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_surface_road.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_surface_road.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_surface_road.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_surface_road[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #800000", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+" ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" ", -+"XXXXXXXXXXXXXXXX" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/brush_surface_stone.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_surface_stone.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/brush_surface_stone.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/brush_surface_stone.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *brush_surface_stone[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #808080", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+" ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" .............. ", -+" ", -+"XXXXXXXXXXXXXXXX" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/edit_randomize-heights.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/edit_randomize-heights.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/edit_randomize-heights.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/edit_randomize-heights.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,24 @@ -+/* XPM */ -+static const char *edit_randomize_heights[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 2 1", -+" c #008000", -+". c None", -+/* pixels */ -+"................", -+"................", -+"................", -+"................", -+"................", -+"................", -+"................", -+"................", -+"...... ..... .", -+"... . .", -+" ", -+" ", -+" ", -+" ", -+" ", -+" " -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/edit_randomize.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/edit_randomize.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/edit_randomize.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/edit_randomize.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *edit_randomize[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #008000", -+". c #00FF00", -+"X c #00FFFF", -+/* pixels */ -+" ", -+" XX XX ", -+" XX XX . ", -+" XXXX ", -+" XX ", -+" XXXX .", -+" XX XX .", -+" XX XX ..", -+" . ", -+" .", -+" . ", -+" ... . ", -+" . ", -+" .", -+" . .... ", -+" ...... " -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/edit_redo.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/edit_redo.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/edit_redo.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/edit_redo.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,24 @@ -+/* XPM */ -+static const char *edit_redo[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 2 1", -+" c #000000", -+". c None", -+/* pixels */ -+"................", -+"........ .....", -+"......... ....", -+".......... ...", -+"........... ..", -+".... .", -+"... .", -+".. ...... ..", -+". ...... ...", -+". ...... ....", -+". ..... .....", -+". .............", -+". .............", -+".. .............", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/edit_switch-surfaces.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/edit_switch-surfaces.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/edit_switch-surfaces.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/edit_switch-surfaces.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,24 @@ -+/* XPM */ -+static const char *edit_switch_surfaces[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 2 1", -+" c #008000", -+". c #00FF00", -+/* pixels */ -+"........ ", -+"........ ", -+"........ ", -+"........ ", -+"........ ", -+"..... .. . ", -+".... .. .. ", -+"... ..... ", -+"... ..... ", -+".... .. .. ", -+"..... .. . ", -+"........ ", -+"........ ", -+"........ ", -+"........ ", -+"........ " -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/edit_undo.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/edit_undo.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/edit_undo.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/edit_undo.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,24 @@ -+/* XPM */ -+static const char *edit_undo[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 2 1", -+" c #000000", -+". c None", -+/* pixels */ -+"................", -+"..... ........", -+".... .........", -+"... ..........", -+".. ...........", -+". ....", -+". ...", -+".. ...... ..", -+"... ...... .", -+".... ...... .", -+"..... ..... .", -+"............. .", -+"............. .", -+"............. ..", -+"................", -+"................" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/radius_1.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/radius_1.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/radius_1.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/radius_1.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *radius_1[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #C0C0C0", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXX..XXXXXXX", -+"XXXXXX. .XXXXXX", -+"XXXXXX. .XXXXXX", -+"XXXXXXX..XXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/radius_2.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/radius_2.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/radius_2.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/radius_2.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,26 @@ -+/* XPM */ -+static const char *radius_2[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 4 1", -+" c #000000", -+". c #808080", -+"X c #C0C0C0", -+"o c None", -+/* pixels */ -+"oooooooooooooooo", -+"oooooooooooooooo", -+"oooooooooooooooo", -+"oooooooooooooooo", -+"oooooooooooooooo", -+"oooooooXXooooooo", -+"oooooo. .oooooo", -+"oooooX Xooooo", -+"oooooX Xooooo", -+"oooooo. .oooooo", -+"oooooooXXooooooo", -+"oooooooooooooooo", -+"oooooooooooooooo", -+"oooooooooooooooo", -+"oooooooooooooooo", -+"oooooooooooooooo" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/radius_3.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/radius_3.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/radius_3.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/radius_3.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *radius_3[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #808080", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXX. .XXXXXX", -+"XXXXX. .XXXXX", -+"XXXXX XXXXX", -+"XXXXX XXXXX", -+"XXXXX. .XXXXX", -+"XXXXXX. .XXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX", -+"XXXXXXXXXXXXXXXX" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/radius_4.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/radius_4.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/radius_4.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/radius_4.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,26 @@ -+/* XPM */ -+static const char *radius_4[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 4 1", -+" c #000000", -+". c #808080", -+"X c #C0C0C0", -+"o c None", -+/* pixels */ -+"oooooooooooooooo", -+"oooooooooooooooo", -+"oooooooooooooooo", -+"oooooooooooooooo", -+"ooooooX..Xoooooo", -+"ooooo. .ooooo", -+"ooooX Xoooo", -+"oooo. .oooo", -+"oooo. .oooo", -+"ooooX Xoooo", -+"ooooo. .ooooo", -+"ooooooX..Xoooooo", -+"oooooooooooooooo", -+"oooooooooooooooo", -+"oooooooooooooooo", -+"oooooooooooooooo" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/radius_5.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/radius_5.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/radius_5.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/radius_5.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,26 @@ -+/* XPM */ -+static const char *radius_5[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 4 1", -+" c #000000", -+". c #808080", -+"X c #C0C0C0", -+"o c None", -+/* pixels */ -+"oooooooooooooooo", -+"oooooooooooooooo", -+"oooooooooooooooo", -+"oooooooXXooooooo", -+"oooooX. .Xooooo", -+"ooooX Xoooo", -+"oooo. .oooo", -+"oooX Xooo", -+"oooX Xooo", -+"oooo. .oooo", -+"ooooX Xoooo", -+"oooooX. .Xooooo", -+"oooooooXXooooooo", -+"oooooooooooooooo", -+"oooooooooooooooo", -+"oooooooooooooooo" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/radius_6.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/radius_6.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/radius_6.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/radius_6.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,26 @@ -+/* XPM */ -+static const char *radius_6[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 4 1", -+" c #000000", -+". c #808080", -+"X c #C0C0C0", -+"o c None", -+/* pixels */ -+"oooooooooooooooo", -+"oooooooooooooooo", -+"oooooooooooooooo", -+"ooooooX..Xoooooo", -+"ooooo. .ooooo", -+"oooo. .oooo", -+"oooX Xooo", -+"ooo. .ooo", -+"ooo. .ooo", -+"oooX Xooo", -+"oooo. .oooo", -+"ooooo. .ooooo", -+"ooooooX..Xoooooo", -+"oooooooooooooooo", -+"oooooooooooooooo", -+"oooooooooooooooo" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/radius_7.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/radius_7.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/radius_7.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/radius_7.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,26 @@ -+/* XPM */ -+static const char *radius_7[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 4 1", -+" c #000000", -+". c #808080", -+"X c #C0C0C0", -+"o c None", -+/* pixels */ -+"oooooooooooooooo", -+"oooooooooooooooo", -+"oooooooXXooooooo", -+"ooooo. .ooooo", -+"oooo oooo", -+"ooo. .ooo", -+"ooo ooo", -+"ooX Xoo", -+"ooX Xoo", -+"ooo ooo", -+"ooo. .ooo", -+"oooo oooo", -+"ooooo. .ooooo", -+"oooooooXXooooooo", -+"oooooooooooooooo", -+"oooooooooooooooo" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/radius_8.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/radius_8.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/radius_8.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/radius_8.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,26 @@ -+/* XPM */ -+static const char *radius_8[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 4 1", -+" c #000000", -+". c #808080", -+"X c #C0C0C0", -+"o c None", -+/* pixels */ -+"oooooooooooooooo", -+"oooooooooooooooo", -+"oooooo. .oooooo", -+"ooooX Xoooo", -+"oooX Xooo", -+"ooo ooo", -+"oo. .oo", -+"oo oo", -+"oo oo", -+"oo. .oo", -+"ooo ooo", -+"oooX Xooo", -+"ooooX Xoooo", -+"oooooo. .oooooo", -+"oooooooooooooooo", -+"oooooooooooooooo" -+}; -diff -Naur megaglest-source-3.3.5/glest_map_editor/icons/radius_9.xpm megaglest-source-3.3.5.patch/glest_map_editor/icons/radius_9.xpm ---- megaglest-source-3.3.5/glest_map_editor/icons/radius_9.xpm 1970-01-01 01:00:00.000000000 +0100 -+++ megaglest-source-3.3.5.patch/glest_map_editor/icons/radius_9.xpm 2010-05-04 02:22:11.000000000 +0200 -@@ -0,0 +1,25 @@ -+/* XPM */ -+static const char *radius_9[] = { -+/* columns rows colors chars-per-pixel */ -+"16 16 3 1", -+" c #000000", -+". c #808080", -+"X c None", -+/* pixels */ -+"XXXXXXXXXXXXXXXX", -+"XXXXXXX..XXXXXXX", -+"XXXXX. .XXXXX", -+"XXXX XXXX", -+"XXX XXX", -+"XX. .XX", -+"XX XX", -+"X. .X", -+"X. .X", -+"XX XX", -+"XX. .XX", -+"XXX XXX", -+"XXXX XXXX", -+"XXXXX. .XXXXX", -+"XXXXXXX..XXXXXXX", -+"XXXXXXXXXXXXXXXX" -+}; diff --git a/packages/addons/games/megaglest-source/patches/megaglest-3.5.5-dont_build_tools-0.1.diff b/packages/addons/games/megaglest-source/patches/megaglest-source-3.3.7.2-dont_build_tools-0.1.patch similarity index 100% rename from packages/addons/games/megaglest-source/patches/megaglest-3.5.5-dont_build_tools-0.1.diff rename to packages/addons/games/megaglest-source/patches/megaglest-source-3.3.7.2-dont_build_tools-0.1.patch diff --git a/packages/addons/games/megaglest/changelog.txt b/packages/addons/games/megaglest/changelog.txt index 14f82d9b75..2b869a64b1 100644 --- a/packages/addons/games/megaglest/changelog.txt +++ b/packages/addons/games/megaglest/changelog.txt @@ -1,2 +1,5 @@ +0.90.2 +- update to MegaGlest-3.3.7.2 + 0.90.1 -- initial version MegaGlest-3.3.5 \ No newline at end of file +- initial version MegaGlest-3.3.5 diff --git a/packages/addons/games/megaglest/meta b/packages/addons/games/megaglest/meta index 92f86675eb..792dc1d639 100644 --- a/packages/addons/games/megaglest/meta +++ b/packages/addons/games/megaglest/meta @@ -1,6 +1,6 @@ PKG_NAME="megaglest" PKG_VERSION="" -PKG_REV="1" +PKG_REV="2" PKG_ARCH="any" PKG_LICENSE="OSS" PKG_SITE="http://www.glest.org" @@ -12,3 +12,5 @@ PKG_SECTION="games" PKG_SHORTDESC="(Game) MegaGlest: a free 3D real-time strategy game" PKG_LONGDESC="Glest is a free 3D real-time strategy game, where you control the armies of two different factions: Tech, which is mainly composed of warriors and mechanical devices, and Magic, that prefers mages and summoned creatures in the battlefield." PKG_IS_ADDON="yes" + +PKG_AUTORECONF="no" diff --git a/packages/addons/games/sauerbraten/changelog.txt b/packages/addons/games/sauerbraten/changelog.txt index b660bff93a..86b3a1ab69 100644 --- a/packages/addons/games/sauerbraten/changelog.txt +++ b/packages/addons/games/sauerbraten/changelog.txt @@ -1,2 +1,5 @@ +0.90.2 +- update to sauerbraten-2010_07_28 + 0.90.1 -- initial version sauerbraten-2009.05.04 \ No newline at end of file +- initial version sauerbraten-2009.05.04 diff --git a/packages/addons/games/sauerbraten/meta b/packages/addons/games/sauerbraten/meta index c1ee548d90..85956c5c25 100644 --- a/packages/addons/games/sauerbraten/meta +++ b/packages/addons/games/sauerbraten/meta @@ -1,14 +1,16 @@ PKG_NAME="sauerbraten" -PKG_VERSION="2009_05_04" -PKG_REV="1" +PKG_VERSION="2010_07_28" +PKG_REV="2" PKG_ARCH="any" PKG_LICENSE="OSS" PKG_SITE="http://sauerbraten.org/" -PKG_URL="http://downloads.sourceforge.net/project/sauerbraten/sauerbraten/$PKG_VERSION/${PKG_NAME}_${PKG_VERSION}_trooper_edition_linux.tar.bz2" -PKG_DEPENDS="zlib libpng $LIBJPEG libX11 SDL SDL_image SDL_mixer $MESA" -PKG_BUILD_DEPENDS="toolchain zlib libpng $LIBJPEG libX11 SDL SDL_image SDL_mixer $MESA" +PKG_URL="http://downloads.sourceforge.net/project/sauerbraten/sauerbraten/2010_07_19/${PKG_NAME}_${PKG_VERSION}_justice_edition_linux.tar.bz2" +PKG_DEPENDS="zlib libpng $LIBJPEG libX11 SDL SDL_image SDL_mixer Mesa" +PKG_BUILD_DEPENDS="toolchain zlib libpng $LIBJPEG libX11 SDL SDL_image SDL_mixer Mesa" PKG_PRIORITY="optional" PKG_SECTION="games" PKG_SHORTDESC="(Game) Cube 2: Sauerbraten" PKG_LONGDESC="Sauerbraten is a free multiplayer/singleplayer first person shooter, built as a major redesign of the Cube FPS. Much like the original Cube, the aim of this game is not necessarily to produce the most features and eyecandy possible, but rather to allow map/geometry editing to be done dynamically in-game, to create fun gameplay and an elegant engine." PKG_IS_ADDON="yes" + +PKG_AUTORECONF="yes" diff --git a/packages/addons/games/sauerbraten/patches/sauerbraten-fix_includes_and_libs-0.1.diff b/packages/addons/games/sauerbraten/patches/sauerbraten-2010_07_28-fix_includes_and_libs-0.1.patch similarity index 53% rename from packages/addons/games/sauerbraten/patches/sauerbraten-fix_includes_and_libs-0.1.diff rename to packages/addons/games/sauerbraten/patches/sauerbraten-2010_07_28-fix_includes_and_libs-0.1.patch index 9b27089586..65f0a5355d 100644 --- a/packages/addons/games/sauerbraten/patches/sauerbraten-fix_includes_and_libs-0.1.diff +++ b/packages/addons/games/sauerbraten/patches/sauerbraten-2010_07_28-fix_includes_and_libs-0.1.patch @@ -1,14 +1,14 @@ diff -Naur sauerbraten/src/Makefile sauerbraten.patch/src/Makefile ---- sauerbraten/src/Makefile 2009-04-22 19:47:44.000000000 +0200 -+++ sauerbraten.patch/src/Makefile 2010-07-18 20:21:19.321805286 +0200 -@@ -18,8 +18,8 @@ +--- sauerbraten/src/Makefile 2010-05-13 20:30:28.000000000 +0200 ++++ sauerbraten.patch/src/Makefile 2010-11-04 01:03:27.636654907 +0100 +@@ -20,8 +20,8 @@ CLIENT_INCLUDES= $(INCLUDES) -Iinclude CLIENT_LIBS= -mwindows -Llib -lSDL -lSDL_image -lSDL_mixer -lzdll -lopengl32 -lenet -lws2_32 -lwinmm else -CLIENT_INCLUDES= $(INCLUDES) -I/usr/X11R6/include `sdl-config --cflags` --CLIENT_LIBS= -Lenet -lenet -L/usr/X11R6/lib `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL +-CLIENT_LIBS= -Lenet/.libs -lenet -L/usr/X11R6/lib `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL +CLIENT_INCLUDES= $(INCLUDES) `sdl-config --cflags` -+CLIENT_LIBS= -Lenet -lenet `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL ++CLIENT_LIBS= -Lenet/.libs -lenet `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL endif ifeq ($(PLATFORM),Linux) CLIENT_LIBS+= -lrt diff --git a/packages/addons/games/wesnoth/changelog.txt b/packages/addons/games/wesnoth/changelog.txt index bd720cd4d6..74349c3c17 100644 --- a/packages/addons/games/wesnoth/changelog.txt +++ b/packages/addons/games/wesnoth/changelog.txt @@ -1,2 +1,5 @@ +0.90.2 +- update to wesnoth-1.9.1 + 0.90.1 - initial version wesnoth-1.8.3 \ No newline at end of file diff --git a/packages/addons/games/wesnoth/meta b/packages/addons/games/wesnoth/meta index 8533eae3f1..66ba907d81 100644 --- a/packages/addons/games/wesnoth/meta +++ b/packages/addons/games/wesnoth/meta @@ -1,10 +1,10 @@ PKG_NAME="wesnoth" -PKG_VERSION="1.8.3" -PKG_REV="1" +PKG_VERSION="1.9.1" +PKG_REV="2" PKG_ARCH="any" PKG_LICENSE="OSS" -PKG_SITE="http://www.glest.org" -PKG_URL="http://sourceforge.net/projects/wesnoth/files/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_SITE="http://www.wesnoth.org/" +PKG_URL="http://downloads.sourceforge.net/project/wesnoth/wesnoth/$PKG_NAME-$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="boost zlib libX11 pango fontconfig SDL SDL_image SDL_mixer SDL_net SDL_ttf" PKG_BUILD_DEPENDS="toolchain boost lua zlib libX11 pango fontconfig SDL SDL_image SDL_mixer SDL_net SDL_ttf" PKG_PRIORITY="optional" @@ -13,4 +13,4 @@ PKG_SHORTDESC="(Game) The Battle for Wesnoth" PKG_LONGDESC="The Battle for Wesnoth is a turn-based strategy game with a fantasy theme. Build up a great army, gradually turning raw recruits into hardened veterans. In later games, recall your toughest warriors and form a deadly host against whom none can stand! Choose units from a large pool of specialists, and hand-pick a force with the right strengths to fight well on different terrains against all manner of opposition. Wesnoth has many different sagas waiting to be played out. Fight to regain the throne of Wesnoth, of which you are the legitimate heir... step into the boots of a young officer sent to guard a not-so-sleepy frontier outpost... vanquish a horde of undead warriors unleashed by a foul necromancer, who also happens tohave taken your brother hostage... guide a band of elvish survivors in an epic quest to find a new home. 200+ unit types. 16 races. 6 major factions. Hundreds of years of history. The world of Wesnoth is absolutely huge and limited only by your creativity - make your own custom units, compose your own maps, and write your own scenarios or even full-blown campaigns. You can also challenge up to 8 friends - or strangers - and fight in epic multi-player fantasy battles." PKG_IS_ADDON="yes" - +PKG_AUTORECONF="yes" diff --git a/packages/audio/alsa-lib/build b/packages/audio/alsa-lib/build index 83b5aa443d..427975b8de 100755 --- a/packages/audio/alsa-lib/build +++ b/packages/audio/alsa-lib/build @@ -25,3 +25,6 @@ $MAKE $MAKE -C include DESTDIR=$SYSROOT_PREFIX install-data $MAKE -C src DESTDIR=$SYSROOT_PREFIX install-exec $MAKE -C utils DESTDIR=$SYSROOT_PREFIX install-pkgconfigDATA + +mkdir -p $SYSROOT_PREFIX/usr/share/aclocal + cp utils/alsa.m4 $SYSROOT_PREFIX/usr/share/aclocal \ No newline at end of file diff --git a/packages/audio/alsa-lib/meta b/packages/audio/alsa-lib/meta index 872b55a507..141aa68476 100644 --- a/packages/audio/alsa-lib/meta +++ b/packages/audio/alsa-lib/meta @@ -12,3 +12,5 @@ PKG_SECTION="audio" PKG_SHORTDESC="alsa-lib: Advanced Linux Sound Architecture library" PKG_LONGDESC="ALSA (Advanced Linux Sound Architecture) is the next generation Linux Sound API. It provides much finer (->better) access to the sound hardware, has a unbeatable mixer API and supports stuff like multi channel hardware, digital outs and ins, uninterleaved sound data access, and an oss emulation layer (for the old applications). It is the prefered API for professional sound apps under Linux." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/audio/alsa-plugins/build b/packages/audio/alsa-plugins/build index 84fe0f6708..a96f82b7e5 100755 --- a/packages/audio/alsa-plugins/build +++ b/packages/audio/alsa-plugins/build @@ -2,12 +2,6 @@ . config/options $1 -if [ "$PULSEAUDIO_SUPPORT" = yes ]; then - ALSAPLUGINS_PULSEAUDIO="--enable-pulseaudio" -else - ALSAPLUGINS_PULSEAUDIO="--disable-pulseaudio" -fi - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ @@ -21,7 +15,7 @@ cd $PKG_BUILD --disable-jack \ --disable-samplerate \ --disable-avcodec \ - $ALSAPLUGINS_PULSEAUDIO \ + --disable-pulseaudio \ --with-speex=lib \ $MAKE diff --git a/packages/audio/alsa-plugins/meta b/packages/audio/alsa-plugins/meta index d7ad61fb5a..d6bc7b2d2f 100644 --- a/packages/audio/alsa-plugins/meta +++ b/packages/audio/alsa-plugins/meta @@ -13,8 +13,4 @@ PKG_SHORTDESC="alsa-plugins: Advanced Linux Sound Architecture Plugins" PKG_LONGDESC="ALSA (Advanced Linux Sound Architecture) is the next generation Linux Sound API. It provides much finer (->better) access to the sound hardware, has a unbeatable mixer API and supports stuff like multi channel hardware, digital outs and ins, uninterleaved sound data access, and an oss emulation layer (for the old applications). It is the prefered API for professional sound apps under Linux." PKG_IS_ADDON="no" - -if [ "$PULSEAUDIO_SUPPORT" = yes ]; then - PKG_DEPENDS="$PKG_DEPENDS pulseaudio" - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS pulseaudio" -fi +PKG_AUTORECONF="yes" diff --git a/packages/audio/alsa-utils/meta b/packages/audio/alsa-utils/meta index 4a4bfc6d44..298c8b12b8 100644 --- a/packages/audio/alsa-utils/meta +++ b/packages/audio/alsa-utils/meta @@ -12,3 +12,5 @@ PKG_SECTION="audio" PKG_SHORTDESC="alsa-utils: Advanced Linux Sound Architecture utilities" PKG_LONGDESC="This package includes the utilities for ALSA, like alsamixer, aplay, arecord, alsactl, iecset and speaker-test." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/audio/alsa-utils/scripts/soundconfig b/packages/audio/alsa-utils/scripts/soundconfig index 9d30bf945d..90a5051155 100755 --- a/packages/audio/alsa-utils/scripts/soundconfig +++ b/packages/audio/alsa-utils/scripts/soundconfig @@ -122,11 +122,15 @@ else mixer 1 IEC958,2 on mixer 1 IEC958,3 on - # ASRock ION 330 has Master Front set to 0 mixer 0 'Master Front' 100% +# Shuttle XS35GT needs this too + mixer 0 Master,0 100% + + fi +exit 0 )& diff --git a/packages/audio/alsa/meta b/packages/audio/alsa/meta index e693eb0904..d9eeba7627 100644 --- a/packages/audio/alsa/meta +++ b/packages/audio/alsa/meta @@ -12,3 +12,5 @@ PKG_SECTION="audio" PKG_SHORTDESC="alsa: Matapackage to install all alsa components" PKG_LONGDESC="ALSA (Advanced Linux Sound Architecture) is the next generation Linux Sound API. It provides much finer (->better) access to the sound hardware, has a unbeatable mixer API and supports stuff like multi channel hardware, digital outs and ins, uninterleaved sound data access, and an oss emulation layer (for the old applications). It is the prefered API for professional sound apps under Linux." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/audio/faac/build b/packages/audio/faac/build index fe025c7058..c470b9c0d2 100755 --- a/packages/audio/faac/build +++ b/packages/audio/faac/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/audio/faac/install b/packages/audio/faac/install index 939463c8e3..85e9774ee0 100755 --- a/packages/audio/faac/install +++ b/packages/audio/faac/install @@ -3,4 +3,4 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/libfaac/.libs/*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/libfaac/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/audio/faac/meta b/packages/audio/faac/meta new file mode 100644 index 0000000000..6551f34aed --- /dev/null +++ b/packages/audio/faac/meta @@ -0,0 +1,16 @@ +PKG_NAME="faac" +PKG_VERSION="1.28" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="LGPL" +PKG_SITE="http://www.audiocoding.com/" +PKG_URL="http://heanet.dl.sourceforge.net/sourceforge/faac/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="audio" +PKG_SHORTDESC="faac: An MPEG-4 AAC encoder" +PKG_LONGDESC="The FAAC project includes the AAC encoder supporting several MPEG-4 object types (LC, Main, LTP, HE AAC, PS) and file formats (ADTS AAC, raw AAC, MP4), multichannel and gapless encoding as well as MP4 metadata tags. The codecs are compatible with standard-compliant audio applications using one or more of these profiles." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/audio/faac/url b/packages/audio/faac/url deleted file mode 100644 index a4292730d5..0000000000 --- a/packages/audio/faac/url +++ /dev/null @@ -1 +0,0 @@ -http://heanet.dl.sourceforge.net/sourceforge/faac/faac-1.28.tar.gz diff --git a/packages/audio/faad2/build b/packages/audio/faad2/build index d152dd9fcf..a2f7448fd4 100755 --- a/packages/audio/faad2/build +++ b/packages/audio/faad2/build @@ -2,11 +2,7 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD - -$AUTORECONF ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ diff --git a/packages/audio/faad2/install b/packages/audio/faad2/install index bfa9f18c1a..e43a8c5563 100755 --- a/packages/audio/faad2/install +++ b/packages/audio/faad2/install @@ -3,4 +3,4 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/libfaad/.libs/*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/libfaad/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/audio/faad2/meta b/packages/audio/faad2/meta new file mode 100644 index 0000000000..71eaeb620d --- /dev/null +++ b/packages/audio/faad2/meta @@ -0,0 +1,16 @@ +PKG_NAME="faad2" +PKG_VERSION="2.7" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.audiocoding.com/" +PKG_URL="http://sunet.dl.sourceforge.net/project/faac/faad2-src/$PKG_NAME-$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="audio" +PKG_SHORTDESC="faad: An MPEG-4 AAC decoder" +PKG_LONGDESC="The FAAD project includes the AAC decoder FAAD2. It supports several MPEG-4 object types (LC, Main, LTP, HE AAC, PS) and file formats (ADTS AAC, raw AAC, MP4), multichannel and gapless decoding as well as MP4 metadata tags. The codecs are compatible with standard-compliant audio applications using one or more of these profiles." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/audio/faad2/patches/11_faad-stdio.diff b/packages/audio/faad2/patches/faad2-2.7-stdio.patch similarity index 100% rename from packages/audio/faad2/patches/11_faad-stdio.diff rename to packages/audio/faad2/patches/faad2-2.7-stdio.patch diff --git a/packages/audio/faad2/unpack b/packages/audio/faad2/unpack deleted file mode 100755 index a9a42e2fa7..0000000000 --- a/packages/audio/faad2/unpack +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -. config/options $1 - -cp $BUILD/configtools/config.guess $BUILD/$1* -cp $BUILD/configtools/config.sub $BUILD/$1* -chmod a+x $BUILD/$1*/configure diff --git a/packages/audio/faad2/url b/packages/audio/faad2/url deleted file mode 100644 index f5dd619b5a..0000000000 --- a/packages/audio/faad2/url +++ /dev/null @@ -1 +0,0 @@ -http://sunet.dl.sourceforge.net/project/faac/faad2-src/faad2-2.7/faad2-2.7.tar.gz diff --git a/packages/audio/flac/build b/packages/audio/flac/build index 39e2beaaeb..dbf331f5c3 100755 --- a/packages/audio/flac/build +++ b/packages/audio/flac/build @@ -2,10 +2,8 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build libogg - cd $PKG_BUILD +do_autoreconf -I m4 ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ diff --git a/packages/audio/flac/install b/packages/audio/flac/install index 89e4e36ce5..4eae8ebc34 100755 --- a/packages/audio/flac/install +++ b/packages/audio/flac/install @@ -2,7 +2,5 @@ . config/options $1 -$SCRIPTS/install libogg - mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/src/libFLAC/.libs/libFLAC.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/src/libFLAC/.libs/libFLAC.so* $INSTALL/usr/lib diff --git a/packages/audio/flac/meta b/packages/audio/flac/meta new file mode 100644 index 0000000000..137f24db22 --- /dev/null +++ b/packages/audio/flac/meta @@ -0,0 +1,16 @@ +PKG_NAME="flac" +PKG_VERSION="1.2.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="LGPL" +PKG_SITE="http://flac.sourceforge.net/" +PKG_URL="http://downloads.sourceforge.net/flac/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="libogg" +PKG_BUILD_DEPENDS="toolchain libogg libiconv" +PKG_PRIORITY="optional" +PKG_SECTION="audio" +PKG_SHORTDESC="flac: An Free Lossless Audio Codec" +PKG_LONGDESC="Grossly oversimplified, FLAC is similar to MP3, but lossless, meaning that audio is compressed in FLAC without throwing away any information. This is similar to how Zip works, except with FLAC you will get much better compression because it is designed specifically for audio." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/audio/flac/patches/flac-1.2.1-cxxflags.diff b/packages/audio/flac/patches/flac-1.2.1-cxxflags.patch similarity index 100% rename from packages/audio/flac/patches/flac-1.2.1-cxxflags.diff rename to packages/audio/flac/patches/flac-1.2.1-cxxflags.patch diff --git a/packages/audio/flac/patches/flac-1.2.1-gcc_4.3.diff b/packages/audio/flac/patches/flac-1.2.1-gcc_4.3.patch similarity index 100% rename from packages/audio/flac/patches/flac-1.2.1-gcc_4.3.diff rename to packages/audio/flac/patches/flac-1.2.1-gcc_4.3.patch diff --git a/packages/audio/flac/url b/packages/audio/flac/url deleted file mode 100644 index f0e549c68a..0000000000 --- a/packages/audio/flac/url +++ /dev/null @@ -1 +0,0 @@ -http://downloads.sourceforge.net/flac/flac-1.2.1.tar.gz diff --git a/packages/audio/libcdio/build b/packages/audio/libcdio/build index b51def16f2..00a808877b 100755 --- a/packages/audio/libcdio/build +++ b/packages/audio/libcdio/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/audio/libcdio/meta b/packages/audio/libcdio/meta new file mode 100644 index 0000000000..91369eb33e --- /dev/null +++ b/packages/audio/libcdio/meta @@ -0,0 +1,16 @@ +PKG_NAME="libcdio" +PKG_VERSION="0.82" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.gnu.org/software/libcdio/" +PKG_URL="http://ftp.gnu.org/gnu/libcdio/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="audio" +PKG_SHORTDESC="libcdio: A CD-ROM reading and control library" +PKG_LONGDESC="This library is to encapsulate CD-ROM reading and control. Applications wishing to be oblivious of the OS- and device-dependant properties of a CD-ROM can use this library. Some support for disk image types like BIN/CUE and NRG is available, so applications that use this library also have the ability to read disc images as though they were CD's." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/audio/libcdio/url b/packages/audio/libcdio/url deleted file mode 100644 index 644ebcc881..0000000000 --- a/packages/audio/libcdio/url +++ /dev/null @@ -1 +0,0 @@ -http://ftp.gnu.org/gnu/libcdio/libcdio-0.82.tar.bz2 diff --git a/packages/audio/libmad/build b/packages/audio/libmad/build index 6a8afb8a41..0dfed46dc1 100755 --- a/packages/audio/libmad/build +++ b/packages/audio/libmad/build @@ -2,9 +2,12 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD + +# some fixes for autoreconf + touch NEWS AUTHORS ChangeLog + do_autoreconf + ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ diff --git a/packages/audio/libmad/install b/packages/audio/libmad/install index 98caa5e53d..165665d2fd 100755 --- a/packages/audio/libmad/install +++ b/packages/audio/libmad/install @@ -3,4 +3,4 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/.libs/*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/audio/libmad/meta b/packages/audio/libmad/meta new file mode 100644 index 0000000000..8f0827a609 --- /dev/null +++ b/packages/audio/libmad/meta @@ -0,0 +1,16 @@ +PKG_NAME="libmad" +PKG_VERSION="0.15.1b" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.mars.org/home/rob/proj/mpeg/" +PKG_URL="http://downloads.sourceforge.net/mad/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="audio" +PKG_SHORTDESC="libmad: MPEG Audio Decoder" +PKG_LONGDESC="MAD is a high-quality MPEG audio decoder. It currently supports MPEG-1 and the MPEG-2 extension to Lower Sampling Frequencies, as well as the so-called MPEG 2.5 format. All three audio layers (Layer I, Layer II, and Layer III a.k.a. MP3) are fully implemented." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/audio/libmad/url b/packages/audio/libmad/url deleted file mode 100644 index 143b20c8ae..0000000000 --- a/packages/audio/libmad/url +++ /dev/null @@ -1 +0,0 @@ -http://downloads.sourceforge.net/mad/libmad-0.15.1b.tar.gz diff --git a/packages/audio/libmms/build b/packages/audio/libmms/build index 4992e565f1..186f78693d 100755 --- a/packages/audio/libmms/build +++ b/packages/audio/libmms/build @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build glib - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/audio/libmms/install b/packages/audio/libmms/install index 2e2981e5ef..a0f9a6ac83 100755 --- a/packages/audio/libmms/install +++ b/packages/audio/libmms/install @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/install glib - mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/src/.libs/*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/src/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/audio/libmms/meta b/packages/audio/libmms/meta new file mode 100644 index 0000000000..c54498a21c --- /dev/null +++ b/packages/audio/libmms/meta @@ -0,0 +1,16 @@ +PKG_NAME="libmms" +PKG_VERSION="0.5" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="https://launchpad.net/libmms" +PKG_URL="http://launchpad.net/libmms/trunk/$PKG_VERSION/+download/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="glib" +PKG_BUILD_DEPENDS="toolchain glib" +PKG_PRIORITY="optional" +PKG_SECTION="audio" +PKG_SHORTDESC="libmms: a common library for parsing mms:// and mmsh:// type network streams." +PKG_LONGDESC="LibMMS is a common library for parsing mms:// and mmsh:// type network streams. These are commonly used to stream Windows Media Video content over the web. LibMMS itself is only for receiving MMS stream, it doesn't handle sending at all." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/audio/libmms/patches/10-libmms-0.5-this_keyword.diff b/packages/audio/libmms/patches/libmms-0.5-this_keyword.patch similarity index 100% rename from packages/audio/libmms/patches/10-libmms-0.5-this_keyword.diff rename to packages/audio/libmms/patches/libmms-0.5-this_keyword.patch diff --git a/packages/audio/libmms/url b/packages/audio/libmms/url deleted file mode 100644 index 07f68c64c2..0000000000 --- a/packages/audio/libmms/url +++ /dev/null @@ -1 +0,0 @@ -http://launchpad.net/libmms/trunk/0.5/+download/libmms-0.5.tar.gz diff --git a/packages/audio/libmodplug/build b/packages/audio/libmodplug/build index c7a6a0997d..3f62498c01 100755 --- a/packages/audio/libmodplug/build +++ b/packages/audio/libmodplug/build @@ -2,7 +2,7 @@ . config/options $1 -$SCRIPTS/build toolchain +strip_lto # libmodplug fails to build with LTO optimization cd $PKG_BUILD ./configure --host=$TARGET_NAME \ diff --git a/packages/audio/libmodplug/install b/packages/audio/libmodplug/install index 18a3892c82..0bd2be4525 100755 --- a/packages/audio/libmodplug/install +++ b/packages/audio/libmodplug/install @@ -3,4 +3,4 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/src/.libs/*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/src/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/audio/libmodplug/meta b/packages/audio/libmodplug/meta new file mode 100644 index 0000000000..50ce2ff07c --- /dev/null +++ b/packages/audio/libmodplug/meta @@ -0,0 +1,16 @@ +PKG_NAME="libmodplug" +PKG_VERSION="0.8.8.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://modplug-xmms.sourceforge.net/" +PKG_URL="http://ignum.dl.sourceforge.net/project/modplug-xmms/libmodplug/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="audio" +PKG_SHORTDESC="libmodplug: renders mod music files as raw audio data, for playing or conversion." +PKG_LONGDESC="libmodplug renders mod music files as raw audio data, for playing or conversion. libmodplug is based on the fast and high quality mod playing code written and released to the public domain by Olivier Lapicque. mod, .s3m, .it, .xm, and a number of lesser-known formats are supported. Optional features include high-quality resampling, bass expansion, surround and reverb." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/audio/libmodplug/url b/packages/audio/libmodplug/url deleted file mode 100644 index b4eb7d163d..0000000000 --- a/packages/audio/libmodplug/url +++ /dev/null @@ -1 +0,0 @@ -http://ignum.dl.sourceforge.net/project/modplug-xmms/libmodplug/0.8.8/libmodplug-0.8.8.tar.gz \ No newline at end of file diff --git a/packages/audio/libogg/build b/packages/audio/libogg/build index 1d3eb43bba..7db813cc8e 100755 --- a/packages/audio/libogg/build +++ b/packages/audio/libogg/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -12,6 +10,6 @@ cd $PKG_BUILD --disable-static \ --enable-shared \ -$MAKE +make $MAKEINSTALL \ No newline at end of file diff --git a/packages/audio/libogg/install b/packages/audio/libogg/install index 2187d7d31f..c429876da3 100755 --- a/packages/audio/libogg/install +++ b/packages/audio/libogg/install @@ -3,4 +3,4 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/src/.libs/libogg*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/src/.libs/libogg*.so* $INSTALL/usr/lib diff --git a/packages/audio/libogg/meta b/packages/audio/libogg/meta new file mode 100644 index 0000000000..f9ab5c90c4 --- /dev/null +++ b/packages/audio/libogg/meta @@ -0,0 +1,16 @@ +PKG_NAME="libogg" +PKG_VERSION="1.2.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="BSD" +PKG_SITE="http://www.xiph.org/ogg/" +PKG_URL="http://downloads.xiph.org/releases/ogg/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="audio" +PKG_SHORTDESC="libogg: Open source bitstream container format" +PKG_LONGDESC="Libogg contains necessary functionality to create, decode, and work with Ogg bitstreams." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/audio/libogg/url b/packages/audio/libogg/url deleted file mode 100644 index b625a96597..0000000000 --- a/packages/audio/libogg/url +++ /dev/null @@ -1 +0,0 @@ -http://downloads.xiph.org/releases/ogg/libogg-1.2.0.tar.gz diff --git a/packages/audio/libsamplerate/build b/packages/audio/libsamplerate/build index 9504299be2..e42122d20a 100755 --- a/packages/audio/libsamplerate/build +++ b/packages/audio/libsamplerate/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -14,7 +12,7 @@ cd $PKG_BUILD --disable-static \ --datadir=/usr/share \ --disable-fftw \ - --disable-sndfile + --disable-sndfile \ make diff --git a/packages/audio/libsamplerate/install b/packages/audio/libsamplerate/install index b4d582ea1f..a0f9a6ac83 100755 --- a/packages/audio/libsamplerate/install +++ b/packages/audio/libsamplerate/install @@ -3,5 +3,5 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/src/.libs/*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/src/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/audio/libsamplerate/meta b/packages/audio/libsamplerate/meta new file mode 100644 index 0000000000..dc5b63032a --- /dev/null +++ b/packages/audio/libsamplerate/meta @@ -0,0 +1,16 @@ +PKG_NAME="libsamplerate" +PKG_VERSION="0.1.7" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.mega-nerd.com/SRC/" +PKG_URL="http://www.mega-nerd.com/SRC/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="audio" +PKG_SHORTDESC="libsamplerate: A Sample Rate Converter library for audio" +PKG_LONGDESC="Libsamplerate is a Sample Rate Converter for audio. One example of where such a thing would be useful is converting audio from the CD sample rate of 44.1kHz to the 48kHz sample rate used by DAT players." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" # ToDo diff --git a/packages/audio/libsamplerate/url b/packages/audio/libsamplerate/url deleted file mode 100644 index 2238131036..0000000000 --- a/packages/audio/libsamplerate/url +++ /dev/null @@ -1 +0,0 @@ -http://www.mega-nerd.com/SRC/libsamplerate-0.1.7.tar.gz \ No newline at end of file diff --git a/packages/audio/libsndfile/meta b/packages/audio/libsndfile/meta index faa80fe8e5..990ae0e786 100644 --- a/packages/audio/libsndfile/meta +++ b/packages/audio/libsndfile/meta @@ -12,3 +12,5 @@ PKG_SECTION="audio" PKG_SHORTDESC="libsndfile: A library for accessing various audio file formats" PKG_LONGDESC="libsndfile is a C library for reading and writing sound files such as AIFF, AU, WAV, and others through one standard interface. It can currently read/write 8, 16, 24 and 32-bit PCM files as well as 32 and 64-bit floating point WAV files and a number of compressed formats. It compiles and runs on *nix, MacOS, and Win32." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/audio/libvorbis/build b/packages/audio/libvorbis/build index c62ccd3d5d..63cee8f9eb 100755 --- a/packages/audio/libvorbis/build +++ b/packages/audio/libvorbis/build @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build libogg - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -14,6 +11,6 @@ cd $PKG_BUILD --enable-shared \ --with-ogg=$SYSROOT_PREFIX/usr -$MAKE +make $MAKEINSTALL diff --git a/packages/audio/libvorbis/install b/packages/audio/libvorbis/install index 2a81499420..bed96af141 100755 --- a/packages/audio/libvorbis/install +++ b/packages/audio/libvorbis/install @@ -1,7 +1,6 @@ #!/bin/sh . config/options $1 -$SCRIPTS/install libogg mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/lib/.libs/libvorbis*.so*[.0-9] $INSTALL/usr/lib + cp -P $PKG_BUILD/lib/.libs/libvorbis*.so*[.0-9] $INSTALL/usr/lib diff --git a/packages/audio/libvorbis/meta b/packages/audio/libvorbis/meta new file mode 100644 index 0000000000..c707995598 --- /dev/null +++ b/packages/audio/libvorbis/meta @@ -0,0 +1,16 @@ +PKG_NAME="libvorbis" +PKG_VERSION="1.3.2" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="BSD" +PKG_SITE="http://www.vorbis.com/" +PKG_URL="http://downloads.xiph.org/releases/vorbis/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libogg" +PKG_BUILD_DEPENDS="toolchain libogg" +PKG_PRIORITY="optional" +PKG_SECTION="audio" +PKG_SHORTDESC="libvorbis: Lossless audio compression tools using the ogg-vorbis algorithms" +PKG_LONGDESC="Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format for mid to high quality (8kHz-48.0kHz, 16+ bit, polyphonic) audio and music at fixed and variable bitrates from 16 to 128 kbps/channel. This places Vorbis in the same competitive class as audio representations such as MPEG-4 (AAC), and similar to, but higher performance than MPEG-1/2 audio layer 3, MPEG-4 audio (TwinVQ), WMA and PAC." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/audio/libvorbis/patches/libvorbis-1.3.2-configure.patch b/packages/audio/libvorbis/patches/libvorbis-1.3.2-configure.patch new file mode 100644 index 0000000000..5a4eb52857 --- /dev/null +++ b/packages/audio/libvorbis/patches/libvorbis-1.3.2-configure.patch @@ -0,0 +1,31 @@ +diff -Naur libvorbis-1.3.2-old/configure.ac libvorbis-1.3.2-new/configure.ac +--- libvorbis-1.3.2-old/configure.ac 2010-11-01 12:27:12.000000000 -0700 ++++ libvorbis-1.3.2-new/configure.ac 2010-11-01 14:50:03.000000000 -0700 +@@ -8,6 +8,7 @@ + AC_INIT([libvorbis],[1.3.2],[vorbis-dev@xiph.org]) + + AC_CONFIG_SRCDIR([lib/mdct.c]) ++AC_CONFIG_MACRO_DIR([m4]) + + AC_CANONICAL_TARGET([]) + +@@ -16,7 +17,6 @@ + AM_CONFIG_HEADER([config.h]) + + dnl Add parameters for aclocal +-AC_SUBST(ACLOCAL_AMFLAGS, "-I m4") + + dnl Library versioning + dnl - library source changed -> increment REVISION +diff -Naur libvorbis-1.3.2-old/Makefile.am libvorbis-1.3.2-new/Makefile.am +--- libvorbis-1.3.2-old/Makefile.am 2010-03-25 18:56:25.000000000 -0700 ++++ libvorbis-1.3.2-new/Makefile.am 2010-11-01 14:50:03.000000000 -0700 +@@ -2,6 +2,8 @@ + + AUTOMAKE_OPTIONS = 1.7 foreign dist-zip dist-bzip2 + ++ACLOCAL_AMFLAGS = -I m4 ++ + SUBDIRS = m4 include vq lib test doc + + if BUILD_EXAMPLES diff --git a/packages/audio/libvorbis/url b/packages/audio/libvorbis/url deleted file mode 100644 index 2318cd28d9..0000000000 --- a/packages/audio/libvorbis/url +++ /dev/null @@ -1 +0,0 @@ -http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.1.tar.bz2 diff --git a/packages/audio/pulseaudio/build b/packages/audio/pulseaudio/build deleted file mode 100755 index 5a60cc8af0..0000000000 --- a/packages/audio/pulseaudio/build +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh - -. config/options $1 - -# ensure we dont use as-needed optimization. - LDFLAGS=`echo $LDFLAGS | sed -e "s|-Wl,--as-needed||"` - -if [ "$AVAHI_DAEMON" = yes ]; then - PULSEAUDIO_AVAHI="--enable-avahi" -else - PULSEAUDIO_AVAHI="--disable-avahi" -fi - -cd $PKG_BUILD - -$AUTORECONF - -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --disable-static \ - --enable-shared \ - --disable-x11 \ - --disable-samplerate \ - --disable-oss-output \ - --disable-oss-wrapper \ - --enable-alsa \ - --disable-solaris \ - --disable-glib2 \ - --disable-gtk2 \ - --disable-gconf \ - $PULSEAUDIO_AVAHI \ - --disable-jack \ - --disable-lirc \ - --disable-hal \ - --enable-udev \ - --disable-hal-compat \ - --disable-bluez \ - --enable-dbus \ - --disable-ipv6 \ - --enable-openssl \ - --disable-manpages \ - --disable-per-user-esound-socket \ - --disable-legacy-runtime-dir \ - --with-system-user=root \ - --with-system-group=root \ - --with-access-group=root \ - --with-module-dir="/usr/lib/pulse" \ - -# --with-system-user=pulse \ -# --with-system-group=pulse \ -# --with-access-group=pulse-access \ - -make - -$MAKEINSTALL diff --git a/packages/audio/pulseaudio/config/default.pa b/packages/audio/pulseaudio/config/default.pa deleted file mode 100644 index 50ec653b31..0000000000 --- a/packages/audio/pulseaudio/config/default.pa +++ /dev/null @@ -1,140 +0,0 @@ -#!/usr/bin/pulseaudio -nF -# -# This file is part of PulseAudio. -# -# PulseAudio is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# PulseAudio is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with PulseAudio; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - -# This startup script is used only if PulseAudio is started per-user -# (i.e. not in system mode) - -.nofail - -### Load something into the sample cache -#load-sample-lazy x11-bell /usr/share/sounds/gtk-events/activate.wav -#load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav -#load-sample-lazy pulse-coldplug /usr/share/sounds/startup3.wav -#load-sample-lazy pulse-access /usr/share/sounds/generic.wav - -.fail - -### Automatically restore the volume of streams and devices -load-module module-device-restore -#load-module module-stream-restore - -#geexbox-special: enable device switching, forget about the cache -load-module module-stream-restore restore_device=false -load-module module-card-restore - -### Automatically augment property information from .desktop files -### stored in /usr/share/application -#disabled for geexbox: load-module module-augment-properties - -### Load audio drivers statically (it's probably better to not load -### these drivers manually, but instead use module-hal-detect -- -### see below -- for doing this automatically) -#load-module module-alsa-sink -#load-module module-alsa-source device=hw:1,0 -#load-module module-oss device="/dev/dsp" sink_name=output source_name=input -#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input -#load-module module-null-sink -#load-module module-pipe-sink - -### Automatically load driver modules depending on the hardware available -#disabled for geexbox: .ifexists module-udev-detect.so -load-module module-udev-detect -#disabled for geexbox: .else -### Alternatively use the static hardware detection module (for systems that -### lack udev support) -#disabled for geexbox: load-module module-detect -#disabled for geexbox: .endif - -### Automatically load driver modules for Bluetooth hardware -#disabled for geexbox: .ifexists module-bluetooth-discover.so -#disabled for geexbox: load-module module-bluetooth-discover -#disabled for geexbox: .endif - -### Load several protocols -#disabled for geexbox: .ifexists module-esound-protocol-unix.so -#disabled for geexbox: load-module module-esound-protocol-unix -#disabled for geexbox: .endif -load-module module-native-protocol-unix - -### Network access (may be configured with paprefs, so leave this commented -### here if you plan to use paprefs) -#load-module module-esound-protocol-tcp -#load-module module-native-protocol-tcp -#load-module module-zeroconf-publish - -### Load the RTP reciever module (also configured via paprefs, see above) -#load-module module-rtp-recv - -### Load the RTP sender module (also configured via paprefs, see above) -#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 description="RTP Multicast Sink" -#load-module module-rtp-send source=rtp.monitor - -### Load additional modules from GConf settings. This can be configured with the paprefs tool. -### Please keep in mind that the modules configured by paprefs might conflict with manually -### loaded modules. -#disabled for geexbox: .ifexists module-gconf.so -#disabled for geexbox: .nofail -#disabled for geexbox: load-module module-gconf -#disabled for geexbox: .fail -#disabled for geexbox: .endif - -### Automatically restore the default sink/source when changed by the user during runtime -load-module module-default-device-restore - -### Automatically move streams to the default sink if the sink they are -### connected to dies, similar for sources -load-module module-rescue-streams - -### Make sure we always have a sink around, even if it is a null sink. -load-module module-always-sink - -### Honour intended role device property -#disabled for geexbox: load-module module-intended-roles - -### Automatically suspend sinks/sources that become idle for too long -load-module module-suspend-on-idle - -### If autoexit on idle is enabled we want to make sure we only quit -### when no local session needs us anymore. -#disabled for geexbox: load-module module-console-kit - -### Enable positioned event sounds -load-module module-position-event-sounds - -### Cork music streams when a phone stream is active -#disabled for geexbox: load-module module-cork-music-on-phone - -# X11 modules should not be started from default.pa so that one daemon -# can be shared by multiple sessions. - -### Load X11 bell module -#load-module module-x11-bell sample=bell-windowing-system - -### Register ourselves in the X11 session manager -#load-module module-x11-xsmp - -### Publish connection data in the X11 root window -#.ifexists module-x11-publish.so -#.nofail -#load-module module-x11-publish -#.fail -#.endif - -### Make some devices default -#set-default-sink output -#set-default-source input diff --git a/packages/audio/pulseaudio/install b/packages/audio/pulseaudio/install deleted file mode 100755 index 772d3b3e9e..0000000000 --- a/packages/audio/pulseaudio/install +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh - -. config/options $1 - -# add_user pulse x 493 483 "PulseAudio System Daemon" "/var/run/pulse" "/bin/sh" -# add_group pulse 483 -# add_group pulse-access 482 - -mkdir -p $INSTALL/etc/dbus-1/system.d - cp $PKG_BUILD/src/daemon/pulseaudio-system.conf $INSTALL/etc/dbus-1/system.d - sed -e 's%user="pulse"%user="root"%g' -i $INSTALL/etc/dbus-1/system.d/pulseaudio-system.conf - -mkdir -p $INSTALL/etc/pulse - cp $PKG_BUILD/src/client.conf $INSTALL/etc/pulse - cp $PKG_BUILD/src/daemon.conf $INSTALL/etc/pulse -# cp $PKG_BUILD/src/default.pa $INSTALL/etc/pulse - cp $PKG_DIR/config/default.pa $INSTALL/etc/pulse - cp $PKG_BUILD/src/system.pa $INSTALL/etc/pulse - -mkdir -p $INSTALL/lib/udev/rules.d - cp $PKG_BUILD/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules $INSTALL/lib/udev/rules.d - -mkdir -p $INSTALL/usr/bin - cp $PKG_BUILD/src/.libs/pabrowse $INSTALL/usr/bin - cp $PKG_BUILD/src/.libs/pacat $INSTALL/usr/bin - cp $PKG_BUILD/src/.libs/pacmd $INSTALL/usr/bin - cp $PKG_BUILD/src/.libs/pactl $INSTALL/usr/bin - ln -sf pactl $INSTALL/usr/bin/pamon - ln -sf pactl $INSTALL/usr/bin/paplay - ln -sf pactl $INSTALL/usr/bin/parec - ln -sf pactl $INSTALL/usr/bin/parecord - cp $PKG_BUILD/src/.libs/pasuspender $INSTALL/usr/bin - cp $PKG_BUILD/src/.libs/pulseaudio $INSTALL/usr/bin - cp $PKG_BUILD/src/start-pulseaudio-x11 $INSTALL/usr/bin - -mkdir -p $INSTALL/usr/lib - cp -P $PKG_BUILD/src/.libs/libpulse*.so* $INSTALL/usr/lib - rm -rf $INSTALL/usr/lib/libpulse*.so*T - -mkdir -p $INSTALL/usr/lib/pulse - cp -P $PKG_BUILD/src/.libs/libalsa-util.so $INSTALL/usr/lib/pulse - cp -P $PKG_BUILD/src/.libs/libavahi-wrap.so $INSTALL/usr/lib/pulse - cp -P $PKG_BUILD/src/.libs/libcli.so $INSTALL/usr/lib/pulse - cp -P $PKG_BUILD/src/.libs/libprotocol-cli.so $INSTALL/usr/lib/pulse - cp -P $PKG_BUILD/src/.libs/libprotocol-esound.so $INSTALL/usr/lib/pulse - cp -P $PKG_BUILD/src/.libs/libprotocol-http.so $INSTALL/usr/lib/pulse - cp -P $PKG_BUILD/src/.libs/libprotocol-native.so $INSTALL/usr/lib/pulse - cp -P $PKG_BUILD/src/.libs/libprotocol-simple.so $INSTALL/usr/lib/pulse - cp -P $PKG_BUILD/src/.libs/libraop.so $INSTALL/usr/lib/pulse - cp -P $PKG_BUILD/src/.libs/librtp.so $INSTALL/usr/lib/pulse - cp -P $PKG_BUILD/src/.libs/module-*.so $INSTALL/usr/lib/pulse - -mkdir -p $INSTALL/usr/share/pulseaudio/alsa-mixer/paths - cp $PKG_BUILD/src/modules/alsa/mixer/paths/* $INSTALL/usr/share/pulseaudio/alsa-mixer/paths - -mkdir -p $INSTALL/usr/share/pulseaudio/alsa-mixer/profile-sets - cp $PKG_BUILD/src/modules/alsa/mixer/profile-sets/*.conf $INSTALL/usr/share/pulseaudio/alsa-mixer/profile-sets diff --git a/packages/audio/pulseaudio/meta b/packages/audio/pulseaudio/meta deleted file mode 100644 index 2a3ac7ff78..0000000000 --- a/packages/audio/pulseaudio/meta +++ /dev/null @@ -1,19 +0,0 @@ -PKG_NAME="pulseaudio" -PKG_VERSION="0.9.21" -PKG_REV="1" -PKG_ARCH="any" -PKG_LICENSE="GPL" -PKG_SITE="http://pulseaudio.org/" -PKG_URL="http://0pointer.de/lennart/projects/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz" -PKG_DEPENDS="libtool alsa-lib libsndfile speex dbus udev openssl alsa-plugins" -PKG_BUILD_DEPENDS="toolchain libtool alsa-lib libsndfile speex dbus udev openssl" -PKG_PRIORITY="optional" -PKG_SECTION="audio" -PKG_SHORTDESC="pulseaudio: Yet another sound server for Unix" -PKG_LONGDESC="PulseAudio is a sound server for Linux and other Unix-like operating systems. It is intended to be an improved drop-in replacement for the Enlightened Sound Daemon (esound or esd). In addition to the features esound provides, PulseAudio has an extensible plugin architecture, support for more than one sink per source, better low-latency behavior, the ability to be embedded into other software, a completely asynchronous C API, a simple command line interface for reconfiguring the daemon while running, flexible and implicit sample type conversion and resampling, and a "Zero-Copy" architecture." -PKG_IS_ADDON="no" - -if [ "$AVAHI_DAEMON" = yes ]; then - PKG_DEPENDS="$PKG_DEPENDS avahi" - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS avahi" -fi diff --git a/packages/audio/pulseaudio/patches/0001-dbus-remove-filter-functions-only-if-they-were-actua.diff b/packages/audio/pulseaudio/patches/0001-dbus-remove-filter-functions-only-if-they-were-actua.diff deleted file mode 100644 index 4f91d62284..0000000000 --- a/packages/audio/pulseaudio/patches/0001-dbus-remove-filter-functions-only-if-they-were-actua.diff +++ /dev/null @@ -1,289 +0,0 @@ -From c41ee00893b6b0d5cc48ee041b8e4835eac548f0 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 8 Jan 2010 20:06:21 +0100 -Subject: [PATCH 01/62] dbus: remove filter functions only if they were actually set before - -This fixes an assert when destructing modules that have not been fully -initialized. - -https://bugzilla.redhat.com/show_bug.cgi?id=548525 ---- - src/modules/bluetooth/bluetooth-util.c | 5 +++- - src/modules/bluetooth/module-bluetooth-device.c | 7 ++++- - src/modules/bluetooth/module-bluetooth-proximity.c | 11 ++++---- - src/modules/module-console-kit.c | 9 +++++- - src/modules/module-hal-detect.c | 10 ++++---- - src/pulse/context.c | 25 ++++--------------- - src/pulse/internal.h | 1 + - 7 files changed, 34 insertions(+), 34 deletions(-) - -diff --git a/src/modules/bluetooth/bluetooth-util.c b/src/modules/bluetooth/bluetooth-util.c -index 47d6200..795d510 100644 ---- a/src/modules/bluetooth/bluetooth-util.c -+++ b/src/modules/bluetooth/bluetooth-util.c -@@ -37,6 +37,7 @@ struct pa_bluetooth_discovery { - PA_LLIST_HEAD(pa_dbus_pending, pending); - pa_hashmap *devices; - pa_hook hook; -+ pa_bool_t filter_added; - }; - - static void get_properties_reply(DBusPendingCall *pending, void *userdata); -@@ -788,6 +789,7 @@ pa_bluetooth_discovery* pa_bluetooth_discovery_get(pa_core *c) { - pa_log_error("Failed to add filter function"); - goto fail; - } -+ y->filter_added = TRUE; - - if (pa_dbus_add_matches( - pa_dbus_connection_get(y->connection), &err, -@@ -856,7 +858,8 @@ void pa_bluetooth_discovery_unref(pa_bluetooth_discovery *y) { - "type='signal',sender='org.bluez',interface='org.bluez.AudioSink',member='PropertyChanged'", - "type='signal',sender='org.bluez',interface='org.bluez.AudioSource',member='PropertyChanged'", NULL); - -- dbus_connection_remove_filter(pa_dbus_connection_get(y->connection), filter_cb, y); -+ if (y->filter_added) -+ dbus_connection_remove_filter(pa_dbus_connection_get(y->connection), filter_cb, y); - - pa_dbus_connection_unref(y->connection); - } -diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c -index 0ba1421..19676df 100644 ---- a/src/modules/bluetooth/module-bluetooth-device.c -+++ b/src/modules/bluetooth/module-bluetooth-device.c -@@ -179,6 +179,8 @@ struct userdata { - - int stream_write_type; - int service_write_type, service_read_type; -+ -+ pa_bool_t filter_added; - }; - - #define FIXED_LATENCY_PLAYBACK_A2DP (25*PA_USEC_PER_MSEC) -@@ -2405,6 +2407,7 @@ int pa__init(pa_module* m) { - pa_log_error("Failed to add filter function"); - goto fail; - } -+ u->filter_added = TRUE; - - speaker = pa_sprintf_malloc("type='signal',sender='org.bluez',interface='org.bluez.Headset',member='SpeakerGainChanged',path='%s'", u->path); - mike = pa_sprintf_malloc("type='signal',sender='org.bluez',interface='org.bluez.Headset',member='MicrophoneGainChanged',path='%s'", u->path); -@@ -2494,7 +2497,9 @@ void pa__done(pa_module *m) { - pa_xfree(mike); - } - -- dbus_connection_remove_filter(pa_dbus_connection_get(u->connection), filter_cb, u); -+ if (u->filter_added) -+ dbus_connection_remove_filter(pa_dbus_connection_get(u->connection), filter_cb, u); -+ - pa_dbus_connection_unref(u->connection); - } - -diff --git a/src/modules/bluetooth/module-bluetooth-proximity.c b/src/modules/bluetooth/module-bluetooth-proximity.c -index c4cfd73..3eed9ce 100644 ---- a/src/modules/bluetooth/module-bluetooth-proximity.c -+++ b/src/modules/bluetooth/module-bluetooth-proximity.c -@@ -92,7 +92,8 @@ struct userdata { - unsigned n_found; - unsigned n_unknown; - -- pa_bool_t muted; -+ pa_bool_t muted:1; -+ pa_bool_t filter_added:1; - }; - - static void update_volume(struct userdata *u) { -@@ -358,9 +359,10 @@ static int add_matches(struct userdata *u, pa_bool_t add) { - } else - dbus_bus_remove_match(pa_dbus_connection_get(u->dbus_connection), filter2, &e); - -- if (add) -+ if (add) { - pa_assert_se(dbus_connection_add_filter(pa_dbus_connection_get(u->dbus_connection), filter_func, u, NULL)); -- else -+ u->filter_added = TRUE; -+ } else if (u->filter_added) - dbus_connection_remove_filter(pa_dbus_connection_get(u->dbus_connection), filter_func, u); - - r = 0; -@@ -393,9 +395,6 @@ int pa__init(pa_module*m) { - u->sink_name = pa_xstrdup(pa_modargs_get_value(ma, "sink", NULL)); - u->hci = pa_xstrdup(pa_modargs_get_value(ma, "hci", DEFAULT_HCI)); - u->hci_path = pa_sprintf_malloc("/org/bluez/%s", u->hci); -- u->n_found = u->n_unknown = 0; -- u->muted = FALSE; -- - u->bondings = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func); - - if (!(u->dbus_connection = pa_dbus_bus_get(m->core, DBUS_BUS_SYSTEM, &e))) { -diff --git a/src/modules/module-console-kit.c b/src/modules/module-console-kit.c -index 103f5c4..875852f 100644 ---- a/src/modules/module-console-kit.c -+++ b/src/modules/module-console-kit.c -@@ -67,6 +67,7 @@ struct userdata { - pa_core *core; - pa_dbus_connection *connection; - pa_hashmap *sessions; -+ pa_bool_t filter_added; - }; - - static void add_session(struct userdata *u, const char *id) { -@@ -300,7 +301,7 @@ int pa__init(pa_module*m) { - goto fail; - } - -- m->userdata = u = pa_xnew(struct userdata, 1); -+ m->userdata = u = pa_xnew0(struct userdata, 1); - u->core = m->core; - u->module = m; - u->connection = connection; -@@ -311,6 +312,8 @@ int pa__init(pa_module*m) { - goto fail; - } - -+ u->filter_added = TRUE; -+ - if (pa_dbus_add_matches( - pa_dbus_connection_get(connection), &error, - "type='signal',sender='org.freedesktop.ConsoleKit',interface='org.freedesktop.ConsoleKit.Seat',member='SessionAdded'", -@@ -359,7 +362,9 @@ void pa__done(pa_module *m) { - "type='signal',sender='org.freedesktop.ConsoleKit',interface='org.freedesktop.ConsoleKit.Seat',member='SessionAdded'", - "type='signal',sender='org.freedesktop.ConsoleKit',interface='org.freedesktop.ConsoleKit.Seat',member='SessionRemoved'", NULL); - -- dbus_connection_remove_filter(pa_dbus_connection_get(u->connection), filter_cb, u); -+ if (u->filter_added) -+ dbus_connection_remove_filter(pa_dbus_connection_get(u->connection), filter_cb, u); -+ - pa_dbus_connection_unref(u->connection); - } - -diff --git a/src/modules/module-hal-detect.c b/src/modules/module-hal-detect.c -index 1851913..23d4010 100644 ---- a/src/modules/module-hal-detect.c -+++ b/src/modules/module-hal-detect.c -@@ -87,6 +87,7 @@ struct userdata { - #ifdef HAVE_OSS_OUTPUT - pa_bool_t init_subdevs; - #endif -+ pa_bool_t filter_added:1; - }; - - #define CAPABILITY_ALSA "alsa" -@@ -733,12 +734,9 @@ int pa__init(pa_module*m) { - goto fail; - } - -- m->userdata = u = pa_xnew(struct userdata, 1); -+ m->userdata = u = pa_xnew0(struct userdata, 1); - u->core = m->core; -- u->context = NULL; -- u->connection = NULL; - u->devices = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func); -- u->capability = NULL; - - #ifdef HAVE_ALSA - u->use_tsched = TRUE; -@@ -800,6 +798,7 @@ int pa__init(pa_module*m) { - pa_log_error("Failed to add filter function"); - goto fail; - } -+ u->filter_added = TRUE; - - if (pa_dbus_add_matches( - pa_dbus_connection_get(u->connection), &error, -@@ -856,7 +855,8 @@ void pa__done(pa_module *m) { - "type='signal',sender='org.freedesktop.Hal',interface='org.freedesktop.Hal.Device.AccessControl',member='ACLRemoved'", - "type='signal',interface='org.pulseaudio.Server',member='DirtyGiveUpMessage'", NULL); - -- dbus_connection_remove_filter(pa_dbus_connection_get(u->connection), filter_cb, u); -+ if (u->filter_added) -+ dbus_connection_remove_filter(pa_dbus_connection_get(u->connection), filter_cb, u); - pa_dbus_connection_unref(u->connection); - } - -diff --git a/src/pulse/context.c b/src/pulse/context.c -index 7468d0a..c83230d 100644 ---- a/src/pulse/context.c -+++ b/src/pulse/context.c -@@ -145,7 +145,7 @@ pa_context *pa_context_new_with_proplist(pa_mainloop_api *mainloop, const char * - - pa_init_i18n(); - -- c = pa_xnew(pa_context, 1); -+ c = pa_xnew0(pa_context, 1); - PA_REFCNT_INIT(c); - - c->proplist = p ? pa_proplist_copy(p) : pa_proplist_new(); -@@ -157,9 +157,6 @@ pa_context *pa_context_new_with_proplist(pa_mainloop_api *mainloop, const char * - c->system_bus = c->session_bus = NULL; - #endif - c->mainloop = mainloop; -- c->client = NULL; -- c->pstream = NULL; -- c->pdispatch = NULL; - c->playback_streams = pa_dynarray_new(); - c->record_streams = pa_dynarray_new(); - c->client_index = PA_INVALID_INDEX; -@@ -170,22 +167,9 @@ pa_context *pa_context_new_with_proplist(pa_mainloop_api *mainloop, const char * - - c->error = PA_OK; - c->state = PA_CONTEXT_UNCONNECTED; -- c->ctag = 0; -- c->csyncid = 0; - - reset_callbacks(c); - -- c->is_local = FALSE; -- c->server_list = NULL; -- c->server = NULL; -- -- c->do_shm = FALSE; -- -- c->server_specified = FALSE; -- c->no_fail = FALSE; -- c->do_autospawn = FALSE; -- memset(&c->spawn_api, 0, sizeof(c->spawn_api)); -- - #ifndef MSG_NOSIGNAL - #ifdef SIGPIPE - pa_check_signal_is_blocked(SIGPIPE); -@@ -255,12 +239,14 @@ static void context_free(pa_context *c) { - - #ifdef HAVE_DBUS - if (c->system_bus) { -- dbus_connection_remove_filter(pa_dbus_wrap_connection_get(c->system_bus), filter_cb, c); -+ if (c->filter_added) -+ dbus_connection_remove_filter(pa_dbus_wrap_connection_get(c->system_bus), filter_cb, c); - pa_dbus_wrap_connection_free(c->system_bus); - } - - if (c->session_bus) { -- dbus_connection_remove_filter(pa_dbus_wrap_connection_get(c->session_bus), filter_cb, c); -+ if (c->filter_added) -+ dbus_connection_remove_filter(pa_dbus_wrap_connection_get(c->session_bus), filter_cb, c); - pa_dbus_wrap_connection_free(c->session_bus); - } - #endif -@@ -794,6 +780,7 @@ static void track_pulseaudio_on_dbus(pa_context *c, DBusBusType type, pa_dbus_wr - pa_log_warn("Failed to add filter function"); - goto fail; - } -+ c->filter_added = TRUE; - - if (pa_dbus_add_matches( - pa_dbus_wrap_connection_get(*conn), &error, -diff --git a/src/pulse/internal.h b/src/pulse/internal.h -index b371bfc..c3ebf74 100644 ---- a/src/pulse/internal.h -+++ b/src/pulse/internal.h -@@ -91,6 +91,7 @@ struct pa_context { - pa_bool_t no_fail:1; - pa_bool_t do_autospawn:1; - pa_bool_t use_rtclock:1; -+ pa_bool_t filter_added:1; - pa_spawn_api spawn_api; - - pa_strlist *server_list; --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0002-native-fix-request-counter-miscalculations.diff b/packages/audio/pulseaudio/patches/0002-native-fix-request-counter-miscalculations.diff deleted file mode 100644 index 52425678a9..0000000000 --- a/packages/audio/pulseaudio/patches/0002-native-fix-request-counter-miscalculations.diff +++ /dev/null @@ -1,275 +0,0 @@ -From 8d356659e69556fa25d0579a66084f820683e2b8 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 8 Jan 2010 20:07:34 +0100 -Subject: [PATCH 02/62] native: fix request counter miscalculations - -Do not subtract bytes the client sends us beyond what we requested from -our missing bytes counter. - -This was mostly a thinko that caused servers asking for too little data -when the client initially sent more data than requested, because that -data sent too much was accounted for twice. - -This commit fixes this miscalculation. - -http://bugzilla.redhat.com/show_bug.cgi?id=534130 ---- - src/pulse/stream.c | 4 ++ - src/pulsecore/memblockq.c | 101 ++++++++++++++++++--------------------- - src/pulsecore/protocol-native.c | 7 ++- - 3 files changed, 55 insertions(+), 57 deletions(-) - -diff --git a/src/pulse/stream.c b/src/pulse/stream.c -index d01985b..793277a 100644 ---- a/src/pulse/stream.c -+++ b/src/pulse/stream.c -@@ -741,6 +741,8 @@ void pa_command_request(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tag - - s->requested_bytes += bytes; - -+ /* pa_log("got request for %lli, now at %lli", (long long) bytes, (long long) s->requested_bytes); */ -+ - if (s->requested_bytes > 0 && s->write_callback) - s->write_callback(s, (size_t) s->requested_bytes, s->write_userdata); - -@@ -1354,6 +1356,8 @@ int pa_stream_write( - * that's OK, the server side applies the same error */ - s->requested_bytes -= (seek == PA_SEEK_RELATIVE ? offset : 0) + (int64_t) length; - -+ /* pa_log("wrote %lli, now at %lli", (long long) length, (long long) s->requested_bytes); */ -+ - if (s->direction == PA_STREAM_PLAYBACK) { - - /* Update latency request correction */ -diff --git a/src/pulsecore/memblockq.c b/src/pulsecore/memblockq.c -index 32758be..4641801 100644 ---- a/src/pulsecore/memblockq.c -+++ b/src/pulsecore/memblockq.c -@@ -55,8 +55,7 @@ struct pa_memblockq { - pa_bool_t in_prebuf; - pa_memchunk silence; - pa_mcalign *mcalign; -- int64_t missing; -- size_t requested; -+ int64_t missing, requested; - }; - - pa_memblockq* pa_memblockq_new( -@@ -84,8 +83,8 @@ pa_memblockq* pa_memblockq_new( - pa_log_debug("memblockq requested: maxlength=%lu, tlength=%lu, base=%lu, prebuf=%lu, minreq=%lu maxrewind=%lu", - (unsigned long) maxlength, (unsigned long) tlength, (unsigned long) base, (unsigned long) prebuf, (unsigned long) minreq, (unsigned long) maxrewind); - -- bq->missing = 0; -- bq->requested = bq->maxlength = bq->tlength = bq->prebuf = bq->minreq = bq->maxrewind = 0; -+ bq->missing = bq->requested = 0; -+ bq->maxlength = bq->tlength = bq->prebuf = bq->minreq = bq->maxrewind = 0; - bq->in_prebuf = TRUE; - - pa_memblockq_set_maxlength(bq, maxlength); -@@ -246,10 +245,34 @@ static pa_bool_t can_push(pa_memblockq *bq, size_t l) { - return TRUE; - } - -+static void write_index_changed(pa_memblockq *bq, int64_t old_write_index, pa_bool_t account) { -+ int64_t delta; -+ -+ pa_assert(bq); -+ -+ delta = bq->write_index - old_write_index; -+ -+ if (account) -+ bq->requested -= delta; -+ -+ /* pa_log("pushed/seeked %lli: requested counter at %lli, account=%i", (long long) delta, (long long) bq->requested, account); */ -+} -+ -+static void read_index_changed(pa_memblockq *bq, int64_t old_read_index) { -+ int64_t delta; -+ -+ pa_assert(bq); -+ -+ delta = bq->read_index - old_read_index; -+ bq->missing += delta; -+ -+ /* pa_log("popped %lli: missing counter at %lli", (long long) delta, (long long) bq->missing); */ -+} -+ - int pa_memblockq_push(pa_memblockq* bq, const pa_memchunk *uchunk) { - struct list_item *q, *n; - pa_memchunk chunk; -- int64_t old, delta; -+ int64_t old; - - pa_assert(bq); - pa_assert(uchunk); -@@ -409,18 +432,7 @@ int pa_memblockq_push(pa_memblockq* bq, const pa_memchunk *uchunk) { - - finish: - -- delta = bq->write_index - old; -- -- if (delta >= (int64_t) bq->requested) { -- delta -= (int64_t) bq->requested; -- bq->requested = 0; -- } else { -- bq->requested -= (size_t) delta; -- delta = 0; -- } -- -- bq->missing -= delta; -- -+ write_index_changed(bq, old, TRUE); - return 0; - } - -@@ -514,7 +526,7 @@ int pa_memblockq_peek(pa_memblockq* bq, pa_memchunk *chunk) { - } - - void pa_memblockq_drop(pa_memblockq *bq, size_t length) { -- int64_t old, delta; -+ int64_t old; - pa_assert(bq); - pa_assert(length % bq->base == 0); - -@@ -553,19 +565,21 @@ void pa_memblockq_drop(pa_memblockq *bq, size_t length) { - } - - drop_backlog(bq); -- -- delta = bq->read_index - old; -- bq->missing += delta; -+ read_index_changed(bq, old); - } - - void pa_memblockq_rewind(pa_memblockq *bq, size_t length) { -+ int64_t old; - pa_assert(bq); - pa_assert(length % bq->base == 0); - -+ old = bq->read_index; -+ - /* This is kind of the inverse of pa_memblockq_drop() */ - - bq->read_index -= (int64_t) length; -- bq->missing -= (int64_t) length; -+ -+ read_index_changed(bq, old); - } - - pa_bool_t pa_memblockq_is_readable(pa_memblockq *bq) { -@@ -602,7 +616,7 @@ size_t pa_memblockq_missing(pa_memblockq *bq) { - } - - void pa_memblockq_seek(pa_memblockq *bq, int64_t offset, pa_seek_mode_t seek, pa_bool_t account) { -- int64_t old, delta; -+ int64_t old; - pa_assert(bq); - - old = bq->write_index; -@@ -625,24 +639,11 @@ void pa_memblockq_seek(pa_memblockq *bq, int64_t offset, pa_seek_mode_t seek, pa - } - - drop_backlog(bq); -- -- delta = bq->write_index - old; -- -- if (account) { -- if (delta >= (int64_t) bq->requested) { -- delta -= (int64_t) bq->requested; -- bq->requested = 0; -- } else if (delta >= 0) { -- bq->requested -= (size_t) delta; -- delta = 0; -- } -- } -- -- bq->missing -= delta; -+ write_index_changed(bq, old, account); - } - - void pa_memblockq_flush_write(pa_memblockq *bq) { -- int64_t old, delta; -+ int64_t old; - pa_assert(bq); - - pa_memblockq_silence(bq); -@@ -651,22 +652,11 @@ void pa_memblockq_flush_write(pa_memblockq *bq) { - bq->write_index = bq->read_index; - - pa_memblockq_prebuf_force(bq); -- -- delta = bq->write_index - old; -- -- if (delta >= (int64_t) bq->requested) { -- delta -= (int64_t) bq->requested; -- bq->requested = 0; -- } else if (delta >= 0) { -- bq->requested -= (size_t) delta; -- delta = 0; -- } -- -- bq->missing -= delta; -+ write_index_changed(bq, old, TRUE); - } - - void pa_memblockq_flush_read(pa_memblockq *bq) { -- int64_t old, delta; -+ int64_t old; - pa_assert(bq); - - pa_memblockq_silence(bq); -@@ -675,9 +665,7 @@ void pa_memblockq_flush_read(pa_memblockq *bq) { - bq->read_index = bq->write_index; - - pa_memblockq_prebuf_force(bq); -- -- delta = bq->read_index - old; -- bq->missing += delta; -+ read_index_changed(bq, old); - } - - size_t pa_memblockq_get_tlength(pa_memblockq *bq) { -@@ -774,8 +762,11 @@ size_t pa_memblockq_pop_missing(pa_memblockq *bq) { - return 0; - - l = (size_t) bq->missing; -+ -+ bq->requested += bq->missing; - bq->missing = 0; -- bq->requested += l; -+ -+ /* pa_log("sent %lli: request counter is at %lli", (long long) l, (long long) bq->requested); */ - - return l; - } -diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c -index 6e35762..b7b3f59 100644 ---- a/src/pulsecore/protocol-native.c -+++ b/src/pulsecore/protocol-native.c -@@ -1113,6 +1113,8 @@ static playback_stream* playback_stream_new( - - *missing = (uint32_t) pa_memblockq_pop_missing(s->memblockq); - -+ /* pa_log("missing original: %li", (long int) *missing); */ -+ - *ss = s->sink_input->sample_spec; - *map = s->sink_input->channel_map; - -@@ -1137,11 +1139,12 @@ static void playback_stream_request_bytes(playback_stream *s) { - - m = pa_memblockq_pop_missing(s->memblockq); - -- /* pa_log("request_bytes(%lu) (tlength=%lu minreq=%lu length=%lu)", */ -+ /* pa_log("request_bytes(%lu) (tlength=%lu minreq=%lu length=%lu really missing=%lli)", */ - /* (unsigned long) m, */ - /* pa_memblockq_get_tlength(s->memblockq), */ - /* pa_memblockq_get_minreq(s->memblockq), */ -- /* pa_memblockq_get_length(s->memblockq)); */ -+ /* pa_memblockq_get_length(s->memblockq), */ -+ /* (long long) pa_memblockq_get_tlength(s->memblockq) - (long long) pa_memblockq_get_length(s->memblockq)); */ - - if (m <= 0) - return; --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0003-core-make-sure-we-always-return-a-valid-memblock-in-.diff b/packages/audio/pulseaudio/patches/0003-core-make-sure-we-always-return-a-valid-memblock-in-.diff deleted file mode 100644 index 5d02e8caf4..0000000000 --- a/packages/audio/pulseaudio/patches/0003-core-make-sure-we-always-return-a-valid-memblock-in-.diff +++ /dev/null @@ -1,161 +0,0 @@ -From 3eed219a50c943251b41814e779cc37daf47e8f4 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 8 Jan 2010 21:51:30 +0100 -Subject: [PATCH 03/62] core: make sure we always return a valid memblock in sink_input_pop() callbacks - -https://bugzilla.redhat.com/show_bug.cgi?id=553607 ---- - src/modules/module-combine.c | 2 +- - src/modules/module-ladspa-sink.c | 6 +++++- - src/pulsecore/play-memchunk.c | 6 +++++- - src/pulsecore/protocol-esound.c | 5 ++++- - src/pulsecore/protocol-simple.c | 6 +++++- - src/pulsecore/sound-file-stream.c | 5 ++++- - 6 files changed, 24 insertions(+), 6 deletions(-) - -diff --git a/src/modules/module-combine.c b/src/modules/module-combine.c -index a186c89..62e6267 100644 ---- a/src/modules/module-combine.c -+++ b/src/modules/module-combine.c -@@ -890,7 +890,7 @@ static struct output *output_new(struct userdata *u, pa_sink *sink) { - 1, - 0, - 0, -- NULL); -+ &u->sink->silence); - - pa_assert_se(pa_idxset_put(u->outputs, o, NULL) == 0); - update_description(u); -diff --git a/src/modules/module-ladspa-sink.c b/src/modules/module-ladspa-sink.c -index 994c778..185871b 100644 ---- a/src/modules/module-ladspa-sink.c -+++ b/src/modules/module-ladspa-sink.c -@@ -476,6 +476,7 @@ int pa__init(pa_module*m) { - unsigned long input_port, output_port, p, j, n_control; - unsigned c; - pa_bool_t *use_default = NULL; -+ pa_memchunk silence; - - pa_assert(m); - -@@ -514,7 +515,10 @@ int pa__init(pa_module*m) { - u = pa_xnew0(struct userdata, 1); - u->module = m; - m->userdata = u; -- u->memblockq = pa_memblockq_new(0, MEMBLOCKQ_MAXLENGTH, 0, pa_frame_size(&ss), 1, 1, 0, NULL); -+ -+ pa_silence_memchunk_get(&m->core->silence_cache, m->core->mempool, &silence, &ss, 0); -+ u->memblockq = pa_memblockq_new(0, MEMBLOCKQ_MAXLENGTH, 0, pa_frame_size(&ss), 1, 1, 0, &silence); -+ pa_memblock_unref(silence.memblock); - - if (!(e = getenv("LADSPA_PATH"))) - e = LADSPA_PATH; -diff --git a/src/pulsecore/play-memchunk.c b/src/pulsecore/play-memchunk.c -index f127d7a..1a3bd5b 100644 ---- a/src/pulsecore/play-memchunk.c -+++ b/src/pulsecore/play-memchunk.c -@@ -47,12 +47,16 @@ int pa_play_memchunk( - - pa_memblockq *q; - int r; -+ pa_memchunk silence; - - pa_assert(sink); - pa_assert(ss); - pa_assert(chunk); - -- q = pa_memblockq_new(0, chunk->length, 0, pa_frame_size(ss), 1, 1, 0, NULL); -+ pa_silence_memchunk_get(&sink->core->silence_cache, sink->core->mempool, &silence, ss, 0); -+ q = pa_memblockq_new(0, chunk->length, 0, pa_frame_size(ss), 1, 1, 0, &silence); -+ pa_memblock_unref(silence.memblock); -+ - pa_assert_se(pa_memblockq_push(q, chunk) >= 0); - - if ((r = pa_play_memblockq(sink, ss, map, q, volume, p, sink_input_index)) < 0) { -diff --git a/src/pulsecore/protocol-esound.c b/src/pulsecore/protocol-esound.c -index 2326eb3..a89f327 100644 ---- a/src/pulsecore/protocol-esound.c -+++ b/src/pulsecore/protocol-esound.c -@@ -389,6 +389,7 @@ static int esd_proto_stream_play(connection *c, esd_proto_t request, const void - size_t l; - pa_sink *sink = NULL; - pa_sink_input_new_data sdata; -+ pa_memchunk silence; - - connection_assert_ref(c); - pa_assert(data); -@@ -435,6 +436,7 @@ static int esd_proto_stream_play(connection *c, esd_proto_t request, const void - CHECK_VALIDITY(c->sink_input, "Failed to create sink input."); - - l = (size_t) ((double) pa_bytes_per_second(&ss)*PLAYBACK_BUFFER_SECONDS); -+ pa_sink_input_get_silence(c->sink_input, &silence); - c->input_memblockq = pa_memblockq_new( - 0, - l, -@@ -443,7 +445,8 @@ static int esd_proto_stream_play(connection *c, esd_proto_t request, const void - (size_t) -1, - l/PLAYBACK_BUFFER_FRAGMENTS, - 0, -- NULL); -+ &silence); -+ pa_memblock_unref(silence.memblock); - pa_iochannel_socket_set_rcvbuf(c->io, l); - - c->sink_input->parent.process_msg = sink_input_process_msg; -diff --git a/src/pulsecore/protocol-simple.c b/src/pulsecore/protocol-simple.c -index a9f7389..fb2e564 100644 ---- a/src/pulsecore/protocol-simple.c -+++ b/src/pulsecore/protocol-simple.c -@@ -525,6 +525,7 @@ void pa_simple_protocol_connect(pa_simple_protocol *p, pa_iochannel *io, pa_simp - - if (o->playback) { - pa_sink_input_new_data data; -+ pa_memchunk silence; - size_t l; - pa_sink *sink; - -@@ -559,6 +560,7 @@ void pa_simple_protocol_connect(pa_simple_protocol *p, pa_iochannel *io, pa_simp - pa_sink_input_set_requested_latency(c->sink_input, DEFAULT_SINK_LATENCY); - - l = (size_t) ((double) pa_bytes_per_second(&o->sample_spec)*PLAYBACK_BUFFER_SECONDS); -+ pa_sink_input_get_silence(c->sink_input, &silence); - c->input_memblockq = pa_memblockq_new( - 0, - l, -@@ -567,7 +569,9 @@ void pa_simple_protocol_connect(pa_simple_protocol *p, pa_iochannel *io, pa_simp - (size_t) -1, - l/PLAYBACK_BUFFER_FRAGMENTS, - 0, -- NULL); -+ &silence); -+ pa_memblock_unref(silence.memblock); -+ - pa_iochannel_socket_set_rcvbuf(io, l); - - pa_atomic_store(&c->playback.missing, (int) pa_memblockq_missing(c->input_memblockq)); -diff --git a/src/pulsecore/sound-file-stream.c b/src/pulsecore/sound-file-stream.c -index 16de492..2025c2a 100644 ---- a/src/pulsecore/sound-file-stream.c -+++ b/src/pulsecore/sound-file-stream.c -@@ -239,6 +239,7 @@ int pa_play_file( - pa_sink_input_new_data data; - int fd; - SF_INFO sfi; -+ pa_memchunk silence; - - pa_assert(sink); - pa_assert(fname); -@@ -324,7 +325,9 @@ int pa_play_file( - u->sink_input->state_change = sink_input_state_change_cb; - u->sink_input->userdata = u; - -- u->memblockq = pa_memblockq_new(0, MEMBLOCKQ_MAXLENGTH, 0, pa_frame_size(&ss), 1, 1, 0, NULL); -+ pa_sink_input_get_silence(u->sink_input, &silence); -+ u->memblockq = pa_memblockq_new(0, MEMBLOCKQ_MAXLENGTH, 0, pa_frame_size(&ss), 1, 1, 0, &silence); -+ pa_memblock_unref(silence.memblock); - - pa_sink_input_put(u->sink_input); - --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0004-bluetooth-destruct-stream-only-if-it-is-not-already-.diff b/packages/audio/pulseaudio/patches/0004-bluetooth-destruct-stream-only-if-it-is-not-already-.diff deleted file mode 100644 index 4d28682a6d..0000000000 --- a/packages/audio/pulseaudio/patches/0004-bluetooth-destruct-stream-only-if-it-is-not-already-.diff +++ /dev/null @@ -1,56 +0,0 @@ -From 11688eca4b2beb7aa1adcd4aa9a3ee933f7385fb Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 8 Jan 2010 22:18:15 +0100 -Subject: [PATCH 04/62] bluetooth: destruct stream only if it is not already destructed - -https://bugzilla.redhat.com/show_bug.cgi?id=551842 ---- - src/modules/bluetooth/module-bluetooth-device.c | 28 ++++++++++++---------- - 1 files changed, 15 insertions(+), 13 deletions(-) - -diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c -index 19676df..2bbae41 100644 ---- a/src/modules/bluetooth/module-bluetooth-device.c -+++ b/src/modules/bluetooth/module-bluetooth-device.c -@@ -823,23 +823,25 @@ static int stop_stream_fd(struct userdata *u) { - - pa_assert(u); - pa_assert(u->rtpoll); -- pa_assert(u->rtpoll_item); -- pa_assert(u->stream_fd >= 0); - -- pa_rtpoll_item_free(u->rtpoll_item); -- u->rtpoll_item = NULL; -+ if (u->rtpoll_item) { -+ pa_rtpoll_item_free(u->rtpoll_item); -+ u->rtpoll_item = NULL; -+ } - -- memset(msg.buf, 0, BT_SUGGESTED_BUFFER_SIZE); -- msg.start_req.h.type = BT_REQUEST; -- msg.start_req.h.name = BT_STOP_STREAM; -- msg.start_req.h.length = sizeof(msg.start_req); -+ if (u->stream_fd >= 0) { -+ memset(msg.buf, 0, BT_SUGGESTED_BUFFER_SIZE); -+ msg.start_req.h.type = BT_REQUEST; -+ msg.start_req.h.name = BT_STOP_STREAM; -+ msg.start_req.h.length = sizeof(msg.start_req); - -- if (service_send(u, &msg.start_req.h) < 0 || -- service_expect(u, &msg.rsp, sizeof(msg), BT_STOP_STREAM, sizeof(msg.start_rsp)) < 0) -- r = -1; -+ if (service_send(u, &msg.start_req.h) < 0 || -+ service_expect(u, &msg.rsp, sizeof(msg), BT_STOP_STREAM, sizeof(msg.start_rsp)) < 0) -+ r = -1; - -- pa_close(u->stream_fd); -- u->stream_fd = -1; -+ pa_close(u->stream_fd); -+ u->stream_fd = -1; -+ } - - if (u->read_smoother) { - pa_smoother_free(u->read_smoother); --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0005-bluetooth-don-t-hit-an-assert-if-latency-is-queried-.diff b/packages/audio/pulseaudio/patches/0005-bluetooth-don-t-hit-an-assert-if-latency-is-queried-.diff deleted file mode 100644 index fbb3ef940b..0000000000 --- a/packages/audio/pulseaudio/patches/0005-bluetooth-don-t-hit-an-assert-if-latency-is-queried-.diff +++ /dev/null @@ -1,35 +0,0 @@ -From e7d9f891e2a8e6b670098b80315ca1f0010c35ca Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 8 Jan 2010 23:44:42 +0100 -Subject: [PATCH 05/62] bluetooth: don't hit an assert if latency is queried for a stooped recording stream - -https://bugzilla.redhat.com/show_bug.cgi?id=537422 ---- - src/modules/bluetooth/module-bluetooth-device.c | 10 +++++++--- - 1 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c -index 2bbae41..d6868b8 100644 ---- a/src/modules/bluetooth/module-bluetooth-device.c -+++ b/src/modules/bluetooth/module-bluetooth-device.c -@@ -972,10 +972,14 @@ static int source_process_msg(pa_msgobject *o, int code, void *data, int64_t off - case PA_SOURCE_MESSAGE_GET_LATENCY: { - pa_usec_t wi, ri; - -- wi = pa_smoother_get(u->read_smoother, pa_rtclock_now()); -- ri = pa_bytes_to_usec(u->read_index, &u->sample_spec); -+ if (u->read_smoother) { -+ wi = pa_smoother_get(u->read_smoother, pa_rtclock_now()); -+ ri = pa_bytes_to_usec(u->read_index, &u->sample_spec); -+ -+ *((pa_usec_t*) data) = (wi > ri ? wi - ri : 0) + u->source->thread_info.fixed_latency; -+ } else -+ *((pa_usec_t*) data) = 0; - -- *((pa_usec_t*) data) = (wi > ri ? wi - ri : 0) + u->source->thread_info.fixed_latency; - return 0; - } - --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0006-client-detect-forking-in-sample-cache-API-too.diff b/packages/audio/pulseaudio/patches/0006-client-detect-forking-in-sample-cache-API-too.diff deleted file mode 100644 index 8466fd26b9..0000000000 --- a/packages/audio/pulseaudio/patches/0006-client-detect-forking-in-sample-cache-API-too.diff +++ /dev/null @@ -1,87 +0,0 @@ -From bf50dc42306857e361267d2ad39b737ad05b8604 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 12 Jan 2010 03:01:14 +0100 -Subject: [PATCH 06/62] client: detect forking in sample cache API, too - ---- - src/pulse/scache.c | 9 +++++++-- - src/pulse/stream.c | 1 + - 2 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/src/pulse/scache.c b/src/pulse/scache.c -index 27da688..2a7602f 100644 ---- a/src/pulse/scache.c -+++ b/src/pulse/scache.c -@@ -28,15 +28,15 @@ - #include - - #include -+#include - - #include - #include - #include - -+#include "fork-detect.h" - #include "internal.h" - --#include "scache.h" -- - int pa_stream_connect_upload(pa_stream *s, size_t length) { - pa_tagstruct *t; - uint32_t tag; -@@ -45,6 +45,7 @@ int pa_stream_connect_upload(pa_stream *s, size_t length) { - pa_assert(s); - pa_assert(PA_REFCNT_VALUE(s) >= 1); - -+ PA_CHECK_VALIDITY(s->context, !pa_detect_fork(), PA_ERR_FORKED); - PA_CHECK_VALIDITY(s->context, s->state == PA_STREAM_UNCONNECTED, PA_ERR_BADSTATE); - PA_CHECK_VALIDITY(s->context, length > 0, PA_ERR_INVALID); - PA_CHECK_VALIDITY(s->context, length == (size_t) (uint32_t) length, PA_ERR_INVALID); -@@ -85,6 +86,7 @@ int pa_stream_finish_upload(pa_stream *s) { - pa_assert(s); - pa_assert(PA_REFCNT_VALUE(s) >= 1); - -+ PA_CHECK_VALIDITY(s->context, !pa_detect_fork(), PA_ERR_FORKED); - PA_CHECK_VALIDITY(s->context, s->channel_valid, PA_ERR_BADSTATE); - PA_CHECK_VALIDITY(s->context, s->context->state == PA_CONTEXT_READY, PA_ERR_BADSTATE); - -@@ -174,6 +176,7 @@ pa_operation *pa_context_play_sample(pa_context *c, const char *name, const char - pa_assert(c); - pa_assert(PA_REFCNT_VALUE(c) >= 1); - -+ PA_CHECK_VALIDITY_RETURN_NULL(c, !pa_detect_fork(), PA_ERR_FORKED); - PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE); - PA_CHECK_VALIDITY_RETURN_NULL(c, name && *name, PA_ERR_INVALID); - PA_CHECK_VALIDITY_RETURN_NULL(c, !dev || *dev, PA_ERR_INVALID); -@@ -213,6 +216,7 @@ pa_operation *pa_context_play_sample_with_proplist(pa_context *c, const char *na - pa_assert(c); - pa_assert(PA_REFCNT_VALUE(c) >= 1); - -+ PA_CHECK_VALIDITY_RETURN_NULL(c, !pa_detect_fork(), PA_ERR_FORKED); - PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE); - PA_CHECK_VALIDITY_RETURN_NULL(c, name && *name, PA_ERR_INVALID); - PA_CHECK_VALIDITY_RETURN_NULL(c, !dev || *dev, PA_ERR_INVALID); -@@ -255,6 +259,7 @@ pa_operation* pa_context_remove_sample(pa_context *c, const char *name, pa_conte - pa_assert(c); - pa_assert(PA_REFCNT_VALUE(c) >= 1); - -+ PA_CHECK_VALIDITY_RETURN_NULL(c, !pa_detect_fork(), PA_ERR_FORKED); - PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE); - PA_CHECK_VALIDITY_RETURN_NULL(c, name && *name, PA_ERR_INVALID); - -diff --git a/src/pulse/stream.c b/src/pulse/stream.c -index 793277a..79b2868 100644 ---- a/src/pulse/stream.c -+++ b/src/pulse/stream.c -@@ -29,6 +29,7 @@ - #include - - #include -+#include - #include - #include - #include --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0007-client-verify-connection-state-in-pa_stream_connect_.diff b/packages/audio/pulseaudio/patches/0007-client-verify-connection-state-in-pa_stream_connect_.diff deleted file mode 100644 index b9cd10d907..0000000000 --- a/packages/audio/pulseaudio/patches/0007-client-verify-connection-state-in-pa_stream_connect_.diff +++ /dev/null @@ -1,28 +0,0 @@ -From 78811c5653d0ba508b6558ba4578b61da26c60cf Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 12 Jan 2010 03:01:27 +0100 -Subject: [PATCH 07/62] client: verify connection state in pa_stream_connect_upload() - -Make suer we check the connection state before going on, so that we can -rely that s->context->pstream is properly initialized. - -https://bugzilla.redhat.com/show_bug.cgi?id=539500 ---- - src/pulse/scache.c | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/src/pulse/scache.c b/src/pulse/scache.c -index 2a7602f..b2169b6 100644 ---- a/src/pulse/scache.c -+++ b/src/pulse/scache.c -@@ -49,6 +49,7 @@ int pa_stream_connect_upload(pa_stream *s, size_t length) { - PA_CHECK_VALIDITY(s->context, s->state == PA_STREAM_UNCONNECTED, PA_ERR_BADSTATE); - PA_CHECK_VALIDITY(s->context, length > 0, PA_ERR_INVALID); - PA_CHECK_VALIDITY(s->context, length == (size_t) (uint32_t) length, PA_ERR_INVALID); -+ PA_CHECK_VALIDITY(s->context, s->context->state == PA_CONTEXT_READY, PA_ERR_BADSTATE); - - if (!(name = pa_proplist_gets(s->proplist, PA_PROP_EVENT_ID))) - name = pa_proplist_gets(s->proplist, PA_PROP_MEDIA_NAME); --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0008-udev-don-t-forget-to-unref-devices-we-are-not-intere.diff b/packages/audio/pulseaudio/patches/0008-udev-don-t-forget-to-unref-devices-we-are-not-intere.diff deleted file mode 100644 index 30cfa271fc..0000000000 --- a/packages/audio/pulseaudio/patches/0008-udev-don-t-forget-to-unref-devices-we-are-not-intere.diff +++ /dev/null @@ -1,29 +0,0 @@ -From 15a3018bda8ee92393671ceaf272be418e95a81f Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 12 Jan 2010 23:01:24 +0100 -Subject: [PATCH 08/62] udev: don't forget to unref devices we are not interested in - -https://bugzilla.redhat.com/show_bug.cgi?id=552932 ---- - src/modules/module-udev-detect.c | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) - -diff --git a/src/modules/module-udev-detect.c b/src/modules/module-udev-detect.c -index 1b1e9c1..7508d9a 100644 ---- a/src/modules/module-udev-detect.c -+++ b/src/modules/module-udev-detect.c -@@ -416,8 +416,10 @@ static void monitor_cb( - goto fail; - } - -- if (!path_get_card_id(udev_device_get_devpath(dev))) -+ if (!path_get_card_id(udev_device_get_devpath(dev))) { -+ udev_device_unref(dev); - return; -+ } - - process_device(u, dev); - udev_device_unref(dev); --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0009-once-make-once-related-variables-volatile.diff b/packages/audio/pulseaudio/patches/0009-once-make-once-related-variables-volatile.diff deleted file mode 100644 index e07ac4f6ac..0000000000 --- a/packages/audio/pulseaudio/patches/0009-once-make-once-related-variables-volatile.diff +++ /dev/null @@ -1,91 +0,0 @@ -From 73ae1fce001253677b7ab633f42d3c3300fe5cf5 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 12 Jan 2010 23:03:04 +0100 -Subject: [PATCH 09/62] once: make once related variables volatile - ---- - src/pulsecore/flist.h | 2 +- - src/pulsecore/once.c | 3 +-- - src/pulsecore/thread-posix.c | 8 ++------ - src/pulsecore/thread.h | 2 +- - 4 files changed, 5 insertions(+), 10 deletions(-) - -diff --git a/src/pulsecore/flist.h b/src/pulsecore/flist.h -index e147486..184e599 100644 ---- a/src/pulsecore/flist.h -+++ b/src/pulsecore/flist.h -@@ -45,7 +45,7 @@ void* pa_flist_pop(pa_flist*l); - - #define PA_STATIC_FLIST_DECLARE(name, size, free_cb) \ - static struct { \ -- pa_flist *flist; \ -+ pa_flist *volatile flist; \ - pa_once once; \ - } name##_flist = { NULL, PA_ONCE_INIT }; \ - static void name##_flist_init(void) { \ -diff --git a/src/pulsecore/once.c b/src/pulsecore/once.c -index 05a3ad2..4e509e0 100644 ---- a/src/pulsecore/once.c -+++ b/src/pulsecore/once.c -@@ -29,8 +29,6 @@ - #include "once.h" - - pa_bool_t pa_once_begin(pa_once *control) { -- pa_mutex *m; -- - pa_assert(control); - - if (pa_atomic_load(&control->done)) -@@ -43,6 +41,7 @@ pa_bool_t pa_once_begin(pa_once *control) { - * executed by us. Hence the awkward locking. */ - - for (;;) { -+ pa_mutex *m; - - if ((m = pa_atomic_ptr_load(&control->mutex))) { - -diff --git a/src/pulsecore/thread-posix.c b/src/pulsecore/thread-posix.c -index fdab270..bc0d6e3 100644 ---- a/src/pulsecore/thread-posix.c -+++ b/src/pulsecore/thread-posix.c -@@ -80,11 +80,9 @@ pa_thread* pa_thread_new(pa_thread_func_t thread_func, void *userdata) { - - pa_assert(thread_func); - -- t = pa_xnew(pa_thread, 1); -+ t = pa_xnew0(pa_thread, 1); - t->thread_func = thread_func; - t->userdata = userdata; -- t->joined = FALSE; -- pa_atomic_store(&t->running, 0); - - if (pthread_create(&t->id, NULL, internal_thread_func, t) < 0) { - pa_xfree(t); -@@ -135,10 +133,8 @@ pa_thread* pa_thread_self(void) { - /* This is a foreign thread, let's create a pthread structure to - * make sure that we can always return a sensible pointer */ - -- t = pa_xnew(pa_thread, 1); -+ t = pa_xnew0(pa_thread, 1); - t->id = pthread_self(); -- t->thread_func = NULL; -- t->userdata = NULL; - t->joined = TRUE; - pa_atomic_store(&t->running, 2); - -diff --git a/src/pulsecore/thread.h b/src/pulsecore/thread.h -index 25eace6..60c1267 100644 ---- a/src/pulsecore/thread.h -+++ b/src/pulsecore/thread.h -@@ -55,7 +55,7 @@ void *pa_tls_set(pa_tls *t, void *userdata); - #define PA_STATIC_TLS_DECLARE(name, free_cb) \ - static struct { \ - pa_once once; \ -- pa_tls *tls; \ -+ pa_tls *volatile tls; \ - } name##_tls = { \ - .once = PA_ONCE_INIT, \ - .tls = NULL \ --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0010-bluetooth-fix-invalid-memory-access.diff b/packages/audio/pulseaudio/patches/0010-bluetooth-fix-invalid-memory-access.diff deleted file mode 100644 index 8baf40c224..0000000000 --- a/packages/audio/pulseaudio/patches/0010-bluetooth-fix-invalid-memory-access.diff +++ /dev/null @@ -1,36 +0,0 @@ -From 4bcb1a909f936a63628273e7d35726bc64785eeb Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Wed, 13 Jan 2010 17:24:37 +0100 -Subject: [PATCH 10/62] bluetooth: fix invalid memory access - -When an GetProperties() reply arrives after we already deleted the -device structure for it make sure we don't accidentaly touch the -invalidated object. - -https://bugzilla.redhat.com/show_bug.cgi?id=543205 ---- - src/modules/bluetooth/bluetooth-util.c | 8 +++++++- - 1 files changed, 7 insertions(+), 1 deletions(-) - -diff --git a/src/modules/bluetooth/bluetooth-util.c b/src/modules/bluetooth/bluetooth-util.c -index 795d510..b2c0429 100644 ---- a/src/modules/bluetooth/bluetooth-util.c -+++ b/src/modules/bluetooth/bluetooth-util.c -@@ -342,7 +342,13 @@ static void get_properties_reply(DBusPendingCall *pending, void *userdata) { - /* dbus_message_get_interface(p->message), */ - /* dbus_message_get_path(p->message)); */ - -- d = p->call_data; -+ /* We don't use p->call_data here right-away since the device -+ * might already be invalidated at this point */ -+ -+ if (!(d = pa_hashmap_get(y->devices, dbus_message_get_path(p->message)))) -+ return; -+ -+ pa_assert(p->call_data == d); - - valid = dbus_message_get_type(r) == DBUS_MESSAGE_TYPE_ERROR ? -1 : 1; - --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0011-log-add-an-easy-way-to-disable-log-rate-limiting.diff b/packages/audio/pulseaudio/patches/0011-log-add-an-easy-way-to-disable-log-rate-limiting.diff deleted file mode 100644 index bdefce0ba8..0000000000 --- a/packages/audio/pulseaudio/patches/0011-log-add-an-easy-way-to-disable-log-rate-limiting.diff +++ /dev/null @@ -1,154 +0,0 @@ -From 21b484e056be445fdaf00f91ce50bc40b1ac9623 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Wed, 13 Jan 2010 17:35:04 +0100 -Subject: [PATCH 11/62] log: add an easy way to disable log rate limiting - -Should help with debuggin bugs like: - -https://bugzilla.redhat.com/show_bug.cgi?id=554405 ---- - src/pulsecore/log.c | 88 +++++++++++++++++++++++++++++---------------------- - 1 files changed, 50 insertions(+), 38 deletions(-) - -diff --git a/src/pulsecore/log.c b/src/pulsecore/log.c -index 8c21ee6..0c5a317 100644 ---- a/src/pulsecore/log.c -+++ b/src/pulsecore/log.c -@@ -61,6 +61,7 @@ - #define ENV_LOG_PRINT_LEVEL "PULSE_LOG_LEVEL" - #define ENV_LOG_BACKTRACE "PULSE_LOG_BACKTRACE" - #define ENV_LOG_BACKTRACE_SKIP "PULSE_LOG_BACKTRACE_SKIP" -+#define ENV_LOG_NO_RATELIMIT "PULSE_LOG_NO_RATE_LIMIT" - - static char *ident = NULL; /* in local charset format */ - static pa_log_target_t target = PA_LOG_STDERR, target_override; -@@ -68,6 +69,7 @@ static pa_bool_t target_override_set = FALSE; - static pa_log_level_t maximum_level = PA_LOG_ERROR, maximum_level_override = PA_LOG_ERROR; - static unsigned show_backtrace = 0, show_backtrace_override = 0, skip_backtrace = 0; - static pa_log_flags_t flags = 0, flags_override = 0; -+static pa_bool_t no_rate_limit = FALSE; - - #ifdef HAVE_SYSLOG_H - static const int level_to_syslog[] = { -@@ -195,54 +197,61 @@ static char* get_backtrace(unsigned show_nframes) { - #endif - - static void init_defaults(void) { -- const char *e; -+ PA_ONCE_BEGIN { - -- if (!ident) { -- char binary[256]; -- if (pa_get_binary_name(binary, sizeof(binary))) -- pa_log_set_ident(binary); -- } -+ const char *e; - -- if (getenv(ENV_LOG_SYSLOG)) { -- target_override = PA_LOG_SYSLOG; -- target_override_set = TRUE; -- } -+ if (!ident) { -+ char binary[256]; -+ if (pa_get_binary_name(binary, sizeof(binary))) -+ pa_log_set_ident(binary); -+ } - -- if ((e = getenv(ENV_LOG_LEVEL))) { -- maximum_level_override = (pa_log_level_t) atoi(e); -+ if (getenv(ENV_LOG_SYSLOG)) { -+ target_override = PA_LOG_SYSLOG; -+ target_override_set = TRUE; -+ } - -- if (maximum_level_override >= PA_LOG_LEVEL_MAX) -- maximum_level_override = PA_LOG_LEVEL_MAX-1; -- } -+ if ((e = getenv(ENV_LOG_LEVEL))) { -+ maximum_level_override = (pa_log_level_t) atoi(e); - -- if (getenv(ENV_LOG_COLORS)) -- flags_override |= PA_LOG_COLORS; -+ if (maximum_level_override >= PA_LOG_LEVEL_MAX) -+ maximum_level_override = PA_LOG_LEVEL_MAX-1; -+ } - -- if (getenv(ENV_LOG_PRINT_TIME)) -- flags_override |= PA_LOG_PRINT_TIME; -+ if (getenv(ENV_LOG_COLORS)) -+ flags_override |= PA_LOG_COLORS; - -- if (getenv(ENV_LOG_PRINT_FILE)) -- flags_override |= PA_LOG_PRINT_FILE; -+ if (getenv(ENV_LOG_PRINT_TIME)) -+ flags_override |= PA_LOG_PRINT_TIME; - -- if (getenv(ENV_LOG_PRINT_META)) -- flags_override |= PA_LOG_PRINT_META; -+ if (getenv(ENV_LOG_PRINT_FILE)) -+ flags_override |= PA_LOG_PRINT_FILE; - -- if (getenv(ENV_LOG_PRINT_LEVEL)) -- flags_override |= PA_LOG_PRINT_LEVEL; -+ if (getenv(ENV_LOG_PRINT_META)) -+ flags_override |= PA_LOG_PRINT_META; - -- if ((e = getenv(ENV_LOG_BACKTRACE))) { -- show_backtrace_override = (unsigned) atoi(e); -+ if (getenv(ENV_LOG_PRINT_LEVEL)) -+ flags_override |= PA_LOG_PRINT_LEVEL; - -- if (show_backtrace_override <= 0) -- show_backtrace_override = 0; -- } -+ if ((e = getenv(ENV_LOG_BACKTRACE))) { -+ show_backtrace_override = (unsigned) atoi(e); - -- if ((e = getenv(ENV_LOG_BACKTRACE_SKIP))) { -- skip_backtrace = (unsigned) atoi(e); -+ if (show_backtrace_override <= 0) -+ show_backtrace_override = 0; -+ } - -- if (skip_backtrace <= 0) -- skip_backtrace = 0; -- } -+ if ((e = getenv(ENV_LOG_BACKTRACE_SKIP))) { -+ skip_backtrace = (unsigned) atoi(e); -+ -+ if (skip_backtrace <= 0) -+ skip_backtrace = 0; -+ } -+ -+ if (getenv(ENV_LOG_NO_RATELIMIT)) -+ no_rate_limit = TRUE; -+ -+ } PA_ONCE_END; - } - - void pa_log_levelv_meta( -@@ -268,9 +277,7 @@ void pa_log_levelv_meta( - pa_assert(level < PA_LOG_LEVEL_MAX); - pa_assert(format); - -- PA_ONCE_BEGIN { -- init_defaults(); -- } PA_ONCE_END; -+ init_defaults(); - - _target = target_override_set ? target_override : target; - _maximum_level = PA_MAX(maximum_level, maximum_level_override); -@@ -428,5 +435,10 @@ pa_bool_t pa_log_ratelimit(void) { - /* Not more than 10 messages every 5s */ - static PA_DEFINE_RATELIMIT(ratelimit, 5 * PA_USEC_PER_SEC, 10); - -+ init_defaults(); -+ -+ if (no_rate_limit) -+ return TRUE; -+ - return pa_ratelimit_test(&ratelimit); - } --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0012-udev-make-sure-we-get-events-only-for-sound-devices.diff b/packages/audio/pulseaudio/patches/0012-udev-make-sure-we-get-events-only-for-sound-devices.diff deleted file mode 100644 index 37a21bd7b1..0000000000 --- a/packages/audio/pulseaudio/patches/0012-udev-make-sure-we-get-events-only-for-sound-devices.diff +++ /dev/null @@ -1,28 +0,0 @@ -From 9b37dce4223aaf7a5f48b04b52c89b46ad97cf73 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Wed, 13 Jan 2010 19:41:44 +0100 -Subject: [PATCH 12/62] udev: make sure we get events only for sound devices - ---- - src/modules/module-udev-detect.c | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) - -diff --git a/src/modules/module-udev-detect.c b/src/modules/module-udev-detect.c -index 7508d9a..58635a5 100644 ---- a/src/modules/module-udev-detect.c -+++ b/src/modules/module-udev-detect.c -@@ -639,6 +639,11 @@ int pa__init(pa_module *m) { - goto fail; - } - -+ if (udev_monitor_filter_add_match_subsystem_devtype(u->monitor, "sound", NULL) < 0) { -+ pa_log("Failed to subscribe to sound devices."); -+ goto fail; -+ } -+ - errno = 0; - if (udev_monitor_enable_receiving(u->monitor) < 0) { - pa_log("Failed to enable monitor: %s", pa_cstrerror(errno)); --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0013-alsa-ignore-volume-changes-from-the-hw-if-we-are-not.diff b/packages/audio/pulseaudio/patches/0013-alsa-ignore-volume-changes-from-the-hw-if-we-are-not.diff deleted file mode 100644 index 3b2c71c412..0000000000 --- a/packages/audio/pulseaudio/patches/0013-alsa-ignore-volume-changes-from-the-hw-if-we-are-not.diff +++ /dev/null @@ -1,41 +0,0 @@ -From 540ec7b961256d6c7702448ca995f61268064190 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Wed, 13 Jan 2010 20:30:36 +0100 -Subject: [PATCH 13/62] alsa: ignore volume changes from the hw if we are not on the active console - ---- - src/modules/alsa/alsa-sink.c | 3 +++ - src/modules/alsa/alsa-source.c | 3 +++ - 2 files changed, 6 insertions(+), 0 deletions(-) - -diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c -index ed16c83..690480f 100644 ---- a/src/modules/alsa/alsa-sink.c -+++ b/src/modules/alsa/alsa-sink.c -@@ -1103,6 +1103,9 @@ static int mixer_callback(snd_mixer_elem_t *elem, unsigned int mask) { - if (mask == SND_CTL_EVENT_MASK_REMOVE) - return 0; - -+ if (u->sink->suspend_cause & PA_SUSPEND_SESSION) -+ return 0; -+ - if (mask & SND_CTL_EVENT_MASK_VALUE) { - pa_sink_get_volume(u->sink, TRUE); - pa_sink_get_mute(u->sink, TRUE); -diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c -index 157698e..f8b583e 100644 ---- a/src/modules/alsa/alsa-source.c -+++ b/src/modules/alsa/alsa-source.c -@@ -1051,6 +1051,9 @@ static int mixer_callback(snd_mixer_elem_t *elem, unsigned int mask) { - if (mask == SND_CTL_EVENT_MASK_REMOVE) - return 0; - -+ if (u->source->suspend_cause & PA_SUSPEND_SESSION) -+ return 0; -+ - if (mask & SND_CTL_EVENT_MASK_VALUE) { - pa_source_get_volume(u->source, TRUE); - pa_source_get_mute(u->source, TRUE); --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0014-cpu-check-for-CMOV-flag-before-using-this-intsructio.diff b/packages/audio/pulseaudio/patches/0014-cpu-check-for-CMOV-flag-before-using-this-intsructio.diff deleted file mode 100644 index 2ea4fa8cfd..0000000000 --- a/packages/audio/pulseaudio/patches/0014-cpu-check-for-CMOV-flag-before-using-this-intsructio.diff +++ /dev/null @@ -1,80 +0,0 @@ -From 170812755e0ac235ed2b7182ef637eb317d8b2b2 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Wed, 13 Jan 2010 20:31:17 +0100 -Subject: [PATCH 14/62] cpu: check for CMOV flag before using this intsruction in assembly - -http://pulseaudio.org/ticket/776 ---- - src/pulsecore/cpu-x86.c | 6 +++++- - src/pulsecore/cpu-x86.h | 6 +++--- - src/pulsecore/svolume_mmx.c | 2 +- - 3 files changed, 9 insertions(+), 5 deletions(-) - -diff --git a/src/pulsecore/cpu-x86.c b/src/pulsecore/cpu-x86.c -index f194a60..b173072 100644 ---- a/src/pulsecore/cpu-x86.c -+++ b/src/pulsecore/cpu-x86.c -@@ -57,6 +57,9 @@ void pa_cpu_init_x86 (void) { - if (level >= 1) { - get_cpuid (0x00000001, &eax, &ebx, &ecx, &edx); - -+ if (edx & (1<<15)) -+ flags |= PA_CPU_X86_CMOV; -+ - if (edx & (1<<23)) - flags |= PA_CPU_X86_MMX; - -@@ -97,7 +100,8 @@ void pa_cpu_init_x86 (void) { - flags |= PA_CPU_X86_3DNOW; - } - -- pa_log_info ("CPU flags: %s%s%s%s%s%s%s%s%s%s", -+ pa_log_info ("CPU flags: %s%s%s%s%s%s%s%s%s%s%s", -+ (flags & PA_CPU_X86_CMOV) ? "CMOV " : "", - (flags & PA_CPU_X86_MMX) ? "MMX " : "", - (flags & PA_CPU_X86_SSE) ? "SSE " : "", - (flags & PA_CPU_X86_SSE2) ? "SSE2 " : "", -diff --git a/src/pulsecore/cpu-x86.h b/src/pulsecore/cpu-x86.h -index b40eb5c..285c203 100644 ---- a/src/pulsecore/cpu-x86.h -+++ b/src/pulsecore/cpu-x86.h -@@ -5,7 +5,7 @@ - This file is part of PulseAudio. - - Copyright 2004-2006 Lennart Poettering -- Copyright 2009 Wim Taymans -+ Copyright 2009 Wim Taymans - - PulseAudio is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published -@@ -35,12 +35,12 @@ typedef enum pa_cpu_x86_flag { - PA_CPU_X86_SSE4_1 = (1 << 6), - PA_CPU_X86_SSE4_2 = (1 << 7), - PA_CPU_X86_3DNOW = (1 << 8), -- PA_CPU_X86_3DNOWEXT = (1 << 9) -+ PA_CPU_X86_3DNOWEXT = (1 << 9), -+ PA_CPU_X86_CMOV = (1 << 10) - } pa_cpu_x86_flag_t; - - void pa_cpu_init_x86 (void); - -- - #if defined (__i386__) - typedef int32_t pa_reg_x86; - #define PA_REG_a "eax" -diff --git a/src/pulsecore/svolume_mmx.c b/src/pulsecore/svolume_mmx.c -index 46923ed..e50ebee 100644 ---- a/src/pulsecore/svolume_mmx.c -+++ b/src/pulsecore/svolume_mmx.c -@@ -305,7 +305,7 @@ void pa_volume_func_init_mmx (pa_cpu_x86_flag_t flags) { - run_test (); - #endif - -- if (flags & PA_CPU_X86_MMX) { -+ if ((flags & PA_CPU_X86_MMX) && (flags & PA_CPU_X86_CMOV)) { - pa_log_info("Initialising MMX optimized functions."); - - pa_set_volume_func (PA_SAMPLE_S16NE, (pa_do_volume_func_t) pa_volume_s16ne_mmx); --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0015-alsa-cover-Input-Source-Int-Mic.diff b/packages/audio/pulseaudio/patches/0015-alsa-cover-Input-Source-Int-Mic.diff deleted file mode 100644 index 2526026e35..0000000000 --- a/packages/audio/pulseaudio/patches/0015-alsa-cover-Input-Source-Int-Mic.diff +++ /dev/null @@ -1,29 +0,0 @@ -From 67c6535222508bd84a122860023a8dc7fd44cd35 Mon Sep 17 00:00:00 2001 -From: Colin Guthrie -Date: Wed, 13 Jan 2010 23:44:00 +0000 -Subject: [PATCH 15/62] alsa: cover Input Source:Int Mic - -As seen on some HDA chips (e.g. Fujitsu Siemens S6410) -Refs http://pulseaudio.org/ticket/772 ---- - .../alsa/mixer/paths/analog-input.conf.common | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) - -diff --git a/src/modules/alsa/mixer/paths/analog-input.conf.common b/src/modules/alsa/mixer/paths/analog-input.conf.common -index 951e11f..fbdc8fb 100644 ---- a/src/modules/alsa/mixer/paths/analog-input.conf.common -+++ b/src/modules/alsa/mixer/paths/analog-input.conf.common -@@ -78,6 +78,10 @@ priority = 19 - name = input-microphone - priority = 19 - -+[Option Input Source:Int Mic] -+name = input-microphone -+priority = 19 -+ - [Option Input Source:Internal Mic] - name = input-microphone - priority = 19 --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0016-alsa-Cover-the-Int-Mic-Boost-element.diff b/packages/audio/pulseaudio/patches/0016-alsa-Cover-the-Int-Mic-Boost-element.diff deleted file mode 100644 index 89d269c3b4..0000000000 --- a/packages/audio/pulseaudio/patches/0016-alsa-Cover-the-Int-Mic-Boost-element.diff +++ /dev/null @@ -1,36 +0,0 @@ -From 291cd096015d540d5064bfae94a66adc3bc3fc64 Mon Sep 17 00:00:00 2001 -From: Colin Guthrie -Date: Wed, 13 Jan 2010 23:47:21 +0000 -Subject: [PATCH 16/62] alsa: Cover the 'Int Mic Boost' element. - -This is not 100% ideal as we have not way to tie specific boosts to specific -inputs and this particular chipset (as noted in #772) appears to -support just that. - -For the time being incorporate it into the normal boost logic. - -See http://pulseaudio.org/ticket/772 ---- - .../alsa/mixer/paths/analog-input-mic.conf.common | 9 +++++++++ - 1 files changed, 9 insertions(+), 0 deletions(-) - -diff --git a/src/modules/alsa/mixer/paths/analog-input-mic.conf.common b/src/modules/alsa/mixer/paths/analog-input-mic.conf.common -index b35e7af..4663305 100644 ---- a/src/modules/alsa/mixer/paths/analog-input-mic.conf.common -+++ b/src/modules/alsa/mixer/paths/analog-input-mic.conf.common -@@ -61,3 +61,12 @@ name = input-boost-on - - [Option Front Mic Boost:off] - name = input-boost-off -+ -+[Element Int Mic Boost] -+switch = select -+ -+[Option Int Mic Boost:on] -+name = input-boost-on -+ -+[Option Int Mic Boost:off] -+name = input-boost-off --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0017-udev-handle-sound-cards-with-both-modem-and-audio-pr.diff b/packages/audio/pulseaudio/patches/0017-udev-handle-sound-cards-with-both-modem-and-audio-pr.diff deleted file mode 100644 index 1ed41c5057..0000000000 --- a/packages/audio/pulseaudio/patches/0017-udev-handle-sound-cards-with-both-modem-and-audio-pr.diff +++ /dev/null @@ -1,117 +0,0 @@ -From 63c968bf775ec7e172b89e45ddc4981d79587bc5 Mon Sep 17 00:00:00 2001 -From: Daniel T. Chen -Date: Thu, 14 Jan 2010 00:57:27 +0100 -Subject: [PATCH 17/62] udev: handle sound cards with both modem and audio properly - -http://pulseaudio.org/ticket/681 -https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/394500 ---- - src/modules/module-udev-detect.c | 59 ++++++++++++++++++++++++++++++++++++-- - 1 files changed, 56 insertions(+), 3 deletions(-) - -diff --git a/src/modules/module-udev-detect.c b/src/modules/module-udev-detect.c -index 58635a5..1fe9fdc 100644 ---- a/src/modules/module-udev-detect.c -+++ b/src/modules/module-udev-detect.c -@@ -103,13 +103,17 @@ static const char *path_get_card_id(const char *path) { - return e + 5; - } - -+static const char *pa_udev_get_sysattr(const char *card_idx, const char *name); -+ - static pa_bool_t is_card_busy(const char *id) { -- char *card_path = NULL, *pcm_path = NULL, *sub_status = NULL; -+ const char *pcm_class; -+ char *card_path = NULL, *pcm_path = NULL, *sub_status = NULL, -+ *sysfs_path = NULL; - DIR *card_dir = NULL, *pcm_dir = NULL; - FILE *status_file = NULL; - size_t len; - struct dirent *space = NULL, *de; -- pa_bool_t busy = FALSE; -+ pa_bool_t busy = FALSE, is_modem = FALSE; - int r; - - pa_assert(id); -@@ -127,6 +131,17 @@ static pa_bool_t is_card_busy(const char *id) { - len = offsetof(struct dirent, d_name) + fpathconf(dirfd(card_dir), _PC_NAME_MAX) + 1; - space = pa_xmalloc(len); - -+ /* Also check /sys/class/sound/card.../pcmC...D6p/pcm_class. An HDA -+ * modem can be used simultaneously with generic playback/record. */ -+ -+ pa_xfree(sysfs_path); -+ sysfs_path = pa_sprintf_malloc("pcmC%sD6p/pcm_class", id); -+ -+ pcm_class = pa_udev_get_sysattr(id, sysfs_path); -+ -+ if (pcm_class && pa_streq(pcm_class, "modem")) -+ is_modem = TRUE; -+ - for (;;) { - de = NULL; - -@@ -182,7 +197,7 @@ static pa_bool_t is_card_busy(const char *id) { - continue; - } - -- if (!pa_streq(line, "closed\n")) { -+ if (!is_modem && !pa_streq(line, "closed\n")) { - busy = TRUE; - break; - } -@@ -193,6 +208,7 @@ fail: - - pa_xfree(card_path); - pa_xfree(pcm_path); -+ pa_xfree(sysfs_path); - pa_xfree(sub_status); - pa_xfree(space); - -@@ -594,6 +610,43 @@ static int setup_inotify(struct userdata *u) { - return 0; - } - -+static const char *pa_udev_get_sysattr(const char *card_idx, const char *name) { -+ struct udev *udev; -+ struct udev_device *card = NULL; -+ char *t, *r = NULL; -+ const char *v; -+ -+ pa_assert(card_idx); -+ pa_assert(name); -+ -+ if (!(udev = udev_new())) { -+ pa_log_error("Failed to allocate udev context."); -+ goto finish; -+ } -+ -+ t = pa_sprintf_malloc("%s/class/sound/card%s", udev_get_sys_path(udev), card_idx); -+ card = udev_device_new_from_syspath(udev, t); -+ pa_xfree(t); -+ -+ if (!card) { -+ pa_log_error("Failed to get card object."); -+ goto finish; -+ } -+ -+ if ((v = udev_device_get_sysattr_value(card, name)) && *v) -+ r = pa_xstrdup(v); -+ -+finish: -+ -+ if (card) -+ udev_device_unref(card); -+ -+ if (udev) -+ udev_unref(udev); -+ -+ return r; -+} -+ - int pa__init(pa_module *m) { - struct userdata *u = NULL; - pa_modargs *ma; --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0018-udev-rework-modem-detection-a-bit.diff b/packages/audio/pulseaudio/patches/0018-udev-rework-modem-detection-a-bit.diff deleted file mode 100644 index 8e45a4b1a4..0000000000 --- a/packages/audio/pulseaudio/patches/0018-udev-rework-modem-detection-a-bit.diff +++ /dev/null @@ -1,182 +0,0 @@ -From acb4996203f6723d92a9b0df4e60db83c65116fc Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Thu, 14 Jan 2010 02:06:52 +0100 -Subject: [PATCH 18/62] udev: rework modem detection a bit - -Check every single pcm device of a card whether it is a modem. ---- - src/modules/module-udev-detect.c | 117 ++++++++++++++++++++------------------ - 1 files changed, 62 insertions(+), 55 deletions(-) - -diff --git a/src/modules/module-udev-detect.c b/src/modules/module-udev-detect.c -index 1fe9fdc..b8568b2 100644 ---- a/src/modules/module-udev-detect.c -+++ b/src/modules/module-udev-detect.c -@@ -103,17 +103,70 @@ static const char *path_get_card_id(const char *path) { - return e + 5; - } - --static const char *pa_udev_get_sysattr(const char *card_idx, const char *name); -+static char *card_get_sysattr(const char *card_idx, const char *name) { -+ struct udev *udev; -+ struct udev_device *card = NULL; -+ char *t, *r = NULL; -+ const char *v; -+ -+ pa_assert(card_idx); -+ pa_assert(name); -+ -+ if (!(udev = udev_new())) { -+ pa_log_error("Failed to allocate udev context."); -+ goto finish; -+ } -+ -+ t = pa_sprintf_malloc("%s/class/sound/card%s", udev_get_sys_path(udev), card_idx); -+ card = udev_device_new_from_syspath(udev, t); -+ pa_xfree(t); -+ -+ if (!card) { -+ pa_log_error("Failed to get card object."); -+ goto finish; -+ } -+ -+ if ((v = udev_device_get_sysattr_value(card, name)) && *v) -+ r = pa_xstrdup(v); -+ -+finish: -+ -+ if (card) -+ udev_device_unref(card); -+ -+ if (udev) -+ udev_unref(udev); -+ -+ return r; -+} -+ -+static pa_bool_t pcm_is_modem(const char *card_idx, const char *pcm) { -+ char *sysfs_path, *pcm_class; -+ pa_bool_t is_modem; -+ -+ pa_assert(card_idx); -+ pa_assert(pcm); -+ -+ /* Check /sys/class/sound/card.../pcmC...../pcm_class. An HDA -+ * modem can be used simultaneously with generic -+ * playback/record. */ -+ -+ sysfs_path = pa_sprintf_malloc("pcmC%sD%s/pcm_class", card_idx, pcm); -+ pcm_class = card_get_sysattr(card_idx, sysfs_path); -+ is_modem = pcm_class && pa_streq(pcm_class, "modem"); -+ pa_xfree(pcm_class); -+ pa_xfree(sysfs_path); -+ -+ return is_modem; -+} - - static pa_bool_t is_card_busy(const char *id) { -- const char *pcm_class; -- char *card_path = NULL, *pcm_path = NULL, *sub_status = NULL, -- *sysfs_path = NULL; -+ char *card_path = NULL, *pcm_path = NULL, *sub_status = NULL; - DIR *card_dir = NULL, *pcm_dir = NULL; - FILE *status_file = NULL; - size_t len; - struct dirent *space = NULL, *de; -- pa_bool_t busy = FALSE, is_modem = FALSE; -+ pa_bool_t busy = FALSE; - int r; - - pa_assert(id); -@@ -131,17 +184,6 @@ static pa_bool_t is_card_busy(const char *id) { - len = offsetof(struct dirent, d_name) + fpathconf(dirfd(card_dir), _PC_NAME_MAX) + 1; - space = pa_xmalloc(len); - -- /* Also check /sys/class/sound/card.../pcmC...D6p/pcm_class. An HDA -- * modem can be used simultaneously with generic playback/record. */ -- -- pa_xfree(sysfs_path); -- sysfs_path = pa_sprintf_malloc("pcmC%sD6p/pcm_class", id); -- -- pcm_class = pa_udev_get_sysattr(id, sysfs_path); -- -- if (pcm_class && pa_streq(pcm_class, "modem")) -- is_modem = TRUE; -- - for (;;) { - de = NULL; - -@@ -156,6 +198,9 @@ static pa_bool_t is_card_busy(const char *id) { - if (!pa_startswith(de->d_name, "pcm")) - continue; - -+ if (pcm_is_modem(id, de->d_name + 3)) -+ continue; -+ - pa_xfree(pcm_path); - pcm_path = pa_sprintf_malloc("%s/%s", card_path, de->d_name); - -@@ -197,7 +242,7 @@ static pa_bool_t is_card_busy(const char *id) { - continue; - } - -- if (!is_modem && !pa_streq(line, "closed\n")) { -+ if (!pa_streq(line, "closed\n")) { - busy = TRUE; - break; - } -@@ -208,7 +253,6 @@ fail: - - pa_xfree(card_path); - pa_xfree(pcm_path); -- pa_xfree(sysfs_path); - pa_xfree(sub_status); - pa_xfree(space); - -@@ -610,43 +654,6 @@ static int setup_inotify(struct userdata *u) { - return 0; - } - --static const char *pa_udev_get_sysattr(const char *card_idx, const char *name) { -- struct udev *udev; -- struct udev_device *card = NULL; -- char *t, *r = NULL; -- const char *v; -- -- pa_assert(card_idx); -- pa_assert(name); -- -- if (!(udev = udev_new())) { -- pa_log_error("Failed to allocate udev context."); -- goto finish; -- } -- -- t = pa_sprintf_malloc("%s/class/sound/card%s", udev_get_sys_path(udev), card_idx); -- card = udev_device_new_from_syspath(udev, t); -- pa_xfree(t); -- -- if (!card) { -- pa_log_error("Failed to get card object."); -- goto finish; -- } -- -- if ((v = udev_device_get_sysattr_value(card, name)) && *v) -- r = pa_xstrdup(v); -- --finish: -- -- if (card) -- udev_device_unref(card); -- -- if (udev) -- udev_unref(udev); -- -- return r; --} -- - int pa__init(pa_module *m) { - struct userdata *u = NULL; - pa_modargs *ma; --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0019-daemon-first-take-name-on-the-bus-then-return-in-sta.diff b/packages/audio/pulseaudio/patches/0019-daemon-first-take-name-on-the-bus-then-return-in-sta.diff deleted file mode 100644 index 2315a30dc7..0000000000 --- a/packages/audio/pulseaudio/patches/0019-daemon-first-take-name-on-the-bus-then-return-in-sta.diff +++ /dev/null @@ -1,39 +0,0 @@ -From 93cb75d78ed82c40e525a8b30f1ead147ad35ead Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Thu, 14 Jan 2010 02:33:49 +0100 -Subject: [PATCH 19/62] daemon: first take name on the bus, then return in starter process - -http://pulseaudio.org/ticket/748 ---- - src/daemon/main.c | 8 ++++---- - 1 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/daemon/main.c b/src/daemon/main.c -index eafd72a..c7e202a 100644 ---- a/src/daemon/main.c -+++ b/src/daemon/main.c -@@ -952,6 +952,10 @@ int main(int argc, char *argv[]) { - goto finish; - } - -+#ifdef HAVE_DBUS -+ dbus = register_dbus(c); -+#endif -+ - #ifdef HAVE_FORK - if (daemon_pipe[1] >= 0) { - int ok = 0; -@@ -961,10 +965,6 @@ int main(int argc, char *argv[]) { - } - #endif - --#ifdef HAVE_DBUS -- dbus = register_dbus(c); --#endif -- - pa_log_info(_("Daemon startup complete.")); - - retval = 0; --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0020-alsa-cover-bass-boost-mixer-element.diff b/packages/audio/pulseaudio/patches/0020-alsa-cover-bass-boost-mixer-element.diff deleted file mode 100644 index 8ba6278976..0000000000 --- a/packages/audio/pulseaudio/patches/0020-alsa-cover-bass-boost-mixer-element.diff +++ /dev/null @@ -1,49 +0,0 @@ -From 48e0f6808bcc8e07622e4a45b3aabfc4679e9966 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Thu, 14 Jan 2010 02:53:50 +0100 -Subject: [PATCH 20/62] alsa: cover bass boost mixer element - -http://pulseaudio.org/ticket/740 ---- - src/modules/alsa/alsa-mixer.c | 2 ++ - .../alsa/mixer/paths/analog-output.conf.common | 11 +++++++++++ - 2 files changed, 13 insertions(+), 0 deletions(-) - -diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c -index 8b13239..8bbd1f5 100644 ---- a/src/modules/alsa/alsa-mixer.c -+++ b/src/modules/alsa/alsa-mixer.c -@@ -1713,6 +1713,8 @@ static int option_verify(pa_alsa_option *o) { - { "input-boost-off", N_("No Boost") }, - { "output-amplifier-on", N_("Amplifier") }, - { "output-amplifier-off", N_("No Amplifier") }, -+ { "output-bass-boost-on", N_("Bass Boost") }, -+ { "output-bass-boost-off", N_("No Bass Boost") }, - { "output-speaker", N_("Speaker") }, - { "output-headphones", N_("Headphones") } - }; -diff --git a/src/modules/alsa/mixer/paths/analog-output.conf.common b/src/modules/alsa/mixer/paths/analog-output.conf.common -index fd7f0cf..6131da5 100644 ---- a/src/modules/alsa/mixer/paths/analog-output.conf.common -+++ b/src/modules/alsa/mixer/paths/analog-output.conf.common -@@ -110,6 +110,17 @@ priority = 10 - name = output-amplifier-off - priority = 0 - -+[Element Bass Boost] -+switch = select -+ -+[Option Bass Boost:on] -+name = output-bass-boost-on -+priority = 0 -+ -+[Option Bass Boost:off] -+name = output-bass-boost-off -+priority = 10 -+ - ;;; 'Analog Output' - - [Element Analog Output] --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0021-Mark-shared-variables-as-volatile.diff b/packages/audio/pulseaudio/patches/0021-Mark-shared-variables-as-volatile.diff deleted file mode 100644 index cfce6b6957..0000000000 --- a/packages/audio/pulseaudio/patches/0021-Mark-shared-variables-as-volatile.diff +++ /dev/null @@ -1,55 +0,0 @@ -From 366e6d7e90d3bebc98a1af3cfb04b4cfc8cff6f5 Mon Sep 17 00:00:00 2001 -From: Arun Raghavan -Date: Sun, 6 Dec 2009 12:20:53 +0530 -Subject: [PATCH 21/62] Mark shared variables as volatile - -'n_waiting' and 'n_waiting_for_accept' may be accessed from mulitple -threads, and thus need to be marked as volatile to suppres certain -compiler optimisations. All uses are protected by a mutex, so we don't -need to worry about cache issues (added documentation for this as well). - -This addresses bug #738. ---- - src/pulse/thread-mainloop.c | 5 ++++- - 1 files changed, 4 insertions(+), 1 deletions(-) - -diff --git a/src/pulse/thread-mainloop.c b/src/pulse/thread-mainloop.c -index a2b98ce..14ed926 100644 ---- a/src/pulse/thread-mainloop.c -+++ b/src/pulse/thread-mainloop.c -@@ -51,7 +51,7 @@ - - struct pa_threaded_mainloop { - pa_mainloop *real_mainloop; -- int n_waiting, n_waiting_for_accept; -+ volatile int n_waiting, n_waiting_for_accept; - - pa_thread* thread; - pa_mutex* mutex; -@@ -185,6 +185,7 @@ void pa_threaded_mainloop_unlock(pa_threaded_mainloop *m) { - pa_mutex_unlock(m->mutex); - } - -+/* Called with the lock taken */ - void pa_threaded_mainloop_signal(pa_threaded_mainloop *m, int wait_for_accept) { - pa_assert(m); - -@@ -198,6 +199,7 @@ void pa_threaded_mainloop_signal(pa_threaded_mainloop *m, int wait_for_accept) { - } - } - -+/* Called with the lock taken */ - void pa_threaded_mainloop_wait(pa_threaded_mainloop *m) { - pa_assert(m); - -@@ -212,6 +214,7 @@ void pa_threaded_mainloop_wait(pa_threaded_mainloop *m) { - m->n_waiting --; - } - -+/* Called with the lock taken */ - void pa_threaded_mainloop_accept(pa_threaded_mainloop *m) { - pa_assert(m); - --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0022-udev-use-ID_MODEL_ENC-instead-of-ID_MODEL-if-it-is-s.diff b/packages/audio/pulseaudio/patches/0022-udev-use-ID_MODEL_ENC-instead-of-ID_MODEL-if-it-is-s.diff deleted file mode 100644 index cd7a968785..0000000000 --- a/packages/audio/pulseaudio/patches/0022-udev-use-ID_MODEL_ENC-instead-of-ID_MODEL-if-it-is-s.diff +++ /dev/null @@ -1,153 +0,0 @@ -From e129f8577a405266a5b7d4a7ee75bd56dd43953e Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Thu, 14 Jan 2010 20:31:00 +0100 -Subject: [PATCH 22/62] udev: use ID_MODEL_ENC instead of ID_MODEL if it is set - -That way we should be able to make use of the nicer USB strings the USB -hw provides. - -Fixes the issues pointed out in: - -https://tango.0pointer.de/pipermail/pulseaudio-discuss/2010-January/006248.html ---- - src/modules/udev-util.c | 110 +++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 110 insertions(+), 0 deletions(-) - -diff --git a/src/modules/udev-util.c b/src/modules/udev-util.c -index cc82446..eee5409 100644 ---- a/src/modules/udev-util.c -+++ b/src/modules/udev-util.c -@@ -58,6 +58,112 @@ static int read_id(struct udev_device *d, const char *n) { - return u; - } - -+static int dehex(char x) { -+ if (x >= '0' && x <= '9') -+ return x - '0'; -+ -+ if (x >= 'A' && x <= 'F') -+ return x - 'A'; -+ -+ if (x >= 'a' && x <= 'f') -+ return x - 'a'; -+ -+ return -1; -+} -+ -+static void proplist_sets_unescape(pa_proplist *p, const char *prop, const char *s) { -+ const char *f; -+ char *t, *r; -+ int c; -+ -+ enum { -+ TEXT, -+ BACKSLASH, -+ EX, -+ FIRST -+ } state = TEXT; -+ -+ /* The resulting string is definitely shorter than the source string */ -+ r = pa_xnew(char, strlen(s)+1); -+ -+ for (f = s, t = r; *f; f++) { -+ -+ switch (state) { -+ -+ case TEXT: -+ if (*f == '\\') -+ state = BACKSLASH; -+ else -+ *(t++) = *f; -+ break; -+ -+ case BACKSLASH: -+ if (*f == 'x') -+ state = EX; -+ else { -+ *(t++) = '\\'; -+ *(t++) = *f; -+ state = TEXT; -+ } -+ break; -+ -+ case EX: -+ c = dehex(*f); -+ -+ if (c < 0) { -+ *(t++) = '\\'; -+ *(t++) = 'x'; -+ *(t++) = *f; -+ state = TEXT; -+ } else -+ state = FIRST; -+ -+ break; -+ -+ case FIRST: { -+ int d = dehex(*f); -+ -+ if (d < 0) { -+ *(t++) = '\\'; -+ *(t++) = 'x'; -+ *(t++) = *(f-1); -+ *(t++) = *f; -+ } else -+ *(t++) = (char) (c << 4) | d; -+ -+ state = TEXT; -+ break; -+ } -+ } -+ } -+ -+ switch (state) { -+ -+ case TEXT: -+ break; -+ -+ case BACKSLASH: -+ *(t++) = '\\'; -+ break; -+ -+ case EX: -+ *(t++) = '\\'; -+ *(t++) = 'x'; -+ break; -+ -+ case FIRST: -+ *(t++) = '\\'; -+ *(t++) = 'x'; -+ *(t++) = *(f-1); -+ break; -+ } -+ -+ *t = 0; -+ -+ pa_proplist_sets(p, prop, r); -+ pa_xfree(r); -+} -+ - int pa_udev_get_info(int card_idx, pa_proplist *p) { - int r = -1; - struct udev *udev; -@@ -107,6 +213,8 @@ int pa_udev_get_info(int card_idx, pa_proplist *p) { - if (!pa_proplist_contains(p, PA_PROP_DEVICE_VENDOR_NAME)) { - if ((v = udev_device_get_property_value(card, "ID_VENDOR_FROM_DATABASE")) && *v) - pa_proplist_sets(p, PA_PROP_DEVICE_VENDOR_NAME, v); -+ else if ((v = udev_device_get_property_value(card, "ID_VENDOR_ENC")) && *v) -+ proplist_sets_unescape(p, PA_PROP_DEVICE_VENDOR_NAME, v); - else if ((v = udev_device_get_property_value(card, "ID_VENDOR")) && *v) - pa_proplist_sets(p, PA_PROP_DEVICE_VENDOR_NAME, v); - } -@@ -118,6 +226,8 @@ int pa_udev_get_info(int card_idx, pa_proplist *p) { - if (!pa_proplist_contains(p, PA_PROP_DEVICE_PRODUCT_NAME)) { - if ((v = udev_device_get_property_value(card, "ID_MODEL_FROM_DATABASE")) && *v) - pa_proplist_sets(p, PA_PROP_DEVICE_PRODUCT_NAME, v); -+ else if ((v = udev_device_get_property_value(card, "ID_MODEL_ENC")) && *v) -+ proplist_sets_unescape(p, PA_PROP_DEVICE_PRODUCT_NAME, v); - else if ((v = udev_device_get_property_value(card, "ID_MODEL")) && *v) - pa_proplist_sets(p, PA_PROP_DEVICE_PRODUCT_NAME, v); - } --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0023-pacat-allow-configuration-of-latency-in-msec.diff b/packages/audio/pulseaudio/patches/0023-pacat-allow-configuration-of-latency-in-msec.diff deleted file mode 100644 index 5cf591475d..0000000000 --- a/packages/audio/pulseaudio/patches/0023-pacat-allow-configuration-of-latency-in-msec.diff +++ /dev/null @@ -1,268 +0,0 @@ -From 27df02779a26e0356497a39bee04a28138ba52af Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 15 Jan 2010 01:25:21 +0100 -Subject: [PATCH 23/62] pacat: allow configuration of latency in msec - ---- - man/pacat.1.xml.in | 96 +++++++++++++++++++++++++++++++++++++++++++-------- - src/utils/pacat.c | 46 ++++++++++++++++++++----- - 2 files changed, 118 insertions(+), 24 deletions(-) - -diff --git a/man/pacat.1.xml.in b/man/pacat.1.xml.in -index 68a3a12..2e27450 100644 ---- a/man/pacat.1.xml.in -+++ b/man/pacat.1.xml.in -@@ -21,18 +21,22 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - USA. - --> - -- -+ - - -+ paplay [options] [FILE] -+ parecord [options] [FILE] - pacat [options] [FILE] - parec [options] [FILE] -- paplay --help -- paplay --version -+ pamon [options] [FILE] -+ pacat --help -+ pacat --version - - - -

pacat is a simple tool for playing back or -- capturing raw audio files on a PulseAudio sound server.

-+ capturing raw or encoded audio files on a PulseAudio sound -+ server.

-
- - -@@ -52,13 +56,13 @@ USA. - - - - - - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - - -
-@@ -178,7 +244,7 @@ USA. - -
-

-- , -+ , -

-
- -diff --git a/src/utils/pacat.c b/src/utils/pacat.c -index 5f29ba3..a5d2e9a 100644 ---- a/src/utils/pacat.c -+++ b/src/utils/pacat.c -@@ -45,6 +45,7 @@ - #include - #include - #include -+#include - - #define TIME_EVENT_USEC 50000 - -@@ -86,6 +87,7 @@ static sf_count_t (*writef_function)(SNDFILE *_sndfile, const void *ptr, sf_coun - static pa_stream_flags_t flags = 0; - - static size_t latency = 0, process_time = 0; -+static int32_t latency_msec = 0, process_time_msec = 0; - - static pa_bool_t raw = TRUE; - static int file_format = -1; -@@ -434,19 +436,25 @@ static void context_state_callback(pa_context *c, void *userdata) { - buffer_attr.maxlength = (uint32_t) -1; - buffer_attr.prebuf = (uint32_t) -1; - -- if (latency > 0) { -+ if (latency_msec > 0) { -+ buffer_attr.fragsize = buffer_attr.tlength = pa_usec_to_bytes(latency_msec * PA_USEC_PER_MSEC, &sample_spec); -+ flags |= PA_STREAM_ADJUST_LATENCY; -+ } else if (latency > 0) { - buffer_attr.fragsize = buffer_attr.tlength = (uint32_t) latency; -- buffer_attr.minreq = (uint32_t) process_time; - flags |= PA_STREAM_ADJUST_LATENCY; -- } else { -- buffer_attr.tlength = (uint32_t) -1; -+ } else -+ buffer_attr.fragsize = buffer_attr.tlength = (uint32_t) -1; -+ -+ if (process_time_msec > 0) { -+ buffer_attr.minreq = pa_usec_to_bytes(process_time_msec * PA_USEC_PER_MSEC, &sample_spec); -+ } else if (process_time > 0) -+ buffer_attr.minreq = (uint32_t) process_time; -+ else - buffer_attr.minreq = (uint32_t) -1; -- buffer_attr.fragsize = (uint32_t) -1; -- } - - if (mode == PLAYBACK) { - pa_cvolume cv; -- if (pa_stream_connect_playback(stream, device, latency > 0 ? &buffer_attr : NULL, flags, volume_is_set ? pa_cvolume_set(&cv, sample_spec.channels, volume) : NULL, NULL) < 0) { -+ if (pa_stream_connect_playback(stream, device, &buffer_attr, flags, volume_is_set ? pa_cvolume_set(&cv, sample_spec.channels, volume) : NULL, NULL) < 0) { - pa_log(_("pa_stream_connect_playback() failed: %s"), pa_strerror(pa_context_errno(c))); - goto fail; - } -@@ -634,9 +642,11 @@ static void help(const char *argv0) { - " --no-remap Map channels by index instead of name.\n" - " --latency=BYTES Request the specified latency in bytes.\n" - " --process-time=BYTES Request the specified process time per request in bytes.\n" -+ " --latency-msec=MSEC Request the specified latency in msec.\n" -+ " --process-time-msec=MSEC Request the specified process time per request in msec.\n" - " --property=PROPERTY=VALUE Set the specified property to the specified value.\n" - " --raw Record/play raw PCM data.\n" -- " --file-format=FFORMAT Record/play formatted PCM data.\n" -+ " --file-format[=FFORMAT] Record/play formatted PCM data.\n" - " --list-file-formats List available file formats.\n") - , argv0); - } -@@ -659,7 +669,9 @@ enum { - ARG_RAW, - ARG_PROPERTY, - ARG_FILE_FORMAT, -- ARG_LIST_FILE_FORMATS -+ ARG_LIST_FILE_FORMATS, -+ ARG_LATENCY_MSEC, -+ ARG_PROCESS_TIME_MSEC - }; - - int main(int argc, char *argv[]) { -@@ -695,6 +707,8 @@ int main(int argc, char *argv[]) { - {"raw", 0, NULL, ARG_RAW}, - {"file-format", 2, NULL, ARG_FILE_FORMAT}, - {"list-file-formats", 0, NULL, ARG_LIST_FILE_FORMATS}, -+ {"latency-msec", 1, NULL, ARG_LATENCY_MSEC}, -+ {"process-time-msec", 1, NULL, ARG_PROCESS_TIME_MSEC}, - {NULL, 0, NULL, 0} - }; - -@@ -854,6 +868,20 @@ int main(int argc, char *argv[]) { - } - break; - -+ case ARG_LATENCY_MSEC: -+ if (((latency_msec = (int32_t) atoi(optarg))) <= 0) { -+ pa_log(_("Invalid latency specification '%s'"), optarg); -+ goto quit; -+ } -+ break; -+ -+ case ARG_PROCESS_TIME_MSEC: -+ if (((process_time_msec = (int32_t) atoi(optarg))) <= 0) { -+ pa_log(_("Invalid process time specification '%s'"), optarg); -+ goto quit; -+ } -+ break; -+ - case ARG_PROPERTY: { - char *t; - --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0024-client-implement-PULSE_LATENCY_MSEC.diff b/packages/audio/pulseaudio/patches/0024-client-implement-PULSE_LATENCY_MSEC.diff deleted file mode 100644 index 37cb5d1f3b..0000000000 --- a/packages/audio/pulseaudio/patches/0024-client-implement-PULSE_LATENCY_MSEC.diff +++ /dev/null @@ -1,107 +0,0 @@ -From fa64230107bd348ceda271dc9db74765c694d311 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 15 Jan 2010 01:25:42 +0100 -Subject: [PATCH 24/62] client: implement $PULSE_LATENCY_MSEC - -This allows easy overriding of a clients latency setting for debugging -purposes. - -http://pulseaudio.org/ticket/753 ---- - src/pulse/stream.c | 37 +++++++++++++++++++++++++++++++------ - 1 files changed, 31 insertions(+), 6 deletions(-) - -diff --git a/src/pulse/stream.c b/src/pulse/stream.c -index 79b2868..daeb53a 100644 ---- a/src/pulse/stream.c -+++ b/src/pulse/stream.c -@@ -39,6 +39,7 @@ - #include - #include - #include -+#include - - #include "fork-detect.h" - #include "internal.h" -@@ -855,10 +856,28 @@ static void create_stream_complete(pa_stream *s) { - check_smoother_status(s, TRUE, FALSE, FALSE); - } - --static void automatic_buffer_attr(pa_stream *s, pa_buffer_attr *attr, const pa_sample_spec *ss) { -+static void patch_buffer_attr(pa_stream *s, pa_buffer_attr *attr, pa_stream_flags_t *flags) { -+ const char *e; -+ - pa_assert(s); - pa_assert(attr); -- pa_assert(ss); -+ -+ if ((e = getenv("PULSE_LATENCY_MSEC"))) { -+ uint32_t ms; -+ -+ if (pa_atou(e, &ms) < 0 || ms <= 0) -+ pa_log_debug("Failed to parse $PULSE_LATENCY_MSEC: %s", e); -+ else { -+ attr->maxlength = (uint32_t) -1; -+ attr->tlength = pa_usec_to_bytes(ms * PA_USEC_PER_MSEC, &s->sample_spec); -+ attr->minreq = (uint32_t) -1; -+ attr->prebuf = (uint32_t) -1; -+ attr->fragsize = attr->tlength; -+ } -+ -+ if (flags) -+ *flags |= PA_STREAM_ADJUST_LATENCY; -+ } - - if (s->context->version >= 13) - return; -@@ -873,7 +892,7 @@ static void automatic_buffer_attr(pa_stream *s, pa_buffer_attr *attr, const pa_s - attr->maxlength = 4*1024*1024; /* 4MB is the maximum queue length PulseAudio <= 0.9.9 supported. */ - - if (attr->tlength == (uint32_t) -1) -- attr->tlength = (uint32_t) pa_usec_to_bytes(250*PA_USEC_PER_MSEC, ss); /* 250ms of buffering */ -+ attr->tlength = (uint32_t) pa_usec_to_bytes(250*PA_USEC_PER_MSEC, &s->sample_spec); /* 250ms of buffering */ - - if (attr->minreq == (uint32_t) -1) - attr->minreq = (attr->tlength)/5; /* Ask for more data when there are only 200ms left in the playback buffer */ -@@ -1064,15 +1083,16 @@ static int create_stream( - pa_stream_ref(s); - - s->direction = direction; -- s->flags = flags; -- s->corked = !!(flags & PA_STREAM_START_CORKED); - - if (sync_stream) - s->syncid = sync_stream->syncid; - - if (attr) - s->buffer_attr = *attr; -- automatic_buffer_attr(s, &s->buffer_attr, &s->sample_spec); -+ patch_buffer_attr(s, &s->buffer_attr, &flags); -+ -+ s->flags = flags; -+ s->corked = !!(flags & PA_STREAM_START_CORKED); - - if (flags & PA_STREAM_INTERPOLATE_TIMING) { - pa_usec_t x; -@@ -2412,6 +2432,7 @@ pa_operation* pa_stream_set_buffer_attr(pa_stream *s, const pa_buffer_attr *attr - pa_operation *o; - pa_tagstruct *t; - uint32_t tag; -+ pa_buffer_attr copy; - - pa_assert(s); - pa_assert(PA_REFCNT_VALUE(s) >= 1); -@@ -2435,6 +2456,10 @@ pa_operation* pa_stream_set_buffer_attr(pa_stream *s, const pa_buffer_attr *attr - &tag); - pa_tagstruct_putu32(t, s->channel); - -+ copy = *attr; -+ patch_buffer_attr(s, ©, NULL); -+ attr = © -+ - pa_tagstruct_putu32(t, attr->maxlength); - - if (s->direction == PA_STREAM_PLAYBACK) --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0025-client-include-dolby-channel-names-in-comments.diff b/packages/audio/pulseaudio/patches/0025-client-include-dolby-channel-names-in-comments.diff deleted file mode 100644 index 8ecba0ac3e..0000000000 --- a/packages/audio/pulseaudio/patches/0025-client-include-dolby-channel-names-in-comments.diff +++ /dev/null @@ -1,57 +0,0 @@ -From 86144ee6cb6af54903a8d3d8395751ae26a4d134 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Thu, 14 Jan 2010 21:32:26 +0100 -Subject: [PATCH 25/62] client: include dolby channel names in comments - ---- - src/pulse/channelmap.h | 20 ++++++++++---------- - 1 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/src/pulse/channelmap.h b/src/pulse/channelmap.h -index 469effc..d1d5c8b 100644 ---- a/src/pulse/channelmap.h -+++ b/src/pulse/channelmap.h -@@ -74,9 +74,9 @@ typedef enum pa_channel_position { - PA_CHANNEL_POSITION_INVALID = -1, - PA_CHANNEL_POSITION_MONO = 0, - -- PA_CHANNEL_POSITION_FRONT_LEFT, /* Apple calls this 'Left' */ -- PA_CHANNEL_POSITION_FRONT_RIGHT, /* Apple calls this 'Right' */ -- PA_CHANNEL_POSITION_FRONT_CENTER, /* Apple calls this 'Center' */ -+ PA_CHANNEL_POSITION_FRONT_LEFT, /* Apple, Dolby call this 'Left' */ -+ PA_CHANNEL_POSITION_FRONT_RIGHT, /* Apple, Dolby call this 'Right' */ -+ PA_CHANNEL_POSITION_FRONT_CENTER, /* Apple, Dolby call this 'Center' */ - - /** \cond fulldocs */ - PA_CHANNEL_POSITION_LEFT = PA_CHANNEL_POSITION_FRONT_LEFT, -@@ -84,20 +84,20 @@ typedef enum pa_channel_position { - PA_CHANNEL_POSITION_CENTER = PA_CHANNEL_POSITION_FRONT_CENTER, - /** \endcond */ - -- PA_CHANNEL_POSITION_REAR_CENTER, /* Microsoft calls this 'Back Center', Apple calls this 'Center Surround' */ -- PA_CHANNEL_POSITION_REAR_LEFT, /* Microsoft calls this 'Back Left', Apple calls this 'Left Surround' */ -- PA_CHANNEL_POSITION_REAR_RIGHT, /* Microsoft calls this 'Back Right', Apple calls this 'Right Surround' */ -+ PA_CHANNEL_POSITION_REAR_CENTER, /* Microsoft calls this 'Back Center', Apple calls this 'Center Surround', Dolby calls this 'Surround Rear Center' */ -+ PA_CHANNEL_POSITION_REAR_LEFT, /* Microsoft calls this 'Back Left', Apple calls this 'Left Surround' (!), Dolby calls this 'Surround Rear Left' */ -+ PA_CHANNEL_POSITION_REAR_RIGHT, /* Microsoft calls this 'Back Right', Apple calls this 'Right Surround' (!), Dolby calls this 'Surround Rear Right' */ - - PA_CHANNEL_POSITION_LFE, /* Microsoft calls this 'Low Frequency', Apple calls this 'LFEScreen' */ - /** \cond fulldocs */ - PA_CHANNEL_POSITION_SUBWOOFER = PA_CHANNEL_POSITION_LFE, - /** \endcond */ - -- PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER, /* Apple calls this 'Left Center' */ -- PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER, /* Apple calls this 'Right Center */ -+ PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER, /* Apple, Dolby call this 'Left Center' */ -+ PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER, /* Apple, Dolby call this 'Right Center */ - -- PA_CHANNEL_POSITION_SIDE_LEFT, /* Apple calls this 'Left Surround Direct' */ -- PA_CHANNEL_POSITION_SIDE_RIGHT, /* Apple calls this 'Right Surround Direct' */ -+ PA_CHANNEL_POSITION_SIDE_LEFT, /* Apple calls this 'Left Surround Direct', Dolby calls this 'Surround Left' (!) */ -+ PA_CHANNEL_POSITION_SIDE_RIGHT, /* Apple calls this 'Right Surround Direct', Dolby calls this 'Surround Right' (!) */ - - PA_CHANNEL_POSITION_AUX0, - PA_CHANNEL_POSITION_AUX1, --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0026-alsa-add-profile-set-for-M-Audio-FastTrack-Pro-USB.diff b/packages/audio/pulseaudio/patches/0026-alsa-add-profile-set-for-M-Audio-FastTrack-Pro-USB.diff deleted file mode 100644 index 593952b3c7..0000000000 --- a/packages/audio/pulseaudio/patches/0026-alsa-add-profile-set-for-M-Audio-FastTrack-Pro-USB.diff +++ /dev/null @@ -1,116 +0,0 @@ -From 66e1a2d05139d7968d41d9f1a88c22093cdd04d5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?David=20K=C3=A5gedal?= -Date: Tue, 5 Jan 2010 20:14:11 +0100 -Subject: [PATCH 26/62] alsa: add profile set for M-Audio FastTrack Pro USB - ---- - .../alsa/mixer/profile-sets/90-pulseaudio.rules | 1 + - .../mixer/profile-sets/maudio-fasttrack-pro.conf | 85 ++++++++++++++++++++ - 2 files changed, 86 insertions(+), 0 deletions(-) - create mode 100644 src/modules/alsa/mixer/profile-sets/maudio-fasttrack-pro.conf - -diff --git a/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules b/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules -index ea1a2fe..b8e88d0 100644 ---- a/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules -+++ b/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules -@@ -22,5 +22,6 @@ KERNEL!="card*", GOTO="pulseaudio_end" - - SUBSYSTEMS=="usb", ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="1978", ENV{PULSE_PROFILE_SET}="native-instruments-audio8dj.conf" - SUBSYSTEMS=="usb", ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="0839", ENV{PULSE_PROFILE_SET}="native-instruments-audio4dj.conf" -+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0763", ATTRS{idProduct}=="2012", ENV{PULSE_PROFILE_SET}="maudio-fasttrack-pro.conf" - - LABEL="pulseaudio_end" -diff --git a/src/modules/alsa/mixer/profile-sets/maudio-fasttrack-pro.conf b/src/modules/alsa/mixer/profile-sets/maudio-fasttrack-pro.conf -new file mode 100644 -index 0000000..75f5112 ---- /dev/null -+++ b/src/modules/alsa/mixer/profile-sets/maudio-fasttrack-pro.conf -@@ -0,0 +1,85 @@ -+# This file is part of PulseAudio. -+# -+# PulseAudio is free software; you can redistribute it and/or modify -+# it under the terms of the GNU Lesser General Public License as -+# published by the Free Software Foundation; either version 2.1 of the -+# License, or (at your option) any later version. -+# -+# PulseAudio is distributed in the hope that it will be useful, but -+# WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+# General Public License for more details. -+# -+# You should have received a copy of the GNU Lesser General Public License -+# along with PulseAudio; if not, write to the Free Software Foundation, -+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. -+ -+; M-Audio FastTrack Pro -+; -+; This card has one duplex stereo channel called A and an additional -+; stereo output channel called B. -+; -+; We knowingly only define a subset of the theoretically possible -+; mapping combinations as profiles here. -+; -+; See default.conf for an explanation on the directives used here. -+ -+[General] -+auto-profiles = no -+ -+[Mapping analog-stereo-a-output] -+description = Analog Stereo Channel A -+device-strings = hw:%f,0,0 -+channel-map = left,right -+direction = output -+ -+[Mapping analog-stereo-a-input] -+description = Analog Stereo Channel A -+device-strings = hw:%f,0,0 -+channel-map = left,right -+direction = input -+ -+[Mapping analog-stereo-b-output] -+description = Analog Stereo Channel B -+device-strings = hw:%f,1,0 -+channel-map = left,right -+direction = output -+ -+[Profile output:analog-stereo-all+input:analog-stereo-all] -+description = Analog Stereo Duplex Channel A, Analog Stereo output Channel B -+output-mappings = analog-stereo-a-output analog-stereo-b-output -+input-mappings = analog-stereo-a-input -+priority = 100 -+skip-probe = yes -+ -+[Profile output:analog-stereo-a-output+input:analog-stereo-a-input] -+description = Analog Stereo Duplex Channel A -+output-mappings = analog-stereo-a-output -+input-mappings = analog-stereo-a-input -+priority = 40 -+skip-probe = yes -+ -+[Profile output:analog-stereo-b+input:analog-stereo-b] -+description = Analog Stereo Output Channel B -+output-mappings = analog-stereo-b-output -+input-mappings = -+priority = 50 -+skip-probe = yes -+ -+[Profile output:analog-stereo-a] -+description = Analog Stereo Output Channel A -+output-mappings = analog-stereo-a-output -+priority = 5 -+skip-probe = yes -+ -+[Profile output:analog-stereo-b] -+description = Analog Stereo Output Channel B -+output-mappings = analog-stereo-b-output -+priority = 6 -+skip-probe = yes -+ -+[Profile input:analog-stereo-a] -+description = Analog Stereo Input Channel A -+input-mappings = analog-stereo-a-input -+priority = 2 -+skip-probe = yes --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0027-threaded-mainloop-Properly-initialise-m-n_waiting_fo.diff b/packages/audio/pulseaudio/patches/0027-threaded-mainloop-Properly-initialise-m-n_waiting_fo.diff deleted file mode 100644 index 333599145d..0000000000 --- a/packages/audio/pulseaudio/patches/0027-threaded-mainloop-Properly-initialise-m-n_waiting_fo.diff +++ /dev/null @@ -1,35 +0,0 @@ -From a2418effe7c4bc54390939ccd07dd6227e6cdfa5 Mon Sep 17 00:00:00 2001 -From: Daniel T Chen -Date: Mon, 4 Jan 2010 21:44:37 -0500 -Subject: [PATCH 27/62] threaded-mainloop: Properly initialise m->n_waiting_for_accept to prevent deadlock -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Compiler optimisations have been seen to initialise -m->n_waiting_for_accept to a positive non-zero value, so the while() in -pa_threaded_mainloop_signal() never proceeds. Fix this by properly -initializing m->n_waiting_for_accept in pa_threaded_mainloop_new(). - -Patch from Iain Bucław. - -https://bugs.launchpad.net/bugs/502992 ---- - src/pulse/thread-mainloop.c | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/src/pulse/thread-mainloop.c b/src/pulse/thread-mainloop.c -index 14ed926..1693404 100644 ---- a/src/pulse/thread-mainloop.c -+++ b/src/pulse/thread-mainloop.c -@@ -116,6 +116,7 @@ pa_threaded_mainloop *pa_threaded_mainloop_new(void) { - pa_mainloop_set_poll_func(m->real_mainloop, poll_func, m->mutex); - - m->n_waiting = 0; -+ m->n_waiting_for_accept = 0; - - return m; - } --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0028-udev-Use-SOUND_CLASS-instead-of-SOUND_FORM_FACTOR-wh.diff b/packages/audio/pulseaudio/patches/0028-udev-Use-SOUND_CLASS-instead-of-SOUND_FORM_FACTOR-wh.diff deleted file mode 100644 index eebd0f1685..0000000000 --- a/packages/audio/pulseaudio/patches/0028-udev-Use-SOUND_CLASS-instead-of-SOUND_FORM_FACTOR-wh.diff +++ /dev/null @@ -1,29 +0,0 @@ -From 8c7148a4eaecd687a004b0611748452fd4b41e92 Mon Sep 17 00:00:00 2001 -From: Daniel T Chen -Date: Mon, 4 Jan 2010 21:53:36 -0500 -Subject: [PATCH 28/62] udev: Use SOUND_CLASS instead of SOUND_FORM_FACTOR when checking for modem - -The fact whether an ALSA card is a modem is stored in the SOUND_CLASS, -not the SOUND_FORM_FACTOR property. So read it from there. - -Patch from Whoopie. ---- - src/modules/module-udev-detect.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/src/modules/module-udev-detect.c b/src/modules/module-udev-detect.c -index b8568b2..3cf3e58 100644 ---- a/src/modules/module-udev-detect.c -+++ b/src/modules/module-udev-detect.c -@@ -426,7 +426,7 @@ static void process_device(struct userdata *u, struct udev_device *dev) { - return; - } - -- if ((ff = udev_device_get_property_value(dev, "SOUND_FORM_FACTOR")) && -+ if ((ff = udev_device_get_property_value(dev, "SOUND_CLASS")) && - pa_streq(ff, "modem")) { - pa_log_debug("Ignoring %s, because it is a modem.", udev_device_get_devpath(dev)); - return; --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0029-More-src-pulsecore-cpu-arm.c-FTBFS-fixes.diff b/packages/audio/pulseaudio/patches/0029-More-src-pulsecore-cpu-arm.c-FTBFS-fixes.diff deleted file mode 100644 index d6edbf8ebc..0000000000 --- a/packages/audio/pulseaudio/patches/0029-More-src-pulsecore-cpu-arm.c-FTBFS-fixes.diff +++ /dev/null @@ -1,39 +0,0 @@ -From 09c416e11fe4f53c468f68ad0a67f4696241050a Mon Sep 17 00:00:00 2001 -From: Daniel T Chen -Date: Wed, 16 Dec 2009 23:55:05 -0500 -Subject: [PATCH 29/62] More src/pulsecore/cpu-arm.c FTBFS fixes - -Fix missing argument to pa_read(), and be consistent with declaration of -state variable in pa_cpu_init_arm(). - -Signed-off-by: Daniel T Chen ---- - src/pulsecore/cpu-arm.c | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/pulsecore/cpu-arm.c b/src/pulsecore/cpu-arm.c -index 453b784..61299cc 100644 ---- a/src/pulsecore/cpu-arm.c -+++ b/src/pulsecore/cpu-arm.c -@@ -67,7 +67,7 @@ static char *get_cpuinfo(void) { - return NULL; - } - -- if ((n = pa_read(fd, cpuinfo, MAX_BUFFER-1)) < 0) { -+ if ((n = pa_read(fd, cpuinfo, MAX_BUFFER-1, NULL)) < 0) { - pa_xfree(cpuinfo); - pa_close(fd); - return NULL; -@@ -105,7 +105,8 @@ void pa_cpu_init_arm (void) { - } - /* get the CPU features */ - if ((line = get_cpuinfo_line (cpuinfo, "Features"))) { -- char *state = NULL, *current; -+ const char *state = NULL; -+ char *current; - - while ((current = pa_split_spaces (line, &state))) { - if (!strcmp (current, "vfp")) --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0030-Fix-the-following-warnings-which-now-cause-buildd-fa.diff b/packages/audio/pulseaudio/patches/0030-Fix-the-following-warnings-which-now-cause-buildd-fa.diff deleted file mode 100644 index c9f82bfdc3..0000000000 --- a/packages/audio/pulseaudio/patches/0030-Fix-the-following-warnings-which-now-cause-buildd-fa.diff +++ /dev/null @@ -1,33 +0,0 @@ -From fd5c802ecb5ae5ed9b294422410761126a37d1b3 Mon Sep 17 00:00:00 2001 -From: Daniel T Chen -Date: Wed, 16 Dec 2009 22:53:18 -0500 -Subject: [PATCH 30/62] Fix the following warnings (which now cause buildd failures in Ubuntu 10.04): - -pulsecore/cpu-arm.c: In function 'get_cpuinfo': -pulsecore/cpu-arm.c:70: warning: implicit declaration of function 'pa_read' [-Wimplicit-function-declaration] -pulsecore/cpu-arm.c:72: warning: implicit declaration of function 'pa_close' [-Wimplicit-function-declaration] -pulsecore/cpu-arm.c: In function 'pa_cpu_init_arm': -pulsecore/cpu-arm.c:110: warning: implicit declaration of function 'pa_split_spaces' [-Wimplicit-function-declaration] -pulsecore/cpu-arm.c:110: warning: assignment makes pointer from integer without a cast -Function `pa_split_spaces' implicitly converted to pointer at pulsecore/cpu-arm.c:110 - -Signed-off-by: Daniel T Chen ---- - src/pulsecore/cpu-arm.c | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/src/pulsecore/cpu-arm.c b/src/pulsecore/cpu-arm.c -index 61299cc..56d0bbc 100644 ---- a/src/pulsecore/cpu-arm.c -+++ b/src/pulsecore/cpu-arm.c -@@ -30,6 +30,7 @@ - #include - - #include -+#include - #include - - #include "cpu-arm.h" --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0031-libpulse-Store-pa_stream-pointers-to-hashmaps-instea.diff b/packages/audio/pulseaudio/patches/0031-libpulse-Store-pa_stream-pointers-to-hashmaps-instea.diff deleted file mode 100644 index 38ebc7c6b0..0000000000 --- a/packages/audio/pulseaudio/patches/0031-libpulse-Store-pa_stream-pointers-to-hashmaps-instea.diff +++ /dev/null @@ -1,180 +0,0 @@ -From 52c66b47664d47154b2c8368e32beef27d4b2d03 Mon Sep 17 00:00:00 2001 -From: Tanu Kaskinen -Date: Thu, 3 Dec 2009 13:22:05 +0200 -Subject: [PATCH 31/62] libpulse: Store pa_stream pointers to hashmaps instead of dynarrays. - -Since the stream identifiers (channels) are monotonically growing integer, it -isn't a good idea to use them as index to a dynamic array, because the array -will grow all the time. This is not a problem with client connections that -don't create many streams, but, for example, long-running clients that use -libcanberra for playing event sounds, this means that the client connection -effectively leaks memory. ---- - src/pulse/context.c | 12 ++++++------ - src/pulse/internal.h | 3 +-- - src/pulse/stream.c | 20 ++++++++++---------- - 3 files changed, 17 insertions(+), 18 deletions(-) - -diff --git a/src/pulse/context.c b/src/pulse/context.c -index c83230d..91f4817 100644 ---- a/src/pulse/context.c -+++ b/src/pulse/context.c -@@ -63,7 +63,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include -@@ -157,8 +157,8 @@ pa_context *pa_context_new_with_proplist(pa_mainloop_api *mainloop, const char * - c->system_bus = c->session_bus = NULL; - #endif - c->mainloop = mainloop; -- c->playback_streams = pa_dynarray_new(); -- c->record_streams = pa_dynarray_new(); -+ c->playback_streams = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func); -+ c->record_streams = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func); - c->client_index = PA_INVALID_INDEX; - c->use_rtclock = pa_mainloop_is_our_api(mainloop); - -@@ -252,9 +252,9 @@ static void context_free(pa_context *c) { - #endif - - if (c->record_streams) -- pa_dynarray_free(c->record_streams, NULL, NULL); -+ pa_hashmap_free(c->record_streams, NULL, NULL); - if (c->playback_streams) -- pa_dynarray_free(c->playback_streams, NULL, NULL); -+ pa_hashmap_free(c->playback_streams, NULL, NULL); - - if (c->mempool) - pa_mempool_free(c->mempool); -@@ -361,7 +361,7 @@ static void pstream_memblock_callback(pa_pstream *p, uint32_t channel, int64_t o - - pa_context_ref(c); - -- if ((s = pa_dynarray_get(c->record_streams, channel))) { -+ if ((s = pa_hashmap_get(c->record_streams, PA_UINT32_TO_PTR(channel)))) { - - if (chunk->memblock) { - pa_memblockq_seek(s->record_memblockq, offset, seek, TRUE); -diff --git a/src/pulse/internal.h b/src/pulse/internal.h -index c3ebf74..ab702b9 100644 ---- a/src/pulse/internal.h -+++ b/src/pulse/internal.h -@@ -34,7 +34,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -66,7 +65,7 @@ struct pa_context { - pa_pstream *pstream; - pa_pdispatch *pdispatch; - -- pa_dynarray *record_streams, *playback_streams; -+ pa_hashmap *record_streams, *playback_streams; - PA_LLIST_HEAD(pa_stream, streams); - PA_LLIST_HEAD(pa_operation, operations); - -diff --git a/src/pulse/stream.c b/src/pulse/stream.c -index daeb53a..ab8f8f4 100644 ---- a/src/pulse/stream.c -+++ b/src/pulse/stream.c -@@ -201,7 +201,7 @@ static void stream_unlink(pa_stream *s) { - pa_pdispatch_unregister_reply(s->context->pdispatch, s); - - if (s->channel_valid) { -- pa_dynarray_put((s->direction == PA_STREAM_PLAYBACK) ? s->context->playback_streams : s->context->record_streams, s->channel, NULL); -+ pa_hashmap_remove((s->direction == PA_STREAM_PLAYBACK) ? s->context->playback_streams : s->context->record_streams, PA_UINT32_TO_PTR(s->channel)); - s->channel = 0; - s->channel_valid = FALSE; - } -@@ -356,7 +356,7 @@ void pa_command_stream_killed(pa_pdispatch *pd, uint32_t command, uint32_t tag, - goto finish; - } - -- if (!(s = pa_dynarray_get(command == PA_COMMAND_PLAYBACK_STREAM_KILLED ? c->playback_streams : c->record_streams, channel))) -+ if (!(s = pa_hashmap_get(command == PA_COMMAND_PLAYBACK_STREAM_KILLED ? c->playback_streams : c->record_streams, PA_UINT32_TO_PTR(channel)))) - goto finish; - - if (s->state != PA_STREAM_READY) -@@ -476,7 +476,7 @@ void pa_command_stream_moved(pa_pdispatch *pd, uint32_t command, uint32_t tag, p - goto finish; - } - -- if (!(s = pa_dynarray_get(command == PA_COMMAND_PLAYBACK_STREAM_MOVED ? c->playback_streams : c->record_streams, channel))) -+ if (!(s = pa_hashmap_get(command == PA_COMMAND_PLAYBACK_STREAM_MOVED ? c->playback_streams : c->record_streams, PA_UINT32_TO_PTR(channel)))) - goto finish; - - if (s->state != PA_STREAM_READY) -@@ -559,7 +559,7 @@ void pa_command_stream_buffer_attr(pa_pdispatch *pd, uint32_t command, uint32_t - goto finish; - } - -- if (!(s = pa_dynarray_get(command == PA_COMMAND_PLAYBACK_BUFFER_ATTR_CHANGED ? c->playback_streams : c->record_streams, channel))) -+ if (!(s = pa_hashmap_get(command == PA_COMMAND_PLAYBACK_BUFFER_ATTR_CHANGED ? c->playback_streams : c->record_streams, PA_UINT32_TO_PTR(channel)))) - goto finish; - - if (s->state != PA_STREAM_READY) -@@ -611,7 +611,7 @@ void pa_command_stream_suspended(pa_pdispatch *pd, uint32_t command, uint32_t ta - goto finish; - } - -- if (!(s = pa_dynarray_get(command == PA_COMMAND_PLAYBACK_STREAM_SUSPENDED ? c->playback_streams : c->record_streams, channel))) -+ if (!(s = pa_hashmap_get(command == PA_COMMAND_PLAYBACK_STREAM_SUSPENDED ? c->playback_streams : c->record_streams, PA_UINT32_TO_PTR(channel)))) - goto finish; - - if (s->state != PA_STREAM_READY) -@@ -653,7 +653,7 @@ void pa_command_stream_started(pa_pdispatch *pd, uint32_t command, uint32_t tag, - goto finish; - } - -- if (!(s = pa_dynarray_get(c->playback_streams, channel))) -+ if (!(s = pa_hashmap_get(c->playback_streams, PA_UINT32_TO_PTR(channel)))) - goto finish; - - if (s->state != PA_STREAM_READY) -@@ -699,7 +699,7 @@ void pa_command_stream_event(pa_pdispatch *pd, uint32_t command, uint32_t tag, p - goto finish; - } - -- if (!(s = pa_dynarray_get(command == PA_COMMAND_PLAYBACK_STREAM_EVENT ? c->playback_streams : c->record_streams, channel))) -+ if (!(s = pa_hashmap_get(command == PA_COMMAND_PLAYBACK_STREAM_EVENT ? c->playback_streams : c->record_streams, PA_UINT32_TO_PTR(channel)))) - goto finish; - - if (s->state != PA_STREAM_READY) -@@ -735,7 +735,7 @@ void pa_command_request(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tag - goto finish; - } - -- if (!(s = pa_dynarray_get(c->playback_streams, channel))) -+ if (!(s = pa_hashmap_get(c->playback_streams, PA_UINT32_TO_PTR(channel)))) - goto finish; - - if (s->state != PA_STREAM_READY) -@@ -771,7 +771,7 @@ void pa_command_overflow_or_underflow(pa_pdispatch *pd, uint32_t command, uint32 - goto finish; - } - -- if (!(s = pa_dynarray_get(c->playback_streams, channel))) -+ if (!(s = pa_hashmap_get(c->playback_streams, PA_UINT32_TO_PTR(channel)))) - goto finish; - - if (s->state != PA_STREAM_READY) -@@ -1019,7 +1019,7 @@ void pa_create_stream_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, - } - - s->channel_valid = TRUE; -- pa_dynarray_put((s->direction == PA_STREAM_RECORD) ? s->context->record_streams : s->context->playback_streams, s->channel, s); -+ pa_hashmap_put((s->direction == PA_STREAM_RECORD) ? s->context->record_streams : s->context->playback_streams, PA_UINT32_TO_PTR(s->channel), s); - - create_stream_complete(s); - --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0032-native-rework-handling-of-seeks-that-depend-on-varia.diff b/packages/audio/pulseaudio/patches/0032-native-rework-handling-of-seeks-that-depend-on-varia.diff deleted file mode 100644 index 1a85b5c11a..0000000000 --- a/packages/audio/pulseaudio/patches/0032-native-rework-handling-of-seeks-that-depend-on-varia.diff +++ /dev/null @@ -1,166 +0,0 @@ -From 84782f24c5f43456430c796bd12f9face24f0573 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 18 Jan 2010 01:33:04 +0100 -Subject: [PATCH 32/62] native: rework handling of seeks that depend on variables the client does not know anything about - -All seeks/flushes that depend on the playback buffer read pointer cannot -be accounted for properly in the client since it does not know the -actual read pointer. Due to that the clients do not account for it at -all. We need do the same on the server side. And we did, but a little -bit too extreme. While we properly have not applied the changes to the -"request" counter we still do have to apply it to the "missing" counter. -This patch fixes that. ---- - src/modules/module-combine.c | 4 ++-- - src/modules/module-loopback.c | 4 ++-- - src/pulse/stream.c | 5 +++++ - src/pulsecore/memblockq.c | 6 ++++-- - src/pulsecore/memblockq.h | 2 +- - src/pulsecore/protocol-native.c | 6 +++++- - src/pulsecore/sink-input.c | 2 +- - 7 files changed, 20 insertions(+), 9 deletions(-) - -diff --git a/src/modules/module-combine.c b/src/modules/module-combine.c -index 62e6267..cffb901 100644 ---- a/src/modules/module-combine.c -+++ b/src/modules/module-combine.c -@@ -562,7 +562,7 @@ static int sink_input_process_msg(pa_msgobject *obj, int code, void *data, int64 - if (PA_SINK_IS_OPENED(o->sink_input->sink->thread_info.state)) - pa_memblockq_push_align(o->memblockq, chunk); - else -- pa_memblockq_flush_write(o->memblockq); -+ pa_memblockq_flush_write(o->memblockq, TRUE); - - return 0; - } -@@ -982,7 +982,7 @@ static void output_disable(struct output *o) { - o->sink_input = NULL; - - /* Finally, drop all queued data */ -- pa_memblockq_flush_write(o->memblockq); -+ pa_memblockq_flush_write(o->memblockq, TRUE); - pa_asyncmsgq_flush(o->inq, FALSE); - pa_asyncmsgq_flush(o->outq, FALSE); - } -diff --git a/src/modules/module-loopback.c b/src/modules/module-loopback.c -index bb0182b..15ef96e 100644 ---- a/src/modules/module-loopback.c -+++ b/src/modules/module-loopback.c -@@ -430,7 +430,7 @@ static int sink_input_process_msg_cb(pa_msgobject *obj, int code, void *data, in - if (PA_SINK_IS_OPENED(u->sink_input->sink->thread_info.state)) - pa_memblockq_push_align(u->memblockq, chunk); - else -- pa_memblockq_flush_write(u->memblockq); -+ pa_memblockq_flush_write(u->memblockq, TRUE); - - update_min_memblockq_length(u); - -@@ -457,7 +457,7 @@ static int sink_input_process_msg_cb(pa_msgobject *obj, int code, void *data, in - if (PA_SINK_IS_OPENED(u->sink_input->sink->thread_info.state)) - pa_memblockq_seek(u->memblockq, -offset, PA_SEEK_RELATIVE, TRUE); - else -- pa_memblockq_flush_write(u->memblockq); -+ pa_memblockq_flush_write(u->memblockq, TRUE); - - u->recv_counter -= offset; - -diff --git a/src/pulse/stream.c b/src/pulse/stream.c -index ab8f8f4..8da40ec 100644 ---- a/src/pulse/stream.c -+++ b/src/pulse/stream.c -@@ -2146,6 +2146,11 @@ pa_operation* pa_stream_flush(pa_stream *s, pa_stream_success_cb_t cb, void *use - * index, but the read index might jump. */ - invalidate_indexes(s, TRUE, FALSE); - -+ /* Note that we do not update requested_bytes here. This is -+ * because we cannot really know how data actually was dropped -+ * from the write index due to this. This 'error' will be applied -+ * by both client and server and hence we should be fine. */ -+ - return o; - } - -diff --git a/src/pulsecore/memblockq.c b/src/pulsecore/memblockq.c -index 4641801..2b063fa 100644 ---- a/src/pulsecore/memblockq.c -+++ b/src/pulsecore/memblockq.c -@@ -254,6 +254,8 @@ static void write_index_changed(pa_memblockq *bq, int64_t old_write_index, pa_bo - - if (account) - bq->requested -= delta; -+ else -+ bq->missing -= delta; - - /* pa_log("pushed/seeked %lli: requested counter at %lli, account=%i", (long long) delta, (long long) bq->requested, account); */ - } -@@ -642,7 +644,7 @@ void pa_memblockq_seek(pa_memblockq *bq, int64_t offset, pa_seek_mode_t seek, pa - write_index_changed(bq, old, account); - } - --void pa_memblockq_flush_write(pa_memblockq *bq) { -+void pa_memblockq_flush_write(pa_memblockq *bq, pa_bool_t account) { - int64_t old; - pa_assert(bq); - -@@ -652,7 +654,7 @@ void pa_memblockq_flush_write(pa_memblockq *bq) { - bq->write_index = bq->read_index; - - pa_memblockq_prebuf_force(bq); -- write_index_changed(bq, old, TRUE); -+ write_index_changed(bq, old, account); - } - - void pa_memblockq_flush_read(pa_memblockq *bq) { -diff --git a/src/pulsecore/memblockq.h b/src/pulsecore/memblockq.h -index 587c364..6132f31 100644 ---- a/src/pulsecore/memblockq.h -+++ b/src/pulsecore/memblockq.h -@@ -118,7 +118,7 @@ size_t pa_memblockq_pop_missing(pa_memblockq *bq); - int pa_memblockq_splice(pa_memblockq *bq, pa_memblockq *source); - - /* Set the queue to silence, set write index to read index */ --void pa_memblockq_flush_write(pa_memblockq *bq); -+void pa_memblockq_flush_write(pa_memblockq *bq, pa_bool_t account); - - /* Set the queue to silence, set write read index to write index*/ - void pa_memblockq_flush_read(pa_memblockq *bq); -diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c -index b7b3f59..f80b0c2 100644 ---- a/src/pulsecore/protocol-native.c -+++ b/src/pulsecore/protocol-native.c -@@ -1325,6 +1325,10 @@ static void handle_seek(playback_stream *s, int64_t indexw) { - playback_stream_request_bytes(s); - } - -+static void flush_write_no_account(pa_memblockq *q) { -+ pa_memblockq_flush_write(q, FALSE); -+} -+ - /* Called from thread context */ - static int sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offset, pa_memchunk *chunk) { - pa_sink_input *i = PA_SINK_INPUT(o); -@@ -1386,7 +1390,7 @@ static int sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int - - switch (code) { - case SINK_INPUT_MESSAGE_FLUSH: -- func = pa_memblockq_flush_write; -+ func = flush_write_no_account; - break; - - case SINK_INPUT_MESSAGE_PREBUF_FORCE: -diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c -index aa84ccb..7acb25f 100644 ---- a/src/pulsecore/sink-input.c -+++ b/src/pulsecore/sink-input.c -@@ -801,7 +801,7 @@ void pa_sink_input_process_rewind(pa_sink_input *i, size_t nbytes /* in sink sam - /* We were asked to drop all buffered data, and rerequest new - * data from implementor the next time push() is called */ - -- pa_memblockq_flush_write(i->thread_info.render_memblockq); -+ pa_memblockq_flush_write(i->thread_info.render_memblockq, TRUE); - - } else if (i->thread_info.rewrite_nbytes > 0) { - size_t max_rewrite, amount; --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0033-core-Fix-macro-typo-PA_SINK_IS_LINKED-PA_SINK_INPUT_.diff b/packages/audio/pulseaudio/patches/0033-core-Fix-macro-typo-PA_SINK_IS_LINKED-PA_SINK_INPUT_.diff deleted file mode 100644 index 552f7f5b4a..0000000000 --- a/packages/audio/pulseaudio/patches/0033-core-Fix-macro-typo-PA_SINK_IS_LINKED-PA_SINK_INPUT_.diff +++ /dev/null @@ -1,25 +0,0 @@ -From a631beeafb4729f8bed1c538846d0bb142cee7bf Mon Sep 17 00:00:00 2001 -From: Colin Guthrie -Date: Tue, 9 Feb 2010 21:37:32 +0000 -Subject: [PATCH 33/62] core: Fix macro typo - PA_SINK_IS_LINKED -> PA_SINK_INPUT_IS_LINKED - ---- - src/pulsecore/sink-input.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c -index 7acb25f..3c957f1 100644 ---- a/src/pulsecore/sink-input.c -+++ b/src/pulsecore/sink-input.c -@@ -1086,7 +1086,7 @@ void pa_sink_input_update_proplist(pa_sink_input *i, pa_update_mode_t mode, pa_p - if (p) - pa_proplist_update(i->proplist, mode, p); - -- if (PA_SINK_IS_LINKED(i->state)) { -+ if (PA_SINK_INPUT_IS_LINKED(i->state)) { - pa_hook_fire(&i->core->hooks[PA_CORE_HOOK_SINK_INPUT_PROPLIST_CHANGED], i); - pa_subscription_post(i->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, i->index); - } --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0034-alsa-cover-Desktop-Speaker-mixer-elements.diff b/packages/audio/pulseaudio/patches/0034-alsa-cover-Desktop-Speaker-mixer-elements.diff deleted file mode 100644 index 54d6cd9a39..0000000000 --- a/packages/audio/pulseaudio/patches/0034-alsa-cover-Desktop-Speaker-mixer-elements.diff +++ /dev/null @@ -1,292 +0,0 @@ -From e8cb96c0103d5bd23fe945afdc658a5f60b70a9d Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 15 Feb 2010 22:23:39 +0100 -Subject: [PATCH 34/62] alsa: cover "Desktop Speaker" mixer elements - -As exposed by really old Microsoft USB sound systems ---- - src/modules/alsa/alsa-mixer.c | 3 +- - .../mixer/paths/analog-output-desktop-speaker.conf | 98 ++++++++++++++++++++ - .../mixer/paths/analog-output-headphones-2.conf | 4 + - .../alsa/mixer/paths/analog-output-headphones.conf | 4 + - .../mixer/paths/analog-output-lfe-on-mono.conf | 4 + - .../alsa/mixer/paths/analog-output-mono.conf | 4 + - .../alsa/mixer/paths/analog-output-speaker.conf | 4 + - src/modules/alsa/mixer/paths/analog-output.conf | 4 + - src/modules/alsa/mixer/profile-sets/default.conf | 14 ++-- - 9 files changed, 131 insertions(+), 8 deletions(-) - create mode 100644 src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf - -diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c -index 8bbd1f5..cb814af 100644 ---- a/src/modules/alsa/alsa-mixer.c -+++ b/src/modules/alsa/alsa-mixer.c -@@ -1784,7 +1784,8 @@ static int path_verify(pa_alsa_path *p) { - { "analog-output-lfe-on-mono", N_("Analog Output (LFE)") }, - { "analog-output-mono", N_("Analog Mono Output") }, - { "analog-output-headphones-2", N_("Analog Headphones 2") }, -- { "analog-output-speaker", N_("Analog Speaker") } -+ { "analog-output-speaker", N_("Analog Speakers") } -+ { "analog-output-desktop-speaker", N_("Analog Speakers 2") } - }; - - pa_alsa_element *e; -diff --git a/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf -new file mode 100644 -index 0000000..9f18b25 ---- /dev/null -+++ b/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf -@@ -0,0 +1,98 @@ -+# This file is part of PulseAudio. -+# -+# PulseAudio is free software; you can redistribute it and/or modify -+# it under the terms of the GNU Lesser General Public License as -+# published by the Free Software Foundation; either version 2.1 of the -+# License, or (at your option) any later version. -+# -+# PulseAudio is distributed in the hope that it will be useful, but -+# WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+# General Public License for more details. -+# -+# You should have received a copy of the GNU Lesser General Public License -+# along with PulseAudio; if not, write to the Free Software Foundation, -+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. -+ -+; Path for mixers that have a 'Desktop Speaker' control -+; -+; See analog-output.conf.common for an explanation on the directives -+ -+[General] -+priority = 100 -+ -+[Element Hardware Master] -+switch = mute -+volume = merge -+override-map.1 = all -+override-map.2 = all-left,all-right -+ -+[Element Master] -+switch = mute -+volume = merge -+override-map.1 = all -+override-map.2 = all-left,all-right -+ -+[Element Master Mono] -+switch = off -+volume = off -+ -+; This profile path is intended to control the desktop speaker, not -+; the headphones. But it should not hurt if we leave the headphone -+; jack enabled nonetheless. -+[Element Headphone] -+switch = mute -+volume = zero -+ -+[Element Headphone2] -+switch = mute -+volume = zero -+ -+[Element Speaker] -+switch = off -+volume = off -+ -+[Element Desktop Speaker] -+required = any -+switch = mute -+volume = merge -+override-map.1 = all -+override-map.2 = all-left,all-right -+ -+[Element Front] -+switch = mute -+volume = merge -+override-map.1 = all-front -+override-map.2 = front-left,front-right -+ -+[Element Rear] -+switch = mute -+volume = merge -+override-map.1 = all-rear -+override-map.2 = rear-left,rear-right -+ -+[Element Surround] -+switch = mute -+volume = merge -+override-map.1 = all-rear -+override-map.2 = rear-left,rear-right -+ -+[Element Side] -+switch = mute -+volume = merge -+override-map.1 = all-side -+override-map.2 = side-left,side-right -+ -+[Element Center] -+switch = mute -+volume = merge -+override-map.1 = all-center -+override-map.2 = all-center,all-center -+ -+[Element LFE] -+switch = mute -+volume = merge -+override-map.1 = lfe -+override-map.2 = lfe,lfe -+ -+.include analog-output.conf.common -diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf b/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf -index f2fd31c..580c798 100644 ---- a/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf -+++ b/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf -@@ -55,6 +55,10 @@ override-map.2 = all-left,all-right - switch = off - volume = off - -+[Element Desktop Speaker] -+switch = off -+volume = off -+ - [Element Front] - switch = off - volume = off -diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones.conf b/src/modules/alsa/mixer/paths/analog-output-headphones.conf -index 2131cfe..79ebc7f 100644 ---- a/src/modules/alsa/mixer/paths/analog-output-headphones.conf -+++ b/src/modules/alsa/mixer/paths/analog-output-headphones.conf -@@ -55,6 +55,10 @@ volume = zero - switch = off - volume = off - -+[Element Desktop Speaker] -+switch = off -+volume = off -+ - [Element Front] - switch = off - volume = off -diff --git a/src/modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf b/src/modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf -index 0a43e27..67ee32f 100644 ---- a/src/modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf -+++ b/src/modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf -@@ -58,6 +58,10 @@ volume = merge - override-map.1 = all - override-map.2 = all-left,all-right - -+[Element Desktop Speaker] -+switch = off -+volume = off -+ - [Element Front] - switch = off - volume = off -diff --git a/src/modules/alsa/mixer/paths/analog-output-mono.conf b/src/modules/alsa/mixer/paths/analog-output-mono.conf -index 542edc4..13a2d6a 100644 ---- a/src/modules/alsa/mixer/paths/analog-output-mono.conf -+++ b/src/modules/alsa/mixer/paths/analog-output-mono.conf -@@ -55,6 +55,10 @@ volume = merge - override-map.1 = all - override-map.2 = all-left,all-right - -+[Element Desktop Speaker] -+switch = off -+volume = off -+ - [Element Front] - switch = off - volume = off -diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-speaker.conf -index aea7853..b133a2e 100644 ---- a/src/modules/alsa/mixer/paths/analog-output-speaker.conf -+++ b/src/modules/alsa/mixer/paths/analog-output-speaker.conf -@@ -55,6 +55,10 @@ volume = merge - override-map.1 = all - override-map.2 = all-left,all-right - -+[Element Desktop Speaker] -+switch = off -+volume = off -+ - [Element Front] - switch = mute - volume = merge -diff --git a/src/modules/alsa/mixer/paths/analog-output.conf b/src/modules/alsa/mixer/paths/analog-output.conf -index d7c1223..50fc88e 100644 ---- a/src/modules/alsa/mixer/paths/analog-output.conf -+++ b/src/modules/alsa/mixer/paths/analog-output.conf -@@ -53,6 +53,10 @@ volume = zero - switch = mute - volume = off - -+[Element Desktop Speaker] -+switch = mute -+volume = off -+ - [Element Front] - switch = mute - volume = merge -diff --git a/src/modules/alsa/mixer/profile-sets/default.conf b/src/modules/alsa/mixer/profile-sets/default.conf -index 046938f..5d352f1 100644 ---- a/src/modules/alsa/mixer/profile-sets/default.conf -+++ b/src/modules/alsa/mixer/profile-sets/default.conf -@@ -62,42 +62,42 @@ auto-profiles = yes - [Mapping analog-mono] - device-strings = hw:%f - channel-map = mono --paths-output = analog-output analog-output-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono analog-output-lfe-on-mono -+paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono analog-output-lfe-on-mono - paths-input = analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line - priority = 1 - - [Mapping analog-stereo] - device-strings = front:%f hw:%f - channel-map = left,right --paths-output = analog-output analog-output-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono analog-output-lfe-on-mono -+paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono analog-output-lfe-on-mono - paths-input = analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line - priority = 10 - - [Mapping analog-surround-40] - device-strings = surround40:%f - channel-map = front-left,front-right,rear-left,rear-right --paths-output = analog-output analog-output-speaker analog-output-lfe-on-mono -+paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-lfe-on-mono - priority = 7 - direction = output - - [Mapping analog-surround-41] - device-strings = surround41:%f - channel-map = front-left,front-right,rear-left,rear-right,lfe --paths-output = analog-output analog-output-speaker analog-output-lfe-on-mono -+paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-lfe-on-mono - priority = 8 - direction = output - - [Mapping analog-surround-50] - device-strings = surround50:%f - channel-map = front-left,front-right,rear-left,rear-right,front-center --paths-output = analog-output analog-output-speaker analog-output-lfe-on-mono -+paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-lfe-on-mono - priority = 7 - direction = output - - [Mapping analog-surround-51] - device-strings = surround51:%f - channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe --paths-output = analog-output analog-output-speaker analog-output-lfe-on-mono -+paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-lfe-on-mono - priority = 8 - direction = output - -@@ -105,7 +105,7 @@ direction = output - device-strings = surround71:%f - channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right - description = Analog Surround 7.1 --paths-output = analog-output analog-output-speaker analog-output-lfe-on-mono -+paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-lfe-on-mono - priority = 7 - direction = output - --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0035-alsa-cover-Shared-Mic-Line-in-Analog-Source.diff b/packages/audio/pulseaudio/patches/0035-alsa-cover-Shared-Mic-Line-in-Analog-Source.diff deleted file mode 100644 index 08b57de3e0..0000000000 --- a/packages/audio/pulseaudio/patches/0035-alsa-cover-Shared-Mic-Line-in-Analog-Source.diff +++ /dev/null @@ -1,49 +0,0 @@ -From 7d6bab0d003386baba3ff3fad4cc3caa5839b361 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 15 Feb 2010 23:39:12 +0100 -Subject: [PATCH 35/62] alsa: cover 'Shared Mic/Line in', 'Analog Source' - -https://bugzilla.redhat.com/show_bug.cgi?id=558638 ---- - .../alsa/mixer/paths/analog-input.conf.common | 25 ++++++++++++++++++++ - 1 files changed, 25 insertions(+), 0 deletions(-) - -diff --git a/src/modules/alsa/mixer/paths/analog-input.conf.common b/src/modules/alsa/mixer/paths/analog-input.conf.common -index fbdc8fb..66c3dda 100644 ---- a/src/modules/alsa/mixer/paths/analog-input.conf.common -+++ b/src/modules/alsa/mixer/paths/analog-input.conf.common -@@ -277,6 +277,31 @@ name = input-microphone - [Option Digital Input Source:Digital Mic 2] - name = input-microphone - -+;;; 'Analog Source' -+ -+[Element Analog Source] -+enumeration = select -+ -+[Option Analog Source:Mic] -+name = input-microphone -+ -+[Option Analog Source:Line in] -+name = input-linein -+ -+[Option Analog Source:Aux] -+name = input -+ -+;;; 'Shared Mic/Line in' -+ -+[Element Shared Mic/Line in] -+enumeration = select -+ -+[Option Shared Mic/Line in:Mic in] -+name = input-microphone -+ -+[Option Shared Mic/Line in:Line in] -+name = input-linein -+ - ;;; Various Boosts - - [Element Capture Boost] --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0036-alsa-cover-Internal-Mic-elements.diff b/packages/audio/pulseaudio/patches/0036-alsa-cover-Internal-Mic-elements.diff deleted file mode 100644 index 3329bd8e6e..0000000000 --- a/packages/audio/pulseaudio/patches/0036-alsa-cover-Internal-Mic-elements.diff +++ /dev/null @@ -1,214 +0,0 @@ -From 0c836aacd8be34bcb5e02581495f7d30a5fbee05 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 16 Feb 2010 00:58:49 +0100 -Subject: [PATCH 36/62] alsa: cover "Internal Mic" elements - -https://bugzilla.redhat.com/show_bug.cgi?id=562216 ---- - src/modules/alsa/mixer/paths/analog-input-aux.conf | 4 + - src/modules/alsa/mixer/paths/analog-input-fm.conf | 4 + - .../mixer/paths/analog-input-internal-mic.conf | 67 ++++++++++++++++++++ - .../alsa/mixer/paths/analog-input-linein.conf | 4 + - .../alsa/mixer/paths/analog-input-mic-line.conf | 4 + - src/modules/alsa/mixer/paths/analog-input-mic.conf | 4 + - .../alsa/mixer/paths/analog-input-tvtuner.conf | 4 + - .../alsa/mixer/paths/analog-input-video.conf | 4 + - src/modules/alsa/mixer/paths/analog-input.conf | 3 + - 9 files changed, 98 insertions(+), 0 deletions(-) - create mode 100644 src/modules/alsa/mixer/paths/analog-input-internal-mic.conf - -diff --git a/src/modules/alsa/mixer/paths/analog-input-aux.conf b/src/modules/alsa/mixer/paths/analog-input-aux.conf -index db78eb4..3a7cb7b 100644 ---- a/src/modules/alsa/mixer/paths/analog-input-aux.conf -+++ b/src/modules/alsa/mixer/paths/analog-input-aux.conf -@@ -32,6 +32,10 @@ override-map.2 = all-left,all-right - switch = off - volume = off - -+[Element Internal Mic] -+switch = off -+volume = off -+ - [Element Line] - switch = off - volume = off -diff --git a/src/modules/alsa/mixer/paths/analog-input-fm.conf b/src/modules/alsa/mixer/paths/analog-input-fm.conf -index baf674a..7f150e3 100644 ---- a/src/modules/alsa/mixer/paths/analog-input-fm.conf -+++ b/src/modules/alsa/mixer/paths/analog-input-fm.conf -@@ -32,6 +32,10 @@ override-map.2 = all-left,all-right - switch = off - volume = off - -+[Element Internal Mic] -+switch = off -+volume = off -+ - [Element Line] - switch = off - volume = off -diff --git a/src/modules/alsa/mixer/paths/analog-input-internal-mic.conf b/src/modules/alsa/mixer/paths/analog-input-internal-mic.conf -new file mode 100644 -index 0000000..70cd512 ---- /dev/null -+++ b/src/modules/alsa/mixer/paths/analog-input-internal-mic.conf -@@ -0,0 +1,67 @@ -+# This file is part of PulseAudio. -+# -+# PulseAudio is free software; you can redistribute it and/or modify -+# it under the terms of the GNU Lesser General Public License as -+# published by the Free Software Foundation; either version 2.1 of the -+# License, or (at your option) any later version. -+# -+# PulseAudio is distributed in the hope that it will be useful, but -+# WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+# General Public License for more details. -+# -+# You should have received a copy of the GNU Lesser General Public License -+# along with PulseAudio; if not, write to the Free Software Foundation, -+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. -+ -+; For devices where a 'Internal Mic' element exists -+; -+; See analog-output.conf.common for an explanation on the directives -+ -+[General] -+priority = 90 -+name = analog-input-microphone -+ -+[Element Capture] -+switch = mute -+volume = merge -+override-map.1 = all -+override-map.2 = all-left,all-right -+ -+[Element Mic] -+switch = off -+volume = off -+ -+[Element Internal Mic] -+required = any -+switch = mute -+volume = merge -+override-map.1 = all -+override-map.2 = all-left,all-right -+ -+[Element Line] -+switch = off -+volume = off -+ -+[Element Aux] -+switch = off -+volume = off -+ -+[Element Video] -+switch = off -+volume = off -+ -+[Element Mic/Line] -+switch = off -+volume = off -+ -+[Element TV Tuner] -+switch = off -+volume = off -+ -+[Element FM] -+switch = off -+volume = off -+ -+.include analog-input.conf.common -+.include analog-input-mic.conf.common -diff --git a/src/modules/alsa/mixer/paths/analog-input-linein.conf b/src/modules/alsa/mixer/paths/analog-input-linein.conf -index 4be5722..57568cc 100644 ---- a/src/modules/alsa/mixer/paths/analog-input-linein.conf -+++ b/src/modules/alsa/mixer/paths/analog-input-linein.conf -@@ -31,6 +31,10 @@ override-map.2 = all-left,all-right - switch = off - volume = off - -+[Element Internal Mic] -+switch = off -+volume = off -+ - [Element Line] - required = any - switch = mute -diff --git a/src/modules/alsa/mixer/paths/analog-input-mic-line.conf b/src/modules/alsa/mixer/paths/analog-input-mic-line.conf -index f7f3085..fa680aa 100644 ---- a/src/modules/alsa/mixer/paths/analog-input-mic-line.conf -+++ b/src/modules/alsa/mixer/paths/analog-input-mic-line.conf -@@ -32,6 +32,10 @@ override-map.2 = all-left,all-right - switch = off - volume = off - -+[Element Internal Mic] -+switch = off -+volume = off -+ - [Element Line] - switch = off - volume = off -diff --git a/src/modules/alsa/mixer/paths/analog-input-mic.conf b/src/modules/alsa/mixer/paths/analog-input-mic.conf -index 2a36f2f..9b8b75a 100644 ---- a/src/modules/alsa/mixer/paths/analog-input-mic.conf -+++ b/src/modules/alsa/mixer/paths/analog-input-mic.conf -@@ -35,6 +35,10 @@ volume = merge - override-map.1 = all - override-map.2 = all-left,all-right - -+[Element Internal Mic] -+switch = off -+volume = off -+ - [Element Line] - switch = off - volume = off -diff --git a/src/modules/alsa/mixer/paths/analog-input-tvtuner.conf b/src/modules/alsa/mixer/paths/analog-input-tvtuner.conf -index 8531ec7..fae3ce8 100644 ---- a/src/modules/alsa/mixer/paths/analog-input-tvtuner.conf -+++ b/src/modules/alsa/mixer/paths/analog-input-tvtuner.conf -@@ -32,6 +32,10 @@ override-map.2 = all-left,all-right - switch = off - volume = off - -+[Element Internal Mic] -+switch = off -+volume = off -+ - [Element Line] - switch = off - volume = off -diff --git a/src/modules/alsa/mixer/paths/analog-input-video.conf b/src/modules/alsa/mixer/paths/analog-input-video.conf -index 74c76f0..19f1809 100644 ---- a/src/modules/alsa/mixer/paths/analog-input-video.conf -+++ b/src/modules/alsa/mixer/paths/analog-input-video.conf -@@ -31,6 +31,10 @@ override-map.2 = all-left,all-right - switch = off - volume = off - -+[Element Internal Mic] -+switch = off -+volume = off -+ - [Element Line] - switch = off - volume = off -diff --git a/src/modules/alsa/mixer/paths/analog-input.conf b/src/modules/alsa/mixer/paths/analog-input.conf -index 5055f90..3050738 100644 ---- a/src/modules/alsa/mixer/paths/analog-input.conf -+++ b/src/modules/alsa/mixer/paths/analog-input.conf -@@ -32,6 +32,9 @@ override-map.2 = all-left,all-right - [Element Mic] - required-absent = any - -+[Element Internal Mic] -+required-absent = any -+ - [Element Line] - required-absent = any - --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0037-alsa-use-default-output-port-names.diff b/packages/audio/pulseaudio/patches/0037-alsa-use-default-output-port-names.diff deleted file mode 100644 index d8b7cd28aa..0000000000 --- a/packages/audio/pulseaudio/patches/0037-alsa-use-default-output-port-names.diff +++ /dev/null @@ -1,82 +0,0 @@ -From 307bd142feef8f42d3adcea354b72f4c076470e4 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 16 Feb 2010 00:59:24 +0100 -Subject: [PATCH 37/62] alsa: use default output port names - -instead of coming up with pointless aliases, reuse the already established -names, for second headphones, and second speakers. ---- - src/modules/alsa/alsa-mixer.c | 2 -- - .../mixer/paths/analog-output-desktop-speaker.conf | 3 ++- - .../mixer/paths/analog-output-headphones-2.conf | 1 + - .../alsa/mixer/paths/analog-output-headphones.conf | 1 + - .../alsa/mixer/paths/analog-output-speaker.conf | 1 + - 5 files changed, 5 insertions(+), 3 deletions(-) - -diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c -index cb814af..93f2ed0 100644 ---- a/src/modules/alsa/alsa-mixer.c -+++ b/src/modules/alsa/alsa-mixer.c -@@ -1783,9 +1783,7 @@ static int path_verify(pa_alsa_path *p) { - { "analog-output-headphones", N_("Analog Headphones") }, - { "analog-output-lfe-on-mono", N_("Analog Output (LFE)") }, - { "analog-output-mono", N_("Analog Mono Output") }, -- { "analog-output-headphones-2", N_("Analog Headphones 2") }, - { "analog-output-speaker", N_("Analog Speakers") } -- { "analog-output-desktop-speaker", N_("Analog Speakers 2") } - }; - - pa_alsa_element *e; -diff --git a/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf -index 9f18b25..dfdecf4 100644 ---- a/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf -+++ b/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf -@@ -19,7 +19,8 @@ - ; See analog-output.conf.common for an explanation on the directives - - [General] --priority = 100 -+priority = 101 -+name = analog-output-speaker - - [Element Hardware Master] - switch = mute -diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf b/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf -index 580c798..e47543f 100644 ---- a/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf -+++ b/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf -@@ -20,6 +20,7 @@ - - [General] - priority = 89 -+name = analog-output-headphones - - [Element Hardware Master] - switch = mute -diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones.conf b/src/modules/alsa/mixer/paths/analog-output-headphones.conf -index 79ebc7f..1d7bb0b 100644 ---- a/src/modules/alsa/mixer/paths/analog-output-headphones.conf -+++ b/src/modules/alsa/mixer/paths/analog-output-headphones.conf -@@ -20,6 +20,7 @@ - - [General] - priority = 90 -+name = analog-output-headphones - - [Element Hardware Master] - switch = mute -diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-speaker.conf -index b133a2e..c6916d6 100644 ---- a/src/modules/alsa/mixer/paths/analog-output-speaker.conf -+++ b/src/modules/alsa/mixer/paths/analog-output-speaker.conf -@@ -20,6 +20,7 @@ - - [General] - priority = 100 -+name = analog-output-speaker - - [Element Hardware Master] - switch = mute --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0038-build-sys-add-gobject-to-build-dependencies.diff b/packages/audio/pulseaudio/patches/0038-build-sys-add-gobject-to-build-dependencies.diff deleted file mode 100644 index c424d2e393..0000000000 --- a/packages/audio/pulseaudio/patches/0038-build-sys-add-gobject-to-build-dependencies.diff +++ /dev/null @@ -1,27 +0,0 @@ -From f9b31fe5443bded4a55b0900f08f04486c3395bd Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 16 Feb 2010 01:43:00 +0100 -Subject: [PATCH 38/62] build-sys: add gobject to build dependencies - -Since we call g_object_unref() we need to link against gobject in -compliance of the new Fedora implicit DSO linking policy. ---- - configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/configure.ac b/configure.ac -index c9ec490..1b80788 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -893,7 +893,7 @@ AC_ARG_ENABLE([gconf], - [gconf=auto]) - - if test "x${gconf}" != xno ; then -- PKG_CHECK_MODULES(GCONF, [ gconf-2.0 >= 2.4.0 ], -+ PKG_CHECK_MODULES(GCONF, [ gconf-2.0 >= 2.4.0 gobject-2.0 ], - HAVE_GCONF=1, - [ - HAVE_GCONF=0 --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0039-padsp-emulate-dev-audio-too.diff b/packages/audio/pulseaudio/patches/0039-padsp-emulate-dev-audio-too.diff deleted file mode 100644 index 4b20ef245e..0000000000 --- a/packages/audio/pulseaudio/patches/0039-padsp-emulate-dev-audio-too.diff +++ /dev/null @@ -1,142 +0,0 @@ -From ff2474e5fc9eaa4c7f687e71a39a5bed4f56c259 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 16 Feb 2010 02:03:45 +0100 -Subject: [PATCH 39/62] padsp: emulate /dev/audio, too - -https://bugzilla.redhat.com/show_bug.cgi?id=561262 ---- - src/utils/padsp.c | 55 +++++++++++++++++++--------------------------------- - 1 files changed, 20 insertions(+), 35 deletions(-) - -diff --git a/src/utils/padsp.c b/src/utils/padsp.c -index 2ed0a03..fb756d3 100644 ---- a/src/utils/padsp.c -+++ b/src/utils/padsp.c -@@ -1458,11 +1458,11 @@ static int real_open(const char *filename, int flags, mode_t mode) { - return _open(filename, flags, mode); - } - -- if (filename && dsp_cloak_enable() && (strcmp(filename, "/dev/dsp") == 0 || strcmp(filename, "/dev/adsp") == 0)) -+ if (filename && dsp_cloak_enable() && (pa_streq(filename, "/dev/dsp") || pa_streq(filename, "/dev/adsp") || pa_streq(filename, "/dev/audio"))) - r = dsp_open(flags, &_errno); -- else if (filename && mixer_cloak_enable() && strcmp(filename, "/dev/mixer") == 0) -+ else if (filename && mixer_cloak_enable() && pa_streq(filename, "/dev/mixer")) - r = mixer_open(flags, &_errno); -- else if (filename && sndstat_cloak_enable() && strcmp(filename, "/dev/sndstat") == 0) -+ else if (filename && sndstat_cloak_enable() && pa_streq(filename, "/dev/sndstat")) - r = sndstat_open(flags, &_errno); - else { - function_exit(); -@@ -2383,15 +2383,21 @@ int close(int fd) { - return 0; - } - -+static pa_bool_t is_audio_device_node(const char *path) { -+ return -+ pa_streq(path, "/dev/dsp") || -+ pa_streq(path, "/dev/adsp") || -+ pa_streq(path, "/dev/audio") || -+ pa_streq(path, "/dev/sndstat") || -+ pa_streq(path, "/dev/mixer"); -+} -+ - int access(const char *pathname, int mode) { - - debug(DEBUG_LEVEL_VERBOSE, __FILE__": access(%s)\n", pathname?pathname:"NULL"); - - if (!pathname || -- (strcmp(pathname, "/dev/dsp") != 0 && -- strcmp(pathname, "/dev/adsp") != 0 && -- strcmp(pathname, "/dev/sndstat") != 0 && -- strcmp(pathname, "/dev/mixer") != 0 )) { -+ !is_audio_device_node(pathname)) { - LOAD_ACCESS_FUNC(); - return _access(pathname, mode); - } -@@ -2417,10 +2423,7 @@ int stat(const char *pathname, struct stat *buf) { - - if (!pathname || - !buf || -- ( strcmp(pathname, "/dev/dsp") != 0 && -- strcmp(pathname, "/dev/adsp") != 0 && -- strcmp(pathname, "/dev/sndstat") != 0 && -- strcmp(pathname, "/dev/mixer") != 0 )) { -+ !is_audio_device_node(pathname)) { - debug(DEBUG_LEVEL_VERBOSE, __FILE__": stat(%s)\n", pathname?pathname:"NULL"); - LOAD_STAT_FUNC(); - return _stat(pathname, buf); -@@ -2474,10 +2477,7 @@ int stat64(const char *pathname, struct stat64 *buf) { - - if (!pathname || - !buf || -- ( strcmp(pathname, "/dev/dsp") != 0 && -- strcmp(pathname, "/dev/adsp") != 0 && -- strcmp(pathname, "/dev/sndstat") != 0 && -- strcmp(pathname, "/dev/mixer") != 0 )) { -+ !is_audio_device_node(pathname)) { - LOAD_STAT64_FUNC(); - return _stat64(pathname, buf); - } -@@ -2519,10 +2519,7 @@ int open64(const char *filename, int flags, ...) { - } - - if (!filename || -- ( strcmp(filename, "/dev/dsp") != 0 && -- strcmp(filename, "/dev/adsp") != 0 && -- strcmp(filename, "/dev/sndstat") != 0 && -- strcmp(filename, "/dev/mixer") != 0 )) { -+ !is_audio_device_node(filename)) { - LOAD_OPEN64_FUNC(); - return _open64(filename, flags, mode); - } -@@ -2539,10 +2536,7 @@ int __xstat(int ver, const char *pathname, struct stat *buf) { - - if (!pathname || - !buf || -- ( strcmp(pathname, "/dev/dsp") != 0 && -- strcmp(pathname, "/dev/adsp") != 0 && -- strcmp(pathname, "/dev/sndstat") != 0 && -- strcmp(pathname, "/dev/mixer") != 0 )) { -+ !is_audio_device_node(pathname)) { - LOAD_XSTAT_FUNC(); - return ___xstat(ver, pathname, buf); - } -@@ -2562,10 +2556,7 @@ int __xstat64(int ver, const char *pathname, struct stat64 *buf) { - - if (!pathname || - !buf || -- ( strcmp(pathname, "/dev/dsp") != 0 && -- strcmp(pathname, "/dev/adsp") != 0 && -- strcmp(pathname, "/dev/sndstat") != 0 && -- strcmp(pathname, "/dev/mixer") != 0 )) { -+ !is_audio_device_node(pathname)) { - LOAD_XSTAT64_FUNC(); - return ___xstat64(ver, pathname, buf); - } -@@ -2591,10 +2582,7 @@ FILE* fopen(const char *filename, const char *mode) { - - if (!filename || - !mode || -- ( strcmp(filename, "/dev/dsp") != 0 && -- strcmp(filename, "/dev/adsp") != 0 && -- strcmp(filename, "/dev/sndstat") != 0 && -- strcmp(filename, "/dev/mixer") != 0 )) { -+ !is_audio_device_node(filename)) { - LOAD_FOPEN_FUNC(); - return _fopen(filename, mode); - } -@@ -2634,10 +2622,7 @@ FILE *fopen64(const char *filename, const char *mode) { - - if (!filename || - !mode || -- ( strcmp(filename, "/dev/dsp") != 0 && -- strcmp(filename, "/dev/adsp") != 0 && -- strcmp(filename, "/dev/sndstat") != 0 && -- strcmp(filename, "/dev/mixer") != 0 )) { -+ !is_audio_device_node(filename)) { - LOAD_FOPEN64_FUNC(); - return _fopen64(filename, mode); - } --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0040-dbus-first-restart-timer-then-dispatch-it.diff b/packages/audio/pulseaudio/patches/0040-dbus-first-restart-timer-then-dispatch-it.diff deleted file mode 100644 index 93e97734d1..0000000000 --- a/packages/audio/pulseaudio/patches/0040-dbus-first-restart-timer-then-dispatch-it.diff +++ /dev/null @@ -1,92 +0,0 @@ -From 96592c21150e789156153dcebd14e201cd41cbeb Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 16 Feb 2010 02:49:44 +0100 -Subject: [PATCH 40/62] dbus: first restart timer, then dispatch it - -This makes sure that we don't access the timer after it might have been -destroyed already from the dbus timeout callback. - -https://bugzilla.redhat.com/attachment.cgi?id=389952 ---- - src/pulsecore/dbus-util.c | 29 ++++++++++++++++------------- - 1 files changed, 16 insertions(+), 13 deletions(-) - -diff --git a/src/pulsecore/dbus-util.c b/src/pulsecore/dbus-util.c -index 4e6148f..40b64a0 100644 ---- a/src/pulsecore/dbus-util.c -+++ b/src/pulsecore/dbus-util.c -@@ -44,17 +44,16 @@ struct pa_dbus_wrap_connection { - }; - - struct timeout_data { -- pa_dbus_wrap_connection *c; -+ pa_dbus_wrap_connection *connection; - DBusTimeout *timeout; - }; - - static void dispatch_cb(pa_mainloop_api *ea, pa_defer_event *ev, void *userdata) { - DBusConnection *conn = userdata; - -- if (dbus_connection_dispatch(conn) == DBUS_DISPATCH_COMPLETE) { -+ if (dbus_connection_dispatch(conn) == DBUS_DISPATCH_COMPLETE) - /* no more data to process, disable the deferred */ - ea->defer_enable(ev, 0); -- } - } - - /* DBusDispatchStatusFunction callback for the pa mainloop */ -@@ -131,13 +130,17 @@ static void handle_time_event(pa_mainloop_api *ea, pa_time_event* e, const struc - struct timeout_data *d = userdata; - - pa_assert(d); -- pa_assert(d->c); -+ pa_assert(d->connection); - - if (dbus_timeout_get_enabled(d->timeout)) { -- dbus_timeout_handle(d->timeout); -+ /* Restart it for the next scheduled time. We do this before -+ * calling dbus_timeout_handle() to make sure that the time -+ * event is still around. */ -+ ea->time_restart(e, pa_timeval_rtstore(&tv, -+ pa_timeval_load(t) + dbus_timeout_get_interval(d->timeout) * PA_USEC_PER_MSEC, -+ d->connection->use_rtclock)); - -- /* restart it for the next scheduled time */ -- ea->time_restart(e, pa_timeval_rtstore(&tv, pa_timeval_load(t) + dbus_timeout_get_interval(d->timeout) * PA_USEC_PER_MSEC, d->c->use_rtclock)); -+ dbus_timeout_handle(d->timeout); - } - } - -@@ -207,7 +210,7 @@ static dbus_bool_t add_timeout(DBusTimeout *timeout, void *data) { - return FALSE; - - d = pa_xnew(struct timeout_data, 1); -- d->c = c; -+ d->connection = c; - d->timeout = timeout; - ev = c->mainloop->time_new(c->mainloop, pa_timeval_rtstore(&tv, pa_rtclock_now() + dbus_timeout_get_interval(timeout) * PA_USEC_PER_MSEC, c->use_rtclock), handle_time_event, d); - c->mainloop->time_set_destroy(ev, time_event_destroy_cb); -@@ -236,15 +239,15 @@ static void toggle_timeout(DBusTimeout *timeout, void *data) { - struct timeval tv; - - pa_assert(d); -- pa_assert(d->c); -+ pa_assert(d->connection); - pa_assert(timeout); - - pa_assert_se(ev = dbus_timeout_get_data(timeout)); - -- if (dbus_timeout_get_enabled(timeout)) { -- d->c->mainloop->time_restart(ev, pa_timeval_rtstore(&tv, pa_rtclock_now() + dbus_timeout_get_interval(timeout) * PA_USEC_PER_MSEC, d->c->use_rtclock)); -- } else -- d->c->mainloop->time_restart(ev, pa_timeval_rtstore(&tv, PA_USEC_INVALID, d->c->use_rtclock)); -+ if (dbus_timeout_get_enabled(timeout)) -+ d->connection->mainloop->time_restart(ev, pa_timeval_rtstore(&tv, pa_rtclock_now() + dbus_timeout_get_interval(timeout) * PA_USEC_PER_MSEC, d->connection->use_rtclock)); -+ else -+ d->connection->mainloop->time_restart(ev, pa_timeval_rtstore(&tv, PA_USEC_INVALID, d->connection->use_rtclock)); - } - - static void wakeup_main(void *userdata) { --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0041-fdsem-be-more-verbose-when-reading-from-eventfd-fail.diff b/packages/audio/pulseaudio/patches/0041-fdsem-be-more-verbose-when-reading-from-eventfd-fail.diff deleted file mode 100644 index 9267fe1f2b..0000000000 --- a/packages/audio/pulseaudio/patches/0041-fdsem-be-more-verbose-when-reading-from-eventfd-fail.diff +++ /dev/null @@ -1,111 +0,0 @@ -From 5e2af2d3f3dea473d46b33a5e90a993ac5da3f35 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 16 Feb 2010 03:36:44 +0100 -Subject: [PATCH 41/62] fdsem: be more verbose when reading from eventfd fails. - -Apperently reading from an eventfd can fail, which results in an assert -to be hit. I am not sure about the reason for the failure, but in -attempt to track down the issue the next time is hit this prints a more -useful log message. - -https://bugzilla.redhat.com/attachment.cgi?id=386380 ---- - src/pulsecore/fdsem.c | 41 +++++++++++++++++++++++++++++++++++------ - 1 files changed, 35 insertions(+), 6 deletions(-) - -diff --git a/src/pulsecore/fdsem.c b/src/pulsecore/fdsem.c -index 380f34f..00836f9 100644 ---- a/src/pulsecore/fdsem.c -+++ b/src/pulsecore/fdsem.c -@@ -35,6 +35,7 @@ - #include - #include - #include -+#include - #include - - #ifndef HAVE_PIPE -@@ -159,7 +160,12 @@ static void flush(pa_fdsem *f) { - uint64_t u; - - if ((r = read(f->efd, &u, sizeof(u))) != sizeof(u)) { -- pa_assert(r < 0 && errno == EINTR); -+ -+ if (r >= 0 || errno != EINTR) { -+ pa_log_error("Invalid read from eventfd: %s", r < 0 ? pa_cstrerror(errno) : "EOF"); -+ pa_assert_not_reached(); -+ } -+ - continue; - } - r = (ssize_t) u; -@@ -167,7 +173,12 @@ static void flush(pa_fdsem *f) { - #endif - - if ((r = read(f->fds[0], &x, sizeof(x))) <= 0) { -- pa_assert(r < 0 && errno == EINTR); -+ -+ if (r >= 0 || errno != EINTR) { -+ pa_log_error("Invalid read from pipe: %s", r < 0 ? pa_cstrerror(errno) : "EOF"); -+ pa_assert_not_reached(); -+ } -+ - continue; - } - -@@ -192,14 +203,22 @@ void pa_fdsem_post(pa_fdsem *f) { - uint64_t u = 1; - - if ((r = write(f->efd, &u, sizeof(u))) != sizeof(u)) { -- pa_assert(r < 0 && errno == EINTR); -+ if (r >= 0 || errno != EINTR) { -+ pa_log_error("Invalid read from pipe: %s", r < 0 ? pa_cstrerror(errno) : "EOF"); -+ pa_assert_not_reached(); -+ } -+ - continue; - } - } else - #endif - - if ((r = write(f->fds[1], &x, 1)) != 1) { -- pa_assert(r < 0 && errno == EINTR); -+ if (r >= 0 || errno != EINTR) { -+ pa_log_error("Invalid read from pipe: %s", r < 0 ? pa_cstrerror(errno) : "EOF"); -+ pa_assert_not_reached(); -+ } -+ - continue; - } - -@@ -228,7 +247,12 @@ void pa_fdsem_wait(pa_fdsem *f) { - uint64_t u; - - if ((r = read(f->efd, &u, sizeof(u))) != sizeof(u)) { -- pa_assert(r < 0 && errno == EINTR); -+ -+ if (r >= 0 || errno != EINTR) { -+ pa_log_error("Invalid read from pipe: %s", r < 0 ? pa_cstrerror(errno) : "EOF"); -+ pa_assert_not_reached(); -+ } -+ - continue; - } - -@@ -237,7 +261,12 @@ void pa_fdsem_wait(pa_fdsem *f) { - #endif - - if ((r = read(f->fds[0], &x, sizeof(x))) <= 0) { -- pa_assert(r < 0 && errno == EINTR); -+ -+ if (r >= 0 || errno != EINTR) { -+ pa_log_error("Invalid read from pipe: %s", r < 0 ? pa_cstrerror(errno) : "EOF"); -+ pa_assert_not_reached(); -+ } -+ - continue; - } - --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0042-pacat-always-fully-fulfill-write-requests.diff b/packages/audio/pulseaudio/patches/0042-pacat-always-fully-fulfill-write-requests.diff deleted file mode 100644 index c69438f1fe..0000000000 --- a/packages/audio/pulseaudio/patches/0042-pacat-always-fully-fulfill-write-requests.diff +++ /dev/null @@ -1,79 +0,0 @@ -From 19fa81bf1375032cb1a27c7715a28a52b238d4cb Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Thu, 18 Feb 2010 01:54:51 +0100 -Subject: [PATCH 42/62] pacat: always fully fulfill write requests - -Make sure we always fulfill write requests from the server. If we don't -the server won't ask us again and playback will stay stuck. - -https://tango.0pointer.de/pipermail/pulseaudio-discuss/2010-February/006611.html ---- - src/utils/pacat.c | 47 ++++++++++++++++++++++++++++++----------------- - 1 files changed, 30 insertions(+), 17 deletions(-) - -diff --git a/src/utils/pacat.c b/src/utils/pacat.c -index a5d2e9a..d136f6b 100644 ---- a/src/utils/pacat.c -+++ b/src/utils/pacat.c -@@ -195,28 +195,41 @@ static void stream_write_callback(pa_stream *s, size_t length, void *userdata) { - - pa_assert(sndfile); - -- if (pa_stream_begin_write(s, &data, &length) < 0) { -- pa_log(_("pa_stream_begin_write() failed: %s"), pa_strerror(pa_context_errno(context))); -- quit(1); -- return; -- } -+ for (;;) { -+ size_t data_length = length; - -- if (readf_function) { -- size_t k = pa_frame_size(&sample_spec); -+ if (pa_stream_begin_write(s, &data, &data_length) < 0) { -+ pa_log(_("pa_stream_begin_write() failed: %s"), pa_strerror(pa_context_errno(context))); -+ quit(1); -+ return; -+ } - -- if ((bytes = readf_function(sndfile, data, (sf_count_t) (length/k))) > 0) -- bytes *= (sf_count_t) k; -+ if (readf_function) { -+ size_t k = pa_frame_size(&sample_spec); - -- } else -- bytes = sf_read_raw(sndfile, data, (sf_count_t) length); -+ if ((bytes = readf_function(sndfile, data, (sf_count_t) (data_length/k))) > 0) -+ bytes *= (sf_count_t) k; - -- if (bytes > 0) -- pa_stream_write(s, data, (size_t) bytes, NULL, 0, PA_SEEK_RELATIVE); -- else -- pa_stream_cancel_write(s); -+ } else -+ bytes = sf_read_raw(sndfile, data, (sf_count_t) data_length); - -- if (bytes < (sf_count_t) length) -- start_drain(); -+ if (bytes > 0) -+ pa_stream_write(s, data, (size_t) bytes, NULL, 0, PA_SEEK_RELATIVE); -+ else -+ pa_stream_cancel_write(s); -+ -+ /* EOF? */ -+ if (bytes < (sf_count_t) data_length) { -+ start_drain(); -+ break; -+ } -+ -+ /* Request fulfilled */ -+ if ((size_t) bytes >= length) -+ break; -+ -+ length -= bytes; -+ } - } - } - --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0043-pacmd-store-away-fd-type.diff b/packages/audio/pulseaudio/patches/0043-pacmd-store-away-fd-type.diff deleted file mode 100644 index d71cb81aa8..0000000000 --- a/packages/audio/pulseaudio/patches/0043-pacmd-store-away-fd-type.diff +++ /dev/null @@ -1,60 +0,0 @@ -From 96ec29c6b2a40d3851f46587143a4ba6dce29d0d Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Thu, 18 Feb 2010 02:32:35 +0100 -Subject: [PATCH 43/62] pacmd: store away fd type - ---- - src/utils/pacmd.c | 9 +++++---- - 1 files changed, 5 insertions(+), 4 deletions(-) - -diff --git a/src/utils/pacmd.c b/src/utils/pacmd.c -index 5ef57e3..59aae48 100644 ---- a/src/utils/pacmd.c -+++ b/src/utils/pacmd.c -@@ -61,6 +61,7 @@ int main(int argc, char*argv[]) { - char *cli; - pa_bool_t ibuf_eof, obuf_eof, ibuf_closed, obuf_closed; - struct pollfd pollfd[N_WATCH]; -+ int stdin_type = 0, stdout_type = 0, fd_type = 0; - - setlocale(LC_ALL, ""); - bindtextdomain(GETTEXT_PACKAGE, PULSE_LOCALEDIR); -@@ -166,7 +167,7 @@ int main(int argc, char*argv[]) { - ssize_t r; - pa_assert(!ibuf_length); - -- if ((r = pa_read(STDIN_FILENO, ibuf, sizeof(ibuf), NULL)) <= 0) { -+ if ((r = pa_read(STDIN_FILENO, ibuf, sizeof(ibuf), &stdin_type)) <= 0) { - if (r < 0) { - pa_log(_("read(): %s"), strerror(errno)); - goto fail; -@@ -183,7 +184,7 @@ int main(int argc, char*argv[]) { - ssize_t r; - pa_assert(!obuf_length); - -- if ((r = pa_read(fd, obuf, sizeof(obuf), NULL)) <= 0) { -+ if ((r = pa_read(fd, obuf, sizeof(obuf), &fd_type)) <= 0) { - if (r < 0) { - pa_log(_("read(): %s"), strerror(errno)); - goto fail; -@@ -203,7 +204,7 @@ int main(int argc, char*argv[]) { - ssize_t r; - pa_assert(obuf_length); - -- if ((r = pa_write(STDOUT_FILENO, obuf + obuf_index, obuf_length, NULL)) < 0) { -+ if ((r = pa_write(STDOUT_FILENO, obuf + obuf_index, obuf_length, &stdout_type)) < 0) { - pa_log(_("write(): %s"), strerror(errno)); - goto fail; - } -@@ -219,7 +220,7 @@ int main(int argc, char*argv[]) { - ssize_t r; - pa_assert(ibuf_length); - -- if ((r = pa_write(fd, ibuf + ibuf_index, ibuf_length, NULL)) < 0) { -+ if ((r = pa_write(fd, ibuf + ibuf_index, ibuf_length, &fd_type)) < 0) { - pa_log(_("write(): %s"), strerror(errno)); - goto fail; - } --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0044-pacmd-don-t-enter-busy-loop-when-reading-from-stdin-.diff b/packages/audio/pulseaudio/patches/0044-pacmd-don-t-enter-busy-loop-when-reading-from-stdin-.diff deleted file mode 100644 index 5066980811..0000000000 --- a/packages/audio/pulseaudio/patches/0044-pacmd-don-t-enter-busy-loop-when-reading-from-stdin-.diff +++ /dev/null @@ -1,257 +0,0 @@ -From 6e064d1d6d0292d230c752b1f41034fd0754487b Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Thu, 18 Feb 2010 03:28:56 +0100 -Subject: [PATCH 44/62] pacmd: don't enter busy loop when reading from stdin very early - -pointed out in: - -https://tango.0pointer.de/pipermail/pulseaudio-discuss/2010-January/006365.html ---- - src/utils/pacmd.c | 186 ++++++++++++++++++++++++++++------------------------ - 1 files changed, 100 insertions(+), 86 deletions(-) - -diff --git a/src/utils/pacmd.c b/src/utils/pacmd.c -index 59aae48..87661e3 100644 ---- a/src/utils/pacmd.c -+++ b/src/utils/pacmd.c -@@ -45,13 +45,6 @@ - - int main(int argc, char*argv[]) { - -- enum { -- WATCH_STDIN, -- WATCH_STDOUT, -- WATCH_SOCKET, -- N_WATCH -- }; -- - pid_t pid ; - int fd = -1; - int ret = 1, i; -@@ -60,7 +53,9 @@ int main(int argc, char*argv[]) { - size_t ibuf_index, ibuf_length, obuf_index, obuf_length; - char *cli; - pa_bool_t ibuf_eof, obuf_eof, ibuf_closed, obuf_closed; -- struct pollfd pollfd[N_WATCH]; -+ struct pollfd pollfd[3]; -+ struct pollfd *watch_socket, *watch_stdin, *watch_stdout; -+ - int stdin_type = 0, stdout_type = 0, fd_type = 0; - - setlocale(LC_ALL, ""); -@@ -129,32 +124,53 @@ int main(int argc, char*argv[]) { - ibuf_eof = TRUE; - } - -- pa_zero(pollfd); -- -- pollfd[WATCH_STDIN].fd = STDIN_FILENO; -- pollfd[WATCH_STDOUT].fd = STDOUT_FILENO; -- pollfd[WATCH_SOCKET].fd = fd; -- - for (;;) { -+ struct pollfd *p; -+ - if (ibuf_eof && - obuf_eof && - ibuf_length <= 0 && - obuf_length <= 0) - break; - -- pollfd[WATCH_STDIN].events = pollfd[WATCH_STDOUT].events = pollfd[WATCH_SOCKET].events = 0; -+ if (ibuf_length <= 0 && ibuf_eof && !ibuf_closed) { -+ shutdown(fd, SHUT_WR); -+ ibuf_closed = TRUE; -+ } - -- if (obuf_length > 0) -- pollfd[WATCH_STDOUT].events |= POLLOUT; -- else if (!obuf_eof) -- pollfd[WATCH_SOCKET].events |= POLLIN; -+ if (obuf_length <= 0 && obuf_eof && !obuf_closed) { -+ shutdown(fd, SHUT_RD); -+ obuf_closed = TRUE; -+ } -+ -+ pa_zero(pollfd); -+ -+ p = pollfd; - -- if (ibuf_length > 0) -- pollfd[WATCH_SOCKET].events |= POLLOUT; -- else if (!ibuf_eof) -- pollfd[WATCH_STDIN].events |= POLLIN; -+ if (ibuf_length > 0 || (!obuf_eof && obuf_length <= 0)) { -+ watch_socket = p++; -+ watch_socket->fd = fd; -+ watch_socket->events = -+ (ibuf_length > 0 ? POLLOUT : 0) | -+ (!obuf_eof && obuf_length <= 0 ? POLLIN : 0); -+ } else -+ watch_socket = NULL; - -- if (poll(pollfd, N_WATCH, -1) < 0) { -+ if (!ibuf_eof && ibuf_length <= 0) { -+ watch_stdin = p++; -+ watch_stdin->fd = STDIN_FILENO; -+ watch_stdin->events = POLLIN; -+ } else -+ watch_stdin = NULL; -+ -+ if (obuf_length > 0) { -+ watch_stdout = p++; -+ watch_stdout->fd = STDOUT_FILENO; -+ watch_stdout->events = POLLOUT; -+ } else -+ watch_stdout = NULL; -+ -+ if (poll(pollfd, p-pollfd, -1) < 0) { - - if (errno == EINTR) - continue; -@@ -163,82 +179,80 @@ int main(int argc, char*argv[]) { - goto fail; - } - -- if (pollfd[WATCH_STDIN].revents & POLLIN) { -- ssize_t r; -- pa_assert(!ibuf_length); -- -- if ((r = pa_read(STDIN_FILENO, ibuf, sizeof(ibuf), &stdin_type)) <= 0) { -- if (r < 0) { -- pa_log(_("read(): %s"), strerror(errno)); -- goto fail; -+ if (watch_stdin) { -+ if (watch_stdin->revents & POLLIN) { -+ ssize_t r; -+ pa_assert(ibuf_length <= 0); -+ -+ if ((r = pa_read(STDIN_FILENO, ibuf, sizeof(ibuf), &stdin_type)) <= 0) { -+ if (r < 0) { -+ pa_log(_("read(): %s"), strerror(errno)); -+ goto fail; -+ } -+ -+ ibuf_eof = TRUE; -+ } else { -+ ibuf_length = (size_t) r; -+ ibuf_index = 0; - } -- -+ } else if (watch_stdin->revents & POLLHUP) - ibuf_eof = TRUE; -- } else { -- ibuf_length = (size_t) r; -- ibuf_index = 0; -- } - } - -- if (pollfd[WATCH_SOCKET].revents & POLLIN) { -- ssize_t r; -- pa_assert(!obuf_length); -- -- if ((r = pa_read(fd, obuf, sizeof(obuf), &fd_type)) <= 0) { -- if (r < 0) { -- pa_log(_("read(): %s"), strerror(errno)); -- goto fail; -+ if (watch_socket) { -+ if (watch_socket->revents & POLLIN) { -+ ssize_t r; -+ pa_assert(obuf_length <= 0); -+ -+ if ((r = pa_read(fd, obuf, sizeof(obuf), &fd_type)) <= 0) { -+ if (r < 0) { -+ pa_log(_("read(): %s"), strerror(errno)); -+ goto fail; -+ } -+ -+ obuf_eof = TRUE; -+ } else { -+ obuf_length = (size_t) r; -+ obuf_index = 0; - } -- -+ } else if (watch_socket->revents & POLLHUP) - obuf_eof = TRUE; -- } else { -- obuf_length = (size_t) r; -- obuf_index = 0; -- } - } - -- if (pollfd[WATCH_STDOUT].revents & POLLHUP) { -- obuf_eof = TRUE; -- obuf_length = 0; -- } else if (pollfd[WATCH_STDOUT].revents & POLLOUT) { -- ssize_t r; -- pa_assert(obuf_length); -- -- if ((r = pa_write(STDOUT_FILENO, obuf + obuf_index, obuf_length, &stdout_type)) < 0) { -- pa_log(_("write(): %s"), strerror(errno)); -- goto fail; -- } -- -- obuf_length -= (size_t) r; -- obuf_index += obuf_index; -- } -+ if (watch_stdout) { -+ if (watch_stdout->revents & POLLHUP) { -+ obuf_eof = TRUE; -+ obuf_length = 0; -+ } else if (watch_stdout->revents & POLLOUT) { -+ ssize_t r; -+ pa_assert(obuf_length > 0); - -- if (pollfd[WATCH_SOCKET].revents & POLLHUP) { -- ibuf_eof = TRUE; -- ibuf_length = 0; -- } if (pollfd[WATCH_SOCKET].revents & POLLOUT) { -- ssize_t r; -- pa_assert(ibuf_length); -+ if ((r = pa_write(STDOUT_FILENO, obuf + obuf_index, obuf_length, &stdout_type)) < 0) { -+ pa_log(_("write(): %s"), strerror(errno)); -+ goto fail; -+ } - -- if ((r = pa_write(fd, ibuf + ibuf_index, ibuf_length, &fd_type)) < 0) { -- pa_log(_("write(): %s"), strerror(errno)); -- goto fail; -+ obuf_length -= (size_t) r; -+ obuf_index += obuf_index; - } -- -- ibuf_length -= (size_t) r; -- ibuf_index += obuf_index; - } - -- if (ibuf_length <= 0 && ibuf_eof && !ibuf_closed) { -- pa_close(STDIN_FILENO); -- shutdown(fd, SHUT_WR); -- ibuf_closed = TRUE; -- } -+ if (watch_socket) { -+ if (watch_socket->revents & POLLHUP) { -+ ibuf_eof = TRUE; -+ ibuf_length = 0; -+ } if (watch_socket->revents & POLLOUT) { -+ ssize_t r; -+ pa_assert(ibuf_length > 0); - -- if (obuf_length <= 0 && obuf_eof && !obuf_closed) { -- shutdown(fd, SHUT_RD); -- pa_close(STDOUT_FILENO); -- obuf_closed = TRUE; -+ if ((r = pa_write(fd, ibuf + ibuf_index, ibuf_length, &fd_type)) < 0) { -+ pa_log(_("write(): %s"), strerror(errno)); -+ goto fail; -+ } -+ -+ ibuf_length -= (size_t) r; -+ ibuf_index += obuf_index; -+ } - } - } - --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0045-shm-don-t-complain-about-missing-SHM-segments.diff b/packages/audio/pulseaudio/patches/0045-shm-don-t-complain-about-missing-SHM-segments.diff deleted file mode 100644 index 8f2af7aeeb..0000000000 --- a/packages/audio/pulseaudio/patches/0045-shm-don-t-complain-about-missing-SHM-segments.diff +++ /dev/null @@ -1,29 +0,0 @@ -From dfe27f623765b20bdaff2306109f89baca67d0cf Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 19 Feb 2010 03:29:36 +0100 -Subject: [PATCH 45/62] shm: don't complain about missing SHM segments - -If two clients try to cleanup the SHM directory at the same time, they -might want to open and then delete the same segment at the same time, in -which case one client might win, the other one lose. In this case, don't -warn about ENOENT. ---- - src/pulsecore/shm.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/src/pulsecore/shm.c b/src/pulsecore/shm.c -index fbf777a..1e31d54 100644 ---- a/src/pulsecore/shm.c -+++ b/src/pulsecore/shm.c -@@ -286,7 +286,7 @@ int pa_shm_attach_ro(pa_shm *m, unsigned id) { - segment_name(fn, sizeof(fn), m->id = id); - - if ((fd = shm_open(fn, O_RDONLY, 0)) < 0) { -- if (errno != EACCES) -+ if (errno != EACCES && errno != ENOENT) - pa_log("shm_open() failed: %s", pa_cstrerror(errno)); - goto fail; - } --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0046-vala-fix-definition-of-INVALID_INDEX.diff b/packages/audio/pulseaudio/patches/0046-vala-fix-definition-of-INVALID_INDEX.diff deleted file mode 100644 index dbad446fbd..0000000000 --- a/packages/audio/pulseaudio/patches/0046-vala-fix-definition-of-INVALID_INDEX.diff +++ /dev/null @@ -1,25 +0,0 @@ -From 5ce18c32f6ba8202c9f17f84aaffbdbbd8df071c Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 19 Feb 2010 03:31:46 +0100 -Subject: [PATCH 46/62] vala: fix definition of INVALID_INDEX - ---- - vala/libpulse.vapi | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/vala/libpulse.vapi b/vala/libpulse.vapi -index 9e05b14..b02bb56 100644 ---- a/vala/libpulse.vapi -+++ b/vala/libpulse.vapi -@@ -46,7 +46,7 @@ namespace PulseAudio { - [CCode (cname="PA_CHECK_VERSION")] - public bool CHECK_VERSION(int major, int minor, int micro); - -- [CCode (cname="INVALID_INDEX")] -+ [CCode (cname="PA_INVALID_INDEX")] - public const uint32 INVALID_INDEX; - - [CCode (cname="pa_free_cb_t")] --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0047-vala-fix-definition-of-the-GLib-mainloop-adapter.diff b/packages/audio/pulseaudio/patches/0047-vala-fix-definition-of-the-GLib-mainloop-adapter.diff deleted file mode 100644 index 6946e6bd78..0000000000 --- a/packages/audio/pulseaudio/patches/0047-vala-fix-definition-of-the-GLib-mainloop-adapter.diff +++ /dev/null @@ -1,30 +0,0 @@ -From 6bbdd200e89bdbf180071e5281c0feb9617de81d Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Fri, 19 Feb 2010 03:32:00 +0100 -Subject: [PATCH 47/62] vala: fix definition of the GLib mainloop adapter - ---- - vala/libpulse.vapi | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/vala/libpulse.vapi b/vala/libpulse.vapi -index b02bb56..d47ef73 100644 ---- a/vala/libpulse.vapi -+++ b/vala/libpulse.vapi -@@ -879,11 +879,11 @@ namespace PulseAudio { - } - - [Compact] -- [CCode (cname="pa_glib_mainloop", cprefix="pa_glib_mainloop_", free_function="pa_glib_mainloop_free")] -+ [CCode (cheader_filename="pulse/glib-mainloop.h", cname="pa_glib_mainloop", cprefix="pa_glib_mainloop_", free_function="pa_glib_mainloop_free")] - public class GLibMainLoop { - - [CCode (cname="pa_glib_mainloop_new")] -- public GLibMainLoop(); -+ public GLibMainLoop(MainContext? c = null); - - public unowned MainLoopApi get_api(); - } --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0048-Add-missing-profile-and-alsa-mixer-paths-to-src-Make.diff b/packages/audio/pulseaudio/patches/0048-Add-missing-profile-and-alsa-mixer-paths-to-src-Make.diff deleted file mode 100644 index 79eb009e62..0000000000 --- a/packages/audio/pulseaudio/patches/0048-Add-missing-profile-and-alsa-mixer-paths-to-src-Make.diff +++ /dev/null @@ -1,49 +0,0 @@ -From 047e16f2d18c20ea8d9dbb8a24175e1c4bb34d5e Mon Sep 17 00:00:00 2001 -From: Daniel T Chen -Date: Fri, 19 Feb 2010 00:23:17 -0500 -Subject: [PATCH 48/62] Add missing profile and alsa-mixer/paths to src/Makefile.am - -Commits e8cb96c and 0c836aa created mixer paths but did not update -src/Makefile.am. Building a snapshot containing these two commits -therefore results in the user being unable to adjust the volume or -(un)mute through PA. Fix this by adding the two new mixer paths -files to src/Makefile.am. - -Likewise, commit 66e1a2d created a profile for the M-Audio FastTrack -Pro USB but did not update src/Makefile.am. Fix this by adding the -profile to src/Makefile.am. ---- - src/Makefile.am | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) - -diff --git a/src/Makefile.am b/src/Makefile.am -index 598e77f..ffe7558 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -109,6 +109,7 @@ MODULE_LDFLAGS = -module -disable-static -avoid-version $(LDFLAGS_NOUNDEFINED) - - ALSA_PROFILES = \ - modules/alsa/mixer/profile-sets/default.conf \ -+ modules/alsa/mixer/profile-sets/maudio-fasttrack-pro.conf \ - modules/alsa/mixer/profile-sets/native-instruments-audio4dj.conf \ - modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf - -@@ -117,6 +118,7 @@ ALSA_PATHS = \ - modules/alsa/mixer/paths/analog-input.conf \ - modules/alsa/mixer/paths/analog-input.conf.common \ - modules/alsa/mixer/paths/analog-input-fm.conf \ -+ modules/alsa/mixer/paths/analog-input-internal-mic.conf \ - modules/alsa/mixer/paths/analog-input-linein.conf \ - modules/alsa/mixer/paths/analog-input-mic.conf \ - modules/alsa/mixer/paths/analog-input-mic.conf.common \ -@@ -126,6 +128,7 @@ ALSA_PATHS = \ - modules/alsa/mixer/paths/analog-output.conf \ - modules/alsa/mixer/paths/analog-output-speaker.conf \ - modules/alsa/mixer/paths/analog-output.conf.common \ -+ modules/alsa/mixer/paths/analog-output-desktop-speaker.conf \ - modules/alsa/mixer/paths/analog-output-headphones.conf \ - modules/alsa/mixer/paths/analog-output-headphones-2.conf \ - modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf \ --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0049-channelmap-Use-Subwoofer-as-pretty-name-for-LFE.diff b/packages/audio/pulseaudio/patches/0049-channelmap-Use-Subwoofer-as-pretty-name-for-LFE.diff deleted file mode 100644 index 2223ee0962..0000000000 --- a/packages/audio/pulseaudio/patches/0049-channelmap-Use-Subwoofer-as-pretty-name-for-LFE.diff +++ /dev/null @@ -1,28 +0,0 @@ -From 3f44bf0afaba9c227f09a475f4886c14813afc2f Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Sun, 21 Feb 2010 16:19:40 +0100 -Subject: [PATCH 49/62] channelmap: Use "Subwoofer" as pretty name for LFE - -The pretty name is suspposed to be understandable by non-technical -folks, and they are generally more used to the term "Subwoofer" than -"Low Frequency Emitter", so let's change the name here. ---- - src/pulse/channelmap.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/src/pulse/channelmap.c b/src/pulse/channelmap.c -index 9b51626..83fdb43 100644 ---- a/src/pulse/channelmap.c -+++ b/src/pulse/channelmap.c -@@ -112,7 +112,7 @@ const char *const pretty_table[PA_CHANNEL_POSITION_MAX] = { - [PA_CHANNEL_POSITION_REAR_LEFT] = N_("Rear Left"), - [PA_CHANNEL_POSITION_REAR_RIGHT] = N_("Rear Right"), - -- [PA_CHANNEL_POSITION_LFE] = N_("Low Frequency Emmiter"), -+ [PA_CHANNEL_POSITION_LFE] = N_("Subwoofer"), - - [PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER] = N_("Front Left-of-center"), - [PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER] = N_("Front Right-of-center"), --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0050-vala-fix-wrapping-of-port-setting-calls.diff b/packages/audio/pulseaudio/patches/0050-vala-fix-wrapping-of-port-setting-calls.diff deleted file mode 100644 index 9bc20b8f11..0000000000 --- a/packages/audio/pulseaudio/patches/0050-vala-fix-wrapping-of-port-setting-calls.diff +++ /dev/null @@ -1,34 +0,0 @@ -From 117c99de3af9a19104d946852821f7b2f5646526 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Sun, 21 Feb 2010 16:21:13 +0100 -Subject: [PATCH 50/62] vala: fix wrapping of port setting calls - ---- - vala/libpulse.vapi | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/vala/libpulse.vapi b/vala/libpulse.vapi -index d47ef73..21c0f7c 100644 ---- a/vala/libpulse.vapi -+++ b/vala/libpulse.vapi -@@ -1024,7 +1024,7 @@ namespace PulseAudio { - public Operation? suspend_sink_by_index(uint32 idx, bool suspend, SuccessCb? cb = null); - - public Operation? set_sink_port_by_name(string name, string port, SuccessCb? cb = null); -- public Operation? set_sink_port_by_index(string idx, string port, SuccessCb? cb = null); -+ public Operation? set_sink_port_by_index(uint32 idx, string port, SuccessCb? cb = null); - - public Operation? get_source_info_by_name(string name, SourceInfoCb cb); - public Operation? get_source_info_by_index(uint32 idx, SourceInfoCb cb); -@@ -1039,7 +1039,7 @@ namespace PulseAudio { - public Operation? suspend_source_by_index(uint32 idx, bool suspend, SuccessCb? cb = null); - - public Operation? set_source_port_by_name(string name, string port, SuccessCb? cb = null); -- public Operation? set_source_port_by_index(string idx, string port, SuccessCb? cb = null); -+ public Operation? set_source_port_by_index(uint32 idx, string port, SuccessCb? cb = null); - - public Operation? get_server_info(ServerInfoCb cb); - --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0051-proplist-explicitly-mention-a-role-test.diff b/packages/audio/pulseaudio/patches/0051-proplist-explicitly-mention-a-role-test.diff deleted file mode 100644 index 739f20231a..0000000000 --- a/packages/audio/pulseaudio/patches/0051-proplist-explicitly-mention-a-role-test.diff +++ /dev/null @@ -1,25 +0,0 @@ -From ddabaa3b0f7b95e2cf5279f5be74769905af8496 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Sun, 21 Feb 2010 16:21:43 +0100 -Subject: [PATCH 51/62] proplist: explicitly mention a role 'test' - ---- - src/pulse/proplist.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/src/pulse/proplist.h b/src/pulse/proplist.h -index 8dff8df..6283177 100644 ---- a/src/pulse/proplist.h -+++ b/src/pulse/proplist.h -@@ -59,7 +59,7 @@ PA_C_DECL_BEGIN - /** For streams: an XDG icon name for the media. e.g. "audio-x-mp3" */ - #define PA_PROP_MEDIA_ICON_NAME "media.icon_name" - --/** For streams: logic role of this media. One of the strings "video", "music", "game", "event", "phone", "animation", "production", "a11y" */ -+/** For streams: logic role of this media. One of the strings "video", "music", "game", "event", "phone", "animation", "production", "a11y", "test" */ - #define PA_PROP_MEDIA_ROLE "media.role" - - /** For event sound streams: XDG event sound name. e.g. "message-new-email" (Event sound streams are those with media.role set to "event") */ --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0052-stream-restore-be-a-little-bit-more-verbose-why-we-d.diff b/packages/audio/pulseaudio/patches/0052-stream-restore-be-a-little-bit-more-verbose-why-we-d.diff deleted file mode 100644 index 23d1cd8891..0000000000 --- a/packages/audio/pulseaudio/patches/0052-stream-restore-be-a-little-bit-more-verbose-why-we-d.diff +++ /dev/null @@ -1,25 +0,0 @@ -From 8adf536426a86e986fb5bd4ad31ba2d50054c485 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Sun, 21 Feb 2010 16:22:17 +0100 -Subject: [PATCH 52/62] stream-restore: be a little bit more verbose why we don't reastore a sink - ---- - src/modules/module-stream-restore.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/src/modules/module-stream-restore.c b/src/modules/module-stream-restore.c -index 9b6f914..00ce5ab 100644 ---- a/src/modules/module-stream-restore.c -+++ b/src/modules/module-stream-restore.c -@@ -394,7 +394,7 @@ static pa_hook_result_t sink_input_new_hook_callback(pa_core *c, pa_sink_input_n - return PA_HOOK_OK; - - if (new_data->sink) -- pa_log_debug("Not restoring device for stream %s, because already set.", name); -+ pa_log_debug("Not restoring device for stream %s, because already set to '%s'.", name, new_data->sink->name); - else if ((e = read_entry(u, name))) { - pa_sink *s = NULL; - --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0053-sample-cache-use-the-sample-name-as-unmodified-fallb.diff b/packages/audio/pulseaudio/patches/0053-sample-cache-use-the-sample-name-as-unmodified-fallb.diff deleted file mode 100644 index 0461375223..0000000000 --- a/packages/audio/pulseaudio/patches/0053-sample-cache-use-the-sample-name-as-unmodified-fallb.diff +++ /dev/null @@ -1,26 +0,0 @@ -From 180589511dab1b5d0388b58b41a0e9843ea1a35a Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Sun, 21 Feb 2010 16:23:25 +0100 -Subject: [PATCH 53/62] sample-cache: use the sample name as unmodified fallback in the properties when playing a sample from the cache - ---- - src/pulsecore/core-scache.c | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) - -diff --git a/src/pulsecore/core-scache.c b/src/pulsecore/core-scache.c -index 1fb81d0..95aaa10 100644 ---- a/src/pulsecore/core-scache.c -+++ b/src/pulsecore/core-scache.c -@@ -310,7 +310,8 @@ int pa_scache_play_item(pa_core *c, const char *name, pa_sink *sink, pa_volume_t - return -1; - - merged = pa_proplist_new(); -- pa_proplist_setf(merged, PA_PROP_MEDIA_NAME, "Sample %s", name); -+ pa_proplist_sets(merged, PA_PROP_MEDIA_NAME, name); -+ pa_proplist_sets(merged, PA_PROP_EVENT_ID, name); - - if (e->lazy && !e->memchunk.memblock) { - pa_channel_map old_channel_map = e->channel_map; --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0054-scache-when-playing-a-sample-from-the-cache-make-sur.diff b/packages/audio/pulseaudio/patches/0054-scache-when-playing-a-sample-from-the-cache-make-sur.diff deleted file mode 100644 index 93bc081722..0000000000 --- a/packages/audio/pulseaudio/patches/0054-scache-when-playing-a-sample-from-the-cache-make-sur.diff +++ /dev/null @@ -1,153 +0,0 @@ -From f9b9579cf4fe65d3619629b5bc28ce02ceca305e Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Sun, 21 Feb 2010 17:35:05 +0100 -Subject: [PATCH 54/62] scache: when playing a sample from the cache make sure not queue them up when the sink is suspended - -libcanberra already sets the appropriate flags for uncached sample -streams, we now need to make sure to set them for cached samples too. ---- - src/pulsecore/core-scache.c | 7 ++++++- - src/pulsecore/play-memblockq.c | 7 +++++-- - src/pulsecore/play-memblockq.h | 18 ++++++++++-------- - src/pulsecore/play-memchunk.c | 3 ++- - src/pulsecore/play-memchunk.h | 15 ++++++++------- - 5 files changed, 31 insertions(+), 19 deletions(-) - -diff --git a/src/pulsecore/core-scache.c b/src/pulsecore/core-scache.c -index 95aaa10..0172419 100644 ---- a/src/pulsecore/core-scache.c -+++ b/src/pulsecore/core-scache.c -@@ -351,7 +351,12 @@ int pa_scache_play_item(pa_core *c, const char *name, pa_sink *sink, pa_volume_t - if (p) - pa_proplist_update(merged, PA_UPDATE_REPLACE, p); - -- if (pa_play_memchunk(sink, &e->sample_spec, &e->channel_map, &e->memchunk, pass_volume ? &r : NULL, merged, sink_input_idx) < 0) -+ if (pa_play_memchunk(sink, -+ &e->sample_spec, &e->channel_map, -+ &e->memchunk, -+ pass_volume ? &r : NULL, -+ merged, -+ PA_SINK_INPUT_NO_CREATE_ON_SUSPEND|PA_SINK_INPUT_KILL_ON_SUSPEND, sink_input_idx) < 0) - goto fail; - - pa_proplist_free(merged); -diff --git a/src/pulsecore/play-memblockq.c b/src/pulsecore/play-memblockq.c -index f528c49..0d6da3e 100644 ---- a/src/pulsecore/play-memblockq.c -+++ b/src/pulsecore/play-memblockq.c -@@ -173,7 +173,8 @@ pa_sink_input* pa_memblockq_sink_input_new( - const pa_channel_map *map, - pa_memblockq *q, - pa_cvolume *volume, -- pa_proplist *p) { -+ pa_proplist *p, -+ pa_sink_input_flags_t flags) { - - memblockq_stream *u = NULL; - pa_sink_input_new_data data; -@@ -198,6 +199,7 @@ pa_sink_input* pa_memblockq_sink_input_new( - pa_sink_input_new_data_set_channel_map(&data, map); - pa_sink_input_new_data_set_volume(&data, volume); - pa_proplist_update(data.proplist, PA_UPDATE_REPLACE, p); -+ data.flags |= flags; - - pa_sink_input_new(&u->sink_input, sink->core, &data); - pa_sink_input_new_data_done(&data); -@@ -237,6 +239,7 @@ int pa_play_memblockq( - pa_memblockq *q, - pa_cvolume *volume, - pa_proplist *p, -+ pa_sink_input_flags_t flags, - uint32_t *sink_input_index) { - - pa_sink_input *i; -@@ -245,7 +248,7 @@ int pa_play_memblockq( - pa_assert(ss); - pa_assert(q); - -- if (!(i = pa_memblockq_sink_input_new(sink, ss, map, q, volume, p))) -+ if (!(i = pa_memblockq_sink_input_new(sink, ss, map, q, volume, p, flags))) - return -1; - - pa_sink_input_put(i); -diff --git a/src/pulsecore/play-memblockq.h b/src/pulsecore/play-memblockq.h -index 9d5f40f..a55fed0 100644 ---- a/src/pulsecore/play-memblockq.h -+++ b/src/pulsecore/play-memblockq.h -@@ -31,17 +31,19 @@ pa_sink_input* pa_memblockq_sink_input_new( - const pa_channel_map *map, - pa_memblockq *q, - pa_cvolume *volume, -- pa_proplist *p); -+ pa_proplist *p, -+ pa_sink_input_flags_t flags); - - void pa_memblockq_sink_input_set_queue(pa_sink_input *i, pa_memblockq *q); - - int pa_play_memblockq( -- pa_sink *sink, -- const pa_sample_spec *ss, -- const pa_channel_map *map, -- pa_memblockq *q, -- pa_cvolume *cvolume, -- pa_proplist *p, -- uint32_t *sink_input_index); -+ pa_sink *sink, -+ const pa_sample_spec *ss, -+ const pa_channel_map *map, -+ pa_memblockq *q, -+ pa_cvolume *cvolume, -+ pa_proplist *p, -+ pa_sink_input_flags_t flags, -+ uint32_t *sink_input_index); - - #endif -diff --git a/src/pulsecore/play-memchunk.c b/src/pulsecore/play-memchunk.c -index 1a3bd5b..6fb8902 100644 ---- a/src/pulsecore/play-memchunk.c -+++ b/src/pulsecore/play-memchunk.c -@@ -43,6 +43,7 @@ int pa_play_memchunk( - const pa_memchunk *chunk, - pa_cvolume *volume, - pa_proplist *p, -+ pa_sink_input_flags_t flags, - uint32_t *sink_input_index) { - - pa_memblockq *q; -@@ -59,7 +60,7 @@ int pa_play_memchunk( - - pa_assert_se(pa_memblockq_push(q, chunk) >= 0); - -- if ((r = pa_play_memblockq(sink, ss, map, q, volume, p, sink_input_index)) < 0) { -+ if ((r = pa_play_memblockq(sink, ss, map, q, volume, p, flags, sink_input_index)) < 0) { - pa_memblockq_free(q); - return r; - } -diff --git a/src/pulsecore/play-memchunk.h b/src/pulsecore/play-memchunk.h -index c813611..068add1 100644 ---- a/src/pulsecore/play-memchunk.h -+++ b/src/pulsecore/play-memchunk.h -@@ -26,12 +26,13 @@ - #include - - int pa_play_memchunk( -- pa_sink *sink, -- const pa_sample_spec *ss, -- const pa_channel_map *map, -- const pa_memchunk *chunk, -- pa_cvolume *cvolume, -- pa_proplist *p, -- uint32_t *sink_input_index); -+ pa_sink *sink, -+ const pa_sample_spec *ss, -+ const pa_channel_map *map, -+ const pa_memchunk *chunk, -+ pa_cvolume *cvolume, -+ pa_proplist *p, -+ pa_sink_input_flags_t flags, -+ uint32_t *sink_input_index); - - #endif --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0055-pacat-pass-buffer_attr-to-recording-streams-too.diff b/packages/audio/pulseaudio/patches/0055-pacat-pass-buffer_attr-to-recording-streams-too.diff deleted file mode 100644 index a3e4acccda..0000000000 --- a/packages/audio/pulseaudio/patches/0055-pacat-pass-buffer_attr-to-recording-streams-too.diff +++ /dev/null @@ -1,28 +0,0 @@ -From b2e9fb6f6e12a3eab8a41c67017507e60d616e2a Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Sun, 21 Feb 2010 21:09:26 +0100 -Subject: [PATCH 55/62] pacat: pass buffer_attr to recording streams too - -Pointed out by Colin Guthrie. - -https://tango.0pointer.de/pipermail/pulseaudio-discuss/2010-February/006698.html ---- - src/utils/pacat.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/src/utils/pacat.c b/src/utils/pacat.c -index d136f6b..394cfbf 100644 ---- a/src/utils/pacat.c -+++ b/src/utils/pacat.c -@@ -473,7 +473,7 @@ static void context_state_callback(pa_context *c, void *userdata) { - } - - } else { -- if (pa_stream_connect_record(stream, device, latency > 0 ? &buffer_attr : NULL, flags) < 0) { -+ if (pa_stream_connect_record(stream, device, &buffer_attr, flags) < 0) { - pa_log(_("pa_stream_connect_record() failed: %s"), pa_strerror(pa_context_errno(c))); - goto fail; - } --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0056-suspend-on-idle-resume-audio-device-even-for-initial.diff b/packages/audio/pulseaudio/patches/0056-suspend-on-idle-resume-audio-device-even-for-initial.diff deleted file mode 100644 index 08ff9099d6..0000000000 --- a/packages/audio/pulseaudio/patches/0056-suspend-on-idle-resume-audio-device-even-for-initial.diff +++ /dev/null @@ -1,47 +0,0 @@ -From a469d44e6993c4e9e7a53ac91ed53eacb500e279 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 22 Feb 2010 03:22:28 +0100 -Subject: [PATCH 56/62] suspend-on-idle: resume audio device even for initially corked streams - -We need to resume audio devices even for streams that are created in -corked stat, so that the latency ranges of the audio device are known -during the initial latency negotiation. If we don't the latency -negotiation will be based on placeholder data and changed later on which -clients do not expect. - -This should fix issues with Skype. - -https://bugzilla.redhat.com/show_bug.cgi?id=554929 ---- - src/modules/module-suspend-on-idle.c | 8 +++----- - 1 files changed, 3 insertions(+), 5 deletions(-) - -diff --git a/src/modules/module-suspend-on-idle.c b/src/modules/module-suspend-on-idle.c -index 7adaa0b..cfb7879 100644 ---- a/src/modules/module-suspend-on-idle.c -+++ b/src/modules/module-suspend-on-idle.c -@@ -145,8 +145,9 @@ static pa_hook_result_t sink_input_fixate_hook_cb(pa_core *c, pa_sink_input_new_ - pa_assert(data); - pa_assert(u); - -- if (data->flags & PA_SINK_INPUT_START_CORKED) -- return PA_HOOK_OK; -+ /* We need to resume the audio device here even for -+ * PA_SINK_INPUT_START_CORKED, since we need the device parameters -+ * to be fully available while the stream is set up. */ - - if ((d = pa_hashmap_get(u->device_infos, data->sink))) - resume(d); -@@ -161,9 +162,6 @@ static pa_hook_result_t source_output_fixate_hook_cb(pa_core *c, pa_source_outpu - pa_assert(data); - pa_assert(u); - -- if (data->flags & PA_SOURCE_OUTPUT_START_CORKED) -- return PA_HOOK_OK; -- - if (data->source->monitor_of) - d = pa_hashmap_get(u->device_infos, data->source->monitor_of); - else --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0057-native-improve-logging-for-buffer_attrs.diff b/packages/audio/pulseaudio/patches/0057-native-improve-logging-for-buffer_attrs.diff deleted file mode 100644 index fa971fc54b..0000000000 --- a/packages/audio/pulseaudio/patches/0057-native-improve-logging-for-buffer_attrs.diff +++ /dev/null @@ -1,48 +0,0 @@ -From 4a32103d84102ee91368eed1f30613de6da12f6a Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 22 Feb 2010 03:40:29 +0100 -Subject: [PATCH 57/62] native: improve logging for buffer_attrs - ---- - src/pulsecore/protocol-native.c | 18 ++++++++++++++++++ - 1 files changed, 18 insertions(+), 0 deletions(-) - -diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c -index f80b0c2..337869d 100644 ---- a/src/pulsecore/protocol-native.c -+++ b/src/pulsecore/protocol-native.c -@@ -858,6 +858,18 @@ static void fix_playback_buffer_attr(playback_stream *s) { - - pa_assert(s); - -+ /* pa_log("Client requested: maxlength=%li bytes tlength=%li bytes minreq=%li bytes prebuf=%li bytes", */ -+ /* (long) s->buffer_attr.maxlength, */ -+ /* (long) s->buffer_attr.tlength, */ -+ /* (long) s->buffer_attr.minreq, */ -+ /* (long) s->buffer_attr.prebuf); */ -+ -+ /* pa_log("Client requested: maxlength=%lu ms tlength=%lu ms minreq=%lu ms prebuf=%lu ms", */ -+ /* (unsigned long) (pa_bytes_to_usec(s->buffer_attr.maxlength, &s->sink_input->sample_spec) / PA_USEC_PER_MSEC), */ -+ /* (unsigned long) (pa_bytes_to_usec(s->buffer_attr.tlength, &s->sink_input->sample_spec) / PA_USEC_PER_MSEC), */ -+ /* (unsigned long) (pa_bytes_to_usec(s->buffer_attr.minreq, &s->sink_input->sample_spec) / PA_USEC_PER_MSEC), */ -+ /* (unsigned long) (pa_bytes_to_usec(s->buffer_attr.prebuf, &s->sink_input->sample_spec) / PA_USEC_PER_MSEC)); */ -+ - /* This function will be called from the main thread, before as - * well as after the sink input has been activated using - * pa_sink_input_put()! That means it may not touch any -@@ -984,6 +996,12 @@ static void fix_playback_buffer_attr(playback_stream *s) { - if (s->buffer_attr.prebuf == (uint32_t) -1 || - s->buffer_attr.prebuf > max_prebuf) - s->buffer_attr.prebuf = max_prebuf; -+ -+ /* pa_log("Client accepted: maxlength=%lu ms tlength=%lu ms minreq=%lu ms prebuf=%lu ms", */ -+ /* (unsigned long) (pa_bytes_to_usec(s->buffer_attr.maxlength, &s->sink_input->sample_spec) / PA_USEC_PER_MSEC), */ -+ /* (unsigned long) (pa_bytes_to_usec(s->buffer_attr.tlength, &s->sink_input->sample_spec) / PA_USEC_PER_MSEC), */ -+ /* (unsigned long) (pa_bytes_to_usec(s->buffer_attr.minreq, &s->sink_input->sample_spec) / PA_USEC_PER_MSEC), */ -+ /* (unsigned long) (pa_bytes_to_usec(s->buffer_attr.prebuf, &s->sink_input->sample_spec) / PA_USEC_PER_MSEC)); */ - } - - /* Called from main context */ --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0058-alsa-util-strip-spaces-from-ALSA-card-pcm-names.diff b/packages/audio/pulseaudio/patches/0058-alsa-util-strip-spaces-from-ALSA-card-pcm-names.diff deleted file mode 100644 index 50439fd292..0000000000 --- a/packages/audio/pulseaudio/patches/0058-alsa-util-strip-spaces-from-ALSA-card-pcm-names.diff +++ /dev/null @@ -1,53 +0,0 @@ -From 522c446ddc2bf2f4467f9de16f8618fc544a94fe Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Sun, 21 Feb 2010 22:00:49 +0100 -Subject: [PATCH 58/62] alsa-util: strip spaces from ALSA card/pcm names - -http://pulseaudio.org/ticket/778 ---- - src/modules/alsa/alsa-util.c | 12 +++++++----- - 1 files changed, 7 insertions(+), 5 deletions(-) - -diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c -index 52f1259..1cbb3f3 100644 ---- a/src/modules/alsa/alsa-util.c -+++ b/src/modules/alsa/alsa-util.c -@@ -874,12 +874,12 @@ void pa_alsa_init_proplist_card(pa_core *c, pa_proplist *p, int card) { - pa_proplist_setf(p, "alsa.card", "%i", card); - - if (snd_card_get_name(card, &cn) >= 0) { -- pa_proplist_sets(p, "alsa.card_name", cn); -+ pa_proplist_sets(p, "alsa.card_name", pa_strip(cn)); - free(cn); - } - - if (snd_card_get_longname(card, &lcn) >= 0) { -- pa_proplist_sets(p, "alsa.long_card_name", lcn); -+ pa_proplist_sets(p, "alsa.long_card_name", pa_strip(lcn)); - free(lcn); - } - -@@ -937,8 +937,11 @@ void pa_alsa_init_proplist_pcm_info(pa_core *c, pa_proplist *p, snd_pcm_info_t * - if (alsa_subclass_table[subclass]) - pa_proplist_sets(p, "alsa.subclass", alsa_subclass_table[subclass]); - -- if ((n = snd_pcm_info_get_name(pcm_info))) -- pa_proplist_sets(p, "alsa.name", n); -+ if ((n = snd_pcm_info_get_name(pcm_info))) { -+ char *t = pa_xstrdup(n); -+ pa_proplist_sets(p, "alsa.name", pa_strip(t)); -+ pa_xfree(t); -+ } - - if ((id = snd_pcm_info_get_id(pcm_info))) - pa_proplist_sets(p, "alsa.id", id); -@@ -1331,6 +1334,5 @@ pa_bool_t pa_alsa_may_tsched(pa_bool_t want) { - return FALSE; - } - -- - return TRUE; - } --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0059-alsa-reset-max_rewind-max_request-while-suspending.diff b/packages/audio/pulseaudio/patches/0059-alsa-reset-max_rewind-max_request-while-suspending.diff deleted file mode 100644 index 2931eddd0f..0000000000 --- a/packages/audio/pulseaudio/patches/0059-alsa-reset-max_rewind-max_request-while-suspending.diff +++ /dev/null @@ -1,48 +0,0 @@ -From dd682d6f96fe7133b866c97b72edcb6136a9737c Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 22 Feb 2010 04:54:24 +0100 -Subject: [PATCH 59/62] alsa: reset max_rewind/max_request while suspending - ---- - src/modules/alsa/alsa-sink.c | 11 ++++++++++- - 1 files changed, 10 insertions(+), 1 deletions(-) - -diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c -index 690480f..60c10c4 100644 ---- a/src/modules/alsa/alsa-sink.c -+++ b/src/modules/alsa/alsa-sink.c -@@ -79,7 +79,7 @@ - #define TSCHED_MIN_WAKEUP_USEC (4*PA_USEC_PER_MSEC) /* 4ms -- Wakeup at least this long before the buffer runs empty*/ - - #define SMOOTHER_MIN_INTERVAL (2*PA_USEC_PER_MSEC) /* 2ms -- min smoother update interval */ --#define SMOOTHER_MAX_INTERVAL (200*PA_USEC_PER_MSEC) /* 200ms -- max smoother update inteval */ -+#define SMOOTHER_MAX_INTERVAL (200*PA_USEC_PER_MSEC) /* 200ms -- max smoother update interval */ - - #define VOLUME_ACCURACY (PA_VOLUME_NORM/100) /* don't require volume adjustments to be perfectly correct. don't necessarily extend granularity in software unless the differences get greater than this level */ - -@@ -876,6 +876,14 @@ static int suspend(struct userdata *u) { - u->alsa_rtpoll_item = NULL; - } - -+ /* We reset max_rewind/max_request here to make sure that while we -+ * are suspended the old max_request/max_rewind values set before -+ * the suspend can influence the per-stream buffer of newly -+ * created streams, without their requirements having any -+ * influence on them. */ -+ pa_sink_set_max_rewind_within_thread(u->sink, 0); -+ pa_sink_set_max_request_within_thread(u->sink, 0); -+ - pa_log_info("Device suspended..."); - - return 0; -@@ -933,6 +941,7 @@ static int update_sw_params(struct userdata *u) { - } - - pa_sink_set_max_request_within_thread(u->sink, u->hwbuf_size - u->hwbuf_unused); -+ pa_sink_set_max_rewind_within_thread(u->sink, u->hwbuf_size); - - return 0; - } --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0060-core-util-introduce-generic-function-pa_strip.diff b/packages/audio/pulseaudio/patches/0060-core-util-introduce-generic-function-pa_strip.diff deleted file mode 100644 index 9e7b01a469..0000000000 --- a/packages/audio/pulseaudio/patches/0060-core-util-introduce-generic-function-pa_strip.diff +++ /dev/null @@ -1,78 +0,0 @@ -From 195069c1815a1483b2c44f8cc72e2dd25e9b8fb1 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Sun, 21 Feb 2010 21:59:53 +0100 -Subject: [PATCH 60/62] core-util: introduce generic function pa_strip() - ---- - src/pulsecore/core-util.c | 28 ++++++++++++++++++++++++---- - src/pulsecore/core-util.h | 1 + - 2 files changed, 25 insertions(+), 4 deletions(-) - -diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c -index 258e8ee..d6017b9 100644 ---- a/src/pulsecore/core-util.c -+++ b/src/pulsecore/core-util.c -@@ -126,6 +126,9 @@ - #define MSG_NOSIGNAL 0 - #endif - -+#define NEWLINE "\r\n" -+#define WHITESPACE "\n\r \t" -+ - static pa_strlist *recorded_env = NULL; - - #ifdef OS_IS_WIN32 -@@ -830,9 +833,6 @@ char *pa_split(const char *c, const char *delimiter, const char**state) { - return pa_xstrndup(current, l); - } - --/* What is interpreted as whitespace? */ --#define WHITESPACE " \t\n" -- - /* Split a string into words. Otherwise similar to pa_split(). */ - char *pa_split_spaces(const char *c, const char **state) { - const char *current = *state ? *state : c; -@@ -1189,7 +1189,27 @@ int pa_lock_fd(int fd, int b) { - char* pa_strip_nl(char *s) { - pa_assert(s); - -- s[strcspn(s, "\r\n")] = 0; -+ s[strcspn(s, NEWLINE)] = 0; -+ return s; -+} -+ -+char *pa_strip(char *s) { -+ char *e, *l = NULL; -+ -+ /* Drops trailing whitespace. Modifies the string in -+ * place. Returns pointer to first non-space character */ -+ -+ s += strspn(s, WHITESPACE); -+ -+ for (e = s; *e; e++) -+ if (!strchr(WHITESPACE, *e)) -+ l = e; -+ -+ if (l) -+ *(l+1) = 0; -+ else -+ *s = 0; -+ - return s; - } - -diff --git a/src/pulsecore/core-util.h b/src/pulsecore/core-util.h -index eba1b40..71be9de 100644 ---- a/src/pulsecore/core-util.h -+++ b/src/pulsecore/core-util.h -@@ -102,6 +102,7 @@ char *pa_split(const char *c, const char*delimiters, const char **state); - char *pa_split_spaces(const char *c, const char **state); - - char *pa_strip_nl(char *s); -+char *pa_strip(char *s); - - const char *pa_sig2str(int sig) PA_GCC_PURE; - --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0061-esd-simple-use-pa_memblockq_pop_missing.diff b/packages/audio/pulseaudio/patches/0061-esd-simple-use-pa_memblockq_pop_missing.diff deleted file mode 100644 index 19fd57b14d..0000000000 --- a/packages/audio/pulseaudio/patches/0061-esd-simple-use-pa_memblockq_pop_missing.diff +++ /dev/null @@ -1,46 +0,0 @@ -From 30f28ebf3619a86b49009e8dbce154233f597dbb Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 23 Feb 2010 00:48:35 +0100 -Subject: [PATCH 61/62] esd,simple: use pa_memblockq_pop_missing() - -We need to use pa_memblockq_pop_missing() for all request handling, -including the initial request, because otherwise the counters will be -stay off during the entire runtime. - -This should fix: - -https://bugzilla.redhat.com/show_bug.cgi?id=559467 ---- - src/pulsecore/protocol-esound.c | 2 +- - src/pulsecore/protocol-simple.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/pulsecore/protocol-esound.c b/src/pulsecore/protocol-esound.c -index a89f327..1e16334 100644 ---- a/src/pulsecore/protocol-esound.c -+++ b/src/pulsecore/protocol-esound.c -@@ -462,7 +462,7 @@ static int esd_proto_stream_play(connection *c, esd_proto_t request, const void - - c->protocol->n_player++; - -- pa_atomic_store(&c->playback.missing, (int) pa_memblockq_missing(c->input_memblockq)); -+ pa_atomic_store(&c->playback.missing, (int) pa_memblockq_pop_missing(c->input_memblockq)); - - pa_sink_input_put(c->sink_input); - -diff --git a/src/pulsecore/protocol-simple.c b/src/pulsecore/protocol-simple.c -index fb2e564..77277e1 100644 ---- a/src/pulsecore/protocol-simple.c -+++ b/src/pulsecore/protocol-simple.c -@@ -574,7 +574,7 @@ void pa_simple_protocol_connect(pa_simple_protocol *p, pa_iochannel *io, pa_simp - - pa_iochannel_socket_set_rcvbuf(io, l); - -- pa_atomic_store(&c->playback.missing, (int) pa_memblockq_missing(c->input_memblockq)); -+ pa_atomic_store(&c->playback.missing, (int) pa_memblockq_pop_missing(c->input_memblockq)); - - pa_sink_input_put(c->sink_input); - } --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/0062-core-rework-how-stream-volumes-affect-sink-volumes.diff b/packages/audio/pulseaudio/patches/0062-core-rework-how-stream-volumes-affect-sink-volumes.diff deleted file mode 100644 index 6197e5e1a8..0000000000 --- a/packages/audio/pulseaudio/patches/0062-core-rework-how-stream-volumes-affect-sink-volumes.diff +++ /dev/null @@ -1,72 +0,0 @@ -From 0d1154d078f8f149e2ab9a67b09835a829416e49 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 23 Feb 2010 18:41:18 +0100 -Subject: [PATCH 62/62] core: rework how stream volumes affect sink volumes - ---- - src/pulsecore/sink.c | 42 +++++++++++++++++++++++++++++++++++++++++- - 1 files changed, 41 insertions(+), 1 deletions(-) - -diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c -index e6d718f..3a92f67 100644 ---- a/src/pulsecore/sink.c -+++ b/src/pulsecore/sink.c -@@ -1162,6 +1162,46 @@ pa_usec_t pa_sink_get_latency_within_thread(pa_sink *s) { - return usec; - } - -+static pa_cvolume* cvolume_remap_minimal_impact( -+ pa_cvolume *v, -+ const pa_cvolume *template, -+ const pa_channel_map *from, -+ const pa_channel_map *to) { -+ -+ pa_cvolume t; -+ -+ pa_assert(v); -+ pa_assert(template); -+ pa_assert(from); -+ pa_assert(to); -+ -+ pa_return_val_if_fail(pa_cvolume_compatible_with_channel_map(v, from), NULL); -+ pa_return_val_if_fail(pa_cvolume_compatible_with_channel_map(template, to), NULL); -+ -+ /* Much like pa_cvolume_remap(), but tries to minimize impact when -+ * mapping from sink input to sink volumes: -+ * -+ * If template is a possible remapping from v it is used instead -+ * of remapping anew. -+ * -+ * If the channel maps don't match we set an all-channel volume on -+ * the sink to ensure that changing a volume on one stream has no -+ * effect that cannot be compensated for in another stream that -+ * does not have the same channel map as the sink. */ -+ -+ if (pa_channel_map_equal(from, to)) -+ return v; -+ -+ t = *template; -+ if (pa_cvolume_equal(pa_cvolume_remap(&t, to, from), v)) { -+ *v = *template; -+ return v; -+ } -+ -+ pa_cvolume_set(v, to->channels, pa_cvolume_max(v)); -+ return v; -+} -+ - /* Called from main context */ - static void compute_reference_ratios(pa_sink *s) { - uint32_t idx; -@@ -1289,7 +1329,7 @@ static void compute_real_volume(pa_sink *s) { - pa_cvolume remapped; - - remapped = i->volume; -- pa_cvolume_remap(&remapped, &i->channel_map, &s->channel_map); -+ cvolume_remap_minimal_impact(&remapped, &s->real_volume, &i->channel_map, &s->channel_map); - pa_cvolume_merge(&s->real_volume, &s->real_volume, &remapped); - } - --- -1.7.0 - diff --git a/packages/audio/pulseaudio/patches/02_no-st_uid.diff b/packages/audio/pulseaudio/patches/02_no-st_uid.diff deleted file mode 100644 index ebb630c859..0000000000 --- a/packages/audio/pulseaudio/patches/02_no-st_uid.diff +++ /dev/null @@ -1,58 +0,0 @@ ---- pulseaudio-0.9.21/src/pulse/context.c.orig 2009-11-22 22:57:06.000000000 -0500 -+++ pulseaudio-0.9.21/src/pulse/context.c 2010-05-10 10:57:57.000000000 -0400 -@@ -603,11 +603,6 @@ - return NULL; - } - -- if (st.st_uid != getuid()) { -- pa_xfree(p); -- return NULL; -- } -- - return p; - } - -@@ -625,11 +620,6 @@ - return NULL; - } - -- if (st.st_uid != getuid()) { -- pa_xfree(p); -- return NULL; -- } -- - return p; - } - #endif ---- pulseaudio-0.9.21/src/pulsecore/core-util.c.orig 2009-11-22 22:57:07.000000000 -0500 -+++ pulseaudio-0.9.21/src/pulsecore/core-util.c 2010-05-10 10:59:12.000000000 -0400 -@@ -235,8 +235,6 @@ - - #ifndef OS_IS_WIN32 - if (!S_ISDIR(st.st_mode) || -- (st.st_uid != uid) || -- (st.st_gid != gid) || - ((st.st_mode & 0777) != m)) { - errno = EACCES; - goto fail; -@@ -1293,12 +1291,6 @@ - goto finish; - } - -- if (st.st_uid != getuid()) { -- pa_log_error("Home directory %s not ours.", h); -- errno = EACCES; -- goto finish; -- } -- - ret = pa_sprintf_malloc("%s" PA_PATH_SEP ".pulse", h); - - finish: -@@ -1524,7 +1516,6 @@ - } else { - - if (S_ISDIR(st.st_mode) && -- (st.st_uid == getuid()) && - ((st.st_mode & 0777) == 0700)) { - - pa_xfree(p); diff --git a/packages/audio/speex/meta b/packages/audio/speex/meta index cece44002d..e6e68ee7e9 100644 --- a/packages/audio/speex/meta +++ b/packages/audio/speex/meta @@ -12,3 +12,5 @@ PKG_SECTION="audio" PKG_SHORTDESC="speex: A free Audio Codec optimized for speech" PKG_LONGDESC="Speex is a patent-free compression format designed especially for speech. It is specialized for voice communications at low bit-rates in the 2-45 kbps range. Possible applications include Voice over IP (VoIP), Internet audio streaming, audio books, and archiving of speech data (e.g. voice mail)." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/audio/speex/patches/001-remove_host_includes.diff b/packages/audio/speex/patches/speex-1.2rc1-001-remove_host_includes.patch similarity index 100% rename from packages/audio/speex/patches/001-remove_host_includes.diff rename to packages/audio/speex/patches/speex-1.2rc1-001-remove_host_includes.patch diff --git a/packages/audio/speex/patches/10_disable-utils.diff b/packages/audio/speex/patches/speex-1.2rc1-010_disable-utils.patch similarity index 100% rename from packages/audio/speex/patches/10_disable-utils.diff rename to packages/audio/speex/patches/speex-1.2rc1-010_disable-utils.patch diff --git a/packages/audio/wavpack/build b/packages/audio/wavpack/build index f887f8ecc2..40d9ca6eb8 100755 --- a/packages/audio/wavpack/build +++ b/packages/audio/wavpack/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/audio/wavpack/install b/packages/audio/wavpack/install index b4d582ea1f..a0f9a6ac83 100755 --- a/packages/audio/wavpack/install +++ b/packages/audio/wavpack/install @@ -3,5 +3,5 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/src/.libs/*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/src/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/audio/wavpack/meta b/packages/audio/wavpack/meta new file mode 100644 index 0000000000..8a7f9e7fbc --- /dev/null +++ b/packages/audio/wavpack/meta @@ -0,0 +1,16 @@ +PKG_NAME="wavpack" +PKG_VERSION="4.60.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.wavpack.com" +PKG_URL="http://www.wavpack.com/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="audio" +PKG_SHORTDESC="wavpack: a completely open audio compression format" +PKG_LONGDESC="WavPack is a completely open audio compression format providing lossless, high-quality lossy, and a unique hybrid compression mode. Although the technology is loosely based on previous versions of WavPack, the new version 4 format has been designed from the ground up to offer unparalleled performance and functionality." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/audio/wavpack/url b/packages/audio/wavpack/url deleted file mode 100644 index 35be9ccc58..0000000000 --- a/packages/audio/wavpack/url +++ /dev/null @@ -1 +0,0 @@ -http://www.wavpack.com/wavpack-4.60.1.tar.bz2 diff --git a/packages/compress/bzip2/build b/packages/compress/bzip2/build index 8a0e04a076..a565e88f69 100755 --- a/packages/compress/bzip2/build +++ b/packages/compress/bzip2/build @@ -4,6 +4,8 @@ cd $PKG_BUILD +sed -e "s,ln -s (lib.*),ln -snf \$$1; ln -snf libbz2.so.$PKG_VERSION libbz2.so,g" -i Makefile-libbz2_so + make CC=$TARGET_CC RANLIB=$TARGET_RANLIB AR=$TARGET_AR -f Makefile-libbz2_so ln -snf libbz2.so.1.0 libbz2.so diff --git a/packages/compress/bzip2/meta b/packages/compress/bzip2/meta index 495bbd7ed6..0e6858c314 100644 --- a/packages/compress/bzip2/meta +++ b/packages/compress/bzip2/meta @@ -12,3 +12,5 @@ PKG_SECTION="compress" PKG_SHORTDESC="bzip2 data compressor" PKG_LONGDESC="bzip2 is a freely available, patent free (see below), high-quality data compressor. It typically compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical compressors), whilst being around twice as fast at compression and six times faster at decompression." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/compress/bzip2/unpack b/packages/compress/bzip2/unpack deleted file mode 100755 index 71de4b58e0..0000000000 --- a/packages/compress/bzip2/unpack +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -. config/options $1 - -SRC_DIR=`ls -d $PKG_BUILD` - -BZIP2_VERSION=1.0.5 - -sed -i -e "s,ln -s (lib.*),ln -snf \$$1; ln -snf libbz2.so.$BZIP2_VERSION libbz2.so,g" \ - $SRC_DIR/Makefile-libbz2_so diff --git a/packages/compress/lzo/build b/packages/compress/lzo/build index 186f78693d..815fdf1043 100755 --- a/packages/compress/lzo/build +++ b/packages/compress/lzo/build @@ -14,4 +14,4 @@ cd $PKG_BUILD make -$MAKEINSTALL \ No newline at end of file +$MAKEINSTALL diff --git a/packages/compress/lzo/meta b/packages/compress/lzo/meta index 4f50440f66..531408d3a7 100644 --- a/packages/compress/lzo/meta +++ b/packages/compress/lzo/meta @@ -1,5 +1,5 @@ PKG_NAME="lzo" -PKG_VERSION="2.03" +PKG_VERSION="2.04" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" @@ -12,3 +12,5 @@ PKG_SECTION="compress" PKG_SHORTDESC="LZO data compressor" PKG_LONGDESC="LZO is a data compression library which is suitable for data de-/compression in real-time. This means it favours speed over compression ratio." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/compress/lzo/patches/lzo-2.04-acinclude_m4.patch b/packages/compress/lzo/patches/lzo-2.04-acinclude_m4.patch new file mode 100644 index 0000000000..8f860f4cc0 --- /dev/null +++ b/packages/compress/lzo/patches/lzo-2.04-acinclude_m4.patch @@ -0,0 +1,377 @@ +The lzo tarball only contains an aclocal.m4, which is the result from +running aclocal. Unfortunately, it lacks the acinclude.m4 file which +would allow us to do an autoreconf of the package. Therefore, this +patch extracts from aclocal.m4 the parts that are specific to this lzo +package, and put them into an acinclude.m4 so that autoreconf on this +package will work. + +Signed-off-by: Thomas Petazzoni +--- + acinclude.m4 | 360 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 360 insertions(+) + +Index: lzo-2.03/acinclude.m4 +=================================================================== +--- /dev/null ++++ lzo-2.03/acinclude.m4 +@@ -0,0 +1,360 @@ ++# /*********************************************************************** ++# // standard ACC macros ++# ************************************************************************/ ++ ++AC_DEFUN([mfx_ACC_CHECK_ENDIAN], [ ++AC_C_BIGENDIAN([AC_DEFINE(ACC_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(ACC_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])]) ++])# ++ ++AC_DEFUN([mfx_ACC_CHECK_HEADERS], [ ++AC_HEADER_TIME ++AC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h float.h limits.h malloc.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/mman.h sys/resource.h sys/stat.h sys/time.h sys/types.h sys/wait.h]) ++])# ++ ++AC_DEFUN([mfx_ACC_CHECK_FUNCS], [ ++AC_CHECK_FUNCS(access alloca atexit atoi atol chmod chown clock_getcpuclockid clock_getres clock_gettime ctime difftime fstat getenv getpagesize getrusage gettimeofday gmtime isatty localtime longjmp lstat memcmp memcpy memmove memset mkdir mktime mmap mprotect munmap qsort raise rmdir setjmp signal snprintf strcasecmp strchr strdup strerror strftime stricmp strncasecmp strnicmp strrchr strstr time umask utime vsnprintf) ++])# ++ ++ ++AC_DEFUN([mfx_ACC_CHECK_SIZEOF], [ ++AC_CHECK_SIZEOF(short) ++AC_CHECK_SIZEOF(int) ++AC_CHECK_SIZEOF(long) ++ ++AC_CHECK_SIZEOF(long long) ++AC_CHECK_SIZEOF(__int16) ++AC_CHECK_SIZEOF(__int32) ++AC_CHECK_SIZEOF(__int64) ++ ++AC_CHECK_SIZEOF(void *) ++AC_CHECK_SIZEOF(size_t) ++AC_CHECK_SIZEOF(ptrdiff_t) ++])# ++ ++ ++# /*********************************************************************** ++# // Check for ACC_conformance ++# ************************************************************************/ ++ ++AC_DEFUN([mfx_ACC_ACCCHK], [ ++mfx_tmp=$1 ++mfx_save_CPPFLAGS=$CPPFLAGS ++dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here ++test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS" ++ ++AC_MSG_CHECKING([whether your compiler passes the ACC conformance test]) ++ ++AC_LANG_CONFTEST([AC_LANG_PROGRAM( ++[[#define ACC_CONFIG_NO_HEADER 1 ++#include "acc/acc.h" ++#include "acc/acc_incd.h" ++#undef ACCCHK_ASSERT ++#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr) ++#include "acc/acc_chk.ch" ++#undef ACCCHK_ASSERT ++static void test_acc_compile_time_assert(void) { ++#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr) ++#include "acc/acc_chk.ch" ++#undef ACCCHK_ASSERT ++} ++#undef NDEBUG ++#include ++static int test_acc_run_time_assert(int r) { ++#define ACCCHK_ASSERT(expr) assert(expr); ++#include "acc/acc_chk.ch" ++#undef ACCCHK_ASSERT ++return r; ++} ++]], [[ ++test_acc_compile_time_assert(); ++if (test_acc_run_time_assert(1) != 1) return 1; ++]] ++)]) ++ ++mfx_tmp=FAILED ++_AC_COMPILE_IFELSE([], [mfx_tmp=yes]) ++rm -f conftest.$ac_ext conftest.$ac_objext ++ ++CPPFLAGS=$mfx_save_CPPFLAGS ++ ++AC_MSG_RESULT([$mfx_tmp]) ++case x$mfx_tmp in ++ xpassed | xyes) ;; ++ *) ++ AC_MSG_NOTICE([]) ++ AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ]) ++ AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending]) ++ AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.]) ++ AC_MSG_NOTICE([Thanks for your support.]) ++ AC_MSG_NOTICE([]) ++ AC_MSG_ERROR([ACC conformance test failed. Stop.]) ++dnl AS_EXIT ++ ;; ++esac ++])# mfx_ACC_ACCCHK ++ ++ ++# /*********************************************************************** ++# // Check for ACC_conformance ++# ************************************************************************/ ++ ++AC_DEFUN([mfx_MINIACC_ACCCHK], [ ++mfx_tmp=$1 ++mfx_save_CPPFLAGS=$CPPFLAGS ++dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here ++test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS" ++ ++AC_MSG_CHECKING([whether your compiler passes the ACC conformance test]) ++ ++AC_LANG_CONFTEST([AC_LANG_PROGRAM( ++[[#define ACC_CONFIG_NO_HEADER 1 ++#define ACC_WANT_ACC_INCD_H 1 ++#include $2 ++ ++#define ACC_WANT_ACC_CHK_CH 1 ++#undef ACCCHK_ASSERT ++#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr) ++#include $2 ++ ++#define ACC_WANT_ACC_CHK_CH 1 ++#undef ACCCHK_ASSERT ++#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr) ++static void test_acc_compile_time_assert(void) { ++#include $2 ++} ++ ++#undef NDEBUG ++#include ++#define ACC_WANT_ACC_CHK_CH 1 ++#undef ACCCHK_ASSERT ++#define ACCCHK_ASSERT(expr) assert(expr); ++static int test_acc_run_time_assert(int r) { ++#include $2 ++return r; ++} ++]], [[ ++test_acc_compile_time_assert(); ++if (test_acc_run_time_assert(1) != 1) return 1; ++]] ++)]) ++ ++mfx_tmp=FAILED ++_AC_COMPILE_IFELSE([], [mfx_tmp=yes]) ++rm -f conftest.$ac_ext conftest.$ac_objext ++ ++CPPFLAGS=$mfx_save_CPPFLAGS ++ ++AC_MSG_RESULT([$mfx_tmp]) ++case x$mfx_tmp in ++ xpassed | xyes) ;; ++ *) ++ AC_MSG_NOTICE([]) ++ AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ]) ++ AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending]) ++ AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.]) ++ AC_MSG_NOTICE([Thanks for your support.]) ++ AC_MSG_NOTICE([]) ++ AC_MSG_ERROR([ACC conformance test failed. Stop.]) ++dnl AS_EXIT ++ ;; ++esac ++])# mfx_MINIACC_ACCCHK ++ ++ ++ ++# serial 1 ++ ++AC_DEFUN([mfx_PROG_CPPFLAGS], [ ++AC_MSG_CHECKING([whether the C preprocessor needs special flags]) ++ ++AC_LANG_CONFTEST([AC_LANG_PROGRAM( ++[[#include ++#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul) ++# include "your C preprocessor is broken 1" ++#elif (0xffffu == 0xfffffffful) ++# include "your C preprocessor is broken 2" ++#elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX) ++# include "your C preprocessor is broken 3" ++#endif ++]], [[ ]] ++)]) ++ ++mfx_save_CPPFLAGS=$CPPFLAGS ++mfx_tmp=ERROR ++for mfx_arg in "" -no-cpp-precomp ++do ++ CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS" ++ _AC_COMPILE_IFELSE([], ++[mfx_tmp=$mfx_arg ++break]) ++done ++CPPFLAGS=$mfx_save_CPPFLAGS ++rm -f conftest.$ac_ext conftest.$ac_objext ++case x$mfx_tmp in ++ x) ++ AC_MSG_RESULT([none needed]) ;; ++ xERROR) ++ AC_MSG_RESULT([ERROR]) ++ AC_MSG_ERROR([your C preprocessor is broken - for details see config.log]) ++ ;; ++ *) ++ AC_MSG_RESULT([$mfx_tmp]) ++ CPPFLAGS="$mfx_tmp $CPPFLAGS" ++ ;; ++esac ++])# mfx_PROG_CPPFLAGS ++ ++# serial 3 ++ ++AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [ ++AC_CACHE_CHECK([whether limits.h is sane], ++mfx_cv_header_sane_limits_h, ++[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ++#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul) ++# if defined(__APPLE__) && defined(__GNUC__) ++# error "your preprocessor is broken - use compiler option -no-cpp-precomp" ++# else ++# include "your preprocessor is broken" ++# endif ++#endif ++#define MFX_0xffff 0xffff ++#define MFX_0xffffffffL 4294967295ul ++#if !defined(CHAR_BIT) || (CHAR_BIT != 8) ++# include "error CHAR_BIT" ++#endif ++#if !defined(UCHAR_MAX) ++# include "error UCHAR_MAX 1" ++#endif ++#if !defined(USHRT_MAX) ++# include "error USHRT_MAX 1" ++#endif ++#if !defined(UINT_MAX) ++# include "error UINT_MAX 1" ++#endif ++#if !defined(ULONG_MAX) ++# include "error ULONG_MAX 1" ++#endif ++#if !defined(SHRT_MAX) ++# include "error SHRT_MAX 1" ++#endif ++#if !defined(INT_MAX) ++# include "error INT_MAX 1" ++#endif ++#if !defined(LONG_MAX) ++# include "error LONG_MAX 1" ++#endif ++#if (UCHAR_MAX < 1) ++# include "error UCHAR_MAX 2" ++#endif ++#if (USHRT_MAX < 1) ++# include "error USHRT_MAX 2" ++#endif ++#if (UINT_MAX < 1) ++# include "error UINT_MAX 2" ++#endif ++#if (ULONG_MAX < 1) ++# include "error ULONG_MAX 2" ++#endif ++#if (UCHAR_MAX < 0xff) ++# include "error UCHAR_MAX 3" ++#endif ++#if (USHRT_MAX < MFX_0xffff) ++# include "error USHRT_MAX 3" ++#endif ++#if (UINT_MAX < MFX_0xffff) ++# include "error UINT_MAX 3" ++#endif ++#if (ULONG_MAX < MFX_0xffffffffL) ++# include "error ULONG_MAX 3" ++#endif ++#if (USHRT_MAX > UINT_MAX) ++# include "error USHRT_MAX vs UINT_MAX" ++#endif ++#if (UINT_MAX > ULONG_MAX) ++# include "error UINT_MAX vs ULONG_MAX" ++#endif ++]], [[ ++#if (USHRT_MAX == MFX_0xffff) ++{ typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; } ++#elif (USHRT_MAX >= MFX_0xffff) ++{ typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; } ++#endif ++#if (UINT_MAX == MFX_0xffff) ++{ typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; } ++#elif (UINT_MAX >= MFX_0xffff) ++{ typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; } ++#endif ++#if (ULONG_MAX == MFX_0xffff) ++{ typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; } ++#elif (ULONG_MAX >= MFX_0xffff) ++{ typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; } ++#endif ++#if !defined(_CRAY1) /* CRAY PVP systems */ ++#if (USHRT_MAX == MFX_0xffffffffL) ++{ typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; } ++#elif (USHRT_MAX >= MFX_0xffffffffL) ++{ typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; } ++#endif ++#endif /* _CRAY1 */ ++#if (UINT_MAX == MFX_0xffffffffL) ++{ typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; } ++#elif (UINT_MAX >= MFX_0xffffffffL) ++{ typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; } ++#endif ++#if (ULONG_MAX == MFX_0xffffffffL) ++{ typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; } ++#elif (ULONG_MAX >= MFX_0xffffffffL) ++{ typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; } ++#endif ++]])], ++[mfx_cv_header_sane_limits_h=yes], ++[mfx_cv_header_sane_limits_h=no])]) ++]) ++ ++# /*********************************************************************** ++# // standard ++# ************************************************************************/ ++ ++AC_DEFUN([mfx_LZO_CHECK_ENDIAN], [ ++AC_C_BIGENDIAN([AC_DEFINE(LZO_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(LZO_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])]) ++])# ++ ++ ++# /*********************************************************************** ++# // ++# ************************************************************************/ ++ ++dnl more types which are not yet covered by ACC ++ ++AC_DEFUN([mfx_CHECK_SIZEOF], [ ++AC_CHECK_SIZEOF(__int32) ++AC_CHECK_SIZEOF(intmax_t) ++AC_CHECK_SIZEOF(uintmax_t) ++AC_CHECK_SIZEOF(intptr_t) ++AC_CHECK_SIZEOF(uintptr_t) ++ ++AC_CHECK_SIZEOF(float) ++AC_CHECK_SIZEOF(double) ++AC_CHECK_SIZEOF(long double) ++ ++AC_CHECK_SIZEOF(dev_t) ++AC_CHECK_SIZEOF(fpos_t) ++AC_CHECK_SIZEOF(mode_t) ++AC_CHECK_SIZEOF(off_t) ++AC_CHECK_SIZEOF(ssize_t) ++AC_CHECK_SIZEOF(time_t) ++])# ++ ++ ++ ++AC_DEFUN([mfx_CHECK_LIB_WINMM], [ ++if test "X$GCC" = Xyes; then ++case $host_os in ++cygwin* | mingw* | pw32*) ++ test "X$LIBS" != "X" && LIBS="$LIBS " ++ LIBS="${LIBS}-lwinmm" ;; ++*) ++ ;; ++esac ++fi ++])# diff --git a/packages/compress/lzo/patches/lzo-2.04-fix_makefile_am.patch b/packages/compress/lzo/patches/lzo-2.04-fix_makefile_am.patch new file mode 100644 index 0000000000..9f23e40db1 --- /dev/null +++ b/packages/compress/lzo/patches/lzo-2.04-fix_makefile_am.patch @@ -0,0 +1,24 @@ +Makefile.am is not allowed to override CFLAGS/CPPFLAGS, it must use +AM_CFLAGS and AM_CPPFLAGS. This is needed in order for autoreconf to +work on this package. + +Signed-off-by: Thomas Petazzoni +--- + src/Makefile.am | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: lzo-2.03/src/Makefile.am +=================================================================== +--- lzo-2.03.orig/src/Makefile.am ++++ lzo-2.03/src/Makefile.am +@@ -7,8 +7,8 @@ + SUFFIXES = .S + + INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir) +-CPPFLAGS = $(LZO_CPPFLAGS) $(configure_CPPFLAGS) $(LZO_EXTRA_CPPFLAGS) +-CFLAGS = $(LZO_CFLAGS) $(configure_CFLAGS) $(LZO_EXTRA_CFLAGS) ++AM_CPPFLAGS = $(LZO_CPPFLAGS) $(configure_CPPFLAGS) $(LZO_EXTRA_CPPFLAGS) ++AM_CFLAGS = $(LZO_CFLAGS) $(configure_CFLAGS) $(LZO_EXTRA_CFLAGS) + + lib_LTLIBRARIES = liblzo2.la + diff --git a/packages/compress/unrar/meta b/packages/compress/unrar/meta index 547e4d33ed..dd0eeca421 100644 --- a/packages/compress/unrar/meta +++ b/packages/compress/unrar/meta @@ -12,3 +12,5 @@ PKG_SECTION="compress" PKG_SHORTDESC="unrar: Extract, test and view RAR archives" PKG_LONGDESC="Unrar is a package to handle files compressed in the RAR format. Due to strange licensing issues this package can only view, test and extract files in a given archive, but not pack files. But since we have far more advanced open-source compression utils it should be enough to extract the content when you get a RAR archive." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/compress/unzip/meta b/packages/compress/unzip/meta index d413d8753b..affdd0b238 100644 --- a/packages/compress/unzip/meta +++ b/packages/compress/unzip/meta @@ -12,3 +12,5 @@ PKG_SECTION="compress" PKG_SHORTDESC="unzip: PKUNZIP compatible compression utility" PKG_LONGDESC="UnZip is an extraction utility for archives compressed in .zip format (also called "zipfiles"). Although highly compatible both with PKWARE's PKZIP and PKUNZIP utilities for MS-DOS and with Info-ZIP's own Zip program, the primary objectives have been portability and non-MSDOS functionality." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/compress/zlib/meta b/packages/compress/zlib/meta index 684bbe4907..26dd3914ce 100644 --- a/packages/compress/zlib/meta +++ b/packages/compress/zlib/meta @@ -12,3 +12,5 @@ PKG_SECTION="compress" PKG_SHORTDESC="zlib: A general purpose (ZIP) data compression library" PKG_LONGDESC="zlib is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format)." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/databases/mysql-hosttools/build b/packages/databases/mysql-hosttools/build index 53875838a0..c6f7578880 100755 --- a/packages/databases/mysql-hosttools/build +++ b/packages/databases/mysql-hosttools/build @@ -7,12 +7,8 @@ $SCRIPTS/unpack mysql setup_toolchain host cd $BUILD/mysql* - -$AUTORECONF - -mkdir -p .objdir-host -cd .objdir-host - +do_autoreconf +mkdir -p .objdir-host && cd .objdir-host ../configure --prefix=/usr \ --sysconfdir=/etc \ --libexecdir=/usr/sbin \ diff --git a/packages/databases/mysql-hosttools/meta b/packages/databases/mysql-hosttools/meta index 5d71bc3650..8f6ccd06cd 100644 --- a/packages/databases/mysql-hosttools/meta +++ b/packages/databases/mysql-hosttools/meta @@ -12,3 +12,5 @@ PKG_SECTION="database" PKG_SHORTDESC="mysql: A database server" PKG_LONGDESC="MySQL is a SQL (Structured Query Language) database server. SQL is the most popular database language in the world. MySQL is a client server implementation that consists of a server daemon mysqld and many different client programs/libraries." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/databases/mysql/build b/packages/databases/mysql/build index ad9a9b53f0..c7aa0bbe12 100755 --- a/packages/databases/mysql/build +++ b/packages/databases/mysql/build @@ -3,9 +3,6 @@ . config/options $1 cd $PKG_BUILD - -$AUTORECONF - ac_cv_c_stack_direction=-1 \ ac_cv_sys_restartable_syscalls=yes \ ./configure --host=$TARGET_NAME \ diff --git a/packages/databases/mysql/meta b/packages/databases/mysql/meta index b7ae82a056..f1420f7147 100644 --- a/packages/databases/mysql/meta +++ b/packages/databases/mysql/meta @@ -1,5 +1,5 @@ PKG_NAME="mysql" -PKG_VERSION="5.1.51" +PKG_VERSION="5.1.53" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="LGPL" @@ -12,3 +12,5 @@ PKG_SECTION="database" PKG_SHORTDESC="mysql: A database server" PKG_LONGDESC="MySQL is a SQL (Structured Query Language) database server. SQL is the most popular database language in the world. MySQL is a client server implementation that consists of a server daemon mysqld and many different client programs/libraries." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/databases/mysql/patches/10_mysql-5.1.38_crosscompiling.diff b/packages/databases/mysql/patches/mysql-5.1.53-010_crosscompiling.patch similarity index 100% rename from packages/databases/mysql/patches/10_mysql-5.1.38_crosscompiling.diff rename to packages/databases/mysql/patches/mysql-5.1.53-010_crosscompiling.patch diff --git a/packages/databases/sqlite/meta b/packages/databases/sqlite/meta index e1948dcc99..ac3433184f 100644 --- a/packages/databases/sqlite/meta +++ b/packages/databases/sqlite/meta @@ -12,3 +12,5 @@ PKG_SECTION="database" PKG_SHORTDESC="sqlite: An Embeddable SQL Database Engine" PKG_LONGDESC="SQLite is a C library that implements an embeddable SQL database engine. Programs that link with the SQLite library can have SQL database access without running a separate RDBMS process. The distribution comes with a standalone command-line access program (sqlite) that can be used to administer an SQLite database and which serves as an example of how to use the SQLite library. SQLite is not a client library used to connect to a big database server. SQLite is the server. The SQLite library reads and writes directly to and from the database files on disk." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/databases/sqlite/patches/30_ldflags.diff b/packages/databases/sqlite/patches/sqlite-3.7.3-010_ldflags.patch similarity index 100% rename from packages/databases/sqlite/patches/30_ldflags.diff rename to packages/databases/sqlite/patches/sqlite-3.7.3-010_ldflags.patch diff --git a/packages/debug/evtest/build b/packages/debug/evtest/build index e78dfee985..c63dca2f86 100755 --- a/packages/debug/evtest/build +++ b/packages/debug/evtest/build @@ -2,13 +2,7 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build libxml2 - cd $PKG_BUILD - -$AUTORECONF - ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ diff --git a/packages/debug/evtest/install b/packages/debug/evtest/install index a5d2709815..4912566e50 100755 --- a/packages/debug/evtest/install +++ b/packages/debug/evtest/install @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/install libxml2 - mkdir -p $INSTALL/usr/bin cp $PKG_BUILD/evtest $INSTALL/usr/bin cp $PKG_BUILD/evtest-capture $INSTALL/usr/bin diff --git a/packages/debug/evtest/meta b/packages/debug/evtest/meta new file mode 100644 index 0000000000..946107ec54 --- /dev/null +++ b/packages/debug/evtest/meta @@ -0,0 +1,16 @@ +PKG_NAME="evtest" +PKG_VERSION="1.25" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://cgit.freedesktop.org/~whot/evtest/" +PKG_URL="http://cgit.freedesktop.org/~whot/evtest/snapshot/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libxml2" +PKG_BUILD_DEPENDS="toolchain libxml2" +PKG_PRIORITY="optional" +PKG_SECTION="debug" +PKG_SHORTDESC="evtest: Simple tool for input event debugging." +PKG_LONGDESC="evtest is a simple tool for input event debugging." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/debug/evtest/url b/packages/debug/evtest/url deleted file mode 100644 index 0feffee93b..0000000000 --- a/packages/debug/evtest/url +++ /dev/null @@ -1 +0,0 @@ -http://cgit.freedesktop.org/~whot/evtest/snapshot/evtest-1.25.tar.bz2 \ No newline at end of file diff --git a/packages/debug/gdb/build b/packages/debug/gdb/build index a26d4edf63..5fdfd8841d 100755 --- a/packages/debug/gdb/build +++ b/packages/debug/gdb/build @@ -2,19 +2,13 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build ncurses -$SCRIPTS/build expat - export bash_cv_have_mbstate_t=set export CC_FOR_BUILD="$HOST_CC" export CFLAGS_FOR_BUILD="$HOST_CFLAGS" cd $PKG_BUILD - -mkdir -p objdir -cd objdir +mkdir -p objdir && cd objdir ../configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/debug/gdb/install b/packages/debug/gdb/install index 1222bd6f49..cb8a30b488 100755 --- a/packages/debug/gdb/install +++ b/packages/debug/gdb/install @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/install ncurses -$SCRIPTS/install expat - mkdir -p $INSTALL/usr/bin cp $PKG_BUILD/objdir/$1/$1 $INSTALL/usr/bin cp $PKG_BUILD/objdir/$1/gdbserver/gdbserver $INSTALL/usr/bin diff --git a/packages/debug/gdb/meta b/packages/debug/gdb/meta new file mode 100644 index 0000000000..a9f6b6353f --- /dev/null +++ b/packages/debug/gdb/meta @@ -0,0 +1,16 @@ +PKG_NAME="gdb" +PKG_VERSION="7.2" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.gnu.org/software/gdb/" +PKG_URL="http://ftp.gnu.org/gnu/gdb/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="ncurses expat" +PKG_BUILD_DEPENDS="toolchain ncurses expat" +PKG_PRIORITY="optional" +PKG_SECTION="debug" +PKG_SHORTDESC="gdb: The GNU Debugger" +PKG_LONGDESC="The purpose of a debugger such as GDB is to allow you to see what is going on ``inside'' another program while it executes--or what another program was doing at the moment it crashed." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/debug/gdb/patches/10_uclibc-conf.diff b/packages/debug/gdb/patches/gdb-7.2-10-uclibc_conf.patch similarity index 100% rename from packages/debug/gdb/patches/10_uclibc-conf.diff rename to packages/debug/gdb/patches/gdb-7.2-10-uclibc_conf.patch diff --git a/packages/debug/gdb/url b/packages/debug/gdb/url deleted file mode 100644 index b32860c061..0000000000 --- a/packages/debug/gdb/url +++ /dev/null @@ -1 +0,0 @@ -http://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.bz2 \ No newline at end of file diff --git a/packages/debug/htop/build b/packages/debug/htop/build index 1e9695f1f4..01a7b87f32 100755 --- a/packages/debug/htop/build +++ b/packages/debug/htop/build @@ -2,12 +2,10 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build ncurses +# htop fails to build with GOLD linker + strip_gold cd $PKG_BUILD -$AUTORECONF - ac_cv_func_malloc_0_nonnull=yes \ ac_cv_func_realloc_0_nonnull=yes \ ./configure --host=$TARGET_NAME \ diff --git a/packages/debug/htop/install b/packages/debug/htop/install index c14942e5b1..e5b669e494 100755 --- a/packages/debug/htop/install +++ b/packages/debug/htop/install @@ -2,7 +2,5 @@ . config/options $1 -$SCRIPTS/install ncurses - mkdir -p $INSTALL/usr/bin cp $PKG_BUILD/htop $INSTALL/usr/bin diff --git a/packages/debug/htop/meta b/packages/debug/htop/meta new file mode 100644 index 0000000000..5613f2a2f3 --- /dev/null +++ b/packages/debug/htop/meta @@ -0,0 +1,16 @@ +PKG_NAME="htop" +PKG_VERSION="0.8.3" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://htop.sourceforge.net/" +PKG_URL="http://downloads.sourceforge.net/project/$PKG_NAME/$PKG_NAME/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="ncurses" +PKG_BUILD_DEPENDS="toolchain ncurses" +PKG_PRIORITY="optional" +PKG_SECTION="debug" +PKG_SHORTDESC="htop: Htop is an ncurses based interactive process viewer for Linux." +PKG_LONGDESC="Htop is an ncurses based interactive process viewer for Linux." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/debug/htop/patches/htop-0.8.3-crosscompiling-0.1.diff b/packages/debug/htop/patches/htop-0.8.3-crosscompiling-0.1.patch similarity index 100% rename from packages/debug/htop/patches/htop-0.8.3-crosscompiling-0.1.diff rename to packages/debug/htop/patches/htop-0.8.3-crosscompiling-0.1.patch diff --git a/packages/debug/htop/url b/packages/debug/htop/url deleted file mode 100644 index ac759e4688..0000000000 --- a/packages/debug/htop/url +++ /dev/null @@ -1 +0,0 @@ -http://downloads.sourceforge.net/project/htop/htop/0.8.3/htop-0.8.3.tar.gz \ No newline at end of file diff --git a/packages/debug/install b/packages/debug/install deleted file mode 100755 index 46b124c803..0000000000 --- a/packages/debug/install +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -. config/options $1 - -$SCRIPTS/install strace -$SCRIPTS/install gdb -$SCRIPTS/install mesa-demos -$SCRIPTS/install htop # on user request -$SCRIPTS/install nano # on user request -$SCRIPTS/install wgetpaste -$SCRIPTS/install evtest -$SCRIPTS/install tvdump -$SCRIPTS/install wireless_tools - diff --git a/packages/debug/mesa-demos/build b/packages/debug/mesa-demos/build index 05297e26c2..18a451af7d 100755 --- a/packages/debug/mesa-demos/build +++ b/packages/debug/mesa-demos/build @@ -2,11 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build libX11 -$SCRIPTS/build $MESA -$SCRIPTS/build glew - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/debug/mesa-demos/install b/packages/debug/mesa-demos/install index 45097435df..27269826c4 100755 --- a/packages/debug/mesa-demos/install +++ b/packages/debug/mesa-demos/install @@ -2,10 +2,6 @@ . config/options $1 -$SCRIPTS/install libX11 -$SCRIPTS/install $MESA -$SCRIPTS/install glew - mkdir -p $INSTALL/usr/bin cp $PKG_BUILD/src/xdemos/glxdemo $INSTALL/usr/bin cp $PKG_BUILD/src/xdemos/glxgears $INSTALL/usr/bin diff --git a/packages/debug/mesa-demos/meta b/packages/debug/mesa-demos/meta new file mode 100644 index 0000000000..9961577157 --- /dev/null +++ b/packages/debug/mesa-demos/meta @@ -0,0 +1,16 @@ +PKG_NAME="mesa-demos" +PKG_VERSION="8.0.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.mesa3d.org/" +PKG_URL="ftp://ftp.freedesktop.org/pub/mesa/demos/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libX11 Mesa glew" +PKG_BUILD_DEPENDS="toolchain libX11 Mesa glew" +PKG_PRIORITY="optional" +PKG_SECTION="debug" +PKG_SHORTDESC="mesa-demos: Mesa 3D demos" +PKG_LONGDESC="Mesa 3D demos - installed are the well known glxinfo and glxgears." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/debug/mesa-demos/url b/packages/debug/mesa-demos/url deleted file mode 100644 index a4475f5458..0000000000 --- a/packages/debug/mesa-demos/url +++ /dev/null @@ -1 +0,0 @@ -ftp://ftp.freedesktop.org/pub/mesa/demos/8.0.1/mesa-demos-8.0.1.tar.bz2 \ No newline at end of file diff --git a/packages/debug/meta b/packages/debug/meta new file mode 100644 index 0000000000..0f86ef36b1 --- /dev/null +++ b/packages/debug/meta @@ -0,0 +1,19 @@ +PKG_NAME="debug" +PKG_VERSION="" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.openelec.tv" +PKG_URL="" +PKG_DEPENDS="strace gdb mesa-demos htop nano wgetpaste evtest tvdump w_scan" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="debug" +PKG_SHORTDESC="debug: Metapackage for installing debugging tools" +PKG_LONGDESC="debug is a Metapackage for installing debugging tools" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" + + + diff --git a/packages/debug/nano/build b/packages/debug/nano/build index f607cf6eea..b762113633 100755 --- a/packages/debug/nano/build +++ b/packages/debug/nano/build @@ -2,11 +2,10 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build ncurses +# nano fails to build with GOLD linker + strip_gold cd $PKG_BUILD - ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ diff --git a/packages/debug/nano/install b/packages/debug/nano/install index 8ece062176..4752c489bb 100755 --- a/packages/debug/nano/install +++ b/packages/debug/nano/install @@ -2,7 +2,5 @@ . config/options $1 -$SCRIPTS/install ncurses - mkdir -p $INSTALL/usr/bin cp $PKG_BUILD/src/nano $INSTALL/usr/bin diff --git a/packages/debug/nano/meta b/packages/debug/nano/meta new file mode 100644 index 0000000000..ea7e80940f --- /dev/null +++ b/packages/debug/nano/meta @@ -0,0 +1,16 @@ +PKG_NAME="nano" +PKG_VERSION="2.2.5" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.nano-editor.org/" +PKG_URL="http://www.nano-editor.org/dist/v2.2/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="ncurses" +PKG_BUILD_DEPENDS="toolchain ncurses" +PKG_PRIORITY="optional" +PKG_SECTION="debug" +PKG_SHORTDESC="nano: Pico editor clone with enhancements" +PKG_LONGDESC="GNU nano (Nano's ANOther editor, or Not ANOther editor) is an enhanced clone of the Pico text editor." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/debug/nano/url b/packages/debug/nano/url deleted file mode 100644 index 3a76d3ecd8..0000000000 --- a/packages/debug/nano/url +++ /dev/null @@ -1 +0,0 @@ -http://www.nano-editor.org/dist/v2.2/nano-2.2.5.tar.gz \ No newline at end of file diff --git a/packages/debug/strace/build b/packages/debug/strace/build index 8d7a888fc0..39c2b51643 100755 --- a/packages/debug/strace/build +++ b/packages/debug/strace/build @@ -2,9 +2,8 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME + make diff --git a/packages/debug/strace/install b/packages/debug/strace/install index b0a66ddf9c..d2561a25f3 100755 --- a/packages/debug/strace/install +++ b/packages/debug/strace/install @@ -3,4 +3,4 @@ . config/options $1 mkdir -p $INSTALL/usr/bin -cp $PKG_BUILD/strace $INSTALL/usr/bin + cp $PKG_BUILD/strace $INSTALL/usr/bin diff --git a/packages/debug/strace/meta b/packages/debug/strace/meta new file mode 100644 index 0000000000..51e7d91261 --- /dev/null +++ b/packages/debug/strace/meta @@ -0,0 +1,16 @@ +PKG_NAME="strace" +PKG_VERSION="4.5.20" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="BSD" +PKG_SITE="http://sourceforge.net/projects/strace/" +PKG_URL="http://downloads.sourceforge.net/project/strace/strace/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="debug" +PKG_SHORTDESC="strace: Trace system calls and signals" +PKG_LONGDESC="In the simplest case strace runs the specified command until it exits. It intercepts and records the system calls which are called by a process and the signals which are received by a process. The name of each system call, its arguments and its return value are printed on standard error or to the file specified with the -o option." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/debug/strace/patches/10_ctl-proc-removal.diff b/packages/debug/strace/patches/10_ctl-proc-removal.diff deleted file mode 100644 index 25433d9e79..0000000000 --- a/packages/debug/strace/patches/10_ctl-proc-removal.diff +++ /dev/null @@ -1,13 +0,0 @@ -CTL_PROC was removed in linux 2.6.18 - -diff -Nur strace-4.5.12.orig/system.c strace-4.5.12/system.c ---- strace-4.5.12.orig/system.c Wed Jun 1 22:22:06 2005 -+++ strace-4.5.12/system.c Sat Sep 23 11:18:04 2006 -@@ -1572,7 +1572,6 @@ - { CTL_KERN, "CTL_KERN" }, - { CTL_VM, "CTL_VM" }, - { CTL_NET, "CTL_NET" }, -- { CTL_PROC, "CTL_PROC" }, - { CTL_FS, "CTL_FS" }, - { CTL_DEBUG, "CTL_DEBUG" }, - { CTL_DEV, "CTL_DEV" }, diff --git a/packages/debug/strace/patches/12_include_socket.h.diff b/packages/debug/strace/patches/12_include_socket.h.diff deleted file mode 100644 index 9e87712524..0000000000 --- a/packages/debug/strace/patches/12_include_socket.h.diff +++ /dev/null @@ -1,11971 +0,0 @@ -diff -Naur strace-4.5.19/configure strace-4.5.19.patch/configure ---- strace-4.5.19/configure 2009-10-21 19:41:11.000000000 +0200 -+++ strace-4.5.19.patch/configure 2009-11-04 09:11:01.669519301 +0100 -@@ -1,20 +1,18 @@ - #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.64 for strace 4.5.19. -+# Generated by GNU Autoconf 2.63 for strace 4.5.19. - # - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, --# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software --# Foundation, Inc. --# -+# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - # This configure script is free software; the Free Software Foundation - # gives unlimited permission to copy, distribute and modify it. --## -------------------- ## --## M4sh Initialization. ## --## -------------------- ## -+## --------------------- ## -+## M4sh Initialization. ## -+## --------------------- ## - - # Be more Bourne compatible - DUALCASE=1; export DUALCASE # for MKS sh --if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : -+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which -@@ -22,15 +20,23 @@ - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST - else -- case `(set -o) 2>/dev/null` in #( -- *posix*) : -- set -o posix ;; #( -- *) : -- ;; -+ case `(set -o) 2>/dev/null` in -+ *posix*) set -o posix ;; - esac -+ - fi - - -+ -+ -+# PATH needs CR -+# Avoid depending upon Character Ranges. -+as_cr_letters='abcdefghijklmnopqrstuvwxyz' -+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -+as_cr_Letters=$as_cr_letters$as_cr_LETTERS -+as_cr_digits='0123456789' -+as_cr_alnum=$as_cr_Letters$as_cr_digits -+ - as_nl=' - ' - export as_nl -@@ -38,13 +44,7 @@ - as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo - as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo --# Prefer a ksh shell builtin over an external printf program on Solaris, --# but without wasting forks for bash or zsh. --if test -z "$BASH_VERSION$ZSH_VERSION" \ -- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then -- as_echo='print -r --' -- as_echo_n='print -rn --' --elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then -+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' - else -@@ -55,7 +55,7 @@ - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; -- case $arg in #( -+ case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; -@@ -78,6 +78,13 @@ - } - fi - -+# Support unset when possible. -+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then -+ as_unset=unset -+else -+ as_unset=false -+fi -+ - - # IFS - # We need space, tab and new line, in precisely that order. Quoting is -@@ -87,15 +94,15 @@ - IFS=" "" $as_nl" - - # Find who we are. Look in the path if we contain no directory separator. --case $0 in #(( -+case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR - for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -- done -+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -+done - IFS=$as_save_IFS - - ;; -@@ -107,16 +114,12 @@ - fi - if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 -- exit 1 -+ { (exit 1); exit 1; } - fi - --# Unset variables that we do not need and which cause bugs (e.g. in --# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" --# suppresses any "Segmentation fault" message there. '((' could --# trigger a bug in pdksh 5.2.14. --for as_var in BASH_ENV ENV MAIL MAILPATH --do eval test x\${$as_var+set} = xset \ -- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -+# Work around bugs in pre-3.0 UWIN ksh. -+for as_var in ENV MAIL MAILPATH -+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - PS1='$ ' - PS2='> ' -@@ -128,299 +131,330 @@ - LANGUAGE=C - export LANGUAGE - -+# Required to use basename. -+if expr a : '\(a\)' >/dev/null 2>&1 && -+ test "X`expr 00001 : '.*\(...\)'`" = X001; then -+ as_expr=expr -+else -+ as_expr=false -+fi -+ -+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then -+ as_basename=basename -+else -+ as_basename=false -+fi -+ -+ -+# Name of the executable. -+as_me=`$as_basename -- "$0" || -+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ -+ X"$0" : 'X\(//\)$' \| \ -+ X"$0" : 'X\(/\)' \| . 2>/dev/null || -+$as_echo X/"$0" | -+ sed '/^.*\/\([^/][^/]*\)\/*$/{ -+ s//\1/ -+ q -+ } -+ /^X\/\(\/\/\)$/{ -+ s//\1/ -+ q -+ } -+ /^X\/\(\/\).*/{ -+ s//\1/ -+ q -+ } -+ s/.*/./; q'` -+ - # CDPATH. --(unset CDPATH) >/dev/null 2>&1 && unset CDPATH -+$as_unset CDPATH -+ - - if test "x$CONFIG_SHELL" = x; then -- as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : -- emulate sh -- NULLCMD=: -- # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which -- # is contrary to our usage. Disable this feature. -- alias -g '\${1+\"\$@\"}'='\"\$@\"' -- setopt NO_GLOB_SUBST -+ if (eval ":") 2>/dev/null; then -+ as_have_required=yes - else -- case \`(set -o) 2>/dev/null\` in #( -- *posix*) : -- set -o posix ;; #( -- *) : -- ;; --esac -+ as_have_required=no - fi --" -- as_required="as_fn_return () { (exit \$1); } --as_fn_success () { as_fn_return 0; } --as_fn_failure () { as_fn_return 1; } --as_fn_ret_success () { return 0; } --as_fn_ret_failure () { return 1; } -+ -+ if test $as_have_required = yes && (eval ": -+(as_func_return () { -+ (exit \$1) -+} -+as_func_success () { -+ as_func_return 0 -+} -+as_func_failure () { -+ as_func_return 1 -+} -+as_func_ret_success () { -+ return 0 -+} -+as_func_ret_failure () { -+ return 1 -+} - - exitcode=0 --as_fn_success || { exitcode=1; echo as_fn_success failed.; } --as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } --as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } --as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } --if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : -- --else -- exitcode=1; echo positional parameters were not saved. --fi --test x\$exitcode = x0 || exit 1" -- as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO -- as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO -- eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && -- test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 --test \$(( 1 + 1 )) = 2 || exit 1" -- if (eval "$as_required") 2>/dev/null; then : -- as_have_required=yes -+if as_func_success; then -+ : - else -- as_have_required=no -+ exitcode=1 -+ echo as_func_success failed. -+fi -+ -+if as_func_failure; then -+ exitcode=1 -+ echo as_func_failure succeeded. - fi -- if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -+if as_func_ret_success; then -+ : - else -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --as_found=false -+ exitcode=1 -+ echo as_func_ret_success failed. -+fi -+ -+if as_func_ret_failure; then -+ exitcode=1 -+ echo as_func_ret_failure succeeded. -+fi -+ -+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then -+ : -+else -+ exitcode=1 -+ echo positional parameters were not saved. -+fi -+ -+test \$exitcode = 0) || { (exit 1); exit 1; } -+ -+( -+ as_lineno_1=\$LINENO -+ as_lineno_2=\$LINENO -+ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && -+ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -+") 2> /dev/null; then -+ : -+else -+ as_candidate_shells= -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR - for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- as_found=: -- case $as_dir in #( -+ case $as_dir in - /*) - for as_base in sh bash ksh sh5; do -- # Try only shells that exist, to save several forks. -- as_shell=$as_dir/$as_base -- if { test -f "$as_shell" || test -f "$as_shell.exe"; } && -- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : -- CONFIG_SHELL=$as_shell as_have_required=yes -- if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : -- break 2 --fi --fi -+ as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -- as_found=false - done --$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && -- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : -- CONFIG_SHELL=$SHELL as_have_required=yes --fi; } - IFS=$as_save_IFS - - -- if test "x$CONFIG_SHELL" != x; then : -- # We cannot yet assume a decent shell, so we have to provide a -- # neutralization value for shells without unset; and this also -- # works around shells that cannot unset nonexistent variables. -- BASH_ENV=/dev/null -- ENV=/dev/null -- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -- export CONFIG_SHELL -- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} --fi -+ for as_shell in $as_candidate_shells $SHELL; do -+ # Try only shells that exist, to save several forks. -+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } && -+ { ("$as_shell") 2> /dev/null <<\_ASEOF -+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then -+ emulate sh -+ NULLCMD=: -+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which -+ # is contrary to our usage. Disable this feature. -+ alias -g '${1+"$@"}'='"$@"' -+ setopt NO_GLOB_SUBST -+else -+ case `(set -o) 2>/dev/null` in -+ *posix*) set -o posix ;; -+esac - -- if test x$as_have_required = xno; then : -- $as_echo "$0: This script requires a shell more modern than all" -- $as_echo "$0: the shells that I found on your system." -- if test x${ZSH_VERSION+set} = xset ; then -- $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" -- $as_echo "$0: be upgraded to zsh 4.3.4 or later." -- else -- $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, --$0: including any error possibly output before this --$0: message. Then install a modern shell, or manually run --$0: the script under such a shell if you do have one." -- fi -- exit 1 --fi - fi -+ -+ -+: -+_ASEOF -+}; then -+ CONFIG_SHELL=$as_shell -+ as_have_required=yes -+ if { "$as_shell" 2> /dev/null <<\_ASEOF -+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then -+ emulate sh -+ NULLCMD=: -+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which -+ # is contrary to our usage. Disable this feature. -+ alias -g '${1+"$@"}'='"$@"' -+ setopt NO_GLOB_SUBST -+else -+ case `(set -o) 2>/dev/null` in -+ *posix*) set -o posix ;; -+esac -+ - fi --SHELL=${CONFIG_SHELL-/bin/sh} --export SHELL --# Unset more variables known to interfere with behavior of common tools. --CLICOLOR_FORCE= GREP_OPTIONS= --unset CLICOLOR_FORCE GREP_OPTIONS - --## --------------------- ## --## M4sh Shell Functions. ## --## --------------------- ## --# as_fn_unset VAR --# --------------- --# Portably unset VAR. --as_fn_unset () --{ -- { eval $1=; unset $1;} --} --as_unset=as_fn_unset -- --# as_fn_set_status STATUS --# ----------------------- --# Set $? to STATUS, without forking. --as_fn_set_status () --{ -- return $1 --} # as_fn_set_status -- --# as_fn_exit STATUS --# ----------------- --# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. --as_fn_exit () --{ -- set +e -- as_fn_set_status $1 -- exit $1 --} # as_fn_exit -- --# as_fn_mkdir_p --# ------------- --# Create "$as_dir" as a directory, including parents if necessary. --as_fn_mkdir_p () --{ - -- case $as_dir in #( -- -*) as_dir=./$as_dir;; -- esac -- test -d "$as_dir" || eval $as_mkdir_p || { -- as_dirs= -- while :; do -- case $as_dir in #( -- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( -- *) as_qdir=$as_dir;; -- esac -- as_dirs="'$as_qdir' $as_dirs" -- as_dir=`$as_dirname -- "$as_dir" || --$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -- X"$as_dir" : 'X\(//\)[^/]' \| \ -- X"$as_dir" : 'X\(//\)$' \| \ -- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || --$as_echo X"$as_dir" | -- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ -- s//\1/ -- q -- } -- /^X\(\/\/\)[^/].*/{ -- s//\1/ -- q -- } -- /^X\(\/\/\)$/{ -- s//\1/ -- q -- } -- /^X\(\/\).*/{ -- s//\1/ -- q -- } -- s/.*/./; q'` -- test -d "$as_dir" && break -- done -- test -z "$as_dirs" || eval "mkdir $as_dirs" -- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" -+: -+(as_func_return () { -+ (exit $1) -+} -+as_func_success () { -+ as_func_return 0 -+} -+as_func_failure () { -+ as_func_return 1 -+} -+as_func_ret_success () { -+ return 0 -+} -+as_func_ret_failure () { -+ return 1 -+} -+ -+exitcode=0 -+if as_func_success; then -+ : -+else -+ exitcode=1 -+ echo as_func_success failed. -+fi - -+if as_func_failure; then -+ exitcode=1 -+ echo as_func_failure succeeded. -+fi - --} # as_fn_mkdir_p --# as_fn_append VAR VALUE --# ---------------------- --# Append the text in VALUE to the end of the definition contained in VAR. Take --# advantage of any shell optimizations that allow amortized linear growth over --# repeated appends, instead of the typical quadratic growth present in naive --# implementations. --if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : -- eval 'as_fn_append () -- { -- eval $1+=\$2 -- }' -+if as_func_ret_success; then -+ : - else -- as_fn_append () -- { -- eval $1=\$$1\$2 -- } --fi # as_fn_append -+ exitcode=1 -+ echo as_func_ret_success failed. -+fi - --# as_fn_arith ARG... --# ------------------ --# Perform arithmetic evaluation on the ARGs, and store the result in the --# global $as_val. Take advantage of shells that can avoid forks. The arguments --# must be portable across $(()) and expr. --if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : -- eval 'as_fn_arith () -- { -- as_val=$(( $* )) -- }' -+if as_func_ret_failure; then -+ exitcode=1 -+ echo as_func_ret_failure succeeded. -+fi -+ -+if ( set x; as_func_ret_success y && test x = "$1" ); then -+ : - else -- as_fn_arith () -- { -- as_val=`expr "$@" || test $? -eq 1` -- } --fi # as_fn_arith -+ exitcode=1 -+ echo positional parameters were not saved. -+fi - -+test $exitcode = 0) || { (exit 1); exit 1; } - --# as_fn_error ERROR [LINENO LOG_FD] --# --------------------------------- --# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are --# provided, also output the error to LOG_FD, referencing LINENO. Then exit the --# script with status $?, using 1 if that was 0. --as_fn_error () --{ -- as_status=$?; test $as_status -eq 0 && as_status=1 -- if test "$3"; then -- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 -- fi -- $as_echo "$as_me: error: $1" >&2 -- as_fn_exit $as_status --} # as_fn_error -+( -+ as_lineno_1=$LINENO -+ as_lineno_2=$LINENO -+ test "x$as_lineno_1" != "x$as_lineno_2" && -+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - --if expr a : '\(a\)' >/dev/null 2>&1 && -- test "X`expr 00001 : '.*\(...\)'`" = X001; then -- as_expr=expr -+_ASEOF -+}; then -+ break -+fi -+ -+fi -+ -+ done -+ -+ if test "x$CONFIG_SHELL" != x; then -+ for as_var in BASH_ENV ENV -+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -+ done -+ export CONFIG_SHELL -+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -+fi -+ -+ -+ if test $as_have_required = no; then -+ echo This script requires a shell more modern than all the -+ echo shells that I found on your system. Please install a -+ echo modern shell, or manually run the script under such a -+ echo shell if you do have one. -+ { (exit 1); exit 1; } -+fi -+ -+ -+fi -+ -+fi -+ -+ -+ -+(eval "as_func_return () { -+ (exit \$1) -+} -+as_func_success () { -+ as_func_return 0 -+} -+as_func_failure () { -+ as_func_return 1 -+} -+as_func_ret_success () { -+ return 0 -+} -+as_func_ret_failure () { -+ return 1 -+} -+ -+exitcode=0 -+if as_func_success; then -+ : - else -- as_expr=false -+ exitcode=1 -+ echo as_func_success failed. - fi - --if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then -- as_basename=basename -+if as_func_failure; then -+ exitcode=1 -+ echo as_func_failure succeeded. -+fi -+ -+if as_func_ret_success; then -+ : - else -- as_basename=false -+ exitcode=1 -+ echo as_func_ret_success failed. - fi - --if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then -- as_dirname=dirname -+if as_func_ret_failure; then -+ exitcode=1 -+ echo as_func_ret_failure succeeded. -+fi -+ -+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then -+ : - else -- as_dirname=false -+ exitcode=1 -+ echo positional parameters were not saved. - fi - --as_me=`$as_basename -- "$0" || --$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ -- X"$0" : 'X\(//\)$' \| \ -- X"$0" : 'X\(/\)' \| . 2>/dev/null || --$as_echo X/"$0" | -- sed '/^.*\/\([^/][^/]*\)\/*$/{ -- s//\1/ -- q -- } -- /^X\/\(\/\/\)$/{ -- s//\1/ -- q -- } -- /^X\/\(\/\).*/{ -- s//\1/ -- q -- } -- s/.*/./; q'` -+test \$exitcode = 0") || { -+ echo No shell found that supports shell functions. -+ echo Please tell bug-autoconf@gnu.org about your system, -+ echo including any error possibly output before this message. -+ echo This can help us improve future autoconf versions. -+ echo Configuration will now proceed without shell functions. -+} - --# Avoid depending upon Character Ranges. --as_cr_letters='abcdefghijklmnopqrstuvwxyz' --as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' --as_cr_Letters=$as_cr_letters$as_cr_LETTERS --as_cr_digits='0123456789' --as_cr_alnum=$as_cr_Letters$as_cr_digits - - -- as_lineno_1=$LINENO as_lineno_1a=$LINENO -- as_lineno_2=$LINENO as_lineno_2a=$LINENO -- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && -- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { -- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) -+ as_lineno_1=$LINENO -+ as_lineno_2=$LINENO -+ test "x$as_lineno_1" != "x$as_lineno_2" && -+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { -+ -+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO -+ # uniformly replaced by the line number. The first 'sed' inserts a -+ # line-number line after each line using $LINENO; the second 'sed' -+ # does the real work. The second script uses 'N' to pair each -+ # line-number line with the line containing $LINENO, and appends -+ # trailing '-' during substitution so that $LINENO is not a special -+ # case at line end. -+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the -+ # scripts with optimization help from Paolo Bonzini. Blame Lee -+ # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= -@@ -437,7 +471,8 @@ - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || -- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } -+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 -+ { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the -@@ -447,18 +482,29 @@ - exit - } - --ECHO_C= ECHO_N= ECHO_T= --case `echo -n x` in #((((( ---n*) -- case `echo 'xy\c'` in -- *c*) ECHO_T=' ';; # ECHO_T is single tab character. -- xy) ECHO_C='\c';; -- *) echo `echo ksh88 bug on AIX 6.1` > /dev/null -- ECHO_T=' ';; -- esac;; --*) -+ -+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then -+ as_dirname=dirname -+else -+ as_dirname=false -+fi -+ -+ECHO_C= ECHO_N= ECHO_T= -+case `echo -n x` in -+-n*) -+ case `echo 'x\c'` in -+ *c*) ECHO_T=' ';; # ECHO_T is single tab character. -+ *) ECHO_C='\c';; -+ esac;; -+*) - ECHO_N='-n';; - esac -+if expr a : '\(a\)' >/dev/null 2>&1 && -+ test "X`expr 00001 : '.*\(...\)'`" = X001; then -+ as_expr=expr -+else -+ as_expr=false -+fi - - rm -f conf$$ conf$$.exe conf$$.file - if test -d conf$$.dir; then -@@ -488,7 +534,7 @@ - rmdir conf$$.dir 2>/dev/null - - if mkdir -p . 2>/dev/null; then -- as_mkdir_p='mkdir -p "$as_dir"' -+ as_mkdir_p=: - else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -@@ -507,10 +553,10 @@ - if test -d "$1"; then - test -d "$1/."; - else -- case $1 in #( -+ case $1 in - -*)set "./$1";; - esac; -- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( -+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -@@ -524,6 +570,7 @@ - as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -+ - exec 7<&0 &1 - - # Name of the host. -@@ -542,6 +589,7 @@ - subdirs= - MFLAGS= - MAKEFLAGS= -+SHELL=${CONFIG_SHELL-/bin/sh} - - # Identity of this package. - PACKAGE_NAME='strace' -@@ -549,7 +597,6 @@ - PACKAGE_VERSION='4.5.19' - PACKAGE_STRING='strace 4.5.19' - PACKAGE_BUGREPORT='' --PACKAGE_URL='' - - ac_unique_file="strace.c" - # Factoring default headers for most tests. -@@ -691,7 +738,6 @@ - program_transform_name - prefix - exec_prefix --PACKAGE_URL - PACKAGE_BUGREPORT - PACKAGE_STRING - PACKAGE_VERSION -@@ -822,7 +868,8 @@ - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && -- as_fn_error "invalid feature name: $ac_useropt" -+ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 -+ { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in -@@ -848,7 +895,8 @@ - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && -- as_fn_error "invalid feature name: $ac_useropt" -+ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 -+ { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in -@@ -1052,7 +1100,8 @@ - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && -- as_fn_error "invalid package name: $ac_useropt" -+ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 -+ { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in -@@ -1068,7 +1117,8 @@ - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && -- as_fn_error "invalid package name: $ac_useropt" -+ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 -+ { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in -@@ -1098,17 +1148,17 @@ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - -- -*) as_fn_error "unrecognized option: \`$ac_option' --Try \`$0 --help' for more information." -+ -*) { $as_echo "$as_me: error: unrecognized option: $ac_option -+Try \`$0 --help' for more information." >&2 -+ { (exit 1); exit 1; }; } - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. -- case $ac_envvar in #( -- '' | [0-9]* | *[!_$as_cr_alnum]* ) -- as_fn_error "invalid variable name: \`$ac_envvar'" ;; -- esac -+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && -+ { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 -+ { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - -@@ -1125,13 +1175,15 @@ - - if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` -- as_fn_error "missing argument to $ac_option" -+ { $as_echo "$as_me: error: missing argument to $ac_option" >&2 -+ { (exit 1); exit 1; }; } - fi - - if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; -- fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; -+ fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 -+ { (exit 1); exit 1; }; } ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac - fi -@@ -1154,7 +1206,8 @@ - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac -- as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" -+ { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 -+ { (exit 1); exit 1; }; } - done - - # There might be people who depend on the old broken behavior: `$host' -@@ -1184,9 +1237,11 @@ - ac_pwd=`pwd` && test -n "$ac_pwd" && - ac_ls_di=`ls -di .` && - ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || -- as_fn_error "working directory cannot be determined" -+ { $as_echo "$as_me: error: working directory cannot be determined" >&2 -+ { (exit 1); exit 1; }; } - test "X$ac_ls_di" = "X$ac_pwd_ls_di" || -- as_fn_error "pwd does not report name of working directory" -+ { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 -+ { (exit 1); exit 1; }; } - - - # Find the source files, if location was not specified. -@@ -1225,11 +1280,13 @@ - fi - if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." -- as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" -+ { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 -+ { (exit 1); exit 1; }; } - fi - ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" - ac_abs_confdir=`( -- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" -+ cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 -+ { (exit 1); exit 1; }; } - pwd)` - # When building in place, set srcdir=. - if test "$ac_abs_confdir" = "$ac_pwd"; then -@@ -1351,7 +1408,6 @@ - Use these variables to override the choices made by `configure' or to help - it to find libraries and programs with nonstandard names/locations. - --Report bugs to the package provider. - _ACEOF - ac_status=$? - fi -@@ -1415,630 +1471,129 @@ - if $ac_init_version; then - cat <<\_ACEOF - strace configure 4.5.19 --generated by GNU Autoconf 2.64 -+generated by GNU Autoconf 2.63 - --Copyright (C) 2009 Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - This configure script is free software; the Free Software Foundation - gives unlimited permission to copy, distribute and modify it. - _ACEOF - exit - fi -+cat >config.log <<_ACEOF -+This file contains any messages produced by compilers while -+running configure, to aid debugging if configure makes a mistake. - --## ------------------------ ## --## Autoconf initialization. ## --## ------------------------ ## -- --# ac_fn_c_try_compile LINENO --# -------------------------- --# Try to compile conftest.$ac_ext, and return whether this succeeded. --ac_fn_c_try_compile () --{ -- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- rm -f conftest.$ac_objext -- if { { ac_try="$ac_compile" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" --$as_echo "$ac_try_echo"; } >&5 -- (eval "$ac_compile") 2>conftest.err -- ac_status=$? -- if test -s conftest.err; then -- grep -v '^ *+' conftest.err >conftest.er1 -- cat conftest.er1 >&5 -- mv -f conftest.er1 conftest.err -- fi -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest.$ac_objext; then : -- ac_retval=0 --else -- $as_echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_retval=1 --fi -- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- return $ac_retval -+It was created by strace $as_me 4.5.19, which was -+generated by GNU Autoconf 2.63. Invocation command line was - --} # ac_fn_c_try_compile -+ $ $0 $@ - --# ac_fn_c_try_cpp LINENO --# ---------------------- --# Try to preprocess conftest.$ac_ext, and return whether this succeeded. --ac_fn_c_try_cpp () -+_ACEOF -+exec 5>>config.log - { -- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- if { { ac_try="$ac_cpp conftest.$ac_ext" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" --$as_echo "$ac_try_echo"; } >&5 -- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err -- ac_status=$? -- if test -s conftest.err; then -- grep -v '^ *+' conftest.err >conftest.er1 -- cat conftest.er1 >&5 -- mv -f conftest.er1 conftest.err -- fi -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; } >/dev/null && { -- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -- test ! -s conftest.err -- }; then : -- ac_retval=0 --else -- $as_echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -- -- ac_retval=1 --fi -- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- return $ac_retval -- --} # ac_fn_c_try_cpp -+cat <<_ASUNAME -+## --------- ## -+## Platform. ## -+## --------- ## - --# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES --# ------------------------------------------------------- --# Tests whether HEADER exists, giving a warning if it cannot be compiled using --# the include files in INCLUDES and setting the cache variable VAR --# accordingly. --ac_fn_c_check_header_mongrel () --{ -- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 --$as_echo_n "checking for $2... " >&6; } --if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : -- $as_echo_n "(cached) " >&6 --fi --eval ac_res=\$$3 -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 --$as_echo "$ac_res" >&6; } --else -- # Is the header compilable? --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 --$as_echo_n "checking $2 usability... " >&6; } --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --$4 --#include <$2> --_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_header_compiler=yes --else -- ac_header_compiler=no --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 --$as_echo "$ac_header_compiler" >&6; } -+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -+uname -m = `(uname -m) 2>/dev/null || echo unknown` -+uname -r = `(uname -r) 2>/dev/null || echo unknown` -+uname -s = `(uname -s) 2>/dev/null || echo unknown` -+uname -v = `(uname -v) 2>/dev/null || echo unknown` - --# Is the header present? --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 --$as_echo_n "checking $2 presence... " >&6; } --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include <$2> --_ACEOF --if ac_fn_c_try_cpp "$LINENO"; then : -- ac_header_preproc=yes --else -- ac_header_preproc=no --fi --rm -f conftest.err conftest.$ac_ext --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 --$as_echo "$ac_header_preproc" >&6; } -+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - --# So? What about this header? --case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( -- yes:no: ) -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 --$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 --$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -- ;; -- no:yes:* ) -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 --$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 --$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 --$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 --$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 --$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -- ;; --esac -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 --$as_echo_n "checking for $2... " >&6; } --if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : -- $as_echo_n "(cached) " >&6 --else -- eval "$3=\$ac_header_compiler" --fi --eval ac_res=\$$3 -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 --$as_echo "$ac_res" >&6; } --fi -- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - --} # ac_fn_c_check_header_mongrel -+_ASUNAME - --# ac_fn_c_try_run LINENO --# ---------------------- --# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes --# that executables *can* be run. --ac_fn_c_try_run () --{ -- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- if { { ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" --$as_echo "$ac_try_echo"; } >&5 -- (eval "$ac_link") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' -- { { case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" --$as_echo "$ac_try_echo"; } >&5 -- (eval "$ac_try") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; }; then : -- ac_retval=0 --else -- $as_echo "$as_me: program exited with status $ac_status" >&5 -- $as_echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ $as_echo "PATH: $as_dir" -+done -+IFS=$as_save_IFS - -- ac_retval=$ac_status --fi -- rm -rf conftest.dSYM conftest_ipa8_conftest.oo -- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- return $ac_retval -+} >&5 - --} # ac_fn_c_try_run -+cat >&5 <<_ACEOF - --# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES --# ------------------------------------------------------- --# Tests whether HEADER exists and can be compiled using the include files in --# INCLUDES, setting the cache variable VAR accordingly. --ac_fn_c_check_header_compile () --{ -- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 --$as_echo_n "checking for $2... " >&6; } --if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : -- $as_echo_n "(cached) " >&6 --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --$4 --#include <$2> --_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- eval "$3=yes" --else -- eval "$3=no" --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --fi --eval ac_res=\$$3 -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 --$as_echo "$ac_res" >&6; } -- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - --} # ac_fn_c_check_header_compile -+## ----------- ## -+## Core tests. ## -+## ----------- ## - --# ac_fn_c_check_type LINENO TYPE VAR INCLUDES --# ------------------------------------------- --# Tests whether TYPE exists after having included INCLUDES, setting cache --# variable VAR accordingly. --ac_fn_c_check_type () --{ -- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 --$as_echo_n "checking for $2... " >&6; } --if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : -- $as_echo_n "(cached) " >&6 --else -- eval "$3=no" -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --$4 --int --main () --{ --if (sizeof ($2)) -- return 0; -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --$4 --int --main () --{ --if (sizeof (($2))) -- return 0; -- ; -- return 0; --} - _ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- --else -- eval "$3=yes" --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --fi --eval ac_res=\$$3 -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 --$as_echo "$ac_res" >&6; } -- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - --} # ac_fn_c_check_type -- --# ac_fn_c_try_link LINENO --# ----------------------- --# Try to link conftest.$ac_ext, and return whether this succeeded. --ac_fn_c_try_link () --{ -- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- rm -f conftest.$ac_objext conftest$ac_exeext -- if { { ac_try="$ac_link" --case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" --$as_echo "$ac_try_echo"; } >&5 -- (eval "$ac_link") 2>conftest.err -- ac_status=$? -- if test -s conftest.err; then -- grep -v '^ *+' conftest.err >conftest.er1 -- cat conftest.er1 >&5 -- mv -f conftest.er1 conftest.err -- fi -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; } && { -- test -z "$ac_c_werror_flag" || -- test ! -s conftest.err -- } && test -s conftest$ac_exeext && { -- test "$cross_compiling" = yes || -- $as_test_x conftest$ac_exeext -- }; then : -- ac_retval=0 --else -- $as_echo "$as_me: failed program was:" >&5 --sed 's/^/| /' conftest.$ac_ext >&5 - -- ac_retval=1 --fi -- # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information -- # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would -- # interfere with the next link command; also delete a directory that is -- # left behind by Apple's compiler. We do this before executing the actions. -- rm -rf conftest.dSYM conftest_ipa8_conftest.oo -- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- return $ac_retval -+# Keep a trace of the command line. -+# Strip out --no-create and --no-recursion so they do not pile up. -+# Strip out --silent because we don't want to record it for future runs. -+# Also quote any args containing shell meta-characters. -+# Make two passes to allow for proper duplicate-argument suppression. -+ac_configure_args= -+ac_configure_args0= -+ac_configure_args1= -+ac_must_keep_next=false -+for ac_pass in 1 2 -+do -+ for ac_arg -+ do -+ case $ac_arg in -+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ -+ | -silent | --silent | --silen | --sile | --sil) -+ continue ;; -+ *\'*) -+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; -+ esac -+ case $ac_pass in -+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; -+ 2) -+ ac_configure_args1="$ac_configure_args1 '$ac_arg'" -+ if test $ac_must_keep_next = true; then -+ ac_must_keep_next=false # Got value, back to normal. -+ else -+ case $ac_arg in -+ *=* | --config-cache | -C | -disable-* | --disable-* \ -+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ -+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ -+ | -with-* | --with-* | -without-* | --without-* | --x) -+ case "$ac_configure_args0 " in -+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; -+ esac -+ ;; -+ -* ) ac_must_keep_next=true ;; -+ esac -+ fi -+ ac_configure_args="$ac_configure_args '$ac_arg'" -+ ;; -+ esac -+ done -+done -+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - --} # ac_fn_c_try_link -- --# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES --# ---------------------------------------------------- --# Tries to find if the field MEMBER exists in type AGGR, after including --# INCLUDES, setting cache variable VAR accordingly. --ac_fn_c_check_member () --{ -- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 --$as_echo_n "checking for $2.$3... " >&6; } --if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : -- $as_echo_n "(cached) " >&6 --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --$5 --int --main () --{ --static $2 ac_aggr; --if (ac_aggr.$3) --return 0; -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- eval "$4=yes" --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --$5 --int --main () --{ --static $2 ac_aggr; --if (sizeof ac_aggr.$3) --return 0; -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- eval "$4=yes" --else -- eval "$4=no" --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --fi --eval ac_res=\$$4 -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 --$as_echo "$ac_res" >&6; } -- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- --} # ac_fn_c_check_member -- --# ac_fn_c_check_func LINENO FUNC VAR --# ---------------------------------- --# Tests whether FUNC exists, setting the cache variable VAR accordingly --ac_fn_c_check_func () --{ -- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 --$as_echo_n "checking for $2... " >&6; } --if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : -- $as_echo_n "(cached) " >&6 --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --/* Define $2 to an innocuous variant, in case declares $2. -- For example, HP-UX 11i declares gettimeofday. */ --#define $2 innocuous_$2 -- --/* System header to define __stub macros and hopefully few prototypes, -- which can conflict with char $2 (); below. -- Prefer to if __STDC__ is defined, since -- exists even on freestanding compilers. */ -- --#ifdef __STDC__ --# include --#else --# include --#endif -- --#undef $2 -- --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char $2 (); --/* The GNU C library defines this for functions which it implements -- to always fail with ENOSYS. Some functions are actually named -- something starting with __ and the normal name is an alias. */ --#if defined __stub_$2 || defined __stub___$2 --choke me --#endif -- --int --main () --{ --return $2 (); -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_link "$LINENO"; then : -- eval "$3=yes" --else -- eval "$3=no" --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --fi --eval ac_res=\$$3 -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 --$as_echo "$ac_res" >&6; } -- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- --} # ac_fn_c_check_func -- --# ac_fn_c_check_decl LINENO SYMBOL VAR --# ------------------------------------ --# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. --ac_fn_c_check_decl () --{ -- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 --$as_echo_n "checking whether $2 is declared... " >&6; } --if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : -- $as_echo_n "(cached) " >&6 --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --$4 --int --main () --{ --#ifndef $2 -- (void) $2; --#endif -- -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- eval "$3=yes" --else -- eval "$3=no" --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --fi --eval ac_res=\$$3 -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 --$as_echo "$ac_res" >&6; } -- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- --} # ac_fn_c_check_decl --cat >config.log <<_ACEOF --This file contains any messages produced by compilers while --running configure, to aid debugging if configure makes a mistake. -- --It was created by strace $as_me 4.5.19, which was --generated by GNU Autoconf 2.64. Invocation command line was -- -- $ $0 $@ -- --_ACEOF --exec 5>>config.log --{ --cat <<_ASUNAME --## --------- ## --## Platform. ## --## --------- ## -- --hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` --uname -m = `(uname -m) 2>/dev/null || echo unknown` --uname -r = `(uname -r) 2>/dev/null || echo unknown` --uname -s = `(uname -s) 2>/dev/null || echo unknown` --uname -v = `(uname -v) 2>/dev/null || echo unknown` -- --/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` --/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` -- --/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` --/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` --/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` --/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` --/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` --/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` --/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` -- --_ASUNAME -- --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- $as_echo "PATH: $as_dir" -- done --IFS=$as_save_IFS -- --} >&5 -- --cat >&5 <<_ACEOF -- -- --## ----------- ## --## Core tests. ## --## ----------- ## -- --_ACEOF -- -- --# Keep a trace of the command line. --# Strip out --no-create and --no-recursion so they do not pile up. --# Strip out --silent because we don't want to record it for future runs. --# Also quote any args containing shell meta-characters. --# Make two passes to allow for proper duplicate-argument suppression. --ac_configure_args= --ac_configure_args0= --ac_configure_args1= --ac_must_keep_next=false --for ac_pass in 1 2 --do -- for ac_arg -- do -- case $ac_arg in -- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -- -q | -quiet | --quiet | --quie | --qui | --qu | --q \ -- | -silent | --silent | --silen | --sile | --sil) -- continue ;; -- *\'*) -- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; -- esac -- case $ac_pass in -- 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; -- 2) -- as_fn_append ac_configure_args1 " '$ac_arg'" -- if test $ac_must_keep_next = true; then -- ac_must_keep_next=false # Got value, back to normal. -- else -- case $ac_arg in -- *=* | --config-cache | -C | -disable-* | --disable-* \ -- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ -- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ -- | -with-* | --with-* | -without-* | --without-* | --x) -- case "$ac_configure_args0 " in -- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; -- esac -- ;; -- -* ) ac_must_keep_next=true ;; -- esac -- fi -- as_fn_append ac_configure_args " '$ac_arg'" -- ;; -- esac -- done --done --{ ac_configure_args0=; unset ac_configure_args0;} --{ ac_configure_args1=; unset ac_configure_args1;} -- --# When interrupted or exit'd, cleanup temporary files, and complete --# config.log. We remove comments because anyway the quotes in there --# would cause problems or look ugly. --# WARNING: Use '\'' to represent an apostrophe within the trap. --# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. --trap 'exit_status=$? -- # Save into config.log some information that might help in debugging. -- { -- echo -+# When interrupted or exit'd, cleanup temporary files, and complete -+# config.log. We remove comments because anyway the quotes in there -+# would cause problems or look ugly. -+# WARNING: Use '\'' to represent an apostrophe within the trap. -+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -+trap 'exit_status=$? -+ # Save into config.log some information that might help in debugging. -+ { -+ echo - - cat <<\_ASBOX - ## ---------------- ## -@@ -2053,13 +1608,13 @@ - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( -- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -+ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 - $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( -- *) { eval $ac_var=; unset $ac_var;} ;; -+ *) $as_unset $ac_var ;; - esac ;; - esac - done -@@ -2131,39 +1686,37 @@ - exit $exit_status - ' 0 - for ac_signal in 1 2 13 15; do -- trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal - done - ac_signal=0 - - # confdefs.h avoids OS command line length limits that DEFS can exceed. - rm -f -r conftest* confdefs.h - --$as_echo "/* confdefs.h */" > confdefs.h -- - # Predefined preprocessor variables. - - cat >>confdefs.h <<_ACEOF - #define PACKAGE_NAME "$PACKAGE_NAME" - _ACEOF - -+ - cat >>confdefs.h <<_ACEOF - #define PACKAGE_TARNAME "$PACKAGE_TARNAME" - _ACEOF - -+ - cat >>confdefs.h <<_ACEOF - #define PACKAGE_VERSION "$PACKAGE_VERSION" - _ACEOF - -+ - cat >>confdefs.h <<_ACEOF - #define PACKAGE_STRING "$PACKAGE_STRING" - _ACEOF - --cat >>confdefs.h <<_ACEOF --#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" --_ACEOF - - cat >>confdefs.h <<_ACEOF --#define PACKAGE_URL "$PACKAGE_URL" -+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" - _ACEOF - - -@@ -2184,7 +1737,7 @@ - do - test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -+ { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 - $as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" -@@ -2195,7 +1748,7 @@ - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -+ { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 - $as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; -@@ -2203,7 +1756,7 @@ - esac - fi - else -- { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -+ { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 - $as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file - fi -@@ -2218,11 +1771,11 @@ - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) -- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 - $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) -- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 - $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; -@@ -2232,17 +1785,17 @@ - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 - $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else -- { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -+ { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 - $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi -- { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -+ { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 - $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} -- { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -+ { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 - $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac -@@ -2254,20 +1807,43 @@ - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. -- *) as_fn_append ac_configure_args " '$ac_arg'" ;; -+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi - done - if $ac_cache_corrupted; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 - $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -- { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -+ { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 - $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} -- as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -+$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} -+ { (exit 1); exit 1; }; } - fi --## -------------------- ## --## Main body of script. ## --## -------------------- ## -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - - ac_ext=c - ac_cpp='$CPP $CPPFLAGS' -@@ -2279,16 +1855,24 @@ - - ac_aux_dir= - for ac_dir in . "$srcdir"/.; do -- for ac_t in install-sh install.sh shtool; do -- if test -f "$ac_dir/$ac_t"; then -- ac_aux_dir=$ac_dir -- ac_install_sh="$ac_aux_dir/$ac_t -c" -- break 2 -- fi -- done -+ if test -f "$ac_dir/install-sh"; then -+ ac_aux_dir=$ac_dir -+ ac_install_sh="$ac_aux_dir/install-sh -c" -+ break -+ elif test -f "$ac_dir/install.sh"; then -+ ac_aux_dir=$ac_dir -+ ac_install_sh="$ac_aux_dir/install.sh -c" -+ break -+ elif test -f "$ac_dir/shtool"; then -+ ac_aux_dir=$ac_dir -+ ac_install_sh="$ac_aux_dir/shtool install -c" -+ break -+ fi - done - if test -z "$ac_aux_dir"; then -- as_fn_error "cannot find install-sh, install.sh, or shtool in . \"$srcdir\"/." "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in . \"$srcdir\"/." >&5 -+$as_echo "$as_me: error: cannot find install-sh or install.sh in . \"$srcdir\"/." >&2;} -+ { (exit 1); exit 1; }; } - fi - - # These three variables are undocumented and unsupported, -@@ -2318,10 +1902,10 @@ - # OS/2's system install, which has a completely different semantic - # ./install, which can be erroneously created by make from ./install.sh. - # Reject install programs that cannot install multiple files. --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -+{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 - $as_echo_n "checking for a BSD-compatible install... " >&6; } - if test -z "$INSTALL"; then --if test "${ac_cv_path_install+set}" = set; then : -+if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 - else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -@@ -2329,11 +1913,11 @@ - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- # Account for people who put trailing slashes in PATH elements. --case $as_dir/ in #(( -- ./ | .// | /[cC]/* | \ -+ # Account for people who put trailing slashes in PATH elements. -+case $as_dir/ in -+ ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ -- ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ -+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. -@@ -2370,7 +1954,7 @@ - ;; - esac - -- done -+done - IFS=$as_save_IFS - - rm -rf conftest.one conftest.two conftest.dir -@@ -2386,7 +1970,7 @@ - INSTALL=$ac_install_sh - fi - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -+{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 - $as_echo "$INSTALL" >&6; } - - # Use test -z because SunOS4 sh mishandles braces in ${var-val}. -@@ -2397,7 +1981,7 @@ - - test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -+{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 - $as_echo_n "checking whether build environment is sane... " >&6; } - # Just in case - sleep 1 -@@ -2408,11 +1992,15 @@ - ' - case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) -- as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; -+ { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 -+$as_echo "$as_me: error: unsafe absolute working directory name" >&2;} -+ { (exit 1); exit 1; }; };; - esac - case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) -- as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; -+ { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 -+$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} -+ { (exit 1); exit 1; }; };; - esac - - # Do `set' in a subshell so we don't clobber the current shell's -@@ -2434,8 +2022,11 @@ - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". -- as_fn_error "ls -t appears to fail. Make sure there is not a broken --alias in your environment" "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -+alias in your environment" >&5 -+$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -+alias in your environment" >&2;} -+ { (exit 1); exit 1; }; } - fi - - test "$2" = conftest.file -@@ -2444,10 +2035,13 @@ - # Ok. - : - else -- as_fn_error "newly created file is older than distributed files! --Check your system clock" "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! -+Check your system clock" >&5 -+$as_echo "$as_me: error: newly created file is older than distributed files! -+Check your system clock" >&2;} -+ { (exit 1); exit 1; }; } - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+{ $as_echo "$as_me:$LINENO: result: yes" >&5 - $as_echo "yes" >&6; } - test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -@@ -2475,7 +2069,7 @@ - am_missing_run="$MISSING --run " - else - am_missing_run= -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -+ { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 - $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} - fi - -@@ -2496,9 +2090,9 @@ - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. - set dummy ${ac_tool_prefix}strip; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_prog_STRIP+set}" = set; then : -+if test "${ac_cv_prog_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 - else - if test -n "$STRIP"; then -@@ -2509,24 +2103,24 @@ - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done -- done -+done - IFS=$as_save_IFS - - fi - fi - STRIP=$ac_cv_prog_STRIP - if test -n "$STRIP"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -+ { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 - $as_echo "$STRIP" >&6; } - else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 - $as_echo "no" >&6; } - fi - -@@ -2536,9 +2130,9 @@ - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. - set dummy strip; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : -+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 - else - if test -n "$ac_ct_STRIP"; then -@@ -2549,24 +2143,24 @@ - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done -- done -+done - IFS=$as_save_IFS - - fi - fi - ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP - if test -n "$ac_ct_STRIP"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -+ { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 - $as_echo "$ac_ct_STRIP" >&6; } - else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 - $as_echo "no" >&6; } - fi - -@@ -2575,7 +2169,7 @@ - else - case $cross_compiling:$ac_tool_warned in - yes:) --{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 - $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} - ac_tool_warned=yes ;; - esac -@@ -2588,10 +2182,10 @@ - fi - INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -+{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 - $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } - if test -z "$MKDIR_P"; then -- if test "${ac_cv_path_mkdir+set}" = set; then : -+ if test "${ac_cv_path_mkdir+set}" = set; then - $as_echo_n "(cached) " >&6 - else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -@@ -2599,7 +2193,7 @@ - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_prog in mkdir gmkdir; do -+ for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( -@@ -2611,7 +2205,7 @@ - esac - done - done -- done -+done - IFS=$as_save_IFS - - fi -@@ -2627,7 +2221,7 @@ - MKDIR_P="$ac_install_sh -d" - fi - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -+{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 - $as_echo "$MKDIR_P" >&6; } - - mkdir_p="$MKDIR_P" -@@ -2640,9 +2234,9 @@ - do - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_prog_AWK+set}" = set; then : -+if test "${ac_cv_prog_AWK+set}" = set; then - $as_echo_n "(cached) " >&6 - else - if test -n "$AWK"; then -@@ -2653,24 +2247,24 @@ - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done -- done -+done - IFS=$as_save_IFS - - fi - fi - AWK=$ac_cv_prog_AWK - if test -n "$AWK"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -+ { $as_echo "$as_me:$LINENO: result: $AWK" >&5 - $as_echo "$AWK" >&6; } - else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 - $as_echo "no" >&6; } - fi - -@@ -2678,11 +2272,11 @@ - test -n "$AWK" && break - done - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -+{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 - $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } - set x ${MAKE-make} - ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` --if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : -+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 - else - cat >conftest.make <<\_ACEOF -@@ -2700,11 +2294,11 @@ - rm -f conftest.make - fi - if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 - $as_echo "yes" >&6; } - SET_MAKE= - else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 - $as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" - fi -@@ -2724,7 +2318,9 @@ - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then -- as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -+$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} -+ { (exit 1); exit 1; }; } - fi - fi - -@@ -2781,16 +2377,16 @@ - - - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -+{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 - $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } - # Check whether --enable-maintainer-mode was given. --if test "${enable_maintainer_mode+set}" = set; then : -+if test "${enable_maintainer_mode+set}" = set; then - enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval - else - USE_MAINTAINER_MODE=no - fi - -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -+ { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 - $as_echo "$USE_MAINTAINER_MODE" >&6; } - if test $USE_MAINTAINER_MODE = yes; then - MAINTAINER_MODE_TRUE= -@@ -2805,27 +2401,35 @@ - - # Make sure we can run config.sub. - $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || -- as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -+$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} -+ { (exit 1); exit 1; }; } - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -+{ $as_echo "$as_me:$LINENO: checking build system type" >&5 - $as_echo_n "checking build system type... " >&6; } --if test "${ac_cv_build+set}" = set; then : -+if test "${ac_cv_build+set}" = set; then - $as_echo_n "(cached) " >&6 - else - ac_build_alias=$build_alias - test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` - test "x$ac_build_alias" = x && -- as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -+$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} -+ { (exit 1); exit 1; }; } - ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || -- as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} -+ { (exit 1); exit 1; }; } - - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 - $as_echo "$ac_cv_build" >&6; } - case $ac_cv_build in - *-*-*) ;; --*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; -+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -+$as_echo "$as_me: error: invalid value of canonical build" >&2;} -+ { (exit 1); exit 1; }; };; - esac - build=$ac_cv_build - ac_save_IFS=$IFS; IFS='-' -@@ -2841,24 +2445,28 @@ - case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -+{ $as_echo "$as_me:$LINENO: checking host system type" >&5 - $as_echo_n "checking host system type... " >&6; } --if test "${ac_cv_host+set}" = set; then : -+if test "${ac_cv_host+set}" = set; then - $as_echo_n "(cached) " >&6 - else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build - else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || -- as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} -+ { (exit 1); exit 1; }; } - fi - - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 - $as_echo "$ac_cv_host" >&6; } - case $ac_cv_host in - *-*-*) ;; --*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; -+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -+$as_echo "$as_me: error: invalid value of canonical host" >&2;} -+ { (exit 1); exit 1; }; };; - esac - host=$ac_cv_host - ac_save_IFS=$IFS; IFS='-' -@@ -2875,35 +2483,45 @@ - - - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for supported operating system" >&5 -+{ $as_echo "$as_me:$LINENO: checking for supported operating system" >&5 - $as_echo_n "checking for supported operating system... " >&6; } - case "$host_os" in - *linux*) - opsys=linux - --$as_echo "#define LINUX 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define LINUX 1 -+_ACEOF - - ;; - sunos4*) - opsys=sunos4 - --$as_echo "#define SUNOS4 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define SUNOS4 1 -+_ACEOF - - ;; - solaris2* | sysv[45]* | irix[56]*) - opsys=svr4 - --$as_echo "#define SVR4 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define SVR4 1 -+_ACEOF - - case "$host_os" in - sysv4.2uw*) - --$as_echo "#define UNIXWARE 2" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define UNIXWARE 2 -+_ACEOF - - ;; - sysv5*) - --$as_echo "#define UNIXWARE 7" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define UNIXWARE 7 -+_ACEOF - - ;; - esac -@@ -2911,142 +2529,186 @@ - freebsd*) - opsys=freebsd - --$as_echo "#define FREEBSD 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define FREEBSD 1 -+_ACEOF - - ;; - *) -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: NO!" >&5 -+ { $as_echo "$as_me:$LINENO: result: NO!" >&5 - $as_echo "NO!" >&6; } -- as_fn_error "operating system $host_os is not supported by strace" "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: operating system $host_os is not supported by strace" >&5 -+$as_echo "$as_me: error: operating system $host_os is not supported by strace" >&2;} -+ { (exit 1); exit 1; }; } - ;; - esac --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $opsys" >&5 -+{ $as_echo "$as_me:$LINENO: result: $opsys" >&5 - $as_echo "$opsys" >&6; } - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for supported architecture" >&5 -+{ $as_echo "$as_me:$LINENO: checking for supported architecture" >&5 - $as_echo_n "checking for supported architecture... " >&6; } - case "$host_cpu" in - bfin) - arch=bfin - --$as_echo "#define BFIN 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define BFIN 1 -+_ACEOF - - ;; - i[3456]86|pentium) - arch=i386 - --$as_echo "#define I386 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define I386 1 -+_ACEOF - - ;; - ia64) - arch=ia64 - --$as_echo "#define IA64 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define IA64 1 -+_ACEOF - - ;; - m68k) - arch=m68k - --$as_echo "#define M68K 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define M68K 1 -+_ACEOF - - ;; - sparc64*) - arch=sparc64 - --$as_echo "#define SPARC64 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define SPARC64 1 -+_ACEOF - - ;; - sparc*) - arch=sparc - --$as_echo "#define SPARC 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define SPARC 1 -+_ACEOF - - ;; - mips*) - arch=mips - --$as_echo "#define MIPS 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define MIPS 1 -+_ACEOF - - ;; - alpha*) - arch=alpha - --$as_echo "#define ALPHA 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define ALPHA 1 -+_ACEOF - - ;; - powerpc*) - arch=powerpc - --$as_echo "#define POWERPC 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define POWERPC 1 -+_ACEOF - - ;; - arm*) - arch=arm - --$as_echo "#define ARM 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define ARM 1 -+_ACEOF - - ;; - avr32*) - arch=avr32 - --$as_echo "#define AVR32 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define AVR32 1 -+_ACEOF - - ;; - s390) - arch=s390 - --$as_echo "#define S390 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define S390 1 -+_ACEOF - - ;; - s390x) - arch=s390x - --$as_echo "#define S390X 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define S390X 1 -+_ACEOF - - ;; - hppa*|parisc*) - arch=hppa - --$as_echo "#define HPPA 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define HPPA 1 -+_ACEOF - - ;; - sh64*) - arch=sh64 - --$as_echo "#define SH64 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define SH64 1 -+_ACEOF - - ;; - sh*) - arch=sh - --$as_echo "#define SH 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define SH 1 -+_ACEOF - - ;; - x86?64*) - arch=x86_64 - --$as_echo "#define X86_64 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define X86_64 1 -+_ACEOF - - ;; - cris|crisv10) - arch=crisv10 - --$as_echo "#define CRISV10 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define CRISV10 1 -+_ACEOF - - ;; - crisv32) - arch=crisv32 - --$as_echo "#define CRISV32 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define CRISV32 1 -+_ACEOF - - ;; - *) -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: NO!" >&5 -+ { $as_echo "$as_me:$LINENO: result: NO!" >&5 - $as_echo "NO!" >&6; } -- as_fn_error "architecture $host_cpu is not supported by strace" "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: architecture $host_cpu is not supported by strace" >&5 -+$as_echo "$as_me: error: architecture $host_cpu is not supported by strace" >&2;} -+ { (exit 1); exit 1; }; } - ;; - esac --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $arch" >&5 -+{ $as_echo "$as_me:$LINENO: result: $arch" >&5 - $as_echo "$arch" >&6; } - - -@@ -3109,9 +2771,9 @@ - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. - set dummy ${ac_tool_prefix}gcc; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_prog_CC+set}" = set; then : -+if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 - else - if test -n "$CC"; then -@@ -3122,24 +2784,24 @@ - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done -- done -+done - IFS=$as_save_IFS - - fi - fi - CC=$ac_cv_prog_CC - if test -n "$CC"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -+ { $as_echo "$as_me:$LINENO: result: $CC" >&5 - $as_echo "$CC" >&6; } - else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 - $as_echo "no" >&6; } - fi - -@@ -3149,9 +2811,9 @@ - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. - set dummy gcc; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : -+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 - else - if test -n "$ac_ct_CC"; then -@@ -3162,24 +2824,24 @@ - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done -- done -+done - IFS=$as_save_IFS - - fi - fi - ac_ct_CC=$ac_cv_prog_ac_ct_CC - if test -n "$ac_ct_CC"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -+ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 - $as_echo "$ac_ct_CC" >&6; } - else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 - $as_echo "no" >&6; } - fi - -@@ -3188,7 +2850,7 @@ - else - case $cross_compiling:$ac_tool_warned in - yes:) --{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 - $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} - ac_tool_warned=yes ;; - esac -@@ -3202,9 +2864,9 @@ - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. - set dummy ${ac_tool_prefix}cc; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_prog_CC+set}" = set; then : -+if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 - else - if test -n "$CC"; then -@@ -3215,24 +2877,24 @@ - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done -- done -+done - IFS=$as_save_IFS - - fi - fi - CC=$ac_cv_prog_CC - if test -n "$CC"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -+ { $as_echo "$as_me:$LINENO: result: $CC" >&5 - $as_echo "$CC" >&6; } - else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 - $as_echo "no" >&6; } - fi - -@@ -3242,9 +2904,9 @@ - if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. - set dummy cc; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_prog_CC+set}" = set; then : -+if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 - else - if test -n "$CC"; then -@@ -3256,18 +2918,18 @@ - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done -- done -+done - IFS=$as_save_IFS - - if test $ac_prog_rejected = yes; then -@@ -3286,10 +2948,10 @@ - fi - CC=$ac_cv_prog_CC - if test -n "$CC"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -+ { $as_echo "$as_me:$LINENO: result: $CC" >&5 - $as_echo "$CC" >&6; } - else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 - $as_echo "no" >&6; } - fi - -@@ -3301,9 +2963,9 @@ - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. - set dummy $ac_tool_prefix$ac_prog; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_prog_CC+set}" = set; then : -+if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 - else - if test -n "$CC"; then -@@ -3314,24 +2976,24 @@ - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done -- done -+done - IFS=$as_save_IFS - - fi - fi - CC=$ac_cv_prog_CC - if test -n "$CC"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -+ { $as_echo "$as_me:$LINENO: result: $CC" >&5 - $as_echo "$CC" >&6; } - else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 - $as_echo "no" >&6; } - fi - -@@ -3345,9 +3007,9 @@ - do - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : -+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 - else - if test -n "$ac_ct_CC"; then -@@ -3358,24 +3020,24 @@ - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done -- done -+done - IFS=$as_save_IFS - - fi - fi - ac_ct_CC=$ac_cv_prog_ac_ct_CC - if test -n "$ac_ct_CC"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -+ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 - $as_echo "$ac_ct_CC" >&6; } - else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 - $as_echo "no" >&6; } - fi - -@@ -3388,7 +3050,7 @@ - else - case $cross_compiling:$ac_tool_warned in - yes:) --{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 - $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} - ac_tool_warned=yes ;; - esac -@@ -3399,55 +3061,73 @@ - fi - - --test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 - $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error "no acceptable C compiler found in \$PATH --See \`config.log' for more details." "$LINENO" 5; } -+{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -+See \`config.log' for more details." >&5 -+$as_echo "$as_me: error: no acceptable C compiler found in \$PATH -+See \`config.log' for more details." >&2;} -+ { (exit 1); exit 1; }; }; } - - # Provide some information about the compiler. --$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -+$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 - set X $ac_compile - ac_compiler=$2 --for ac_option in --version -v -V -qversion; do -- { { ac_try="$ac_compiler $ac_option >&5" -+{ (ac_try="$ac_compiler --version >&5" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac --eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" --$as_echo "$ac_try_echo"; } >&5 -- (eval "$ac_compiler $ac_option >&5") 2>conftest.err -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? -- if test -s conftest.err; then -- sed '10a\ --... rest of stderr output deleted ... -- 10q' conftest.err >conftest.er1 -- cat conftest.er1 >&5 -- rm -f conftest.er1 conftest.err -- fi -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; } --done -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } -+{ (ac_try="$ac_compiler -v >&5" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compiler -v >&5") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } -+{ (ac_try="$ac_compiler -V >&5" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compiler -V >&5") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } - --cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ --#include -+ - int - main () - { --FILE *f = fopen ("conftest.out", "w"); -- return ferror (f) || fclose (f) != 0; - - ; - return 0; - } - _ACEOF - ac_clean_files_save=$ac_clean_files --ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" -+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" - # Try to create an executable without -o first, disregard a.out. - # It will help us diagnose broken compilers, and finding out an intuition - # of exeext. --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -+{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 - $as_echo_n "checking for C compiler default output file name... " >&6; } - ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -@@ -3464,17 +3144,17 @@ - done - rm -f $ac_rmfiles - --if { { ac_try="$ac_link_default" -+if { (ac_try="$ac_link_default" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac --eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" --$as_echo "$ac_try_echo"; } >&5 -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then : -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. - # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' - # in a Makefile. We should not override ac_cv_exeext if it was cached, -@@ -3491,7 +3171,7 @@ - # certainly right. - break;; - *.* ) -- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; -+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi -@@ -3510,75 +3190,84 @@ - else - ac_file='' - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -+ -+{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 - $as_echo "$ac_file" >&6; } --if test -z "$ac_file"; then : -+if test -z "$ac_file"; then - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 - $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --{ as_fn_set_status 77 --as_fn_error "C compiler cannot create executables --See \`config.log' for more details." "$LINENO" 5; }; } -+{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables -+See \`config.log' for more details." >&5 -+$as_echo "$as_me: error: C compiler cannot create executables -+See \`config.log' for more details." >&2;} -+ { (exit 77); exit 77; }; }; } - fi -+ - ac_exeext=$ac_cv_exeext - - # Check that the compiler produces executables we can run. If not, either - # the compiler is broken, or we cross compile. --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -+{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 - $as_echo_n "checking whether the C compiler works... " >&6; } -+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 - # If not cross compiling, check that we can run a simple program. - if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' -- { { case "(($ac_try" in -+ { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac --eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" --$as_echo "$ac_try_echo"; } >&5 -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; }; then -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else -- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 - $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error "cannot run C compiled programs. -+{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. -+If you meant to cross compile, use \`--host'. -+See \`config.log' for more details." >&5 -+$as_echo "$as_me: error: cannot run C compiled programs. - If you meant to cross compile, use \`--host'. --See \`config.log' for more details." "$LINENO" 5; } -+See \`config.log' for more details." >&2;} -+ { (exit 1); exit 1; }; }; } - fi - fi - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+{ $as_echo "$as_me:$LINENO: result: yes" >&5 - $as_echo "yes" >&6; } - --rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out -+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out - ac_clean_files=$ac_clean_files_save - # Check that the compiler produces executables we can run. If not, either - # the compiler is broken, or we cross compile. --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -+{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 - $as_echo_n "checking whether we are cross compiling... " >&6; } --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -+{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 - $as_echo "$cross_compiling" >&6; } - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -+{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 - $as_echo_n "checking for suffix of executables... " >&6; } --if { { ac_try="$ac_link" -+if { (ac_try="$ac_link" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac --eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" --$as_echo "$ac_try_echo"; } >&5 -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then : -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; then - # If both `conftest.exe' and `conftest' are `present' (well, observable) - # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will - # work properly (i.e., refer to `conftest.exe'), while it won't with -@@ -3593,24 +3282,32 @@ - esac - done - else -- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 - $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error "cannot compute suffix of executables: cannot compile and link --See \`config.log' for more details." "$LINENO" 5; } -+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -+See \`config.log' for more details." >&5 -+$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -+See \`config.log' for more details." >&2;} -+ { (exit 1); exit 1; }; }; } - fi -+ - rm -f conftest$ac_cv_exeext --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 - $as_echo "$ac_cv_exeext" >&6; } - - rm -f conftest.$ac_ext - EXEEXT=$ac_cv_exeext - ac_exeext=$EXEEXT --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -+{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 - $as_echo_n "checking for suffix of object files... " >&6; } --if test "${ac_cv_objext+set}" = set; then : -+if test "${ac_cv_objext+set}" = set; then - $as_echo_n "(cached) " >&6 - else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - - int -@@ -3622,17 +3319,17 @@ - } - _ACEOF - rm -f conftest.o conftest.obj --if { { ac_try="$ac_compile" -+if { (ac_try="$ac_compile" - case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; - esac --eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" --$as_echo "$ac_try_echo"; } >&5 -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; then : -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in -@@ -3645,23 +3342,31 @@ - $as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - --{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 - $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error "cannot compute suffix of object files: cannot compile --See \`config.log' for more details." "$LINENO" 5; } -+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -+See \`config.log' for more details." >&5 -+$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile -+See \`config.log' for more details." >&2;} -+ { (exit 1); exit 1; }; }; } - fi -+ - rm -f conftest.$ac_cv_objext conftest.$ac_ext - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 - $as_echo "$ac_cv_objext" >&6; } - OBJEXT=$ac_cv_objext - ac_objext=$OBJEXT --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 - $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } --if test "${ac_cv_c_compiler_gnu+set}" = set; then : -+if test "${ac_cv_c_compiler_gnu+set}" = set; then - $as_echo_n "(cached) " >&6 - else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - - int -@@ -3675,16 +3380,37 @@ - return 0; - } - _ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes - else -- ac_compiler_gnu=no -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_compiler_gnu=no - fi -+ - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cv_c_compiler_gnu=$ac_compiler_gnu - - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 - $as_echo "$ac_cv_c_compiler_gnu" >&6; } - if test $ac_compiler_gnu = yes; then - GCC=yes -@@ -3693,16 +3419,20 @@ - fi - ac_test_CFLAGS=${CFLAGS+set} - ac_save_CFLAGS=$CFLAGS --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -+{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 - $as_echo_n "checking whether $CC accepts -g... " >&6; } --if test "${ac_cv_prog_cc_g+set}" = set; then : -+if test "${ac_cv_prog_cc_g+set}" = set; then - $as_echo_n "(cached) " >&6 - else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - - int -@@ -3713,11 +3443,35 @@ - return 0; - } - _ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes - else -- CFLAGS="" -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ CFLAGS="" -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - - int -@@ -3728,12 +3482,36 @@ - return 0; - } - _ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ : - else -- ac_c_werror_flag=$ac_save_c_werror_flag -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - - int -@@ -3744,17 +3522,42 @@ - return 0; - } - _ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ - fi -+ - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi -+ - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi -+ - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 - $as_echo "$ac_cv_prog_cc_g" >&6; } - if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -@@ -3771,14 +3574,18 @@ - CFLAGS= - fi - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -+{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 - $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } --if test "${ac_cv_prog_cc_c89+set}" = set; then : -+if test "${ac_cv_prog_cc_c89+set}" = set; then - $as_echo_n "(cached) " >&6 - else - ac_cv_prog_cc_c89=no - ac_save_CC=$CC --cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - #include -@@ -3835,9 +3642,32 @@ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" - do - CC="$ac_save_CC $ac_arg" -- if ac_fn_c_try_compile "$LINENO"; then : -+ rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ - fi -+ - rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break - done -@@ -3848,19 +3678,17 @@ - # AC_CACHE_VAL - case "x$ac_cv_prog_cc_c89" in - x) -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -+ { $as_echo "$as_me:$LINENO: result: none needed" >&5 - $as_echo "none needed" >&6; } ;; - xno) -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -+ { $as_echo "$as_me:$LINENO: result: unsupported" >&5 - $as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -+ { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 - $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; - esac --if test "x$ac_cv_prog_cc_c89" != xno; then : - --fi - - ac_ext=c - ac_cpp='$CPP $CPPFLAGS' -@@ -3879,7 +3707,7 @@ - .PHONY: am__doit - END - # If we don't find an include directive, just comment out the code. --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -+{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 - $as_echo_n "checking for style of include used by $am_make... " >&6; } - am__include="#" - am__quote= -@@ -3907,12 +3735,12 @@ - fi - - --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -+{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 - $as_echo "$_am_result" >&6; } - rm -f confinc confmf - - # Check whether --enable-dependency-tracking was given. --if test "${enable_dependency_tracking+set}" = set; then : -+if test "${enable_dependency_tracking+set}" = set; then - enableval=$enable_dependency_tracking; - fi - -@@ -3932,9 +3760,9 @@ - - depcc="$CC" am_compiler_list= - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -+{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 - $as_echo_n "checking dependency style of $depcc... " >&6; } --if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : -+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - $as_echo_n "(cached) " >&6 - else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then -@@ -4042,7 +3870,7 @@ - fi - - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -+{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 - $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } - CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - -@@ -4063,14 +3891,14 @@ - ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' - ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_c_compiler_gnu --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -+{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 - $as_echo_n "checking how to run the C preprocessor... " >&6; } - # On Suns, sometimes $CPP names a directory. - if test -n "$CPP" && test -d "$CPP"; then - CPP= - fi - if test -z "$CPP"; then -- if test "${ac_cv_prog_CPP+set}" = set; then : -+ if test "${ac_cv_prog_CPP+set}" = set; then - $as_echo_n "(cached) " >&6 - else - # Double quotes because CPP needs to be expanded -@@ -4085,7 +3913,11 @@ - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #ifdef __STDC__ - # include -@@ -4094,34 +3926,78 @@ - #endif - Syntax error - _ACEOF --if ac_fn_c_try_cpp "$LINENO"; then : -- -+if { (ac_try="$ac_cpp conftest.$ac_ext" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null && { -+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -+ test ! -s conftest.err -+ }; then -+ : - else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ - # Broken: fails on valid input. - continue - fi -+ - rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - _ACEOF --if ac_fn_c_try_cpp "$LINENO"; then : -+if { (ac_try="$ac_cpp conftest.$ac_ext" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null && { -+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -+ test ! -s conftest.err -+ }; then - # Broken: success on invalid input. - continue - else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ - # Passes both tests. - ac_preproc_ok=: - break - fi -+ - rm -f conftest.err conftest.$ac_ext - - done - # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. - rm -f conftest.err conftest.$ac_ext --if $ac_preproc_ok; then : -+if $ac_preproc_ok; then - break - fi - -@@ -4133,7 +4009,7 @@ - else - ac_cv_prog_CPP=$CPP - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -+{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 - $as_echo "$CPP" >&6; } - ac_preproc_ok=false - for ac_c_preproc_warn_flag in '' yes -@@ -4144,7 +4020,11 @@ - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #ifdef __STDC__ - # include -@@ -4153,40 +4033,87 @@ - #endif - Syntax error - _ACEOF --if ac_fn_c_try_cpp "$LINENO"; then : -- -+if { (ac_try="$ac_cpp conftest.$ac_ext" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null && { -+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -+ test ! -s conftest.err -+ }; then -+ : - else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ - # Broken: fails on valid input. - continue - fi -+ - rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - _ACEOF --if ac_fn_c_try_cpp "$LINENO"; then : -+if { (ac_try="$ac_cpp conftest.$ac_ext" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null && { -+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -+ test ! -s conftest.err -+ }; then - # Broken: success on invalid input. - continue - else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ - # Passes both tests. - ac_preproc_ok=: - break - fi -+ - rm -f conftest.err conftest.$ac_ext - - done - # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. - rm -f conftest.err conftest.$ac_ext --if $ac_preproc_ok; then : -- -+if $ac_preproc_ok; then -+ : - else -- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 - $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error "C preprocessor \"$CPP\" fails sanity check --See \`config.log' for more details." "$LINENO" 5; } -+{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -+See \`config.log' for more details." >&5 -+$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -+See \`config.log' for more details." >&2;} -+ { (exit 1); exit 1; }; }; } - fi - - ac_ext=c -@@ -4196,9 +4123,9 @@ - ac_compiler_gnu=$ac_cv_c_compiler_gnu - - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -+{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 - $as_echo_n "checking for grep that handles long lines and -e... " >&6; } --if test "${ac_cv_path_GREP+set}" = set; then : -+if test "${ac_cv_path_GREP+set}" = set; then - $as_echo_n "(cached) " >&6 - else - if test -z "$GREP"; then -@@ -4209,7 +4136,7 @@ - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_prog in grep ggrep; do -+ for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -@@ -4229,7 +4156,7 @@ - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break -- as_fn_arith $ac_count + 1 && ac_count=$as_val -+ ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" -@@ -4244,24 +4171,26 @@ - $ac_path_GREP_found && break 3 - done - done -- done -+done - IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then -- as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -+$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} -+ { (exit 1); exit 1; }; } - fi - else - ac_cv_path_GREP=$GREP - fi - - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 - $as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -+{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 - $as_echo_n "checking for egrep... " >&6; } --if test "${ac_cv_path_EGREP+set}" = set; then : -+if test "${ac_cv_path_EGREP+set}" = set; then - $as_echo_n "(cached) " >&6 - else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 -@@ -4275,7 +4204,7 @@ - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_prog in egrep; do -+ for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -@@ -4295,7 +4224,7 @@ - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break -- as_fn_arith $ac_count + 1 && ac_count=$as_val -+ ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" -@@ -4310,10 +4239,12 @@ - $ac_path_EGREP_found && break 3 - done - done -- done -+done - IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then -- as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -+$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} -+ { (exit 1); exit 1; }; } - fi - else - ac_cv_path_EGREP=$EGREP -@@ -4321,17 +4252,21 @@ - - fi - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 - $as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -+{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 - $as_echo_n "checking for ANSI C header files... " >&6; } --if test "${ac_cv_header_stdc+set}" = set; then : -+if test "${ac_cv_header_stdc+set}" = set; then - $as_echo_n "(cached) " >&6 - else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - #include -@@ -4346,23 +4281,48 @@ - return 0; - } - _ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes - else -- ac_cv_header_stdc=no -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_header_stdc=no - fi -+ - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "memchr" >/dev/null 2>&1; then : -- -+ $EGREP "memchr" >/dev/null 2>&1; then -+ : - else - ac_cv_header_stdc=no - fi -@@ -4372,14 +4332,18 @@ - - if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "free" >/dev/null 2>&1; then : -- -+ $EGREP "free" >/dev/null 2>&1; then -+ : - else - ac_cv_header_stdc=no - fi -@@ -4389,10 +4353,14 @@ - - if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -- if test "$cross_compiling" = yes; then : -+ if test "$cross_compiling" = yes; then - : - else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - #include -@@ -4419,108 +4387,359 @@ - return 0; - } - _ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ : - else -- ac_cv_header_stdc=no -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+ac_cv_header_stdc=no - fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - -+ - fi - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 - $as_echo "$ac_cv_header_stdc" >&6; } - if test $ac_cv_header_stdc = yes; then - --$as_echo "#define STDC_HEADERS 1" >>confdefs.h -- --fi -- --# On IRIX 5.3, sys/types and inttypes.h are conflicting. --for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ -- inttypes.h stdint.h unistd.h --do : -- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` --ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default --" --eval as_val=\$$as_ac_Header -- if test "x$as_val" = x""yes; then : -- cat >>confdefs.h <<_ACEOF --#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+cat >>confdefs.h <<\_ACEOF -+#define STDC_HEADERS 1 - _ACEOF - - fi - --done -- -- -- -- ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" --if test "x$ac_cv_header_minix_config_h" = x""yes; then : -- MINIX=yes --else -- MINIX= --fi -- -+# On IRIX 5.3, sys/types and inttypes.h are conflicting. - -- if test "$MINIX" = yes; then - --$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h - - --$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h - - --$as_echo "#define _MINIX 1" >>confdefs.h - -- fi - - -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 --$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } --if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : -+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ -+ inttypes.h stdint.h unistd.h -+do -+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -+$as_echo_n "checking for $ac_header... " >&6; } -+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 - else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+$ac_includes_default - --# define __EXTENSIONS__ 1 -- $ac_includes_default --int --main () --{ -- -- ; -- return 0; --} -+#include <$ac_header> - _ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_safe_to_define___extensions__=yes -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ eval "$as_ac_Header=yes" - else -- ac_cv_safe_to_define___extensions__=no -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ eval "$as_ac_Header=no" -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+ac_res=`eval 'as_val=${'$as_ac_Header'} -+ $as_echo "$as_val"'` -+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -+$as_echo "$ac_res" >&6; } -+as_val=`eval 'as_val=${'$as_ac_Header'} -+ $as_echo "$as_val"'` -+ if test "x$as_val" = x""yes; then -+ cat >>confdefs.h <<_ACEOF -+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+_ACEOF -+ -+fi -+ -+done -+ -+ -+ -+ if test "${ac_cv_header_minix_config_h+set}" = set; then -+ { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 -+$as_echo_n "checking for minix/config.h... " >&6; } -+if test "${ac_cv_header_minix_config_h+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 -+$as_echo "$ac_cv_header_minix_config_h" >&6; } -+else -+ # Is the header compilable? -+{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5 -+$as_echo_n "checking minix/config.h usability... " >&6; } -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+#include -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_header_compiler=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_compiler=no -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -+$as_echo "$ac_header_compiler" >&6; } -+ -+# Is the header present? -+{ $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5 -+$as_echo_n "checking minix/config.h presence... " >&6; } -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+_ACEOF -+if { (ac_try="$ac_cpp conftest.$ac_ext" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null && { -+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -+ test ! -s conftest.err -+ }; then -+ ac_header_preproc=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_preproc=no -+fi -+ -+rm -f conftest.err conftest.$ac_ext -+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -+$as_echo "$ac_header_preproc" >&6; } -+ -+# So? What about this header? -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) -+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 -+$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 -+$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 -+$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 -+$as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 -+$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 -+$as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 -+$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 -+$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} -+ -+ ;; -+esac -+{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 -+$as_echo_n "checking for minix/config.h... " >&6; } -+if test "${ac_cv_header_minix_config_h+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_cv_header_minix_config_h=$ac_header_preproc -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 -+$as_echo "$ac_cv_header_minix_config_h" >&6; } -+ -+fi -+if test "x$ac_cv_header_minix_config_h" = x""yes; then -+ MINIX=yes -+else -+ MINIX= -+fi -+ -+ -+ if test "$MINIX" = yes; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define _POSIX_SOURCE 1 -+_ACEOF -+ -+ -+cat >>confdefs.h <<\_ACEOF -+#define _POSIX_1_SOURCE 2 -+_ACEOF -+ -+ -+cat >>confdefs.h <<\_ACEOF -+#define _MINIX 1 -+_ACEOF -+ -+ fi -+ -+ -+ -+ { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 -+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -+if test "${ac_cv_safe_to_define___extensions__+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+# define __EXTENSIONS__ 1 -+ $ac_includes_default -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_safe_to_define___extensions__=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_safe_to_define___extensions__=no - fi -+ - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 - $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } - test $ac_cv_safe_to_define___extensions__ = yes && -- $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h -- -- $as_echo "#define _ALL_SOURCE 1" >>confdefs.h -+ cat >>confdefs.h <<\_ACEOF -+#define __EXTENSIONS__ 1 -+_ACEOF - -- $as_echo "#define _GNU_SOURCE 1" >>confdefs.h -+ cat >>confdefs.h <<\_ACEOF -+#define _ALL_SOURCE 1 -+_ACEOF - -- $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h -+ cat >>confdefs.h <<\_ACEOF -+#define _GNU_SOURCE 1 -+_ACEOF - -- $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h -+ cat >>confdefs.h <<\_ACEOF -+#define _POSIX_PTHREAD_SEMANTICS 1 -+_ACEOF - -+ cat >>confdefs.h <<\_ACEOF -+#define _TANDEM_SOURCE 1 -+_ACEOF - - - - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for primary include directory" >&5 -+{ $as_echo "$as_me:$LINENO: checking for primary include directory" >&5 - $as_echo_n "checking for primary include directory... " >&6; } - includedir=/usr/include - if test -n "$GCC" -@@ -4538,25 +4757,27 @@ - includedir=$new_includedir - fi - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $includedir" >&5 -+{ $as_echo "$as_me:$LINENO: result: $includedir" >&5 - $as_echo "$includedir" >&6; } - - - if test "x$opsys" = "xsunos4" && test "x$arch" = "xsparc" - then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for valid machine include directory" >&5 -+ { $as_echo "$as_me:$LINENO: checking for valid machine include directory" >&5 - $as_echo_n "checking for valid machine include directory... " >&6; } - if test -d "$includedir/sun4" - then - rm -f machine - ln -s $includedir/sun4 machine -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+ { $as_echo "$as_me:$LINENO: result: yes" >&5 - $as_echo "yes" >&6; } - --$as_echo "#define SUNOS4_KERNEL_ARCH_KLUDGE 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define SUNOS4_KERNEL_ARCH_KLUDGE 1 -+_ACEOF - - else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 - $as_echo "no" >&6; } - fi - fi -@@ -4585,14 +4806,14 @@ - ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' - ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_c_compiler_gnu --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -+{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 - $as_echo_n "checking how to run the C preprocessor... " >&6; } - # On Suns, sometimes $CPP names a directory. - if test -n "$CPP" && test -d "$CPP"; then - CPP= - fi - if test -z "$CPP"; then -- if test "${ac_cv_prog_CPP+set}" = set; then : -+ if test "${ac_cv_prog_CPP+set}" = set; then - $as_echo_n "(cached) " >&6 - else - # Double quotes because CPP needs to be expanded -@@ -4607,7 +4828,11 @@ - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #ifdef __STDC__ - # include -@@ -4616,34 +4841,78 @@ - #endif - Syntax error - _ACEOF --if ac_fn_c_try_cpp "$LINENO"; then : -- -+if { (ac_try="$ac_cpp conftest.$ac_ext" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null && { -+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -+ test ! -s conftest.err -+ }; then -+ : - else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ - # Broken: fails on valid input. - continue - fi -+ - rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - _ACEOF --if ac_fn_c_try_cpp "$LINENO"; then : -+if { (ac_try="$ac_cpp conftest.$ac_ext" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null && { -+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -+ test ! -s conftest.err -+ }; then - # Broken: success on invalid input. - continue - else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ - # Passes both tests. - ac_preproc_ok=: - break - fi -+ - rm -f conftest.err conftest.$ac_ext - - done - # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. - rm -f conftest.err conftest.$ac_ext --if $ac_preproc_ok; then : -+if $ac_preproc_ok; then - break - fi - -@@ -4655,7 +4924,7 @@ - else - ac_cv_prog_CPP=$CPP - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -+{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 - $as_echo "$CPP" >&6; } - ac_preproc_ok=false - for ac_c_preproc_warn_flag in '' yes -@@ -4666,7 +4935,11 @@ - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #ifdef __STDC__ - # include -@@ -4675,40 +4948,87 @@ - #endif - Syntax error - _ACEOF --if ac_fn_c_try_cpp "$LINENO"; then : -- -+if { (ac_try="$ac_cpp conftest.$ac_ext" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null && { -+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -+ test ! -s conftest.err -+ }; then -+ : - else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ - # Broken: fails on valid input. - continue - fi -+ - rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - _ACEOF --if ac_fn_c_try_cpp "$LINENO"; then : -+if { (ac_try="$ac_cpp conftest.$ac_ext" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null && { -+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -+ test ! -s conftest.err -+ }; then - # Broken: success on invalid input. - continue - else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ - # Passes both tests. - ac_preproc_ok=: - break - fi -+ - rm -f conftest.err conftest.$ac_ext - - done - # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. - rm -f conftest.err conftest.$ac_ext --if $ac_preproc_ok; then : -- -+if $ac_preproc_ok; then -+ : - else -- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 - $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error "C preprocessor \"$CPP\" fails sanity check --See \`config.log' for more details." "$LINENO" 5; } -+{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -+See \`config.log' for more details." >&5 -+$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -+See \`config.log' for more details." >&2;} -+ { (exit 1); exit 1; }; }; } - fi - - ac_ext=c -@@ -4718,19 +5038,23 @@ - ac_compiler_gnu=$ac_cv_c_compiler_gnu - - if test $ac_cv_c_compiler_gnu = yes; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 -+ { $as_echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 - $as_echo_n "checking whether $CC needs -traditional... " >&6; } --if test "${ac_cv_prog_gcc_traditional+set}" = set; then : -+if test "${ac_cv_prog_gcc_traditional+set}" = set; then - $as_echo_n "(cached) " >&6 - else - ac_pattern="Autoconf.*'x'" -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - Autoconf TIOCGETP - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "$ac_pattern" >/dev/null 2>&1; then : -+ $EGREP "$ac_pattern" >/dev/null 2>&1; then - ac_cv_prog_gcc_traditional=yes - else - ac_cv_prog_gcc_traditional=no -@@ -4739,42 +5063,142 @@ - - - if test $ac_cv_prog_gcc_traditional = no; then -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - Autoconf TCGETA - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "$ac_pattern" >/dev/null 2>&1; then : -+ $EGREP "$ac_pattern" >/dev/null 2>&1; then - ac_cv_prog_gcc_traditional=yes - fi - rm -f conftest* - - fi - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 - $as_echo "$ac_cv_prog_gcc_traditional" >&6; } - if test $ac_cv_prog_gcc_traditional = yes; then - CC="$CC -traditional" - fi - fi - -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 --$as_echo_n "checking for an ANSI C-conforming const... " >&6; } --if test "${ac_cv_c_const+set}" = set; then : -+# Find a good install program. We prefer a C program (faster), -+# so one script is as good as another. But avoid the broken or -+# incompatible versions: -+# SysV /etc/install, /usr/sbin/install -+# SunOS /usr/etc/install -+# IRIX /sbin/install -+# AIX /bin/install -+# AmigaOS /C/install, which installs bootblocks on floppy discs -+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -+# AFS /usr/afsws/bin/install, which mishandles nonexistent args -+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -+# OS/2's system install, which has a completely different semantic -+# ./install, which can be erroneously created by make from ./install.sh. -+# Reject install programs that cannot install multiple files. -+{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -+$as_echo_n "checking for a BSD-compatible install... " >&6; } -+if test -z "$INSTALL"; then -+if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 - else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ # Account for people who put trailing slashes in PATH elements. -+case $as_dir/ in -+ ./ | .// | /cC/* | \ -+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ -+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ -+ /usr/ucb/* ) ;; -+ *) -+ # OSF1 and SCO ODT 3.0 have their own names for install. -+ # Don't use installbsd from OSF since it installs stuff as root -+ # by default. -+ for ac_prog in ginstall scoinst install; do -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then -+ if test $ac_prog = install && -+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then -+ # AIX install. It has an incompatible calling convention. -+ : -+ elif test $ac_prog = install && -+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then -+ # program-specific install script used by HP pwplus--don't use. -+ : -+ else -+ rm -rf conftest.one conftest.two conftest.dir -+ echo one > conftest.one -+ echo two > conftest.two -+ mkdir conftest.dir -+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && -+ test -s conftest.one && test -s conftest.two && -+ test -s conftest.dir/conftest.one && -+ test -s conftest.dir/conftest.two -+ then -+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" -+ break 3 -+ fi -+ fi -+ fi -+ done -+ done -+ ;; -+esac - --int --main () --{ --/* FIXME: Include the comments suggested by Paul. */ --#ifndef __cplusplus -- /* Ultrix mips cc rejects this. */ -- typedef int charset[2]; -+done -+IFS=$as_save_IFS -+ -+rm -rf conftest.one conftest.two conftest.dir -+ -+fi -+ if test "${ac_cv_path_install+set}" = set; then -+ INSTALL=$ac_cv_path_install -+ else -+ # As a last resort, use the slow shell script. Don't cache a -+ # value for INSTALL within a source directory, because that will -+ # break other packages using the cache if that directory is -+ # removed, or if the value is a relative name. -+ INSTALL=$ac_install_sh -+ fi -+fi -+{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -+$as_echo "$INSTALL" >&6; } -+ -+# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -+# It thinks the first close brace ends the variable substitution. -+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -+ -+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' -+ -+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -+ -+{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -+$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -+if test "${ac_cv_c_const+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+/* FIXME: Include the comments suggested by Paul. */ -+#ifndef __cplusplus -+ /* Ultrix mips cc rejects this. */ -+ typedef int charset[2]; - const charset cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; -@@ -4825,27 +5249,54 @@ - return 0; - } - _ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then - ac_cv_c_const=yes - else -- ac_cv_c_const=no -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_c_const=no - fi -+ - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 - $as_echo "$ac_cv_c_const" >&6; } - if test $ac_cv_c_const = no; then - --$as_echo "#define const /**/" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define const /**/ -+_ACEOF - - fi - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -+{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 - $as_echo_n "checking for ANSI C header files... " >&6; } --if test "${ac_cv_header_stdc+set}" = set; then : -+if test "${ac_cv_header_stdc+set}" = set; then - $as_echo_n "(cached) " >&6 - else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - #include -@@ -4860,23 +5311,48 @@ - return 0; - } - _ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes - else -- ac_cv_header_stdc=no -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_header_stdc=no - fi -+ - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "memchr" >/dev/null 2>&1; then : -- -+ $EGREP "memchr" >/dev/null 2>&1; then -+ : - else - ac_cv_header_stdc=no - fi -@@ -4886,14 +5362,18 @@ - - if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - - _ACEOF - if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "free" >/dev/null 2>&1; then : -- -+ $EGREP "free" >/dev/null 2>&1; then -+ : - else - ac_cv_header_stdc=no - fi -@@ -4903,10 +5383,14 @@ - - if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -- if test "$cross_compiling" = yes; then : -+ if test "$cross_compiling" = yes; then - : - else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - #include -@@ -4933,31 +5417,64 @@ - return 0; - } - _ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ : - else -- ac_cv_header_stdc=no -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+ac_cv_header_stdc=no - fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - -+ - fi - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 - $as_echo "$ac_cv_header_stdc" >&6; } - if test $ac_cv_header_stdc = yes; then - --$as_echo "#define STDC_HEADERS 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define STDC_HEADERS 1 -+_ACEOF - - fi - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 -+{ $as_echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 - $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } --if test "${ac_cv_header_stdbool_h+set}" = set; then : -+if test "${ac_cv_header_stdbool_h+set}" = set; then - $as_echo_n "(cached) " >&6 - else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - - #include -@@ -5037,17 +5554,131 @@ - return 0; - } - _ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then - ac_cv_header_stdbool_h=yes - else -- ac_cv_header_stdbool_h=no -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_header_stdbool_h=no - fi -+ - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 - $as_echo "$ac_cv_header_stdbool_h" >&6; } --ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" --if test "x$ac_cv_type__Bool" = x""yes; then : -+{ $as_echo "$as_me:$LINENO: checking for _Bool" >&5 -+$as_echo_n "checking for _Bool... " >&6; } -+if test "${ac_cv_type__Bool+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_cv_type__Bool=no -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+int -+main () -+{ -+if (sizeof (_Bool)) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+int -+main () -+{ -+if (sizeof ((_Bool))) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ : -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_type__Bool=yes -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 -+$as_echo "$ac_cv_type__Bool" >&6; } -+if test "x$ac_cv_type__Bool" = x""yes; then - - cat >>confdefs.h <<_ACEOF - #define HAVE__BOOL 1 -@@ -5058,19 +5689,30 @@ - - if test $ac_cv_header_stdbool_h = yes; then - --$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_STDBOOL_H 1 -+_ACEOF - - fi - -+ -+ -+ -+ -+ - ac_header_dirent=no - for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 -+{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 - $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } --if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : -+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 - else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - #include <$ac_hdr> -@@ -5084,18 +5726,41 @@ - return 0; - } - _ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" - else -- eval "$as_ac_Header=no" -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ eval "$as_ac_Header=no" - fi -+ - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi --eval ac_res=\$$as_ac_Header -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -+ac_res=`eval 'as_val=${'$as_ac_Header'} -+ $as_echo "$as_val"'` -+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 - $as_echo "$ac_res" >&6; } --eval as_val=\$$as_ac_Header -- if test "x$as_val" = x""yes; then : -+as_val=`eval 'as_val=${'$as_ac_Header'} -+ $as_echo "$as_val"'` -+ if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF - #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 - _ACEOF -@@ -5106,13 +5771,17 @@ - done - # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. - if test $ac_header_dirent = dirent.h; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -+ { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 - $as_echo_n "checking for library containing opendir... " >&6; } --if test "${ac_cv_search_opendir+set}" = set; then : -+if test "${ac_cv_search_opendir+set}" = set; then - $as_echo_n "(cached) " >&6 - else - ac_func_search_save_LIBS=$LIBS --cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - - /* Override any GCC internal prototype to avoid an error. -@@ -5137,39 +5806,70 @@ - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi -- if ac_fn_c_try_link "$LINENO"; then : -+ rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest$ac_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then - ac_cv_search_opendir=$ac_res -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ - fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext -- if test "${ac_cv_search_opendir+set}" = set; then : -+ -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext -+ if test "${ac_cv_search_opendir+set}" = set; then - break - fi - done --if test "${ac_cv_search_opendir+set}" = set; then : -- -+if test "${ac_cv_search_opendir+set}" = set; then -+ : - else - ac_cv_search_opendir=no - fi - rm conftest.$ac_ext - LIBS=$ac_func_search_save_LIBS - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 - $as_echo "$ac_cv_search_opendir" >&6; } - ac_res=$ac_cv_search_opendir --if test "$ac_res" != no; then : -+if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - - fi - - else -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -+ { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 - $as_echo_n "checking for library containing opendir... " >&6; } --if test "${ac_cv_search_opendir+set}" = set; then : -+if test "${ac_cv_search_opendir+set}" = set; then - $as_echo_n "(cached) " >&6 - else - ac_func_search_save_LIBS=$LIBS --cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - - /* Override any GCC internal prototype to avoid an error. -@@ -5194,39 +5894,70 @@ - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi -- if ac_fn_c_try_link "$LINENO"; then : -+ rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest$ac_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then - ac_cv_search_opendir=$ac_res -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ - fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext -- if test "${ac_cv_search_opendir+set}" = set; then : -+ -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext -+ if test "${ac_cv_search_opendir+set}" = set; then - break - fi - done --if test "${ac_cv_search_opendir+set}" = set; then : -- -+if test "${ac_cv_search_opendir+set}" = set; then -+ : - else - ac_cv_search_opendir=no - fi - rm conftest.$ac_ext - LIBS=$ac_func_search_save_LIBS - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 - $as_echo "$ac_cv_search_opendir" >&6; } - ac_res=$ac_cv_search_opendir --if test "$ac_res" != no; then : -+if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - - fi - - fi - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 -+{ $as_echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5 - $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } --if test "${ac_cv_header_stat_broken+set}" = set; then : -+if test "${ac_cv_header_stat_broken+set}" = set; then - $as_echo_n "(cached) " >&6 - else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - #include - #include -@@ -5248,1059 +5979,4721 @@ - #endif - - _ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then - ac_cv_header_stat_broken=no - else -- ac_cv_header_stat_broken=yes -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_header_stat_broken=yes - fi -+ - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5 - $as_echo "$ac_cv_header_stat_broken" >&6; } - if test $ac_cv_header_stat_broken = yes; then - --$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h -- --fi -- --ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" --if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then : -- --cat >>confdefs.h <<_ACEOF --#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 -+cat >>confdefs.h <<\_ACEOF -+#define STAT_MACROS_BROKEN 1 - _ACEOF - -- - fi --ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" --if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then : - --cat >>confdefs.h <<_ACEOF --#define HAVE_STRUCT_STAT_ST_BLOCKS 1 -+{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 -+$as_echo_n "checking for struct stat.st_blksize... " >&6; } -+if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ - _ACEOF -- -- --fi --ac_fn_c_check_member "$LINENO" "struct stat" "st_aclcnt" "ac_cv_member_struct_stat_st_aclcnt" "$ac_includes_default" --if test "x$ac_cv_member_struct_stat_st_aclcnt" = x""yes; then : -- --cat >>confdefs.h <<_ACEOF --#define HAVE_STRUCT_STAT_ST_ACLCNT 1 -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+int -+main () -+{ -+static struct stat ac_aggr; -+if (ac_aggr.st_blksize) -+return 0; -+ ; -+ return 0; -+} - _ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_stat_st_blksize=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - -- --fi --ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default" --if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then : -- --cat >>confdefs.h <<_ACEOF --#define HAVE_STRUCT_STAT_ST_FLAGS 1 --_ACEOF -- -- --fi --ac_fn_c_check_member "$LINENO" "struct stat" "st_fstype" "ac_cv_member_struct_stat_st_fstype" "$ac_includes_default" --if test "x$ac_cv_member_struct_stat_st_fstype" = x""yes; then : -- --cat >>confdefs.h <<_ACEOF --#define HAVE_STRUCT_STAT_ST_FSTYPE 1 -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ - _ACEOF -- -- --fi --ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default" --if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then : -- --cat >>confdefs.h <<_ACEOF --#define HAVE_STRUCT_STAT_ST_GEN 1 -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+int -+main () -+{ -+static struct stat ac_aggr; -+if (sizeof ac_aggr.st_blksize) -+return 0; -+ ; -+ return 0; -+} - _ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_stat_st_blksize=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - -- -+ ac_cv_member_struct_stat_st_blksize=no - fi --ac_fn_c_check_member "$LINENO" "struct stat" "st_level" "ac_cv_member_struct_stat_st_level" "$ac_includes_default" --if test "x$ac_cv_member_struct_stat_st_level" = x""yes; then : -- --cat >>confdefs.h <<_ACEOF --#define HAVE_STRUCT_STAT_ST_LEVEL 1 --_ACEOF - -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi - -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi --ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default" --if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then : -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 -+$as_echo "$ac_cv_member_struct_stat_st_blksize" >&6; } -+if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then - - cat >>confdefs.h <<_ACEOF --#define HAVE_STRUCT_STAT_ST_RDEV 1 -+#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 - _ACEOF - - - fi -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stat64 in (asm|sys)/stat.h" >&5 --$as_echo_n "checking for stat64 in (asm|sys)/stat.h... " >&6; } --if test "${ac_cv_type_stat64+set}" = set; then : -+{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 -+$as_echo_n "checking for struct stat.st_blocks... " >&6; } -+if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then - $as_echo_n "(cached) " >&6 - else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ --#ifdef LINUX --#include --#include --#else --#include --#endif -+$ac_includes_default - int - main () - { --struct stat64 st; -+static struct stat ac_aggr; -+if (ac_aggr.st_blocks) -+return 0; - ; - return 0; - } - _ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_type_stat64=yes -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_stat_st_blocks=yes - else -- ac_cv_type_stat64=no --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --fi -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_stat64" >&5 --$as_echo "$ac_cv_type_stat64" >&6; } --if test "$ac_cv_type_stat64" = yes --then -- --$as_echo "#define HAVE_STAT64 1" >>confdefs.h -- --fi -- -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 --$as_echo_n "checking return type of signal handlers... " >&6; } --if test "${ac_cv_type_signal+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ --#include --#include -- -+$ac_includes_default - int - main () - { --return *(signal (0, 0)) (0) == 1; -+static struct stat ac_aggr; -+if (sizeof ac_aggr.st_blocks) -+return 0; - ; - return 0; - } - _ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_type_signal=int -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_stat_st_blocks=yes - else -- ac_cv_type_signal=void -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_member_struct_stat_st_blocks=no - fi -+ - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 --$as_echo "$ac_cv_type_signal" >&6; } -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 -+$as_echo "$ac_cv_member_struct_stat_st_blocks" >&6; } -+if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then - - cat >>confdefs.h <<_ACEOF --#define RETSIGTYPE $ac_cv_type_signal -+#define HAVE_STRUCT_STAT_ST_BLOCKS 1 - _ACEOF - - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 --$as_echo_n "checking for uid_t in sys/types.h... " >&6; } --if test "${ac_cv_type_uid_t+set}" = set; then : -+fi -+{ $as_echo "$as_me:$LINENO: checking for struct stat.st_aclcnt" >&5 -+$as_echo_n "checking for struct stat.st_aclcnt... " >&6; } -+if test "${ac_cv_member_struct_stat_st_aclcnt+set}" = set; then - $as_echo_n "(cached) " >&6 - else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ --#include -+$ac_includes_default -+int -+main () -+{ -+static struct stat ac_aggr; -+if (ac_aggr.st_aclcnt) -+return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_stat_st_aclcnt=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ - _ACEOF --if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "uid_t" >/dev/null 2>&1; then : -- ac_cv_type_uid_t=yes -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+int -+main () -+{ -+static struct stat ac_aggr; -+if (sizeof ac_aggr.st_aclcnt) -+return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_stat_st_aclcnt=yes - else -- ac_cv_type_uid_t=no --fi --rm -f conftest* -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - -+ ac_cv_member_struct_stat_st_aclcnt=no - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 --$as_echo "$ac_cv_type_uid_t" >&6; } --if test $ac_cv_type_uid_t = no; then -- --$as_echo "#define uid_t int" >>confdefs.h -- -- --$as_echo "#define gid_t int" >>confdefs.h - -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - --ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" --if test "x$ac_cv_type_mode_t" = x""yes; then : -- --else -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_aclcnt" >&5 -+$as_echo "$ac_cv_member_struct_stat_st_aclcnt" >&6; } -+if test "x$ac_cv_member_struct_stat_st_aclcnt" = x""yes; then - - cat >>confdefs.h <<_ACEOF --#define mode_t int -+#define HAVE_STRUCT_STAT_ST_ACLCNT 1 - _ACEOF - --fi - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5 --$as_echo_n "checking type of array argument to getgroups... " >&6; } --if test "${ac_cv_type_getgroups+set}" = set; then : -+fi -+{ $as_echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5 -+$as_echo_n "checking for struct stat.st_flags... " >&6; } -+if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then - $as_echo_n "(cached) " >&6 - else -- if test "$cross_compiling" = yes; then : -- ac_cv_type_getgroups=cross --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ --/* Thanks to Mike Rendell for this test. */ - $ac_includes_default --#define NGID 256 --#undef MAX --#define MAX(x, y) ((x) > (y) ? (x) : (y)) -- - int - main () - { -- gid_t gidset[NGID]; -- int i, n; -- union { gid_t gval; long int lval; } val; -- -- val.lval = -1; -- for (i = 0; i < NGID; i++) -- gidset[i] = val.gval; -- n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, -- gidset); -- /* Exit non-zero if getgroups seems to require an array of ints. This -- happens when gid_t is short int but getgroups modifies an array -- of ints. */ -- return n > 0 && gidset[n] != val.gval; -+static struct stat ac_aggr; -+if (ac_aggr.st_flags) -+return 0; -+ ; -+ return 0; - } - _ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- ac_cv_type_getgroups=gid_t -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_stat_st_flags=yes - else -- ac_cv_type_getgroups=int --fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext --fi -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - --if test $ac_cv_type_getgroups = cross; then -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ --#include -- -+$ac_includes_default -+int -+main () -+{ -+static struct stat ac_aggr; -+if (sizeof ac_aggr.st_flags) -+return 0; -+ ; -+ return 0; -+} - _ACEOF --if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -- $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then : -- ac_cv_type_getgroups=gid_t -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_stat_st_flags=yes - else -- ac_cv_type_getgroups=int -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_member_struct_stat_st_flags=no - fi --rm -f conftest* - -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5 --$as_echo "$ac_cv_type_getgroups" >&6; } -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5 -+$as_echo "$ac_cv_member_struct_stat_st_flags" >&6; } -+if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then - - cat >>confdefs.h <<_ACEOF --#define GETGROUPS_T $ac_cv_type_getgroups -+#define HAVE_STRUCT_STAT_ST_FLAGS 1 - _ACEOF - - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5 --$as_echo_n "checking whether sys/types.h defines makedev... " >&6; } --if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then : -+fi -+{ $as_echo "$as_me:$LINENO: checking for struct stat.st_fstype" >&5 -+$as_echo_n "checking for struct stat.st_fstype... " >&6; } -+if test "${ac_cv_member_struct_stat_st_fstype+set}" = set; then - $as_echo_n "(cached) " >&6 - else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ --#include -+$ac_includes_default - int - main () - { --return makedev(0, 0); -+static struct stat ac_aggr; -+if (ac_aggr.st_fstype) -+return 0; - ; - return 0; - } - _ACEOF --if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_header_sys_types_h_makedev=yes --else -- ac_cv_header_sys_types_h_makedev=no --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext -- --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5 --$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; } -- --if test $ac_cv_header_sys_types_h_makedev = no; then --ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default" --if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then : -- --$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h -- --fi -- -- -- -- if test $ac_cv_header_sys_mkdev_h = no; then -- ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" --if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then : -- --$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h -- --fi -- -- -- fi --fi -- --ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include --" --if test "x$ac_cv_type_sig_atomic_t" = x""yes; then : -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_stat_st_fstype=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - --cat >>confdefs.h <<_ACEOF --#define HAVE_SIG_ATOMIC_T 1 -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ - _ACEOF -- -- --fi --ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "#include --" --if test "x$ac_cv_type_siginfo_t" = x""yes; then : -- --cat >>confdefs.h <<_ACEOF --#define HAVE_SIGINFO_T 1 -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+int -+main () -+{ -+static struct stat ac_aggr; -+if (sizeof ac_aggr.st_fstype) -+return 0; -+ ; -+ return 0; -+} - _ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_stat_st_fstype=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - -- -+ ac_cv_member_struct_stat_st_fstype=no - fi - --ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_scope_id" "ac_cv_member_struct_sockaddr_in6_sin6_scope_id" "#include --#include --#include --" --if test "x$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" = x""yes; then : -- --cat >>confdefs.h <<_ACEOF --#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1 --_ACEOF -- -- -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - --ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" --if test "x$ac_cv_type_long_long" = x""yes; then : -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_fstype" >&5 -+$as_echo "$ac_cv_member_struct_stat_st_fstype" >&6; } -+if test "x$ac_cv_member_struct_stat_st_fstype" = x""yes; then - - cat >>confdefs.h <<_ACEOF --#define HAVE_LONG_LONG 1 -+#define HAVE_STRUCT_STAT_ST_FSTYPE 1 - _ACEOF - - - fi -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for little endian long long" >&5 --$as_echo_n "checking for little endian long long... " >&6; } --if test "${ac_cv_have_little_endian_long_long+set}" = set; then : -+{ $as_echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5 -+$as_echo_n "checking for struct stat.st_gen... " >&6; } -+if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then - $as_echo_n "(cached) " >&6 - else -- if test "$cross_compiling" = yes; then : -- # Should try to guess here --ac_cv_have_little_endian_long_long=no -- --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -- --int main () { -- union { -- long long ll; -- long l [2]; -- } u; -- u.ll = 0x12345678; -- if (u.l[0] == 0x12345678) -- return 0; -- return 1; -+$ac_includes_default -+int -+main () -+{ -+static struct stat ac_aggr; -+if (ac_aggr.st_gen) -+return 0; -+ ; -+ return 0; - } -- - _ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- ac_cv_have_little_endian_long_long=yes --else -- ac_cv_have_little_endian_long_long=no --fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext --fi -- --fi -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_little_endian_long_long" >&5 --$as_echo "$ac_cv_have_little_endian_long_long" >&6; } --if test "$ac_cv_have_little_endian_long_long" = yes --then -- --$as_echo "#define HAVE_LITTLE_ENDIAN_LONG_LONG 1" >>confdefs.h -- --fi -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long off_t" >&5 --$as_echo_n "checking for long long off_t... " >&6; } --if test "${ac_cv_have_long_long_off_t+set}" = set; then : -- $as_echo_n "(cached) " >&6 -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_stat_st_gen=yes - else -- if test "$cross_compiling" = yes; then : -- # Should try to guess here --ac_cv_have_long_long_off_t=no -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ --#include --main () { -- if (sizeof (off_t) == sizeof (long long) && -- sizeof (off_t) > sizeof (long)) -- return 0; -- return 1; -+$ac_includes_default -+int -+main () -+{ -+static struct stat ac_aggr; -+if (sizeof ac_aggr.st_gen) -+return 0; -+ ; -+ return 0; - } -- - _ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- ac_cv_have_long_long_off_t=yes -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_stat_st_gen=yes - else -- ac_cv_have_long_long_off_t=no -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_member_struct_stat_st_gen=no - fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5 -+$as_echo "$ac_cv_member_struct_stat_st_gen" >&6; } -+if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then - --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_off_t" >&5 --$as_echo "$ac_cv_have_long_long_off_t" >&6; } --if test "$ac_cv_have_long_long_off_t" = yes --then -+cat >>confdefs.h <<_ACEOF -+#define HAVE_STRUCT_STAT_ST_GEN 1 -+_ACEOF - --$as_echo "#define HAVE_LONG_LONG_OFF_T 1" >>confdefs.h - - fi -- --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long rlim_t" >&5 --$as_echo_n "checking for long long rlim_t... " >&6; } --if test "${ac_cv_have_long_long_rlim_t+set}" = set; then : -+{ $as_echo "$as_me:$LINENO: checking for struct stat.st_level" >&5 -+$as_echo_n "checking for struct stat.st_level... " >&6; } -+if test "${ac_cv_member_struct_stat_st_level+set}" = set; then - $as_echo_n "(cached) " >&6 - else -- if test "$cross_compiling" = yes; then : -- # Should try to guess here --ac_cv_have_long_long_rlim_t=no -- --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ --#include --#include --#include --main () { -- if (sizeof (rlim_t) == sizeof (long long) && -- sizeof (rlim_t) > sizeof (long)) -- return 0; -- return 1; -+$ac_includes_default -+int -+main () -+{ -+static struct stat ac_aggr; -+if (ac_aggr.st_level) -+return 0; -+ ; -+ return 0; - } -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_stat_st_level=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ - _ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- ac_cv_have_long_long_rlim_t=yes -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+int -+main () -+{ -+static struct stat ac_aggr; -+if (sizeof ac_aggr.st_level) -+return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_stat_st_level=yes - else -- ac_cv_have_long_long_rlim_t=no --fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext --fi -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - -+ ac_cv_member_struct_stat_st_level=no - fi - --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_rlim_t" >&5 --$as_echo "$ac_cv_have_long_long_rlim_t" >&6; } --if test "$ac_cv_have_long_long_rlim_t" = yes --then -- --$as_echo "#define HAVE_LONG_LONG_RLIM_T 1" >>confdefs.h -- -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - --ac_fn_c_check_type "$LINENO" "struct opthdr" "ac_cv_type_struct_opthdr" "#include --" --if test "x$ac_cv_type_struct_opthdr" = x""yes; then : -- --cat >>confdefs.h <<_ACEOF --#define HAVE_STRUCT_OPTHDR 1 --_ACEOF -- -- -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi -- --ac_fn_c_check_type "$LINENO" "struct t_opthdr" "ac_cv_type_struct_t_opthdr" "#include --" --if test "x$ac_cv_type_struct_t_opthdr" = x""yes; then : -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_level" >&5 -+$as_echo "$ac_cv_member_struct_stat_st_level" >&6; } -+if test "x$ac_cv_member_struct_stat_st_level" = x""yes; then - - cat >>confdefs.h <<_ACEOF --#define HAVE_STRUCT_T_OPTHDR 1 -+#define HAVE_STRUCT_STAT_ST_LEVEL 1 - _ACEOF - - - fi -- -- --if test x$opsys != xlinux; then --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5 --$as_echo_n "checking for main in -lnsl... " >&6; } --if test "${ac_cv_lib_nsl_main+set}" = set; then : -+{ $as_echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5 -+$as_echo_n "checking for struct stat.st_rdev... " >&6; } -+if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then - $as_echo_n "(cached) " >&6 - else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lnsl $LIBS" --cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -- -- -+$ac_includes_default - int - main () - { --return main (); -+static struct stat ac_aggr; -+if (ac_aggr.st_rdev) -+return 0; - ; - return 0; - } - _ACEOF --if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_nsl_main=yes -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_stat_st_rdev=yes - else -- ac_cv_lib_nsl_main=no --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5 -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+int -+main () -+{ -+static struct stat ac_aggr; -+if (sizeof ac_aggr.st_rdev) -+return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_stat_st_rdev=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_member_struct_stat_st_rdev=no -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5 -+$as_echo "$ac_cv_member_struct_stat_st_rdev" >&6; } -+if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_STRUCT_STAT_ST_RDEV 1 -+_ACEOF -+ -+ -+fi -+ -+{ $as_echo "$as_me:$LINENO: checking for stat64 in (asm|sys)/stat.h" >&5 -+$as_echo_n "checking for stat64 in (asm|sys)/stat.h... " >&6; } -+if test "${ac_cv_type_stat64+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#ifdef LINUX -+#include -+#include -+#else -+#include -+#endif -+int -+main () -+{ -+struct stat64 st; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_type_stat64=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_type_stat64=no -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+ -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_stat64" >&5 -+$as_echo "$ac_cv_type_stat64" >&6; } -+if test "$ac_cv_type_stat64" = yes -+then -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_STAT64 1 -+_ACEOF -+ -+fi -+ -+ -+{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5 -+$as_echo_n "checking return type of signal handlers... " >&6; } -+if test "${ac_cv_type_signal+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+#include -+ -+int -+main () -+{ -+return *(signal (0, 0)) (0) == 1; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_type_signal=int -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_type_signal=void -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 -+$as_echo "$ac_cv_type_signal" >&6; } -+ -+cat >>confdefs.h <<_ACEOF -+#define RETSIGTYPE $ac_cv_type_signal -+_ACEOF -+ -+ -+{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -+$as_echo_n "checking for uid_t in sys/types.h... " >&6; } -+if test "${ac_cv_type_uid_t+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "uid_t" >/dev/null 2>&1; then -+ ac_cv_type_uid_t=yes -+else -+ ac_cv_type_uid_t=no -+fi -+rm -f conftest* -+ -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -+$as_echo "$ac_cv_type_uid_t" >&6; } -+if test $ac_cv_type_uid_t = no; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define uid_t int -+_ACEOF -+ -+ -+cat >>confdefs.h <<\_ACEOF -+#define gid_t int -+_ACEOF -+ -+fi -+ -+{ $as_echo "$as_me:$LINENO: checking for mode_t" >&5 -+$as_echo_n "checking for mode_t... " >&6; } -+if test "${ac_cv_type_mode_t+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_cv_type_mode_t=no -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+int -+main () -+{ -+if (sizeof (mode_t)) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+int -+main () -+{ -+if (sizeof ((mode_t))) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ : -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_type_mode_t=yes -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 -+$as_echo "$ac_cv_type_mode_t" >&6; } -+if test "x$ac_cv_type_mode_t" = x""yes; then -+ : -+else -+ -+cat >>confdefs.h <<_ACEOF -+#define mode_t int -+_ACEOF -+ -+fi -+ -+{ $as_echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 -+$as_echo_n "checking type of array argument to getgroups... " >&6; } -+if test "${ac_cv_type_getgroups+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ if test "$cross_compiling" = yes; then -+ ac_cv_type_getgroups=cross -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+/* Thanks to Mike Rendell for this test. */ -+$ac_includes_default -+#define NGID 256 -+#undef MAX -+#define MAX(x, y) ((x) > (y) ? (x) : (y)) -+ -+int -+main () -+{ -+ gid_t gidset[NGID]; -+ int i, n; -+ union { gid_t gval; long int lval; } val; -+ -+ val.lval = -1; -+ for (i = 0; i < NGID; i++) -+ gidset[i] = val.gval; -+ n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, -+ gidset); -+ /* Exit non-zero if getgroups seems to require an array of ints. This -+ happens when gid_t is short int but getgroups modifies an array -+ of ints. */ -+ return n > 0 && gidset[n] != val.gval; -+} -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_type_getgroups=gid_t -+else -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+ac_cv_type_getgroups=int -+fi -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+fi -+ -+ -+if test $ac_cv_type_getgroups = cross; then -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then -+ ac_cv_type_getgroups=gid_t -+else -+ ac_cv_type_getgroups=int -+fi -+rm -f conftest* -+ -+fi -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 -+$as_echo "$ac_cv_type_getgroups" >&6; } -+ -+cat >>confdefs.h <<_ACEOF -+#define GETGROUPS_T $ac_cv_type_getgroups -+_ACEOF -+ -+ -+{ $as_echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5 -+$as_echo_n "checking whether sys/types.h defines makedev... " >&6; } -+if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+return makedev(0, 0); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest$ac_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_header_sys_types_h_makedev=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_header_sys_types_h_makedev=no -+fi -+ -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+ -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5 -+$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; } -+ -+if test $ac_cv_header_sys_types_h_makedev = no; then -+if test "${ac_cv_header_sys_mkdev_h+set}" = set; then -+ { $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 -+$as_echo_n "checking for sys/mkdev.h... " >&6; } -+if test "${ac_cv_header_sys_mkdev_h+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 -+$as_echo "$ac_cv_header_sys_mkdev_h" >&6; } -+else -+ # Is the header compilable? -+{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5 -+$as_echo_n "checking sys/mkdev.h usability... " >&6; } -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+#include -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_header_compiler=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_compiler=no -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -+$as_echo "$ac_header_compiler" >&6; } -+ -+# Is the header present? -+{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5 -+$as_echo_n "checking sys/mkdev.h presence... " >&6; } -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+_ACEOF -+if { (ac_try="$ac_cpp conftest.$ac_ext" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null && { -+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -+ test ! -s conftest.err -+ }; then -+ ac_header_preproc=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_preproc=no -+fi -+ -+rm -f conftest.err conftest.$ac_ext -+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -+$as_echo "$ac_header_preproc" >&6; } -+ -+# So? What about this header? -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) -+ { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5 -+$as_echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5 -+$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5 -+$as_echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5 -+$as_echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5 -+$as_echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5 -+$as_echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5 -+$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5 -+$as_echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;} -+ -+ ;; -+esac -+{ $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 -+$as_echo_n "checking for sys/mkdev.h... " >&6; } -+if test "${ac_cv_header_sys_mkdev_h+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_cv_header_sys_mkdev_h=$ac_header_preproc -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 -+$as_echo "$ac_cv_header_sys_mkdev_h" >&6; } -+ -+fi -+if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define MAJOR_IN_MKDEV 1 -+_ACEOF -+ -+fi -+ -+ -+ -+ if test $ac_cv_header_sys_mkdev_h = no; then -+ if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then -+ { $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 -+$as_echo_n "checking for sys/sysmacros.h... " >&6; } -+if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 -+$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; } -+else -+ # Is the header compilable? -+{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5 -+$as_echo_n "checking sys/sysmacros.h usability... " >&6; } -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+#include -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_header_compiler=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_compiler=no -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -+$as_echo "$ac_header_compiler" >&6; } -+ -+# Is the header present? -+{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5 -+$as_echo_n "checking sys/sysmacros.h presence... " >&6; } -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+_ACEOF -+if { (ac_try="$ac_cpp conftest.$ac_ext" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null && { -+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -+ test ! -s conftest.err -+ }; then -+ ac_header_preproc=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_preproc=no -+fi -+ -+rm -f conftest.err conftest.$ac_ext -+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -+$as_echo "$ac_header_preproc" >&6; } -+ -+# So? What about this header? -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) -+ { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5 -+$as_echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5 -+$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5 -+$as_echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5 -+$as_echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5 -+$as_echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5 -+$as_echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5 -+$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5 -+$as_echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;} -+ -+ ;; -+esac -+{ $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 -+$as_echo_n "checking for sys/sysmacros.h... " >&6; } -+if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_cv_header_sys_sysmacros_h=$ac_header_preproc -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 -+$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; } -+ -+fi -+if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then -+ -+cat >>confdefs.h <<\_ACEOF -+#define MAJOR_IN_SYSMACROS 1 -+_ACEOF -+ -+fi -+ -+ -+ fi -+fi -+ -+{ $as_echo "$as_me:$LINENO: checking for sig_atomic_t" >&5 -+$as_echo_n "checking for sig_atomic_t... " >&6; } -+if test "${ac_cv_type_sig_atomic_t+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_cv_type_sig_atomic_t=no -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ -+int -+main () -+{ -+if (sizeof (sig_atomic_t)) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ -+int -+main () -+{ -+if (sizeof ((sig_atomic_t))) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ : -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_type_sig_atomic_t=yes -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5 -+$as_echo "$ac_cv_type_sig_atomic_t" >&6; } -+if test "x$ac_cv_type_sig_atomic_t" = x""yes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_SIG_ATOMIC_T 1 -+_ACEOF -+ -+ -+fi -+{ $as_echo "$as_me:$LINENO: checking for siginfo_t" >&5 -+$as_echo_n "checking for siginfo_t... " >&6; } -+if test "${ac_cv_type_siginfo_t+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_cv_type_siginfo_t=no -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ -+int -+main () -+{ -+if (sizeof (siginfo_t)) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ -+int -+main () -+{ -+if (sizeof ((siginfo_t))) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ : -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_type_siginfo_t=yes -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_siginfo_t" >&5 -+$as_echo "$ac_cv_type_siginfo_t" >&6; } -+if test "x$ac_cv_type_siginfo_t" = x""yes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_SIGINFO_T 1 -+_ACEOF -+ -+ -+fi -+ -+{ $as_echo "$as_me:$LINENO: checking for struct sockaddr_in6.sin6_scope_id" >&5 -+$as_echo_n "checking for struct sockaddr_in6.sin6_scope_id... " >&6; } -+if test "${ac_cv_member_struct_sockaddr_in6_sin6_scope_id+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+#include -+#include -+ -+int -+main () -+{ -+static struct sockaddr_in6 ac_aggr; -+if (ac_aggr.sin6_scope_id) -+return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_sockaddr_in6_sin6_scope_id=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+#include -+#include -+ -+int -+main () -+{ -+static struct sockaddr_in6 ac_aggr; -+if (sizeof ac_aggr.sin6_scope_id) -+return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_sockaddr_in6_sin6_scope_id=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_member_struct_sockaddr_in6_sin6_scope_id=no -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_in6_sin6_scope_id" >&5 -+$as_echo "$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" >&6; } -+if test "x$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" = x""yes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1 -+_ACEOF -+ -+ -+fi -+ -+{ $as_echo "$as_me:$LINENO: checking for long long" >&5 -+$as_echo_n "checking for long long... " >&6; } -+if test "${ac_cv_type_long_long+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_cv_type_long_long=no -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+int -+main () -+{ -+if (sizeof (long long)) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+int -+main () -+{ -+if (sizeof ((long long))) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ : -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_type_long_long=yes -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 -+$as_echo "$ac_cv_type_long_long" >&6; } -+if test "x$ac_cv_type_long_long" = x""yes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_LONG_LONG 1 -+_ACEOF -+ -+ -+fi -+ -+{ $as_echo "$as_me:$LINENO: checking for little endian long long" >&5 -+$as_echo_n "checking for little endian long long... " >&6; } -+if test "${ac_cv_have_little_endian_long_long+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ if test "$cross_compiling" = yes; then -+ # Should try to guess here -+ac_cv_have_little_endian_long_long=no -+ -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+int main () { -+ union { -+ long long ll; -+ long l [2]; -+ } u; -+ u.ll = 0x12345678; -+ if (u.l[0] == 0x12345678) -+ return 0; -+ return 1; -+} -+ -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_have_little_endian_long_long=yes -+else -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+ac_cv_have_little_endian_long_long=no -+fi -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+fi -+ -+ -+fi -+ -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_little_endian_long_long" >&5 -+$as_echo "$ac_cv_have_little_endian_long_long" >&6; } -+if test "$ac_cv_have_little_endian_long_long" = yes -+then -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_LITTLE_ENDIAN_LONG_LONG 1 -+_ACEOF -+ -+fi -+ -+{ $as_echo "$as_me:$LINENO: checking for long long off_t" >&5 -+$as_echo_n "checking for long long off_t... " >&6; } -+if test "${ac_cv_have_long_long_off_t+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ if test "$cross_compiling" = yes; then -+ # Should try to guess here -+ac_cv_have_long_long_off_t=no -+ -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+main () { -+ if (sizeof (off_t) == sizeof (long long) && -+ sizeof (off_t) > sizeof (long)) -+ return 0; -+ return 1; -+} -+ -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_have_long_long_off_t=yes -+else -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+ac_cv_have_long_long_off_t=no -+fi -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+fi -+ -+ -+fi -+ -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_long_long_off_t" >&5 -+$as_echo "$ac_cv_have_long_long_off_t" >&6; } -+if test "$ac_cv_have_long_long_off_t" = yes -+then -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_LONG_LONG_OFF_T 1 -+_ACEOF -+ -+fi -+ -+{ $as_echo "$as_me:$LINENO: checking for long long rlim_t" >&5 -+$as_echo_n "checking for long long rlim_t... " >&6; } -+if test "${ac_cv_have_long_long_rlim_t+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ if test "$cross_compiling" = yes; then -+ # Should try to guess here -+ac_cv_have_long_long_rlim_t=no -+ -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+#include -+#include -+main () { -+ if (sizeof (rlim_t) == sizeof (long long) && -+ sizeof (rlim_t) > sizeof (long)) -+ return 0; -+ return 1; -+} -+ -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_have_long_long_rlim_t=yes -+else -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+ac_cv_have_long_long_rlim_t=no -+fi -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+fi -+ -+ -+fi -+ -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_long_long_rlim_t" >&5 -+$as_echo "$ac_cv_have_long_long_rlim_t" >&6; } -+if test "$ac_cv_have_long_long_rlim_t" = yes -+then -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_LONG_LONG_RLIM_T 1 -+_ACEOF -+ -+fi -+ -+{ $as_echo "$as_me:$LINENO: checking for struct opthdr" >&5 -+$as_echo_n "checking for struct opthdr... " >&6; } -+if test "${ac_cv_type_struct_opthdr+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_cv_type_struct_opthdr=no -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ -+int -+main () -+{ -+if (sizeof (struct opthdr)) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ -+int -+main () -+{ -+if (sizeof ((struct opthdr))) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ : -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_type_struct_opthdr=yes -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_opthdr" >&5 -+$as_echo "$ac_cv_type_struct_opthdr" >&6; } -+if test "x$ac_cv_type_struct_opthdr" = x""yes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_STRUCT_OPTHDR 1 -+_ACEOF -+ -+ -+fi -+ -+{ $as_echo "$as_me:$LINENO: checking for struct t_opthdr" >&5 -+$as_echo_n "checking for struct t_opthdr... " >&6; } -+if test "${ac_cv_type_struct_t_opthdr+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_cv_type_struct_t_opthdr=no -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ -+int -+main () -+{ -+if (sizeof (struct t_opthdr)) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ -+int -+main () -+{ -+if (sizeof ((struct t_opthdr))) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ : -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_type_struct_t_opthdr=yes -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_t_opthdr" >&5 -+$as_echo "$ac_cv_type_struct_t_opthdr" >&6; } -+if test "x$ac_cv_type_struct_t_opthdr" = x""yes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_STRUCT_T_OPTHDR 1 -+_ACEOF -+ -+ -+fi -+ -+ -+if test x$opsys != xlinux; then -+ -+{ $as_echo "$as_me:$LINENO: checking for main in -lnsl" >&5 -+$as_echo_n "checking for main in -lnsl... " >&6; } -+if test "${ac_cv_lib_nsl_main+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_check_lib_save_LIBS=$LIBS -+LIBS="-lnsl $LIBS" -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+ -+int -+main () -+{ -+return main (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest$ac_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ ac_cv_lib_nsl_main=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_lib_nsl_main=no -+fi -+ -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+LIBS=$ac_check_lib_save_LIBS -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5 - $as_echo "$ac_cv_lib_nsl_main" >&6; } --if test "x$ac_cv_lib_nsl_main" = x""yes; then : -+if test "x$ac_cv_lib_nsl_main" = x""yes; then -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_LIBNSL 1 -+_ACEOF -+ -+ LIBS="-lnsl $LIBS" -+ -+fi -+ -+fi -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+for ac_func in \ -+ fork \ -+ getdents \ -+ if_indextoname \ -+ inet_ntop \ -+ mctl \ -+ prctl \ -+ pread \ -+ sendmsg \ -+ sigaction \ -+ strerror \ -+ strsignal \ -+ sys_siglist \ -+ _sys_siglist \ -+ -+do -+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -+$as_echo_n "checking for $ac_func... " >&6; } -+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+/* Define $ac_func to an innocuous variant, in case declares $ac_func. -+ For example, HP-UX 11i declares gettimeofday. */ -+#define $ac_func innocuous_$ac_func -+ -+/* System header to define __stub macros and hopefully few prototypes, -+ which can conflict with char $ac_func (); below. -+ Prefer to if __STDC__ is defined, since -+ exists even on freestanding compilers. */ -+ -+#ifdef __STDC__ -+# include -+#else -+# include -+#endif -+ -+#undef $ac_func -+ -+/* Override any GCC internal prototype to avoid an error. -+ Use char because int might match the return type of a GCC -+ builtin and then its argument prototype would still apply. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+char $ac_func (); -+/* The GNU C library defines this for functions which it implements -+ to always fail with ENOSYS. Some functions are actually named -+ something starting with __ and the normal name is an alias. */ -+#if defined __stub_$ac_func || defined __stub___$ac_func -+choke me -+#endif -+ -+int -+main () -+{ -+return $ac_func (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest$ac_exeext && { -+ test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext -+ }; then -+ eval "$as_ac_var=yes" -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ eval "$as_ac_var=no" -+fi -+ -+rm -rf conftest.dSYM -+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+ac_res=`eval 'as_val=${'$as_ac_var'} -+ $as_echo "$as_val"'` -+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -+$as_echo "$ac_res" >&6; } -+as_val=`eval 'as_val=${'$as_ac_var'} -+ $as_echo "$as_val"'` -+ if test "x$as_val" = x""yes; then -+ cat >>confdefs.h <<_ACEOF -+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -+_ACEOF -+ -+fi -+done -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+for ac_header in \ -+ inttypes.h \ -+ ioctls.h \ -+ libaio.h \ -+ mqueue.h \ -+ poll.h \ -+ stropts.h \ -+ termio.h \ -+ sys/acl.h \ -+ sys/aio.h \ -+ sys/asynch.h \ -+ sys/conf.h \ -+ sys/door.h \ -+ sys/epoll.h \ -+ sys/filio.h \ -+ sys/ioctl.h \ -+ sys/nscsys.h \ -+ sys/poll.h \ -+ sys/ptrace.h \ -+ sys/reg.h \ -+ sys/stream.h \ -+ sys/sysconfig.h \ -+ sys/tihdr.h \ -+ sys/tiuser.h \ -+ sys/uio.h \ -+ sys/vfs.h \ -+ asm/cachectl.h \ -+ asm/sysmips.h \ -+ linux/capability.h \ -+ linux/ptrace.h \ -+ linux/utsname.h \ -+ -+do -+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -+$as_echo_n "checking for $ac_header... " >&6; } -+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -+ $as_echo_n "(cached) " >&6 -+fi -+ac_res=`eval 'as_val=${'$as_ac_Header'} -+ $as_echo "$as_val"'` -+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -+$as_echo "$ac_res" >&6; } -+else -+ # Is the header compilable? -+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -+$as_echo_n "checking $ac_header usability... " >&6; } -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+#include <$ac_header> -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_header_compiler=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_compiler=no -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -+$as_echo "$ac_header_compiler" >&6; } -+ -+# Is the header present? -+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -+$as_echo_n "checking $ac_header presence... " >&6; } -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include <$ac_header> -+_ACEOF -+if { (ac_try="$ac_cpp conftest.$ac_ext" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } >/dev/null && { -+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || -+ test ! -s conftest.err -+ }; then -+ ac_header_preproc=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_header_preproc=no -+fi -+ -+rm -f conftest.err conftest.$ac_ext -+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -+$as_echo "$ac_header_preproc" >&6; } -+ -+# So? What about this header? -+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in -+ yes:no: ) -+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} -+ ac_header_preproc=yes -+ ;; -+ no:yes:* ) -+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} -+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} -+ -+ ;; -+esac -+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -+$as_echo_n "checking for $ac_header... " >&6; } -+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -+ $as_echo_n "(cached) " >&6 -+else -+ eval "$as_ac_Header=\$ac_header_preproc" -+fi -+ac_res=`eval 'as_val=${'$as_ac_Header'} -+ $as_echo "$as_val"'` -+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -+$as_echo "$ac_res" >&6; } -+ -+fi -+as_val=`eval 'as_val=${'$as_ac_Header'} -+ $as_echo "$as_val"'` -+ if test "x$as_val" = x""yes; then -+ cat >>confdefs.h <<_ACEOF -+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+_ACEOF -+ -+fi -+ -+done -+ -+ -+ -+ -+ -+for ac_header in linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h -+do -+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -+$as_echo_n "checking for $ac_header... " >&6; } -+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+#include -+#include -+ -+#include <$ac_header> -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ eval "$as_ac_Header=yes" -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ eval "$as_ac_Header=no" -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+ac_res=`eval 'as_val=${'$as_ac_Header'} -+ $as_echo "$as_val"'` -+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -+$as_echo "$ac_res" >&6; } -+as_val=`eval 'as_val=${'$as_ac_Header'} -+ $as_echo "$as_val"'` -+ if test "x$as_val" = x""yes; then -+ cat >>confdefs.h <<_ACEOF -+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+_ACEOF -+ -+fi -+ -+done -+ -+ -+for ac_header in asm/sigcontext.h -+do -+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -+$as_echo_n "checking for $ac_header... " >&6; } -+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ -+#include <$ac_header> -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ eval "$as_ac_Header=yes" -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ eval "$as_ac_Header=no" -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+ac_res=`eval 'as_val=${'$as_ac_Header'} -+ $as_echo "$as_val"'` -+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -+$as_echo "$ac_res" >&6; } -+as_val=`eval 'as_val=${'$as_ac_Header'} -+ $as_echo "$as_val"'` -+ if test "x$as_val" = x""yes; then -+ cat >>confdefs.h <<_ACEOF -+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+_ACEOF -+ -+fi -+ -+done -+ -+{ $as_echo "$as_me:$LINENO: checking for struct sigcontext_struct" >&5 -+$as_echo_n "checking for struct sigcontext_struct... " >&6; } -+if test "${ac_cv_type_struct_sigcontext_struct+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_cv_type_struct_sigcontext_struct=no -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ -+int -+main () -+{ -+if (sizeof (struct sigcontext_struct)) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ -+int -+main () -+{ -+if (sizeof ((struct sigcontext_struct))) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ : -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_type_struct_sigcontext_struct=yes -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sigcontext_struct" >&5 -+$as_echo "$ac_cv_type_struct_sigcontext_struct" >&6; } -+if test "x$ac_cv_type_struct_sigcontext_struct" = x""yes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_STRUCT_SIGCONTEXT_STRUCT 1 -+_ACEOF -+ -+ -+fi -+{ $as_echo "$as_me:$LINENO: checking for struct sigcontext" >&5 -+$as_echo_n "checking for struct sigcontext... " >&6; } -+if test "${ac_cv_type_struct_sigcontext+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_cv_type_struct_sigcontext=no -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ -+int -+main () -+{ -+if (sizeof (struct sigcontext)) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ -+int -+main () -+{ -+if (sizeof ((struct sigcontext))) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ : -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_type_struct_sigcontext=yes -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sigcontext" >&5 -+$as_echo "$ac_cv_type_struct_sigcontext" >&6; } -+if test "x$ac_cv_type_struct_sigcontext" = x""yes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_STRUCT_SIGCONTEXT 1 -+_ACEOF -+ -+ -+fi -+ -+ -+ -+for ac_header in netinet/tcp.h netinet/udp.h -+do -+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -+$as_echo_n "checking for $ac_header... " >&6; } -+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ -+#include <$ac_header> -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ eval "$as_ac_Header=yes" -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ eval "$as_ac_Header=no" -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+ac_res=`eval 'as_val=${'$as_ac_Header'} -+ $as_echo "$as_val"'` -+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -+$as_echo "$ac_res" >&6; } -+as_val=`eval 'as_val=${'$as_ac_Header'} -+ $as_echo "$as_val"'` -+ if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF --#define HAVE_LIBNSL 1 -+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+_ACEOF -+ -+fi -+ -+done -+ -+ -+{ $as_echo "$as_me:$LINENO: checking for MP procfs" >&5 -+$as_echo_n "checking for MP procfs... " >&6; } -+if test "${ac_cv_mp_procfs+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ if test "$cross_compiling" = yes; then -+ -+# Guess or punt. -+case "$host_os" in -+svr4.2*|svr5*) -+ ac_cv_mp_procfs=yes -+ ;; -+*) -+ ac_cv_mp_procfs=no -+ ;; -+esac -+ -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+#include -+#include -+#include -+ -+main() -+{ -+ int pid; -+ char proc[32]; -+ FILE *ctl; -+ FILE *status; -+ int cmd; -+ struct pstatus pstatus; -+ -+ if ((pid = fork()) == 0) { -+ pause(); -+ exit(0); -+ } -+ sprintf(proc, "/proc/%d/ctl", pid); -+ if ((ctl = fopen(proc, "w")) == NULL) -+ goto fail; -+ sprintf(proc, "/proc/%d/status", pid); -+ if ((status = fopen (proc, "r")) == NULL) -+ goto fail; -+ cmd = PCSTOP; -+ if (write (fileno (ctl), &cmd, sizeof cmd) < 0) -+ goto fail; -+ if (read (fileno (status), &pstatus, sizeof pstatus) < 0) -+ goto fail; -+ kill(pid, SIGKILL); -+ exit(0); -+fail: -+ kill(pid, SIGKILL); -+ exit(1); -+} -+ -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_mp_procfs=yes -+else -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+ac_cv_mp_procfs=no -+fi -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+fi -+ -+ -+fi -+ -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_mp_procfs" >&5 -+$as_echo "$ac_cv_mp_procfs" >&6; } -+if test "$ac_cv_mp_procfs" = yes -+then -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_MP_PROCFS 1 -+_ACEOF -+ -+fi -+ -+{ $as_echo "$as_me:$LINENO: checking for pollable procfs" >&5 -+$as_echo_n "checking for pollable procfs... " >&6; } -+if test "${ac_cv_pollable_procfs+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ if test "$cross_compiling" = yes; then -+ -+# Guess or punt. -+case "$host_os" in -+solaris2*|irix5*|svr4.2uw*|svr5*) -+ ac_cv_pollable_procfs=yes -+ ;; -+*) -+ ac_cv_pollable_procfs=no -+ ;; -+esac -+ -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#ifdef HAVE_MP_PROCFS -+#define PIOCSTOP PCSTOP -+#define POLLWANT POLLWRNORM -+#define PROC "/proc/%d/ctl" -+#define PROC_MODE "w" -+int IOCTL (int fd, int cmd, int arg) { -+ return write (fd, &cmd, sizeof cmd); -+} -+#else -+#define POLLWANT POLLPRI -+#define PROC "/proc/%d" -+#define PROC_MODE "r+" -+#define IOCTL ioctl -+#endif -+ -+main() -+{ -+ int pid; -+ char proc[32]; -+ FILE *pfp; -+ struct pollfd pfd; -+ -+ if ((pid = fork()) == 0) { -+ pause(); -+ exit(0); -+ } -+ sprintf(proc, PROC, pid); -+ if ((pfp = fopen(proc, PROC_MODE)) == NULL) -+ goto fail; -+ if (IOCTL(fileno(pfp), PIOCSTOP, NULL) < 0) -+ goto fail; -+ pfd.fd = fileno(pfp); -+ pfd.events = POLLWANT; -+ if (poll(&pfd, 1, 0) < 0) -+ goto fail; -+ if (!(pfd.revents & POLLWANT)) -+ goto fail; -+ kill(pid, SIGKILL); -+ exit(0); -+fail: -+ kill(pid, SIGKILL); -+ exit(1); -+} -+ -+_ACEOF -+rm -f conftest$ac_exeext -+if { (ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -+ { (case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_pollable_procfs=yes -+else -+ $as_echo "$as_me: program exited with status $ac_status" >&5 -+$as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+( exit $ac_status ) -+ac_cv_pollable_procfs=no -+fi -+rm -rf conftest.dSYM -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -+fi -+ -+ -+fi -+ -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_pollable_procfs" >&5 -+$as_echo "$ac_cv_pollable_procfs" >&6; } -+if test "$ac_cv_pollable_procfs" = yes -+then -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_POLLABLE_PROCFS 1 -+_ACEOF -+ -+fi -+ -+ -+{ $as_echo "$as_me:$LINENO: checking for struct msghdr.msg_control" >&5 -+$as_echo_n "checking for struct msghdr.msg_control... " >&6; } -+if test "${ac_cv_member_struct_msghdr_msg_control+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ -+int -+main () -+{ -+static struct msghdr ac_aggr; -+if (ac_aggr.msg_control) -+return 0; -+ ; -+ return 0; -+} - _ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_msghdr_msg_control=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - -- LIBS="-lnsl $LIBS" -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ -+int -+main () -+{ -+static struct msghdr ac_aggr; -+if (sizeof ac_aggr.msg_control) -+return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_msghdr_msg_control=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - -+ ac_cv_member_struct_msghdr_msg_control=no - fi - -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - --for ac_func in \ -- fork \ -- getdents \ -- if_indextoname \ -- inet_ntop \ -- mctl \ -- prctl \ -- pread \ -- sendmsg \ -- sigaction \ -- strerror \ -- strsignal \ -- sys_siglist \ -- _sys_siglist \ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_msghdr_msg_control" >&5 -+$as_echo "$ac_cv_member_struct_msghdr_msg_control" >&6; } -+if test "x$ac_cv_member_struct_msghdr_msg_control" = x""yes; then - --do : -- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` --ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" --eval as_val=\$$as_ac_var -- if test "x$as_val" = x""yes; then : -- cat >>confdefs.h <<_ACEOF --#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -+cat >>confdefs.h <<_ACEOF -+#define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1 - _ACEOF - -+ - fi --done - --for ac_header in \ -- inttypes.h \ -- ioctls.h \ -- libaio.h \ -- mqueue.h \ -- poll.h \ -- stropts.h \ -- termio.h \ -- sys/acl.h \ -- sys/aio.h \ -- sys/asynch.h \ -- sys/conf.h \ -- sys/door.h \ -- sys/epoll.h \ -- sys/filio.h \ -- sys/ioctl.h \ -- sys/nscsys.h \ -- sys/poll.h \ -- sys/ptrace.h \ -- sys/reg.h \ -- sys/stream.h \ -- sys/sysconfig.h \ -- sys/tihdr.h \ -- sys/tiuser.h \ -- sys/uio.h \ -- sys/vfs.h \ -- asm/cachectl.h \ -- asm/sysmips.h \ -- linux/capability.h \ -- linux/ptrace.h \ -- linux/utsname.h \ -+{ $as_echo "$as_me:$LINENO: checking for pr_syscall in struct prstatus" >&5 -+$as_echo_n "checking for pr_syscall in struct prstatus... " >&6; } -+if test "${ac_cv_struct_pr_syscall+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+#ifdef HAVE_MP_PROCFS -+pstatus_t s; -+s.pr_lwp.pr_syscall -+#else -+prstatus_t s; -+s.pr_syscall -+#endif -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_struct_pr_syscall=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - --do : -- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` --ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" --eval as_val=\$$as_ac_Header -- if test "x$as_val" = x""yes; then : -- cat >>confdefs.h <<_ACEOF --#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+ ac_cv_struct_pr_syscall=no -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+ -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_pr_syscall" >&5 -+$as_echo "$ac_cv_struct_pr_syscall" >&6; } -+if test "$ac_cv_struct_pr_syscall" = yes -+then -+ -+cat >>confdefs.h <<\_ACEOF -+#define HAVE_PR_SYSCALL 1 -+_ACEOF -+ -+fi -+ -+ -+{ $as_echo "$as_me:$LINENO: checking for struct T_conn_res.QUEUE_ptr" >&5 -+$as_echo_n "checking for struct T_conn_res.QUEUE_ptr... " >&6; } -+if test "${ac_cv_member_struct_T_conn_res_QUEUE_ptr+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+#include -+ -+int -+main () -+{ -+static struct T_conn_res ac_aggr; -+if (ac_aggr.QUEUE_ptr) -+return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_T_conn_res_QUEUE_ptr=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+#include -+ -+int -+main () -+{ -+static struct T_conn_res ac_aggr; -+if (sizeof ac_aggr.QUEUE_ptr) -+return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_T_conn_res_QUEUE_ptr=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_member_struct_T_conn_res_QUEUE_ptr=no -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_T_conn_res_QUEUE_ptr" >&5 -+$as_echo "$ac_cv_member_struct_T_conn_res_QUEUE_ptr" >&6; } -+if test "x$ac_cv_member_struct_T_conn_res_QUEUE_ptr" = x""yes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_STRUCT_T_CONN_RES_QUEUE_PTR 1 -+_ACEOF -+ -+ -+fi -+{ $as_echo "$as_me:$LINENO: checking for struct T_conn_res.ACCEPTOR_id" >&5 -+$as_echo_n "checking for struct T_conn_res.ACCEPTOR_id... " >&6; } -+if test "${ac_cv_member_struct_T_conn_res_ACCEPTOR_id+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+#include -+ -+int -+main () -+{ -+static struct T_conn_res ac_aggr; -+if (ac_aggr.ACCEPTOR_id) -+return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_T_conn_res_ACCEPTOR_id=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+#include -+ -+int -+main () -+{ -+static struct T_conn_res ac_aggr; -+if (sizeof ac_aggr.ACCEPTOR_id) -+return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_T_conn_res_ACCEPTOR_id=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_member_struct_T_conn_res_ACCEPTOR_id=no -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_T_conn_res_ACCEPTOR_id" >&5 -+$as_echo "$ac_cv_member_struct_T_conn_res_ACCEPTOR_id" >&6; } -+if test "x$ac_cv_member_struct_T_conn_res_ACCEPTOR_id" = x""yes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_STRUCT_T_CONN_RES_ACCEPTOR_ID 1 - _ACEOF - -+ - fi - --done - --for ac_header in linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h --do : -- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` --ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include --#include --" --eval as_val=\$$as_ac_Header -- if test "x$as_val" = x""yes; then : -- cat >>confdefs.h <<_ACEOF --#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -+{ $as_echo "$as_me:$LINENO: checking for struct __old_kernel_stat" >&5 -+$as_echo_n "checking for struct __old_kernel_stat... " >&6; } -+if test "${ac_cv_type_struct___old_kernel_stat+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_cv_type_struct___old_kernel_stat=no -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ - _ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include - --fi -- --done -+int -+main () -+{ -+if (sizeof (struct __old_kernel_stat)) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include - --for ac_header in asm/sigcontext.h --do : -- ac_fn_c_check_header_compile "$LINENO" "asm/sigcontext.h" "ac_cv_header_asm_sigcontext_h" "#include --" --if test "x$ac_cv_header_asm_sigcontext_h" = x""yes; then : -- cat >>confdefs.h <<_ACEOF --#define HAVE_ASM_SIGCONTEXT_H 1 -+int -+main () -+{ -+if (sizeof ((struct __old_kernel_stat))) -+ return 0; -+ ; -+ return 0; -+} - _ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ : -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - -+ ac_cv_type_struct___old_kernel_stat=yes - fi - --done -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - --ac_fn_c_check_type "$LINENO" "struct sigcontext_struct" "ac_cv_type_struct_sigcontext_struct" "#include --" --if test "x$ac_cv_type_struct_sigcontext_struct" = x""yes; then : -+ -+fi -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct___old_kernel_stat" >&5 -+$as_echo "$ac_cv_type_struct___old_kernel_stat" >&6; } -+if test "x$ac_cv_type_struct___old_kernel_stat" = x""yes; then - - cat >>confdefs.h <<_ACEOF --#define HAVE_STRUCT_SIGCONTEXT_STRUCT 1 -+#define HAVE_STRUCT___OLD_KERNEL_STAT 1 - _ACEOF - - - fi --ac_fn_c_check_type "$LINENO" "struct sigcontext" "ac_cv_type_struct_sigcontext" "#include --" --if test "x$ac_cv_type_struct_sigcontext" = x""yes; then : - --cat >>confdefs.h <<_ACEOF --#define HAVE_STRUCT_SIGCONTEXT 1 -+ -+{ $as_echo "$as_me:$LINENO: checking for struct pt_all_user_regs" >&5 -+$as_echo_n "checking for struct pt_all_user_regs... " >&6; } -+if test "${ac_cv_type_struct_pt_all_user_regs+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ ac_cv_type_struct_pt_all_user_regs=no -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+ -+int -+main () -+{ -+if (sizeof (struct pt_all_user_regs)) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ - _ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include - -+int -+main () -+{ -+if (sizeof ((struct pt_all_user_regs))) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ : -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - -+ ac_cv_type_struct_pt_all_user_regs=yes - fi - --for ac_header in netinet/tcp.h netinet/udp.h --do : -- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` --ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include --" --eval as_val=\$$as_ac_Header -- if test "x$as_val" = x""yes; then : -- cat >>confdefs.h <<_ACEOF --#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 --_ACEOF -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ - - fi - --done -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_pt_all_user_regs" >&5 -+$as_echo "$ac_cv_type_struct_pt_all_user_regs" >&6; } -+if test "x$ac_cv_type_struct_pt_all_user_regs" = x""yes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_STRUCT_PT_ALL_USER_REGS 1 -+_ACEOF - - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MP procfs" >&5 --$as_echo_n "checking for MP procfs... " >&6; } --if test "${ac_cv_mp_procfs+set}" = set; then : -+fi -+{ $as_echo "$as_me:$LINENO: checking for struct ia64_fpreg" >&5 -+$as_echo_n "checking for struct ia64_fpreg... " >&6; } -+if test "${ac_cv_type_struct_ia64_fpreg+set}" = set; then - $as_echo_n "(cached) " >&6 - else -- if test "$cross_compiling" = yes; then : -+ ac_cv_type_struct_ia64_fpreg=no -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include - --# Guess or punt. --case "$host_os" in --svr4.2*|svr5*) -- ac_cv_mp_procfs=yes -- ;; --*) -- ac_cv_mp_procfs=no -- ;; -+int -+main () -+{ -+if (sizeof (struct ia64_fpreg)) -+ return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; - esac -- --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+#include - --#include --#include --#include -- --main() -+int -+main () - { -- int pid; -- char proc[32]; -- FILE *ctl; -- FILE *status; -- int cmd; -- struct pstatus pstatus; -- -- if ((pid = fork()) == 0) { -- pause(); -- exit(0); -- } -- sprintf(proc, "/proc/%d/ctl", pid); -- if ((ctl = fopen(proc, "w")) == NULL) -- goto fail; -- sprintf(proc, "/proc/%d/status", pid); -- if ((status = fopen (proc, "r")) == NULL) -- goto fail; -- cmd = PCSTOP; -- if (write (fileno (ctl), &cmd, sizeof cmd) < 0) -- goto fail; -- if (read (fileno (status), &pstatus, sizeof pstatus) < 0) -- goto fail; -- kill(pid, SIGKILL); -- exit(0); --fail: -- kill(pid, SIGKILL); -- exit(1); -+if (sizeof ((struct ia64_fpreg))) -+ return 0; -+ ; -+ return 0; - } -- - _ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- ac_cv_mp_procfs=yes -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ : - else -- ac_cv_mp_procfs=no -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ ac_cv_type_struct_ia64_fpreg=yes - fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext -+ -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ - fi - -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_ia64_fpreg" >&5 -+$as_echo "$ac_cv_type_struct_ia64_fpreg" >&6; } -+if test "x$ac_cv_type_struct_ia64_fpreg" = x""yes; then - --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mp_procfs" >&5 --$as_echo "$ac_cv_mp_procfs" >&6; } --if test "$ac_cv_mp_procfs" = yes --then -+cat >>confdefs.h <<_ACEOF -+#define HAVE_STRUCT_IA64_FPREG 1 -+_ACEOF - --$as_echo "#define HAVE_MP_PROCFS 1" >>confdefs.h - - fi - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pollable procfs" >&5 --$as_echo_n "checking for pollable procfs... " >&6; } --if test "${ac_cv_pollable_procfs+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- if test "$cross_compiling" = yes; then : -- --# Guess or punt. --case "$host_os" in --solaris2*|irix5*|svr4.2uw*|svr5*) -- ac_cv_pollable_procfs=yes -- ;; --*) -- ac_cv_pollable_procfs=no -- ;; --esac - -+{ $as_echo "$as_me:$LINENO: checking for struct user_desc" >&5 -+$as_echo_n "checking for struct user_desc... " >&6; } -+if test "${ac_cv_type_struct_user_desc+set}" = set; then -+ $as_echo_n "(cached) " >&6 - else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ ac_cv_type_struct_user_desc=no -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+#include - --#include --#include --#include --#include --#include -- --#ifdef HAVE_MP_PROCFS --#define PIOCSTOP PCSTOP --#define POLLWANT POLLWRNORM --#define PROC "/proc/%d/ctl" --#define PROC_MODE "w" --int IOCTL (int fd, int cmd, int arg) { -- return write (fd, &cmd, sizeof cmd); -+int -+main () -+{ -+if (sizeof (struct user_desc)) -+ return 0; -+ ; -+ return 0; - } --#else --#define POLLWANT POLLPRI --#define PROC "/proc/%d" --#define PROC_MODE "r+" --#define IOCTL ioctl --#endif -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include - --main() -+int -+main () - { -- int pid; -- char proc[32]; -- FILE *pfp; -- struct pollfd pfd; -- -- if ((pid = fork()) == 0) { -- pause(); -- exit(0); -- } -- sprintf(proc, PROC, pid); -- if ((pfp = fopen(proc, PROC_MODE)) == NULL) -- goto fail; -- if (IOCTL(fileno(pfp), PIOCSTOP, NULL) < 0) -- goto fail; -- pfd.fd = fileno(pfp); -- pfd.events = POLLWANT; -- if (poll(&pfd, 1, 0) < 0) -- goto fail; -- if (!(pfd.revents & POLLWANT)) -- goto fail; -- kill(pid, SIGKILL); -- exit(0); --fail: -- kill(pid, SIGKILL); -- exit(1); -+if (sizeof ((struct user_desc))) -+ return 0; -+ ; -+ return 0; - } -- - _ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- ac_cv_pollable_procfs=yes -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ : - else -- ac_cv_pollable_procfs=no --fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext --fi -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - -+ ac_cv_type_struct_user_desc=yes - fi - --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pollable_procfs" >&5 --$as_echo "$ac_cv_pollable_procfs" >&6; } --if test "$ac_cv_pollable_procfs" = yes --then -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - --$as_echo "#define HAVE_POLLABLE_PROCFS 1" >>confdefs.h - - fi - -- --ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "#include --" --if test "x$ac_cv_member_struct_msghdr_msg_control" = x""yes; then : -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_user_desc" >&5 -+$as_echo "$ac_cv_type_struct_user_desc" >&6; } -+if test "x$ac_cv_type_struct_user_desc" = x""yes; then - - cat >>confdefs.h <<_ACEOF --#define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1 -+#define HAVE_STRUCT_USER_DESC 1 - _ACEOF - - - fi - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pr_syscall in struct prstatus" >&5 --$as_echo_n "checking for pr_syscall in struct prstatus... " >&6; } --if test "${ac_cv_struct_pr_syscall+set}" = set; then : -+ -+{ $as_echo "$as_me:$LINENO: checking for struct dqblk.dqb_curblocks" >&5 -+$as_echo_n "checking for struct dqblk.dqb_curblocks... " >&6; } -+if test "${ac_cv_member_struct_dqblk_dqb_curblocks+set}" = set; then - $as_echo_n "(cached) " >&6 - else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ --#include -+#include -+ - int - main () - { --#ifdef HAVE_MP_PROCFS --pstatus_t s; --s.pr_lwp.pr_syscall --#else --prstatus_t s; --s.pr_syscall --#endif -+static struct dqblk ac_aggr; -+if (ac_aggr.dqb_curblocks) -+return 0; - ; - return 0; - } - _ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- ac_cv_struct_pr_syscall=yes -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_dqblk_dqb_curblocks=yes - else -- ac_cv_struct_pr_syscall=no --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --fi -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_pr_syscall" >&5 --$as_echo "$ac_cv_struct_pr_syscall" >&6; } --if test "$ac_cv_struct_pr_syscall" = yes --then -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include - --$as_echo "#define HAVE_PR_SYSCALL 1" >>confdefs.h -+int -+main () -+{ -+static struct dqblk ac_aggr; -+if (sizeof ac_aggr.dqb_curblocks) -+return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_dqblk_dqb_curblocks=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - -+ ac_cv_member_struct_dqblk_dqb_curblocks=no - fi - -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi - --ac_fn_c_check_member "$LINENO" "struct T_conn_res" "QUEUE_ptr" "ac_cv_member_struct_T_conn_res_QUEUE_ptr" "#include --#include --" --if test "x$ac_cv_member_struct_T_conn_res_QUEUE_ptr" = x""yes; then : -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_dqblk_dqb_curblocks" >&5 -+$as_echo "$ac_cv_member_struct_dqblk_dqb_curblocks" >&6; } -+if test "x$ac_cv_member_struct_dqblk_dqb_curblocks" = x""yes; then - - cat >>confdefs.h <<_ACEOF --#define HAVE_STRUCT_T_CONN_RES_QUEUE_PTR 1 -+#define HAVE_STRUCT_DQBLK_DQB_CURBLOCKS 1 - _ACEOF - - - fi --ac_fn_c_check_member "$LINENO" "struct T_conn_res" "ACCEPTOR_id" "ac_cv_member_struct_T_conn_res_ACCEPTOR_id" "#include --#include --" --if test "x$ac_cv_member_struct_T_conn_res_ACCEPTOR_id" = x""yes; then : - --cat >>confdefs.h <<_ACEOF --#define HAVE_STRUCT_T_CONN_RES_ACCEPTOR_ID 1 -+ -+{ $as_echo "$as_me:$LINENO: checking for struct sigcontext.sc_hi2" >&5 -+$as_echo_n "checking for struct sigcontext.sc_hi2... " >&6; } -+if test "${ac_cv_member_struct_sigcontext_sc_hi2+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+#ifdef HAVE_ASM_SIGCONTEXT_H -+# include -+#endif -+ -+int -+main () -+{ -+static struct sigcontext ac_aggr; -+if (ac_aggr.sc_hi2) -+return 0; -+ ; -+ return 0; -+} - _ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_sigcontext_sc_hi2=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include -+#ifdef HAVE_ASM_SIGCONTEXT_H -+# include -+#endif - -+int -+main () -+{ -+static struct sigcontext ac_aggr; -+if (sizeof ac_aggr.sc_hi2) -+return 0; -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_member_struct_sigcontext_sc_hi2=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - -+ ac_cv_member_struct_sigcontext_sc_hi2=no - fi - -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi - --ac_fn_c_check_type "$LINENO" "struct __old_kernel_stat" "ac_cv_type_struct___old_kernel_stat" "#include --" --if test "x$ac_cv_type_struct___old_kernel_stat" = x""yes; then : -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sigcontext_sc_hi2" >&5 -+$as_echo "$ac_cv_member_struct_sigcontext_sc_hi2" >&6; } -+if test "x$ac_cv_member_struct_sigcontext_sc_hi2" = x""yes; then - - cat >>confdefs.h <<_ACEOF --#define HAVE_STRUCT___OLD_KERNEL_STAT 1 -+#define HAVE_STRUCT_SIGCONTEXT_SC_HI2 1 - _ACEOF - - - fi - - --ac_fn_c_check_type "$LINENO" "struct pt_all_user_regs" "ac_cv_type_struct_pt_all_user_regs" "#include --" --if test "x$ac_cv_type_struct_pt_all_user_regs" = x""yes; then : - --cat >>confdefs.h <<_ACEOF --#define HAVE_STRUCT_PT_ALL_USER_REGS 1 -+{ $as_echo "$as_me:$LINENO: checking whether sys_errlist is declared" >&5 -+$as_echo_n "checking whether sys_errlist is declared... " >&6; } -+if test "${ac_cv_have_decl_sys_errlist+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+$ac_includes_default -+int -+main () -+{ -+#ifndef sys_errlist -+ (void) sys_errlist; -+#endif -+ -+ ; -+ return 0; -+} - _ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_have_decl_sys_errlist=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - -+ ac_cv_have_decl_sys_errlist=no -+fi - -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi --ac_fn_c_check_type "$LINENO" "struct ia64_fpreg" "ac_cv_type_struct_ia64_fpreg" "#include --" --if test "x$ac_cv_type_struct_ia64_fpreg" = x""yes; then : -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_errlist" >&5 -+$as_echo "$ac_cv_have_decl_sys_errlist" >&6; } -+if test "x$ac_cv_have_decl_sys_errlist" = x""yes; then - - cat >>confdefs.h <<_ACEOF --#define HAVE_STRUCT_IA64_FPREG 1 -+#define HAVE_DECL_SYS_ERRLIST 1 -+_ACEOF -+ -+ -+else -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_DECL_SYS_ERRLIST 0 - _ACEOF - - - fi - - --ac_fn_c_check_type "$LINENO" "struct user_desc" "ac_cv_type_struct_user_desc" "#include --" --if test "x$ac_cv_type_struct_user_desc" = x""yes; then : -+{ $as_echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5 -+$as_echo_n "checking whether sys_siglist is declared... " >&6; } -+if test "${ac_cv_have_decl_sys_siglist+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include - --cat >>confdefs.h <<_ACEOF --#define HAVE_STRUCT_USER_DESC 1 -+int -+main () -+{ -+#ifndef sys_siglist -+ (void) sys_siglist; -+#endif -+ -+ ; -+ return 0; -+} - _ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_have_decl_sys_siglist=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - -+ ac_cv_have_decl_sys_siglist=no -+fi - -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5 -+$as_echo "$ac_cv_have_decl_sys_siglist" >&6; } -+if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then - -+cat >>confdefs.h <<_ACEOF -+#define HAVE_DECL_SYS_SIGLIST 1 -+_ACEOF - --ac_fn_c_check_member "$LINENO" "struct dqblk" "dqb_curblocks" "ac_cv_member_struct_dqblk_dqb_curblocks" "#include --" --if test "x$ac_cv_member_struct_dqblk_dqb_curblocks" = x""yes; then : - --cat >>confdefs.h <<_ACEOF --#define HAVE_STRUCT_DQBLK_DQB_CURBLOCKS 1 -+else -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_DECL_SYS_SIGLIST 0 - _ACEOF - - - fi -+{ $as_echo "$as_me:$LINENO: checking whether _sys_siglist is declared" >&5 -+$as_echo_n "checking whether _sys_siglist is declared... " >&6; } -+if test "${ac_cv_have_decl__sys_siglist+set}" = set; then -+ $as_echo_n "(cached) " >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+#include - -- --ac_fn_c_check_member "$LINENO" "struct sigcontext" "sc_hi2" "ac_cv_member_struct_sigcontext_sc_hi2" "#include --#ifdef HAVE_ASM_SIGCONTEXT_H --# include -+int -+main () -+{ -+#ifndef _sys_siglist -+ (void) _sys_siglist; - #endif --" --if test "x$ac_cv_member_struct_sigcontext_sc_hi2" = x""yes; then : - --cat >>confdefs.h <<_ACEOF --#define HAVE_STRUCT_SIGCONTEXT_SC_HI2 1 -+ ; -+ return 0; -+} - _ACEOF -+rm -f conftest.$ac_objext -+if { (ac_try="$ac_compile" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -+$as_echo "$ac_try_echo") >&5 -+ (eval "$ac_compile") 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && { -+ test -z "$ac_c_werror_flag" || -+ test ! -s conftest.err -+ } && test -s conftest.$ac_objext; then -+ ac_cv_have_decl__sys_siglist=yes -+else -+ $as_echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 - -- -+ ac_cv_have_decl__sys_siglist=no - fi - -- -- --ac_fn_c_check_decl "$LINENO" "sys_errlist" "ac_cv_have_decl_sys_errlist" "$ac_includes_default" --if test "x$ac_cv_have_decl_sys_errlist" = x""yes; then : -- ac_have_decl=1 --else -- ac_have_decl=0 -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi -+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl__sys_siglist" >&5 -+$as_echo "$ac_cv_have_decl__sys_siglist" >&6; } -+if test "x$ac_cv_have_decl__sys_siglist" = x""yes; then - - cat >>confdefs.h <<_ACEOF --#define HAVE_DECL_SYS_ERRLIST $ac_have_decl -+#define HAVE_DECL__SYS_SIGLIST 1 - _ACEOF - --ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include --" --if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then : -- ac_have_decl=1 --else -- ac_have_decl=0 --fi - --cat >>confdefs.h <<_ACEOF --#define HAVE_DECL_SYS_SIGLIST $ac_have_decl --_ACEOF --ac_fn_c_check_decl "$LINENO" "_sys_siglist" "ac_cv_have_decl__sys_siglist" "#include --" --if test "x$ac_cv_have_decl__sys_siglist" = x""yes; then : -- ac_have_decl=1 - else -- ac_have_decl=0 -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_DECL__SYS_SIGLIST 0 -+_ACEOF -+ -+ - fi - --cat >>confdefs.h <<_ACEOF --#define HAVE_DECL__SYS_SIGLIST $ac_have_decl --_ACEOF - - - # Extract the first word of "perl", so it can be a program name with args. - set dummy perl; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 - $as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_path_PERL+set}" = set; then : -+if test "${ac_cv_path_PERL+set}" = set; then - $as_echo_n "(cached) " >&6 - else - case $PERL in -@@ -6313,14 +10706,14 @@ - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -+ for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi - done -- done -+done - IFS=$as_save_IFS - - ;; -@@ -6328,10 +10721,10 @@ - fi - PERL=$ac_cv_path_PERL - if test -n "$PERL"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 -+ { $as_echo "$as_me:$LINENO: result: $PERL" >&5 - $as_echo "$PERL" >&6; } - else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+ { $as_echo "$as_me:$LINENO: result: no" >&5 - $as_echo "no" >&6; } - fi - -@@ -6366,13 +10759,13 @@ - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( -- *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -+ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 - $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( -- *) { eval $ac_var=; unset $ac_var;} ;; -+ *) $as_unset $ac_var ;; - esac ;; - esac - done -@@ -6380,8 +10773,8 @@ - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) -- # `set' does not quote correctly, so add quotes: double-quote -- # substitution turns \\\\ into \\, and sed turns \\ into \. -+ # `set' does not quote correctly, so add quotes (double-quote -+ # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" -@@ -6404,11 +10797,11 @@ - if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && -- { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -+ { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 - $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else -- { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -+ { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 - $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi - fi -@@ -6428,8 +10821,8 @@ - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. -- as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" -- as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -+ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" -+ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' - done - LIBOBJS=$ac_libobjs - -@@ -6445,50 +10838,76 @@ - fi - - if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then -- as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. --Usually this means the macro was only invoked conditionally." "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. -+Usually this means the macro was only invoked conditionally." >&5 -+$as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. -+Usually this means the macro was only invoked conditionally." >&2;} -+ { (exit 1); exit 1; }; } - fi - if test -z "${LINUX_TRUE}" && test -z "${LINUX_FALSE}"; then -- as_fn_error "conditional \"LINUX\" was never defined. --Usually this means the macro was only invoked conditionally." "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: conditional \"LINUX\" was never defined. -+Usually this means the macro was only invoked conditionally." >&5 -+$as_echo "$as_me: error: conditional \"LINUX\" was never defined. -+Usually this means the macro was only invoked conditionally." >&2;} -+ { (exit 1); exit 1; }; } - fi - if test -z "${I386_TRUE}" && test -z "${I386_FALSE}"; then -- as_fn_error "conditional \"I386\" was never defined. --Usually this means the macro was only invoked conditionally." "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: conditional \"I386\" was never defined. -+Usually this means the macro was only invoked conditionally." >&5 -+$as_echo "$as_me: error: conditional \"I386\" was never defined. -+Usually this means the macro was only invoked conditionally." >&2;} -+ { (exit 1); exit 1; }; } - fi - if test -z "${X86_64_TRUE}" && test -z "${X86_64_FALSE}"; then -- as_fn_error "conditional \"X86_64\" was never defined. --Usually this means the macro was only invoked conditionally." "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: conditional \"X86_64\" was never defined. -+Usually this means the macro was only invoked conditionally." >&5 -+$as_echo "$as_me: error: conditional \"X86_64\" was never defined. -+Usually this means the macro was only invoked conditionally." >&2;} -+ { (exit 1); exit 1; }; } - fi - if test -z "${SUNOS4_TRUE}" && test -z "${SUNOS4_FALSE}"; then -- as_fn_error "conditional \"SUNOS4\" was never defined. --Usually this means the macro was only invoked conditionally." "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: conditional \"SUNOS4\" was never defined. -+Usually this means the macro was only invoked conditionally." >&5 -+$as_echo "$as_me: error: conditional \"SUNOS4\" was never defined. -+Usually this means the macro was only invoked conditionally." >&2;} -+ { (exit 1); exit 1; }; } - fi - if test -z "${SVR4_TRUE}" && test -z "${SVR4_FALSE}"; then -- as_fn_error "conditional \"SVR4\" was never defined. --Usually this means the macro was only invoked conditionally." "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: conditional \"SVR4\" was never defined. -+Usually this means the macro was only invoked conditionally." >&5 -+$as_echo "$as_me: error: conditional \"SVR4\" was never defined. -+Usually this means the macro was only invoked conditionally." >&2;} -+ { (exit 1); exit 1; }; } - fi - if test -z "${FREEBSD_TRUE}" && test -z "${FREEBSD_FALSE}"; then -- as_fn_error "conditional \"FREEBSD\" was never defined. --Usually this means the macro was only invoked conditionally." "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: conditional \"FREEBSD\" was never defined. -+Usually this means the macro was only invoked conditionally." >&5 -+$as_echo "$as_me: error: conditional \"FREEBSD\" was never defined. -+Usually this means the macro was only invoked conditionally." >&2;} -+ { (exit 1); exit 1; }; } - fi - if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then -- as_fn_error "conditional \"AMDEP\" was never defined. --Usually this means the macro was only invoked conditionally." "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -+Usually this means the macro was only invoked conditionally." >&5 -+$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. -+Usually this means the macro was only invoked conditionally." >&2;} -+ { (exit 1); exit 1; }; } - fi - if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then -- as_fn_error "conditional \"am__fastdepCC\" was never defined. --Usually this means the macro was only invoked conditionally." "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -+Usually this means the macro was only invoked conditionally." >&5 -+$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -+Usually this means the macro was only invoked conditionally." >&2;} -+ { (exit 1); exit 1; }; } - fi - - : ${CONFIG_STATUS=./config.status} - ac_write_fail=0 - ac_clean_files_save=$ac_clean_files - ac_clean_files="$ac_clean_files $CONFIG_STATUS" --{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -+{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 - $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} --as_write_fail=0 --cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -+cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - #! $SHELL - # Generated by $as_me. - # Run this file to recreate the current configuration. -@@ -6498,18 +10917,17 @@ - debug=false - ac_cs_recheck=false - ac_cs_silent=false -- - SHELL=\${CONFIG_SHELL-$SHELL} --export SHELL --_ASEOF --cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 --## -------------------- ## --## M4sh Initialization. ## --## -------------------- ## -+_ACEOF -+ -+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -+## --------------------- ## -+## M4sh Initialization. ## -+## --------------------- ## - - # Be more Bourne compatible - DUALCASE=1; export DUALCASE # for MKS sh --if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : -+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which -@@ -6517,15 +10935,23 @@ - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST - else -- case `(set -o) 2>/dev/null` in #( -- *posix*) : -- set -o posix ;; #( -- *) : -- ;; -+ case `(set -o) 2>/dev/null` in -+ *posix*) set -o posix ;; - esac -+ - fi - - -+ -+ -+# PATH needs CR -+# Avoid depending upon Character Ranges. -+as_cr_letters='abcdefghijklmnopqrstuvwxyz' -+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -+as_cr_Letters=$as_cr_letters$as_cr_LETTERS -+as_cr_digits='0123456789' -+as_cr_alnum=$as_cr_Letters$as_cr_digits -+ - as_nl=' - ' - export as_nl -@@ -6533,13 +10959,7 @@ - as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo - as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo --# Prefer a ksh shell builtin over an external printf program on Solaris, --# but without wasting forks for bash or zsh. --if test -z "$BASH_VERSION$ZSH_VERSION" \ -- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then -- as_echo='print -r --' -- as_echo_n='print -rn --' --elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then -+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' - else -@@ -6550,7 +10970,7 @@ - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; -- case $arg in #( -+ case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; -@@ -6573,6 +10993,13 @@ - } - fi - -+# Support unset when possible. -+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then -+ as_unset=unset -+else -+ as_unset=false -+fi -+ - - # IFS - # We need space, tab and new line, in precisely that order. Quoting is -@@ -6582,15 +11009,15 @@ - IFS=" "" $as_nl" - - # Find who we are. Look in the path if we contain no directory separator. --case $0 in #(( -+case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR - for as_dir in $PATH - do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. -- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -- done -+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -+done - IFS=$as_save_IFS - - ;; -@@ -6602,16 +11029,12 @@ - fi - if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 -- exit 1 -+ { (exit 1); exit 1; } - fi - --# Unset variables that we do not need and which cause bugs (e.g. in --# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" --# suppresses any "Segmentation fault" message there. '((' could --# trigger a bug in pdksh 5.2.14. --for as_var in BASH_ENV ENV MAIL MAILPATH --do eval test x\${$as_var+set} = xset \ -- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -+# Work around bugs in pre-3.0 UWIN ksh. -+for as_var in ENV MAIL MAILPATH -+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - PS1='$ ' - PS2='> ' -@@ -6623,89 +11046,7 @@ - LANGUAGE=C - export LANGUAGE - --# CDPATH. --(unset CDPATH) >/dev/null 2>&1 && unset CDPATH -- -- --# as_fn_error ERROR [LINENO LOG_FD] --# --------------------------------- --# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are --# provided, also output the error to LOG_FD, referencing LINENO. Then exit the --# script with status $?, using 1 if that was 0. --as_fn_error () --{ -- as_status=$?; test $as_status -eq 0 && as_status=1 -- if test "$3"; then -- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 -- fi -- $as_echo "$as_me: error: $1" >&2 -- as_fn_exit $as_status --} # as_fn_error -- -- --# as_fn_set_status STATUS --# ----------------------- --# Set $? to STATUS, without forking. --as_fn_set_status () --{ -- return $1 --} # as_fn_set_status -- --# as_fn_exit STATUS --# ----------------- --# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. --as_fn_exit () --{ -- set +e -- as_fn_set_status $1 -- exit $1 --} # as_fn_exit -- --# as_fn_unset VAR --# --------------- --# Portably unset VAR. --as_fn_unset () --{ -- { eval $1=; unset $1;} --} --as_unset=as_fn_unset --# as_fn_append VAR VALUE --# ---------------------- --# Append the text in VALUE to the end of the definition contained in VAR. Take --# advantage of any shell optimizations that allow amortized linear growth over --# repeated appends, instead of the typical quadratic growth present in naive --# implementations. --if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : -- eval 'as_fn_append () -- { -- eval $1+=\$2 -- }' --else -- as_fn_append () -- { -- eval $1=\$$1\$2 -- } --fi # as_fn_append -- --# as_fn_arith ARG... --# ------------------ --# Perform arithmetic evaluation on the ARGs, and store the result in the --# global $as_val. Take advantage of shells that can avoid forks. The arguments --# must be portable across $(()) and expr. --if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : -- eval 'as_fn_arith () -- { -- as_val=$(( $* )) -- }' --else -- as_fn_arith () -- { -- as_val=`expr "$@" || test $? -eq 1` -- } --fi # as_fn_arith -- -- -+# Required to use basename. - if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -@@ -6719,12 +11060,8 @@ - as_basename=false - fi - --if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then -- as_dirname=dirname --else -- as_dirname=false --fi - -+# Name of the executable. - as_me=`$as_basename -- "$0" || - $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ -@@ -6744,25 +11081,76 @@ - } - s/.*/./; q'` - --# Avoid depending upon Character Ranges. --as_cr_letters='abcdefghijklmnopqrstuvwxyz' --as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' --as_cr_Letters=$as_cr_letters$as_cr_LETTERS --as_cr_digits='0123456789' --as_cr_alnum=$as_cr_Letters$as_cr_digits -+# CDPATH. -+$as_unset CDPATH -+ -+ -+ -+ as_lineno_1=$LINENO -+ as_lineno_2=$LINENO -+ test "x$as_lineno_1" != "x$as_lineno_2" && -+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { -+ -+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO -+ # uniformly replaced by the line number. The first 'sed' inserts a -+ # line-number line after each line using $LINENO; the second 'sed' -+ # does the real work. The second script uses 'N' to pair each -+ # line-number line with the line containing $LINENO, and appends -+ # trailing '-' during substitution so that $LINENO is not a special -+ # case at line end. -+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the -+ # scripts with optimization help from Paolo Bonzini. Blame Lee -+ # E. McMahon (1931-1989) for sed's syntax. :-) -+ sed -n ' -+ p -+ /[$]LINENO/= -+ ' <$as_myself | -+ sed ' -+ s/[$]LINENO.*/&-/ -+ t lineno -+ b -+ :lineno -+ N -+ :loop -+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ -+ t loop -+ s/-\n.*// -+ ' >$as_me.lineno && -+ chmod +x "$as_me.lineno" || -+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 -+ { (exit 1); exit 1; }; } -+ -+ # Don't try to exec as it changes $[0], causing all sort of problems -+ # (the dirname of $[0] is not the place where we might find the -+ # original and so on. Autoconf is especially sensitive to this). -+ . "./$as_me.lineno" -+ # Exit status is that of the last command. -+ exit -+} -+ -+ -+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then -+ as_dirname=dirname -+else -+ as_dirname=false -+fi - - ECHO_C= ECHO_N= ECHO_T= --case `echo -n x` in #((((( -+case `echo -n x` in - -n*) -- case `echo 'xy\c'` in -+ case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. -- xy) ECHO_C='\c';; -- *) echo `echo ksh88 bug on AIX 6.1` > /dev/null -- ECHO_T=' ';; -+ *) ECHO_C='\c';; - esac;; - *) - ECHO_N='-n';; - esac -+if expr a : '\(a\)' >/dev/null 2>&1 && -+ test "X`expr 00001 : '.*\(...\)'`" = X001; then -+ as_expr=expr -+else -+ as_expr=false -+fi - - rm -f conf$$ conf$$.exe conf$$.file - if test -d conf$$.dir; then -@@ -6791,56 +11179,8 @@ - rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file - rmdir conf$$.dir 2>/dev/null - -- --# as_fn_mkdir_p --# ------------- --# Create "$as_dir" as a directory, including parents if necessary. --as_fn_mkdir_p () --{ -- -- case $as_dir in #( -- -*) as_dir=./$as_dir;; -- esac -- test -d "$as_dir" || eval $as_mkdir_p || { -- as_dirs= -- while :; do -- case $as_dir in #( -- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( -- *) as_qdir=$as_dir;; -- esac -- as_dirs="'$as_qdir' $as_dirs" -- as_dir=`$as_dirname -- "$as_dir" || --$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -- X"$as_dir" : 'X\(//\)[^/]' \| \ -- X"$as_dir" : 'X\(//\)$' \| \ -- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || --$as_echo X"$as_dir" | -- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ -- s//\1/ -- q -- } -- /^X\(\/\/\)[^/].*/{ -- s//\1/ -- q -- } -- /^X\(\/\/\)$/{ -- s//\1/ -- q -- } -- /^X\(\/\).*/{ -- s//\1/ -- q -- } -- s/.*/./; q'` -- test -d "$as_dir" && break -- done -- test -z "$as_dirs" || eval "mkdir $as_dirs" -- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" -- -- --} # as_fn_mkdir_p - if mkdir -p . 2>/dev/null; then -- as_mkdir_p='mkdir -p "$as_dir"' -+ as_mkdir_p=: - else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -@@ -6859,10 +11199,10 @@ - if test -d "$1"; then - test -d "$1/."; - else -- case $1 in #( -+ case $1 in - -*)set "./$1";; - esac; -- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( -+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -@@ -6877,19 +11217,13 @@ - - - exec 6>&1 --## ----------------------------------- ## --## Main body of $CONFIG_STATUS script. ## --## ----------------------------------- ## --_ASEOF --test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - --cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 --# Save the log message, to keep $0 and so on meaningful, and to -+# Save the log message, to keep $[0] and so on meaningful, and to - # report actual input values of CONFIG_FILES etc. instead of their - # values after options handling. - ac_log=" - This file was extended by strace $as_me 4.5.19, which was --generated by GNU Autoconf 2.64. Invocation command line was -+generated by GNU Autoconf 2.63. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS -@@ -6921,11 +11255,10 @@ - - cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - ac_cs_usage="\ --\`$as_me' instantiates files and other configuration actions --from templates according to the current configuration. Unless the files --and actions are specified as TAGs, all are instantiated by default. -+\`$as_me' instantiates files from templates according to the -+current configuration. - --Usage: $0 [OPTION]... [TAG]... -+Usage: $0 [OPTION]... [FILE]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit -@@ -6947,16 +11280,16 @@ - Configuration commands: - $config_commands - --Report bugs to the package provider." -+Report bugs to ." - - _ACEOF - cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_cs_version="\\ - strace config.status 4.5.19 --configured by $0, generated by GNU Autoconf 2.64, -+configured by $0, generated by GNU Autoconf 2.63, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - --Copyright (C) 2009 Free Software Foundation, Inc. -+Copyright (C) 2008 Free Software Foundation, Inc. - This config.status script is free software; the Free Software Foundation - gives unlimited permission to copy, distribute and modify it." - -@@ -6999,19 +11332,20 @@ - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac -- as_fn_append CONFIG_FILES " '$ac_optarg'" -+ CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac -- as_fn_append CONFIG_HEADERS " '$ac_optarg'" -+ CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header -- as_fn_error "ambiguous option: \`$1' --Try \`$0 --help' for more information.";; -+ { $as_echo "$as_me: error: ambiguous option: $1 -+Try \`$0 --help' for more information." >&2 -+ { (exit 1); exit 1; }; };; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ -@@ -7019,10 +11353,11 @@ - ac_cs_silent=: ;; - - # This is an error. -- -*) as_fn_error "unrecognized option: \`$1' --Try \`$0 --help' for more information." ;; -+ -*) { $as_echo "$as_me: error: unrecognized option: $1 -+Try \`$0 --help' for more information." >&2 -+ { (exit 1); exit 1; }; } ;; - -- *) as_fn_append ac_config_targets " $1" -+ *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; - - esac -@@ -7077,7 +11412,9 @@ - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - -- *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; -+ *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -+$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} -+ { (exit 1); exit 1; }; };; - esac - done - -@@ -7104,7 +11441,7 @@ - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status - ' 0 -- trap 'as_fn_exit 1' 1 2 13 15 -+ trap '{ (exit 1); exit 1; }' 1 2 13 15 - } - # Create a (secure) tmp directory for tmp files. - -@@ -7115,7 +11452,11 @@ - { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") --} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 -+} || -+{ -+ $as_echo "$as_me: cannot create a temporary directory in ." >&2 -+ { (exit 1); exit 1; } -+} - - # Set up the scripts for CONFIG_FILES section. - # No need to generate them if there are no CONFIG_FILES. -@@ -7123,16 +11464,10 @@ - if test -n "$CONFIG_FILES"; then - - --ac_cr=`echo X | tr X '\015'` --# On cygwin, bash can eat \r inside `` if the user requested igncr. --# But we know of no other shell where ac_cr would be empty at this --# point, so we can use a bashism as a fallback. --if test "x$ac_cr" = x; then -- eval ac_cr=\$\'\\r\' --fi -+ac_cr=' ' - ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` - if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then -- ac_cs_awk_cr='\r' -+ ac_cs_awk_cr='\\r' - else - ac_cs_awk_cr=$ac_cr - fi -@@ -7146,18 +11481,24 @@ - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" - } >conf$$subs.sh || -- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} -+ { (exit 1); exit 1; }; } - ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` - ac_delim='%!_!# ' - for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || -- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} -+ { (exit 1); exit 1; }; } - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then -- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} -+ { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -@@ -7246,7 +11587,9 @@ - else - cat - fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ -- || as_fn_error "could not setup config files machinery" "$LINENO" 5 -+ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -+$as_echo "$as_me: error: could not setup config files machinery" >&2;} -+ { (exit 1); exit 1; }; } - _ACEOF - - # VPATH may cause trouble with some makes, so we remove $(srcdir), -@@ -7287,7 +11630,9 @@ - if test -z "$ac_t"; then - break - elif $ac_last_try; then -- as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 -+$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} -+ { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -@@ -7372,7 +11717,9 @@ - _ACAWK - _ACEOF - cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -- as_fn_error "could not setup config headers machinery" "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 -+$as_echo "$as_me: error: could not setup config headers machinery" >&2;} -+ { (exit 1); exit 1; }; } - fi # test -n "$CONFIG_HEADERS" - - -@@ -7385,7 +11732,9 @@ - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; -- :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; -+ :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 -+$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} -+ { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac -@@ -7413,10 +11762,12 @@ - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || -- as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; -+ { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -+$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} -+ { (exit 1); exit 1; }; };; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac -- as_fn_append ac_file_inputs " '$ac_f'" -+ ac_file_inputs="$ac_file_inputs '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't -@@ -7427,7 +11778,7 @@ - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" -- { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -+ { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 - $as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. -@@ -7440,7 +11791,9 @@ - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ -- || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; -+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -+$as_echo "$as_me: error: could not create $ac_file" >&2;} -+ { (exit 1); exit 1; }; } ;; - esac - ;; - esac -@@ -7468,7 +11821,47 @@ - q - } - s/.*/./; q'` -- as_dir="$ac_dir"; as_fn_mkdir_p -+ { as_dir="$ac_dir" -+ case $as_dir in #( -+ -*) as_dir=./$as_dir;; -+ esac -+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { -+ as_dirs= -+ while :; do -+ case $as_dir in #( -+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( -+ *) as_qdir=$as_dir;; -+ esac -+ as_dirs="'$as_qdir' $as_dirs" -+ as_dir=`$as_dirname -- "$as_dir" || -+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -+ X"$as_dir" : 'X\(//\)[^/]' \| \ -+ X"$as_dir" : 'X\(//\)$' \| \ -+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -+$as_echo X"$as_dir" | -+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)[^/].*/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\).*/{ -+ s//\1/ -+ q -+ } -+ s/.*/./; q'` -+ test -d "$as_dir" && break -+ done -+ test -z "$as_dirs" || eval "mkdir $as_dirs" -+ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} -+ { (exit 1); exit 1; }; }; } - ac_builddir=. - - case "$ac_dir" in -@@ -7525,6 +11918,7 @@ - # If the template does not know about datarootdir, expand it. - # FIXME: This hack should be removed a few years after 2.60. - ac_datarootdir_hack=; ac_datarootdir_seen= -+ - ac_sed_dataroot=' - /datarootdir/ { - p -@@ -7534,11 +11928,12 @@ - /@docdir@/p - /@infodir@/p - /@localedir@/p --/@mandir@/p' -+/@mandir@/p -+' - case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in - *datarootdir*) ac_datarootdir_seen=yes;; - *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -+ { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 - $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} - _ACEOF - cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -@@ -7548,7 +11943,7 @@ - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g -- s&\\\${datarootdir}&$datarootdir&g' ;; -+ s&\\\${datarootdir}&$datarootdir&g' ;; - esac - _ACEOF - -@@ -7577,12 +11972,14 @@ - $ac_datarootdir_hack - " - eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ -- || as_fn_error "could not create $ac_file" "$LINENO" 5 -+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -+$as_echo "$as_me: error: could not create $ac_file" >&2;} -+ { (exit 1); exit 1; }; } - - test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -+ { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' - which seems to be undefined. Please make sure it is defined." >&5 - $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' - which seems to be undefined. Please make sure it is defined." >&2;} -@@ -7592,7 +11989,9 @@ - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ -- || as_fn_error "could not create $ac_file" "$LINENO" 5 -+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -+$as_echo "$as_me: error: could not create $ac_file" >&2;} -+ { (exit 1); exit 1; }; } - ;; - :H) - # -@@ -7603,19 +12002,25 @@ - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ -- || as_fn_error "could not create $ac_file" "$LINENO" 5 -+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -+$as_echo "$as_me: error: could not create $ac_file" >&2;} -+ { (exit 1); exit 1; }; } - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -+ { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 - $as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ -- || as_fn_error "could not create $ac_file" "$LINENO" 5 -+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -+$as_echo "$as_me: error: could not create $ac_file" >&2;} -+ { (exit 1); exit 1; }; } - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ -- || as_fn_error "could not create -" "$LINENO" 5 -+ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 -+$as_echo "$as_me: error: could not create -" >&2;} -+ { (exit 1); exit 1; }; } - fi - # Compute "$ac_file"'s index in $config_headers. - _am_arg="$ac_file" -@@ -7653,7 +12058,7 @@ - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - -- :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -+ :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 - $as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac -@@ -7748,7 +12153,47 @@ - q - } - s/.*/./; q'` -- as_dir=$dirpart/$fdir; as_fn_mkdir_p -+ { as_dir=$dirpart/$fdir -+ case $as_dir in #( -+ -*) as_dir=./$as_dir;; -+ esac -+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { -+ as_dirs= -+ while :; do -+ case $as_dir in #( -+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( -+ *) as_qdir=$as_dir;; -+ esac -+ as_dirs="'$as_qdir' $as_dirs" -+ as_dir=`$as_dirname -- "$as_dir" || -+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -+ X"$as_dir" : 'X\(//\)[^/]' \| \ -+ X"$as_dir" : 'X\(//\)$' \| \ -+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -+$as_echo X"$as_dir" | -+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)[^/].*/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\/\)$/{ -+ s//\1/ -+ q -+ } -+ /^X\(\/\).*/{ -+ s//\1/ -+ q -+ } -+ s/.*/./; q'` -+ test -d "$as_dir" && break -+ done -+ test -z "$as_dirs" || eval "mkdir $as_dirs" -+ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} -+ { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -@@ -7760,12 +12205,15 @@ - done # for ac_tag - - --as_fn_exit 0 -+{ (exit 0); exit 0; } - _ACEOF -+chmod +x $CONFIG_STATUS - ac_clean_files=$ac_clean_files_save - - test $ac_write_fail = 0 || -- as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 -+ { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -+$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} -+ { (exit 1); exit 1; }; } - - - # configure is writing to config.log, and then calls config.status. -@@ -7786,10 +12234,10 @@ - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. -- $ac_cs_success || as_fn_exit $? -+ $ac_cs_success || { (exit 1); exit 1; } - fi - if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -+ { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 - $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} - fi - -diff -Naur strace-4.5.19/configure.ac strace-4.5.19.patch/configure.ac ---- strace-4.5.19/configure.ac 2009-10-12 21:54:43.000000000 +0200 -+++ strace-4.5.19.patch/configure.ac 2009-11-04 09:10:53.901396360 +0100 -@@ -258,6 +258,7 @@ - ], [], []) - AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h], - [], [], [#include -+#include - #include ]) - AC_CHECK_HEADERS([asm/sigcontext.h], [], [], [#include ]) - AC_CHECK_TYPES([struct sigcontext_struct, diff --git a/packages/debug/strace/url b/packages/debug/strace/url deleted file mode 100644 index 0826f2d220..0000000000 --- a/packages/debug/strace/url +++ /dev/null @@ -1 +0,0 @@ -http://downloads.sourceforge.net/project/strace/strace/4.5.19/strace-4.5.19.tar.bz2 \ No newline at end of file diff --git a/packages/debug/tvdump/build b/packages/debug/tvdump/build index e5bd0e960f..cb38d9f397 100755 --- a/packages/debug/tvdump/build +++ b/packages/debug/tvdump/build @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build libpciaccess - cd $PKG_BUILD $CC -Wall -O0 -g -o tvdump tvdump.c -lpciaccess \ No newline at end of file diff --git a/packages/debug/tvdump/url.txt b/packages/debug/tvdump/doc/url.txt similarity index 100% rename from packages/debug/tvdump/url.txt rename to packages/debug/tvdump/doc/url.txt diff --git a/packages/debug/tvdump/install b/packages/debug/tvdump/install index 4bf2c499a9..5923ab50f2 100755 --- a/packages/debug/tvdump/install +++ b/packages/debug/tvdump/install @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/install Python -$SCRIPTS/install libpciaccess - mkdir -p $INSTALL/usr/bin cp $PKG_BUILD/tvdump $INSTALL/usr/bin cp $PKG_BUILD/tvdump2code.py $INSTALL/usr/bin/tvdump2code diff --git a/packages/debug/tvdump/meta b/packages/debug/tvdump/meta new file mode 100644 index 0000000000..130f417455 --- /dev/null +++ b/packages/debug/tvdump/meta @@ -0,0 +1,16 @@ +PKG_NAME="tvdump" +PKG_VERSION="20101025" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://cgit.freedesktop.org/~currojerez/tvdump/" +PKG_URL="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="Python libpciaccess" +PKG_BUILD_DEPENDS="toolchain libpciaccess" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="tvdump: a tool for debugging some informations of video bios" +PKG_LONGDESC="tvdump is a tool for debugging some informations of video bios" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/debug/tvdump/url b/packages/debug/tvdump/url deleted file mode 100644 index 54f1f85e5b..0000000000 --- a/packages/debug/tvdump/url +++ /dev/null @@ -1 +0,0 @@ -http://sources.openelec.tv/svn/tvdump-20101025.tar.bz2 \ No newline at end of file diff --git a/packages/debug/w_scan/build b/packages/debug/w_scan/build new file mode 100755 index 0000000000..772145cba5 --- /dev/null +++ b/packages/debug/w_scan/build @@ -0,0 +1,13 @@ +#!/bin/sh + +. config/options + +cd $PKG_BUILD +./configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + --enable-shared \ + --disable-static \ + --disable-documentation \ + +make diff --git a/packages/debug/w_scan/install b/packages/debug/w_scan/install new file mode 100755 index 0000000000..d90996168e --- /dev/null +++ b/packages/debug/w_scan/install @@ -0,0 +1,7 @@ +#!/bin/sh + +. config/options + +mkdir -p $INSTALL/usr/bin + cp -P $PKG_BUILD/w_scan $INSTALL/usr/bin + diff --git a/packages/debug/w_scan/meta b/packages/debug/w_scan/meta new file mode 100644 index 0000000000..97162d867e --- /dev/null +++ b/packages/debug/w_scan/meta @@ -0,0 +1,16 @@ +PKG_NAME="w_scan" +PKG_VERSION="20101001" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://wirbel.htpc-forum.de/w_scan/index2.html" +PKG_URL="http://wirbel.htpc-forum.de/w_scan/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="debug" +PKG_SHORTDESC="w_scan: eine kleine Anwendung zum Scannen von ATSC/DVB-C/S/T Transpondern/Bouquets nach Sendern und Erstellen einer VDR channels.conf." +PKG_LONGDESC="w_scan ist eine kleine Anwendung zum Scannen von ATSC/DVB-C/S/T Transpondern/Bouquets nach Sendern und Erstellen einer VDR channels.conf." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/debug/wgetpaste/install b/packages/debug/wgetpaste/install index 6bbb11745f..ddf7cbad2f 100755 --- a/packages/debug/wgetpaste/install +++ b/packages/debug/wgetpaste/install @@ -2,7 +2,5 @@ . config/options $1 -$SCRIPTS/install wget - mkdir -p $INSTALL/usr/bin cp $PKG_BUILD/wgetpaste $INSTALL/usr/bin diff --git a/packages/debug/wgetpaste/meta b/packages/debug/wgetpaste/meta new file mode 100644 index 0000000000..db964a0cb8 --- /dev/null +++ b/packages/debug/wgetpaste/meta @@ -0,0 +1,16 @@ +PKG_NAME="wgetpaste" +PKG_VERSION="2.18" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://wgetpaste.zlin.dk" +PKG_URL="http://wgetpaste.zlin.dk/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="wget" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="debug" +PKG_SHORTDESC="wgetpaste: Upload Directly to Pastebin from the Linux Shell" +PKG_LONGDESC="Wgetpaste is a tool for Uploading Directly to Pastebin from the Linux Shell" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/debug/wgetpaste/url b/packages/debug/wgetpaste/url deleted file mode 100644 index 0b800fcd4b..0000000000 --- a/packages/debug/wgetpaste/url +++ /dev/null @@ -1 +0,0 @@ -http://wgetpaste.zlin.dk/wgetpaste-2.18.tar.bz2 \ No newline at end of file diff --git a/packages/debug/wireless_tools/build b/packages/debug/wireless_tools/build deleted file mode 100755 index 94ba8215b1..0000000000 --- a/packages/debug/wireless_tools/build +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -. config/options $1 - -$SCRIPTS/build toolchain -$SCRIPTS/build linux - -cd $BUILD/$1* - -make PREFIX=/usr \ - CC=$CC \ - AR=$AR \ - RANLIB=$RANLIB \ - CFLAGS="$CFLAGS -I." \ - BUILD_STRIPPING='y' - -make PREFIX=$SYSROOT_PREFIX/usr install -make PREFIX=$SYSROOT_PREFIX/usr install-hdr diff --git a/packages/debug/wireless_tools/install b/packages/debug/wireless_tools/install deleted file mode 100755 index 7528e943ae..0000000000 --- a/packages/debug/wireless_tools/install +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -. config/options $1 - -mkdir -p $INSTALL/sbin - cp $BUILD/$1*/iwconfig $INSTALL/sbin - cp $BUILD/$1*/iwpriv $INSTALL/sbin - cp $BUILD/$1*/iwlist $INSTALL/sbin diff --git a/packages/debug/wireless_tools/url b/packages/debug/wireless_tools/url deleted file mode 100644 index a250187f47..0000000000 --- a/packages/debug/wireless_tools/url +++ /dev/null @@ -1 +0,0 @@ -http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools.30.pre9.tar.gz diff --git a/packages/devel/boost-jam/build b/packages/devel/boost-jam/build index e67b584a17..9f4b27679f 100755 --- a/packages/devel/boost-jam/build +++ b/packages/devel/boost-jam/build @@ -2,7 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain $SCRIPTS/unpack boost setup_toolchain host diff --git a/packages/devel/boost-jam/meta b/packages/devel/boost-jam/meta new file mode 100644 index 0000000000..61acd1f30c --- /dev/null +++ b/packages/devel/boost-jam/meta @@ -0,0 +1,16 @@ +PKG_NAME="boost-jam" +PKG_VERSION="" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.boost.org/" +PKG_URL="" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="devel" +PKG_SHORTDESC="boost: Peer-reviewed STL style libraries for C++" +PKG_LONGDESC="Boost provides free peer-reviewed portable C++ source libraries. The emphasis is on libraries which work well with the C++ Standard Library. One goal is to establish existing practice and provide reference implementations so that the Boost libraries are suitable for eventual standardization. Some of the libraries have already been proposed for inclusion in the C++ Standards Committee's upcoming C++ Standard Library Technical Report." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/devel/boost/build b/packages/devel/boost/build index b642988b2b..6d232ad097 100755 --- a/packages/devel/boost/build +++ b/packages/devel/boost/build @@ -2,12 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build boost-jam -$SCRIPTS/build Python -$SCRIPTS/build zlib -$SCRIPTS/build bzip2 - cd $PKG_BUILD sh bootstrap.sh \ --prefix=/usr \ @@ -23,5 +17,6 @@ $ROOT/$TOOLCHAIN/bin/bjam -d2 --toolset=gcc \ --layout=system \ --with-thread \ --with-iostreams \ + --with-system \ --with-regex -sICU_PATH="$SYSROOT_PREFIX/usr" \ install diff --git a/packages/devel/boost/install b/packages/devel/boost/install index bb41ea7784..79848cbb7b 100755 --- a/packages/devel/boost/install +++ b/packages/devel/boost/install @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/install zlib -$SCRIPTS/install bzip2 - mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/bin.v2/libs/*/build/*/release/*/*.so.* $INSTALL/usr/lib diff --git a/packages/devel/boost/meta b/packages/devel/boost/meta new file mode 100644 index 0000000000..b38da8827c --- /dev/null +++ b/packages/devel/boost/meta @@ -0,0 +1,16 @@ +PKG_NAME="boost" +PKG_VERSION="1_44_0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.boost.org/" +PKG_URL="http://downloads.sourceforge.net/project/boost/boost/1.44.0/${PKG_NAME}_${PKG_VERSION}.tar.bz2" +PKG_DEPENDS="zlib bzip2" +PKG_BUILD_DEPENDS="toolchain boost-jam Python zlib bzip2" +PKG_PRIORITY="optional" +PKG_SECTION="devel" +PKG_SHORTDESC="boost: Peer-reviewed STL style libraries for C++" +PKG_LONGDESC="Boost provides free peer-reviewed portable C++ source libraries. The emphasis is on libraries which work well with the C++ Standard Library. One goal is to establish existing practice and provide reference implementations so that the Boost libraries are suitable for eventual standardization. Some of the libraries have already been proposed for inclusion in the C++ Standards Committee's upcoming C++ Standard Library Technical Report." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/devel/boost/url b/packages/devel/boost/url deleted file mode 100644 index 73ae456d11..0000000000 --- a/packages/devel/boost/url +++ /dev/null @@ -1 +0,0 @@ -http://downloads.sourceforge.net/project/boost/boost/1.43.0/boost_1_43_0.tar.bz2 \ No newline at end of file diff --git a/packages/devel/dbus-glib-host/build b/packages/devel/dbus-glib-host/build index abe586fef1..c697bcdd1c 100755 --- a/packages/devel/dbus-glib-host/build +++ b/packages/devel/dbus-glib-host/build @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build glib-host -$SCRIPTS/build dbus-host $SCRIPTS/unpack dbus-glib DBUS_GLIB_DIR=`ls -d $BUILD/dbus-glib-[0-9]*` @@ -12,9 +9,9 @@ DBUS_GLIB_DIR=`ls -d $BUILD/dbus-glib-[0-9]*` setup_toolchain host cd $DBUS_GLIB_DIR -mkdir -p .build-host -cd .build-host +do_autoreconf +mkdir -p .build-host && cd .build-host ../configure --prefix=$ROOT/$TOOLCHAIN \ --sysconfdir=$ROOT/$TOOLCHAIN/etc \ --disable-tests \ diff --git a/packages/devel/dbus-glib-host/meta b/packages/devel/dbus-glib-host/meta new file mode 100644 index 0000000000..4ac19e7fbe --- /dev/null +++ b/packages/devel/dbus-glib-host/meta @@ -0,0 +1,16 @@ +PKG_NAME="dbus-glib-host" +PKG_VERSION="" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://freedesktop.org/wiki/Software/dbus" +PKG_URL="" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain glib-host dbus-host" +PKG_PRIORITY="optional" +PKG_SECTION="devel" +PKG_SHORTDESC="dbus-glib: A message bus system" +PKG_LONGDESC="D-BUS is a message bus, used for sending messages between applications. Conceptually, it fits somewhere in between raw sockets and CORBA in terms of complexity." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/devel/dbus-glib/build b/packages/devel/dbus-glib/build index ec888fd6f8..ff2d3dad31 100755 --- a/packages/devel/dbus-glib/build +++ b/packages/devel/dbus-glib/build @@ -2,12 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build dbus -$SCRIPTS/build glib -$SCRIPTS/build expat -$SCRIPTS/build dbus-glib-host - export ac_cv_have_abstract_sockets=yes export ac_cv_func_posix_getpwnam_r=yes export have_abstract_sockets=yes @@ -15,9 +9,7 @@ export have_abstract_sockets=yes DBUS_DIR=`ls -d $BUILD/dbus-[0-9]*` cd $PKG_BUILD -mkdir -p .build-target - -cd .build-target +mkdir -p .build-target && cd .build-target ../configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ diff --git a/packages/devel/dbus-glib/install b/packages/devel/dbus-glib/install index 82a65ad0b7..02e19a0d65 100755 --- a/packages/devel/dbus-glib/install +++ b/packages/devel/dbus-glib/install @@ -2,9 +2,5 @@ . config/options $1 -$SCRIPTS/install dbus -$SCRIPTS/install glib -$SCRIPTS/install expat - mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/.build-target/dbus/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/devel/dbus-glib/meta b/packages/devel/dbus-glib/meta new file mode 100644 index 0000000000..20b25284e9 --- /dev/null +++ b/packages/devel/dbus-glib/meta @@ -0,0 +1,16 @@ +PKG_NAME="dbus-glib" +PKG_VERSION="0.88" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://freedesktop.org/wiki/Software/dbus" +PKG_URL="http://dbus.freedesktop.org/releases/dbus-glib/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="dbus glib expat" +PKG_BUILD_DEPENDS="toolchain dbus glib expat dbus-glib-host" +PKG_PRIORITY="optional" +PKG_SECTION="devel" +PKG_SHORTDESC="dbus-glib: A message bus system" +PKG_LONGDESC="D-BUS is a message bus, used for sending messages between applications. Conceptually, it fits somewhere in between raw sockets and CORBA in terms of complexity." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/devel/dbus-glib/url b/packages/devel/dbus-glib/url deleted file mode 100644 index 9d9d13698c..0000000000 --- a/packages/devel/dbus-glib/url +++ /dev/null @@ -1 +0,0 @@ -http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.86.tar.gz diff --git a/packages/devel/eggdbus-host/build b/packages/devel/eggdbus-host/build index 1e29b29f49..be053b6d20 100755 --- a/packages/devel/eggdbus-host/build +++ b/packages/devel/eggdbus-host/build @@ -2,20 +2,16 @@ . config/options $1 -$SCRIPTS/build toolchain $SCRIPTS/unpack eggdbus -$SCRIPTS/build glib-host -$SCRIPTS/build dbus-host -$SCRIPTS/build dbus-glib-host EGGDBUS_DIR=`ls -d $BUILD/eggdbus-[0-9]*` setup_toolchain host cd $EGGDBUS_DIR -mkdir -p .build-host +do_autoreconf -cd .build-host +mkdir -p .build-host && cd .build-host ../configure --prefix=$ROOT/$TOOLCHAIN \ --sysconfdir=$ROOT/$TOOLCHAIN/etc \ --disable-static \ diff --git a/packages/devel/eggdbus-host/meta b/packages/devel/eggdbus-host/meta new file mode 100644 index 0000000000..acedfb99be --- /dev/null +++ b/packages/devel/eggdbus-host/meta @@ -0,0 +1,16 @@ +PKG_NAME="eggdbus-host" +PKG_VERSION="" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="LGPL" +PKG_SITE="http://cgit.freedesktop.org/~david/eggdbus" +PKG_URL="" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain glib-host dbus-host dbus-glib-host" +PKG_PRIORITY="optional" +PKG_SECTION="devel" +PKG_SHORTDESC="eggdbus: D-Bus bindings for GObject" +PKG_LONGDESC="D-Bus bindings for GObject." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/devel/eggdbus/build b/packages/devel/eggdbus/build index 5bb0a0d0d6..41c1d13eae 100755 --- a/packages/devel/eggdbus/build +++ b/packages/devel/eggdbus/build @@ -2,12 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build eggdbus-host -$SCRIPTS/build glib -$SCRIPTS/build dbus -$SCRIPTS/build dbus-glib - cd $PKG_BUILD mkdir -p .build-target diff --git a/packages/devel/eggdbus/install b/packages/devel/eggdbus/install index e99afa8656..c1bb5df9e7 100755 --- a/packages/devel/eggdbus/install +++ b/packages/devel/eggdbus/install @@ -2,9 +2,5 @@ . config/options $1 -$SCRIPTS/install glib -$SCRIPTS/install dbus -$SCRIPTS/install dbus-glib - mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/.build-target/src/eggdbus/.libs/*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/.build-target/src/eggdbus/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/devel/eggdbus/meta b/packages/devel/eggdbus/meta new file mode 100644 index 0000000000..090aa9d212 --- /dev/null +++ b/packages/devel/eggdbus/meta @@ -0,0 +1,16 @@ +PKG_NAME="eggdbus" +PKG_VERSION="0.6" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="LGPL" +PKG_SITE="http://cgit.freedesktop.org/~david/eggdbus" +PKG_URL="http://hal.freedesktop.org/releases/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="glib dbus dbus-glib" +PKG_BUILD_DEPENDS="toolchain eggdbus-host glib dbus dbus-glib" +PKG_PRIORITY="optional" +PKG_SECTION="devel" +PKG_SHORTDESC="eggdbus: D-Bus bindings for GObject" +PKG_LONGDESC="D-Bus bindings for GObject." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/devel/eggdbus/patches/eggdbus-binding-tool-0.2.diff b/packages/devel/eggdbus/patches/eggdbus-0.6-binding_tool-0.2.patch similarity index 100% rename from packages/devel/eggdbus/patches/eggdbus-binding-tool-0.2.diff rename to packages/devel/eggdbus/patches/eggdbus-0.6-binding_tool-0.2.patch diff --git a/packages/devel/eggdbus/url b/packages/devel/eggdbus/url deleted file mode 100644 index 0282a6d899..0000000000 --- a/packages/devel/eggdbus/url +++ /dev/null @@ -1 +0,0 @@ -http://hal.freedesktop.org/releases/eggdbus-0.6.tar.gz diff --git a/packages/devel/file-host/build b/packages/devel/file-host/build index f9fd8919b4..739ba94401 100755 --- a/packages/devel/file-host/build +++ b/packages/devel/file-host/build @@ -7,11 +7,12 @@ $SCRIPTS/unpack file setup_toolchain host cd $BUILD/file-* -mkdir -p .build-host -cd .build-host + +do_autoreconf +mkdir -p .build-host && cd .build-host ../configure --prefix=$ROOT/$TOOLCHAIN \ --enable-shared \ --disable-static \ make -make install \ No newline at end of file +make install diff --git a/packages/devel/file-host/meta b/packages/devel/file-host/meta index d0407705d3..776bb11429 100644 --- a/packages/devel/file-host/meta +++ b/packages/devel/file-host/meta @@ -1,8 +1,10 @@ PKG_NAME="file" +PKG_VERSION="" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="BSD" PKG_SITE="http://www.darwinsys.com/file/" +PKG_URL="" PKG_DEPENDS="" PKG_BUILD_DEPENDS="toolchain" PKG_PRIORITY="optional" @@ -10,3 +12,5 @@ PKG_SECTION="devel" PKG_SHORTDESC="file: File type identification utility" PKG_LONGDESC="These are the sources to Darwin's file(1) utility and master magic(4) file, now maintained by Christos Zoulas. The file(1) utility is used to determine the types of various files." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/devel/file/meta b/packages/devel/file/meta index 48627b5e38..0630a1affa 100644 --- a/packages/devel/file/meta +++ b/packages/devel/file/meta @@ -12,3 +12,5 @@ PKG_SECTION="devel" PKG_SHORTDESC="file: File type identification utility" PKG_LONGDESC="These are the sources to Darwin's file(1) utility and master magic(4) file, now maintained by Christos Zoulas. The file(1) utility is used to determine the types of various files." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/devel/flex/build b/packages/devel/flex/build index 9623c10fd4..80bd29d168 100755 --- a/packages/devel/flex/build +++ b/packages/devel/flex/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ac_cv_func_malloc_0_nonnull=yes \ ac_cv_func_realloc_0_nonnull=yes \ diff --git a/packages/devel/flex/meta b/packages/devel/flex/meta new file mode 100644 index 0000000000..c5924c03c4 --- /dev/null +++ b/packages/devel/flex/meta @@ -0,0 +1,16 @@ +PKG_NAME="flex" +PKG_VERSION="2.5.35" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://flex.sourceforge.net/" +PKG_URL="http://downloads.sourceforge.net/project/flex/flex/$PKG_NAME-$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="devel" +PKG_SHORTDESC="flex: Fast lexical analyzer generator" +PKG_LONGDESC="flex is a tool for generating programs that perform pattern-matching on text." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/devel/flex/url b/packages/devel/flex/url deleted file mode 100644 index f7c8616569..0000000000 --- a/packages/devel/flex/url +++ /dev/null @@ -1 +0,0 @@ -http://downloads.sourceforge.net/project/flex/flex/flex-2.5.35/flex-2.5.35.tar.bz2 \ No newline at end of file diff --git a/packages/devel/gettext/build b/packages/devel/gettext/build new file mode 100755 index 0000000000..5b4f281597 --- /dev/null +++ b/packages/devel/gettext/build @@ -0,0 +1,7 @@ +#!/bin/sh + +. config/options $1 + +cd $PKG_BUILD + mkdir -p $SYSROOT_PREFIX/usr/share/aclocal + cp gettext-runtime/m4/*.m4 $SYSROOT_PREFIX/usr/share/aclocal diff --git a/packages/devel/gettext/meta b/packages/devel/gettext/meta new file mode 100644 index 0000000000..417e0112d0 --- /dev/null +++ b/packages/devel/gettext/meta @@ -0,0 +1,16 @@ +PKG_NAME="gettext" +PKG_VERSION="0.18.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.gnu.org/software/gettext/" +PKG_URL="http://ftp.gnu.org/pub/gnu/gettext/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="ccache" +PKG_PRIORITY="optional" +PKG_SECTION="devel" +PKG_SHORTDESC="gettext: A program internationalization library and tools" +PKG_LONGDESC="This is the GNU gettext package. It is interesting for authors or maintainers of other packages or programs which they want to see internationalized. As one step the handling of messages in different languages should be implemented. For this task GNU gettext provides the needed tools and library functions." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/devel/glib-host/build b/packages/devel/glib-host/build index e4a7dba6ee..862b7a1111 100755 --- a/packages/devel/glib-host/build +++ b/packages/devel/glib-host/build @@ -10,9 +10,8 @@ export ZLIB_LIBS="" cd $BUILD/glib* -mkdir -p .build-host - -cd .build-host +do_autoreconf +mkdir -p .build-host && cd .build-host ../configure --prefix=$ROOT/$TOOLCHAIN \ --enable-shared \ --disable-static \ diff --git a/packages/devel/glib-host/meta b/packages/devel/glib-host/meta index 83889ebb29..3c3e20260a 100644 --- a/packages/devel/glib-host/meta +++ b/packages/devel/glib-host/meta @@ -1,11 +1,16 @@ PKG_NAME="glib-host" +PKG_VERSION="" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="LGPL" +PKG_SITE="http://www.gtk.org/" +PKG_URL="" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain dbus-host" +PKG_BUILD_DEPENDS="toolchain dbus-host gtk-doc" PKG_PRIORITY="optional" PKG_SECTION="devel" PKG_SHORTDESC="glib-host: C support library" PKG_LONGDESC="GLib is a library which includes support routines for C such as lists, trees, hashes, memory allocation, and many other things." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/devel/glib/build b/packages/devel/glib/build index 9e14f6a736..34da6232a6 100755 --- a/packages/devel/glib/build +++ b/packages/devel/glib/build @@ -2,11 +2,13 @@ . config/options $1 +# Fails to compile with GCC link time optimization, outputing the error: +# "mem-overflow.c:137:1: sorry, unimplemented: gimple bytecode streams do not support the optimization attribute". + strip_lto + cd $PKG_BUILD +mkdir -p .build-target && cd .build-target -mkdir -p .build-target - -cd .build-target ac_cv_func_posix_getpwuid_r='yes' \ ac_cv_func_posix_getgrgid_r='yes' \ glib_cv_uscore='no' \ @@ -42,3 +44,6 @@ $MAKEINSTALL # cp glib/glibconfig.h $SYSROOT_PREFIX/usr/include/glib-2.0 mkdir -p $SYSROOT_PREFIX/usr/lib/pkgconfig cp g*-2.0.pc $SYSROOT_PREFIX/usr/lib/pkgconfig + +mkdir -p $SYSROOT_PREFIX/usr/share/aclocal + cp ../m4macros/glib-gettext.m4 $SYSROOT_PREFIX/usr/share/aclocal \ No newline at end of file diff --git a/packages/devel/glib/meta b/packages/devel/glib/meta index f413d96c63..908ff7a58f 100644 --- a/packages/devel/glib/meta +++ b/packages/devel/glib/meta @@ -1,14 +1,16 @@ PKG_NAME="glib" -PKG_VERSION="2.26.0" +PKG_VERSION="2.27.3" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="LGPL" PKG_SITE="http://www.gtk.org/" -PKG_URL="http://ftp.gnome.org/pub/gnome/sources/glib/2.26/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_URL="http://ftp.gnome.org/pub/gnome/sources/glib/2.27/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="zlib dbus" -PKG_BUILD_DEPENDS="toolchain zlib dbus glib-host" +PKG_BUILD_DEPENDS="toolchain zlib dbus gtk-doc glib-host" PKG_PRIORITY="optional" PKG_SECTION="devel" PKG_SHORTDESC="glib: C support library" PKG_LONGDESC="GLib is a library which includes support routines for C such as lists, trees, hashes, memory allocation, and many other things." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/devel/glib/patches/glib-syslog-message-handler.diff b/packages/devel/glib/patches/glib-syslog-message-handler.diff deleted file mode 100644 index febe8bf790..0000000000 --- a/packages/devel/glib/patches/glib-syslog-message-handler.diff +++ /dev/null @@ -1,104 +0,0 @@ ---- glib-2.19.6/glib/gmessages.c.orig 2009-02-02 19:17:45.000000000 +0000 -+++ glib-2.19.6/glib/gmessages.c 2009-02-17 16:33:22.000000000 +0000 -@@ -40,6 +40,7 @@ - #include - #include - #include -+#include - - #include "glib.h" - #include "gdebug.h" -@@ -873,6 +874,83 @@ - } - } - -+/* That is a syslog version of default log handler. */ -+ -+#define IS_EMPTY_STRING(s) (NULL == (s) || 0 == *(s)) -+ -+#define GLIB_PREFIX "GLIB" -+#define DEFAULT_DOMAIN "default" -+#define DEFAULT_MESSAGE "(NULL) message" -+ -+static void -+g_log_syslog_handler (const gchar *log_domain, -+ GLogLevelFlags log_level, -+ const gchar *message, -+ gpointer unused_data) -+{ -+ /* This value will be switched to TRUE when log facility is initialized */ -+ static gboolean initialized = FALSE; -+ -+ /* This call only variables */ -+ const gchar* alert = (log_level & ALERT_LEVELS ? " ** " : " "); -+ const gchar* aborting = (log_level & G_LOG_FLAG_FATAL ? "\naborting..." : ""); -+ -+ const gchar* prefix; -+ int priority; -+ -+ /* Check first that logging facility is initialized */ -+ if (!initialized) -+ { -+ openlog (NULL, LOG_PID, LOG_USER); -+ initialized = !initialized; -+ } -+ -+ /* Validate log domain */ -+ if (IS_EMPTY_STRING(log_domain)) -+ log_domain = DEFAULT_DOMAIN; -+ -+ /* Check log message for validity */ -+ if (IS_EMPTY_STRING(message)) -+ message = DEFAULT_MESSAGE; -+ -+ /* Process the message prefix and priority */ -+ switch (log_level & G_LOG_LEVEL_MASK) -+ { -+ case G_LOG_FLAG_FATAL: -+ prefix = "FATAL"; -+ priority = LOG_EMERG; -+ break; -+ case G_LOG_LEVEL_ERROR: -+ prefix = "ERROR"; -+ priority = LOG_ERR; -+ break; -+ case G_LOG_LEVEL_CRITICAL: -+ prefix = "CRITICAL"; -+ priority = LOG_CRIT; -+ break; -+ case G_LOG_LEVEL_WARNING: -+ prefix = "WARNING"; -+ priority = LOG_WARNING; -+ break; -+ case G_LOG_LEVEL_MESSAGE: -+ prefix = "MESSAGE"; -+ priority = LOG_NOTICE; -+ break; -+ case G_LOG_LEVEL_INFO: -+ prefix = "INFO"; -+ priority = LOG_INFO; -+ break; -+ default: -+ prefix = "DEBUG"; -+ priority = LOG_DEBUG; -+ break; -+ } -+ -+ /* Now printing the message to syslog */ -+ syslog (priority, "%s %s%s%s - %s%s", GLIB_PREFIX, prefix, alert, log_domain, -+ message, aborting); -+} -+ - void - g_log_default_handler (const gchar *log_domain, - GLogLevelFlags log_level, -@@ -948,6 +1026,9 @@ - string = g_string_free (gstring, FALSE); - - write_string (fd, string); -+ -+ /* */ -+ g_log_syslog_handler(log_domain, log_level, message, unused_data); - g_free (string); - } - diff --git a/packages/devel/gobject-introspection/build b/packages/devel/gobject-introspection/build new file mode 100755 index 0000000000..3fd067d9e7 --- /dev/null +++ b/packages/devel/gobject-introspection/build @@ -0,0 +1,7 @@ +#!/bin/sh + +. config/options $1 + +cd $PKG_BUILD + mkdir -p $SYSROOT_PREFIX/usr/share/aclocal + cp m4/introspection.m4 $SYSROOT_PREFIX/usr/share/aclocal diff --git a/packages/devel/gobject-introspection/meta b/packages/devel/gobject-introspection/meta new file mode 100644 index 0000000000..38012d0702 --- /dev/null +++ b/packages/devel/gobject-introspection/meta @@ -0,0 +1,16 @@ +PKG_NAME="gobject-introspection" +PKG_VERSION="0.9.12" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://live.gnome.org/GObjectIntrospection" +PKG_URL="http://ftp.acc.umu.se/pub/GNOME/sources/gobject-introspection/0.9/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="devel" +PKG_SHORTDESC="gobject-introspection: Introspection for GObject libraries" +PKG_LONGDESC="Introspection for GObject libraries." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/devel/libevent/build b/packages/devel/libevent/build new file mode 100755 index 0000000000..815fdf1043 --- /dev/null +++ b/packages/devel/libevent/build @@ -0,0 +1,17 @@ +#!/bin/sh + +. config/options $1 + +cd $PKG_BUILD +./configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + --exec-prefix=/usr \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --enable-shared \ + --disable-static \ + +make + +$MAKEINSTALL diff --git a/packages/devel/libevent/install b/packages/devel/libevent/install new file mode 100755 index 0000000000..f90efd0db0 --- /dev/null +++ b/packages/devel/libevent/install @@ -0,0 +1,7 @@ +#!/bin/sh + +. config/options $1 + +mkdir -p $INSTALL/usr/lib + cp -P $PKG_BUILD/.libs/libevent*.so* $INSTALL/usr/lib + diff --git a/packages/devel/libevent/meta b/packages/devel/libevent/meta new file mode 100644 index 0000000000..572faf51ab --- /dev/null +++ b/packages/devel/libevent/meta @@ -0,0 +1,16 @@ +PKG_NAME="libevent" +PKG_VERSION="1.4.14b-stable" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="BSD" +PKG_SITE="http://www.monkey.org/~provos/libevent/" +PKG_URL="http://monkey.org/~provos/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="devel" +PKG_SHORTDESC="libevent: A library for asynchronous event notification" +PKG_LONGDESC="The libevent API provides a mechanism to execute a callback function when a specific event occurs on a file descriptor or after a timeout has been reached. It is meant to replace the asynchronous event loop found in event-driven network servers." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/devel/libffi/meta b/packages/devel/libffi/meta index 6be4cbeded..1a4b0bfa11 100644 --- a/packages/devel/libffi/meta +++ b/packages/devel/libffi/meta @@ -12,3 +12,5 @@ PKG_SECTION="devel" PKG_SHORTDESC="Foreign Function Interface Library" PKG_LONGDESC="The libffi library provides a portable, high level programming interface to various calling conventions. This allows a programmer to call any function specified by a call interface description at run-time." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/devel/libiconv/build b/packages/devel/libiconv/build new file mode 100755 index 0000000000..1f894eb4b4 --- /dev/null +++ b/packages/devel/libiconv/build @@ -0,0 +1,7 @@ +#!/bin/sh + +. config/options $1 + +cd $PKG_BUILD + mkdir -p $SYSROOT_PREFIX/usr/share/aclocal + cp srcm4/*.m4 $SYSROOT_PREFIX/usr/share/aclocal diff --git a/packages/devel/libiconv/meta b/packages/devel/libiconv/meta new file mode 100644 index 0000000000..573bc6c59e --- /dev/null +++ b/packages/devel/libiconv/meta @@ -0,0 +1,16 @@ +PKG_NAME="libiconv" +PKG_VERSION="1.13.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.gnu.org/software/libiconv/" +PKG_URL="http://ftp.gnu.org/pub/gnu/libiconv/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="devel" +PKG_SHORTDESC="libiconv: Library converting between character encodings" +PKG_LONGDESC="This library provides an iconv() implementation, for use on systems which don't have one, or whose implementation cannot convert from/to Unicode. This library is a drop-in soution for systems lacking a iconv() implementation in the C library." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/devel/libpthread-stubs/build b/packages/devel/libpthread-stubs/build index d44875fe84..7db813cc8e 100755 --- a/packages/devel/libpthread-stubs/build +++ b/packages/devel/libpthread-stubs/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/devel/libpthread-stubs/meta b/packages/devel/libpthread-stubs/meta new file mode 100644 index 0000000000..ec52c41d26 --- /dev/null +++ b/packages/devel/libpthread-stubs/meta @@ -0,0 +1,16 @@ +PKG_NAME="libpthread-stubs" +PKG_VERSION="0.3" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://xcb.freedesktop.org/" +PKG_URL="http://xcb.freedesktop.org/dist/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="devel" +PKG_SHORTDESC="libpthread-stubs: A library providing weak aliases for pthread functions" +PKG_LONGDESC="This library provides weak aliases for pthread functions not provided in libc or otherwise available by default. Libraries like libxcb rely on pthread stubs to use pthreads optionally, becoming thread-safe when linked to libpthread, while avoiding any performance hit when running single-threaded." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/devel/libpthread-stubs/url b/packages/devel/libpthread-stubs/url deleted file mode 100644 index c8250cb912..0000000000 --- a/packages/devel/libpthread-stubs/url +++ /dev/null @@ -1 +0,0 @@ -http://xcb.freedesktop.org/dist/libpthread-stubs-0.3.tar.gz diff --git a/packages/devel/libtool/build b/packages/devel/libtool/build index 6c3b2e47a8..858a16053a 100755 --- a/packages/devel/libtool/build +++ b/packages/devel/libtool/build @@ -3,9 +3,7 @@ . config/options $1 cd $PKG_BUILD - -mkdir -p .objdir-target -cd .objdir-target +mkdir -p .objdir-target && cd .objdir-target ../configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/devel/libtool/meta b/packages/devel/libtool/meta new file mode 100644 index 0000000000..a2b3463211 --- /dev/null +++ b/packages/devel/libtool/meta @@ -0,0 +1,16 @@ +PKG_NAME="libtool" +PKG_VERSION="2.4" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.gnu.org/software/libtool/libtool.html" +PKG_URL="http://ftp.gnu.org/gnu/libtool/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="devel" +PKG_SHORTDESC="libtool: Generic library support script" +PKG_LONGDESC="This is GNU Libtool, a generic library support script. Libtool hides the complexity of using shared libraries behind a consistent, portable interface." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/devel/libtool/patches/libtool-2.4-no_use_linker_plugin.patch b/packages/devel/libtool/patches/libtool-2.4-no_use_linker_plugin.patch new file mode 100644 index 0000000000..30abedba9c --- /dev/null +++ b/packages/devel/libtool/patches/libtool-2.4-no_use_linker_plugin.patch @@ -0,0 +1,13 @@ +diff -Naur libtool-2.4-old/libltdl/m4/libtool.m4 libtool-2.4-new/libltdl/m4/libtool.m4 +--- libtool-2.4-old/libltdl/m4/libtool.m4 2010-09-22 01:41:19.000000000 -0700 ++++ libtool-2.4-new/libltdl/m4/libtool.m4 2010-09-23 20:25:25.000000000 -0700 +@@ -6905,6 +6905,9 @@ + *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; + *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; + esac ++case "$CC $CFLAGS " in #( ++*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; ++esac + + dnl Parse the compiler output and extract the necessary + dnl objects, libraries and library flags. diff --git a/packages/devel/libtool/patches/libtool-2.4-use_ld.diff b/packages/devel/libtool/patches/libtool-2.4-use_ld.patch similarity index 100% rename from packages/devel/libtool/patches/libtool-2.4-use_ld.diff rename to packages/devel/libtool/patches/libtool-2.4-use_ld.patch diff --git a/packages/devel/libtool/url b/packages/devel/libtool/url deleted file mode 100644 index 35b80f9010..0000000000 --- a/packages/devel/libtool/url +++ /dev/null @@ -1 +0,0 @@ -http://ftp.gnu.org/gnu/libtool/libtool-2.4.tar.gz \ No newline at end of file diff --git a/packages/devel/ncurses/meta b/packages/devel/ncurses/meta new file mode 100644 index 0000000000..bf955120ff --- /dev/null +++ b/packages/devel/ncurses/meta @@ -0,0 +1,16 @@ +PKG_NAME="ncurses" +PKG_VERSION="5.7" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="MIT" +PKG_SITE="http://www.gnu.org/software/ncurses/" +PKG_URL="http://ftp.gnu.org/pub/gnu/ncurses/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="" +PKG_PRIORITY="optional" +PKG_SECTION="devel" +PKG_SHORTDESC="ncurses: The ncurses (new curses) library" +PKG_LONGDESC="The ncurses (new curses) library is a free software emulation of curses in System V Release 4.0, and more. It uses terminfo format, supports pads and color and multiple highlights and forms characters and function-key mapping, and has all the other SYSV-curses enhancements over BSD curses." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/devel/ncurses/url b/packages/devel/ncurses/url deleted file mode 100644 index 4db615aa90..0000000000 --- a/packages/devel/ncurses/url +++ /dev/null @@ -1 +0,0 @@ -http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.7.tar.gz \ No newline at end of file diff --git a/packages/devel/pcre/build b/packages/devel/pcre/build index a80a5bbe1f..3a0b1e5f51 100755 --- a/packages/devel/pcre/build +++ b/packages/devel/pcre/build @@ -2,9 +2,9 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD + +mkdir -p m4 && do_autoreconf ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ @@ -15,6 +15,7 @@ cd $PKG_BUILD --disable-static \ --enable-utf8 \ --enable-unicode-properties \ + --with-gnu-ld make diff --git a/packages/devel/pcre/install b/packages/devel/pcre/install index 99a6a18263..ddc5beb9ea 100755 --- a/packages/devel/pcre/install +++ b/packages/devel/pcre/install @@ -3,5 +3,5 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/.libs/libpcre*.so*[.0-9] $INSTALL/usr/lib + cp -P $PKG_BUILD/.libs/libpcre*.so*[.0-9] $INSTALL/usr/lib diff --git a/packages/devel/pcre/meta b/packages/devel/pcre/meta new file mode 100644 index 0000000000..eaca718e4c --- /dev/null +++ b/packages/devel/pcre/meta @@ -0,0 +1,16 @@ +PKG_NAME="pcre" +PKG_VERSION="8.10" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.pcre.org/" +PKG_URL="http://downloads.sourceforge.net/project/pcre/pcre/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="devel" +PKG_SHORTDESC="pcre: Perl Compatible Regulat Expressions" +PKG_LONGDESC="The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5. PCRE has its own native API, as well as a set of wrapper functions that correspond to the POSIX regular expression API. The PCRE library is free, even for building commercial software." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/devel/pcre/url b/packages/devel/pcre/url deleted file mode 100644 index 4a20d89792..0000000000 --- a/packages/devel/pcre/url +++ /dev/null @@ -1 +0,0 @@ -http://downloads.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.tar.bz2 diff --git a/packages/devel/talloc/build b/packages/devel/talloc/build index 684c7e6d57..5d0c3c9f00 100755 --- a/packages/devel/talloc/build +++ b/packages/devel/talloc/build @@ -3,6 +3,8 @@ . config/options $1 cd $PKG_BUILD + +do_autoreconf -I libreplace ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ @@ -11,4 +13,4 @@ cd $PKG_BUILD make -$MAKEINSTALL \ No newline at end of file +$MAKEINSTALL diff --git a/packages/devel/talloc/meta b/packages/devel/talloc/meta index 22d2e1dbe9..a9df9daf19 100644 --- a/packages/devel/talloc/meta +++ b/packages/devel/talloc/meta @@ -12,3 +12,5 @@ PKG_SECTION="devel" PKG_SHORTDESC="talloc: talloc is a hierarchical, reference counted memory pool system with destructors." PKG_LONGDESC="talloc is a hierarchical, reference counted memory pool system with destructors. It is the core memory allocator used in Samba." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/drivers/install b/packages/drivers/install deleted file mode 100755 index aa6fa92f87..0000000000 --- a/packages/drivers/install +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -. config/options $1 - -for drivers in "$ADDITIONAL_DRIVERS"; do - - [ "$drivers" = rtl8192se ] && $SCRIPTS/install rtl8192se - -done - -exit 0 diff --git a/packages/graphics/Mesa-GL/build b/packages/graphics/Mesa-GL/build new file mode 100755 index 0000000000..d8cd506d1b --- /dev/null +++ b/packages/graphics/Mesa-GL/build @@ -0,0 +1,50 @@ +#!/bin/sh + +. config/options $1 + +$SCRIPTS/unpack Mesa + +# dont use gold linker because of compiling issues + strip_gold + strip_linker_plugin + +cd $BUILD/Mesa* + +do_autoreconf +./configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --disable-static \ + --enable-shared \ + --disable-debug \ + --disable-selinux \ + --enable-xcb \ + --disable-glx-tls \ + --enable-driglx-direct \ + --disable-egl \ + --disable-glu \ + --disable-gl-osmesa \ + --disable-glut \ + --disable-glw \ + --disable-motif \ + --with-driver=dri \ + --with-dri-drivers="" \ + --disable-gallium + + make -C src/glx + make -C src/mesa gl.pc + make -C src/mesa/drivers/dri dri.pc + + mkdir -p $SYSROOT_PREFIX/usr/include/GL + cp include/GL/*.h $SYSROOT_PREFIX/usr/include/GL + mkdir -p $SYSROOT_PREFIX/usr/lib + cp -P lib/libGL.so* $SYSROOT_PREFIX/usr/lib/pkgconfig + mkdir -p $SYSROOT_PREFIX/usr/lib/pkgconfig + cp src/mesa/gl.pc $SYSROOT_PREFIX/usr/lib/pkgconfig + + mkdir -p $SYSROOT_PREFIX/usr/include/GL/internal + cp include/GL/internal/dri_interface.h $SYSROOT_PREFIX/usr/include/GL/internal + mkdir -p $SYSROOT_PREFIX/usr/lib/pkgconfig + cp src/mesa/drivers/dri/dri.pc $SYSROOT_PREFIX/usr/lib/pkgconfig diff --git a/packages/graphics/Mesa-GL/meta b/packages/graphics/Mesa-GL/meta new file mode 100644 index 0000000000..917d274a5d --- /dev/null +++ b/packages/graphics/Mesa-GL/meta @@ -0,0 +1,16 @@ +PKG_NAME="Mesa-GL" +PKG_VERSION="" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.mesa3d.org/" +PKG_URL="" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain libxml2-host talloc expat glproto dri2proto libdrm libXext libXdamage libXfixes libXxf86vm libxcb libX11" +PKG_PRIORITY="optional" +PKG_SECTION="graphics" +PKG_SHORTDESC="Mesa-GL: 3-D graphics library with OpenGL API (GL part)" +PKG_LONGDESC="Mesa is a 3-D graphics library with an API which is very similar to that of OpenGL*. To the extent that Mesa utilizes the OpenGL command syntax or state machine, it is being used with authorization from Silicon Graphics, Inc. However, the author makes no claim that Mesa is in any way a compatible replacement for OpenGL or associated with Silicon Graphics, Inc. Those who want a licensed implementation of OpenGL should contact a licensed vendor. While Mesa is not a licensed OpenGL implementation, it is currently being tested with the OpenGL conformance tests. For the current conformance status see the CONFORM file included in the Mesa distribution." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/graphics/Mesa/build b/packages/graphics/Mesa/build index 225f51a30c..480aa8ebc2 100755 --- a/packages/graphics/Mesa/build +++ b/packages/graphics/Mesa/build @@ -2,23 +2,19 @@ . config/options $1 -$SCRIPTS/build libxml2-host -$SCRIPTS/build talloc -$SCRIPTS/build expat -$SCRIPTS/build glproto -$SCRIPTS/build dri2proto -$SCRIPTS/build $LIBDRM -$SCRIPTS/build libXext -$SCRIPTS/build libXdamage -$SCRIPTS/build libXfixes -$SCRIPTS/build libXxf86vm -$SCRIPTS/build libxcb -$SCRIPTS/build libX11 - get_graphicdrivers -MESA_CONFIG="--disable-gallium-nouveau --disable-gallium-i915 --disable-gallium-i965" -MESA_CONFIG="$MESA_CONFIG --disable-gallium-radeon --disable-gallium-r600 --disable-gallium-svga" +# dont use gold linker because of compiling issues + strip_gold + strip_linker_plugin + strip_lto # Mesa fails to build with LTO optimization + +# dont use strip or ggdb because of use from mklib + LDFLAGS=`echo $LDFLAGS | sed -e "s|-s | |"` + LDFLAGS=`echo $LDFLAGS | sed -e "s|-ggdb | |"` + +MESA_CONFIG=" --disable-gallium --disable-gallium-nouveau --disable-gallium-i915 --disable-gallium-i965" +MESA_CONFIG="$MESA_CONFIG --disable-gallium-radeon --disable-gallium-r600 --disable-gallium-svga --disable-gallium-swrast" for drv in $GRAPHIC_DRIVERS; do [ $drv = i915 ] && \ @@ -34,12 +30,20 @@ for drv in $GRAPHIC_DRIVERS; do MESA_CONFIG=`echo $MESA_CONFIG | sed -e 's/disable-gallium-r600/disable-gallium-r600/'` [ $drv = nouveau ] && \ - MESA_CONFIG=`echo $MESA_CONFIG | sed -e 's/disable-gallium-nouveau/enable-gallium-nouveau/'` - MESA_CONFIG="$MESA_CONFIG --with-state-trackers=dri,glx" + MESA_CONFIG=`echo $MESA_CONFIG | sed -e 's/disable-gallium/enable-gallium/'` && \ + MESA_CONFIG=`echo $MESA_CONFIG | sed -e 's/disable-gallium-nouveau/enable-gallium-nouveau/'` && \ + MESA_CONFIG="$MESA_CONFIG --with-state-trackers=dri,glx,xorg" + + [ $drv = vmware ] && \ + MESA_CONFIG=`echo $MESA_CONFIG | sed -e 's/disable-gallium/enable-gallium/'` && \ + MESA_CONFIG=`echo $MESA_CONFIG | sed -e 's/disable-gallium-svga/enable-gallium-svga/'` && \ + MESA_CONFIG="$MESA_CONFIG --with-state-trackers=dri,glx,xorg" done cd $PKG_BUILD +make clean + HOST_CC=$HOST_CC \ HOST_OPT_FLAGS="$HOST_CFLAGS" \ X11_INCLUDES= \ diff --git a/packages/graphics/Mesa/install b/packages/graphics/Mesa/install index ee241f4e41..cac0c4de80 100755 --- a/packages/graphics/Mesa/install +++ b/packages/graphics/Mesa/install @@ -2,16 +2,6 @@ . config/options $1 -$SCRIPTS/install libXdamage -$SCRIPTS/install $LIBDRM -$SCRIPTS/install talloc -$SCRIPTS/install expat -$SCRIPTS/install libXext -$SCRIPTS/install libXfixes -$SCRIPTS/install libXxf86vm -$SCRIPTS/install libxcb -$SCRIPTS/install libX11 - mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/lib/libGL.so.1.2 $INSTALL/usr/lib/libGL_mesa.so.1 # rename for cooperate with nvidia drivers ln -sf libGL.so.1 $INSTALL/usr/lib/libGL.so @@ -21,3 +11,6 @@ mkdir -p $INSTALL/usr/lib mkdir -p $INSTALL/usr/lib/dri cp -P $PKG_BUILD/lib/*_dri.so $INSTALL/usr/lib/dri || true cp -P $PKG_BUILD/lib/gallium/*_dri.so $INSTALL/usr/lib/dri || true + +mkdir -p $INSTALL/usr/lib/xorg/modules/drivers + cp -P $PKG_BUILD/lib/gallium/*_drv.so $INSTALL/usr/lib/xorg/modules/drivers || true diff --git a/packages/graphics/Mesa/meta b/packages/graphics/Mesa/meta new file mode 100644 index 0000000000..8dc968ac42 --- /dev/null +++ b/packages/graphics/Mesa/meta @@ -0,0 +1,21 @@ +PKG_NAME="Mesa" +PKG_VERSION="7.9.1-20101109" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.mesa3d.org/" +PKG_URL="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libXdamage libdrm talloc expat libXext libXfixes libXxf86vm libxcb libX11" +PKG_BUILD_DEPENDS="toolchain libxml2-host talloc expat glproto dri2proto libdrm libXext libXdamage libXfixes libXxf86vm libxcb libX11 xorg-server" +PKG_PRIORITY="optional" +PKG_SECTION="graphics" +PKG_SHORTDESC="mesa: 3-D graphics library with OpenGL API" +PKG_LONGDESC="Mesa is a 3-D graphics library with an API which is very similar to that of OpenGL*. To the extent that Mesa utilizes the OpenGL command syntax or state machine, it is being used with authorization from Silicon Graphics, Inc. However, the author makes no claim that Mesa is in any way a compatible replacement for OpenGL or associated with Silicon Graphics, Inc. Those who want a licensed implementation of OpenGL should contact a licensed vendor. While Mesa is not a licensed OpenGL implementation, it is currently being tested with the OpenGL conformance tests. For the current conformance status see the CONFORM file included in the Mesa distribution." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" + +if [ $MESA_MASTER = "yes" ]; then + PKG_VERSION="20101122" + PKG_URL="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tar.bz2" +fi diff --git a/packages/graphics/Mesa/url b/packages/graphics/Mesa/url deleted file mode 100644 index 6441adc9ea..0000000000 --- a/packages/graphics/Mesa/url +++ /dev/null @@ -1 +0,0 @@ -ftp://freedesktop.org/pub/mesa/7.9/MesaLib-7.9.tar.bz2 \ No newline at end of file diff --git a/packages/graphics/cairo/build b/packages/graphics/cairo/build index 2435ddf1db..af4011dca8 100755 --- a/packages/graphics/cairo/build +++ b/packages/graphics/cairo/build @@ -2,17 +2,13 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build zlib -$SCRIPTS/build freetype -$SCRIPTS/build fontconfig -$SCRIPTS/build libpng -$SCRIPTS/build pixman -$SCRIPTS/build libXrender -$SCRIPTS/build libX11 -# $SCRIPTS/build $MESA -# $SCRIPTS/build $LIBDRM -# $SCRIPTS/build libxcb +# cairo fails to build with graphite support +# see also http://bugs.gentoo.org/336157 + CFLAGS=`echo $CFLAGS | sed -e "s|-ftree-loop-distribution||"` + CFLAGS=`echo $CFLAGS | sed -e "s|-floop-interchange||"` + CFLAGS=`echo $CFLAGS | sed -e "s|-floop-strip-mine||"` + CFLAGS=`echo $CFLAGS | sed -e "s|-floop-block||"` + CFLAGS=`echo $CFLAGS | sed -e "s|-fgraphite-identity||"` cd $PKG_BUILD ./configure --host=$TARGET_NAME \ @@ -20,17 +16,59 @@ cd $PKG_BUILD --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ - --disable-static \ + --x-includes="$SYSROOT_PREFIX/usr/include" \ + --x-libraries="$SYSROOT_PREFIX/usr/lib" \ + --disable-silent-rules \ --enable-shared \ + --disable-static \ + --disable-gtk-doc \ + --enable-largefile \ + --enable-atomic \ + --disable-gcov \ + --disable-valgrind \ + --enable-xlib \ + --enable-xlib-xrender \ + --disable-xcb \ + --disable-xlib-xcb \ + --disable-xcb-shm \ + --disable-qt \ + --disable-quartz \ + --disable-quartz-font \ + --disable-quartz-image \ + --disable-win32 \ + --disable-win32-font \ + --disable-skia \ + --disable-os2 \ + --disable-beos \ + --disable-drm \ + --disable-drm-xr \ + --disable-gallium \ + --disable-xcb-drm \ --enable-png \ + --enable-gl \ + --disable-directfb \ + --disable-vg \ + --disable-egl \ + --enable-glx \ + --disable-wgl \ + --disable-script \ + --enable-ft \ + --enable-fc \ --enable-ps \ --enable-pdf \ --enable-svg \ - --enable-xlib \ - --disable-xcb \ - --disable-gl \ - --disable-drm \ - --disable-gtk-doc \ + --disable-test-surfaces \ + --disable-tee \ + --disable-xml \ + --enable-pthread \ + --disable-gobject \ + --disable-full-testing \ + --disable-trace \ + --enable-interpreter \ + --disable-symbol-lookup \ + --enable-some-floating-point \ + --with-gnu-ld \ + --with-x make $MAKEINSTALL diff --git a/packages/graphics/cairo/install b/packages/graphics/cairo/install index b5ed0bd0d8..b8165cb20f 100755 --- a/packages/graphics/cairo/install +++ b/packages/graphics/cairo/install @@ -2,14 +2,5 @@ . config/options $1 -$SCRIPTS/install zlib -$SCRIPTS/install freetype -$SCRIPTS/install fontconfig -$SCRIPTS/install libpng -$SCRIPTS/install pixman -$SCRIPTS/install libXrender -$SCRIPTS/install libX11 -#$SCRIPTS/install libxcb - mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/src/.libs/libcairo.so* $INSTALL/usr/lib diff --git a/packages/graphics/cairo/meta b/packages/graphics/cairo/meta new file mode 100644 index 0000000000..40009b8522 --- /dev/null +++ b/packages/graphics/cairo/meta @@ -0,0 +1,16 @@ +PKG_NAME="cairo" +PKG_VERSION="1.10.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="LGPL" +PKG_SITE="http://cairographics.org/" +PKG_URL="http://cairographics.org/releases/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="zlib freetype fontconfig libpng pixman libXrender libX11 Mesa" +PKG_BUILD_DEPENDS="toolchain zlib freetype fontconfig libpng pixman libXrender libX11 Mesa" +PKG_PRIORITY="optional" +PKG_SECTION="graphics" +PKG_SHORTDESC="cairo: Multi-platform 2D graphics library" +PKG_LONGDESC="Cairo is a vector graphics library with cross-device output support. Currently supported output targets include the X Window System and in-memory image buffers. PostScript and PDF file output is planned. Cairo is designed to produce identical output on all output media while taking advantage of display hardware acceleration when available." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" # ToDo diff --git a/packages/graphics/cairo/url b/packages/graphics/cairo/url deleted file mode 100644 index 7e3b6347da..0000000000 --- a/packages/graphics/cairo/url +++ /dev/null @@ -1 +0,0 @@ -http://cairographics.org/releases/cairo-1.10.0.tar.gz diff --git a/packages/graphics/glew/build b/packages/graphics/glew/build index c2d8508e3b..1924ad4471 100755 --- a/packages/graphics/glew/build +++ b/packages/graphics/glew/build @@ -2,17 +2,8 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build libX11 -$SCRIPTS/build libXext -$SCRIPTS/build libXi -$SCRIPTS/build libXmu -$SCRIPTS/build $MESA - cd $PKG_BUILD -make SYSTEM=linux \ - GLEW_DEST=/usr \ - CC=$TARGET_CC \ +make SYSTEM=linux GLEW_DEST=/usr CC=$TARGET_CC mkdir -p $SYSROOT_PREFIX/usr/lib cp -PR lib/* $SYSROOT_PREFIX/usr/lib diff --git a/packages/graphics/glew/install b/packages/graphics/glew/install index 88c4dd6ef8..808fcee24b 100755 --- a/packages/graphics/glew/install +++ b/packages/graphics/glew/install @@ -6,7 +6,7 @@ $SCRIPTS/install libX11 $SCRIPTS/install libXext $SCRIPTS/install libXi $SCRIPTS/install libXmu -$SCRIPTS/install $MESA +$SCRIPTS/install Mesa mkdir -p $INSTALL/usr/lib cp -PR $PKG_BUILD/lib/lib*.so* $INSTALL/usr/lib diff --git a/packages/graphics/glew/meta b/packages/graphics/glew/meta new file mode 100644 index 0000000000..26d68015e2 --- /dev/null +++ b/packages/graphics/glew/meta @@ -0,0 +1,16 @@ +PKG_NAME="glew" +PKG_VERSION="1.5.6" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="BSD" +PKG_SITE="http://glew.sourceforge.net/" +PKG_URL="http://downloads.sourceforge.net/project/glew/glew/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tgz" +PKG_DEPENDS="libX11 libXext libXi libXmu Mesa" +PKG_BUILD_DEPENDS="toolchain libX11 libXext libXi libXmu Mesa" +PKG_PRIORITY="optional" +PKG_SECTION="graphics" +PKG_SHORTDESC="glew: The OpenGL Extension Wrangler Library" +PKG_LONGDESC="The OpenGL Extension Wrangler Library (GLEW) is a cross-platform C/C++ extension loading library. GLEW provides efficient run-time mechanisms for determining which OpenGL extensions are supported on the target platform. OpenGL core and extension functionality is exposed in a single header file." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/graphics/glew/patches/010_crosscompiling.diff b/packages/graphics/glew/patches/glew-1.5.6-010_crosscompiling.patch similarity index 100% rename from packages/graphics/glew/patches/010_crosscompiling.diff rename to packages/graphics/glew/patches/glew-1.5.6-010_crosscompiling.patch diff --git a/packages/graphics/glew/url b/packages/graphics/glew/url deleted file mode 100644 index 1da285f743..0000000000 --- a/packages/graphics/glew/url +++ /dev/null @@ -1 +0,0 @@ -http://downloads.sourceforge.net/project/glew/glew/1.5.6/glew-1.5.6.tgz \ No newline at end of file diff --git a/packages/graphics/jasper/build b/packages/graphics/jasper/build index 0cfa21689a..186f78693d 100755 --- a/packages/graphics/jasper/build +++ b/packages/graphics/jasper/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/graphics/jasper/install b/packages/graphics/jasper/install index 510af9be42..9ca5f19c12 100755 --- a/packages/graphics/jasper/install +++ b/packages/graphics/jasper/install @@ -3,4 +3,4 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/src/libjasper/.libs/*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/src/libjasper/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/graphics/jasper/meta b/packages/graphics/jasper/meta new file mode 100644 index 0000000000..2d22ddbc05 --- /dev/null +++ b/packages/graphics/jasper/meta @@ -0,0 +1,16 @@ +PKG_NAME="jasper" +PKG_VERSION="1.900.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OpenSource" +PKG_SITE="http://www.ece.uvic.ca/~mdadams/jasper/" +PKG_URL="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="graphics" +PKG_SHORTDESC="jasper: JPEG-2000 Part-1 standard (i.e., ISO/IEC 15444-1) implementation" +PKG_LONGDESC="This distribution contains the public release of the an open-source implementation of the ISO/IEC 15444-1 also known as JPEG-2000 standard for image compression." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/graphics/jasper/unpack b/packages/graphics/jasper/unpack index edc69ccc9d..d481377295 100755 --- a/packages/graphics/jasper/unpack +++ b/packages/graphics/jasper/unpack @@ -2,5 +2,5 @@ . config/options $1 -cp $BUILD/configtools/config.guess $BUILD/$1*/acaux -cp $BUILD/configtools/config.sub $BUILD/$1*/acaux \ No newline at end of file +cp $SCRIPTS/configtools/config.guess $BUILD/$1*/acaux +cp $SCRIPTS/configtools/config.sub $BUILD/$1*/acaux diff --git a/packages/graphics/jasper/url b/packages/graphics/jasper/url deleted file mode 100644 index 48a20e66e4..0000000000 --- a/packages/graphics/jasper/url +++ /dev/null @@ -1 +0,0 @@ -http://sources.openelec.tv/svn/jasper-1.900.1.tar.bz2 \ No newline at end of file diff --git a/packages/graphics/jpeg/build b/packages/graphics/jpeg/build index f3c7bf539a..c3255d3a23 100755 --- a/packages/graphics/jpeg/build +++ b/packages/graphics/jpeg/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/graphics/jpeg/install b/packages/graphics/jpeg/install index 98caa5e53d..165665d2fd 100755 --- a/packages/graphics/jpeg/install +++ b/packages/graphics/jpeg/install @@ -3,4 +3,4 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/.libs/*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/graphics/jpeg/meta b/packages/graphics/jpeg/meta new file mode 100644 index 0000000000..a029ba09fd --- /dev/null +++ b/packages/graphics/jpeg/meta @@ -0,0 +1,16 @@ +PKG_NAME="jpeg" +PKG_VERSION="8b" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.ijg.org/" +PKG_URL="http://www.ijg.org/files/${PKG_NAME}src.v${PKG_VERSION}.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="graphics" +PKG_SHORTDESC="libjpeg: The Independent JPEG Group's JPEG software" +PKG_LONGDESC="This distribution contains the public release of the Independent JPEG Group's free JPEG software." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/graphics/jpeg/url b/packages/graphics/jpeg/url deleted file mode 100644 index 907c815d67..0000000000 --- a/packages/graphics/jpeg/url +++ /dev/null @@ -1 +0,0 @@ -http://www.ijg.org/files/jpegsrc.v8b.tar.gz \ No newline at end of file diff --git a/packages/graphics/libdrm-master/build b/packages/graphics/libdrm-master/build deleted file mode 100755 index 60b0519d4c..0000000000 --- a/packages/graphics/libdrm-master/build +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh - -. config/options $1 - -$SCRIPTS/build toolchain -$SCRIPTS/build libpthread-stubs -$SCRIPTS/build udev - -get_graphicdrivers - -DRM_CONFIG="--disable-libkms --disable-intel --disable-radeon --disable-nouveau-experimental-api" - -for drv in $DRM_DRIVERS; do - [ $drv = intel ] && \ - DRM_CONFIG=`echo $DRM_CONFIG | sed -e 's/disable-libkms/enable-libkms/'` \ - DRM_CONFIG=`echo $DRM_CONFIG | sed -e 's/disable-intel/enable-intel/'` - - [ $drv = radeon ] && \ - DRM_CONFIG=`echo $DRM_CONFIG | sed -e 's/disable-libkms/enable-libkms/'` \ - DRM_CONFIG=`echo $DRM_CONFIG | sed -e 's/disable-radeon/enable-radeon/'` - - [ $drv = nouveau ] && \ - DRM_CONFIG=`echo $DRM_CONFIG | sed -e 's/disable-libkms/enable-libkms/'` \ - DRM_CONFIG=`echo $DRM_CONFIG | sed -e 's/disable-nouveau/enable-nouveau/'` -done - -export LIBUDEV_CFLAGS="-I`ls -d $ROOT/$BUILD/udev*`" -export LIBUDEV_LIBS="-I`ls -d $ROOT/$BUILD/udev*`" - -cd $PKG_BUILD -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --disable-static \ - --enable-shared \ - --enable-udev \ - --enable-largefile \ - --with-kernel-source=$(kernel_path) \ - $DRM_CONFIG \ - -make - -$MAKEINSTALL diff --git a/packages/graphics/libdrm-master/install b/packages/graphics/libdrm-master/install deleted file mode 100755 index 28917ff085..0000000000 --- a/packages/graphics/libdrm-master/install +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -. config/options $1 - -get_graphicdrivers - -mkdir -p $INSTALL/usr/lib - cp -P $PKG_BUILD/.libs/libdrm.so* $INSTALL/usr/lib - cp -P $PKG_BUILD/libkms/.libs/libkms.so* $INSTALL/usr/lib || true - -for drv in $DRM_DRIVERS; do - cp -P $PKG_BUILD/$drv/.libs/libdrm_$drv*.so* $INSTALL/usr/lib - rm -rf $INSTALL/usr/lib/libdrm_$drv*.so*T -done diff --git a/packages/graphics/libdrm-master/url b/packages/graphics/libdrm-master/url deleted file mode 100644 index 707f08cc6f..0000000000 --- a/packages/graphics/libdrm-master/url +++ /dev/null @@ -1 +0,0 @@ -http://sources.openelec.tv/svn/libdrm-master-20101030.1.tar.bz2 \ No newline at end of file diff --git a/packages/graphics/libdrm/build b/packages/graphics/libdrm/build index 60b0519d4c..fd295d2bdd 100755 --- a/packages/graphics/libdrm/build +++ b/packages/graphics/libdrm/build @@ -2,26 +2,27 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build libpthread-stubs -$SCRIPTS/build udev - get_graphicdrivers -DRM_CONFIG="--disable-libkms --disable-intel --disable-radeon --disable-nouveau-experimental-api" +DRM_CONFIG="--disable-libkms --disable-intel --disable-radeon" +DRM_CONFIG="$DRM_CONFIG --disable-nouveau-experimental-api --disable-vmwgfx-experimental-api" -for drv in $DRM_DRIVERS; do - [ $drv = intel ] && \ - DRM_CONFIG=`echo $DRM_CONFIG | sed -e 's/disable-libkms/enable-libkms/'` \ +for drv in $GRAPHIC_DRIVERS; do + [ $drv = i915 -o $drv = i965 ] && \ + DRM_CONFIG=`echo $DRM_CONFIG | sed -e 's/disable-libkms/enable-libkms/'` && \ DRM_CONFIG=`echo $DRM_CONFIG | sed -e 's/disable-intel/enable-intel/'` - [ $drv = radeon ] && \ - DRM_CONFIG=`echo $DRM_CONFIG | sed -e 's/disable-libkms/enable-libkms/'` \ + [ $drv = r200 -o $drv = r300 -o $drv = r600 -o $drv = radeon ] && \ + DRM_CONFIG=`echo $DRM_CONFIG | sed -e 's/disable-libkms/enable-libkms/'` && \ DRM_CONFIG=`echo $DRM_CONFIG | sed -e 's/disable-radeon/enable-radeon/'` [ $drv = nouveau ] && \ - DRM_CONFIG=`echo $DRM_CONFIG | sed -e 's/disable-libkms/enable-libkms/'` \ + DRM_CONFIG=`echo $DRM_CONFIG | sed -e 's/disable-libkms/enable-libkms/'` && \ DRM_CONFIG=`echo $DRM_CONFIG | sed -e 's/disable-nouveau/enable-nouveau/'` + + [ $drv = vmware ] && \ + DRM_CONFIG=`echo $DRM_CONFIG | sed -e 's/disable-libkms/enable-libkms/'` && \ + DRM_CONFIG=`echo $DRM_CONFIG | sed -e 's/disable-vmwgfx-experimental-api/enable-vmwgfx-experimental-api/'` done export LIBUDEV_CFLAGS="-I`ls -d $ROOT/$BUILD/udev*`" diff --git a/packages/graphics/libdrm/install b/packages/graphics/libdrm/install index 28917ff085..078dd735b4 100755 --- a/packages/graphics/libdrm/install +++ b/packages/graphics/libdrm/install @@ -8,7 +8,5 @@ mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/.libs/libdrm.so* $INSTALL/usr/lib cp -P $PKG_BUILD/libkms/.libs/libkms.so* $INSTALL/usr/lib || true -for drv in $DRM_DRIVERS; do - cp -P $PKG_BUILD/$drv/.libs/libdrm_$drv*.so* $INSTALL/usr/lib - rm -rf $INSTALL/usr/lib/libdrm_$drv*.so*T -done + cp -P $PKG_BUILD/*/.libs/libdrm_*.so $INSTALL/usr/lib || true + cp -P $PKG_BUILD/*/.libs/libdrm_*.so*[0-9] $INSTALL/usr/lib || true diff --git a/packages/graphics/libdrm/meta b/packages/graphics/libdrm/meta new file mode 100644 index 0000000000..b337349e35 --- /dev/null +++ b/packages/graphics/libdrm/meta @@ -0,0 +1,21 @@ +PKG_NAME="libdrm" +PKG_VERSION="2.4.22" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://dri.freedesktop.org" +PKG_URL="http://dri.freedesktop.org/libdrm/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="udev" +PKG_BUILD_DEPENDS="toolchain libpthread-stubs udev" +PKG_PRIORITY="optional" +PKG_SECTION="graphics" +PKG_SHORTDESC="libdrm: Userspace interface to kernel DRM services" +PKG_LONGDESC="The userspace interface library to kernel DRM services." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" + +if [ $LIBDRM_MASTER = "yes" ]; then + PKG_VERSION="20101122" + PKG_URL="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tar.bz2" +fi diff --git a/packages/graphics/libdrm/url b/packages/graphics/libdrm/url deleted file mode 100644 index b75c89f329..0000000000 --- a/packages/graphics/libdrm/url +++ /dev/null @@ -1 +0,0 @@ -http://dri.freedesktop.org/libdrm/libdrm-2.4.22.tar.bz2 \ No newline at end of file diff --git a/packages/graphics/libjpeg-turbo/build b/packages/graphics/libjpeg-turbo/build index 437acfad54..c3255d3a23 100755 --- a/packages/graphics/libjpeg-turbo/build +++ b/packages/graphics/libjpeg-turbo/build @@ -2,10 +2,7 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD - ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ diff --git a/packages/graphics/libjpeg-turbo/meta b/packages/graphics/libjpeg-turbo/meta new file mode 100644 index 0000000000..5a8d5066bc --- /dev/null +++ b/packages/graphics/libjpeg-turbo/meta @@ -0,0 +1,16 @@ +PKG_NAME="libjpeg-turbo" +PKG_VERSION="1.0.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://libjpeg-turbo.virtualgl.org/" +PKG_URL="http://downloads.sourceforge.net/project/libjpeg-turbo/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="graphics" +PKG_SHORTDESC="libjpeg-turbo: a high-speed version of libjpeg for x86 and x86-64 processors which uses SIMD instructions (MMX, SSE2, etc.) to accelerate baseline JPEG compression and decompression." +PKG_LONGDESC="libjpeg-turbo is a high-speed version of libjpeg for x86 and x86-64 processors which uses SIMD instructions (MMX, SSE2, etc.) to accelerate baseline JPEG compression and decompression. libjpeg-turbo is generally 2-4x as fast as the unmodified version of libjpeg, all else being equal." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/graphics/libjpeg-turbo/url b/packages/graphics/libjpeg-turbo/url deleted file mode 100644 index 25914e2c89..0000000000 --- a/packages/graphics/libjpeg-turbo/url +++ /dev/null @@ -1 +0,0 @@ -http://downloads.sourceforge.net/project/libjpeg-turbo/1.0.1/libjpeg-turbo-1.0.1.tar.gz \ No newline at end of file diff --git a/packages/graphics/libpng/build b/packages/graphics/libpng/build index 96a3e3e80c..e4a4d26a61 100755 --- a/packages/graphics/libpng/build +++ b/packages/graphics/libpng/build @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build zlib - cd $PKG_BUILD ac_cv_lib_z_zlibVersion=yes \ ./configure --host=$TARGET_NAME \ @@ -21,4 +18,4 @@ $MAKEINSTALL $SED "s:\([\"'= ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" \ $SYSROOT_PREFIX/usr/bin/libpng*-config -cp -PR $SYSROOT_PREFIX/usr/bin/libpng*-config $ROOT/$TOOLCHAIN/bin +cp -P $SYSROOT_PREFIX/usr/bin/libpng*-config $ROOT/$TOOLCHAIN/bin diff --git a/packages/graphics/libpng/install b/packages/graphics/libpng/install index c68cfad8b5..aa9caa9330 100755 --- a/packages/graphics/libpng/install +++ b/packages/graphics/libpng/install @@ -3,4 +3,4 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/.libs/libpng14.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/.libs/libpng14.so* $INSTALL/usr/lib diff --git a/packages/graphics/libpng/meta b/packages/graphics/libpng/meta new file mode 100644 index 0000000000..662596cbac --- /dev/null +++ b/packages/graphics/libpng/meta @@ -0,0 +1,16 @@ +PKG_NAME="libpng" +PKG_VERSION="1.4.4" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.libpng.org/" +PKG_URL="http://downloads.sourceforge.net/libpng/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="zlib" +PKG_BUILD_DEPENDS="toolchain zlib" +PKG_PRIORITY="optional" +PKG_SECTION="graphics" +PKG_SHORTDESC="libpng: Portable Network Graphics (PNG) Reference Library" +PKG_LONGDESC="PNG (Portable Network Graphics) is an extensible file format for the lossless, portable, well-compressed storage of raster images. PNG provides a patent-free replacement for GIF and can also replace many common uses of TIFF. Indexed-color, grayscale, and truecolor images are supported, plus an optional alpha channel. Sample depths range from 1 to 16 bits." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/graphics/libpng/patches/libpng-1.4.1-apng.diff b/packages/graphics/libpng/patches/libpng-1.4.4-apng.patch similarity index 100% rename from packages/graphics/libpng/patches/libpng-1.4.1-apng.diff rename to packages/graphics/libpng/patches/libpng-1.4.4-apng.patch diff --git a/packages/graphics/libpng/patches/libpng-1.4.4-autoconf.patch b/packages/graphics/libpng/patches/libpng-1.4.4-autoconf.patch new file mode 100644 index 0000000000..ac2fb16cd0 --- /dev/null +++ b/packages/graphics/libpng/patches/libpng-1.4.4-autoconf.patch @@ -0,0 +1,25 @@ +diff -Naur libpng-1.4.4-old/configure.ac libpng-1.4.4-new/configure.ac +--- libpng-1.4.4-old/configure.ac 2010-09-23 05:18:36.000000000 -0700 ++++ libpng-1.4.4-new/configure.ac 2010-09-23 12:20:45.000000000 -0700 +@@ -18,16 +18,16 @@ + + dnl Version number stuff here: + +-PNGLIB_VERSION=1.4.4 +-PNGLIB_MAJOR=1 +-PNGLIB_MINOR=4 +-PNGLIB_RELEASE=4 +- + AC_INIT([libpng], [1.4.4], [png-mng-implement@lists.sourceforge.net]) + AM_INIT_AUTOMAKE + dnl stop configure from automagically running automake + AM_MAINTAINER_MODE + ++PNGLIB_VERSION=1.4.4 ++PNGLIB_MAJOR=1 ++PNGLIB_MINOR=4 ++PNGLIB_RELEASE=4 ++ + dnl End of version number stuff + + AC_CONFIG_SRCDIR([pngget.c]) diff --git a/packages/graphics/libpng/url b/packages/graphics/libpng/url deleted file mode 100644 index d4a5d11dca..0000000000 --- a/packages/graphics/libpng/url +++ /dev/null @@ -1 +0,0 @@ -http://downloads.sourceforge.net/libpng/libpng-1.4.4.tar.bz2 diff --git a/packages/graphics/mesa-master/build b/packages/graphics/mesa-master/build deleted file mode 100755 index 225f51a30c..0000000000 --- a/packages/graphics/mesa-master/build +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh - -. config/options $1 - -$SCRIPTS/build libxml2-host -$SCRIPTS/build talloc -$SCRIPTS/build expat -$SCRIPTS/build glproto -$SCRIPTS/build dri2proto -$SCRIPTS/build $LIBDRM -$SCRIPTS/build libXext -$SCRIPTS/build libXdamage -$SCRIPTS/build libXfixes -$SCRIPTS/build libXxf86vm -$SCRIPTS/build libxcb -$SCRIPTS/build libX11 - -get_graphicdrivers - -MESA_CONFIG="--disable-gallium-nouveau --disable-gallium-i915 --disable-gallium-i965" -MESA_CONFIG="$MESA_CONFIG --disable-gallium-radeon --disable-gallium-r600 --disable-gallium-svga" - -for drv in $GRAPHIC_DRIVERS; do - [ $drv = i915 ] && \ - MESA_CONFIG=`echo $MESA_CONFIG | sed -e 's/disable-gallium-intel/disable-gallium-intel/'` - - [ $drv = i965 ] && \ - MESA_CONFIG=`echo $MESA_CONFIG | sed -e 's/disable-gallium-intel/disable-gallium-intel/'` - - [ $drv = radeon ] && \ - MESA_CONFIG=`echo $MESA_CONFIG | sed -e 's/disable-gallium-radeon/disable-gallium-radeon/'` - - [ $drv = r600 ] && \ - MESA_CONFIG=`echo $MESA_CONFIG | sed -e 's/disable-gallium-r600/disable-gallium-r600/'` - - [ $drv = nouveau ] && \ - MESA_CONFIG=`echo $MESA_CONFIG | sed -e 's/disable-gallium-nouveau/enable-gallium-nouveau/'` - MESA_CONFIG="$MESA_CONFIG --with-state-trackers=dri,glx" -done - -cd $PKG_BUILD - -HOST_CC=$HOST_CC \ -HOST_OPT_FLAGS="$HOST_CFLAGS" \ -X11_INCLUDES= \ -DRI_DRIVER_INSTALL_DIR="$XORG_PATH_DRI" \ -DRI_DRIVER_SEARCH_DIR="$XORG_PATH_DRI" \ -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --disable-static \ - --enable-shared \ - --disable-debug \ - --disable-selinux \ - --enable-xcb \ - --disable-glx-tls \ - --enable-driglx-direct \ - --disable-egl \ - --enable-glu \ - --disable-gl-osmesa \ - --disable-glut \ - --disable-glw \ - --disable-motif \ - --with-driver=dri \ - --with-dri-drivers=$MESA_DRIVERS \ - --with-dri-driverdir="$XORG_PATH_DRI" \ - --with-xorg-driver-dir="$XORG_PATH_DRIVERS" \ - $MESA_CONFIG \ - -make - -$MAKEINSTALL -C src/mesa -$MAKEINSTALL -C src/glu diff --git a/packages/graphics/mesa-master/install b/packages/graphics/mesa-master/install deleted file mode 100755 index ee241f4e41..0000000000 --- a/packages/graphics/mesa-master/install +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -. config/options $1 - -$SCRIPTS/install libXdamage -$SCRIPTS/install $LIBDRM -$SCRIPTS/install talloc -$SCRIPTS/install expat -$SCRIPTS/install libXext -$SCRIPTS/install libXfixes -$SCRIPTS/install libXxf86vm -$SCRIPTS/install libxcb -$SCRIPTS/install libX11 - -mkdir -p $INSTALL/usr/lib - cp -P $PKG_BUILD/lib/libGL.so.1.2 $INSTALL/usr/lib/libGL_mesa.so.1 # rename for cooperate with nvidia drivers - ln -sf libGL.so.1 $INSTALL/usr/lib/libGL.so - ln -sf /var/lib/libGL.so $INSTALL/usr/lib/libGL.so.1 - cp -P $PKG_BUILD/lib/libGLU.so* $INSTALL/usr/lib - -mkdir -p $INSTALL/usr/lib/dri - cp -P $PKG_BUILD/lib/*_dri.so $INSTALL/usr/lib/dri || true - cp -P $PKG_BUILD/lib/gallium/*_dri.so $INSTALL/usr/lib/dri || true diff --git a/packages/graphics/mesa-master/url b/packages/graphics/mesa-master/url deleted file mode 100644 index 4c8ba5c2f9..0000000000 --- a/packages/graphics/mesa-master/url +++ /dev/null @@ -1 +0,0 @@ -http://sources.openelec.tv/svn/mesa-master-20101030.1.tar.bz2 \ No newline at end of file diff --git a/packages/graphics/tiff/meta b/packages/graphics/tiff/meta index 61d79af7a4..e3fdedbb6f 100644 --- a/packages/graphics/tiff/meta +++ b/packages/graphics/tiff/meta @@ -12,3 +12,5 @@ PKG_SECTION="graphics" PKG_SHORTDESC="libtiff: A library for reading and writing TIFF files" PKG_LONGDESC="libtiff is a library for reading and writing data files encoded with the Tag Image File format, Revision 6.0 (or revision 5.0 or revision 4.0). This file format is suit- able for archiving multi-color and monochromatic image data." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/image/install b/packages/image/install deleted file mode 100755 index 532460c3a8..0000000000 --- a/packages/image/install +++ /dev/null @@ -1,193 +0,0 @@ -#!/bin/sh - -. config/options $1 - -$SCRIPTS/checkdeps build - -if [ "$OPENELEC_VERSION" = devel -o "$OPENELEC_VERSION" = debug ]; then - BUILD_DATE=`date +%Y%m%d` - GIT_BUILD=`git log --pretty=format:'' | wc -l` - OPENELEC_VERSION=$OPENELEC_VERSION-$BUILD_DATE-r$GIT_BUILD -fi - -TARGET_VERSION="$PROJECT.$TARGET_ARCH-$OPENELEC_VERSION" - -case "$2" in - system) - - $SCRIPTS/install squashfs - $SCRIPTS/build fakeroot - - export INSTALL=$BUILD/$1/$2 - - rm -rf $FAKEROOT_SCRIPT # remove $FAKEROOT_SCRIPT if it exist - touch $FAKEROOT_SCRIPT # create an empty $FAKEROOT_SCRIPT - chmod +x $FAKEROOT_SCRIPT # make $FAKEROOT_SCRIPT executable - echo "chown -R 0:0 $INSTALL" >> $FAKEROOT_SCRIPT - - rm -rf $INSTALL - mkdir -p $INSTALL - - mkdir -p $INSTALL/bin - mkdir -p $INSTALL/etc - mkdir -p $INSTALL/lib - mkdir -p $INSTALL/sbin - mkdir -p $INSTALL/dev - mkdir -p $INSTALL/proc - mkdir -p $INSTALL/sys - mkdir -p $INSTALL/usr - mkdir -p $INSTALL/var - mkdir -p $INSTALL/flash - mkdir -p $INSTALL/storage - - ln -sf /var $INSTALL/usr/var - ln -sf /var/tmp $INSTALL/tmp - ln -sf /var/media $INSTALL/media - - if [ $TARGET_ARCH = x86_64 -o $TARGET_ARCH = powerpc64 ]; then - ln -s /lib $INSTALL/lib64 - ln -s lib $INSTALL/usr/lib64 - fi - -# copy project related files to filesystem - if [ -d $PROJECT_DIR/$PROJECT/filesystem ]; then - cp -PR $PROJECT_DIR/$PROJECT/filesystem/* $INSTALL - fi - -# Basissystem... - $SCRIPTS/install eglibc - $SCRIPTS/install gcc-final - $SCRIPTS/install linux $2 - $SCRIPTS/install busybox - $SCRIPTS/install acpid - $SCRIPTS/install util-linux-ng - - echo "OpenELEC" > $INSTALL/etc/distribution - echo "$PROJECT.$TARGET_ARCH" > $INSTALL/etc/arch - echo "$OPENELEC_VERSION" > $INSTALL/etc/version - echo "OpenELEC.tv - Date of build: $BUILD_DATE Build: $BZR_BUILD" > $INSTALL/etc/openelec-release - -# Network support - [ "$NETWORK" = yes ] && $SCRIPTS/install network - -# Transmission BitTorrent support - [ "$TRANSMISSION" = yes ] && $SCRIPTS/install transmission - -# Graphic support - [ ! "$DISPLAYSERVER" = no ] && $SCRIPTS/install $DISPLAYSERVER - -# Multimedia support - [ ! "$MEDIACENTER" = no ] && $SCRIPTS/install mediacenter - -# Automounter support - [ "$UDISKS" = yes ] && $SCRIPTS/install udisks - -# Powermanagement support - [ "$UPOWER" = yes ] && $SCRIPTS/install upower - [ "$UPOWER" = yes ] && $SCRIPTS/install ConsoleKit - -# NTFS 3G support - [ "$NTFS3G" = yes ] && $SCRIPTS/install ntfs-3g - -# Remote support - [ "$REMOTE_SUPPORT" = yes ] && $SCRIPTS/install remote - -# LCD support - [ ! "$LCD_DRIVER" = none ] && $SCRIPTS/install lcdproc - -# Sensors support - [ "$SENSOR_SUPPORT" = yes ] && $SCRIPTS/install lm_sensors - -# Update support - [ "$UPDATE_SUPPORT" = yes ] && $SCRIPTS/install autoupdate - -# Update support - [ "$INSTALLER_SUPPORT" = yes ] && $SCRIPTS/install installer - -# Games and Emulators support (SDK's) - [ "$GAMES" = yes ] && $SCRIPTS/install games-sdk - [ "$EMULATORS" = yes ] && $SCRIPTS/install emulators-sdk - -# Devtools... (not for Release) - [ "$TESTING" = yes ] && $SCRIPTS/install testing - [ "$DEVTOOLS" = yes ] && $SCRIPTS/install debug - -# OEM packages - [ "$OEM_SUPPORT" = yes ] && $SCRIPTS/install oem - -# setting - echo $TARGET_VERSION > $INSTALL/etc/release - -# strip kernel modules - for MOD in `find $INSTALL/lib/modules/ -name *.ko`; do - $STRIP --strip-debug $MOD - done - - mkdir -p $TARGET_IMG - rm -rf $TARGET_IMG/OpenELEC-$TARGET_VERSION.kernel - cp -PR $BUILD/linux-*/arch/x86/boot/bzImage $TARGET_IMG/OpenELEC-$TARGET_VERSION.kernel - - echo "rm -rf $TARGET_IMG/OpenELEC-$TARGET_VERSION.system" >> $FAKEROOT_SCRIPT -# echo "$ROOT/$TOOLCHAIN/bin/mksquashfs $INSTALL $TARGET_IMG/OpenELEC-$TARGET_VERSION.system -noappend -comp lzma" >> $FAKEROOT_SCRIPT - echo "$ROOT/$TOOLCHAIN/bin/mksquashfs $INSTALL $TARGET_IMG/OpenELEC-$TARGET_VERSION.system -noappend" >> $FAKEROOT_SCRIPT - $ROOT/$TOOLCHAIN/bin/fakeroot -- $FAKEROOT_SCRIPT - chmod 0644 $TARGET_IMG/OpenELEC-$TARGET_VERSION.system - rm -rf $FAKEROOT_SCRIPT - ;; - - release) - - $SCRIPTS/install image system - -# cleanup - rm -rf $BUILD/$2/OpenELEC-$TARGET_VERSION - - mkdir -p $BUILD/$2/OpenELEC-$TARGET_VERSION - cp -R $CONFIG/release/* $BUILD/$2/OpenELEC-$TARGET_VERSION - echo "$TARGET_VERSION" > $BUILD/$2/OpenELEC-$TARGET_VERSION/RELEASE - cp $ROOT/CHANGELOG $BUILD/$2/OpenELEC-$TARGET_VERSION - - mkdir -p $BUILD/$2/OpenELEC-$TARGET_VERSION/licenses - cp $ROOT/licenses/* $BUILD/$2/OpenELEC-$TARGET_VERSION/licenses - - mkdir -p $BUILD/$2/OpenELEC-$TARGET_VERSION/target - cp $TARGET_IMG/OpenELEC-$TARGET_VERSION.system $BUILD/$2/OpenELEC-$TARGET_VERSION/target/SYSTEM - cp $TARGET_IMG/OpenELEC-$TARGET_VERSION.kernel $BUILD/$2/OpenELEC-$TARGET_VERSION/target/KERNEL - -# create release directory - mkdir -p $TARGET_IMG - -# remove an previous created release tarball - rm -rf $TARGET_IMG/OpenELEC-$TARGET_VERSION.tar.bz2 - tar cjf $TARGET_IMG/OpenELEC-$TARGET_VERSION.tar.bz2 -C $BUILD/$2 OpenELEC-$TARGET_VERSION - ;; - - addons) - - export INSTALL=$BUILD/$1/$2 - - $SCRIPTS/install emulators addons - $SCRIPTS/install games addons - ;; - - qemu) - - $SCRIPTS/install image system - - mkdir -p $TARGET_IMG - rm -rf $TARGET_IMG/OpenELEC-$TARGET_VERSION-qemu.flash - qemu-img create -f raw $TARGET_IMG/OpenELEC-$TARGET_VERSION-qemu.flash 128M - /sbin/mkfs.ext4 -L Boot -F $TARGET_IMG/OpenELEC-$TARGET_VERSION-qemu.flash - - mkdir -p $ROOT/.tmp - sudo mount -o loop $TARGET_IMG/OpenELEC-$TARGET_VERSION-qemu.flash $ROOT/.tmp - cp -R $TARGET_IMG/OpenELEC-$TARGET_VERSION.system $ROOT/.tmp/openelec.system - sudo umount $ROOT/.tmp - - rm -rf $TARGET_IMG/OpenELEC-$TARGET_VERSION-qemu.storage - qemu-img create -f raw $TARGET_IMG/OpenELEC-$TARGET_VERSION-qemu.storage 500M - /sbin/mkfs.ext4 -L Storage -F $TARGET_IMG/OpenELEC-$TARGET_VERSION-qemu.storage - - ;; - -esac diff --git a/packages/lang/Python/build b/packages/lang/Python/build index 811f6ff05b..651a802ad3 100755 --- a/packages/lang/Python/build +++ b/packages/lang/Python/build @@ -2,14 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build expat-host -$SCRIPTS/build sqlite -$SCRIPTS/build expat -$SCRIPTS/build openssl -$SCRIPTS/build zlib -$SCRIPTS/build libffi - PY_DISABLED_MODULES="readline _curses _curses_panel _tkinter nis gdbm bsddb _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk" cd $PKG_BUILD @@ -47,8 +39,8 @@ ac_cv_file_dev_ptc=no \ ac_cv_file_dev_ptmx=yes \ ac_cv_func_lchflags_works=no \ ac_cv_func_chflags_works=no \ -ac_cv_func_printf_zd=yes -OPT="$TARGET_CFLAGS -fno-strict-aliasing" \ +ac_cv_func_printf_zd=yes \ +OPT="$CFLAGS -fno-strict-aliasing" \ LDFLAGS="$LDFLAGS -lexpat" \ ../configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -75,7 +67,9 @@ make -j1 CC="$TARGET_CC" \ BLDSHARED="$CC -shared" \ PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES" \ CROSS_COMPILE="$TARGET_NAME" \ - CROSS_COMPILE_TARGET="yes" + CROSS_COMPILE_TARGET="yes" \ + PYTHON_MODULES_INCLUDE=$SYSROOT_PREFIX/usr/include \ + PYTHON_MODULES_LIB="$SYSROOT_PREFIX/lib $SYSROOT_PREFIX/usr/lib" \ make -j1 CC="$TARGET_CC" \ DESTDIR=$SYSROOT_PREFIX \ @@ -85,6 +79,8 @@ make -j1 CC="$TARGET_CC" \ PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES" \ CROSS_COMPILE="$TARGET_NAME" \ CROSS_COMPILE_TARGET="yes" \ + PYTHON_MODULES_INCLUDE=$SYSROOT_PREFIX/usr/include \ + PYTHON_MODULES_LIB="$SYSROOT_PREFIX/lib $SYSROOT_PREFIX/usr/lib" \ install cp -R ../Lib ./ diff --git a/packages/lang/Python/install b/packages/lang/Python/install index 5dea9153ff..382aefaa08 100755 --- a/packages/lang/Python/install +++ b/packages/lang/Python/install @@ -2,11 +2,6 @@ . config/options $1 -$SCRIPTS/install openssl -$SCRIPTS/install zlib -$SCRIPTS/install libffi -$SCRIPTS/install file # needed by platform.architecture() - PYTHON_VERSION=2.6 PYTHON_LIB_DIR=$INSTALL/usr/lib/python$PYTHON_VERSION diff --git a/packages/lang/Python/meta b/packages/lang/Python/meta new file mode 100644 index 0000000000..89bea6c220 --- /dev/null +++ b/packages/lang/Python/meta @@ -0,0 +1,16 @@ +PKG_NAME="Python" +PKG_VERSION="2.6.6" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.python.org/" +PKG_URL="http://www.python.org/ftp/python/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="openssl zlib libffi file" +PKG_BUILD_DEPENDS="toolchain expat-host sqlite expat openssl zlib libffi" +PKG_PRIORITY="optional" +PKG_SECTION="lang" +PKG_SHORTDESC="python: The Python programming language" +PKG_LONGDESC="Python is an interpreted object-oriented programming language, and is often compared with Tcl, Perl, Java or Scheme." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/lang/Python/patches/001-Python-2.6.6-xcompile.diff b/packages/lang/Python/patches/Python-2.6.6-001_xcompile.patch similarity index 100% rename from packages/lang/Python/patches/001-Python-2.6.6-xcompile.diff rename to packages/lang/Python/patches/Python-2.6.6-001_xcompile.patch diff --git a/packages/lang/Python/patches/Python-2.6.6-002_xcompile_path-0.1.patch b/packages/lang/Python/patches/Python-2.6.6-002_xcompile_path-0.1.patch new file mode 100644 index 0000000000..1685b1d701 --- /dev/null +++ b/packages/lang/Python/patches/Python-2.6.6-002_xcompile_path-0.1.patch @@ -0,0 +1,52 @@ +diff -Naur Python-2.6.6/setup.py Python-2.6.6.patch/setup.py +--- Python-2.6.6/setup.py 2010-11-03 00:08:13.955365257 +0100 ++++ Python-2.6.6.patch/setup.py 2010-11-03 00:11:49.838882245 +0100 +@@ -361,9 +361,18 @@ + return sys.platform + + def detect_modules(self): +- # Ensure that /usr/local is always used +- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') +- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') ++ try: ++ modules_include_dirs = os.environ["PYTHON_MODULES_INCLUDE"].split() ++ except KeyError: ++ modules_include_dirs = ['/usr/include'] ++ try: ++ modules_lib_dirs = os.environ["PYTHON_MODULES_LIB"].split() ++ except KeyError: ++ modules_lib_dirs = ['/usr/lib'] ++ for dir in modules_include_dirs: ++ add_dir_to_list(self.compiler.include_dirs, dir) ++ for dir in modules_lib_dirs: ++ add_dir_to_list(self.compiler.library_dirs, dir) + + # Add paths specified in the environment variables LDFLAGS and + # CPPFLAGS for header and library files. +@@ -399,12 +408,6 @@ + for directory in reversed(options.dirs): + add_dir_to_list(dir_list, directory) + +- if os.path.normpath(sys.prefix) != '/usr': +- add_dir_to_list(self.compiler.library_dirs, +- sysconfig.get_config_var("LIBDIR")) +- add_dir_to_list(self.compiler.include_dirs, +- sysconfig.get_config_var("INCLUDEDIR")) +- + try: + have_unicode = unicode + except NameError: +@@ -413,11 +416,8 @@ + # lib_dirs and inc_dirs are used to search for files; + # if a file is found in one of those directories, it can + # be assumed that no additional -I,-L directives are needed. +- lib_dirs = self.compiler.library_dirs + [ +- '/lib64', '/usr/lib64', +- '/lib', '/usr/lib', +- ] +- inc_dirs = self.compiler.include_dirs + ['/usr/include'] ++ lib_dirs = self.compiler.library_dirs ++ inc_dirs = self.compiler.include_dirs + exts = [] + missing = [] + diff --git a/packages/lang/Python/patches/010-disable_modules_and_ssl-2.6.1.diff b/packages/lang/Python/patches/Python-2.6.6-003_xcompile_disable_modules_and_ssl-0.1.patch similarity index 71% rename from packages/lang/Python/patches/010-disable_modules_and_ssl-2.6.1.diff rename to packages/lang/Python/patches/Python-2.6.6-003_xcompile_disable_modules_and_ssl-0.1.patch index 5e99ac0277..89df2beedb 100644 --- a/packages/lang/Python/patches/010-disable_modules_and_ssl-2.6.1.diff +++ b/packages/lang/Python/patches/Python-2.6.6-003_xcompile_disable_modules_and_ssl-0.1.patch @@ -1,8 +1,8 @@ -diff -Naur Python-2.6.1/setup.py Python-2.6.1.patch/setup.py ---- Python-2.6.1/setup.py 2009-02-15 02:05:08.000000000 +0100 -+++ Python-2.6.1.patch/setup.py 2009-02-15 02:14:15.000000000 +0100 -@@ -17,7 +17,14 @@ - from distutils.command.install_lib import install_lib +diff -Naur Python-2.6.6/setup.py Python-2.6.6.patch/setup.py +--- Python-2.6.6/setup.py 2010-11-03 00:17:10.403608974 +0100 ++++ Python-2.6.6.patch/setup.py 2010-11-03 00:23:31.624025348 +0100 +@@ -18,7 +18,14 @@ + from distutils.spawn import find_executable # This global variable is used to hold the list of modules to be disabled. -disabled_module_list = [] @@ -17,21 +17,22 @@ diff -Naur Python-2.6.1/setup.py Python-2.6.1.patch/setup.py def add_dir_to_list(dirlist, dir): """Add the directory 'dir' to the list 'dirlist' (at the front) if -@@ -310,6 +317,7 @@ +@@ -361,6 +368,8 @@ return sys.platform def detect_modules(self): + global disable_ssl - # Ensure that /usr/local is always used ++ try: modules_include_dirs = os.environ["PYTHON_MODULES_INCLUDE"].split() -@@ -632,7 +640,8 @@ + except KeyError: +@@ -714,7 +723,8 @@ ] ) if (ssl_incs is not None and - ssl_libs is not None): + ssl_libs is not None and -+ not disable_ssl): ++ not disable_ssl): exts.append( Extension('_ssl', ['_ssl.c'], include_dirs = ssl_incs, library_dirs = ssl_libs, diff --git a/packages/lang/Python/patches/015-python-2.6.6-no-static-lib.diff b/packages/lang/Python/patches/Python-2.6.6-015_no_static_lib.patch similarity index 100% rename from packages/lang/Python/patches/015-python-2.6.6-no-static-lib.diff rename to packages/lang/Python/patches/Python-2.6.6-015_no_static_lib.patch diff --git a/packages/lang/Python/url b/packages/lang/Python/url deleted file mode 100644 index 5e2c79aafd..0000000000 --- a/packages/lang/Python/url +++ /dev/null @@ -1 +0,0 @@ -http://www.python.org/ftp/python/2.6.6/Python-2.6.6.tar.bz2 diff --git a/packages/lang/lua/build b/packages/lang/lua/build index c6a5cb3ed6..e402414f59 100755 --- a/packages/lang/lua/build +++ b/packages/lang/lua/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD make -C src \ diff --git a/packages/lang/lua/meta b/packages/lang/lua/meta new file mode 100644 index 0000000000..df0f638fbd --- /dev/null +++ b/packages/lang/lua/meta @@ -0,0 +1,16 @@ +PKG_NAME="lua" +PKG_VERSION="5.1.4" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="MIT" +PKG_SITE="http://www.lua.org/" +PKG_URL="http://www.lua.org/ftp/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="lang" +PKG_SHORTDESC="lua: A lightweight, extensible programming language" +PKG_LONGDESC="Lua is a powerful light-weight programming language designed for extending applications. Lua is also frequently used as a general-purpose, stand-alone language." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/lang/lua/url b/packages/lang/lua/url deleted file mode 100644 index b294a99545..0000000000 --- a/packages/lang/lua/url +++ /dev/null @@ -1 +0,0 @@ -http://www.lua.org/ftp/lua-5.1.4.tar.gz \ No newline at end of file diff --git a/packages/linux-drivers/bcm_sta/build b/packages/linux-drivers/bcm_sta/build new file mode 100755 index 0000000000..8f3aebb8ad --- /dev/null +++ b/packages/linux-drivers/bcm_sta/build @@ -0,0 +1,10 @@ +#!/bin/sh + +. config/options $1 + +cd $PKG_BUILD + +[ $TARGET_ARCH = i386 ] && cd x86-32 +[ $TARGET_ARCH = x86_64 ] && cd x86-64 + +KBUILD_NOPEDANTIC=1 make V=1 CC=$CC -C $(kernel_path) M=`pwd` diff --git a/packages/linux-drivers/bcm_sta/install b/packages/linux-drivers/bcm_sta/install new file mode 100755 index 0000000000..0cd12e1763 --- /dev/null +++ b/packages/linux-drivers/bcm_sta/install @@ -0,0 +1,18 @@ +#!/bin/sh + +. config/options $1 + +VER=`ls $BUILD/linux*/modules/lib/modules` + +mkdir -p $INSTALL/lib/modules/$VER/bcm_sta +[ $TARGET_ARCH = i386 ] && cp $PKG_BUILD/x86-32/wl.ko $INSTALL/lib/modules/$VER/bcm_sta +[ $TARGET_ARCH = x86_64 ] && cp $PKG_BUILD/x86-64/wl.ko $INSTALL/lib/modules/$VER/bcm_sta + + for MOD in `find $INSTALL/lib/modules/$VER/bcm_sta -name *.ko`; do + $STRIP --strip-debug $MOD + done + + $ROOT/$TOOLCHAIN/sbin/depmod -b $INSTALL $VER > /dev/null + for i in `ls $INSTALL/lib/modules/*/modules.* | grep -v modules.dep | grep -v modules.alias | grep -v modules.symbols`; do + rm -f $i + done diff --git a/packages/linux-drivers/bcm_sta/meta b/packages/linux-drivers/bcm_sta/meta new file mode 100644 index 0000000000..73d9e5c79b --- /dev/null +++ b/packages/linux-drivers/bcm_sta/meta @@ -0,0 +1,19 @@ +PKG_NAME="bcm_sta" +PKG_VERSION="5.60.246.6" +PKG_REV="1" +PKG_ARCH="i386 x86_64" +PKG_LICENSE="nonfree" +PKG_SITE="http://www.broadcom.com/" +PKG_URL="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain linux busybox-hosttools" +PKG_PRIORITY="optional" +PKG_SECTION="driver" +PKG_SHORTDESC="bcm_sta: Broadcom's BCM4311-, BCM4312-, BCM4313-, BCM4321-, BCM4322-, BCM43224-, and BCM43225-based WLAN driver" +PKG_LONGDESC="These packages contain Broadcom's IEEE 802.11a/b/g/n hybrid Linux® device driver for use with Broadcom's BCM4311-, BCM4312-, BCM4313-, BCM4321-, BCM4322-, BCM43224-, and BCM43225-based hardware. There are different tars for 32-bit and 64-bit x86 CPU architectures. Make sure that you download the appropriate tar because the hybrid binary file must be of the appropriate architecture type. The hybrid binary file is agnostic to the specific version of the Linux kernel because it is designed to perform all interactions with the operating system through operating-system-specific files and an operating system abstraction layer file. All Linux operating-system-specific code is provided in source form, making it possible to retarget to different kernel versions and fix operating system related issues." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" + +# Downloadlocation: +# http://www.broadcom.com/support/802.11/linux_sta.php \ No newline at end of file diff --git a/packages/drivers/rtl8192se/need_unpack b/packages/linux-drivers/bcm_sta/need_unpack similarity index 66% rename from packages/drivers/rtl8192se/need_unpack rename to packages/linux-drivers/bcm_sta/need_unpack index b60fcc137e..fcea9b102c 100755 --- a/packages/drivers/rtl8192se/need_unpack +++ b/packages/linux-drivers/bcm_sta/need_unpack @@ -5,9 +5,7 @@ STAMP=$STAMPS/$1/unpack test $PKG_DIR/config/linux.$TARGET_ARCH.conf -nt $STAMP -o \ - $PKG_DIR/config/linux.$TARGET_PLATFORM.conf -nt $STAMP -o \ $PROJECT_DIR/$PROJECT/linux/linux.$TARGET_ARCH.conf -nt $STAMP -o \ - $PROJECT_DIR/$PROJECT/linux/linux.$TARGET_PLATFORM.conf -nt $STAMP -o \ $PKG_DIR/url -nt $STAMP -o \ $PKG_DIR/meta -nt $STAMP && rm -f $STAMP diff --git a/packages/linux-drivers/bcm_sta/patches/bcm_sta-5.60.246.6-010_remove_sysioc_sem.patch b/packages/linux-drivers/bcm_sta/patches/bcm_sta-5.60.246.6-010_remove_sysioc_sem.patch new file mode 100644 index 0000000000..fb7021e7a3 --- /dev/null +++ b/packages/linux-drivers/bcm_sta/patches/bcm_sta-5.60.246.6-010_remove_sysioc_sem.patch @@ -0,0 +1,22 @@ +diff -Naur bcm_sta-5.60.246.6/x86-32/src/wl/sys/wl_iw.h bcm_sta-5.60.246.6.patch/x86-32/src/wl/sys/wl_iw.h +--- bcm_sta-5.60.246.6/x86-32/src/wl/sys/wl_iw.h 2010-11-22 03:01:28.267226695 +0100 ++++ bcm_sta-5.60.246.6.patch/x86-32/src/wl/sys/wl_iw.h 2010-11-22 03:00:28.308506905 +0100 +@@ -62,6 +62,7 @@ + struct timer_list *timer; + struct net_device *dev; + long sysioc_pid; ++ struct semaphore sysioc_sem; + struct completion sysioc_exited; + }; + +diff -Naur bcm_sta-5.60.246.6/x86-64/src/wl/sys/wl_iw.h bcm_sta-5.60.246.6.patch/x86-64/src/wl/sys/wl_iw.h +--- bcm_sta-5.60.246.6/x86-64/src/wl/sys/wl_iw.h 2010-11-22 03:01:49.840485699 +0100 ++++ bcm_sta-5.60.246.6.patch/x86-64/src/wl/sys/wl_iw.h 2010-11-22 03:00:28.322507073 +0100 +@@ -62,6 +62,7 @@ + struct timer_list *timer; + struct net_device *dev; + long sysioc_pid; ++ struct semaphore sysioc_sem; + struct completion sysioc_exited; + }; + diff --git a/packages/linux-drivers/meta b/packages/linux-drivers/meta new file mode 100644 index 0000000000..2861e4056d --- /dev/null +++ b/packages/linux-drivers/meta @@ -0,0 +1,27 @@ +PKG_NAME="linux-drivers" +PKG_VERSION="" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.openelec.tv" +PKG_URL="" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="linux-drivers" +PKG_SHORTDESC="linux-drivers: Meta package to install additional drivers" +PKG_LONGDESC="linux-drivers is a Meta package to install additional drivers" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" + +for drivers in "$ADDITIONAL_DRIVERS"; do + case $drivers in + + rtl8192se) PKG_DEPENDS="$PKG_DEPENDS rtl8192se" + ;; + broadcom) PKG_DEPENDS="$PKG_DEPENDS bcm_sta" + ;; + + esac +done diff --git a/packages/drivers/rtl8192se/build b/packages/linux-drivers/rtl8192se/build similarity index 100% rename from packages/drivers/rtl8192se/build rename to packages/linux-drivers/rtl8192se/build diff --git a/packages/drivers/rtl8192se/install b/packages/linux-drivers/rtl8192se/install similarity index 94% rename from packages/drivers/rtl8192se/install rename to packages/linux-drivers/rtl8192se/install index 25c1ba8ccf..120460e5e9 100755 --- a/packages/drivers/rtl8192se/install +++ b/packages/linux-drivers/rtl8192se/install @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build busybox-hosttools - VER=`ls $BUILD/linux*/modules/lib/modules` mkdir -p $INSTALL/lib/modules/$VER/rtl8192se diff --git a/packages/drivers/rtl8192se/meta b/packages/linux-drivers/rtl8192se/meta similarity index 78% rename from packages/drivers/rtl8192se/meta rename to packages/linux-drivers/rtl8192se/meta index 6b9f4bdeb2..5ced8dc07c 100644 --- a/packages/drivers/rtl8192se/meta +++ b/packages/linux-drivers/rtl8192se/meta @@ -1,15 +1,16 @@ PKG_NAME="rtl8192se" -PKG_VERSION="0017.0705.2010" +PKG_VERSION="0018.1025.2010" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="nonfree" PKG_SITE="http://www.realtek.com/" PKG_URL="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain linux" +PKG_BUILD_DEPENDS="toolchain linux busybox-hosttools" PKG_PRIORITY="optional" PKG_SECTION="driver" PKG_SHORTDESC="rtl8192se: Realtek RTL8191SE, RTL8192SE WLAN driver" PKG_LONGDESC="Realtek RTL8191SE, RTL8192SE WLAN driver" PKG_IS_ADDON="no" +PKG_AUTORECONF="no" diff --git a/packages/linux-drivers/rtl8192se/need_unpack b/packages/linux-drivers/rtl8192se/need_unpack new file mode 100755 index 0000000000..fcea9b102c --- /dev/null +++ b/packages/linux-drivers/rtl8192se/need_unpack @@ -0,0 +1,12 @@ +#!/bin/sh + +. config/options $1 + +STAMP=$STAMPS/$1/unpack + +test $PKG_DIR/config/linux.$TARGET_ARCH.conf -nt $STAMP -o \ + $PROJECT_DIR/$PROJECT/linux/linux.$TARGET_ARCH.conf -nt $STAMP -o \ + $PKG_DIR/url -nt $STAMP -o \ + $PKG_DIR/meta -nt $STAMP && rm -f $STAMP + +exit 0 diff --git a/packages/drivers/rtl8192se/patches/rtl8192se-add_missing_include-0.1.diff b/packages/linux-drivers/rtl8192se/patches/rtl8192se-0018.1025.2010-add_missing_include-0.1.patch similarity index 100% rename from packages/drivers/rtl8192se/patches/rtl8192se-add_missing_include-0.1.diff rename to packages/linux-drivers/rtl8192se/patches/rtl8192se-0018.1025.2010-add_missing_include-0.1.patch diff --git a/packages/linux-firmware/install b/packages/linux-firmware/install deleted file mode 100755 index 190e617c60..0000000000 --- a/packages/linux-firmware/install +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -. config/options $1 - -for firmware in "$FIRMWARE"; do - - [ "$firmware" = ipw2100 ] && $SCRIPTS/install ipw2100-fw - [ "$firmware" = ipw2200 ] && $SCRIPTS/install ipw2200-fw - [ "$firmware" = iwl1000 ] && $SCRIPTS/install iwlwifi-1000-ucode - [ "$firmware" = iwl3945 ] && $SCRIPTS/install iwlwifi-3945-ucode - [ "$firmware" = iwl4965 ] && $SCRIPTS/install iwlwifi-4965-ucode - [ "$firmware" = iwl5000 ] && $SCRIPTS/install iwlwifi-5000-ucode - [ "$firmware" = iwl5150 ] && $SCRIPTS/install iwlwifi-5150-ucode - [ "$firmware" = iwl6000 ] && $SCRIPTS/install iwlwifi-6000-ucode - -done - -exit 0 diff --git a/packages/linux-firmware/ipw2100-fw/install b/packages/linux-firmware/ipw2100-fw/install index 3fdf7ee6c5..8ce357a033 100755 --- a/packages/linux-firmware/ipw2100-fw/install +++ b/packages/linux-firmware/ipw2100-fw/install @@ -3,4 +3,4 @@ . config/options $1 mkdir -p $INSTALL/lib/firmware - cp -PR $PKG_BUILD/* $INSTALL/lib/firmware + cp -P $PKG_BUILD/* $INSTALL/lib/firmware diff --git a/packages/linux-firmware/ipw2100-fw/meta b/packages/linux-firmware/ipw2100-fw/meta new file mode 100644 index 0000000000..de1a430f96 --- /dev/null +++ b/packages/linux-firmware/ipw2100-fw/meta @@ -0,0 +1,16 @@ +PKG_NAME="ipw2100-fw" +PKG_VERSION="1.3" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="Free-to-use" +PKG_SITE="http://ipw2100.sourceforge.net/" +PKG_URL="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="linux-firmware" +PKG_SHORTDESC="ipw2100-fw: Intel PRO/Wireless 2100 Driver for Linux" +PKG_LONGDESC="This project was created by Intel to enable support for the Intel PRO/Wireless 2100 Network Connection mini PCI adapter. This project (IPW2100) is intended to be a community effort as much as is possible given some working constraints (mainly, no HW documentation is available)." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/linux-firmware/ipw2100-fw/url b/packages/linux-firmware/ipw2100-fw/url deleted file mode 100644 index e252b8c75f..0000000000 --- a/packages/linux-firmware/ipw2100-fw/url +++ /dev/null @@ -1 +0,0 @@ -http://sources.openelec.tv/svn/ipw2100-fw-1.3.tar.bz2 diff --git a/packages/linux-firmware/ipw2200-fw/meta b/packages/linux-firmware/ipw2200-fw/meta new file mode 100644 index 0000000000..dce07f34c3 --- /dev/null +++ b/packages/linux-firmware/ipw2200-fw/meta @@ -0,0 +1,16 @@ +PKG_NAME="ipw2200-fw" +PKG_VERSION="3.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="Free-to-use" +PKG_SITE="http://ipw2200.sourceforge.net/" +PKG_URL="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tgz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="linux-firmware" +PKG_SHORTDESC="ipw2200-fw: Intel PRO/Wireless 2200 Driver for Linux" +PKG_LONGDESC="This project was created by Intel to enable support for the Intel PRO/Wireless 2200 Network Connection mini PCI adapter. This project (IPW2200) is intended to be a community effort as much as is possible given some working constraints (mainly, no HW documentation is available)." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/linux-firmware/ipw2200-fw/url b/packages/linux-firmware/ipw2200-fw/url deleted file mode 100644 index 549d8e930e..0000000000 --- a/packages/linux-firmware/ipw2200-fw/url +++ /dev/null @@ -1 +0,0 @@ -http://sources.openelec.tv/svn/ipw2200-fw-3.1.tgz diff --git a/packages/linux-firmware/iwlwifi-1000-ucode/meta b/packages/linux-firmware/iwlwifi-1000-ucode/meta new file mode 100644 index 0000000000..62c9a1ca38 --- /dev/null +++ b/packages/linux-firmware/iwlwifi-1000-ucode/meta @@ -0,0 +1,16 @@ +PKG_NAME="iwlwifi-1000-ucode" +PKG_VERSION="128.50.3.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="Free-to-use" +PKG_SITE="http://www.intellinuxwireless.org" +PKG_URL="http://www.intellinuxwireless.org/iwlwifi/downloads/$PKG_NAME-$PKG_VERSION.tgz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="linux-firmware" +PKG_SHORTDESC="iwlwifi-1000-ucode: Intel PRO/Wireless 1000 Driver for Linux" +PKG_LONGDESC="This project was created by Intel to enable support for the Intel PRO/Wireless 1000 Network Connection mini PCI adapter. This project (iwl1000) is intended to be a community effort as much as is possible given some working constraints (mainly, no HW documentation is available)." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/linux-firmware/iwlwifi-1000-ucode/url b/packages/linux-firmware/iwlwifi-1000-ucode/url deleted file mode 100644 index 16b89a8d02..0000000000 --- a/packages/linux-firmware/iwlwifi-1000-ucode/url +++ /dev/null @@ -1 +0,0 @@ -http://www.intellinuxwireless.org/iwlwifi/downloads/iwlwifi-1000-ucode-128.50.3.1.tgz \ No newline at end of file diff --git a/packages/linux-firmware/iwlwifi-3945-ucode/meta b/packages/linux-firmware/iwlwifi-3945-ucode/meta new file mode 100644 index 0000000000..090da1f98a --- /dev/null +++ b/packages/linux-firmware/iwlwifi-3945-ucode/meta @@ -0,0 +1,16 @@ +PKG_NAME="iwlwifi-3945-ucode" +PKG_VERSION="15.32.2.9" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="Free-to-use" +PKG_SITE="http://www.intellinuxwireless.org" +PKG_URL="http://www.intellinuxwireless.org/iwlwifi/downloads/$PKG_NAME-$PKG_VERSION.tgz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="linux-firmware" +PKG_SHORTDESC="iwlwifi-3945-ucode: Intel PRO/Wireless 3945 Driver for Linux" +PKG_LONGDESC="This project was created by Intel to enable support for the Intel PRO/Wireless 3945 Network Connection mini PCI adapter. This project (iwl3945) is intended to be a community effort as much as is possible given some working constraints (mainly, no HW documentation is available)." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/linux-firmware/iwlwifi-3945-ucode/url b/packages/linux-firmware/iwlwifi-3945-ucode/url deleted file mode 100644 index c13b62a60d..0000000000 --- a/packages/linux-firmware/iwlwifi-3945-ucode/url +++ /dev/null @@ -1 +0,0 @@ -http://www.intellinuxwireless.org/iwlwifi/downloads/iwlwifi-3945-ucode-15.32.2.9.tgz \ No newline at end of file diff --git a/packages/linux-firmware/iwlwifi-4965-ucode/meta b/packages/linux-firmware/iwlwifi-4965-ucode/meta new file mode 100644 index 0000000000..ba4bb1b266 --- /dev/null +++ b/packages/linux-firmware/iwlwifi-4965-ucode/meta @@ -0,0 +1,16 @@ +PKG_NAME="iwlwifi-4965-ucode" +PKG_VERSION="228.61.2.24" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="Free-to-use" +PKG_SITE="http://www.intellinuxwireless.org" +PKG_URL="http://www.intellinuxwireless.org/iwlwifi/downloads/$PKG_NAME-$PKG_VERSION.tgz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="linux-firmware" +PKG_SHORTDESC="iwlwifi-4965-ucode: Intel PRO/Wireless 4965 Driver for Linux" +PKG_LONGDESC="This project was created by Intel to enable support for the Intel PRO/Wireless 4965 Network Connection mini PCI adapter. This project (iwl4965) is intended to be a community effort as much as is possible given some working constraints (mainly, no HW documentation is available)." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/linux-firmware/iwlwifi-4965-ucode/url b/packages/linux-firmware/iwlwifi-4965-ucode/url deleted file mode 100644 index f232fab51c..0000000000 --- a/packages/linux-firmware/iwlwifi-4965-ucode/url +++ /dev/null @@ -1 +0,0 @@ -http://www.intellinuxwireless.org/iwlwifi/downloads/iwlwifi-4965-ucode-228.61.2.24.tgz \ No newline at end of file diff --git a/packages/linux-firmware/iwlwifi-5000-ucode/meta b/packages/linux-firmware/iwlwifi-5000-ucode/meta new file mode 100644 index 0000000000..c3c827e3f7 --- /dev/null +++ b/packages/linux-firmware/iwlwifi-5000-ucode/meta @@ -0,0 +1,16 @@ +PKG_NAME="iwlwifi-5000-ucode" +PKG_VERSION="8.24.2.12" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="Free-to-use" +PKG_SITE="http://www.intellinuxwireless.org" +PKG_URL="http://www.intellinuxwireless.org/iwlwifi/downloads/$PKG_NAME-$PKG_VERSION.tgz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="linux-firmware" +PKG_SHORTDESC="iwlwifi-5000-ucode: Intel PRO/Wireless 5000 Driver for Linux" +PKG_LONGDESC="This project was created by Intel to enable support for the Intel PRO/Wireless 5000 Network Connection mini PCI adapter. This project (iwl5000) is intended to be a community effort as much as is possible given some working constraints (mainly, no HW documentation is available)." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/linux-firmware/iwlwifi-5000-ucode/url b/packages/linux-firmware/iwlwifi-5000-ucode/url deleted file mode 100644 index d6b64da49e..0000000000 --- a/packages/linux-firmware/iwlwifi-5000-ucode/url +++ /dev/null @@ -1 +0,0 @@ -http://www.intellinuxwireless.org/iwlwifi/downloads/iwlwifi-5000-ucode-8.24.2.12.tgz \ No newline at end of file diff --git a/packages/linux-firmware/iwlwifi-5150-ucode/meta b/packages/linux-firmware/iwlwifi-5150-ucode/meta new file mode 100644 index 0000000000..9702b99003 --- /dev/null +++ b/packages/linux-firmware/iwlwifi-5150-ucode/meta @@ -0,0 +1,16 @@ +PKG_NAME="iwlwifi-5150-ucode" +PKG_VERSION="8.24.2.2" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="Free-to-use" +PKG_SITE="http://www.intellinuxwireless.org" +PKG_URL="http://www.intellinuxwireless.org/iwlwifi/downloads/$PKG_NAME-$PKG_VERSION.tgz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="linux-firmware" +PKG_SHORTDESC="iwlwifi-5150-ucode: Intel PRO/Wireless 5150 Driver for Linux" +PKG_LONGDESC="This project was created by Intel to enable support for the Intel PRO/Wireless 5150 Network Connection mini PCI adapter. This project (iwl5150) is intended to be a community effort as much as is possible given some working constraints (mainly, no HW documentation is available)." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/linux-firmware/iwlwifi-5150-ucode/url b/packages/linux-firmware/iwlwifi-5150-ucode/url deleted file mode 100644 index 964f05c132..0000000000 --- a/packages/linux-firmware/iwlwifi-5150-ucode/url +++ /dev/null @@ -1 +0,0 @@ -http://www.intellinuxwireless.org/iwlwifi/downloads/iwlwifi-5150-ucode-8.24.2.2.tgz \ No newline at end of file diff --git a/packages/linux-firmware/iwlwifi-6000-ucode/meta b/packages/linux-firmware/iwlwifi-6000-ucode/meta new file mode 100644 index 0000000000..11721d05da --- /dev/null +++ b/packages/linux-firmware/iwlwifi-6000-ucode/meta @@ -0,0 +1,16 @@ +PKG_NAME="iwlwifi-6000-ucode" +PKG_VERSION="9.193.4.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="Free-to-use" +PKG_SITE="http://www.intellinuxwireless.org" +PKG_URL="http://www.intellinuxwireless.org/iwlwifi/downloads/$PKG_NAME-$PKG_VERSION.tgz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="linux-firmware" +PKG_SHORTDESC="iwlwifi-6000-ucode: Intel PRO/Wireless 6000 Driver for Linux" +PKG_LONGDESC="This project was created by Intel to enable support for the Intel PRO/Wireless 6000 Network Connection mini PCI adapter. This project (iwl6000) is intended to be a community effort as much as is possible given some working constraints (mainly, no HW documentation is available)." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/linux-firmware/iwlwifi-6000-ucode/url b/packages/linux-firmware/iwlwifi-6000-ucode/url deleted file mode 100644 index 793540c966..0000000000 --- a/packages/linux-firmware/iwlwifi-6000-ucode/url +++ /dev/null @@ -1 +0,0 @@ -http://www.intellinuxwireless.org/iwlwifi/downloads/iwlwifi-6000-ucode-9.193.4.1.tgz \ No newline at end of file diff --git a/packages/linux-firmware/iwlwifi-6050-ucode/install b/packages/linux-firmware/iwlwifi-6050-ucode/install new file mode 100755 index 0000000000..3fdf7ee6c5 --- /dev/null +++ b/packages/linux-firmware/iwlwifi-6050-ucode/install @@ -0,0 +1,6 @@ +#!/bin/sh + +. config/options $1 + +mkdir -p $INSTALL/lib/firmware + cp -PR $PKG_BUILD/* $INSTALL/lib/firmware diff --git a/packages/linux-firmware/iwlwifi-6050-ucode/meta b/packages/linux-firmware/iwlwifi-6050-ucode/meta new file mode 100644 index 0000000000..f7010b38d0 --- /dev/null +++ b/packages/linux-firmware/iwlwifi-6050-ucode/meta @@ -0,0 +1,16 @@ +PKG_NAME="iwlwifi-6050-ucode" +PKG_VERSION="9.201.4.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="Free-to-use" +PKG_SITE="http://www.intellinuxwireless.org" +PKG_URL="http://www.intellinuxwireless.org/iwlwifi/downloads/$PKG_NAME-$PKG_VERSION.tgz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="linux-firmware" +PKG_SHORTDESC="iwlwifi-6050-ucode: Intel PRO/Wireless 6050 Driver for Linux" +PKG_LONGDESC="This project was created by Intel to enable support for the Intel PRO/Wireless 6050 Network Connection mini PCI adapter. This project (iwl6050) is intended to be a community effort as much as is possible given some working constraints (mainly, no HW documentation is available)." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/linux-firmware/meta b/packages/linux-firmware/meta new file mode 100644 index 0000000000..8b01654177 --- /dev/null +++ b/packages/linux-firmware/meta @@ -0,0 +1,39 @@ +PKG_NAME="linux-firmware" +PKG_VERSION="" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.openelec.tv" +PKG_URL="" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="linux-firmware" +PKG_SHORTDESC="linux-firmware: Meta package to install firmware drivers" +PKG_LONGDESC="linux-firmware is a Meta package to install firmware drivers" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" + +for firmware in "$FIRMWARE"; do + case $firmware in + ipw2100) PKG_DEPENDS="$PKG_DEPENDS ipw2100-fw" + ;; + ipw2200) PKG_DEPENDS="$PKG_DEPENDS ipw2200-fw" + ;; + iwl1000) PKG_DEPENDS="$PKG_DEPENDS iwlwifi-1000-ucode" + ;; + iwl3945) PKG_DEPENDS="$PKG_DEPENDS iwlwifi-3945-ucode" + ;; + iwl4965) PKG_DEPENDS="$PKG_DEPENDS iwlwifi-4965-ucode" + ;; + iwl5000) PKG_DEPENDS="$PKG_DEPENDS iwlwifi-5000-ucode" + ;; + iwl5150) PKG_DEPENDS="$PKG_DEPENDS iwlwifi-5150-ucode" + ;; + iwl6000) PKG_DEPENDS="$PKG_DEPENDS iwlwifi-6000-ucode" + ;; + iwl6050) PKG_DEPENDS="$PKG_DEPENDS iwlwifi-6050-ucode" + ;; + esac +done diff --git a/packages/linux/meta b/packages/linux/meta index 1f1a43e872..ad8974af04 100644 --- a/packages/linux/meta +++ b/packages/linux/meta @@ -5,10 +5,17 @@ PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.kernel.org" PKG_URL="http://www.kernel.org/pub/linux/kernel/v2.6/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="busybox linux-firmware drivers" +PKG_DEPENDS="busybox linux-drivers linux-firmware" PKG_BUILD_DEPENDS="toolchain busybox-hosttools" PKG_PRIORITY="optional" PKG_SECTION="linux" PKG_SHORTDESC="linux26: The Linux kernel 2.6 precompiled kernel binary image and modules" PKG_LONGDESC="This package contains a precompiled kernel image and the modules." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" + +if [ "$LINUX_NEXT" = "yes" ]; then + PKG_VERSION="2.6.37-rc3" + PKG_URL="http://www.kernel.org/pub/linux/kernel/v2.6/testing/$PKG_NAME-$PKG_VERSION.tar.bz2" +fi diff --git a/packages/linux/need_unpack b/packages/linux/need_unpack index 4f5f0da275..4ae67178bc 100755 --- a/packages/linux/need_unpack +++ b/packages/linux/need_unpack @@ -5,6 +5,5 @@ STAMP=$STAMPS/$1/unpack test $PKG_DIR/config/$1.$TARGET_ARCH.conf -nt $STAMP && rm -f $STAMP -test $PKG_DIR/config/$1.$TARGET_PLATFORM.conf -nt $STAMP && rm -f $STAMP exit 0 diff --git a/packages/linux/patches/110-linux-2.6.36-drm_nouveau_upstream-20101030.diff b/packages/linux/patches/110-linux-2.6.36-drm_nouveau_upstream-20101030.diff deleted file mode 100644 index 26893f9b4f..0000000000 --- a/packages/linux/patches/110-linux-2.6.36-drm_nouveau_upstream-20101030.diff +++ /dev/null @@ -1,21575 +0,0 @@ -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/Kconfig linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/Kconfig ---- linux-2.6.36/drivers/gpu/drm/nouveau/Kconfig 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/Kconfig 2010-10-30 22:24:25.000000000 +0200 -@@ -10,6 +10,7 @@ - select FB - select FRAMEBUFFER_CONSOLE if !EMBEDDED - select FB_BACKLIGHT if DRM_NOUVEAU_BACKLIGHT -+ select ACPI_VIDEO if ACPI - help - Choose this option for open-source nVidia support. - -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/Makefile linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/Makefile ---- linux-2.6.36/drivers/gpu/drm/nouveau/Makefile 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/Makefile 2010-10-30 22:24:25.000000000 +0200 -@@ -9,7 +9,8 @@ - nouveau_bo.o nouveau_fence.o nouveau_gem.o nouveau_ttm.o \ - nouveau_hw.o nouveau_calc.o nouveau_bios.o nouveau_i2c.o \ - nouveau_display.o nouveau_connector.o nouveau_fbcon.o \ -- nouveau_dp.o \ -+ nouveau_dp.o nouveau_ramht.o \ -+ nouveau_pm.o nouveau_volt.o nouveau_perf.o nouveau_temp.o \ - nv04_timer.o \ - nv04_mc.o nv40_mc.o nv50_mc.o \ - nv04_fb.o nv10_fb.o nv30_fb.o nv40_fb.o nv50_fb.o nvc0_fb.o \ -@@ -17,13 +18,15 @@ - nv04_graph.o nv10_graph.o nv20_graph.o \ - nv40_graph.o nv50_graph.o nvc0_graph.o \ - nv40_grctx.o nv50_grctx.o \ -+ nv84_crypt.o \ - nv04_instmem.o nv50_instmem.o nvc0_instmem.o \ -- nv50_crtc.o nv50_dac.o nv50_sor.o \ -+ nv50_evo.o nv50_crtc.o nv50_dac.o nv50_sor.o \ - nv50_cursor.o nv50_display.o nv50_fbcon.o \ - nv04_dac.o nv04_dfp.o nv04_tv.o nv17_tv.o nv17_tv_modes.o \ - nv04_crtc.o nv04_display.o nv04_cursor.o nv04_fbcon.o \ - nv10_gpio.o nv50_gpio.o \ -- nv50_calc.o -+ nv50_calc.o \ -+ nv04_pm.o nv50_pm.o nva3_pm.o - - nouveau-$(CONFIG_DRM_NOUVEAU_DEBUG) += nouveau_debugfs.o - nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.o -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_acpi.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_acpi.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_acpi.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_acpi.c 2010-10-30 22:24:25.000000000 +0200 -@@ -292,6 +292,6 @@ - if (ret < 0) - return ret; - -- nv_connector->edid = edid; -+ nv_connector->edid = kmemdup(edid, EDID_LENGTH, GFP_KERNEL); - return 0; - } -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_bios.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_bios.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_bios.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_bios.c 2010-10-30 22:24:25.000000000 +0200 -@@ -43,9 +43,6 @@ - #define BIOSLOG(sip, fmt, arg...) NV_DEBUG(sip->dev, fmt, ##arg) - #define LOG_OLD_VALUE(x) - --#define ROM16(x) le16_to_cpu(*(uint16_t *)&(x)) --#define ROM32(x) le32_to_cpu(*(uint32_t *)&(x)) -- - struct init_exec { - bool execute; - bool repeat; -@@ -272,12 +269,6 @@ - int (*handler)(struct nvbios *, uint16_t, struct init_exec *); - }; - --struct bit_entry { -- uint8_t id[2]; -- uint16_t length; -- uint16_t offset; --}; -- - static int parse_init_table(struct nvbios *, unsigned int, struct init_exec *); - - #define MACRO_INDEX_SIZE 2 -@@ -1231,7 +1222,7 @@ - return 3; - } - -- if (cond & 1) -+ if (!(cond & 1)) - iexec->execute = false; - } - break; -@@ -4675,6 +4666,92 @@ - return 0; - } - -+struct pll_mapping { -+ u8 type; -+ u32 reg; -+}; -+ -+static struct pll_mapping nv04_pll_mapping[] = { -+ { PLL_CORE , NV_PRAMDAC_NVPLL_COEFF }, -+ { PLL_MEMORY, NV_PRAMDAC_MPLL_COEFF }, -+ { PLL_VPLL0 , NV_PRAMDAC_VPLL_COEFF }, -+ { PLL_VPLL1 , NV_RAMDAC_VPLL2 }, -+ {} -+}; -+ -+static struct pll_mapping nv40_pll_mapping[] = { -+ { PLL_CORE , 0x004000 }, -+ { PLL_MEMORY, 0x004020 }, -+ { PLL_VPLL0 , NV_PRAMDAC_VPLL_COEFF }, -+ { PLL_VPLL1 , NV_RAMDAC_VPLL2 }, -+ {} -+}; -+ -+static struct pll_mapping nv50_pll_mapping[] = { -+ { PLL_CORE , 0x004028 }, -+ { PLL_SHADER, 0x004020 }, -+ { PLL_UNK03 , 0x004000 }, -+ { PLL_MEMORY, 0x004008 }, -+ { PLL_UNK40 , 0x00e810 }, -+ { PLL_UNK41 , 0x00e818 }, -+ { PLL_UNK42 , 0x00e824 }, -+ { PLL_VPLL0 , 0x614100 }, -+ { PLL_VPLL1 , 0x614900 }, -+ {} -+}; -+ -+static struct pll_mapping nv84_pll_mapping[] = { -+ { PLL_CORE , 0x004028 }, -+ { PLL_SHADER, 0x004020 }, -+ { PLL_MEMORY, 0x004008 }, -+ { PLL_UNK05 , 0x004030 }, -+ { PLL_UNK41 , 0x00e818 }, -+ { PLL_VPLL0 , 0x614100 }, -+ { PLL_VPLL1 , 0x614900 }, -+ {} -+}; -+ -+u32 -+get_pll_register(struct drm_device *dev, enum pll_types type) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nvbios *bios = &dev_priv->vbios; -+ struct pll_mapping *map; -+ int i; -+ -+ if (dev_priv->card_type < NV_40) -+ map = nv04_pll_mapping; -+ else -+ if (dev_priv->card_type < NV_50) -+ map = nv40_pll_mapping; -+ else { -+ u8 *plim = &bios->data[bios->pll_limit_tbl_ptr]; -+ -+ if (plim[0] >= 0x30) { -+ u8 *entry = plim + plim[1]; -+ for (i = 0; i < plim[3]; i++, entry += plim[2]) { -+ if (entry[0] == type) -+ return ROM32(entry[3]); -+ } -+ -+ return 0; -+ } -+ -+ if (dev_priv->chipset == 0x50) -+ map = nv50_pll_mapping; -+ else -+ map = nv84_pll_mapping; -+ } -+ -+ while (map->reg) { -+ if (map->type == type) -+ return map->reg; -+ map++; -+ } -+ -+ return 0; -+} -+ - int get_pll_limits(struct drm_device *dev, uint32_t limit_match, struct pll_lims *pll_lim) - { - /* -@@ -4750,6 +4827,17 @@ - /* initialize all members to zero */ - memset(pll_lim, 0, sizeof(struct pll_lims)); - -+ /* if we were passed a type rather than a register, figure -+ * out the register and store it -+ */ -+ if (limit_match > PLL_MAX) -+ pll_lim->reg = limit_match; -+ else { -+ pll_lim->reg = get_pll_register(dev, limit_match); -+ if (!pll_lim->reg) -+ return -ENOENT; -+ } -+ - if (pll_lim_ver == 0x10 || pll_lim_ver == 0x11) { - uint8_t *pll_rec = &bios->data[bios->pll_limit_tbl_ptr + headerlen + recordlen * pllindex]; - -@@ -4785,7 +4873,6 @@ - pll_lim->max_usable_log2p = 0x6; - } else if (pll_lim_ver == 0x20 || pll_lim_ver == 0x21) { - uint16_t plloffs = bios->pll_limit_tbl_ptr + headerlen; -- uint32_t reg = 0; /* default match */ - uint8_t *pll_rec; - int i; - -@@ -4797,37 +4884,22 @@ - NV_WARN(dev, "Default PLL limit entry has non-zero " - "register field\n"); - -- if (limit_match > MAX_PLL_TYPES) -- /* we've been passed a reg as the match */ -- reg = limit_match; -- else /* limit match is a pll type */ -- for (i = 1; i < entries && !reg; i++) { -- uint32_t cmpreg = ROM32(bios->data[plloffs + recordlen * i]); -- -- if (limit_match == NVPLL && -- (cmpreg == NV_PRAMDAC_NVPLL_COEFF || cmpreg == 0x4000)) -- reg = cmpreg; -- if (limit_match == MPLL && -- (cmpreg == NV_PRAMDAC_MPLL_COEFF || cmpreg == 0x4020)) -- reg = cmpreg; -- if (limit_match == VPLL1 && -- (cmpreg == NV_PRAMDAC_VPLL_COEFF || cmpreg == 0x4010)) -- reg = cmpreg; -- if (limit_match == VPLL2 && -- (cmpreg == NV_RAMDAC_VPLL2 || cmpreg == 0x4018)) -- reg = cmpreg; -- } -- - for (i = 1; i < entries; i++) -- if (ROM32(bios->data[plloffs + recordlen * i]) == reg) { -+ if (ROM32(bios->data[plloffs + recordlen * i]) == pll_lim->reg) { - pllindex = i; - break; - } - -+ if ((dev_priv->card_type >= NV_50) && (pllindex == 0)) { -+ NV_ERROR(dev, "Register 0x%08x not found in PLL " -+ "limits table", pll_lim->reg); -+ return -ENOENT; -+ } -+ - pll_rec = &bios->data[plloffs + recordlen * pllindex]; - - BIOSLOG(bios, "Loading PLL limits for reg 0x%08x\n", -- pllindex ? reg : 0); -+ pllindex ? pll_lim->reg : 0); - - /* - * Frequencies are stored in tables in MHz, kHz are more -@@ -4877,8 +4949,8 @@ - if (cv == 0x51 && !pll_lim->refclk) { - uint32_t sel_clk = bios_rd32(bios, NV_PRAMDAC_SEL_CLK); - -- if (((limit_match == NV_PRAMDAC_VPLL_COEFF || limit_match == VPLL1) && sel_clk & 0x20) || -- ((limit_match == NV_RAMDAC_VPLL2 || limit_match == VPLL2) && sel_clk & 0x80)) { -+ if ((pll_lim->reg == NV_PRAMDAC_VPLL_COEFF && sel_clk & 0x20) || -+ (pll_lim->reg == NV_RAMDAC_VPLL2 && sel_clk & 0x80)) { - if (bios_idxprt_rd(bios, NV_CIO_CRX__COLOR, NV_CIO_CRE_CHIP_ID_INDEX) < 0xa3) - pll_lim->refclk = 200000; - else -@@ -4891,10 +4963,10 @@ - int i; - - BIOSLOG(bios, "Loading PLL limits for register 0x%08x\n", -- limit_match); -+ pll_lim->reg); - - for (i = 0; i < entries; i++, entry += recordlen) { -- if (ROM32(entry[3]) == limit_match) { -+ if (ROM32(entry[3]) == pll_lim->reg) { - record = &bios->data[ROM16(entry[1])]; - break; - } -@@ -4902,7 +4974,7 @@ - - if (!record) { - NV_ERROR(dev, "Register 0x%08x not found in PLL " -- "limits table", limit_match); -+ "limits table", pll_lim->reg); - return -ENOENT; - } - -@@ -4931,10 +5003,10 @@ - int i; - - BIOSLOG(bios, "Loading PLL limits for register 0x%08x\n", -- limit_match); -+ pll_lim->reg); - - for (i = 0; i < entries; i++, entry += recordlen) { -- if (ROM32(entry[3]) == limit_match) { -+ if (ROM32(entry[3]) == pll_lim->reg) { - record = &bios->data[ROM16(entry[1])]; - break; - } -@@ -4942,7 +5014,7 @@ - - if (!record) { - NV_ERROR(dev, "Register 0x%08x not found in PLL " -- "limits table", limit_match); -+ "limits table", pll_lim->reg); - return -ENOENT; - } - -@@ -5293,7 +5365,7 @@ - if (bitentry->length < 0x5) - return 0; - -- if (bitentry->id[1] < 2) { -+ if (bitentry->version < 2) { - bios->ram_restrict_group_count = bios->data[bitentry->offset + 2]; - bios->ram_restrict_tbl_ptr = ROM16(bios->data[bitentry->offset + 3]); - } else { -@@ -5403,27 +5475,40 @@ - - #define BIT_TABLE(id, funcid) ((struct bit_table){ id, parse_bit_##funcid##_tbl_entry }) - -+int -+bit_table(struct drm_device *dev, u8 id, struct bit_entry *bit) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nvbios *bios = &dev_priv->vbios; -+ u8 entries, *entry; -+ -+ entries = bios->data[bios->offset + 10]; -+ entry = &bios->data[bios->offset + 12]; -+ while (entries--) { -+ if (entry[0] == id) { -+ bit->id = entry[0]; -+ bit->version = entry[1]; -+ bit->length = ROM16(entry[2]); -+ bit->offset = ROM16(entry[4]); -+ bit->data = ROMPTR(bios, entry[4]); -+ return 0; -+ } -+ -+ entry += bios->data[bios->offset + 9]; -+ } -+ -+ return -ENOENT; -+} -+ - static int - parse_bit_table(struct nvbios *bios, const uint16_t bitoffset, - struct bit_table *table) - { - struct drm_device *dev = bios->dev; -- uint8_t maxentries = bios->data[bitoffset + 4]; -- int i, offset; - struct bit_entry bitentry; - -- for (i = 0, offset = bitoffset + 6; i < maxentries; i++, offset += 6) { -- bitentry.id[0] = bios->data[offset]; -- -- if (bitentry.id[0] != table->id) -- continue; -- -- bitentry.id[1] = bios->data[offset + 1]; -- bitentry.length = ROM16(bios->data[offset + 2]); -- bitentry.offset = ROM16(bios->data[offset + 4]); -- -+ if (bit_table(dev, table->id, &bitentry) == 0) - return table->parse_fn(dev, bios, &bitentry); -- } - - NV_INFO(dev, "BIT table '%c' not found\n", table->id); - return -ENOSYS; -@@ -5683,8 +5768,14 @@ - static struct dcb_gpio_entry * - new_gpio_entry(struct nvbios *bios) - { -+ struct drm_device *dev = bios->dev; - struct dcb_gpio_table *gpio = &bios->dcb.gpio; - -+ if (gpio->entries >= DCB_MAX_NUM_GPIO_ENTRIES) { -+ NV_ERROR(dev, "exceeded maximum number of gpio entries!!\n"); -+ return NULL; -+ } -+ - return &gpio->entry[gpio->entries++]; - } - -@@ -5706,113 +5797,90 @@ - } - - static void --parse_dcb30_gpio_entry(struct nvbios *bios, uint16_t offset) --{ -- struct dcb_gpio_entry *gpio; -- uint16_t ent = ROM16(bios->data[offset]); -- uint8_t line = ent & 0x1f, -- tag = ent >> 5 & 0x3f, -- flags = ent >> 11 & 0x1f; -- -- if (tag == 0x3f) -- return; -- -- gpio = new_gpio_entry(bios); -- -- gpio->tag = tag; -- gpio->line = line; -- gpio->invert = flags != 4; -- gpio->entry = ent; --} -- --static void --parse_dcb40_gpio_entry(struct nvbios *bios, uint16_t offset) --{ -- uint32_t entry = ROM32(bios->data[offset]); -- struct dcb_gpio_entry *gpio; -- -- if ((entry & 0x0000ff00) == 0x0000ff00) -- return; -- -- gpio = new_gpio_entry(bios); -- gpio->tag = (entry & 0x0000ff00) >> 8; -- gpio->line = (entry & 0x0000001f) >> 0; -- gpio->state_default = (entry & 0x01000000) >> 24; -- gpio->state[0] = (entry & 0x18000000) >> 27; -- gpio->state[1] = (entry & 0x60000000) >> 29; -- gpio->entry = entry; --} -- --static void - parse_dcb_gpio_table(struct nvbios *bios) - { - struct drm_device *dev = bios->dev; -- uint16_t gpio_table_ptr = bios->dcb.gpio_table_ptr; -- uint8_t *gpio_table = &bios->data[gpio_table_ptr]; -- int header_len = gpio_table[1], -- entries = gpio_table[2], -- entry_len = gpio_table[3]; -- void (*parse_entry)(struct nvbios *, uint16_t) = NULL; -+ struct dcb_gpio_entry *e; -+ u8 headerlen, entries, recordlen; -+ u8 *dcb, *gpio = NULL, *entry; - int i; - -- if (bios->dcb.version >= 0x40) { -- if (gpio_table_ptr && entry_len != 4) { -- NV_WARN(dev, "Invalid DCB GPIO table entry length.\n"); -- return; -- } -- -- parse_entry = parse_dcb40_gpio_entry; -+ dcb = ROMPTR(bios, bios->data[0x36]); -+ if (dcb[0] >= 0x30) { -+ gpio = ROMPTR(bios, dcb[10]); -+ if (!gpio) -+ goto no_table; -+ -+ headerlen = gpio[1]; -+ entries = gpio[2]; -+ recordlen = gpio[3]; -+ } else -+ if (dcb[0] >= 0x22 && dcb[-1] >= 0x13) { -+ gpio = ROMPTR(bios, dcb[-15]); -+ if (!gpio) -+ goto no_table; -+ -+ headerlen = 3; -+ entries = gpio[2]; -+ recordlen = gpio[1]; -+ } else -+ if (dcb[0] >= 0x22) { -+ /* No GPIO table present, parse the TVDAC GPIO data. */ -+ uint8_t *tvdac_gpio = &dcb[-5]; - -- } else if (bios->dcb.version >= 0x30) { -- if (gpio_table_ptr && entry_len != 2) { -- NV_WARN(dev, "Invalid DCB GPIO table entry length.\n"); -- return; -+ if (tvdac_gpio[0] & 1) { -+ e = new_gpio_entry(bios); -+ e->tag = DCB_GPIO_TVDAC0; -+ e->line = tvdac_gpio[1] >> 4; -+ e->invert = tvdac_gpio[0] & 2; - } - -- parse_entry = parse_dcb30_gpio_entry; -- -- } else if (bios->dcb.version >= 0x22) { -- /* -- * DCBs older than v3.0 don't really have a GPIO -- * table, instead they keep some GPIO info at fixed -- * locations. -- */ -- uint16_t dcbptr = ROM16(bios->data[0x36]); -- uint8_t *tvdac_gpio = &bios->data[dcbptr - 5]; -+ goto no_table; -+ } else { -+ NV_DEBUG(dev, "no/unknown gpio table on DCB 0x%02x\n", dcb[0]); -+ goto no_table; -+ } - -- if (tvdac_gpio[0] & 1) { -- struct dcb_gpio_entry *gpio = new_gpio_entry(bios); -+ entry = gpio + headerlen; -+ for (i = 0; i < entries; i++, entry += recordlen) { -+ e = new_gpio_entry(bios); -+ if (!e) -+ break; - -- gpio->tag = DCB_GPIO_TVDAC0; -- gpio->line = tvdac_gpio[1] >> 4; -- gpio->invert = tvdac_gpio[0] & 2; -- } -- } else { -- /* -- * No systematic way to store GPIO info on pre-v2.2 -- * DCBs, try to match the PCI device IDs. -- */ -+ if (gpio[0] < 0x40) { -+ e->entry = ROM16(entry[0]); -+ e->tag = (e->entry & 0x07e0) >> 5; -+ if (e->tag == 0x3f) { -+ bios->dcb.gpio.entries--; -+ continue; -+ } - -- /* Apple iMac G4 NV18 */ -- if (nv_match_device(dev, 0x0189, 0x10de, 0x0010)) { -- struct dcb_gpio_entry *gpio = new_gpio_entry(bios); -+ e->line = (e->entry & 0x001f); -+ e->invert = ((e->entry & 0xf800) >> 11) != 4; -+ } else { -+ e->entry = ROM32(entry[0]); -+ e->tag = (e->entry & 0x0000ff00) >> 8; -+ if (e->tag == 0xff) { -+ bios->dcb.gpio.entries--; -+ continue; -+ } - -- gpio->tag = DCB_GPIO_TVDAC0; -- gpio->line = 4; -+ e->line = (e->entry & 0x0000001f) >> 0; -+ e->state_default = (e->entry & 0x01000000) >> 24; -+ e->state[0] = (e->entry & 0x18000000) >> 27; -+ e->state[1] = (e->entry & 0x60000000) >> 29; - } -- - } - -- if (!gpio_table_ptr) -- return; -- -- if (entries > DCB_MAX_NUM_GPIO_ENTRIES) { -- NV_WARN(dev, "Too many entries in the DCB GPIO table.\n"); -- entries = DCB_MAX_NUM_GPIO_ENTRIES; -+no_table: -+ /* Apple iMac G4 NV18 */ -+ if (nv_match_device(dev, 0x0189, 0x10de, 0x0010)) { -+ e = new_gpio_entry(bios); -+ if (e) { -+ e->tag = DCB_GPIO_TVDAC0; -+ e->line = 4; -+ } - } -- -- for (i = 0; i < entries; i++) -- parse_entry(bios, gpio_table_ptr + header_len + entry_len * i); - } - - struct dcb_connector_table_entry * -@@ -5971,7 +6039,6 @@ - if (type != cte->type) - NV_WARN(dev, " -> type 0x%02x\n", cte->type); - } -- - } - } - -@@ -6680,6 +6747,8 @@ - bit_signature, sizeof(bit_signature)); - if (offset) { - NV_TRACE(dev, "BIT BIOS found\n"); -+ bios->type = NVBIOS_BIT; -+ bios->offset = offset; - return parse_bit_structure(bios, offset + 6); - } - -@@ -6687,6 +6756,8 @@ - bmp_signature, sizeof(bmp_signature)); - if (offset) { - NV_TRACE(dev, "BMP BIOS found\n"); -+ bios->type = NVBIOS_BMP; -+ bios->offset = offset; - return parse_bmp_structure(dev, bios, offset); - } - -@@ -6806,6 +6877,8 @@ - "running VBIOS init tables.\n"); - bios->execute = true; - } -+ if (nouveau_force_post) -+ bios->execute = true; - - ret = nouveau_run_vbios_init(dev); - if (ret) -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_bios.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_bios.h ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_bios.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_bios.h 2010-10-30 22:24:25.000000000 +0200 -@@ -34,6 +34,20 @@ - - #define DCB_LOC_ON_CHIP 0 - -+#define ROM16(x) le16_to_cpu(*(uint16_t *)&(x)) -+#define ROM32(x) le32_to_cpu(*(uint32_t *)&(x)) -+#define ROMPTR(bios, x) (ROM16(x) ? &(bios)->data[ROM16(x)] : NULL) -+ -+struct bit_entry { -+ uint8_t id; -+ uint8_t version; -+ uint16_t length; -+ uint16_t offset; -+ uint8_t *data; -+}; -+ -+int bit_table(struct drm_device *, u8 id, struct bit_entry *); -+ - struct dcb_i2c_entry { - uint32_t entry; - uint8_t port_type; -@@ -170,16 +184,28 @@ - LVDS_PANEL_OFF - }; - --/* changing these requires matching changes to reg tables in nv_get_clock */ --#define MAX_PLL_TYPES 4 -+/* these match types in pll limits table version 0x40, -+ * nouveau uses them on all chipsets internally where a -+ * specific pll needs to be referenced, but the exact -+ * register isn't known. -+ */ - enum pll_types { -- NVPLL, -- MPLL, -- VPLL1, -- VPLL2 -+ PLL_CORE = 0x01, -+ PLL_SHADER = 0x02, -+ PLL_UNK03 = 0x03, -+ PLL_MEMORY = 0x04, -+ PLL_UNK05 = 0x05, -+ PLL_UNK40 = 0x40, -+ PLL_UNK41 = 0x41, -+ PLL_UNK42 = 0x42, -+ PLL_VPLL0 = 0x80, -+ PLL_VPLL1 = 0x81, -+ PLL_MAX = 0xff - }; - - struct pll_lims { -+ u32 reg; -+ - struct { - int minfreq; - int maxfreq; -@@ -212,6 +238,11 @@ - - struct nvbios { - struct drm_device *dev; -+ enum { -+ NVBIOS_BMP, -+ NVBIOS_BIT -+ } type; -+ uint16_t offset; - - uint8_t chip_version; - -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_bo.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_bo.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_bo.c 2010-10-30 22:24:25.000000000 +0200 -@@ -36,21 +36,6 @@ - #include - #include - --int --nouveau_bo_sync_gpu(struct nouveau_bo *nvbo, struct nouveau_channel *chan) --{ -- struct nouveau_fence *prev_fence = nvbo->bo.sync_obj; -- int ret; -- -- if (!prev_fence || nouveau_fence_channel(prev_fence) == chan) -- return 0; -- -- spin_lock(&nvbo->bo.lock); -- ret = ttm_bo_wait(&nvbo->bo, false, false, false); -- spin_unlock(&nvbo->bo.lock); -- return ret; --} -- - static void - nouveau_bo_del_ttm(struct ttm_buffer_object *bo) - { -@@ -58,14 +43,10 @@ - struct drm_device *dev = dev_priv->dev; - struct nouveau_bo *nvbo = nouveau_bo(bo); - -- ttm_bo_kunmap(&nvbo->kmap); -- - if (unlikely(nvbo->gem)) - DRM_ERROR("bo %p still attached to GEM object\n", bo); - -- if (nvbo->tile) -- nv10_mem_expire_tiling(dev, nvbo->tile, NULL); -- -+ nv10_mem_put_tile_region(dev, nvbo->tile, NULL); - kfree(nvbo); - } - -@@ -160,12 +141,12 @@ - nvbo->no_vm = no_vm; - nvbo->tile_mode = tile_mode; - nvbo->tile_flags = tile_flags; -+ nvbo->bo.bdev = &dev_priv->ttm.bdev; - -- nouveau_bo_fixup_align(dev, tile_mode, tile_flags, &align, &size); -+ nouveau_bo_fixup_align(dev, tile_mode, nouveau_bo_tile_layout(nvbo), -+ &align, &size); - align >>= PAGE_SHIFT; - -- nvbo->placement.fpfn = 0; -- nvbo->placement.lpfn = mappable ? dev_priv->fb_mappable_pages : 0; - nouveau_bo_placement_set(nvbo, flags, 0); - - nvbo->channel = chan; -@@ -195,6 +176,31 @@ - pl[(*n)++] = TTM_PL_FLAG_SYSTEM | flags; - } - -+static void -+set_placement_range(struct nouveau_bo *nvbo, uint32_t type) -+{ -+ struct drm_nouveau_private *dev_priv = nouveau_bdev(nvbo->bo.bdev); -+ -+ if (dev_priv->card_type == NV_10 && -+ nvbo->tile_mode && (type & TTM_PL_FLAG_VRAM)) { -+ /* -+ * Make sure that the color and depth buffers are handled -+ * by independent memory controller units. Up to a 9x -+ * speed up when alpha-blending and depth-test are enabled -+ * at the same time. -+ */ -+ int vram_pages = dev_priv->vram_size >> PAGE_SHIFT; -+ -+ if (nvbo->tile_flags & NOUVEAU_GEM_TILE_ZETA) { -+ nvbo->placement.fpfn = vram_pages / 2; -+ nvbo->placement.lpfn = ~0; -+ } else { -+ nvbo->placement.fpfn = 0; -+ nvbo->placement.lpfn = vram_pages / 2; -+ } -+ } -+} -+ - void - nouveau_bo_placement_set(struct nouveau_bo *nvbo, uint32_t type, uint32_t busy) - { -@@ -209,6 +215,8 @@ - pl->busy_placement = nvbo->busy_placements; - set_placement_list(nvbo->busy_placements, &pl->num_busy_placement, - type | busy, flags); -+ -+ set_placement_range(nvbo, type); - } - - int -@@ -305,7 +313,8 @@ - void - nouveau_bo_unmap(struct nouveau_bo *nvbo) - { -- ttm_bo_kunmap(&nvbo->kmap); -+ if (nvbo) -+ ttm_bo_kunmap(&nvbo->kmap); - } - - u16 -@@ -399,14 +408,19 @@ - man->default_caching = TTM_PL_FLAG_CACHED; - break; - case TTM_PL_VRAM: -+ man->func = &ttm_bo_manager_func; - man->flags = TTM_MEMTYPE_FLAG_FIXED | - TTM_MEMTYPE_FLAG_MAPPABLE; - man->available_caching = TTM_PL_FLAG_UNCACHED | - TTM_PL_FLAG_WC; - man->default_caching = TTM_PL_FLAG_WC; -- man->gpu_offset = dev_priv->vm_vram_base; -+ if (dev_priv->card_type == NV_50) -+ man->gpu_offset = 0x40000000; -+ else -+ man->gpu_offset = 0; - break; - case TTM_PL_TT: -+ man->func = &ttm_bo_manager_func; - switch (dev_priv->gart_info.type) { - case NOUVEAU_GART_AGP: - man->flags = TTM_MEMTYPE_FLAG_MAPPABLE; -@@ -469,19 +483,19 @@ - if (ret) - return ret; - -- ret = ttm_bo_move_accel_cleanup(&nvbo->bo, fence, NULL, -- evict || (nvbo->channel && -- nvbo->channel != chan), -+ ret = ttm_bo_move_accel_cleanup(&nvbo->bo, fence, NULL, evict, - no_wait_reserve, no_wait_gpu, new_mem); -- nouveau_fence_unref((void *)&fence); -+ nouveau_fence_unref(&fence); - return ret; - } - - static inline uint32_t --nouveau_bo_mem_ctxdma(struct nouveau_bo *nvbo, struct nouveau_channel *chan, -- struct ttm_mem_reg *mem) -+nouveau_bo_mem_ctxdma(struct ttm_buffer_object *bo, -+ struct nouveau_channel *chan, struct ttm_mem_reg *mem) - { -- if (chan == nouveau_bdev(nvbo->bo.bdev)->channel) { -+ struct nouveau_bo *nvbo = nouveau_bo(bo); -+ -+ if (nvbo->no_vm) { - if (mem->mem_type == TTM_PL_TT) - return NvDmaGART; - return NvDmaVRAM; -@@ -493,87 +507,191 @@ - } - - static int --nouveau_bo_move_m2mf(struct ttm_buffer_object *bo, int evict, bool intr, -- bool no_wait_reserve, bool no_wait_gpu, -- struct ttm_mem_reg *new_mem) -+nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, -+ struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) - { -- struct nouveau_bo *nvbo = nouveau_bo(bo); - struct drm_nouveau_private *dev_priv = nouveau_bdev(bo->bdev); -- struct ttm_mem_reg *old_mem = &bo->mem; -- struct nouveau_channel *chan; -- uint64_t src_offset, dst_offset; -- uint32_t page_count; -+ struct nouveau_bo *nvbo = nouveau_bo(bo); -+ u64 length = (new_mem->num_pages << PAGE_SHIFT); -+ u64 src_offset, dst_offset; - int ret; - -- chan = nvbo->channel; -- if (!chan || nvbo->tile_flags || nvbo->no_vm) -- chan = dev_priv->channel; -- -- src_offset = old_mem->mm_node->start << PAGE_SHIFT; -- dst_offset = new_mem->mm_node->start << PAGE_SHIFT; -- if (chan != dev_priv->channel) { -- if (old_mem->mem_type == TTM_PL_TT) -- src_offset += dev_priv->vm_gart_base; -- else -+ src_offset = old_mem->start << PAGE_SHIFT; -+ dst_offset = new_mem->start << PAGE_SHIFT; -+ if (!nvbo->no_vm) { -+ if (old_mem->mem_type == TTM_PL_VRAM) - src_offset += dev_priv->vm_vram_base; -- -- if (new_mem->mem_type == TTM_PL_TT) -- dst_offset += dev_priv->vm_gart_base; - else -+ src_offset += dev_priv->vm_gart_base; -+ -+ if (new_mem->mem_type == TTM_PL_VRAM) - dst_offset += dev_priv->vm_vram_base; -+ else -+ dst_offset += dev_priv->vm_gart_base; - } - - ret = RING_SPACE(chan, 3); - if (ret) - return ret; -- BEGIN_RING(chan, NvSubM2MF, NV_MEMORY_TO_MEMORY_FORMAT_DMA_SOURCE, 2); -- OUT_RING(chan, nouveau_bo_mem_ctxdma(nvbo, chan, old_mem)); -- OUT_RING(chan, nouveau_bo_mem_ctxdma(nvbo, chan, new_mem)); - -- if (dev_priv->card_type >= NV_50) { -- ret = RING_SPACE(chan, 4); -+ BEGIN_RING(chan, NvSubM2MF, 0x0184, 2); -+ OUT_RING (chan, nouveau_bo_mem_ctxdma(bo, chan, old_mem)); -+ OUT_RING (chan, nouveau_bo_mem_ctxdma(bo, chan, new_mem)); -+ -+ while (length) { -+ u32 amount, stride, height; -+ -+ amount = min(length, (u64)(4 * 1024 * 1024)); -+ stride = 16 * 4; -+ height = amount / stride; -+ -+ if (new_mem->mem_type == TTM_PL_VRAM && -+ nouveau_bo_tile_layout(nvbo)) { -+ ret = RING_SPACE(chan, 8); -+ if (ret) -+ return ret; -+ -+ BEGIN_RING(chan, NvSubM2MF, 0x0200, 7); -+ OUT_RING (chan, 0); -+ OUT_RING (chan, 0); -+ OUT_RING (chan, stride); -+ OUT_RING (chan, height); -+ OUT_RING (chan, 1); -+ OUT_RING (chan, 0); -+ OUT_RING (chan, 0); -+ } else { -+ ret = RING_SPACE(chan, 2); -+ if (ret) -+ return ret; -+ -+ BEGIN_RING(chan, NvSubM2MF, 0x0200, 1); -+ OUT_RING (chan, 1); -+ } -+ if (old_mem->mem_type == TTM_PL_VRAM && -+ nouveau_bo_tile_layout(nvbo)) { -+ ret = RING_SPACE(chan, 8); -+ if (ret) -+ return ret; -+ -+ BEGIN_RING(chan, NvSubM2MF, 0x021c, 7); -+ OUT_RING (chan, 0); -+ OUT_RING (chan, 0); -+ OUT_RING (chan, stride); -+ OUT_RING (chan, height); -+ OUT_RING (chan, 1); -+ OUT_RING (chan, 0); -+ OUT_RING (chan, 0); -+ } else { -+ ret = RING_SPACE(chan, 2); -+ if (ret) -+ return ret; -+ -+ BEGIN_RING(chan, NvSubM2MF, 0x021c, 1); -+ OUT_RING (chan, 1); -+ } -+ -+ ret = RING_SPACE(chan, 14); - if (ret) - return ret; -- BEGIN_RING(chan, NvSubM2MF, 0x0200, 1); -- OUT_RING(chan, 1); -- BEGIN_RING(chan, NvSubM2MF, 0x021c, 1); -- OUT_RING(chan, 1); -+ -+ BEGIN_RING(chan, NvSubM2MF, 0x0238, 2); -+ OUT_RING (chan, upper_32_bits(src_offset)); -+ OUT_RING (chan, upper_32_bits(dst_offset)); -+ BEGIN_RING(chan, NvSubM2MF, 0x030c, 8); -+ OUT_RING (chan, lower_32_bits(src_offset)); -+ OUT_RING (chan, lower_32_bits(dst_offset)); -+ OUT_RING (chan, stride); -+ OUT_RING (chan, stride); -+ OUT_RING (chan, stride); -+ OUT_RING (chan, height); -+ OUT_RING (chan, 0x00000101); -+ OUT_RING (chan, 0x00000000); -+ BEGIN_RING(chan, NvSubM2MF, NV_MEMORY_TO_MEMORY_FORMAT_NOP, 1); -+ OUT_RING (chan, 0); -+ -+ length -= amount; -+ src_offset += amount; -+ dst_offset += amount; - } - -+ return 0; -+} -+ -+static int -+nv04_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, -+ struct ttm_mem_reg *old_mem, struct ttm_mem_reg *new_mem) -+{ -+ u32 src_offset = old_mem->start << PAGE_SHIFT; -+ u32 dst_offset = new_mem->start << PAGE_SHIFT; -+ u32 page_count = new_mem->num_pages; -+ int ret; -+ -+ ret = RING_SPACE(chan, 3); -+ if (ret) -+ return ret; -+ -+ BEGIN_RING(chan, NvSubM2MF, NV_MEMORY_TO_MEMORY_FORMAT_DMA_SOURCE, 2); -+ OUT_RING (chan, nouveau_bo_mem_ctxdma(bo, chan, old_mem)); -+ OUT_RING (chan, nouveau_bo_mem_ctxdma(bo, chan, new_mem)); -+ - page_count = new_mem->num_pages; - while (page_count) { - int line_count = (page_count > 2047) ? 2047 : page_count; - -- if (dev_priv->card_type >= NV_50) { -- ret = RING_SPACE(chan, 3); -- if (ret) -- return ret; -- BEGIN_RING(chan, NvSubM2MF, 0x0238, 2); -- OUT_RING(chan, upper_32_bits(src_offset)); -- OUT_RING(chan, upper_32_bits(dst_offset)); -- } - ret = RING_SPACE(chan, 11); - if (ret) - return ret; -+ - BEGIN_RING(chan, NvSubM2MF, - NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN, 8); -- OUT_RING(chan, lower_32_bits(src_offset)); -- OUT_RING(chan, lower_32_bits(dst_offset)); -- OUT_RING(chan, PAGE_SIZE); /* src_pitch */ -- OUT_RING(chan, PAGE_SIZE); /* dst_pitch */ -- OUT_RING(chan, PAGE_SIZE); /* line_length */ -- OUT_RING(chan, line_count); -- OUT_RING(chan, (1<<8)|(1<<0)); -- OUT_RING(chan, 0); -+ OUT_RING (chan, src_offset); -+ OUT_RING (chan, dst_offset); -+ OUT_RING (chan, PAGE_SIZE); /* src_pitch */ -+ OUT_RING (chan, PAGE_SIZE); /* dst_pitch */ -+ OUT_RING (chan, PAGE_SIZE); /* line_length */ -+ OUT_RING (chan, line_count); -+ OUT_RING (chan, 0x00000101); -+ OUT_RING (chan, 0x00000000); - BEGIN_RING(chan, NvSubM2MF, NV_MEMORY_TO_MEMORY_FORMAT_NOP, 1); -- OUT_RING(chan, 0); -+ OUT_RING (chan, 0); - - page_count -= line_count; - src_offset += (PAGE_SIZE * line_count); - dst_offset += (PAGE_SIZE * line_count); - } - -- return nouveau_bo_move_accel_cleanup(chan, nvbo, evict, no_wait_reserve, no_wait_gpu, new_mem); -+ return 0; -+} -+ -+static int -+nouveau_bo_move_m2mf(struct ttm_buffer_object *bo, int evict, bool intr, -+ bool no_wait_reserve, bool no_wait_gpu, -+ struct ttm_mem_reg *new_mem) -+{ -+ struct drm_nouveau_private *dev_priv = nouveau_bdev(bo->bdev); -+ struct nouveau_bo *nvbo = nouveau_bo(bo); -+ struct nouveau_channel *chan; -+ int ret; -+ -+ chan = nvbo->channel; -+ if (!chan || nvbo->no_vm) { -+ chan = dev_priv->channel; -+ mutex_lock_nested(&chan->mutex, NOUVEAU_KCHANNEL_MUTEX); -+ } -+ -+ if (dev_priv->card_type < NV_50) -+ ret = nv04_bo_move_m2mf(chan, bo, &bo->mem, new_mem); -+ else -+ ret = nv50_bo_move_m2mf(chan, bo, &bo->mem, new_mem); -+ if (ret == 0) { -+ ret = nouveau_bo_move_accel_cleanup(chan, nvbo, evict, -+ no_wait_reserve, -+ no_wait_gpu, new_mem); -+ } -+ -+ if (chan == dev_priv->channel) -+ mutex_unlock(&chan->mutex); -+ return ret; - } - - static int -@@ -606,12 +724,7 @@ - - ret = ttm_bo_move_ttm(bo, evict, no_wait_reserve, no_wait_gpu, new_mem); - out: -- if (tmp_mem.mm_node) { -- spin_lock(&bo->bdev->glob->lru_lock); -- drm_mm_put_block(tmp_mem.mm_node); -- spin_unlock(&bo->bdev->glob->lru_lock); -- } -- -+ ttm_bo_mem_put(bo, &tmp_mem); - return ret; - } - -@@ -644,12 +757,7 @@ - goto out; - - out: -- if (tmp_mem.mm_node) { -- spin_lock(&bo->bdev->glob->lru_lock); -- drm_mm_put_block(tmp_mem.mm_node); -- spin_unlock(&bo->bdev->glob->lru_lock); -- } -- -+ ttm_bo_mem_put(bo, &tmp_mem); - return ret; - } - -@@ -669,19 +777,21 @@ - return 0; - } - -- offset = new_mem->mm_node->start << PAGE_SHIFT; -+ offset = new_mem->start << PAGE_SHIFT; - - if (dev_priv->card_type == NV_50) { - ret = nv50_mem_vm_bind_linear(dev, - offset + dev_priv->vm_vram_base, -- new_mem->size, nvbo->tile_flags, -+ new_mem->size, -+ nouveau_bo_tile_layout(nvbo), - offset); - if (ret) - return ret; - - } else if (dev_priv->card_type >= NV_10) { - *new_tile = nv10_mem_set_tiling(dev, offset, new_mem->size, -- nvbo->tile_mode); -+ nvbo->tile_mode, -+ nvbo->tile_flags); - } - - return 0; -@@ -697,9 +807,7 @@ - - if (dev_priv->card_type >= NV_10 && - dev_priv->card_type < NV_50) { -- if (*old_tile) -- nv10_mem_expire_tiling(dev, *old_tile, bo->sync_obj); -- -+ nv10_mem_put_tile_region(dev, *old_tile, bo->sync_obj); - *old_tile = new_tile; - } - } -@@ -719,12 +827,6 @@ - if (ret) - return ret; - -- /* Software copy if the card isn't up and running yet. */ -- if (!dev_priv->channel) { -- ret = ttm_bo_move_memcpy(bo, evict, no_wait_reserve, no_wait_gpu, new_mem); -- goto out; -- } -- - /* Fake bo copy. */ - if (old_mem->mem_type == TTM_PL_SYSTEM && !bo->ttm) { - BUG_ON(bo->mem.mm_node != NULL); -@@ -733,6 +835,12 @@ - goto out; - } - -+ /* Software copy if the card isn't up and running yet. */ -+ if (!dev_priv->channel) { -+ ret = ttm_bo_move_memcpy(bo, evict, no_wait_reserve, no_wait_gpu, new_mem); -+ goto out; -+ } -+ - /* Hardware assisted copy. */ - if (new_mem->mem_type == TTM_PL_SYSTEM) - ret = nouveau_bo_move_flipd(bo, evict, intr, no_wait_reserve, no_wait_gpu, new_mem); -@@ -783,14 +891,14 @@ - case TTM_PL_TT: - #if __OS_HAS_AGP - if (dev_priv->gart_info.type == NOUVEAU_GART_AGP) { -- mem->bus.offset = mem->mm_node->start << PAGE_SHIFT; -+ mem->bus.offset = mem->start << PAGE_SHIFT; - mem->bus.base = dev_priv->gart_info.aper_base; - mem->bus.is_iomem = true; - } - #endif - break; - case TTM_PL_VRAM: -- mem->bus.offset = mem->mm_node->start << PAGE_SHIFT; -+ mem->bus.offset = mem->start << PAGE_SHIFT; - mem->bus.base = pci_resource_start(dev->pdev, 1); - mem->bus.is_iomem = true; - break; -@@ -808,7 +916,43 @@ - static int - nouveau_ttm_fault_reserve_notify(struct ttm_buffer_object *bo) - { -- return 0; -+ struct drm_nouveau_private *dev_priv = nouveau_bdev(bo->bdev); -+ struct nouveau_bo *nvbo = nouveau_bo(bo); -+ -+ /* as long as the bo isn't in vram, and isn't tiled, we've got -+ * nothing to do here. -+ */ -+ if (bo->mem.mem_type != TTM_PL_VRAM) { -+ if (dev_priv->card_type < NV_50 || -+ !nouveau_bo_tile_layout(nvbo)) -+ return 0; -+ } -+ -+ /* make sure bo is in mappable vram */ -+ if (bo->mem.start + bo->mem.num_pages < dev_priv->fb_mappable_pages) -+ return 0; -+ -+ -+ nvbo->placement.fpfn = 0; -+ nvbo->placement.lpfn = dev_priv->fb_mappable_pages; -+ nouveau_bo_placement_set(nvbo, TTM_PL_VRAM, 0); -+ return ttm_bo_validate(bo, &nvbo->placement, false, true, false); -+} -+ -+void -+nouveau_bo_fence(struct nouveau_bo *nvbo, struct nouveau_fence *fence) -+{ -+ struct nouveau_fence *old_fence; -+ -+ if (likely(fence)) -+ nouveau_fence_ref(fence); -+ -+ spin_lock(&nvbo->bo.lock); -+ old_fence = nvbo->bo.sync_obj; -+ nvbo->bo.sync_obj = fence; -+ spin_unlock(&nvbo->bo.lock); -+ -+ nouveau_fence_unref(&old_fence); - } - - struct ttm_bo_driver nouveau_bo_driver = { -@@ -818,11 +962,11 @@ - .evict_flags = nouveau_bo_evict_flags, - .move = nouveau_bo_move, - .verify_access = nouveau_bo_verify_access, -- .sync_obj_signaled = nouveau_fence_signalled, -- .sync_obj_wait = nouveau_fence_wait, -- .sync_obj_flush = nouveau_fence_flush, -- .sync_obj_unref = nouveau_fence_unref, -- .sync_obj_ref = nouveau_fence_ref, -+ .sync_obj_signaled = __nouveau_fence_signalled, -+ .sync_obj_wait = __nouveau_fence_wait, -+ .sync_obj_flush = __nouveau_fence_flush, -+ .sync_obj_unref = __nouveau_fence_unref, -+ .sync_obj_ref = __nouveau_fence_ref, - .fault_reserve_notify = &nouveau_ttm_fault_reserve_notify, - .io_mem_reserve = &nouveau_ttm_io_mem_reserve, - .io_mem_free = &nouveau_ttm_io_mem_free, -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_calc.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_calc.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_calc.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_calc.c 2010-10-30 22:24:25.000000000 +0200 -@@ -198,8 +198,8 @@ - struct drm_nouveau_private *dev_priv = dev->dev_private; - struct nv_fifo_info fifo_data; - struct nv_sim_state sim_data; -- int MClk = nouveau_hw_get_clock(dev, MPLL); -- int NVClk = nouveau_hw_get_clock(dev, NVPLL); -+ int MClk = nouveau_hw_get_clock(dev, PLL_MEMORY); -+ int NVClk = nouveau_hw_get_clock(dev, PLL_CORE); - uint32_t cfg1 = nvReadFB(dev, NV04_PFB_CFG1); - - sim_data.pclk_khz = VClk; -@@ -234,7 +234,7 @@ - } - - static void --nv30_update_arb(int *burst, int *lwm) -+nv20_update_arb(int *burst, int *lwm) - { - unsigned int fifo_size, burst_size, graphics_lwm; - -@@ -251,14 +251,14 @@ - { - struct drm_nouveau_private *dev_priv = dev->dev_private; - -- if (dev_priv->card_type < NV_30) -+ if (dev_priv->card_type < NV_20) - nv04_update_arb(dev, vclk, bpp, burst, lwm); - else if ((dev->pci_device & 0xfff0) == 0x0240 /*CHIPSET_C51*/ || - (dev->pci_device & 0xfff0) == 0x03d0 /*CHIPSET_C512*/) { - *burst = 128; - *lwm = 0x0480; - } else -- nv30_update_arb(burst, lwm); -+ nv20_update_arb(burst, lwm); - } - - static int -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_channel.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_channel.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_channel.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_channel.c 2010-10-30 22:24:25.000000000 +0200 -@@ -48,14 +48,14 @@ - dev_priv->gart_info.aper_size, - NV_DMA_ACCESS_RO, &pushbuf, - NULL); -- chan->pushbuf_base = pb->bo.mem.mm_node->start << PAGE_SHIFT; -+ chan->pushbuf_base = pb->bo.mem.start << PAGE_SHIFT; - } else - if (dev_priv->card_type != NV_04) { - ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, 0, - dev_priv->fb_available_size, - NV_DMA_ACCESS_RO, - NV_DMA_TARGET_VIDMEM, &pushbuf); -- chan->pushbuf_base = pb->bo.mem.mm_node->start << PAGE_SHIFT; -+ chan->pushbuf_base = pb->bo.mem.start << PAGE_SHIFT; - } else { - /* NV04 cmdbuf hack, from original ddx.. not sure of it's - * exact reason for existing :) PCI access to cmdbuf in -@@ -67,17 +67,11 @@ - dev_priv->fb_available_size, - NV_DMA_ACCESS_RO, - NV_DMA_TARGET_PCI, &pushbuf); -- chan->pushbuf_base = pb->bo.mem.mm_node->start << PAGE_SHIFT; -- } -- -- ret = nouveau_gpuobj_ref_add(dev, chan, 0, pushbuf, &chan->pushbuf); -- if (ret) { -- NV_ERROR(dev, "Error referencing pushbuf ctxdma: %d\n", ret); -- if (pushbuf != dev_priv->gart_info.sg_ctxdma) -- nouveau_gpuobj_del(dev, &pushbuf); -- return ret; -+ chan->pushbuf_base = pb->bo.mem.start << PAGE_SHIFT; - } - -+ nouveau_gpuobj_ref(pushbuf, &chan->pushbuf); -+ nouveau_gpuobj_ref(NULL, &pushbuf); - return 0; - } - -@@ -113,53 +107,56 @@ - int - nouveau_channel_alloc(struct drm_device *dev, struct nouveau_channel **chan_ret, - struct drm_file *file_priv, -- uint32_t vram_handle, uint32_t tt_handle) -+ uint32_t vram_handle, uint32_t gart_handle) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; - struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; - struct nouveau_fifo_engine *pfifo = &dev_priv->engine.fifo; - struct nouveau_channel *chan; -- int channel, user; -- int ret; -+ unsigned long flags; -+ int user, ret; - -- /* -- * Alright, here is the full story -- * Nvidia cards have multiple hw fifo contexts (praise them for that, -- * no complicated crash-prone context switches) -- * We allocate a new context for each app and let it write to it -- * directly (woo, full userspace command submission !) -- * When there are no more contexts, you lost -- */ -- for (channel = 0; channel < pfifo->channels; channel++) { -- if (dev_priv->fifos[channel] == NULL) -+ /* allocate and lock channel structure */ -+ chan = kzalloc(sizeof(*chan), GFP_KERNEL); -+ if (!chan) -+ return -ENOMEM; -+ chan->dev = dev; -+ chan->file_priv = file_priv; -+ chan->vram_handle = vram_handle; -+ chan->gart_handle = gart_handle; -+ -+ kref_init(&chan->ref); -+ atomic_set(&chan->users, 1); -+ mutex_init(&chan->mutex); -+ mutex_lock(&chan->mutex); -+ -+ /* allocate hw channel id */ -+ spin_lock_irqsave(&dev_priv->channels.lock, flags); -+ for (chan->id = 0; chan->id < pfifo->channels; chan->id++) { -+ if (!dev_priv->channels.ptr[chan->id]) { -+ nouveau_channel_ref(chan, &dev_priv->channels.ptr[chan->id]); - break; -+ } - } -+ spin_unlock_irqrestore(&dev_priv->channels.lock, flags); - -- /* no more fifos. you lost. */ -- if (channel == pfifo->channels) -- return -EINVAL; -+ if (chan->id == pfifo->channels) { -+ mutex_unlock(&chan->mutex); -+ kfree(chan); -+ return -ENODEV; -+ } - -- dev_priv->fifos[channel] = kzalloc(sizeof(struct nouveau_channel), -- GFP_KERNEL); -- if (!dev_priv->fifos[channel]) -- return -ENOMEM; -- chan = dev_priv->fifos[channel]; -+ NV_DEBUG(dev, "initialising channel %d\n", chan->id); - INIT_LIST_HEAD(&chan->nvsw.vbl_wait); -+ INIT_LIST_HEAD(&chan->nvsw.flip); - INIT_LIST_HEAD(&chan->fence.pending); -- chan->dev = dev; -- chan->id = channel; -- chan->file_priv = file_priv; -- chan->vram_handle = vram_handle; -- chan->gart_handle = tt_handle; -- -- NV_INFO(dev, "Allocating FIFO number %d\n", channel); - - /* Allocate DMA push buffer */ - chan->pushbuf_bo = nouveau_channel_user_pushbuf_alloc(dev); - if (!chan->pushbuf_bo) { - ret = -ENOMEM; - NV_ERROR(dev, "pushbuf %d\n", ret); -- nouveau_channel_free(chan); -+ nouveau_channel_put(&chan); - return ret; - } - -@@ -167,18 +164,18 @@ - - /* Locate channel's user control regs */ - if (dev_priv->card_type < NV_40) -- user = NV03_USER(channel); -+ user = NV03_USER(chan->id); - else - if (dev_priv->card_type < NV_50) -- user = NV40_USER(channel); -+ user = NV40_USER(chan->id); - else -- user = NV50_USER(channel); -+ user = NV50_USER(chan->id); - - chan->user = ioremap(pci_resource_start(dev->pdev, 0) + user, - PAGE_SIZE); - if (!chan->user) { - NV_ERROR(dev, "ioremap of regs failed.\n"); -- nouveau_channel_free(chan); -+ nouveau_channel_put(&chan); - return -ENOMEM; - } - chan->user_put = 0x40; -@@ -188,15 +185,15 @@ - ret = nouveau_notifier_init_channel(chan); - if (ret) { - NV_ERROR(dev, "ntfy %d\n", ret); -- nouveau_channel_free(chan); -+ nouveau_channel_put(&chan); - return ret; - } - - /* Setup channel's default objects */ -- ret = nouveau_gpuobj_channel_init(chan, vram_handle, tt_handle); -+ ret = nouveau_gpuobj_channel_init(chan, vram_handle, gart_handle); - if (ret) { - NV_ERROR(dev, "gpuobj %d\n", ret); -- nouveau_channel_free(chan); -+ nouveau_channel_put(&chan); - return ret; - } - -@@ -204,7 +201,7 @@ - ret = nouveau_channel_pushbuf_ctxdma_init(chan); - if (ret) { - NV_ERROR(dev, "pbctxdma %d\n", ret); -- nouveau_channel_free(chan); -+ nouveau_channel_put(&chan); - return ret; - } - -@@ -212,16 +209,18 @@ - pfifo->reassign(dev, false); - - /* Create a graphics context for new channel */ -- ret = pgraph->create_context(chan); -- if (ret) { -- nouveau_channel_free(chan); -- return ret; -+ if (dev_priv->card_type < NV_50) { -+ ret = pgraph->create_context(chan); -+ if (ret) { -+ nouveau_channel_put(&chan); -+ return ret; -+ } - } - - /* Construct inital RAMFC for new channel */ - ret = pfifo->create_context(chan); - if (ret) { -- nouveau_channel_free(chan); -+ nouveau_channel_put(&chan); - return ret; - } - -@@ -229,130 +228,187 @@ - - ret = nouveau_dma_init(chan); - if (!ret) -- ret = nouveau_fence_init(chan); -+ ret = nouveau_fence_channel_init(chan); - if (ret) { -- nouveau_channel_free(chan); -+ nouveau_channel_put(&chan); - return ret; - } - - nouveau_debugfs_channel_init(chan); - -- NV_INFO(dev, "%s: initialised FIFO %d\n", __func__, channel); -+ NV_DEBUG(dev, "channel %d initialised\n", chan->id); - *chan_ret = chan; - return 0; - } - --/* stops a fifo */ -+struct nouveau_channel * -+nouveau_channel_get_unlocked(struct nouveau_channel *ref) -+{ -+ struct nouveau_channel *chan = NULL; -+ -+ if (likely(ref && atomic_inc_not_zero(&ref->users))) -+ nouveau_channel_ref(ref, &chan); -+ -+ return chan; -+} -+ -+struct nouveau_channel * -+nouveau_channel_get(struct drm_device *dev, struct drm_file *file_priv, int id) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_channel *chan; -+ unsigned long flags; -+ -+ spin_lock_irqsave(&dev_priv->channels.lock, flags); -+ chan = nouveau_channel_get_unlocked(dev_priv->channels.ptr[id]); -+ spin_unlock_irqrestore(&dev_priv->channels.lock, flags); -+ -+ if (unlikely(!chan)) -+ return ERR_PTR(-EINVAL); -+ -+ if (unlikely(file_priv && chan->file_priv != file_priv)) { -+ nouveau_channel_put_unlocked(&chan); -+ return ERR_PTR(-EINVAL); -+ } -+ -+ mutex_lock(&chan->mutex); -+ return chan; -+} -+ - void --nouveau_channel_free(struct nouveau_channel *chan) -+nouveau_channel_put_unlocked(struct nouveau_channel **pchan) - { -+ struct nouveau_channel *chan = *pchan; - struct drm_device *dev = chan->dev; - struct drm_nouveau_private *dev_priv = dev->dev_private; -- struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; - struct nouveau_fifo_engine *pfifo = &dev_priv->engine.fifo; -+ struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; -+ struct nouveau_crypt_engine *pcrypt = &dev_priv->engine.crypt; - unsigned long flags; - int ret; - -- NV_INFO(dev, "%s: freeing fifo %d\n", __func__, chan->id); -+ /* decrement the refcount, and we're done if there's still refs */ -+ if (likely(!atomic_dec_and_test(&chan->users))) { -+ nouveau_channel_ref(NULL, pchan); -+ return; -+ } - -+ /* noone wants the channel anymore */ -+ NV_DEBUG(dev, "freeing channel %d\n", chan->id); - nouveau_debugfs_channel_fini(chan); - -- /* Give outstanding push buffers a chance to complete */ -+ /* give it chance to idle */ - nouveau_fence_update(chan); - if (chan->fence.sequence != chan->fence.sequence_ack) { - struct nouveau_fence *fence = NULL; - - ret = nouveau_fence_new(chan, &fence, true); - if (ret == 0) { -- ret = nouveau_fence_wait(fence, NULL, false, false); -- nouveau_fence_unref((void *)&fence); -+ ret = nouveau_fence_wait(fence, false, false); -+ nouveau_fence_unref(&fence); - } - - if (ret) - NV_ERROR(dev, "Failed to idle channel %d.\n", chan->id); - } - -- /* Ensure all outstanding fences are signaled. They should be if the -+ /* ensure all outstanding fences are signaled. they should be if the - * above attempts at idling were OK, but if we failed this'll tell TTM - * we're done with the buffers. - */ -- nouveau_fence_fini(chan); -+ nouveau_fence_channel_fini(chan); - -- /* This will prevent pfifo from switching channels. */ -+ /* boot it off the hardware */ - pfifo->reassign(dev, false); - -- /* We want to give pgraph a chance to idle and get rid of all potential -- * errors. We need to do this before the lock, otherwise the irq handler -- * is unable to process them. -+ /* We want to give pgraph a chance to idle and get rid of all -+ * potential errors. We need to do this without the context -+ * switch lock held, otherwise the irq handler is unable to -+ * process them. - */ - if (pgraph->channel(dev) == chan) - nouveau_wait_for_idle(dev); - -- spin_lock_irqsave(&dev_priv->context_switch_lock, flags); -- -- pgraph->fifo_access(dev, false); -- if (pgraph->channel(dev) == chan) -- pgraph->unload_context(dev); -- pgraph->destroy_context(chan); -- pgraph->fifo_access(dev, true); -- -- if (pfifo->channel_id(dev) == chan->id) { -- pfifo->disable(dev); -- pfifo->unload_context(dev); -- pfifo->enable(dev); -- } -+ /* destroy the engine specific contexts */ - pfifo->destroy_context(chan); -+ pgraph->destroy_context(chan); -+ if (pcrypt->destroy_context) -+ pcrypt->destroy_context(chan); - - pfifo->reassign(dev, true); - -- spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); -+ /* aside from its resources, the channel should now be dead, -+ * remove it from the channel list -+ */ -+ spin_lock_irqsave(&dev_priv->channels.lock, flags); -+ nouveau_channel_ref(NULL, &dev_priv->channels.ptr[chan->id]); -+ spin_unlock_irqrestore(&dev_priv->channels.lock, flags); - -- /* Release the channel's resources */ -- nouveau_gpuobj_ref_del(dev, &chan->pushbuf); -+ /* destroy any resources the channel owned */ -+ nouveau_gpuobj_ref(NULL, &chan->pushbuf); - if (chan->pushbuf_bo) { -+ nouveau_bo_unmap(chan->pushbuf_bo); - nouveau_bo_unpin(chan->pushbuf_bo); - nouveau_bo_ref(NULL, &chan->pushbuf_bo); - } - nouveau_gpuobj_channel_takedown(chan); - nouveau_notifier_takedown_channel(chan); -+ -+ nouveau_channel_ref(NULL, pchan); -+} -+ -+void -+nouveau_channel_put(struct nouveau_channel **pchan) -+{ -+ mutex_unlock(&(*pchan)->mutex); -+ nouveau_channel_put_unlocked(pchan); -+} -+ -+static void -+nouveau_channel_del(struct kref *ref) -+{ -+ struct nouveau_channel *chan = -+ container_of(ref, struct nouveau_channel, ref); -+ - if (chan->user) - iounmap(chan->user); - -- dev_priv->fifos[chan->id] = NULL; - kfree(chan); - } - -+void -+nouveau_channel_ref(struct nouveau_channel *chan, -+ struct nouveau_channel **pchan) -+{ -+ if (chan) -+ kref_get(&chan->ref); -+ -+ if (*pchan) -+ kref_put(&(*pchan)->ref, nouveau_channel_del); -+ -+ *pchan = chan; -+} -+ - /* cleans up all the fifos from file_priv */ - void - nouveau_channel_cleanup(struct drm_device *dev, struct drm_file *file_priv) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; - struct nouveau_engine *engine = &dev_priv->engine; -+ struct nouveau_channel *chan; - int i; - - NV_DEBUG(dev, "clearing FIFO enables from file_priv\n"); - for (i = 0; i < engine->fifo.channels; i++) { -- struct nouveau_channel *chan = dev_priv->fifos[i]; -+ chan = nouveau_channel_get(dev, file_priv, i); -+ if (IS_ERR(chan)) -+ continue; - -- if (chan && chan->file_priv == file_priv) -- nouveau_channel_free(chan); -+ atomic_dec(&chan->users); -+ nouveau_channel_put(&chan); - } - } - --int --nouveau_channel_owner(struct drm_device *dev, struct drm_file *file_priv, -- int channel) --{ -- struct drm_nouveau_private *dev_priv = dev->dev_private; -- struct nouveau_engine *engine = &dev_priv->engine; -- -- if (channel >= engine->fifo.channels) -- return 0; -- if (dev_priv->fifos[channel] == NULL) -- return 0; -- -- return (dev_priv->fifos[channel]->file_priv == file_priv); --} - - /*********************************** - * ioctls wrapping the functions -@@ -400,24 +456,26 @@ - /* Named memory object area */ - ret = drm_gem_handle_create(file_priv, chan->notifier_bo->gem, - &init->notifier_handle); -- if (ret) { -- nouveau_channel_free(chan); -- return ret; -- } - -- return 0; -+ if (ret == 0) -+ atomic_inc(&chan->users); /* userspace reference */ -+ nouveau_channel_put(&chan); -+ return ret; - } - - static int - nouveau_ioctl_fifo_free(struct drm_device *dev, void *data, - struct drm_file *file_priv) - { -- struct drm_nouveau_channel_free *cfree = data; -+ struct drm_nouveau_channel_free *req = data; - struct nouveau_channel *chan; - -- NOUVEAU_GET_USER_CHANNEL_WITH_RETURN(cfree->channel, file_priv, chan); -+ chan = nouveau_channel_get(dev, file_priv, req->channel); -+ if (IS_ERR(chan)) -+ return PTR_ERR(chan); - -- nouveau_channel_free(chan); -+ atomic_dec(&chan->users); -+ nouveau_channel_put(&chan); - return 0; - } - -@@ -426,18 +484,18 @@ - ***********************************/ - - struct drm_ioctl_desc nouveau_ioctls[] = { -- DRM_IOCTL_DEF_DRV(NOUVEAU_GETPARAM, nouveau_ioctl_getparam, DRM_AUTH), -- DRM_IOCTL_DEF_DRV(NOUVEAU_SETPARAM, nouveau_ioctl_setparam, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), -- DRM_IOCTL_DEF_DRV(NOUVEAU_CHANNEL_ALLOC, nouveau_ioctl_fifo_alloc, DRM_AUTH), -- DRM_IOCTL_DEF_DRV(NOUVEAU_CHANNEL_FREE, nouveau_ioctl_fifo_free, DRM_AUTH), -- DRM_IOCTL_DEF_DRV(NOUVEAU_GROBJ_ALLOC, nouveau_ioctl_grobj_alloc, DRM_AUTH), -- DRM_IOCTL_DEF_DRV(NOUVEAU_NOTIFIEROBJ_ALLOC, nouveau_ioctl_notifier_alloc, DRM_AUTH), -- DRM_IOCTL_DEF_DRV(NOUVEAU_GPUOBJ_FREE, nouveau_ioctl_gpuobj_free, DRM_AUTH), -- DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_NEW, nouveau_gem_ioctl_new, DRM_AUTH), -- DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_PUSHBUF, nouveau_gem_ioctl_pushbuf, DRM_AUTH), -- DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_CPU_PREP, nouveau_gem_ioctl_cpu_prep, DRM_AUTH), -- DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_CPU_FINI, nouveau_gem_ioctl_cpu_fini, DRM_AUTH), -- DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_INFO, nouveau_gem_ioctl_info, DRM_AUTH), -+ DRM_IOCTL_DEF_DRV(NOUVEAU_GETPARAM, nouveau_ioctl_getparam, DRM_UNLOCKED|DRM_AUTH), -+ DRM_IOCTL_DEF_DRV(NOUVEAU_SETPARAM, nouveau_ioctl_setparam, DRM_UNLOCKED|DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), -+ DRM_IOCTL_DEF_DRV(NOUVEAU_CHANNEL_ALLOC, nouveau_ioctl_fifo_alloc, DRM_UNLOCKED|DRM_AUTH), -+ DRM_IOCTL_DEF_DRV(NOUVEAU_CHANNEL_FREE, nouveau_ioctl_fifo_free, DRM_UNLOCKED|DRM_AUTH), -+ DRM_IOCTL_DEF_DRV(NOUVEAU_GROBJ_ALLOC, nouveau_ioctl_grobj_alloc, DRM_UNLOCKED|DRM_AUTH), -+ DRM_IOCTL_DEF_DRV(NOUVEAU_NOTIFIEROBJ_ALLOC, nouveau_ioctl_notifier_alloc, DRM_UNLOCKED|DRM_AUTH), -+ DRM_IOCTL_DEF_DRV(NOUVEAU_GPUOBJ_FREE, nouveau_ioctl_gpuobj_free, DRM_UNLOCKED|DRM_AUTH), -+ DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_NEW, nouveau_gem_ioctl_new, DRM_UNLOCKED|DRM_AUTH), -+ DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_PUSHBUF, nouveau_gem_ioctl_pushbuf, DRM_UNLOCKED|DRM_AUTH), -+ DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_CPU_PREP, nouveau_gem_ioctl_cpu_prep, DRM_UNLOCKED|DRM_AUTH), -+ DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_CPU_FINI, nouveau_gem_ioctl_cpu_fini, DRM_UNLOCKED|DRM_AUTH), -+ DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_INFO, nouveau_gem_ioctl_info, DRM_UNLOCKED|DRM_AUTH), - }; - - int nouveau_max_ioctl = DRM_ARRAY_SIZE(nouveau_ioctls); -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_connector.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_connector.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_connector.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_connector.c 2010-10-30 22:24:25.000000000 +0200 -@@ -76,6 +76,22 @@ - return NULL; - } - -+/*TODO: This could use improvement, and learn to handle the fixed -+ * BIOS tables etc. It's fine currently, for its only user. -+ */ -+int -+nouveau_connector_bpp(struct drm_connector *connector) -+{ -+ struct nouveau_connector *nv_connector = nouveau_connector(connector); -+ -+ if (nv_connector->edid && nv_connector->edid->revision >= 4) { -+ u8 bpc = ((nv_connector->edid->input & 0x70) >> 3) + 4; -+ if (bpc > 4) -+ return bpc; -+ } -+ -+ return 18; -+} - - static void - nouveau_connector_destroy(struct drm_connector *drm_connector) -@@ -130,6 +146,36 @@ - return NULL; - } - -+static struct nouveau_encoder * -+nouveau_connector_of_detect(struct drm_connector *connector) -+{ -+#ifdef __powerpc__ -+ struct drm_device *dev = connector->dev; -+ struct nouveau_connector *nv_connector = nouveau_connector(connector); -+ struct nouveau_encoder *nv_encoder; -+ struct device_node *cn, *dn = pci_device_to_OF_node(dev->pdev); -+ -+ if (!dn || -+ !((nv_encoder = find_encoder_by_type(connector, OUTPUT_TMDS)) || -+ (nv_encoder = find_encoder_by_type(connector, OUTPUT_ANALOG)))) -+ return NULL; -+ -+ for_each_child_of_node(dn, cn) { -+ const char *name = of_get_property(cn, "name", NULL); -+ const void *edid = of_get_property(cn, "EDID", NULL); -+ int idx = name ? name[strlen(name) - 1] - 'A' : 0; -+ -+ if (nv_encoder->dcb->i2c_index == idx && edid) { -+ nv_connector->edid = -+ kmemdup(edid, EDID_LENGTH, GFP_KERNEL); -+ of_node_put(cn); -+ return nv_encoder; -+ } -+ } -+#endif -+ return NULL; -+} -+ - static void - nouveau_connector_set_encoder(struct drm_connector *connector, - struct nouveau_encoder *nv_encoder) -@@ -225,11 +271,17 @@ - return connector_status_connected; - } - -+ nv_encoder = nouveau_connector_of_detect(connector); -+ if (nv_encoder) { -+ nouveau_connector_set_encoder(connector, nv_encoder); -+ return connector_status_connected; -+ } -+ - detect_analog: - nv_encoder = find_encoder_by_type(connector, OUTPUT_ANALOG); - if (!nv_encoder && !nouveau_tv_disable) - nv_encoder = find_encoder_by_type(connector, OUTPUT_TV); -- if (nv_encoder) { -+ if (nv_encoder && force) { - struct drm_encoder *encoder = to_drm_encoder(nv_encoder); - struct drm_encoder_helper_funcs *helper = - encoder->helper_private; -@@ -589,11 +641,28 @@ - return ret; - } - -+static unsigned -+get_tmds_link_bandwidth(struct drm_connector *connector) -+{ -+ struct nouveau_connector *nv_connector = nouveau_connector(connector); -+ struct drm_nouveau_private *dev_priv = connector->dev->dev_private; -+ struct dcb_entry *dcb = nv_connector->detected_encoder->dcb; -+ -+ if (dcb->location != DCB_LOC_ON_CHIP || -+ dev_priv->chipset >= 0x46) -+ return 165000; -+ else if (dev_priv->chipset >= 0x40) -+ return 155000; -+ else if (dev_priv->chipset >= 0x18) -+ return 135000; -+ else -+ return 112000; -+} -+ - static int - nouveau_connector_mode_valid(struct drm_connector *connector, - struct drm_display_mode *mode) - { -- struct drm_nouveau_private *dev_priv = connector->dev->dev_private; - struct nouveau_connector *nv_connector = nouveau_connector(connector); - struct nouveau_encoder *nv_encoder = nv_connector->detected_encoder; - struct drm_encoder *encoder = to_drm_encoder(nv_encoder); -@@ -611,11 +680,9 @@ - max_clock = 400000; - break; - case OUTPUT_TMDS: -- if ((dev_priv->card_type >= NV_50 && !nouveau_duallink) || -- !nv_encoder->dcb->duallink_possible) -- max_clock = 165000; -- else -- max_clock = 330000; -+ max_clock = get_tmds_link_bandwidth(connector); -+ if (nouveau_duallink && nv_encoder->dcb->duallink_possible) -+ max_clock *= 2; - break; - case OUTPUT_ANALOG: - max_clock = nv_encoder->dcb->crtconf.maxfreq; -@@ -630,7 +697,7 @@ - else - max_clock = nv_encoder->dp.link_nr * 162000; - -- clock *= 3; -+ clock = clock * nouveau_connector_bpp(connector) / 8; - break; - default: - BUG_ON(1); -@@ -657,44 +724,6 @@ - return NULL; - } - --void --nouveau_connector_set_polling(struct drm_connector *connector) --{ -- struct drm_device *dev = connector->dev; -- struct drm_nouveau_private *dev_priv = dev->dev_private; -- struct drm_crtc *crtc; -- bool spare_crtc = false; -- -- list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) -- spare_crtc |= !crtc->enabled; -- -- connector->polled = 0; -- -- switch (connector->connector_type) { -- case DRM_MODE_CONNECTOR_VGA: -- case DRM_MODE_CONNECTOR_TV: -- if (dev_priv->card_type >= NV_50 || -- (nv_gf4_disp_arch(dev) && spare_crtc)) -- connector->polled = DRM_CONNECTOR_POLL_CONNECT; -- break; -- -- case DRM_MODE_CONNECTOR_DVII: -- case DRM_MODE_CONNECTOR_DVID: -- case DRM_MODE_CONNECTOR_HDMIA: -- case DRM_MODE_CONNECTOR_DisplayPort: -- case DRM_MODE_CONNECTOR_eDP: -- if (dev_priv->card_type >= NV_50) -- connector->polled = DRM_CONNECTOR_POLL_HPD; -- else if (connector->connector_type == DRM_MODE_CONNECTOR_DVID || -- spare_crtc) -- connector->polled = DRM_CONNECTOR_POLL_CONNECT; -- break; -- -- default: -- break; -- } --} -- - static const struct drm_connector_helper_funcs - nouveau_connector_helper_funcs = { - .get_modes = nouveau_connector_get_modes, -@@ -820,6 +849,7 @@ - dev->mode_config.scaling_mode_property, - nv_connector->scaling_mode); - } -+ connector->polled = DRM_CONNECTOR_POLL_CONNECT; - /* fall-through */ - case DCB_CONNECTOR_TV_0: - case DCB_CONNECTOR_TV_1: -@@ -836,11 +866,16 @@ - dev->mode_config.dithering_mode_property, - nv_connector->use_dithering ? - DRM_MODE_DITHERING_ON : DRM_MODE_DITHERING_OFF); -+ -+ if (dcb->type != DCB_CONNECTOR_LVDS) { -+ if (dev_priv->card_type >= NV_50) -+ connector->polled = DRM_CONNECTOR_POLL_HPD; -+ else -+ connector->polled = DRM_CONNECTOR_POLL_CONNECT; -+ } - break; - } - -- nouveau_connector_set_polling(connector); -- - drm_sysfs_connector_add(connector); - dcb->drm = connector; - return dcb->drm; -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_connector.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_connector.h ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_connector.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_connector.h 2010-10-30 22:24:25.000000000 +0200 -@@ -52,7 +52,7 @@ - struct drm_connector * - nouveau_connector_create(struct drm_device *, int index); - --void --nouveau_connector_set_polling(struct drm_connector *); -+int -+nouveau_connector_bpp(struct drm_connector *); - - #endif /* __NOUVEAU_CONNECTOR_H__ */ -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_debugfs.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_debugfs.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_debugfs.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_debugfs.c 2010-10-30 22:24:25.000000000 +0200 -@@ -157,7 +157,23 @@ - return 0; - } - -+static int -+nouveau_debugfs_evict_vram(struct seq_file *m, void *data) -+{ -+ struct drm_info_node *node = (struct drm_info_node *) m->private; -+ struct drm_nouveau_private *dev_priv = node->minor->dev->dev_private; -+ int ret; -+ -+ ret = ttm_bo_evict_mm(&dev_priv->ttm.bdev, TTM_PL_VRAM); -+ if (ret) -+ seq_printf(m, "failed: %d", ret); -+ else -+ seq_printf(m, "succeeded\n"); -+ return 0; -+} -+ - static struct drm_info_list nouveau_debugfs_list[] = { -+ { "evict_vram", nouveau_debugfs_evict_vram, 0, NULL }, - { "chipset", nouveau_debugfs_chipset_info, 0, NULL }, - { "memory", nouveau_debugfs_memory_info, 0, NULL }, - { "vbios.rom", nouveau_debugfs_vbios_image, 0, NULL }, -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_display.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_display.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_display.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_display.c 2010-10-30 22:24:25.000000000 +0200 -@@ -29,6 +29,9 @@ - #include "nouveau_drv.h" - #include "nouveau_fb.h" - #include "nouveau_fbcon.h" -+#include "nouveau_hw.h" -+#include "nouveau_crtc.h" -+#include "nouveau_dma.h" - - static void - nouveau_user_framebuffer_destroy(struct drm_framebuffer *drm_fb) -@@ -104,3 +107,207 @@ - .output_poll_changed = nouveau_fbcon_output_poll_changed, - }; - -+int -+nouveau_vblank_enable(struct drm_device *dev, int crtc) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ -+ if (dev_priv->card_type >= NV_50) -+ nv_mask(dev, NV50_PDISPLAY_INTR_EN_1, 0, -+ NV50_PDISPLAY_INTR_EN_1_VBLANK_CRTC_(crtc)); -+ else -+ NVWriteCRTC(dev, crtc, NV_PCRTC_INTR_EN_0, -+ NV_PCRTC_INTR_0_VBLANK); -+ -+ return 0; -+} -+ -+void -+nouveau_vblank_disable(struct drm_device *dev, int crtc) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ -+ if (dev_priv->card_type >= NV_50) -+ nv_mask(dev, NV50_PDISPLAY_INTR_EN_1, -+ NV50_PDISPLAY_INTR_EN_1_VBLANK_CRTC_(crtc), 0); -+ else -+ NVWriteCRTC(dev, crtc, NV_PCRTC_INTR_EN_0, 0); -+} -+ -+static int -+nouveau_page_flip_reserve(struct nouveau_bo *old_bo, -+ struct nouveau_bo *new_bo) -+{ -+ int ret; -+ -+ ret = nouveau_bo_pin(new_bo, TTM_PL_FLAG_VRAM); -+ if (ret) -+ return ret; -+ -+ ret = ttm_bo_reserve(&new_bo->bo, false, false, false, 0); -+ if (ret) -+ goto fail; -+ -+ ret = ttm_bo_reserve(&old_bo->bo, false, false, false, 0); -+ if (ret) -+ goto fail_unreserve; -+ -+ return 0; -+ -+fail_unreserve: -+ ttm_bo_unreserve(&new_bo->bo); -+fail: -+ nouveau_bo_unpin(new_bo); -+ return ret; -+} -+ -+static void -+nouveau_page_flip_unreserve(struct nouveau_bo *old_bo, -+ struct nouveau_bo *new_bo, -+ struct nouveau_fence *fence) -+{ -+ nouveau_bo_fence(new_bo, fence); -+ ttm_bo_unreserve(&new_bo->bo); -+ -+ nouveau_bo_fence(old_bo, fence); -+ ttm_bo_unreserve(&old_bo->bo); -+ -+ nouveau_bo_unpin(old_bo); -+} -+ -+static int -+nouveau_page_flip_emit(struct nouveau_channel *chan, -+ struct nouveau_bo *old_bo, -+ struct nouveau_bo *new_bo, -+ struct nouveau_page_flip_state *s, -+ struct nouveau_fence **pfence) -+{ -+ struct drm_device *dev = chan->dev; -+ unsigned long flags; -+ int ret; -+ -+ /* Queue it to the pending list */ -+ spin_lock_irqsave(&dev->event_lock, flags); -+ list_add_tail(&s->head, &chan->nvsw.flip); -+ spin_unlock_irqrestore(&dev->event_lock, flags); -+ -+ /* Synchronize with the old framebuffer */ -+ ret = nouveau_fence_sync(old_bo->bo.sync_obj, chan); -+ if (ret) -+ goto fail; -+ -+ /* Emit the pageflip */ -+ ret = RING_SPACE(chan, 2); -+ if (ret) -+ goto fail; -+ -+ BEGIN_RING(chan, NvSubSw, NV_SW_PAGE_FLIP, 1); -+ OUT_RING(chan, 0); -+ FIRE_RING(chan); -+ -+ ret = nouveau_fence_new(chan, pfence, true); -+ if (ret) -+ goto fail; -+ -+ return 0; -+fail: -+ spin_lock_irqsave(&dev->event_lock, flags); -+ list_del(&s->head); -+ spin_unlock_irqrestore(&dev->event_lock, flags); -+ return ret; -+} -+ -+int -+nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, -+ struct drm_pending_vblank_event *event) -+{ -+ struct drm_device *dev = crtc->dev; -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_bo *old_bo = nouveau_framebuffer(crtc->fb)->nvbo; -+ struct nouveau_bo *new_bo = nouveau_framebuffer(fb)->nvbo; -+ struct nouveau_page_flip_state *s; -+ struct nouveau_channel *chan; -+ struct nouveau_fence *fence; -+ int ret; -+ -+ if (dev_priv->engine.graph.accel_blocked) -+ return -ENODEV; -+ -+ s = kzalloc(sizeof(*s), GFP_KERNEL); -+ if (!s) -+ return -ENOMEM; -+ -+ /* Don't let the buffers go away while we flip */ -+ ret = nouveau_page_flip_reserve(old_bo, new_bo); -+ if (ret) -+ goto fail_free; -+ -+ /* Initialize a page flip struct */ -+ *s = (struct nouveau_page_flip_state) -+ { { }, s->event, nouveau_crtc(crtc)->index, -+ fb->bits_per_pixel, fb->pitch, crtc->x, crtc->y, -+ new_bo->bo.offset }; -+ -+ /* Choose the channel the flip will be handled in */ -+ chan = nouveau_fence_channel(new_bo->bo.sync_obj); -+ if (!chan) -+ chan = nouveau_channel_get_unlocked(dev_priv->channel); -+ mutex_lock(&chan->mutex); -+ -+ /* Emit a page flip */ -+ ret = nouveau_page_flip_emit(chan, old_bo, new_bo, s, &fence); -+ nouveau_channel_put(&chan); -+ if (ret) -+ goto fail_unreserve; -+ -+ /* Update the crtc struct and cleanup */ -+ crtc->fb = fb; -+ -+ nouveau_page_flip_unreserve(old_bo, new_bo, fence); -+ nouveau_fence_unref(&fence); -+ return 0; -+ -+fail_unreserve: -+ nouveau_page_flip_unreserve(old_bo, new_bo, NULL); -+fail_free: -+ kfree(s); -+ return ret; -+} -+ -+int -+nouveau_finish_page_flip(struct nouveau_channel *chan, -+ struct nouveau_page_flip_state *ps) -+{ -+ struct drm_device *dev = chan->dev; -+ struct nouveau_page_flip_state *s; -+ unsigned long flags; -+ -+ spin_lock_irqsave(&dev->event_lock, flags); -+ -+ if (list_empty(&chan->nvsw.flip)) { -+ NV_ERROR(dev, "Unexpected pageflip in channel %d.\n", chan->id); -+ spin_unlock_irqrestore(&dev->event_lock, flags); -+ return -EINVAL; -+ } -+ -+ s = list_first_entry(&chan->nvsw.flip, -+ struct nouveau_page_flip_state, head); -+ if (s->event) { -+ struct drm_pending_vblank_event *e = s->event; -+ struct timeval now; -+ -+ do_gettimeofday(&now); -+ e->event.sequence = 0; -+ e->event.tv_sec = now.tv_sec; -+ e->event.tv_usec = now.tv_usec; -+ list_add_tail(&e->base.link, &e->base.file_priv->event_list); -+ wake_up_interruptible(&e->base.file_priv->event_wait); -+ } -+ -+ list_del(&s->head); -+ *ps = *s; -+ kfree(s); -+ -+ spin_unlock_irqrestore(&dev->event_lock, flags); -+ return 0; -+} -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_dma.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_dma.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_dma.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_dma.c 2010-10-30 22:24:25.000000000 +0200 -@@ -28,6 +28,7 @@ - #include "drm.h" - #include "nouveau_drv.h" - #include "nouveau_dma.h" -+#include "nouveau_ramht.h" - - void - nouveau_dma_pre_init(struct nouveau_channel *chan) -@@ -58,26 +59,17 @@ - { - struct drm_device *dev = chan->dev; - struct drm_nouveau_private *dev_priv = dev->dev_private; -- struct nouveau_gpuobj *m2mf = NULL; -- struct nouveau_gpuobj *nvsw = NULL; -+ struct nouveau_gpuobj *obj = NULL; - int ret, i; - - /* Create NV_MEMORY_TO_MEMORY_FORMAT for buffer moves */ - ret = nouveau_gpuobj_gr_new(chan, dev_priv->card_type < NV_50 ? -- 0x0039 : 0x5039, &m2mf); -+ 0x0039 : 0x5039, &obj); - if (ret) - return ret; - -- ret = nouveau_gpuobj_ref_add(dev, chan, NvM2MF, m2mf, NULL); -- if (ret) -- return ret; -- -- /* Create an NV_SW object for various sync purposes */ -- ret = nouveau_gpuobj_sw_new(chan, NV_SW, &nvsw); -- if (ret) -- return ret; -- -- ret = nouveau_gpuobj_ref_add(dev, chan, NvSw, nvsw, NULL); -+ ret = nouveau_ramht_insert(chan, NvM2MF, obj); -+ nouveau_gpuobj_ref(NULL, &obj); - if (ret) - return ret; - -@@ -91,11 +83,6 @@ - if (ret) - return ret; - -- /* Map M2MF notifier object - fbcon. */ -- ret = nouveau_bo_map(chan->notifier_bo); -- if (ret) -- return ret; -- - /* Insert NOPS for NOUVEAU_DMA_SKIPS */ - ret = RING_SPACE(chan, NOUVEAU_DMA_SKIPS); - if (ret) -@@ -113,13 +100,6 @@ - BEGIN_RING(chan, NvSubM2MF, NV_MEMORY_TO_MEMORY_FORMAT_DMA_NOTIFY, 1); - OUT_RING(chan, NvNotify0); - -- /* Initialise NV_SW */ -- ret = RING_SPACE(chan, 2); -- if (ret) -- return ret; -- BEGIN_RING(chan, NvSubSw, 0, 1); -- OUT_RING(chan, NvSw); -- - /* Sit back and pray the channel works.. */ - FIRE_RING(chan); - -@@ -217,7 +197,7 @@ - - chan->dma.ib_free = get - chan->dma.ib_put; - if (chan->dma.ib_free <= 0) -- chan->dma.ib_free += chan->dma.ib_max + 1; -+ chan->dma.ib_free += chan->dma.ib_max; - } - - return 0; -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_dma.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_dma.h ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_dma.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_dma.h 2010-10-30 22:24:25.000000000 +0200 -@@ -72,6 +72,7 @@ - NvGdiRect = 0x8000000c, - NvImageBlit = 0x8000000d, - NvSw = 0x8000000e, -+ NvSema = 0x8000000f, - - /* G80+ display objects */ - NvEvoVRAM = 0x01000000, -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_dp.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_dp.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_dp.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_dp.c 2010-10-30 22:24:25.000000000 +0200 -@@ -317,7 +317,8 @@ - return false; - - config[0] = nv_encoder->dp.link_nr; -- if (nv_encoder->dp.dpcd_version >= 0x11) -+ if (nv_encoder->dp.dpcd_version >= 0x11 && -+ nv_encoder->dp.enhanced_frame) - config[0] |= DP_LANE_COUNT_ENHANCED_FRAME_EN; - - ret = nouveau_dp_lane_count_set(encoder, config[0]); -@@ -468,10 +469,12 @@ - !nv_encoder->dcb->dpconf.link_bw) - nv_encoder->dp.link_bw = DP_LINK_BW_1_62; - -- nv_encoder->dp.link_nr = dpcd[2] & 0xf; -+ nv_encoder->dp.link_nr = dpcd[2] & DP_MAX_LANE_COUNT_MASK; - if (nv_encoder->dp.link_nr > nv_encoder->dcb->dpconf.link_nr) - nv_encoder->dp.link_nr = nv_encoder->dcb->dpconf.link_nr; - -+ nv_encoder->dp.enhanced_frame = (dpcd[2] & DP_ENHANCED_FRAME_CAP); -+ - return true; - } - -@@ -524,7 +527,8 @@ - nv_wr32(dev, NV50_AUXCH_CTRL(index), ctrl | 0x80000000); - nv_wr32(dev, NV50_AUXCH_CTRL(index), ctrl); - nv_wr32(dev, NV50_AUXCH_CTRL(index), ctrl | 0x00010000); -- if (!nv_wait(NV50_AUXCH_CTRL(index), 0x00010000, 0x00000000)) { -+ if (!nv_wait(dev, NV50_AUXCH_CTRL(index), -+ 0x00010000, 0x00000000)) { - NV_ERROR(dev, "expected bit 16 == 0, got 0x%08x\n", - nv_rd32(dev, NV50_AUXCH_CTRL(index))); - ret = -EBUSY; -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.c 2010-10-30 22:24:25.000000000 +0200 -@@ -31,13 +31,14 @@ - #include "nouveau_hw.h" - #include "nouveau_fb.h" - #include "nouveau_fbcon.h" -+#include "nouveau_pm.h" - #include "nv50_display.h" - - #include "drm_pciids.h" - --MODULE_PARM_DESC(noagp, "Disable AGP"); --int nouveau_noagp; --module_param_named(noagp, nouveau_noagp, int, 0400); -+MODULE_PARM_DESC(agpmode, "AGP mode (0 to disable AGP)"); -+int nouveau_agpmode = -1; -+module_param_named(agpmode, nouveau_agpmode, int, 0400); - - MODULE_PARM_DESC(modeset, "Enable kernel modesetting"); - static int nouveau_modeset = -1; /* kms */ -@@ -79,6 +80,10 @@ - int nouveau_nofbaccel = 0; - module_param_named(nofbaccel, nouveau_nofbaccel, int, 0400); - -+MODULE_PARM_DESC(force_post, "Force POST"); -+int nouveau_force_post = 0; -+module_param_named(force_post, nouveau_force_post, int, 0400); -+ - MODULE_PARM_DESC(override_conntype, "Ignore DCB connector type"); - int nouveau_override_conntype = 0; - module_param_named(override_conntype, nouveau_override_conntype, int, 0400); -@@ -102,6 +107,18 @@ - int nouveau_reg_debug; - module_param_named(reg_debug, nouveau_reg_debug, int, 0600); - -+MODULE_PARM_DESC(perflvl, "Performance level (default: boot)\n"); -+char *nouveau_perflvl; -+module_param_named(perflvl, nouveau_perflvl, charp, 0400); -+ -+MODULE_PARM_DESC(perflvl_wr, "Allow perflvl changes (warning: dangerous!)\n"); -+int nouveau_perflvl_wr; -+module_param_named(perflvl_wr, nouveau_perflvl_wr, int, 0400); -+ -+MODULE_PARM_DESC(msi, "Enable MSI (default: off)\n"); -+int nouveau_msi; -+module_param_named(msi, nouveau_msi, int, 0400); -+ - int nouveau_fbpercrtc; - #if 0 - module_param_named(fbpercrtc, nouveau_fbpercrtc, int, 0400); -@@ -182,15 +199,14 @@ - for (i = 0; i < pfifo->channels; i++) { - struct nouveau_fence *fence = NULL; - -- chan = dev_priv->fifos[i]; -- if (!chan || (dev_priv->card_type >= NV_50 && -- chan == dev_priv->fifos[0])) -+ chan = dev_priv->channels.ptr[i]; -+ if (!chan || !chan->pushbuf_bo) - continue; - - ret = nouveau_fence_new(chan, &fence, true); - if (ret == 0) { -- ret = nouveau_fence_wait(fence, NULL, false, false); -- nouveau_fence_unref((void *)&fence); -+ ret = nouveau_fence_wait(fence, false, false); -+ nouveau_fence_unref(&fence); - } - - if (ret) { -@@ -271,6 +287,8 @@ - if (ret) - return ret; - -+ nouveau_pm_resume(dev); -+ - if (dev_priv->gart_info.type == NOUVEAU_GART_AGP) { - ret = nouveau_mem_init_agp(dev); - if (ret) { -@@ -285,6 +303,7 @@ - engine->timer.init(dev); - engine->fb.init(dev); - engine->graph.init(dev); -+ engine->crypt.init(dev); - engine->fifo.init(dev); - - NV_INFO(dev, "Restoring GPU objects...\n"); -@@ -298,7 +317,7 @@ - int j; - - for (i = 0; i < dev_priv->engine.fifo.channels; i++) { -- chan = dev_priv->fifos[i]; -+ chan = dev_priv->channels.ptr[i]; - if (!chan || !chan->pushbuf_bo) - continue; - -@@ -378,6 +397,9 @@ - .irq_postinstall = nouveau_irq_postinstall, - .irq_uninstall = nouveau_irq_uninstall, - .irq_handler = nouveau_irq_handler, -+ .get_vblank_counter = drm_vblank_count, -+ .enable_vblank = nouveau_vblank_enable, -+ .disable_vblank = nouveau_vblank_disable, - .reclaim_buffers = drm_core_reclaim_buffers, - .get_map_ofs = drm_core_get_map_ofs, - .get_reg_ofs = drm_core_get_reg_ofs, -@@ -390,6 +412,7 @@ - .mmap = nouveau_ttm_mmap, - .poll = drm_poll, - .fasync = drm_fasync, -+ .read = drm_read, - #if defined(CONFIG_COMPAT) - .compat_ioctl = nouveau_compat_ioctl, - #endif -@@ -434,6 +457,12 @@ - if (!nouveau_modeset) - return 0; - -+#if defined(CONFIG_FRAMEBUFFER_CONSOLE_MODULE) -+ request_module("fbcon"); -+#elif !defined(CONFIG_FRAMEBUFFER_CONSOLE) -+ printk(KERN_INFO "CONFIG_FRAMEBUFFER_CONSOLE was not enabled. You won't get any console output.\n"); -+#endif -+ - nouveau_register_dsm_handler(); - return drm_init(&driver); - } -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.h ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_drv.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.h 2010-10-30 22:24:25.000000000 +0200 -@@ -66,10 +66,13 @@ - #define NV50_VM_VRAM_NR (NV50_VM_MAX_VRAM / NV50_VM_BLOCK) - - struct nouveau_tile_reg { -- struct nouveau_fence *fence; -- uint32_t addr; -- uint32_t size; - bool used; -+ uint32_t addr; -+ uint32_t limit; -+ uint32_t pitch; -+ uint32_t zcomp; -+ struct drm_mm_node *tag_mem; -+ struct nouveau_fence *fence; - }; - - struct nouveau_bo { -@@ -96,10 +99,12 @@ - struct nouveau_tile_reg *tile; - - struct drm_gem_object *gem; -- struct drm_file *cpu_filp; - int pin_refcnt; - }; - -+#define nouveau_bo_tile_layout(nvbo) \ -+ ((nvbo)->tile_flags & NOUVEAU_GEM_TILE_LAYOUT_MASK) -+ - static inline struct nouveau_bo * - nouveau_bo(struct ttm_buffer_object *bo) - { -@@ -130,25 +135,32 @@ - - #define NVOBJ_ENGINE_SW 0 - #define NVOBJ_ENGINE_GR 1 --#define NVOBJ_ENGINE_DISPLAY 2 -+#define NVOBJ_ENGINE_PPP 2 -+#define NVOBJ_ENGINE_COPY 3 -+#define NVOBJ_ENGINE_VP 4 -+#define NVOBJ_ENGINE_CRYPT 5 -+#define NVOBJ_ENGINE_BSP 6 -+#define NVOBJ_ENGINE_DISPLAY 0xcafe0001 - #define NVOBJ_ENGINE_INT 0xdeadbeef - --#define NVOBJ_FLAG_ALLOW_NO_REFS (1 << 0) - #define NVOBJ_FLAG_ZERO_ALLOC (1 << 1) - #define NVOBJ_FLAG_ZERO_FREE (1 << 2) --#define NVOBJ_FLAG_FAKE (1 << 3) - struct nouveau_gpuobj { -+ struct drm_device *dev; -+ struct kref refcount; - struct list_head list; - -- struct nouveau_channel *im_channel; - struct drm_mm_node *im_pramin; - struct nouveau_bo *im_backing; -- uint32_t im_backing_start; - uint32_t *im_backing_suspend; - int im_bound; - - uint32_t flags; -- int refcount; -+ -+ u32 size; -+ u32 pinst; -+ u32 cinst; -+ u64 vinst; - - uint32_t engine; - uint32_t class; -@@ -157,20 +169,29 @@ - void *priv; - }; - --struct nouveau_gpuobj_ref { -- struct list_head list; -- -- struct nouveau_gpuobj *gpuobj; -- uint32_t instance; -+struct nouveau_page_flip_state { -+ struct list_head head; -+ struct drm_pending_vblank_event *event; -+ int crtc, bpp, pitch, x, y; -+ uint64_t offset; -+}; - -- struct nouveau_channel *channel; -- int handle; -+enum nouveau_channel_mutex_class { -+ NOUVEAU_UCHANNEL_MUTEX, -+ NOUVEAU_KCHANNEL_MUTEX - }; - - struct nouveau_channel { - struct drm_device *dev; - int id; - -+ /* references to the channel data structure */ -+ struct kref ref; -+ /* users of the hardware channel resources, the hardware -+ * context will be kicked off when it reaches zero. */ -+ atomic_t users; -+ struct mutex mutex; -+ - /* owner of this fifo */ - struct drm_file *file_priv; - /* mapping of the fifo itself */ -@@ -192,33 +213,33 @@ - } fence; - - /* DMA push buffer */ -- struct nouveau_gpuobj_ref *pushbuf; -- struct nouveau_bo *pushbuf_bo; -- uint32_t pushbuf_base; -+ struct nouveau_gpuobj *pushbuf; -+ struct nouveau_bo *pushbuf_bo; -+ uint32_t pushbuf_base; - - /* Notifier memory */ - struct nouveau_bo *notifier_bo; - struct drm_mm notifier_heap; - - /* PFIFO context */ -- struct nouveau_gpuobj_ref *ramfc; -- struct nouveau_gpuobj_ref *cache; -+ struct nouveau_gpuobj *ramfc; -+ struct nouveau_gpuobj *cache; - - /* PGRAPH context */ - /* XXX may be merge 2 pointers as private data ??? */ -- struct nouveau_gpuobj_ref *ramin_grctx; -+ struct nouveau_gpuobj *ramin_grctx; -+ struct nouveau_gpuobj *crypt_ctx; - void *pgraph_ctx; - - /* NV50 VM */ -- struct nouveau_gpuobj *vm_pd; -- struct nouveau_gpuobj_ref *vm_gart_pt; -- struct nouveau_gpuobj_ref *vm_vram_pt[NV50_VM_VRAM_NR]; -+ struct nouveau_gpuobj *vm_pd; -+ struct nouveau_gpuobj *vm_gart_pt; -+ struct nouveau_gpuobj *vm_vram_pt[NV50_VM_VRAM_NR]; - - /* Objects */ -- struct nouveau_gpuobj_ref *ramin; /* Private instmem */ -- struct drm_mm ramin_heap; /* Private PRAMIN heap */ -- struct nouveau_gpuobj_ref *ramht; /* Hash table */ -- struct list_head ramht_refs; /* Objects referenced by RAMHT */ -+ struct nouveau_gpuobj *ramin; /* Private instmem */ -+ struct drm_mm ramin_heap; /* Private PRAMIN heap */ -+ struct nouveau_ramht *ramht; /* Hash table */ - - /* GPU object info for stuff used in-kernel (mm_enabled) */ - uint32_t m2mf_ntfy; -@@ -244,9 +265,11 @@ - - struct { - struct nouveau_gpuobj *vblsem; -+ uint32_t vblsem_head; - uint32_t vblsem_offset; - uint32_t vblsem_rval; - struct list_head vbl_wait; -+ struct list_head flip; - } nvsw; - - struct { -@@ -265,7 +288,7 @@ - void (*resume)(struct drm_device *dev); - - int (*populate)(struct drm_device *, struct nouveau_gpuobj *, -- uint32_t *size); -+ u32 *size, u32 align); - void (*clear)(struct drm_device *, struct nouveau_gpuobj *); - int (*bind)(struct drm_device *, struct nouveau_gpuobj *); - int (*unbind)(struct drm_device *, struct nouveau_gpuobj *); -@@ -285,18 +308,22 @@ - - struct nouveau_fb_engine { - int num_tiles; -+ struct drm_mm tag_heap; - - int (*init)(struct drm_device *dev); - void (*takedown)(struct drm_device *dev); - -- void (*set_region_tiling)(struct drm_device *dev, int i, uint32_t addr, -- uint32_t size, uint32_t pitch); -+ void (*init_tile_region)(struct drm_device *dev, int i, -+ uint32_t addr, uint32_t size, -+ uint32_t pitch, uint32_t flags); -+ void (*set_tile_region)(struct drm_device *dev, int i); -+ void (*free_tile_region)(struct drm_device *dev, int i); - }; - - struct nouveau_fifo_engine { - int channels; - -- struct nouveau_gpuobj_ref *playlist[2]; -+ struct nouveau_gpuobj *playlist[2]; - int cur_playlist; - - int (*init)(struct drm_device *); -@@ -305,7 +332,6 @@ - void (*disable)(struct drm_device *); - void (*enable)(struct drm_device *); - bool (*reassign)(struct drm_device *, bool enable); -- bool (*cache_flush)(struct drm_device *dev); - bool (*cache_pull)(struct drm_device *dev, bool enable); - - int (*channel_id)(struct drm_device *); -@@ -314,27 +340,16 @@ - void (*destroy_context)(struct nouveau_channel *); - int (*load_context)(struct nouveau_channel *); - int (*unload_context)(struct drm_device *); --}; -- --struct nouveau_pgraph_object_method { -- int id; -- int (*exec)(struct nouveau_channel *chan, int grclass, int mthd, -- uint32_t data); --}; -- --struct nouveau_pgraph_object_class { -- int id; -- bool software; -- struct nouveau_pgraph_object_method *methods; -+ void (*tlb_flush)(struct drm_device *dev); - }; - - struct nouveau_pgraph_engine { -- struct nouveau_pgraph_object_class *grclass; - bool accel_blocked; -+ bool registered; - int grctx_size; - - /* NV2x/NV3x context table (0x400780) */ -- struct nouveau_gpuobj_ref *ctx_table; -+ struct nouveau_gpuobj *ctx_table; - - int (*init)(struct drm_device *); - void (*takedown)(struct drm_device *); -@@ -346,9 +361,9 @@ - void (*destroy_context)(struct nouveau_channel *); - int (*load_context)(struct nouveau_channel *); - int (*unload_context)(struct drm_device *); -+ void (*tlb_flush)(struct drm_device *dev); - -- void (*set_region_tiling)(struct drm_device *dev, int i, uint32_t addr, -- uint32_t size, uint32_t pitch); -+ void (*set_tile_region)(struct drm_device *dev, int i); - }; - - struct nouveau_display_engine { -@@ -369,6 +384,102 @@ - void (*irq_enable)(struct drm_device *, enum dcb_gpio_tag, bool on); - }; - -+struct nouveau_pm_voltage_level { -+ u8 voltage; -+ u8 vid; -+}; -+ -+struct nouveau_pm_voltage { -+ bool supported; -+ u8 vid_mask; -+ -+ struct nouveau_pm_voltage_level *level; -+ int nr_level; -+}; -+ -+#define NOUVEAU_PM_MAX_LEVEL 8 -+struct nouveau_pm_level { -+ struct device_attribute dev_attr; -+ char name[32]; -+ int id; -+ -+ u32 core; -+ u32 memory; -+ u32 shader; -+ u32 unk05; -+ -+ u8 voltage; -+ u8 fanspeed; -+ -+ u16 memscript; -+}; -+ -+struct nouveau_pm_temp_sensor_constants { -+ u16 offset_constant; -+ s16 offset_mult; -+ u16 offset_div; -+ u16 slope_mult; -+ u16 slope_div; -+}; -+ -+struct nouveau_pm_threshold_temp { -+ s16 critical; -+ s16 down_clock; -+ s16 fan_boost; -+}; -+ -+struct nouveau_pm_memtiming { -+ u32 reg_100220; -+ u32 reg_100224; -+ u32 reg_100228; -+ u32 reg_10022c; -+ u32 reg_100230; -+ u32 reg_100234; -+ u32 reg_100238; -+ u32 reg_10023c; -+}; -+ -+struct nouveau_pm_memtimings { -+ bool supported; -+ struct nouveau_pm_memtiming *timing; -+ int nr_timing; -+}; -+ -+struct nouveau_pm_engine { -+ struct nouveau_pm_voltage voltage; -+ struct nouveau_pm_level perflvl[NOUVEAU_PM_MAX_LEVEL]; -+ int nr_perflvl; -+ struct nouveau_pm_memtimings memtimings; -+ struct nouveau_pm_temp_sensor_constants sensor_constants; -+ struct nouveau_pm_threshold_temp threshold_temp; -+ -+ struct nouveau_pm_level boot; -+ struct nouveau_pm_level *cur; -+ -+ struct device *hwmon; -+ struct notifier_block acpi_nb; -+ -+ int (*clock_get)(struct drm_device *, u32 id); -+ void *(*clock_pre)(struct drm_device *, struct nouveau_pm_level *, -+ u32 id, int khz); -+ void (*clock_set)(struct drm_device *, void *); -+ int (*voltage_get)(struct drm_device *); -+ int (*voltage_set)(struct drm_device *, int voltage); -+ int (*fanspeed_get)(struct drm_device *); -+ int (*fanspeed_set)(struct drm_device *, int fanspeed); -+ int (*temp_get)(struct drm_device *); -+}; -+ -+struct nouveau_crypt_engine { -+ bool registered; -+ -+ int (*init)(struct drm_device *); -+ void (*takedown)(struct drm_device *); -+ int (*create_context)(struct nouveau_channel *); -+ void (*destroy_context)(struct nouveau_channel *); -+ void (*tlb_flush)(struct drm_device *dev); -+}; -+ - struct nouveau_engine { - struct nouveau_instmem_engine instmem; - struct nouveau_mc_engine mc; -@@ -378,6 +489,8 @@ - struct nouveau_fifo_engine fifo; - struct nouveau_display_engine display; - struct nouveau_gpio_engine gpio; -+ struct nouveau_pm_engine pm; -+ struct nouveau_crypt_engine crypt; - }; - - struct nouveau_pll_vals { -@@ -409,13 +522,13 @@ - }; - - struct nv04_crtc_reg { -- unsigned char MiscOutReg; /* */ -+ unsigned char MiscOutReg; - uint8_t CRTC[0xa0]; - uint8_t CR58[0x10]; - uint8_t Sequencer[5]; - uint8_t Graphics[9]; - uint8_t Attribute[21]; -- unsigned char DAC[768]; /* Internal Colorlookuptable */ -+ unsigned char DAC[768]; - - /* PCRTC regs */ - uint32_t fb_start; -@@ -463,43 +576,9 @@ - }; - - struct nv04_mode_state { -- uint32_t bpp; -- uint32_t width; -- uint32_t height; -- uint32_t interlace; -- uint32_t repaint0; -- uint32_t repaint1; -- uint32_t screen; -- uint32_t scale; -- uint32_t dither; -- uint32_t extra; -- uint32_t fifo; -- uint32_t pixel; -- uint32_t horiz; -- int arbitration0; -- int arbitration1; -- uint32_t pll; -- uint32_t pllB; -- uint32_t vpll; -- uint32_t vpll2; -- uint32_t vpllB; -- uint32_t vpll2B; -+ struct nv04_crtc_reg crtc_reg[2]; - uint32_t pllsel; - uint32_t sel_clk; -- uint32_t general; -- uint32_t crtcOwner; -- uint32_t head; -- uint32_t head2; -- uint32_t cursorConfig; -- uint32_t cursor0; -- uint32_t cursor1; -- uint32_t cursor2; -- uint32_t timingH; -- uint32_t timingV; -- uint32_t displayV; -- uint32_t crtcSync; -- -- struct nv04_crtc_reg crtc_reg[2]; - }; - - enum nouveau_card_type { -@@ -522,11 +601,20 @@ - int flags; - - void __iomem *mmio; -+ -+ spinlock_t ramin_lock; - void __iomem *ramin; -- uint32_t ramin_size; -+ u32 ramin_size; -+ u32 ramin_base; -+ bool ramin_available; -+ struct drm_mm ramin_heap; -+ struct list_head gpuobj_list; -+ struct list_head classes; - - struct nouveau_bo *vga_ram; - -+ /* interrupt handling */ -+ bool msi_enabled; - struct workqueue_struct *wq; - struct work_struct irq_work; - struct work_struct hpd_work; -@@ -540,8 +628,16 @@ - atomic_t validate_sequence; - } ttm; - -- int fifo_alloc_count; -- struct nouveau_channel *fifos[NOUVEAU_MAX_CHANNEL_NR]; -+ struct { -+ spinlock_t lock; -+ struct drm_mm heap; -+ struct nouveau_bo *bo; -+ } fence; -+ -+ struct { -+ spinlock_t lock; -+ struct nouveau_channel *ptr[NOUVEAU_MAX_CHANNEL_NR]; -+ } channels; - - struct nouveau_engine engine; - struct nouveau_channel *channel; -@@ -550,15 +646,11 @@ - spinlock_t context_switch_lock; - - /* RAMIN configuration, RAMFC, RAMHT and RAMRO offsets */ -- struct nouveau_gpuobj *ramht; -+ struct nouveau_ramht *ramht; -+ struct nouveau_gpuobj *ramfc; -+ struct nouveau_gpuobj *ramro; -+ - uint32_t ramin_rsvd_vram; -- uint32_t ramht_offset; -- uint32_t ramht_size; -- uint32_t ramht_bits; -- uint32_t ramfc_offset; -- uint32_t ramfc_size; -- uint32_t ramro_offset; -- uint32_t ramro_size; - - struct { - enum { -@@ -584,6 +676,7 @@ - /* VRAM/fb configuration */ - uint64_t vram_size; - uint64_t vram_sys_base; -+ u32 vram_rblock_size; - - uint64_t fb_phys; - uint64_t fb_available_size; -@@ -600,10 +693,6 @@ - struct nouveau_gpuobj *vm_vram_pt[NV50_VM_VRAM_NR]; - int vm_vram_pt_nr; - -- struct drm_mm ramin_heap; -- -- struct list_head gpuobj_list; -- - struct nvbios vbios; - - struct nv04_mode_state mode_reg; -@@ -619,6 +708,7 @@ - struct backlight_device *backlight; - - struct nouveau_channel *evo; -+ u32 evo_alloc; - struct { - struct dcb_entry *dcb; - u16 script; -@@ -634,6 +724,12 @@ - }; - - static inline struct drm_nouveau_private * -+nouveau_private(struct drm_device *dev) -+{ -+ return dev->dev_private; -+} -+ -+static inline struct drm_nouveau_private * - nouveau_bdev(struct ttm_bo_device *bd) - { - return container_of(bd, struct drm_nouveau_private, ttm.bdev); -@@ -658,18 +754,8 @@ - return 0; - } - --#define NOUVEAU_GET_USER_CHANNEL_WITH_RETURN(id, cl, ch) do { \ -- struct drm_nouveau_private *nv = dev->dev_private; \ -- if (!nouveau_channel_owner(dev, (cl), (id))) { \ -- NV_ERROR(dev, "pid %d doesn't own channel %d\n", \ -- DRM_CURRENTPID, (id)); \ -- return -EPERM; \ -- } \ -- (ch) = nv->fifos[(id)]; \ --} while (0) -- - /* nouveau_drv.c */ --extern int nouveau_noagp; -+extern int nouveau_agpmode; - extern int nouveau_duallink; - extern int nouveau_uscript_lvds; - extern int nouveau_uscript_tmds; -@@ -683,7 +769,11 @@ - extern int nouveau_ignorelid; - extern int nouveau_nofbaccel; - extern int nouveau_noaccel; -+extern int nouveau_force_post; - extern int nouveau_override_conntype; -+extern char *nouveau_perflvl; -+extern int nouveau_perflvl_wr; -+extern int nouveau_msi; - - extern int nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state); - extern int nouveau_pci_resume(struct pci_dev *pdev); -@@ -704,18 +794,19 @@ - extern int nouveau_card_init(struct drm_device *); - - /* nouveau_mem.c */ --extern int nouveau_mem_detect(struct drm_device *dev); --extern int nouveau_mem_init(struct drm_device *); -+extern int nouveau_mem_vram_init(struct drm_device *); -+extern void nouveau_mem_vram_fini(struct drm_device *); -+extern int nouveau_mem_gart_init(struct drm_device *); -+extern void nouveau_mem_gart_fini(struct drm_device *); - extern int nouveau_mem_init_agp(struct drm_device *); - extern int nouveau_mem_reset_agp(struct drm_device *); - extern void nouveau_mem_close(struct drm_device *); --extern struct nouveau_tile_reg *nv10_mem_set_tiling(struct drm_device *dev, -- uint32_t addr, -- uint32_t size, -- uint32_t pitch); --extern void nv10_mem_expire_tiling(struct drm_device *dev, -- struct nouveau_tile_reg *tile, -- struct nouveau_fence *fence); -+extern struct nouveau_tile_reg *nv10_mem_set_tiling( -+ struct drm_device *dev, uint32_t addr, uint32_t size, -+ uint32_t pitch, uint32_t flags); -+extern void nv10_mem_put_tile_region(struct drm_device *dev, -+ struct nouveau_tile_reg *tile, -+ struct nouveau_fence *fence); - extern int nv50_mem_vm_bind_linear(struct drm_device *, uint64_t virt, - uint32_t size, uint32_t flags, - uint64_t phys); -@@ -737,46 +828,54 @@ - extern struct drm_ioctl_desc nouveau_ioctls[]; - extern int nouveau_max_ioctl; - extern void nouveau_channel_cleanup(struct drm_device *, struct drm_file *); --extern int nouveau_channel_owner(struct drm_device *, struct drm_file *, -- int channel); - extern int nouveau_channel_alloc(struct drm_device *dev, - struct nouveau_channel **chan, - struct drm_file *file_priv, - uint32_t fb_ctxdma, uint32_t tt_ctxdma); --extern void nouveau_channel_free(struct nouveau_channel *); -+extern struct nouveau_channel * -+nouveau_channel_get_unlocked(struct nouveau_channel *); -+extern struct nouveau_channel * -+nouveau_channel_get(struct drm_device *, struct drm_file *, int id); -+extern void nouveau_channel_put_unlocked(struct nouveau_channel **); -+extern void nouveau_channel_put(struct nouveau_channel **); -+extern void nouveau_channel_ref(struct nouveau_channel *chan, -+ struct nouveau_channel **pchan); - - /* nouveau_object.c */ -+#define NVOBJ_CLASS(d,c,e) do { \ -+ int ret = nouveau_gpuobj_class_new((d), (c), NVOBJ_ENGINE_##e); \ -+ if (ret) \ -+ return ret; \ -+} while(0) -+ -+#define NVOBJ_MTHD(d,c,m,e) do { \ -+ int ret = nouveau_gpuobj_mthd_new((d), (c), (m), (e)); \ -+ if (ret) \ -+ return ret; \ -+} while(0) -+ - extern int nouveau_gpuobj_early_init(struct drm_device *); - extern int nouveau_gpuobj_init(struct drm_device *); - extern void nouveau_gpuobj_takedown(struct drm_device *); --extern void nouveau_gpuobj_late_takedown(struct drm_device *); - extern int nouveau_gpuobj_suspend(struct drm_device *dev); - extern void nouveau_gpuobj_suspend_cleanup(struct drm_device *dev); - extern void nouveau_gpuobj_resume(struct drm_device *dev); -+extern int nouveau_gpuobj_class_new(struct drm_device *, u32 class, u32 eng); -+extern int nouveau_gpuobj_mthd_new(struct drm_device *, u32 class, u32 mthd, -+ int (*exec)(struct nouveau_channel *, -+ u32 class, u32 mthd, u32 data)); -+extern int nouveau_gpuobj_mthd_call(struct nouveau_channel *, u32, u32, u32); - extern int nouveau_gpuobj_channel_init(struct nouveau_channel *, - uint32_t vram_h, uint32_t tt_h); - extern void nouveau_gpuobj_channel_takedown(struct nouveau_channel *); - extern int nouveau_gpuobj_new(struct drm_device *, struct nouveau_channel *, - uint32_t size, int align, uint32_t flags, - struct nouveau_gpuobj **); --extern int nouveau_gpuobj_del(struct drm_device *, struct nouveau_gpuobj **); --extern int nouveau_gpuobj_ref_add(struct drm_device *, struct nouveau_channel *, -- uint32_t handle, struct nouveau_gpuobj *, -- struct nouveau_gpuobj_ref **); --extern int nouveau_gpuobj_ref_del(struct drm_device *, -- struct nouveau_gpuobj_ref **); --extern int nouveau_gpuobj_ref_find(struct nouveau_channel *, uint32_t handle, -- struct nouveau_gpuobj_ref **ref_ret); --extern int nouveau_gpuobj_new_ref(struct drm_device *, -- struct nouveau_channel *alloc_chan, -- struct nouveau_channel *ref_chan, -- uint32_t handle, uint32_t size, int align, -- uint32_t flags, struct nouveau_gpuobj_ref **); --extern int nouveau_gpuobj_new_fake(struct drm_device *, -- uint32_t p_offset, uint32_t b_offset, -- uint32_t size, uint32_t flags, -- struct nouveau_gpuobj **, -- struct nouveau_gpuobj_ref**); -+extern void nouveau_gpuobj_ref(struct nouveau_gpuobj *, -+ struct nouveau_gpuobj **); -+extern int nouveau_gpuobj_new_fake(struct drm_device *, u32 pinst, u64 vinst, -+ u32 size, u32 flags, -+ struct nouveau_gpuobj **); - extern int nouveau_gpuobj_dma_new(struct nouveau_channel *, int class, - uint64_t offset, uint64_t size, int access, - int target, struct nouveau_gpuobj **); -@@ -786,14 +885,14 @@ - uint32_t *o_ret); - extern int nouveau_gpuobj_gr_new(struct nouveau_channel *, int class, - struct nouveau_gpuobj **); --extern int nouveau_gpuobj_sw_new(struct nouveau_channel *, int class, -- struct nouveau_gpuobj **); - extern int nouveau_ioctl_grobj_alloc(struct drm_device *, void *data, - struct drm_file *); - extern int nouveau_ioctl_gpuobj_free(struct drm_device *, void *data, - struct drm_file *); - - /* nouveau_irq.c */ -+extern int nouveau_irq_init(struct drm_device *); -+extern void nouveau_irq_fini(struct drm_device *); - extern irqreturn_t nouveau_irq_handler(DRM_IRQ_ARGS); - extern void nouveau_irq_preinstall(struct drm_device *); - extern int nouveau_irq_postinstall(struct drm_device *); -@@ -879,6 +978,7 @@ - enum dcb_gpio_tag); - extern struct dcb_connector_table_entry * - nouveau_bios_connector_entry(struct drm_device *, int index); -+extern u32 get_pll_register(struct drm_device *, enum pll_types); - extern int get_pll_limits(struct drm_device *, uint32_t limit_match, - struct pll_lims *); - extern int nouveau_bios_run_display_table(struct drm_device *, -@@ -913,18 +1013,29 @@ - /* nv10_fb.c */ - extern int nv10_fb_init(struct drm_device *); - extern void nv10_fb_takedown(struct drm_device *); --extern void nv10_fb_set_region_tiling(struct drm_device *, int, uint32_t, -- uint32_t, uint32_t); -+extern void nv10_fb_init_tile_region(struct drm_device *dev, int i, -+ uint32_t addr, uint32_t size, -+ uint32_t pitch, uint32_t flags); -+extern void nv10_fb_set_tile_region(struct drm_device *dev, int i); -+extern void nv10_fb_free_tile_region(struct drm_device *dev, int i); - - /* nv30_fb.c */ - extern int nv30_fb_init(struct drm_device *); - extern void nv30_fb_takedown(struct drm_device *); -+extern void nv30_fb_init_tile_region(struct drm_device *dev, int i, -+ uint32_t addr, uint32_t size, -+ uint32_t pitch, uint32_t flags); -+extern void nv30_fb_free_tile_region(struct drm_device *dev, int i); - - /* nv40_fb.c */ - extern int nv40_fb_init(struct drm_device *); - extern void nv40_fb_takedown(struct drm_device *); --extern void nv40_fb_set_region_tiling(struct drm_device *, int, uint32_t, -- uint32_t, uint32_t); -+extern void nv40_fb_set_tile_region(struct drm_device *dev, int i); -+ -+/* nv50_fb.c */ -+extern int nv50_fb_init(struct drm_device *); -+extern void nv50_fb_takedown(struct drm_device *); -+extern void nv50_fb_vm_trap(struct drm_device *, int display, const char *); - - /* nv50_fb.c */ - extern int nv50_fb_init(struct drm_device *); -@@ -939,7 +1050,6 @@ - extern void nv04_fifo_disable(struct drm_device *); - extern void nv04_fifo_enable(struct drm_device *); - extern bool nv04_fifo_reassign(struct drm_device *, bool); --extern bool nv04_fifo_cache_flush(struct drm_device *); - extern bool nv04_fifo_cache_pull(struct drm_device *, bool); - extern int nv04_fifo_channel_id(struct drm_device *); - extern int nv04_fifo_create_context(struct nouveau_channel *); -@@ -951,14 +1061,12 @@ - extern int nv10_fifo_init(struct drm_device *); - extern int nv10_fifo_channel_id(struct drm_device *); - extern int nv10_fifo_create_context(struct nouveau_channel *); --extern void nv10_fifo_destroy_context(struct nouveau_channel *); - extern int nv10_fifo_load_context(struct nouveau_channel *); - extern int nv10_fifo_unload_context(struct drm_device *); - - /* nv40_fifo.c */ - extern int nv40_fifo_init(struct drm_device *); - extern int nv40_fifo_create_context(struct nouveau_channel *); --extern void nv40_fifo_destroy_context(struct nouveau_channel *); - extern int nv40_fifo_load_context(struct nouveau_channel *); - extern int nv40_fifo_unload_context(struct drm_device *); - -@@ -970,6 +1078,7 @@ - extern void nv50_fifo_destroy_context(struct nouveau_channel *); - extern int nv50_fifo_load_context(struct nouveau_channel *); - extern int nv50_fifo_unload_context(struct drm_device *); -+extern void nv50_fifo_tlb_flush(struct drm_device *dev); - - /* nvc0_fifo.c */ - extern int nvc0_fifo_init(struct drm_device *); -@@ -977,7 +1086,6 @@ - extern void nvc0_fifo_disable(struct drm_device *); - extern void nvc0_fifo_enable(struct drm_device *); - extern bool nvc0_fifo_reassign(struct drm_device *, bool); --extern bool nvc0_fifo_cache_flush(struct drm_device *); - extern bool nvc0_fifo_cache_pull(struct drm_device *, bool); - extern int nvc0_fifo_channel_id(struct drm_device *); - extern int nvc0_fifo_create_context(struct nouveau_channel *); -@@ -986,7 +1094,6 @@ - extern int nvc0_fifo_unload_context(struct drm_device *); - - /* nv04_graph.c */ --extern struct nouveau_pgraph_object_class nv04_graph_grclass[]; - extern int nv04_graph_init(struct drm_device *); - extern void nv04_graph_takedown(struct drm_device *); - extern void nv04_graph_fifo_access(struct drm_device *, bool); -@@ -996,9 +1103,10 @@ - extern int nv04_graph_load_context(struct nouveau_channel *); - extern int nv04_graph_unload_context(struct drm_device *); - extern void nv04_graph_context_switch(struct drm_device *); -+extern int nv04_graph_mthd_page_flip(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data); - - /* nv10_graph.c */ --extern struct nouveau_pgraph_object_class nv10_graph_grclass[]; - extern int nv10_graph_init(struct drm_device *); - extern void nv10_graph_takedown(struct drm_device *); - extern struct nouveau_channel *nv10_graph_channel(struct drm_device *); -@@ -1007,12 +1115,9 @@ - extern int nv10_graph_load_context(struct nouveau_channel *); - extern int nv10_graph_unload_context(struct drm_device *); - extern void nv10_graph_context_switch(struct drm_device *); --extern void nv10_graph_set_region_tiling(struct drm_device *, int, uint32_t, -- uint32_t, uint32_t); -+extern void nv10_graph_set_tile_region(struct drm_device *dev, int i); - - /* nv20_graph.c */ --extern struct nouveau_pgraph_object_class nv20_graph_grclass[]; --extern struct nouveau_pgraph_object_class nv30_graph_grclass[]; - extern int nv20_graph_create_context(struct nouveau_channel *); - extern void nv20_graph_destroy_context(struct nouveau_channel *); - extern int nv20_graph_load_context(struct nouveau_channel *); -@@ -1020,11 +1125,9 @@ - extern int nv20_graph_init(struct drm_device *); - extern void nv20_graph_takedown(struct drm_device *); - extern int nv30_graph_init(struct drm_device *); --extern void nv20_graph_set_region_tiling(struct drm_device *, int, uint32_t, -- uint32_t, uint32_t); -+extern void nv20_graph_set_tile_region(struct drm_device *dev, int i); - - /* nv40_graph.c */ --extern struct nouveau_pgraph_object_class nv40_graph_grclass[]; - extern int nv40_graph_init(struct drm_device *); - extern void nv40_graph_takedown(struct drm_device *); - extern struct nouveau_channel *nv40_graph_channel(struct drm_device *); -@@ -1033,11 +1136,9 @@ - extern int nv40_graph_load_context(struct nouveau_channel *); - extern int nv40_graph_unload_context(struct drm_device *); - extern void nv40_grctx_init(struct nouveau_grctx *); --extern void nv40_graph_set_region_tiling(struct drm_device *, int, uint32_t, -- uint32_t, uint32_t); -+extern void nv40_graph_set_tile_region(struct drm_device *dev, int i); - - /* nv50_graph.c */ --extern struct nouveau_pgraph_object_class nv50_graph_grclass[]; - extern int nv50_graph_init(struct drm_device *); - extern void nv50_graph_takedown(struct drm_device *); - extern void nv50_graph_fifo_access(struct drm_device *, bool); -@@ -1048,6 +1149,8 @@ - extern int nv50_graph_unload_context(struct drm_device *); - extern void nv50_graph_context_switch(struct drm_device *); - extern int nv50_grctx_init(struct nouveau_grctx *); -+extern void nv50_graph_tlb_flush(struct drm_device *dev); -+extern void nv86_graph_tlb_flush(struct drm_device *dev); - - /* nvc0_graph.c */ - extern int nvc0_graph_init(struct drm_device *); -@@ -1059,13 +1162,20 @@ - extern int nvc0_graph_load_context(struct nouveau_channel *); - extern int nvc0_graph_unload_context(struct drm_device *); - -+/* nv84_crypt.c */ -+extern int nv84_crypt_init(struct drm_device *dev); -+extern void nv84_crypt_fini(struct drm_device *dev); -+extern int nv84_crypt_create_context(struct nouveau_channel *); -+extern void nv84_crypt_destroy_context(struct nouveau_channel *); -+extern void nv84_crypt_tlb_flush(struct drm_device *dev); -+ - /* nv04_instmem.c */ - extern int nv04_instmem_init(struct drm_device *); - extern void nv04_instmem_takedown(struct drm_device *); - extern int nv04_instmem_suspend(struct drm_device *); - extern void nv04_instmem_resume(struct drm_device *); - extern int nv04_instmem_populate(struct drm_device *, struct nouveau_gpuobj *, -- uint32_t *size); -+ u32 *size, u32 align); - extern void nv04_instmem_clear(struct drm_device *, struct nouveau_gpuobj *); - extern int nv04_instmem_bind(struct drm_device *, struct nouveau_gpuobj *); - extern int nv04_instmem_unbind(struct drm_device *, struct nouveau_gpuobj *); -@@ -1077,7 +1187,7 @@ - extern int nv50_instmem_suspend(struct drm_device *); - extern void nv50_instmem_resume(struct drm_device *); - extern int nv50_instmem_populate(struct drm_device *, struct nouveau_gpuobj *, -- uint32_t *size); -+ u32 *size, u32 align); - extern void nv50_instmem_clear(struct drm_device *, struct nouveau_gpuobj *); - extern int nv50_instmem_bind(struct drm_device *, struct nouveau_gpuobj *); - extern int nv50_instmem_unbind(struct drm_device *, struct nouveau_gpuobj *); -@@ -1091,7 +1201,7 @@ - extern int nvc0_instmem_suspend(struct drm_device *); - extern void nvc0_instmem_resume(struct drm_device *); - extern int nvc0_instmem_populate(struct drm_device *, struct nouveau_gpuobj *, -- uint32_t *size); -+ u32 *size, u32 align); - extern void nvc0_instmem_clear(struct drm_device *, struct nouveau_gpuobj *); - extern int nvc0_instmem_bind(struct drm_device *, struct nouveau_gpuobj *); - extern int nvc0_instmem_unbind(struct drm_device *, struct nouveau_gpuobj *); -@@ -1165,22 +1275,51 @@ - extern void nouveau_bo_wr16(struct nouveau_bo *nvbo, unsigned index, u16 val); - extern u32 nouveau_bo_rd32(struct nouveau_bo *nvbo, unsigned index); - extern void nouveau_bo_wr32(struct nouveau_bo *nvbo, unsigned index, u32 val); --extern int nouveau_bo_sync_gpu(struct nouveau_bo *, struct nouveau_channel *); -+extern void nouveau_bo_fence(struct nouveau_bo *, struct nouveau_fence *); - - /* nouveau_fence.c */ - struct nouveau_fence; --extern int nouveau_fence_init(struct nouveau_channel *); --extern void nouveau_fence_fini(struct nouveau_channel *); -+extern int nouveau_fence_init(struct drm_device *); -+extern void nouveau_fence_fini(struct drm_device *); -+extern int nouveau_fence_channel_init(struct nouveau_channel *); -+extern void nouveau_fence_channel_fini(struct nouveau_channel *); - extern void nouveau_fence_update(struct nouveau_channel *); - extern int nouveau_fence_new(struct nouveau_channel *, struct nouveau_fence **, - bool emit); - extern int nouveau_fence_emit(struct nouveau_fence *); -+extern void nouveau_fence_work(struct nouveau_fence *fence, -+ void (*work)(void *priv, bool signalled), -+ void *priv); - struct nouveau_channel *nouveau_fence_channel(struct nouveau_fence *); --extern bool nouveau_fence_signalled(void *obj, void *arg); --extern int nouveau_fence_wait(void *obj, void *arg, bool lazy, bool intr); --extern int nouveau_fence_flush(void *obj, void *arg); --extern void nouveau_fence_unref(void **obj); --extern void *nouveau_fence_ref(void *obj); -+ -+extern bool __nouveau_fence_signalled(void *obj, void *arg); -+extern int __nouveau_fence_wait(void *obj, void *arg, bool lazy, bool intr); -+extern int __nouveau_fence_flush(void *obj, void *arg); -+extern void __nouveau_fence_unref(void **obj); -+extern void *__nouveau_fence_ref(void *obj); -+ -+static inline bool nouveau_fence_signalled(struct nouveau_fence *obj) -+{ -+ return __nouveau_fence_signalled(obj, NULL); -+} -+static inline int -+nouveau_fence_wait(struct nouveau_fence *obj, bool lazy, bool intr) -+{ -+ return __nouveau_fence_wait(obj, NULL, lazy, intr); -+} -+extern int nouveau_fence_sync(struct nouveau_fence *, struct nouveau_channel *); -+static inline int nouveau_fence_flush(struct nouveau_fence *obj) -+{ -+ return __nouveau_fence_flush(obj, NULL); -+} -+static inline void nouveau_fence_unref(struct nouveau_fence **obj) -+{ -+ __nouveau_fence_unref((void **)obj); -+} -+static inline struct nouveau_fence *nouveau_fence_ref(struct nouveau_fence *obj) -+{ -+ return __nouveau_fence_ref(obj); -+} - - /* nouveau_gem.c */ - extern int nouveau_gem_new(struct drm_device *, struct nouveau_channel *, -@@ -1200,6 +1339,14 @@ - extern int nouveau_gem_ioctl_info(struct drm_device *, void *, - struct drm_file *); - -+/* nouveau_display.c */ -+int nouveau_vblank_enable(struct drm_device *dev, int crtc); -+void nouveau_vblank_disable(struct drm_device *dev, int crtc); -+int nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, -+ struct drm_pending_vblank_event *event); -+int nouveau_finish_page_flip(struct nouveau_channel *, -+ struct nouveau_page_flip_state *); -+ - /* nv10_gpio.c */ - int nv10_gpio_get(struct drm_device *dev, enum dcb_gpio_tag tag); - int nv10_gpio_set(struct drm_device *dev, enum dcb_gpio_tag tag, int state); -@@ -1255,12 +1402,11 @@ - iowrite32_native(val, dev_priv->mmio + reg); - } - --static inline void nv_mask(struct drm_device *dev, u32 reg, u32 mask, u32 val) -+static inline u32 nv_mask(struct drm_device *dev, u32 reg, u32 mask, u32 val) - { - u32 tmp = nv_rd32(dev, reg); -- tmp &= ~mask; -- tmp |= val; -- nv_wr32(dev, reg, tmp); -+ nv_wr32(dev, reg, (tmp & ~mask) | val); -+ return tmp; - } - - static inline u8 nv_rd08(struct drm_device *dev, unsigned reg) -@@ -1275,7 +1421,7 @@ - iowrite8(val, dev_priv->mmio + reg); - } - --#define nv_wait(reg, mask, val) \ -+#define nv_wait(dev, reg, mask, val) \ - nouveau_wait_until(dev, 2000000000ULL, (reg), (mask), (val)) - - /* PRAMIN access */ -@@ -1292,17 +1438,8 @@ - } - - /* object access */ --static inline u32 nv_ro32(struct drm_device *dev, struct nouveau_gpuobj *obj, -- unsigned index) --{ -- return nv_ri32(dev, obj->im_pramin->start + index * 4); --} -- --static inline void nv_wo32(struct drm_device *dev, struct nouveau_gpuobj *obj, -- unsigned index, u32 val) --{ -- nv_wi32(dev, obj->im_pramin->start + index * 4, val); --} -+extern u32 nv_ro32(struct nouveau_gpuobj *, u32 offset); -+extern void nv_wo32(struct nouveau_gpuobj *, u32 offset, u32 val); - - /* - * Logging -@@ -1403,9 +1540,11 @@ - #define NV_SW_SEMAPHORE_OFFSET 0x00000064 - #define NV_SW_SEMAPHORE_ACQUIRE 0x00000068 - #define NV_SW_SEMAPHORE_RELEASE 0x0000006c -+#define NV_SW_YIELD 0x00000080 - #define NV_SW_DMA_VBLSEM 0x0000018c - #define NV_SW_VBLSEM_OFFSET 0x00000400 - #define NV_SW_VBLSEM_RELEASE_VALUE 0x00000404 - #define NV_SW_VBLSEM_RELEASE 0x00000408 -+#define NV_SW_PAGE_FLIP 0x00000500 - - #endif /* __NOUVEAU_DRV_H__ */ -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_encoder.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_encoder.h ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_encoder.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_encoder.h 2010-10-30 22:24:25.000000000 +0200 -@@ -55,6 +55,7 @@ - int dpcd_version; - int link_nr; - int link_bw; -+ bool enhanced_frame; - } dp; - }; - }; -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_fbcon.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_fbcon.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.c 2010-10-30 22:24:25.000000000 +0200 -@@ -49,6 +49,96 @@ - #include "nouveau_fbcon.h" - #include "nouveau_dma.h" - -+static void -+nouveau_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) -+{ -+ struct nouveau_fbdev *nfbdev = info->par; -+ struct drm_device *dev = nfbdev->dev; -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ int ret; -+ -+ if (info->state != FBINFO_STATE_RUNNING) -+ return; -+ -+ ret = -ENODEV; -+ if (!in_interrupt() && !(info->flags & FBINFO_HWACCEL_DISABLED) && -+ mutex_trylock(&dev_priv->channel->mutex)) { -+ if (dev_priv->chipset < NV_50) -+ ret = nv04_fbcon_fillrect(info, rect); -+ else -+ if (dev_priv->chipset < NV_C0) -+ ret = nv50_fbcon_fillrect(info, rect); -+ mutex_unlock(&dev_priv->channel->mutex); -+ } -+ -+ if (ret == 0) -+ return; -+ -+ if (ret != -ENODEV) -+ nouveau_fbcon_gpu_lockup(info); -+ cfb_fillrect(info, rect); -+} -+ -+static void -+nouveau_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *image) -+{ -+ struct nouveau_fbdev *nfbdev = info->par; -+ struct drm_device *dev = nfbdev->dev; -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ int ret; -+ -+ if (info->state != FBINFO_STATE_RUNNING) -+ return; -+ -+ ret = -ENODEV; -+ if (!in_interrupt() && !(info->flags & FBINFO_HWACCEL_DISABLED) && -+ mutex_trylock(&dev_priv->channel->mutex)) { -+ if (dev_priv->chipset < NV_50) -+ ret = nv04_fbcon_copyarea(info, image); -+ else -+ if (dev_priv->chipset < NV_C0) -+ ret = nv50_fbcon_copyarea(info, image); -+ mutex_unlock(&dev_priv->channel->mutex); -+ } -+ -+ if (ret == 0) -+ return; -+ -+ if (ret != -ENODEV) -+ nouveau_fbcon_gpu_lockup(info); -+ cfb_copyarea(info, image); -+} -+ -+static void -+nouveau_fbcon_imageblit(struct fb_info *info, const struct fb_image *image) -+{ -+ struct nouveau_fbdev *nfbdev = info->par; -+ struct drm_device *dev = nfbdev->dev; -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ int ret; -+ -+ if (info->state != FBINFO_STATE_RUNNING) -+ return; -+ -+ ret = -ENODEV; -+ if (!in_interrupt() && !(info->flags & FBINFO_HWACCEL_DISABLED) && -+ mutex_trylock(&dev_priv->channel->mutex)) { -+ if (dev_priv->chipset < NV_50) -+ ret = nv04_fbcon_imageblit(info, image); -+ else -+ if (dev_priv->chipset < NV_C0) -+ ret = nv50_fbcon_imageblit(info, image); -+ mutex_unlock(&dev_priv->channel->mutex); -+ } -+ -+ if (ret == 0) -+ return; -+ -+ if (ret != -ENODEV) -+ nouveau_fbcon_gpu_lockup(info); -+ cfb_imageblit(info, image); -+} -+ - static int - nouveau_fbcon_sync(struct fb_info *info) - { -@@ -58,12 +148,17 @@ - struct nouveau_channel *chan = dev_priv->channel; - int ret, i; - -- if (!chan || !chan->accel_done || -+ if (!chan || !chan->accel_done || in_interrupt() || - info->state != FBINFO_STATE_RUNNING || - info->flags & FBINFO_HWACCEL_DISABLED) - return 0; - -- if (RING_SPACE(chan, 4)) { -+ if (!mutex_trylock(&chan->mutex)) -+ return 0; -+ -+ ret = RING_SPACE(chan, 4); -+ if (ret) { -+ mutex_unlock(&chan->mutex); - nouveau_fbcon_gpu_lockup(info); - return 0; - } -@@ -74,6 +169,7 @@ - OUT_RING(chan, 0); - nouveau_bo_wr32(chan->notifier_bo, chan->m2mf_ntfy + 3, 0xffffffff); - FIRE_RING(chan); -+ mutex_unlock(&chan->mutex); - - ret = -EBUSY; - for (i = 0; i < 100000; i++) { -@@ -97,36 +193,22 @@ - .owner = THIS_MODULE, - .fb_check_var = drm_fb_helper_check_var, - .fb_set_par = drm_fb_helper_set_par, -- .fb_fillrect = cfb_fillrect, -- .fb_copyarea = cfb_copyarea, -- .fb_imageblit = cfb_imageblit, -+ .fb_fillrect = nouveau_fbcon_fillrect, -+ .fb_copyarea = nouveau_fbcon_copyarea, -+ .fb_imageblit = nouveau_fbcon_imageblit, - .fb_sync = nouveau_fbcon_sync, - .fb_pan_display = drm_fb_helper_pan_display, - .fb_blank = drm_fb_helper_blank, - .fb_setcmap = drm_fb_helper_setcmap, - }; - --static struct fb_ops nv04_fbcon_ops = { -+static struct fb_ops nouveau_fbcon_sw_ops = { - .owner = THIS_MODULE, - .fb_check_var = drm_fb_helper_check_var, - .fb_set_par = drm_fb_helper_set_par, -- .fb_fillrect = nv04_fbcon_fillrect, -- .fb_copyarea = nv04_fbcon_copyarea, -- .fb_imageblit = nv04_fbcon_imageblit, -- .fb_sync = nouveau_fbcon_sync, -- .fb_pan_display = drm_fb_helper_pan_display, -- .fb_blank = drm_fb_helper_blank, -- .fb_setcmap = drm_fb_helper_setcmap, --}; -- --static struct fb_ops nv50_fbcon_ops = { -- .owner = THIS_MODULE, -- .fb_check_var = drm_fb_helper_check_var, -- .fb_set_par = drm_fb_helper_set_par, -- .fb_fillrect = nv50_fbcon_fillrect, -- .fb_copyarea = nv50_fbcon_copyarea, -- .fb_imageblit = nv50_fbcon_imageblit, -- .fb_sync = nouveau_fbcon_sync, -+ .fb_fillrect = cfb_fillrect, -+ .fb_copyarea = cfb_copyarea, -+ .fb_imageblit = cfb_imageblit, - .fb_pan_display = drm_fb_helper_pan_display, - .fb_blank = drm_fb_helper_blank, - .fb_setcmap = drm_fb_helper_setcmap, -@@ -251,7 +333,7 @@ - FBINFO_HWACCEL_FILLRECT | - FBINFO_HWACCEL_IMAGEBLIT; - info->flags |= FBINFO_CAN_FORCE_OUTPUT; -- info->fbops = &nouveau_fbcon_ops; -+ info->fbops = &nouveau_fbcon_sw_ops; - info->fix.smem_start = dev->mode_config.fb_base + nvbo->bo.offset - - dev_priv->vm_vram_base; - info->fix.smem_len = size; -@@ -279,19 +361,18 @@ - info->pixmap.flags = FB_PIXMAP_SYSTEM; - info->pixmap.scan_align = 1; - -+ mutex_unlock(&dev->struct_mutex); -+ - if (dev_priv->channel && !nouveau_nofbaccel) { -- switch (dev_priv->card_type) { -- case NV_C0: -- break; -- case NV_50: -- nv50_fbcon_accel_init(info); -- info->fbops = &nv50_fbcon_ops; -- break; -- default: -- nv04_fbcon_accel_init(info); -- info->fbops = &nv04_fbcon_ops; -- break; -- }; -+ ret = -ENODEV; -+ if (dev_priv->card_type < NV_50) -+ ret = nv04_fbcon_accel_init(info); -+ else -+ if (dev_priv->card_type < NV_C0) -+ ret = nv50_fbcon_accel_init(info); -+ -+ if (ret == 0) -+ info->fbops = &nouveau_fbcon_ops; - } - - nouveau_fbcon_zfill(dev, nfbdev); -@@ -302,7 +383,6 @@ - nouveau_fb->base.height, - nvbo->bo.offset, nvbo); - -- mutex_unlock(&dev->struct_mutex); - vga_switcheroo_client_fb_set(dev->pdev, info); - return 0; - -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_fbcon.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.h ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_fbcon.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.h 2010-10-30 22:24:25.000000000 +0200 -@@ -40,13 +40,13 @@ - - void nouveau_fbcon_restore(void); - --void nv04_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region); --void nv04_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect); --void nv04_fbcon_imageblit(struct fb_info *info, const struct fb_image *image); -+int nv04_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region); -+int nv04_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect); -+int nv04_fbcon_imageblit(struct fb_info *info, const struct fb_image *image); - int nv04_fbcon_accel_init(struct fb_info *info); --void nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect); --void nv50_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region); --void nv50_fbcon_imageblit(struct fb_info *info, const struct fb_image *image); -+int nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect); -+int nv50_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region); -+int nv50_fbcon_imageblit(struct fb_info *info, const struct fb_image *image); - int nv50_fbcon_accel_init(struct fb_info *info); - - void nouveau_fbcon_gpu_lockup(struct fb_info *info); -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_fence.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_fence.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_fence.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_fence.c 2010-10-30 22:24:25.000000000 +0200 -@@ -28,9 +28,11 @@ - #include "drm.h" - - #include "nouveau_drv.h" -+#include "nouveau_ramht.h" - #include "nouveau_dma.h" - --#define USE_REFCNT (dev_priv->card_type >= NV_10) -+#define USE_REFCNT(dev) (nouveau_private(dev)->chipset >= 0x10) -+#define USE_SEMA(dev) (nouveau_private(dev)->chipset >= 0x17) - - struct nouveau_fence { - struct nouveau_channel *channel; -@@ -39,6 +41,15 @@ - - uint32_t sequence; - bool signalled; -+ -+ void (*work)(void *priv, bool signalled); -+ void *priv; -+}; -+ -+struct nouveau_semaphore { -+ struct kref ref; -+ struct drm_device *dev; -+ struct drm_mm_node *mem; - }; - - static inline struct nouveau_fence * -@@ -53,20 +64,20 @@ - struct nouveau_fence *fence = - container_of(ref, struct nouveau_fence, refcount); - -+ nouveau_channel_ref(NULL, &fence->channel); - kfree(fence); - } - - void - nouveau_fence_update(struct nouveau_channel *chan) - { -- struct drm_nouveau_private *dev_priv = chan->dev->dev_private; -- struct list_head *entry, *tmp; -- struct nouveau_fence *fence; -+ struct drm_device *dev = chan->dev; -+ struct nouveau_fence *tmp, *fence; - uint32_t sequence; - - spin_lock(&chan->fence.lock); - -- if (USE_REFCNT) -+ if (USE_REFCNT(dev)) - sequence = nvchan_rd32(chan, 0x48); - else - sequence = atomic_read(&chan->fence.last_sequence_irq); -@@ -75,12 +86,14 @@ - goto out; - chan->fence.sequence_ack = sequence; - -- list_for_each_safe(entry, tmp, &chan->fence.pending) { -- fence = list_entry(entry, struct nouveau_fence, entry); -- -+ list_for_each_entry_safe(fence, tmp, &chan->fence.pending, entry) { - sequence = fence->sequence; - fence->signalled = true; - list_del(&fence->entry); -+ -+ if (unlikely(fence->work)) -+ fence->work(fence->priv, true); -+ - kref_put(&fence->refcount, nouveau_fence_del); - - if (sequence == chan->fence.sequence_ack) -@@ -101,13 +114,13 @@ - if (!fence) - return -ENOMEM; - kref_init(&fence->refcount); -- fence->channel = chan; -+ nouveau_channel_ref(chan, &fence->channel); - - if (emit) - ret = nouveau_fence_emit(fence); - - if (ret) -- nouveau_fence_unref((void *)&fence); -+ nouveau_fence_unref(&fence); - *pfence = fence; - return ret; - } -@@ -115,14 +128,14 @@ - struct nouveau_channel * - nouveau_fence_channel(struct nouveau_fence *fence) - { -- return fence ? fence->channel : NULL; -+ return fence ? nouveau_channel_get_unlocked(fence->channel) : NULL; - } - - int - nouveau_fence_emit(struct nouveau_fence *fence) - { -- struct drm_nouveau_private *dev_priv = fence->channel->dev->dev_private; - struct nouveau_channel *chan = fence->channel; -+ struct drm_device *dev = chan->dev; - int ret; - - ret = RING_SPACE(chan, 2); -@@ -143,7 +156,7 @@ - list_add_tail(&fence->entry, &chan->fence.pending); - spin_unlock(&chan->fence.lock); - -- BEGIN_RING(chan, NvSubSw, USE_REFCNT ? 0x0050 : 0x0150, 1); -+ BEGIN_RING(chan, NvSubSw, USE_REFCNT(dev) ? 0x0050 : 0x0150, 1); - OUT_RING(chan, fence->sequence); - FIRE_RING(chan); - -@@ -151,7 +164,26 @@ - } - - void --nouveau_fence_unref(void **sync_obj) -+nouveau_fence_work(struct nouveau_fence *fence, -+ void (*work)(void *priv, bool signalled), -+ void *priv) -+{ -+ BUG_ON(fence->work); -+ -+ spin_lock(&fence->channel->fence.lock); -+ -+ if (fence->signalled) { -+ work(priv, true); -+ } else { -+ fence->work = work; -+ fence->priv = priv; -+ } -+ -+ spin_unlock(&fence->channel->fence.lock); -+} -+ -+void -+__nouveau_fence_unref(void **sync_obj) - { - struct nouveau_fence *fence = nouveau_fence(*sync_obj); - -@@ -161,7 +193,7 @@ - } - - void * --nouveau_fence_ref(void *sync_obj) -+__nouveau_fence_ref(void *sync_obj) - { - struct nouveau_fence *fence = nouveau_fence(sync_obj); - -@@ -170,7 +202,7 @@ - } - - bool --nouveau_fence_signalled(void *sync_obj, void *sync_arg) -+__nouveau_fence_signalled(void *sync_obj, void *sync_arg) - { - struct nouveau_fence *fence = nouveau_fence(sync_obj); - struct nouveau_channel *chan = fence->channel; -@@ -183,13 +215,13 @@ - } - - int --nouveau_fence_wait(void *sync_obj, void *sync_arg, bool lazy, bool intr) -+__nouveau_fence_wait(void *sync_obj, void *sync_arg, bool lazy, bool intr) - { - unsigned long timeout = jiffies + (3 * DRM_HZ); - int ret = 0; - - while (1) { -- if (nouveau_fence_signalled(sync_obj, sync_arg)) -+ if (__nouveau_fence_signalled(sync_obj, sync_arg)) - break; - - if (time_after_eq(jiffies, timeout)) { -@@ -213,33 +245,311 @@ - return ret; - } - -+static struct nouveau_semaphore * -+alloc_semaphore(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_semaphore *sema; -+ int ret; -+ -+ if (!USE_SEMA(dev)) -+ return NULL; -+ -+ sema = kmalloc(sizeof(*sema), GFP_KERNEL); -+ if (!sema) -+ goto fail; -+ -+ ret = drm_mm_pre_get(&dev_priv->fence.heap); -+ if (ret) -+ goto fail; -+ -+ spin_lock(&dev_priv->fence.lock); -+ sema->mem = drm_mm_search_free(&dev_priv->fence.heap, 4, 0, 0); -+ if (sema->mem) -+ sema->mem = drm_mm_get_block_atomic(sema->mem, 4, 0); -+ spin_unlock(&dev_priv->fence.lock); -+ -+ if (!sema->mem) -+ goto fail; -+ -+ kref_init(&sema->ref); -+ sema->dev = dev; -+ nouveau_bo_wr32(dev_priv->fence.bo, sema->mem->start / 4, 0); -+ -+ return sema; -+fail: -+ kfree(sema); -+ return NULL; -+} -+ -+static void -+free_semaphore(struct kref *ref) -+{ -+ struct nouveau_semaphore *sema = -+ container_of(ref, struct nouveau_semaphore, ref); -+ struct drm_nouveau_private *dev_priv = sema->dev->dev_private; -+ -+ spin_lock(&dev_priv->fence.lock); -+ drm_mm_put_block(sema->mem); -+ spin_unlock(&dev_priv->fence.lock); -+ -+ kfree(sema); -+} -+ -+static void -+semaphore_work(void *priv, bool signalled) -+{ -+ struct nouveau_semaphore *sema = priv; -+ struct drm_nouveau_private *dev_priv = sema->dev->dev_private; -+ -+ if (unlikely(!signalled)) -+ nouveau_bo_wr32(dev_priv->fence.bo, sema->mem->start / 4, 1); -+ -+ kref_put(&sema->ref, free_semaphore); -+} -+ -+static int -+emit_semaphore(struct nouveau_channel *chan, int method, -+ struct nouveau_semaphore *sema) -+{ -+ struct drm_nouveau_private *dev_priv = sema->dev->dev_private; -+ struct nouveau_fence *fence; -+ bool smart = (dev_priv->card_type >= NV_50); -+ int ret; -+ -+ ret = RING_SPACE(chan, smart ? 8 : 4); -+ if (ret) -+ return ret; -+ -+ if (smart) { -+ BEGIN_RING(chan, NvSubSw, NV_SW_DMA_SEMAPHORE, 1); -+ OUT_RING(chan, NvSema); -+ } -+ BEGIN_RING(chan, NvSubSw, NV_SW_SEMAPHORE_OFFSET, 1); -+ OUT_RING(chan, sema->mem->start); -+ -+ if (smart && method == NV_SW_SEMAPHORE_ACQUIRE) { -+ /* -+ * NV50 tries to be too smart and context-switch -+ * between semaphores instead of doing a "first come, -+ * first served" strategy like previous cards -+ * do. -+ * -+ * That's bad because the ACQUIRE latency can get as -+ * large as the PFIFO context time slice in the -+ * typical DRI2 case where you have several -+ * outstanding semaphores at the same moment. -+ * -+ * If we're going to ACQUIRE, force the card to -+ * context switch before, just in case the matching -+ * RELEASE is already scheduled to be executed in -+ * another channel. -+ */ -+ BEGIN_RING(chan, NvSubSw, NV_SW_YIELD, 1); -+ OUT_RING(chan, 0); -+ } -+ -+ BEGIN_RING(chan, NvSubSw, method, 1); -+ OUT_RING(chan, 1); -+ -+ if (smart && method == NV_SW_SEMAPHORE_RELEASE) { -+ /* -+ * Force the card to context switch, there may be -+ * another channel waiting for the semaphore we just -+ * released. -+ */ -+ BEGIN_RING(chan, NvSubSw, NV_SW_YIELD, 1); -+ OUT_RING(chan, 0); -+ } -+ -+ /* Delay semaphore destruction until its work is done */ -+ ret = nouveau_fence_new(chan, &fence, true); -+ if (ret) -+ return ret; -+ -+ kref_get(&sema->ref); -+ nouveau_fence_work(fence, semaphore_work, sema); -+ nouveau_fence_unref(&fence); -+ -+ return 0; -+} -+ - int --nouveau_fence_flush(void *sync_obj, void *sync_arg) -+nouveau_fence_sync(struct nouveau_fence *fence, -+ struct nouveau_channel *wchan) -+{ -+ struct nouveau_channel *chan = nouveau_fence_channel(fence); -+ struct drm_device *dev = wchan->dev; -+ struct nouveau_semaphore *sema; -+ int ret = 0; -+ -+ if (likely(!chan || chan == wchan || -+ nouveau_fence_signalled(fence))) -+ goto out; -+ -+ sema = alloc_semaphore(dev); -+ if (!sema) { -+ /* Early card or broken userspace, fall back to -+ * software sync. */ -+ ret = nouveau_fence_wait(fence, true, false); -+ goto out; -+ } -+ -+ /* try to take chan's mutex, if we can't take it right away -+ * we have to fallback to software sync to prevent locking -+ * order issues -+ */ -+ if (!mutex_trylock(&chan->mutex)) { -+ ret = nouveau_fence_wait(fence, true, false); -+ goto out_unref; -+ } -+ -+ /* Make wchan wait until it gets signalled */ -+ ret = emit_semaphore(wchan, NV_SW_SEMAPHORE_ACQUIRE, sema); -+ if (ret) -+ goto out_unlock; -+ -+ /* Signal the semaphore from chan */ -+ ret = emit_semaphore(chan, NV_SW_SEMAPHORE_RELEASE, sema); -+ -+out_unlock: -+ mutex_unlock(&chan->mutex); -+out_unref: -+ kref_put(&sema->ref, free_semaphore); -+out: -+ if (chan) -+ nouveau_channel_put_unlocked(&chan); -+ return ret; -+} -+ -+int -+__nouveau_fence_flush(void *sync_obj, void *sync_arg) - { - return 0; - } - - int --nouveau_fence_init(struct nouveau_channel *chan) -+nouveau_fence_channel_init(struct nouveau_channel *chan) - { -+ struct drm_device *dev = chan->dev; -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_gpuobj *obj = NULL; -+ int ret; -+ -+ /* Create an NV_SW object for various sync purposes */ -+ ret = nouveau_gpuobj_gr_new(chan, NV_SW, &obj); -+ if (ret) -+ return ret; -+ -+ ret = nouveau_ramht_insert(chan, NvSw, obj); -+ nouveau_gpuobj_ref(NULL, &obj); -+ if (ret) -+ return ret; -+ -+ ret = RING_SPACE(chan, 2); -+ if (ret) -+ return ret; -+ BEGIN_RING(chan, NvSubSw, 0, 1); -+ OUT_RING(chan, NvSw); -+ -+ /* Create a DMA object for the shared cross-channel sync area. */ -+ if (USE_SEMA(dev)) { -+ struct drm_mm_node *mem = dev_priv->fence.bo->bo.mem.mm_node; -+ -+ ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, -+ mem->start << PAGE_SHIFT, -+ mem->size << PAGE_SHIFT, -+ NV_DMA_ACCESS_RW, -+ NV_DMA_TARGET_VIDMEM, &obj); -+ if (ret) -+ return ret; -+ -+ ret = nouveau_ramht_insert(chan, NvSema, obj); -+ nouveau_gpuobj_ref(NULL, &obj); -+ if (ret) -+ return ret; -+ -+ ret = RING_SPACE(chan, 2); -+ if (ret) -+ return ret; -+ BEGIN_RING(chan, NvSubSw, NV_SW_DMA_SEMAPHORE, 1); -+ OUT_RING(chan, NvSema); -+ } -+ -+ FIRE_RING(chan); -+ - INIT_LIST_HEAD(&chan->fence.pending); - spin_lock_init(&chan->fence.lock); - atomic_set(&chan->fence.last_sequence_irq, 0); -+ - return 0; - } - - void --nouveau_fence_fini(struct nouveau_channel *chan) -+nouveau_fence_channel_fini(struct nouveau_channel *chan) - { -- struct list_head *entry, *tmp; -- struct nouveau_fence *fence; -+ struct nouveau_fence *tmp, *fence; - -- list_for_each_safe(entry, tmp, &chan->fence.pending) { -- fence = list_entry(entry, struct nouveau_fence, entry); -+ spin_lock(&chan->fence.lock); - -+ list_for_each_entry_safe(fence, tmp, &chan->fence.pending, entry) { - fence->signalled = true; - list_del(&fence->entry); -+ -+ if (unlikely(fence->work)) -+ fence->work(fence->priv, false); -+ - kref_put(&fence->refcount, nouveau_fence_del); - } -+ -+ spin_unlock(&chan->fence.lock); - } - -+int -+nouveau_fence_init(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ int ret; -+ -+ /* Create a shared VRAM heap for cross-channel sync. */ -+ if (USE_SEMA(dev)) { -+ ret = nouveau_bo_new(dev, NULL, 4096, 0, TTM_PL_FLAG_VRAM, -+ 0, 0, false, true, &dev_priv->fence.bo); -+ if (ret) -+ return ret; -+ -+ ret = nouveau_bo_pin(dev_priv->fence.bo, TTM_PL_FLAG_VRAM); -+ if (ret) -+ goto fail; -+ -+ ret = nouveau_bo_map(dev_priv->fence.bo); -+ if (ret) -+ goto fail; -+ -+ ret = drm_mm_init(&dev_priv->fence.heap, 0, -+ dev_priv->fence.bo->bo.mem.size); -+ if (ret) -+ goto fail; -+ -+ spin_lock_init(&dev_priv->fence.lock); -+ } -+ -+ return 0; -+fail: -+ nouveau_bo_unmap(dev_priv->fence.bo); -+ nouveau_bo_ref(NULL, &dev_priv->fence.bo); -+ return ret; -+} -+ -+void -+nouveau_fence_fini(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ -+ if (USE_SEMA(dev)) { -+ drm_mm_takedown(&dev_priv->fence.heap); -+ nouveau_bo_unmap(dev_priv->fence.bo); -+ nouveau_bo_unpin(dev_priv->fence.bo); -+ nouveau_bo_ref(NULL, &dev_priv->fence.bo); -+ } -+} -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_gem.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_gem.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_gem.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_gem.c 2010-10-30 22:24:25.000000000 +0200 -@@ -48,9 +48,6 @@ - return; - nvbo->gem = NULL; - -- if (unlikely(nvbo->cpu_filp)) -- ttm_bo_synccpu_write_release(bo); -- - if (unlikely(nvbo->pin_refcnt)) { - nvbo->pin_refcnt = 1; - nouveau_bo_unpin(nvbo); -@@ -107,23 +104,29 @@ - } - - static bool --nouveau_gem_tile_flags_valid(struct drm_device *dev, uint32_t tile_flags) { -- switch (tile_flags) { -- case 0x0000: -- case 0x1800: -- case 0x2800: -- case 0x4800: -- case 0x7000: -- case 0x7400: -- case 0x7a00: -- case 0xe000: -- break; -- default: -- NV_ERROR(dev, "bad page flags: 0x%08x\n", tile_flags); -- return false; -+nouveau_gem_tile_flags_valid(struct drm_device *dev, uint32_t tile_flags) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ -+ if (dev_priv->card_type >= NV_50) { -+ switch (tile_flags & NOUVEAU_GEM_TILE_LAYOUT_MASK) { -+ case 0x0000: -+ case 0x1800: -+ case 0x2800: -+ case 0x4800: -+ case 0x7000: -+ case 0x7400: -+ case 0x7a00: -+ case 0xe000: -+ return true; -+ } -+ } else { -+ if (!(tile_flags & NOUVEAU_GEM_TILE_LAYOUT_MASK)) -+ return true; - } - -- return true; -+ NV_ERROR(dev, "bad page flags: 0x%08x\n", tile_flags); -+ return false; - } - - int -@@ -140,11 +143,6 @@ - if (unlikely(dev_priv->ttm.bdev.dev_mapping == NULL)) - dev_priv->ttm.bdev.dev_mapping = dev_priv->dev->dev_mapping; - -- if (req->channel_hint) { -- NOUVEAU_GET_USER_CHANNEL_WITH_RETURN(req->channel_hint, -- file_priv, chan); -- } -- - if (req->info.domain & NOUVEAU_GEM_DOMAIN_VRAM) - flags |= TTM_PL_FLAG_VRAM; - if (req->info.domain & NOUVEAU_GEM_DOMAIN_GART) -@@ -155,10 +153,18 @@ - if (!nouveau_gem_tile_flags_valid(dev, req->info.tile_flags)) - return -EINVAL; - -+ if (req->channel_hint) { -+ chan = nouveau_channel_get(dev, file_priv, req->channel_hint); -+ if (IS_ERR(chan)) -+ return PTR_ERR(chan); -+ } -+ - ret = nouveau_gem_new(dev, chan, req->info.size, req->align, flags, - req->info.tile_mode, req->info.tile_flags, false, - (req->info.domain & NOUVEAU_GEM_DOMAIN_MAPPABLE), - &nvbo); -+ if (chan) -+ nouveau_channel_put(&chan); - if (ret) - return ret; - -@@ -225,15 +231,8 @@ - - list_for_each_safe(entry, tmp, list) { - nvbo = list_entry(entry, struct nouveau_bo, entry); -- if (likely(fence)) { -- struct nouveau_fence *prev_fence; - -- spin_lock(&nvbo->bo.lock); -- prev_fence = nvbo->bo.sync_obj; -- nvbo->bo.sync_obj = nouveau_fence_ref(fence); -- spin_unlock(&nvbo->bo.lock); -- nouveau_fence_unref((void *)&prev_fence); -- } -+ nouveau_bo_fence(nvbo, fence); - - if (unlikely(nvbo->validate_mapped)) { - ttm_bo_kunmap(&nvbo->kmap); -@@ -293,14 +292,15 @@ - return -EINVAL; - } - -- ret = ttm_bo_reserve(&nvbo->bo, false, false, true, sequence); -+ ret = ttm_bo_reserve(&nvbo->bo, true, false, true, sequence); - if (ret) { - validate_fini(op, NULL); -- if (ret == -EAGAIN) -- ret = ttm_bo_wait_unreserved(&nvbo->bo, false); -+ if (unlikely(ret == -EAGAIN)) -+ ret = ttm_bo_wait_unreserved(&nvbo->bo, true); - drm_gem_object_unreference_unlocked(gem); -- if (ret) { -- NV_ERROR(dev, "fail reserve\n"); -+ if (unlikely(ret)) { -+ if (ret != -ERESTARTSYS) -+ NV_ERROR(dev, "fail reserve\n"); - return ret; - } - goto retry; -@@ -325,25 +325,6 @@ - validate_fini(op, NULL); - return -EINVAL; - } -- -- if (unlikely(atomic_read(&nvbo->bo.cpu_writers) > 0)) { -- validate_fini(op, NULL); -- -- if (nvbo->cpu_filp == file_priv) { -- NV_ERROR(dev, "bo %p mapped by process trying " -- "to validate it!\n", nvbo); -- return -EINVAL; -- } -- -- mutex_unlock(&drm_global_mutex); -- ret = ttm_bo_wait_cpu(&nvbo->bo, false); -- mutex_lock(&drm_global_mutex); -- if (ret) { -- NV_ERROR(dev, "fail wait_cpu\n"); -- return ret; -- } -- goto retry; -- } - } - - return 0; -@@ -362,7 +343,7 @@ - list_for_each_entry(nvbo, list, entry) { - struct drm_nouveau_gem_pushbuf_bo *b = &pbbo[nvbo->pbbo_index]; - -- ret = nouveau_bo_sync_gpu(nvbo, chan); -+ ret = nouveau_fence_sync(nvbo->bo.sync_obj, chan); - if (unlikely(ret)) { - NV_ERROR(dev, "fail pre-validate sync\n"); - return ret; -@@ -378,14 +359,15 @@ - - nvbo->channel = (b->read_domains & (1 << 31)) ? NULL : chan; - ret = ttm_bo_validate(&nvbo->bo, &nvbo->placement, -- false, false, false); -+ true, false, false); - nvbo->channel = NULL; - if (unlikely(ret)) { -- NV_ERROR(dev, "fail ttm_validate\n"); -+ if (ret != -ERESTARTSYS) -+ NV_ERROR(dev, "fail ttm_validate\n"); - return ret; - } - -- ret = nouveau_bo_sync_gpu(nvbo, chan); -+ ret = nouveau_fence_sync(nvbo->bo.sync_obj, chan); - if (unlikely(ret)) { - NV_ERROR(dev, "fail post-validate sync\n"); - return ret; -@@ -433,13 +415,15 @@ - - ret = validate_init(chan, file_priv, pbbo, nr_buffers, op); - if (unlikely(ret)) { -- NV_ERROR(dev, "validate_init\n"); -+ if (ret != -ERESTARTSYS) -+ NV_ERROR(dev, "validate_init\n"); - return ret; - } - - ret = validate_list(chan, &op->vram_list, pbbo, user_buffers); - if (unlikely(ret < 0)) { -- NV_ERROR(dev, "validate vram_list\n"); -+ if (ret != -ERESTARTSYS) -+ NV_ERROR(dev, "validate vram_list\n"); - validate_fini(op, NULL); - return ret; - } -@@ -447,7 +431,8 @@ - - ret = validate_list(chan, &op->gart_list, pbbo, user_buffers); - if (unlikely(ret < 0)) { -- NV_ERROR(dev, "validate gart_list\n"); -+ if (ret != -ERESTARTSYS) -+ NV_ERROR(dev, "validate gart_list\n"); - validate_fini(op, NULL); - return ret; - } -@@ -455,7 +440,8 @@ - - ret = validate_list(chan, &op->both_list, pbbo, user_buffers); - if (unlikely(ret < 0)) { -- NV_ERROR(dev, "validate both_list\n"); -+ if (ret != -ERESTARTSYS) -+ NV_ERROR(dev, "validate both_list\n"); - validate_fini(op, NULL); - return ret; - } -@@ -579,7 +565,9 @@ - struct nouveau_fence *fence = NULL; - int i, j, ret = 0, do_reloc = 0; - -- NOUVEAU_GET_USER_CHANNEL_WITH_RETURN(req->channel, file_priv, chan); -+ chan = nouveau_channel_get(dev, file_priv, req->channel); -+ if (IS_ERR(chan)) -+ return PTR_ERR(chan); - - req->vram_available = dev_priv->fb_aper_free; - req->gart_available = dev_priv->gart_info.aper_free; -@@ -589,28 +577,34 @@ - if (unlikely(req->nr_push > NOUVEAU_GEM_MAX_PUSH)) { - NV_ERROR(dev, "pushbuf push count exceeds limit: %d max %d\n", - req->nr_push, NOUVEAU_GEM_MAX_PUSH); -+ nouveau_channel_put(&chan); - return -EINVAL; - } - - if (unlikely(req->nr_buffers > NOUVEAU_GEM_MAX_BUFFERS)) { - NV_ERROR(dev, "pushbuf bo count exceeds limit: %d max %d\n", - req->nr_buffers, NOUVEAU_GEM_MAX_BUFFERS); -+ nouveau_channel_put(&chan); - return -EINVAL; - } - - if (unlikely(req->nr_relocs > NOUVEAU_GEM_MAX_RELOCS)) { - NV_ERROR(dev, "pushbuf reloc count exceeds limit: %d max %d\n", - req->nr_relocs, NOUVEAU_GEM_MAX_RELOCS); -+ nouveau_channel_put(&chan); - return -EINVAL; - } - - push = u_memcpya(req->push, req->nr_push, sizeof(*push)); -- if (IS_ERR(push)) -+ if (IS_ERR(push)) { -+ nouveau_channel_put(&chan); - return PTR_ERR(push); -+ } - - bo = u_memcpya(req->buffers, req->nr_buffers, sizeof(*bo)); - if (IS_ERR(bo)) { - kfree(push); -+ nouveau_channel_put(&chan); - return PTR_ERR(bo); - } - -@@ -633,7 +627,8 @@ - ret = nouveau_gem_pushbuf_validate(chan, file_priv, bo, req->buffers, - req->nr_buffers, &op, &do_reloc); - if (ret) { -- NV_ERROR(dev, "validate: %d\n", ret); -+ if (ret != -ERESTARTSYS) -+ NV_ERROR(dev, "validate: %d\n", ret); - goto out; - } - -@@ -726,7 +721,7 @@ - - out: - validate_fini(&op, fence); -- nouveau_fence_unref((void**)&fence); -+ nouveau_fence_unref(&fence); - kfree(bo); - kfree(push); - -@@ -744,6 +739,7 @@ - req->suffix1 = 0x00000000; - } - -+ nouveau_channel_put(&chan); - return ret; - } - -@@ -775,26 +771,9 @@ - return -ENOENT; - nvbo = nouveau_gem_object(gem); - -- if (nvbo->cpu_filp) { -- if (nvbo->cpu_filp == file_priv) -- goto out; -- -- ret = ttm_bo_wait_cpu(&nvbo->bo, no_wait); -- if (ret) -- goto out; -- } -- -- if (req->flags & NOUVEAU_GEM_CPU_PREP_NOBLOCK) { -- spin_lock(&nvbo->bo.lock); -- ret = ttm_bo_wait(&nvbo->bo, false, false, no_wait); -- spin_unlock(&nvbo->bo.lock); -- } else { -- ret = ttm_bo_synccpu_write_grab(&nvbo->bo, no_wait); -- if (ret == 0) -- nvbo->cpu_filp = file_priv; -- } -- --out: -+ spin_lock(&nvbo->bo.lock); -+ ret = ttm_bo_wait(&nvbo->bo, true, true, no_wait); -+ spin_unlock(&nvbo->bo.lock); - drm_gem_object_unreference_unlocked(gem); - return ret; - } -@@ -803,26 +782,7 @@ - nouveau_gem_ioctl_cpu_fini(struct drm_device *dev, void *data, - struct drm_file *file_priv) - { -- struct drm_nouveau_gem_cpu_prep *req = data; -- struct drm_gem_object *gem; -- struct nouveau_bo *nvbo; -- int ret = -EINVAL; -- -- gem = drm_gem_object_lookup(dev, file_priv, req->handle); -- if (!gem) -- return -ENOENT; -- nvbo = nouveau_gem_object(gem); -- -- if (nvbo->cpu_filp != file_priv) -- goto out; -- nvbo->cpu_filp = NULL; -- -- ttm_bo_synccpu_write_release(&nvbo->bo); -- ret = 0; -- --out: -- drm_gem_object_unreference_unlocked(gem); -- return ret; -+ return 0; - } - - int -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_grctx.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_grctx.h ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_grctx.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_grctx.h 2010-10-30 22:24:25.000000000 +0200 -@@ -126,7 +126,7 @@ - reg = (reg - 0x00400000) / 4; - reg = (reg - ctx->ctxprog_reg) + ctx->ctxvals_base; - -- nv_wo32(ctx->dev, ctx->data, reg, val); -+ nv_wo32(ctx->data, reg * 4, val); - } - #endif - -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_hw.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_hw.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_hw.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_hw.c 2010-10-30 22:24:25.000000000 +0200 -@@ -305,7 +305,7 @@ - bool mpll = Preg == 0x4020; - uint32_t oldPval = nvReadMC(dev, Preg); - uint32_t NMNM = pv->NM2 << 16 | pv->NM1; -- uint32_t Pval = (oldPval & (mpll ? ~(0x11 << 16) : ~(1 << 16))) | -+ uint32_t Pval = (oldPval & (mpll ? ~(0x77 << 16) : ~(7 << 16))) | - 0xc << 28 | pv->log2P << 16; - uint32_t saved4600 = 0; - /* some cards have different maskc040s */ -@@ -427,22 +427,12 @@ - struct nouveau_pll_vals *pllvals) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; -- const uint32_t nv04_regs[MAX_PLL_TYPES] = { NV_PRAMDAC_NVPLL_COEFF, -- NV_PRAMDAC_MPLL_COEFF, -- NV_PRAMDAC_VPLL_COEFF, -- NV_RAMDAC_VPLL2 }; -- const uint32_t nv40_regs[MAX_PLL_TYPES] = { 0x4000, -- 0x4020, -- NV_PRAMDAC_VPLL_COEFF, -- NV_RAMDAC_VPLL2 }; -- uint32_t reg1, pll1, pll2 = 0; -+ uint32_t reg1 = get_pll_register(dev, plltype), pll1, pll2 = 0; - struct pll_lims pll_lim; - int ret; - -- if (dev_priv->card_type < NV_40) -- reg1 = nv04_regs[plltype]; -- else -- reg1 = nv40_regs[plltype]; -+ if (reg1 == 0) -+ return -ENOENT; - - pll1 = nvReadMC(dev, reg1); - -@@ -491,8 +481,10 @@ - nouveau_hw_get_clock(struct drm_device *dev, enum pll_types plltype) - { - struct nouveau_pll_vals pllvals; -+ int ret; - -- if (plltype == MPLL && (dev->pci_device & 0x0ff0) == CHIPSET_NFORCE) { -+ if (plltype == PLL_MEMORY && -+ (dev->pci_device & 0x0ff0) == CHIPSET_NFORCE) { - uint32_t mpllP; - - pci_read_config_dword(pci_get_bus_and_slot(0, 3), 0x6c, &mpllP); -@@ -501,14 +493,17 @@ - - return 400000 / mpllP; - } else -- if (plltype == MPLL && (dev->pci_device & 0xff0) == CHIPSET_NFORCE2) { -+ if (plltype == PLL_MEMORY && -+ (dev->pci_device & 0xff0) == CHIPSET_NFORCE2) { - uint32_t clock; - - pci_read_config_dword(pci_get_bus_and_slot(0, 5), 0x4c, &clock); - return clock; - } - -- nouveau_hw_get_pllvals(dev, plltype, &pllvals); -+ ret = nouveau_hw_get_pllvals(dev, plltype, &pllvals); -+ if (ret) -+ return ret; - - return nouveau_hw_pllvals_to_clk(&pllvals); - } -@@ -524,11 +519,11 @@ - - struct pll_lims pll_lim; - struct nouveau_pll_vals pv; -- uint32_t pllreg = head ? NV_RAMDAC_VPLL2 : NV_PRAMDAC_VPLL_COEFF; -+ enum pll_types pll = head ? PLL_VPLL1 : PLL_VPLL0; - -- if (get_pll_limits(dev, head ? VPLL2 : VPLL1, &pll_lim)) -+ if (get_pll_limits(dev, pll, &pll_lim)) - return; -- nouveau_hw_get_pllvals(dev, head ? VPLL2 : VPLL1, &pv); -+ nouveau_hw_get_pllvals(dev, pll, &pv); - - if (pv.M1 >= pll_lim.vco1.min_m && pv.M1 <= pll_lim.vco1.max_m && - pv.N1 >= pll_lim.vco1.min_n && pv.N1 <= pll_lim.vco1.max_n && -@@ -541,7 +536,7 @@ - pv.M1 = pll_lim.vco1.max_m; - pv.N1 = pll_lim.vco1.min_n; - pv.log2P = pll_lim.max_usable_log2p; -- nouveau_hw_setpll(dev, pllreg, &pv); -+ nouveau_hw_setpll(dev, pll_lim.reg, &pv); - } - - /* -@@ -661,7 +656,7 @@ - if (dev_priv->card_type >= NV_10) - regp->nv10_cursync = NVReadRAMDAC(dev, head, NV_RAMDAC_NV10_CURSYNC); - -- nouveau_hw_get_pllvals(dev, head ? VPLL2 : VPLL1, ®p->pllvals); -+ nouveau_hw_get_pllvals(dev, head ? PLL_VPLL1 : PLL_VPLL0, ®p->pllvals); - state->pllsel = NVReadRAMDAC(dev, 0, NV_PRAMDAC_PLL_COEFF_SELECT); - if (nv_two_heads(dev)) - state->sel_clk = NVReadRAMDAC(dev, 0, NV_PRAMDAC_SEL_CLK); -@@ -866,10 +861,11 @@ - rd_cio_state(dev, head, regp, NV_CIO_CRE_FFLWM__INDEX); - rd_cio_state(dev, head, regp, NV_CIO_CRE_21); - -- if (dev_priv->card_type >= NV_30) { -+ if (dev_priv->card_type >= NV_20) - rd_cio_state(dev, head, regp, NV_CIO_CRE_47); -+ -+ if (dev_priv->card_type >= NV_30) - rd_cio_state(dev, head, regp, 0x9f); -- } - - rd_cio_state(dev, head, regp, NV_CIO_CRE_49); - rd_cio_state(dev, head, regp, NV_CIO_CRE_HCUR_ADDR0_INDEX); -@@ -957,7 +953,7 @@ - NVWriteCRTC(dev, head, NV_PCRTC_850, regp->crtc_850); - - reg900 = NVReadRAMDAC(dev, head, NV_PRAMDAC_900); -- if (regp->crtc_cfg == NV_PCRTC_CONFIG_START_ADDRESS_HSYNC) -+ if (regp->crtc_cfg == NV10_PCRTC_CONFIG_START_ADDRESS_HSYNC) - NVWriteRAMDAC(dev, head, NV_PRAMDAC_900, reg900 | 0x10000); - else - NVWriteRAMDAC(dev, head, NV_PRAMDAC_900, reg900 & ~0x10000); -@@ -976,10 +972,11 @@ - wr_cio_state(dev, head, regp, NV_CIO_CRE_FF_INDEX); - wr_cio_state(dev, head, regp, NV_CIO_CRE_FFLWM__INDEX); - -- if (dev_priv->card_type >= NV_30) { -+ if (dev_priv->card_type >= NV_20) - wr_cio_state(dev, head, regp, NV_CIO_CRE_47); -+ -+ if (dev_priv->card_type >= NV_30) - wr_cio_state(dev, head, regp, 0x9f); -- } - - wr_cio_state(dev, head, regp, NV_CIO_CRE_49); - wr_cio_state(dev, head, regp, NV_CIO_CRE_HCUR_ADDR0_INDEX); -@@ -1020,8 +1017,9 @@ - - NVWriteCRTC(dev, head, NV_PCRTC_START, regp->fb_start); - -- /* Setting 1 on this value gives you interrupts for every vblank period. */ -- NVWriteCRTC(dev, head, NV_PCRTC_INTR_EN_0, 0); -+ /* Enable vblank interrupts. */ -+ NVWriteCRTC(dev, head, NV_PCRTC_INTR_EN_0, -+ (dev->vblank_enabled[head] ? 1 : 0)); - NVWriteCRTC(dev, head, NV_PCRTC_INTR_0, NV_PCRTC_INTR_0_VBLANK); - } - -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_hw.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_hw.h ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_hw.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_hw.h 2010-10-30 22:24:25.000000000 +0200 -@@ -416,6 +416,25 @@ - } - - static inline void -+nv_set_crtc_base(struct drm_device *dev, int head, uint32_t offset) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ -+ NVWriteCRTC(dev, head, NV_PCRTC_START, offset); -+ -+ if (dev_priv->card_type == NV_04) { -+ /* -+ * Hilarious, the 24th bit doesn't want to stick to -+ * PCRTC_START... -+ */ -+ int cre_heb = NVReadVgaCrtc(dev, head, NV_CIO_CRE_HEB__INDEX); -+ -+ NVWriteVgaCrtc(dev, head, NV_CIO_CRE_HEB__INDEX, -+ (cre_heb & ~0x40) | ((offset >> 18) & 0x40)); -+ } -+} -+ -+static inline void - nv_show_cursor(struct drm_device *dev, int head, bool show) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_i2c.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_i2c.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_i2c.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_i2c.c 2010-10-30 22:24:25.000000000 +0200 -@@ -299,7 +299,10 @@ - - int - nouveau_i2c_identify(struct drm_device *dev, const char *what, -- struct i2c_board_info *info, int index) -+ struct i2c_board_info *info, -+ bool (*match)(struct nouveau_i2c_chan *, -+ struct i2c_board_info *), -+ int index) - { - struct nouveau_i2c_chan *i2c = nouveau_i2c_find(dev, index); - int i; -@@ -307,7 +310,8 @@ - NV_DEBUG(dev, "Probing %ss on I2C bus: %d\n", what, index); - - for (i = 0; info[i].addr; i++) { -- if (nouveau_probe_i2c_addr(i2c, info[i].addr)) { -+ if (nouveau_probe_i2c_addr(i2c, info[i].addr) && -+ (!match || match(i2c, &info[i]))) { - NV_INFO(dev, "Detected %s: %s\n", what, info[i].type); - return i; - } -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_i2c.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_i2c.h ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_i2c.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_i2c.h 2010-10-30 22:24:25.000000000 +0200 -@@ -44,7 +44,10 @@ - struct nouveau_i2c_chan *nouveau_i2c_find(struct drm_device *, int index); - bool nouveau_probe_i2c_addr(struct nouveau_i2c_chan *i2c, int addr); - int nouveau_i2c_identify(struct drm_device *dev, const char *what, -- struct i2c_board_info *info, int index); -+ struct i2c_board_info *info, -+ bool (*match)(struct nouveau_i2c_chan *, -+ struct i2c_board_info *), -+ int index); - - extern const struct i2c_algorithm nouveau_dp_i2c_algo; - -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_irq.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_irq.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_irq.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_irq.c 2010-10-30 22:24:25.000000000 +0200 -@@ -35,12 +35,20 @@ - #include "nouveau_drm.h" - #include "nouveau_drv.h" - #include "nouveau_reg.h" -+#include "nouveau_ramht.h" - #include - - /* needed for hotplug irq */ - #include "nouveau_connector.h" - #include "nv50_display.h" - -+static DEFINE_RATELIMIT_STATE(nouveau_ratelimit_state, 3 * HZ, 20); -+ -+static int nouveau_ratelimit(void) -+{ -+ return __ratelimit(&nouveau_ratelimit_state); -+} -+ - void - nouveau_irq_preinstall(struct drm_device *dev) - { -@@ -59,8 +67,13 @@ - int - nouveau_irq_postinstall(struct drm_device *dev) - { -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ - /* Master enable */ - nv_wr32(dev, NV03_PMC_INTR_EN_0, NV_PMC_INTR_EN_0_MASTER_ENABLE); -+ if (dev_priv->msi_enabled) -+ nv_wr08(dev, 0x00088068, 0xff); -+ - return 0; - } - -@@ -71,63 +84,50 @@ - nv_wr32(dev, NV03_PMC_INTR_EN_0, 0); - } - --static int --nouveau_call_method(struct nouveau_channel *chan, int class, int mthd, int data) --{ -- struct drm_nouveau_private *dev_priv = chan->dev->dev_private; -- struct nouveau_pgraph_object_method *grm; -- struct nouveau_pgraph_object_class *grc; -- -- grc = dev_priv->engine.graph.grclass; -- while (grc->id) { -- if (grc->id == class) -- break; -- grc++; -- } -- -- if (grc->id != class || !grc->methods) -- return -ENOENT; -- -- grm = grc->methods; -- while (grm->id) { -- if (grm->id == mthd) -- return grm->exec(chan, class, mthd, data); -- grm++; -- } -- -- return -ENOENT; --} -- - static bool --nouveau_fifo_swmthd(struct nouveau_channel *chan, uint32_t addr, uint32_t data) -+nouveau_fifo_swmthd(struct drm_device *dev, u32 chid, u32 addr, u32 data) - { -- struct drm_device *dev = chan->dev; -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_channel *chan = NULL; -+ struct nouveau_gpuobj *obj; -+ unsigned long flags; - const int subc = (addr >> 13) & 0x7; - const int mthd = addr & 0x1ffc; -+ bool handled = false; -+ u32 engine; - -- if (mthd == 0x0000) { -- struct nouveau_gpuobj_ref *ref = NULL; -+ spin_lock_irqsave(&dev_priv->channels.lock, flags); -+ if (likely(chid >= 0 && chid < dev_priv->engine.fifo.channels)) -+ chan = dev_priv->channels.ptr[chid]; -+ if (unlikely(!chan)) -+ goto out; -+ -+ switch (mthd) { -+ case 0x0000: /* bind object to subchannel */ -+ obj = nouveau_ramht_find(chan, data); -+ if (unlikely(!obj || obj->engine != NVOBJ_ENGINE_SW)) -+ break; - -- if (nouveau_gpuobj_ref_find(chan, data, &ref)) -- return false; -+ chan->sw_subchannel[subc] = obj->class; -+ engine = 0x0000000f << (subc * 4); - -- if (ref->gpuobj->engine != NVOBJ_ENGINE_SW) -- return false; -+ nv_mask(dev, NV04_PFIFO_CACHE1_ENGINE, engine, 0x00000000); -+ handled = true; -+ break; -+ default: -+ engine = nv_rd32(dev, NV04_PFIFO_CACHE1_ENGINE); -+ if (unlikely(((engine >> (subc * 4)) & 0xf) != 0)) -+ break; - -- chan->sw_subchannel[subc] = ref->gpuobj->class; -- nv_wr32(dev, NV04_PFIFO_CACHE1_ENGINE, nv_rd32(dev, -- NV04_PFIFO_CACHE1_ENGINE) & ~(0xf << subc * 4)); -- return true; -+ if (!nouveau_gpuobj_mthd_call(chan, chan->sw_subchannel[subc], -+ mthd, data)) -+ handled = true; -+ break; - } - -- /* hw object */ -- if (nv_rd32(dev, NV04_PFIFO_CACHE1_ENGINE) & (1 << (subc*4))) -- return false; -- -- if (nouveau_call_method(chan, chan->sw_subchannel[subc], mthd, data)) -- return false; -- -- return true; -+out: -+ spin_unlock_irqrestore(&dev_priv->channels.lock, flags); -+ return handled; - } - - static void -@@ -140,14 +140,11 @@ - - reassign = nv_rd32(dev, NV03_PFIFO_CACHES) & 1; - while ((status = nv_rd32(dev, NV03_PFIFO_INTR_0)) && (cnt++ < 100)) { -- struct nouveau_channel *chan = NULL; - uint32_t chid, get; - - nv_wr32(dev, NV03_PFIFO_CACHES, 0); - - chid = engine->fifo.channel_id(dev); -- if (chid >= 0 && chid < engine->fifo.channels) -- chan = dev_priv->fifos[chid]; - get = nv_rd32(dev, NV03_PFIFO_CACHE1_GET); - - if (status & NV_PFIFO_INTR_CACHE_ERROR) { -@@ -174,7 +171,7 @@ - NV40_PFIFO_CACHE1_DATA(ptr)); - } - -- if (!chan || !nouveau_fifo_swmthd(chan, mthd, data)) { -+ if (!nouveau_fifo_swmthd(dev, chid, mthd, data)) { - NV_INFO(dev, "PFIFO_CACHE_ERROR - Ch %d/%d " - "Mthd 0x%04x Data 0x%08x\n", - chid, (mthd >> 13) & 7, mthd & 0x1ffc, -@@ -200,16 +197,47 @@ - } - - if (status & NV_PFIFO_INTR_DMA_PUSHER) { -- NV_INFO(dev, "PFIFO_DMA_PUSHER - Ch %d\n", chid); -+ u32 dma_get = nv_rd32(dev, 0x003244); -+ u32 dma_put = nv_rd32(dev, 0x003240); -+ u32 push = nv_rd32(dev, 0x003220); -+ u32 state = nv_rd32(dev, 0x003228); -+ -+ if (dev_priv->card_type == NV_50) { -+ u32 ho_get = nv_rd32(dev, 0x003328); -+ u32 ho_put = nv_rd32(dev, 0x003320); -+ u32 ib_get = nv_rd32(dev, 0x003334); -+ u32 ib_put = nv_rd32(dev, 0x003330); -+ -+ if (nouveau_ratelimit()) -+ NV_INFO(dev, "PFIFO_DMA_PUSHER - Ch %d Get 0x%02x%08x " -+ "Put 0x%02x%08x IbGet 0x%08x IbPut 0x%08x " -+ "State 0x%08x Push 0x%08x\n", -+ chid, ho_get, dma_get, ho_put, -+ dma_put, ib_get, ib_put, state, -+ push); -+ -+ /* METHOD_COUNT, in DMA_STATE on earlier chipsets */ -+ nv_wr32(dev, 0x003364, 0x00000000); -+ if (dma_get != dma_put || ho_get != ho_put) { -+ nv_wr32(dev, 0x003244, dma_put); -+ nv_wr32(dev, 0x003328, ho_put); -+ } else -+ if (ib_get != ib_put) { -+ nv_wr32(dev, 0x003334, ib_put); -+ } -+ } else { -+ NV_INFO(dev, "PFIFO_DMA_PUSHER - Ch %d Get 0x%08x " -+ "Put 0x%08x State 0x%08x Push 0x%08x\n", -+ chid, dma_get, dma_put, state, push); - -- status &= ~NV_PFIFO_INTR_DMA_PUSHER; -- nv_wr32(dev, NV03_PFIFO_INTR_0, -- NV_PFIFO_INTR_DMA_PUSHER); -+ if (dma_get != dma_put) -+ nv_wr32(dev, 0x003244, dma_put); -+ } - -- nv_wr32(dev, NV04_PFIFO_CACHE1_DMA_STATE, 0x00000000); -- if (nv_rd32(dev, NV04_PFIFO_CACHE1_DMA_PUT) != get) -- nv_wr32(dev, NV04_PFIFO_CACHE1_DMA_GET, -- get + 4); -+ nv_wr32(dev, 0x003228, 0x00000000); -+ nv_wr32(dev, 0x003220, 0x00000001); -+ nv_wr32(dev, 0x002100, NV_PFIFO_INTR_DMA_PUSHER); -+ status &= ~NV_PFIFO_INTR_DMA_PUSHER; - } - - if (status & NV_PFIFO_INTR_SEMAPHORE) { -@@ -226,9 +254,18 @@ - nv_wr32(dev, NV04_PFIFO_CACHE1_PULL0, 1); - } - -+ if (dev_priv->card_type == NV_50) { -+ if (status & 0x00000010) { -+ nv50_fb_vm_trap(dev, 1, "PFIFO_BAR_FAULT"); -+ status &= ~0x00000010; -+ nv_wr32(dev, 0x002100, 0x00000010); -+ } -+ } -+ - if (status) { -- NV_INFO(dev, "PFIFO_INTR 0x%08x - Ch %d\n", -- status, chid); -+ if (nouveau_ratelimit()) -+ NV_INFO(dev, "PFIFO_INTR 0x%08x - Ch %d\n", -+ status, chid); - nv_wr32(dev, NV03_PFIFO_INTR_0, status); - status = 0; - } -@@ -342,6 +379,8 @@ - nouveau_graph_chid_from_grctx(struct drm_device *dev) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_channel *chan; -+ unsigned long flags; - uint32_t inst; - int i; - -@@ -351,27 +390,29 @@ - if (dev_priv->card_type < NV_50) { - inst = (nv_rd32(dev, 0x40032c) & 0xfffff) << 4; - -+ spin_lock_irqsave(&dev_priv->channels.lock, flags); - for (i = 0; i < dev_priv->engine.fifo.channels; i++) { -- struct nouveau_channel *chan = dev_priv->fifos[i]; -- -+ chan = dev_priv->channels.ptr[i]; - if (!chan || !chan->ramin_grctx) - continue; - -- if (inst == chan->ramin_grctx->instance) -+ if (inst == chan->ramin_grctx->pinst) - break; - } -+ spin_unlock_irqrestore(&dev_priv->channels.lock, flags); - } else { - inst = (nv_rd32(dev, 0x40032c) & 0xfffff) << 12; - -+ spin_lock_irqsave(&dev_priv->channels.lock, flags); - for (i = 0; i < dev_priv->engine.fifo.channels; i++) { -- struct nouveau_channel *chan = dev_priv->fifos[i]; -- -+ chan = dev_priv->channels.ptr[i]; - if (!chan || !chan->ramin) - continue; - -- if (inst == chan->ramin->instance) -+ if (inst == chan->ramin->vinst) - break; - } -+ spin_unlock_irqrestore(&dev_priv->channels.lock, flags); - } - - -@@ -393,7 +434,8 @@ - else - channel = nouveau_graph_chid_from_grctx(dev); - -- if (channel >= engine->fifo.channels || !dev_priv->fifos[channel]) { -+ if (channel >= engine->fifo.channels || -+ !dev_priv->channels.ptr[channel]) { - NV_ERROR(dev, "AIII, invalid/inactive channel id %d\n", channel); - return -EINVAL; - } -@@ -476,14 +518,20 @@ - struct nouveau_pgraph_trap *trap) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_channel *chan; -+ unsigned long flags; -+ int ret = -EINVAL; - -- if (trap->channel < 0 || -- trap->channel >= dev_priv->engine.fifo.channels || -- !dev_priv->fifos[trap->channel]) -- return -ENODEV; -+ spin_lock_irqsave(&dev_priv->channels.lock, flags); -+ if (trap->channel > 0 && -+ trap->channel < dev_priv->engine.fifo.channels && -+ dev_priv->channels.ptr[trap->channel]) { -+ chan = dev_priv->channels.ptr[trap->channel]; -+ ret = nouveau_gpuobj_mthd_call(chan, trap->class, trap->mthd, trap->data); -+ } -+ spin_unlock_irqrestore(&dev_priv->channels.lock, flags); - -- return nouveau_call_method(dev_priv->fifos[trap->channel], -- trap->class, trap->mthd, trap->data); -+ return ret; - } - - static inline void -@@ -505,13 +553,6 @@ - nouveau_graph_dump_trap_info(dev, "PGRAPH_NOTIFY", &trap); - } - --static DEFINE_RATELIMIT_STATE(nouveau_ratelimit_state, 3 * HZ, 20); -- --static int nouveau_ratelimit(void) --{ -- return __ratelimit(&nouveau_ratelimit_state); --} -- - - static inline void - nouveau_pgraph_intr_error(struct drm_device *dev, uint32_t nsource) -@@ -605,40 +646,6 @@ - nv_wr32(dev, NV03_PMC_INTR_0, NV_PMC_INTR_0_PGRAPH_PENDING); - } - --static void --nv50_pfb_vm_trap(struct drm_device *dev, int display, const char *name) --{ -- struct drm_nouveau_private *dev_priv = dev->dev_private; -- uint32_t trap[6]; -- int i, ch; -- uint32_t idx = nv_rd32(dev, 0x100c90); -- if (idx & 0x80000000) { -- idx &= 0xffffff; -- if (display) { -- for (i = 0; i < 6; i++) { -- nv_wr32(dev, 0x100c90, idx | i << 24); -- trap[i] = nv_rd32(dev, 0x100c94); -- } -- for (ch = 0; ch < dev_priv->engine.fifo.channels; ch++) { -- struct nouveau_channel *chan = dev_priv->fifos[ch]; -- -- if (!chan || !chan->ramin) -- continue; -- -- if (trap[1] == chan->ramin->instance >> 12) -- break; -- } -- NV_INFO(dev, "%s - VM: Trapped %s at %02x%04x%04x status %08x %08x channel %d\n", -- name, (trap[5]&0x100?"read":"write"), -- trap[5]&0xff, trap[4]&0xffff, -- trap[3]&0xffff, trap[0], trap[2], ch); -- } -- nv_wr32(dev, 0x100c90, idx | 0x80000000); -- } else if (display) { -- NV_INFO(dev, "%s - no VM fault?\n", name); -- } --} -- - static struct nouveau_enum_names nv50_mp_exec_error_names[] = - { - { 3, "STACK_UNDERFLOW" }, -@@ -711,7 +718,7 @@ - tps++; - switch (type) { - case 6: /* texture error... unknown for now */ -- nv50_pfb_vm_trap(dev, display, name); -+ nv50_fb_vm_trap(dev, display, name); - if (display) { - NV_ERROR(dev, "magic set %d:\n", i); - for (r = ustatus_addr + 4; r <= ustatus_addr + 0x10; r += 4) -@@ -734,7 +741,7 @@ - uint32_t e1c = nv_rd32(dev, ustatus_addr + 0x14); - uint32_t e20 = nv_rd32(dev, ustatus_addr + 0x18); - uint32_t e24 = nv_rd32(dev, ustatus_addr + 0x1c); -- nv50_pfb_vm_trap(dev, display, name); -+ nv50_fb_vm_trap(dev, display, name); - /* 2d engine destination */ - if (ustatus & 0x00000010) { - if (display) { -@@ -817,7 +824,7 @@ - - /* Known to be triggered by screwed up NOTIFY and COND... */ - if (ustatus & 0x00000001) { -- nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_DISPATCH_FAULT"); -+ nv50_fb_vm_trap(dev, display, "PGRAPH_TRAP_DISPATCH_FAULT"); - nv_wr32(dev, 0x400500, 0); - if (nv_rd32(dev, 0x400808) & 0x80000000) { - if (display) { -@@ -842,7 +849,7 @@ - ustatus &= ~0x00000001; - } - if (ustatus & 0x00000002) { -- nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_DISPATCH_QUERY"); -+ nv50_fb_vm_trap(dev, display, "PGRAPH_TRAP_DISPATCH_QUERY"); - nv_wr32(dev, 0x400500, 0); - if (nv_rd32(dev, 0x40084c) & 0x80000000) { - if (display) { -@@ -884,15 +891,15 @@ - NV_INFO(dev, "PGRAPH_TRAP_M2MF - no ustatus?\n"); - } - if (ustatus & 0x00000001) { -- nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_M2MF_NOTIFY"); -+ nv50_fb_vm_trap(dev, display, "PGRAPH_TRAP_M2MF_NOTIFY"); - ustatus &= ~0x00000001; - } - if (ustatus & 0x00000002) { -- nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_M2MF_IN"); -+ nv50_fb_vm_trap(dev, display, "PGRAPH_TRAP_M2MF_IN"); - ustatus &= ~0x00000002; - } - if (ustatus & 0x00000004) { -- nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_M2MF_OUT"); -+ nv50_fb_vm_trap(dev, display, "PGRAPH_TRAP_M2MF_OUT"); - ustatus &= ~0x00000004; - } - NV_INFO (dev, "PGRAPH_TRAP_M2MF - %08x %08x %08x %08x\n", -@@ -917,7 +924,7 @@ - NV_INFO(dev, "PGRAPH_TRAP_VFETCH - no ustatus?\n"); - } - if (ustatus & 0x00000001) { -- nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_VFETCH_FAULT"); -+ nv50_fb_vm_trap(dev, display, "PGRAPH_TRAP_VFETCH_FAULT"); - NV_INFO (dev, "PGRAPH_TRAP_VFETCH_FAULT - %08x %08x %08x %08x\n", - nv_rd32(dev, 0x400c00), - nv_rd32(dev, 0x400c08), -@@ -939,7 +946,7 @@ - NV_INFO(dev, "PGRAPH_TRAP_STRMOUT - no ustatus?\n"); - } - if (ustatus & 0x00000001) { -- nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_STRMOUT_FAULT"); -+ nv50_fb_vm_trap(dev, display, "PGRAPH_TRAP_STRMOUT_FAULT"); - NV_INFO (dev, "PGRAPH_TRAP_STRMOUT_FAULT - %08x %08x %08x %08x\n", - nv_rd32(dev, 0x401804), - nv_rd32(dev, 0x401808), -@@ -964,7 +971,7 @@ - NV_INFO(dev, "PGRAPH_TRAP_CCACHE - no ustatus?\n"); - } - if (ustatus & 0x00000001) { -- nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_CCACHE_FAULT"); -+ nv50_fb_vm_trap(dev, display, "PGRAPH_TRAP_CCACHE_FAULT"); - NV_INFO (dev, "PGRAPH_TRAP_CCACHE_FAULT - %08x %08x %08x %08x %08x %08x %08x\n", - nv_rd32(dev, 0x405800), - nv_rd32(dev, 0x405804), -@@ -986,7 +993,7 @@ - * remaining, so try to handle it anyway. Perhaps related to that - * unknown DMA slot on tesla? */ - if (status & 0x20) { -- nv50_pfb_vm_trap(dev, display, "PGRAPH_TRAP_UNKC04"); -+ nv50_fb_vm_trap(dev, display, "PGRAPH_TRAP_UNKC04"); - ustatus = nv_rd32(dev, 0x402000) & 0x7fffffff; - if (display) - NV_INFO(dev, "PGRAPH_TRAP_UNKC04 - Unhandled ustatus 0x%08x\n", ustatus); -@@ -1192,11 +1199,15 @@ - static void - nouveau_crtc_irq_handler(struct drm_device *dev, int crtc) - { -- if (crtc & 1) -+ if (crtc & 1) { - nv_wr32(dev, NV_CRTC0_INTSTAT, NV_CRTC_INTR_VBLANK); -+ drm_handle_vblank(dev, 0); -+ } - -- if (crtc & 2) -+ if (crtc & 2) { - nv_wr32(dev, NV_CRTC1_INTSTAT, NV_CRTC_INTR_VBLANK); -+ drm_handle_vblank(dev, 1); -+ } - } - - irqreturn_t -@@ -1227,6 +1238,22 @@ - status &= ~NV_PMC_INTR_0_PGRAPH_PENDING; - } - -+ if (status & 0x00004000) { -+ u32 stat = nv_rd32(dev, 0x102130); -+ u32 mthd = nv_rd32(dev, 0x102190); -+ u32 data = nv_rd32(dev, 0x102194); -+ u32 inst = nv_rd32(dev, 0x102188) & 0x7fffffff; -+ -+ NV_INFO(dev, "PCRYPT_INTR: 0x%08x 0x%08x 0x%08x 0x%08x\n", -+ stat, mthd, data, inst); -+ nv_wr32(dev, 0x102130, stat); -+ nv_wr32(dev, 0x10200c, 0x10); -+ -+ nv50_fb_vm_trap(dev, nouveau_ratelimit(), "PCRYPT"); -+ status &= ~0x00004000; -+ -+ } -+ - if (status & NV_PMC_INTR_0_CRTCn_PENDING) { - nouveau_crtc_irq_handler(dev, (status>>24)&3); - status &= ~NV_PMC_INTR_0_CRTCn_PENDING; -@@ -1244,5 +1271,35 @@ - - spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); - -+ if (dev_priv->msi_enabled) -+ nv_wr08(dev, 0x00088068, 0xff); -+ - return IRQ_HANDLED; - } -+ -+int -+nouveau_irq_init(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ int ret; -+ -+ if (nouveau_msi != 0 && dev_priv->card_type >= NV_50) { -+ ret = pci_enable_msi(dev->pdev); -+ if (ret == 0) { -+ NV_INFO(dev, "enabled MSI\n"); -+ dev_priv->msi_enabled = true; -+ } -+ } -+ -+ return drm_irq_install(dev); -+} -+ -+void -+nouveau_irq_fini(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ -+ drm_irq_uninstall(dev); -+ if (dev_priv->msi_enabled) -+ pci_disable_msi(dev->pdev); -+} -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_mem.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_mem.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_mem.c 2010-10-30 22:24:25.000000000 +0200 -@@ -33,92 +33,113 @@ - #include "drmP.h" - #include "drm.h" - #include "drm_sarea.h" -+ - #include "nouveau_drv.h" -+#include "nouveau_pm.h" - - /* - * NV10-NV40 tiling helpers - */ - - static void --nv10_mem_set_region_tiling(struct drm_device *dev, int i, uint32_t addr, -- uint32_t size, uint32_t pitch) -+nv10_mem_update_tile_region(struct drm_device *dev, -+ struct nouveau_tile_reg *tile, uint32_t addr, -+ uint32_t size, uint32_t pitch, uint32_t flags) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; - struct nouveau_fifo_engine *pfifo = &dev_priv->engine.fifo; - struct nouveau_fb_engine *pfb = &dev_priv->engine.fb; - struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; -- struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; -+ int i = tile - dev_priv->tile.reg; -+ unsigned long save; - -- tile->addr = addr; -- tile->size = size; -- tile->used = !!pitch; -- nouveau_fence_unref((void **)&tile->fence); -+ nouveau_fence_unref(&tile->fence); - -- if (!pfifo->cache_flush(dev)) -- return; -+ if (tile->pitch) -+ pfb->free_tile_region(dev, i); - -+ if (pitch) -+ pfb->init_tile_region(dev, i, addr, size, pitch, flags); -+ -+ spin_lock_irqsave(&dev_priv->context_switch_lock, save); - pfifo->reassign(dev, false); -- pfifo->cache_flush(dev); - pfifo->cache_pull(dev, false); - - nouveau_wait_for_idle(dev); - -- pgraph->set_region_tiling(dev, i, addr, size, pitch); -- pfb->set_region_tiling(dev, i, addr, size, pitch); -+ pfb->set_tile_region(dev, i); -+ pgraph->set_tile_region(dev, i); - - pfifo->cache_pull(dev, true); - pfifo->reassign(dev, true); -+ spin_unlock_irqrestore(&dev_priv->context_switch_lock, save); - } - --struct nouveau_tile_reg * --nv10_mem_set_tiling(struct drm_device *dev, uint32_t addr, uint32_t size, -- uint32_t pitch) -+static struct nouveau_tile_reg * -+nv10_mem_get_tile_region(struct drm_device *dev, int i) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; -- struct nouveau_fb_engine *pfb = &dev_priv->engine.fb; -- struct nouveau_tile_reg *tile = dev_priv->tile.reg, *found = NULL; -- int i; -+ struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; - - spin_lock(&dev_priv->tile.lock); - -- for (i = 0; i < pfb->num_tiles; i++) { -- if (tile[i].used) -- /* Tile region in use. */ -- continue; -+ if (!tile->used && -+ (!tile->fence || nouveau_fence_signalled(tile->fence))) -+ tile->used = true; -+ else -+ tile = NULL; - -- if (tile[i].fence && -- !nouveau_fence_signalled(tile[i].fence, NULL)) -- /* Pending tile region. */ -- continue; -+ spin_unlock(&dev_priv->tile.lock); -+ return tile; -+} - -- if (max(tile[i].addr, addr) < -- min(tile[i].addr + tile[i].size, addr + size)) -- /* Kill an intersecting tile region. */ -- nv10_mem_set_region_tiling(dev, i, 0, 0, 0); -+void -+nv10_mem_put_tile_region(struct drm_device *dev, struct nouveau_tile_reg *tile, -+ struct nouveau_fence *fence) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; - -- if (pitch && !found) { -- /* Free tile region. */ -- nv10_mem_set_region_tiling(dev, i, addr, size, pitch); -- found = &tile[i]; -+ if (tile) { -+ spin_lock(&dev_priv->tile.lock); -+ if (fence) { -+ /* Mark it as pending. */ -+ tile->fence = fence; -+ nouveau_fence_ref(fence); - } -- } - -- spin_unlock(&dev_priv->tile.lock); -- -- return found; -+ tile->used = false; -+ spin_unlock(&dev_priv->tile.lock); -+ } - } - --void --nv10_mem_expire_tiling(struct drm_device *dev, struct nouveau_tile_reg *tile, -- struct nouveau_fence *fence) -+struct nouveau_tile_reg * -+nv10_mem_set_tiling(struct drm_device *dev, uint32_t addr, uint32_t size, -+ uint32_t pitch, uint32_t flags) - { -- if (fence) { -- /* Mark it as pending. */ -- tile->fence = fence; -- nouveau_fence_ref(fence); -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_fb_engine *pfb = &dev_priv->engine.fb; -+ struct nouveau_tile_reg *tile, *found = NULL; -+ int i; -+ -+ for (i = 0; i < pfb->num_tiles; i++) { -+ tile = nv10_mem_get_tile_region(dev, i); -+ -+ if (pitch && !found) { -+ found = tile; -+ continue; -+ -+ } else if (tile && tile->pitch) { -+ /* Kill an unused tile region. */ -+ nv10_mem_update_tile_region(dev, tile, 0, 0, 0, 0); -+ } -+ -+ nv10_mem_put_tile_region(dev, tile, NULL); - } - -- tile->used = false; -+ if (found) -+ nv10_mem_update_tile_region(dev, found, addr, size, -+ pitch, flags); -+ return found; - } - - /* -@@ -169,16 +190,17 @@ - virt += (end - pte); - - while (pte < end) { -- nv_wo32(dev, pgt, pte++, offset_l); -- nv_wo32(dev, pgt, pte++, offset_h); -+ nv_wo32(pgt, (pte * 4) + 0, offset_l); -+ nv_wo32(pgt, (pte * 4) + 4, offset_h); -+ pte += 2; - } - } - } - dev_priv->engine.instmem.flush(dev); - -- nv50_vm_flush(dev, 5); -- nv50_vm_flush(dev, 0); -- nv50_vm_flush(dev, 4); -+ dev_priv->engine.instmem.flush(dev); -+ dev_priv->engine.fifo.tlb_flush(dev); -+ dev_priv->engine.graph.tlb_flush(dev); - nv50_vm_flush(dev, 6); - return 0; - } -@@ -203,14 +225,15 @@ - pages -= (end - pte); - virt += (end - pte) << 15; - -- while (pte < end) -- nv_wo32(dev, pgt, pte++, 0); -+ while (pte < end) { -+ nv_wo32(pgt, (pte * 4), 0); -+ pte++; -+ } - } -- dev_priv->engine.instmem.flush(dev); - -- nv50_vm_flush(dev, 5); -- nv50_vm_flush(dev, 0); -- nv50_vm_flush(dev, 4); -+ dev_priv->engine.instmem.flush(dev); -+ dev_priv->engine.fifo.tlb_flush(dev); -+ dev_priv->engine.graph.tlb_flush(dev); - nv50_vm_flush(dev, 6); - } - -@@ -218,7 +241,7 @@ - * Cleanup everything - */ - void --nouveau_mem_close(struct drm_device *dev) -+nouveau_mem_vram_fini(struct drm_device *dev) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; - -@@ -229,6 +252,19 @@ - - nouveau_ttm_global_release(dev_priv); - -+ if (dev_priv->fb_mtrr >= 0) { -+ drm_mtrr_del(dev_priv->fb_mtrr, -+ pci_resource_start(dev->pdev, 1), -+ pci_resource_len(dev->pdev, 1), DRM_MTRR_WC); -+ dev_priv->fb_mtrr = -1; -+ } -+} -+ -+void -+nouveau_mem_gart_fini(struct drm_device *dev) -+{ -+ nouveau_sgdma_takedown(dev); -+ - if (drm_core_has_AGP(dev) && dev->agp) { - struct drm_agp_mem *entry, *tempe; - -@@ -248,13 +284,6 @@ - dev->agp->acquired = 0; - dev->agp->enabled = 0; - } -- -- if (dev_priv->fb_mtrr) { -- drm_mtrr_del(dev_priv->fb_mtrr, -- pci_resource_start(dev->pdev, 1), -- pci_resource_len(dev->pdev, 1), DRM_MTRR_WC); -- dev_priv->fb_mtrr = -1; -- } - } - - static uint32_t -@@ -305,8 +334,62 @@ - return 0; - } - --/* returns the amount of FB ram in bytes */ --int -+static void -+nv50_vram_preinit(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ int i, parts, colbits, rowbitsa, rowbitsb, banks; -+ u64 rowsize, predicted; -+ u32 r0, r4, rt, ru; -+ -+ r0 = nv_rd32(dev, 0x100200); -+ r4 = nv_rd32(dev, 0x100204); -+ rt = nv_rd32(dev, 0x100250); -+ ru = nv_rd32(dev, 0x001540); -+ NV_DEBUG(dev, "memcfg 0x%08x 0x%08x 0x%08x 0x%08x\n", r0, r4, rt, ru); -+ -+ for (i = 0, parts = 0; i < 8; i++) { -+ if (ru & (0x00010000 << i)) -+ parts++; -+ } -+ -+ colbits = (r4 & 0x0000f000) >> 12; -+ rowbitsa = ((r4 & 0x000f0000) >> 16) + 8; -+ rowbitsb = ((r4 & 0x00f00000) >> 20) + 8; -+ banks = ((r4 & 0x01000000) ? 8 : 4); -+ -+ rowsize = parts * banks * (1 << colbits) * 8; -+ predicted = rowsize << rowbitsa; -+ if (r0 & 0x00000004) -+ predicted += rowsize << rowbitsb; -+ -+ if (predicted != dev_priv->vram_size) { -+ NV_WARN(dev, "memory controller reports %dMiB VRAM\n", -+ (u32)(dev_priv->vram_size >> 20)); -+ NV_WARN(dev, "we calculated %dMiB VRAM\n", -+ (u32)(predicted >> 20)); -+ } -+ -+ dev_priv->vram_rblock_size = rowsize >> 12; -+ if (rt & 1) -+ dev_priv->vram_rblock_size *= 3; -+ -+ NV_DEBUG(dev, "rblock %lld bytes\n", -+ (u64)dev_priv->vram_rblock_size << 12); -+} -+ -+static void -+nvaa_vram_preinit(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ -+ /* To our knowledge, there's no large scale reordering of pages -+ * that occurs on IGP chipsets. -+ */ -+ dev_priv->vram_rblock_size = 1; -+} -+ -+static int - nouveau_mem_detect(struct drm_device *dev) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; -@@ -325,9 +408,18 @@ - dev_priv->vram_size = nv_rd32(dev, NV04_PFB_FIFO_DATA); - dev_priv->vram_size |= (dev_priv->vram_size & 0xff) << 32; - dev_priv->vram_size &= 0xffffffff00ll; -- if (dev_priv->chipset == 0xaa || dev_priv->chipset == 0xac) { -+ -+ switch (dev_priv->chipset) { -+ case 0xaa: -+ case 0xac: -+ case 0xaf: - dev_priv->vram_sys_base = nv_rd32(dev, 0x100e10); - dev_priv->vram_sys_base <<= 12; -+ nvaa_vram_preinit(dev); -+ break; -+ default: -+ nv50_vram_preinit(dev); -+ break; - } - } else { - dev_priv->vram_size = nv_rd32(dev, 0x10f20c) << 20; -@@ -345,6 +437,33 @@ - return -ENOMEM; - } - -+#if __OS_HAS_AGP -+static unsigned long -+get_agp_mode(struct drm_device *dev, unsigned long mode) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ -+ /* -+ * FW seems to be broken on nv18, it makes the card lock up -+ * randomly. -+ */ -+ if (dev_priv->chipset == 0x18) -+ mode &= ~PCI_AGP_COMMAND_FW; -+ -+ /* -+ * AGP mode set in the command line. -+ */ -+ if (nouveau_agpmode > 0) { -+ bool agpv3 = mode & 0x8; -+ int rate = agpv3 ? nouveau_agpmode / 4 : nouveau_agpmode; -+ -+ mode = (mode & ~0x7) | (rate & 0x7); -+ } -+ -+ return mode; -+} -+#endif -+ - int - nouveau_mem_reset_agp(struct drm_device *dev) - { -@@ -355,7 +474,8 @@ - /* First of all, disable fast writes, otherwise if it's - * already enabled in the AGP bridge and we disable the card's - * AGP controller we might be locking ourselves out of it. */ -- if (nv_rd32(dev, NV04_PBUS_PCI_NV_19) & PCI_AGP_COMMAND_FW) { -+ if ((nv_rd32(dev, NV04_PBUS_PCI_NV_19) | -+ dev->agp->mode) & PCI_AGP_COMMAND_FW) { - struct drm_agp_info info; - struct drm_agp_mode mode; - -@@ -363,7 +483,7 @@ - if (ret) - return ret; - -- mode.mode = info.mode & ~PCI_AGP_COMMAND_FW; -+ mode.mode = get_agp_mode(dev, info.mode) & ~PCI_AGP_COMMAND_FW; - ret = drm_agp_enable(dev, mode); - if (ret) - return ret; -@@ -418,7 +538,7 @@ - } - - /* see agp.h for the AGPSTAT_* modes available */ -- mode.mode = info.mode; -+ mode.mode = get_agp_mode(dev, info.mode); - ret = drm_agp_enable(dev, mode); - if (ret) { - NV_ERROR(dev, "Unable to enable AGP: %d\n", ret); -@@ -433,24 +553,27 @@ - } - - int --nouveau_mem_init(struct drm_device *dev) -+nouveau_mem_vram_init(struct drm_device *dev) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; - struct ttm_bo_device *bdev = &dev_priv->ttm.bdev; -- int ret, dma_bits = 32; -- -- dev_priv->fb_phys = pci_resource_start(dev->pdev, 1); -- dev_priv->gart_info.type = NOUVEAU_GART_NONE; -+ int ret, dma_bits; - - if (dev_priv->card_type >= NV_50 && - pci_dma_supported(dev->pdev, DMA_BIT_MASK(40))) - dma_bits = 40; -+ else -+ dma_bits = 32; - - ret = pci_set_dma_mask(dev->pdev, DMA_BIT_MASK(dma_bits)); -- if (ret) { -- NV_ERROR(dev, "Error setting DMA mask: %d\n", ret); -+ if (ret) -+ return ret; -+ -+ ret = nouveau_mem_detect(dev); -+ if (ret) - return ret; -- } -+ -+ dev_priv->fb_phys = pci_resource_start(dev->pdev, 1); - - ret = nouveau_ttm_global_init(dev_priv); - if (ret) -@@ -465,8 +588,6 @@ - return ret; - } - -- spin_lock_init(&dev_priv->tile.lock); -- - dev_priv->fb_available_size = dev_priv->vram_size; - dev_priv->fb_mappable_pages = dev_priv->fb_available_size; - if (dev_priv->fb_mappable_pages > pci_resource_len(dev->pdev, 1)) -@@ -474,7 +595,16 @@ - pci_resource_len(dev->pdev, 1); - dev_priv->fb_mappable_pages >>= PAGE_SHIFT; - -- /* remove reserved space at end of vram from available amount */ -+ /* reserve space at end of VRAM for PRAMIN */ -+ if (dev_priv->chipset == 0x40 || dev_priv->chipset == 0x47 || -+ dev_priv->chipset == 0x49 || dev_priv->chipset == 0x4b) -+ dev_priv->ramin_rsvd_vram = (2 * 1024 * 1024); -+ else -+ if (dev_priv->card_type >= NV_40) -+ dev_priv->ramin_rsvd_vram = (1 * 1024 * 1024); -+ else -+ dev_priv->ramin_rsvd_vram = (512 * 1024); -+ - dev_priv->fb_available_size -= dev_priv->ramin_rsvd_vram; - dev_priv->fb_aper_free = dev_priv->fb_available_size; - -@@ -495,9 +625,23 @@ - nouveau_bo_ref(NULL, &dev_priv->vga_ram); - } - -- /* GART */ -+ dev_priv->fb_mtrr = drm_mtrr_add(pci_resource_start(dev->pdev, 1), -+ pci_resource_len(dev->pdev, 1), -+ DRM_MTRR_WC); -+ return 0; -+} -+ -+int -+nouveau_mem_gart_init(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct ttm_bo_device *bdev = &dev_priv->ttm.bdev; -+ int ret; -+ -+ dev_priv->gart_info.type = NOUVEAU_GART_NONE; -+ - #if !defined(__powerpc__) && !defined(__ia64__) -- if (drm_device_is_agp(dev) && dev->agp && !nouveau_noagp) { -+ if (drm_device_is_agp(dev) && dev->agp && nouveau_agpmode) { - ret = nouveau_mem_init_agp(dev); - if (ret) - NV_ERROR(dev, "Error initialising AGP: %d\n", ret); -@@ -523,11 +667,150 @@ - return ret; - } - -- dev_priv->fb_mtrr = drm_mtrr_add(pci_resource_start(dev->pdev, 1), -- pci_resource_len(dev->pdev, 1), -- DRM_MTRR_WC); -- - return 0; - } - -+void -+nouveau_mem_timing_init(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ struct nouveau_pm_memtimings *memtimings = &pm->memtimings; -+ struct nvbios *bios = &dev_priv->vbios; -+ struct bit_entry P; -+ u8 tUNK_0, tUNK_1, tUNK_2; -+ u8 tRP; /* Byte 3 */ -+ u8 tRAS; /* Byte 5 */ -+ u8 tRFC; /* Byte 7 */ -+ u8 tRC; /* Byte 9 */ -+ u8 tUNK_10, tUNK_11, tUNK_12, tUNK_13, tUNK_14; -+ u8 tUNK_18, tUNK_19, tUNK_20, tUNK_21; -+ u8 *mem = NULL, *entry; -+ int i, recordlen, entries; -+ -+ if (bios->type == NVBIOS_BIT) { -+ if (bit_table(dev, 'P', &P)) -+ return; -+ -+ if (P.version == 1) -+ mem = ROMPTR(bios, P.data[4]); -+ else -+ if (P.version == 2) -+ mem = ROMPTR(bios, P.data[8]); -+ else { -+ NV_WARN(dev, "unknown mem for BIT P %d\n", P.version); -+ } -+ } else { -+ NV_DEBUG(dev, "BMP version too old for memory\n"); -+ return; -+ } -+ -+ if (!mem) { -+ NV_DEBUG(dev, "memory timing table pointer invalid\n"); -+ return; -+ } -+ -+ if (mem[0] != 0x10) { -+ NV_WARN(dev, "memory timing table 0x%02x unknown\n", mem[0]); -+ return; -+ } -+ -+ /* validate record length */ -+ entries = mem[2]; -+ recordlen = mem[3]; -+ if (recordlen < 15) { -+ NV_ERROR(dev, "mem timing table length unknown: %d\n", mem[3]); -+ return; -+ } -+ -+ /* parse vbios entries into common format */ -+ memtimings->timing = -+ kcalloc(entries, sizeof(*memtimings->timing), GFP_KERNEL); -+ if (!memtimings->timing) -+ return; -+ -+ entry = mem + mem[1]; -+ for (i = 0; i < entries; i++, entry += recordlen) { -+ struct nouveau_pm_memtiming *timing = &pm->memtimings.timing[i]; -+ if (entry[0] == 0) -+ continue; - -+ tUNK_18 = 1; -+ tUNK_19 = 1; -+ tUNK_20 = 0; -+ tUNK_21 = 0; -+ switch (min(recordlen, 21)) { -+ case 21: -+ tUNK_21 = entry[21]; -+ case 20: -+ tUNK_20 = entry[20]; -+ case 19: -+ tUNK_19 = entry[19]; -+ case 18: -+ tUNK_18 = entry[18]; -+ default: -+ tUNK_0 = entry[0]; -+ tUNK_1 = entry[1]; -+ tUNK_2 = entry[2]; -+ tRP = entry[3]; -+ tRAS = entry[5]; -+ tRFC = entry[7]; -+ tRC = entry[9]; -+ tUNK_10 = entry[10]; -+ tUNK_11 = entry[11]; -+ tUNK_12 = entry[12]; -+ tUNK_13 = entry[13]; -+ tUNK_14 = entry[14]; -+ break; -+ } -+ -+ timing->reg_100220 = (tRC << 24 | tRFC << 16 | tRAS << 8 | tRP); -+ -+ /* XXX: I don't trust the -1's and +1's... they must come -+ * from somewhere! */ -+ timing->reg_100224 = ((tUNK_0 + tUNK_19 + 1) << 24 | -+ tUNK_18 << 16 | -+ (tUNK_1 + tUNK_19 + 1) << 8 | -+ (tUNK_2 - 1)); -+ -+ timing->reg_100228 = (tUNK_12 << 16 | tUNK_11 << 8 | tUNK_10); -+ if(recordlen > 19) { -+ timing->reg_100228 += (tUNK_19 - 1) << 24; -+ } else { -+ timing->reg_100228 += tUNK_12 << 24; -+ } -+ -+ /* XXX: reg_10022c */ -+ -+ timing->reg_100230 = (tUNK_20 << 24 | tUNK_21 << 16 | -+ tUNK_13 << 8 | tUNK_13); -+ -+ /* XXX: +6? */ -+ timing->reg_100234 = (tRAS << 24 | (tUNK_19 + 6) << 8 | tRC); -+ if(tUNK_10 > tUNK_11) { -+ timing->reg_100234 += tUNK_10 << 16; -+ } else { -+ timing->reg_100234 += tUNK_11 << 16; -+ } -+ -+ /* XXX; reg_100238, reg_10023c */ -+ NV_DEBUG(dev, "Entry %d: 220: %08x %08x %08x %08x\n", i, -+ timing->reg_100220, timing->reg_100224, -+ timing->reg_100228, timing->reg_10022c); -+ NV_DEBUG(dev, " 230: %08x %08x %08x %08x\n", -+ timing->reg_100230, timing->reg_100234, -+ timing->reg_100238, timing->reg_10023c); -+ } -+ -+ memtimings->nr_timing = entries; -+ memtimings->supported = true; -+} -+ -+void -+nouveau_mem_timing_fini(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_memtimings *mem = &dev_priv->engine.pm.memtimings; -+ -+ kfree(mem->timing); -+} -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_notifier.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_notifier.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_notifier.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_notifier.c 2010-10-30 22:24:25.000000000 +0200 -@@ -28,6 +28,7 @@ - #include "drmP.h" - #include "drm.h" - #include "nouveau_drv.h" -+#include "nouveau_ramht.h" - - int - nouveau_notifier_init_channel(struct nouveau_channel *chan) -@@ -112,7 +113,7 @@ - return -ENOMEM; - } - -- offset = chan->notifier_bo->bo.mem.mm_node->start << PAGE_SHIFT; -+ offset = chan->notifier_bo->bo.mem.start << PAGE_SHIFT; - if (chan->notifier_bo->bo.mem.mem_type == TTM_PL_VRAM) { - target = NV_DMA_TARGET_VIDMEM; - } else -@@ -146,11 +147,11 @@ - nobj->dtor = nouveau_notifier_gpuobj_dtor; - nobj->priv = mem; - -- ret = nouveau_gpuobj_ref_add(dev, chan, handle, nobj, NULL); -+ ret = nouveau_ramht_insert(chan, handle, nobj); -+ nouveau_gpuobj_ref(NULL, &nobj); - if (ret) { -- nouveau_gpuobj_del(dev, &nobj); - drm_mm_put_block(mem); -- NV_ERROR(dev, "Error referencing notifier ctxdma: %d\n", ret); -+ NV_ERROR(dev, "Error adding notifier to ramht: %d\n", ret); - return ret; - } - -@@ -184,11 +185,11 @@ - struct nouveau_channel *chan; - int ret; - -- NOUVEAU_GET_USER_CHANNEL_WITH_RETURN(na->channel, file_priv, chan); -+ chan = nouveau_channel_get(dev, file_priv, na->channel); -+ if (IS_ERR(chan)) -+ return PTR_ERR(chan); - - ret = nouveau_notifier_alloc(chan, na->handle, na->size, &na->offset); -- if (ret) -- return ret; -- -- return 0; -+ nouveau_channel_put(&chan); -+ return ret; - } -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_object.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_object.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_object.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_object.c 2010-10-30 22:24:25.000000000 +0200 -@@ -34,6 +34,84 @@ - #include "drm.h" - #include "nouveau_drv.h" - #include "nouveau_drm.h" -+#include "nouveau_ramht.h" -+ -+struct nouveau_gpuobj_method { -+ struct list_head head; -+ u32 mthd; -+ int (*exec)(struct nouveau_channel *, u32 class, u32 mthd, u32 data); -+}; -+ -+struct nouveau_gpuobj_class { -+ struct list_head head; -+ struct list_head methods; -+ u32 id; -+ u32 engine; -+}; -+ -+int -+nouveau_gpuobj_class_new(struct drm_device *dev, u32 class, u32 engine) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_gpuobj_class *oc; -+ -+ oc = kzalloc(sizeof(*oc), GFP_KERNEL); -+ if (!oc) -+ return -ENOMEM; -+ -+ INIT_LIST_HEAD(&oc->methods); -+ oc->id = class; -+ oc->engine = engine; -+ list_add(&oc->head, &dev_priv->classes); -+ return 0; -+} -+ -+int -+nouveau_gpuobj_mthd_new(struct drm_device *dev, u32 class, u32 mthd, -+ int (*exec)(struct nouveau_channel *, u32, u32, u32)) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_gpuobj_method *om; -+ struct nouveau_gpuobj_class *oc; -+ -+ list_for_each_entry(oc, &dev_priv->classes, head) { -+ if (oc->id == class) -+ goto found; -+ } -+ -+ return -EINVAL; -+ -+found: -+ om = kzalloc(sizeof(*om), GFP_KERNEL); -+ if (!om) -+ return -ENOMEM; -+ -+ om->mthd = mthd; -+ om->exec = exec; -+ list_add(&om->head, &oc->methods); -+ return 0; -+} -+ -+int -+nouveau_gpuobj_mthd_call(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) -+{ -+ struct drm_nouveau_private *dev_priv = chan->dev->dev_private; -+ struct nouveau_gpuobj_method *om; -+ struct nouveau_gpuobj_class *oc; -+ -+ list_for_each_entry(oc, &dev_priv->classes, head) { -+ if (oc->id != class) -+ continue; -+ -+ list_for_each_entry(om, &oc->methods, head) { -+ if (om->mthd == mthd) -+ return om->exec(chan, class, mthd, data); -+ } -+ } -+ -+ return -ENOENT; -+} - - /* NVidia uses context objects to drive drawing operations. - -@@ -65,137 +143,6 @@ - The key into the hash table depends on the object handle and channel id and - is given as: - */ --static uint32_t --nouveau_ramht_hash_handle(struct drm_device *dev, int channel, uint32_t handle) --{ -- struct drm_nouveau_private *dev_priv = dev->dev_private; -- uint32_t hash = 0; -- int i; -- -- NV_DEBUG(dev, "ch%d handle=0x%08x\n", channel, handle); -- -- for (i = 32; i > 0; i -= dev_priv->ramht_bits) { -- hash ^= (handle & ((1 << dev_priv->ramht_bits) - 1)); -- handle >>= dev_priv->ramht_bits; -- } -- -- if (dev_priv->card_type < NV_50) -- hash ^= channel << (dev_priv->ramht_bits - 4); -- hash <<= 3; -- -- NV_DEBUG(dev, "hash=0x%08x\n", hash); -- return hash; --} -- --static int --nouveau_ramht_entry_valid(struct drm_device *dev, struct nouveau_gpuobj *ramht, -- uint32_t offset) --{ -- struct drm_nouveau_private *dev_priv = dev->dev_private; -- uint32_t ctx = nv_ro32(dev, ramht, (offset + 4)/4); -- -- if (dev_priv->card_type < NV_40) -- return ((ctx & NV_RAMHT_CONTEXT_VALID) != 0); -- return (ctx != 0); --} -- --static int --nouveau_ramht_insert(struct drm_device *dev, struct nouveau_gpuobj_ref *ref) --{ -- struct drm_nouveau_private *dev_priv = dev->dev_private; -- struct nouveau_instmem_engine *instmem = &dev_priv->engine.instmem; -- struct nouveau_channel *chan = ref->channel; -- struct nouveau_gpuobj *ramht = chan->ramht ? chan->ramht->gpuobj : NULL; -- uint32_t ctx, co, ho; -- -- if (!ramht) { -- NV_ERROR(dev, "No hash table!\n"); -- return -EINVAL; -- } -- -- if (dev_priv->card_type < NV_40) { -- ctx = NV_RAMHT_CONTEXT_VALID | (ref->instance >> 4) | -- (chan->id << NV_RAMHT_CONTEXT_CHANNEL_SHIFT) | -- (ref->gpuobj->engine << NV_RAMHT_CONTEXT_ENGINE_SHIFT); -- } else -- if (dev_priv->card_type < NV_50) { -- ctx = (ref->instance >> 4) | -- (chan->id << NV40_RAMHT_CONTEXT_CHANNEL_SHIFT) | -- (ref->gpuobj->engine << NV40_RAMHT_CONTEXT_ENGINE_SHIFT); -- } else { -- if (ref->gpuobj->engine == NVOBJ_ENGINE_DISPLAY) { -- ctx = (ref->instance << 10) | 2; -- } else { -- ctx = (ref->instance >> 4) | -- ((ref->gpuobj->engine << -- NV40_RAMHT_CONTEXT_ENGINE_SHIFT)); -- } -- } -- -- co = ho = nouveau_ramht_hash_handle(dev, chan->id, ref->handle); -- do { -- if (!nouveau_ramht_entry_valid(dev, ramht, co)) { -- NV_DEBUG(dev, -- "insert ch%d 0x%08x: h=0x%08x, c=0x%08x\n", -- chan->id, co, ref->handle, ctx); -- nv_wo32(dev, ramht, (co + 0)/4, ref->handle); -- nv_wo32(dev, ramht, (co + 4)/4, ctx); -- -- list_add_tail(&ref->list, &chan->ramht_refs); -- instmem->flush(dev); -- return 0; -- } -- NV_DEBUG(dev, "collision ch%d 0x%08x: h=0x%08x\n", -- chan->id, co, nv_ro32(dev, ramht, co/4)); -- -- co += 8; -- if (co >= dev_priv->ramht_size) -- co = 0; -- } while (co != ho); -- -- NV_ERROR(dev, "RAMHT space exhausted. ch=%d\n", chan->id); -- return -ENOMEM; --} -- --static void --nouveau_ramht_remove(struct drm_device *dev, struct nouveau_gpuobj_ref *ref) --{ -- struct drm_nouveau_private *dev_priv = dev->dev_private; -- struct nouveau_instmem_engine *instmem = &dev_priv->engine.instmem; -- struct nouveau_channel *chan = ref->channel; -- struct nouveau_gpuobj *ramht = chan->ramht ? chan->ramht->gpuobj : NULL; -- uint32_t co, ho; -- -- if (!ramht) { -- NV_ERROR(dev, "No hash table!\n"); -- return; -- } -- -- co = ho = nouveau_ramht_hash_handle(dev, chan->id, ref->handle); -- do { -- if (nouveau_ramht_entry_valid(dev, ramht, co) && -- (ref->handle == nv_ro32(dev, ramht, (co/4)))) { -- NV_DEBUG(dev, -- "remove ch%d 0x%08x: h=0x%08x, c=0x%08x\n", -- chan->id, co, ref->handle, -- nv_ro32(dev, ramht, (co + 4))); -- nv_wo32(dev, ramht, (co + 0)/4, 0x00000000); -- nv_wo32(dev, ramht, (co + 4)/4, 0x00000000); -- -- list_del(&ref->list); -- instmem->flush(dev); -- return; -- } -- -- co += 8; -- if (co >= dev_priv->ramht_size) -- co = 0; -- } while (co != ho); -- list_del(&ref->list); -- -- NV_ERROR(dev, "RAMHT entry not found. ch=%d, handle=0x%08x\n", -- chan->id, ref->handle); --} - - int - nouveau_gpuobj_new(struct drm_device *dev, struct nouveau_channel *chan, -@@ -205,7 +152,7 @@ - struct drm_nouveau_private *dev_priv = dev->dev_private; - struct nouveau_engine *engine = &dev_priv->engine; - struct nouveau_gpuobj *gpuobj; -- struct drm_mm *pramin = NULL; -+ struct drm_mm_node *ramin = NULL; - int ret; - - NV_DEBUG(dev, "ch%d size=%u align=%d flags=0x%08x\n", -@@ -218,69 +165,102 @@ - if (!gpuobj) - return -ENOMEM; - NV_DEBUG(dev, "gpuobj %p\n", gpuobj); -+ gpuobj->dev = dev; - gpuobj->flags = flags; -- gpuobj->im_channel = chan; -+ kref_init(&gpuobj->refcount); -+ gpuobj->size = size; - -+ spin_lock(&dev_priv->ramin_lock); - list_add_tail(&gpuobj->list, &dev_priv->gpuobj_list); -+ spin_unlock(&dev_priv->ramin_lock); - -- /* Choose between global instmem heap, and per-channel private -- * instmem heap. On ramin_heap; -+ -+ ramin = drm_mm_search_free(&chan->ramin_heap, size, align, 0); -+ if (ramin) -+ ramin = drm_mm_get_block(ramin, size, align); -+ -+ if (!ramin) { -+ nouveau_gpuobj_ref(NULL, &gpuobj); -+ return -ENOMEM; -+ } - } else { - NV_DEBUG(dev, "global heap\n"); -- pramin = &dev_priv->ramin_heap; - -- ret = engine->instmem.populate(dev, gpuobj, &size); -+ /* allocate backing pages, sets vinst */ -+ ret = engine->instmem.populate(dev, gpuobj, &size, align); - if (ret) { -- nouveau_gpuobj_del(dev, &gpuobj); -+ nouveau_gpuobj_ref(NULL, &gpuobj); - return ret; - } -- } - -- /* Allocate a chunk of the PRAMIN aperture */ -- gpuobj->im_pramin = drm_mm_search_free(pramin, size, align, 0); -- if (gpuobj->im_pramin) -- gpuobj->im_pramin = drm_mm_get_block(gpuobj->im_pramin, size, align); -+ /* try and get aperture space */ -+ do { -+ if (drm_mm_pre_get(&dev_priv->ramin_heap)) -+ return -ENOMEM; -+ -+ spin_lock(&dev_priv->ramin_lock); -+ ramin = drm_mm_search_free(&dev_priv->ramin_heap, size, -+ align, 0); -+ if (ramin == NULL) { -+ spin_unlock(&dev_priv->ramin_lock); -+ nouveau_gpuobj_ref(NULL, &gpuobj); -+ return ret; -+ } - -- if (!gpuobj->im_pramin) { -- nouveau_gpuobj_del(dev, &gpuobj); -- return -ENOMEM; -+ ramin = drm_mm_get_block_atomic(ramin, size, align); -+ spin_unlock(&dev_priv->ramin_lock); -+ } while (ramin == NULL); -+ -+ /* on nv50 it's ok to fail, we have a fallback path */ -+ if (!ramin && dev_priv->card_type < NV_50) { -+ nouveau_gpuobj_ref(NULL, &gpuobj); -+ return -ENOMEM; -+ } - } - -- if (!chan) { -+ /* if we got a chunk of the aperture, map pages into it */ -+ gpuobj->im_pramin = ramin; -+ if (!chan && gpuobj->im_pramin && dev_priv->ramin_available) { - ret = engine->instmem.bind(dev, gpuobj); - if (ret) { -- nouveau_gpuobj_del(dev, &gpuobj); -+ nouveau_gpuobj_ref(NULL, &gpuobj); - return ret; - } - } - -+ /* calculate the various different addresses for the object */ -+ if (chan) { -+ gpuobj->pinst = chan->ramin->pinst; -+ if (gpuobj->pinst != ~0) -+ gpuobj->pinst += gpuobj->im_pramin->start; -+ -+ if (dev_priv->card_type < NV_50) { -+ gpuobj->cinst = gpuobj->pinst; -+ } else { -+ gpuobj->cinst = gpuobj->im_pramin->start; -+ gpuobj->vinst = gpuobj->im_pramin->start + -+ chan->ramin->vinst; -+ } -+ } else { -+ if (gpuobj->im_pramin) -+ gpuobj->pinst = gpuobj->im_pramin->start; -+ else -+ gpuobj->pinst = ~0; -+ gpuobj->cinst = 0xdeadbeef; -+ } -+ - if (gpuobj->flags & NVOBJ_FLAG_ZERO_ALLOC) { - int i; - -- for (i = 0; i < gpuobj->im_pramin->size; i += 4) -- nv_wo32(dev, gpuobj, i/4, 0); -+ for (i = 0; i < gpuobj->size; i += 4) -+ nv_wo32(gpuobj, i, 0); - engine->instmem.flush(dev); - } - -- *gpuobj_ret = gpuobj; -- return 0; --} -- --int --nouveau_gpuobj_early_init(struct drm_device *dev) --{ -- struct drm_nouveau_private *dev_priv = dev->dev_private; -- -- NV_DEBUG(dev, "\n"); -- -- INIT_LIST_HEAD(&dev_priv->gpuobj_list); - -+ *gpuobj_ret = gpuobj; - return 0; - } - -@@ -288,18 +268,13 @@ - nouveau_gpuobj_init(struct drm_device *dev) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; -- int ret; - - NV_DEBUG(dev, "\n"); - -- if (dev_priv->card_type < NV_50) { -- ret = nouveau_gpuobj_new_fake(dev, -- dev_priv->ramht_offset, ~0, dev_priv->ramht_size, -- NVOBJ_FLAG_ZERO_ALLOC | NVOBJ_FLAG_ALLOW_NO_REFS, -- &dev_priv->ramht, NULL); -- if (ret) -- return ret; -- } -+ INIT_LIST_HEAD(&dev_priv->gpuobj_list); -+ INIT_LIST_HEAD(&dev_priv->classes); -+ spin_lock_init(&dev_priv->ramin_lock); -+ dev_priv->ramin_base = ~0; - - return 0; - } -@@ -308,300 +283,103 @@ - nouveau_gpuobj_takedown(struct drm_device *dev) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_gpuobj_method *om, *tm; -+ struct nouveau_gpuobj_class *oc, *tc; - - NV_DEBUG(dev, "\n"); - -- nouveau_gpuobj_del(dev, &dev_priv->ramht); --} -- --void --nouveau_gpuobj_late_takedown(struct drm_device *dev) --{ -- struct drm_nouveau_private *dev_priv = dev->dev_private; -- struct nouveau_gpuobj *gpuobj = NULL; -- struct list_head *entry, *tmp; -- -- NV_DEBUG(dev, "\n"); -- -- list_for_each_safe(entry, tmp, &dev_priv->gpuobj_list) { -- gpuobj = list_entry(entry, struct nouveau_gpuobj, list); -- -- NV_ERROR(dev, "gpuobj %p still exists at takedown, refs=%d\n", -- gpuobj, gpuobj->refcount); -- gpuobj->refcount = 0; -- nouveau_gpuobj_del(dev, &gpuobj); -+ list_for_each_entry_safe(oc, tc, &dev_priv->classes, head) { -+ list_for_each_entry_safe(om, tm, &oc->methods, head) { -+ list_del(&om->head); -+ kfree(om); -+ } -+ list_del(&oc->head); -+ kfree(oc); - } -+ -+ BUG_ON(!list_empty(&dev_priv->gpuobj_list)); - } - --int --nouveau_gpuobj_del(struct drm_device *dev, struct nouveau_gpuobj **pgpuobj) -+ -+static void -+nouveau_gpuobj_del(struct kref *ref) - { -+ struct nouveau_gpuobj *gpuobj = -+ container_of(ref, struct nouveau_gpuobj, refcount); -+ struct drm_device *dev = gpuobj->dev; - struct drm_nouveau_private *dev_priv = dev->dev_private; - struct nouveau_engine *engine = &dev_priv->engine; -- struct nouveau_gpuobj *gpuobj; - int i; - -- NV_DEBUG(dev, "gpuobj %p\n", pgpuobj ? *pgpuobj : NULL); -- -- if (!dev_priv || !pgpuobj || !(*pgpuobj)) -- return -EINVAL; -- gpuobj = *pgpuobj; -- -- if (gpuobj->refcount != 0) { -- NV_ERROR(dev, "gpuobj refcount is %d\n", gpuobj->refcount); -- return -EINVAL; -- } -+ NV_DEBUG(dev, "gpuobj %p\n", gpuobj); - - if (gpuobj->im_pramin && (gpuobj->flags & NVOBJ_FLAG_ZERO_FREE)) { -- for (i = 0; i < gpuobj->im_pramin->size; i += 4) -- nv_wo32(dev, gpuobj, i/4, 0); -+ for (i = 0; i < gpuobj->size; i += 4) -+ nv_wo32(gpuobj, i, 0); - engine->instmem.flush(dev); - } - - if (gpuobj->dtor) - gpuobj->dtor(dev, gpuobj); - -- if (gpuobj->im_backing && !(gpuobj->flags & NVOBJ_FLAG_FAKE)) -+ if (gpuobj->im_backing) - engine->instmem.clear(dev, gpuobj); - -- if (gpuobj->im_pramin) { -- if (gpuobj->flags & NVOBJ_FLAG_FAKE) -- kfree(gpuobj->im_pramin); -- else -- drm_mm_put_block(gpuobj->im_pramin); -- } -- -+ spin_lock(&dev_priv->ramin_lock); -+ if (gpuobj->im_pramin) -+ drm_mm_put_block(gpuobj->im_pramin); - list_del(&gpuobj->list); -+ spin_unlock(&dev_priv->ramin_lock); - -- *pgpuobj = NULL; - kfree(gpuobj); -- return 0; - } - --static int --nouveau_gpuobj_instance_get(struct drm_device *dev, -- struct nouveau_channel *chan, -- struct nouveau_gpuobj *gpuobj, uint32_t *inst) --{ -- struct drm_nouveau_private *dev_priv = dev->dev_private; -- struct nouveau_gpuobj *cpramin; -- -- /* card_type < NV_50) { -- *inst = gpuobj->im_pramin->start; -- return 0; -- } -- -- if (chan && gpuobj->im_channel != chan) { -- NV_ERROR(dev, "Channel mismatch: obj %d, ref %d\n", -- gpuobj->im_channel->id, chan->id); -- return -EINVAL; -- } -- -- /* NV50 channel-local instance */ -- if (chan) { -- cpramin = chan->ramin->gpuobj; -- *inst = gpuobj->im_pramin->start - cpramin->im_pramin->start; -- return 0; -- } -- -- /* NV50 global (VRAM) instance */ -- if (!gpuobj->im_channel) { -- /* ...from global heap */ -- if (!gpuobj->im_backing) { -- NV_ERROR(dev, "AII, no VRAM backing gpuobj\n"); -- return -EINVAL; -- } -- *inst = gpuobj->im_backing_start; -- return 0; -- } else { -- /* ...from local heap */ -- cpramin = gpuobj->im_channel->ramin->gpuobj; -- *inst = cpramin->im_backing_start + -- (gpuobj->im_pramin->start - cpramin->im_pramin->start); -- return 0; -- } -- -- return -EINVAL; --} -- --int --nouveau_gpuobj_ref_add(struct drm_device *dev, struct nouveau_channel *chan, -- uint32_t handle, struct nouveau_gpuobj *gpuobj, -- struct nouveau_gpuobj_ref **ref_ret) --{ -- struct drm_nouveau_private *dev_priv = dev->dev_private; -- struct nouveau_gpuobj_ref *ref; -- uint32_t instance; -- int ret; -- -- NV_DEBUG(dev, "ch%d h=0x%08x gpuobj=%p\n", -- chan ? chan->id : -1, handle, gpuobj); -- -- if (!dev_priv || !gpuobj || (ref_ret && *ref_ret != NULL)) -- return -EINVAL; -- -- if (!chan && !ref_ret) -- return -EINVAL; -- -- if (gpuobj->engine == NVOBJ_ENGINE_SW && !gpuobj->im_pramin) { -- /* sw object */ -- instance = 0x40; -- } else { -- ret = nouveau_gpuobj_instance_get(dev, chan, gpuobj, &instance); -- if (ret) -- return ret; -- } -- -- ref = kzalloc(sizeof(*ref), GFP_KERNEL); -- if (!ref) -- return -ENOMEM; -- INIT_LIST_HEAD(&ref->list); -- ref->gpuobj = gpuobj; -- ref->channel = chan; -- ref->instance = instance; -- -- if (!ref_ret) { -- ref->handle = handle; -- -- ret = nouveau_ramht_insert(dev, ref); -- if (ret) { -- kfree(ref); -- return ret; -- } -- } else { -- ref->handle = ~0; -- *ref_ret = ref; -- } -- -- ref->gpuobj->refcount++; -- return 0; --} -- --int nouveau_gpuobj_ref_del(struct drm_device *dev, struct nouveau_gpuobj_ref **pref) --{ -- struct nouveau_gpuobj_ref *ref; -- -- NV_DEBUG(dev, "ref %p\n", pref ? *pref : NULL); -- -- if (!dev || !pref || *pref == NULL) -- return -EINVAL; -- ref = *pref; -- -- if (ref->handle != ~0) -- nouveau_ramht_remove(dev, ref); -- -- if (ref->gpuobj) { -- ref->gpuobj->refcount--; -- -- if (ref->gpuobj->refcount == 0) { -- if (!(ref->gpuobj->flags & NVOBJ_FLAG_ALLOW_NO_REFS)) -- nouveau_gpuobj_del(dev, &ref->gpuobj); -- } -- } -- -- *pref = NULL; -- kfree(ref); -- return 0; --} -- --int --nouveau_gpuobj_new_ref(struct drm_device *dev, -- struct nouveau_channel *oc, struct nouveau_channel *rc, -- uint32_t handle, uint32_t size, int align, -- uint32_t flags, struct nouveau_gpuobj_ref **ref) --{ -- struct nouveau_gpuobj *gpuobj = NULL; -- int ret; -- -- ret = nouveau_gpuobj_new(dev, oc, size, align, flags, &gpuobj); -- if (ret) -- return ret; -- -- ret = nouveau_gpuobj_ref_add(dev, rc, handle, gpuobj, ref); -- if (ret) { -- nouveau_gpuobj_del(dev, &gpuobj); -- return ret; -- } -- -- return 0; --} -- --int --nouveau_gpuobj_ref_find(struct nouveau_channel *chan, uint32_t handle, -- struct nouveau_gpuobj_ref **ref_ret) -+void -+nouveau_gpuobj_ref(struct nouveau_gpuobj *ref, struct nouveau_gpuobj **ptr) - { -- struct nouveau_gpuobj_ref *ref; -- struct list_head *entry, *tmp; -- -- list_for_each_safe(entry, tmp, &chan->ramht_refs) { -- ref = list_entry(entry, struct nouveau_gpuobj_ref, list); -+ if (ref) -+ kref_get(&ref->refcount); - -- if (ref->handle == handle) { -- if (ref_ret) -- *ref_ret = ref; -- return 0; -- } -- } -+ if (*ptr) -+ kref_put(&(*ptr)->refcount, nouveau_gpuobj_del); - -- return -EINVAL; -+ *ptr = ref; - } - - int --nouveau_gpuobj_new_fake(struct drm_device *dev, uint32_t p_offset, -- uint32_t b_offset, uint32_t size, -- uint32_t flags, struct nouveau_gpuobj **pgpuobj, -- struct nouveau_gpuobj_ref **pref) -+nouveau_gpuobj_new_fake(struct drm_device *dev, u32 pinst, u64 vinst, -+ u32 size, u32 flags, struct nouveau_gpuobj **pgpuobj) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; - struct nouveau_gpuobj *gpuobj = NULL; - int i; - - NV_DEBUG(dev, -- "p_offset=0x%08x b_offset=0x%08x size=0x%08x flags=0x%08x\n", -- p_offset, b_offset, size, flags); -+ "pinst=0x%08x vinst=0x%010llx size=0x%08x flags=0x%08x\n", -+ pinst, vinst, size, flags); - - gpuobj = kzalloc(sizeof(*gpuobj), GFP_KERNEL); - if (!gpuobj) - return -ENOMEM; - NV_DEBUG(dev, "gpuobj %p\n", gpuobj); -- gpuobj->im_channel = NULL; -- gpuobj->flags = flags | NVOBJ_FLAG_FAKE; -- -- list_add_tail(&gpuobj->list, &dev_priv->gpuobj_list); -- -- if (p_offset != ~0) { -- gpuobj->im_pramin = kzalloc(sizeof(struct drm_mm_node), -- GFP_KERNEL); -- if (!gpuobj->im_pramin) { -- nouveau_gpuobj_del(dev, &gpuobj); -- return -ENOMEM; -- } -- gpuobj->im_pramin->start = p_offset; -- gpuobj->im_pramin->size = size; -- } -- -- if (b_offset != ~0) { -- gpuobj->im_backing = (struct nouveau_bo *)-1; -- gpuobj->im_backing_start = b_offset; -- } -+ gpuobj->dev = dev; -+ gpuobj->flags = flags; -+ kref_init(&gpuobj->refcount); -+ gpuobj->size = size; -+ gpuobj->pinst = pinst; -+ gpuobj->cinst = 0xdeadbeef; -+ gpuobj->vinst = vinst; - - if (gpuobj->flags & NVOBJ_FLAG_ZERO_ALLOC) { -- for (i = 0; i < gpuobj->im_pramin->size; i += 4) -- nv_wo32(dev, gpuobj, i/4, 0); -+ for (i = 0; i < gpuobj->size; i += 4) -+ nv_wo32(gpuobj, i, 0); - dev_priv->engine.instmem.flush(dev); - } - -- if (pref) { -- i = nouveau_gpuobj_ref_add(dev, NULL, 0, gpuobj, pref); -- if (i) { -- nouveau_gpuobj_del(dev, &gpuobj); -- return i; -- } -- } -- -- if (pgpuobj) -- *pgpuobj = gpuobj; -+ spin_lock(&dev_priv->ramin_lock); -+ list_add_tail(&gpuobj->list, &dev_priv->gpuobj_list); -+ spin_unlock(&dev_priv->ramin_lock); -+ *pgpuobj = gpuobj; - return 0; - } - -@@ -685,14 +463,12 @@ - adjust = offset & 0x00000fff; - frame = offset & ~0x00000fff; - -- nv_wo32(dev, *gpuobj, 0, ((1<<12) | (1<<13) | -- (adjust << 20) | -- (access << 14) | -- (target << 16) | -- class)); -- nv_wo32(dev, *gpuobj, 1, size - 1); -- nv_wo32(dev, *gpuobj, 2, frame | pte_flags); -- nv_wo32(dev, *gpuobj, 3, frame | pte_flags); -+ nv_wo32(*gpuobj, 0, ((1<<12) | (1<<13) | (adjust << 20) | -+ (access << 14) | (target << 16) | -+ class)); -+ nv_wo32(*gpuobj, 4, size - 1); -+ nv_wo32(*gpuobj, 8, frame | pte_flags); -+ nv_wo32(*gpuobj, 12, frame | pte_flags); - } else { - uint64_t limit = offset + size - 1; - uint32_t flags0, flags5; -@@ -705,12 +481,12 @@ - flags5 = 0x00080000; - } - -- nv_wo32(dev, *gpuobj, 0, flags0 | class); -- nv_wo32(dev, *gpuobj, 1, lower_32_bits(limit)); -- nv_wo32(dev, *gpuobj, 2, lower_32_bits(offset)); -- nv_wo32(dev, *gpuobj, 3, ((upper_32_bits(limit) & 0xff) << 24) | -- (upper_32_bits(offset) & 0xff)); -- nv_wo32(dev, *gpuobj, 5, flags5); -+ nv_wo32(*gpuobj, 0, flags0 | class); -+ nv_wo32(*gpuobj, 4, lower_32_bits(limit)); -+ nv_wo32(*gpuobj, 8, lower_32_bits(offset)); -+ nv_wo32(*gpuobj, 12, ((upper_32_bits(limit) & 0xff) << 24) | -+ (upper_32_bits(offset) & 0xff)); -+ nv_wo32(*gpuobj, 20, flags5); - } - - instmem->flush(dev); -@@ -741,7 +517,7 @@ - *o_ret = 0; - } else - if (dev_priv->gart_info.type == NOUVEAU_GART_SGDMA) { -- *gpuobj = dev_priv->gart_info.sg_ctxdma; -+ nouveau_gpuobj_ref(dev_priv->gart_info.sg_ctxdma, gpuobj); - if (offset & ~0xffffffffULL) { - NV_ERROR(dev, "obj offset exceeds 32-bits\n"); - return -EINVAL; -@@ -808,76 +584,117 @@ - entry[5]: - set to 0? - */ -+static int -+nouveau_gpuobj_sw_new(struct nouveau_channel *chan, int class, -+ struct nouveau_gpuobj **gpuobj_ret) -+{ -+ struct drm_nouveau_private *dev_priv; -+ struct nouveau_gpuobj *gpuobj; -+ -+ if (!chan || !gpuobj_ret || *gpuobj_ret != NULL) -+ return -EINVAL; -+ dev_priv = chan->dev->dev_private; -+ -+ gpuobj = kzalloc(sizeof(*gpuobj), GFP_KERNEL); -+ if (!gpuobj) -+ return -ENOMEM; -+ gpuobj->dev = chan->dev; -+ gpuobj->engine = NVOBJ_ENGINE_SW; -+ gpuobj->class = class; -+ kref_init(&gpuobj->refcount); -+ gpuobj->cinst = 0x40; -+ -+ spin_lock(&dev_priv->ramin_lock); -+ list_add_tail(&gpuobj->list, &dev_priv->gpuobj_list); -+ spin_unlock(&dev_priv->ramin_lock); -+ *gpuobj_ret = gpuobj; -+ return 0; -+} -+ - int - nouveau_gpuobj_gr_new(struct nouveau_channel *chan, int class, - struct nouveau_gpuobj **gpuobj) - { -+ struct drm_nouveau_private *dev_priv = chan->dev->dev_private; - struct drm_device *dev = chan->dev; -- struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_gpuobj_class *oc; - int ret; - - NV_DEBUG(dev, "ch%d class=0x%04x\n", chan->id, class); - -+ list_for_each_entry(oc, &dev_priv->classes, head) { -+ if (oc->id == class) -+ goto found; -+ } -+ -+ NV_ERROR(dev, "illegal object class: 0x%x\n", class); -+ return -EINVAL; -+ -+found: -+ if (oc->engine == NVOBJ_ENGINE_SW) -+ return nouveau_gpuobj_sw_new(chan, class, gpuobj); -+ -+ switch (oc->engine) { -+ case NVOBJ_ENGINE_GR: -+ if (dev_priv->chipset >= NV_50 && !chan->ramin_grctx) { -+ struct nouveau_pgraph_engine *pgraph = -+ &dev_priv->engine.graph; -+ -+ ret = pgraph->create_context(chan); -+ if (ret) -+ return ret; -+ } -+ break; -+ case NVOBJ_ENGINE_CRYPT: -+ if (!chan->crypt_ctx) { -+ struct nouveau_crypt_engine *pcrypt = -+ &dev_priv->engine.crypt; -+ -+ ret = pcrypt->create_context(chan); -+ if (ret) -+ return ret; -+ } -+ break; -+ } -+ - ret = nouveau_gpuobj_new(dev, chan, - nouveau_gpuobj_class_instmem_size(dev, class), - 16, - NVOBJ_FLAG_ZERO_ALLOC | NVOBJ_FLAG_ZERO_FREE, - gpuobj); - if (ret) { -- NV_ERROR(dev, "Error creating gpuobj: %d\n", ret); -+ NV_ERROR(dev, "error creating gpuobj: %d\n", ret); - return ret; - } - - if (dev_priv->card_type >= NV_50) { -- nv_wo32(dev, *gpuobj, 0, class); -- nv_wo32(dev, *gpuobj, 5, 0x00010000); -+ nv_wo32(*gpuobj, 0, class); -+ nv_wo32(*gpuobj, 20, 0x00010000); - } else { - switch (class) { - case NV_CLASS_NULL: -- nv_wo32(dev, *gpuobj, 0, 0x00001030); -- nv_wo32(dev, *gpuobj, 1, 0xFFFFFFFF); -+ nv_wo32(*gpuobj, 0, 0x00001030); -+ nv_wo32(*gpuobj, 4, 0xFFFFFFFF); - break; - default: - if (dev_priv->card_type >= NV_40) { -- nv_wo32(dev, *gpuobj, 0, class); -+ nv_wo32(*gpuobj, 0, class); - #ifdef __BIG_ENDIAN -- nv_wo32(dev, *gpuobj, 2, 0x01000000); -+ nv_wo32(*gpuobj, 8, 0x01000000); - #endif - } else { - #ifdef __BIG_ENDIAN -- nv_wo32(dev, *gpuobj, 0, class | 0x00080000); -+ nv_wo32(*gpuobj, 0, class | 0x00080000); - #else -- nv_wo32(dev, *gpuobj, 0, class); -+ nv_wo32(*gpuobj, 0, class); - #endif - } - } - } - dev_priv->engine.instmem.flush(dev); - -- (*gpuobj)->engine = NVOBJ_ENGINE_GR; -- (*gpuobj)->class = class; -- return 0; --} -- --int --nouveau_gpuobj_sw_new(struct nouveau_channel *chan, int class, -- struct nouveau_gpuobj **gpuobj_ret) --{ -- struct drm_nouveau_private *dev_priv; -- struct nouveau_gpuobj *gpuobj; -- -- if (!chan || !gpuobj_ret || *gpuobj_ret != NULL) -- return -EINVAL; -- dev_priv = chan->dev->dev_private; -- -- gpuobj = kzalloc(sizeof(*gpuobj), GFP_KERNEL); -- if (!gpuobj) -- return -ENOMEM; -- gpuobj->engine = NVOBJ_ENGINE_SW; -- gpuobj->class = class; -- -- list_add_tail(&gpuobj->list, &dev_priv->gpuobj_list); -- *gpuobj_ret = gpuobj; -+ (*gpuobj)->engine = oc->engine; -+ (*gpuobj)->class = oc->id; - return 0; - } - -@@ -886,7 +703,6 @@ - { - struct drm_device *dev = chan->dev; - struct drm_nouveau_private *dev_priv = dev->dev_private; -- struct nouveau_gpuobj *pramin = NULL; - uint32_t size; - uint32_t base; - int ret; -@@ -894,7 +710,7 @@ - NV_DEBUG(dev, "ch%d\n", chan->id); - - /* Base amount for object storage (4KiB enough?) */ -- size = 0x1000; -+ size = 0x2000; - base = 0; - - /* PGRAPH context */ -@@ -911,18 +727,16 @@ - size += 0x1000; - } - -- ret = nouveau_gpuobj_new_ref(dev, NULL, NULL, 0, size, 0x1000, 0, -- &chan->ramin); -+ ret = nouveau_gpuobj_new(dev, NULL, size, 0x1000, 0, &chan->ramin); - if (ret) { - NV_ERROR(dev, "Error allocating channel PRAMIN: %d\n", ret); - return ret; - } -- pramin = chan->ramin->gpuobj; - -- ret = drm_mm_init(&chan->ramin_heap, pramin->im_pramin->start + base, size); -+ ret = drm_mm_init(&chan->ramin_heap, base, size); - if (ret) { - NV_ERROR(dev, "Error creating PRAMIN heap: %d\n", ret); -- nouveau_gpuobj_ref_del(dev, &chan->ramin); -+ nouveau_gpuobj_ref(NULL, &chan->ramin); - return ret; - } - -@@ -939,8 +753,6 @@ - struct nouveau_gpuobj *vram = NULL, *tt = NULL; - int ret, i; - -- INIT_LIST_HEAD(&chan->ramht_refs); -- - NV_DEBUG(dev, "ch%d vram=0x%08x tt=0x%08x\n", chan->id, vram_h, tt_h); - - /* Allocate a chunk of memory for per-channel object storage */ -@@ -956,41 +768,38 @@ - * locations determined during init. - */ - if (dev_priv->card_type >= NV_50) { -- uint32_t vm_offset, pde; -+ u32 pgd_offs = (dev_priv->chipset == 0x50) ? 0x1400 : 0x0200; -+ u64 vm_vinst = chan->ramin->vinst + pgd_offs; -+ u32 vm_pinst = chan->ramin->pinst; -+ u32 pde; - -- vm_offset = (dev_priv->chipset & 0xf0) == 0x50 ? 0x1400 : 0x200; -- vm_offset += chan->ramin->gpuobj->im_pramin->start; -+ if (vm_pinst != ~0) -+ vm_pinst += pgd_offs; - -- ret = nouveau_gpuobj_new_fake(dev, vm_offset, ~0, 0x4000, -- 0, &chan->vm_pd, NULL); -+ ret = nouveau_gpuobj_new_fake(dev, vm_pinst, vm_vinst, 0x4000, -+ 0, &chan->vm_pd); - if (ret) - return ret; - for (i = 0; i < 0x4000; i += 8) { -- nv_wo32(dev, chan->vm_pd, (i+0)/4, 0x00000000); -- nv_wo32(dev, chan->vm_pd, (i+4)/4, 0xdeadcafe); -+ nv_wo32(chan->vm_pd, i + 0, 0x00000000); -+ nv_wo32(chan->vm_pd, i + 4, 0xdeadcafe); - } - -- pde = (dev_priv->vm_gart_base / (512*1024*1024)) * 2; -- ret = nouveau_gpuobj_ref_add(dev, NULL, 0, -- dev_priv->gart_info.sg_ctxdma, -- &chan->vm_gart_pt); -- if (ret) -- return ret; -- nv_wo32(dev, chan->vm_pd, pde++, -- chan->vm_gart_pt->instance | 0x03); -- nv_wo32(dev, chan->vm_pd, pde++, 0x00000000); -+ nouveau_gpuobj_ref(dev_priv->gart_info.sg_ctxdma, -+ &chan->vm_gart_pt); -+ pde = (dev_priv->vm_gart_base / (512*1024*1024)) * 8; -+ nv_wo32(chan->vm_pd, pde + 0, chan->vm_gart_pt->vinst | 3); -+ nv_wo32(chan->vm_pd, pde + 4, 0x00000000); - -- pde = (dev_priv->vm_vram_base / (512*1024*1024)) * 2; -+ pde = (dev_priv->vm_vram_base / (512*1024*1024)) * 8; - for (i = 0; i < dev_priv->vm_vram_pt_nr; i++) { -- ret = nouveau_gpuobj_ref_add(dev, NULL, 0, -- dev_priv->vm_vram_pt[i], -- &chan->vm_vram_pt[i]); -- if (ret) -- return ret; -+ nouveau_gpuobj_ref(dev_priv->vm_vram_pt[i], -+ &chan->vm_vram_pt[i]); - -- nv_wo32(dev, chan->vm_pd, pde++, -- chan->vm_vram_pt[i]->instance | 0x61); -- nv_wo32(dev, chan->vm_pd, pde++, 0x00000000); -+ nv_wo32(chan->vm_pd, pde + 0, -+ chan->vm_vram_pt[i]->vinst | 0x61); -+ nv_wo32(chan->vm_pd, pde + 4, 0x00000000); -+ pde += 8; - } - - instmem->flush(dev); -@@ -998,15 +807,17 @@ - - /* RAMHT */ - if (dev_priv->card_type < NV_50) { -- ret = nouveau_gpuobj_ref_add(dev, NULL, 0, dev_priv->ramht, -- &chan->ramht); -+ nouveau_ramht_ref(dev_priv->ramht, &chan->ramht, NULL); -+ } else { -+ struct nouveau_gpuobj *ramht = NULL; -+ -+ ret = nouveau_gpuobj_new(dev, chan, 0x8000, 16, -+ NVOBJ_FLAG_ZERO_ALLOC, &ramht); - if (ret) - return ret; -- } else { -- ret = nouveau_gpuobj_new_ref(dev, chan, chan, 0, -- 0x8000, 16, -- NVOBJ_FLAG_ZERO_ALLOC, -- &chan->ramht); -+ -+ ret = nouveau_ramht_new(dev, ramht, &chan->ramht); -+ nouveau_gpuobj_ref(NULL, &ramht); - if (ret) - return ret; - } -@@ -1023,24 +834,32 @@ - } - } else { - ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, -- 0, dev_priv->fb_available_size, -- NV_DMA_ACCESS_RW, -- NV_DMA_TARGET_VIDMEM, &vram); -+ 0, dev_priv->fb_available_size, -+ NV_DMA_ACCESS_RW, -+ NV_DMA_TARGET_VIDMEM, &vram); - if (ret) { - NV_ERROR(dev, "Error creating VRAM ctxdma: %d\n", ret); - return ret; - } - } - -- ret = nouveau_gpuobj_ref_add(dev, chan, vram_h, vram, NULL); -+ ret = nouveau_ramht_insert(chan, vram_h, vram); -+ nouveau_gpuobj_ref(NULL, &vram); - if (ret) { -- NV_ERROR(dev, "Error referencing VRAM ctxdma: %d\n", ret); -+ NV_ERROR(dev, "Error adding VRAM ctxdma to RAMHT: %d\n", ret); - return ret; - } - - /* TT memory ctxdma */ - if (dev_priv->card_type >= NV_50) { -- tt = vram; -+ ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, -+ 0, dev_priv->vm_end, -+ NV_DMA_ACCESS_RW, -+ NV_DMA_TARGET_AGP, &tt); -+ if (ret) { -+ NV_ERROR(dev, "Error creating VRAM ctxdma: %d\n", ret); -+ return ret; -+ } - } else - if (dev_priv->gart_info.type != NOUVEAU_GART_NONE) { - ret = nouveau_gpuobj_gart_dma_new(chan, 0, -@@ -1056,9 +875,10 @@ - return ret; - } - -- ret = nouveau_gpuobj_ref_add(dev, chan, tt_h, tt, NULL); -+ ret = nouveau_ramht_insert(chan, tt_h, tt); -+ nouveau_gpuobj_ref(NULL, &tt); - if (ret) { -- NV_ERROR(dev, "Error referencing TT ctxdma: %d\n", ret); -+ NV_ERROR(dev, "Error adding TT ctxdma to RAMHT: %d\n", ret); - return ret; - } - -@@ -1070,33 +890,23 @@ - { - struct drm_nouveau_private *dev_priv = chan->dev->dev_private; - struct drm_device *dev = chan->dev; -- struct list_head *entry, *tmp; -- struct nouveau_gpuobj_ref *ref; - int i; - - NV_DEBUG(dev, "ch%d\n", chan->id); - -- if (!chan->ramht_refs.next) -+ if (!chan->ramht) - return; - -- list_for_each_safe(entry, tmp, &chan->ramht_refs) { -- ref = list_entry(entry, struct nouveau_gpuobj_ref, list); -- -- nouveau_gpuobj_ref_del(dev, &ref); -- } -- -- nouveau_gpuobj_ref_del(dev, &chan->ramht); -+ nouveau_ramht_ref(NULL, &chan->ramht, chan); - -- nouveau_gpuobj_del(dev, &chan->vm_pd); -- nouveau_gpuobj_ref_del(dev, &chan->vm_gart_pt); -+ nouveau_gpuobj_ref(NULL, &chan->vm_pd); -+ nouveau_gpuobj_ref(NULL, &chan->vm_gart_pt); - for (i = 0; i < dev_priv->vm_vram_pt_nr; i++) -- nouveau_gpuobj_ref_del(dev, &chan->vm_vram_pt[i]); -+ nouveau_gpuobj_ref(NULL, &chan->vm_vram_pt[i]); - - if (chan->ramin_heap.free_stack.next) - drm_mm_takedown(&chan->ramin_heap); -- if (chan->ramin) -- nouveau_gpuobj_ref_del(dev, &chan->ramin); -- -+ nouveau_gpuobj_ref(NULL, &chan->ramin); - } - - int -@@ -1117,17 +927,17 @@ - } - - list_for_each_entry(gpuobj, &dev_priv->gpuobj_list, list) { -- if (!gpuobj->im_backing || (gpuobj->flags & NVOBJ_FLAG_FAKE)) -+ if (!gpuobj->im_backing) - continue; - -- gpuobj->im_backing_suspend = vmalloc(gpuobj->im_pramin->size); -+ gpuobj->im_backing_suspend = vmalloc(gpuobj->size); - if (!gpuobj->im_backing_suspend) { - nouveau_gpuobj_resume(dev); - return -ENOMEM; - } - -- for (i = 0; i < gpuobj->im_pramin->size / 4; i++) -- gpuobj->im_backing_suspend[i] = nv_ro32(dev, gpuobj, i); -+ for (i = 0; i < gpuobj->size; i += 4) -+ gpuobj->im_backing_suspend[i/4] = nv_ro32(gpuobj, i); - } - - return 0; -@@ -1172,8 +982,8 @@ - if (!gpuobj->im_backing_suspend) - continue; - -- for (i = 0; i < gpuobj->im_pramin->size / 4; i++) -- nv_wo32(dev, gpuobj, i, gpuobj->im_backing_suspend[i]); -+ for (i = 0; i < gpuobj->size; i += 4) -+ nv_wo32(gpuobj, i, gpuobj->im_backing_suspend[i/4]); - dev_priv->engine.instmem.flush(dev); - } - -@@ -1183,70 +993,101 @@ - int nouveau_ioctl_grobj_alloc(struct drm_device *dev, void *data, - struct drm_file *file_priv) - { -- struct drm_nouveau_private *dev_priv = dev->dev_private; - struct drm_nouveau_grobj_alloc *init = data; -- struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; -- struct nouveau_pgraph_object_class *grc; - struct nouveau_gpuobj *gr = NULL; - struct nouveau_channel *chan; - int ret; - -- NOUVEAU_GET_USER_CHANNEL_WITH_RETURN(init->channel, file_priv, chan); -- - if (init->handle == ~0) - return -EINVAL; - -- grc = pgraph->grclass; -- while (grc->id) { -- if (grc->id == init->class) -- break; -- grc++; -- } -+ chan = nouveau_channel_get(dev, file_priv, init->channel); -+ if (IS_ERR(chan)) -+ return PTR_ERR(chan); - -- if (!grc->id) { -- NV_ERROR(dev, "Illegal object class: 0x%x\n", init->class); -- return -EPERM; -+ if (nouveau_ramht_find(chan, init->handle)) { -+ ret = -EEXIST; -+ goto out; - } - -- if (nouveau_gpuobj_ref_find(chan, init->handle, NULL) == 0) -- return -EEXIST; -- -- if (!grc->software) -- ret = nouveau_gpuobj_gr_new(chan, grc->id, &gr); -- else -- ret = nouveau_gpuobj_sw_new(chan, grc->id, &gr); -- -+ ret = nouveau_gpuobj_gr_new(chan, init->class, &gr); - if (ret) { - NV_ERROR(dev, "Error creating object: %d (%d/0x%08x)\n", - ret, init->channel, init->handle); -- return ret; -+ goto out; - } - -- ret = nouveau_gpuobj_ref_add(dev, chan, init->handle, gr, NULL); -+ ret = nouveau_ramht_insert(chan, init->handle, gr); -+ nouveau_gpuobj_ref(NULL, &gr); - if (ret) { - NV_ERROR(dev, "Error referencing object: %d (%d/0x%08x)\n", - ret, init->channel, init->handle); -- nouveau_gpuobj_del(dev, &gr); -- return ret; - } - -- return 0; -+out: -+ nouveau_channel_put(&chan); -+ return ret; - } - - int nouveau_ioctl_gpuobj_free(struct drm_device *dev, void *data, - struct drm_file *file_priv) - { - struct drm_nouveau_gpuobj_free *objfree = data; -- struct nouveau_gpuobj_ref *ref; - struct nouveau_channel *chan; - int ret; - -- NOUVEAU_GET_USER_CHANNEL_WITH_RETURN(objfree->channel, file_priv, chan); -+ chan = nouveau_channel_get(dev, file_priv, objfree->channel); -+ if (IS_ERR(chan)) -+ return PTR_ERR(chan); - -- ret = nouveau_gpuobj_ref_find(chan, objfree->handle, &ref); -- if (ret) -- return ret; -- nouveau_gpuobj_ref_del(dev, &ref); -+ ret = nouveau_ramht_remove(chan, objfree->handle); -+ nouveau_channel_put(&chan); -+ return ret; -+} - -- return 0; -+u32 -+nv_ro32(struct nouveau_gpuobj *gpuobj, u32 offset) -+{ -+ struct drm_nouveau_private *dev_priv = gpuobj->dev->dev_private; -+ struct drm_device *dev = gpuobj->dev; -+ -+ if (gpuobj->pinst == ~0 || !dev_priv->ramin_available) { -+ u64 ptr = gpuobj->vinst + offset; -+ u32 base = ptr >> 16; -+ u32 val; -+ -+ spin_lock(&dev_priv->ramin_lock); -+ if (dev_priv->ramin_base != base) { -+ dev_priv->ramin_base = base; -+ nv_wr32(dev, 0x001700, dev_priv->ramin_base); -+ } -+ val = nv_rd32(dev, 0x700000 + (ptr & 0xffff)); -+ spin_unlock(&dev_priv->ramin_lock); -+ return val; -+ } -+ -+ return nv_ri32(dev, gpuobj->pinst + offset); -+} -+ -+void -+nv_wo32(struct nouveau_gpuobj *gpuobj, u32 offset, u32 val) -+{ -+ struct drm_nouveau_private *dev_priv = gpuobj->dev->dev_private; -+ struct drm_device *dev = gpuobj->dev; -+ -+ if (gpuobj->pinst == ~0 || !dev_priv->ramin_available) { -+ u64 ptr = gpuobj->vinst + offset; -+ u32 base = ptr >> 16; -+ -+ spin_lock(&dev_priv->ramin_lock); -+ if (dev_priv->ramin_base != base) { -+ dev_priv->ramin_base = base; -+ nv_wr32(dev, 0x001700, dev_priv->ramin_base); -+ } -+ nv_wr32(dev, 0x700000 + (ptr & 0xffff), val); -+ spin_unlock(&dev_priv->ramin_lock); -+ return; -+ } -+ -+ nv_wi32(dev, gpuobj->pinst + offset, val); - } -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_perf.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_perf.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_perf.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_perf.c 2010-10-30 22:24:25.000000000 +0200 -@@ -0,0 +1,205 @@ -+/* -+ * Copyright 2010 Red Hat Inc. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be included in -+ * all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR -+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ * -+ * Authors: Ben Skeggs -+ */ -+ -+#include "drmP.h" -+ -+#include "nouveau_drv.h" -+#include "nouveau_pm.h" -+ -+static void -+legacy_perf_init(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nvbios *bios = &dev_priv->vbios; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ char *perf, *entry, *bmp = &bios->data[bios->offset]; -+ int headerlen, use_straps; -+ -+ if (bmp[5] < 0x5 || bmp[6] < 0x14) { -+ NV_DEBUG(dev, "BMP version too old for perf\n"); -+ return; -+ } -+ -+ perf = ROMPTR(bios, bmp[0x73]); -+ if (!perf) { -+ NV_DEBUG(dev, "No memclock table pointer found.\n"); -+ return; -+ } -+ -+ switch (perf[0]) { -+ case 0x12: -+ case 0x14: -+ case 0x18: -+ use_straps = 0; -+ headerlen = 1; -+ break; -+ case 0x01: -+ use_straps = perf[1] & 1; -+ headerlen = (use_straps ? 8 : 2); -+ break; -+ default: -+ NV_WARN(dev, "Unknown memclock table version %x.\n", perf[0]); -+ return; -+ } -+ -+ entry = perf + headerlen; -+ if (use_straps) -+ entry += (nv_rd32(dev, NV_PEXTDEV_BOOT_0) & 0x3c) >> 1; -+ -+ sprintf(pm->perflvl[0].name, "performance_level_0"); -+ pm->perflvl[0].memory = ROM16(entry[0]) * 20; -+ pm->nr_perflvl = 1; -+} -+ -+void -+nouveau_perf_init(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ struct nvbios *bios = &dev_priv->vbios; -+ struct bit_entry P; -+ u8 version, headerlen, recordlen, entries; -+ u8 *perf, *entry; -+ int vid, i; -+ -+ if (bios->type == NVBIOS_BIT) { -+ if (bit_table(dev, 'P', &P)) -+ return; -+ -+ if (P.version != 1 && P.version != 2) { -+ NV_WARN(dev, "unknown perf for BIT P %d\n", P.version); -+ return; -+ } -+ -+ perf = ROMPTR(bios, P.data[0]); -+ version = perf[0]; -+ headerlen = perf[1]; -+ if (version < 0x40) { -+ recordlen = perf[3] + (perf[4] * perf[5]); -+ entries = perf[2]; -+ } else { -+ recordlen = perf[2] + (perf[3] * perf[4]); -+ entries = perf[5]; -+ } -+ } else { -+ if (bios->data[bios->offset + 6] < 0x25) { -+ legacy_perf_init(dev); -+ return; -+ } -+ -+ perf = ROMPTR(bios, bios->data[bios->offset + 0x94]); -+ if (!perf) { -+ NV_DEBUG(dev, "perf table pointer invalid\n"); -+ return; -+ } -+ -+ version = perf[1]; -+ headerlen = perf[0]; -+ recordlen = perf[3]; -+ entries = perf[2]; -+ } -+ -+ entry = perf + headerlen; -+ for (i = 0; i < entries; i++) { -+ struct nouveau_pm_level *perflvl = &pm->perflvl[pm->nr_perflvl]; -+ -+ if (entry[0] == 0xff) { -+ entry += recordlen; -+ continue; -+ } -+ -+ switch (version) { -+ case 0x12: -+ case 0x13: -+ case 0x15: -+ perflvl->fanspeed = entry[55]; -+ perflvl->voltage = entry[56]; -+ perflvl->core = ROM32(entry[1]) * 10; -+ perflvl->memory = ROM32(entry[5]) * 20; -+ break; -+ case 0x21: -+ case 0x23: -+ case 0x24: -+ perflvl->fanspeed = entry[4]; -+ perflvl->voltage = entry[5]; -+ perflvl->core = ROM16(entry[6]) * 1000; -+ -+ if (dev_priv->chipset == 0x49 || -+ dev_priv->chipset == 0x4b) -+ perflvl->memory = ROM16(entry[11]) * 1000; -+ else -+ perflvl->memory = ROM16(entry[11]) * 2000; -+ -+ break; -+ case 0x25: -+ perflvl->fanspeed = entry[4]; -+ perflvl->voltage = entry[5]; -+ perflvl->core = ROM16(entry[6]) * 1000; -+ perflvl->shader = ROM16(entry[10]) * 1000; -+ perflvl->memory = ROM16(entry[12]) * 1000; -+ break; -+ case 0x30: -+ perflvl->memscript = ROM16(entry[2]); -+ case 0x35: -+ perflvl->fanspeed = entry[6]; -+ perflvl->voltage = entry[7]; -+ perflvl->core = ROM16(entry[8]) * 1000; -+ perflvl->shader = ROM16(entry[10]) * 1000; -+ perflvl->memory = ROM16(entry[12]) * 1000; -+ /*XXX: confirm on 0x35 */ -+ perflvl->unk05 = ROM16(entry[16]) * 1000; -+ break; -+ case 0x40: -+#define subent(n) entry[perf[2] + ((n) * perf[3])] -+ perflvl->fanspeed = 0; /*XXX*/ -+ perflvl->voltage = entry[2]; -+ perflvl->core = (ROM16(subent(0)) & 0xfff) * 1000; -+ perflvl->shader = (ROM16(subent(1)) & 0xfff) * 1000; -+ perflvl->memory = (ROM16(subent(2)) & 0xfff) * 1000; -+ break; -+ } -+ -+ /* make sure vid is valid */ -+ if (pm->voltage.supported && perflvl->voltage) { -+ vid = nouveau_volt_vid_lookup(dev, perflvl->voltage); -+ if (vid < 0) { -+ NV_DEBUG(dev, "drop perflvl %d, bad vid\n", i); -+ entry += recordlen; -+ continue; -+ } -+ } -+ -+ snprintf(perflvl->name, sizeof(perflvl->name), -+ "performance_level_%d", i); -+ perflvl->id = i; -+ pm->nr_perflvl++; -+ -+ entry += recordlen; -+ } -+} -+ -+void -+nouveau_perf_fini(struct drm_device *dev) -+{ -+} -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_pm.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_pm.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_pm.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_pm.c 2010-10-30 22:24:25.000000000 +0200 -@@ -0,0 +1,553 @@ -+/* -+ * Copyright 2010 Red Hat Inc. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be included in -+ * all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR -+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ * -+ * Authors: Ben Skeggs -+ */ -+ -+#include "drmP.h" -+ -+#include "nouveau_drv.h" -+#include "nouveau_pm.h" -+ -+#ifdef CONFIG_ACPI -+#include -+#endif -+#include -+#include -+#include -+ -+static int -+nouveau_pm_clock_set(struct drm_device *dev, struct nouveau_pm_level *perflvl, -+ u8 id, u32 khz) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ void *pre_state; -+ -+ if (khz == 0) -+ return 0; -+ -+ pre_state = pm->clock_pre(dev, perflvl, id, khz); -+ if (IS_ERR(pre_state)) -+ return PTR_ERR(pre_state); -+ -+ if (pre_state) -+ pm->clock_set(dev, pre_state); -+ return 0; -+} -+ -+static int -+nouveau_pm_perflvl_set(struct drm_device *dev, struct nouveau_pm_level *perflvl) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ int ret; -+ -+ if (perflvl == pm->cur) -+ return 0; -+ -+ if (pm->voltage.supported && pm->voltage_set && perflvl->voltage) { -+ ret = pm->voltage_set(dev, perflvl->voltage); -+ if (ret) { -+ NV_ERROR(dev, "voltage_set %d failed: %d\n", -+ perflvl->voltage, ret); -+ } -+ } -+ -+ nouveau_pm_clock_set(dev, perflvl, PLL_CORE, perflvl->core); -+ nouveau_pm_clock_set(dev, perflvl, PLL_SHADER, perflvl->shader); -+ nouveau_pm_clock_set(dev, perflvl, PLL_MEMORY, perflvl->memory); -+ nouveau_pm_clock_set(dev, perflvl, PLL_UNK05, perflvl->unk05); -+ -+ pm->cur = perflvl; -+ return 0; -+} -+ -+static int -+nouveau_pm_profile_set(struct drm_device *dev, const char *profile) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ struct nouveau_pm_level *perflvl = NULL; -+ -+ /* safety precaution, for now */ -+ if (nouveau_perflvl_wr != 7777) -+ return -EPERM; -+ -+ if (!pm->clock_set) -+ return -EINVAL; -+ -+ if (!strncmp(profile, "boot", 4)) -+ perflvl = &pm->boot; -+ else { -+ int pl = simple_strtol(profile, NULL, 10); -+ int i; -+ -+ for (i = 0; i < pm->nr_perflvl; i++) { -+ if (pm->perflvl[i].id == pl) { -+ perflvl = &pm->perflvl[i]; -+ break; -+ } -+ } -+ -+ if (!perflvl) -+ return -EINVAL; -+ } -+ -+ NV_INFO(dev, "setting performance level: %s\n", profile); -+ return nouveau_pm_perflvl_set(dev, perflvl); -+} -+ -+static int -+nouveau_pm_perflvl_get(struct drm_device *dev, struct nouveau_pm_level *perflvl) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ int ret; -+ -+ if (!pm->clock_get) -+ return -EINVAL; -+ -+ memset(perflvl, 0, sizeof(*perflvl)); -+ -+ ret = pm->clock_get(dev, PLL_CORE); -+ if (ret > 0) -+ perflvl->core = ret; -+ -+ ret = pm->clock_get(dev, PLL_MEMORY); -+ if (ret > 0) -+ perflvl->memory = ret; -+ -+ ret = pm->clock_get(dev, PLL_SHADER); -+ if (ret > 0) -+ perflvl->shader = ret; -+ -+ ret = pm->clock_get(dev, PLL_UNK05); -+ if (ret > 0) -+ perflvl->unk05 = ret; -+ -+ if (pm->voltage.supported && pm->voltage_get) { -+ ret = pm->voltage_get(dev); -+ if (ret > 0) -+ perflvl->voltage = ret; -+ } -+ -+ return 0; -+} -+ -+static void -+nouveau_pm_perflvl_info(struct nouveau_pm_level *perflvl, char *ptr, int len) -+{ -+ char c[16], s[16], v[16], f[16]; -+ -+ c[0] = '\0'; -+ if (perflvl->core) -+ snprintf(c, sizeof(c), " core %dMHz", perflvl->core / 1000); -+ -+ s[0] = '\0'; -+ if (perflvl->shader) -+ snprintf(s, sizeof(s), " shader %dMHz", perflvl->shader / 1000); -+ -+ v[0] = '\0'; -+ if (perflvl->voltage) -+ snprintf(v, sizeof(v), " voltage %dmV", perflvl->voltage * 10); -+ -+ f[0] = '\0'; -+ if (perflvl->fanspeed) -+ snprintf(f, sizeof(f), " fanspeed %d%%", perflvl->fanspeed); -+ -+ snprintf(ptr, len, "memory %dMHz%s%s%s%s\n", perflvl->memory / 1000, -+ c, s, v, f); -+} -+ -+static ssize_t -+nouveau_pm_get_perflvl_info(struct device *d, -+ struct device_attribute *a, char *buf) -+{ -+ struct nouveau_pm_level *perflvl = (struct nouveau_pm_level *)a; -+ char *ptr = buf; -+ int len = PAGE_SIZE; -+ -+ snprintf(ptr, len, "%d: ", perflvl->id); -+ ptr += strlen(buf); -+ len -= strlen(buf); -+ -+ nouveau_pm_perflvl_info(perflvl, ptr, len); -+ return strlen(buf); -+} -+ -+static ssize_t -+nouveau_pm_get_perflvl(struct device *d, struct device_attribute *a, char *buf) -+{ -+ struct drm_device *dev = pci_get_drvdata(to_pci_dev(d)); -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ struct nouveau_pm_level cur; -+ int len = PAGE_SIZE, ret; -+ char *ptr = buf; -+ -+ if (!pm->cur) -+ snprintf(ptr, len, "setting: boot\n"); -+ else if (pm->cur == &pm->boot) -+ snprintf(ptr, len, "setting: boot\nc: "); -+ else -+ snprintf(ptr, len, "setting: static %d\nc: ", pm->cur->id); -+ ptr += strlen(buf); -+ len -= strlen(buf); -+ -+ ret = nouveau_pm_perflvl_get(dev, &cur); -+ if (ret == 0) -+ nouveau_pm_perflvl_info(&cur, ptr, len); -+ return strlen(buf); -+} -+ -+static ssize_t -+nouveau_pm_set_perflvl(struct device *d, struct device_attribute *a, -+ const char *buf, size_t count) -+{ -+ struct drm_device *dev = pci_get_drvdata(to_pci_dev(d)); -+ int ret; -+ -+ ret = nouveau_pm_profile_set(dev, buf); -+ if (ret) -+ return ret; -+ return strlen(buf); -+} -+ -+static DEVICE_ATTR(performance_level, S_IRUGO | S_IWUSR, -+ nouveau_pm_get_perflvl, nouveau_pm_set_perflvl); -+ -+static int -+nouveau_sysfs_init(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ struct device *d = &dev->pdev->dev; -+ int ret, i; -+ -+ ret = device_create_file(d, &dev_attr_performance_level); -+ if (ret) -+ return ret; -+ -+ for (i = 0; i < pm->nr_perflvl; i++) { -+ struct nouveau_pm_level *perflvl = &pm->perflvl[i]; -+ -+ perflvl->dev_attr.attr.name = perflvl->name; -+ perflvl->dev_attr.attr.mode = S_IRUGO; -+ perflvl->dev_attr.show = nouveau_pm_get_perflvl_info; -+ perflvl->dev_attr.store = NULL; -+ sysfs_attr_init(&perflvl->dev_attr.attr); -+ -+ ret = device_create_file(d, &perflvl->dev_attr); -+ if (ret) { -+ NV_ERROR(dev, "failed pervlvl %d sysfs: %d\n", -+ perflvl->id, i); -+ perflvl->dev_attr.attr.name = NULL; -+ nouveau_pm_fini(dev); -+ return ret; -+ } -+ } -+ -+ return 0; -+} -+ -+static void -+nouveau_sysfs_fini(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ struct device *d = &dev->pdev->dev; -+ int i; -+ -+ device_remove_file(d, &dev_attr_performance_level); -+ for (i = 0; i < pm->nr_perflvl; i++) { -+ struct nouveau_pm_level *pl = &pm->perflvl[i]; -+ -+ if (!pl->dev_attr.attr.name) -+ break; -+ -+ device_remove_file(d, &pl->dev_attr); -+ } -+} -+ -+#ifdef CONFIG_HWMON -+static ssize_t -+nouveau_hwmon_show_temp(struct device *d, struct device_attribute *a, char *buf) -+{ -+ struct drm_device *dev = dev_get_drvdata(d); -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ -+ return snprintf(buf, PAGE_SIZE, "%d\n", pm->temp_get(dev)*1000); -+} -+static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, nouveau_hwmon_show_temp, -+ NULL, 0); -+ -+static ssize_t -+nouveau_hwmon_max_temp(struct device *d, struct device_attribute *a, char *buf) -+{ -+ struct drm_device *dev = dev_get_drvdata(d); -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ struct nouveau_pm_threshold_temp *temp = &pm->threshold_temp; -+ -+ return snprintf(buf, PAGE_SIZE, "%d\n", temp->down_clock*1000); -+} -+static ssize_t -+nouveau_hwmon_set_max_temp(struct device *d, struct device_attribute *a, -+ const char *buf, size_t count) -+{ -+ struct drm_device *dev = dev_get_drvdata(d); -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ struct nouveau_pm_threshold_temp *temp = &pm->threshold_temp; -+ long value; -+ -+ if (strict_strtol(buf, 10, &value) == -EINVAL) -+ return count; -+ -+ temp->down_clock = value/1000; -+ -+ nouveau_temp_safety_checks(dev); -+ -+ return count; -+} -+static SENSOR_DEVICE_ATTR(temp1_max, S_IRUGO | S_IWUSR, nouveau_hwmon_max_temp, -+ nouveau_hwmon_set_max_temp, -+ 0); -+ -+static ssize_t -+nouveau_hwmon_critical_temp(struct device *d, struct device_attribute *a, -+ char *buf) -+{ -+ struct drm_device *dev = dev_get_drvdata(d); -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ struct nouveau_pm_threshold_temp *temp = &pm->threshold_temp; -+ -+ return snprintf(buf, PAGE_SIZE, "%d\n", temp->critical*1000); -+} -+static ssize_t -+nouveau_hwmon_set_critical_temp(struct device *d, struct device_attribute *a, -+ const char *buf, -+ size_t count) -+{ -+ struct drm_device *dev = dev_get_drvdata(d); -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ struct nouveau_pm_threshold_temp *temp = &pm->threshold_temp; -+ long value; -+ -+ if (strict_strtol(buf, 10, &value) == -EINVAL) -+ return count; -+ -+ temp->critical = value/1000; -+ -+ nouveau_temp_safety_checks(dev); -+ -+ return count; -+} -+static SENSOR_DEVICE_ATTR(temp1_crit, S_IRUGO | S_IWUSR, -+ nouveau_hwmon_critical_temp, -+ nouveau_hwmon_set_critical_temp, -+ 0); -+ -+static ssize_t nouveau_hwmon_show_name(struct device *dev, -+ struct device_attribute *attr, -+ char *buf) -+{ -+ return sprintf(buf, "nouveau\n"); -+} -+static SENSOR_DEVICE_ATTR(name, S_IRUGO, nouveau_hwmon_show_name, NULL, 0); -+ -+static ssize_t nouveau_hwmon_show_update_rate(struct device *dev, -+ struct device_attribute *attr, -+ char *buf) -+{ -+ return sprintf(buf, "1000\n"); -+} -+static SENSOR_DEVICE_ATTR(update_rate, S_IRUGO, -+ nouveau_hwmon_show_update_rate, -+ NULL, 0); -+ -+static struct attribute *hwmon_attributes[] = { -+ &sensor_dev_attr_temp1_input.dev_attr.attr, -+ &sensor_dev_attr_temp1_max.dev_attr.attr, -+ &sensor_dev_attr_temp1_crit.dev_attr.attr, -+ &sensor_dev_attr_name.dev_attr.attr, -+ &sensor_dev_attr_update_rate.dev_attr.attr, -+ NULL -+}; -+ -+static const struct attribute_group hwmon_attrgroup = { -+ .attrs = hwmon_attributes, -+}; -+#endif -+ -+static int -+nouveau_hwmon_init(struct drm_device *dev) -+{ -+#ifdef CONFIG_HWMON -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ struct device *hwmon_dev; -+ int ret; -+ -+ if (!pm->temp_get) -+ return -ENODEV; -+ -+ hwmon_dev = hwmon_device_register(&dev->pdev->dev); -+ if (IS_ERR(hwmon_dev)) { -+ ret = PTR_ERR(hwmon_dev); -+ NV_ERROR(dev, -+ "Unable to register hwmon device: %d\n", ret); -+ return ret; -+ } -+ dev_set_drvdata(hwmon_dev, dev); -+ ret = sysfs_create_group(&hwmon_dev->kobj, -+ &hwmon_attrgroup); -+ if (ret) { -+ NV_ERROR(dev, -+ "Unable to create hwmon sysfs file: %d\n", ret); -+ hwmon_device_unregister(hwmon_dev); -+ return ret; -+ } -+ -+ pm->hwmon = hwmon_dev; -+#endif -+ return 0; -+} -+ -+static void -+nouveau_hwmon_fini(struct drm_device *dev) -+{ -+#ifdef CONFIG_HWMON -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ -+ if (pm->hwmon) { -+ sysfs_remove_group(&pm->hwmon->kobj, &hwmon_attrgroup); -+ hwmon_device_unregister(pm->hwmon); -+ } -+#endif -+} -+ -+#ifdef CONFIG_ACPI -+static int -+nouveau_pm_acpi_event(struct notifier_block *nb, unsigned long val, void *data) -+{ -+ struct drm_nouveau_private *dev_priv = -+ container_of(nb, struct drm_nouveau_private, engine.pm.acpi_nb); -+ struct drm_device *dev = dev_priv->dev; -+ struct acpi_bus_event *entry = (struct acpi_bus_event *)data; -+ -+ if (strcmp(entry->device_class, "ac_adapter") == 0) { -+ bool ac = power_supply_is_system_supplied(); -+ -+ NV_DEBUG(dev, "power supply changed: %s\n", ac ? "AC" : "DC"); -+ } -+ -+ return NOTIFY_OK; -+} -+#endif -+ -+int -+nouveau_pm_init(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ char info[256]; -+ int ret, i; -+ -+ nouveau_volt_init(dev); -+ nouveau_perf_init(dev); -+ nouveau_temp_init(dev); -+ nouveau_mem_timing_init(dev); -+ -+ NV_INFO(dev, "%d available performance level(s)\n", pm->nr_perflvl); -+ for (i = 0; i < pm->nr_perflvl; i++) { -+ nouveau_pm_perflvl_info(&pm->perflvl[i], info, sizeof(info)); -+ NV_INFO(dev, "%d: %s", pm->perflvl[i].id, info); -+ } -+ -+ /* determine current ("boot") performance level */ -+ ret = nouveau_pm_perflvl_get(dev, &pm->boot); -+ if (ret == 0) { -+ pm->cur = &pm->boot; -+ -+ nouveau_pm_perflvl_info(&pm->boot, info, sizeof(info)); -+ NV_INFO(dev, "c: %s", info); -+ } -+ -+ /* switch performance levels now if requested */ -+ if (nouveau_perflvl != NULL) { -+ ret = nouveau_pm_profile_set(dev, nouveau_perflvl); -+ if (ret) { -+ NV_ERROR(dev, "error setting perflvl \"%s\": %d\n", -+ nouveau_perflvl, ret); -+ } -+ } -+ -+ nouveau_sysfs_init(dev); -+ nouveau_hwmon_init(dev); -+#ifdef CONFIG_ACPI -+ pm->acpi_nb.notifier_call = nouveau_pm_acpi_event; -+ register_acpi_notifier(&pm->acpi_nb); -+#endif -+ -+ return 0; -+} -+ -+void -+nouveau_pm_fini(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ -+ if (pm->cur != &pm->boot) -+ nouveau_pm_perflvl_set(dev, &pm->boot); -+ -+ nouveau_mem_timing_fini(dev); -+ nouveau_temp_fini(dev); -+ nouveau_perf_fini(dev); -+ nouveau_volt_fini(dev); -+ -+#ifdef CONFIG_ACPI -+ unregister_acpi_notifier(&pm->acpi_nb); -+#endif -+ nouveau_hwmon_fini(dev); -+ nouveau_sysfs_fini(dev); -+} -+ -+void -+nouveau_pm_resume(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ struct nouveau_pm_level *perflvl; -+ -+ if (pm->cur == &pm->boot) -+ return; -+ -+ perflvl = pm->cur; -+ pm->cur = &pm->boot; -+ nouveau_pm_perflvl_set(dev, perflvl); -+} -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_pm.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_pm.h ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_pm.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_pm.h 2010-10-30 22:24:25.000000000 +0200 -@@ -0,0 +1,74 @@ -+/* -+ * Copyright 2010 Red Hat Inc. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be included in -+ * all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR -+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ * -+ * Authors: Ben Skeggs -+ */ -+ -+#ifndef __NOUVEAU_PM_H__ -+#define __NOUVEAU_PM_H__ -+ -+/* nouveau_pm.c */ -+int nouveau_pm_init(struct drm_device *dev); -+void nouveau_pm_fini(struct drm_device *dev); -+void nouveau_pm_resume(struct drm_device *dev); -+ -+/* nouveau_volt.c */ -+void nouveau_volt_init(struct drm_device *); -+void nouveau_volt_fini(struct drm_device *); -+int nouveau_volt_vid_lookup(struct drm_device *, int voltage); -+int nouveau_volt_lvl_lookup(struct drm_device *, int vid); -+int nouveau_voltage_gpio_get(struct drm_device *); -+int nouveau_voltage_gpio_set(struct drm_device *, int voltage); -+ -+/* nouveau_perf.c */ -+void nouveau_perf_init(struct drm_device *); -+void nouveau_perf_fini(struct drm_device *); -+ -+/* nouveau_mem.c */ -+void nouveau_mem_timing_init(struct drm_device *); -+void nouveau_mem_timing_fini(struct drm_device *); -+ -+/* nv04_pm.c */ -+int nv04_pm_clock_get(struct drm_device *, u32 id); -+void *nv04_pm_clock_pre(struct drm_device *, struct nouveau_pm_level *, -+ u32 id, int khz); -+void nv04_pm_clock_set(struct drm_device *, void *); -+ -+/* nv50_pm.c */ -+int nv50_pm_clock_get(struct drm_device *, u32 id); -+void *nv50_pm_clock_pre(struct drm_device *, struct nouveau_pm_level *, -+ u32 id, int khz); -+void nv50_pm_clock_set(struct drm_device *, void *); -+ -+/* nva3_pm.c */ -+int nva3_pm_clock_get(struct drm_device *, u32 id); -+void *nva3_pm_clock_pre(struct drm_device *, struct nouveau_pm_level *, -+ u32 id, int khz); -+void nva3_pm_clock_set(struct drm_device *, void *); -+ -+/* nouveau_temp.c */ -+void nouveau_temp_init(struct drm_device *dev); -+void nouveau_temp_fini(struct drm_device *dev); -+void nouveau_temp_safety_checks(struct drm_device *dev); -+int nv40_temp_get(struct drm_device *dev); -+int nv84_temp_get(struct drm_device *dev); -+ -+#endif -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_ramht.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_ramht.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.c 2010-10-30 22:24:25.000000000 +0200 -@@ -0,0 +1,307 @@ -+/* -+ * Copyright 2010 Red Hat Inc. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be included in -+ * all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR -+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ * -+ * Authors: Ben Skeggs -+ */ -+ -+#include "drmP.h" -+ -+#include "nouveau_drv.h" -+#include "nouveau_ramht.h" -+ -+static u32 -+nouveau_ramht_hash_handle(struct nouveau_channel *chan, u32 handle) -+{ -+ struct drm_device *dev = chan->dev; -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_ramht *ramht = chan->ramht; -+ u32 hash = 0; -+ int i; -+ -+ NV_DEBUG(dev, "ch%d handle=0x%08x\n", chan->id, handle); -+ -+ for (i = 32; i > 0; i -= ramht->bits) { -+ hash ^= (handle & ((1 << ramht->bits) - 1)); -+ handle >>= ramht->bits; -+ } -+ -+ if (dev_priv->card_type < NV_50) -+ hash ^= chan->id << (ramht->bits - 4); -+ hash <<= 3; -+ -+ NV_DEBUG(dev, "hash=0x%08x\n", hash); -+ return hash; -+} -+ -+static int -+nouveau_ramht_entry_valid(struct drm_device *dev, struct nouveau_gpuobj *ramht, -+ u32 offset) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ u32 ctx = nv_ro32(ramht, offset + 4); -+ -+ if (dev_priv->card_type < NV_40) -+ return ((ctx & NV_RAMHT_CONTEXT_VALID) != 0); -+ return (ctx != 0); -+} -+ -+static int -+nouveau_ramht_entry_same_channel(struct nouveau_channel *chan, -+ struct nouveau_gpuobj *ramht, u32 offset) -+{ -+ struct drm_nouveau_private *dev_priv = chan->dev->dev_private; -+ u32 ctx = nv_ro32(ramht, offset + 4); -+ -+ if (dev_priv->card_type >= NV_50) -+ return true; -+ else if (dev_priv->card_type >= NV_40) -+ return chan->id == -+ ((ctx >> NV40_RAMHT_CONTEXT_CHANNEL_SHIFT) & 0x1f); -+ else -+ return chan->id == -+ ((ctx >> NV_RAMHT_CONTEXT_CHANNEL_SHIFT) & 0x1f); -+} -+ -+int -+nouveau_ramht_insert(struct nouveau_channel *chan, u32 handle, -+ struct nouveau_gpuobj *gpuobj) -+{ -+ struct drm_device *dev = chan->dev; -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_instmem_engine *instmem = &dev_priv->engine.instmem; -+ struct nouveau_ramht_entry *entry; -+ struct nouveau_gpuobj *ramht = chan->ramht->gpuobj; -+ unsigned long flags; -+ u32 ctx, co, ho; -+ -+ if (nouveau_ramht_find(chan, handle)) -+ return -EEXIST; -+ -+ entry = kmalloc(sizeof(*entry), GFP_KERNEL); -+ if (!entry) -+ return -ENOMEM; -+ entry->channel = chan; -+ entry->gpuobj = NULL; -+ entry->handle = handle; -+ nouveau_gpuobj_ref(gpuobj, &entry->gpuobj); -+ -+ if (dev_priv->card_type < NV_40) { -+ ctx = NV_RAMHT_CONTEXT_VALID | (gpuobj->cinst >> 4) | -+ (chan->id << NV_RAMHT_CONTEXT_CHANNEL_SHIFT) | -+ (gpuobj->engine << NV_RAMHT_CONTEXT_ENGINE_SHIFT); -+ } else -+ if (dev_priv->card_type < NV_50) { -+ ctx = (gpuobj->cinst >> 4) | -+ (chan->id << NV40_RAMHT_CONTEXT_CHANNEL_SHIFT) | -+ (gpuobj->engine << NV40_RAMHT_CONTEXT_ENGINE_SHIFT); -+ } else { -+ if (gpuobj->engine == NVOBJ_ENGINE_DISPLAY) { -+ ctx = (gpuobj->cinst << 10) | chan->id; -+ } else { -+ ctx = (gpuobj->cinst >> 4) | -+ ((gpuobj->engine << -+ NV40_RAMHT_CONTEXT_ENGINE_SHIFT)); -+ } -+ } -+ -+ spin_lock_irqsave(&chan->ramht->lock, flags); -+ list_add(&entry->head, &chan->ramht->entries); -+ -+ co = ho = nouveau_ramht_hash_handle(chan, handle); -+ do { -+ if (!nouveau_ramht_entry_valid(dev, ramht, co)) { -+ NV_DEBUG(dev, -+ "insert ch%d 0x%08x: h=0x%08x, c=0x%08x\n", -+ chan->id, co, handle, ctx); -+ nv_wo32(ramht, co + 0, handle); -+ nv_wo32(ramht, co + 4, ctx); -+ -+ spin_unlock_irqrestore(&chan->ramht->lock, flags); -+ instmem->flush(dev); -+ return 0; -+ } -+ NV_DEBUG(dev, "collision ch%d 0x%08x: h=0x%08x\n", -+ chan->id, co, nv_ro32(ramht, co)); -+ -+ co += 8; -+ if (co >= ramht->size) -+ co = 0; -+ } while (co != ho); -+ -+ NV_ERROR(dev, "RAMHT space exhausted. ch=%d\n", chan->id); -+ list_del(&entry->head); -+ spin_unlock_irqrestore(&chan->ramht->lock, flags); -+ kfree(entry); -+ return -ENOMEM; -+} -+ -+static struct nouveau_ramht_entry * -+nouveau_ramht_remove_entry(struct nouveau_channel *chan, u32 handle) -+{ -+ struct nouveau_ramht *ramht = chan ? chan->ramht : NULL; -+ struct nouveau_ramht_entry *entry; -+ unsigned long flags; -+ -+ if (!ramht) -+ return NULL; -+ -+ spin_lock_irqsave(&ramht->lock, flags); -+ list_for_each_entry(entry, &ramht->entries, head) { -+ if (entry->channel == chan && -+ (!handle || entry->handle == handle)) { -+ list_del(&entry->head); -+ spin_unlock_irqrestore(&ramht->lock, flags); -+ -+ return entry; -+ } -+ } -+ spin_unlock_irqrestore(&ramht->lock, flags); -+ -+ return NULL; -+} -+ -+static void -+nouveau_ramht_remove_hash(struct nouveau_channel *chan, u32 handle) -+{ -+ struct drm_device *dev = chan->dev; -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_instmem_engine *instmem = &dev_priv->engine.instmem; -+ struct nouveau_gpuobj *ramht = chan->ramht->gpuobj; -+ unsigned long flags; -+ u32 co, ho; -+ -+ spin_lock_irqsave(&chan->ramht->lock, flags); -+ co = ho = nouveau_ramht_hash_handle(chan, handle); -+ do { -+ if (nouveau_ramht_entry_valid(dev, ramht, co) && -+ nouveau_ramht_entry_same_channel(chan, ramht, co) && -+ (handle == nv_ro32(ramht, co))) { -+ NV_DEBUG(dev, -+ "remove ch%d 0x%08x: h=0x%08x, c=0x%08x\n", -+ chan->id, co, handle, nv_ro32(ramht, co + 4)); -+ nv_wo32(ramht, co + 0, 0x00000000); -+ nv_wo32(ramht, co + 4, 0x00000000); -+ instmem->flush(dev); -+ goto out; -+ } -+ -+ co += 8; -+ if (co >= ramht->size) -+ co = 0; -+ } while (co != ho); -+ -+ NV_ERROR(dev, "RAMHT entry not found. ch=%d, handle=0x%08x\n", -+ chan->id, handle); -+out: -+ spin_unlock_irqrestore(&chan->ramht->lock, flags); -+} -+ -+int -+nouveau_ramht_remove(struct nouveau_channel *chan, u32 handle) -+{ -+ struct nouveau_ramht_entry *entry; -+ -+ entry = nouveau_ramht_remove_entry(chan, handle); -+ if (!entry) -+ return -ENOENT; -+ -+ nouveau_ramht_remove_hash(chan, entry->handle); -+ nouveau_gpuobj_ref(NULL, &entry->gpuobj); -+ kfree(entry); -+ return 0; -+} -+ -+struct nouveau_gpuobj * -+nouveau_ramht_find(struct nouveau_channel *chan, u32 handle) -+{ -+ struct nouveau_ramht *ramht = chan->ramht; -+ struct nouveau_ramht_entry *entry; -+ struct nouveau_gpuobj *gpuobj = NULL; -+ unsigned long flags; -+ -+ if (unlikely(!chan->ramht)) -+ return NULL; -+ -+ spin_lock_irqsave(&ramht->lock, flags); -+ list_for_each_entry(entry, &chan->ramht->entries, head) { -+ if (entry->channel == chan && entry->handle == handle) { -+ gpuobj = entry->gpuobj; -+ break; -+ } -+ } -+ spin_unlock_irqrestore(&ramht->lock, flags); -+ -+ return gpuobj; -+} -+ -+int -+nouveau_ramht_new(struct drm_device *dev, struct nouveau_gpuobj *gpuobj, -+ struct nouveau_ramht **pramht) -+{ -+ struct nouveau_ramht *ramht; -+ -+ ramht = kzalloc(sizeof(*ramht), GFP_KERNEL); -+ if (!ramht) -+ return -ENOMEM; -+ -+ ramht->dev = dev; -+ kref_init(&ramht->refcount); -+ ramht->bits = drm_order(gpuobj->size / 8); -+ INIT_LIST_HEAD(&ramht->entries); -+ spin_lock_init(&ramht->lock); -+ nouveau_gpuobj_ref(gpuobj, &ramht->gpuobj); -+ -+ *pramht = ramht; -+ return 0; -+} -+ -+static void -+nouveau_ramht_del(struct kref *ref) -+{ -+ struct nouveau_ramht *ramht = -+ container_of(ref, struct nouveau_ramht, refcount); -+ -+ nouveau_gpuobj_ref(NULL, &ramht->gpuobj); -+ kfree(ramht); -+} -+ -+void -+nouveau_ramht_ref(struct nouveau_ramht *ref, struct nouveau_ramht **ptr, -+ struct nouveau_channel *chan) -+{ -+ struct nouveau_ramht_entry *entry; -+ struct nouveau_ramht *ramht; -+ -+ if (ref) -+ kref_get(&ref->refcount); -+ -+ ramht = *ptr; -+ if (ramht) { -+ while ((entry = nouveau_ramht_remove_entry(chan, 0))) { -+ nouveau_ramht_remove_hash(chan, entry->handle); -+ nouveau_gpuobj_ref(NULL, &entry->gpuobj); -+ kfree(entry); -+ } -+ -+ kref_put(&ramht->refcount, nouveau_ramht_del); -+ } -+ *ptr = ref; -+} -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_ramht.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.h ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_ramht.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.h 2010-10-30 22:24:25.000000000 +0200 -@@ -0,0 +1,55 @@ -+/* -+ * Copyright 2010 Red Hat Inc. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be included in -+ * all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR -+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ * -+ * Authors: Ben Skeggs -+ */ -+ -+#ifndef __NOUVEAU_RAMHT_H__ -+#define __NOUVEAU_RAMHT_H__ -+ -+struct nouveau_ramht_entry { -+ struct list_head head; -+ struct nouveau_channel *channel; -+ struct nouveau_gpuobj *gpuobj; -+ u32 handle; -+}; -+ -+struct nouveau_ramht { -+ struct drm_device *dev; -+ struct kref refcount; -+ spinlock_t lock; -+ struct nouveau_gpuobj *gpuobj; -+ struct list_head entries; -+ int bits; -+}; -+ -+extern int nouveau_ramht_new(struct drm_device *, struct nouveau_gpuobj *, -+ struct nouveau_ramht **); -+extern void nouveau_ramht_ref(struct nouveau_ramht *, struct nouveau_ramht **, -+ struct nouveau_channel *unref_channel); -+ -+extern int nouveau_ramht_insert(struct nouveau_channel *, u32 handle, -+ struct nouveau_gpuobj *); -+extern int nouveau_ramht_remove(struct nouveau_channel *, u32 handle); -+extern struct nouveau_gpuobj * -+nouveau_ramht_find(struct nouveau_channel *chan, u32 handle); -+ -+#endif -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_reg.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_reg.h ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_reg.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_reg.h 2010-10-30 22:24:25.000000000 +0200 -@@ -45,6 +45,11 @@ - # define NV04_PFB_REF_CMD_REFRESH (1 << 0) - #define NV04_PFB_PRE 0x001002d4 - # define NV04_PFB_PRE_CMD_PRECHARGE (1 << 0) -+#define NV20_PFB_ZCOMP(i) (0x00100300 + 4*(i)) -+# define NV20_PFB_ZCOMP_MODE_32 (4 << 24) -+# define NV20_PFB_ZCOMP_EN (1 << 31) -+# define NV25_PFB_ZCOMP_MODE_16 (1 << 20) -+# define NV25_PFB_ZCOMP_MODE_32 (2 << 20) - #define NV10_PFB_CLOSE_PAGE2 0x0010033c - #define NV04_PFB_SCRAMBLE(i) (0x00100400 + 4 * (i)) - #define NV40_PFB_TILE(i) (0x00100600 + (i*16)) -@@ -332,6 +337,7 @@ - #define NV04_PGRAPH_BSWIZZLE5 0x004006A0 - #define NV03_PGRAPH_STATUS 0x004006B0 - #define NV04_PGRAPH_STATUS 0x00400700 -+# define NV40_PGRAPH_STATUS_SYNC_STALL 0x00004000 - #define NV04_PGRAPH_TRAPPED_ADDR 0x00400704 - #define NV04_PGRAPH_TRAPPED_DATA 0x00400708 - #define NV04_PGRAPH_SURFACE 0x0040070C -@@ -378,6 +384,7 @@ - #define NV20_PGRAPH_TLIMIT(i) (0x00400904 + (i*16)) - #define NV20_PGRAPH_TSIZE(i) (0x00400908 + (i*16)) - #define NV20_PGRAPH_TSTATUS(i) (0x0040090C + (i*16)) -+#define NV20_PGRAPH_ZCOMP(i) (0x00400980 + 4*(i)) - #define NV10_PGRAPH_TILE(i) (0x00400B00 + (i*16)) - #define NV10_PGRAPH_TLIMIT(i) (0x00400B04 + (i*16)) - #define NV10_PGRAPH_TSIZE(i) (0x00400B08 + (i*16)) -@@ -551,6 +558,8 @@ - #define NV10_PFIFO_CACHE1_DMA_SUBROUTINE 0x0000324C - #define NV03_PFIFO_CACHE1_PULL0 0x00003240 - #define NV04_PFIFO_CACHE1_PULL0 0x00003250 -+# define NV04_PFIFO_CACHE1_PULL0_HASH_FAILED 0x00000010 -+# define NV04_PFIFO_CACHE1_PULL0_HASH_BUSY 0x00001000 - #define NV03_PFIFO_CACHE1_PULL1 0x00003250 - #define NV04_PFIFO_CACHE1_PULL1 0x00003254 - #define NV04_PFIFO_CACHE1_HASH 0x00003258 -@@ -712,31 +721,32 @@ - #define NV50_PDISPLAY_INTR_1_CLK_UNK10 0x00000010 - #define NV50_PDISPLAY_INTR_1_CLK_UNK20 0x00000020 - #define NV50_PDISPLAY_INTR_1_CLK_UNK40 0x00000040 --#define NV50_PDISPLAY_INTR_EN 0x0061002c --#define NV50_PDISPLAY_INTR_EN_VBLANK_CRTC 0x0000000c --#define NV50_PDISPLAY_INTR_EN_VBLANK_CRTC_(n) (1 << ((n) + 2)) --#define NV50_PDISPLAY_INTR_EN_VBLANK_CRTC_0 0x00000004 --#define NV50_PDISPLAY_INTR_EN_VBLANK_CRTC_1 0x00000008 --#define NV50_PDISPLAY_INTR_EN_CLK_UNK10 0x00000010 --#define NV50_PDISPLAY_INTR_EN_CLK_UNK20 0x00000020 --#define NV50_PDISPLAY_INTR_EN_CLK_UNK40 0x00000040 -+#define NV50_PDISPLAY_INTR_EN_0 0x00610028 -+#define NV50_PDISPLAY_INTR_EN_1 0x0061002c -+#define NV50_PDISPLAY_INTR_EN_1_VBLANK_CRTC 0x0000000c -+#define NV50_PDISPLAY_INTR_EN_1_VBLANK_CRTC_(n) (1 << ((n) + 2)) -+#define NV50_PDISPLAY_INTR_EN_1_VBLANK_CRTC_0 0x00000004 -+#define NV50_PDISPLAY_INTR_EN_1_VBLANK_CRTC_1 0x00000008 -+#define NV50_PDISPLAY_INTR_EN_1_CLK_UNK10 0x00000010 -+#define NV50_PDISPLAY_INTR_EN_1_CLK_UNK20 0x00000020 -+#define NV50_PDISPLAY_INTR_EN_1_CLK_UNK40 0x00000040 - #define NV50_PDISPLAY_UNK30_CTRL 0x00610030 - #define NV50_PDISPLAY_UNK30_CTRL_UPDATE_VCLK0 0x00000200 - #define NV50_PDISPLAY_UNK30_CTRL_UPDATE_VCLK1 0x00000400 - #define NV50_PDISPLAY_UNK30_CTRL_PENDING 0x80000000 --#define NV50_PDISPLAY_TRAPPED_ADDR 0x00610080 --#define NV50_PDISPLAY_TRAPPED_DATA 0x00610084 --#define NV50_PDISPLAY_CHANNEL_STAT(i) ((i) * 0x10 + 0x00610200) --#define NV50_PDISPLAY_CHANNEL_STAT_DMA 0x00000010 --#define NV50_PDISPLAY_CHANNEL_STAT_DMA_DISABLED 0x00000000 --#define NV50_PDISPLAY_CHANNEL_STAT_DMA_ENABLED 0x00000010 --#define NV50_PDISPLAY_CHANNEL_DMA_CB(i) ((i) * 0x10 + 0x00610204) --#define NV50_PDISPLAY_CHANNEL_DMA_CB_LOCATION 0x00000002 --#define NV50_PDISPLAY_CHANNEL_DMA_CB_LOCATION_VRAM 0x00000000 --#define NV50_PDISPLAY_CHANNEL_DMA_CB_LOCATION_SYSTEM 0x00000002 --#define NV50_PDISPLAY_CHANNEL_DMA_CB_VALID 0x00000001 --#define NV50_PDISPLAY_CHANNEL_UNK2(i) ((i) * 0x10 + 0x00610208) --#define NV50_PDISPLAY_CHANNEL_UNK3(i) ((i) * 0x10 + 0x0061020c) -+#define NV50_PDISPLAY_TRAPPED_ADDR(i) ((i) * 0x08 + 0x00610080) -+#define NV50_PDISPLAY_TRAPPED_DATA(i) ((i) * 0x08 + 0x00610084) -+#define NV50_PDISPLAY_EVO_CTRL(i) ((i) * 0x10 + 0x00610200) -+#define NV50_PDISPLAY_EVO_CTRL_DMA 0x00000010 -+#define NV50_PDISPLAY_EVO_CTRL_DMA_DISABLED 0x00000000 -+#define NV50_PDISPLAY_EVO_CTRL_DMA_ENABLED 0x00000010 -+#define NV50_PDISPLAY_EVO_DMA_CB(i) ((i) * 0x10 + 0x00610204) -+#define NV50_PDISPLAY_EVO_DMA_CB_LOCATION 0x00000002 -+#define NV50_PDISPLAY_EVO_DMA_CB_LOCATION_VRAM 0x00000000 -+#define NV50_PDISPLAY_EVO_DMA_CB_LOCATION_SYSTEM 0x00000002 -+#define NV50_PDISPLAY_EVO_DMA_CB_VALID 0x00000001 -+#define NV50_PDISPLAY_EVO_UNK2(i) ((i) * 0x10 + 0x00610208) -+#define NV50_PDISPLAY_EVO_HASH_TAG(i) ((i) * 0x10 + 0x0061020c) - - #define NV50_PDISPLAY_CURSOR 0x00610270 - #define NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(i) ((i) * 0x10 + 0x00610270) -@@ -744,15 +754,11 @@ - #define NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS 0x00030000 - #define NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS_ACTIVE 0x00010000 - --#define NV50_PDISPLAY_CTRL_STATE 0x00610300 --#define NV50_PDISPLAY_CTRL_STATE_PENDING 0x80000000 --#define NV50_PDISPLAY_CTRL_STATE_METHOD 0x00001ffc --#define NV50_PDISPLAY_CTRL_STATE_ENABLE 0x00000001 --#define NV50_PDISPLAY_CTRL_VAL 0x00610304 --#define NV50_PDISPLAY_UNK_380 0x00610380 --#define NV50_PDISPLAY_RAM_AMOUNT 0x00610384 --#define NV50_PDISPLAY_UNK_388 0x00610388 --#define NV50_PDISPLAY_UNK_38C 0x0061038c -+#define NV50_PDISPLAY_PIO_CTRL 0x00610300 -+#define NV50_PDISPLAY_PIO_CTRL_PENDING 0x80000000 -+#define NV50_PDISPLAY_PIO_CTRL_MTHD 0x00001ffc -+#define NV50_PDISPLAY_PIO_CTRL_ENABLED 0x00000001 -+#define NV50_PDISPLAY_PIO_DATA 0x00610304 - - #define NV50_PDISPLAY_CRTC_P(i, r) ((i) * 0x540 + NV50_PDISPLAY_CRTC_##r) - #define NV50_PDISPLAY_CRTC_C(i, r) (4 + (i) * 0x540 + NV50_PDISPLAY_CRTC_##r) -@@ -785,15 +791,12 @@ - #define NV50_PDISPLAY_DAC_MODE_CTRL_C(i) (0x00610b5c + (i) * 0x8) - #define NV50_PDISPLAY_SOR_MODE_CTRL_P(i) (0x00610b70 + (i) * 0x8) - #define NV50_PDISPLAY_SOR_MODE_CTRL_C(i) (0x00610b74 + (i) * 0x8) -+#define NV50_PDISPLAY_EXT_MODE_CTRL_P(i) (0x00610b80 + (i) * 0x8) -+#define NV50_PDISPLAY_EXT_MODE_CTRL_C(i) (0x00610b84 + (i) * 0x8) - #define NV50_PDISPLAY_DAC_MODE_CTRL2_P(i) (0x00610bdc + (i) * 0x8) - #define NV50_PDISPLAY_DAC_MODE_CTRL2_C(i) (0x00610be0 + (i) * 0x8) -- - #define NV90_PDISPLAY_SOR_MODE_CTRL_P(i) (0x00610794 + (i) * 0x8) - #define NV90_PDISPLAY_SOR_MODE_CTRL_C(i) (0x00610798 + (i) * 0x8) --#define NV90_PDISPLAY_DAC_MODE_CTRL_P(i) (0x00610b58 + (i) * 0x8) --#define NV90_PDISPLAY_DAC_MODE_CTRL_C(i) (0x00610b5c + (i) * 0x8) --#define NV90_PDISPLAY_DAC_MODE_CTRL2_P(i) (0x00610b80 + (i) * 0x8) --#define NV90_PDISPLAY_DAC_MODE_CTRL2_C(i) (0x00610b84 + (i) * 0x8) - - #define NV50_PDISPLAY_CRTC_CLK 0x00614000 - #define NV50_PDISPLAY_CRTC_CLK_CTRL1(i) ((i) * 0x800 + 0x614100) -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_sgdma.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_sgdma.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_sgdma.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_sgdma.c 2010-10-30 22:24:25.000000000 +0200 -@@ -95,9 +95,9 @@ - struct nouveau_gpuobj *gpuobj = dev_priv->gart_info.sg_ctxdma; - unsigned i, j, pte; - -- NV_DEBUG(dev, "pg=0x%lx\n", mem->mm_node->start); -+ NV_DEBUG(dev, "pg=0x%lx\n", mem->start); - -- pte = nouveau_sgdma_pte(nvbe->dev, mem->mm_node->start << PAGE_SHIFT); -+ pte = nouveau_sgdma_pte(nvbe->dev, mem->start << PAGE_SHIFT); - nvbe->pte_start = pte; - for (i = 0; i < nvbe->nr_pages; i++) { - dma_addr_t dma_offset = nvbe->pages[i]; -@@ -105,11 +105,13 @@ - uint32_t offset_h = upper_32_bits(dma_offset); - - for (j = 0; j < PAGE_SIZE / NV_CTXDMA_PAGE_SIZE; j++) { -- if (dev_priv->card_type < NV_50) -- nv_wo32(dev, gpuobj, pte++, offset_l | 3); -- else { -- nv_wo32(dev, gpuobj, pte++, offset_l | 0x21); -- nv_wo32(dev, gpuobj, pte++, offset_h & 0xff); -+ if (dev_priv->card_type < NV_50) { -+ nv_wo32(gpuobj, (pte * 4) + 0, offset_l | 3); -+ pte += 1; -+ } else { -+ nv_wo32(gpuobj, (pte * 4) + 0, offset_l | 0x21); -+ nv_wo32(gpuobj, (pte * 4) + 4, offset_h & 0xff); -+ pte += 2; - } - - dma_offset += NV_CTXDMA_PAGE_SIZE; -@@ -118,8 +120,8 @@ - dev_priv->engine.instmem.flush(nvbe->dev); - - if (dev_priv->card_type == NV_50) { -- nv50_vm_flush(dev, 5); /* PGRAPH */ -- nv50_vm_flush(dev, 0); /* PFIFO */ -+ dev_priv->engine.fifo.tlb_flush(dev); -+ dev_priv->engine.graph.tlb_flush(dev); - } - - nvbe->bound = true; -@@ -145,11 +147,13 @@ - dma_addr_t dma_offset = dev_priv->gart_info.sg_dummy_bus; - - for (j = 0; j < PAGE_SIZE / NV_CTXDMA_PAGE_SIZE; j++) { -- if (dev_priv->card_type < NV_50) -- nv_wo32(dev, gpuobj, pte++, dma_offset | 3); -- else { -- nv_wo32(dev, gpuobj, pte++, dma_offset | 0x21); -- nv_wo32(dev, gpuobj, pte++, 0x00000000); -+ if (dev_priv->card_type < NV_50) { -+ nv_wo32(gpuobj, (pte * 4) + 0, dma_offset | 3); -+ pte += 1; -+ } else { -+ nv_wo32(gpuobj, (pte * 4) + 0, 0x00000000); -+ nv_wo32(gpuobj, (pte * 4) + 4, 0x00000000); -+ pte += 2; - } - - dma_offset += NV_CTXDMA_PAGE_SIZE; -@@ -158,8 +162,8 @@ - dev_priv->engine.instmem.flush(nvbe->dev); - - if (dev_priv->card_type == NV_50) { -- nv50_vm_flush(dev, 5); -- nv50_vm_flush(dev, 0); -+ dev_priv->engine.fifo.tlb_flush(dev); -+ dev_priv->engine.graph.tlb_flush(dev); - } - - nvbe->bound = false; -@@ -220,7 +224,11 @@ - int i, ret; - - if (dev_priv->card_type < NV_50) { -- aper_size = (64 * 1024 * 1024); -+ if(dev_priv->card_type < NV_40) { -+ aper_size = (64 * 1024 * 1024); -+ } else { -+ aper_size = (512 * 1024 * 1024); -+ } - obj_size = (aper_size >> NV_CTXDMA_PAGE_SHIFT) * 4; - obj_size += 8; /* ctxdma header */ - } else { -@@ -230,7 +238,6 @@ - } - - ret = nouveau_gpuobj_new(dev, NULL, obj_size, 16, -- NVOBJ_FLAG_ALLOW_NO_REFS | - NVOBJ_FLAG_ZERO_ALLOC | - NVOBJ_FLAG_ZERO_FREE, &gpuobj); - if (ret) { -@@ -239,9 +246,9 @@ - } - - dev_priv->gart_info.sg_dummy_page = -- alloc_page(GFP_KERNEL|__GFP_DMA32); -+ alloc_page(GFP_KERNEL|__GFP_DMA32|__GFP_ZERO); - if (!dev_priv->gart_info.sg_dummy_page) { -- nouveau_gpuobj_del(dev, &gpuobj); -+ nouveau_gpuobj_ref(NULL, &gpuobj); - return -ENOMEM; - } - -@@ -250,29 +257,34 @@ - pci_map_page(pdev, dev_priv->gart_info.sg_dummy_page, 0, - PAGE_SIZE, PCI_DMA_BIDIRECTIONAL); - if (pci_dma_mapping_error(pdev, dev_priv->gart_info.sg_dummy_bus)) { -- nouveau_gpuobj_del(dev, &gpuobj); -+ nouveau_gpuobj_ref(NULL, &gpuobj); - return -EFAULT; - } - - if (dev_priv->card_type < NV_50) { -+ /* special case, allocated from global instmem heap so -+ * cinst is invalid, we use it on all channels though so -+ * cinst needs to be valid, set it the same as pinst -+ */ -+ gpuobj->cinst = gpuobj->pinst; -+ - /* Maybe use NV_DMA_TARGET_AGP for PCIE? NVIDIA do this, and - * confirmed to work on c51. Perhaps means NV_DMA_TARGET_PCIE - * on those cards? */ -- nv_wo32(dev, gpuobj, 0, NV_CLASS_DMA_IN_MEMORY | -- (1 << 12) /* PT present */ | -- (0 << 13) /* PT *not* linear */ | -- (NV_DMA_ACCESS_RW << 14) | -- (NV_DMA_TARGET_PCI << 16)); -- nv_wo32(dev, gpuobj, 1, aper_size - 1); -+ nv_wo32(gpuobj, 0, NV_CLASS_DMA_IN_MEMORY | -+ (1 << 12) /* PT present */ | -+ (0 << 13) /* PT *not* linear */ | -+ (NV_DMA_ACCESS_RW << 14) | -+ (NV_DMA_TARGET_PCI << 16)); -+ nv_wo32(gpuobj, 4, aper_size - 1); - for (i = 2; i < 2 + (aper_size >> 12); i++) { -- nv_wo32(dev, gpuobj, i, -- dev_priv->gart_info.sg_dummy_bus | 3); -+ nv_wo32(gpuobj, i * 4, -+ dev_priv->gart_info.sg_dummy_bus | 3); - } - } else { - for (i = 0; i < obj_size; i += 8) { -- nv_wo32(dev, gpuobj, (i+0)/4, -- dev_priv->gart_info.sg_dummy_bus | 0x21); -- nv_wo32(dev, gpuobj, (i+4)/4, 0); -+ nv_wo32(gpuobj, i + 0, 0x00000000); -+ nv_wo32(gpuobj, i + 4, 0x00000000); - } - } - dev_priv->engine.instmem.flush(dev); -@@ -298,7 +310,7 @@ - dev_priv->gart_info.sg_dummy_bus = 0; - } - -- nouveau_gpuobj_del(dev, &dev_priv->gart_info.sg_ctxdma); -+ nouveau_gpuobj_ref(NULL, &dev_priv->gart_info.sg_ctxdma); - } - - int -@@ -308,9 +320,9 @@ - struct nouveau_gpuobj *gpuobj = dev_priv->gart_info.sg_ctxdma; - int pte; - -- pte = (offset >> NV_CTXDMA_PAGE_SHIFT); -+ pte = (offset >> NV_CTXDMA_PAGE_SHIFT) << 2; - if (dev_priv->card_type < NV_50) { -- *page = nv_ro32(dev, gpuobj, (pte + 2)) & ~NV_CTXDMA_PAGE_MASK; -+ *page = nv_ro32(gpuobj, (pte + 8)) & ~NV_CTXDMA_PAGE_MASK; - return 0; - } - -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_state.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_state.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_state.c 2010-10-30 22:24:25.000000000 +0200 -@@ -35,6 +35,8 @@ - #include "nouveau_drv.h" - #include "nouveau_drm.h" - #include "nouveau_fbcon.h" -+#include "nouveau_ramht.h" -+#include "nouveau_pm.h" - #include "nv50_display.h" - - static void nouveau_stub_takedown(struct drm_device *dev) {} -@@ -63,7 +65,6 @@ - engine->timer.takedown = nv04_timer_takedown; - engine->fb.init = nv04_fb_init; - engine->fb.takedown = nv04_fb_takedown; -- engine->graph.grclass = nv04_graph_grclass; - engine->graph.init = nv04_graph_init; - engine->graph.takedown = nv04_graph_takedown; - engine->graph.fifo_access = nv04_graph_fifo_access; -@@ -78,7 +79,6 @@ - engine->fifo.disable = nv04_fifo_disable; - engine->fifo.enable = nv04_fifo_enable; - engine->fifo.reassign = nv04_fifo_reassign; -- engine->fifo.cache_flush = nv04_fifo_cache_flush; - engine->fifo.cache_pull = nv04_fifo_cache_pull; - engine->fifo.channel_id = nv04_fifo_channel_id; - engine->fifo.create_context = nv04_fifo_create_context; -@@ -95,6 +95,11 @@ - engine->gpio.get = NULL; - engine->gpio.set = NULL; - engine->gpio.irq_enable = NULL; -+ engine->pm.clock_get = nv04_pm_clock_get; -+ engine->pm.clock_pre = nv04_pm_clock_pre; -+ engine->pm.clock_set = nv04_pm_clock_set; -+ engine->crypt.init = nouveau_stub_init; -+ engine->crypt.takedown = nouveau_stub_takedown; - break; - case 0x10: - engine->instmem.init = nv04_instmem_init; -@@ -113,8 +118,9 @@ - engine->timer.takedown = nv04_timer_takedown; - engine->fb.init = nv10_fb_init; - engine->fb.takedown = nv10_fb_takedown; -- engine->fb.set_region_tiling = nv10_fb_set_region_tiling; -- engine->graph.grclass = nv10_graph_grclass; -+ engine->fb.init_tile_region = nv10_fb_init_tile_region; -+ engine->fb.set_tile_region = nv10_fb_set_tile_region; -+ engine->fb.free_tile_region = nv10_fb_free_tile_region; - engine->graph.init = nv10_graph_init; - engine->graph.takedown = nv10_graph_takedown; - engine->graph.channel = nv10_graph_channel; -@@ -123,18 +129,17 @@ - engine->graph.fifo_access = nv04_graph_fifo_access; - engine->graph.load_context = nv10_graph_load_context; - engine->graph.unload_context = nv10_graph_unload_context; -- engine->graph.set_region_tiling = nv10_graph_set_region_tiling; -+ engine->graph.set_tile_region = nv10_graph_set_tile_region; - engine->fifo.channels = 32; - engine->fifo.init = nv10_fifo_init; - engine->fifo.takedown = nouveau_stub_takedown; - engine->fifo.disable = nv04_fifo_disable; - engine->fifo.enable = nv04_fifo_enable; - engine->fifo.reassign = nv04_fifo_reassign; -- engine->fifo.cache_flush = nv04_fifo_cache_flush; - engine->fifo.cache_pull = nv04_fifo_cache_pull; - engine->fifo.channel_id = nv10_fifo_channel_id; - engine->fifo.create_context = nv10_fifo_create_context; -- engine->fifo.destroy_context = nv10_fifo_destroy_context; -+ engine->fifo.destroy_context = nv04_fifo_destroy_context; - engine->fifo.load_context = nv10_fifo_load_context; - engine->fifo.unload_context = nv10_fifo_unload_context; - engine->display.early_init = nv04_display_early_init; -@@ -147,6 +152,11 @@ - engine->gpio.get = nv10_gpio_get; - engine->gpio.set = nv10_gpio_set; - engine->gpio.irq_enable = NULL; -+ engine->pm.clock_get = nv04_pm_clock_get; -+ engine->pm.clock_pre = nv04_pm_clock_pre; -+ engine->pm.clock_set = nv04_pm_clock_set; -+ engine->crypt.init = nouveau_stub_init; -+ engine->crypt.takedown = nouveau_stub_takedown; - break; - case 0x20: - engine->instmem.init = nv04_instmem_init; -@@ -165,8 +175,9 @@ - engine->timer.takedown = nv04_timer_takedown; - engine->fb.init = nv10_fb_init; - engine->fb.takedown = nv10_fb_takedown; -- engine->fb.set_region_tiling = nv10_fb_set_region_tiling; -- engine->graph.grclass = nv20_graph_grclass; -+ engine->fb.init_tile_region = nv10_fb_init_tile_region; -+ engine->fb.set_tile_region = nv10_fb_set_tile_region; -+ engine->fb.free_tile_region = nv10_fb_free_tile_region; - engine->graph.init = nv20_graph_init; - engine->graph.takedown = nv20_graph_takedown; - engine->graph.channel = nv10_graph_channel; -@@ -175,18 +186,17 @@ - engine->graph.fifo_access = nv04_graph_fifo_access; - engine->graph.load_context = nv20_graph_load_context; - engine->graph.unload_context = nv20_graph_unload_context; -- engine->graph.set_region_tiling = nv20_graph_set_region_tiling; -+ engine->graph.set_tile_region = nv20_graph_set_tile_region; - engine->fifo.channels = 32; - engine->fifo.init = nv10_fifo_init; - engine->fifo.takedown = nouveau_stub_takedown; - engine->fifo.disable = nv04_fifo_disable; - engine->fifo.enable = nv04_fifo_enable; - engine->fifo.reassign = nv04_fifo_reassign; -- engine->fifo.cache_flush = nv04_fifo_cache_flush; - engine->fifo.cache_pull = nv04_fifo_cache_pull; - engine->fifo.channel_id = nv10_fifo_channel_id; - engine->fifo.create_context = nv10_fifo_create_context; -- engine->fifo.destroy_context = nv10_fifo_destroy_context; -+ engine->fifo.destroy_context = nv04_fifo_destroy_context; - engine->fifo.load_context = nv10_fifo_load_context; - engine->fifo.unload_context = nv10_fifo_unload_context; - engine->display.early_init = nv04_display_early_init; -@@ -199,6 +209,11 @@ - engine->gpio.get = nv10_gpio_get; - engine->gpio.set = nv10_gpio_set; - engine->gpio.irq_enable = NULL; -+ engine->pm.clock_get = nv04_pm_clock_get; -+ engine->pm.clock_pre = nv04_pm_clock_pre; -+ engine->pm.clock_set = nv04_pm_clock_set; -+ engine->crypt.init = nouveau_stub_init; -+ engine->crypt.takedown = nouveau_stub_takedown; - break; - case 0x30: - engine->instmem.init = nv04_instmem_init; -@@ -217,8 +232,9 @@ - engine->timer.takedown = nv04_timer_takedown; - engine->fb.init = nv30_fb_init; - engine->fb.takedown = nv30_fb_takedown; -- engine->fb.set_region_tiling = nv10_fb_set_region_tiling; -- engine->graph.grclass = nv30_graph_grclass; -+ engine->fb.init_tile_region = nv30_fb_init_tile_region; -+ engine->fb.set_tile_region = nv10_fb_set_tile_region; -+ engine->fb.free_tile_region = nv30_fb_free_tile_region; - engine->graph.init = nv30_graph_init; - engine->graph.takedown = nv20_graph_takedown; - engine->graph.fifo_access = nv04_graph_fifo_access; -@@ -227,18 +243,17 @@ - engine->graph.destroy_context = nv20_graph_destroy_context; - engine->graph.load_context = nv20_graph_load_context; - engine->graph.unload_context = nv20_graph_unload_context; -- engine->graph.set_region_tiling = nv20_graph_set_region_tiling; -+ engine->graph.set_tile_region = nv20_graph_set_tile_region; - engine->fifo.channels = 32; - engine->fifo.init = nv10_fifo_init; - engine->fifo.takedown = nouveau_stub_takedown; - engine->fifo.disable = nv04_fifo_disable; - engine->fifo.enable = nv04_fifo_enable; - engine->fifo.reassign = nv04_fifo_reassign; -- engine->fifo.cache_flush = nv04_fifo_cache_flush; - engine->fifo.cache_pull = nv04_fifo_cache_pull; - engine->fifo.channel_id = nv10_fifo_channel_id; - engine->fifo.create_context = nv10_fifo_create_context; -- engine->fifo.destroy_context = nv10_fifo_destroy_context; -+ engine->fifo.destroy_context = nv04_fifo_destroy_context; - engine->fifo.load_context = nv10_fifo_load_context; - engine->fifo.unload_context = nv10_fifo_unload_context; - engine->display.early_init = nv04_display_early_init; -@@ -251,6 +266,13 @@ - engine->gpio.get = nv10_gpio_get; - engine->gpio.set = nv10_gpio_set; - engine->gpio.irq_enable = NULL; -+ engine->pm.clock_get = nv04_pm_clock_get; -+ engine->pm.clock_pre = nv04_pm_clock_pre; -+ engine->pm.clock_set = nv04_pm_clock_set; -+ engine->pm.voltage_get = nouveau_voltage_gpio_get; -+ engine->pm.voltage_set = nouveau_voltage_gpio_set; -+ engine->crypt.init = nouveau_stub_init; -+ engine->crypt.takedown = nouveau_stub_takedown; - break; - case 0x40: - case 0x60: -@@ -270,8 +292,9 @@ - engine->timer.takedown = nv04_timer_takedown; - engine->fb.init = nv40_fb_init; - engine->fb.takedown = nv40_fb_takedown; -- engine->fb.set_region_tiling = nv40_fb_set_region_tiling; -- engine->graph.grclass = nv40_graph_grclass; -+ engine->fb.init_tile_region = nv30_fb_init_tile_region; -+ engine->fb.set_tile_region = nv40_fb_set_tile_region; -+ engine->fb.free_tile_region = nv30_fb_free_tile_region; - engine->graph.init = nv40_graph_init; - engine->graph.takedown = nv40_graph_takedown; - engine->graph.fifo_access = nv04_graph_fifo_access; -@@ -280,18 +303,17 @@ - engine->graph.destroy_context = nv40_graph_destroy_context; - engine->graph.load_context = nv40_graph_load_context; - engine->graph.unload_context = nv40_graph_unload_context; -- engine->graph.set_region_tiling = nv40_graph_set_region_tiling; -+ engine->graph.set_tile_region = nv40_graph_set_tile_region; - engine->fifo.channels = 32; - engine->fifo.init = nv40_fifo_init; - engine->fifo.takedown = nouveau_stub_takedown; - engine->fifo.disable = nv04_fifo_disable; - engine->fifo.enable = nv04_fifo_enable; - engine->fifo.reassign = nv04_fifo_reassign; -- engine->fifo.cache_flush = nv04_fifo_cache_flush; - engine->fifo.cache_pull = nv04_fifo_cache_pull; - engine->fifo.channel_id = nv10_fifo_channel_id; - engine->fifo.create_context = nv40_fifo_create_context; -- engine->fifo.destroy_context = nv40_fifo_destroy_context; -+ engine->fifo.destroy_context = nv04_fifo_destroy_context; - engine->fifo.load_context = nv40_fifo_load_context; - engine->fifo.unload_context = nv40_fifo_unload_context; - engine->display.early_init = nv04_display_early_init; -@@ -304,6 +326,14 @@ - engine->gpio.get = nv10_gpio_get; - engine->gpio.set = nv10_gpio_set; - engine->gpio.irq_enable = NULL; -+ engine->pm.clock_get = nv04_pm_clock_get; -+ engine->pm.clock_pre = nv04_pm_clock_pre; -+ engine->pm.clock_set = nv04_pm_clock_set; -+ engine->pm.voltage_get = nouveau_voltage_gpio_get; -+ engine->pm.voltage_set = nouveau_voltage_gpio_set; -+ engine->pm.temp_get = nv40_temp_get; -+ engine->crypt.init = nouveau_stub_init; -+ engine->crypt.takedown = nouveau_stub_takedown; - break; - case 0x50: - case 0x80: /* gotta love NVIDIA's consistency.. */ -@@ -328,7 +358,6 @@ - engine->timer.takedown = nv04_timer_takedown; - engine->fb.init = nv50_fb_init; - engine->fb.takedown = nv50_fb_takedown; -- engine->graph.grclass = nv50_graph_grclass; - engine->graph.init = nv50_graph_init; - engine->graph.takedown = nv50_graph_takedown; - engine->graph.fifo_access = nv50_graph_fifo_access; -@@ -337,6 +366,15 @@ - engine->graph.destroy_context = nv50_graph_destroy_context; - engine->graph.load_context = nv50_graph_load_context; - engine->graph.unload_context = nv50_graph_unload_context; -+ if (dev_priv->chipset != 0x86) -+ engine->graph.tlb_flush = nv50_graph_tlb_flush; -+ else { -+ /* from what i can see nvidia do this on every -+ * pre-NVA3 board except NVAC, but, we've only -+ * ever seen problems on NV86 -+ */ -+ engine->graph.tlb_flush = nv86_graph_tlb_flush; -+ } - engine->fifo.channels = 128; - engine->fifo.init = nv50_fifo_init; - engine->fifo.takedown = nv50_fifo_takedown; -@@ -348,6 +386,7 @@ - engine->fifo.destroy_context = nv50_fifo_destroy_context; - engine->fifo.load_context = nv50_fifo_load_context; - engine->fifo.unload_context = nv50_fifo_unload_context; -+ engine->fifo.tlb_flush = nv50_fifo_tlb_flush; - engine->display.early_init = nv50_display_early_init; - engine->display.late_takedown = nv50_display_late_takedown; - engine->display.create = nv50_display_create; -@@ -358,6 +397,50 @@ - engine->gpio.get = nv50_gpio_get; - engine->gpio.set = nv50_gpio_set; - engine->gpio.irq_enable = nv50_gpio_irq_enable; -+ switch (dev_priv->chipset) { -+ case 0x84: -+ case 0x86: -+ case 0x92: -+ case 0x94: -+ case 0x96: -+ case 0x98: -+ case 0xa0: -+ case 0xaa: -+ case 0xac: -+ case 0x50: -+ engine->pm.clock_get = nv50_pm_clock_get; -+ engine->pm.clock_pre = nv50_pm_clock_pre; -+ engine->pm.clock_set = nv50_pm_clock_set; -+ break; -+ default: -+ engine->pm.clock_get = nva3_pm_clock_get; -+ engine->pm.clock_pre = nva3_pm_clock_pre; -+ engine->pm.clock_set = nva3_pm_clock_set; -+ break; -+ } -+ engine->pm.voltage_get = nouveau_voltage_gpio_get; -+ engine->pm.voltage_set = nouveau_voltage_gpio_set; -+ if (dev_priv->chipset >= 0x84) -+ engine->pm.temp_get = nv84_temp_get; -+ else -+ engine->pm.temp_get = nv40_temp_get; -+ switch (dev_priv->chipset) { -+ case 0x84: -+ case 0x86: -+ case 0x92: -+ case 0x94: -+ case 0x96: -+ case 0xa0: -+ engine->crypt.init = nv84_crypt_init; -+ engine->crypt.takedown = nv84_crypt_fini; -+ engine->crypt.create_context = nv84_crypt_create_context; -+ engine->crypt.destroy_context = nv84_crypt_destroy_context; -+ break; -+ default: -+ engine->crypt.init = nouveau_stub_init; -+ engine->crypt.takedown = nouveau_stub_takedown; -+ break; -+ } - break; - case 0xC0: - engine->instmem.init = nvc0_instmem_init; -@@ -376,7 +459,6 @@ - engine->timer.takedown = nv04_timer_takedown; - engine->fb.init = nvc0_fb_init; - engine->fb.takedown = nvc0_fb_takedown; -- engine->graph.grclass = NULL; //nvc0_graph_grclass; - engine->graph.init = nvc0_graph_init; - engine->graph.takedown = nvc0_graph_takedown; - engine->graph.fifo_access = nvc0_graph_fifo_access; -@@ -406,6 +488,8 @@ - engine->gpio.get = nv50_gpio_get; - engine->gpio.set = nv50_gpio_set; - engine->gpio.irq_enable = nv50_gpio_irq_enable; -+ engine->crypt.init = nouveau_stub_init; -+ engine->crypt.takedown = nouveau_stub_takedown; - break; - default: - NV_ERROR(dev, "NV%02x unsupported\n", dev_priv->chipset); -@@ -437,16 +521,14 @@ - nouveau_card_init_channel(struct drm_device *dev) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; -- struct nouveau_gpuobj *gpuobj; -+ struct nouveau_gpuobj *gpuobj = NULL; - int ret; - - ret = nouveau_channel_alloc(dev, &dev_priv->channel, -- (struct drm_file *)-2, -- NvDmaFB, NvDmaTT); -+ (struct drm_file *)-2, NvDmaFB, NvDmaTT); - if (ret) - return ret; - -- gpuobj = NULL; - ret = nouveau_gpuobj_dma_new(dev_priv->channel, NV_CLASS_DMA_IN_MEMORY, - 0, dev_priv->vram_size, - NV_DMA_ACCESS_RW, NV_DMA_TARGET_VIDMEM, -@@ -454,28 +536,27 @@ - if (ret) - goto out_err; - -- ret = nouveau_gpuobj_ref_add(dev, dev_priv->channel, NvDmaVRAM, -- gpuobj, NULL); -+ ret = nouveau_ramht_insert(dev_priv->channel, NvDmaVRAM, gpuobj); -+ nouveau_gpuobj_ref(NULL, &gpuobj); - if (ret) - goto out_err; - -- gpuobj = NULL; - ret = nouveau_gpuobj_gart_dma_new(dev_priv->channel, 0, - dev_priv->gart_info.aper_size, - NV_DMA_ACCESS_RW, &gpuobj, NULL); - if (ret) - goto out_err; - -- ret = nouveau_gpuobj_ref_add(dev, dev_priv->channel, NvDmaGART, -- gpuobj, NULL); -+ ret = nouveau_ramht_insert(dev_priv->channel, NvDmaGART, gpuobj); -+ nouveau_gpuobj_ref(NULL, &gpuobj); - if (ret) - goto out_err; - -+ mutex_unlock(&dev_priv->channel->mutex); - return 0; -+ - out_err: -- nouveau_gpuobj_del(dev, &gpuobj); -- nouveau_channel_free(dev_priv->channel); -- dev_priv->channel = NULL; -+ nouveau_channel_put(&dev_priv->channel); - return ret; - } - -@@ -522,6 +603,8 @@ - if (ret) - goto out; - engine = &dev_priv->engine; -+ spin_lock_init(&dev_priv->channels.lock); -+ spin_lock_init(&dev_priv->tile.lock); - spin_lock_init(&dev_priv->context_switch_lock); - - /* Make the CRTCs and I2C buses accessible */ -@@ -534,35 +617,28 @@ - if (ret) - goto out_display_early; - -- ret = nouveau_mem_detect(dev); -+ nouveau_pm_init(dev); -+ -+ ret = nouveau_mem_vram_init(dev); - if (ret) - goto out_bios; - -- ret = nouveau_gpuobj_early_init(dev); -+ ret = nouveau_gpuobj_init(dev); - if (ret) -- goto out_bios; -+ goto out_vram; - -- /* Initialise instance memory, must happen before mem_init so we -- * know exactly how much VRAM we're able to use for "normal" -- * purposes. -- */ - ret = engine->instmem.init(dev); - if (ret) -- goto out_gpuobj_early; -+ goto out_gpuobj; - -- /* Setup the memory manager */ -- ret = nouveau_mem_init(dev); -+ ret = nouveau_mem_gart_init(dev); - if (ret) - goto out_instmem; - -- ret = nouveau_gpuobj_init(dev); -- if (ret) -- goto out_mem; -- - /* PMC */ - ret = engine->mc.init(dev); - if (ret) -- goto out_gpuobj; -+ goto out_gart; - - /* PGPIO */ - ret = engine->gpio.init(dev); -@@ -587,33 +663,39 @@ - if (ret) - goto out_fb; - -+ /* PCRYPT */ -+ ret = engine->crypt.init(dev); -+ if (ret) -+ goto out_graph; -+ - /* PFIFO */ - ret = engine->fifo.init(dev); - if (ret) -- goto out_graph; -+ goto out_crypt; - } - - ret = engine->display.create(dev); - if (ret) - goto out_fifo; - -- /* this call irq_preinstall, register irq handler and -- * call irq_postinstall -- */ -- ret = drm_irq_install(dev); -+ ret = drm_vblank_init(dev, nv_two_heads(dev) ? 2 : 1); - if (ret) -- goto out_display; -+ goto out_vblank; - -- ret = drm_vblank_init(dev, 0); -+ ret = nouveau_irq_init(dev); - if (ret) -- goto out_irq; -+ goto out_vblank; - - /* what about PVIDEO/PCRTC/PRAMDAC etc? */ - - if (!engine->graph.accel_blocked) { -- ret = nouveau_card_init_channel(dev); -+ ret = nouveau_fence_init(dev); - if (ret) - goto out_irq; -+ -+ ret = nouveau_card_init_channel(dev); -+ if (ret) -+ goto out_fence; - } - - ret = nouveau_backlight_init(dev); -@@ -624,13 +706,19 @@ - drm_kms_helper_poll_init(dev); - return 0; - -+out_fence: -+ nouveau_fence_fini(dev); - out_irq: -- drm_irq_uninstall(dev); --out_display: -+ nouveau_irq_fini(dev); -+out_vblank: -+ drm_vblank_cleanup(dev); - engine->display.destroy(dev); - out_fifo: - if (!nouveau_noaccel) - engine->fifo.takedown(dev); -+out_crypt: -+ if (!nouveau_noaccel) -+ engine->crypt.takedown(dev); - out_graph: - if (!nouveau_noaccel) - engine->graph.takedown(dev); -@@ -642,16 +730,16 @@ - engine->gpio.takedown(dev); - out_mc: - engine->mc.takedown(dev); --out_gpuobj: -- nouveau_gpuobj_takedown(dev); --out_mem: -- nouveau_sgdma_takedown(dev); -- nouveau_mem_close(dev); -+out_gart: -+ nouveau_mem_gart_fini(dev); - out_instmem: - engine->instmem.takedown(dev); --out_gpuobj_early: -- nouveau_gpuobj_late_takedown(dev); -+out_gpuobj: -+ nouveau_gpuobj_takedown(dev); -+out_vram: -+ nouveau_mem_vram_fini(dev); - out_bios: -+ nouveau_pm_fini(dev); - nouveau_bios_takedown(dev); - out_display_early: - engine->display.late_takedown(dev); -@@ -667,13 +755,14 @@ - - nouveau_backlight_exit(dev); - -- if (dev_priv->channel) { -- nouveau_channel_free(dev_priv->channel); -- dev_priv->channel = NULL; -+ if (!engine->graph.accel_blocked) { -+ nouveau_fence_fini(dev); -+ nouveau_channel_put_unlocked(&dev_priv->channel); - } - - if (!nouveau_noaccel) { - engine->fifo.takedown(dev); -+ engine->crypt.takedown(dev); - engine->graph.takedown(dev); - } - engine->fb.takedown(dev); -@@ -686,15 +775,16 @@ - ttm_bo_clean_mm(&dev_priv->ttm.bdev, TTM_PL_VRAM); - ttm_bo_clean_mm(&dev_priv->ttm.bdev, TTM_PL_TT); - mutex_unlock(&dev->struct_mutex); -- nouveau_sgdma_takedown(dev); -+ nouveau_mem_gart_fini(dev); - -- nouveau_gpuobj_takedown(dev); -- nouveau_mem_close(dev); - engine->instmem.takedown(dev); -+ nouveau_gpuobj_takedown(dev); -+ nouveau_mem_vram_fini(dev); - -- drm_irq_uninstall(dev); -+ nouveau_irq_fini(dev); -+ drm_vblank_cleanup(dev); - -- nouveau_gpuobj_late_takedown(dev); -+ nouveau_pm_fini(dev); - nouveau_bios_takedown(dev); - - vga_client_register(dev->pdev, NULL, NULL, NULL); -@@ -1006,6 +1096,12 @@ - case NOUVEAU_GETPARAM_PTIMER_TIME: - getparam->value = dev_priv->engine.timer.read(dev); - break; -+ case NOUVEAU_GETPARAM_HAS_BO_USAGE: -+ getparam->value = 1; -+ break; -+ case NOUVEAU_GETPARAM_HAS_PAGEFLIP: -+ getparam->value = (dev_priv->card_type < NV_50); -+ break; - case NOUVEAU_GETPARAM_GRAPH_UNITS: - /* NV40 and NV50 versions are quite different, but register - * address is the same. User is supposed to know the card -@@ -1016,7 +1112,7 @@ - } - /* FALLTHRU */ - default: -- NV_ERROR(dev, "unknown parameter %lld\n", getparam->param); -+ NV_DEBUG(dev, "unknown parameter %lld\n", getparam->param); - return -EINVAL; - } - -@@ -1031,7 +1127,7 @@ - - switch (setparam->param) { - default: -- NV_ERROR(dev, "unknown parameter %lld\n", setparam->param); -+ NV_DEBUG(dev, "unknown parameter %lld\n", setparam->param); - return -EINVAL; - } - -@@ -1057,7 +1153,13 @@ - /* Waits for PGRAPH to go completely idle */ - bool nouveau_wait_for_idle(struct drm_device *dev) - { -- if (!nv_wait(NV04_PGRAPH_STATUS, 0xffffffff, 0x00000000)) { -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ uint32_t mask = ~0; -+ -+ if (dev_priv->card_type == NV_40) -+ mask &= ~NV40_PGRAPH_STATUS_SYNC_STALL; -+ -+ if (!nv_wait(dev, NV04_PGRAPH_STATUS, mask, 0)) { - NV_ERROR(dev, "PGRAPH idle timed out with status 0x%08x\n", - nv_rd32(dev, NV04_PGRAPH_STATUS)); - return false; -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_temp.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_temp.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_temp.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_temp.c 2010-10-30 22:24:25.000000000 +0200 -@@ -0,0 +1,309 @@ -+/* -+ * Copyright 2010 PathScale inc. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be included in -+ * all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR -+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ * -+ * Authors: Martin Peres -+ */ -+ -+#include "drmP.h" -+ -+#include "nouveau_drv.h" -+#include "nouveau_pm.h" -+ -+static void -+nouveau_temp_vbios_parse(struct drm_device *dev, u8 *temp) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ struct nouveau_pm_temp_sensor_constants *sensor = &pm->sensor_constants; -+ struct nouveau_pm_threshold_temp *temps = &pm->threshold_temp; -+ int i, headerlen, recordlen, entries; -+ -+ if (!temp) { -+ NV_DEBUG(dev, "temperature table pointer invalid\n"); -+ return; -+ } -+ -+ /* Set the default sensor's contants */ -+ sensor->offset_constant = 0; -+ sensor->offset_mult = 1; -+ sensor->offset_div = 1; -+ sensor->slope_mult = 1; -+ sensor->slope_div = 1; -+ -+ /* Set the default temperature thresholds */ -+ temps->critical = 110; -+ temps->down_clock = 100; -+ temps->fan_boost = 90; -+ -+ /* Set the known default values to setup the temperature sensor */ -+ if (dev_priv->card_type >= NV_40) { -+ switch (dev_priv->chipset) { -+ case 0x43: -+ sensor->offset_mult = 32060; -+ sensor->offset_div = 1000; -+ sensor->slope_mult = 792; -+ sensor->slope_div = 1000; -+ break; -+ -+ case 0x44: -+ case 0x47: -+ case 0x4a: -+ sensor->offset_mult = 27839; -+ sensor->offset_div = 1000; -+ sensor->slope_mult = 780; -+ sensor->slope_div = 1000; -+ break; -+ -+ case 0x46: -+ sensor->offset_mult = -24775; -+ sensor->offset_div = 100; -+ sensor->slope_mult = 467; -+ sensor->slope_div = 10000; -+ break; -+ -+ case 0x49: -+ sensor->offset_mult = -25051; -+ sensor->offset_div = 100; -+ sensor->slope_mult = 458; -+ sensor->slope_div = 10000; -+ break; -+ -+ case 0x4b: -+ sensor->offset_mult = -24088; -+ sensor->offset_div = 100; -+ sensor->slope_mult = 442; -+ sensor->slope_div = 10000; -+ break; -+ -+ case 0x50: -+ sensor->offset_mult = -22749; -+ sensor->offset_div = 100; -+ sensor->slope_mult = 431; -+ sensor->slope_div = 10000; -+ break; -+ } -+ } -+ -+ headerlen = temp[1]; -+ recordlen = temp[2]; -+ entries = temp[3]; -+ temp = temp + headerlen; -+ -+ /* Read the entries from the table */ -+ for (i = 0; i < entries; i++) { -+ u16 value = ROM16(temp[1]); -+ -+ switch (temp[0]) { -+ case 0x01: -+ if ((value & 0x8f) == 0) -+ sensor->offset_constant = (value >> 9) & 0x7f; -+ break; -+ -+ case 0x04: -+ if ((value & 0xf00f) == 0xa000) /* core */ -+ temps->critical = (value&0x0ff0) >> 4; -+ break; -+ -+ case 0x07: -+ if ((value & 0xf00f) == 0xa000) /* core */ -+ temps->down_clock = (value&0x0ff0) >> 4; -+ break; -+ -+ case 0x08: -+ if ((value & 0xf00f) == 0xa000) /* core */ -+ temps->fan_boost = (value&0x0ff0) >> 4; -+ break; -+ -+ case 0x10: -+ sensor->offset_mult = value; -+ break; -+ -+ case 0x11: -+ sensor->offset_div = value; -+ break; -+ -+ case 0x12: -+ sensor->slope_mult = value; -+ break; -+ -+ case 0x13: -+ sensor->slope_div = value; -+ break; -+ } -+ temp += recordlen; -+ } -+ -+ nouveau_temp_safety_checks(dev); -+} -+ -+static int -+nv40_sensor_setup(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ struct nouveau_pm_temp_sensor_constants *sensor = &pm->sensor_constants; -+ u32 offset = sensor->offset_mult / sensor->offset_div; -+ u32 sensor_calibration; -+ -+ /* set up the sensors */ -+ sensor_calibration = 120 - offset - sensor->offset_constant; -+ sensor_calibration = sensor_calibration * sensor->slope_div / -+ sensor->slope_mult; -+ -+ if (dev_priv->chipset >= 0x46) -+ sensor_calibration |= 0x80000000; -+ else -+ sensor_calibration |= 0x10000000; -+ -+ nv_wr32(dev, 0x0015b0, sensor_calibration); -+ -+ /* Wait for the sensor to update */ -+ msleep(5); -+ -+ /* read */ -+ return nv_rd32(dev, 0x0015b4) & 0x1fff; -+} -+ -+int -+nv40_temp_get(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ struct nouveau_pm_temp_sensor_constants *sensor = &pm->sensor_constants; -+ int offset = sensor->offset_mult / sensor->offset_div; -+ int core_temp; -+ -+ if (dev_priv->chipset >= 0x50) { -+ core_temp = nv_rd32(dev, 0x20008); -+ } else { -+ core_temp = nv_rd32(dev, 0x0015b4) & 0x1fff; -+ /* Setup the sensor if the temperature is 0 */ -+ if (core_temp == 0) -+ core_temp = nv40_sensor_setup(dev); -+ } -+ -+ core_temp = core_temp * sensor->slope_mult / sensor->slope_div; -+ core_temp = core_temp + offset + sensor->offset_constant; -+ -+ return core_temp; -+} -+ -+int -+nv84_temp_get(struct drm_device *dev) -+{ -+ return nv_rd32(dev, 0x20400); -+} -+ -+void -+nouveau_temp_safety_checks(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ struct nouveau_pm_threshold_temp *temps = &pm->threshold_temp; -+ -+ if (temps->critical > 120) -+ temps->critical = 120; -+ else if (temps->critical < 80) -+ temps->critical = 80; -+ -+ if (temps->down_clock > 110) -+ temps->down_clock = 110; -+ else if (temps->down_clock < 60) -+ temps->down_clock = 60; -+ -+ if (temps->fan_boost > 100) -+ temps->fan_boost = 100; -+ else if (temps->fan_boost < 40) -+ temps->fan_boost = 40; -+} -+ -+static bool -+probe_monitoring_device(struct nouveau_i2c_chan *i2c, -+ struct i2c_board_info *info) -+{ -+ char modalias[16] = "i2c:"; -+ struct i2c_client *client; -+ -+ strlcat(modalias, info->type, sizeof(modalias)); -+ request_module(modalias); -+ -+ client = i2c_new_device(&i2c->adapter, info); -+ if (!client) -+ return false; -+ -+ if (!client->driver || client->driver->detect(client, info)) { -+ i2c_unregister_device(client); -+ return false; -+ } -+ -+ return true; -+} -+ -+static void -+nouveau_temp_probe_i2c(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct dcb_table *dcb = &dev_priv->vbios.dcb; -+ struct i2c_board_info info[] = { -+ { I2C_BOARD_INFO("w83l785ts", 0x2d) }, -+ { I2C_BOARD_INFO("w83781d", 0x2d) }, -+ { I2C_BOARD_INFO("f75375", 0x2e) }, -+ { I2C_BOARD_INFO("adt7473", 0x2e) }, -+ { I2C_BOARD_INFO("lm99", 0x4c) }, -+ { } -+ }; -+ int idx = (dcb->version >= 0x40 ? -+ dcb->i2c_default_indices & 0xf : 2); -+ -+ nouveau_i2c_identify(dev, "monitoring device", info, -+ probe_monitoring_device, idx); -+} -+ -+void -+nouveau_temp_init(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nvbios *bios = &dev_priv->vbios; -+ struct bit_entry P; -+ u8 *temp = NULL; -+ -+ if (bios->type == NVBIOS_BIT) { -+ if (bit_table(dev, 'P', &P)) -+ return; -+ -+ if (P.version == 1) -+ temp = ROMPTR(bios, P.data[12]); -+ else if (P.version == 2) -+ temp = ROMPTR(bios, P.data[16]); -+ else -+ NV_WARN(dev, "unknown temp for BIT P %d\n", P.version); -+ -+ nouveau_temp_vbios_parse(dev, temp); -+ } -+ -+ nouveau_temp_probe_i2c(dev); -+} -+ -+void -+nouveau_temp_fini(struct drm_device *dev) -+{ -+ -+} -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_volt.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_volt.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nouveau_volt.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_volt.c 2010-10-30 22:24:25.000000000 +0200 -@@ -0,0 +1,212 @@ -+/* -+ * Copyright 2010 Red Hat Inc. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be included in -+ * all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR -+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ * -+ * Authors: Ben Skeggs -+ */ -+ -+#include "drmP.h" -+ -+#include "nouveau_drv.h" -+#include "nouveau_pm.h" -+ -+static const enum dcb_gpio_tag vidtag[] = { 0x04, 0x05, 0x06, 0x1a }; -+static int nr_vidtag = sizeof(vidtag) / sizeof(vidtag[0]); -+ -+int -+nouveau_voltage_gpio_get(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_gpio_engine *gpio = &dev_priv->engine.gpio; -+ struct nouveau_pm_voltage *volt = &dev_priv->engine.pm.voltage; -+ u8 vid = 0; -+ int i; -+ -+ for (i = 0; i < nr_vidtag; i++) { -+ if (!(volt->vid_mask & (1 << i))) -+ continue; -+ -+ vid |= gpio->get(dev, vidtag[i]) << i; -+ } -+ -+ return nouveau_volt_lvl_lookup(dev, vid); -+} -+ -+int -+nouveau_voltage_gpio_set(struct drm_device *dev, int voltage) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_gpio_engine *gpio = &dev_priv->engine.gpio; -+ struct nouveau_pm_voltage *volt = &dev_priv->engine.pm.voltage; -+ int vid, i; -+ -+ vid = nouveau_volt_vid_lookup(dev, voltage); -+ if (vid < 0) -+ return vid; -+ -+ for (i = 0; i < nr_vidtag; i++) { -+ if (!(volt->vid_mask & (1 << i))) -+ continue; -+ -+ gpio->set(dev, vidtag[i], !!(vid & (1 << i))); -+ } -+ -+ return 0; -+} -+ -+int -+nouveau_volt_vid_lookup(struct drm_device *dev, int voltage) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_voltage *volt = &dev_priv->engine.pm.voltage; -+ int i; -+ -+ for (i = 0; i < volt->nr_level; i++) { -+ if (volt->level[i].voltage == voltage) -+ return volt->level[i].vid; -+ } -+ -+ return -ENOENT; -+} -+ -+int -+nouveau_volt_lvl_lookup(struct drm_device *dev, int vid) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_voltage *volt = &dev_priv->engine.pm.voltage; -+ int i; -+ -+ for (i = 0; i < volt->nr_level; i++) { -+ if (volt->level[i].vid == vid) -+ return volt->level[i].voltage; -+ } -+ -+ return -ENOENT; -+} -+ -+void -+nouveau_volt_init(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_engine *pm = &dev_priv->engine.pm; -+ struct nouveau_pm_voltage *voltage = &pm->voltage; -+ struct nvbios *bios = &dev_priv->vbios; -+ struct bit_entry P; -+ u8 *volt = NULL, *entry; -+ int i, headerlen, recordlen, entries, vidmask, vidshift; -+ -+ if (bios->type == NVBIOS_BIT) { -+ if (bit_table(dev, 'P', &P)) -+ return; -+ -+ if (P.version == 1) -+ volt = ROMPTR(bios, P.data[16]); -+ else -+ if (P.version == 2) -+ volt = ROMPTR(bios, P.data[12]); -+ else { -+ NV_WARN(dev, "unknown volt for BIT P %d\n", P.version); -+ } -+ } else { -+ if (bios->data[bios->offset + 6] < 0x27) { -+ NV_DEBUG(dev, "BMP version too old for voltage\n"); -+ return; -+ } -+ -+ volt = ROMPTR(bios, bios->data[bios->offset + 0x98]); -+ } -+ -+ if (!volt) { -+ NV_DEBUG(dev, "voltage table pointer invalid\n"); -+ return; -+ } -+ -+ switch (volt[0]) { -+ case 0x10: -+ case 0x11: -+ case 0x12: -+ headerlen = 5; -+ recordlen = volt[1]; -+ entries = volt[2]; -+ vidshift = 0; -+ vidmask = volt[4]; -+ break; -+ case 0x20: -+ headerlen = volt[1]; -+ recordlen = volt[3]; -+ entries = volt[2]; -+ vidshift = 0; /* could be vidshift like 0x30? */ -+ vidmask = volt[5]; -+ break; -+ case 0x30: -+ headerlen = volt[1]; -+ recordlen = volt[2]; -+ entries = volt[3]; -+ vidshift = hweight8(volt[5]); -+ vidmask = volt[4]; -+ break; -+ default: -+ NV_WARN(dev, "voltage table 0x%02x unknown\n", volt[0]); -+ return; -+ } -+ -+ /* validate vid mask */ -+ voltage->vid_mask = vidmask; -+ if (!voltage->vid_mask) -+ return; -+ -+ i = 0; -+ while (vidmask) { -+ if (i > nr_vidtag) { -+ NV_DEBUG(dev, "vid bit %d unknown\n", i); -+ return; -+ } -+ -+ if (!nouveau_bios_gpio_entry(dev, vidtag[i])) { -+ NV_DEBUG(dev, "vid bit %d has no gpio tag\n", i); -+ return; -+ } -+ -+ vidmask >>= 1; -+ i++; -+ } -+ -+ /* parse vbios entries into common format */ -+ voltage->level = kcalloc(entries, sizeof(*voltage->level), GFP_KERNEL); -+ if (!voltage->level) -+ return; -+ -+ entry = volt + headerlen; -+ for (i = 0; i < entries; i++, entry += recordlen) { -+ voltage->level[i].voltage = entry[0]; -+ voltage->level[i].vid = entry[1] >> vidshift; -+ } -+ voltage->nr_level = entries; -+ voltage->supported = true; -+} -+ -+void -+nouveau_volt_fini(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pm_voltage *volt = &dev_priv->engine.pm.voltage; -+ -+ kfree(volt->level); -+} -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_crtc.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_crtc.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv04_crtc.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_crtc.c 2010-10-30 22:24:25.000000000 +0200 -@@ -109,7 +109,7 @@ - struct nouveau_pll_vals *pv = ®p->pllvals; - struct pll_lims pll_lim; - -- if (get_pll_limits(dev, nv_crtc->index ? VPLL2 : VPLL1, &pll_lim)) -+ if (get_pll_limits(dev, nv_crtc->index ? PLL_VPLL1 : PLL_VPLL0, &pll_lim)) - return; - - /* NM2 == 0 is used to determine single stage mode on two stage plls */ -@@ -157,7 +157,6 @@ - { - struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); - struct drm_device *dev = crtc->dev; -- struct drm_connector *connector; - unsigned char seq1 = 0, crtc17 = 0; - unsigned char crtc1A; - -@@ -212,10 +211,6 @@ - NVVgaSeqReset(dev, nv_crtc->index, false); - - NVWriteVgaCrtc(dev, nv_crtc->index, NV_CIO_CRE_RPC1_INDEX, crtc1A); -- -- /* Update connector polling modes */ -- list_for_each_entry(connector, &dev->mode_config.connector_list, head) -- nouveau_connector_set_polling(connector); - } - - static bool -@@ -555,7 +550,10 @@ - if (dev_priv->card_type >= NV_30) - regp->gpio_ext = NVReadCRTC(dev, 0, NV_PCRTC_GPIO_EXT); - -- regp->crtc_cfg = NV_PCRTC_CONFIG_START_ADDRESS_HSYNC; -+ if (dev_priv->card_type >= NV_10) -+ regp->crtc_cfg = NV10_PCRTC_CONFIG_START_ADDRESS_HSYNC; -+ else -+ regp->crtc_cfg = NV04_PCRTC_CONFIG_START_ADDRESS_HSYNC; - - /* Some misc regs */ - if (dev_priv->card_type == NV_40) { -@@ -673,6 +671,7 @@ - if (nv_two_heads(dev)) - NVSetOwner(dev, nv_crtc->index); - -+ drm_vblank_pre_modeset(dev, nv_crtc->index); - funcs->dpms(crtc, DRM_MODE_DPMS_OFF); - - NVBlankScreen(dev, nv_crtc->index, true); -@@ -705,6 +704,7 @@ - #endif - - funcs->dpms(crtc, DRM_MODE_DPMS_ON); -+ drm_vblank_post_modeset(dev, nv_crtc->index); - } - - static void nv_crtc_destroy(struct drm_crtc *crtc) -@@ -718,6 +718,7 @@ - - drm_crtc_cleanup(crtc); - -+ nouveau_bo_unmap(nv_crtc->cursor.nvbo); - nouveau_bo_ref(NULL, &nv_crtc->cursor.nvbo); - kfree(nv_crtc); - } -@@ -815,7 +816,7 @@ - /* Update the framebuffer location. */ - regp->fb_start = nv_crtc->fb.offset & ~3; - regp->fb_start += (y * drm_fb->pitch) + (x * drm_fb->bits_per_pixel / 8); -- NVWriteCRTC(dev, nv_crtc->index, NV_PCRTC_START, regp->fb_start); -+ nv_set_crtc_base(dev, nv_crtc->index, regp->fb_start); - - /* Update the arbitration parameters. */ - nouveau_calc_arb(dev, crtc->mode.clock, drm_fb->bits_per_pixel, -@@ -826,7 +827,7 @@ - crtc_wr_cio_state(crtc, regp, NV_CIO_CRE_FF_INDEX); - crtc_wr_cio_state(crtc, regp, NV_CIO_CRE_FFLWM__INDEX); - -- if (dev_priv->card_type >= NV_30) { -+ if (dev_priv->card_type >= NV_20) { - regp->CRTC[NV_CIO_CRE_47] = arb_lwm >> 8; - crtc_wr_cio_state(crtc, regp, NV_CIO_CRE_47); - } -@@ -952,6 +953,7 @@ - .cursor_move = nv04_crtc_cursor_move, - .gamma_set = nv_crtc_gamma_set, - .set_config = drm_crtc_helper_set_config, -+ .page_flip = nouveau_crtc_page_flip, - .destroy = nv_crtc_destroy, - }; - -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_dac.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_dac.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv04_dac.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_dac.c 2010-10-30 22:24:25.000000000 +0200 -@@ -291,6 +291,8 @@ - msleep(5); - - sample = NVReadRAMDAC(dev, 0, NV_PRAMDAC_TEST_CONTROL + regoffset); -+ /* do it again just in case it's a residual current */ -+ sample &= NVReadRAMDAC(dev, 0, NV_PRAMDAC_TEST_CONTROL + regoffset); - - temp = NVReadRAMDAC(dev, head, NV_PRAMDAC_TEST_CONTROL); - NVWriteRAMDAC(dev, head, NV_PRAMDAC_TEST_CONTROL, -@@ -343,22 +345,13 @@ - { - struct drm_encoder_helper_funcs *helper = encoder->helper_private; - struct drm_device *dev = encoder->dev; -- struct drm_nouveau_private *dev_priv = dev->dev_private; - int head = nouveau_crtc(encoder->crtc)->index; -- struct nv04_crtc_reg *crtcstate = dev_priv->mode_reg.crtc_reg; - - helper->dpms(encoder, DRM_MODE_DPMS_OFF); - - nv04_dfp_disable(dev, head); -- -- /* Some NV4x have unknown values (0x3f, 0x50, 0x54, 0x6b, 0x79, 0x7f) -- * at LCD__INDEX which we don't alter -- */ -- if (!(crtcstate[head].CRTC[NV_CIO_CRE_LCD__INDEX] & 0x44)) -- crtcstate[head].CRTC[NV_CIO_CRE_LCD__INDEX] = 0; - } - -- - static void nv04_dac_mode_set(struct drm_encoder *encoder, - struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_dfp.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_dfp.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv04_dfp.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_dfp.c 2010-10-30 22:24:25.000000000 +0200 -@@ -104,6 +104,8 @@ - } - /* don't inadvertently turn it on when state written later */ - crtcstate[head].fp_control = FP_TG_CONTROL_OFF; -+ crtcstate[head].CRTC[NV_CIO_CRE_LCD__INDEX] &= -+ ~NV_CIO_CRE_LCD_ROUTE_MASK; - } - - void nv04_dfp_update_fp_control(struct drm_encoder *encoder, int mode) -@@ -183,14 +185,15 @@ - struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); - struct nouveau_connector *nv_connector = nouveau_encoder_connector_get(nv_encoder); - -- /* For internal panels and gpu scaling on DVI we need the native mode */ -- if (nv_connector->scaling_mode != DRM_MODE_SCALE_NONE) { -- if (!nv_connector->native_mode) -- return false; -+ if (!nv_connector->native_mode || -+ nv_connector->scaling_mode == DRM_MODE_SCALE_NONE || -+ mode->hdisplay > nv_connector->native_mode->hdisplay || -+ mode->vdisplay > nv_connector->native_mode->vdisplay) { -+ nv_encoder->mode = *adjusted_mode; -+ -+ } else { - nv_encoder->mode = *nv_connector->native_mode; - adjusted_mode->clock = nv_connector->native_mode->clock; -- } else { -- nv_encoder->mode = *adjusted_mode; - } - - return true; -@@ -253,26 +256,21 @@ - - nv04_dfp_prepare_sel_clk(dev, nv_encoder, head); - -- /* Some NV4x have unknown values (0x3f, 0x50, 0x54, 0x6b, 0x79, 0x7f) -- * at LCD__INDEX which we don't alter -- */ -- if (!(*cr_lcd & 0x44)) { -- *cr_lcd = 0x3; -+ *cr_lcd = (*cr_lcd & ~NV_CIO_CRE_LCD_ROUTE_MASK) | 0x3; - -- if (nv_two_heads(dev)) { -- if (nv_encoder->dcb->location == DCB_LOC_ON_CHIP) -- *cr_lcd |= head ? 0x0 : 0x8; -- else { -- *cr_lcd |= (nv_encoder->dcb->or << 4) & 0x30; -- if (nv_encoder->dcb->type == OUTPUT_LVDS) -- *cr_lcd |= 0x30; -- if ((*cr_lcd & 0x30) == (*cr_lcd_oth & 0x30)) { -- /* avoid being connected to both crtcs */ -- *cr_lcd_oth &= ~0x30; -- NVWriteVgaCrtc(dev, head ^ 1, -- NV_CIO_CRE_LCD__INDEX, -- *cr_lcd_oth); -- } -+ if (nv_two_heads(dev)) { -+ if (nv_encoder->dcb->location == DCB_LOC_ON_CHIP) -+ *cr_lcd |= head ? 0x0 : 0x8; -+ else { -+ *cr_lcd |= (nv_encoder->dcb->or << 4) & 0x30; -+ if (nv_encoder->dcb->type == OUTPUT_LVDS) -+ *cr_lcd |= 0x30; -+ if ((*cr_lcd & 0x30) == (*cr_lcd_oth & 0x30)) { -+ /* avoid being connected to both crtcs */ -+ *cr_lcd_oth &= ~0x30; -+ NVWriteVgaCrtc(dev, head ^ 1, -+ NV_CIO_CRE_LCD__INDEX, -+ *cr_lcd_oth); - } - } - } -@@ -640,7 +638,7 @@ - get_tmds_slave(encoder)) - return; - -- type = nouveau_i2c_identify(dev, "TMDS transmitter", info, 2); -+ type = nouveau_i2c_identify(dev, "TMDS transmitter", info, NULL, 2); - if (type < 0) - return; - -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_fbcon.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_fbcon.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv04_fbcon.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_fbcon.c 2010-10-30 22:24:25.000000000 +0200 -@@ -25,54 +25,42 @@ - #include "drmP.h" - #include "nouveau_drv.h" - #include "nouveau_dma.h" -+#include "nouveau_ramht.h" - #include "nouveau_fbcon.h" - --void -+int - nv04_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region) - { - struct nouveau_fbdev *nfbdev = info->par; - struct drm_device *dev = nfbdev->dev; - struct drm_nouveau_private *dev_priv = dev->dev_private; - struct nouveau_channel *chan = dev_priv->channel; -+ int ret; - -- if (info->state != FBINFO_STATE_RUNNING) -- return; -- -- if (!(info->flags & FBINFO_HWACCEL_DISABLED) && RING_SPACE(chan, 4)) { -- nouveau_fbcon_gpu_lockup(info); -- } -- -- if (info->flags & FBINFO_HWACCEL_DISABLED) { -- cfb_copyarea(info, region); -- return; -- } -+ ret = RING_SPACE(chan, 4); -+ if (ret) -+ return ret; - - BEGIN_RING(chan, NvSubImageBlit, 0x0300, 3); - OUT_RING(chan, (region->sy << 16) | region->sx); - OUT_RING(chan, (region->dy << 16) | region->dx); - OUT_RING(chan, (region->height << 16) | region->width); - FIRE_RING(chan); -+ return 0; - } - --void -+int - nv04_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) - { - struct nouveau_fbdev *nfbdev = info->par; - struct drm_device *dev = nfbdev->dev; - struct drm_nouveau_private *dev_priv = dev->dev_private; - struct nouveau_channel *chan = dev_priv->channel; -+ int ret; - -- if (info->state != FBINFO_STATE_RUNNING) -- return; -- -- if (!(info->flags & FBINFO_HWACCEL_DISABLED) && RING_SPACE(chan, 7)) { -- nouveau_fbcon_gpu_lockup(info); -- } -- -- if (info->flags & FBINFO_HWACCEL_DISABLED) { -- cfb_fillrect(info, rect); -- return; -- } -+ ret = RING_SPACE(chan, 7); -+ if (ret) -+ return ret; - - BEGIN_RING(chan, NvSubGdiRect, 0x02fc, 1); - OUT_RING(chan, (rect->rop != ROP_COPY) ? 1 : 3); -@@ -86,9 +74,10 @@ - OUT_RING(chan, (rect->dx << 16) | rect->dy); - OUT_RING(chan, (rect->width << 16) | rect->height); - FIRE_RING(chan); -+ return 0; - } - --void -+int - nv04_fbcon_imageblit(struct fb_info *info, const struct fb_image *image) - { - struct nouveau_fbdev *nfbdev = info->par; -@@ -100,23 +89,14 @@ - uint32_t dsize; - uint32_t width; - uint32_t *data = (uint32_t *)image->data; -+ int ret; - -- if (info->state != FBINFO_STATE_RUNNING) -- return; -- -- if (image->depth != 1) { -- cfb_imageblit(info, image); -- return; -- } -- -- if (!(info->flags & FBINFO_HWACCEL_DISABLED) && RING_SPACE(chan, 8)) { -- nouveau_fbcon_gpu_lockup(info); -- } -+ if (image->depth != 1) -+ return -ENODEV; - -- if (info->flags & FBINFO_HWACCEL_DISABLED) { -- cfb_imageblit(info, image); -- return; -- } -+ ret = RING_SPACE(chan, 8); -+ if (ret) -+ return ret; - - width = ALIGN(image->width, 8); - dsize = ALIGN(width * image->height, 32) >> 5; -@@ -143,11 +123,9 @@ - while (dsize) { - int iter_len = dsize > 128 ? 128 : dsize; - -- if (RING_SPACE(chan, iter_len + 1)) { -- nouveau_fbcon_gpu_lockup(info); -- cfb_imageblit(info, image); -- return; -- } -+ ret = RING_SPACE(chan, iter_len + 1); -+ if (ret) -+ return ret; - - BEGIN_RING(chan, NvSubGdiRect, 0x0c00, iter_len); - OUT_RINGp(chan, data, iter_len); -@@ -156,6 +134,7 @@ - } - - FIRE_RING(chan); -+ return 0; - } - - static int -@@ -169,11 +148,9 @@ - if (ret) - return ret; - -- ret = nouveau_gpuobj_ref_add(dev, dev_priv->channel, handle, obj, NULL); -- if (ret) -- return ret; -- -- return 0; -+ ret = nouveau_ramht_insert(dev_priv->channel, handle, obj); -+ nouveau_gpuobj_ref(NULL, &obj); -+ return ret; - } - - int -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_fifo.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_fifo.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv04_fifo.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_fifo.c 2010-10-30 22:24:25.000000000 +0200 -@@ -27,8 +27,9 @@ - #include "drmP.h" - #include "drm.h" - #include "nouveau_drv.h" -+#include "nouveau_ramht.h" - --#define NV04_RAMFC(c) (dev_priv->ramfc_offset + ((c) * NV04_RAMFC__SIZE)) -+#define NV04_RAMFC(c) (dev_priv->ramfc->pinst + ((c) * NV04_RAMFC__SIZE)) - #define NV04_RAMFC__SIZE 32 - #define NV04_RAMFC_DMA_PUT 0x00 - #define NV04_RAMFC_DMA_GET 0x04 -@@ -38,10 +39,8 @@ - #define NV04_RAMFC_ENGINE 0x14 - #define NV04_RAMFC_PULL1_ENGINE 0x18 - --#define RAMFC_WR(offset, val) nv_wo32(dev, chan->ramfc->gpuobj, \ -- NV04_RAMFC_##offset/4, (val)) --#define RAMFC_RD(offset) nv_ro32(dev, chan->ramfc->gpuobj, \ -- NV04_RAMFC_##offset/4) -+#define RAMFC_WR(offset, val) nv_wo32(chan->ramfc, NV04_RAMFC_##offset, (val)) -+#define RAMFC_RD(offset) nv_ro32(chan->ramfc, NV04_RAMFC_##offset) - - void - nv04_fifo_disable(struct drm_device *dev) -@@ -72,37 +71,32 @@ - } - - bool --nv04_fifo_cache_flush(struct drm_device *dev) --{ -- struct drm_nouveau_private *dev_priv = dev->dev_private; -- struct nouveau_timer_engine *ptimer = &dev_priv->engine.timer; -- uint64_t start = ptimer->read(dev); -- -- do { -- if (nv_rd32(dev, NV03_PFIFO_CACHE1_GET) == -- nv_rd32(dev, NV03_PFIFO_CACHE1_PUT)) -- return true; -- -- } while (ptimer->read(dev) - start < 100000000); -- -- NV_ERROR(dev, "Timeout flushing the PFIFO cache.\n"); -- -- return false; --} -- --bool - nv04_fifo_cache_pull(struct drm_device *dev, bool enable) - { -- uint32_t pull = nv_rd32(dev, NV04_PFIFO_CACHE1_PULL0); -+ int pull = nv_mask(dev, NV04_PFIFO_CACHE1_PULL0, 1, enable); -+ -+ if (!enable) { -+ /* In some cases the PFIFO puller may be left in an -+ * inconsistent state if you try to stop it when it's -+ * busy translating handles. Sometimes you get a -+ * PFIFO_CACHE_ERROR, sometimes it just fails silently -+ * sending incorrect instance offsets to PGRAPH after -+ * it's started up again. To avoid the latter we -+ * invalidate the most recently calculated instance. -+ */ -+ if (!nv_wait(dev, NV04_PFIFO_CACHE1_PULL0, -+ NV04_PFIFO_CACHE1_PULL0_HASH_BUSY, 0)) -+ NV_ERROR(dev, "Timeout idling the PFIFO puller.\n"); -+ -+ if (nv_rd32(dev, NV04_PFIFO_CACHE1_PULL0) & -+ NV04_PFIFO_CACHE1_PULL0_HASH_FAILED) -+ nv_wr32(dev, NV03_PFIFO_INTR_0, -+ NV_PFIFO_INTR_CACHE_ERROR); - -- if (enable) { -- nv_wr32(dev, NV04_PFIFO_CACHE1_PULL0, pull | 1); -- } else { -- nv_wr32(dev, NV04_PFIFO_CACHE1_PULL0, pull & ~1); - nv_wr32(dev, NV04_PFIFO_CACHE1_HASH, 0); - } - -- return !!(pull & 1); -+ return pull & 1; - } - - int -@@ -130,7 +124,7 @@ - NV04_RAMFC__SIZE, - NVOBJ_FLAG_ZERO_ALLOC | - NVOBJ_FLAG_ZERO_FREE, -- NULL, &chan->ramfc); -+ &chan->ramfc); - if (ret) - return ret; - -@@ -139,7 +133,7 @@ - /* Setup initial state */ - RAMFC_WR(DMA_PUT, chan->pushbuf_base); - RAMFC_WR(DMA_GET, chan->pushbuf_base); -- RAMFC_WR(DMA_INSTANCE, chan->pushbuf->instance >> 4); -+ RAMFC_WR(DMA_INSTANCE, chan->pushbuf->pinst >> 4); - RAMFC_WR(DMA_FETCH, (NV_PFIFO_CACHE1_DMA_FETCH_TRIG_128_BYTES | - NV_PFIFO_CACHE1_DMA_FETCH_SIZE_128_BYTES | - NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_8 | -@@ -157,11 +151,28 @@ - nv04_fifo_destroy_context(struct nouveau_channel *chan) - { - struct drm_device *dev = chan->dev; -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_fifo_engine *pfifo = &dev_priv->engine.fifo; -+ unsigned long flags; - -- nv_wr32(dev, NV04_PFIFO_MODE, -- nv_rd32(dev, NV04_PFIFO_MODE) & ~(1 << chan->id)); -+ spin_lock_irqsave(&dev_priv->context_switch_lock, flags); -+ pfifo->reassign(dev, false); -+ -+ /* Unload the context if it's the currently active one */ -+ if (pfifo->channel_id(dev) == chan->id) { -+ pfifo->disable(dev); -+ pfifo->unload_context(dev); -+ pfifo->enable(dev); -+ } -+ -+ /* Keep it from being rescheduled */ -+ nv_mask(dev, NV04_PFIFO_MODE, 1 << chan->id, 0); -+ -+ pfifo->reassign(dev, true); -+ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); - -- nouveau_gpuobj_ref_del(dev, &chan->ramfc); -+ /* Free the channel resources */ -+ nouveau_gpuobj_ref(NULL, &chan->ramfc); - } - - static void -@@ -214,7 +225,7 @@ - if (chid < 0 || chid >= dev_priv->engine.fifo.channels) - return 0; - -- chan = dev_priv->fifos[chid]; -+ chan = dev_priv->channels.ptr[chid]; - if (!chan) { - NV_ERROR(dev, "Inactive channel on PFIFO: %d\n", chid); - return -EINVAL; -@@ -264,10 +275,10 @@ - struct drm_nouveau_private *dev_priv = dev->dev_private; - - nv_wr32(dev, NV03_PFIFO_RAMHT, (0x03 << 24) /* search 128 */ | -- ((dev_priv->ramht_bits - 9) << 16) | -- (dev_priv->ramht_offset >> 8)); -- nv_wr32(dev, NV03_PFIFO_RAMRO, dev_priv->ramro_offset>>8); -- nv_wr32(dev, NV03_PFIFO_RAMFC, dev_priv->ramfc_offset >> 8); -+ ((dev_priv->ramht->bits - 9) << 16) | -+ (dev_priv->ramht->gpuobj->pinst >> 8)); -+ nv_wr32(dev, NV03_PFIFO_RAMRO, dev_priv->ramro->pinst >> 8); -+ nv_wr32(dev, NV03_PFIFO_RAMFC, dev_priv->ramfc->pinst >> 8); - } - - static void -@@ -295,7 +306,7 @@ - pfifo->reassign(dev, true); - - for (i = 0; i < dev_priv->engine.fifo.channels; i++) { -- if (dev_priv->fifos[i]) { -+ if (dev_priv->channels.ptr[i]) { - uint32_t mode = nv_rd32(dev, NV04_PFIFO_MODE); - nv_wr32(dev, NV04_PFIFO_MODE, mode | (1 << i)); - } -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_graph.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_graph.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv04_graph.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_graph.c 2010-10-30 22:24:25.000000000 +0200 -@@ -26,6 +26,9 @@ - #include "drm.h" - #include "nouveau_drm.h" - #include "nouveau_drv.h" -+#include "nouveau_hw.h" -+ -+static int nv04_graph_register(struct drm_device *dev); - - static uint32_t nv04_graph_ctx_regs[] = { - 0x0040053c, -@@ -357,7 +360,7 @@ - if (chid >= dev_priv->engine.fifo.channels) - return NULL; - -- return dev_priv->fifos[chid]; -+ return dev_priv->channels.ptr[chid]; - } - - void -@@ -376,7 +379,7 @@ - - /* Load context for next channel */ - chid = dev_priv->engine.fifo.channel_id(dev); -- chan = dev_priv->fifos[chid]; -+ chan = dev_priv->channels.ptr[chid]; - if (chan) - nv04_graph_load_context(chan); - -@@ -412,10 +415,25 @@ - - void nv04_graph_destroy_context(struct nouveau_channel *chan) - { -+ struct drm_device *dev = chan->dev; -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; - struct graph_state *pgraph_ctx = chan->pgraph_ctx; -+ unsigned long flags; -+ -+ spin_lock_irqsave(&dev_priv->context_switch_lock, flags); -+ pgraph->fifo_access(dev, false); -+ -+ /* Unload the context if it's the currently active one */ -+ if (pgraph->channel(dev) == chan) -+ pgraph->unload_context(dev); - -+ /* Free the context resources */ - kfree(pgraph_ctx); - chan->pgraph_ctx = NULL; -+ -+ pgraph->fifo_access(dev, true); -+ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); - } - - int nv04_graph_load_context(struct nouveau_channel *chan) -@@ -468,12 +486,17 @@ - { - struct drm_nouveau_private *dev_priv = dev->dev_private; - uint32_t tmp; -+ int ret; - - nv_wr32(dev, NV03_PMC_ENABLE, nv_rd32(dev, NV03_PMC_ENABLE) & - ~NV_PMC_ENABLE_PGRAPH); - nv_wr32(dev, NV03_PMC_ENABLE, nv_rd32(dev, NV03_PMC_ENABLE) | - NV_PMC_ENABLE_PGRAPH); - -+ ret = nv04_graph_register(dev); -+ if (ret) -+ return ret; -+ - /* Enable PGRAPH interrupts */ - nv_wr32(dev, NV03_PGRAPH_INTR, 0xFFFFFFFF); - nv_wr32(dev, NV03_PGRAPH_INTR_EN, 0xFFFFFFFF); -@@ -524,13 +547,27 @@ - } - - static int --nv04_graph_mthd_set_ref(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv04_graph_mthd_set_ref(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { - atomic_set(&chan->fence.last_sequence_irq, data); - return 0; - } - -+int -+nv04_graph_mthd_page_flip(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) -+{ -+ struct drm_device *dev = chan->dev; -+ struct nouveau_page_flip_state s; -+ -+ if (!nouveau_finish_page_flip(chan, &s)) -+ nv_set_crtc_base(dev, s.crtc, -+ s.offset + s.y * s.pitch + s.x * s.bpp / 8); -+ -+ return 0; -+} -+ - /* - * Software methods, why they are needed, and how they all work: - * -@@ -606,12 +643,12 @@ - */ - - static void --nv04_graph_set_ctx1(struct nouveau_channel *chan, uint32_t mask, uint32_t value) -+nv04_graph_set_ctx1(struct nouveau_channel *chan, u32 mask, u32 value) - { - struct drm_device *dev = chan->dev; -- uint32_t instance = (nv_rd32(dev, NV04_PGRAPH_CTX_SWITCH4) & 0xffff) << 4; -+ u32 instance = (nv_rd32(dev, NV04_PGRAPH_CTX_SWITCH4) & 0xffff) << 4; - int subc = (nv_rd32(dev, NV04_PGRAPH_TRAPPED_ADDR) >> 13) & 0x7; -- uint32_t tmp; -+ u32 tmp; - - tmp = nv_ri32(dev, instance); - tmp &= ~mask; -@@ -623,11 +660,11 @@ - } - - static void --nv04_graph_set_ctx_val(struct nouveau_channel *chan, uint32_t mask, uint32_t value) -+nv04_graph_set_ctx_val(struct nouveau_channel *chan, u32 mask, u32 value) - { - struct drm_device *dev = chan->dev; -- uint32_t instance = (nv_rd32(dev, NV04_PGRAPH_CTX_SWITCH4) & 0xffff) << 4; -- uint32_t tmp, ctx1; -+ u32 instance = (nv_rd32(dev, NV04_PGRAPH_CTX_SWITCH4) & 0xffff) << 4; -+ u32 tmp, ctx1; - int class, op, valid = 1; - - ctx1 = nv_ri32(dev, instance); -@@ -672,13 +709,13 @@ - } - - static int --nv04_graph_mthd_set_operation(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv04_graph_mthd_set_operation(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { - if (data > 5) - return 1; - /* Old versions of the objects only accept first three operations. */ -- if (data > 2 && grclass < 0x40) -+ if (data > 2 && class < 0x40) - return 1; - nv04_graph_set_ctx1(chan, 0x00038000, data << 15); - /* changing operation changes set of objects needed for validation */ -@@ -687,8 +724,8 @@ - } - - static int --nv04_graph_mthd_surf3d_clip_h(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv04_graph_mthd_surf3d_clip_h(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { - uint32_t min = data & 0xffff, max; - uint32_t w = data >> 16; -@@ -706,8 +743,8 @@ - } - - static int --nv04_graph_mthd_surf3d_clip_v(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv04_graph_mthd_surf3d_clip_v(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { - uint32_t min = data & 0xffff, max; - uint32_t w = data >> 16; -@@ -725,8 +762,8 @@ - } - - static int --nv04_graph_mthd_bind_surf2d(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv04_graph_mthd_bind_surf2d(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { - switch (nv_ri32(chan->dev, data << 4) & 0xff) { - case 0x30: -@@ -742,8 +779,8 @@ - } - - static int --nv04_graph_mthd_bind_surf2d_swzsurf(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv04_graph_mthd_bind_surf2d_swzsurf(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { - switch (nv_ri32(chan->dev, data << 4) & 0xff) { - case 0x30: -@@ -763,8 +800,8 @@ - } - - static int --nv04_graph_mthd_bind_nv01_patt(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv04_graph_mthd_bind_nv01_patt(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { - switch (nv_ri32(chan->dev, data << 4) & 0xff) { - case 0x30: -@@ -778,8 +815,8 @@ - } - - static int --nv04_graph_mthd_bind_nv04_patt(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv04_graph_mthd_bind_nv04_patt(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { - switch (nv_ri32(chan->dev, data << 4) & 0xff) { - case 0x30: -@@ -793,8 +830,8 @@ - } - - static int --nv04_graph_mthd_bind_rop(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv04_graph_mthd_bind_rop(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { - switch (nv_ri32(chan->dev, data << 4) & 0xff) { - case 0x30: -@@ -808,8 +845,8 @@ - } - - static int --nv04_graph_mthd_bind_beta1(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv04_graph_mthd_bind_beta1(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { - switch (nv_ri32(chan->dev, data << 4) & 0xff) { - case 0x30: -@@ -823,8 +860,8 @@ - } - - static int --nv04_graph_mthd_bind_beta4(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv04_graph_mthd_bind_beta4(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { - switch (nv_ri32(chan->dev, data << 4) & 0xff) { - case 0x30: -@@ -838,8 +875,8 @@ - } - - static int --nv04_graph_mthd_bind_surf_dst(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv04_graph_mthd_bind_surf_dst(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { - switch (nv_ri32(chan->dev, data << 4) & 0xff) { - case 0x30: -@@ -853,8 +890,8 @@ - } - - static int --nv04_graph_mthd_bind_surf_src(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv04_graph_mthd_bind_surf_src(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { - switch (nv_ri32(chan->dev, data << 4) & 0xff) { - case 0x30: -@@ -868,8 +905,8 @@ - } - - static int --nv04_graph_mthd_bind_surf_color(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv04_graph_mthd_bind_surf_color(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { - switch (nv_ri32(chan->dev, data << 4) & 0xff) { - case 0x30: -@@ -883,8 +920,8 @@ - } - - static int --nv04_graph_mthd_bind_surf_zeta(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv04_graph_mthd_bind_surf_zeta(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { - switch (nv_ri32(chan->dev, data << 4) & 0xff) { - case 0x30: -@@ -898,8 +935,8 @@ - } - - static int --nv04_graph_mthd_bind_clip(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv04_graph_mthd_bind_clip(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { - switch (nv_ri32(chan->dev, data << 4) & 0xff) { - case 0x30: -@@ -913,8 +950,8 @@ - } - - static int --nv04_graph_mthd_bind_chroma(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv04_graph_mthd_bind_chroma(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { - switch (nv_ri32(chan->dev, data << 4) & 0xff) { - case 0x30: -@@ -930,194 +967,260 @@ - return 1; - } - --static struct nouveau_pgraph_object_method nv04_graph_mthds_sw[] = { -- { 0x0150, nv04_graph_mthd_set_ref }, -- {} --}; -- --static struct nouveau_pgraph_object_method nv04_graph_mthds_nv03_gdirect[] = { -- { 0x0184, nv04_graph_mthd_bind_nv01_patt }, -- { 0x0188, nv04_graph_mthd_bind_rop }, -- { 0x018c, nv04_graph_mthd_bind_beta1 }, -- { 0x0190, nv04_graph_mthd_bind_surf_dst }, -- { 0x02fc, nv04_graph_mthd_set_operation }, -- {}, --}; -- --static struct nouveau_pgraph_object_method nv04_graph_mthds_nv04_gdirect[] = { -- { 0x0188, nv04_graph_mthd_bind_nv04_patt }, -- { 0x018c, nv04_graph_mthd_bind_rop }, -- { 0x0190, nv04_graph_mthd_bind_beta1 }, -- { 0x0194, nv04_graph_mthd_bind_beta4 }, -- { 0x0198, nv04_graph_mthd_bind_surf2d }, -- { 0x02fc, nv04_graph_mthd_set_operation }, -- {}, --}; -- --static struct nouveau_pgraph_object_method nv04_graph_mthds_nv01_imageblit[] = { -- { 0x0184, nv04_graph_mthd_bind_chroma }, -- { 0x0188, nv04_graph_mthd_bind_clip }, -- { 0x018c, nv04_graph_mthd_bind_nv01_patt }, -- { 0x0190, nv04_graph_mthd_bind_rop }, -- { 0x0194, nv04_graph_mthd_bind_beta1 }, -- { 0x0198, nv04_graph_mthd_bind_surf_dst }, -- { 0x019c, nv04_graph_mthd_bind_surf_src }, -- { 0x02fc, nv04_graph_mthd_set_operation }, -- {}, --}; -- --static struct nouveau_pgraph_object_method nv04_graph_mthds_nv04_imageblit_ifc[] = { -- { 0x0184, nv04_graph_mthd_bind_chroma }, -- { 0x0188, nv04_graph_mthd_bind_clip }, -- { 0x018c, nv04_graph_mthd_bind_nv04_patt }, -- { 0x0190, nv04_graph_mthd_bind_rop }, -- { 0x0194, nv04_graph_mthd_bind_beta1 }, -- { 0x0198, nv04_graph_mthd_bind_beta4 }, -- { 0x019c, nv04_graph_mthd_bind_surf2d }, -- { 0x02fc, nv04_graph_mthd_set_operation }, -- {}, --}; -- --static struct nouveau_pgraph_object_method nv04_graph_mthds_nv04_iifc[] = { -- { 0x0188, nv04_graph_mthd_bind_chroma }, -- { 0x018c, nv04_graph_mthd_bind_clip }, -- { 0x0190, nv04_graph_mthd_bind_nv04_patt }, -- { 0x0194, nv04_graph_mthd_bind_rop }, -- { 0x0198, nv04_graph_mthd_bind_beta1 }, -- { 0x019c, nv04_graph_mthd_bind_beta4 }, -- { 0x01a0, nv04_graph_mthd_bind_surf2d_swzsurf }, -- { 0x03e4, nv04_graph_mthd_set_operation }, -- {}, --}; -- --static struct nouveau_pgraph_object_method nv04_graph_mthds_nv01_ifc[] = { -- { 0x0184, nv04_graph_mthd_bind_chroma }, -- { 0x0188, nv04_graph_mthd_bind_clip }, -- { 0x018c, nv04_graph_mthd_bind_nv01_patt }, -- { 0x0190, nv04_graph_mthd_bind_rop }, -- { 0x0194, nv04_graph_mthd_bind_beta1 }, -- { 0x0198, nv04_graph_mthd_bind_surf_dst }, -- { 0x02fc, nv04_graph_mthd_set_operation }, -- {}, --}; -- --static struct nouveau_pgraph_object_method nv04_graph_mthds_nv03_sifc[] = { -- { 0x0184, nv04_graph_mthd_bind_chroma }, -- { 0x0188, nv04_graph_mthd_bind_nv01_patt }, -- { 0x018c, nv04_graph_mthd_bind_rop }, -- { 0x0190, nv04_graph_mthd_bind_beta1 }, -- { 0x0194, nv04_graph_mthd_bind_surf_dst }, -- { 0x02fc, nv04_graph_mthd_set_operation }, -- {}, --}; -- --static struct nouveau_pgraph_object_method nv04_graph_mthds_nv04_sifc[] = { -- { 0x0184, nv04_graph_mthd_bind_chroma }, -- { 0x0188, nv04_graph_mthd_bind_nv04_patt }, -- { 0x018c, nv04_graph_mthd_bind_rop }, -- { 0x0190, nv04_graph_mthd_bind_beta1 }, -- { 0x0194, nv04_graph_mthd_bind_beta4 }, -- { 0x0198, nv04_graph_mthd_bind_surf2d }, -- { 0x02fc, nv04_graph_mthd_set_operation }, -- {}, --}; -- --static struct nouveau_pgraph_object_method nv04_graph_mthds_nv03_sifm[] = { -- { 0x0188, nv04_graph_mthd_bind_nv01_patt }, -- { 0x018c, nv04_graph_mthd_bind_rop }, -- { 0x0190, nv04_graph_mthd_bind_beta1 }, -- { 0x0194, nv04_graph_mthd_bind_surf_dst }, -- { 0x0304, nv04_graph_mthd_set_operation }, -- {}, --}; -- --static struct nouveau_pgraph_object_method nv04_graph_mthds_nv04_sifm[] = { -- { 0x0188, nv04_graph_mthd_bind_nv04_patt }, -- { 0x018c, nv04_graph_mthd_bind_rop }, -- { 0x0190, nv04_graph_mthd_bind_beta1 }, -- { 0x0194, nv04_graph_mthd_bind_beta4 }, -- { 0x0198, nv04_graph_mthd_bind_surf2d_swzsurf }, -- { 0x0304, nv04_graph_mthd_set_operation }, -- {}, --}; -+static int -+nv04_graph_register(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; - --static struct nouveau_pgraph_object_method nv04_graph_mthds_nv01_shape[] = { -- { 0x0184, nv04_graph_mthd_bind_clip }, -- { 0x0188, nv04_graph_mthd_bind_nv01_patt }, -- { 0x018c, nv04_graph_mthd_bind_rop }, -- { 0x0190, nv04_graph_mthd_bind_beta1 }, -- { 0x0194, nv04_graph_mthd_bind_surf_dst }, -- { 0x02fc, nv04_graph_mthd_set_operation }, -- {}, --}; -+ if (dev_priv->engine.graph.registered) -+ return 0; - --static struct nouveau_pgraph_object_method nv04_graph_mthds_nv04_shape[] = { -- { 0x0184, nv04_graph_mthd_bind_clip }, -- { 0x0188, nv04_graph_mthd_bind_nv04_patt }, -- { 0x018c, nv04_graph_mthd_bind_rop }, -- { 0x0190, nv04_graph_mthd_bind_beta1 }, -- { 0x0194, nv04_graph_mthd_bind_beta4 }, -- { 0x0198, nv04_graph_mthd_bind_surf2d }, -- { 0x02fc, nv04_graph_mthd_set_operation }, -- {}, --}; -+ /* dvd subpicture */ -+ NVOBJ_CLASS(dev, 0x0038, GR); - --static struct nouveau_pgraph_object_method nv04_graph_mthds_nv03_tex_tri[] = { -- { 0x0188, nv04_graph_mthd_bind_clip }, -- { 0x018c, nv04_graph_mthd_bind_surf_color }, -- { 0x0190, nv04_graph_mthd_bind_surf_zeta }, -- {}, --}; -+ /* m2mf */ -+ NVOBJ_CLASS(dev, 0x0039, GR); - --static struct nouveau_pgraph_object_method nv04_graph_mthds_surf3d[] = { -- { 0x02f8, nv04_graph_mthd_surf3d_clip_h }, -- { 0x02fc, nv04_graph_mthd_surf3d_clip_v }, -- {}, --}; -+ /* nv03 gdirect */ -+ NVOBJ_CLASS(dev, 0x004b, GR); -+ NVOBJ_MTHD (dev, 0x004b, 0x0184, nv04_graph_mthd_bind_nv01_patt); -+ NVOBJ_MTHD (dev, 0x004b, 0x0188, nv04_graph_mthd_bind_rop); -+ NVOBJ_MTHD (dev, 0x004b, 0x018c, nv04_graph_mthd_bind_beta1); -+ NVOBJ_MTHD (dev, 0x004b, 0x0190, nv04_graph_mthd_bind_surf_dst); -+ NVOBJ_MTHD (dev, 0x004b, 0x02fc, nv04_graph_mthd_set_operation); -+ -+ /* nv04 gdirect */ -+ NVOBJ_CLASS(dev, 0x004a, GR); -+ NVOBJ_MTHD (dev, 0x004a, 0x0188, nv04_graph_mthd_bind_nv04_patt); -+ NVOBJ_MTHD (dev, 0x004a, 0x018c, nv04_graph_mthd_bind_rop); -+ NVOBJ_MTHD (dev, 0x004a, 0x0190, nv04_graph_mthd_bind_beta1); -+ NVOBJ_MTHD (dev, 0x004a, 0x0194, nv04_graph_mthd_bind_beta4); -+ NVOBJ_MTHD (dev, 0x004a, 0x0198, nv04_graph_mthd_bind_surf2d); -+ NVOBJ_MTHD (dev, 0x004a, 0x02fc, nv04_graph_mthd_set_operation); -+ -+ /* nv01 imageblit */ -+ NVOBJ_CLASS(dev, 0x001f, GR); -+ NVOBJ_MTHD (dev, 0x001f, 0x0184, nv04_graph_mthd_bind_chroma); -+ NVOBJ_MTHD (dev, 0x001f, 0x0188, nv04_graph_mthd_bind_clip); -+ NVOBJ_MTHD (dev, 0x001f, 0x018c, nv04_graph_mthd_bind_nv01_patt); -+ NVOBJ_MTHD (dev, 0x001f, 0x0190, nv04_graph_mthd_bind_rop); -+ NVOBJ_MTHD (dev, 0x001f, 0x0194, nv04_graph_mthd_bind_beta1); -+ NVOBJ_MTHD (dev, 0x001f, 0x0198, nv04_graph_mthd_bind_surf_dst); -+ NVOBJ_MTHD (dev, 0x001f, 0x019c, nv04_graph_mthd_bind_surf_src); -+ NVOBJ_MTHD (dev, 0x001f, 0x02fc, nv04_graph_mthd_set_operation); -+ -+ /* nv04 imageblit */ -+ NVOBJ_CLASS(dev, 0x005f, GR); -+ NVOBJ_MTHD (dev, 0x005f, 0x0184, nv04_graph_mthd_bind_chroma); -+ NVOBJ_MTHD (dev, 0x005f, 0x0188, nv04_graph_mthd_bind_clip); -+ NVOBJ_MTHD (dev, 0x005f, 0x018c, nv04_graph_mthd_bind_nv04_patt); -+ NVOBJ_MTHD (dev, 0x005f, 0x0190, nv04_graph_mthd_bind_rop); -+ NVOBJ_MTHD (dev, 0x005f, 0x0194, nv04_graph_mthd_bind_beta1); -+ NVOBJ_MTHD (dev, 0x005f, 0x0198, nv04_graph_mthd_bind_beta4); -+ NVOBJ_MTHD (dev, 0x005f, 0x019c, nv04_graph_mthd_bind_surf2d); -+ NVOBJ_MTHD (dev, 0x005f, 0x02fc, nv04_graph_mthd_set_operation); -+ -+ /* nv04 iifc */ -+ NVOBJ_CLASS(dev, 0x0060, GR); -+ NVOBJ_MTHD (dev, 0x0060, 0x0188, nv04_graph_mthd_bind_chroma); -+ NVOBJ_MTHD (dev, 0x0060, 0x018c, nv04_graph_mthd_bind_clip); -+ NVOBJ_MTHD (dev, 0x0060, 0x0190, nv04_graph_mthd_bind_nv04_patt); -+ NVOBJ_MTHD (dev, 0x0060, 0x0194, nv04_graph_mthd_bind_rop); -+ NVOBJ_MTHD (dev, 0x0060, 0x0198, nv04_graph_mthd_bind_beta1); -+ NVOBJ_MTHD (dev, 0x0060, 0x019c, nv04_graph_mthd_bind_beta4); -+ NVOBJ_MTHD (dev, 0x0060, 0x01a0, nv04_graph_mthd_bind_surf2d_swzsurf); -+ NVOBJ_MTHD (dev, 0x0060, 0x03e4, nv04_graph_mthd_set_operation); -+ -+ /* nv05 iifc */ -+ NVOBJ_CLASS(dev, 0x0064, GR); -+ -+ /* nv01 ifc */ -+ NVOBJ_CLASS(dev, 0x0021, GR); -+ NVOBJ_MTHD (dev, 0x0021, 0x0184, nv04_graph_mthd_bind_chroma); -+ NVOBJ_MTHD (dev, 0x0021, 0x0188, nv04_graph_mthd_bind_clip); -+ NVOBJ_MTHD (dev, 0x0021, 0x018c, nv04_graph_mthd_bind_nv01_patt); -+ NVOBJ_MTHD (dev, 0x0021, 0x0190, nv04_graph_mthd_bind_rop); -+ NVOBJ_MTHD (dev, 0x0021, 0x0194, nv04_graph_mthd_bind_beta1); -+ NVOBJ_MTHD (dev, 0x0021, 0x0198, nv04_graph_mthd_bind_surf_dst); -+ NVOBJ_MTHD (dev, 0x0021, 0x02fc, nv04_graph_mthd_set_operation); -+ -+ /* nv04 ifc */ -+ NVOBJ_CLASS(dev, 0x0061, GR); -+ NVOBJ_MTHD (dev, 0x0061, 0x0184, nv04_graph_mthd_bind_chroma); -+ NVOBJ_MTHD (dev, 0x0061, 0x0188, nv04_graph_mthd_bind_clip); -+ NVOBJ_MTHD (dev, 0x0061, 0x018c, nv04_graph_mthd_bind_nv04_patt); -+ NVOBJ_MTHD (dev, 0x0061, 0x0190, nv04_graph_mthd_bind_rop); -+ NVOBJ_MTHD (dev, 0x0061, 0x0194, nv04_graph_mthd_bind_beta1); -+ NVOBJ_MTHD (dev, 0x0061, 0x0198, nv04_graph_mthd_bind_beta4); -+ NVOBJ_MTHD (dev, 0x0061, 0x019c, nv04_graph_mthd_bind_surf2d); -+ NVOBJ_MTHD (dev, 0x0061, 0x02fc, nv04_graph_mthd_set_operation); -+ -+ /* nv05 ifc */ -+ NVOBJ_CLASS(dev, 0x0065, GR); -+ -+ /* nv03 sifc */ -+ NVOBJ_CLASS(dev, 0x0036, GR); -+ NVOBJ_MTHD (dev, 0x0036, 0x0184, nv04_graph_mthd_bind_chroma); -+ NVOBJ_MTHD (dev, 0x0036, 0x0188, nv04_graph_mthd_bind_nv01_patt); -+ NVOBJ_MTHD (dev, 0x0036, 0x018c, nv04_graph_mthd_bind_rop); -+ NVOBJ_MTHD (dev, 0x0036, 0x0190, nv04_graph_mthd_bind_beta1); -+ NVOBJ_MTHD (dev, 0x0036, 0x0194, nv04_graph_mthd_bind_surf_dst); -+ NVOBJ_MTHD (dev, 0x0036, 0x02fc, nv04_graph_mthd_set_operation); -+ -+ /* nv04 sifc */ -+ NVOBJ_CLASS(dev, 0x0076, GR); -+ NVOBJ_MTHD (dev, 0x0076, 0x0184, nv04_graph_mthd_bind_chroma); -+ NVOBJ_MTHD (dev, 0x0076, 0x0188, nv04_graph_mthd_bind_nv04_patt); -+ NVOBJ_MTHD (dev, 0x0076, 0x018c, nv04_graph_mthd_bind_rop); -+ NVOBJ_MTHD (dev, 0x0076, 0x0190, nv04_graph_mthd_bind_beta1); -+ NVOBJ_MTHD (dev, 0x0076, 0x0194, nv04_graph_mthd_bind_beta4); -+ NVOBJ_MTHD (dev, 0x0076, 0x0198, nv04_graph_mthd_bind_surf2d); -+ NVOBJ_MTHD (dev, 0x0076, 0x02fc, nv04_graph_mthd_set_operation); -+ -+ /* nv05 sifc */ -+ NVOBJ_CLASS(dev, 0x0066, GR); -+ -+ /* nv03 sifm */ -+ NVOBJ_CLASS(dev, 0x0037, GR); -+ NVOBJ_MTHD (dev, 0x0037, 0x0188, nv04_graph_mthd_bind_nv01_patt); -+ NVOBJ_MTHD (dev, 0x0037, 0x018c, nv04_graph_mthd_bind_rop); -+ NVOBJ_MTHD (dev, 0x0037, 0x0190, nv04_graph_mthd_bind_beta1); -+ NVOBJ_MTHD (dev, 0x0037, 0x0194, nv04_graph_mthd_bind_surf_dst); -+ NVOBJ_MTHD (dev, 0x0037, 0x0304, nv04_graph_mthd_set_operation); -+ -+ /* nv04 sifm */ -+ NVOBJ_CLASS(dev, 0x0077, GR); -+ NVOBJ_MTHD (dev, 0x0077, 0x0188, nv04_graph_mthd_bind_nv04_patt); -+ NVOBJ_MTHD (dev, 0x0077, 0x018c, nv04_graph_mthd_bind_rop); -+ NVOBJ_MTHD (dev, 0x0077, 0x0190, nv04_graph_mthd_bind_beta1); -+ NVOBJ_MTHD (dev, 0x0077, 0x0194, nv04_graph_mthd_bind_beta4); -+ NVOBJ_MTHD (dev, 0x0077, 0x0198, nv04_graph_mthd_bind_surf2d_swzsurf); -+ NVOBJ_MTHD (dev, 0x0077, 0x0304, nv04_graph_mthd_set_operation); -+ -+ /* null */ -+ NVOBJ_CLASS(dev, 0x0030, GR); -+ -+ /* surf2d */ -+ NVOBJ_CLASS(dev, 0x0042, GR); -+ -+ /* rop */ -+ NVOBJ_CLASS(dev, 0x0043, GR); -+ -+ /* beta1 */ -+ NVOBJ_CLASS(dev, 0x0012, GR); -+ -+ /* beta4 */ -+ NVOBJ_CLASS(dev, 0x0072, GR); -+ -+ /* cliprect */ -+ NVOBJ_CLASS(dev, 0x0019, GR); -+ -+ /* nv01 pattern */ -+ NVOBJ_CLASS(dev, 0x0018, GR); -+ -+ /* nv04 pattern */ -+ NVOBJ_CLASS(dev, 0x0044, GR); -+ -+ /* swzsurf */ -+ NVOBJ_CLASS(dev, 0x0052, GR); -+ -+ /* surf3d */ -+ NVOBJ_CLASS(dev, 0x0053, GR); -+ NVOBJ_MTHD (dev, 0x0053, 0x02f8, nv04_graph_mthd_surf3d_clip_h); -+ NVOBJ_MTHD (dev, 0x0053, 0x02fc, nv04_graph_mthd_surf3d_clip_v); -+ -+ /* nv03 tex_tri */ -+ NVOBJ_CLASS(dev, 0x0048, GR); -+ NVOBJ_MTHD (dev, 0x0048, 0x0188, nv04_graph_mthd_bind_clip); -+ NVOBJ_MTHD (dev, 0x0048, 0x018c, nv04_graph_mthd_bind_surf_color); -+ NVOBJ_MTHD (dev, 0x0048, 0x0190, nv04_graph_mthd_bind_surf_zeta); -+ -+ /* tex_tri */ -+ NVOBJ_CLASS(dev, 0x0054, GR); -+ -+ /* multitex_tri */ -+ NVOBJ_CLASS(dev, 0x0055, GR); -+ -+ /* nv01 chroma */ -+ NVOBJ_CLASS(dev, 0x0017, GR); -+ -+ /* nv04 chroma */ -+ NVOBJ_CLASS(dev, 0x0057, GR); -+ -+ /* surf_dst */ -+ NVOBJ_CLASS(dev, 0x0058, GR); -+ -+ /* surf_src */ -+ NVOBJ_CLASS(dev, 0x0059, GR); -+ -+ /* surf_color */ -+ NVOBJ_CLASS(dev, 0x005a, GR); -+ -+ /* surf_zeta */ -+ NVOBJ_CLASS(dev, 0x005b, GR); -+ -+ /* nv01 line */ -+ NVOBJ_CLASS(dev, 0x001c, GR); -+ NVOBJ_MTHD (dev, 0x001c, 0x0184, nv04_graph_mthd_bind_clip); -+ NVOBJ_MTHD (dev, 0x001c, 0x0188, nv04_graph_mthd_bind_nv01_patt); -+ NVOBJ_MTHD (dev, 0x001c, 0x018c, nv04_graph_mthd_bind_rop); -+ NVOBJ_MTHD (dev, 0x001c, 0x0190, nv04_graph_mthd_bind_beta1); -+ NVOBJ_MTHD (dev, 0x001c, 0x0194, nv04_graph_mthd_bind_surf_dst); -+ NVOBJ_MTHD (dev, 0x001c, 0x02fc, nv04_graph_mthd_set_operation); -+ -+ /* nv04 line */ -+ NVOBJ_CLASS(dev, 0x005c, GR); -+ NVOBJ_MTHD (dev, 0x005c, 0x0184, nv04_graph_mthd_bind_clip); -+ NVOBJ_MTHD (dev, 0x005c, 0x0188, nv04_graph_mthd_bind_nv04_patt); -+ NVOBJ_MTHD (dev, 0x005c, 0x018c, nv04_graph_mthd_bind_rop); -+ NVOBJ_MTHD (dev, 0x005c, 0x0190, nv04_graph_mthd_bind_beta1); -+ NVOBJ_MTHD (dev, 0x005c, 0x0194, nv04_graph_mthd_bind_beta4); -+ NVOBJ_MTHD (dev, 0x005c, 0x0198, nv04_graph_mthd_bind_surf2d); -+ NVOBJ_MTHD (dev, 0x005c, 0x02fc, nv04_graph_mthd_set_operation); -+ -+ /* nv01 tri */ -+ NVOBJ_CLASS(dev, 0x001d, GR); -+ NVOBJ_MTHD (dev, 0x001d, 0x0184, nv04_graph_mthd_bind_clip); -+ NVOBJ_MTHD (dev, 0x001d, 0x0188, nv04_graph_mthd_bind_nv01_patt); -+ NVOBJ_MTHD (dev, 0x001d, 0x018c, nv04_graph_mthd_bind_rop); -+ NVOBJ_MTHD (dev, 0x001d, 0x0190, nv04_graph_mthd_bind_beta1); -+ NVOBJ_MTHD (dev, 0x001d, 0x0194, nv04_graph_mthd_bind_surf_dst); -+ NVOBJ_MTHD (dev, 0x001d, 0x02fc, nv04_graph_mthd_set_operation); -+ -+ /* nv04 tri */ -+ NVOBJ_CLASS(dev, 0x005d, GR); -+ NVOBJ_MTHD (dev, 0x005d, 0x0184, nv04_graph_mthd_bind_clip); -+ NVOBJ_MTHD (dev, 0x005d, 0x0188, nv04_graph_mthd_bind_nv04_patt); -+ NVOBJ_MTHD (dev, 0x005d, 0x018c, nv04_graph_mthd_bind_rop); -+ NVOBJ_MTHD (dev, 0x005d, 0x0190, nv04_graph_mthd_bind_beta1); -+ NVOBJ_MTHD (dev, 0x005d, 0x0194, nv04_graph_mthd_bind_beta4); -+ NVOBJ_MTHD (dev, 0x005d, 0x0198, nv04_graph_mthd_bind_surf2d); -+ NVOBJ_MTHD (dev, 0x005d, 0x02fc, nv04_graph_mthd_set_operation); -+ -+ /* nv01 rect */ -+ NVOBJ_CLASS(dev, 0x001e, GR); -+ NVOBJ_MTHD (dev, 0x001e, 0x0184, nv04_graph_mthd_bind_clip); -+ NVOBJ_MTHD (dev, 0x001e, 0x0188, nv04_graph_mthd_bind_nv01_patt); -+ NVOBJ_MTHD (dev, 0x001e, 0x018c, nv04_graph_mthd_bind_rop); -+ NVOBJ_MTHD (dev, 0x001e, 0x0190, nv04_graph_mthd_bind_beta1); -+ NVOBJ_MTHD (dev, 0x001e, 0x0194, nv04_graph_mthd_bind_surf_dst); -+ NVOBJ_MTHD (dev, 0x001e, 0x02fc, nv04_graph_mthd_set_operation); -+ -+ /* nv04 rect */ -+ NVOBJ_CLASS(dev, 0x005e, GR); -+ NVOBJ_MTHD (dev, 0x005e, 0x0184, nv04_graph_mthd_bind_clip); -+ NVOBJ_MTHD (dev, 0x005e, 0x0188, nv04_graph_mthd_bind_nv04_patt); -+ NVOBJ_MTHD (dev, 0x005e, 0x018c, nv04_graph_mthd_bind_rop); -+ NVOBJ_MTHD (dev, 0x005e, 0x0190, nv04_graph_mthd_bind_beta1); -+ NVOBJ_MTHD (dev, 0x005e, 0x0194, nv04_graph_mthd_bind_beta4); -+ NVOBJ_MTHD (dev, 0x005e, 0x0198, nv04_graph_mthd_bind_surf2d); -+ NVOBJ_MTHD (dev, 0x005e, 0x02fc, nv04_graph_mthd_set_operation); -+ -+ /* nvsw */ -+ NVOBJ_CLASS(dev, 0x506e, SW); -+ NVOBJ_MTHD (dev, 0x506e, 0x0150, nv04_graph_mthd_set_ref); -+ NVOBJ_MTHD (dev, 0x506e, 0x0500, nv04_graph_mthd_page_flip); - --struct nouveau_pgraph_object_class nv04_graph_grclass[] = { -- { 0x0038, false, NULL }, /* dvd subpicture */ -- { 0x0039, false, NULL }, /* m2mf */ -- { 0x004b, false, nv04_graph_mthds_nv03_gdirect }, /* nv03 gdirect */ -- { 0x004a, false, nv04_graph_mthds_nv04_gdirect }, /* nv04 gdirect */ -- { 0x001f, false, nv04_graph_mthds_nv01_imageblit }, /* nv01 imageblit */ -- { 0x005f, false, nv04_graph_mthds_nv04_imageblit_ifc }, /* nv04 imageblit */ -- { 0x0060, false, nv04_graph_mthds_nv04_iifc }, /* nv04 iifc */ -- { 0x0064, false, NULL }, /* nv05 iifc */ -- { 0x0021, false, nv04_graph_mthds_nv01_ifc }, /* nv01 ifc */ -- { 0x0061, false, nv04_graph_mthds_nv04_imageblit_ifc }, /* nv04 ifc */ -- { 0x0065, false, NULL }, /* nv05 ifc */ -- { 0x0036, false, nv04_graph_mthds_nv03_sifc }, /* nv03 sifc */ -- { 0x0076, false, nv04_graph_mthds_nv04_sifc }, /* nv04 sifc */ -- { 0x0066, false, NULL }, /* nv05 sifc */ -- { 0x0037, false, nv04_graph_mthds_nv03_sifm }, /* nv03 sifm */ -- { 0x0077, false, nv04_graph_mthds_nv04_sifm }, /* nv04 sifm */ -- { 0x0030, false, NULL }, /* null */ -- { 0x0042, false, NULL }, /* surf2d */ -- { 0x0043, false, NULL }, /* rop */ -- { 0x0012, false, NULL }, /* beta1 */ -- { 0x0072, false, NULL }, /* beta4 */ -- { 0x0019, false, NULL }, /* cliprect */ -- { 0x0018, false, NULL }, /* nv01 pattern */ -- { 0x0044, false, NULL }, /* nv04 pattern */ -- { 0x0052, false, NULL }, /* swzsurf */ -- { 0x0053, false, nv04_graph_mthds_surf3d }, /* surf3d */ -- { 0x0048, false, nv04_graph_mthds_nv03_tex_tri }, /* nv03 tex_tri */ -- { 0x0054, false, NULL }, /* tex_tri */ -- { 0x0055, false, NULL }, /* multitex_tri */ -- { 0x0017, false, NULL }, /* nv01 chroma */ -- { 0x0057, false, NULL }, /* nv04 chroma */ -- { 0x0058, false, NULL }, /* surf_dst */ -- { 0x0059, false, NULL }, /* surf_src */ -- { 0x005a, false, NULL }, /* surf_color */ -- { 0x005b, false, NULL }, /* surf_zeta */ -- { 0x001c, false, nv04_graph_mthds_nv01_shape }, /* nv01 line */ -- { 0x005c, false, nv04_graph_mthds_nv04_shape }, /* nv04 line */ -- { 0x001d, false, nv04_graph_mthds_nv01_shape }, /* nv01 tri */ -- { 0x005d, false, nv04_graph_mthds_nv04_shape }, /* nv04 tri */ -- { 0x001e, false, nv04_graph_mthds_nv01_shape }, /* nv01 rect */ -- { 0x005e, false, nv04_graph_mthds_nv04_shape }, /* nv04 rect */ -- { 0x506e, true, nv04_graph_mthds_sw }, -- {} -+ dev_priv->engine.graph.registered = true; -+ return 0; - }; -- -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_instmem.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_instmem.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv04_instmem.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_instmem.c 2010-10-30 22:24:25.000000000 +0200 -@@ -1,6 +1,7 @@ - #include "drmP.h" - #include "drm.h" - #include "nouveau_drv.h" -+#include "nouveau_ramht.h" - - /* returns the size of fifo context */ - static int -@@ -17,102 +18,51 @@ - return 32; - } - --static void --nv04_instmem_determine_amount(struct drm_device *dev) -+int nv04_instmem_init(struct drm_device *dev) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; -- int i; -+ struct nouveau_gpuobj *ramht = NULL; -+ u32 offset, length; -+ int ret; - -- /* Figure out how much instance memory we need */ -- if (dev_priv->card_type >= NV_40) { -- /* We'll want more instance memory than this on some NV4x cards. -- * There's a 16MB aperture to play with that maps onto the end -- * of vram. For now, only reserve a small piece until we know -- * more about what each chipset requires. -- */ -- switch (dev_priv->chipset) { -- case 0x40: -- case 0x47: -- case 0x49: -- case 0x4b: -- dev_priv->ramin_rsvd_vram = (2 * 1024 * 1024); -- break; -- default: -- dev_priv->ramin_rsvd_vram = (1 * 1024 * 1024); -- break; -- } -- } else { -- /*XXX: what *are* the limits on ramin_rsvd_vram = (512 * 1024); -- } -- NV_DEBUG(dev, "RAMIN size: %dKiB\n", dev_priv->ramin_rsvd_vram >> 10); -+ /* RAMIN always available */ -+ dev_priv->ramin_available = true; - -- /* Clear all of it, except the BIOS image that's in the first 64KiB */ -- for (i = 64 * 1024; i < dev_priv->ramin_rsvd_vram; i += 4) -- nv_wi32(dev, i, 0x00000000); --} -+ /* Setup shared RAMHT */ -+ ret = nouveau_gpuobj_new_fake(dev, 0x10000, ~0, 4096, -+ NVOBJ_FLAG_ZERO_ALLOC, &ramht); -+ if (ret) -+ return ret; - --static void --nv04_instmem_configure_fixed_tables(struct drm_device *dev) --{ -- struct drm_nouveau_private *dev_priv = dev->dev_private; -- struct nouveau_engine *engine = &dev_priv->engine; -+ ret = nouveau_ramht_new(dev, ramht, &dev_priv->ramht); -+ nouveau_gpuobj_ref(NULL, &ramht); -+ if (ret) -+ return ret; - -- /* FIFO hash table (RAMHT) -- * use 4k hash table at RAMIN+0x10000 -- * TODO: extend the hash table -- */ -- dev_priv->ramht_offset = 0x10000; -- dev_priv->ramht_bits = 9; -- dev_priv->ramht_size = (1 << dev_priv->ramht_bits); /* nr entries */ -- dev_priv->ramht_size *= 8; /* 2 32-bit values per entry in RAMHT */ -- NV_DEBUG(dev, "RAMHT offset=0x%x, size=%d\n", dev_priv->ramht_offset, -- dev_priv->ramht_size); -- -- /* FIFO runout table (RAMRO) - 512k at 0x11200 */ -- dev_priv->ramro_offset = 0x11200; -- dev_priv->ramro_size = 512; -- NV_DEBUG(dev, "RAMRO offset=0x%x, size=%d\n", dev_priv->ramro_offset, -- dev_priv->ramro_size); -- -- /* FIFO context table (RAMFC) -- * NV40 : Not sure exactly how to position RAMFC on some cards, -- * 0x30002 seems to position it at RAMIN+0x20000 on these -- * cards. RAMFC is 4kb (32 fifos, 128byte entries). -- * Others: Position RAMFC at RAMIN+0x11400 -- */ -- dev_priv->ramfc_size = engine->fifo.channels * -- nouveau_fifo_ctx_size(dev); -+ /* And RAMRO */ -+ ret = nouveau_gpuobj_new_fake(dev, 0x11200, ~0, 512, -+ NVOBJ_FLAG_ZERO_ALLOC, &dev_priv->ramro); -+ if (ret) -+ return ret; -+ -+ /* And RAMFC */ -+ length = dev_priv->engine.fifo.channels * nouveau_fifo_ctx_size(dev); - switch (dev_priv->card_type) { - case NV_40: -- dev_priv->ramfc_offset = 0x20000; -+ offset = 0x20000; - break; -- case NV_30: -- case NV_20: -- case NV_10: -- case NV_04: - default: -- dev_priv->ramfc_offset = 0x11400; -+ offset = 0x11400; - break; - } -- NV_DEBUG(dev, "RAMFC offset=0x%x, size=%d\n", dev_priv->ramfc_offset, -- dev_priv->ramfc_size); --} - --int nv04_instmem_init(struct drm_device *dev) --{ -- struct drm_nouveau_private *dev_priv = dev->dev_private; -- uint32_t offset; -- int ret; -- -- nv04_instmem_determine_amount(dev); -- nv04_instmem_configure_fixed_tables(dev); -+ ret = nouveau_gpuobj_new_fake(dev, offset, ~0, length, -+ NVOBJ_FLAG_ZERO_ALLOC, &dev_priv->ramfc); -+ if (ret) -+ return ret; - -- /* Create a heap to manage RAMIN allocations, we don't allocate -- * the space that was reserved for RAMHT/FC/RO. -- */ -- offset = dev_priv->ramfc_offset + dev_priv->ramfc_size; -+ /* Only allow space after RAMFC to be used for object allocation */ -+ offset += length; - - /* It appears RAMRO (or something?) is controlled by 0x2220/0x2230 - * on certain NV4x chipsets as well as RAMFC. When 0x2230 == 0 -@@ -140,46 +90,34 @@ - void - nv04_instmem_takedown(struct drm_device *dev) - { -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ -+ nouveau_ramht_ref(NULL, &dev_priv->ramht, NULL); -+ nouveau_gpuobj_ref(NULL, &dev_priv->ramro); -+ nouveau_gpuobj_ref(NULL, &dev_priv->ramfc); - } - - int --nv04_instmem_populate(struct drm_device *dev, struct nouveau_gpuobj *gpuobj, uint32_t *sz) -+nv04_instmem_populate(struct drm_device *dev, struct nouveau_gpuobj *gpuobj, -+ u32 *size, u32 align) - { -- if (gpuobj->im_backing) -- return -EINVAL; -- - return 0; - } - - void - nv04_instmem_clear(struct drm_device *dev, struct nouveau_gpuobj *gpuobj) - { -- struct drm_nouveau_private *dev_priv = dev->dev_private; -- -- if (gpuobj && gpuobj->im_backing) { -- if (gpuobj->im_bound) -- dev_priv->engine.instmem.unbind(dev, gpuobj); -- gpuobj->im_backing = NULL; -- } - } - - int - nv04_instmem_bind(struct drm_device *dev, struct nouveau_gpuobj *gpuobj) - { -- if (!gpuobj->im_pramin || gpuobj->im_bound) -- return -EINVAL; -- -- gpuobj->im_bound = 1; - return 0; - } - - int - nv04_instmem_unbind(struct drm_device *dev, struct nouveau_gpuobj *gpuobj) - { -- if (gpuobj->im_bound == 0) -- return -EINVAL; -- -- gpuobj->im_bound = 0; - return 0; - } - -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_pm.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_pm.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv04_pm.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_pm.c 2010-10-30 22:24:25.000000000 +0200 -@@ -0,0 +1,90 @@ -+/* -+ * Copyright 2010 Red Hat Inc. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be included in -+ * all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR -+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ * -+ * Authors: Ben Skeggs -+ */ -+ -+#include "drmP.h" -+#include "nouveau_drv.h" -+#include "nouveau_hw.h" -+#include "nouveau_pm.h" -+ -+struct nv04_pm_state { -+ struct pll_lims pll; -+ struct nouveau_pll_vals calc; -+}; -+ -+int -+nv04_pm_clock_get(struct drm_device *dev, u32 id) -+{ -+ return nouveau_hw_get_clock(dev, id); -+} -+ -+void * -+nv04_pm_clock_pre(struct drm_device *dev, struct nouveau_pm_level *perflvl, -+ u32 id, int khz) -+{ -+ struct nv04_pm_state *state; -+ int ret; -+ -+ state = kzalloc(sizeof(*state), GFP_KERNEL); -+ if (!state) -+ return ERR_PTR(-ENOMEM); -+ -+ ret = get_pll_limits(dev, id, &state->pll); -+ if (ret) { -+ kfree(state); -+ return (ret == -ENOENT) ? NULL : ERR_PTR(ret); -+ } -+ -+ ret = nouveau_calc_pll_mnp(dev, &state->pll, khz, &state->calc); -+ if (!ret) { -+ kfree(state); -+ return ERR_PTR(-EINVAL); -+ } -+ -+ return state; -+} -+ -+void -+nv04_pm_clock_set(struct drm_device *dev, void *pre_state) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nv04_pm_state *state = pre_state; -+ u32 reg = state->pll.reg; -+ -+ /* thank the insane nouveau_hw_setpll() interface for this */ -+ if (dev_priv->card_type >= NV_40) -+ reg += 4; -+ -+ nouveau_hw_setpll(dev, reg, &state->calc); -+ -+ if (dev_priv->card_type < NV_30 && reg == NV_PRAMDAC_MPLL_COEFF) { -+ if (dev_priv->card_type == NV_20) -+ nv_mask(dev, 0x1002c4, 0, 1 << 20); -+ -+ /* Reset the DLLs */ -+ nv_mask(dev, 0x1002c0, 0, 1 << 8); -+ } -+ -+ kfree(state); -+} -+ -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv04_tv.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_tv.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv04_tv.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv04_tv.c 2010-10-30 22:24:25.000000000 +0200 -@@ -49,8 +49,8 @@ - - int nv04_tv_identify(struct drm_device *dev, int i2c_index) - { -- return nouveau_i2c_identify(dev, "TV encoder", -- nv04_tv_encoder_info, i2c_index); -+ return nouveau_i2c_identify(dev, "TV encoder", nv04_tv_encoder_info, -+ NULL, i2c_index); - } - - -@@ -99,12 +99,10 @@ - - state->tv_setup = 0; - -- if (bind) { -- state->CRTC[NV_CIO_CRE_LCD__INDEX] = 0; -+ if (bind) - state->CRTC[NV_CIO_CRE_49] |= 0x10; -- } else { -+ else - state->CRTC[NV_CIO_CRE_49] &= ~0x10; -- } - - NVWriteVgaCrtc(dev, head, NV_CIO_CRE_LCD__INDEX, - state->CRTC[NV_CIO_CRE_LCD__INDEX]); -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv10_fb.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv10_fb.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv10_fb.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv10_fb.c 2010-10-30 22:24:25.000000000 +0200 -@@ -3,23 +3,109 @@ - #include "nouveau_drv.h" - #include "nouveau_drm.h" - -+static struct drm_mm_node * -+nv20_fb_alloc_tag(struct drm_device *dev, uint32_t size) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_fb_engine *pfb = &dev_priv->engine.fb; -+ struct drm_mm_node *mem; -+ int ret; -+ -+ ret = drm_mm_pre_get(&pfb->tag_heap); -+ if (ret) -+ return NULL; -+ -+ spin_lock(&dev_priv->tile.lock); -+ mem = drm_mm_search_free(&pfb->tag_heap, size, 0, 0); -+ if (mem) -+ mem = drm_mm_get_block_atomic(mem, size, 0); -+ spin_unlock(&dev_priv->tile.lock); -+ -+ return mem; -+} -+ -+static void -+nv20_fb_free_tag(struct drm_device *dev, struct drm_mm_node *mem) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ -+ spin_lock(&dev_priv->tile.lock); -+ drm_mm_put_block(mem); -+ spin_unlock(&dev_priv->tile.lock); -+} -+ -+void -+nv10_fb_init_tile_region(struct drm_device *dev, int i, uint32_t addr, -+ uint32_t size, uint32_t pitch, uint32_t flags) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; -+ int bpp = (flags & NOUVEAU_GEM_TILE_32BPP ? 32 : 16); -+ -+ tile->addr = addr; -+ tile->limit = max(1u, addr + size) - 1; -+ tile->pitch = pitch; -+ -+ if (dev_priv->card_type == NV_20) { -+ if (flags & NOUVEAU_GEM_TILE_ZETA) { -+ /* -+ * Allocate some of the on-die tag memory, -+ * used to store Z compression meta-data (most -+ * likely just a bitmap determining if a given -+ * tile is compressed or not). -+ */ -+ tile->tag_mem = nv20_fb_alloc_tag(dev, size / 256); -+ -+ if (tile->tag_mem) { -+ /* Enable Z compression */ -+ if (dev_priv->chipset >= 0x25) -+ tile->zcomp = tile->tag_mem->start | -+ (bpp == 16 ? -+ NV25_PFB_ZCOMP_MODE_16 : -+ NV25_PFB_ZCOMP_MODE_32); -+ else -+ tile->zcomp = tile->tag_mem->start | -+ NV20_PFB_ZCOMP_EN | -+ (bpp == 16 ? 0 : -+ NV20_PFB_ZCOMP_MODE_32); -+ } -+ -+ tile->addr |= 3; -+ } else { -+ tile->addr |= 1; -+ } -+ -+ } else { -+ tile->addr |= 1 << 31; -+ } -+} -+ - void --nv10_fb_set_region_tiling(struct drm_device *dev, int i, uint32_t addr, -- uint32_t size, uint32_t pitch) -+nv10_fb_free_tile_region(struct drm_device *dev, int i) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; -- uint32_t limit = max(1u, addr + size) - 1; -+ struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; - -- if (pitch) { -- if (dev_priv->card_type >= NV_20) -- addr |= 1; -- else -- addr |= 1 << 31; -+ if (tile->tag_mem) { -+ nv20_fb_free_tag(dev, tile->tag_mem); -+ tile->tag_mem = NULL; - } - -- nv_wr32(dev, NV10_PFB_TLIMIT(i), limit); -- nv_wr32(dev, NV10_PFB_TSIZE(i), pitch); -- nv_wr32(dev, NV10_PFB_TILE(i), addr); -+ tile->addr = tile->limit = tile->pitch = tile->zcomp = 0; -+} -+ -+void -+nv10_fb_set_tile_region(struct drm_device *dev, int i) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; -+ -+ nv_wr32(dev, NV10_PFB_TLIMIT(i), tile->limit); -+ nv_wr32(dev, NV10_PFB_TSIZE(i), tile->pitch); -+ nv_wr32(dev, NV10_PFB_TILE(i), tile->addr); -+ -+ if (dev_priv->card_type == NV_20) -+ nv_wr32(dev, NV20_PFB_ZCOMP(i), tile->zcomp); - } - - int -@@ -31,9 +117,14 @@ - - pfb->num_tiles = NV10_PFB_TILE__SIZE; - -+ if (dev_priv->card_type == NV_20) -+ drm_mm_init(&pfb->tag_heap, 0, -+ (dev_priv->chipset >= 0x25 ? -+ 64 * 1024 : 32 * 1024)); -+ - /* Turn all the tiling regions off. */ - for (i = 0; i < pfb->num_tiles; i++) -- pfb->set_region_tiling(dev, i, 0, 0, 0); -+ pfb->set_tile_region(dev, i); - - return 0; - } -@@ -41,4 +132,13 @@ - void - nv10_fb_takedown(struct drm_device *dev) - { -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_fb_engine *pfb = &dev_priv->engine.fb; -+ int i; -+ -+ for (i = 0; i < pfb->num_tiles; i++) -+ pfb->free_tile_region(dev, i); -+ -+ if (dev_priv->card_type == NV_20) -+ drm_mm_takedown(&pfb->tag_heap); - } -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv10_fifo.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv10_fifo.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv10_fifo.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv10_fifo.c 2010-10-30 22:24:25.000000000 +0200 -@@ -27,8 +27,9 @@ - #include "drmP.h" - #include "drm.h" - #include "nouveau_drv.h" -+#include "nouveau_ramht.h" - --#define NV10_RAMFC(c) (dev_priv->ramfc_offset + ((c) * NV10_RAMFC__SIZE)) -+#define NV10_RAMFC(c) (dev_priv->ramfc->pinst + ((c) * NV10_RAMFC__SIZE)) - #define NV10_RAMFC__SIZE ((dev_priv->chipset) >= 0x17 ? 64 : 32) - - int -@@ -48,7 +49,7 @@ - - ret = nouveau_gpuobj_new_fake(dev, NV10_RAMFC(chan->id), ~0, - NV10_RAMFC__SIZE, NVOBJ_FLAG_ZERO_ALLOC | -- NVOBJ_FLAG_ZERO_FREE, NULL, &chan->ramfc); -+ NVOBJ_FLAG_ZERO_FREE, &chan->ramfc); - if (ret) - return ret; - -@@ -57,7 +58,7 @@ - */ - nv_wi32(dev, fc + 0, chan->pushbuf_base); - nv_wi32(dev, fc + 4, chan->pushbuf_base); -- nv_wi32(dev, fc + 12, chan->pushbuf->instance >> 4); -+ nv_wi32(dev, fc + 12, chan->pushbuf->pinst >> 4); - nv_wi32(dev, fc + 20, NV_PFIFO_CACHE1_DMA_FETCH_TRIG_128_BYTES | - NV_PFIFO_CACHE1_DMA_FETCH_SIZE_128_BYTES | - NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_8 | -@@ -72,17 +73,6 @@ - return 0; - } - --void --nv10_fifo_destroy_context(struct nouveau_channel *chan) --{ -- struct drm_device *dev = chan->dev; -- -- nv_wr32(dev, NV04_PFIFO_MODE, -- nv_rd32(dev, NV04_PFIFO_MODE) & ~(1 << chan->id)); -- -- nouveau_gpuobj_ref_del(dev, &chan->ramfc); --} -- - static void - nv10_fifo_do_load_context(struct drm_device *dev, int chid) - { -@@ -202,14 +192,14 @@ - struct drm_nouveau_private *dev_priv = dev->dev_private; - - nv_wr32(dev, NV03_PFIFO_RAMHT, (0x03 << 24) /* search 128 */ | -- ((dev_priv->ramht_bits - 9) << 16) | -- (dev_priv->ramht_offset >> 8)); -- nv_wr32(dev, NV03_PFIFO_RAMRO, dev_priv->ramro_offset>>8); -+ ((dev_priv->ramht->bits - 9) << 16) | -+ (dev_priv->ramht->gpuobj->pinst >> 8)); -+ nv_wr32(dev, NV03_PFIFO_RAMRO, dev_priv->ramro->pinst >> 8); - - if (dev_priv->chipset < 0x17) { -- nv_wr32(dev, NV03_PFIFO_RAMFC, dev_priv->ramfc_offset >> 8); -+ nv_wr32(dev, NV03_PFIFO_RAMFC, dev_priv->ramfc->pinst >> 8); - } else { -- nv_wr32(dev, NV03_PFIFO_RAMFC, (dev_priv->ramfc_offset >> 8) | -+ nv_wr32(dev, NV03_PFIFO_RAMFC, (dev_priv->ramfc->pinst >> 8) | - (1 << 16) /* 64 Bytes entry*/); - /* XXX nvidia blob set bit 18, 21,23 for nv20 & nv30 */ - } -@@ -240,7 +230,7 @@ - pfifo->reassign(dev, true); - - for (i = 0; i < dev_priv->engine.fifo.channels; i++) { -- if (dev_priv->fifos[i]) { -+ if (dev_priv->channels.ptr[i]) { - uint32_t mode = nv_rd32(dev, NV04_PFIFO_MODE); - nv_wr32(dev, NV04_PFIFO_MODE, mode | (1 << i)); - } -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv10_graph.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv10_graph.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv10_graph.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv10_graph.c 2010-10-30 22:24:25.000000000 +0200 -@@ -27,6 +27,8 @@ - #include "nouveau_drm.h" - #include "nouveau_drv.h" - -+static int nv10_graph_register(struct drm_device *); -+ - #define NV10_FIFO_NUMBER 32 - - struct pipe_state { -@@ -802,8 +804,8 @@ - - /* Load context for next channel */ - chid = (nv_rd32(dev, NV04_PGRAPH_TRAPPED_ADDR) >> 20) & 0x1f; -- chan = dev_priv->fifos[chid]; -- if (chan) -+ chan = dev_priv->channels.ptr[chid]; -+ if (chan && chan->pgraph_ctx) - nv10_graph_load_context(chan); - - pgraph->fifo_access(dev, true); -@@ -833,7 +835,7 @@ - if (chid >= dev_priv->engine.fifo.channels) - return NULL; - -- return dev_priv->fifos[chid]; -+ return dev_priv->channels.ptr[chid]; - } - - int nv10_graph_create_context(struct nouveau_channel *chan) -@@ -875,37 +877,53 @@ - - void nv10_graph_destroy_context(struct nouveau_channel *chan) - { -+ struct drm_device *dev = chan->dev; -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; - struct graph_state *pgraph_ctx = chan->pgraph_ctx; -+ unsigned long flags; -+ -+ spin_lock_irqsave(&dev_priv->context_switch_lock, flags); -+ pgraph->fifo_access(dev, false); -+ -+ /* Unload the context if it's the currently active one */ -+ if (pgraph->channel(dev) == chan) -+ pgraph->unload_context(dev); - -+ /* Free the context resources */ - kfree(pgraph_ctx); - chan->pgraph_ctx = NULL; -+ -+ pgraph->fifo_access(dev, true); -+ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); - } - - void --nv10_graph_set_region_tiling(struct drm_device *dev, int i, uint32_t addr, -- uint32_t size, uint32_t pitch) -+nv10_graph_set_tile_region(struct drm_device *dev, int i) - { -- uint32_t limit = max(1u, addr + size) - 1; -- -- if (pitch) -- addr |= 1 << 31; -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; - -- nv_wr32(dev, NV10_PGRAPH_TLIMIT(i), limit); -- nv_wr32(dev, NV10_PGRAPH_TSIZE(i), pitch); -- nv_wr32(dev, NV10_PGRAPH_TILE(i), addr); -+ nv_wr32(dev, NV10_PGRAPH_TLIMIT(i), tile->limit); -+ nv_wr32(dev, NV10_PGRAPH_TSIZE(i), tile->pitch); -+ nv_wr32(dev, NV10_PGRAPH_TILE(i), tile->addr); - } - - int nv10_graph_init(struct drm_device *dev) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; - uint32_t tmp; -- int i; -+ int ret, i; - - nv_wr32(dev, NV03_PMC_ENABLE, nv_rd32(dev, NV03_PMC_ENABLE) & - ~NV_PMC_ENABLE_PGRAPH); - nv_wr32(dev, NV03_PMC_ENABLE, nv_rd32(dev, NV03_PMC_ENABLE) | - NV_PMC_ENABLE_PGRAPH); - -+ ret = nv10_graph_register(dev); -+ if (ret) -+ return ret; -+ - nv_wr32(dev, NV03_PGRAPH_INTR , 0xFFFFFFFF); - nv_wr32(dev, NV03_PGRAPH_INTR_EN, 0xFFFFFFFF); - -@@ -928,7 +946,7 @@ - - /* Turn all the tiling regions off. */ - for (i = 0; i < NV10_PFB_TILE__SIZE; i++) -- nv10_graph_set_region_tiling(dev, i, 0, 0, 0); -+ nv10_graph_set_tile_region(dev, i); - - nv_wr32(dev, NV10_PGRAPH_CTX_SWITCH(0), 0x00000000); - nv_wr32(dev, NV10_PGRAPH_CTX_SWITCH(1), 0x00000000); -@@ -951,8 +969,8 @@ - } - - static int --nv17_graph_mthd_lma_window(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv17_graph_mthd_lma_window(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { - struct drm_device *dev = chan->dev; - struct graph_state *ctx = chan->pgraph_ctx; -@@ -1031,8 +1049,8 @@ - } - - static int --nv17_graph_mthd_lma_enable(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv17_graph_mthd_lma_enable(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { - struct drm_device *dev = chan->dev; - struct drm_nouveau_private *dev_priv = dev->dev_private; -@@ -1050,35 +1068,52 @@ - return 0; - } - --static struct nouveau_pgraph_object_method nv17_graph_celsius_mthds[] = { -- { 0x1638, nv17_graph_mthd_lma_window }, -- { 0x163c, nv17_graph_mthd_lma_window }, -- { 0x1640, nv17_graph_mthd_lma_window }, -- { 0x1644, nv17_graph_mthd_lma_window }, -- { 0x1658, nv17_graph_mthd_lma_enable }, -- {} --}; -+static int -+nv10_graph_register(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; - --struct nouveau_pgraph_object_class nv10_graph_grclass[] = { -- { 0x0030, false, NULL }, /* null */ -- { 0x0039, false, NULL }, /* m2mf */ -- { 0x004a, false, NULL }, /* gdirect */ -- { 0x005f, false, NULL }, /* imageblit */ -- { 0x009f, false, NULL }, /* imageblit (nv12) */ -- { 0x008a, false, NULL }, /* ifc */ -- { 0x0089, false, NULL }, /* sifm */ -- { 0x0062, false, NULL }, /* surf2d */ -- { 0x0043, false, NULL }, /* rop */ -- { 0x0012, false, NULL }, /* beta1 */ -- { 0x0072, false, NULL }, /* beta4 */ -- { 0x0019, false, NULL }, /* cliprect */ -- { 0x0044, false, NULL }, /* pattern */ -- { 0x0052, false, NULL }, /* swzsurf */ -- { 0x0093, false, NULL }, /* surf3d */ -- { 0x0094, false, NULL }, /* tex_tri */ -- { 0x0095, false, NULL }, /* multitex_tri */ -- { 0x0056, false, NULL }, /* celcius (nv10) */ -- { 0x0096, false, NULL }, /* celcius (nv11) */ -- { 0x0099, false, nv17_graph_celsius_mthds }, /* celcius (nv17) */ -- {} --}; -+ if (dev_priv->engine.graph.registered) -+ return 0; -+ -+ NVOBJ_CLASS(dev, 0x506e, SW); /* nvsw */ -+ NVOBJ_CLASS(dev, 0x0030, GR); /* null */ -+ NVOBJ_CLASS(dev, 0x0039, GR); /* m2mf */ -+ NVOBJ_CLASS(dev, 0x004a, GR); /* gdirect */ -+ NVOBJ_CLASS(dev, 0x005f, GR); /* imageblit */ -+ NVOBJ_CLASS(dev, 0x009f, GR); /* imageblit (nv12) */ -+ NVOBJ_CLASS(dev, 0x008a, GR); /* ifc */ -+ NVOBJ_CLASS(dev, 0x0089, GR); /* sifm */ -+ NVOBJ_CLASS(dev, 0x0062, GR); /* surf2d */ -+ NVOBJ_CLASS(dev, 0x0043, GR); /* rop */ -+ NVOBJ_CLASS(dev, 0x0012, GR); /* beta1 */ -+ NVOBJ_CLASS(dev, 0x0072, GR); /* beta4 */ -+ NVOBJ_CLASS(dev, 0x0019, GR); /* cliprect */ -+ NVOBJ_CLASS(dev, 0x0044, GR); /* pattern */ -+ NVOBJ_CLASS(dev, 0x0052, GR); /* swzsurf */ -+ NVOBJ_CLASS(dev, 0x0093, GR); /* surf3d */ -+ NVOBJ_CLASS(dev, 0x0094, GR); /* tex_tri */ -+ NVOBJ_CLASS(dev, 0x0095, GR); /* multitex_tri */ -+ -+ /* celcius */ -+ if (dev_priv->chipset <= 0x10) { -+ NVOBJ_CLASS(dev, 0x0056, GR); -+ } else -+ if (dev_priv->chipset < 0x17 || dev_priv->chipset == 0x1a) { -+ NVOBJ_CLASS(dev, 0x0096, GR); -+ } else { -+ NVOBJ_CLASS(dev, 0x0099, GR); -+ NVOBJ_MTHD (dev, 0x0099, 0x1638, nv17_graph_mthd_lma_window); -+ NVOBJ_MTHD (dev, 0x0099, 0x163c, nv17_graph_mthd_lma_window); -+ NVOBJ_MTHD (dev, 0x0099, 0x1640, nv17_graph_mthd_lma_window); -+ NVOBJ_MTHD (dev, 0x0099, 0x1644, nv17_graph_mthd_lma_window); -+ NVOBJ_MTHD (dev, 0x0099, 0x1658, nv17_graph_mthd_lma_enable); -+ } -+ -+ /* nvsw */ -+ NVOBJ_CLASS(dev, 0x506e, SW); -+ NVOBJ_MTHD (dev, 0x506e, 0x0500, nv04_graph_mthd_page_flip); -+ -+ dev_priv->engine.graph.registered = true; -+ return 0; -+} -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv17_tv.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv17_tv.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv17_tv.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv17_tv.c 2010-10-30 22:24:25.000000000 +0200 -@@ -193,55 +193,56 @@ - } - } - --static const struct { -- int hdisplay; -- int vdisplay; --} modes[] = { -- { 640, 400 }, -- { 640, 480 }, -- { 720, 480 }, -- { 720, 576 }, -- { 800, 600 }, -- { 1024, 768 }, -- { 1280, 720 }, -- { 1280, 1024 }, -- { 1920, 1080 } --}; -- --static int nv17_tv_get_modes(struct drm_encoder *encoder, -- struct drm_connector *connector) -+static int nv17_tv_get_ld_modes(struct drm_encoder *encoder, -+ struct drm_connector *connector) - { - struct nv17_tv_norm_params *tv_norm = get_tv_norm(encoder); -- struct drm_display_mode *mode; -- struct drm_display_mode *output_mode; -+ struct drm_display_mode *mode, *tv_mode; - int n = 0; -- int i; -- -- if (tv_norm->kind != CTV_ENC_MODE) { -- struct drm_display_mode *tv_mode; - -- for (tv_mode = nv17_tv_modes; tv_mode->hdisplay; tv_mode++) { -- mode = drm_mode_duplicate(encoder->dev, tv_mode); -+ for (tv_mode = nv17_tv_modes; tv_mode->hdisplay; tv_mode++) { -+ mode = drm_mode_duplicate(encoder->dev, tv_mode); - -- mode->clock = tv_norm->tv_enc_mode.vrefresh * -- mode->htotal / 1000 * -- mode->vtotal / 1000; -+ mode->clock = tv_norm->tv_enc_mode.vrefresh * -+ mode->htotal / 1000 * -+ mode->vtotal / 1000; - -- if (mode->flags & DRM_MODE_FLAG_DBLSCAN) -- mode->clock *= 2; -+ if (mode->flags & DRM_MODE_FLAG_DBLSCAN) -+ mode->clock *= 2; - -- if (mode->hdisplay == tv_norm->tv_enc_mode.hdisplay && -- mode->vdisplay == tv_norm->tv_enc_mode.vdisplay) -- mode->type |= DRM_MODE_TYPE_PREFERRED; -+ if (mode->hdisplay == tv_norm->tv_enc_mode.hdisplay && -+ mode->vdisplay == tv_norm->tv_enc_mode.vdisplay) -+ mode->type |= DRM_MODE_TYPE_PREFERRED; - -- drm_mode_probed_add(connector, mode); -- n++; -- } -- return n; -+ drm_mode_probed_add(connector, mode); -+ n++; - } - -- /* tv_norm->kind == CTV_ENC_MODE */ -- output_mode = &tv_norm->ctv_enc_mode.mode; -+ return n; -+} -+ -+static int nv17_tv_get_hd_modes(struct drm_encoder *encoder, -+ struct drm_connector *connector) -+{ -+ struct nv17_tv_norm_params *tv_norm = get_tv_norm(encoder); -+ struct drm_display_mode *output_mode = &tv_norm->ctv_enc_mode.mode; -+ struct drm_display_mode *mode; -+ const struct { -+ int hdisplay; -+ int vdisplay; -+ } modes[] = { -+ { 640, 400 }, -+ { 640, 480 }, -+ { 720, 480 }, -+ { 720, 576 }, -+ { 800, 600 }, -+ { 1024, 768 }, -+ { 1280, 720 }, -+ { 1280, 1024 }, -+ { 1920, 1080 } -+ }; -+ int i, n = 0; -+ - for (i = 0; i < ARRAY_SIZE(modes); i++) { - if (modes[i].hdisplay > output_mode->hdisplay || - modes[i].vdisplay > output_mode->vdisplay) -@@ -251,11 +252,12 @@ - modes[i].vdisplay == output_mode->vdisplay) { - mode = drm_mode_duplicate(encoder->dev, output_mode); - mode->type |= DRM_MODE_TYPE_PREFERRED; -+ - } else { - mode = drm_cvt_mode(encoder->dev, modes[i].hdisplay, -- modes[i].vdisplay, 60, false, -- output_mode->flags & DRM_MODE_FLAG_INTERLACE, -- false); -+ modes[i].vdisplay, 60, false, -+ (output_mode->flags & -+ DRM_MODE_FLAG_INTERLACE), false); - } - - /* CVT modes are sometimes unsuitable... */ -@@ -266,6 +268,7 @@ - - mode->hdisplay) * 9 / 10) & ~7; - mode->hsync_end = mode->hsync_start + 8; - } -+ - if (output_mode->vdisplay >= 1024) { - mode->vtotal = output_mode->vtotal; - mode->vsync_start = output_mode->vsync_start; -@@ -276,9 +279,21 @@ - drm_mode_probed_add(connector, mode); - n++; - } -+ - return n; - } - -+static int nv17_tv_get_modes(struct drm_encoder *encoder, -+ struct drm_connector *connector) -+{ -+ struct nv17_tv_norm_params *tv_norm = get_tv_norm(encoder); -+ -+ if (tv_norm->kind == CTV_ENC_MODE) -+ return nv17_tv_get_hd_modes(encoder, connector); -+ else -+ return nv17_tv_get_ld_modes(encoder, connector); -+} -+ - static int nv17_tv_mode_valid(struct drm_encoder *encoder, - struct drm_display_mode *mode) - { -@@ -408,15 +423,8 @@ - - } - -- /* Some NV4x have unknown values (0x3f, 0x50, 0x54, 0x6b, 0x79, 0x7f) -- * at LCD__INDEX which we don't alter -- */ -- if (!(*cr_lcd & 0x44)) { -- if (tv_norm->kind == CTV_ENC_MODE) -- *cr_lcd = 0x1 | (head ? 0x0 : 0x8); -- else -- *cr_lcd = 0; -- } -+ if (tv_norm->kind == CTV_ENC_MODE) -+ *cr_lcd |= 0x1 | (head ? 0x0 : 0x8); - - /* Set the DACCLK register */ - dacclk = (NVReadRAMDAC(dev, 0, dacclk_off) & ~0x30) | 0x1; -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv17_tv.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv17_tv.h ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv17_tv.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv17_tv.h 2010-10-30 22:24:25.000000000 +0200 -@@ -127,7 +127,8 @@ - - /* TV hardware access functions */ - --static inline void nv_write_ptv(struct drm_device *dev, uint32_t reg, uint32_t val) -+static inline void nv_write_ptv(struct drm_device *dev, uint32_t reg, -+ uint32_t val) - { - nv_wr32(dev, reg, val); - } -@@ -137,7 +138,8 @@ - return nv_rd32(dev, reg); - } - --static inline void nv_write_tv_enc(struct drm_device *dev, uint8_t reg, uint8_t val) -+static inline void nv_write_tv_enc(struct drm_device *dev, uint8_t reg, -+ uint8_t val) - { - nv_write_ptv(dev, NV_PTV_TV_INDEX, reg); - nv_write_ptv(dev, NV_PTV_TV_DATA, val); -@@ -149,8 +151,11 @@ - return nv_read_ptv(dev, NV_PTV_TV_DATA); - } - --#define nv_load_ptv(dev, state, reg) nv_write_ptv(dev, NV_PTV_OFFSET + 0x##reg, state->ptv_##reg) --#define nv_save_ptv(dev, state, reg) state->ptv_##reg = nv_read_ptv(dev, NV_PTV_OFFSET + 0x##reg) --#define nv_load_tv_enc(dev, state, reg) nv_write_tv_enc(dev, 0x##reg, state->tv_enc[0x##reg]) -+#define nv_load_ptv(dev, state, reg) \ -+ nv_write_ptv(dev, NV_PTV_OFFSET + 0x##reg, state->ptv_##reg) -+#define nv_save_ptv(dev, state, reg) \ -+ state->ptv_##reg = nv_read_ptv(dev, NV_PTV_OFFSET + 0x##reg) -+#define nv_load_tv_enc(dev, state, reg) \ -+ nv_write_tv_enc(dev, 0x##reg, state->tv_enc[0x##reg]) - - #endif -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv17_tv_modes.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv17_tv_modes.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv17_tv_modes.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv17_tv_modes.c 2010-10-30 22:24:25.000000000 +0200 -@@ -336,12 +336,17 @@ - struct filter_params *p = &fparams[k][j]; - - for (i = 0; i < 7; i++) { -- int64_t c = (p->k1 + p->ki*i + p->ki2*i*i + p->ki3*i*i*i) -- + (p->kr + p->kir*i + p->ki2r*i*i + p->ki3r*i*i*i)*rs[k] -- + (p->kf + p->kif*i + p->ki2f*i*i + p->ki3f*i*i*i)*flicker -- + (p->krf + p->kirf*i + p->ki2rf*i*i + p->ki3rf*i*i*i)*flicker*rs[k]; -+ int64_t c = (p->k1 + p->ki*i + p->ki2*i*i + -+ p->ki3*i*i*i) -+ + (p->kr + p->kir*i + p->ki2r*i*i + -+ p->ki3r*i*i*i) * rs[k] -+ + (p->kf + p->kif*i + p->ki2f*i*i + -+ p->ki3f*i*i*i) * flicker -+ + (p->krf + p->kirf*i + p->ki2rf*i*i + -+ p->ki3rf*i*i*i) * flicker * rs[k]; - -- (*filters[k])[j][i] = (c + id5/2) >> 39 & (0x1 << 31 | 0x7f << 9); -+ (*filters[k])[j][i] = (c + id5/2) >> 39 -+ & (0x1 << 31 | 0x7f << 9); - } - } - } -@@ -349,7 +354,8 @@ - - /* Hardware state saving/restoring */ - --static void tv_save_filter(struct drm_device *dev, uint32_t base, uint32_t regs[4][7]) -+static void tv_save_filter(struct drm_device *dev, uint32_t base, -+ uint32_t regs[4][7]) - { - int i, j; - uint32_t offsets[] = { base, base + 0x1c, base + 0x40, base + 0x5c }; -@@ -360,7 +366,8 @@ - } - } - --static void tv_load_filter(struct drm_device *dev, uint32_t base, uint32_t regs[4][7]) -+static void tv_load_filter(struct drm_device *dev, uint32_t base, -+ uint32_t regs[4][7]) - { - int i, j; - uint32_t offsets[] = { base, base + 0x1c, base + 0x40, base + 0x5c }; -@@ -504,10 +511,10 @@ - break; - } - -- regs->tv_enc[0x20] = interpolate(0, tv_norm->tv_enc_mode.tv_enc[0x20], 255, -- tv_enc->saturation); -- regs->tv_enc[0x22] = interpolate(0, tv_norm->tv_enc_mode.tv_enc[0x22], 255, -- tv_enc->saturation); -+ regs->tv_enc[0x20] = interpolate(0, tv_norm->tv_enc_mode.tv_enc[0x20], -+ 255, tv_enc->saturation); -+ regs->tv_enc[0x22] = interpolate(0, tv_norm->tv_enc_mode.tv_enc[0x22], -+ 255, tv_enc->saturation); - regs->tv_enc[0x25] = tv_enc->hue * 255 / 100; - - nv_load_ptv(dev, regs, 204); -@@ -541,7 +548,8 @@ - int head = nouveau_crtc(encoder->crtc)->index; - struct nv04_crtc_reg *regs = &dev_priv->mode_reg.crtc_reg[head]; - struct drm_display_mode *crtc_mode = &encoder->crtc->mode; -- struct drm_display_mode *output_mode = &get_tv_norm(encoder)->ctv_enc_mode.mode; -+ struct drm_display_mode *output_mode = -+ &get_tv_norm(encoder)->ctv_enc_mode.mode; - int overscan, hmargin, vmargin, hratio, vratio; - - /* The rescaler doesn't do the right thing for interlaced modes. */ -@@ -553,13 +561,15 @@ - hmargin = (output_mode->hdisplay - crtc_mode->hdisplay) / 2; - vmargin = (output_mode->vdisplay - crtc_mode->vdisplay) / 2; - -- hmargin = interpolate(0, min(hmargin, output_mode->hdisplay/20), hmargin, -- overscan); -- vmargin = interpolate(0, min(vmargin, output_mode->vdisplay/20), vmargin, -- overscan); -- -- hratio = crtc_mode->hdisplay * 0x800 / (output_mode->hdisplay - 2*hmargin); -- vratio = crtc_mode->vdisplay * 0x800 / (output_mode->vdisplay - 2*vmargin) & ~3; -+ hmargin = interpolate(0, min(hmargin, output_mode->hdisplay/20), -+ hmargin, overscan); -+ vmargin = interpolate(0, min(vmargin, output_mode->vdisplay/20), -+ vmargin, overscan); -+ -+ hratio = crtc_mode->hdisplay * 0x800 / -+ (output_mode->hdisplay - 2*hmargin); -+ vratio = crtc_mode->vdisplay * 0x800 / -+ (output_mode->vdisplay - 2*vmargin) & ~3; - - regs->fp_horiz_regs[FP_VALID_START] = hmargin; - regs->fp_horiz_regs[FP_VALID_END] = output_mode->hdisplay - hmargin - 1; -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv20_graph.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv20_graph.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv20_graph.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv20_graph.c 2010-10-30 22:24:25.000000000 +0200 -@@ -32,54 +32,57 @@ - #define NV34_GRCTX_SIZE (18140) - #define NV35_36_GRCTX_SIZE (22396) - -+static int nv20_graph_register(struct drm_device *); -+static int nv30_graph_register(struct drm_device *); -+ - static void - nv20_graph_context_init(struct drm_device *dev, struct nouveau_gpuobj *ctx) - { - int i; - -- nv_wo32(dev, ctx, 0x033c/4, 0xffff0000); -- nv_wo32(dev, ctx, 0x03a0/4, 0x0fff0000); -- nv_wo32(dev, ctx, 0x03a4/4, 0x0fff0000); -- nv_wo32(dev, ctx, 0x047c/4, 0x00000101); -- nv_wo32(dev, ctx, 0x0490/4, 0x00000111); -- nv_wo32(dev, ctx, 0x04a8/4, 0x44400000); -+ nv_wo32(ctx, 0x033c, 0xffff0000); -+ nv_wo32(ctx, 0x03a0, 0x0fff0000); -+ nv_wo32(ctx, 0x03a4, 0x0fff0000); -+ nv_wo32(ctx, 0x047c, 0x00000101); -+ nv_wo32(ctx, 0x0490, 0x00000111); -+ nv_wo32(ctx, 0x04a8, 0x44400000); - for (i = 0x04d4; i <= 0x04e0; i += 4) -- nv_wo32(dev, ctx, i/4, 0x00030303); -+ nv_wo32(ctx, i, 0x00030303); - for (i = 0x04f4; i <= 0x0500; i += 4) -- nv_wo32(dev, ctx, i/4, 0x00080000); -+ nv_wo32(ctx, i, 0x00080000); - for (i = 0x050c; i <= 0x0518; i += 4) -- nv_wo32(dev, ctx, i/4, 0x01012000); -+ nv_wo32(ctx, i, 0x01012000); - for (i = 0x051c; i <= 0x0528; i += 4) -- nv_wo32(dev, ctx, i/4, 0x000105b8); -+ nv_wo32(ctx, i, 0x000105b8); - for (i = 0x052c; i <= 0x0538; i += 4) -- nv_wo32(dev, ctx, i/4, 0x00080008); -+ nv_wo32(ctx, i, 0x00080008); - for (i = 0x055c; i <= 0x0598; i += 4) -- nv_wo32(dev, ctx, i/4, 0x07ff0000); -- nv_wo32(dev, ctx, 0x05a4/4, 0x4b7fffff); -- nv_wo32(dev, ctx, 0x05fc/4, 0x00000001); -- nv_wo32(dev, ctx, 0x0604/4, 0x00004000); -- nv_wo32(dev, ctx, 0x0610/4, 0x00000001); -- nv_wo32(dev, ctx, 0x0618/4, 0x00040000); -- nv_wo32(dev, ctx, 0x061c/4, 0x00010000); -+ nv_wo32(ctx, i, 0x07ff0000); -+ nv_wo32(ctx, 0x05a4, 0x4b7fffff); -+ nv_wo32(ctx, 0x05fc, 0x00000001); -+ nv_wo32(ctx, 0x0604, 0x00004000); -+ nv_wo32(ctx, 0x0610, 0x00000001); -+ nv_wo32(ctx, 0x0618, 0x00040000); -+ nv_wo32(ctx, 0x061c, 0x00010000); - for (i = 0x1c1c; i <= 0x248c; i += 16) { -- nv_wo32(dev, ctx, (i + 0)/4, 0x10700ff9); -- nv_wo32(dev, ctx, (i + 4)/4, 0x0436086c); -- nv_wo32(dev, ctx, (i + 8)/4, 0x000c001b); -- } -- nv_wo32(dev, ctx, 0x281c/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x2830/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x285c/4, 0x40000000); -- nv_wo32(dev, ctx, 0x2860/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x2864/4, 0x3f000000); -- nv_wo32(dev, ctx, 0x286c/4, 0x40000000); -- nv_wo32(dev, ctx, 0x2870/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x2878/4, 0xbf800000); -- nv_wo32(dev, ctx, 0x2880/4, 0xbf800000); -- nv_wo32(dev, ctx, 0x34a4/4, 0x000fe000); -- nv_wo32(dev, ctx, 0x3530/4, 0x000003f8); -- nv_wo32(dev, ctx, 0x3540/4, 0x002fe000); -+ nv_wo32(ctx, (i + 0), 0x10700ff9); -+ nv_wo32(ctx, (i + 4), 0x0436086c); -+ nv_wo32(ctx, (i + 8), 0x000c001b); -+ } -+ nv_wo32(ctx, 0x281c, 0x3f800000); -+ nv_wo32(ctx, 0x2830, 0x3f800000); -+ nv_wo32(ctx, 0x285c, 0x40000000); -+ nv_wo32(ctx, 0x2860, 0x3f800000); -+ nv_wo32(ctx, 0x2864, 0x3f000000); -+ nv_wo32(ctx, 0x286c, 0x40000000); -+ nv_wo32(ctx, 0x2870, 0x3f800000); -+ nv_wo32(ctx, 0x2878, 0xbf800000); -+ nv_wo32(ctx, 0x2880, 0xbf800000); -+ nv_wo32(ctx, 0x34a4, 0x000fe000); -+ nv_wo32(ctx, 0x3530, 0x000003f8); -+ nv_wo32(ctx, 0x3540, 0x002fe000); - for (i = 0x355c; i <= 0x3578; i += 4) -- nv_wo32(dev, ctx, i/4, 0x001c527c); -+ nv_wo32(ctx, i, 0x001c527c); - } - - static void -@@ -87,58 +90,58 @@ - { - int i; - -- nv_wo32(dev, ctx, 0x035c/4, 0xffff0000); -- nv_wo32(dev, ctx, 0x03c0/4, 0x0fff0000); -- nv_wo32(dev, ctx, 0x03c4/4, 0x0fff0000); -- nv_wo32(dev, ctx, 0x049c/4, 0x00000101); -- nv_wo32(dev, ctx, 0x04b0/4, 0x00000111); -- nv_wo32(dev, ctx, 0x04c8/4, 0x00000080); -- nv_wo32(dev, ctx, 0x04cc/4, 0xffff0000); -- nv_wo32(dev, ctx, 0x04d0/4, 0x00000001); -- nv_wo32(dev, ctx, 0x04e4/4, 0x44400000); -- nv_wo32(dev, ctx, 0x04fc/4, 0x4b800000); -+ nv_wo32(ctx, 0x035c, 0xffff0000); -+ nv_wo32(ctx, 0x03c0, 0x0fff0000); -+ nv_wo32(ctx, 0x03c4, 0x0fff0000); -+ nv_wo32(ctx, 0x049c, 0x00000101); -+ nv_wo32(ctx, 0x04b0, 0x00000111); -+ nv_wo32(ctx, 0x04c8, 0x00000080); -+ nv_wo32(ctx, 0x04cc, 0xffff0000); -+ nv_wo32(ctx, 0x04d0, 0x00000001); -+ nv_wo32(ctx, 0x04e4, 0x44400000); -+ nv_wo32(ctx, 0x04fc, 0x4b800000); - for (i = 0x0510; i <= 0x051c; i += 4) -- nv_wo32(dev, ctx, i/4, 0x00030303); -+ nv_wo32(ctx, i, 0x00030303); - for (i = 0x0530; i <= 0x053c; i += 4) -- nv_wo32(dev, ctx, i/4, 0x00080000); -+ nv_wo32(ctx, i, 0x00080000); - for (i = 0x0548; i <= 0x0554; i += 4) -- nv_wo32(dev, ctx, i/4, 0x01012000); -+ nv_wo32(ctx, i, 0x01012000); - for (i = 0x0558; i <= 0x0564; i += 4) -- nv_wo32(dev, ctx, i/4, 0x000105b8); -+ nv_wo32(ctx, i, 0x000105b8); - for (i = 0x0568; i <= 0x0574; i += 4) -- nv_wo32(dev, ctx, i/4, 0x00080008); -+ nv_wo32(ctx, i, 0x00080008); - for (i = 0x0598; i <= 0x05d4; i += 4) -- nv_wo32(dev, ctx, i/4, 0x07ff0000); -- nv_wo32(dev, ctx, 0x05e0/4, 0x4b7fffff); -- nv_wo32(dev, ctx, 0x0620/4, 0x00000080); -- nv_wo32(dev, ctx, 0x0624/4, 0x30201000); -- nv_wo32(dev, ctx, 0x0628/4, 0x70605040); -- nv_wo32(dev, ctx, 0x062c/4, 0xb0a09080); -- nv_wo32(dev, ctx, 0x0630/4, 0xf0e0d0c0); -- nv_wo32(dev, ctx, 0x0664/4, 0x00000001); -- nv_wo32(dev, ctx, 0x066c/4, 0x00004000); -- nv_wo32(dev, ctx, 0x0678/4, 0x00000001); -- nv_wo32(dev, ctx, 0x0680/4, 0x00040000); -- nv_wo32(dev, ctx, 0x0684/4, 0x00010000); -+ nv_wo32(ctx, i, 0x07ff0000); -+ nv_wo32(ctx, 0x05e0, 0x4b7fffff); -+ nv_wo32(ctx, 0x0620, 0x00000080); -+ nv_wo32(ctx, 0x0624, 0x30201000); -+ nv_wo32(ctx, 0x0628, 0x70605040); -+ nv_wo32(ctx, 0x062c, 0xb0a09080); -+ nv_wo32(ctx, 0x0630, 0xf0e0d0c0); -+ nv_wo32(ctx, 0x0664, 0x00000001); -+ nv_wo32(ctx, 0x066c, 0x00004000); -+ nv_wo32(ctx, 0x0678, 0x00000001); -+ nv_wo32(ctx, 0x0680, 0x00040000); -+ nv_wo32(ctx, 0x0684, 0x00010000); - for (i = 0x1b04; i <= 0x2374; i += 16) { -- nv_wo32(dev, ctx, (i + 0)/4, 0x10700ff9); -- nv_wo32(dev, ctx, (i + 4)/4, 0x0436086c); -- nv_wo32(dev, ctx, (i + 8)/4, 0x000c001b); -- } -- nv_wo32(dev, ctx, 0x2704/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x2718/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x2744/4, 0x40000000); -- nv_wo32(dev, ctx, 0x2748/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x274c/4, 0x3f000000); -- nv_wo32(dev, ctx, 0x2754/4, 0x40000000); -- nv_wo32(dev, ctx, 0x2758/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x2760/4, 0xbf800000); -- nv_wo32(dev, ctx, 0x2768/4, 0xbf800000); -- nv_wo32(dev, ctx, 0x308c/4, 0x000fe000); -- nv_wo32(dev, ctx, 0x3108/4, 0x000003f8); -- nv_wo32(dev, ctx, 0x3468/4, 0x002fe000); -+ nv_wo32(ctx, (i + 0), 0x10700ff9); -+ nv_wo32(ctx, (i + 4), 0x0436086c); -+ nv_wo32(ctx, (i + 8), 0x000c001b); -+ } -+ nv_wo32(ctx, 0x2704, 0x3f800000); -+ nv_wo32(ctx, 0x2718, 0x3f800000); -+ nv_wo32(ctx, 0x2744, 0x40000000); -+ nv_wo32(ctx, 0x2748, 0x3f800000); -+ nv_wo32(ctx, 0x274c, 0x3f000000); -+ nv_wo32(ctx, 0x2754, 0x40000000); -+ nv_wo32(ctx, 0x2758, 0x3f800000); -+ nv_wo32(ctx, 0x2760, 0xbf800000); -+ nv_wo32(ctx, 0x2768, 0xbf800000); -+ nv_wo32(ctx, 0x308c, 0x000fe000); -+ nv_wo32(ctx, 0x3108, 0x000003f8); -+ nv_wo32(ctx, 0x3468, 0x002fe000); - for (i = 0x3484; i <= 0x34a0; i += 4) -- nv_wo32(dev, ctx, i/4, 0x001c527c); -+ nv_wo32(ctx, i, 0x001c527c); - } - - static void -@@ -146,49 +149,49 @@ - { - int i; - -- nv_wo32(dev, ctx, 0x033c/4, 0xffff0000); -- nv_wo32(dev, ctx, 0x03a0/4, 0x0fff0000); -- nv_wo32(dev, ctx, 0x03a4/4, 0x0fff0000); -- nv_wo32(dev, ctx, 0x047c/4, 0x00000101); -- nv_wo32(dev, ctx, 0x0490/4, 0x00000111); -- nv_wo32(dev, ctx, 0x04a8/4, 0x44400000); -+ nv_wo32(ctx, 0x033c, 0xffff0000); -+ nv_wo32(ctx, 0x03a0, 0x0fff0000); -+ nv_wo32(ctx, 0x03a4, 0x0fff0000); -+ nv_wo32(ctx, 0x047c, 0x00000101); -+ nv_wo32(ctx, 0x0490, 0x00000111); -+ nv_wo32(ctx, 0x04a8, 0x44400000); - for (i = 0x04d4; i <= 0x04e0; i += 4) -- nv_wo32(dev, ctx, i/4, 0x00030303); -+ nv_wo32(ctx, i, 0x00030303); - for (i = 0x04f4; i <= 0x0500; i += 4) -- nv_wo32(dev, ctx, i/4, 0x00080000); -+ nv_wo32(ctx, i, 0x00080000); - for (i = 0x050c; i <= 0x0518; i += 4) -- nv_wo32(dev, ctx, i/4, 0x01012000); -+ nv_wo32(ctx, i, 0x01012000); - for (i = 0x051c; i <= 0x0528; i += 4) -- nv_wo32(dev, ctx, i/4, 0x000105b8); -+ nv_wo32(ctx, i, 0x000105b8); - for (i = 0x052c; i <= 0x0538; i += 4) -- nv_wo32(dev, ctx, i/4, 0x00080008); -+ nv_wo32(ctx, i, 0x00080008); - for (i = 0x055c; i <= 0x0598; i += 4) -- nv_wo32(dev, ctx, i/4, 0x07ff0000); -- nv_wo32(dev, ctx, 0x05a4/4, 0x4b7fffff); -- nv_wo32(dev, ctx, 0x05fc/4, 0x00000001); -- nv_wo32(dev, ctx, 0x0604/4, 0x00004000); -- nv_wo32(dev, ctx, 0x0610/4, 0x00000001); -- nv_wo32(dev, ctx, 0x0618/4, 0x00040000); -- nv_wo32(dev, ctx, 0x061c/4, 0x00010000); -+ nv_wo32(ctx, i, 0x07ff0000); -+ nv_wo32(ctx, 0x05a4, 0x4b7fffff); -+ nv_wo32(ctx, 0x05fc, 0x00000001); -+ nv_wo32(ctx, 0x0604, 0x00004000); -+ nv_wo32(ctx, 0x0610, 0x00000001); -+ nv_wo32(ctx, 0x0618, 0x00040000); -+ nv_wo32(ctx, 0x061c, 0x00010000); - for (i = 0x1a9c; i <= 0x22fc; i += 16) { /*XXX: check!! */ -- nv_wo32(dev, ctx, (i + 0)/4, 0x10700ff9); -- nv_wo32(dev, ctx, (i + 4)/4, 0x0436086c); -- nv_wo32(dev, ctx, (i + 8)/4, 0x000c001b); -- } -- nv_wo32(dev, ctx, 0x269c/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x26b0/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x26dc/4, 0x40000000); -- nv_wo32(dev, ctx, 0x26e0/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x26e4/4, 0x3f000000); -- nv_wo32(dev, ctx, 0x26ec/4, 0x40000000); -- nv_wo32(dev, ctx, 0x26f0/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x26f8/4, 0xbf800000); -- nv_wo32(dev, ctx, 0x2700/4, 0xbf800000); -- nv_wo32(dev, ctx, 0x3024/4, 0x000fe000); -- nv_wo32(dev, ctx, 0x30a0/4, 0x000003f8); -- nv_wo32(dev, ctx, 0x33fc/4, 0x002fe000); -+ nv_wo32(ctx, (i + 0), 0x10700ff9); -+ nv_wo32(ctx, (i + 4), 0x0436086c); -+ nv_wo32(ctx, (i + 8), 0x000c001b); -+ } -+ nv_wo32(ctx, 0x269c, 0x3f800000); -+ nv_wo32(ctx, 0x26b0, 0x3f800000); -+ nv_wo32(ctx, 0x26dc, 0x40000000); -+ nv_wo32(ctx, 0x26e0, 0x3f800000); -+ nv_wo32(ctx, 0x26e4, 0x3f000000); -+ nv_wo32(ctx, 0x26ec, 0x40000000); -+ nv_wo32(ctx, 0x26f0, 0x3f800000); -+ nv_wo32(ctx, 0x26f8, 0xbf800000); -+ nv_wo32(ctx, 0x2700, 0xbf800000); -+ nv_wo32(ctx, 0x3024, 0x000fe000); -+ nv_wo32(ctx, 0x30a0, 0x000003f8); -+ nv_wo32(ctx, 0x33fc, 0x002fe000); - for (i = 0x341c; i <= 0x3438; i += 4) -- nv_wo32(dev, ctx, i/4, 0x001c527c); -+ nv_wo32(ctx, i, 0x001c527c); - } - - static void -@@ -196,57 +199,57 @@ - { - int i; - -- nv_wo32(dev, ctx, 0x0410/4, 0x00000101); -- nv_wo32(dev, ctx, 0x0424/4, 0x00000111); -- nv_wo32(dev, ctx, 0x0428/4, 0x00000060); -- nv_wo32(dev, ctx, 0x0444/4, 0x00000080); -- nv_wo32(dev, ctx, 0x0448/4, 0xffff0000); -- nv_wo32(dev, ctx, 0x044c/4, 0x00000001); -- nv_wo32(dev, ctx, 0x0460/4, 0x44400000); -- nv_wo32(dev, ctx, 0x048c/4, 0xffff0000); -+ nv_wo32(ctx, 0x0410, 0x00000101); -+ nv_wo32(ctx, 0x0424, 0x00000111); -+ nv_wo32(ctx, 0x0428, 0x00000060); -+ nv_wo32(ctx, 0x0444, 0x00000080); -+ nv_wo32(ctx, 0x0448, 0xffff0000); -+ nv_wo32(ctx, 0x044c, 0x00000001); -+ nv_wo32(ctx, 0x0460, 0x44400000); -+ nv_wo32(ctx, 0x048c, 0xffff0000); - for (i = 0x04e0; i < 0x04e8; i += 4) -- nv_wo32(dev, ctx, i/4, 0x0fff0000); -- nv_wo32(dev, ctx, 0x04ec/4, 0x00011100); -+ nv_wo32(ctx, i, 0x0fff0000); -+ nv_wo32(ctx, 0x04ec, 0x00011100); - for (i = 0x0508; i < 0x0548; i += 4) -- nv_wo32(dev, ctx, i/4, 0x07ff0000); -- nv_wo32(dev, ctx, 0x0550/4, 0x4b7fffff); -- nv_wo32(dev, ctx, 0x058c/4, 0x00000080); -- nv_wo32(dev, ctx, 0x0590/4, 0x30201000); -- nv_wo32(dev, ctx, 0x0594/4, 0x70605040); -- nv_wo32(dev, ctx, 0x0598/4, 0xb8a89888); -- nv_wo32(dev, ctx, 0x059c/4, 0xf8e8d8c8); -- nv_wo32(dev, ctx, 0x05b0/4, 0xb0000000); -+ nv_wo32(ctx, i, 0x07ff0000); -+ nv_wo32(ctx, 0x0550, 0x4b7fffff); -+ nv_wo32(ctx, 0x058c, 0x00000080); -+ nv_wo32(ctx, 0x0590, 0x30201000); -+ nv_wo32(ctx, 0x0594, 0x70605040); -+ nv_wo32(ctx, 0x0598, 0xb8a89888); -+ nv_wo32(ctx, 0x059c, 0xf8e8d8c8); -+ nv_wo32(ctx, 0x05b0, 0xb0000000); - for (i = 0x0600; i < 0x0640; i += 4) -- nv_wo32(dev, ctx, i/4, 0x00010588); -+ nv_wo32(ctx, i, 0x00010588); - for (i = 0x0640; i < 0x0680; i += 4) -- nv_wo32(dev, ctx, i/4, 0x00030303); -+ nv_wo32(ctx, i, 0x00030303); - for (i = 0x06c0; i < 0x0700; i += 4) -- nv_wo32(dev, ctx, i/4, 0x0008aae4); -+ nv_wo32(ctx, i, 0x0008aae4); - for (i = 0x0700; i < 0x0740; i += 4) -- nv_wo32(dev, ctx, i/4, 0x01012000); -+ nv_wo32(ctx, i, 0x01012000); - for (i = 0x0740; i < 0x0780; i += 4) -- nv_wo32(dev, ctx, i/4, 0x00080008); -- nv_wo32(dev, ctx, 0x085c/4, 0x00040000); -- nv_wo32(dev, ctx, 0x0860/4, 0x00010000); -+ nv_wo32(ctx, i, 0x00080008); -+ nv_wo32(ctx, 0x085c, 0x00040000); -+ nv_wo32(ctx, 0x0860, 0x00010000); - for (i = 0x0864; i < 0x0874; i += 4) -- nv_wo32(dev, ctx, i/4, 0x00040004); -+ nv_wo32(ctx, i, 0x00040004); - for (i = 0x1f18; i <= 0x3088 ; i += 16) { -- nv_wo32(dev, ctx, i/4 + 0, 0x10700ff9); -- nv_wo32(dev, ctx, i/4 + 1, 0x0436086c); -- nv_wo32(dev, ctx, i/4 + 2, 0x000c001b); -+ nv_wo32(ctx, i + 0, 0x10700ff9); -+ nv_wo32(ctx, i + 1, 0x0436086c); -+ nv_wo32(ctx, i + 2, 0x000c001b); - } - for (i = 0x30b8; i < 0x30c8; i += 4) -- nv_wo32(dev, ctx, i/4, 0x0000ffff); -- nv_wo32(dev, ctx, 0x344c/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x3808/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x381c/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x3848/4, 0x40000000); -- nv_wo32(dev, ctx, 0x384c/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x3850/4, 0x3f000000); -- nv_wo32(dev, ctx, 0x3858/4, 0x40000000); -- nv_wo32(dev, ctx, 0x385c/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x3864/4, 0xbf800000); -- nv_wo32(dev, ctx, 0x386c/4, 0xbf800000); -+ nv_wo32(ctx, i, 0x0000ffff); -+ nv_wo32(ctx, 0x344c, 0x3f800000); -+ nv_wo32(ctx, 0x3808, 0x3f800000); -+ nv_wo32(ctx, 0x381c, 0x3f800000); -+ nv_wo32(ctx, 0x3848, 0x40000000); -+ nv_wo32(ctx, 0x384c, 0x3f800000); -+ nv_wo32(ctx, 0x3850, 0x3f000000); -+ nv_wo32(ctx, 0x3858, 0x40000000); -+ nv_wo32(ctx, 0x385c, 0x3f800000); -+ nv_wo32(ctx, 0x3864, 0xbf800000); -+ nv_wo32(ctx, 0x386c, 0xbf800000); - } - - static void -@@ -254,57 +257,57 @@ - { - int i; - -- nv_wo32(dev, ctx, 0x040c/4, 0x01000101); -- nv_wo32(dev, ctx, 0x0420/4, 0x00000111); -- nv_wo32(dev, ctx, 0x0424/4, 0x00000060); -- nv_wo32(dev, ctx, 0x0440/4, 0x00000080); -- nv_wo32(dev, ctx, 0x0444/4, 0xffff0000); -- nv_wo32(dev, ctx, 0x0448/4, 0x00000001); -- nv_wo32(dev, ctx, 0x045c/4, 0x44400000); -- nv_wo32(dev, ctx, 0x0480/4, 0xffff0000); -+ nv_wo32(ctx, 0x040c, 0x01000101); -+ nv_wo32(ctx, 0x0420, 0x00000111); -+ nv_wo32(ctx, 0x0424, 0x00000060); -+ nv_wo32(ctx, 0x0440, 0x00000080); -+ nv_wo32(ctx, 0x0444, 0xffff0000); -+ nv_wo32(ctx, 0x0448, 0x00000001); -+ nv_wo32(ctx, 0x045c, 0x44400000); -+ nv_wo32(ctx, 0x0480, 0xffff0000); - for (i = 0x04d4; i < 0x04dc; i += 4) -- nv_wo32(dev, ctx, i/4, 0x0fff0000); -- nv_wo32(dev, ctx, 0x04e0/4, 0x00011100); -+ nv_wo32(ctx, i, 0x0fff0000); -+ nv_wo32(ctx, 0x04e0, 0x00011100); - for (i = 0x04fc; i < 0x053c; i += 4) -- nv_wo32(dev, ctx, i/4, 0x07ff0000); -- nv_wo32(dev, ctx, 0x0544/4, 0x4b7fffff); -- nv_wo32(dev, ctx, 0x057c/4, 0x00000080); -- nv_wo32(dev, ctx, 0x0580/4, 0x30201000); -- nv_wo32(dev, ctx, 0x0584/4, 0x70605040); -- nv_wo32(dev, ctx, 0x0588/4, 0xb8a89888); -- nv_wo32(dev, ctx, 0x058c/4, 0xf8e8d8c8); -- nv_wo32(dev, ctx, 0x05a0/4, 0xb0000000); -+ nv_wo32(ctx, i, 0x07ff0000); -+ nv_wo32(ctx, 0x0544, 0x4b7fffff); -+ nv_wo32(ctx, 0x057c, 0x00000080); -+ nv_wo32(ctx, 0x0580, 0x30201000); -+ nv_wo32(ctx, 0x0584, 0x70605040); -+ nv_wo32(ctx, 0x0588, 0xb8a89888); -+ nv_wo32(ctx, 0x058c, 0xf8e8d8c8); -+ nv_wo32(ctx, 0x05a0, 0xb0000000); - for (i = 0x05f0; i < 0x0630; i += 4) -- nv_wo32(dev, ctx, i/4, 0x00010588); -+ nv_wo32(ctx, i, 0x00010588); - for (i = 0x0630; i < 0x0670; i += 4) -- nv_wo32(dev, ctx, i/4, 0x00030303); -+ nv_wo32(ctx, i, 0x00030303); - for (i = 0x06b0; i < 0x06f0; i += 4) -- nv_wo32(dev, ctx, i/4, 0x0008aae4); -+ nv_wo32(ctx, i, 0x0008aae4); - for (i = 0x06f0; i < 0x0730; i += 4) -- nv_wo32(dev, ctx, i/4, 0x01012000); -+ nv_wo32(ctx, i, 0x01012000); - for (i = 0x0730; i < 0x0770; i += 4) -- nv_wo32(dev, ctx, i/4, 0x00080008); -- nv_wo32(dev, ctx, 0x0850/4, 0x00040000); -- nv_wo32(dev, ctx, 0x0854/4, 0x00010000); -+ nv_wo32(ctx, i, 0x00080008); -+ nv_wo32(ctx, 0x0850, 0x00040000); -+ nv_wo32(ctx, 0x0854, 0x00010000); - for (i = 0x0858; i < 0x0868; i += 4) -- nv_wo32(dev, ctx, i/4, 0x00040004); -+ nv_wo32(ctx, i, 0x00040004); - for (i = 0x15ac; i <= 0x271c ; i += 16) { -- nv_wo32(dev, ctx, i/4 + 0, 0x10700ff9); -- nv_wo32(dev, ctx, i/4 + 1, 0x0436086c); -- nv_wo32(dev, ctx, i/4 + 2, 0x000c001b); -+ nv_wo32(ctx, i + 0, 0x10700ff9); -+ nv_wo32(ctx, i + 1, 0x0436086c); -+ nv_wo32(ctx, i + 2, 0x000c001b); - } - for (i = 0x274c; i < 0x275c; i += 4) -- nv_wo32(dev, ctx, i/4, 0x0000ffff); -- nv_wo32(dev, ctx, 0x2ae0/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x2e9c/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x2eb0/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x2edc/4, 0x40000000); -- nv_wo32(dev, ctx, 0x2ee0/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x2ee4/4, 0x3f000000); -- nv_wo32(dev, ctx, 0x2eec/4, 0x40000000); -- nv_wo32(dev, ctx, 0x2ef0/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x2ef8/4, 0xbf800000); -- nv_wo32(dev, ctx, 0x2f00/4, 0xbf800000); -+ nv_wo32(ctx, i, 0x0000ffff); -+ nv_wo32(ctx, 0x2ae0, 0x3f800000); -+ nv_wo32(ctx, 0x2e9c, 0x3f800000); -+ nv_wo32(ctx, 0x2eb0, 0x3f800000); -+ nv_wo32(ctx, 0x2edc, 0x40000000); -+ nv_wo32(ctx, 0x2ee0, 0x3f800000); -+ nv_wo32(ctx, 0x2ee4, 0x3f000000); -+ nv_wo32(ctx, 0x2eec, 0x40000000); -+ nv_wo32(ctx, 0x2ef0, 0x3f800000); -+ nv_wo32(ctx, 0x2ef8, 0xbf800000); -+ nv_wo32(ctx, 0x2f00, 0xbf800000); - } - - static void -@@ -312,57 +315,57 @@ - { - int i; - -- nv_wo32(dev, ctx, 0x040c/4, 0x00000101); -- nv_wo32(dev, ctx, 0x0420/4, 0x00000111); -- nv_wo32(dev, ctx, 0x0424/4, 0x00000060); -- nv_wo32(dev, ctx, 0x0440/4, 0x00000080); -- nv_wo32(dev, ctx, 0x0444/4, 0xffff0000); -- nv_wo32(dev, ctx, 0x0448/4, 0x00000001); -- nv_wo32(dev, ctx, 0x045c/4, 0x44400000); -- nv_wo32(dev, ctx, 0x0488/4, 0xffff0000); -+ nv_wo32(ctx, 0x040c, 0x00000101); -+ nv_wo32(ctx, 0x0420, 0x00000111); -+ nv_wo32(ctx, 0x0424, 0x00000060); -+ nv_wo32(ctx, 0x0440, 0x00000080); -+ nv_wo32(ctx, 0x0444, 0xffff0000); -+ nv_wo32(ctx, 0x0448, 0x00000001); -+ nv_wo32(ctx, 0x045c, 0x44400000); -+ nv_wo32(ctx, 0x0488, 0xffff0000); - for (i = 0x04dc; i < 0x04e4; i += 4) -- nv_wo32(dev, ctx, i/4, 0x0fff0000); -- nv_wo32(dev, ctx, 0x04e8/4, 0x00011100); -+ nv_wo32(ctx, i, 0x0fff0000); -+ nv_wo32(ctx, 0x04e8, 0x00011100); - for (i = 0x0504; i < 0x0544; i += 4) -- nv_wo32(dev, ctx, i/4, 0x07ff0000); -- nv_wo32(dev, ctx, 0x054c/4, 0x4b7fffff); -- nv_wo32(dev, ctx, 0x0588/4, 0x00000080); -- nv_wo32(dev, ctx, 0x058c/4, 0x30201000); -- nv_wo32(dev, ctx, 0x0590/4, 0x70605040); -- nv_wo32(dev, ctx, 0x0594/4, 0xb8a89888); -- nv_wo32(dev, ctx, 0x0598/4, 0xf8e8d8c8); -- nv_wo32(dev, ctx, 0x05ac/4, 0xb0000000); -+ nv_wo32(ctx, i, 0x07ff0000); -+ nv_wo32(ctx, 0x054c, 0x4b7fffff); -+ nv_wo32(ctx, 0x0588, 0x00000080); -+ nv_wo32(ctx, 0x058c, 0x30201000); -+ nv_wo32(ctx, 0x0590, 0x70605040); -+ nv_wo32(ctx, 0x0594, 0xb8a89888); -+ nv_wo32(ctx, 0x0598, 0xf8e8d8c8); -+ nv_wo32(ctx, 0x05ac, 0xb0000000); - for (i = 0x0604; i < 0x0644; i += 4) -- nv_wo32(dev, ctx, i/4, 0x00010588); -+ nv_wo32(ctx, i, 0x00010588); - for (i = 0x0644; i < 0x0684; i += 4) -- nv_wo32(dev, ctx, i/4, 0x00030303); -+ nv_wo32(ctx, i, 0x00030303); - for (i = 0x06c4; i < 0x0704; i += 4) -- nv_wo32(dev, ctx, i/4, 0x0008aae4); -+ nv_wo32(ctx, i, 0x0008aae4); - for (i = 0x0704; i < 0x0744; i += 4) -- nv_wo32(dev, ctx, i/4, 0x01012000); -+ nv_wo32(ctx, i, 0x01012000); - for (i = 0x0744; i < 0x0784; i += 4) -- nv_wo32(dev, ctx, i/4, 0x00080008); -- nv_wo32(dev, ctx, 0x0860/4, 0x00040000); -- nv_wo32(dev, ctx, 0x0864/4, 0x00010000); -+ nv_wo32(ctx, i, 0x00080008); -+ nv_wo32(ctx, 0x0860, 0x00040000); -+ nv_wo32(ctx, 0x0864, 0x00010000); - for (i = 0x0868; i < 0x0878; i += 4) -- nv_wo32(dev, ctx, i/4, 0x00040004); -+ nv_wo32(ctx, i, 0x00040004); - for (i = 0x1f1c; i <= 0x308c ; i += 16) { -- nv_wo32(dev, ctx, i/4 + 0, 0x10700ff9); -- nv_wo32(dev, ctx, i/4 + 1, 0x0436086c); -- nv_wo32(dev, ctx, i/4 + 2, 0x000c001b); -+ nv_wo32(ctx, i + 0, 0x10700ff9); -+ nv_wo32(ctx, i + 4, 0x0436086c); -+ nv_wo32(ctx, i + 8, 0x000c001b); - } - for (i = 0x30bc; i < 0x30cc; i += 4) -- nv_wo32(dev, ctx, i/4, 0x0000ffff); -- nv_wo32(dev, ctx, 0x3450/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x380c/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x3820/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x384c/4, 0x40000000); -- nv_wo32(dev, ctx, 0x3850/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x3854/4, 0x3f000000); -- nv_wo32(dev, ctx, 0x385c/4, 0x40000000); -- nv_wo32(dev, ctx, 0x3860/4, 0x3f800000); -- nv_wo32(dev, ctx, 0x3868/4, 0xbf800000); -- nv_wo32(dev, ctx, 0x3870/4, 0xbf800000); -+ nv_wo32(ctx, i, 0x0000ffff); -+ nv_wo32(ctx, 0x3450, 0x3f800000); -+ nv_wo32(ctx, 0x380c, 0x3f800000); -+ nv_wo32(ctx, 0x3820, 0x3f800000); -+ nv_wo32(ctx, 0x384c, 0x40000000); -+ nv_wo32(ctx, 0x3850, 0x3f800000); -+ nv_wo32(ctx, 0x3854, 0x3f000000); -+ nv_wo32(ctx, 0x385c, 0x40000000); -+ nv_wo32(ctx, 0x3860, 0x3f800000); -+ nv_wo32(ctx, 0x3868, 0xbf800000); -+ nv_wo32(ctx, 0x3870, 0xbf800000); - } - - int -@@ -372,7 +375,7 @@ - struct drm_nouveau_private *dev_priv = dev->dev_private; - struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; - void (*ctx_init)(struct drm_device *, struct nouveau_gpuobj *); -- unsigned int idoffs = 0x28/4; -+ unsigned int idoffs = 0x28; - int ret; - - switch (dev_priv->chipset) { -@@ -403,21 +406,19 @@ - BUG_ON(1); - } - -- ret = nouveau_gpuobj_new_ref(dev, chan, NULL, 0, pgraph->grctx_size, -- 16, NVOBJ_FLAG_ZERO_ALLOC, -- &chan->ramin_grctx); -+ ret = nouveau_gpuobj_new(dev, chan, pgraph->grctx_size, 16, -+ NVOBJ_FLAG_ZERO_ALLOC, &chan->ramin_grctx); - if (ret) - return ret; - - /* Initialise default context values */ -- ctx_init(dev, chan->ramin_grctx->gpuobj); -+ ctx_init(dev, chan->ramin_grctx); - - /* nv20: nv_wo32(dev, chan->ramin_grctx->gpuobj, 10, chan->id<<24); */ -- nv_wo32(dev, chan->ramin_grctx->gpuobj, idoffs, -- (chan->id << 24) | 0x1); /* CTX_USER */ -+ nv_wo32(chan->ramin_grctx, idoffs, -+ (chan->id << 24) | 0x1); /* CTX_USER */ - -- nv_wo32(dev, pgraph->ctx_table->gpuobj, chan->id, -- chan->ramin_grctx->instance >> 4); -+ nv_wo32(pgraph->ctx_table, chan->id * 4, chan->ramin_grctx->pinst >> 4); - return 0; - } - -@@ -427,11 +428,21 @@ - struct drm_device *dev = chan->dev; - struct drm_nouveau_private *dev_priv = dev->dev_private; - struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; -+ unsigned long flags; -+ -+ spin_lock_irqsave(&dev_priv->context_switch_lock, flags); -+ pgraph->fifo_access(dev, false); - -- if (chan->ramin_grctx) -- nouveau_gpuobj_ref_del(dev, &chan->ramin_grctx); -+ /* Unload the context if it's the currently active one */ -+ if (pgraph->channel(dev) == chan) -+ pgraph->unload_context(dev); - -- nv_wo32(dev, pgraph->ctx_table->gpuobj, chan->id, 0); -+ pgraph->fifo_access(dev, true); -+ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); -+ -+ /* Free the context resources */ -+ nv_wo32(pgraph->ctx_table, chan->id * 4, 0); -+ nouveau_gpuobj_ref(NULL, &chan->ramin_grctx); - } - - int -@@ -442,7 +453,7 @@ - - if (!chan->ramin_grctx) - return -EINVAL; -- inst = chan->ramin_grctx->instance >> 4; -+ inst = chan->ramin_grctx->pinst >> 4; - - nv_wr32(dev, NV20_PGRAPH_CHANNEL_CTX_POINTER, inst); - nv_wr32(dev, NV20_PGRAPH_CHANNEL_CTX_XFER, -@@ -465,7 +476,7 @@ - chan = pgraph->channel(dev); - if (!chan) - return 0; -- inst = chan->ramin_grctx->instance >> 4; -+ inst = chan->ramin_grctx->pinst >> 4; - - nv_wr32(dev, NV20_PGRAPH_CHANNEL_CTX_POINTER, inst); - nv_wr32(dev, NV20_PGRAPH_CHANNEL_CTX_XFER, -@@ -500,24 +511,27 @@ - } - - void --nv20_graph_set_region_tiling(struct drm_device *dev, int i, uint32_t addr, -- uint32_t size, uint32_t pitch) -+nv20_graph_set_tile_region(struct drm_device *dev, int i) - { -- uint32_t limit = max(1u, addr + size) - 1; -- -- if (pitch) -- addr |= 1; -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; - -- nv_wr32(dev, NV20_PGRAPH_TLIMIT(i), limit); -- nv_wr32(dev, NV20_PGRAPH_TSIZE(i), pitch); -- nv_wr32(dev, NV20_PGRAPH_TILE(i), addr); -+ nv_wr32(dev, NV20_PGRAPH_TLIMIT(i), tile->limit); -+ nv_wr32(dev, NV20_PGRAPH_TSIZE(i), tile->pitch); -+ nv_wr32(dev, NV20_PGRAPH_TILE(i), tile->addr); - - nv_wr32(dev, NV10_PGRAPH_RDI_INDEX, 0x00EA0030 + 4 * i); -- nv_wr32(dev, NV10_PGRAPH_RDI_DATA, limit); -+ nv_wr32(dev, NV10_PGRAPH_RDI_DATA, tile->limit); - nv_wr32(dev, NV10_PGRAPH_RDI_INDEX, 0x00EA0050 + 4 * i); -- nv_wr32(dev, NV10_PGRAPH_RDI_DATA, pitch); -+ nv_wr32(dev, NV10_PGRAPH_RDI_DATA, tile->pitch); - nv_wr32(dev, NV10_PGRAPH_RDI_INDEX, 0x00EA0010 + 4 * i); -- nv_wr32(dev, NV10_PGRAPH_RDI_DATA, addr); -+ nv_wr32(dev, NV10_PGRAPH_RDI_DATA, tile->addr); -+ -+ if (dev_priv->card_type == NV_20) { -+ nv_wr32(dev, NV20_PGRAPH_ZCOMP(i), tile->zcomp); -+ nv_wr32(dev, NV10_PGRAPH_RDI_INDEX, 0x00ea0090 + 4 * i); -+ nv_wr32(dev, NV10_PGRAPH_RDI_DATA, tile->zcomp); -+ } - } - - int -@@ -552,18 +566,24 @@ - - if (!pgraph->ctx_table) { - /* Create Context Pointer Table */ -- ret = nouveau_gpuobj_new_ref(dev, NULL, NULL, 0, 32 * 4, 16, -- NVOBJ_FLAG_ZERO_ALLOC, -- &pgraph->ctx_table); -+ ret = nouveau_gpuobj_new(dev, NULL, 32 * 4, 16, -+ NVOBJ_FLAG_ZERO_ALLOC, -+ &pgraph->ctx_table); - if (ret) - return ret; - } - - nv_wr32(dev, NV20_PGRAPH_CHANNEL_CTX_TABLE, -- pgraph->ctx_table->instance >> 4); -+ pgraph->ctx_table->pinst >> 4); - - nv20_graph_rdi(dev); - -+ ret = nv20_graph_register(dev); -+ if (ret) { -+ nouveau_gpuobj_ref(NULL, &pgraph->ctx_table); -+ return ret; -+ } -+ - nv_wr32(dev, NV03_PGRAPH_INTR , 0xFFFFFFFF); - nv_wr32(dev, NV03_PGRAPH_INTR_EN, 0xFFFFFFFF); - -@@ -575,16 +595,17 @@ - nv_wr32(dev, 0x40009C , 0x00000040); - - if (dev_priv->chipset >= 0x25) { -- nv_wr32(dev, 0x400890, 0x00080000); -+ nv_wr32(dev, 0x400890, 0x00a8cfff); - nv_wr32(dev, 0x400610, 0x304B1FB6); -- nv_wr32(dev, 0x400B80, 0x18B82880); -+ nv_wr32(dev, 0x400B80, 0x1cbd3883); - nv_wr32(dev, 0x400B84, 0x44000000); - nv_wr32(dev, 0x400098, 0x40000080); - nv_wr32(dev, 0x400B88, 0x000000ff); -+ - } else { -- nv_wr32(dev, 0x400880, 0x00080000); /* 0x0008c7df */ -+ nv_wr32(dev, 0x400880, 0x0008c7df); - nv_wr32(dev, 0x400094, 0x00000005); -- nv_wr32(dev, 0x400B80, 0x45CAA208); /* 0x45eae20e */ -+ nv_wr32(dev, 0x400B80, 0x45eae20e); - nv_wr32(dev, 0x400B84, 0x24000000); - nv_wr32(dev, 0x400098, 0x00000040); - nv_wr32(dev, NV10_PGRAPH_RDI_INDEX, 0x00E00038); -@@ -595,14 +616,8 @@ - - /* Turn all the tiling regions off. */ - for (i = 0; i < NV10_PFB_TILE__SIZE; i++) -- nv20_graph_set_region_tiling(dev, i, 0, 0, 0); -+ nv20_graph_set_tile_region(dev, i); - -- for (i = 0; i < 8; i++) { -- nv_wr32(dev, 0x400980 + i * 4, nv_rd32(dev, 0x100300 + i * 4)); -- nv_wr32(dev, NV10_PGRAPH_RDI_INDEX, 0x00EA0090 + i * 4); -- nv_wr32(dev, NV10_PGRAPH_RDI_DATA, -- nv_rd32(dev, 0x100300 + i * 4)); -- } - nv_wr32(dev, 0x4009a0, nv_rd32(dev, 0x100324)); - nv_wr32(dev, NV10_PGRAPH_RDI_INDEX, 0x00EA000C); - nv_wr32(dev, NV10_PGRAPH_RDI_DATA, nv_rd32(dev, 0x100324)); -@@ -646,7 +661,7 @@ - struct drm_nouveau_private *dev_priv = dev->dev_private; - struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; - -- nouveau_gpuobj_ref_del(dev, &pgraph->ctx_table); -+ nouveau_gpuobj_ref(NULL, &pgraph->ctx_table); - } - - int -@@ -681,15 +696,21 @@ - - if (!pgraph->ctx_table) { - /* Create Context Pointer Table */ -- ret = nouveau_gpuobj_new_ref(dev, NULL, NULL, 0, 32 * 4, 16, -- NVOBJ_FLAG_ZERO_ALLOC, -- &pgraph->ctx_table); -+ ret = nouveau_gpuobj_new(dev, NULL, 32 * 4, 16, -+ NVOBJ_FLAG_ZERO_ALLOC, -+ &pgraph->ctx_table); - if (ret) - return ret; - } - -+ ret = nv30_graph_register(dev); -+ if (ret) { -+ nouveau_gpuobj_ref(NULL, &pgraph->ctx_table); -+ return ret; -+ } -+ - nv_wr32(dev, NV20_PGRAPH_CHANNEL_CTX_TABLE, -- pgraph->ctx_table->instance >> 4); -+ pgraph->ctx_table->pinst >> 4); - - nv_wr32(dev, NV03_PGRAPH_INTR , 0xFFFFFFFF); - nv_wr32(dev, NV03_PGRAPH_INTR_EN, 0xFFFFFFFF); -@@ -728,7 +749,7 @@ - - /* Turn all the tiling regions off. */ - for (i = 0; i < NV10_PFB_TILE__SIZE; i++) -- nv20_graph_set_region_tiling(dev, i, 0, 0, 0); -+ nv20_graph_set_tile_region(dev, i); - - nv_wr32(dev, NV10_PGRAPH_CTX_CONTROL, 0x10000100); - nv_wr32(dev, NV10_PGRAPH_STATE , 0xFFFFFFFF); -@@ -748,46 +769,84 @@ - return 0; - } - --struct nouveau_pgraph_object_class nv20_graph_grclass[] = { -- { 0x0030, false, NULL }, /* null */ -- { 0x0039, false, NULL }, /* m2mf */ -- { 0x004a, false, NULL }, /* gdirect */ -- { 0x009f, false, NULL }, /* imageblit (nv12) */ -- { 0x008a, false, NULL }, /* ifc */ -- { 0x0089, false, NULL }, /* sifm */ -- { 0x0062, false, NULL }, /* surf2d */ -- { 0x0043, false, NULL }, /* rop */ -- { 0x0012, false, NULL }, /* beta1 */ -- { 0x0072, false, NULL }, /* beta4 */ -- { 0x0019, false, NULL }, /* cliprect */ -- { 0x0044, false, NULL }, /* pattern */ -- { 0x009e, false, NULL }, /* swzsurf */ -- { 0x0096, false, NULL }, /* celcius */ -- { 0x0097, false, NULL }, /* kelvin (nv20) */ -- { 0x0597, false, NULL }, /* kelvin (nv25) */ -- {} --}; -- --struct nouveau_pgraph_object_class nv30_graph_grclass[] = { -- { 0x0030, false, NULL }, /* null */ -- { 0x0039, false, NULL }, /* m2mf */ -- { 0x004a, false, NULL }, /* gdirect */ -- { 0x009f, false, NULL }, /* imageblit (nv12) */ -- { 0x008a, false, NULL }, /* ifc */ -- { 0x038a, false, NULL }, /* ifc (nv30) */ -- { 0x0089, false, NULL }, /* sifm */ -- { 0x0389, false, NULL }, /* sifm (nv30) */ -- { 0x0062, false, NULL }, /* surf2d */ -- { 0x0362, false, NULL }, /* surf2d (nv30) */ -- { 0x0043, false, NULL }, /* rop */ -- { 0x0012, false, NULL }, /* beta1 */ -- { 0x0072, false, NULL }, /* beta4 */ -- { 0x0019, false, NULL }, /* cliprect */ -- { 0x0044, false, NULL }, /* pattern */ -- { 0x039e, false, NULL }, /* swzsurf */ -- { 0x0397, false, NULL }, /* rankine (nv30) */ -- { 0x0497, false, NULL }, /* rankine (nv35) */ -- { 0x0697, false, NULL }, /* rankine (nv34) */ -- {} --}; -+static int -+nv20_graph_register(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ -+ if (dev_priv->engine.graph.registered) -+ return 0; -+ -+ NVOBJ_CLASS(dev, 0x506e, SW); /* nvsw */ -+ NVOBJ_CLASS(dev, 0x0030, GR); /* null */ -+ NVOBJ_CLASS(dev, 0x0039, GR); /* m2mf */ -+ NVOBJ_CLASS(dev, 0x004a, GR); /* gdirect */ -+ NVOBJ_CLASS(dev, 0x009f, GR); /* imageblit (nv12) */ -+ NVOBJ_CLASS(dev, 0x008a, GR); /* ifc */ -+ NVOBJ_CLASS(dev, 0x0089, GR); /* sifm */ -+ NVOBJ_CLASS(dev, 0x0062, GR); /* surf2d */ -+ NVOBJ_CLASS(dev, 0x0043, GR); /* rop */ -+ NVOBJ_CLASS(dev, 0x0012, GR); /* beta1 */ -+ NVOBJ_CLASS(dev, 0x0072, GR); /* beta4 */ -+ NVOBJ_CLASS(dev, 0x0019, GR); /* cliprect */ -+ NVOBJ_CLASS(dev, 0x0044, GR); /* pattern */ -+ NVOBJ_CLASS(dev, 0x009e, GR); /* swzsurf */ -+ NVOBJ_CLASS(dev, 0x0096, GR); /* celcius */ -+ -+ /* kelvin */ -+ if (dev_priv->chipset < 0x25) -+ NVOBJ_CLASS(dev, 0x0097, GR); -+ else -+ NVOBJ_CLASS(dev, 0x0597, GR); -+ -+ /* nvsw */ -+ NVOBJ_CLASS(dev, 0x506e, SW); -+ NVOBJ_MTHD (dev, 0x506e, 0x0500, nv04_graph_mthd_page_flip); - -+ dev_priv->engine.graph.registered = true; -+ return 0; -+} -+ -+static int -+nv30_graph_register(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ -+ if (dev_priv->engine.graph.registered) -+ return 0; -+ -+ NVOBJ_CLASS(dev, 0x506e, SW); /* nvsw */ -+ NVOBJ_CLASS(dev, 0x0030, GR); /* null */ -+ NVOBJ_CLASS(dev, 0x0039, GR); /* m2mf */ -+ NVOBJ_CLASS(dev, 0x004a, GR); /* gdirect */ -+ NVOBJ_CLASS(dev, 0x009f, GR); /* imageblit (nv12) */ -+ NVOBJ_CLASS(dev, 0x008a, GR); /* ifc */ -+ NVOBJ_CLASS(dev, 0x038a, GR); /* ifc (nv30) */ -+ NVOBJ_CLASS(dev, 0x0089, GR); /* sifm */ -+ NVOBJ_CLASS(dev, 0x0389, GR); /* sifm (nv30) */ -+ NVOBJ_CLASS(dev, 0x0062, GR); /* surf2d */ -+ NVOBJ_CLASS(dev, 0x0362, GR); /* surf2d (nv30) */ -+ NVOBJ_CLASS(dev, 0x0043, GR); /* rop */ -+ NVOBJ_CLASS(dev, 0x0012, GR); /* beta1 */ -+ NVOBJ_CLASS(dev, 0x0072, GR); /* beta4 */ -+ NVOBJ_CLASS(dev, 0x0019, GR); /* cliprect */ -+ NVOBJ_CLASS(dev, 0x0044, GR); /* pattern */ -+ NVOBJ_CLASS(dev, 0x039e, GR); /* swzsurf */ -+ -+ /* rankine */ -+ if (0x00000003 & (1 << (dev_priv->chipset & 0x0f))) -+ NVOBJ_CLASS(dev, 0x0397, GR); -+ else -+ if (0x00000010 & (1 << (dev_priv->chipset & 0x0f))) -+ NVOBJ_CLASS(dev, 0x0697, GR); -+ else -+ if (0x000001e0 & (1 << (dev_priv->chipset & 0x0f))) -+ NVOBJ_CLASS(dev, 0x0497, GR); -+ -+ /* nvsw */ -+ NVOBJ_CLASS(dev, 0x506e, SW); -+ NVOBJ_MTHD (dev, 0x506e, 0x0500, nv04_graph_mthd_page_flip); -+ -+ dev_priv->engine.graph.registered = true; -+ return 0; -+} -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv30_fb.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv30_fb.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv30_fb.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv30_fb.c 2010-10-30 22:24:25.000000000 +0200 -@@ -29,6 +29,27 @@ - #include "nouveau_drv.h" - #include "nouveau_drm.h" - -+void -+nv30_fb_init_tile_region(struct drm_device *dev, int i, uint32_t addr, -+ uint32_t size, uint32_t pitch, uint32_t flags) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; -+ -+ tile->addr = addr | 1; -+ tile->limit = max(1u, addr + size) - 1; -+ tile->pitch = pitch; -+} -+ -+void -+nv30_fb_free_tile_region(struct drm_device *dev, int i) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; -+ -+ tile->addr = tile->limit = tile->pitch = 0; -+} -+ - static int - calc_bias(struct drm_device *dev, int k, int i, int j) - { -@@ -65,7 +86,7 @@ - - /* Turn all the tiling regions off. */ - for (i = 0; i < pfb->num_tiles; i++) -- pfb->set_region_tiling(dev, i, 0, 0, 0); -+ pfb->set_tile_region(dev, i); - - /* Init the memory timing regs at 0x10037c/0x1003ac */ - if (dev_priv->chipset == 0x30 || -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv40_fb.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv40_fb.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv40_fb.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv40_fb.c 2010-10-30 22:24:25.000000000 +0200 -@@ -4,26 +4,22 @@ - #include "nouveau_drm.h" - - void --nv40_fb_set_region_tiling(struct drm_device *dev, int i, uint32_t addr, -- uint32_t size, uint32_t pitch) -+nv40_fb_set_tile_region(struct drm_device *dev, int i) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; -- uint32_t limit = max(1u, addr + size) - 1; -- -- if (pitch) -- addr |= 1; -+ struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; - - switch (dev_priv->chipset) { - case 0x40: -- nv_wr32(dev, NV10_PFB_TLIMIT(i), limit); -- nv_wr32(dev, NV10_PFB_TSIZE(i), pitch); -- nv_wr32(dev, NV10_PFB_TILE(i), addr); -+ nv_wr32(dev, NV10_PFB_TLIMIT(i), tile->limit); -+ nv_wr32(dev, NV10_PFB_TSIZE(i), tile->pitch); -+ nv_wr32(dev, NV10_PFB_TILE(i), tile->addr); - break; - - default: -- nv_wr32(dev, NV40_PFB_TLIMIT(i), limit); -- nv_wr32(dev, NV40_PFB_TSIZE(i), pitch); -- nv_wr32(dev, NV40_PFB_TILE(i), addr); -+ nv_wr32(dev, NV40_PFB_TLIMIT(i), tile->limit); -+ nv_wr32(dev, NV40_PFB_TSIZE(i), tile->pitch); -+ nv_wr32(dev, NV40_PFB_TILE(i), tile->addr); - break; - } - } -@@ -64,7 +60,7 @@ - - /* Turn all the tiling regions off. */ - for (i = 0; i < pfb->num_tiles; i++) -- pfb->set_region_tiling(dev, i, 0, 0, 0); -+ pfb->set_tile_region(dev, i); - - return 0; - } -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv40_fifo.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv40_fifo.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv40_fifo.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv40_fifo.c 2010-10-30 22:24:25.000000000 +0200 -@@ -27,8 +27,9 @@ - #include "drmP.h" - #include "nouveau_drv.h" - #include "nouveau_drm.h" -+#include "nouveau_ramht.h" - --#define NV40_RAMFC(c) (dev_priv->ramfc_offset + ((c) * NV40_RAMFC__SIZE)) -+#define NV40_RAMFC(c) (dev_priv->ramfc->pinst + ((c) * NV40_RAMFC__SIZE)) - #define NV40_RAMFC__SIZE 128 - - int -@@ -42,7 +43,7 @@ - - ret = nouveau_gpuobj_new_fake(dev, NV40_RAMFC(chan->id), ~0, - NV40_RAMFC__SIZE, NVOBJ_FLAG_ZERO_ALLOC | -- NVOBJ_FLAG_ZERO_FREE, NULL, &chan->ramfc); -+ NVOBJ_FLAG_ZERO_FREE, &chan->ramfc); - if (ret) - return ret; - -@@ -50,7 +51,7 @@ - - nv_wi32(dev, fc + 0, chan->pushbuf_base); - nv_wi32(dev, fc + 4, chan->pushbuf_base); -- nv_wi32(dev, fc + 12, chan->pushbuf->instance >> 4); -+ nv_wi32(dev, fc + 12, chan->pushbuf->pinst >> 4); - nv_wi32(dev, fc + 24, NV_PFIFO_CACHE1_DMA_FETCH_TRIG_128_BYTES | - NV_PFIFO_CACHE1_DMA_FETCH_SIZE_128_BYTES | - NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_8 | -@@ -58,7 +59,7 @@ - NV_PFIFO_CACHE1_BIG_ENDIAN | - #endif - 0x30000000 /* no idea.. */); -- nv_wi32(dev, fc + 56, chan->ramin_grctx->instance >> 4); -+ nv_wi32(dev, fc + 56, chan->ramin_grctx->pinst >> 4); - nv_wi32(dev, fc + 60, 0x0001FFFF); - - /* enable the fifo dma operation */ -@@ -69,18 +70,6 @@ - return 0; - } - --void --nv40_fifo_destroy_context(struct nouveau_channel *chan) --{ -- struct drm_device *dev = chan->dev; -- -- nv_wr32(dev, NV04_PFIFO_MODE, -- nv_rd32(dev, NV04_PFIFO_MODE) & ~(1 << chan->id)); -- -- if (chan->ramfc) -- nouveau_gpuobj_ref_del(dev, &chan->ramfc); --} -- - static void - nv40_fifo_do_load_context(struct drm_device *dev, int chid) - { -@@ -241,9 +230,9 @@ - struct drm_nouveau_private *dev_priv = dev->dev_private; - - nv_wr32(dev, NV03_PFIFO_RAMHT, (0x03 << 24) /* search 128 */ | -- ((dev_priv->ramht_bits - 9) << 16) | -- (dev_priv->ramht_offset >> 8)); -- nv_wr32(dev, NV03_PFIFO_RAMRO, dev_priv->ramro_offset>>8); -+ ((dev_priv->ramht->bits - 9) << 16) | -+ (dev_priv->ramht->gpuobj->pinst >> 8)); -+ nv_wr32(dev, NV03_PFIFO_RAMRO, dev_priv->ramro->pinst >> 8); - - switch (dev_priv->chipset) { - case 0x47: -@@ -271,7 +260,7 @@ - nv_wr32(dev, 0x2230, 0); - nv_wr32(dev, NV40_PFIFO_RAMFC, - ((dev_priv->vram_size - 512 * 1024 + -- dev_priv->ramfc_offset) >> 16) | (3 << 16)); -+ dev_priv->ramfc->pinst) >> 16) | (3 << 16)); - break; - } - } -@@ -301,7 +290,7 @@ - pfifo->reassign(dev, true); - - for (i = 0; i < dev_priv->engine.fifo.channels; i++) { -- if (dev_priv->fifos[i]) { -+ if (dev_priv->channels.ptr[i]) { - uint32_t mode = nv_rd32(dev, NV04_PFIFO_MODE); - nv_wr32(dev, NV04_PFIFO_MODE, mode | (1 << i)); - } -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv40_graph.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv40_graph.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv40_graph.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv40_graph.c 2010-10-30 22:24:25.000000000 +0200 -@@ -29,6 +29,8 @@ - #include "nouveau_drv.h" - #include "nouveau_grctx.h" - -+static int nv40_graph_register(struct drm_device *); -+ - struct nouveau_channel * - nv40_graph_channel(struct drm_device *dev) - { -@@ -42,10 +44,10 @@ - inst = (inst & NV40_PGRAPH_CTXCTL_CUR_INSTANCE) << 4; - - for (i = 0; i < dev_priv->engine.fifo.channels; i++) { -- struct nouveau_channel *chan = dev_priv->fifos[i]; -+ struct nouveau_channel *chan = dev_priv->channels.ptr[i]; - - if (chan && chan->ramin_grctx && -- chan->ramin_grctx->instance == inst) -+ chan->ramin_grctx->pinst == inst) - return chan; - } - -@@ -61,27 +63,41 @@ - struct nouveau_grctx ctx = {}; - int ret; - -- ret = nouveau_gpuobj_new_ref(dev, chan, NULL, 0, pgraph->grctx_size, -- 16, NVOBJ_FLAG_ZERO_ALLOC, -- &chan->ramin_grctx); -+ ret = nouveau_gpuobj_new(dev, chan, pgraph->grctx_size, 16, -+ NVOBJ_FLAG_ZERO_ALLOC, &chan->ramin_grctx); - if (ret) - return ret; - - /* Initialise default context values */ - ctx.dev = chan->dev; - ctx.mode = NOUVEAU_GRCTX_VALS; -- ctx.data = chan->ramin_grctx->gpuobj; -+ ctx.data = chan->ramin_grctx; - nv40_grctx_init(&ctx); - -- nv_wo32(dev, chan->ramin_grctx->gpuobj, 0, -- chan->ramin_grctx->gpuobj->im_pramin->start); -+ nv_wo32(chan->ramin_grctx, 0, chan->ramin_grctx->pinst); - return 0; - } - - void - nv40_graph_destroy_context(struct nouveau_channel *chan) - { -- nouveau_gpuobj_ref_del(chan->dev, &chan->ramin_grctx); -+ struct drm_device *dev = chan->dev; -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; -+ unsigned long flags; -+ -+ spin_lock_irqsave(&dev_priv->context_switch_lock, flags); -+ pgraph->fifo_access(dev, false); -+ -+ /* Unload the context if it's the currently active one */ -+ if (pgraph->channel(dev) == chan) -+ pgraph->unload_context(dev); -+ -+ pgraph->fifo_access(dev, true); -+ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); -+ -+ /* Free the context resources */ -+ nouveau_gpuobj_ref(NULL, &chan->ramin_grctx); - } - - static int -@@ -135,7 +151,7 @@ - - if (!chan->ramin_grctx) - return -EINVAL; -- inst = chan->ramin_grctx->instance >> 4; -+ inst = chan->ramin_grctx->pinst >> 4; - - ret = nv40_graph_transfer_context(dev, inst, 0); - if (ret) -@@ -176,43 +192,39 @@ - } - - void --nv40_graph_set_region_tiling(struct drm_device *dev, int i, uint32_t addr, -- uint32_t size, uint32_t pitch) -+nv40_graph_set_tile_region(struct drm_device *dev, int i) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; -- uint32_t limit = max(1u, addr + size) - 1; -- -- if (pitch) -- addr |= 1; -+ struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; - - switch (dev_priv->chipset) { - case 0x44: - case 0x4a: - case 0x4e: -- nv_wr32(dev, NV20_PGRAPH_TSIZE(i), pitch); -- nv_wr32(dev, NV20_PGRAPH_TLIMIT(i), limit); -- nv_wr32(dev, NV20_PGRAPH_TILE(i), addr); -+ nv_wr32(dev, NV20_PGRAPH_TSIZE(i), tile->pitch); -+ nv_wr32(dev, NV20_PGRAPH_TLIMIT(i), tile->limit); -+ nv_wr32(dev, NV20_PGRAPH_TILE(i), tile->addr); - break; - - case 0x46: - case 0x47: - case 0x49: - case 0x4b: -- nv_wr32(dev, NV47_PGRAPH_TSIZE(i), pitch); -- nv_wr32(dev, NV47_PGRAPH_TLIMIT(i), limit); -- nv_wr32(dev, NV47_PGRAPH_TILE(i), addr); -- nv_wr32(dev, NV40_PGRAPH_TSIZE1(i), pitch); -- nv_wr32(dev, NV40_PGRAPH_TLIMIT1(i), limit); -- nv_wr32(dev, NV40_PGRAPH_TILE1(i), addr); -+ nv_wr32(dev, NV47_PGRAPH_TSIZE(i), tile->pitch); -+ nv_wr32(dev, NV47_PGRAPH_TLIMIT(i), tile->limit); -+ nv_wr32(dev, NV47_PGRAPH_TILE(i), tile->addr); -+ nv_wr32(dev, NV40_PGRAPH_TSIZE1(i), tile->pitch); -+ nv_wr32(dev, NV40_PGRAPH_TLIMIT1(i), tile->limit); -+ nv_wr32(dev, NV40_PGRAPH_TILE1(i), tile->addr); - break; - - default: -- nv_wr32(dev, NV20_PGRAPH_TSIZE(i), pitch); -- nv_wr32(dev, NV20_PGRAPH_TLIMIT(i), limit); -- nv_wr32(dev, NV20_PGRAPH_TILE(i), addr); -- nv_wr32(dev, NV40_PGRAPH_TSIZE1(i), pitch); -- nv_wr32(dev, NV40_PGRAPH_TLIMIT1(i), limit); -- nv_wr32(dev, NV40_PGRAPH_TILE1(i), addr); -+ nv_wr32(dev, NV20_PGRAPH_TSIZE(i), tile->pitch); -+ nv_wr32(dev, NV20_PGRAPH_TLIMIT(i), tile->limit); -+ nv_wr32(dev, NV20_PGRAPH_TILE(i), tile->addr); -+ nv_wr32(dev, NV40_PGRAPH_TSIZE1(i), tile->pitch); -+ nv_wr32(dev, NV40_PGRAPH_TLIMIT1(i), tile->limit); -+ nv_wr32(dev, NV40_PGRAPH_TILE1(i), tile->addr); - break; - } - } -@@ -234,7 +246,7 @@ - struct nouveau_fb_engine *pfb = &dev_priv->engine.fb; - struct nouveau_grctx ctx = {}; - uint32_t vramsz, *cp; -- int i, j; -+ int ret, i, j; - - nv_wr32(dev, NV03_PMC_ENABLE, nv_rd32(dev, NV03_PMC_ENABLE) & - ~NV_PMC_ENABLE_PGRAPH); -@@ -258,6 +270,10 @@ - - kfree(cp); - -+ ret = nv40_graph_register(dev); -+ if (ret) -+ return ret; -+ - /* No context present currently */ - nv_wr32(dev, NV40_PGRAPH_CTXCTL_CUR, 0x00000000); - -@@ -349,7 +365,7 @@ - - /* Turn all the tiling regions off. */ - for (i = 0; i < pfb->num_tiles; i++) -- nv40_graph_set_region_tiling(dev, i, 0, 0, 0); -+ nv40_graph_set_tile_region(dev, i); - - /* begin RAM config */ - vramsz = pci_resource_len(dev->pdev, 0) - 1; -@@ -394,24 +410,42 @@ - { - } - --struct nouveau_pgraph_object_class nv40_graph_grclass[] = { -- { 0x0030, false, NULL }, /* null */ -- { 0x0039, false, NULL }, /* m2mf */ -- { 0x004a, false, NULL }, /* gdirect */ -- { 0x009f, false, NULL }, /* imageblit (nv12) */ -- { 0x008a, false, NULL }, /* ifc */ -- { 0x0089, false, NULL }, /* sifm */ -- { 0x3089, false, NULL }, /* sifm (nv40) */ -- { 0x0062, false, NULL }, /* surf2d */ -- { 0x3062, false, NULL }, /* surf2d (nv40) */ -- { 0x0043, false, NULL }, /* rop */ -- { 0x0012, false, NULL }, /* beta1 */ -- { 0x0072, false, NULL }, /* beta4 */ -- { 0x0019, false, NULL }, /* cliprect */ -- { 0x0044, false, NULL }, /* pattern */ -- { 0x309e, false, NULL }, /* swzsurf */ -- { 0x4097, false, NULL }, /* curie (nv40) */ -- { 0x4497, false, NULL }, /* curie (nv44) */ -- {} --}; -+static int -+nv40_graph_register(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ -+ if (dev_priv->engine.graph.registered) -+ return 0; -+ -+ NVOBJ_CLASS(dev, 0x506e, SW); /* nvsw */ -+ NVOBJ_CLASS(dev, 0x0030, GR); /* null */ -+ NVOBJ_CLASS(dev, 0x0039, GR); /* m2mf */ -+ NVOBJ_CLASS(dev, 0x004a, GR); /* gdirect */ -+ NVOBJ_CLASS(dev, 0x009f, GR); /* imageblit (nv12) */ -+ NVOBJ_CLASS(dev, 0x008a, GR); /* ifc */ -+ NVOBJ_CLASS(dev, 0x0089, GR); /* sifm */ -+ NVOBJ_CLASS(dev, 0x3089, GR); /* sifm (nv40) */ -+ NVOBJ_CLASS(dev, 0x0062, GR); /* surf2d */ -+ NVOBJ_CLASS(dev, 0x3062, GR); /* surf2d (nv40) */ -+ NVOBJ_CLASS(dev, 0x0043, GR); /* rop */ -+ NVOBJ_CLASS(dev, 0x0012, GR); /* beta1 */ -+ NVOBJ_CLASS(dev, 0x0072, GR); /* beta4 */ -+ NVOBJ_CLASS(dev, 0x0019, GR); /* cliprect */ -+ NVOBJ_CLASS(dev, 0x0044, GR); /* pattern */ -+ NVOBJ_CLASS(dev, 0x309e, GR); /* swzsurf */ -+ -+ /* curie */ -+ if (dev_priv->chipset >= 0x60 || -+ 0x00005450 & (1 << (dev_priv->chipset & 0x0f))) -+ NVOBJ_CLASS(dev, 0x4497, GR); -+ else -+ NVOBJ_CLASS(dev, 0x4097, GR); -+ -+ /* nvsw */ -+ NVOBJ_CLASS(dev, 0x506e, SW); -+ NVOBJ_MTHD (dev, 0x506e, 0x0500, nv04_graph_mthd_page_flip); - -+ dev_priv->engine.graph.registered = true; -+ return 0; -+} -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv40_grctx.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv40_grctx.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv40_grctx.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv40_grctx.c 2010-10-30 22:24:25.000000000 +0200 -@@ -596,13 +596,13 @@ - - offset += 0x0280/4; - for (i = 0; i < 16; i++, offset += 2) -- nv_wo32(dev, obj, offset, 0x3f800000); -+ nv_wo32(obj, offset * 4, 0x3f800000); - - for (vs = 0; vs < vs_nr; vs++, offset += vs_len) { - for (i = 0; i < vs_nr_b0 * 6; i += 6) -- nv_wo32(dev, obj, offset + b0_offset + i, 0x00000001); -+ nv_wo32(obj, (offset + b0_offset + i) * 4, 0x00000001); - for (i = 0; i < vs_nr_b1 * 4; i += 4) -- nv_wo32(dev, obj, offset + b1_offset + i, 0x3f800000); -+ nv_wo32(obj, (offset + b1_offset + i) * 4, 0x3f800000); - } - } - -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_calc.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_calc.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_calc.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_calc.c 2010-10-30 22:24:25.000000000 +0200 -@@ -51,24 +51,28 @@ - int *N, int *fN, int *M, int *P) - { - fixed20_12 fb_div, a, b; -+ u32 refclk = pll->refclk / 10; -+ u32 max_vco_freq = pll->vco1.maxfreq / 10; -+ u32 max_vco_inputfreq = pll->vco1.max_inputfreq / 10; -+ clk /= 10; - -- *P = pll->vco1.maxfreq / clk; -+ *P = max_vco_freq / clk; - if (*P > pll->max_p) - *P = pll->max_p; - if (*P < pll->min_p) - *P = pll->min_p; - -- /* *M = ceil(refclk / pll->vco.max_inputfreq); */ -- a.full = dfixed_const(pll->refclk); -- b.full = dfixed_const(pll->vco1.max_inputfreq); -+ /* *M = floor((refclk + max_vco_inputfreq) / max_vco_inputfreq); */ -+ a.full = dfixed_const(refclk + max_vco_inputfreq); -+ b.full = dfixed_const(max_vco_inputfreq); - a.full = dfixed_div(a, b); -- a.full = dfixed_ceil(a); -+ a.full = dfixed_floor(a); - *M = dfixed_trunc(a); - - /* fb_div = (vco * *M) / refclk; */ - fb_div.full = dfixed_const(clk * *P); - fb_div.full = dfixed_mul(fb_div, a); -- a.full = dfixed_const(pll->refclk); -+ a.full = dfixed_const(refclk); - fb_div.full = dfixed_div(fb_div, a); - - /* *N = floor(fb_div); */ -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_crtc.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_crtc.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_crtc.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_crtc.c 2010-10-30 22:24:25.000000000 +0200 -@@ -104,8 +104,7 @@ - OUT_RING(evo, nv_crtc->lut.depth == 8 ? - NV50_EVO_CRTC_CLUT_MODE_OFF : - NV50_EVO_CRTC_CLUT_MODE_ON); -- OUT_RING(evo, (nv_crtc->lut.nvbo->bo.mem.mm_node->start << -- PAGE_SHIFT) >> 8); -+ OUT_RING(evo, (nv_crtc->lut.nvbo->bo.mem.start << PAGE_SHIFT) >> 8); - if (dev_priv->chipset != 0x50) { - BEGIN_RING(evo, 0, NV84_EVO_CRTC(index, CLUT_DMA), 1); - OUT_RING(evo, NvEvoVRAM); -@@ -266,15 +265,10 @@ - { - struct drm_nouveau_private *dev_priv = dev->dev_private; - struct pll_lims pll; -- uint32_t reg, reg1, reg2; -+ uint32_t reg1, reg2; - int ret, N1, M1, N2, M2, P; - -- if (dev_priv->chipset < NV_C0) -- reg = NV50_PDISPLAY_CRTC_CLK_CTRL1(head); -- else -- reg = 0x614140 + (head * 0x800); -- -- ret = get_pll_limits(dev, reg, &pll); -+ ret = get_pll_limits(dev, PLL_VPLL0 + head, &pll); - if (ret) - return ret; - -@@ -286,11 +280,11 @@ - NV_DEBUG(dev, "pclk %d out %d NM1 %d %d NM2 %d %d P %d\n", - pclk, ret, N1, M1, N2, M2, P); - -- reg1 = nv_rd32(dev, reg + 4) & 0xff00ff00; -- reg2 = nv_rd32(dev, reg + 8) & 0x8000ff00; -- nv_wr32(dev, reg, 0x10000611); -- nv_wr32(dev, reg + 4, reg1 | (M1 << 16) | N1); -- nv_wr32(dev, reg + 8, reg2 | (P << 28) | (M2 << 16) | N2); -+ reg1 = nv_rd32(dev, pll.reg + 4) & 0xff00ff00; -+ reg2 = nv_rd32(dev, pll.reg + 8) & 0x8000ff00; -+ nv_wr32(dev, pll.reg + 0, 0x10000611); -+ nv_wr32(dev, pll.reg + 4, reg1 | (M1 << 16) | N1); -+ nv_wr32(dev, pll.reg + 8, reg2 | (P << 28) | (M2 << 16) | N2); - } else - if (dev_priv->chipset < NV_C0) { - ret = nv50_calc_pll2(dev, &pll, pclk, &N1, &N2, &M1, &P); -@@ -300,10 +294,10 @@ - NV_DEBUG(dev, "pclk %d out %d N %d fN 0x%04x M %d P %d\n", - pclk, ret, N1, N2, M1, P); - -- reg1 = nv_rd32(dev, reg + 4) & 0xffc00000; -- nv_wr32(dev, reg, 0x50000610); -- nv_wr32(dev, reg + 4, reg1 | (P << 16) | (M1 << 8) | N1); -- nv_wr32(dev, reg + 8, N2); -+ reg1 = nv_rd32(dev, pll.reg + 4) & 0xffc00000; -+ nv_wr32(dev, pll.reg + 0, 0x50000610); -+ nv_wr32(dev, pll.reg + 4, reg1 | (P << 16) | (M1 << 8) | N1); -+ nv_wr32(dev, pll.reg + 8, N2); - } else { - ret = nv50_calc_pll2(dev, &pll, pclk, &N1, &N2, &M1, &P); - if (ret <= 0) -@@ -312,9 +306,9 @@ - NV_DEBUG(dev, "pclk %d out %d N %d fN 0x%04x M %d P %d\n", - pclk, ret, N1, N2, M1, P); - -- nv_mask(dev, reg + 0x0c, 0x00000000, 0x00000100); -- nv_wr32(dev, reg + 0x04, (P << 16) | (N1 << 8) | M1); -- nv_wr32(dev, reg + 0x10, N2 << 16); -+ nv_mask(dev, pll.reg + 0x0c, 0x00000000, 0x00000100); -+ nv_wr32(dev, pll.reg + 0x04, (P << 16) | (N1 << 8) | M1); -+ nv_wr32(dev, pll.reg + 0x10, N2 << 16); - } - - return 0; -@@ -338,7 +332,9 @@ - - nv50_cursor_fini(nv_crtc); - -+ nouveau_bo_unmap(nv_crtc->lut.nvbo); - nouveau_bo_ref(NULL, &nv_crtc->lut.nvbo); -+ nouveau_bo_unmap(nv_crtc->cursor.nvbo); - nouveau_bo_ref(NULL, &nv_crtc->cursor.nvbo); - kfree(nv_crtc->mode); - kfree(nv_crtc); -@@ -441,6 +437,7 @@ - .cursor_move = nv50_crtc_cursor_move, - .gamma_set = nv50_crtc_gamma_set, - .set_config = drm_crtc_helper_set_config, -+ .page_flip = nouveau_crtc_page_flip, - .destroy = nv50_crtc_destroy, - }; - -@@ -457,6 +454,7 @@ - - NV_DEBUG_KMS(dev, "index %d\n", nv_crtc->index); - -+ drm_vblank_pre_modeset(dev, nv_crtc->index); - nv50_crtc_blank(nv_crtc, true); - } - -@@ -472,6 +470,7 @@ - NV_DEBUG_KMS(dev, "index %d\n", nv_crtc->index); - - nv50_crtc_blank(nv_crtc, false); -+ drm_vblank_post_modeset(dev, nv_crtc->index); - - ret = RING_SPACE(evo, 2); - if (ret) { -@@ -536,7 +535,7 @@ - } - - nv_crtc->fb.offset = fb->nvbo->bo.offset - dev_priv->vm_vram_base; -- nv_crtc->fb.tile_flags = fb->nvbo->tile_flags; -+ nv_crtc->fb.tile_flags = nouveau_bo_tile_layout(fb->nvbo); - nv_crtc->fb.cpp = drm_fb->bits_per_pixel / 8; - if (!nv_crtc->fb.blanked && dev_priv->chipset != 0x50) { - ret = RING_SPACE(evo, 2); -@@ -568,7 +567,7 @@ - fb->nvbo->tile_mode); - } - if (dev_priv->chipset == 0x50) -- OUT_RING(evo, (fb->nvbo->tile_flags << 8) | format); -+ OUT_RING(evo, (nv_crtc->fb.tile_flags << 8) | format); - else - OUT_RING(evo, format); - -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_cursor.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_cursor.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_cursor.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_cursor.c 2010-10-30 22:24:25.000000000 +0200 -@@ -147,7 +147,7 @@ - NV_DEBUG_KMS(dev, "\n"); - - nv_wr32(dev, NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(idx), 0); -- if (!nv_wait(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(idx), -+ if (!nv_wait(dev, NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(idx), - NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS, 0)) { - NV_ERROR(dev, "timeout: CURSOR_CTRL2_STATUS == 0\n"); - NV_ERROR(dev, "CURSOR_CTRL2 = 0x%08x\n", -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_dac.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_dac.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_dac.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_dac.c 2010-10-30 22:24:25.000000000 +0200 -@@ -79,7 +79,7 @@ - - nv_wr32(dev, NV50_PDISPLAY_DAC_DPMS_CTRL(or), - 0x00150000 | NV50_PDISPLAY_DAC_DPMS_CTRL_PENDING); -- if (!nv_wait(NV50_PDISPLAY_DAC_DPMS_CTRL(or), -+ if (!nv_wait(dev, NV50_PDISPLAY_DAC_DPMS_CTRL(or), - NV50_PDISPLAY_DAC_DPMS_CTRL_PENDING, 0)) { - NV_ERROR(dev, "timeout: DAC_DPMS_CTRL_PENDING(%d) == 0\n", or); - NV_ERROR(dev, "DAC_DPMS_CTRL(%d) = 0x%08x\n", or, -@@ -130,7 +130,7 @@ - NV_DEBUG_KMS(dev, "or %d mode %d\n", or, mode); - - /* wait for it to be done */ -- if (!nv_wait(NV50_PDISPLAY_DAC_DPMS_CTRL(or), -+ if (!nv_wait(dev, NV50_PDISPLAY_DAC_DPMS_CTRL(or), - NV50_PDISPLAY_DAC_DPMS_CTRL_PENDING, 0)) { - NV_ERROR(dev, "timeout: DAC_DPMS_CTRL_PENDING(%d) == 0\n", or); - NV_ERROR(dev, "DAC_DPMS_CTRL(%d) = 0x%08x\n", or, -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_display.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_display.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_display.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_display.c 2010-10-30 22:24:25.000000000 +0200 -@@ -30,154 +30,20 @@ - #include "nouveau_connector.h" - #include "nouveau_fb.h" - #include "nouveau_fbcon.h" -+#include "nouveau_ramht.h" - #include "drm_crtc_helper.h" - --static void --nv50_evo_channel_del(struct nouveau_channel **pchan) --{ -- struct nouveau_channel *chan = *pchan; -- -- if (!chan) -- return; -- *pchan = NULL; -- -- nouveau_gpuobj_channel_takedown(chan); -- nouveau_bo_ref(NULL, &chan->pushbuf_bo); -- -- if (chan->user) -- iounmap(chan->user); -- -- kfree(chan); --} -- --static int --nv50_evo_dmaobj_new(struct nouveau_channel *evo, uint32_t class, uint32_t name, -- uint32_t tile_flags, uint32_t magic_flags, -- uint32_t offset, uint32_t limit) --{ -- struct drm_nouveau_private *dev_priv = evo->dev->dev_private; -- struct drm_device *dev = evo->dev; -- struct nouveau_gpuobj *obj = NULL; -- int ret; -- -- ret = nouveau_gpuobj_new(dev, evo, 6*4, 32, 0, &obj); -- if (ret) -- return ret; -- obj->engine = NVOBJ_ENGINE_DISPLAY; -- -- ret = nouveau_gpuobj_ref_add(dev, evo, name, obj, NULL); -- if (ret) { -- nouveau_gpuobj_del(dev, &obj); -- return ret; -- } -- -- nv_wo32(dev, obj, 0, (tile_flags << 22) | (magic_flags << 16) | class); -- nv_wo32(dev, obj, 1, limit); -- nv_wo32(dev, obj, 2, offset); -- nv_wo32(dev, obj, 3, 0x00000000); -- nv_wo32(dev, obj, 4, 0x00000000); -- if (dev_priv->card_type < NV_C0) -- nv_wo32(dev, obj, 5, 0x00010000); -- else -- nv_wo32(dev, obj, 5, 0x00020000); -- dev_priv->engine.instmem.flush(dev); -- -- return 0; --} -- --static int --nv50_evo_channel_new(struct drm_device *dev, struct nouveau_channel **pchan) -+static inline int -+nv50_sor_nr(struct drm_device *dev) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; -- struct nouveau_channel *chan; -- int ret; -- -- chan = kzalloc(sizeof(struct nouveau_channel), GFP_KERNEL); -- if (!chan) -- return -ENOMEM; -- *pchan = chan; -- -- chan->id = -1; -- chan->dev = dev; -- chan->user_get = 4; -- chan->user_put = 0; -- -- INIT_LIST_HEAD(&chan->ramht_refs); -- -- ret = nouveau_gpuobj_new_ref(dev, NULL, NULL, 0, 32768, 0x1000, -- NVOBJ_FLAG_ZERO_ALLOC, &chan->ramin); -- if (ret) { -- NV_ERROR(dev, "Error allocating EVO channel memory: %d\n", ret); -- nv50_evo_channel_del(pchan); -- return ret; -- } -- -- ret = drm_mm_init(&chan->ramin_heap, -- chan->ramin->gpuobj->im_pramin->start, 32768); -- if (ret) { -- NV_ERROR(dev, "Error initialising EVO PRAMIN heap: %d\n", ret); -- nv50_evo_channel_del(pchan); -- return ret; -- } -- -- ret = nouveau_gpuobj_new_ref(dev, chan, chan, 0, 4096, 16, -- 0, &chan->ramht); -- if (ret) { -- NV_ERROR(dev, "Unable to allocate EVO RAMHT: %d\n", ret); -- nv50_evo_channel_del(pchan); -- return ret; -- } -- -- if (dev_priv->chipset != 0x50) { -- ret = nv50_evo_dmaobj_new(chan, 0x3d, NvEvoFB16, 0x70, 0x19, -- 0, 0xffffffff); -- if (ret) { -- nv50_evo_channel_del(pchan); -- return ret; -- } -- -- -- ret = nv50_evo_dmaobj_new(chan, 0x3d, NvEvoFB32, 0x7a, 0x19, -- 0, 0xffffffff); -- if (ret) { -- nv50_evo_channel_del(pchan); -- return ret; -- } -- } -- -- ret = nv50_evo_dmaobj_new(chan, 0x3d, NvEvoVRAM, 0, 0x19, -- 0, dev_priv->vram_size); -- if (ret) { -- nv50_evo_channel_del(pchan); -- return ret; -- } -- -- ret = nouveau_bo_new(dev, NULL, 4096, 0, TTM_PL_FLAG_VRAM, 0, 0, -- false, true, &chan->pushbuf_bo); -- if (ret == 0) -- ret = nouveau_bo_pin(chan->pushbuf_bo, TTM_PL_FLAG_VRAM); -- if (ret) { -- NV_ERROR(dev, "Error creating EVO DMA push buffer: %d\n", ret); -- nv50_evo_channel_del(pchan); -- return ret; -- } - -- ret = nouveau_bo_map(chan->pushbuf_bo); -- if (ret) { -- NV_ERROR(dev, "Error mapping EVO DMA push buffer: %d\n", ret); -- nv50_evo_channel_del(pchan); -- return ret; -- } -+ if (dev_priv->chipset < 0x90 || -+ dev_priv->chipset == 0x92 || -+ dev_priv->chipset == 0xa0) -+ return 2; - -- chan->user = ioremap(pci_resource_start(dev->pdev, 0) + -- NV50_PDISPLAY_USER(0), PAGE_SIZE); -- if (!chan->user) { -- NV_ERROR(dev, "Error mapping EVO control regs.\n"); -- nv50_evo_channel_del(pchan); -- return -ENOMEM; -- } -- -- return 0; -+ return 4; - } - - int -@@ -195,17 +61,16 @@ - nv50_display_init(struct drm_device *dev) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; -- struct nouveau_timer_engine *ptimer = &dev_priv->engine.timer; - struct nouveau_gpio_engine *pgpio = &dev_priv->engine.gpio; -- struct nouveau_channel *evo = dev_priv->evo; - struct drm_connector *connector; -- uint32_t val, ram_amount; -- uint64_t start; -+ struct nouveau_channel *evo; - int ret, i; -+ u32 val; - - NV_DEBUG_KMS(dev, "\n"); - - nv_wr32(dev, 0x00610184, nv_rd32(dev, 0x00614004)); -+ - /* - * I think the 0x006101XX range is some kind of main control area - * that enables things. -@@ -221,17 +86,20 @@ - val = nv_rd32(dev, 0x0061610c + (i * 0x800)); - nv_wr32(dev, 0x0061019c + (i * 0x10), val); - } -+ - /* DAC */ - for (i = 0; i < 3; i++) { - val = nv_rd32(dev, 0x0061a000 + (i * 0x800)); - nv_wr32(dev, 0x006101d0 + (i * 0x04), val); - } -+ - /* SOR */ -- for (i = 0; i < 4; i++) { -+ for (i = 0; i < nv50_sor_nr(dev); i++) { - val = nv_rd32(dev, 0x0061c000 + (i * 0x800)); - nv_wr32(dev, 0x006101e0 + (i * 0x04), val); - } -- /* Something not yet in use, tv-out maybe. */ -+ -+ /* EXT */ - for (i = 0; i < 3; i++) { - val = nv_rd32(dev, 0x0061e000 + (i * 0x800)); - nv_wr32(dev, 0x006101f0 + (i * 0x04), val); -@@ -243,24 +111,13 @@ - nv_wr32(dev, NV50_PDISPLAY_DAC_CLK_CTRL1(i), 0x00000001); - } - -- /* This used to be in crtc unblank, but seems out of place there. */ -- nv_wr32(dev, NV50_PDISPLAY_UNK_380, 0); -- /* RAM is clamped to 256 MiB. */ -- ram_amount = dev_priv->vram_size; -- NV_DEBUG_KMS(dev, "ram_amount %d\n", ram_amount); -- if (ram_amount > 256*1024*1024) -- ram_amount = 256*1024*1024; -- nv_wr32(dev, NV50_PDISPLAY_RAM_AMOUNT, ram_amount - 1); -- nv_wr32(dev, NV50_PDISPLAY_UNK_388, 0x150000); -- nv_wr32(dev, NV50_PDISPLAY_UNK_38C, 0); -- - /* The precise purpose is unknown, i suspect it has something to do - * with text mode. - */ - if (nv_rd32(dev, NV50_PDISPLAY_INTR_1) & 0x100) { - nv_wr32(dev, NV50_PDISPLAY_INTR_1, 0x100); - nv_wr32(dev, 0x006194e8, nv_rd32(dev, 0x006194e8) & ~1); -- if (!nv_wait(0x006194e8, 2, 0)) { -+ if (!nv_wait(dev, 0x006194e8, 2, 0)) { - NV_ERROR(dev, "timeout: (0x6194e8 & 2) != 0\n"); - NV_ERROR(dev, "0x6194e8 = 0x%08x\n", - nv_rd32(dev, 0x6194e8)); -@@ -268,39 +125,9 @@ - } - } - -- /* taken from nv bug #12637, attempts to un-wedge the hw if it's -- * stuck in some unspecified state -- */ -- start = ptimer->read(dev); -- nv_wr32(dev, NV50_PDISPLAY_CHANNEL_STAT(0), 0x2b00); -- while ((val = nv_rd32(dev, NV50_PDISPLAY_CHANNEL_STAT(0))) & 0x1e0000) { -- if ((val & 0x9f0000) == 0x20000) -- nv_wr32(dev, NV50_PDISPLAY_CHANNEL_STAT(0), -- val | 0x800000); -- -- if ((val & 0x3f0000) == 0x30000) -- nv_wr32(dev, NV50_PDISPLAY_CHANNEL_STAT(0), -- val | 0x200000); -- -- if (ptimer->read(dev) - start > 1000000000ULL) { -- NV_ERROR(dev, "timeout: (0x610200 & 0x1e0000) != 0\n"); -- NV_ERROR(dev, "0x610200 = 0x%08x\n", val); -- return -EBUSY; -- } -- } -- -- nv_wr32(dev, NV50_PDISPLAY_CTRL_STATE, NV50_PDISPLAY_CTRL_STATE_ENABLE); -- nv_wr32(dev, NV50_PDISPLAY_CHANNEL_STAT(0), 0x1000b03); -- if (!nv_wait(NV50_PDISPLAY_CHANNEL_STAT(0), 0x40000000, 0x40000000)) { -- NV_ERROR(dev, "timeout: (0x610200 & 0x40000000) == 0x40000000\n"); -- NV_ERROR(dev, "0x610200 = 0x%08x\n", -- nv_rd32(dev, NV50_PDISPLAY_CHANNEL_STAT(0))); -- return -EBUSY; -- } -- - for (i = 0; i < 2; i++) { - nv_wr32(dev, NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(i), 0x2000); -- if (!nv_wait(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(i), -+ if (!nv_wait(dev, NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(i), - NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS, 0)) { - NV_ERROR(dev, "timeout: CURSOR_CTRL2_STATUS == 0\n"); - NV_ERROR(dev, "CURSOR_CTRL2 = 0x%08x\n", -@@ -310,7 +137,7 @@ - - nv_wr32(dev, NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(i), - NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_ON); -- if (!nv_wait(NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(i), -+ if (!nv_wait(dev, NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(i), - NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS, - NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS_ACTIVE)) { - NV_ERROR(dev, "timeout: " -@@ -321,39 +148,31 @@ - } - } - -- nv_wr32(dev, NV50_PDISPLAY_OBJECTS, (evo->ramin->instance >> 8) | 9); -+ nv_wr32(dev, NV50_PDISPLAY_PIO_CTRL, 0x00000000); -+ nv_mask(dev, NV50_PDISPLAY_INTR_0, 0x00000000, 0x00000000); -+ nv_wr32(dev, NV50_PDISPLAY_INTR_EN_0, 0x00000000); -+ nv_mask(dev, NV50_PDISPLAY_INTR_1, 0x00000000, 0x00000000); -+ nv_wr32(dev, NV50_PDISPLAY_INTR_EN_1, -+ NV50_PDISPLAY_INTR_EN_1_CLK_UNK10 | -+ NV50_PDISPLAY_INTR_EN_1_CLK_UNK20 | -+ NV50_PDISPLAY_INTR_EN_1_CLK_UNK40); -+ -+ /* enable hotplug interrupts */ -+ list_for_each_entry(connector, &dev->mode_config.connector_list, head) { -+ struct nouveau_connector *conn = nouveau_connector(connector); -+ -+ if (conn->dcb->gpio_tag == 0xff) -+ continue; - -- /* initialise fifo */ -- nv_wr32(dev, NV50_PDISPLAY_CHANNEL_DMA_CB(0), -- ((evo->pushbuf_bo->bo.mem.mm_node->start << PAGE_SHIFT) >> 8) | -- NV50_PDISPLAY_CHANNEL_DMA_CB_LOCATION_VRAM | -- NV50_PDISPLAY_CHANNEL_DMA_CB_VALID); -- nv_wr32(dev, NV50_PDISPLAY_CHANNEL_UNK2(0), 0x00010000); -- nv_wr32(dev, NV50_PDISPLAY_CHANNEL_UNK3(0), 0x00000002); -- if (!nv_wait(0x610200, 0x80000000, 0x00000000)) { -- NV_ERROR(dev, "timeout: (0x610200 & 0x80000000) == 0\n"); -- NV_ERROR(dev, "0x610200 = 0x%08x\n", nv_rd32(dev, 0x610200)); -- return -EBUSY; -- } -- nv_wr32(dev, NV50_PDISPLAY_CHANNEL_STAT(0), -- (nv_rd32(dev, NV50_PDISPLAY_CHANNEL_STAT(0)) & ~0x00000003) | -- NV50_PDISPLAY_CHANNEL_STAT_DMA_ENABLED); -- nv_wr32(dev, NV50_PDISPLAY_USER_PUT(0), 0); -- nv_wr32(dev, NV50_PDISPLAY_CHANNEL_STAT(0), 0x01000003 | -- NV50_PDISPLAY_CHANNEL_STAT_DMA_ENABLED); -- nv_wr32(dev, 0x610300, nv_rd32(dev, 0x610300) & ~1); -- -- evo->dma.max = (4096/4) - 2; -- evo->dma.put = 0; -- evo->dma.cur = evo->dma.put; -- evo->dma.free = evo->dma.max - evo->dma.cur; -+ pgpio->irq_enable(dev, conn->dcb->gpio_tag, true); -+ } - -- ret = RING_SPACE(evo, NOUVEAU_DMA_SKIPS); -+ ret = nv50_evo_init(dev); - if (ret) - return ret; -+ evo = dev_priv->evo; - -- for (i = 0; i < NOUVEAU_DMA_SKIPS; i++) -- OUT_RING(evo, 0); -+ nv_wr32(dev, NV50_PDISPLAY_OBJECTS, (evo->ramin->vinst >> 8) | 9); - - ret = RING_SPACE(evo, 11); - if (ret) -@@ -370,24 +189,9 @@ - BEGIN_RING(evo, 0, NV50_EVO_CRTC(0, UNK082C), 1); - OUT_RING(evo, 0); - FIRE_RING(evo); -- if (!nv_wait(0x640004, 0xffffffff, evo->dma.put << 2)) -+ if (!nv_wait(dev, 0x640004, 0xffffffff, evo->dma.put << 2)) - NV_ERROR(dev, "evo pushbuf stalled\n"); - -- /* enable clock change interrupts. */ -- nv_wr32(dev, 0x610028, 0x00010001); -- nv_wr32(dev, NV50_PDISPLAY_INTR_EN, (NV50_PDISPLAY_INTR_EN_CLK_UNK10 | -- NV50_PDISPLAY_INTR_EN_CLK_UNK20 | -- NV50_PDISPLAY_INTR_EN_CLK_UNK40)); -- -- /* enable hotplug interrupts */ -- list_for_each_entry(connector, &dev->mode_config.connector_list, head) { -- struct nouveau_connector *conn = nouveau_connector(connector); -- -- if (conn->dcb->gpio_tag == 0xff) -- continue; -- -- pgpio->irq_enable(dev, conn->dcb->gpio_tag, true); -- } - - return 0; - } -@@ -424,7 +228,7 @@ - continue; - - nv_wr32(dev, NV50_PDISPLAY_INTR_1, mask); -- if (!nv_wait(NV50_PDISPLAY_INTR_1, mask, mask)) { -+ if (!nv_wait(dev, NV50_PDISPLAY_INTR_1, mask, mask)) { - NV_ERROR(dev, "timeout: (0x610024 & 0x%08x) == " - "0x%08x\n", mask, mask); - NV_ERROR(dev, "0x610024 = 0x%08x\n", -@@ -432,16 +236,10 @@ - } - } - -- nv_wr32(dev, NV50_PDISPLAY_CHANNEL_STAT(0), 0); -- nv_wr32(dev, NV50_PDISPLAY_CTRL_STATE, 0); -- if (!nv_wait(NV50_PDISPLAY_CHANNEL_STAT(0), 0x1e0000, 0)) { -- NV_ERROR(dev, "timeout: (0x610200 & 0x1e0000) == 0\n"); -- NV_ERROR(dev, "0x610200 = 0x%08x\n", -- nv_rd32(dev, NV50_PDISPLAY_CHANNEL_STAT(0))); -- } -+ nv50_evo_fini(dev); - - for (i = 0; i < 3; i++) { -- if (!nv_wait(NV50_PDISPLAY_SOR_DPMS_STATE(i), -+ if (!nv_wait(dev, NV50_PDISPLAY_SOR_DPMS_STATE(i), - NV50_PDISPLAY_SOR_DPMS_STATE_WAIT, 0)) { - NV_ERROR(dev, "timeout: SOR_DPMS_STATE_WAIT(%d) == 0\n", i); - NV_ERROR(dev, "SOR_DPMS_STATE(%d) = 0x%08x\n", i, -@@ -450,7 +248,7 @@ - } - - /* disable interrupts. */ -- nv_wr32(dev, NV50_PDISPLAY_INTR_EN, 0x00000000); -+ nv_wr32(dev, NV50_PDISPLAY_INTR_EN_1, 0x00000000); - - /* disable hotplug interrupts */ - nv_wr32(dev, 0xe054, 0xffffffff); -@@ -488,13 +286,6 @@ - - dev->mode_config.fb_base = dev_priv->fb_phys; - -- /* Create EVO channel */ -- ret = nv50_evo_channel_new(dev, &dev_priv->evo); -- if (ret) { -- NV_ERROR(dev, "Error creating EVO channel: %d\n", ret); -- return ret; -- } -- - /* Create CRTC objects */ - for (i = 0; i < 2; i++) - nv50_crtc_create(dev, i); -@@ -549,14 +340,11 @@ - void - nv50_display_destroy(struct drm_device *dev) - { -- struct drm_nouveau_private *dev_priv = dev->dev_private; -- - NV_DEBUG_KMS(dev, "\n"); - - drm_mode_config_cleanup(dev); - - nv50_display_disable(dev); -- nv50_evo_channel_del(&dev_priv->evo); - } - - static u16 -@@ -640,32 +428,32 @@ - nv50_display_vblank_crtc_handler(struct drm_device *dev, int crtc) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; -- struct nouveau_channel *chan; -- struct list_head *entry, *tmp; -+ struct nouveau_channel *chan, *tmp; - -- list_for_each_safe(entry, tmp, &dev_priv->vbl_waiting) { -- chan = list_entry(entry, struct nouveau_channel, nvsw.vbl_wait); -+ list_for_each_entry_safe(chan, tmp, &dev_priv->vbl_waiting, -+ nvsw.vbl_wait) { -+ if (chan->nvsw.vblsem_head != crtc) -+ continue; - - nouveau_bo_wr32(chan->notifier_bo, chan->nvsw.vblsem_offset, - chan->nvsw.vblsem_rval); - list_del(&chan->nvsw.vbl_wait); -+ drm_vblank_put(dev, crtc); - } -+ -+ drm_handle_vblank(dev, crtc); - } - - static void - nv50_display_vblank_handler(struct drm_device *dev, uint32_t intr) - { -- intr &= NV50_PDISPLAY_INTR_1_VBLANK_CRTC; -- - if (intr & NV50_PDISPLAY_INTR_1_VBLANK_CRTC_0) - nv50_display_vblank_crtc_handler(dev, 0); - - if (intr & NV50_PDISPLAY_INTR_1_VBLANK_CRTC_1) - nv50_display_vblank_crtc_handler(dev, 1); - -- nv_wr32(dev, NV50_PDISPLAY_INTR_EN, nv_rd32(dev, -- NV50_PDISPLAY_INTR_EN) & ~intr); -- nv_wr32(dev, NV50_PDISPLAY_INTR_1, intr); -+ nv_wr32(dev, NV50_PDISPLAY_INTR_1, NV50_PDISPLAY_INTR_1_VBLANK_CRTC); - } - - static void -@@ -710,7 +498,7 @@ - or = i; - } - -- for (i = 0; type == OUTPUT_ANY && i < 4; i++) { -+ for (i = 0; type == OUTPUT_ANY && i < nv50_sor_nr(dev); i++) { - if (dev_priv->chipset < 0x90 || - dev_priv->chipset == 0x92 || - dev_priv->chipset == 0xa0) -@@ -841,7 +629,7 @@ - or = i; - } - -- for (i = 0; type == OUTPUT_ANY && i < 4; i++) { -+ for (i = 0; type == OUTPUT_ANY && i < nv50_sor_nr(dev); i++) { - if (dev_priv->chipset < 0x90 || - dev_priv->chipset == 0x92 || - dev_priv->chipset == 0xa0) -@@ -991,16 +779,23 @@ - static void - nv50_display_error_handler(struct drm_device *dev) - { -- uint32_t addr, data; -+ u32 channels = (nv_rd32(dev, NV50_PDISPLAY_INTR_0) & 0x001f0000) >> 16; -+ u32 addr, data; -+ int chid; -+ -+ for (chid = 0; chid < 5; chid++) { -+ if (!(channels & (1 << chid))) -+ continue; -+ -+ nv_wr32(dev, NV50_PDISPLAY_INTR_0, 0x00010000 << chid); -+ addr = nv_rd32(dev, NV50_PDISPLAY_TRAPPED_ADDR(chid)); -+ data = nv_rd32(dev, NV50_PDISPLAY_TRAPPED_DATA(chid)); -+ NV_ERROR(dev, "EvoCh %d Mthd 0x%04x Data 0x%08x " -+ "(0x%04x 0x%02x)\n", chid, -+ addr & 0xffc, data, addr >> 16, (addr >> 12) & 0xf); - -- nv_wr32(dev, NV50_PDISPLAY_INTR_0, 0x00010000); -- addr = nv_rd32(dev, NV50_PDISPLAY_TRAPPED_ADDR); -- data = nv_rd32(dev, NV50_PDISPLAY_TRAPPED_DATA); -- -- NV_ERROR(dev, "EvoCh %d Mthd 0x%04x Data 0x%08x (0x%04x 0x%02x)\n", -- 0, addr & 0xffc, data, addr >> 16, (addr >> 12) & 0xf); -- -- nv_wr32(dev, NV50_PDISPLAY_TRAPPED_ADDR, 0x90000000); -+ nv_wr32(dev, NV50_PDISPLAY_TRAPPED_ADDR(chid), 0x90000000); -+ } - } - - void -@@ -1086,9 +881,9 @@ - if (!intr0 && !(intr1 & ~delayed)) - break; - -- if (intr0 & 0x00010000) { -+ if (intr0 & 0x001f0000) { - nv50_display_error_handler(dev); -- intr0 &= ~0x00010000; -+ intr0 &= ~0x001f0000; - } - - if (intr1 & NV50_PDISPLAY_INTR_1_VBLANK_CRTC) { -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_evo.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_evo.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_evo.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_evo.c 2010-10-30 22:24:25.000000000 +0200 -@@ -0,0 +1,318 @@ -+/* -+ * Copyright 2010 Red Hat Inc. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be included in -+ * all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR -+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ * -+ * Authors: Ben Skeggs -+ */ -+ -+#include "drmP.h" -+ -+#include "nouveau_drv.h" -+#include "nouveau_dma.h" -+#include "nouveau_ramht.h" -+ -+static void -+nv50_evo_channel_del(struct nouveau_channel **pevo) -+{ -+ struct drm_nouveau_private *dev_priv; -+ struct nouveau_channel *evo = *pevo; -+ -+ if (!evo) -+ return; -+ *pevo = NULL; -+ -+ dev_priv = evo->dev->dev_private; -+ dev_priv->evo_alloc &= ~(1 << evo->id); -+ -+ nouveau_gpuobj_channel_takedown(evo); -+ nouveau_bo_unmap(evo->pushbuf_bo); -+ nouveau_bo_ref(NULL, &evo->pushbuf_bo); -+ -+ if (evo->user) -+ iounmap(evo->user); -+ -+ kfree(evo); -+} -+ -+int -+nv50_evo_dmaobj_new(struct nouveau_channel *evo, u32 class, u32 name, -+ u32 tile_flags, u32 magic_flags, u32 offset, u32 limit) -+{ -+ struct drm_nouveau_private *dev_priv = evo->dev->dev_private; -+ struct drm_device *dev = evo->dev; -+ struct nouveau_gpuobj *obj = NULL; -+ int ret; -+ -+ ret = nouveau_gpuobj_new(dev, dev_priv->evo, 6*4, 32, 0, &obj); -+ if (ret) -+ return ret; -+ obj->engine = NVOBJ_ENGINE_DISPLAY; -+ -+ nv_wo32(obj, 0, (tile_flags << 22) | (magic_flags << 16) | class); -+ nv_wo32(obj, 4, limit); -+ nv_wo32(obj, 8, offset); -+ nv_wo32(obj, 12, 0x00000000); -+ nv_wo32(obj, 16, 0x00000000); -+ if (dev_priv->card_type < NV_C0) -+ nv_wo32(obj, 20, 0x00010000); -+ else -+ nv_wo32(obj, 20, 0x00020000); -+ dev_priv->engine.instmem.flush(dev); -+ -+ ret = nouveau_ramht_insert(evo, name, obj); -+ nouveau_gpuobj_ref(NULL, &obj); -+ if (ret) { -+ return ret; -+ } -+ -+ return 0; -+} -+ -+static int -+nv50_evo_channel_new(struct drm_device *dev, struct nouveau_channel **pevo) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_channel *evo; -+ int ret; -+ -+ evo = kzalloc(sizeof(struct nouveau_channel), GFP_KERNEL); -+ if (!evo) -+ return -ENOMEM; -+ *pevo = evo; -+ -+ for (evo->id = 0; evo->id < 5; evo->id++) { -+ if (dev_priv->evo_alloc & (1 << evo->id)) -+ continue; -+ -+ dev_priv->evo_alloc |= (1 << evo->id); -+ break; -+ } -+ -+ if (evo->id == 5) { -+ kfree(evo); -+ return -ENODEV; -+ } -+ -+ evo->dev = dev; -+ evo->user_get = 4; -+ evo->user_put = 0; -+ -+ ret = nouveau_bo_new(dev, NULL, 4096, 0, TTM_PL_FLAG_VRAM, 0, 0, -+ false, true, &evo->pushbuf_bo); -+ if (ret == 0) -+ ret = nouveau_bo_pin(evo->pushbuf_bo, TTM_PL_FLAG_VRAM); -+ if (ret) { -+ NV_ERROR(dev, "Error creating EVO DMA push buffer: %d\n", ret); -+ nv50_evo_channel_del(pevo); -+ return ret; -+ } -+ -+ ret = nouveau_bo_map(evo->pushbuf_bo); -+ if (ret) { -+ NV_ERROR(dev, "Error mapping EVO DMA push buffer: %d\n", ret); -+ nv50_evo_channel_del(pevo); -+ return ret; -+ } -+ -+ evo->user = ioremap(pci_resource_start(dev->pdev, 0) + -+ NV50_PDISPLAY_USER(evo->id), PAGE_SIZE); -+ if (!evo->user) { -+ NV_ERROR(dev, "Error mapping EVO control regs.\n"); -+ nv50_evo_channel_del(pevo); -+ return -ENOMEM; -+ } -+ -+ /* bind primary evo channel's ramht to the channel */ -+ if (dev_priv->evo && evo != dev_priv->evo) -+ nouveau_ramht_ref(dev_priv->evo->ramht, &evo->ramht, NULL); -+ -+ return 0; -+} -+ -+static int -+nv50_evo_channel_init(struct nouveau_channel *evo) -+{ -+ struct drm_device *dev = evo->dev; -+ int id = evo->id, ret, i; -+ u64 pushbuf = evo->pushbuf_bo->bo.mem.start << PAGE_SHIFT; -+ u32 tmp; -+ -+ tmp = nv_rd32(dev, NV50_PDISPLAY_EVO_CTRL(id)); -+ if ((tmp & 0x009f0000) == 0x00020000) -+ nv_wr32(dev, NV50_PDISPLAY_EVO_CTRL(id), tmp | 0x00800000); -+ -+ tmp = nv_rd32(dev, NV50_PDISPLAY_EVO_CTRL(id)); -+ if ((tmp & 0x003f0000) == 0x00030000) -+ nv_wr32(dev, NV50_PDISPLAY_EVO_CTRL(id), tmp | 0x00600000); -+ -+ /* initialise fifo */ -+ nv_wr32(dev, NV50_PDISPLAY_EVO_DMA_CB(id), pushbuf >> 8 | -+ NV50_PDISPLAY_EVO_DMA_CB_LOCATION_VRAM | -+ NV50_PDISPLAY_EVO_DMA_CB_VALID); -+ nv_wr32(dev, NV50_PDISPLAY_EVO_UNK2(id), 0x00010000); -+ nv_wr32(dev, NV50_PDISPLAY_EVO_HASH_TAG(id), id); -+ nv_mask(dev, NV50_PDISPLAY_EVO_CTRL(id), NV50_PDISPLAY_EVO_CTRL_DMA, -+ NV50_PDISPLAY_EVO_CTRL_DMA_ENABLED); -+ -+ nv_wr32(dev, NV50_PDISPLAY_USER_PUT(id), 0x00000000); -+ nv_wr32(dev, NV50_PDISPLAY_EVO_CTRL(id), 0x01000003 | -+ NV50_PDISPLAY_EVO_CTRL_DMA_ENABLED); -+ if (!nv_wait(dev, NV50_PDISPLAY_EVO_CTRL(id), 0x80000000, 0x00000000)) { -+ NV_ERROR(dev, "EvoCh %d init timeout: 0x%08x\n", id, -+ nv_rd32(dev, NV50_PDISPLAY_EVO_CTRL(id))); -+ return -EBUSY; -+ } -+ -+ /* enable error reporting on the channel */ -+ nv_mask(dev, 0x610028, 0x00000000, 0x00010001 << id); -+ -+ evo->dma.max = (4096/4) - 2; -+ evo->dma.put = 0; -+ evo->dma.cur = evo->dma.put; -+ evo->dma.free = evo->dma.max - evo->dma.cur; -+ -+ ret = RING_SPACE(evo, NOUVEAU_DMA_SKIPS); -+ if (ret) -+ return ret; -+ -+ for (i = 0; i < NOUVEAU_DMA_SKIPS; i++) -+ OUT_RING(evo, 0); -+ -+ return 0; -+} -+ -+static void -+nv50_evo_channel_fini(struct nouveau_channel *evo) -+{ -+ struct drm_device *dev = evo->dev; -+ int id = evo->id; -+ -+ nv_mask(dev, 0x610028, 0x00010001 << id, 0x00000000); -+ nv_mask(dev, NV50_PDISPLAY_EVO_CTRL(id), 0x00001010, 0x00001000); -+ nv_wr32(dev, NV50_PDISPLAY_INTR_0, (1 << id)); -+ nv_mask(dev, NV50_PDISPLAY_EVO_CTRL(id), 0x00000003, 0x00000000); -+ if (!nv_wait(dev, NV50_PDISPLAY_EVO_CTRL(id), 0x001e0000, 0x00000000)) { -+ NV_ERROR(dev, "EvoCh %d takedown timeout: 0x%08x\n", id, -+ nv_rd32(dev, NV50_PDISPLAY_EVO_CTRL(id))); -+ } -+} -+ -+static int -+nv50_evo_create(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_gpuobj *ramht = NULL; -+ struct nouveau_channel *evo; -+ int ret; -+ -+ /* create primary evo channel, the one we use for modesetting -+ * purporses -+ */ -+ ret = nv50_evo_channel_new(dev, &dev_priv->evo); -+ if (ret) -+ return ret; -+ evo = dev_priv->evo; -+ -+ /* setup object management on it, any other evo channel will -+ * use this also as there's no per-channel support on the -+ * hardware -+ */ -+ ret = nouveau_gpuobj_new(dev, NULL, 32768, 65536, -+ NVOBJ_FLAG_ZERO_ALLOC, &evo->ramin); -+ if (ret) { -+ NV_ERROR(dev, "Error allocating EVO channel memory: %d\n", ret); -+ nv50_evo_channel_del(&dev_priv->evo); -+ return ret; -+ } -+ -+ ret = drm_mm_init(&evo->ramin_heap, 0, 32768); -+ if (ret) { -+ NV_ERROR(dev, "Error initialising EVO PRAMIN heap: %d\n", ret); -+ nv50_evo_channel_del(&dev_priv->evo); -+ return ret; -+ } -+ -+ ret = nouveau_gpuobj_new(dev, evo, 4096, 16, 0, &ramht); -+ if (ret) { -+ NV_ERROR(dev, "Unable to allocate EVO RAMHT: %d\n", ret); -+ nv50_evo_channel_del(&dev_priv->evo); -+ return ret; -+ } -+ -+ ret = nouveau_ramht_new(dev, ramht, &evo->ramht); -+ nouveau_gpuobj_ref(NULL, &ramht); -+ if (ret) { -+ nv50_evo_channel_del(&dev_priv->evo); -+ return ret; -+ } -+ -+ /* create some default objects for the scanout memtypes we support */ -+ if (dev_priv->chipset != 0x50) { -+ ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoFB16, 0x70, 0x19, -+ 0, 0xffffffff); -+ if (ret) { -+ nv50_evo_channel_del(&dev_priv->evo); -+ return ret; -+ } -+ -+ -+ ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoFB32, 0x7a, 0x19, -+ 0, 0xffffffff); -+ if (ret) { -+ nv50_evo_channel_del(&dev_priv->evo); -+ return ret; -+ } -+ } -+ -+ ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoVRAM, 0, 0x19, -+ 0, dev_priv->vram_size); -+ if (ret) { -+ nv50_evo_channel_del(&dev_priv->evo); -+ return ret; -+ } -+ -+ return 0; -+} -+ -+int -+nv50_evo_init(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ int ret; -+ -+ if (!dev_priv->evo) { -+ ret = nv50_evo_create(dev); -+ if (ret) -+ return ret; -+ } -+ -+ return nv50_evo_channel_init(dev_priv->evo); -+} -+ -+void -+nv50_evo_fini(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ -+ if (dev_priv->evo) { -+ nv50_evo_channel_fini(dev_priv->evo); -+ nv50_evo_channel_del(&dev_priv->evo); -+ } -+} -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_evo.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_evo.h ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_evo.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_evo.h 2010-10-30 22:24:25.000000000 +0200 -@@ -24,6 +24,15 @@ - * - */ - -+#ifndef __NV50_EVO_H__ -+#define __NV50_EVO_H__ -+ -+int nv50_evo_init(struct drm_device *dev); -+void nv50_evo_fini(struct drm_device *dev); -+int nv50_evo_dmaobj_new(struct nouveau_channel *, u32 class, u32 name, -+ u32 tile_flags, u32 magic_flags, -+ u32 offset, u32 limit); -+ - #define NV50_EVO_UPDATE 0x00000080 - #define NV50_EVO_UNK84 0x00000084 - #define NV50_EVO_UNK84_NOTIFY 0x40000000 -@@ -111,3 +120,4 @@ - #define NV50_EVO_CRTC_SCALE_RES1 0x000008d8 - #define NV50_EVO_CRTC_SCALE_RES2 0x000008dc - -+#endif -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_fb.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_fb.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_fb.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_fb.c 2010-10-30 22:24:25.000000000 +0200 -@@ -20,6 +20,7 @@ - case 0x50: - nv_wr32(dev, 0x100c90, 0x0707ff); - break; -+ case 0xa3: - case 0xa5: - case 0xa8: - nv_wr32(dev, 0x100c90, 0x0d0fff); -@@ -36,3 +37,46 @@ - nv50_fb_takedown(struct drm_device *dev) - { - } -+ -+void -+nv50_fb_vm_trap(struct drm_device *dev, int display, const char *name) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ unsigned long flags; -+ u32 trap[6], idx, chinst; -+ int i, ch; -+ -+ idx = nv_rd32(dev, 0x100c90); -+ if (!(idx & 0x80000000)) -+ return; -+ idx &= 0x00ffffff; -+ -+ for (i = 0; i < 6; i++) { -+ nv_wr32(dev, 0x100c90, idx | i << 24); -+ trap[i] = nv_rd32(dev, 0x100c94); -+ } -+ nv_wr32(dev, 0x100c90, idx | 0x80000000); -+ -+ if (!display) -+ return; -+ -+ chinst = (trap[2] << 16) | trap[1]; -+ -+ spin_lock_irqsave(&dev_priv->channels.lock, flags); -+ for (ch = 0; ch < dev_priv->engine.fifo.channels; ch++) { -+ struct nouveau_channel *chan = dev_priv->channels.ptr[ch]; -+ -+ if (!chan || !chan->ramin) -+ continue; -+ -+ if (chinst == chan->ramin->vinst >> 12) -+ break; -+ } -+ spin_unlock_irqrestore(&dev_priv->channels.lock, flags); -+ -+ NV_INFO(dev, "%s - VM: Trapped %s at %02x%04x%04x status %08x " -+ "channel %d (0x%08x)\n", -+ name, (trap[5] & 0x100 ? "read" : "write"), -+ trap[5] & 0xff, trap[4] & 0xffff, trap[3] & 0xffff, -+ trap[0], ch, chinst); -+} -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_fbcon.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_fbcon.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_fbcon.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_fbcon.c 2010-10-30 22:24:25.000000000 +0200 -@@ -1,28 +1,21 @@ - #include "drmP.h" - #include "nouveau_drv.h" - #include "nouveau_dma.h" -+#include "nouveau_ramht.h" - #include "nouveau_fbcon.h" - --void -+int - nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) - { - struct nouveau_fbdev *nfbdev = info->par; - struct drm_device *dev = nfbdev->dev; - struct drm_nouveau_private *dev_priv = dev->dev_private; - struct nouveau_channel *chan = dev_priv->channel; -+ int ret; - -- if (info->state != FBINFO_STATE_RUNNING) -- return; -- -- if (!(info->flags & FBINFO_HWACCEL_DISABLED) && -- RING_SPACE(chan, rect->rop == ROP_COPY ? 7 : 11)) { -- nouveau_fbcon_gpu_lockup(info); -- } -- -- if (info->flags & FBINFO_HWACCEL_DISABLED) { -- cfb_fillrect(info, rect); -- return; -- } -+ ret = RING_SPACE(chan, rect->rop == ROP_COPY ? 7 : 11); -+ if (ret) -+ return ret; - - if (rect->rop != ROP_COPY) { - BEGIN_RING(chan, NvSub2D, 0x02ac, 1); -@@ -44,27 +37,21 @@ - OUT_RING(chan, 3); - } - FIRE_RING(chan); -+ return 0; - } - --void -+int - nv50_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region) - { - struct nouveau_fbdev *nfbdev = info->par; - struct drm_device *dev = nfbdev->dev; - struct drm_nouveau_private *dev_priv = dev->dev_private; - struct nouveau_channel *chan = dev_priv->channel; -+ int ret; - -- if (info->state != FBINFO_STATE_RUNNING) -- return; -- -- if (!(info->flags & FBINFO_HWACCEL_DISABLED) && RING_SPACE(chan, 12)) { -- nouveau_fbcon_gpu_lockup(info); -- } -- -- if (info->flags & FBINFO_HWACCEL_DISABLED) { -- cfb_copyarea(info, region); -- return; -- } -+ ret = RING_SPACE(chan, 12); -+ if (ret) -+ return ret; - - BEGIN_RING(chan, NvSub2D, 0x0110, 1); - OUT_RING(chan, 0); -@@ -79,9 +66,10 @@ - OUT_RING(chan, 0); - OUT_RING(chan, region->sy); - FIRE_RING(chan); -+ return 0; - } - --void -+int - nv50_fbcon_imageblit(struct fb_info *info, const struct fb_image *image) - { - struct nouveau_fbdev *nfbdev = info->par; -@@ -91,23 +79,14 @@ - uint32_t width, dwords, *data = (uint32_t *)image->data; - uint32_t mask = ~(~0 >> (32 - info->var.bits_per_pixel)); - uint32_t *palette = info->pseudo_palette; -+ int ret; - -- if (info->state != FBINFO_STATE_RUNNING) -- return; -- -- if (image->depth != 1) { -- cfb_imageblit(info, image); -- return; -- } -- -- if (!(info->flags & FBINFO_HWACCEL_DISABLED) && RING_SPACE(chan, 11)) { -- nouveau_fbcon_gpu_lockup(info); -- } -+ if (image->depth != 1) -+ return -ENODEV; - -- if (info->flags & FBINFO_HWACCEL_DISABLED) { -- cfb_imageblit(info, image); -- return; -- } -+ ret = RING_SPACE(chan, 11); -+ if (ret) -+ return ret; - - width = ALIGN(image->width, 32); - dwords = (width * image->height) >> 5; -@@ -133,11 +112,9 @@ - while (dwords) { - int push = dwords > 2047 ? 2047 : dwords; - -- if (RING_SPACE(chan, push + 1)) { -- nouveau_fbcon_gpu_lockup(info); -- cfb_imageblit(info, image); -- return; -- } -+ ret = RING_SPACE(chan, push + 1); -+ if (ret) -+ return ret; - - dwords -= push; - -@@ -147,6 +124,7 @@ - } - - FIRE_RING(chan); -+ return 0; - } - - int -@@ -193,7 +171,8 @@ - if (ret) - return ret; - -- ret = nouveau_gpuobj_ref_add(dev, dev_priv->channel, Nv2D, eng2d, NULL); -+ ret = nouveau_ramht_insert(dev_priv->channel, Nv2D, eng2d); -+ nouveau_gpuobj_ref(NULL, &eng2d); - if (ret) - return ret; - -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_fifo.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_fifo.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_fifo.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_fifo.c 2010-10-30 22:24:25.000000000 +0200 -@@ -27,13 +27,14 @@ - #include "drmP.h" - #include "drm.h" - #include "nouveau_drv.h" -+#include "nouveau_ramht.h" - - static void - nv50_fifo_playlist_update(struct drm_device *dev) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; - struct nouveau_fifo_engine *pfifo = &dev_priv->engine.fifo; -- struct nouveau_gpuobj_ref *cur; -+ struct nouveau_gpuobj *cur; - int i, nr; - - NV_DEBUG(dev, "\n"); -@@ -43,12 +44,15 @@ - - /* We never schedule channel 0 or 127 */ - for (i = 1, nr = 0; i < 127; i++) { -- if (dev_priv->fifos[i] && dev_priv->fifos[i]->ramfc) -- nv_wo32(dev, cur->gpuobj, nr++, i); -+ if (dev_priv->channels.ptr[i] && -+ dev_priv->channels.ptr[i]->ramfc) { -+ nv_wo32(cur, (nr * 4), i); -+ nr++; -+ } - } - dev_priv->engine.instmem.flush(dev); - -- nv_wr32(dev, 0x32f4, cur->instance >> 12); -+ nv_wr32(dev, 0x32f4, cur->vinst >> 12); - nv_wr32(dev, 0x32ec, nr); - nv_wr32(dev, 0x2500, 0x101); - } -@@ -57,15 +61,15 @@ - nv50_fifo_channel_enable(struct drm_device *dev, int channel) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; -- struct nouveau_channel *chan = dev_priv->fifos[channel]; -+ struct nouveau_channel *chan = dev_priv->channels.ptr[channel]; - uint32_t inst; - - NV_DEBUG(dev, "ch%d\n", channel); - - if (dev_priv->chipset == 0x50) -- inst = chan->ramfc->instance >> 12; -+ inst = chan->ramfc->vinst >> 12; - else -- inst = chan->ramfc->instance >> 8; -+ inst = chan->ramfc->vinst >> 8; - - nv_wr32(dev, NV50_PFIFO_CTX_TABLE(channel), inst | - NV50_PFIFO_CTX_TABLE_CHANNEL_ENABLED); -@@ -115,7 +119,7 @@ - NV_DEBUG(dev, "\n"); - - for (i = 0; i < NV50_PFIFO_CTX_TABLE__SIZE; i++) { -- if (dev_priv->fifos[i]) -+ if (dev_priv->channels.ptr[i]) - nv50_fifo_channel_enable(dev, i); - else - nv50_fifo_channel_disable(dev, i); -@@ -163,19 +167,19 @@ - goto just_reset; - } - -- ret = nouveau_gpuobj_new_ref(dev, NULL, NULL, 0, 128*4, 0x1000, -- NVOBJ_FLAG_ZERO_ALLOC, -- &pfifo->playlist[0]); -+ ret = nouveau_gpuobj_new(dev, NULL, 128*4, 0x1000, -+ NVOBJ_FLAG_ZERO_ALLOC, -+ &pfifo->playlist[0]); - if (ret) { - NV_ERROR(dev, "error creating playlist 0: %d\n", ret); - return ret; - } - -- ret = nouveau_gpuobj_new_ref(dev, NULL, NULL, 0, 128*4, 0x1000, -- NVOBJ_FLAG_ZERO_ALLOC, -- &pfifo->playlist[1]); -+ ret = nouveau_gpuobj_new(dev, NULL, 128*4, 0x1000, -+ NVOBJ_FLAG_ZERO_ALLOC, -+ &pfifo->playlist[1]); - if (ret) { -- nouveau_gpuobj_ref_del(dev, &pfifo->playlist[0]); -+ nouveau_gpuobj_ref(NULL, &pfifo->playlist[0]); - NV_ERROR(dev, "error creating playlist 1: %d\n", ret); - return ret; - } -@@ -203,8 +207,8 @@ - if (!pfifo->playlist[0]) - return; - -- nouveau_gpuobj_ref_del(dev, &pfifo->playlist[0]); -- nouveau_gpuobj_ref_del(dev, &pfifo->playlist[1]); -+ nouveau_gpuobj_ref(NULL, &pfifo->playlist[0]); -+ nouveau_gpuobj_ref(NULL, &pfifo->playlist[1]); - } - - int -@@ -226,59 +230,54 @@ - NV_DEBUG(dev, "ch%d\n", chan->id); - - if (dev_priv->chipset == 0x50) { -- uint32_t ramin_poffset = chan->ramin->gpuobj->im_pramin->start; -- uint32_t ramin_voffset = chan->ramin->gpuobj->im_backing_start; -- -- ret = nouveau_gpuobj_new_fake(dev, ramin_poffset, ramin_voffset, -- 0x100, NVOBJ_FLAG_ZERO_ALLOC | -- NVOBJ_FLAG_ZERO_FREE, &ramfc, -+ ret = nouveau_gpuobj_new_fake(dev, chan->ramin->pinst, -+ chan->ramin->vinst, 0x100, -+ NVOBJ_FLAG_ZERO_ALLOC | -+ NVOBJ_FLAG_ZERO_FREE, - &chan->ramfc); - if (ret) - return ret; - -- ret = nouveau_gpuobj_new_fake(dev, ramin_poffset + 0x0400, -- ramin_voffset + 0x0400, 4096, -- 0, NULL, &chan->cache); -+ ret = nouveau_gpuobj_new_fake(dev, chan->ramin->pinst + 0x0400, -+ chan->ramin->vinst + 0x0400, -+ 4096, 0, &chan->cache); - if (ret) - return ret; - } else { -- ret = nouveau_gpuobj_new_ref(dev, chan, NULL, 0, 0x100, 256, -- NVOBJ_FLAG_ZERO_ALLOC | -- NVOBJ_FLAG_ZERO_FREE, -- &chan->ramfc); -+ ret = nouveau_gpuobj_new(dev, chan, 0x100, 256, -+ NVOBJ_FLAG_ZERO_ALLOC | -+ NVOBJ_FLAG_ZERO_FREE, &chan->ramfc); - if (ret) - return ret; -- ramfc = chan->ramfc->gpuobj; - -- ret = nouveau_gpuobj_new_ref(dev, chan, NULL, 0, 4096, 1024, -- 0, &chan->cache); -+ ret = nouveau_gpuobj_new(dev, chan, 4096, 1024, -+ 0, &chan->cache); - if (ret) - return ret; - } -+ ramfc = chan->ramfc; - - spin_lock_irqsave(&dev_priv->context_switch_lock, flags); - -- nv_wo32(dev, ramfc, 0x48/4, chan->pushbuf->instance >> 4); -- nv_wo32(dev, ramfc, 0x80/4, (0 << 27) /* 4KiB */ | -- (4 << 24) /* SEARCH_FULL */ | -- (chan->ramht->instance >> 4)); -- nv_wo32(dev, ramfc, 0x44/4, 0x2101ffff); -- nv_wo32(dev, ramfc, 0x60/4, 0x7fffffff); -- nv_wo32(dev, ramfc, 0x40/4, 0x00000000); -- nv_wo32(dev, ramfc, 0x7c/4, 0x30000001); -- nv_wo32(dev, ramfc, 0x78/4, 0x00000000); -- nv_wo32(dev, ramfc, 0x3c/4, 0x403f6078); -- nv_wo32(dev, ramfc, 0x50/4, chan->pushbuf_base + -- chan->dma.ib_base * 4); -- nv_wo32(dev, ramfc, 0x54/4, drm_order(chan->dma.ib_max + 1) << 16); -+ nv_wo32(ramfc, 0x48, chan->pushbuf->cinst >> 4); -+ nv_wo32(ramfc, 0x80, ((chan->ramht->bits - 9) << 27) | -+ (4 << 24) /* SEARCH_FULL */ | -+ (chan->ramht->gpuobj->cinst >> 4)); -+ nv_wo32(ramfc, 0x44, 0x2101ffff); -+ nv_wo32(ramfc, 0x60, 0x7fffffff); -+ nv_wo32(ramfc, 0x40, 0x00000000); -+ nv_wo32(ramfc, 0x7c, 0x30000001); -+ nv_wo32(ramfc, 0x78, 0x00000000); -+ nv_wo32(ramfc, 0x3c, 0x403f6078); -+ nv_wo32(ramfc, 0x50, chan->pushbuf_base + chan->dma.ib_base * 4); -+ nv_wo32(ramfc, 0x54, drm_order(chan->dma.ib_max + 1) << 16); - - if (dev_priv->chipset != 0x50) { -- nv_wo32(dev, chan->ramin->gpuobj, 0, chan->id); -- nv_wo32(dev, chan->ramin->gpuobj, 1, -- chan->ramfc->instance >> 8); -+ nv_wo32(chan->ramin, 0, chan->id); -+ nv_wo32(chan->ramin, 4, chan->ramfc->vinst >> 8); - -- nv_wo32(dev, ramfc, 0x88/4, chan->cache->instance >> 10); -- nv_wo32(dev, ramfc, 0x98/4, chan->ramin->instance >> 12); -+ nv_wo32(ramfc, 0x88, chan->cache->vinst >> 10); -+ nv_wo32(ramfc, 0x98, chan->ramin->vinst >> 12); - } - - dev_priv->engine.instmem.flush(dev); -@@ -293,12 +292,26 @@ - nv50_fifo_destroy_context(struct nouveau_channel *chan) - { - struct drm_device *dev = chan->dev; -- struct nouveau_gpuobj_ref *ramfc = chan->ramfc; -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_fifo_engine *pfifo = &dev_priv->engine.fifo; -+ struct nouveau_gpuobj *ramfc = NULL; -+ unsigned long flags; - - NV_DEBUG(dev, "ch%d\n", chan->id); - -+ spin_lock_irqsave(&dev_priv->context_switch_lock, flags); -+ pfifo->reassign(dev, false); -+ -+ /* Unload the context if it's the currently active one */ -+ if (pfifo->channel_id(dev) == chan->id) { -+ pfifo->disable(dev); -+ pfifo->unload_context(dev); -+ pfifo->enable(dev); -+ } -+ - /* This will ensure the channel is seen as disabled. */ -- chan->ramfc = NULL; -+ nouveau_gpuobj_ref(chan->ramfc, &ramfc); -+ nouveau_gpuobj_ref(NULL, &chan->ramfc); - nv50_fifo_channel_disable(dev, chan->id); - - /* Dummy channel, also used on ch 127 */ -@@ -306,8 +319,12 @@ - nv50_fifo_channel_disable(dev, 127); - nv50_fifo_playlist_update(dev); - -- nouveau_gpuobj_ref_del(dev, &ramfc); -- nouveau_gpuobj_ref_del(dev, &chan->cache); -+ pfifo->reassign(dev, true); -+ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); -+ -+ /* Free the channel resources */ -+ nouveau_gpuobj_ref(NULL, &ramfc); -+ nouveau_gpuobj_ref(NULL, &chan->cache); - } - - int -@@ -315,63 +332,63 @@ - { - struct drm_device *dev = chan->dev; - struct drm_nouveau_private *dev_priv = dev->dev_private; -- struct nouveau_gpuobj *ramfc = chan->ramfc->gpuobj; -- struct nouveau_gpuobj *cache = chan->cache->gpuobj; -+ struct nouveau_gpuobj *ramfc = chan->ramfc; -+ struct nouveau_gpuobj *cache = chan->cache; - int ptr, cnt; - - NV_DEBUG(dev, "ch%d\n", chan->id); - -- nv_wr32(dev, 0x3330, nv_ro32(dev, ramfc, 0x00/4)); -- nv_wr32(dev, 0x3334, nv_ro32(dev, ramfc, 0x04/4)); -- nv_wr32(dev, 0x3240, nv_ro32(dev, ramfc, 0x08/4)); -- nv_wr32(dev, 0x3320, nv_ro32(dev, ramfc, 0x0c/4)); -- nv_wr32(dev, 0x3244, nv_ro32(dev, ramfc, 0x10/4)); -- nv_wr32(dev, 0x3328, nv_ro32(dev, ramfc, 0x14/4)); -- nv_wr32(dev, 0x3368, nv_ro32(dev, ramfc, 0x18/4)); -- nv_wr32(dev, 0x336c, nv_ro32(dev, ramfc, 0x1c/4)); -- nv_wr32(dev, 0x3370, nv_ro32(dev, ramfc, 0x20/4)); -- nv_wr32(dev, 0x3374, nv_ro32(dev, ramfc, 0x24/4)); -- nv_wr32(dev, 0x3378, nv_ro32(dev, ramfc, 0x28/4)); -- nv_wr32(dev, 0x337c, nv_ro32(dev, ramfc, 0x2c/4)); -- nv_wr32(dev, 0x3228, nv_ro32(dev, ramfc, 0x30/4)); -- nv_wr32(dev, 0x3364, nv_ro32(dev, ramfc, 0x34/4)); -- nv_wr32(dev, 0x32a0, nv_ro32(dev, ramfc, 0x38/4)); -- nv_wr32(dev, 0x3224, nv_ro32(dev, ramfc, 0x3c/4)); -- nv_wr32(dev, 0x324c, nv_ro32(dev, ramfc, 0x40/4)); -- nv_wr32(dev, 0x2044, nv_ro32(dev, ramfc, 0x44/4)); -- nv_wr32(dev, 0x322c, nv_ro32(dev, ramfc, 0x48/4)); -- nv_wr32(dev, 0x3234, nv_ro32(dev, ramfc, 0x4c/4)); -- nv_wr32(dev, 0x3340, nv_ro32(dev, ramfc, 0x50/4)); -- nv_wr32(dev, 0x3344, nv_ro32(dev, ramfc, 0x54/4)); -- nv_wr32(dev, 0x3280, nv_ro32(dev, ramfc, 0x58/4)); -- nv_wr32(dev, 0x3254, nv_ro32(dev, ramfc, 0x5c/4)); -- nv_wr32(dev, 0x3260, nv_ro32(dev, ramfc, 0x60/4)); -- nv_wr32(dev, 0x3264, nv_ro32(dev, ramfc, 0x64/4)); -- nv_wr32(dev, 0x3268, nv_ro32(dev, ramfc, 0x68/4)); -- nv_wr32(dev, 0x326c, nv_ro32(dev, ramfc, 0x6c/4)); -- nv_wr32(dev, 0x32e4, nv_ro32(dev, ramfc, 0x70/4)); -- nv_wr32(dev, 0x3248, nv_ro32(dev, ramfc, 0x74/4)); -- nv_wr32(dev, 0x2088, nv_ro32(dev, ramfc, 0x78/4)); -- nv_wr32(dev, 0x2058, nv_ro32(dev, ramfc, 0x7c/4)); -- nv_wr32(dev, 0x2210, nv_ro32(dev, ramfc, 0x80/4)); -+ nv_wr32(dev, 0x3330, nv_ro32(ramfc, 0x00)); -+ nv_wr32(dev, 0x3334, nv_ro32(ramfc, 0x04)); -+ nv_wr32(dev, 0x3240, nv_ro32(ramfc, 0x08)); -+ nv_wr32(dev, 0x3320, nv_ro32(ramfc, 0x0c)); -+ nv_wr32(dev, 0x3244, nv_ro32(ramfc, 0x10)); -+ nv_wr32(dev, 0x3328, nv_ro32(ramfc, 0x14)); -+ nv_wr32(dev, 0x3368, nv_ro32(ramfc, 0x18)); -+ nv_wr32(dev, 0x336c, nv_ro32(ramfc, 0x1c)); -+ nv_wr32(dev, 0x3370, nv_ro32(ramfc, 0x20)); -+ nv_wr32(dev, 0x3374, nv_ro32(ramfc, 0x24)); -+ nv_wr32(dev, 0x3378, nv_ro32(ramfc, 0x28)); -+ nv_wr32(dev, 0x337c, nv_ro32(ramfc, 0x2c)); -+ nv_wr32(dev, 0x3228, nv_ro32(ramfc, 0x30)); -+ nv_wr32(dev, 0x3364, nv_ro32(ramfc, 0x34)); -+ nv_wr32(dev, 0x32a0, nv_ro32(ramfc, 0x38)); -+ nv_wr32(dev, 0x3224, nv_ro32(ramfc, 0x3c)); -+ nv_wr32(dev, 0x324c, nv_ro32(ramfc, 0x40)); -+ nv_wr32(dev, 0x2044, nv_ro32(ramfc, 0x44)); -+ nv_wr32(dev, 0x322c, nv_ro32(ramfc, 0x48)); -+ nv_wr32(dev, 0x3234, nv_ro32(ramfc, 0x4c)); -+ nv_wr32(dev, 0x3340, nv_ro32(ramfc, 0x50)); -+ nv_wr32(dev, 0x3344, nv_ro32(ramfc, 0x54)); -+ nv_wr32(dev, 0x3280, nv_ro32(ramfc, 0x58)); -+ nv_wr32(dev, 0x3254, nv_ro32(ramfc, 0x5c)); -+ nv_wr32(dev, 0x3260, nv_ro32(ramfc, 0x60)); -+ nv_wr32(dev, 0x3264, nv_ro32(ramfc, 0x64)); -+ nv_wr32(dev, 0x3268, nv_ro32(ramfc, 0x68)); -+ nv_wr32(dev, 0x326c, nv_ro32(ramfc, 0x6c)); -+ nv_wr32(dev, 0x32e4, nv_ro32(ramfc, 0x70)); -+ nv_wr32(dev, 0x3248, nv_ro32(ramfc, 0x74)); -+ nv_wr32(dev, 0x2088, nv_ro32(ramfc, 0x78)); -+ nv_wr32(dev, 0x2058, nv_ro32(ramfc, 0x7c)); -+ nv_wr32(dev, 0x2210, nv_ro32(ramfc, 0x80)); - -- cnt = nv_ro32(dev, ramfc, 0x84/4); -+ cnt = nv_ro32(ramfc, 0x84); - for (ptr = 0; ptr < cnt; ptr++) { - nv_wr32(dev, NV40_PFIFO_CACHE1_METHOD(ptr), -- nv_ro32(dev, cache, (ptr * 2) + 0)); -+ nv_ro32(cache, (ptr * 8) + 0)); - nv_wr32(dev, NV40_PFIFO_CACHE1_DATA(ptr), -- nv_ro32(dev, cache, (ptr * 2) + 1)); -+ nv_ro32(cache, (ptr * 8) + 4)); - } - nv_wr32(dev, NV03_PFIFO_CACHE1_PUT, cnt << 2); - nv_wr32(dev, NV03_PFIFO_CACHE1_GET, 0); - - /* guessing that all the 0x34xx regs aren't on NV50 */ - if (dev_priv->chipset != 0x50) { -- nv_wr32(dev, 0x340c, nv_ro32(dev, ramfc, 0x88/4)); -- nv_wr32(dev, 0x3400, nv_ro32(dev, ramfc, 0x8c/4)); -- nv_wr32(dev, 0x3404, nv_ro32(dev, ramfc, 0x90/4)); -- nv_wr32(dev, 0x3408, nv_ro32(dev, ramfc, 0x94/4)); -- nv_wr32(dev, 0x3410, nv_ro32(dev, ramfc, 0x98/4)); -+ nv_wr32(dev, 0x340c, nv_ro32(ramfc, 0x88)); -+ nv_wr32(dev, 0x3400, nv_ro32(ramfc, 0x8c)); -+ nv_wr32(dev, 0x3404, nv_ro32(ramfc, 0x90)); -+ nv_wr32(dev, 0x3408, nv_ro32(ramfc, 0x94)); -+ nv_wr32(dev, 0x3410, nv_ro32(ramfc, 0x98)); - } - - nv_wr32(dev, NV03_PFIFO_CACHE1_PUSH1, chan->id | (1<<16)); -@@ -393,68 +410,69 @@ - if (chid < 1 || chid >= dev_priv->engine.fifo.channels - 1) - return 0; - -- chan = dev_priv->fifos[chid]; -+ chan = dev_priv->channels.ptr[chid]; - if (!chan) { - NV_ERROR(dev, "Inactive channel on PFIFO: %d\n", chid); - return -EINVAL; - } - NV_DEBUG(dev, "ch%d\n", chan->id); -- ramfc = chan->ramfc->gpuobj; -- cache = chan->cache->gpuobj; -+ ramfc = chan->ramfc; -+ cache = chan->cache; - -- nv_wo32(dev, ramfc, 0x00/4, nv_rd32(dev, 0x3330)); -- nv_wo32(dev, ramfc, 0x04/4, nv_rd32(dev, 0x3334)); -- nv_wo32(dev, ramfc, 0x08/4, nv_rd32(dev, 0x3240)); -- nv_wo32(dev, ramfc, 0x0c/4, nv_rd32(dev, 0x3320)); -- nv_wo32(dev, ramfc, 0x10/4, nv_rd32(dev, 0x3244)); -- nv_wo32(dev, ramfc, 0x14/4, nv_rd32(dev, 0x3328)); -- nv_wo32(dev, ramfc, 0x18/4, nv_rd32(dev, 0x3368)); -- nv_wo32(dev, ramfc, 0x1c/4, nv_rd32(dev, 0x336c)); -- nv_wo32(dev, ramfc, 0x20/4, nv_rd32(dev, 0x3370)); -- nv_wo32(dev, ramfc, 0x24/4, nv_rd32(dev, 0x3374)); -- nv_wo32(dev, ramfc, 0x28/4, nv_rd32(dev, 0x3378)); -- nv_wo32(dev, ramfc, 0x2c/4, nv_rd32(dev, 0x337c)); -- nv_wo32(dev, ramfc, 0x30/4, nv_rd32(dev, 0x3228)); -- nv_wo32(dev, ramfc, 0x34/4, nv_rd32(dev, 0x3364)); -- nv_wo32(dev, ramfc, 0x38/4, nv_rd32(dev, 0x32a0)); -- nv_wo32(dev, ramfc, 0x3c/4, nv_rd32(dev, 0x3224)); -- nv_wo32(dev, ramfc, 0x40/4, nv_rd32(dev, 0x324c)); -- nv_wo32(dev, ramfc, 0x44/4, nv_rd32(dev, 0x2044)); -- nv_wo32(dev, ramfc, 0x48/4, nv_rd32(dev, 0x322c)); -- nv_wo32(dev, ramfc, 0x4c/4, nv_rd32(dev, 0x3234)); -- nv_wo32(dev, ramfc, 0x50/4, nv_rd32(dev, 0x3340)); -- nv_wo32(dev, ramfc, 0x54/4, nv_rd32(dev, 0x3344)); -- nv_wo32(dev, ramfc, 0x58/4, nv_rd32(dev, 0x3280)); -- nv_wo32(dev, ramfc, 0x5c/4, nv_rd32(dev, 0x3254)); -- nv_wo32(dev, ramfc, 0x60/4, nv_rd32(dev, 0x3260)); -- nv_wo32(dev, ramfc, 0x64/4, nv_rd32(dev, 0x3264)); -- nv_wo32(dev, ramfc, 0x68/4, nv_rd32(dev, 0x3268)); -- nv_wo32(dev, ramfc, 0x6c/4, nv_rd32(dev, 0x326c)); -- nv_wo32(dev, ramfc, 0x70/4, nv_rd32(dev, 0x32e4)); -- nv_wo32(dev, ramfc, 0x74/4, nv_rd32(dev, 0x3248)); -- nv_wo32(dev, ramfc, 0x78/4, nv_rd32(dev, 0x2088)); -- nv_wo32(dev, ramfc, 0x7c/4, nv_rd32(dev, 0x2058)); -- nv_wo32(dev, ramfc, 0x80/4, nv_rd32(dev, 0x2210)); -+ nv_wo32(ramfc, 0x00, nv_rd32(dev, 0x3330)); -+ nv_wo32(ramfc, 0x04, nv_rd32(dev, 0x3334)); -+ nv_wo32(ramfc, 0x08, nv_rd32(dev, 0x3240)); -+ nv_wo32(ramfc, 0x0c, nv_rd32(dev, 0x3320)); -+ nv_wo32(ramfc, 0x10, nv_rd32(dev, 0x3244)); -+ nv_wo32(ramfc, 0x14, nv_rd32(dev, 0x3328)); -+ nv_wo32(ramfc, 0x18, nv_rd32(dev, 0x3368)); -+ nv_wo32(ramfc, 0x1c, nv_rd32(dev, 0x336c)); -+ nv_wo32(ramfc, 0x20, nv_rd32(dev, 0x3370)); -+ nv_wo32(ramfc, 0x24, nv_rd32(dev, 0x3374)); -+ nv_wo32(ramfc, 0x28, nv_rd32(dev, 0x3378)); -+ nv_wo32(ramfc, 0x2c, nv_rd32(dev, 0x337c)); -+ nv_wo32(ramfc, 0x30, nv_rd32(dev, 0x3228)); -+ nv_wo32(ramfc, 0x34, nv_rd32(dev, 0x3364)); -+ nv_wo32(ramfc, 0x38, nv_rd32(dev, 0x32a0)); -+ nv_wo32(ramfc, 0x3c, nv_rd32(dev, 0x3224)); -+ nv_wo32(ramfc, 0x40, nv_rd32(dev, 0x324c)); -+ nv_wo32(ramfc, 0x44, nv_rd32(dev, 0x2044)); -+ nv_wo32(ramfc, 0x48, nv_rd32(dev, 0x322c)); -+ nv_wo32(ramfc, 0x4c, nv_rd32(dev, 0x3234)); -+ nv_wo32(ramfc, 0x50, nv_rd32(dev, 0x3340)); -+ nv_wo32(ramfc, 0x54, nv_rd32(dev, 0x3344)); -+ nv_wo32(ramfc, 0x58, nv_rd32(dev, 0x3280)); -+ nv_wo32(ramfc, 0x5c, nv_rd32(dev, 0x3254)); -+ nv_wo32(ramfc, 0x60, nv_rd32(dev, 0x3260)); -+ nv_wo32(ramfc, 0x64, nv_rd32(dev, 0x3264)); -+ nv_wo32(ramfc, 0x68, nv_rd32(dev, 0x3268)); -+ nv_wo32(ramfc, 0x6c, nv_rd32(dev, 0x326c)); -+ nv_wo32(ramfc, 0x70, nv_rd32(dev, 0x32e4)); -+ nv_wo32(ramfc, 0x74, nv_rd32(dev, 0x3248)); -+ nv_wo32(ramfc, 0x78, nv_rd32(dev, 0x2088)); -+ nv_wo32(ramfc, 0x7c, nv_rd32(dev, 0x2058)); -+ nv_wo32(ramfc, 0x80, nv_rd32(dev, 0x2210)); - - put = (nv_rd32(dev, NV03_PFIFO_CACHE1_PUT) & 0x7ff) >> 2; - get = (nv_rd32(dev, NV03_PFIFO_CACHE1_GET) & 0x7ff) >> 2; - ptr = 0; - while (put != get) { -- nv_wo32(dev, cache, ptr++, -- nv_rd32(dev, NV40_PFIFO_CACHE1_METHOD(get))); -- nv_wo32(dev, cache, ptr++, -- nv_rd32(dev, NV40_PFIFO_CACHE1_DATA(get))); -+ nv_wo32(cache, ptr + 0, -+ nv_rd32(dev, NV40_PFIFO_CACHE1_METHOD(get))); -+ nv_wo32(cache, ptr + 4, -+ nv_rd32(dev, NV40_PFIFO_CACHE1_DATA(get))); - get = (get + 1) & 0x1ff; -+ ptr += 8; - } - - /* guessing that all the 0x34xx regs aren't on NV50 */ - if (dev_priv->chipset != 0x50) { -- nv_wo32(dev, ramfc, 0x84/4, ptr >> 1); -- nv_wo32(dev, ramfc, 0x88/4, nv_rd32(dev, 0x340c)); -- nv_wo32(dev, ramfc, 0x8c/4, nv_rd32(dev, 0x3400)); -- nv_wo32(dev, ramfc, 0x90/4, nv_rd32(dev, 0x3404)); -- nv_wo32(dev, ramfc, 0x94/4, nv_rd32(dev, 0x3408)); -- nv_wo32(dev, ramfc, 0x98/4, nv_rd32(dev, 0x3410)); -+ nv_wo32(ramfc, 0x84, ptr >> 3); -+ nv_wo32(ramfc, 0x88, nv_rd32(dev, 0x340c)); -+ nv_wo32(ramfc, 0x8c, nv_rd32(dev, 0x3400)); -+ nv_wo32(ramfc, 0x90, nv_rd32(dev, 0x3404)); -+ nv_wo32(ramfc, 0x94, nv_rd32(dev, 0x3408)); -+ nv_wo32(ramfc, 0x98, nv_rd32(dev, 0x3410)); - } - - dev_priv->engine.instmem.flush(dev); -@@ -464,3 +482,8 @@ - return 0; - } - -+void -+nv50_fifo_tlb_flush(struct drm_device *dev) -+{ -+ nv50_vm_flush(dev, 5); -+} -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_graph.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_graph.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_graph.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_graph.c 2010-10-30 22:24:25.000000000 +0200 -@@ -27,8 +27,12 @@ - #include "drmP.h" - #include "drm.h" - #include "nouveau_drv.h" -- -+#include "nouveau_ramht.h" - #include "nouveau_grctx.h" -+#include "nouveau_dma.h" -+#include "nv50_evo.h" -+ -+static int nv50_graph_register(struct drm_device *); - - static void - nv50_graph_init_reset(struct drm_device *dev) -@@ -145,12 +149,15 @@ - nv50_graph_init_reset(dev); - nv50_graph_init_regs__nv(dev); - nv50_graph_init_regs(dev); -- nv50_graph_init_intr(dev); - - ret = nv50_graph_init_ctxctl(dev); - if (ret) - return ret; - -+ ret = nv50_graph_register(dev); -+ if (ret) -+ return ret; -+ nv50_graph_init_intr(dev); - return 0; - } - -@@ -181,7 +188,7 @@ - /* Be sure we're not in the middle of a context switch or bad things - * will happen, such as unloading the wrong pgraph context. - */ -- if (!nv_wait(0x400300, 0x00000001, 0x00000000)) -+ if (!nv_wait(dev, 0x400300, 0x00000001, 0x00000000)) - NV_ERROR(dev, "Ctxprog is still running\n"); - - inst = nv_rd32(dev, NV50_PGRAPH_CTXCTL_CUR); -@@ -190,9 +197,9 @@ - inst = (inst & NV50_PGRAPH_CTXCTL_CUR_INSTANCE) << 12; - - for (i = 0; i < dev_priv->engine.fifo.channels; i++) { -- struct nouveau_channel *chan = dev_priv->fifos[i]; -+ struct nouveau_channel *chan = dev_priv->channels.ptr[i]; - -- if (chan && chan->ramin && chan->ramin->instance == inst) -+ if (chan && chan->ramin && chan->ramin->vinst == inst) - return chan; - } - -@@ -204,36 +211,34 @@ - { - struct drm_device *dev = chan->dev; - struct drm_nouveau_private *dev_priv = dev->dev_private; -- struct nouveau_gpuobj *ramin = chan->ramin->gpuobj; -- struct nouveau_gpuobj *obj; -+ struct nouveau_gpuobj *ramin = chan->ramin; - struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; - struct nouveau_grctx ctx = {}; - int hdr, ret; - - NV_DEBUG(dev, "ch%d\n", chan->id); - -- ret = nouveau_gpuobj_new_ref(dev, chan, NULL, 0, pgraph->grctx_size, -- 0x1000, NVOBJ_FLAG_ZERO_ALLOC | -- NVOBJ_FLAG_ZERO_FREE, &chan->ramin_grctx); -+ ret = nouveau_gpuobj_new(dev, chan, pgraph->grctx_size, 0, -+ NVOBJ_FLAG_ZERO_ALLOC | -+ NVOBJ_FLAG_ZERO_FREE, &chan->ramin_grctx); - if (ret) - return ret; -- obj = chan->ramin_grctx->gpuobj; - - hdr = (dev_priv->chipset == 0x50) ? 0x200 : 0x20; -- nv_wo32(dev, ramin, (hdr + 0x00)/4, 0x00190002); -- nv_wo32(dev, ramin, (hdr + 0x04)/4, chan->ramin_grctx->instance + -- pgraph->grctx_size - 1); -- nv_wo32(dev, ramin, (hdr + 0x08)/4, chan->ramin_grctx->instance); -- nv_wo32(dev, ramin, (hdr + 0x0c)/4, 0); -- nv_wo32(dev, ramin, (hdr + 0x10)/4, 0); -- nv_wo32(dev, ramin, (hdr + 0x14)/4, 0x00010000); -+ nv_wo32(ramin, hdr + 0x00, 0x00190002); -+ nv_wo32(ramin, hdr + 0x04, chan->ramin_grctx->vinst + -+ pgraph->grctx_size - 1); -+ nv_wo32(ramin, hdr + 0x08, chan->ramin_grctx->vinst); -+ nv_wo32(ramin, hdr + 0x0c, 0); -+ nv_wo32(ramin, hdr + 0x10, 0); -+ nv_wo32(ramin, hdr + 0x14, 0x00010000); - - ctx.dev = chan->dev; - ctx.mode = NOUVEAU_GRCTX_VALS; -- ctx.data = obj; -+ ctx.data = chan->ramin_grctx; - nv50_grctx_init(&ctx); - -- nv_wo32(dev, obj, 0x00000/4, chan->ramin->instance >> 12); -+ nv_wo32(chan->ramin_grctx, 0x00000, chan->ramin->vinst >> 12); - - dev_priv->engine.instmem.flush(dev); - return 0; -@@ -244,18 +249,29 @@ - { - struct drm_device *dev = chan->dev; - struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; - int i, hdr = (dev_priv->chipset == 0x50) ? 0x200 : 0x20; -+ unsigned long flags; - - NV_DEBUG(dev, "ch%d\n", chan->id); - -- if (!chan->ramin || !chan->ramin->gpuobj) -+ if (!chan->ramin) - return; - -+ spin_lock_irqsave(&dev_priv->context_switch_lock, flags); -+ pgraph->fifo_access(dev, false); -+ -+ if (pgraph->channel(dev) == chan) -+ pgraph->unload_context(dev); -+ - for (i = hdr; i < hdr + 24; i += 4) -- nv_wo32(dev, chan->ramin->gpuobj, i/4, 0); -+ nv_wo32(chan->ramin, i, 0); - dev_priv->engine.instmem.flush(dev); - -- nouveau_gpuobj_ref_del(dev, &chan->ramin_grctx); -+ pgraph->fifo_access(dev, true); -+ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); -+ -+ nouveau_gpuobj_ref(NULL, &chan->ramin_grctx); - } - - static int -@@ -282,7 +298,7 @@ - int - nv50_graph_load_context(struct nouveau_channel *chan) - { -- uint32_t inst = chan->ramin->instance >> 12; -+ uint32_t inst = chan->ramin->vinst >> 12; - - NV_DEBUG(chan->dev, "ch%d\n", chan->id); - return nv50_graph_do_load_context(chan->dev, inst); -@@ -324,25 +340,26 @@ - } - - static int --nv50_graph_nvsw_dma_vblsem(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv50_graph_nvsw_dma_vblsem(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { -- struct nouveau_gpuobj_ref *ref = NULL; -+ struct nouveau_gpuobj *gpuobj; - -- if (nouveau_gpuobj_ref_find(chan, data, &ref)) -+ gpuobj = nouveau_ramht_find(chan, data); -+ if (!gpuobj) - return -ENOENT; - -- if (nouveau_notifier_offset(ref->gpuobj, NULL)) -+ if (nouveau_notifier_offset(gpuobj, NULL)) - return -EINVAL; - -- chan->nvsw.vblsem = ref->gpuobj; -+ chan->nvsw.vblsem = gpuobj; - chan->nvsw.vblsem_offset = ~0; - return 0; - } - - static int --nv50_graph_nvsw_vblsem_offset(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv50_graph_nvsw_vblsem_offset(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { - if (nouveau_notifier_offset(chan->nvsw.vblsem, &data)) - return -ERANGE; -@@ -352,16 +369,16 @@ - } - - static int --nv50_graph_nvsw_vblsem_release_val(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv50_graph_nvsw_vblsem_release_val(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { - chan->nvsw.vblsem_rval = data; - return 0; - } - - static int --nv50_graph_nvsw_vblsem_release(struct nouveau_channel *chan, int grclass, -- int mthd, uint32_t data) -+nv50_graph_nvsw_vblsem_release(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) - { - struct drm_device *dev = chan->dev; - struct drm_nouveau_private *dev_priv = dev->dev_private; -@@ -369,37 +386,124 @@ - if (!chan->nvsw.vblsem || chan->nvsw.vblsem_offset == ~0 || data > 1) - return -EINVAL; - -- if (!(nv_rd32(dev, NV50_PDISPLAY_INTR_EN) & -- NV50_PDISPLAY_INTR_EN_VBLANK_CRTC_(data))) { -- nv_wr32(dev, NV50_PDISPLAY_INTR_1, -- NV50_PDISPLAY_INTR_1_VBLANK_CRTC_(data)); -- nv_wr32(dev, NV50_PDISPLAY_INTR_EN, nv_rd32(dev, -- NV50_PDISPLAY_INTR_EN) | -- NV50_PDISPLAY_INTR_EN_VBLANK_CRTC_(data)); -- } -+ drm_vblank_get(dev, data); - -+ chan->nvsw.vblsem_head = data; - list_add(&chan->nvsw.vbl_wait, &dev_priv->vbl_waiting); -+ -+ return 0; -+} -+ -+static int -+nv50_graph_nvsw_mthd_page_flip(struct nouveau_channel *chan, -+ u32 class, u32 mthd, u32 data) -+{ -+ struct nouveau_page_flip_state s; -+ -+ if (!nouveau_finish_page_flip(chan, &s)) { -+ /* XXX - Do something here */ -+ } -+ -+ return 0; -+} -+ -+static int -+nv50_graph_register(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ -+ if (dev_priv->engine.graph.registered) -+ return 0; -+ -+ NVOBJ_CLASS(dev, 0x506e, SW); /* nvsw */ -+ NVOBJ_MTHD (dev, 0x506e, 0x018c, nv50_graph_nvsw_dma_vblsem); -+ NVOBJ_MTHD (dev, 0x506e, 0x0400, nv50_graph_nvsw_vblsem_offset); -+ NVOBJ_MTHD (dev, 0x506e, 0x0404, nv50_graph_nvsw_vblsem_release_val); -+ NVOBJ_MTHD (dev, 0x506e, 0x0408, nv50_graph_nvsw_vblsem_release); -+ NVOBJ_MTHD (dev, 0x506e, 0x0500, nv50_graph_nvsw_mthd_page_flip); -+ -+ NVOBJ_CLASS(dev, 0x0030, GR); /* null */ -+ NVOBJ_CLASS(dev, 0x5039, GR); /* m2mf */ -+ NVOBJ_CLASS(dev, 0x502d, GR); /* 2d */ -+ NVOBJ_CLASS(dev, 0x50c0, GR); /* compute */ -+ NVOBJ_CLASS(dev, 0x85c0, GR); /* compute (nva3, nva5, nva8) */ -+ -+ /* tesla */ -+ if (dev_priv->chipset == 0x50) -+ NVOBJ_CLASS(dev, 0x5097, GR); /* tesla (nv50) */ -+ else -+ if (dev_priv->chipset < 0xa0) -+ NVOBJ_CLASS(dev, 0x8297, GR); /* tesla (nv8x/nv9x) */ -+ else { -+ switch (dev_priv->chipset) { -+ case 0xa0: -+ case 0xaa: -+ case 0xac: -+ NVOBJ_CLASS(dev, 0x8397, GR); -+ break; -+ case 0xa3: -+ case 0xa5: -+ case 0xa8: -+ NVOBJ_CLASS(dev, 0x8597, GR); -+ break; -+ case 0xaf: -+ NVOBJ_CLASS(dev, 0x8697, GR); -+ break; -+ } -+ } -+ -+ dev_priv->engine.graph.registered = true; - return 0; - } - --static struct nouveau_pgraph_object_method nv50_graph_nvsw_methods[] = { -- { 0x018c, nv50_graph_nvsw_dma_vblsem }, -- { 0x0400, nv50_graph_nvsw_vblsem_offset }, -- { 0x0404, nv50_graph_nvsw_vblsem_release_val }, -- { 0x0408, nv50_graph_nvsw_vblsem_release }, -- {} --}; -- --struct nouveau_pgraph_object_class nv50_graph_grclass[] = { -- { 0x506e, true, nv50_graph_nvsw_methods }, /* nvsw */ -- { 0x0030, false, NULL }, /* null */ -- { 0x5039, false, NULL }, /* m2mf */ -- { 0x502d, false, NULL }, /* 2d */ -- { 0x50c0, false, NULL }, /* compute */ -- { 0x85c0, false, NULL }, /* compute (nva3, nva5, nva8) */ -- { 0x5097, false, NULL }, /* tesla (nv50) */ -- { 0x8297, false, NULL }, /* tesla (nv8x/nv9x) */ -- { 0x8397, false, NULL }, /* tesla (nva0, nvaa, nvac) */ -- { 0x8597, false, NULL }, /* tesla (nva3, nva5, nva8) */ -- {} --}; -+void -+nv50_graph_tlb_flush(struct drm_device *dev) -+{ -+ nv50_vm_flush(dev, 0); -+} -+ -+void -+nv86_graph_tlb_flush(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_timer_engine *ptimer = &dev_priv->engine.timer; -+ bool idle, timeout = false; -+ unsigned long flags; -+ u64 start; -+ u32 tmp; -+ -+ spin_lock_irqsave(&dev_priv->context_switch_lock, flags); -+ nv_mask(dev, 0x400500, 0x00000001, 0x00000000); -+ -+ start = ptimer->read(dev); -+ do { -+ idle = true; -+ -+ for (tmp = nv_rd32(dev, 0x400380); tmp && idle; tmp >>= 3) { -+ if ((tmp & 7) == 1) -+ idle = false; -+ } -+ -+ for (tmp = nv_rd32(dev, 0x400384); tmp && idle; tmp >>= 3) { -+ if ((tmp & 7) == 1) -+ idle = false; -+ } -+ -+ for (tmp = nv_rd32(dev, 0x400388); tmp && idle; tmp >>= 3) { -+ if ((tmp & 7) == 1) -+ idle = false; -+ } -+ } while (!idle && !(timeout = ptimer->read(dev) - start > 2000000000)); -+ -+ if (timeout) { -+ NV_ERROR(dev, "PGRAPH TLB flush idle timeout fail: " -+ "0x%08x 0x%08x 0x%08x 0x%08x\n", -+ nv_rd32(dev, 0x400700), nv_rd32(dev, 0x400380), -+ nv_rd32(dev, 0x400384), nv_rd32(dev, 0x400388)); -+ } -+ -+ nv50_vm_flush(dev, 0); -+ -+ nv_mask(dev, 0x400500, 0x00000001, 0x00000001); -+ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); -+} -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_grctx.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_grctx.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_grctx.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_grctx.c 2010-10-30 22:24:25.000000000 +0200 -@@ -103,6 +103,9 @@ - #include "nouveau_drv.h" - #include "nouveau_grctx.h" - -+#define IS_NVA3F(x) (((x) > 0xa0 && (x) < 0xaa) || (x) == 0xaf) -+#define IS_NVAAF(x) ((x) >= 0xaa && (x) <= 0xac) -+ - /* - * This code deals with PGRAPH contexts on NV50 family cards. Like NV40, it's - * the GPU itself that does context-switching, but it needs a special -@@ -182,6 +185,7 @@ - case 0xa8: - case 0xaa: - case 0xac: -+ case 0xaf: - break; - default: - NV_ERROR(ctx->dev, "I don't know how to make a ctxprog for " -@@ -268,6 +272,9 @@ - */ - - static void -+nv50_graph_construct_mmio_ddata(struct nouveau_grctx *ctx); -+ -+static void - nv50_graph_construct_mmio(struct nouveau_grctx *ctx) - { - struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; -@@ -286,7 +293,7 @@ - gr_def(ctx, 0x400840, 0xffe806a8); - } - gr_def(ctx, 0x400844, 0x00000002); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -+ if (IS_NVA3F(dev_priv->chipset)) - gr_def(ctx, 0x400894, 0x00001000); - gr_def(ctx, 0x4008e8, 0x00000003); - gr_def(ctx, 0x4008ec, 0x00001000); -@@ -299,13 +306,15 @@ - - if (dev_priv->chipset >= 0xa0) - cp_ctx(ctx, 0x400b00, 0x1); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) { -+ if (IS_NVA3F(dev_priv->chipset)) { - cp_ctx(ctx, 0x400b10, 0x1); - gr_def(ctx, 0x400b10, 0x0001629d); - cp_ctx(ctx, 0x400b20, 0x1); - gr_def(ctx, 0x400b20, 0x0001629d); - } - -+ nv50_graph_construct_mmio_ddata(ctx); -+ - /* 0C00: VFETCH */ - cp_ctx(ctx, 0x400c08, 0x2); - gr_def(ctx, 0x400c08, 0x0000fe0c); -@@ -314,7 +323,7 @@ - if (dev_priv->chipset < 0xa0) { - cp_ctx(ctx, 0x401008, 0x4); - gr_def(ctx, 0x401014, 0x00001000); -- } else if (dev_priv->chipset == 0xa0 || dev_priv->chipset >= 0xaa) { -+ } else if (!IS_NVA3F(dev_priv->chipset)) { - cp_ctx(ctx, 0x401008, 0x5); - gr_def(ctx, 0x401018, 0x00001000); - } else { -@@ -368,10 +377,13 @@ - case 0xa3: - case 0xa5: - case 0xa8: -+ case 0xaf: - gr_def(ctx, 0x401c00, 0x142500df); - break; - } - -+ /* 2000 */ -+ - /* 2400 */ - cp_ctx(ctx, 0x402400, 0x1); - if (dev_priv->chipset == 0x50) -@@ -380,12 +392,12 @@ - cp_ctx(ctx, 0x402408, 0x2); - gr_def(ctx, 0x402408, 0x00000600); - -- /* 2800 */ -+ /* 2800: CSCHED */ - cp_ctx(ctx, 0x402800, 0x1); - if (dev_priv->chipset == 0x50) - gr_def(ctx, 0x402800, 0x00000006); - -- /* 2C00 */ -+ /* 2C00: ZCULL */ - cp_ctx(ctx, 0x402c08, 0x6); - if (dev_priv->chipset != 0x50) - gr_def(ctx, 0x402c14, 0x01000000); -@@ -396,23 +408,23 @@ - cp_ctx(ctx, 0x402ca0, 0x2); - if (dev_priv->chipset < 0xa0) - gr_def(ctx, 0x402ca0, 0x00000400); -- else if (dev_priv->chipset == 0xa0 || dev_priv->chipset >= 0xaa) -+ else if (!IS_NVA3F(dev_priv->chipset)) - gr_def(ctx, 0x402ca0, 0x00000800); - else - gr_def(ctx, 0x402ca0, 0x00000400); - cp_ctx(ctx, 0x402cac, 0x4); - -- /* 3000 */ -+ /* 3000: ENG2D */ - cp_ctx(ctx, 0x403004, 0x1); - gr_def(ctx, 0x403004, 0x00000001); - -- /* 3404 */ -+ /* 3400 */ - if (dev_priv->chipset >= 0xa0) { - cp_ctx(ctx, 0x403404, 0x1); - gr_def(ctx, 0x403404, 0x00000001); - } - -- /* 5000 */ -+ /* 5000: CCACHE */ - cp_ctx(ctx, 0x405000, 0x1); - switch (dev_priv->chipset) { - case 0x50: -@@ -425,6 +437,7 @@ - case 0xa8: - case 0xaa: - case 0xac: -+ case 0xaf: - gr_def(ctx, 0x405000, 0x000e0080); - break; - case 0x86: -@@ -441,210 +454,6 @@ - cp_ctx(ctx, 0x405024, 0x1); - cp_ctx(ctx, 0x40502c, 0x1); - -- /* 5400 or maybe 4800 */ -- if (dev_priv->chipset == 0x50) { -- offset = 0x405400; -- cp_ctx(ctx, 0x405400, 0xea); -- } else if (dev_priv->chipset < 0x94) { -- offset = 0x405400; -- cp_ctx(ctx, 0x405400, 0xcb); -- } else if (dev_priv->chipset < 0xa0) { -- offset = 0x405400; -- cp_ctx(ctx, 0x405400, 0xcc); -- } else if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) { -- offset = 0x404800; -- cp_ctx(ctx, 0x404800, 0xda); -- } else { -- offset = 0x405400; -- cp_ctx(ctx, 0x405400, 0xd4); -- } -- gr_def(ctx, offset + 0x0c, 0x00000002); -- gr_def(ctx, offset + 0x10, 0x00000001); -- if (dev_priv->chipset >= 0x94) -- offset += 4; -- gr_def(ctx, offset + 0x1c, 0x00000001); -- gr_def(ctx, offset + 0x20, 0x00000100); -- gr_def(ctx, offset + 0x38, 0x00000002); -- gr_def(ctx, offset + 0x3c, 0x00000001); -- gr_def(ctx, offset + 0x40, 0x00000001); -- gr_def(ctx, offset + 0x50, 0x00000001); -- gr_def(ctx, offset + 0x54, 0x003fffff); -- gr_def(ctx, offset + 0x58, 0x00001fff); -- gr_def(ctx, offset + 0x60, 0x00000001); -- gr_def(ctx, offset + 0x64, 0x00000001); -- gr_def(ctx, offset + 0x6c, 0x00000001); -- gr_def(ctx, offset + 0x70, 0x00000001); -- gr_def(ctx, offset + 0x74, 0x00000001); -- gr_def(ctx, offset + 0x78, 0x00000004); -- gr_def(ctx, offset + 0x7c, 0x00000001); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- offset += 4; -- gr_def(ctx, offset + 0x80, 0x00000001); -- gr_def(ctx, offset + 0x84, 0x00000001); -- gr_def(ctx, offset + 0x88, 0x00000007); -- gr_def(ctx, offset + 0x8c, 0x00000001); -- gr_def(ctx, offset + 0x90, 0x00000007); -- gr_def(ctx, offset + 0x94, 0x00000001); -- gr_def(ctx, offset + 0x98, 0x00000001); -- gr_def(ctx, offset + 0x9c, 0x00000001); -- if (dev_priv->chipset == 0x50) { -- gr_def(ctx, offset + 0xb0, 0x00000001); -- gr_def(ctx, offset + 0xb4, 0x00000001); -- gr_def(ctx, offset + 0xbc, 0x00000001); -- gr_def(ctx, offset + 0xc0, 0x0000000a); -- gr_def(ctx, offset + 0xd0, 0x00000040); -- gr_def(ctx, offset + 0xd8, 0x00000002); -- gr_def(ctx, offset + 0xdc, 0x00000100); -- gr_def(ctx, offset + 0xe0, 0x00000001); -- gr_def(ctx, offset + 0xe4, 0x00000100); -- gr_def(ctx, offset + 0x100, 0x00000001); -- gr_def(ctx, offset + 0x124, 0x00000004); -- gr_def(ctx, offset + 0x13c, 0x00000001); -- gr_def(ctx, offset + 0x140, 0x00000100); -- gr_def(ctx, offset + 0x148, 0x00000001); -- gr_def(ctx, offset + 0x154, 0x00000100); -- gr_def(ctx, offset + 0x158, 0x00000001); -- gr_def(ctx, offset + 0x15c, 0x00000100); -- gr_def(ctx, offset + 0x164, 0x00000001); -- gr_def(ctx, offset + 0x170, 0x00000100); -- gr_def(ctx, offset + 0x174, 0x00000001); -- gr_def(ctx, offset + 0x17c, 0x00000001); -- gr_def(ctx, offset + 0x188, 0x00000002); -- gr_def(ctx, offset + 0x190, 0x00000001); -- gr_def(ctx, offset + 0x198, 0x00000001); -- gr_def(ctx, offset + 0x1ac, 0x00000003); -- offset += 0xd0; -- } else { -- gr_def(ctx, offset + 0xb0, 0x00000001); -- gr_def(ctx, offset + 0xb4, 0x00000100); -- gr_def(ctx, offset + 0xbc, 0x00000001); -- gr_def(ctx, offset + 0xc8, 0x00000100); -- gr_def(ctx, offset + 0xcc, 0x00000001); -- gr_def(ctx, offset + 0xd0, 0x00000100); -- gr_def(ctx, offset + 0xd8, 0x00000001); -- gr_def(ctx, offset + 0xe4, 0x00000100); -- } -- gr_def(ctx, offset + 0xf8, 0x00000004); -- gr_def(ctx, offset + 0xfc, 0x00000070); -- gr_def(ctx, offset + 0x100, 0x00000080); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- offset += 4; -- gr_def(ctx, offset + 0x114, 0x0000000c); -- if (dev_priv->chipset == 0x50) -- offset -= 4; -- gr_def(ctx, offset + 0x11c, 0x00000008); -- gr_def(ctx, offset + 0x120, 0x00000014); -- if (dev_priv->chipset == 0x50) { -- gr_def(ctx, offset + 0x124, 0x00000026); -- offset -= 0x18; -- } else { -- gr_def(ctx, offset + 0x128, 0x00000029); -- gr_def(ctx, offset + 0x12c, 0x00000027); -- gr_def(ctx, offset + 0x130, 0x00000026); -- gr_def(ctx, offset + 0x134, 0x00000008); -- gr_def(ctx, offset + 0x138, 0x00000004); -- gr_def(ctx, offset + 0x13c, 0x00000027); -- } -- gr_def(ctx, offset + 0x148, 0x00000001); -- gr_def(ctx, offset + 0x14c, 0x00000002); -- gr_def(ctx, offset + 0x150, 0x00000003); -- gr_def(ctx, offset + 0x154, 0x00000004); -- gr_def(ctx, offset + 0x158, 0x00000005); -- gr_def(ctx, offset + 0x15c, 0x00000006); -- gr_def(ctx, offset + 0x160, 0x00000007); -- gr_def(ctx, offset + 0x164, 0x00000001); -- gr_def(ctx, offset + 0x1a8, 0x000000cf); -- if (dev_priv->chipset == 0x50) -- offset -= 4; -- gr_def(ctx, offset + 0x1d8, 0x00000080); -- gr_def(ctx, offset + 0x1dc, 0x00000004); -- gr_def(ctx, offset + 0x1e0, 0x00000004); -- if (dev_priv->chipset == 0x50) -- offset -= 4; -- else -- gr_def(ctx, offset + 0x1e4, 0x00000003); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) { -- gr_def(ctx, offset + 0x1ec, 0x00000003); -- offset += 8; -- } -- gr_def(ctx, offset + 0x1e8, 0x00000001); -- if (dev_priv->chipset == 0x50) -- offset -= 4; -- gr_def(ctx, offset + 0x1f4, 0x00000012); -- gr_def(ctx, offset + 0x1f8, 0x00000010); -- gr_def(ctx, offset + 0x1fc, 0x0000000c); -- gr_def(ctx, offset + 0x200, 0x00000001); -- gr_def(ctx, offset + 0x210, 0x00000004); -- gr_def(ctx, offset + 0x214, 0x00000002); -- gr_def(ctx, offset + 0x218, 0x00000004); -- if (dev_priv->chipset >= 0xa0) -- offset += 4; -- gr_def(ctx, offset + 0x224, 0x003fffff); -- gr_def(ctx, offset + 0x228, 0x00001fff); -- if (dev_priv->chipset == 0x50) -- offset -= 0x20; -- else if (dev_priv->chipset >= 0xa0) { -- gr_def(ctx, offset + 0x250, 0x00000001); -- gr_def(ctx, offset + 0x254, 0x00000001); -- gr_def(ctx, offset + 0x258, 0x00000002); -- offset += 0x10; -- } -- gr_def(ctx, offset + 0x250, 0x00000004); -- gr_def(ctx, offset + 0x254, 0x00000014); -- gr_def(ctx, offset + 0x258, 0x00000001); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- offset += 4; -- gr_def(ctx, offset + 0x264, 0x00000002); -- if (dev_priv->chipset >= 0xa0) -- offset += 8; -- gr_def(ctx, offset + 0x270, 0x00000001); -- gr_def(ctx, offset + 0x278, 0x00000002); -- gr_def(ctx, offset + 0x27c, 0x00001000); -- if (dev_priv->chipset == 0x50) -- offset -= 0xc; -- else { -- gr_def(ctx, offset + 0x280, 0x00000e00); -- gr_def(ctx, offset + 0x284, 0x00001000); -- gr_def(ctx, offset + 0x288, 0x00001e00); -- } -- gr_def(ctx, offset + 0x290, 0x00000001); -- gr_def(ctx, offset + 0x294, 0x00000001); -- gr_def(ctx, offset + 0x298, 0x00000001); -- gr_def(ctx, offset + 0x29c, 0x00000001); -- gr_def(ctx, offset + 0x2a0, 0x00000001); -- gr_def(ctx, offset + 0x2b0, 0x00000200); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) { -- gr_def(ctx, offset + 0x2b4, 0x00000200); -- offset += 4; -- } -- if (dev_priv->chipset < 0xa0) { -- gr_def(ctx, offset + 0x2b8, 0x00000001); -- gr_def(ctx, offset + 0x2bc, 0x00000070); -- gr_def(ctx, offset + 0x2c0, 0x00000080); -- gr_def(ctx, offset + 0x2cc, 0x00000001); -- gr_def(ctx, offset + 0x2d0, 0x00000070); -- gr_def(ctx, offset + 0x2d4, 0x00000080); -- } else { -- gr_def(ctx, offset + 0x2b8, 0x00000001); -- gr_def(ctx, offset + 0x2bc, 0x000000f0); -- gr_def(ctx, offset + 0x2c0, 0x000000ff); -- gr_def(ctx, offset + 0x2cc, 0x00000001); -- gr_def(ctx, offset + 0x2d0, 0x000000f0); -- gr_def(ctx, offset + 0x2d4, 0x000000ff); -- gr_def(ctx, offset + 0x2dc, 0x00000009); -- offset += 4; -- } -- gr_def(ctx, offset + 0x2e4, 0x00000001); -- gr_def(ctx, offset + 0x2e8, 0x000000cf); -- gr_def(ctx, offset + 0x2f0, 0x00000001); -- gr_def(ctx, offset + 0x300, 0x000000cf); -- gr_def(ctx, offset + 0x308, 0x00000002); -- gr_def(ctx, offset + 0x310, 0x00000001); -- gr_def(ctx, offset + 0x318, 0x00000001); -- gr_def(ctx, offset + 0x320, 0x000000cf); -- gr_def(ctx, offset + 0x324, 0x000000cf); -- gr_def(ctx, offset + 0x328, 0x00000001); -- - /* 6000? */ - if (dev_priv->chipset == 0x50) - cp_ctx(ctx, 0x4063e0, 0x1); -@@ -661,7 +470,7 @@ - gr_def(ctx, 0x406818, 0x00000f80); - else - gr_def(ctx, 0x406818, 0x00001f80); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -+ if (IS_NVA3F(dev_priv->chipset)) - gr_def(ctx, 0x40681c, 0x00000030); - cp_ctx(ctx, 0x406830, 0x3); - } -@@ -706,7 +515,7 @@ - - if (dev_priv->chipset < 0xa0) - cp_ctx(ctx, 0x407094 + (i<<8), 1); -- else if (dev_priv->chipset <= 0xa0 || dev_priv->chipset >= 0xaa) -+ else if (!IS_NVA3F(dev_priv->chipset)) - cp_ctx(ctx, 0x407094 + (i<<8), 3); - else { - cp_ctx(ctx, 0x407094 + (i<<8), 4); -@@ -799,6 +608,7 @@ - case 0xa8: - case 0xaa: - case 0xac: -+ case 0xaf: - gr_def(ctx, offset + 0x1c, 0x300c0000); - break; - } -@@ -825,7 +635,7 @@ - gr_def(ctx, base + 0x304, 0x00007070); - else if (dev_priv->chipset < 0xa0) - gr_def(ctx, base + 0x304, 0x00027070); -- else if (dev_priv->chipset <= 0xa0 || dev_priv->chipset >= 0xaa) -+ else if (!IS_NVA3F(dev_priv->chipset)) - gr_def(ctx, base + 0x304, 0x01127070); - else - gr_def(ctx, base + 0x304, 0x05127070); -@@ -849,7 +659,7 @@ - if (dev_priv->chipset < 0xa0) { - cp_ctx(ctx, base + 0x340, 9); - offset = base + 0x340; -- } else if (dev_priv->chipset <= 0xa0 || dev_priv->chipset >= 0xaa) { -+ } else if (!IS_NVA3F(dev_priv->chipset)) { - cp_ctx(ctx, base + 0x33c, 0xb); - offset = base + 0x344; - } else { -@@ -880,7 +690,7 @@ - gr_def(ctx, offset + 0x0, 0x000001f0); - gr_def(ctx, offset + 0x4, 0x00000001); - gr_def(ctx, offset + 0x8, 0x00000003); -- if (dev_priv->chipset == 0x50 || dev_priv->chipset >= 0xaa) -+ if (dev_priv->chipset == 0x50 || IS_NVAAF(dev_priv->chipset)) - gr_def(ctx, offset + 0xc, 0x00008000); - gr_def(ctx, offset + 0x14, 0x00039e00); - cp_ctx(ctx, offset + 0x1c, 2); -@@ -892,7 +702,7 @@ - - if (dev_priv->chipset >= 0xa0) { - cp_ctx(ctx, base + 0x54c, 2); -- if (dev_priv->chipset <= 0xa0 || dev_priv->chipset >= 0xaa) -+ if (!IS_NVA3F(dev_priv->chipset)) - gr_def(ctx, base + 0x54c, 0x003fe006); - else - gr_def(ctx, base + 0x54c, 0x003fe007); -@@ -948,6 +758,336 @@ - } - } - -+static void -+dd_emit(struct nouveau_grctx *ctx, int num, uint32_t val) { -+ int i; -+ if (val && ctx->mode == NOUVEAU_GRCTX_VALS) -+ for (i = 0; i < num; i++) -+ nv_wo32(ctx->data, 4 * (ctx->ctxvals_pos + i), val); -+ ctx->ctxvals_pos += num; -+} -+ -+static void -+nv50_graph_construct_mmio_ddata(struct nouveau_grctx *ctx) -+{ -+ struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; -+ int base, num; -+ base = ctx->ctxvals_pos; -+ -+ /* tesla state */ -+ dd_emit(ctx, 1, 0); /* 00000001 UNK0F90 */ -+ dd_emit(ctx, 1, 0); /* 00000001 UNK135C */ -+ -+ /* SRC_TIC state */ -+ dd_emit(ctx, 1, 0); /* 00000007 SRC_TILE_MODE_Z */ -+ dd_emit(ctx, 1, 2); /* 00000007 SRC_TILE_MODE_Y */ -+ dd_emit(ctx, 1, 1); /* 00000001 SRC_LINEAR #1 */ -+ dd_emit(ctx, 1, 0); /* 000000ff SRC_ADDRESS_HIGH */ -+ dd_emit(ctx, 1, 0); /* 00000001 SRC_SRGB */ -+ if (dev_priv->chipset >= 0x94) -+ dd_emit(ctx, 1, 0); /* 00000003 eng2d UNK0258 */ -+ dd_emit(ctx, 1, 1); /* 00000fff SRC_DEPTH */ -+ dd_emit(ctx, 1, 0x100); /* 0000ffff SRC_HEIGHT */ -+ -+ /* turing state */ -+ dd_emit(ctx, 1, 0); /* 0000000f TEXTURES_LOG2 */ -+ dd_emit(ctx, 1, 0); /* 0000000f SAMPLERS_LOG2 */ -+ dd_emit(ctx, 1, 0); /* 000000ff CB_DEF_ADDRESS_HIGH */ -+ dd_emit(ctx, 1, 0); /* ffffffff CB_DEF_ADDRESS_LOW */ -+ dd_emit(ctx, 1, 0); /* ffffffff SHARED_SIZE */ -+ dd_emit(ctx, 1, 2); /* ffffffff REG_MODE */ -+ dd_emit(ctx, 1, 1); /* 0000ffff BLOCK_ALLOC_THREADS */ -+ dd_emit(ctx, 1, 1); /* 00000001 LANES32 */ -+ dd_emit(ctx, 1, 0); /* 000000ff UNK370 */ -+ dd_emit(ctx, 1, 0); /* 000000ff USER_PARAM_UNK */ -+ dd_emit(ctx, 1, 0); /* 000000ff USER_PARAM_COUNT */ -+ dd_emit(ctx, 1, 1); /* 000000ff UNK384 bits 8-15 */ -+ dd_emit(ctx, 1, 0x3fffff); /* 003fffff TIC_LIMIT */ -+ dd_emit(ctx, 1, 0x1fff); /* 000fffff TSC_LIMIT */ -+ dd_emit(ctx, 1, 0); /* 0000ffff CB_ADDR_INDEX */ -+ dd_emit(ctx, 1, 1); /* 000007ff BLOCKDIM_X */ -+ dd_emit(ctx, 1, 1); /* 000007ff BLOCKDIM_XMY */ -+ dd_emit(ctx, 1, 0); /* 00000001 BLOCKDIM_XMY_OVERFLOW */ -+ dd_emit(ctx, 1, 1); /* 0003ffff BLOCKDIM_XMYMZ */ -+ dd_emit(ctx, 1, 1); /* 000007ff BLOCKDIM_Y */ -+ dd_emit(ctx, 1, 1); /* 0000007f BLOCKDIM_Z */ -+ dd_emit(ctx, 1, 4); /* 000000ff CP_REG_ALLOC_TEMP */ -+ dd_emit(ctx, 1, 1); /* 00000001 BLOCKDIM_DIRTY */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ dd_emit(ctx, 1, 0); /* 00000003 UNK03E8 */ -+ dd_emit(ctx, 1, 1); /* 0000007f BLOCK_ALLOC_HALFWARPS */ -+ dd_emit(ctx, 1, 1); /* 00000007 LOCAL_WARPS_NO_CLAMP */ -+ dd_emit(ctx, 1, 7); /* 00000007 LOCAL_WARPS_LOG_ALLOC */ -+ dd_emit(ctx, 1, 1); /* 00000007 STACK_WARPS_NO_CLAMP */ -+ dd_emit(ctx, 1, 7); /* 00000007 STACK_WARPS_LOG_ALLOC */ -+ dd_emit(ctx, 1, 1); /* 00001fff BLOCK_ALLOC_REGSLOTS_PACKED */ -+ dd_emit(ctx, 1, 1); /* 00001fff BLOCK_ALLOC_REGSLOTS_STRIDED */ -+ dd_emit(ctx, 1, 1); /* 000007ff BLOCK_ALLOC_THREADS */ -+ -+ /* compat 2d state */ -+ if (dev_priv->chipset == 0x50) { -+ dd_emit(ctx, 4, 0); /* 0000ffff clip X, Y, W, H */ -+ -+ dd_emit(ctx, 1, 1); /* ffffffff chroma COLOR_FORMAT */ -+ -+ dd_emit(ctx, 1, 1); /* ffffffff pattern COLOR_FORMAT */ -+ dd_emit(ctx, 1, 0); /* ffffffff pattern SHAPE */ -+ dd_emit(ctx, 1, 1); /* ffffffff pattern PATTERN_SELECT */ -+ -+ dd_emit(ctx, 1, 0xa); /* ffffffff surf2d SRC_FORMAT */ -+ dd_emit(ctx, 1, 0); /* ffffffff surf2d DMA_SRC */ -+ dd_emit(ctx, 1, 0); /* 000000ff surf2d SRC_ADDRESS_HIGH */ -+ dd_emit(ctx, 1, 0); /* ffffffff surf2d SRC_ADDRESS_LOW */ -+ dd_emit(ctx, 1, 0x40); /* 0000ffff surf2d SRC_PITCH */ -+ dd_emit(ctx, 1, 0); /* 0000000f surf2d SRC_TILE_MODE_Z */ -+ dd_emit(ctx, 1, 2); /* 0000000f surf2d SRC_TILE_MODE_Y */ -+ dd_emit(ctx, 1, 0x100); /* ffffffff surf2d SRC_HEIGHT */ -+ dd_emit(ctx, 1, 1); /* 00000001 surf2d SRC_LINEAR */ -+ dd_emit(ctx, 1, 0x100); /* ffffffff surf2d SRC_WIDTH */ -+ -+ dd_emit(ctx, 1, 0); /* 0000ffff gdirect CLIP_B_X */ -+ dd_emit(ctx, 1, 0); /* 0000ffff gdirect CLIP_B_Y */ -+ dd_emit(ctx, 1, 0); /* 0000ffff gdirect CLIP_C_X */ -+ dd_emit(ctx, 1, 0); /* 0000ffff gdirect CLIP_C_Y */ -+ dd_emit(ctx, 1, 0); /* 0000ffff gdirect CLIP_D_X */ -+ dd_emit(ctx, 1, 0); /* 0000ffff gdirect CLIP_D_Y */ -+ dd_emit(ctx, 1, 1); /* ffffffff gdirect COLOR_FORMAT */ -+ dd_emit(ctx, 1, 0); /* ffffffff gdirect OPERATION */ -+ dd_emit(ctx, 1, 0); /* 0000ffff gdirect POINT_X */ -+ dd_emit(ctx, 1, 0); /* 0000ffff gdirect POINT_Y */ -+ -+ dd_emit(ctx, 1, 0); /* 0000ffff blit SRC_Y */ -+ dd_emit(ctx, 1, 0); /* ffffffff blit OPERATION */ -+ -+ dd_emit(ctx, 1, 0); /* ffffffff ifc OPERATION */ -+ -+ dd_emit(ctx, 1, 0); /* ffffffff iifc INDEX_FORMAT */ -+ dd_emit(ctx, 1, 0); /* ffffffff iifc LUT_OFFSET */ -+ dd_emit(ctx, 1, 4); /* ffffffff iifc COLOR_FORMAT */ -+ dd_emit(ctx, 1, 0); /* ffffffff iifc OPERATION */ -+ } -+ -+ /* m2mf state */ -+ dd_emit(ctx, 1, 0); /* ffffffff m2mf LINE_COUNT */ -+ dd_emit(ctx, 1, 0); /* ffffffff m2mf LINE_LENGTH_IN */ -+ dd_emit(ctx, 2, 0); /* ffffffff m2mf OFFSET_IN, OFFSET_OUT */ -+ dd_emit(ctx, 1, 1); /* ffffffff m2mf TILING_DEPTH_OUT */ -+ dd_emit(ctx, 1, 0x100); /* ffffffff m2mf TILING_HEIGHT_OUT */ -+ dd_emit(ctx, 1, 0); /* ffffffff m2mf TILING_POSITION_OUT_Z */ -+ dd_emit(ctx, 1, 1); /* 00000001 m2mf LINEAR_OUT */ -+ dd_emit(ctx, 2, 0); /* 0000ffff m2mf TILING_POSITION_OUT_X, Y */ -+ dd_emit(ctx, 1, 0x100); /* ffffffff m2mf TILING_PITCH_OUT */ -+ dd_emit(ctx, 1, 1); /* ffffffff m2mf TILING_DEPTH_IN */ -+ dd_emit(ctx, 1, 0x100); /* ffffffff m2mf TILING_HEIGHT_IN */ -+ dd_emit(ctx, 1, 0); /* ffffffff m2mf TILING_POSITION_IN_Z */ -+ dd_emit(ctx, 1, 1); /* 00000001 m2mf LINEAR_IN */ -+ dd_emit(ctx, 2, 0); /* 0000ffff m2mf TILING_POSITION_IN_X, Y */ -+ dd_emit(ctx, 1, 0x100); /* ffffffff m2mf TILING_PITCH_IN */ -+ -+ /* more compat 2d state */ -+ if (dev_priv->chipset == 0x50) { -+ dd_emit(ctx, 1, 1); /* ffffffff line COLOR_FORMAT */ -+ dd_emit(ctx, 1, 0); /* ffffffff line OPERATION */ -+ -+ dd_emit(ctx, 1, 1); /* ffffffff triangle COLOR_FORMAT */ -+ dd_emit(ctx, 1, 0); /* ffffffff triangle OPERATION */ -+ -+ dd_emit(ctx, 1, 0); /* 0000000f sifm TILE_MODE_Z */ -+ dd_emit(ctx, 1, 2); /* 0000000f sifm TILE_MODE_Y */ -+ dd_emit(ctx, 1, 0); /* 000000ff sifm FORMAT_FILTER */ -+ dd_emit(ctx, 1, 1); /* 000000ff sifm FORMAT_ORIGIN */ -+ dd_emit(ctx, 1, 0); /* 0000ffff sifm SRC_PITCH */ -+ dd_emit(ctx, 1, 1); /* 00000001 sifm SRC_LINEAR */ -+ dd_emit(ctx, 1, 0); /* 000000ff sifm SRC_OFFSET_HIGH */ -+ dd_emit(ctx, 1, 0); /* ffffffff sifm SRC_OFFSET */ -+ dd_emit(ctx, 1, 0); /* 0000ffff sifm SRC_HEIGHT */ -+ dd_emit(ctx, 1, 0); /* 0000ffff sifm SRC_WIDTH */ -+ dd_emit(ctx, 1, 3); /* ffffffff sifm COLOR_FORMAT */ -+ dd_emit(ctx, 1, 0); /* ffffffff sifm OPERATION */ -+ -+ dd_emit(ctx, 1, 0); /* ffffffff sifc OPERATION */ -+ } -+ -+ /* tesla state */ -+ dd_emit(ctx, 1, 0); /* 0000000f GP_TEXTURES_LOG2 */ -+ dd_emit(ctx, 1, 0); /* 0000000f GP_SAMPLERS_LOG2 */ -+ dd_emit(ctx, 1, 0); /* 000000ff */ -+ dd_emit(ctx, 1, 0); /* ffffffff */ -+ dd_emit(ctx, 1, 4); /* 000000ff UNK12B0_0 */ -+ dd_emit(ctx, 1, 0x70); /* 000000ff UNK12B0_1 */ -+ dd_emit(ctx, 1, 0x80); /* 000000ff UNK12B0_3 */ -+ dd_emit(ctx, 1, 0); /* 000000ff UNK12B0_2 */ -+ dd_emit(ctx, 1, 0); /* 0000000f FP_TEXTURES_LOG2 */ -+ dd_emit(ctx, 1, 0); /* 0000000f FP_SAMPLERS_LOG2 */ -+ if (IS_NVA3F(dev_priv->chipset)) { -+ dd_emit(ctx, 1, 0); /* ffffffff */ -+ dd_emit(ctx, 1, 0); /* 0000007f MULTISAMPLE_SAMPLES_LOG2 */ -+ } else { -+ dd_emit(ctx, 1, 0); /* 0000000f MULTISAMPLE_SAMPLES_LOG2 */ -+ } -+ dd_emit(ctx, 1, 0xc); /* 000000ff SEMANTIC_COLOR.BFC0_ID */ -+ if (dev_priv->chipset != 0x50) -+ dd_emit(ctx, 1, 0); /* 00000001 SEMANTIC_COLOR.CLMP_EN */ -+ dd_emit(ctx, 1, 8); /* 000000ff SEMANTIC_COLOR.COLR_NR */ -+ dd_emit(ctx, 1, 0x14); /* 000000ff SEMANTIC_COLOR.FFC0_ID */ -+ if (dev_priv->chipset == 0x50) { -+ dd_emit(ctx, 1, 0); /* 000000ff SEMANTIC_LAYER */ -+ dd_emit(ctx, 1, 0); /* 00000001 */ -+ } else { -+ dd_emit(ctx, 1, 0); /* 00000001 SEMANTIC_PTSZ.ENABLE */ -+ dd_emit(ctx, 1, 0x29); /* 000000ff SEMANTIC_PTSZ.PTSZ_ID */ -+ dd_emit(ctx, 1, 0x27); /* 000000ff SEMANTIC_PRIM */ -+ dd_emit(ctx, 1, 0x26); /* 000000ff SEMANTIC_LAYER */ -+ dd_emit(ctx, 1, 8); /* 0000000f SMENATIC_CLIP.CLIP_HIGH */ -+ dd_emit(ctx, 1, 4); /* 000000ff SEMANTIC_CLIP.CLIP_LO */ -+ dd_emit(ctx, 1, 0x27); /* 000000ff UNK0FD4 */ -+ dd_emit(ctx, 1, 0); /* 00000001 UNK1900 */ -+ } -+ dd_emit(ctx, 1, 0); /* 00000007 RT_CONTROL_MAP0 */ -+ dd_emit(ctx, 1, 1); /* 00000007 RT_CONTROL_MAP1 */ -+ dd_emit(ctx, 1, 2); /* 00000007 RT_CONTROL_MAP2 */ -+ dd_emit(ctx, 1, 3); /* 00000007 RT_CONTROL_MAP3 */ -+ dd_emit(ctx, 1, 4); /* 00000007 RT_CONTROL_MAP4 */ -+ dd_emit(ctx, 1, 5); /* 00000007 RT_CONTROL_MAP5 */ -+ dd_emit(ctx, 1, 6); /* 00000007 RT_CONTROL_MAP6 */ -+ dd_emit(ctx, 1, 7); /* 00000007 RT_CONTROL_MAP7 */ -+ dd_emit(ctx, 1, 1); /* 0000000f RT_CONTROL_COUNT */ -+ dd_emit(ctx, 8, 0); /* 00000001 RT_HORIZ_UNK */ -+ dd_emit(ctx, 8, 0); /* ffffffff RT_ADDRESS_LOW */ -+ dd_emit(ctx, 1, 0xcf); /* 000000ff RT_FORMAT */ -+ dd_emit(ctx, 7, 0); /* 000000ff RT_FORMAT */ -+ if (dev_priv->chipset != 0x50) -+ dd_emit(ctx, 3, 0); /* 1, 1, 1 */ -+ else -+ dd_emit(ctx, 2, 0); /* 1, 1 */ -+ dd_emit(ctx, 1, 0); /* ffffffff GP_ENABLE */ -+ dd_emit(ctx, 1, 0x80); /* 0000ffff GP_VERTEX_OUTPUT_COUNT*/ -+ dd_emit(ctx, 1, 4); /* 000000ff GP_REG_ALLOC_RESULT */ -+ dd_emit(ctx, 1, 4); /* 000000ff GP_RESULT_MAP_SIZE */ -+ if (IS_NVA3F(dev_priv->chipset)) { -+ dd_emit(ctx, 1, 3); /* 00000003 */ -+ dd_emit(ctx, 1, 0); /* 00000001 UNK1418. Alone. */ -+ } -+ if (dev_priv->chipset != 0x50) -+ dd_emit(ctx, 1, 3); /* 00000003 UNK15AC */ -+ dd_emit(ctx, 1, 1); /* ffffffff RASTERIZE_ENABLE */ -+ dd_emit(ctx, 1, 0); /* 00000001 FP_CONTROL.EXPORTS_Z */ -+ if (dev_priv->chipset != 0x50) -+ dd_emit(ctx, 1, 0); /* 00000001 FP_CONTROL.MULTIPLE_RESULTS */ -+ dd_emit(ctx, 1, 0x12); /* 000000ff FP_INTERPOLANT_CTRL.COUNT */ -+ dd_emit(ctx, 1, 0x10); /* 000000ff FP_INTERPOLANT_CTRL.COUNT_NONFLAT */ -+ dd_emit(ctx, 1, 0xc); /* 000000ff FP_INTERPOLANT_CTRL.OFFSET */ -+ dd_emit(ctx, 1, 1); /* 00000001 FP_INTERPOLANT_CTRL.UMASK.W */ -+ dd_emit(ctx, 1, 0); /* 00000001 FP_INTERPOLANT_CTRL.UMASK.X */ -+ dd_emit(ctx, 1, 0); /* 00000001 FP_INTERPOLANT_CTRL.UMASK.Y */ -+ dd_emit(ctx, 1, 0); /* 00000001 FP_INTERPOLANT_CTRL.UMASK.Z */ -+ dd_emit(ctx, 1, 4); /* 000000ff FP_RESULT_COUNT */ -+ dd_emit(ctx, 1, 2); /* ffffffff REG_MODE */ -+ dd_emit(ctx, 1, 4); /* 000000ff FP_REG_ALLOC_TEMP */ -+ if (dev_priv->chipset >= 0xa0) -+ dd_emit(ctx, 1, 0); /* ffffffff */ -+ dd_emit(ctx, 1, 0); /* 00000001 GP_BUILTIN_RESULT_EN.LAYER_IDX */ -+ dd_emit(ctx, 1, 0); /* ffffffff STRMOUT_ENABLE */ -+ dd_emit(ctx, 1, 0x3fffff); /* 003fffff TIC_LIMIT */ -+ dd_emit(ctx, 1, 0x1fff); /* 000fffff TSC_LIMIT */ -+ dd_emit(ctx, 1, 0); /* 00000001 VERTEX_TWO_SIDE_ENABLE*/ -+ if (dev_priv->chipset != 0x50) -+ dd_emit(ctx, 8, 0); /* 00000001 */ -+ if (dev_priv->chipset >= 0xa0) { -+ dd_emit(ctx, 1, 1); /* 00000007 VTX_ATTR_DEFINE.COMP */ -+ dd_emit(ctx, 1, 1); /* 00000007 VTX_ATTR_DEFINE.SIZE */ -+ dd_emit(ctx, 1, 2); /* 00000007 VTX_ATTR_DEFINE.TYPE */ -+ dd_emit(ctx, 1, 0); /* 000000ff VTX_ATTR_DEFINE.ATTR */ -+ } -+ dd_emit(ctx, 1, 4); /* 0000007f VP_RESULT_MAP_SIZE */ -+ dd_emit(ctx, 1, 0x14); /* 0000001f ZETA_FORMAT */ -+ dd_emit(ctx, 1, 1); /* 00000001 ZETA_ENABLE */ -+ dd_emit(ctx, 1, 0); /* 0000000f VP_TEXTURES_LOG2 */ -+ dd_emit(ctx, 1, 0); /* 0000000f VP_SAMPLERS_LOG2 */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ dd_emit(ctx, 1, 0); /* 00000001 */ -+ dd_emit(ctx, 1, 2); /* 00000003 POLYGON_MODE_BACK */ -+ if (dev_priv->chipset >= 0xa0) -+ dd_emit(ctx, 1, 0); /* 00000003 VTX_ATTR_DEFINE.SIZE - 1 */ -+ dd_emit(ctx, 1, 0); /* 0000ffff CB_ADDR_INDEX */ -+ if (dev_priv->chipset >= 0xa0) -+ dd_emit(ctx, 1, 0); /* 00000003 */ -+ dd_emit(ctx, 1, 0); /* 00000001 CULL_FACE_ENABLE */ -+ dd_emit(ctx, 1, 1); /* 00000003 CULL_FACE */ -+ dd_emit(ctx, 1, 0); /* 00000001 FRONT_FACE */ -+ dd_emit(ctx, 1, 2); /* 00000003 POLYGON_MODE_FRONT */ -+ dd_emit(ctx, 1, 0x1000); /* 00007fff UNK141C */ -+ if (dev_priv->chipset != 0x50) { -+ dd_emit(ctx, 1, 0xe00); /* 7fff */ -+ dd_emit(ctx, 1, 0x1000); /* 7fff */ -+ dd_emit(ctx, 1, 0x1e00); /* 7fff */ -+ } -+ dd_emit(ctx, 1, 0); /* 00000001 BEGIN_END_ACTIVE */ -+ dd_emit(ctx, 1, 1); /* 00000001 POLYGON_MODE_??? */ -+ dd_emit(ctx, 1, 1); /* 000000ff GP_REG_ALLOC_TEMP / 4 rounded up */ -+ dd_emit(ctx, 1, 1); /* 000000ff FP_REG_ALLOC_TEMP... without /4? */ -+ dd_emit(ctx, 1, 1); /* 000000ff VP_REG_ALLOC_TEMP / 4 rounded up */ -+ dd_emit(ctx, 1, 1); /* 00000001 */ -+ dd_emit(ctx, 1, 0); /* 00000001 */ -+ dd_emit(ctx, 1, 0); /* 00000001 VTX_ATTR_MASK_UNK0 nonempty */ -+ dd_emit(ctx, 1, 0); /* 00000001 VTX_ATTR_MASK_UNK1 nonempty */ -+ dd_emit(ctx, 1, 0x200); /* 0003ffff GP_VERTEX_OUTPUT_COUNT*GP_REG_ALLOC_RESULT */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ dd_emit(ctx, 1, 0x200); -+ dd_emit(ctx, 1, 0); /* 00000001 */ -+ if (dev_priv->chipset < 0xa0) { -+ dd_emit(ctx, 1, 1); /* 00000001 */ -+ dd_emit(ctx, 1, 0x70); /* 000000ff */ -+ dd_emit(ctx, 1, 0x80); /* 000000ff */ -+ dd_emit(ctx, 1, 0); /* 000000ff */ -+ dd_emit(ctx, 1, 0); /* 00000001 */ -+ dd_emit(ctx, 1, 1); /* 00000001 */ -+ dd_emit(ctx, 1, 0x70); /* 000000ff */ -+ dd_emit(ctx, 1, 0x80); /* 000000ff */ -+ dd_emit(ctx, 1, 0); /* 000000ff */ -+ } else { -+ dd_emit(ctx, 1, 1); /* 00000001 */ -+ dd_emit(ctx, 1, 0xf0); /* 000000ff */ -+ dd_emit(ctx, 1, 0xff); /* 000000ff */ -+ dd_emit(ctx, 1, 0); /* 000000ff */ -+ dd_emit(ctx, 1, 0); /* 00000001 */ -+ dd_emit(ctx, 1, 1); /* 00000001 */ -+ dd_emit(ctx, 1, 0xf0); /* 000000ff */ -+ dd_emit(ctx, 1, 0xff); /* 000000ff */ -+ dd_emit(ctx, 1, 0); /* 000000ff */ -+ dd_emit(ctx, 1, 9); /* 0000003f UNK114C.COMP,SIZE */ -+ } -+ -+ /* eng2d state */ -+ dd_emit(ctx, 1, 0); /* 00000001 eng2d COLOR_KEY_ENABLE */ -+ dd_emit(ctx, 1, 0); /* 00000007 eng2d COLOR_KEY_FORMAT */ -+ dd_emit(ctx, 1, 1); /* ffffffff eng2d DST_DEPTH */ -+ dd_emit(ctx, 1, 0xcf); /* 000000ff eng2d DST_FORMAT */ -+ dd_emit(ctx, 1, 0); /* ffffffff eng2d DST_LAYER */ -+ dd_emit(ctx, 1, 1); /* 00000001 eng2d DST_LINEAR */ -+ dd_emit(ctx, 1, 0); /* 00000007 eng2d PATTERN_COLOR_FORMAT */ -+ dd_emit(ctx, 1, 0); /* 00000007 eng2d OPERATION */ -+ dd_emit(ctx, 1, 0); /* 00000003 eng2d PATTERN_SELECT */ -+ dd_emit(ctx, 1, 0xcf); /* 000000ff eng2d SIFC_FORMAT */ -+ dd_emit(ctx, 1, 0); /* 00000001 eng2d SIFC_BITMAP_ENABLE */ -+ dd_emit(ctx, 1, 2); /* 00000003 eng2d SIFC_BITMAP_UNK808 */ -+ dd_emit(ctx, 1, 0); /* ffffffff eng2d BLIT_DU_DX_FRACT */ -+ dd_emit(ctx, 1, 1); /* ffffffff eng2d BLIT_DU_DX_INT */ -+ dd_emit(ctx, 1, 0); /* ffffffff eng2d BLIT_DV_DY_FRACT */ -+ dd_emit(ctx, 1, 1); /* ffffffff eng2d BLIT_DV_DY_INT */ -+ dd_emit(ctx, 1, 0); /* 00000001 eng2d BLIT_CONTROL_FILTER */ -+ dd_emit(ctx, 1, 0xcf); /* 000000ff eng2d DRAW_COLOR_FORMAT */ -+ dd_emit(ctx, 1, 0xcf); /* 000000ff eng2d SRC_FORMAT */ -+ dd_emit(ctx, 1, 1); /* 00000001 eng2d SRC_LINEAR #2 */ -+ -+ num = ctx->ctxvals_pos - base; -+ ctx->ctxvals_pos = base; -+ if (IS_NVA3F(dev_priv->chipset)) -+ cp_ctx(ctx, 0x404800, num); -+ else -+ cp_ctx(ctx, 0x405400, num); -+} -+ - /* - * xfer areas. These are a pain. - * -@@ -990,28 +1130,33 @@ - * without the help of ctxprog. - */ - --static inline void -+static void - xf_emit(struct nouveau_grctx *ctx, int num, uint32_t val) { - int i; - if (val && ctx->mode == NOUVEAU_GRCTX_VALS) - for (i = 0; i < num; i++) -- nv_wo32(ctx->dev, ctx->data, ctx->ctxvals_pos + (i << 3), val); -+ nv_wo32(ctx->data, 4 * (ctx->ctxvals_pos + (i << 3)), val); - ctx->ctxvals_pos += num << 3; - } - - /* Gene declarations... */ - -+static void nv50_graph_construct_gene_dispatch(struct nouveau_grctx *ctx); - static void nv50_graph_construct_gene_m2mf(struct nouveau_grctx *ctx); --static void nv50_graph_construct_gene_unk1(struct nouveau_grctx *ctx); --static void nv50_graph_construct_gene_unk2(struct nouveau_grctx *ctx); --static void nv50_graph_construct_gene_unk3(struct nouveau_grctx *ctx); --static void nv50_graph_construct_gene_unk4(struct nouveau_grctx *ctx); --static void nv50_graph_construct_gene_unk5(struct nouveau_grctx *ctx); --static void nv50_graph_construct_gene_unk6(struct nouveau_grctx *ctx); --static void nv50_graph_construct_gene_unk7(struct nouveau_grctx *ctx); --static void nv50_graph_construct_gene_unk8(struct nouveau_grctx *ctx); --static void nv50_graph_construct_gene_unk9(struct nouveau_grctx *ctx); --static void nv50_graph_construct_gene_unk10(struct nouveau_grctx *ctx); -+static void nv50_graph_construct_gene_ccache(struct nouveau_grctx *ctx); -+static void nv50_graph_construct_gene_unk10xx(struct nouveau_grctx *ctx); -+static void nv50_graph_construct_gene_unk14xx(struct nouveau_grctx *ctx); -+static void nv50_graph_construct_gene_zcull(struct nouveau_grctx *ctx); -+static void nv50_graph_construct_gene_clipid(struct nouveau_grctx *ctx); -+static void nv50_graph_construct_gene_unk24xx(struct nouveau_grctx *ctx); -+static void nv50_graph_construct_gene_vfetch(struct nouveau_grctx *ctx); -+static void nv50_graph_construct_gene_eng2d(struct nouveau_grctx *ctx); -+static void nv50_graph_construct_gene_csched(struct nouveau_grctx *ctx); -+static void nv50_graph_construct_gene_unk1cxx(struct nouveau_grctx *ctx); -+static void nv50_graph_construct_gene_strmout(struct nouveau_grctx *ctx); -+static void nv50_graph_construct_gene_unk34xx(struct nouveau_grctx *ctx); -+static void nv50_graph_construct_gene_ropm1(struct nouveau_grctx *ctx); -+static void nv50_graph_construct_gene_ropm2(struct nouveau_grctx *ctx); - static void nv50_graph_construct_gene_ropc(struct nouveau_grctx *ctx); - static void nv50_graph_construct_xfer_tp(struct nouveau_grctx *ctx); - -@@ -1030,102 +1175,32 @@ - if (dev_priv->chipset < 0xa0) { - /* Strand 0 */ - ctx->ctxvals_pos = offset; -- switch (dev_priv->chipset) { -- case 0x50: -- xf_emit(ctx, 0x99, 0); -- break; -- case 0x84: -- case 0x86: -- xf_emit(ctx, 0x384, 0); -- break; -- case 0x92: -- case 0x94: -- case 0x96: -- case 0x98: -- xf_emit(ctx, 0x380, 0); -- break; -- } -- nv50_graph_construct_gene_m2mf (ctx); -- switch (dev_priv->chipset) { -- case 0x50: -- case 0x84: -- case 0x86: -- case 0x98: -- xf_emit(ctx, 0x4c4, 0); -- break; -- case 0x92: -- case 0x94: -- case 0x96: -- xf_emit(ctx, 0x984, 0); -- break; -- } -- nv50_graph_construct_gene_unk5(ctx); -- if (dev_priv->chipset == 0x50) -- xf_emit(ctx, 0xa, 0); -- else -- xf_emit(ctx, 0xb, 0); -- nv50_graph_construct_gene_unk4(ctx); -- nv50_graph_construct_gene_unk3(ctx); -+ nv50_graph_construct_gene_dispatch(ctx); -+ nv50_graph_construct_gene_m2mf(ctx); -+ nv50_graph_construct_gene_unk24xx(ctx); -+ nv50_graph_construct_gene_clipid(ctx); -+ nv50_graph_construct_gene_zcull(ctx); - if ((ctx->ctxvals_pos-offset)/8 > size) - size = (ctx->ctxvals_pos-offset)/8; - - /* Strand 1 */ - ctx->ctxvals_pos = offset + 0x1; -- nv50_graph_construct_gene_unk6(ctx); -- nv50_graph_construct_gene_unk7(ctx); -- nv50_graph_construct_gene_unk8(ctx); -- switch (dev_priv->chipset) { -- case 0x50: -- case 0x92: -- xf_emit(ctx, 0xfb, 0); -- break; -- case 0x84: -- xf_emit(ctx, 0xd3, 0); -- break; -- case 0x94: -- case 0x96: -- xf_emit(ctx, 0xab, 0); -- break; -- case 0x86: -- case 0x98: -- xf_emit(ctx, 0x6b, 0); -- break; -- } -- xf_emit(ctx, 2, 0x4e3bfdf); -- xf_emit(ctx, 4, 0); -- xf_emit(ctx, 1, 0x0fac6881); -- xf_emit(ctx, 0xb, 0); -- xf_emit(ctx, 2, 0x4e3bfdf); -+ nv50_graph_construct_gene_vfetch(ctx); -+ nv50_graph_construct_gene_eng2d(ctx); -+ nv50_graph_construct_gene_csched(ctx); -+ nv50_graph_construct_gene_ropm1(ctx); -+ nv50_graph_construct_gene_ropm2(ctx); - if ((ctx->ctxvals_pos-offset)/8 > size) - size = (ctx->ctxvals_pos-offset)/8; - - /* Strand 2 */ - ctx->ctxvals_pos = offset + 0x2; -- switch (dev_priv->chipset) { -- case 0x50: -- case 0x92: -- xf_emit(ctx, 0xa80, 0); -- break; -- case 0x84: -- xf_emit(ctx, 0xa7e, 0); -- break; -- case 0x94: -- case 0x96: -- xf_emit(ctx, 0xa7c, 0); -- break; -- case 0x86: -- case 0x98: -- xf_emit(ctx, 0xa7a, 0); -- break; -- } -- xf_emit(ctx, 1, 0x3fffff); -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 0x1fff); -- xf_emit(ctx, 0xe, 0); -- nv50_graph_construct_gene_unk9(ctx); -- nv50_graph_construct_gene_unk2(ctx); -- nv50_graph_construct_gene_unk1(ctx); -- nv50_graph_construct_gene_unk10(ctx); -+ nv50_graph_construct_gene_ccache(ctx); -+ nv50_graph_construct_gene_unk1cxx(ctx); -+ nv50_graph_construct_gene_strmout(ctx); -+ nv50_graph_construct_gene_unk14xx(ctx); -+ nv50_graph_construct_gene_unk10xx(ctx); -+ nv50_graph_construct_gene_unk34xx(ctx); - if ((ctx->ctxvals_pos-offset)/8 > size) - size = (ctx->ctxvals_pos-offset)/8; - -@@ -1150,86 +1225,46 @@ - } else { - /* Strand 0 */ - ctx->ctxvals_pos = offset; -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 0x385, 0); -- else -- xf_emit(ctx, 0x384, 0); -+ nv50_graph_construct_gene_dispatch(ctx); - nv50_graph_construct_gene_m2mf(ctx); -- xf_emit(ctx, 0x950, 0); -- nv50_graph_construct_gene_unk10(ctx); -- xf_emit(ctx, 1, 0x0fac6881); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) { -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 3, 0); -- } -- nv50_graph_construct_gene_unk8(ctx); -- if (dev_priv->chipset == 0xa0) -- xf_emit(ctx, 0x189, 0); -- else if (dev_priv->chipset == 0xa3) -- xf_emit(ctx, 0xd5, 0); -- else if (dev_priv->chipset == 0xa5) -- xf_emit(ctx, 0x99, 0); -- else if (dev_priv->chipset == 0xaa) -- xf_emit(ctx, 0x65, 0); -- else -- xf_emit(ctx, 0x6d, 0); -- nv50_graph_construct_gene_unk9(ctx); -+ nv50_graph_construct_gene_unk34xx(ctx); -+ nv50_graph_construct_gene_csched(ctx); -+ nv50_graph_construct_gene_unk1cxx(ctx); -+ nv50_graph_construct_gene_strmout(ctx); - if ((ctx->ctxvals_pos-offset)/8 > size) - size = (ctx->ctxvals_pos-offset)/8; - - /* Strand 1 */ - ctx->ctxvals_pos = offset + 1; -- nv50_graph_construct_gene_unk1(ctx); -+ nv50_graph_construct_gene_unk10xx(ctx); - if ((ctx->ctxvals_pos-offset)/8 > size) - size = (ctx->ctxvals_pos-offset)/8; - - /* Strand 2 */ - ctx->ctxvals_pos = offset + 2; -- if (dev_priv->chipset == 0xa0) { -- nv50_graph_construct_gene_unk2(ctx); -- } -- xf_emit(ctx, 0x36, 0); -- nv50_graph_construct_gene_unk5(ctx); -+ if (dev_priv->chipset == 0xa0) -+ nv50_graph_construct_gene_unk14xx(ctx); -+ nv50_graph_construct_gene_unk24xx(ctx); - if ((ctx->ctxvals_pos-offset)/8 > size) - size = (ctx->ctxvals_pos-offset)/8; - - /* Strand 3 */ - ctx->ctxvals_pos = offset + 3; -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 1); -- nv50_graph_construct_gene_unk6(ctx); -+ nv50_graph_construct_gene_vfetch(ctx); - if ((ctx->ctxvals_pos-offset)/8 > size) - size = (ctx->ctxvals_pos-offset)/8; - - /* Strand 4 */ - ctx->ctxvals_pos = offset + 4; -- if (dev_priv->chipset == 0xa0) -- xf_emit(ctx, 0xa80, 0); -- else if (dev_priv->chipset == 0xa3) -- xf_emit(ctx, 0xa7c, 0); -- else -- xf_emit(ctx, 0xa7a, 0); -- xf_emit(ctx, 1, 0x3fffff); -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 0x1fff); -+ nv50_graph_construct_gene_ccache(ctx); - if ((ctx->ctxvals_pos-offset)/8 > size) - size = (ctx->ctxvals_pos-offset)/8; - - /* Strand 5 */ - ctx->ctxvals_pos = offset + 5; -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x0fac6881); -- xf_emit(ctx, 0xb, 0); -- xf_emit(ctx, 2, 0x4e3bfdf); -- xf_emit(ctx, 3, 0); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 1, 0x11); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 2, 0x4e3bfdf); -- xf_emit(ctx, 2, 0); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 1, 0x11); -- xf_emit(ctx, 1, 0); -+ nv50_graph_construct_gene_ropm2(ctx); -+ nv50_graph_construct_gene_ropm1(ctx); -+ /* per-ROP context */ - for (i = 0; i < 8; i++) - if (units & (1<<(i+16))) - nv50_graph_construct_gene_ropc(ctx); -@@ -1238,10 +1273,9 @@ - - /* Strand 6 */ - ctx->ctxvals_pos = offset + 6; -- nv50_graph_construct_gene_unk3(ctx); -- xf_emit(ctx, 0xb, 0); -- nv50_graph_construct_gene_unk4(ctx); -- nv50_graph_construct_gene_unk7(ctx); -+ nv50_graph_construct_gene_zcull(ctx); -+ nv50_graph_construct_gene_clipid(ctx); -+ nv50_graph_construct_gene_eng2d(ctx); - if (units & (1 << 0)) - nv50_graph_construct_xfer_tp(ctx); - if (units & (1 << 1)) -@@ -1269,7 +1303,7 @@ - if (units & (1 << 9)) - nv50_graph_construct_xfer_tp(ctx); - } else { -- nv50_graph_construct_gene_unk2(ctx); -+ nv50_graph_construct_gene_unk14xx(ctx); - } - if ((ctx->ctxvals_pos-offset)/8 > size) - size = (ctx->ctxvals_pos-offset)/8; -@@ -1290,9 +1324,70 @@ - */ - - static void -+nv50_graph_construct_gene_dispatch(struct nouveau_grctx *ctx) -+{ -+ /* start of strand 0 */ -+ struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; -+ /* SEEK */ -+ if (dev_priv->chipset == 0x50) -+ xf_emit(ctx, 5, 0); -+ else if (!IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 6, 0); -+ else -+ xf_emit(ctx, 4, 0); -+ /* SEEK */ -+ /* the PGRAPH's internal FIFO */ -+ if (dev_priv->chipset == 0x50) -+ xf_emit(ctx, 8*3, 0); -+ else -+ xf_emit(ctx, 0x100*3, 0); -+ /* and another bonus slot?!? */ -+ xf_emit(ctx, 3, 0); -+ /* and YET ANOTHER bonus slot? */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 3, 0); -+ /* SEEK */ -+ /* CTX_SWITCH: caches of gr objects bound to subchannels. 8 values, last used index */ -+ xf_emit(ctx, 9, 0); -+ /* SEEK */ -+ xf_emit(ctx, 9, 0); -+ /* SEEK */ -+ xf_emit(ctx, 9, 0); -+ /* SEEK */ -+ xf_emit(ctx, 9, 0); -+ /* SEEK */ -+ if (dev_priv->chipset < 0x90) -+ xf_emit(ctx, 4, 0); -+ /* SEEK */ -+ xf_emit(ctx, 2, 0); -+ /* SEEK */ -+ xf_emit(ctx, 6*2, 0); -+ xf_emit(ctx, 2, 0); -+ /* SEEK */ -+ xf_emit(ctx, 2, 0); -+ /* SEEK */ -+ xf_emit(ctx, 6*2, 0); -+ xf_emit(ctx, 2, 0); -+ /* SEEK */ -+ if (dev_priv->chipset == 0x50) -+ xf_emit(ctx, 0x1c, 0); -+ else if (dev_priv->chipset < 0xa0) -+ xf_emit(ctx, 0x1e, 0); -+ else -+ xf_emit(ctx, 0x22, 0); -+ /* SEEK */ -+ xf_emit(ctx, 0x15, 0); -+} -+ -+static void - nv50_graph_construct_gene_m2mf(struct nouveau_grctx *ctx) - { -- /* m2mf state */ -+ /* Strand 0, right after dispatch */ -+ struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; -+ int smallm2mf = 0; -+ if (dev_priv->chipset < 0x92 || dev_priv->chipset == 0x98) -+ smallm2mf = 1; -+ /* SEEK */ - xf_emit (ctx, 1, 0); /* DMA_NOTIFY instance >> 4 */ - xf_emit (ctx, 1, 0); /* DMA_BUFFER_IN instance >> 4 */ - xf_emit (ctx, 1, 0); /* DMA_BUFFER_OUT instance >> 4 */ -@@ -1319,427 +1414,975 @@ - xf_emit (ctx, 1, 0); /* TILING_POSITION_OUT */ - xf_emit (ctx, 1, 0); /* OFFSET_IN_HIGH */ - xf_emit (ctx, 1, 0); /* OFFSET_OUT_HIGH */ -+ /* SEEK */ -+ if (smallm2mf) -+ xf_emit(ctx, 0x40, 0); /* 20 * ffffffff, 3ffff */ -+ else -+ xf_emit(ctx, 0x100, 0); /* 80 * ffffffff, 3ffff */ -+ xf_emit(ctx, 4, 0); /* 1f/7f, 0, 1f/7f, 0 [1f for smallm2mf, 7f otherwise] */ -+ /* SEEK */ -+ if (smallm2mf) -+ xf_emit(ctx, 0x400, 0); /* ffffffff */ -+ else -+ xf_emit(ctx, 0x800, 0); /* ffffffff */ -+ xf_emit(ctx, 4, 0); /* ff/1ff, 0, 0, 0 [ff for smallm2mf, 1ff otherwise] */ -+ /* SEEK */ -+ xf_emit(ctx, 0x40, 0); /* 20 * bits ffffffff, 3ffff */ -+ xf_emit(ctx, 0x6, 0); /* 1f, 0, 1f, 0, 1f, 0 */ - } - - static void --nv50_graph_construct_gene_unk1(struct nouveau_grctx *ctx) -+nv50_graph_construct_gene_ccache(struct nouveau_grctx *ctx) - { - struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; -- /* end of area 2 on pre-NVA0, area 1 on NVAx */ -- xf_emit(ctx, 2, 4); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x80); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 1, 0x80c14); -- xf_emit(ctx, 1, 0); -- if (dev_priv->chipset == 0x50) -- xf_emit(ctx, 1, 0x3ff); -- else -- xf_emit(ctx, 1, 0x7ff); -+ xf_emit(ctx, 2, 0); /* RO */ -+ xf_emit(ctx, 0x800, 0); /* ffffffff */ - switch (dev_priv->chipset) { - case 0x50: -- case 0x86: -- case 0x98: -- case 0xaa: -- case 0xac: -- xf_emit(ctx, 0x542, 0); -+ case 0x92: -+ case 0xa0: -+ xf_emit(ctx, 0x2b, 0); - break; - case 0x84: -- case 0x92: -+ xf_emit(ctx, 0x29, 0); -+ break; - case 0x94: - case 0x96: -- xf_emit(ctx, 0x942, 0); -- break; -- case 0xa0: - case 0xa3: -- xf_emit(ctx, 0x2042, 0); -+ xf_emit(ctx, 0x27, 0); - break; -+ case 0x86: -+ case 0x98: - case 0xa5: - case 0xa8: -- xf_emit(ctx, 0x842, 0); -+ case 0xaa: -+ case 0xac: -+ case 0xaf: -+ xf_emit(ctx, 0x25, 0); - break; - } -- xf_emit(ctx, 2, 4); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x80); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x27); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x26); -- xf_emit(ctx, 3, 0); -+ /* CB bindings, 0x80 of them. first word is address >> 8, second is -+ * size >> 4 | valid << 24 */ -+ xf_emit(ctx, 0x100, 0); /* ffffffff CB_DEF */ -+ xf_emit(ctx, 1, 0); /* 0000007f CB_ADDR_BUFFER */ -+ xf_emit(ctx, 1, 0); /* 0 */ -+ xf_emit(ctx, 0x30, 0); /* ff SET_PROGRAM_CB */ -+ xf_emit(ctx, 1, 0); /* 3f last SET_PROGRAM_CB */ -+ xf_emit(ctx, 4, 0); /* RO */ -+ xf_emit(ctx, 0x100, 0); /* ffffffff */ -+ xf_emit(ctx, 8, 0); /* 1f, 0, 0, ... */ -+ xf_emit(ctx, 8, 0); /* ffffffff */ -+ xf_emit(ctx, 4, 0); /* ffffffff */ -+ xf_emit(ctx, 1, 0); /* 3 */ -+ xf_emit(ctx, 1, 0); /* ffffffff */ -+ xf_emit(ctx, 1, 0); /* 0000ffff DMA_CODE_CB */ -+ xf_emit(ctx, 1, 0); /* 0000ffff DMA_TIC */ -+ xf_emit(ctx, 1, 0); /* 0000ffff DMA_TSC */ -+ xf_emit(ctx, 1, 0); /* 00000001 LINKED_TSC */ -+ xf_emit(ctx, 1, 0); /* 000000ff TIC_ADDRESS_HIGH */ -+ xf_emit(ctx, 1, 0); /* ffffffff TIC_ADDRESS_LOW */ -+ xf_emit(ctx, 1, 0x3fffff); /* 003fffff TIC_LIMIT */ -+ xf_emit(ctx, 1, 0); /* 000000ff TSC_ADDRESS_HIGH */ -+ xf_emit(ctx, 1, 0); /* ffffffff TSC_ADDRESS_LOW */ -+ xf_emit(ctx, 1, 0x1fff); /* 000fffff TSC_LIMIT */ -+ xf_emit(ctx, 1, 0); /* 000000ff VP_ADDRESS_HIGH */ -+ xf_emit(ctx, 1, 0); /* ffffffff VP_ADDRESS_LOW */ -+ xf_emit(ctx, 1, 0); /* 00ffffff VP_START_ID */ -+ xf_emit(ctx, 1, 0); /* 000000ff CB_DEF_ADDRESS_HIGH */ -+ xf_emit(ctx, 1, 0); /* ffffffff CB_DEF_ADDRESS_LOW */ -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 000000ff GP_ADDRESS_HIGH */ -+ xf_emit(ctx, 1, 0); /* ffffffff GP_ADDRESS_LOW */ -+ xf_emit(ctx, 1, 0); /* 00ffffff GP_START_ID */ -+ xf_emit(ctx, 1, 0); /* 000000ff FP_ADDRESS_HIGH */ -+ xf_emit(ctx, 1, 0); /* ffffffff FP_ADDRESS_LOW */ -+ xf_emit(ctx, 1, 0); /* 00ffffff FP_START_ID */ - } - - static void --nv50_graph_construct_gene_unk10(struct nouveau_grctx *ctx) -+nv50_graph_construct_gene_unk10xx(struct nouveau_grctx *ctx) - { -+ struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; -+ int i; - /* end of area 2 on pre-NVA0, area 1 on NVAx */ -- xf_emit(ctx, 0x10, 0x04000000); -- xf_emit(ctx, 0x24, 0); -- xf_emit(ctx, 2, 0x04e3bfdf); -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 0x1fe21); -+ xf_emit(ctx, 1, 4); /* 000000ff GP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 4); /* 0000007f VP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ -+ xf_emit(ctx, 1, 0x80); /* 0000ffff GP_VERTEX_OUTPUT_COUNT */ -+ xf_emit(ctx, 1, 4); /* 000000ff GP_REG_ALLOC_RESULT */ -+ xf_emit(ctx, 1, 0x80c14); /* 01ffffff SEMANTIC_COLOR */ -+ xf_emit(ctx, 1, 0); /* 00000001 VERTEX_TWO_SIDE_ENABLE */ -+ if (dev_priv->chipset == 0x50) -+ xf_emit(ctx, 1, 0x3ff); -+ else -+ xf_emit(ctx, 1, 0x7ff); /* 000007ff */ -+ xf_emit(ctx, 1, 0); /* 111/113 */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A30 */ -+ for (i = 0; i < 8; i++) { -+ switch (dev_priv->chipset) { -+ case 0x50: -+ case 0x86: -+ case 0x98: -+ case 0xaa: -+ case 0xac: -+ xf_emit(ctx, 0xa0, 0); /* ffffffff */ -+ break; -+ case 0x84: -+ case 0x92: -+ case 0x94: -+ case 0x96: -+ xf_emit(ctx, 0x120, 0); -+ break; -+ case 0xa5: -+ case 0xa8: -+ xf_emit(ctx, 0x100, 0); /* ffffffff */ -+ break; -+ case 0xa0: -+ case 0xa3: -+ case 0xaf: -+ xf_emit(ctx, 0x400, 0); /* ffffffff */ -+ break; -+ } -+ xf_emit(ctx, 4, 0); /* 3f, 0, 0, 0 */ -+ xf_emit(ctx, 4, 0); /* ffffffff */ -+ } -+ xf_emit(ctx, 1, 4); /* 000000ff GP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 4); /* 0000007f VP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ -+ xf_emit(ctx, 1, 0x80); /* 0000ffff GP_VERTEX_OUTPUT_COUNT */ -+ xf_emit(ctx, 1, 4); /* 000000ff GP_REG_ALLOC_TEMP */ -+ xf_emit(ctx, 1, 1); /* 00000001 RASTERIZE_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1900 */ -+ xf_emit(ctx, 1, 0x27); /* 000000ff UNK0FD4 */ -+ xf_emit(ctx, 1, 0); /* 0001ffff GP_BUILTIN_RESULT_EN */ -+ xf_emit(ctx, 1, 0x26); /* 000000ff SEMANTIC_LAYER */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A30 */ -+} -+ -+static void -+nv50_graph_construct_gene_unk34xx(struct nouveau_grctx *ctx) -+{ -+ struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; -+ /* end of area 2 on pre-NVA0, area 1 on NVAx */ -+ xf_emit(ctx, 1, 0); /* 00000001 VIEWPORT_CLIP_RECTS_EN */ -+ xf_emit(ctx, 1, 0); /* 00000003 VIEWPORT_CLIP_MODE */ -+ xf_emit(ctx, 0x10, 0x04000000); /* 07ffffff VIEWPORT_CLIP_HORIZ*8, VIEWPORT_CLIP_VERT*8 */ -+ xf_emit(ctx, 1, 0); /* 00000001 POLYGON_STIPPLE_ENABLE */ -+ xf_emit(ctx, 0x20, 0); /* ffffffff POLYGON_STIPPLE */ -+ xf_emit(ctx, 2, 0); /* 00007fff WINDOW_OFFSET_XY */ -+ xf_emit(ctx, 1, 0); /* ffff0ff3 */ -+ xf_emit(ctx, 1, 0x04e3bfdf); /* ffffffff UNK0D64 */ -+ xf_emit(ctx, 1, 0x04e3bfdf); /* ffffffff UNK0DF4 */ -+ xf_emit(ctx, 1, 0); /* 00000003 WINDOW_ORIGIN */ -+ xf_emit(ctx, 1, 0); /* 00000007 */ -+ xf_emit(ctx, 1, 0x1fe21); /* 0001ffff tesla UNK0FAC */ -+ if (dev_priv->chipset >= 0xa0) -+ xf_emit(ctx, 1, 0x0fac6881); -+ if (IS_NVA3F(dev_priv->chipset)) { -+ xf_emit(ctx, 1, 1); -+ xf_emit(ctx, 3, 0); -+ } - } - - static void --nv50_graph_construct_gene_unk2(struct nouveau_grctx *ctx) -+nv50_graph_construct_gene_unk14xx(struct nouveau_grctx *ctx) - { - struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; - /* middle of area 2 on pre-NVA0, beginning of area 2 on NVA0, area 7 on >NVA0 */ - if (dev_priv->chipset != 0x50) { -- xf_emit(ctx, 5, 0); -- xf_emit(ctx, 1, 0x80c14); -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 0x804); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 2, 4); -- xf_emit(ctx, 1, 0x8100c12); -- } -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 2, 4); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x10); -- if (dev_priv->chipset == 0x50) -- xf_emit(ctx, 3, 0); -- else -- xf_emit(ctx, 4, 0); -- xf_emit(ctx, 1, 0x804); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0x1a); -+ xf_emit(ctx, 5, 0); /* ffffffff */ -+ xf_emit(ctx, 1, 0x80c14); /* 01ffffff SEMANTIC_COLOR */ -+ xf_emit(ctx, 1, 0); /* 00000001 */ -+ xf_emit(ctx, 1, 0); /* 000003ff */ -+ xf_emit(ctx, 1, 0x804); /* 00000fff SEMANTIC_CLIP */ -+ xf_emit(ctx, 1, 0); /* 00000001 */ -+ xf_emit(ctx, 2, 4); /* 7f, ff */ -+ xf_emit(ctx, 1, 0x8100c12); /* 1fffffff FP_INTERPOLANT_CTRL */ -+ } -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A30 */ -+ xf_emit(ctx, 1, 4); /* 0000007f VP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 4); /* 000000ff GP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ -+ xf_emit(ctx, 1, 0x10); /* 7f/ff VIEW_VOLUME_CLIP_CTRL */ -+ xf_emit(ctx, 1, 0); /* 000000ff VP_CLIP_DISTANCE_ENABLE */ - if (dev_priv->chipset != 0x50) -- xf_emit(ctx, 1, 0x7f); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0x80c14); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x8100c12); -- xf_emit(ctx, 2, 4); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x10); -- xf_emit(ctx, 3, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0x8100c12); -- xf_emit(ctx, 6, 0); -- if (dev_priv->chipset == 0x50) -- xf_emit(ctx, 1, 0x3ff); -- else -- xf_emit(ctx, 1, 0x7ff); -- xf_emit(ctx, 1, 0x80c14); -- xf_emit(ctx, 0x38, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 0x10); -- xf_emit(ctx, 0x38, 0); -- xf_emit(ctx, 2, 0x88); -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 0x16, 0); -- xf_emit(ctx, 1, 0x26); -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 0x3f800000); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 4, 0); -- else -- xf_emit(ctx, 3, 0); -- xf_emit(ctx, 1, 0x1a); -- xf_emit(ctx, 1, 0x10); -+ xf_emit(ctx, 1, 0); /* 3ff */ -+ xf_emit(ctx, 1, 0); /* 000000ff tesla UNK1940 */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK0D7C */ -+ xf_emit(ctx, 1, 0x804); /* 00000fff SEMANTIC_CLIP */ -+ xf_emit(ctx, 1, 1); /* 00000001 VIEWPORT_TRANSFORM_EN */ -+ xf_emit(ctx, 1, 0x1a); /* 0000001f POLYGON_MODE */ - if (dev_priv->chipset != 0x50) -- xf_emit(ctx, 0x28, 0); -- else -- xf_emit(ctx, 0x25, 0); -- xf_emit(ctx, 1, 0x52); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x26); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 2, 4); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x1a); -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 0x00ffff00); -- xf_emit(ctx, 1, 0); -+ xf_emit(ctx, 1, 0x7f); /* 000000ff tesla UNK0FFC */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A30 */ -+ xf_emit(ctx, 1, 1); /* 00000001 SHADE_MODEL */ -+ xf_emit(ctx, 1, 0x80c14); /* 01ffffff SEMANTIC_COLOR */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1900 */ -+ xf_emit(ctx, 1, 0x8100c12); /* 1fffffff FP_INTERPOLANT_CTRL */ -+ xf_emit(ctx, 1, 4); /* 0000007f VP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 4); /* 000000ff GP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ -+ xf_emit(ctx, 1, 0x10); /* 7f/ff VIEW_VOLUME_CLIP_CTRL */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK0D7C */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK0F8C */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A30 */ -+ xf_emit(ctx, 1, 1); /* 00000001 VIEWPORT_TRANSFORM_EN */ -+ xf_emit(ctx, 1, 0x8100c12); /* 1fffffff FP_INTERPOLANT_CTRL */ -+ xf_emit(ctx, 4, 0); /* ffffffff NOPERSPECTIVE_BITMAP */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1900 */ -+ xf_emit(ctx, 1, 0); /* 0000000f */ -+ if (dev_priv->chipset == 0x50) -+ xf_emit(ctx, 1, 0x3ff); /* 000003ff tesla UNK0D68 */ -+ else -+ xf_emit(ctx, 1, 0x7ff); /* 000007ff tesla UNK0D68 */ -+ xf_emit(ctx, 1, 0x80c14); /* 01ffffff SEMANTIC_COLOR */ -+ xf_emit(ctx, 1, 0); /* 00000001 VERTEX_TWO_SIDE_ENABLE */ -+ xf_emit(ctx, 0x30, 0); /* ffffffff VIEWPORT_SCALE: X0, Y0, Z0, X1, Y1, ... */ -+ xf_emit(ctx, 3, 0); /* f, 0, 0 */ -+ xf_emit(ctx, 3, 0); /* ffffffff last VIEWPORT_SCALE? */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A30 */ -+ xf_emit(ctx, 1, 1); /* 00000001 VIEWPORT_TRANSFORM_EN */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1900 */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1924 */ -+ xf_emit(ctx, 1, 0x10); /* 000000ff VIEW_VOLUME_CLIP_CTRL */ -+ xf_emit(ctx, 1, 0); /* 00000001 */ -+ xf_emit(ctx, 0x30, 0); /* ffffffff VIEWPORT_TRANSLATE */ -+ xf_emit(ctx, 3, 0); /* f, 0, 0 */ -+ xf_emit(ctx, 3, 0); /* ffffffff */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A30 */ -+ xf_emit(ctx, 2, 0x88); /* 000001ff tesla UNK19D8 */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1924 */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A30 */ -+ xf_emit(ctx, 1, 4); /* 0000000f CULL_MODE */ -+ xf_emit(ctx, 2, 0); /* 07ffffff SCREEN_SCISSOR */ -+ xf_emit(ctx, 2, 0); /* 00007fff WINDOW_OFFSET_XY */ -+ xf_emit(ctx, 1, 0); /* 00000003 WINDOW_ORIGIN */ -+ xf_emit(ctx, 0x10, 0); /* 00000001 SCISSOR_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 0001ffff GP_BUILTIN_RESULT_EN */ -+ xf_emit(ctx, 1, 0x26); /* 000000ff SEMANTIC_LAYER */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1900 */ -+ xf_emit(ctx, 1, 0); /* 0000000f */ -+ xf_emit(ctx, 1, 0x3f800000); /* ffffffff LINE_WIDTH */ -+ xf_emit(ctx, 1, 0); /* 00000001 LINE_STIPPLE_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 LINE_SMOOTH_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000007 MULTISAMPLE_SAMPLES_LOG2 */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 1, 0); /* 00000001 */ -+ xf_emit(ctx, 1, 0x1a); /* 0000001f POLYGON_MODE */ -+ xf_emit(ctx, 1, 0x10); /* 000000ff VIEW_VOLUME_CLIP_CTRL */ -+ if (dev_priv->chipset != 0x50) { -+ xf_emit(ctx, 1, 0); /* ffffffff */ -+ xf_emit(ctx, 1, 0); /* 00000001 */ -+ xf_emit(ctx, 1, 0); /* 000003ff */ -+ } -+ xf_emit(ctx, 0x20, 0); /* 10xbits ffffffff, 3fffff. SCISSOR_* */ -+ xf_emit(ctx, 1, 0); /* f */ -+ xf_emit(ctx, 1, 0); /* 0? */ -+ xf_emit(ctx, 1, 0); /* ffffffff */ -+ xf_emit(ctx, 1, 0); /* 003fffff */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A30 */ -+ xf_emit(ctx, 1, 0x52); /* 000001ff SEMANTIC_PTSZ */ -+ xf_emit(ctx, 1, 0); /* 0001ffff GP_BUILTIN_RESULT_EN */ -+ xf_emit(ctx, 1, 0x26); /* 000000ff SEMANTIC_LAYER */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1900 */ -+ xf_emit(ctx, 1, 4); /* 0000007f VP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 4); /* 000000ff GP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ -+ xf_emit(ctx, 1, 0x1a); /* 0000001f POLYGON_MODE */ -+ xf_emit(ctx, 1, 0); /* 00000001 LINE_SMOOTH_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 LINE_STIPPLE_ENABLE */ -+ xf_emit(ctx, 1, 0x00ffff00); /* 00ffffff LINE_STIPPLE_PATTERN */ -+ xf_emit(ctx, 1, 0); /* 0000000f */ - } - - static void --nv50_graph_construct_gene_unk3(struct nouveau_grctx *ctx) -+nv50_graph_construct_gene_zcull(struct nouveau_grctx *ctx) - { - struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; -- /* end of area 0 on pre-NVA0, beginning of area 6 on NVAx */ -- xf_emit(ctx, 1, 0x3f); -- xf_emit(ctx, 0xa, 0); -- xf_emit(ctx, 1, 2); -- xf_emit(ctx, 2, 0x04000000); -- xf_emit(ctx, 8, 0); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 3, 0); -- xf_emit(ctx, 1, 4); -- if (dev_priv->chipset == 0x50) -- xf_emit(ctx, 0x10, 0); -- else -- xf_emit(ctx, 0x11, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0x1001); -- xf_emit(ctx, 4, 0xffff); -- xf_emit(ctx, 0x20, 0); -- xf_emit(ctx, 0x10, 0x3f800000); -- xf_emit(ctx, 1, 0x10); -- if (dev_priv->chipset == 0x50) -- xf_emit(ctx, 1, 0); -- else -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 3); -- xf_emit(ctx, 2, 0); -+ /* end of strand 0 on pre-NVA0, beginning of strand 6 on NVAx */ -+ /* SEEK */ -+ xf_emit(ctx, 1, 0x3f); /* 0000003f UNK1590 */ -+ xf_emit(ctx, 1, 0); /* 00000001 ALPHA_TEST_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000007 MULTISAMPLE_SAMPLES_LOG2 */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1534 */ -+ xf_emit(ctx, 1, 0); /* 00000007 STENCIL_BACK_FUNC_FUNC */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_BACK_FUNC_MASK */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_BACK_FUNC_REF */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_BACK_MASK */ -+ xf_emit(ctx, 3, 0); /* 00000007 STENCIL_BACK_OP_FAIL, ZFAIL, ZPASS */ -+ xf_emit(ctx, 1, 2); /* 00000003 tesla UNK143C */ -+ xf_emit(ctx, 2, 0x04000000); /* 07ffffff tesla UNK0D6C */ -+ xf_emit(ctx, 1, 0); /* ffff0ff3 */ -+ xf_emit(ctx, 1, 0); /* 00000001 CLIPID_ENABLE */ -+ xf_emit(ctx, 2, 0); /* ffffffff DEPTH_BOUNDS */ -+ xf_emit(ctx, 1, 0); /* 00000001 */ -+ xf_emit(ctx, 1, 0); /* 00000007 DEPTH_TEST_FUNC */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_TEST_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_WRITE_ENABLE */ -+ xf_emit(ctx, 1, 4); /* 0000000f CULL_MODE */ -+ xf_emit(ctx, 1, 0); /* 0000ffff */ -+ xf_emit(ctx, 1, 0); /* 00000001 UNK0FB0 */ -+ xf_emit(ctx, 1, 0); /* 00000001 POLYGON_STIPPLE_ENABLE */ -+ xf_emit(ctx, 1, 4); /* 00000007 FP_CONTROL */ -+ xf_emit(ctx, 1, 0); /* ffffffff */ -+ xf_emit(ctx, 1, 0); /* 0001ffff GP_BUILTIN_RESULT_EN */ -+ xf_emit(ctx, 1, 0); /* 000000ff CLEAR_STENCIL */ -+ xf_emit(ctx, 1, 0); /* 00000007 STENCIL_FRONT_FUNC_FUNC */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_FRONT_FUNC_MASK */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_FRONT_FUNC_REF */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_FRONT_MASK */ -+ xf_emit(ctx, 3, 0); /* 00000007 STENCIL_FRONT_OP_FAIL, ZFAIL, ZPASS */ -+ xf_emit(ctx, 1, 0); /* 00000001 STENCIL_FRONT_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 STENCIL_BACK_ENABLE */ -+ xf_emit(ctx, 1, 0); /* ffffffff CLEAR_DEPTH */ -+ xf_emit(ctx, 1, 0); /* 00000007 */ -+ if (dev_priv->chipset != 0x50) -+ xf_emit(ctx, 1, 0); /* 00000003 tesla UNK1108 */ -+ xf_emit(ctx, 1, 0); /* 00000001 SAMPLECNT_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 0000000f ZETA_FORMAT */ -+ xf_emit(ctx, 1, 1); /* 00000001 ZETA_ENABLE */ -+ xf_emit(ctx, 1, 0x1001); /* 00001fff ZETA_ARRAY_MODE */ -+ /* SEEK */ -+ xf_emit(ctx, 4, 0xffff); /* 0000ffff MSAA_MASK */ -+ xf_emit(ctx, 0x10, 0); /* 00000001 SCISSOR_ENABLE */ -+ xf_emit(ctx, 0x10, 0); /* ffffffff DEPTH_RANGE_NEAR */ -+ xf_emit(ctx, 0x10, 0x3f800000); /* ffffffff DEPTH_RANGE_FAR */ -+ xf_emit(ctx, 1, 0x10); /* 7f/ff/3ff VIEW_VOLUME_CLIP_CTRL */ -+ xf_emit(ctx, 1, 0); /* 00000001 VIEWPORT_CLIP_RECTS_EN */ -+ xf_emit(ctx, 1, 3); /* 00000003 FP_CTRL_UNK196C */ -+ xf_emit(ctx, 1, 0); /* 00000003 tesla UNK1968 */ -+ if (dev_priv->chipset != 0x50) -+ xf_emit(ctx, 1, 0); /* 0fffffff tesla UNK1104 */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK151C */ - } - - static void --nv50_graph_construct_gene_unk4(struct nouveau_grctx *ctx) -+nv50_graph_construct_gene_clipid(struct nouveau_grctx *ctx) - { -- /* middle of area 0 on pre-NVA0, middle of area 6 on NVAx */ -- xf_emit(ctx, 2, 0x04000000); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x80); -- xf_emit(ctx, 3, 0); -- xf_emit(ctx, 1, 0x80); -- xf_emit(ctx, 1, 0); -+ /* middle of strand 0 on pre-NVA0 [after 24xx], middle of area 6 on NVAx */ -+ /* SEEK */ -+ xf_emit(ctx, 1, 0); /* 00000007 UNK0FB4 */ -+ /* SEEK */ -+ xf_emit(ctx, 4, 0); /* 07ffffff CLIPID_REGION_HORIZ */ -+ xf_emit(ctx, 4, 0); /* 07ffffff CLIPID_REGION_VERT */ -+ xf_emit(ctx, 2, 0); /* 07ffffff SCREEN_SCISSOR */ -+ xf_emit(ctx, 2, 0x04000000); /* 07ffffff UNK1508 */ -+ xf_emit(ctx, 1, 0); /* 00000001 CLIPID_ENABLE */ -+ xf_emit(ctx, 1, 0x80); /* 00003fff CLIPID_WIDTH */ -+ xf_emit(ctx, 1, 0); /* 000000ff CLIPID_ID */ -+ xf_emit(ctx, 1, 0); /* 000000ff CLIPID_ADDRESS_HIGH */ -+ xf_emit(ctx, 1, 0); /* ffffffff CLIPID_ADDRESS_LOW */ -+ xf_emit(ctx, 1, 0x80); /* 00003fff CLIPID_HEIGHT */ -+ xf_emit(ctx, 1, 0); /* 0000ffff DMA_CLIPID */ - } - - static void --nv50_graph_construct_gene_unk5(struct nouveau_grctx *ctx) -+nv50_graph_construct_gene_unk24xx(struct nouveau_grctx *ctx) - { - struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; -- /* middle of area 0 on pre-NVA0 [after m2mf], end of area 2 on NVAx */ -- xf_emit(ctx, 2, 4); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 0x1c4d, 0); -- else -- xf_emit(ctx, 0x1c4b, 0); -- xf_emit(ctx, 2, 4); -- xf_emit(ctx, 1, 0x8100c12); -+ int i; -+ /* middle of strand 0 on pre-NVA0 [after m2mf], end of strand 2 on NVAx */ -+ /* SEEK */ -+ xf_emit(ctx, 0x33, 0); -+ /* SEEK */ -+ xf_emit(ctx, 2, 0); -+ /* SEEK */ -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ -+ xf_emit(ctx, 1, 4); /* 0000007f VP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 4); /* 000000ff GP_RESULT_MAP_SIZE */ -+ /* SEEK */ -+ if (IS_NVA3F(dev_priv->chipset)) { -+ xf_emit(ctx, 4, 0); /* RO */ -+ xf_emit(ctx, 0xe10, 0); /* 190 * 9: 8*ffffffff, 7ff */ -+ xf_emit(ctx, 1, 0); /* 1ff */ -+ xf_emit(ctx, 8, 0); /* 0? */ -+ xf_emit(ctx, 9, 0); /* ffffffff, 7ff */ -+ -+ xf_emit(ctx, 4, 0); /* RO */ -+ xf_emit(ctx, 0xe10, 0); /* 190 * 9: 8*ffffffff, 7ff */ -+ xf_emit(ctx, 1, 0); /* 1ff */ -+ xf_emit(ctx, 8, 0); /* 0? */ -+ xf_emit(ctx, 9, 0); /* ffffffff, 7ff */ -+ } -+ else -+ { -+ xf_emit(ctx, 0xc, 0); /* RO */ -+ /* SEEK */ -+ xf_emit(ctx, 0xe10, 0); /* 190 * 9: 8*ffffffff, 7ff */ -+ xf_emit(ctx, 1, 0); /* 1ff */ -+ xf_emit(ctx, 8, 0); /* 0? */ -+ -+ /* SEEK */ -+ xf_emit(ctx, 0xc, 0); /* RO */ -+ /* SEEK */ -+ xf_emit(ctx, 0xe10, 0); /* 190 * 9: 8*ffffffff, 7ff */ -+ xf_emit(ctx, 1, 0); /* 1ff */ -+ xf_emit(ctx, 8, 0); /* 0? */ -+ } -+ /* SEEK */ -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ -+ xf_emit(ctx, 1, 4); /* 000000ff GP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 4); /* 0000007f VP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 0x8100c12); /* 1fffffff FP_INTERPOLANT_CTRL */ - if (dev_priv->chipset != 0x50) -- xf_emit(ctx, 1, 3); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x8100c12); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x80c14); -- xf_emit(ctx, 1, 1); -+ xf_emit(ctx, 1, 3); /* 00000003 tesla UNK1100 */ -+ /* SEEK */ -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ -+ xf_emit(ctx, 1, 0x8100c12); /* 1fffffff FP_INTERPOLANT_CTRL */ -+ xf_emit(ctx, 1, 0); /* 0000000f VP_GP_BUILTIN_ATTR_EN */ -+ xf_emit(ctx, 1, 0x80c14); /* 01ffffff SEMANTIC_COLOR */ -+ xf_emit(ctx, 1, 1); /* 00000001 */ -+ /* SEEK */ - if (dev_priv->chipset >= 0xa0) -- xf_emit(ctx, 2, 4); -- xf_emit(ctx, 1, 0x80c14); -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 0x8100c12); -- xf_emit(ctx, 1, 0x27); -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 0x3c1, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 0x16, 0); -- xf_emit(ctx, 1, 0x8100c12); -- xf_emit(ctx, 1, 0); -+ xf_emit(ctx, 2, 4); /* 000000ff */ -+ xf_emit(ctx, 1, 0x80c14); /* 01ffffff SEMANTIC_COLOR */ -+ xf_emit(ctx, 1, 0); /* 00000001 VERTEX_TWO_SIDE_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 POINT_SPRITE_ENABLE */ -+ xf_emit(ctx, 1, 0x8100c12); /* 1fffffff FP_INTERPOLANT_CTRL */ -+ xf_emit(ctx, 1, 0x27); /* 000000ff SEMANTIC_PRIM_ID */ -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 0000000f */ -+ xf_emit(ctx, 1, 1); /* 00000001 */ -+ for (i = 0; i < 10; i++) { -+ /* SEEK */ -+ xf_emit(ctx, 0x40, 0); /* ffffffff */ -+ xf_emit(ctx, 0x10, 0); /* 3, 0, 0.... */ -+ xf_emit(ctx, 0x10, 0); /* ffffffff */ -+ } -+ /* SEEK */ -+ xf_emit(ctx, 1, 0); /* 00000001 POINT_SPRITE_CTRL */ -+ xf_emit(ctx, 1, 1); /* 00000001 */ -+ xf_emit(ctx, 1, 0); /* ffffffff */ -+ xf_emit(ctx, 4, 0); /* ffffffff NOPERSPECTIVE_BITMAP */ -+ xf_emit(ctx, 0x10, 0); /* 00ffffff POINT_COORD_REPLACE_MAP */ -+ xf_emit(ctx, 1, 0); /* 00000003 WINDOW_ORIGIN */ -+ xf_emit(ctx, 1, 0x8100c12); /* 1fffffff FP_INTERPOLANT_CTRL */ -+ if (dev_priv->chipset != 0x50) -+ xf_emit(ctx, 1, 0); /* 000003ff */ - } - - static void --nv50_graph_construct_gene_unk6(struct nouveau_grctx *ctx) -+nv50_graph_construct_gene_vfetch(struct nouveau_grctx *ctx) - { - struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; -- /* beginning of area 1 on pre-NVA0 [after m2mf], area 3 on NVAx */ -- xf_emit(ctx, 4, 0); -- xf_emit(ctx, 1, 0xf); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 8, 0); -- else -- xf_emit(ctx, 4, 0); -- xf_emit(ctx, 1, 0x20); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 0x11, 0); -+ int acnt = 0x10, rep, i; -+ /* beginning of strand 1 on pre-NVA0, strand 3 on NVAx */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ acnt = 0x20; -+ /* SEEK */ -+ if (dev_priv->chipset >= 0xa0) { -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK13A4 */ -+ xf_emit(ctx, 1, 1); /* 00000fff tesla UNK1318 */ -+ } -+ xf_emit(ctx, 1, 0); /* ffffffff VERTEX_BUFFER_FIRST */ -+ xf_emit(ctx, 1, 0); /* 00000001 PRIMITIVE_RESTART_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 UNK0DE8 */ -+ xf_emit(ctx, 1, 0); /* ffffffff PRIMITIVE_RESTART_INDEX */ -+ xf_emit(ctx, 1, 0xf); /* ffffffff VP_ATTR_EN */ -+ xf_emit(ctx, (acnt/8)-1, 0); /* ffffffff VP_ATTR_EN */ -+ xf_emit(ctx, acnt/8, 0); /* ffffffff VTX_ATR_MASK_UNK0DD0 */ -+ xf_emit(ctx, 1, 0); /* 0000000f VP_GP_BUILTIN_ATTR_EN */ -+ xf_emit(ctx, 1, 0x20); /* 0000ffff tesla UNK129C */ -+ xf_emit(ctx, 1, 0); /* 000000ff turing UNK370??? */ -+ xf_emit(ctx, 1, 0); /* 0000ffff turing USER_PARAM_COUNT */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A30 */ -+ /* SEEK */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 0xb, 0); /* RO */ - else if (dev_priv->chipset >= 0xa0) -- xf_emit(ctx, 0xf, 0); -+ xf_emit(ctx, 0x9, 0); /* RO */ - else -- xf_emit(ctx, 0xe, 0); -- xf_emit(ctx, 1, 0x1a); -- xf_emit(ctx, 0xd, 0); -- xf_emit(ctx, 2, 4); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 1, 8); -- xf_emit(ctx, 1, 0); -+ xf_emit(ctx, 0x8, 0); /* RO */ -+ /* SEEK */ -+ xf_emit(ctx, 1, 0); /* 00000001 EDGE_FLAG */ -+ xf_emit(ctx, 1, 0); /* 00000001 PROVOKING_VERTEX_LAST */ -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ -+ xf_emit(ctx, 1, 0x1a); /* 0000001f POLYGON_MODE */ -+ /* SEEK */ -+ xf_emit(ctx, 0xc, 0); /* RO */ -+ /* SEEK */ -+ xf_emit(ctx, 1, 0); /* 7f/ff */ -+ xf_emit(ctx, 1, 4); /* 7f/ff VP_REG_ALLOC_RESULT */ -+ xf_emit(ctx, 1, 4); /* 7f/ff VP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 0); /* 0000000f VP_GP_BUILTIN_ATTR_EN */ -+ xf_emit(ctx, 1, 4); /* 000001ff UNK1A28 */ -+ xf_emit(ctx, 1, 8); /* 000001ff UNK0DF0 */ -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ - if (dev_priv->chipset == 0x50) -- xf_emit(ctx, 1, 0x3ff); -+ xf_emit(ctx, 1, 0x3ff); /* 3ff tesla UNK0D68 */ - else -- xf_emit(ctx, 1, 0x7ff); -+ xf_emit(ctx, 1, 0x7ff); /* 7ff tesla UNK0D68 */ - if (dev_priv->chipset == 0xa8) -- xf_emit(ctx, 1, 0x1e00); -- xf_emit(ctx, 0xc, 0); -- xf_emit(ctx, 1, 0xf); -- if (dev_priv->chipset == 0x50) -- xf_emit(ctx, 0x125, 0); -- else if (dev_priv->chipset < 0xa0) -- xf_emit(ctx, 0x126, 0); -- else if (dev_priv->chipset == 0xa0 || dev_priv->chipset >= 0xaa) -- xf_emit(ctx, 0x124, 0); -- else -- xf_emit(ctx, 0x1f7, 0); -- xf_emit(ctx, 1, 0xf); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 3, 0); -- else -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 1); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 0xa1, 0); -- else -- xf_emit(ctx, 0x5a, 0); -- xf_emit(ctx, 1, 0xf); -+ xf_emit(ctx, 1, 0x1e00); /* 7fff */ -+ /* SEEK */ -+ xf_emit(ctx, 0xc, 0); /* RO or close */ -+ /* SEEK */ -+ xf_emit(ctx, 1, 0xf); /* ffffffff VP_ATTR_EN */ -+ xf_emit(ctx, (acnt/8)-1, 0); /* ffffffff VP_ATTR_EN */ -+ xf_emit(ctx, 1, 0); /* 0000000f VP_GP_BUILTIN_ATTR_EN */ -+ if (dev_priv->chipset > 0x50 && dev_priv->chipset < 0xa0) -+ xf_emit(ctx, 2, 0); /* ffffffff */ -+ else -+ xf_emit(ctx, 1, 0); /* ffffffff */ -+ xf_emit(ctx, 1, 0); /* 00000003 tesla UNK0FD8 */ -+ /* SEEK */ -+ if (IS_NVA3F(dev_priv->chipset)) { -+ xf_emit(ctx, 0x10, 0); /* 0? */ -+ xf_emit(ctx, 2, 0); /* weird... */ -+ xf_emit(ctx, 2, 0); /* RO */ -+ } else { -+ xf_emit(ctx, 8, 0); /* 0? */ -+ xf_emit(ctx, 1, 0); /* weird... */ -+ xf_emit(ctx, 2, 0); /* RO */ -+ } -+ /* SEEK */ -+ xf_emit(ctx, 1, 0); /* ffffffff VB_ELEMENT_BASE */ -+ xf_emit(ctx, 1, 0); /* ffffffff UNK1438 */ -+ xf_emit(ctx, acnt, 0); /* 1 tesla UNK1000 */ -+ if (dev_priv->chipset >= 0xa0) -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1118? */ -+ /* SEEK */ -+ xf_emit(ctx, acnt, 0); /* ffffffff VERTEX_ARRAY_UNK90C */ -+ xf_emit(ctx, 1, 0); /* f/1f */ -+ /* SEEK */ -+ xf_emit(ctx, acnt, 0); /* ffffffff VERTEX_ARRAY_UNK90C */ -+ xf_emit(ctx, 1, 0); /* f/1f */ -+ /* SEEK */ -+ xf_emit(ctx, acnt, 0); /* RO */ -+ xf_emit(ctx, 2, 0); /* RO */ -+ /* SEEK */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK111C? */ -+ xf_emit(ctx, 1, 0); /* RO */ -+ /* SEEK */ -+ xf_emit(ctx, 1, 0); /* 000000ff UNK15F4_ADDRESS_HIGH */ -+ xf_emit(ctx, 1, 0); /* ffffffff UNK15F4_ADDRESS_LOW */ -+ xf_emit(ctx, 1, 0); /* 000000ff UNK0F84_ADDRESS_HIGH */ -+ xf_emit(ctx, 1, 0); /* ffffffff UNK0F84_ADDRESS_LOW */ -+ /* SEEK */ -+ xf_emit(ctx, acnt, 0); /* 00003fff VERTEX_ARRAY_ATTRIB_OFFSET */ -+ xf_emit(ctx, 3, 0); /* f/1f */ -+ /* SEEK */ -+ xf_emit(ctx, acnt, 0); /* 00000fff VERTEX_ARRAY_STRIDE */ -+ xf_emit(ctx, 3, 0); /* f/1f */ -+ /* SEEK */ -+ xf_emit(ctx, acnt, 0); /* ffffffff VERTEX_ARRAY_LOW */ -+ xf_emit(ctx, 3, 0); /* f/1f */ -+ /* SEEK */ -+ xf_emit(ctx, acnt, 0); /* 000000ff VERTEX_ARRAY_HIGH */ -+ xf_emit(ctx, 3, 0); /* f/1f */ -+ /* SEEK */ -+ xf_emit(ctx, acnt, 0); /* ffffffff VERTEX_LIMIT_LOW */ -+ xf_emit(ctx, 3, 0); /* f/1f */ -+ /* SEEK */ -+ xf_emit(ctx, acnt, 0); /* 000000ff VERTEX_LIMIT_HIGH */ -+ xf_emit(ctx, 3, 0); /* f/1f */ -+ /* SEEK */ -+ if (IS_NVA3F(dev_priv->chipset)) { -+ xf_emit(ctx, acnt, 0); /* f */ -+ xf_emit(ctx, 3, 0); /* f/1f */ -+ } -+ /* SEEK */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 2, 0); /* RO */ -+ else -+ xf_emit(ctx, 5, 0); /* RO */ -+ /* SEEK */ -+ xf_emit(ctx, 1, 0); /* ffff DMA_VTXBUF */ -+ /* SEEK */ -+ if (dev_priv->chipset < 0xa0) { -+ xf_emit(ctx, 0x41, 0); /* RO */ -+ /* SEEK */ -+ xf_emit(ctx, 0x11, 0); /* RO */ -+ } else if (!IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 0x50, 0); /* RO */ -+ else -+ xf_emit(ctx, 0x58, 0); /* RO */ -+ /* SEEK */ -+ xf_emit(ctx, 1, 0xf); /* ffffffff VP_ATTR_EN */ -+ xf_emit(ctx, (acnt/8)-1, 0); /* ffffffff VP_ATTR_EN */ -+ xf_emit(ctx, 1, 1); /* 1 UNK0DEC */ -+ /* SEEK */ -+ xf_emit(ctx, acnt*4, 0); /* ffffffff VTX_ATTR */ -+ xf_emit(ctx, 4, 0); /* f/1f, 0, 0, 0 */ -+ /* SEEK */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 0x1d, 0); /* RO */ -+ else -+ xf_emit(ctx, 0x16, 0); /* RO */ -+ /* SEEK */ -+ xf_emit(ctx, 1, 0xf); /* ffffffff VP_ATTR_EN */ -+ xf_emit(ctx, (acnt/8)-1, 0); /* ffffffff VP_ATTR_EN */ -+ /* SEEK */ - if (dev_priv->chipset < 0xa0) -- xf_emit(ctx, 0x834, 0); -- else if (dev_priv->chipset == 0xa0) -- xf_emit(ctx, 0x1873, 0); -- else if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 0x8ba, 0); -+ xf_emit(ctx, 8, 0); /* RO */ -+ else if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 0xc, 0); /* RO */ -+ else -+ xf_emit(ctx, 7, 0); /* RO */ -+ /* SEEK */ -+ xf_emit(ctx, 0xa, 0); /* RO */ -+ if (dev_priv->chipset == 0xa0) -+ rep = 0xc; -+ else -+ rep = 4; -+ for (i = 0; i < rep; i++) { -+ /* SEEK */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 0x20, 0); /* ffffffff */ -+ xf_emit(ctx, 0x200, 0); /* ffffffff */ -+ xf_emit(ctx, 4, 0); /* 7f/ff, 0, 0, 0 */ -+ xf_emit(ctx, 4, 0); /* ffffffff */ -+ } -+ /* SEEK */ -+ xf_emit(ctx, 1, 0); /* 113/111 */ -+ xf_emit(ctx, 1, 0xf); /* ffffffff VP_ATTR_EN */ -+ xf_emit(ctx, (acnt/8)-1, 0); /* ffffffff VP_ATTR_EN */ -+ xf_emit(ctx, acnt/8, 0); /* ffffffff VTX_ATTR_MASK_UNK0DD0 */ -+ xf_emit(ctx, 1, 0); /* 0000000f VP_GP_BUILTIN_ATTR_EN */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A30 */ -+ /* SEEK */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 7, 0); /* weird... */ - else -- xf_emit(ctx, 0x833, 0); -- xf_emit(ctx, 1, 0xf); -- xf_emit(ctx, 0xf, 0); -+ xf_emit(ctx, 5, 0); /* weird... */ - } - - static void --nv50_graph_construct_gene_unk7(struct nouveau_grctx *ctx) -+nv50_graph_construct_gene_eng2d(struct nouveau_grctx *ctx) - { - struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; -- /* middle of area 1 on pre-NVA0 [after m2mf], middle of area 6 on NVAx */ -- xf_emit(ctx, 2, 0); -- if (dev_priv->chipset == 0x50) -- xf_emit(ctx, 2, 1); -- else -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 2, 0x100); -- xf_emit(ctx, 1, 0x11); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 8); -- xf_emit(ctx, 5, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 3, 1); -- xf_emit(ctx, 1, 0xcf); -- xf_emit(ctx, 1, 2); -- xf_emit(ctx, 6, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 3, 1); -- xf_emit(ctx, 4, 0); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0x15); -- xf_emit(ctx, 3, 0); -- xf_emit(ctx, 1, 0x4444480); -- xf_emit(ctx, 0x37, 0); -+ /* middle of strand 1 on pre-NVA0 [after vfetch], middle of strand 6 on NVAx */ -+ /* SEEK */ -+ xf_emit(ctx, 2, 0); /* 0001ffff CLIP_X, CLIP_Y */ -+ xf_emit(ctx, 2, 0); /* 0000ffff CLIP_W, CLIP_H */ -+ xf_emit(ctx, 1, 0); /* 00000001 CLIP_ENABLE */ -+ if (dev_priv->chipset < 0xa0) { -+ /* this is useless on everything but the original NV50, -+ * guess they forgot to nuke it. Or just didn't bother. */ -+ xf_emit(ctx, 2, 0); /* 0000ffff IFC_CLIP_X, Y */ -+ xf_emit(ctx, 2, 1); /* 0000ffff IFC_CLIP_W, H */ -+ xf_emit(ctx, 1, 0); /* 00000001 IFC_CLIP_ENABLE */ -+ } -+ xf_emit(ctx, 1, 1); /* 00000001 DST_LINEAR */ -+ xf_emit(ctx, 1, 0x100); /* 0001ffff DST_WIDTH */ -+ xf_emit(ctx, 1, 0x100); /* 0001ffff DST_HEIGHT */ -+ xf_emit(ctx, 1, 0x11); /* 3f[NV50]/7f[NV84+] DST_FORMAT */ -+ xf_emit(ctx, 1, 0); /* 0001ffff DRAW_POINT_X */ -+ xf_emit(ctx, 1, 8); /* 0000000f DRAW_UNK58C */ -+ xf_emit(ctx, 1, 0); /* 000fffff SIFC_DST_X_FRACT */ -+ xf_emit(ctx, 1, 0); /* 0001ffff SIFC_DST_X_INT */ -+ xf_emit(ctx, 1, 0); /* 000fffff SIFC_DST_Y_FRACT */ -+ xf_emit(ctx, 1, 0); /* 0001ffff SIFC_DST_Y_INT */ -+ xf_emit(ctx, 1, 0); /* 000fffff SIFC_DX_DU_FRACT */ -+ xf_emit(ctx, 1, 1); /* 0001ffff SIFC_DX_DU_INT */ -+ xf_emit(ctx, 1, 0); /* 000fffff SIFC_DY_DV_FRACT */ -+ xf_emit(ctx, 1, 1); /* 0001ffff SIFC_DY_DV_INT */ -+ xf_emit(ctx, 1, 1); /* 0000ffff SIFC_WIDTH */ -+ xf_emit(ctx, 1, 1); /* 0000ffff SIFC_HEIGHT */ -+ xf_emit(ctx, 1, 0xcf); /* 000000ff SIFC_FORMAT */ -+ xf_emit(ctx, 1, 2); /* 00000003 SIFC_BITMAP_UNK808 */ -+ xf_emit(ctx, 1, 0); /* 00000003 SIFC_BITMAP_LINE_PACK_MODE */ -+ xf_emit(ctx, 1, 0); /* 00000001 SIFC_BITMAP_LSB_FIRST */ -+ xf_emit(ctx, 1, 0); /* 00000001 SIFC_BITMAP_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 0000ffff BLIT_DST_X */ -+ xf_emit(ctx, 1, 0); /* 0000ffff BLIT_DST_Y */ -+ xf_emit(ctx, 1, 0); /* 000fffff BLIT_DU_DX_FRACT */ -+ xf_emit(ctx, 1, 1); /* 0001ffff BLIT_DU_DX_INT */ -+ xf_emit(ctx, 1, 0); /* 000fffff BLIT_DV_DY_FRACT */ -+ xf_emit(ctx, 1, 1); /* 0001ffff BLIT_DV_DY_INT */ -+ xf_emit(ctx, 1, 1); /* 0000ffff BLIT_DST_W */ -+ xf_emit(ctx, 1, 1); /* 0000ffff BLIT_DST_H */ -+ xf_emit(ctx, 1, 0); /* 000fffff BLIT_SRC_X_FRACT */ -+ xf_emit(ctx, 1, 0); /* 0001ffff BLIT_SRC_X_INT */ -+ xf_emit(ctx, 1, 0); /* 000fffff BLIT_SRC_Y_FRACT */ -+ xf_emit(ctx, 1, 0); /* 00000001 UNK888 */ -+ xf_emit(ctx, 1, 4); /* 0000003f UNK884 */ -+ xf_emit(ctx, 1, 0); /* 00000007 UNK880 */ -+ xf_emit(ctx, 1, 1); /* 0000001f tesla UNK0FB8 */ -+ xf_emit(ctx, 1, 0x15); /* 000000ff tesla UNK128C */ -+ xf_emit(ctx, 2, 0); /* 00000007, ffff0ff3 */ -+ xf_emit(ctx, 1, 0); /* 00000001 UNK260 */ -+ xf_emit(ctx, 1, 0x4444480); /* 1fffffff UNK870 */ -+ /* SEEK */ -+ xf_emit(ctx, 0x10, 0); -+ /* SEEK */ -+ xf_emit(ctx, 0x27, 0); - } - - static void --nv50_graph_construct_gene_unk8(struct nouveau_grctx *ctx) -+nv50_graph_construct_gene_csched(struct nouveau_grctx *ctx) - { -- /* middle of area 1 on pre-NVA0 [after m2mf], middle of area 0 on NVAx */ -- xf_emit(ctx, 4, 0); -- xf_emit(ctx, 1, 0x8100c12); -- xf_emit(ctx, 4, 0); -- xf_emit(ctx, 1, 0x100); -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 0x10001); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x10001); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0x10001); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 1, 2); -+ struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; -+ /* middle of strand 1 on pre-NVA0 [after eng2d], middle of strand 0 on NVAx */ -+ /* SEEK */ -+ xf_emit(ctx, 2, 0); /* 00007fff WINDOW_OFFSET_XY... what is it doing here??? */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1924 */ -+ xf_emit(ctx, 1, 0); /* 00000003 WINDOW_ORIGIN */ -+ xf_emit(ctx, 1, 0x8100c12); /* 1fffffff FP_INTERPOLANT_CTRL */ -+ xf_emit(ctx, 1, 0); /* 000003ff */ -+ /* SEEK */ -+ xf_emit(ctx, 1, 0); /* ffffffff turing UNK364 */ -+ xf_emit(ctx, 1, 0); /* 0000000f turing UNK36C */ -+ xf_emit(ctx, 1, 0); /* 0000ffff USER_PARAM_COUNT */ -+ xf_emit(ctx, 1, 0x100); /* 00ffffff turing UNK384 */ -+ xf_emit(ctx, 1, 0); /* 0000000f turing UNK2A0 */ -+ xf_emit(ctx, 1, 0); /* 0000ffff GRIDID */ -+ xf_emit(ctx, 1, 0x10001); /* ffffffff GRIDDIM_XY */ -+ xf_emit(ctx, 1, 0); /* ffffffff */ -+ xf_emit(ctx, 1, 0x10001); /* ffffffff BLOCKDIM_XY */ -+ xf_emit(ctx, 1, 1); /* 0000ffff BLOCKDIM_Z */ -+ xf_emit(ctx, 1, 0x10001); /* 00ffffff BLOCK_ALLOC */ -+ xf_emit(ctx, 1, 1); /* 00000001 LANES32 */ -+ xf_emit(ctx, 1, 4); /* 000000ff FP_REG_ALLOC_TEMP */ -+ xf_emit(ctx, 1, 2); /* 00000003 REG_MODE */ -+ /* SEEK */ -+ xf_emit(ctx, 0x40, 0); /* ffffffff USER_PARAM */ -+ switch (dev_priv->chipset) { -+ case 0x50: -+ case 0x92: -+ xf_emit(ctx, 8, 0); /* 7, 0, 0, 0, ... */ -+ xf_emit(ctx, 0x80, 0); /* fff */ -+ xf_emit(ctx, 2, 0); /* ff, fff */ -+ xf_emit(ctx, 0x10*2, 0); /* ffffffff, 1f */ -+ break; -+ case 0x84: -+ xf_emit(ctx, 8, 0); /* 7, 0, 0, 0, ... */ -+ xf_emit(ctx, 0x60, 0); /* fff */ -+ xf_emit(ctx, 2, 0); /* ff, fff */ -+ xf_emit(ctx, 0xc*2, 0); /* ffffffff, 1f */ -+ break; -+ case 0x94: -+ case 0x96: -+ xf_emit(ctx, 8, 0); /* 7, 0, 0, 0, ... */ -+ xf_emit(ctx, 0x40, 0); /* fff */ -+ xf_emit(ctx, 2, 0); /* ff, fff */ -+ xf_emit(ctx, 8*2, 0); /* ffffffff, 1f */ -+ break; -+ case 0x86: -+ case 0x98: -+ xf_emit(ctx, 4, 0); /* f, 0, 0, 0 */ -+ xf_emit(ctx, 0x10, 0); /* fff */ -+ xf_emit(ctx, 2, 0); /* ff, fff */ -+ xf_emit(ctx, 2*2, 0); /* ffffffff, 1f */ -+ break; -+ case 0xa0: -+ xf_emit(ctx, 8, 0); /* 7, 0, 0, 0, ... */ -+ xf_emit(ctx, 0xf0, 0); /* fff */ -+ xf_emit(ctx, 2, 0); /* ff, fff */ -+ xf_emit(ctx, 0x1e*2, 0); /* ffffffff, 1f */ -+ break; -+ case 0xa3: -+ xf_emit(ctx, 8, 0); /* 7, 0, 0, 0, ... */ -+ xf_emit(ctx, 0x60, 0); /* fff */ -+ xf_emit(ctx, 2, 0); /* ff, fff */ -+ xf_emit(ctx, 0xc*2, 0); /* ffffffff, 1f */ -+ break; -+ case 0xa5: -+ case 0xaf: -+ xf_emit(ctx, 8, 0); /* 7, 0, 0, 0, ... */ -+ xf_emit(ctx, 0x30, 0); /* fff */ -+ xf_emit(ctx, 2, 0); /* ff, fff */ -+ xf_emit(ctx, 6*2, 0); /* ffffffff, 1f */ -+ break; -+ case 0xaa: -+ xf_emit(ctx, 0x12, 0); -+ break; -+ case 0xa8: -+ case 0xac: -+ xf_emit(ctx, 4, 0); /* f, 0, 0, 0 */ -+ xf_emit(ctx, 0x10, 0); /* fff */ -+ xf_emit(ctx, 2, 0); /* ff, fff */ -+ xf_emit(ctx, 2*2, 0); /* ffffffff, 1f */ -+ break; -+ } -+ xf_emit(ctx, 1, 0); /* 0000000f */ -+ xf_emit(ctx, 1, 0); /* 00000000 */ -+ xf_emit(ctx, 1, 0); /* ffffffff */ -+ xf_emit(ctx, 1, 0); /* 0000001f */ -+ xf_emit(ctx, 4, 0); /* ffffffff */ -+ xf_emit(ctx, 1, 0); /* 00000003 turing UNK35C */ -+ xf_emit(ctx, 1, 0); /* ffffffff */ -+ xf_emit(ctx, 4, 0); /* ffffffff */ -+ xf_emit(ctx, 1, 0); /* 00000003 turing UNK35C */ -+ xf_emit(ctx, 1, 0); /* ffffffff */ -+ xf_emit(ctx, 1, 0); /* 000000ff */ - } - - static void --nv50_graph_construct_gene_unk9(struct nouveau_grctx *ctx) -+nv50_graph_construct_gene_unk1cxx(struct nouveau_grctx *ctx) - { - struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; -- /* middle of area 2 on pre-NVA0 [after m2mf], end of area 0 on NVAx */ -- xf_emit(ctx, 1, 0x3f800000); -- xf_emit(ctx, 6, 0); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 1, 0x1a); -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 0x12, 0); -- xf_emit(ctx, 1, 0x00ffff00); -- xf_emit(ctx, 6, 0); -- xf_emit(ctx, 1, 0xf); -- xf_emit(ctx, 7, 0); -- xf_emit(ctx, 1, 0x0fac6881); -- xf_emit(ctx, 1, 0x11); -- xf_emit(ctx, 0xf, 0); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 2, 0); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 1, 3); -+ xf_emit(ctx, 2, 0); /* 00007fff WINDOW_OFFSET_XY */ -+ xf_emit(ctx, 1, 0x3f800000); /* ffffffff LINE_WIDTH */ -+ xf_emit(ctx, 1, 0); /* 00000001 LINE_SMOOTH_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1658 */ -+ xf_emit(ctx, 1, 0); /* 00000001 POLYGON_SMOOTH_ENABLE */ -+ xf_emit(ctx, 3, 0); /* 00000001 POLYGON_OFFSET_*_ENABLE */ -+ xf_emit(ctx, 1, 4); /* 0000000f CULL_MODE */ -+ xf_emit(ctx, 1, 0x1a); /* 0000001f POLYGON_MODE */ -+ xf_emit(ctx, 1, 0); /* 0000000f ZETA_FORMAT */ -+ xf_emit(ctx, 1, 0); /* 00000001 POINT_SPRITE_ENABLE */ -+ xf_emit(ctx, 1, 1); /* 00000001 tesla UNK165C */ -+ xf_emit(ctx, 0x10, 0); /* 00000001 SCISSOR_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1534 */ -+ xf_emit(ctx, 1, 0); /* 00000001 LINE_STIPPLE_ENABLE */ -+ xf_emit(ctx, 1, 0x00ffff00); /* 00ffffff LINE_STIPPLE_PATTERN */ -+ xf_emit(ctx, 1, 0); /* ffffffff POLYGON_OFFSET_UNITS */ -+ xf_emit(ctx, 1, 0); /* ffffffff POLYGON_OFFSET_FACTOR */ -+ xf_emit(ctx, 1, 0); /* 00000003 tesla UNK1668 */ -+ xf_emit(ctx, 2, 0); /* 07ffffff SCREEN_SCISSOR */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1900 */ -+ xf_emit(ctx, 1, 0xf); /* 0000000f COLOR_MASK */ -+ xf_emit(ctx, 7, 0); /* 0000000f COLOR_MASK */ -+ xf_emit(ctx, 1, 0x0fac6881); /* 0fffffff RT_CONTROL */ -+ xf_emit(ctx, 1, 0x11); /* 0000007f RT_FORMAT */ -+ xf_emit(ctx, 7, 0); /* 0000007f RT_FORMAT */ -+ xf_emit(ctx, 8, 0); /* 00000001 RT_HORIZ_LINEAR */ -+ xf_emit(ctx, 1, 4); /* 00000007 FP_CONTROL */ -+ xf_emit(ctx, 1, 0); /* 00000001 ALPHA_TEST_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000007 ALPHA_TEST_FUNC */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 1, 3); /* 00000003 UNK16B4 */ - else if (dev_priv->chipset >= 0xa0) -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 2); -- xf_emit(ctx, 2, 0x04000000); -- xf_emit(ctx, 3, 0); -- xf_emit(ctx, 1, 5); -- xf_emit(ctx, 1, 0x52); -- if (dev_priv->chipset == 0x50) { -- xf_emit(ctx, 0x13, 0); -- } else { -- xf_emit(ctx, 4, 0); -- xf_emit(ctx, 1, 1); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 0x11, 0); -- else -- xf_emit(ctx, 0x10, 0); -+ xf_emit(ctx, 1, 1); /* 00000001 UNK16B4 */ -+ xf_emit(ctx, 1, 0); /* 00000003 MULTISAMPLE_CTRL */ -+ xf_emit(ctx, 1, 0); /* 00000003 tesla UNK0F90 */ -+ xf_emit(ctx, 1, 2); /* 00000003 tesla UNK143C */ -+ xf_emit(ctx, 2, 0x04000000); /* 07ffffff tesla UNK0D6C */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_FRONT_MASK */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_WRITE_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 SAMPLECNT_ENABLE */ -+ xf_emit(ctx, 1, 5); /* 0000000f UNK1408 */ -+ xf_emit(ctx, 1, 0x52); /* 000001ff SEMANTIC_PTSZ */ -+ xf_emit(ctx, 1, 0); /* ffffffff POINT_SIZE */ -+ xf_emit(ctx, 1, 0); /* 00000001 */ -+ xf_emit(ctx, 1, 0); /* 00000007 tesla UNK0FB4 */ -+ if (dev_priv->chipset != 0x50) { -+ xf_emit(ctx, 1, 0); /* 3ff */ -+ xf_emit(ctx, 1, 1); /* 00000001 tesla UNK1110 */ - } -- xf_emit(ctx, 0x10, 0x3f800000); -- xf_emit(ctx, 1, 0x10); -- xf_emit(ctx, 0x26, 0); -- xf_emit(ctx, 1, 0x8100c12); -- xf_emit(ctx, 1, 5); -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 4, 0xffff); -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 1, 0); /* 00000003 tesla UNK1928 */ -+ xf_emit(ctx, 0x10, 0); /* ffffffff DEPTH_RANGE_NEAR */ -+ xf_emit(ctx, 0x10, 0x3f800000); /* ffffffff DEPTH_RANGE_FAR */ -+ xf_emit(ctx, 1, 0x10); /* 000000ff VIEW_VOLUME_CLIP_CTRL */ -+ xf_emit(ctx, 0x20, 0); /* 07ffffff VIEWPORT_HORIZ, then VIEWPORT_VERT. (W&0x3fff)<<13 | (X&0x1fff). */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK187C */ -+ xf_emit(ctx, 1, 0); /* 00000003 WINDOW_ORIGIN */ -+ xf_emit(ctx, 1, 0); /* 00000001 STENCIL_FRONT_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_TEST_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 STENCIL_BACK_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_BACK_MASK */ -+ xf_emit(ctx, 1, 0x8100c12); /* 1fffffff FP_INTERPOLANT_CTRL */ -+ xf_emit(ctx, 1, 5); /* 0000000f tesla UNK1220 */ -+ xf_emit(ctx, 1, 0); /* 00000007 MULTISAMPLE_SAMPLES_LOG2 */ -+ xf_emit(ctx, 1, 0); /* 000000ff tesla UNK1A20 */ -+ xf_emit(ctx, 1, 1); /* 00000001 ZETA_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 VERTEX_TWO_SIDE_ENABLE */ -+ xf_emit(ctx, 4, 0xffff); /* 0000ffff MSAA_MASK */ - if (dev_priv->chipset != 0x50) -- xf_emit(ctx, 1, 3); -+ xf_emit(ctx, 1, 3); /* 00000003 tesla UNK1100 */ - if (dev_priv->chipset < 0xa0) -- xf_emit(ctx, 0x1f, 0); -- else if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 0xc, 0); -- else -- xf_emit(ctx, 3, 0); -- xf_emit(ctx, 1, 0x00ffff00); -- xf_emit(ctx, 1, 0x1a); -+ xf_emit(ctx, 0x1c, 0); /* RO */ -+ else if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 0x9, 0); -+ xf_emit(ctx, 1, 0); /* 00000001 UNK1534 */ -+ xf_emit(ctx, 1, 0); /* 00000001 LINE_SMOOTH_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 LINE_STIPPLE_ENABLE */ -+ xf_emit(ctx, 1, 0x00ffff00); /* 00ffffff LINE_STIPPLE_PATTERN */ -+ xf_emit(ctx, 1, 0x1a); /* 0000001f POLYGON_MODE */ -+ xf_emit(ctx, 1, 0); /* 00000003 WINDOW_ORIGIN */ - if (dev_priv->chipset != 0x50) { -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 3); -+ xf_emit(ctx, 1, 3); /* 00000003 tesla UNK1100 */ -+ xf_emit(ctx, 1, 0); /* 3ff */ - } -+ /* XXX: the following block could belong either to unk1cxx, or -+ * to STRMOUT. Rather hard to tell. */ - if (dev_priv->chipset < 0xa0) -- xf_emit(ctx, 0x26, 0); -- else -- xf_emit(ctx, 0x3c, 0); -- xf_emit(ctx, 1, 0x102); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 4, 4); -- if (dev_priv->chipset >= 0xa0) -- xf_emit(ctx, 8, 0); -- xf_emit(ctx, 2, 4); -- xf_emit(ctx, 1, 0); -- if (dev_priv->chipset == 0x50) -- xf_emit(ctx, 1, 0x3ff); -+ xf_emit(ctx, 0x25, 0); - else -- xf_emit(ctx, 1, 0x7ff); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x102); -- xf_emit(ctx, 9, 0); -- xf_emit(ctx, 4, 4); -- xf_emit(ctx, 0x2c, 0); -+ xf_emit(ctx, 0x3b, 0); -+} -+ -+static void -+nv50_graph_construct_gene_strmout(struct nouveau_grctx *ctx) -+{ -+ struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; -+ xf_emit(ctx, 1, 0x102); /* 0000ffff STRMOUT_BUFFER_CTRL */ -+ xf_emit(ctx, 1, 0); /* ffffffff STRMOUT_PRIMITIVE_COUNT */ -+ xf_emit(ctx, 4, 4); /* 000000ff STRMOUT_NUM_ATTRIBS */ -+ if (dev_priv->chipset >= 0xa0) { -+ xf_emit(ctx, 4, 0); /* ffffffff UNK1A8C */ -+ xf_emit(ctx, 4, 0); /* ffffffff UNK1780 */ -+ } -+ xf_emit(ctx, 1, 4); /* 000000ff GP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 4); /* 0000007f VP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ -+ if (dev_priv->chipset == 0x50) -+ xf_emit(ctx, 1, 0x3ff); /* 000003ff tesla UNK0D68 */ -+ else -+ xf_emit(ctx, 1, 0x7ff); /* 000007ff tesla UNK0D68 */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A30 */ -+ /* SEEK */ -+ xf_emit(ctx, 1, 0x102); /* 0000ffff STRMOUT_BUFFER_CTRL */ -+ xf_emit(ctx, 1, 0); /* ffffffff STRMOUT_PRIMITIVE_COUNT */ -+ xf_emit(ctx, 4, 0); /* 000000ff STRMOUT_ADDRESS_HIGH */ -+ xf_emit(ctx, 4, 0); /* ffffffff STRMOUT_ADDRESS_LOW */ -+ xf_emit(ctx, 4, 4); /* 000000ff STRMOUT_NUM_ATTRIBS */ -+ if (dev_priv->chipset >= 0xa0) { -+ xf_emit(ctx, 4, 0); /* ffffffff UNK1A8C */ -+ xf_emit(ctx, 4, 0); /* ffffffff UNK1780 */ -+ } -+ xf_emit(ctx, 1, 0); /* 0000ffff DMA_STRMOUT */ -+ xf_emit(ctx, 1, 0); /* 0000ffff DMA_QUERY */ -+ xf_emit(ctx, 1, 0); /* 000000ff QUERY_ADDRESS_HIGH */ -+ xf_emit(ctx, 2, 0); /* ffffffff QUERY_ADDRESS_LOW QUERY_COUNTER */ -+ xf_emit(ctx, 2, 0); /* ffffffff */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A30 */ -+ /* SEEK */ -+ xf_emit(ctx, 0x20, 0); /* ffffffff STRMOUT_MAP */ -+ xf_emit(ctx, 1, 0); /* 0000000f */ -+ xf_emit(ctx, 1, 0); /* 00000000? */ -+ xf_emit(ctx, 2, 0); /* ffffffff */ -+} -+ -+static void -+nv50_graph_construct_gene_ropm1(struct nouveau_grctx *ctx) -+{ -+ struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; -+ xf_emit(ctx, 1, 0x4e3bfdf); /* ffffffff UNK0D64 */ -+ xf_emit(ctx, 1, 0x4e3bfdf); /* ffffffff UNK0DF4 */ -+ xf_emit(ctx, 1, 0); /* 00000007 */ -+ xf_emit(ctx, 1, 0); /* 000003ff */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 1, 0x11); /* 000000ff tesla UNK1968 */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A3C */ -+} -+ -+static void -+nv50_graph_construct_gene_ropm2(struct nouveau_grctx *ctx) -+{ -+ struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; -+ /* SEEK */ -+ xf_emit(ctx, 1, 0); /* 0000ffff DMA_QUERY */ -+ xf_emit(ctx, 1, 0x0fac6881); /* 0fffffff RT_CONTROL */ -+ xf_emit(ctx, 2, 0); /* ffffffff */ -+ xf_emit(ctx, 1, 0); /* 000000ff QUERY_ADDRESS_HIGH */ -+ xf_emit(ctx, 2, 0); /* ffffffff QUERY_ADDRESS_LOW, COUNTER */ -+ xf_emit(ctx, 1, 0); /* 00000001 SAMPLECNT_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 7 */ -+ /* SEEK */ -+ xf_emit(ctx, 1, 0); /* 0000ffff DMA_QUERY */ -+ xf_emit(ctx, 1, 0); /* 000000ff QUERY_ADDRESS_HIGH */ -+ xf_emit(ctx, 2, 0); /* ffffffff QUERY_ADDRESS_LOW, COUNTER */ -+ xf_emit(ctx, 1, 0x4e3bfdf); /* ffffffff UNK0D64 */ -+ xf_emit(ctx, 1, 0x4e3bfdf); /* ffffffff UNK0DF4 */ -+ xf_emit(ctx, 1, 0); /* 00000001 eng2d UNK260 */ -+ xf_emit(ctx, 1, 0); /* ff/3ff */ -+ xf_emit(ctx, 1, 0); /* 00000007 */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 1, 0x11); /* 000000ff tesla UNK1968 */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A3C */ - } - - static void -@@ -1749,443 +2392,709 @@ - int magic2; - if (dev_priv->chipset == 0x50) { - magic2 = 0x00003e60; -- } else if (dev_priv->chipset <= 0xa0 || dev_priv->chipset >= 0xaa) { -+ } else if (!IS_NVA3F(dev_priv->chipset)) { - magic2 = 0x001ffe67; - } else { - magic2 = 0x00087e67; - } -- xf_emit(ctx, 8, 0); -- xf_emit(ctx, 1, 2); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, magic2); -- xf_emit(ctx, 4, 0); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 7, 0); -- if (dev_priv->chipset >= 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 1, 0x15); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0x10); -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 4, 0); -+ xf_emit(ctx, 1, 0); /* f/7 MUTISAMPLE_SAMPLES_LOG2 */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1534 */ -+ xf_emit(ctx, 1, 0); /* 00000007 STENCIL_BACK_FUNC_FUNC */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_BACK_FUNC_MASK */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_BACK_MASK */ -+ xf_emit(ctx, 3, 0); /* 00000007 STENCIL_BACK_OP_FAIL, ZFAIL, ZPASS */ -+ xf_emit(ctx, 1, 2); /* 00000003 tesla UNK143C */ -+ xf_emit(ctx, 1, 0); /* ffff0ff3 */ -+ xf_emit(ctx, 1, magic2); /* 001fffff tesla UNK0F78 */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_BOUNDS_EN */ -+ xf_emit(ctx, 1, 0); /* 00000007 DEPTH_TEST_FUNC */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_TEST_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_WRITE_ENABLE */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 1, 1); /* 0000001f tesla UNK169C */ -+ xf_emit(ctx, 1, 0); /* 00000007 STENCIL_FRONT_FUNC_FUNC */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_FRONT_FUNC_MASK */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_FRONT_MASK */ -+ xf_emit(ctx, 3, 0); /* 00000007 STENCIL_FRONT_OP_FAIL, ZFAIL, ZPASS */ -+ xf_emit(ctx, 1, 0); /* 00000001 STENCIL_FRONT_ENABLE */ -+ if (dev_priv->chipset >= 0xa0 && !IS_NVAAF(dev_priv->chipset)) -+ xf_emit(ctx, 1, 0x15); /* 000000ff */ -+ xf_emit(ctx, 1, 0); /* 00000001 STENCIL_BACK_ENABLE */ -+ xf_emit(ctx, 1, 1); /* 00000001 tesla UNK15B4 */ -+ xf_emit(ctx, 1, 0x10); /* 3ff/ff VIEW_VOLUME_CLIP_CTRL */ -+ xf_emit(ctx, 1, 0); /* ffffffff CLEAR_DEPTH */ -+ xf_emit(ctx, 1, 0); /* 0000000f ZETA_FORMAT */ -+ xf_emit(ctx, 1, 1); /* 00000001 ZETA_ENABLE */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A3C */ - if (dev_priv->chipset == 0x86 || dev_priv->chipset == 0x92 || dev_priv->chipset == 0x98 || dev_priv->chipset >= 0xa0) { -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 1, 0x400); -- xf_emit(ctx, 1, 0x300); -- xf_emit(ctx, 1, 0x1001); -+ xf_emit(ctx, 3, 0); /* ff, ffffffff, ffffffff */ -+ xf_emit(ctx, 1, 4); /* 7 */ -+ xf_emit(ctx, 1, 0x400); /* fffffff */ -+ xf_emit(ctx, 1, 0x300); /* ffff */ -+ xf_emit(ctx, 1, 0x1001); /* 1fff */ - if (dev_priv->chipset != 0xa0) { -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 1, 0); -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 1, 0); /* 0000000f UNK15C8 */ - else -- xf_emit(ctx, 1, 0x15); -+ xf_emit(ctx, 1, 0x15); /* ff */ - } -- xf_emit(ctx, 3, 0); - } -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 2); -- xf_emit(ctx, 8, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0x10); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 0x13, 0); -- xf_emit(ctx, 1, 0x10); -- xf_emit(ctx, 0x10, 0); -- xf_emit(ctx, 0x10, 0x3f800000); -- xf_emit(ctx, 0x19, 0); -- xf_emit(ctx, 1, 0x10); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x3f); -- xf_emit(ctx, 6, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 1); -+ xf_emit(ctx, 1, 0); /* 00000007 MULTISAMPLE_SAMPLES_LOG2 */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1534 */ -+ xf_emit(ctx, 1, 0); /* 00000007 STENCIL_BACK_FUNC_FUNC */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_BACK_FUNC_MASK */ -+ xf_emit(ctx, 1, 0); /* ffff0ff3 */ -+ xf_emit(ctx, 1, 2); /* 00000003 tesla UNK143C */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_BOUNDS_EN */ -+ xf_emit(ctx, 1, 0); /* 00000007 DEPTH_TEST_FUNC */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_TEST_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_WRITE_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000007 STENCIL_FRONT_FUNC_FUNC */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_FRONT_FUNC_MASK */ -+ xf_emit(ctx, 1, 0); /* 00000001 STENCIL_FRONT_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 STENCIL_BACK_ENABLE */ -+ xf_emit(ctx, 1, 1); /* 00000001 tesla UNK15B4 */ -+ xf_emit(ctx, 1, 0x10); /* 7f/ff VIEW_VOLUME_CLIP_CTRL */ -+ xf_emit(ctx, 1, 0); /* 0000000f ZETA_FORMAT */ -+ xf_emit(ctx, 1, 1); /* 00000001 ZETA_ENABLE */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A3C */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1534 */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1900 */ -+ xf_emit(ctx, 1, 0); /* 00000007 STENCIL_BACK_FUNC_FUNC */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_BACK_FUNC_MASK */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_BACK_FUNC_REF */ -+ xf_emit(ctx, 2, 0); /* ffffffff DEPTH_BOUNDS */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_BOUNDS_EN */ -+ xf_emit(ctx, 1, 0); /* 00000007 DEPTH_TEST_FUNC */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_TEST_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_WRITE_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 0000000f */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK0FB0 */ -+ xf_emit(ctx, 1, 0); /* 00000007 STENCIL_FRONT_FUNC_FUNC */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_FRONT_FUNC_MASK */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_FRONT_FUNC_REF */ -+ xf_emit(ctx, 1, 0); /* 00000001 STENCIL_FRONT_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 STENCIL_BACK_ENABLE */ -+ xf_emit(ctx, 1, 0x10); /* 7f/ff VIEW_VOLUME_CLIP_CTRL */ -+ xf_emit(ctx, 0x10, 0); /* ffffffff DEPTH_RANGE_NEAR */ -+ xf_emit(ctx, 0x10, 0x3f800000); /* ffffffff DEPTH_RANGE_FAR */ -+ xf_emit(ctx, 1, 0); /* 0000000f ZETA_FORMAT */ -+ xf_emit(ctx, 1, 0); /* 00000007 MULTISAMPLE_SAMPLES_LOG2 */ -+ xf_emit(ctx, 1, 0); /* 00000007 STENCIL_BACK_FUNC_FUNC */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_BACK_FUNC_MASK */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_BACK_FUNC_REF */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_BACK_MASK */ -+ xf_emit(ctx, 3, 0); /* 00000007 STENCIL_BACK_OP_FAIL, ZFAIL, ZPASS */ -+ xf_emit(ctx, 2, 0); /* ffffffff DEPTH_BOUNDS */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_BOUNDS_EN */ -+ xf_emit(ctx, 1, 0); /* 00000007 DEPTH_TEST_FUNC */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_TEST_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_WRITE_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 000000ff CLEAR_STENCIL */ -+ xf_emit(ctx, 1, 0); /* 00000007 STENCIL_FRONT_FUNC_FUNC */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_FRONT_FUNC_MASK */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_FRONT_FUNC_REF */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_FRONT_MASK */ -+ xf_emit(ctx, 3, 0); /* 00000007 STENCIL_FRONT_OP_FAIL, ZFAIL, ZPASS */ -+ xf_emit(ctx, 1, 0); /* 00000001 STENCIL_FRONT_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 STENCIL_BACK_ENABLE */ -+ xf_emit(ctx, 1, 0x10); /* 7f/ff VIEW_VOLUME_CLIP_CTRL */ -+ xf_emit(ctx, 1, 0); /* 0000000f ZETA_FORMAT */ -+ xf_emit(ctx, 1, 0x3f); /* 0000003f UNK1590 */ -+ xf_emit(ctx, 1, 0); /* 00000007 MULTISAMPLE_SAMPLES_LOG2 */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1534 */ -+ xf_emit(ctx, 2, 0); /* ffff0ff3, ffff */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK0FB0 */ -+ xf_emit(ctx, 1, 0); /* 0001ffff GP_BUILTIN_RESULT_EN */ -+ xf_emit(ctx, 1, 1); /* 00000001 tesla UNK15B4 */ -+ xf_emit(ctx, 1, 0); /* 0000000f ZETA_FORMAT */ -+ xf_emit(ctx, 1, 1); /* 00000001 ZETA_ENABLE */ -+ xf_emit(ctx, 1, 0); /* ffffffff CLEAR_DEPTH */ -+ xf_emit(ctx, 1, 1); /* 00000001 tesla UNK19CC */ - if (dev_priv->chipset >= 0xa0) { - xf_emit(ctx, 2, 0); - xf_emit(ctx, 1, 0x1001); - xf_emit(ctx, 0xb, 0); - } else { -- xf_emit(ctx, 0xc, 0); -+ xf_emit(ctx, 1, 0); /* 00000007 */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1534 */ -+ xf_emit(ctx, 1, 0); /* 00000007 MULTISAMPLE_SAMPLES_LOG2 */ -+ xf_emit(ctx, 8, 0); /* 00000001 BLEND_ENABLE */ -+ xf_emit(ctx, 1, 0); /* ffff0ff3 */ -+ } -+ xf_emit(ctx, 1, 0x11); /* 3f/7f RT_FORMAT */ -+ xf_emit(ctx, 7, 0); /* 3f/7f RT_FORMAT */ -+ xf_emit(ctx, 1, 0xf); /* 0000000f COLOR_MASK */ -+ xf_emit(ctx, 7, 0); /* 0000000f COLOR_MASK */ -+ xf_emit(ctx, 1, 0x11); /* 3f/7f */ -+ xf_emit(ctx, 1, 0); /* 00000001 LOGIC_OP_ENABLE */ -+ if (dev_priv->chipset != 0x50) { -+ xf_emit(ctx, 1, 0); /* 0000000f LOGIC_OP */ -+ xf_emit(ctx, 1, 0); /* 000000ff */ - } -- xf_emit(ctx, 1, 0x11); -- xf_emit(ctx, 7, 0); -- xf_emit(ctx, 1, 0xf); -- xf_emit(ctx, 7, 0); -- xf_emit(ctx, 1, 0x11); -- if (dev_priv->chipset == 0x50) -- xf_emit(ctx, 4, 0); -- else -- xf_emit(ctx, 6, 0); -- xf_emit(ctx, 3, 1); -- xf_emit(ctx, 1, 2); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 2); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, magic2); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x0fac6881); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) { -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 0x18, 1); -- xf_emit(ctx, 8, 2); -- xf_emit(ctx, 8, 1); -- xf_emit(ctx, 8, 2); -- xf_emit(ctx, 8, 1); -- xf_emit(ctx, 3, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 5, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 0x16, 0); -+ xf_emit(ctx, 1, 0); /* 00000007 OPERATION */ -+ xf_emit(ctx, 1, 0); /* ff/3ff */ -+ xf_emit(ctx, 1, 0); /* 00000003 UNK0F90 */ -+ xf_emit(ctx, 2, 1); /* 00000007 BLEND_EQUATION_RGB, ALPHA */ -+ xf_emit(ctx, 1, 1); /* 00000001 UNK133C */ -+ xf_emit(ctx, 1, 2); /* 0000001f BLEND_FUNC_SRC_RGB */ -+ xf_emit(ctx, 1, 1); /* 0000001f BLEND_FUNC_DST_RGB */ -+ xf_emit(ctx, 1, 2); /* 0000001f BLEND_FUNC_SRC_ALPHA */ -+ xf_emit(ctx, 1, 1); /* 0000001f BLEND_FUNC_DST_ALPHA */ -+ xf_emit(ctx, 1, 0); /* 00000001 */ -+ xf_emit(ctx, 1, magic2); /* 001fffff tesla UNK0F78 */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A3C */ -+ xf_emit(ctx, 1, 0x0fac6881); /* 0fffffff RT_CONTROL */ -+ if (IS_NVA3F(dev_priv->chipset)) { -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK12E4 */ -+ xf_emit(ctx, 8, 1); /* 00000007 IBLEND_EQUATION_RGB */ -+ xf_emit(ctx, 8, 1); /* 00000007 IBLEND_EQUATION_ALPHA */ -+ xf_emit(ctx, 8, 1); /* 00000001 IBLEND_UNK00 */ -+ xf_emit(ctx, 8, 2); /* 0000001f IBLEND_FUNC_SRC_RGB */ -+ xf_emit(ctx, 8, 1); /* 0000001f IBLEND_FUNC_DST_RGB */ -+ xf_emit(ctx, 8, 2); /* 0000001f IBLEND_FUNC_SRC_ALPHA */ -+ xf_emit(ctx, 8, 1); /* 0000001f IBLEND_FUNC_DST_ALPHA */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1140 */ -+ xf_emit(ctx, 2, 0); /* 00000001 */ -+ xf_emit(ctx, 1, 1); /* 0000001f tesla UNK169C */ -+ xf_emit(ctx, 1, 0); /* 0000000f */ -+ xf_emit(ctx, 1, 0); /* 00000003 */ -+ xf_emit(ctx, 1, 0); /* ffffffff */ -+ xf_emit(ctx, 2, 0); /* 00000001 */ -+ xf_emit(ctx, 1, 1); /* 0000001f tesla UNK169C */ -+ xf_emit(ctx, 1, 0); /* 00000001 */ -+ xf_emit(ctx, 1, 0); /* 000003ff */ -+ } else if (dev_priv->chipset >= 0xa0) { -+ xf_emit(ctx, 2, 0); /* 00000001 */ -+ xf_emit(ctx, 1, 0); /* 00000007 */ -+ xf_emit(ctx, 1, 0); /* 00000003 */ -+ xf_emit(ctx, 1, 0); /* ffffffff */ -+ xf_emit(ctx, 2, 0); /* 00000001 */ - } else { -- if (dev_priv->chipset >= 0xa0) -- xf_emit(ctx, 0x1b, 0); -- else -- xf_emit(ctx, 0x15, 0); -- } -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 2); -- xf_emit(ctx, 2, 1); -- xf_emit(ctx, 1, 2); -- xf_emit(ctx, 2, 1); -+ xf_emit(ctx, 1, 0); /* 00000007 MULTISAMPLE_SAMPLES_LOG2 */ -+ xf_emit(ctx, 1, 0); /* 00000003 tesla UNK1430 */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A3C */ -+ } -+ xf_emit(ctx, 4, 0); /* ffffffff CLEAR_COLOR */ -+ xf_emit(ctx, 4, 0); /* ffffffff BLEND_COLOR A R G B */ -+ xf_emit(ctx, 1, 0); /* 00000fff eng2d UNK2B0 */ - if (dev_priv->chipset >= 0xa0) -- xf_emit(ctx, 4, 0); -- else -- xf_emit(ctx, 3, 0); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) { -- xf_emit(ctx, 0x10, 1); -- xf_emit(ctx, 8, 2); -- xf_emit(ctx, 0x10, 1); -- xf_emit(ctx, 8, 2); -- xf_emit(ctx, 8, 1); -- xf_emit(ctx, 3, 0); -- } -- xf_emit(ctx, 1, 0x11); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 0x5b, 0); -+ xf_emit(ctx, 2, 0); /* 00000001 */ -+ xf_emit(ctx, 1, 0); /* 000003ff */ -+ xf_emit(ctx, 8, 0); /* 00000001 BLEND_ENABLE */ -+ xf_emit(ctx, 1, 1); /* 00000001 UNK133C */ -+ xf_emit(ctx, 1, 2); /* 0000001f BLEND_FUNC_SRC_RGB */ -+ xf_emit(ctx, 1, 1); /* 0000001f BLEND_FUNC_DST_RGB */ -+ xf_emit(ctx, 1, 1); /* 00000007 BLEND_EQUATION_RGB */ -+ xf_emit(ctx, 1, 2); /* 0000001f BLEND_FUNC_SRC_ALPHA */ -+ xf_emit(ctx, 1, 1); /* 0000001f BLEND_FUNC_DST_ALPHA */ -+ xf_emit(ctx, 1, 1); /* 00000007 BLEND_EQUATION_ALPHA */ -+ xf_emit(ctx, 1, 0); /* 00000001 UNK19C0 */ -+ xf_emit(ctx, 1, 0); /* 00000001 LOGIC_OP_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 0000000f LOGIC_OP */ -+ if (dev_priv->chipset >= 0xa0) -+ xf_emit(ctx, 1, 0); /* 00000001 UNK12E4? NVA3+ only? */ -+ if (IS_NVA3F(dev_priv->chipset)) { -+ xf_emit(ctx, 8, 1); /* 00000001 IBLEND_UNK00 */ -+ xf_emit(ctx, 8, 1); /* 00000007 IBLEND_EQUATION_RGB */ -+ xf_emit(ctx, 8, 2); /* 0000001f IBLEND_FUNC_SRC_RGB */ -+ xf_emit(ctx, 8, 1); /* 0000001f IBLEND_FUNC_DST_RGB */ -+ xf_emit(ctx, 8, 1); /* 00000007 IBLEND_EQUATION_ALPHA */ -+ xf_emit(ctx, 8, 2); /* 0000001f IBLEND_FUNC_SRC_ALPHA */ -+ xf_emit(ctx, 8, 1); /* 0000001f IBLEND_FUNC_DST_ALPHA */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK15C4 */ -+ xf_emit(ctx, 1, 0); /* 00000001 */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1140 */ -+ } -+ xf_emit(ctx, 1, 0x11); /* 3f/7f DST_FORMAT */ -+ xf_emit(ctx, 1, 1); /* 00000001 DST_LINEAR */ -+ xf_emit(ctx, 1, 0); /* 00000007 PATTERN_COLOR_FORMAT */ -+ xf_emit(ctx, 2, 0); /* ffffffff PATTERN_MONO_COLOR */ -+ xf_emit(ctx, 1, 0); /* 00000001 PATTERN_MONO_FORMAT */ -+ xf_emit(ctx, 2, 0); /* ffffffff PATTERN_MONO_BITMAP */ -+ xf_emit(ctx, 1, 0); /* 00000003 PATTERN_SELECT */ -+ xf_emit(ctx, 1, 0); /* 000000ff ROP */ -+ xf_emit(ctx, 1, 0); /* ffffffff BETA1 */ -+ xf_emit(ctx, 1, 0); /* ffffffff BETA4 */ -+ xf_emit(ctx, 1, 0); /* 00000007 OPERATION */ -+ xf_emit(ctx, 0x50, 0); /* 10x ffffff, ffffff, ffffff, ffffff, 3 PATTERN */ - } - - static void --nv50_graph_construct_xfer_tp_x1(struct nouveau_grctx *ctx) -+nv50_graph_construct_xfer_unk84xx(struct nouveau_grctx *ctx) - { - struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; - int magic3; -- if (dev_priv->chipset == 0x50) -+ switch (dev_priv->chipset) { -+ case 0x50: - magic3 = 0x1000; -- else if (dev_priv->chipset == 0x86 || dev_priv->chipset == 0x98 || dev_priv->chipset >= 0xa8) -+ break; -+ case 0x86: -+ case 0x98: -+ case 0xa8: -+ case 0xaa: -+ case 0xac: -+ case 0xaf: - magic3 = 0x1e00; -- else -+ break; -+ default: - magic3 = 0; -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 4); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 0x24, 0); -+ } -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ -+ xf_emit(ctx, 1, 4); /* 7f/ff[NVA0+] VP_REG_ALLOC_RESULT */ -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A30 */ -+ xf_emit(ctx, 1, 0); /* 111/113[NVA0+] */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 0x1f, 0); /* ffffffff */ - else if (dev_priv->chipset >= 0xa0) -- xf_emit(ctx, 0x14, 0); -+ xf_emit(ctx, 0x0f, 0); /* ffffffff */ - else -- xf_emit(ctx, 0x15, 0); -- xf_emit(ctx, 2, 4); -+ xf_emit(ctx, 0x10, 0); /* fffffff VP_RESULT_MAP_1 up */ -+ xf_emit(ctx, 2, 0); /* f/1f[NVA3], fffffff/ffffffff[NVA0+] */ -+ xf_emit(ctx, 1, 4); /* 7f/ff VP_REG_ALLOC_RESULT */ -+ xf_emit(ctx, 1, 4); /* 7f/ff VP_RESULT_MAP_SIZE */ - if (dev_priv->chipset >= 0xa0) -- xf_emit(ctx, 1, 0x03020100); -+ xf_emit(ctx, 1, 0x03020100); /* ffffffff */ - else -- xf_emit(ctx, 1, 0x00608080); -- xf_emit(ctx, 4, 0); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 2, 4); -- xf_emit(ctx, 1, 0x80); -+ xf_emit(ctx, 1, 0x00608080); /* fffffff VP_RESULT_MAP_0 */ -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A30 */ -+ xf_emit(ctx, 2, 0); /* 111/113, 7f/ff */ -+ xf_emit(ctx, 1, 4); /* 7f/ff VP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A30 */ -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ -+ xf_emit(ctx, 1, 4); /* 000000ff GP_REG_ALLOC_RESULT */ -+ xf_emit(ctx, 1, 4); /* 000000ff GP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 0x80); /* 0000ffff GP_VERTEX_OUTPUT_COUNT */ - if (magic3) -- xf_emit(ctx, 1, magic3); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 0x24, 0); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 1, 0x80); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 1, 0x03020100); -- xf_emit(ctx, 1, 3); -+ xf_emit(ctx, 1, magic3); /* 00007fff tesla UNK141C */ -+ xf_emit(ctx, 1, 4); /* 7f/ff VP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A30 */ -+ xf_emit(ctx, 1, 0); /* 111/113 */ -+ xf_emit(ctx, 0x1f, 0); /* ffffffff GP_RESULT_MAP_1 up */ -+ xf_emit(ctx, 1, 0); /* 0000001f */ -+ xf_emit(ctx, 1, 0); /* ffffffff */ -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ -+ xf_emit(ctx, 1, 4); /* 000000ff GP_REG_ALLOC_RESULT */ -+ xf_emit(ctx, 1, 0x80); /* 0000ffff GP_VERTEX_OUTPUT_COUNT */ -+ xf_emit(ctx, 1, 4); /* 000000ff GP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 0x03020100); /* ffffffff GP_RESULT_MAP_0 */ -+ xf_emit(ctx, 1, 3); /* 00000003 GP_OUTPUT_PRIMITIVE_TYPE */ - if (magic3) -- xf_emit(ctx, 1, magic3); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 4, 0); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 1, 3); -- xf_emit(ctx, 3, 0); -- xf_emit(ctx, 1, 4); -+ xf_emit(ctx, 1, magic3); /* 7fff tesla UNK141C */ -+ xf_emit(ctx, 1, 4); /* 7f/ff VP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 0); /* 00000001 PROVOKING_VERTEX_LAST */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A30 */ -+ xf_emit(ctx, 1, 0); /* 111/113 */ -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ -+ xf_emit(ctx, 1, 4); /* 000000ff GP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 3); /* 00000003 GP_OUTPUT_PRIMITIVE_TYPE */ -+ xf_emit(ctx, 1, 0); /* 00000001 PROVOKING_VERTEX_LAST */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A30 */ -+ xf_emit(ctx, 1, 0); /* 00000003 tesla UNK13A0 */ -+ xf_emit(ctx, 1, 4); /* 7f/ff VP_REG_ALLOC_RESULT */ -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A30 */ -+ xf_emit(ctx, 1, 0); /* 111/113 */ - if (dev_priv->chipset == 0x94 || dev_priv->chipset == 0x96) -- xf_emit(ctx, 0x1024, 0); -+ xf_emit(ctx, 0x1020, 0); /* 4 x (0x400 x 0xffffffff, ff, 0, 0, 0, 4 x ffffffff) */ - else if (dev_priv->chipset < 0xa0) -- xf_emit(ctx, 0xa24, 0); -- else if (dev_priv->chipset == 0xa0 || dev_priv->chipset >= 0xaa) -- xf_emit(ctx, 0x214, 0); -- else -- xf_emit(ctx, 0x414, 0); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 1, 3); -- xf_emit(ctx, 2, 0); -+ xf_emit(ctx, 0xa20, 0); /* 4 x (0x280 x 0xffffffff, ff, 0, 0, 0, 4 x ffffffff) */ -+ else if (!IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 0x210, 0); /* ffffffff */ -+ else -+ xf_emit(ctx, 0x410, 0); /* ffffffff */ -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ -+ xf_emit(ctx, 1, 4); /* 000000ff GP_RESULT_MAP_SIZE */ -+ xf_emit(ctx, 1, 3); /* 00000003 GP_OUTPUT_PRIMITIVE_TYPE */ -+ xf_emit(ctx, 1, 0); /* 00000001 PROVOKING_VERTEX_LAST */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A30 */ - } - - static void --nv50_graph_construct_xfer_tp_x2(struct nouveau_grctx *ctx) -+nv50_graph_construct_xfer_tprop(struct nouveau_grctx *ctx) - { - struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; - int magic1, magic2; - if (dev_priv->chipset == 0x50) { - magic1 = 0x3ff; - magic2 = 0x00003e60; -- } else if (dev_priv->chipset <= 0xa0 || dev_priv->chipset >= 0xaa) { -+ } else if (!IS_NVA3F(dev_priv->chipset)) { - magic1 = 0x7ff; - magic2 = 0x001ffe67; - } else { - magic1 = 0x7ff; - magic2 = 0x00087e67; - } -- xf_emit(ctx, 3, 0); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 0xc, 0); -- xf_emit(ctx, 1, 0xf); -- xf_emit(ctx, 0xb, 0); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 4, 0xffff); -- xf_emit(ctx, 8, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 3, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 5, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 2, 0); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) { -- xf_emit(ctx, 1, 3); -- xf_emit(ctx, 1, 0); -- } else if (dev_priv->chipset >= 0xa0) -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 0xa, 0); -- xf_emit(ctx, 2, 1); -- xf_emit(ctx, 1, 2); -- xf_emit(ctx, 2, 1); -- xf_emit(ctx, 1, 2); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) { -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 0x18, 1); -- xf_emit(ctx, 8, 2); -- xf_emit(ctx, 8, 1); -- xf_emit(ctx, 8, 2); -- xf_emit(ctx, 8, 1); -- xf_emit(ctx, 1, 0); -- } -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x11); -- xf_emit(ctx, 7, 0); -- xf_emit(ctx, 1, 0x0fac6881); -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 3, 0); -- xf_emit(ctx, 1, 0x11); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 3, 0xcf); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 0xa, 0); -- xf_emit(ctx, 2, 1); -- xf_emit(ctx, 1, 2); -- xf_emit(ctx, 2, 1); -- xf_emit(ctx, 1, 2); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 8, 1); -- xf_emit(ctx, 1, 0x11); -- xf_emit(ctx, 7, 0); -- xf_emit(ctx, 1, 0x0fac6881); -- xf_emit(ctx, 1, 0xf); -- xf_emit(ctx, 7, 0); -- xf_emit(ctx, 1, magic2); -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 0x11); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 2, 1); -- else -- xf_emit(ctx, 1, 1); -+ xf_emit(ctx, 1, 0); /* 00000007 ALPHA_TEST_FUNC */ -+ xf_emit(ctx, 1, 0); /* ffffffff ALPHA_TEST_REF */ -+ xf_emit(ctx, 1, 0); /* 00000001 ALPHA_TEST_ENABLE */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 1, 1); /* 0000000f UNK16A0 */ -+ xf_emit(ctx, 1, 0); /* 7/f MULTISAMPLE_SAMPLES_LOG2 */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1534 */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_BACK_MASK */ -+ xf_emit(ctx, 3, 0); /* 00000007 STENCIL_BACK_OP_FAIL, ZFAIL, ZPASS */ -+ xf_emit(ctx, 4, 0); /* ffffffff BLEND_COLOR */ -+ xf_emit(ctx, 1, 0); /* 00000001 UNK19C0 */ -+ xf_emit(ctx, 1, 0); /* 00000001 UNK0FDC */ -+ xf_emit(ctx, 1, 0xf); /* 0000000f COLOR_MASK */ -+ xf_emit(ctx, 7, 0); /* 0000000f COLOR_MASK */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_TEST_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_WRITE_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 LOGIC_OP_ENABLE */ -+ xf_emit(ctx, 1, 0); /* ff[NV50]/3ff[NV84+] */ -+ xf_emit(ctx, 1, 4); /* 00000007 FP_CONTROL */ -+ xf_emit(ctx, 4, 0xffff); /* 0000ffff MSAA_MASK */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_FRONT_MASK */ -+ xf_emit(ctx, 3, 0); /* 00000007 STENCIL_FRONT_OP_FAIL, ZFAIL, ZPASS */ -+ xf_emit(ctx, 1, 0); /* 00000001 STENCIL_FRONT_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 STENCIL_BACK_ENABLE */ -+ xf_emit(ctx, 2, 0); /* 00007fff WINDOW_OFFSET_XY */ -+ xf_emit(ctx, 1, 1); /* 00000001 tesla UNK19CC */ -+ xf_emit(ctx, 1, 0); /* 7 */ -+ xf_emit(ctx, 1, 0); /* 00000001 SAMPLECNT_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 0000000f ZETA_FORMAT */ -+ xf_emit(ctx, 1, 1); /* 00000001 ZETA_ENABLE */ -+ xf_emit(ctx, 1, 0); /* ffffffff COLOR_KEY */ -+ xf_emit(ctx, 1, 0); /* 00000001 COLOR_KEY_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000007 COLOR_KEY_FORMAT */ -+ xf_emit(ctx, 2, 0); /* ffffffff SIFC_BITMAP_COLOR */ -+ xf_emit(ctx, 1, 1); /* 00000001 SIFC_BITMAP_WRITE_BIT0_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000007 ALPHA_TEST_FUNC */ -+ xf_emit(ctx, 1, 0); /* 00000001 ALPHA_TEST_ENABLE */ -+ if (IS_NVA3F(dev_priv->chipset)) { -+ xf_emit(ctx, 1, 3); /* 00000003 tesla UNK16B4 */ -+ xf_emit(ctx, 1, 0); /* 00000003 */ -+ xf_emit(ctx, 1, 0); /* 00000003 tesla UNK1298 */ -+ } else if (dev_priv->chipset >= 0xa0) { -+ xf_emit(ctx, 1, 1); /* 00000001 tesla UNK16B4 */ -+ xf_emit(ctx, 1, 0); /* 00000003 */ -+ } else { -+ xf_emit(ctx, 1, 0); /* 00000003 MULTISAMPLE_CTRL */ -+ } -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1534 */ -+ xf_emit(ctx, 8, 0); /* 00000001 BLEND_ENABLE */ -+ xf_emit(ctx, 1, 1); /* 0000001f BLEND_FUNC_DST_ALPHA */ -+ xf_emit(ctx, 1, 1); /* 00000007 BLEND_EQUATION_ALPHA */ -+ xf_emit(ctx, 1, 2); /* 0000001f BLEND_FUNC_SRC_ALPHA */ -+ xf_emit(ctx, 1, 1); /* 0000001f BLEND_FUNC_DST_RGB */ -+ xf_emit(ctx, 1, 1); /* 00000007 BLEND_EQUATION_RGB */ -+ xf_emit(ctx, 1, 2); /* 0000001f BLEND_FUNC_SRC_RGB */ -+ if (IS_NVA3F(dev_priv->chipset)) { -+ xf_emit(ctx, 1, 0); /* 00000001 UNK12E4 */ -+ xf_emit(ctx, 8, 1); /* 00000007 IBLEND_EQUATION_RGB */ -+ xf_emit(ctx, 8, 1); /* 00000007 IBLEND_EQUATION_ALPHA */ -+ xf_emit(ctx, 8, 1); /* 00000001 IBLEND_UNK00 */ -+ xf_emit(ctx, 8, 2); /* 0000001f IBLEND_SRC_RGB */ -+ xf_emit(ctx, 8, 1); /* 0000001f IBLEND_DST_RGB */ -+ xf_emit(ctx, 8, 2); /* 0000001f IBLEND_SRC_ALPHA */ -+ xf_emit(ctx, 8, 1); /* 0000001f IBLEND_DST_ALPHA */ -+ xf_emit(ctx, 1, 0); /* 00000001 UNK1140 */ -+ } -+ xf_emit(ctx, 1, 1); /* 00000001 UNK133C */ -+ xf_emit(ctx, 1, 0); /* ffff0ff3 */ -+ xf_emit(ctx, 1, 0x11); /* 3f/7f RT_FORMAT */ -+ xf_emit(ctx, 7, 0); /* 3f/7f RT_FORMAT */ -+ xf_emit(ctx, 1, 0x0fac6881); /* 0fffffff RT_CONTROL */ -+ xf_emit(ctx, 1, 0); /* 00000001 LOGIC_OP_ENABLE */ -+ xf_emit(ctx, 1, 0); /* ff/3ff */ -+ xf_emit(ctx, 1, 4); /* 00000007 FP_CONTROL */ -+ xf_emit(ctx, 1, 0); /* 00000003 UNK0F90 */ -+ xf_emit(ctx, 1, 0); /* 00000001 FRAMEBUFFER_SRGB */ -+ xf_emit(ctx, 1, 0); /* 7 */ -+ xf_emit(ctx, 1, 0x11); /* 3f/7f DST_FORMAT */ -+ xf_emit(ctx, 1, 1); /* 00000001 DST_LINEAR */ -+ xf_emit(ctx, 1, 0); /* 00000007 OPERATION */ -+ xf_emit(ctx, 1, 0xcf); /* 000000ff SIFC_FORMAT */ -+ xf_emit(ctx, 1, 0xcf); /* 000000ff DRAW_COLOR_FORMAT */ -+ xf_emit(ctx, 1, 0xcf); /* 000000ff SRC_FORMAT */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 1, 1); /* 0000001f tesla UNK169C */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A3C */ -+ xf_emit(ctx, 1, 0); /* 7/f[NVA3] MULTISAMPLE_SAMPLES_LOG2 */ -+ xf_emit(ctx, 8, 0); /* 00000001 BLEND_ENABLE */ -+ xf_emit(ctx, 1, 1); /* 0000001f BLEND_FUNC_DST_ALPHA */ -+ xf_emit(ctx, 1, 1); /* 00000007 BLEND_EQUATION_ALPHA */ -+ xf_emit(ctx, 1, 2); /* 0000001f BLEND_FUNC_SRC_ALPHA */ -+ xf_emit(ctx, 1, 1); /* 0000001f BLEND_FUNC_DST_RGB */ -+ xf_emit(ctx, 1, 1); /* 00000007 BLEND_EQUATION_RGB */ -+ xf_emit(ctx, 1, 2); /* 0000001f BLEND_FUNC_SRC_RGB */ -+ xf_emit(ctx, 1, 1); /* 00000001 UNK133C */ -+ xf_emit(ctx, 1, 0); /* ffff0ff3 */ -+ xf_emit(ctx, 8, 1); /* 00000001 UNK19E0 */ -+ xf_emit(ctx, 1, 0x11); /* 3f/7f RT_FORMAT */ -+ xf_emit(ctx, 7, 0); /* 3f/7f RT_FORMAT */ -+ xf_emit(ctx, 1, 0x0fac6881); /* 0fffffff RT_CONTROL */ -+ xf_emit(ctx, 1, 0xf); /* 0000000f COLOR_MASK */ -+ xf_emit(ctx, 7, 0); /* 0000000f COLOR_MASK */ -+ xf_emit(ctx, 1, magic2); /* 001fffff tesla UNK0F78 */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_BOUNDS_EN */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_TEST_ENABLE */ -+ xf_emit(ctx, 1, 0x11); /* 3f/7f DST_FORMAT */ -+ xf_emit(ctx, 1, 1); /* 00000001 DST_LINEAR */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 1, 1); /* 0000001f tesla UNK169C */ - if(dev_priv->chipset == 0x50) -- xf_emit(ctx, 1, 0); -- else -- xf_emit(ctx, 3, 0); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 5, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 4, 0); -- xf_emit(ctx, 1, 0x11); -- xf_emit(ctx, 7, 0); -- xf_emit(ctx, 1, 0x0fac6881); -- xf_emit(ctx, 3, 0); -- xf_emit(ctx, 1, 0x11); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, magic1); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 2, 0); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 0x28, 0); -- xf_emit(ctx, 8, 8); -- xf_emit(ctx, 1, 0x11); -- xf_emit(ctx, 7, 0); -- xf_emit(ctx, 1, 0x0fac6881); -- xf_emit(ctx, 8, 0x400); -- xf_emit(ctx, 8, 0x300); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0xf); -- xf_emit(ctx, 7, 0); -- xf_emit(ctx, 1, 0x20); -- xf_emit(ctx, 1, 0x11); -- xf_emit(ctx, 1, 0x100); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 0x40); -- xf_emit(ctx, 1, 0x100); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 3); -- xf_emit(ctx, 4, 0); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, magic2); -- xf_emit(ctx, 3, 0); -- xf_emit(ctx, 1, 2); -- xf_emit(ctx, 1, 0x0fac6881); -- xf_emit(ctx, 9, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 4, 0); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0x400); -- xf_emit(ctx, 1, 0x300); -- xf_emit(ctx, 1, 0x1001); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 4, 0); -+ xf_emit(ctx, 1, 0); /* ff */ - else -- xf_emit(ctx, 3, 0); -- xf_emit(ctx, 1, 0x11); -- xf_emit(ctx, 7, 0); -- xf_emit(ctx, 1, 0x0fac6881); -- xf_emit(ctx, 1, 0xf); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) { -- xf_emit(ctx, 0x15, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 3, 0); -- } else -- xf_emit(ctx, 0x17, 0); -+ xf_emit(ctx, 3, 0); /* 1, 7, 3ff */ -+ xf_emit(ctx, 1, 4); /* 00000007 FP_CONTROL */ -+ xf_emit(ctx, 1, 0); /* 00000003 UNK0F90 */ -+ xf_emit(ctx, 1, 0); /* 00000001 STENCIL_FRONT_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000007 */ -+ xf_emit(ctx, 1, 0); /* 00000001 SAMPLECNT_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 0000000f ZETA_FORMAT */ -+ xf_emit(ctx, 1, 1); /* 00000001 ZETA_ENABLE */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A3C */ -+ xf_emit(ctx, 1, 0); /* 7/f MULTISAMPLE_SAMPLES_LOG2 */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1534 */ -+ xf_emit(ctx, 1, 0); /* ffff0ff3 */ -+ xf_emit(ctx, 1, 0x11); /* 3f/7f RT_FORMAT */ -+ xf_emit(ctx, 7, 0); /* 3f/7f RT_FORMAT */ -+ xf_emit(ctx, 1, 0x0fac6881); /* 0fffffff RT_CONTROL */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_BOUNDS_EN */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_TEST_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_WRITE_ENABLE */ -+ xf_emit(ctx, 1, 0x11); /* 3f/7f DST_FORMAT */ -+ xf_emit(ctx, 1, 1); /* 00000001 DST_LINEAR */ -+ xf_emit(ctx, 1, 0); /* 000fffff BLIT_DU_DX_FRACT */ -+ xf_emit(ctx, 1, 1); /* 0001ffff BLIT_DU_DX_INT */ -+ xf_emit(ctx, 1, 0); /* 000fffff BLIT_DV_DY_FRACT */ -+ xf_emit(ctx, 1, 1); /* 0001ffff BLIT_DV_DY_INT */ -+ xf_emit(ctx, 1, 0); /* ff/3ff */ -+ xf_emit(ctx, 1, magic1); /* 3ff/7ff tesla UNK0D68 */ -+ xf_emit(ctx, 1, 0); /* 00000001 STENCIL_FRONT_ENABLE */ -+ xf_emit(ctx, 1, 1); /* 00000001 tesla UNK15B4 */ -+ xf_emit(ctx, 1, 0); /* 0000000f ZETA_FORMAT */ -+ xf_emit(ctx, 1, 1); /* 00000001 ZETA_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000007 */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A3C */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 1, 1); /* 0000001f tesla UNK169C */ -+ xf_emit(ctx, 8, 0); /* 0000ffff DMA_COLOR */ -+ xf_emit(ctx, 1, 0); /* 0000ffff DMA_GLOBAL */ -+ xf_emit(ctx, 1, 0); /* 0000ffff DMA_LOCAL */ -+ xf_emit(ctx, 1, 0); /* 0000ffff DMA_STACK */ -+ xf_emit(ctx, 1, 0); /* ff/3ff */ -+ xf_emit(ctx, 1, 0); /* 0000ffff DMA_DST */ -+ xf_emit(ctx, 1, 0); /* 7 */ -+ xf_emit(ctx, 1, 0); /* 7/f MULTISAMPLE_SAMPLES_LOG2 */ -+ xf_emit(ctx, 1, 0); /* ffff0ff3 */ -+ xf_emit(ctx, 8, 0); /* 000000ff RT_ADDRESS_HIGH */ -+ xf_emit(ctx, 8, 0); /* ffffffff RT_LAYER_STRIDE */ -+ xf_emit(ctx, 8, 0); /* ffffffff RT_ADDRESS_LOW */ -+ xf_emit(ctx, 8, 8); /* 0000007f RT_TILE_MODE */ -+ xf_emit(ctx, 1, 0x11); /* 3f/7f RT_FORMAT */ -+ xf_emit(ctx, 7, 0); /* 3f/7f RT_FORMAT */ -+ xf_emit(ctx, 1, 0x0fac6881); /* 0fffffff RT_CONTROL */ -+ xf_emit(ctx, 8, 0x400); /* 0fffffff RT_HORIZ */ -+ xf_emit(ctx, 8, 0x300); /* 0000ffff RT_VERT */ -+ xf_emit(ctx, 1, 1); /* 00001fff RT_ARRAY_MODE */ -+ xf_emit(ctx, 1, 0xf); /* 0000000f COLOR_MASK */ -+ xf_emit(ctx, 7, 0); /* 0000000f COLOR_MASK */ -+ xf_emit(ctx, 1, 0x20); /* 00000fff DST_TILE_MODE */ -+ xf_emit(ctx, 1, 0x11); /* 3f/7f DST_FORMAT */ -+ xf_emit(ctx, 1, 0x100); /* 0001ffff DST_HEIGHT */ -+ xf_emit(ctx, 1, 0); /* 000007ff DST_LAYER */ -+ xf_emit(ctx, 1, 1); /* 00000001 DST_LINEAR */ -+ xf_emit(ctx, 1, 0); /* ffffffff DST_ADDRESS_LOW */ -+ xf_emit(ctx, 1, 0); /* 000000ff DST_ADDRESS_HIGH */ -+ xf_emit(ctx, 1, 0x40); /* 0007ffff DST_PITCH */ -+ xf_emit(ctx, 1, 0x100); /* 0001ffff DST_WIDTH */ -+ xf_emit(ctx, 1, 0); /* 0000ffff */ -+ xf_emit(ctx, 1, 3); /* 00000003 tesla UNK15AC */ -+ xf_emit(ctx, 1, 0); /* ff/3ff */ -+ xf_emit(ctx, 1, 0); /* 0001ffff GP_BUILTIN_RESULT_EN */ -+ xf_emit(ctx, 1, 0); /* 00000003 UNK0F90 */ -+ xf_emit(ctx, 1, 0); /* 00000007 */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 1, 1); /* 0000001f tesla UNK169C */ -+ xf_emit(ctx, 1, magic2); /* 001fffff tesla UNK0F78 */ -+ xf_emit(ctx, 1, 0); /* 7/f MULTISAMPLE_SAMPLES_LOG2 */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1534 */ -+ xf_emit(ctx, 1, 0); /* ffff0ff3 */ -+ xf_emit(ctx, 1, 2); /* 00000003 tesla UNK143C */ -+ xf_emit(ctx, 1, 0x0fac6881); /* 0fffffff RT_CONTROL */ -+ xf_emit(ctx, 1, 0); /* 0000ffff DMA_ZETA */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_BOUNDS_EN */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_TEST_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_WRITE_ENABLE */ -+ xf_emit(ctx, 2, 0); /* ffff, ff/3ff */ -+ xf_emit(ctx, 1, 0); /* 0001ffff GP_BUILTIN_RESULT_EN */ -+ xf_emit(ctx, 1, 0); /* 00000001 STENCIL_FRONT_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 000000ff STENCIL_FRONT_MASK */ -+ xf_emit(ctx, 1, 1); /* 00000001 tesla UNK15B4 */ -+ xf_emit(ctx, 1, 0); /* 00000007 */ -+ xf_emit(ctx, 1, 0); /* ffffffff ZETA_LAYER_STRIDE */ -+ xf_emit(ctx, 1, 0); /* 000000ff ZETA_ADDRESS_HIGH */ -+ xf_emit(ctx, 1, 0); /* ffffffff ZETA_ADDRESS_LOW */ -+ xf_emit(ctx, 1, 4); /* 00000007 ZETA_TILE_MODE */ -+ xf_emit(ctx, 1, 0); /* 0000000f ZETA_FORMAT */ -+ xf_emit(ctx, 1, 1); /* 00000001 ZETA_ENABLE */ -+ xf_emit(ctx, 1, 0x400); /* 0fffffff ZETA_HORIZ */ -+ xf_emit(ctx, 1, 0x300); /* 0000ffff ZETA_VERT */ -+ xf_emit(ctx, 1, 0x1001); /* 00001fff ZETA_ARRAY_MODE */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A3C */ -+ xf_emit(ctx, 1, 0); /* 7/f MULTISAMPLE_SAMPLES_LOG2 */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 1, 0); /* 00000001 */ -+ xf_emit(ctx, 1, 0); /* ffff0ff3 */ -+ xf_emit(ctx, 1, 0x11); /* 3f/7f RT_FORMAT */ -+ xf_emit(ctx, 7, 0); /* 3f/7f RT_FORMAT */ -+ xf_emit(ctx, 1, 0x0fac6881); /* 0fffffff RT_CONTROL */ -+ xf_emit(ctx, 1, 0xf); /* 0000000f COLOR_MASK */ -+ xf_emit(ctx, 7, 0); /* 0000000f COLOR_MASK */ -+ xf_emit(ctx, 1, 0); /* ff/3ff */ -+ xf_emit(ctx, 8, 0); /* 00000001 BLEND_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000003 UNK0F90 */ -+ xf_emit(ctx, 1, 0); /* 00000001 FRAMEBUFFER_SRGB */ -+ xf_emit(ctx, 1, 0); /* 7 */ -+ xf_emit(ctx, 1, 0); /* 00000001 LOGIC_OP_ENABLE */ -+ if (IS_NVA3F(dev_priv->chipset)) { -+ xf_emit(ctx, 1, 0); /* 00000001 UNK1140 */ -+ xf_emit(ctx, 1, 1); /* 0000001f tesla UNK169C */ -+ } -+ xf_emit(ctx, 1, 0); /* 7/f MULTISAMPLE_SAMPLES_LOG2 */ -+ xf_emit(ctx, 1, 0); /* 00000001 UNK1534 */ -+ xf_emit(ctx, 1, 0); /* ffff0ff3 */ - if (dev_priv->chipset >= 0xa0) -- xf_emit(ctx, 1, 0x0fac6881); -- xf_emit(ctx, 1, magic2); -- xf_emit(ctx, 3, 0); -- xf_emit(ctx, 1, 0x11); -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 2, 1); -- xf_emit(ctx, 3, 0); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 2, 1); -- else -- xf_emit(ctx, 1, 1); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 2, 0); -- else if (dev_priv->chipset != 0x50) -- xf_emit(ctx, 1, 0); --} -- --static void --nv50_graph_construct_xfer_tp_x3(struct nouveau_grctx *ctx) --{ -- struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; -- xf_emit(ctx, 3, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 1); -- if (dev_priv->chipset == 0x50) -- xf_emit(ctx, 2, 0); -- else -- xf_emit(ctx, 3, 0); -- xf_emit(ctx, 1, 0x2a712488); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x4085c000); -- xf_emit(ctx, 1, 0x40); -- xf_emit(ctx, 1, 0x100); -- xf_emit(ctx, 1, 0x10100); -- xf_emit(ctx, 1, 0x02800000); -+ xf_emit(ctx, 1, 0x0fac6881); /* fffffff */ -+ xf_emit(ctx, 1, magic2); /* 001fffff tesla UNK0F78 */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_BOUNDS_EN */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_TEST_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_WRITE_ENABLE */ -+ xf_emit(ctx, 1, 0x11); /* 3f/7f DST_FORMAT */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK0FB0 */ -+ xf_emit(ctx, 1, 0); /* ff/3ff */ -+ xf_emit(ctx, 1, 4); /* 00000007 FP_CONTROL */ -+ xf_emit(ctx, 1, 0); /* 00000001 STENCIL_FRONT_ENABLE */ -+ xf_emit(ctx, 1, 1); /* 00000001 tesla UNK15B4 */ -+ xf_emit(ctx, 1, 1); /* 00000001 tesla UNK19CC */ -+ xf_emit(ctx, 1, 0); /* 00000007 */ -+ xf_emit(ctx, 1, 0); /* 00000001 SAMPLECNT_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 0000000f ZETA_FORMAT */ -+ xf_emit(ctx, 1, 1); /* 00000001 ZETA_ENABLE */ -+ if (IS_NVA3F(dev_priv->chipset)) { -+ xf_emit(ctx, 1, 1); /* 0000001f tesla UNK169C */ -+ xf_emit(ctx, 1, 0); /* 0000000f tesla UNK15C8 */ -+ } -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A3C */ -+ if (dev_priv->chipset >= 0xa0) { -+ xf_emit(ctx, 3, 0); /* 7/f, 1, ffff0ff3 */ -+ xf_emit(ctx, 1, 0xfac6881); /* fffffff */ -+ xf_emit(ctx, 4, 0); /* 1, 1, 1, 3ff */ -+ xf_emit(ctx, 1, 4); /* 7 */ -+ xf_emit(ctx, 1, 0); /* 1 */ -+ xf_emit(ctx, 2, 1); /* 1 */ -+ xf_emit(ctx, 2, 0); /* 7, f */ -+ xf_emit(ctx, 1, 1); /* 1 */ -+ xf_emit(ctx, 1, 0); /* 7/f */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 0x9, 0); /* 1 */ -+ else -+ xf_emit(ctx, 0x8, 0); /* 1 */ -+ xf_emit(ctx, 1, 0); /* ffff0ff3 */ -+ xf_emit(ctx, 8, 1); /* 1 */ -+ xf_emit(ctx, 1, 0x11); /* 7f */ -+ xf_emit(ctx, 7, 0); /* 7f */ -+ xf_emit(ctx, 1, 0xfac6881); /* fffffff */ -+ xf_emit(ctx, 1, 0xf); /* f */ -+ xf_emit(ctx, 7, 0); /* f */ -+ xf_emit(ctx, 1, 0x11); /* 7f */ -+ xf_emit(ctx, 1, 1); /* 1 */ -+ xf_emit(ctx, 5, 0); /* 1, 7, 3ff, 3, 7 */ -+ if (IS_NVA3F(dev_priv->chipset)) { -+ xf_emit(ctx, 1, 0); /* 00000001 UNK1140 */ -+ xf_emit(ctx, 1, 1); /* 0000001f tesla UNK169C */ -+ } -+ } - } - - static void --nv50_graph_construct_xfer_tp_x4(struct nouveau_grctx *ctx) -+nv50_graph_construct_xfer_tex(struct nouveau_grctx *ctx) - { - struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; -- xf_emit(ctx, 2, 0x04e3bfdf); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x00ffff00); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 2, 1); -- else -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 0x00ffff00); -- xf_emit(ctx, 8, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0x30201000); -- xf_emit(ctx, 1, 0x70605040); -- xf_emit(ctx, 1, 0xb8a89888); -- xf_emit(ctx, 1, 0xf8e8d8c8); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x1a); -+ xf_emit(ctx, 2, 0); /* 1 LINKED_TSC. yes, 2. */ -+ if (dev_priv->chipset != 0x50) -+ xf_emit(ctx, 1, 0); /* 3 */ -+ xf_emit(ctx, 1, 1); /* 1ffff BLIT_DU_DX_INT */ -+ xf_emit(ctx, 1, 0); /* fffff BLIT_DU_DX_FRACT */ -+ xf_emit(ctx, 1, 1); /* 1ffff BLIT_DV_DY_INT */ -+ xf_emit(ctx, 1, 0); /* fffff BLIT_DV_DY_FRACT */ -+ if (dev_priv->chipset == 0x50) -+ xf_emit(ctx, 1, 0); /* 3 BLIT_CONTROL */ -+ else -+ xf_emit(ctx, 2, 0); /* 3ff, 1 */ -+ xf_emit(ctx, 1, 0x2a712488); /* ffffffff SRC_TIC_0 */ -+ xf_emit(ctx, 1, 0); /* ffffffff SRC_TIC_1 */ -+ xf_emit(ctx, 1, 0x4085c000); /* ffffffff SRC_TIC_2 */ -+ xf_emit(ctx, 1, 0x40); /* ffffffff SRC_TIC_3 */ -+ xf_emit(ctx, 1, 0x100); /* ffffffff SRC_TIC_4 */ -+ xf_emit(ctx, 1, 0x10100); /* ffffffff SRC_TIC_5 */ -+ xf_emit(ctx, 1, 0x02800000); /* ffffffff SRC_TIC_6 */ -+ xf_emit(ctx, 1, 0); /* ffffffff SRC_TIC_7 */ -+ if (dev_priv->chipset == 0x50) { -+ xf_emit(ctx, 1, 0); /* 00000001 turing UNK358 */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A34? */ -+ xf_emit(ctx, 1, 0); /* 00000003 turing UNK37C tesla UNK1690 */ -+ xf_emit(ctx, 1, 0); /* 00000003 BLIT_CONTROL */ -+ xf_emit(ctx, 1, 0); /* 00000001 turing UNK32C tesla UNK0F94 */ -+ } else if (!IS_NVAAF(dev_priv->chipset)) { -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A34? */ -+ xf_emit(ctx, 1, 0); /* 00000003 */ -+ xf_emit(ctx, 1, 0); /* 000003ff */ -+ xf_emit(ctx, 1, 0); /* 00000003 */ -+ xf_emit(ctx, 1, 0); /* 000003ff */ -+ xf_emit(ctx, 1, 0); /* 00000003 tesla UNK1664 / turing UNK03E8 */ -+ xf_emit(ctx, 1, 0); /* 00000003 */ -+ xf_emit(ctx, 1, 0); /* 000003ff */ -+ } else { -+ xf_emit(ctx, 0x6, 0); -+ } -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A34 */ -+ xf_emit(ctx, 1, 0); /* 0000ffff DMA_TEXTURE */ -+ xf_emit(ctx, 1, 0); /* 0000ffff DMA_SRC */ - } - - static void --nv50_graph_construct_xfer_tp_x5(struct nouveau_grctx *ctx) -+nv50_graph_construct_xfer_unk8cxx(struct nouveau_grctx *ctx) - { - struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; -- xf_emit(ctx, 3, 0); -- xf_emit(ctx, 1, 0xfac6881); -- xf_emit(ctx, 4, 0); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 2, 1); -- xf_emit(ctx, 2, 0); -- xf_emit(ctx, 1, 1); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 0xb, 0); -- else -- xf_emit(ctx, 0xa, 0); -- xf_emit(ctx, 8, 1); -- xf_emit(ctx, 1, 0x11); -- xf_emit(ctx, 7, 0); -- xf_emit(ctx, 1, 0xfac6881); -- xf_emit(ctx, 1, 0xf); -- xf_emit(ctx, 7, 0); -- xf_emit(ctx, 1, 0x11); -- xf_emit(ctx, 1, 1); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) { -- xf_emit(ctx, 6, 0); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 6, 0); -- } else { -- xf_emit(ctx, 0xb, 0); -- } -+ xf_emit(ctx, 1, 0); /* 00000001 UNK1534 */ -+ xf_emit(ctx, 1, 0); /* 7/f MULTISAMPLE_SAMPLES_LOG2 */ -+ xf_emit(ctx, 2, 0); /* 7, ffff0ff3 */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_TEST_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_WRITE */ -+ xf_emit(ctx, 1, 0x04e3bfdf); /* ffffffff UNK0D64 */ -+ xf_emit(ctx, 1, 0x04e3bfdf); /* ffffffff UNK0DF4 */ -+ xf_emit(ctx, 1, 1); /* 00000001 UNK15B4 */ -+ xf_emit(ctx, 1, 0); /* 00000001 LINE_STIPPLE_ENABLE */ -+ xf_emit(ctx, 1, 0x00ffff00); /* 00ffffff LINE_STIPPLE_PATTERN */ -+ xf_emit(ctx, 1, 1); /* 00000001 tesla UNK0F98 */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 1, 1); /* 0000001f tesla UNK169C */ -+ xf_emit(ctx, 1, 0); /* 00000003 tesla UNK1668 */ -+ xf_emit(ctx, 1, 0); /* 00000001 LINE_STIPPLE_ENABLE */ -+ xf_emit(ctx, 1, 0x00ffff00); /* 00ffffff LINE_STIPPLE_PATTERN */ -+ xf_emit(ctx, 1, 0); /* 00000001 POLYGON_SMOOTH_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 UNK1534 */ -+ xf_emit(ctx, 1, 0); /* 7/f MULTISAMPLE_SAMPLES_LOG2 */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1658 */ -+ xf_emit(ctx, 1, 0); /* 00000001 LINE_SMOOTH_ENABLE */ -+ xf_emit(ctx, 1, 0); /* ffff0ff3 */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_TEST_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 DEPTH_WRITE */ -+ xf_emit(ctx, 1, 1); /* 00000001 UNK15B4 */ -+ xf_emit(ctx, 1, 0); /* 00000001 POINT_SPRITE_ENABLE */ -+ xf_emit(ctx, 1, 1); /* 00000001 tesla UNK165C */ -+ xf_emit(ctx, 1, 0x30201000); /* ffffffff tesla UNK1670 */ -+ xf_emit(ctx, 1, 0x70605040); /* ffffffff tesla UNK1670 */ -+ xf_emit(ctx, 1, 0xb8a89888); /* ffffffff tesla UNK1670 */ -+ xf_emit(ctx, 1, 0xf8e8d8c8); /* ffffffff tesla UNK1670 */ -+ xf_emit(ctx, 1, 0); /* 00000001 VERTEX_TWO_SIDE_ENABLE */ -+ xf_emit(ctx, 1, 0x1a); /* 0000001f POLYGON_MODE */ - } - - static void -@@ -2193,108 +3102,136 @@ - { - struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; - if (dev_priv->chipset < 0xa0) { -- nv50_graph_construct_xfer_tp_x1(ctx); -- nv50_graph_construct_xfer_tp_x2(ctx); -- nv50_graph_construct_xfer_tp_x3(ctx); -- if (dev_priv->chipset == 0x50) -- xf_emit(ctx, 0xf, 0); -- else -- xf_emit(ctx, 0x12, 0); -- nv50_graph_construct_xfer_tp_x4(ctx); -+ nv50_graph_construct_xfer_unk84xx(ctx); -+ nv50_graph_construct_xfer_tprop(ctx); -+ nv50_graph_construct_xfer_tex(ctx); -+ nv50_graph_construct_xfer_unk8cxx(ctx); - } else { -- nv50_graph_construct_xfer_tp_x3(ctx); -- if (dev_priv->chipset < 0xaa) -- xf_emit(ctx, 0xc, 0); -- else -- xf_emit(ctx, 0xa, 0); -- nv50_graph_construct_xfer_tp_x2(ctx); -- nv50_graph_construct_xfer_tp_x5(ctx); -- nv50_graph_construct_xfer_tp_x4(ctx); -- nv50_graph_construct_xfer_tp_x1(ctx); -+ nv50_graph_construct_xfer_tex(ctx); -+ nv50_graph_construct_xfer_tprop(ctx); -+ nv50_graph_construct_xfer_unk8cxx(ctx); -+ nv50_graph_construct_xfer_unk84xx(ctx); - } - } - - static void --nv50_graph_construct_xfer_tp2(struct nouveau_grctx *ctx) -+nv50_graph_construct_xfer_mpc(struct nouveau_grctx *ctx) - { - struct drm_nouveau_private *dev_priv = ctx->dev->dev_private; -- int i, mpcnt; -- if (dev_priv->chipset == 0x98 || dev_priv->chipset == 0xaa) -- mpcnt = 1; -- else if (dev_priv->chipset < 0xa0 || dev_priv->chipset >= 0xa8) -- mpcnt = 2; -- else -- mpcnt = 3; -+ int i, mpcnt = 2; -+ switch (dev_priv->chipset) { -+ case 0x98: -+ case 0xaa: -+ mpcnt = 1; -+ break; -+ case 0x50: -+ case 0x84: -+ case 0x86: -+ case 0x92: -+ case 0x94: -+ case 0x96: -+ case 0xa8: -+ case 0xac: -+ mpcnt = 2; -+ break; -+ case 0xa0: -+ case 0xa3: -+ case 0xa5: -+ case 0xaf: -+ mpcnt = 3; -+ break; -+ } - for (i = 0; i < mpcnt; i++) { -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x80); -- xf_emit(ctx, 1, 0x80007004); -- xf_emit(ctx, 1, 0x04000400); -+ xf_emit(ctx, 1, 0); /* ff */ -+ xf_emit(ctx, 1, 0x80); /* ffffffff tesla UNK1404 */ -+ xf_emit(ctx, 1, 0x80007004); /* ffffffff tesla UNK12B0 */ -+ xf_emit(ctx, 1, 0x04000400); /* ffffffff */ - if (dev_priv->chipset >= 0xa0) -- xf_emit(ctx, 1, 0xc0); -- xf_emit(ctx, 1, 0x1000); -- xf_emit(ctx, 2, 0); -- if (dev_priv->chipset == 0x86 || dev_priv->chipset == 0x98 || dev_priv->chipset >= 0xa8) { -- xf_emit(ctx, 1, 0xe00); -- xf_emit(ctx, 1, 0x1e00); -+ xf_emit(ctx, 1, 0xc0); /* 00007fff tesla UNK152C */ -+ xf_emit(ctx, 1, 0x1000); /* 0000ffff tesla UNK0D60 */ -+ xf_emit(ctx, 1, 0); /* ff/3ff */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A30 */ -+ if (dev_priv->chipset == 0x86 || dev_priv->chipset == 0x98 || dev_priv->chipset == 0xa8 || IS_NVAAF(dev_priv->chipset)) { -+ xf_emit(ctx, 1, 0xe00); /* 7fff */ -+ xf_emit(ctx, 1, 0x1e00); /* 7fff */ - } -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 2, 0); -+ xf_emit(ctx, 1, 1); /* 000000ff VP_REG_ALLOC_TEMP */ -+ xf_emit(ctx, 1, 0); /* 00000001 LINKED_TSC */ -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ - if (dev_priv->chipset == 0x50) -- xf_emit(ctx, 2, 0x1000); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 1, 2); -- if (dev_priv->chipset >= 0xaa) -- xf_emit(ctx, 0xb, 0); -+ xf_emit(ctx, 2, 0x1000); /* 7fff tesla UNK141C */ -+ xf_emit(ctx, 1, 1); /* 000000ff GP_REG_ALLOC_TEMP */ -+ xf_emit(ctx, 1, 0); /* 00000001 GP_ENABLE */ -+ xf_emit(ctx, 1, 4); /* 000000ff FP_REG_ALLOC_TEMP */ -+ xf_emit(ctx, 1, 2); /* 00000003 REG_MODE */ -+ if (IS_NVAAF(dev_priv->chipset)) -+ xf_emit(ctx, 0xb, 0); /* RO */ - else if (dev_priv->chipset >= 0xa0) -- xf_emit(ctx, 0xc, 0); -+ xf_emit(ctx, 0xc, 0); /* RO */ - else -- xf_emit(ctx, 0xa, 0); -+ xf_emit(ctx, 0xa, 0); /* RO */ - } -- xf_emit(ctx, 1, 0x08100c12); -- xf_emit(ctx, 1, 0); -+ xf_emit(ctx, 1, 0x08100c12); /* 1fffffff FP_INTERPOLANT_CTRL */ -+ xf_emit(ctx, 1, 0); /* ff/3ff */ - if (dev_priv->chipset >= 0xa0) { -- xf_emit(ctx, 1, 0x1fe21); -- } -- xf_emit(ctx, 5, 0); -- xf_emit(ctx, 4, 0xffff); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 2, 0x10001); -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 0x1fe21); -- xf_emit(ctx, 1, 0); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 1, 1); -- xf_emit(ctx, 4, 0); -- xf_emit(ctx, 1, 0x08100c12); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 2); -- xf_emit(ctx, 1, 0x11); -- xf_emit(ctx, 8, 0); -- xf_emit(ctx, 1, 0xfac6881); -- xf_emit(ctx, 1, 0); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) -- xf_emit(ctx, 1, 3); -- xf_emit(ctx, 3, 0); -- xf_emit(ctx, 1, 4); -- xf_emit(ctx, 9, 0); -- xf_emit(ctx, 1, 2); -- xf_emit(ctx, 2, 1); -- xf_emit(ctx, 1, 2); -- xf_emit(ctx, 3, 1); -- xf_emit(ctx, 1, 0); -- if (dev_priv->chipset > 0xa0 && dev_priv->chipset < 0xaa) { -- xf_emit(ctx, 8, 2); -- xf_emit(ctx, 0x10, 1); -- xf_emit(ctx, 8, 2); -- xf_emit(ctx, 0x18, 1); -- xf_emit(ctx, 3, 0); -+ xf_emit(ctx, 1, 0x1fe21); /* 0003ffff tesla UNK0FAC */ - } -- xf_emit(ctx, 1, 4); -+ xf_emit(ctx, 3, 0); /* 7fff, 0, 0 */ -+ xf_emit(ctx, 1, 0); /* 00000001 tesla UNK1534 */ -+ xf_emit(ctx, 1, 0); /* 7/f MULTISAMPLE_SAMPLES_LOG2 */ -+ xf_emit(ctx, 4, 0xffff); /* 0000ffff MSAA_MASK */ -+ xf_emit(ctx, 1, 1); /* 00000001 LANES32 */ -+ xf_emit(ctx, 1, 0x10001); /* 00ffffff BLOCK_ALLOC */ -+ xf_emit(ctx, 1, 0x10001); /* ffffffff BLOCKDIM_XY */ -+ xf_emit(ctx, 1, 1); /* 0000ffff BLOCKDIM_Z */ -+ xf_emit(ctx, 1, 0); /* ffffffff SHARED_SIZE */ -+ xf_emit(ctx, 1, 0x1fe21); /* 1ffff/3ffff[NVA0+] tesla UNk0FAC */ -+ xf_emit(ctx, 1, 0); /* ffffffff tesla UNK1A34 */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 1, 1); /* 0000001f tesla UNK169C */ -+ xf_emit(ctx, 1, 0); /* ff/3ff */ -+ xf_emit(ctx, 1, 0); /* 1 LINKED_TSC */ -+ xf_emit(ctx, 1, 0); /* ff FP_ADDRESS_HIGH */ -+ xf_emit(ctx, 1, 0); /* ffffffff FP_ADDRESS_LOW */ -+ xf_emit(ctx, 1, 0x08100c12); /* 1fffffff FP_INTERPOLANT_CTRL */ -+ xf_emit(ctx, 1, 4); /* 00000007 FP_CONTROL */ -+ xf_emit(ctx, 1, 0); /* 000000ff FRAG_COLOR_CLAMP_EN */ -+ xf_emit(ctx, 1, 2); /* 00000003 REG_MODE */ -+ xf_emit(ctx, 1, 0x11); /* 0000007f RT_FORMAT */ -+ xf_emit(ctx, 7, 0); /* 0000007f RT_FORMAT */ -+ xf_emit(ctx, 1, 0); /* 00000007 */ -+ xf_emit(ctx, 1, 0xfac6881); /* 0fffffff RT_CONTROL */ -+ xf_emit(ctx, 1, 0); /* 00000003 MULTISAMPLE_CTRL */ -+ if (IS_NVA3F(dev_priv->chipset)) -+ xf_emit(ctx, 1, 3); /* 00000003 tesla UNK16B4 */ -+ xf_emit(ctx, 1, 0); /* 00000001 ALPHA_TEST_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000007 ALPHA_TEST_FUNC */ -+ xf_emit(ctx, 1, 0); /* 00000001 FRAMEBUFFER_SRGB */ -+ xf_emit(ctx, 1, 4); /* ffffffff tesla UNK1400 */ -+ xf_emit(ctx, 8, 0); /* 00000001 BLEND_ENABLE */ -+ xf_emit(ctx, 1, 0); /* 00000001 LOGIC_OP_ENABLE */ -+ xf_emit(ctx, 1, 2); /* 0000001f BLEND_FUNC_SRC_RGB */ -+ xf_emit(ctx, 1, 1); /* 0000001f BLEND_FUNC_DST_RGB */ -+ xf_emit(ctx, 1, 1); /* 00000007 BLEND_EQUATION_RGB */ -+ xf_emit(ctx, 1, 2); /* 0000001f BLEND_FUNC_SRC_ALPHA */ -+ xf_emit(ctx, 1, 1); /* 0000001f BLEND_FUNC_DST_ALPHA */ -+ xf_emit(ctx, 1, 1); /* 00000007 BLEND_EQUATION_ALPHA */ -+ xf_emit(ctx, 1, 1); /* 00000001 UNK133C */ -+ if (IS_NVA3F(dev_priv->chipset)) { -+ xf_emit(ctx, 1, 0); /* 00000001 UNK12E4 */ -+ xf_emit(ctx, 8, 2); /* 0000001f IBLEND_FUNC_SRC_RGB */ -+ xf_emit(ctx, 8, 1); /* 0000001f IBLEND_FUNC_DST_RGB */ -+ xf_emit(ctx, 8, 1); /* 00000007 IBLEND_EQUATION_RGB */ -+ xf_emit(ctx, 8, 2); /* 0000001f IBLEND_FUNC_SRC_ALPHA */ -+ xf_emit(ctx, 8, 1); /* 0000001f IBLEND_FUNC_DST_ALPHA */ -+ xf_emit(ctx, 8, 1); /* 00000007 IBLEND_EQUATION_ALPHA */ -+ xf_emit(ctx, 8, 1); /* 00000001 IBLEND_UNK00 */ -+ xf_emit(ctx, 1, 0); /* 00000003 tesla UNK1928 */ -+ xf_emit(ctx, 1, 0); /* 00000001 UNK1140 */ -+ } -+ xf_emit(ctx, 1, 0); /* 00000003 tesla UNK0F90 */ -+ xf_emit(ctx, 1, 4); /* 000000ff FP_RESULT_COUNT */ -+ /* XXX: demagic this part some day */ - if (dev_priv->chipset == 0x50) - xf_emit(ctx, 0x3a0, 0); - else if (dev_priv->chipset < 0x94) -@@ -2303,9 +3240,9 @@ - xf_emit(ctx, 0x39f, 0); - else - xf_emit(ctx, 0x3a3, 0); -- xf_emit(ctx, 1, 0x11); -- xf_emit(ctx, 1, 0); -- xf_emit(ctx, 1, 1); -+ xf_emit(ctx, 1, 0x11); /* 3f/7f DST_FORMAT */ -+ xf_emit(ctx, 1, 0); /* 7 OPERATION */ -+ xf_emit(ctx, 1, 1); /* 1 DST_LINEAR */ - xf_emit(ctx, 0x2d, 0); - } - -@@ -2323,52 +3260,56 @@ - if (dev_priv->chipset < 0xa0) { - for (i = 0; i < 8; i++) { - ctx->ctxvals_pos = offset + i; -+ /* that little bugger belongs to csched. No idea -+ * what it's doing here. */ - if (i == 0) -- xf_emit(ctx, 1, 0x08100c12); -+ xf_emit(ctx, 1, 0x08100c12); /* FP_INTERPOLANT_CTRL */ - if (units & (1 << i)) -- nv50_graph_construct_xfer_tp2(ctx); -+ nv50_graph_construct_xfer_mpc(ctx); - if ((ctx->ctxvals_pos-offset)/8 > size) - size = (ctx->ctxvals_pos-offset)/8; - } - } else { - /* Strand 0: TPs 0, 1 */ - ctx->ctxvals_pos = offset; -- xf_emit(ctx, 1, 0x08100c12); -+ /* that little bugger belongs to csched. No idea -+ * what it's doing here. */ -+ xf_emit(ctx, 1, 0x08100c12); /* FP_INTERPOLANT_CTRL */ - if (units & (1 << 0)) -- nv50_graph_construct_xfer_tp2(ctx); -+ nv50_graph_construct_xfer_mpc(ctx); - if (units & (1 << 1)) -- nv50_graph_construct_xfer_tp2(ctx); -+ nv50_graph_construct_xfer_mpc(ctx); - if ((ctx->ctxvals_pos-offset)/8 > size) - size = (ctx->ctxvals_pos-offset)/8; - -- /* Strand 0: TPs 2, 3 */ -+ /* Strand 1: TPs 2, 3 */ - ctx->ctxvals_pos = offset + 1; - if (units & (1 << 2)) -- nv50_graph_construct_xfer_tp2(ctx); -+ nv50_graph_construct_xfer_mpc(ctx); - if (units & (1 << 3)) -- nv50_graph_construct_xfer_tp2(ctx); -+ nv50_graph_construct_xfer_mpc(ctx); - if ((ctx->ctxvals_pos-offset)/8 > size) - size = (ctx->ctxvals_pos-offset)/8; - -- /* Strand 0: TPs 4, 5, 6 */ -+ /* Strand 2: TPs 4, 5, 6 */ - ctx->ctxvals_pos = offset + 2; - if (units & (1 << 4)) -- nv50_graph_construct_xfer_tp2(ctx); -+ nv50_graph_construct_xfer_mpc(ctx); - if (units & (1 << 5)) -- nv50_graph_construct_xfer_tp2(ctx); -+ nv50_graph_construct_xfer_mpc(ctx); - if (units & (1 << 6)) -- nv50_graph_construct_xfer_tp2(ctx); -+ nv50_graph_construct_xfer_mpc(ctx); - if ((ctx->ctxvals_pos-offset)/8 > size) - size = (ctx->ctxvals_pos-offset)/8; - -- /* Strand 0: TPs 7, 8, 9 */ -+ /* Strand 3: TPs 7, 8, 9 */ - ctx->ctxvals_pos = offset + 3; - if (units & (1 << 7)) -- nv50_graph_construct_xfer_tp2(ctx); -+ nv50_graph_construct_xfer_mpc(ctx); - if (units & (1 << 8)) -- nv50_graph_construct_xfer_tp2(ctx); -+ nv50_graph_construct_xfer_mpc(ctx); - if (units & (1 << 9)) -- nv50_graph_construct_xfer_tp2(ctx); -+ nv50_graph_construct_xfer_mpc(ctx); - if ((ctx->ctxvals_pos-offset)/8 > size) - size = (ctx->ctxvals_pos-offset)/8; - } -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_instmem.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_instmem.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_instmem.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_instmem.c 2010-10-30 22:24:25.000000000 +0200 -@@ -32,39 +32,87 @@ - struct nv50_instmem_priv { - uint32_t save1700[5]; /* 0x1700->0x1710 */ - -- struct nouveau_gpuobj_ref *pramin_pt; -- struct nouveau_gpuobj_ref *pramin_bar; -- struct nouveau_gpuobj_ref *fb_bar; -+ struct nouveau_gpuobj *pramin_pt; -+ struct nouveau_gpuobj *pramin_bar; -+ struct nouveau_gpuobj *fb_bar; - }; - --#define NV50_INSTMEM_PAGE_SHIFT 12 --#define NV50_INSTMEM_PAGE_SIZE (1 << NV50_INSTMEM_PAGE_SHIFT) --#define NV50_INSTMEM_PT_SIZE(a) (((a) >> 12) << 3) -- --/*NOTE: - Assumes 0x1700 already covers the correct MiB of PRAMIN -- */ --#define BAR0_WI32(g, o, v) do { \ -- uint32_t offset; \ -- if ((g)->im_backing) { \ -- offset = (g)->im_backing_start; \ -- } else { \ -- offset = chan->ramin->gpuobj->im_backing_start; \ -- offset += (g)->im_pramin->start; \ -- } \ -- offset += (o); \ -- nv_wr32(dev, NV_RAMIN + (offset & 0xfffff), (v)); \ --} while (0) -+static void -+nv50_channel_del(struct nouveau_channel **pchan) -+{ -+ struct nouveau_channel *chan; -+ -+ chan = *pchan; -+ *pchan = NULL; -+ if (!chan) -+ return; -+ -+ nouveau_gpuobj_ref(NULL, &chan->ramfc); -+ nouveau_gpuobj_ref(NULL, &chan->vm_pd); -+ if (chan->ramin_heap.free_stack.next) -+ drm_mm_takedown(&chan->ramin_heap); -+ nouveau_gpuobj_ref(NULL, &chan->ramin); -+ kfree(chan); -+} -+ -+static int -+nv50_channel_new(struct drm_device *dev, u32 size, -+ struct nouveau_channel **pchan) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ u32 pgd = (dev_priv->chipset == 0x50) ? 0x1400 : 0x0200; -+ u32 fc = (dev_priv->chipset == 0x50) ? 0x0000 : 0x4200; -+ struct nouveau_channel *chan; -+ int ret; -+ -+ chan = kzalloc(sizeof(*chan), GFP_KERNEL); -+ if (!chan) -+ return -ENOMEM; -+ chan->dev = dev; -+ -+ ret = nouveau_gpuobj_new(dev, NULL, size, 0x1000, 0, &chan->ramin); -+ if (ret) { -+ nv50_channel_del(&chan); -+ return ret; -+ } -+ -+ ret = drm_mm_init(&chan->ramin_heap, 0x6000, chan->ramin->size); -+ if (ret) { -+ nv50_channel_del(&chan); -+ return ret; -+ } -+ -+ ret = nouveau_gpuobj_new_fake(dev, chan->ramin->pinst == ~0 ? ~0 : -+ chan->ramin->pinst + pgd, -+ chan->ramin->vinst + pgd, -+ 0x4000, NVOBJ_FLAG_ZERO_ALLOC, -+ &chan->vm_pd); -+ if (ret) { -+ nv50_channel_del(&chan); -+ return ret; -+ } -+ -+ ret = nouveau_gpuobj_new_fake(dev, chan->ramin->pinst == ~0 ? ~0 : -+ chan->ramin->pinst + fc, -+ chan->ramin->vinst + fc, 0x100, -+ NVOBJ_FLAG_ZERO_ALLOC, &chan->ramfc); -+ if (ret) { -+ nv50_channel_del(&chan); -+ return ret; -+ } -+ -+ *pchan = chan; -+ return 0; -+} - - int - nv50_instmem_init(struct drm_device *dev) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; -- struct nouveau_channel *chan; -- uint32_t c_offset, c_size, c_ramfc, c_vmpd, c_base, pt_size; -- uint32_t save_nv001700; -- uint64_t v; - struct nv50_instmem_priv *priv; -+ struct nouveau_channel *chan; - int ret, i; -+ u32 tmp; - - priv = kzalloc(sizeof(*priv), GFP_KERNEL); - if (!priv) -@@ -75,212 +123,115 @@ - for (i = 0x1700; i <= 0x1710; i += 4) - priv->save1700[(i-0x1700)/4] = nv_rd32(dev, i); - -- /* Reserve the last MiB of VRAM, we should probably try to avoid -- * setting up the below tables over the top of the VBIOS image at -- * some point. -- */ -- dev_priv->ramin_rsvd_vram = 1 << 20; -- c_offset = dev_priv->vram_size - dev_priv->ramin_rsvd_vram; -- c_size = 128 << 10; -- c_vmpd = ((dev_priv->chipset & 0xf0) == 0x50) ? 0x1400 : 0x200; -- c_ramfc = ((dev_priv->chipset & 0xf0) == 0x50) ? 0x0 : 0x20; -- c_base = c_vmpd + 0x4000; -- pt_size = NV50_INSTMEM_PT_SIZE(dev_priv->ramin_size); -- -- NV_DEBUG(dev, " Rsvd VRAM base: 0x%08x\n", c_offset); -- NV_DEBUG(dev, " VBIOS image: 0x%08x\n", -- (nv_rd32(dev, 0x619f04) & ~0xff) << 8); -- NV_DEBUG(dev, " Aperture size: %d MiB\n", dev_priv->ramin_size >> 20); -- NV_DEBUG(dev, " PT size: %d KiB\n", pt_size >> 10); -- -- /* Determine VM layout, we need to do this first to make sure -- * we allocate enough memory for all the page tables. -- */ -- dev_priv->vm_gart_base = roundup(NV50_VM_BLOCK, NV50_VM_BLOCK); -- dev_priv->vm_gart_size = NV50_VM_BLOCK; -- -- dev_priv->vm_vram_base = dev_priv->vm_gart_base + dev_priv->vm_gart_size; -- dev_priv->vm_vram_size = dev_priv->vram_size; -- if (dev_priv->vm_vram_size > NV50_VM_MAX_VRAM) -- dev_priv->vm_vram_size = NV50_VM_MAX_VRAM; -- dev_priv->vm_vram_size = roundup(dev_priv->vm_vram_size, NV50_VM_BLOCK); -- dev_priv->vm_vram_pt_nr = dev_priv->vm_vram_size / NV50_VM_BLOCK; -- -- dev_priv->vm_end = dev_priv->vm_vram_base + dev_priv->vm_vram_size; -- -- NV_DEBUG(dev, "NV50VM: GART 0x%016llx-0x%016llx\n", -- dev_priv->vm_gart_base, -- dev_priv->vm_gart_base + dev_priv->vm_gart_size - 1); -- NV_DEBUG(dev, "NV50VM: VRAM 0x%016llx-0x%016llx\n", -- dev_priv->vm_vram_base, -- dev_priv->vm_vram_base + dev_priv->vm_vram_size - 1); -- -- c_size += dev_priv->vm_vram_pt_nr * (NV50_VM_BLOCK / 65536 * 8); -- -- /* Map BAR0 PRAMIN aperture over the memory we want to use */ -- save_nv001700 = nv_rd32(dev, NV50_PUNK_BAR0_PRAMIN); -- nv_wr32(dev, NV50_PUNK_BAR0_PRAMIN, (c_offset >> 16)); -- -- /* Create a fake channel, and use it as our "dummy" channels 0/127. -- * The main reason for creating a channel is so we can use the gpuobj -- * code. However, it's probably worth noting that NVIDIA also setup -- * their channels 0/127 with the same values they configure here. -- * So, there may be some other reason for doing this. -- * -- * Have to create the entire channel manually, as the real channel -- * creation code assumes we have PRAMIN access, and we don't until -- * we're done here. -- */ -- chan = kzalloc(sizeof(*chan), GFP_KERNEL); -- if (!chan) -+ /* Global PRAMIN heap */ -+ ret = drm_mm_init(&dev_priv->ramin_heap, 0, dev_priv->ramin_size); -+ if (ret) { -+ NV_ERROR(dev, "Failed to init RAMIN heap\n"); - return -ENOMEM; -- chan->id = 0; -- chan->dev = dev; -- chan->file_priv = (struct drm_file *)-2; -- dev_priv->fifos[0] = dev_priv->fifos[127] = chan; -- -- INIT_LIST_HEAD(&chan->ramht_refs); -+ } - -- /* Channel's PRAMIN object + heap */ -- ret = nouveau_gpuobj_new_fake(dev, 0, c_offset, c_size, 0, -- NULL, &chan->ramin); -+ /* we need a channel to plug into the hw to control the BARs */ -+ ret = nv50_channel_new(dev, 128*1024, &dev_priv->channels.ptr[0]); - if (ret) - return ret; -+ chan = dev_priv->channels.ptr[127] = dev_priv->channels.ptr[0]; - -- if (drm_mm_init(&chan->ramin_heap, c_base, c_size - c_base)) -- return -ENOMEM; -- -- /* RAMFC + zero channel's PRAMIN up to start of VM pagedir */ -- ret = nouveau_gpuobj_new_fake(dev, c_ramfc, c_offset + c_ramfc, -- 0x4000, 0, NULL, &chan->ramfc); -+ /* allocate page table for PRAMIN BAR */ -+ ret = nouveau_gpuobj_new(dev, chan, (dev_priv->ramin_size >> 12) * 8, -+ 0x1000, NVOBJ_FLAG_ZERO_ALLOC, -+ &priv->pramin_pt); - if (ret) - return ret; - -- for (i = 0; i < c_vmpd; i += 4) -- BAR0_WI32(chan->ramin->gpuobj, i, 0); -+ nv_wo32(chan->vm_pd, 0x0000, priv->pramin_pt->vinst | 0x63); -+ nv_wo32(chan->vm_pd, 0x0004, 0); - -- /* VM page directory */ -- ret = nouveau_gpuobj_new_fake(dev, c_vmpd, c_offset + c_vmpd, -- 0x4000, 0, &chan->vm_pd, NULL); -+ /* DMA object for PRAMIN BAR */ -+ ret = nouveau_gpuobj_new(dev, chan, 6*4, 16, 0, &priv->pramin_bar); - if (ret) - return ret; -- for (i = 0; i < 0x4000; i += 8) { -- BAR0_WI32(chan->vm_pd, i + 0x00, 0x00000000); -- BAR0_WI32(chan->vm_pd, i + 0x04, 0x00000000); -- } -+ nv_wo32(priv->pramin_bar, 0x00, 0x7fc00000); -+ nv_wo32(priv->pramin_bar, 0x04, dev_priv->ramin_size - 1); -+ nv_wo32(priv->pramin_bar, 0x08, 0x00000000); -+ nv_wo32(priv->pramin_bar, 0x0c, 0x00000000); -+ nv_wo32(priv->pramin_bar, 0x10, 0x00000000); -+ nv_wo32(priv->pramin_bar, 0x14, 0x00000000); - -- /* PRAMIN page table, cheat and map into VM at 0x0000000000. -- * We map the entire fake channel into the start of the PRAMIN BAR -- */ -- ret = nouveau_gpuobj_new_ref(dev, chan, NULL, 0, pt_size, 0x1000, -- 0, &priv->pramin_pt); -+ /* map channel into PRAMIN, gpuobj didn't do it for us */ -+ ret = nv50_instmem_bind(dev, chan->ramin); - if (ret) - return ret; - -- v = c_offset | 1; -- if (dev_priv->vram_sys_base) { -- v += dev_priv->vram_sys_base; -- v |= 0x30; -+ /* poke regs... */ -+ nv_wr32(dev, 0x001704, 0x00000000 | (chan->ramin->vinst >> 12)); -+ nv_wr32(dev, 0x001704, 0x40000000 | (chan->ramin->vinst >> 12)); -+ nv_wr32(dev, 0x00170c, 0x80000000 | (priv->pramin_bar->cinst >> 4)); -+ -+ tmp = nv_ri32(dev, 0); -+ nv_wi32(dev, 0, ~tmp); -+ if (nv_ri32(dev, 0) != ~tmp) { -+ NV_ERROR(dev, "PRAMIN readback failed\n"); -+ return -EIO; - } -+ nv_wi32(dev, 0, tmp); - -- i = 0; -- while (v < dev_priv->vram_sys_base + c_offset + c_size) { -- BAR0_WI32(priv->pramin_pt->gpuobj, i + 0, lower_32_bits(v)); -- BAR0_WI32(priv->pramin_pt->gpuobj, i + 4, upper_32_bits(v)); -- v += 0x1000; -- i += 8; -- } -+ dev_priv->ramin_available = true; - -- while (i < pt_size) { -- BAR0_WI32(priv->pramin_pt->gpuobj, i + 0, 0x00000000); -- BAR0_WI32(priv->pramin_pt->gpuobj, i + 4, 0x00000000); -- i += 8; -- } -+ /* Determine VM layout */ -+ dev_priv->vm_gart_base = roundup(NV50_VM_BLOCK, NV50_VM_BLOCK); -+ dev_priv->vm_gart_size = NV50_VM_BLOCK; -+ -+ dev_priv->vm_vram_base = dev_priv->vm_gart_base + dev_priv->vm_gart_size; -+ dev_priv->vm_vram_size = dev_priv->vram_size; -+ if (dev_priv->vm_vram_size > NV50_VM_MAX_VRAM) -+ dev_priv->vm_vram_size = NV50_VM_MAX_VRAM; -+ dev_priv->vm_vram_size = roundup(dev_priv->vm_vram_size, NV50_VM_BLOCK); -+ dev_priv->vm_vram_pt_nr = dev_priv->vm_vram_size / NV50_VM_BLOCK; - -- BAR0_WI32(chan->vm_pd, 0x00, priv->pramin_pt->instance | 0x63); -- BAR0_WI32(chan->vm_pd, 0x04, 0x00000000); -+ dev_priv->vm_end = dev_priv->vm_vram_base + dev_priv->vm_vram_size; -+ -+ NV_DEBUG(dev, "NV50VM: GART 0x%016llx-0x%016llx\n", -+ dev_priv->vm_gart_base, -+ dev_priv->vm_gart_base + dev_priv->vm_gart_size - 1); -+ NV_DEBUG(dev, "NV50VM: VRAM 0x%016llx-0x%016llx\n", -+ dev_priv->vm_vram_base, -+ dev_priv->vm_vram_base + dev_priv->vm_vram_size - 1); - - /* VRAM page table(s), mapped into VM at +1GiB */ - for (i = 0; i < dev_priv->vm_vram_pt_nr; i++) { -- ret = nouveau_gpuobj_new_ref(dev, chan, NULL, 0, -- NV50_VM_BLOCK/65536*8, 0, 0, -- &chan->vm_vram_pt[i]); -+ ret = nouveau_gpuobj_new(dev, NULL, NV50_VM_BLOCK / 0x10000 * 8, -+ 0, NVOBJ_FLAG_ZERO_ALLOC, -+ &chan->vm_vram_pt[i]); - if (ret) { -- NV_ERROR(dev, "Error creating VRAM page tables: %d\n", -- ret); -+ NV_ERROR(dev, "Error creating VRAM PGT: %d\n", ret); - dev_priv->vm_vram_pt_nr = i; - return ret; - } -- dev_priv->vm_vram_pt[i] = chan->vm_vram_pt[i]->gpuobj; -+ dev_priv->vm_vram_pt[i] = chan->vm_vram_pt[i]; - -- for (v = 0; v < dev_priv->vm_vram_pt[i]->im_pramin->size; -- v += 4) -- BAR0_WI32(dev_priv->vm_vram_pt[i], v, 0); -- -- BAR0_WI32(chan->vm_pd, 0x10 + (i*8), -- chan->vm_vram_pt[i]->instance | 0x61); -- BAR0_WI32(chan->vm_pd, 0x14 + (i*8), 0); -+ nv_wo32(chan->vm_pd, 0x10 + (i*8), -+ chan->vm_vram_pt[i]->vinst | 0x61); -+ nv_wo32(chan->vm_pd, 0x14 + (i*8), 0); - } - -- /* DMA object for PRAMIN BAR */ -- ret = nouveau_gpuobj_new_ref(dev, chan, chan, 0, 6*4, 16, 0, -- &priv->pramin_bar); -- if (ret) -- return ret; -- BAR0_WI32(priv->pramin_bar->gpuobj, 0x00, 0x7fc00000); -- BAR0_WI32(priv->pramin_bar->gpuobj, 0x04, dev_priv->ramin_size - 1); -- BAR0_WI32(priv->pramin_bar->gpuobj, 0x08, 0x00000000); -- BAR0_WI32(priv->pramin_bar->gpuobj, 0x0c, 0x00000000); -- BAR0_WI32(priv->pramin_bar->gpuobj, 0x10, 0x00000000); -- BAR0_WI32(priv->pramin_bar->gpuobj, 0x14, 0x00000000); -- - /* DMA object for FB BAR */ -- ret = nouveau_gpuobj_new_ref(dev, chan, chan, 0, 6*4, 16, 0, -- &priv->fb_bar); -+ ret = nouveau_gpuobj_new(dev, chan, 6*4, 16, 0, &priv->fb_bar); - if (ret) - return ret; -- BAR0_WI32(priv->fb_bar->gpuobj, 0x00, 0x7fc00000); -- BAR0_WI32(priv->fb_bar->gpuobj, 0x04, 0x40000000 + -- pci_resource_len(dev->pdev, 1) - 1); -- BAR0_WI32(priv->fb_bar->gpuobj, 0x08, 0x40000000); -- BAR0_WI32(priv->fb_bar->gpuobj, 0x0c, 0x00000000); -- BAR0_WI32(priv->fb_bar->gpuobj, 0x10, 0x00000000); -- BAR0_WI32(priv->fb_bar->gpuobj, 0x14, 0x00000000); -+ nv_wo32(priv->fb_bar, 0x00, 0x7fc00000); -+ nv_wo32(priv->fb_bar, 0x04, 0x40000000 + -+ pci_resource_len(dev->pdev, 1) - 1); -+ nv_wo32(priv->fb_bar, 0x08, 0x40000000); -+ nv_wo32(priv->fb_bar, 0x0c, 0x00000000); -+ nv_wo32(priv->fb_bar, 0x10, 0x00000000); -+ nv_wo32(priv->fb_bar, 0x14, 0x00000000); - -- /* Poke the relevant regs, and pray it works :) */ -- nv_wr32(dev, NV50_PUNK_BAR_CFG_BASE, (chan->ramin->instance >> 12)); -- nv_wr32(dev, NV50_PUNK_UNK1710, 0); -- nv_wr32(dev, NV50_PUNK_BAR_CFG_BASE, (chan->ramin->instance >> 12) | -- NV50_PUNK_BAR_CFG_BASE_VALID); -- nv_wr32(dev, NV50_PUNK_BAR1_CTXDMA, (priv->fb_bar->instance >> 4) | -- NV50_PUNK_BAR1_CTXDMA_VALID); -- nv_wr32(dev, NV50_PUNK_BAR3_CTXDMA, (priv->pramin_bar->instance >> 4) | -- NV50_PUNK_BAR3_CTXDMA_VALID); -+ dev_priv->engine.instmem.flush(dev); - -+ nv_wr32(dev, 0x001708, 0x80000000 | (priv->fb_bar->cinst >> 4)); - for (i = 0; i < 8; i++) - nv_wr32(dev, 0x1900 + (i*4), 0); - -- /* Assume that praying isn't enough, check that we can re-read the -- * entire fake channel back from the PRAMIN BAR */ -- for (i = 0; i < c_size; i += 4) { -- if (nv_rd32(dev, NV_RAMIN + i) != nv_ri32(dev, i)) { -- NV_ERROR(dev, "Error reading back PRAMIN at 0x%08x\n", -- i); -- return -EINVAL; -- } -- } -- -- nv_wr32(dev, NV50_PUNK_BAR0_PRAMIN, save_nv001700); -- -- /* Global PRAMIN heap */ -- if (drm_mm_init(&dev_priv->ramin_heap, c_size, dev_priv->ramin_size - c_size)) { -- NV_ERROR(dev, "Failed to init RAMIN heap\n"); -- } -- -- /*XXX: incorrect, but needed to make hash func "work" */ -- dev_priv->ramht_offset = 0x10000; -- dev_priv->ramht_bits = 9; -- dev_priv->ramht_size = (1 << dev_priv->ramht_bits) * 8; - return 0; - } - -@@ -289,7 +240,7 @@ - { - struct drm_nouveau_private *dev_priv = dev->dev_private; - struct nv50_instmem_priv *priv = dev_priv->engine.instmem.priv; -- struct nouveau_channel *chan = dev_priv->fifos[0]; -+ struct nouveau_channel *chan = dev_priv->channels.ptr[0]; - int i; - - NV_DEBUG(dev, "\n"); -@@ -297,29 +248,24 @@ - if (!priv) - return; - -+ dev_priv->ramin_available = false; -+ - /* Restore state from before init */ - for (i = 0x1700; i <= 0x1710; i += 4) - nv_wr32(dev, i, priv->save1700[(i - 0x1700) / 4]); - -- nouveau_gpuobj_ref_del(dev, &priv->fb_bar); -- nouveau_gpuobj_ref_del(dev, &priv->pramin_bar); -- nouveau_gpuobj_ref_del(dev, &priv->pramin_pt); -+ nouveau_gpuobj_ref(NULL, &priv->fb_bar); -+ nouveau_gpuobj_ref(NULL, &priv->pramin_bar); -+ nouveau_gpuobj_ref(NULL, &priv->pramin_pt); - - /* Destroy dummy channel */ - if (chan) { -- for (i = 0; i < dev_priv->vm_vram_pt_nr; i++) { -- nouveau_gpuobj_ref_del(dev, &chan->vm_vram_pt[i]); -- dev_priv->vm_vram_pt[i] = NULL; -- } -+ for (i = 0; i < dev_priv->vm_vram_pt_nr; i++) -+ nouveau_gpuobj_ref(NULL, &chan->vm_vram_pt[i]); - dev_priv->vm_vram_pt_nr = 0; - -- nouveau_gpuobj_del(dev, &chan->vm_pd); -- nouveau_gpuobj_ref_del(dev, &chan->ramfc); -- nouveau_gpuobj_ref_del(dev, &chan->ramin); -- drm_mm_takedown(&chan->ramin_heap); -- -- dev_priv->fifos[0] = dev_priv->fifos[127] = NULL; -- kfree(chan); -+ nv50_channel_del(&dev_priv->channels.ptr[0]); -+ dev_priv->channels.ptr[127] = NULL; - } - - dev_priv->engine.instmem.priv = NULL; -@@ -330,15 +276,15 @@ - nv50_instmem_suspend(struct drm_device *dev) - { - struct drm_nouveau_private *dev_priv = dev->dev_private; -- struct nouveau_channel *chan = dev_priv->fifos[0]; -- struct nouveau_gpuobj *ramin = chan->ramin->gpuobj; -+ struct nouveau_channel *chan = dev_priv->channels.ptr[0]; -+ struct nouveau_gpuobj *ramin = chan->ramin; - int i; - -- ramin->im_backing_suspend = vmalloc(ramin->im_pramin->size); -+ ramin->im_backing_suspend = vmalloc(ramin->size); - if (!ramin->im_backing_suspend) - return -ENOMEM; - -- for (i = 0; i < ramin->im_pramin->size; i += 4) -+ for (i = 0; i < ramin->size; i += 4) - ramin->im_backing_suspend[i/4] = nv_ri32(dev, i); - return 0; - } -@@ -348,24 +294,26 @@ - { - struct drm_nouveau_private *dev_priv = dev->dev_private; - struct nv50_instmem_priv *priv = dev_priv->engine.instmem.priv; -- struct nouveau_channel *chan = dev_priv->fifos[0]; -- struct nouveau_gpuobj *ramin = chan->ramin->gpuobj; -+ struct nouveau_channel *chan = dev_priv->channels.ptr[0]; -+ struct nouveau_gpuobj *ramin = chan->ramin; - int i; - -- nv_wr32(dev, NV50_PUNK_BAR0_PRAMIN, (ramin->im_backing_start >> 16)); -- for (i = 0; i < ramin->im_pramin->size; i += 4) -- BAR0_WI32(ramin, i, ramin->im_backing_suspend[i/4]); -+ dev_priv->ramin_available = false; -+ dev_priv->ramin_base = ~0; -+ for (i = 0; i < ramin->size; i += 4) -+ nv_wo32(ramin, i, ramin->im_backing_suspend[i/4]); -+ dev_priv->ramin_available = true; - vfree(ramin->im_backing_suspend); - ramin->im_backing_suspend = NULL; - - /* Poke the relevant regs, and pray it works :) */ -- nv_wr32(dev, NV50_PUNK_BAR_CFG_BASE, (chan->ramin->instance >> 12)); -+ nv_wr32(dev, NV50_PUNK_BAR_CFG_BASE, (chan->ramin->vinst >> 12)); - nv_wr32(dev, NV50_PUNK_UNK1710, 0); -- nv_wr32(dev, NV50_PUNK_BAR_CFG_BASE, (chan->ramin->instance >> 12) | -+ nv_wr32(dev, NV50_PUNK_BAR_CFG_BASE, (chan->ramin->vinst >> 12) | - NV50_PUNK_BAR_CFG_BASE_VALID); -- nv_wr32(dev, NV50_PUNK_BAR1_CTXDMA, (priv->fb_bar->instance >> 4) | -+ nv_wr32(dev, NV50_PUNK_BAR1_CTXDMA, (priv->fb_bar->cinst >> 4) | - NV50_PUNK_BAR1_CTXDMA_VALID); -- nv_wr32(dev, NV50_PUNK_BAR3_CTXDMA, (priv->pramin_bar->instance >> 4) | -+ nv_wr32(dev, NV50_PUNK_BAR3_CTXDMA, (priv->pramin_bar->cinst >> 4) | - NV50_PUNK_BAR3_CTXDMA_VALID); - - for (i = 0; i < 8; i++) -@@ -374,19 +322,19 @@ - - int - nv50_instmem_populate(struct drm_device *dev, struct nouveau_gpuobj *gpuobj, -- uint32_t *sz) -+ u32 *size, u32 align) - { - int ret; - - if (gpuobj->im_backing) - return -EINVAL; - -- *sz = ALIGN(*sz, NV50_INSTMEM_PAGE_SIZE); -- if (*sz == 0) -+ *size = ALIGN(*size, 4096); -+ if (*size == 0) - return -EINVAL; - -- ret = nouveau_bo_new(dev, NULL, *sz, 0, TTM_PL_FLAG_VRAM, 0, 0x0000, -- true, false, &gpuobj->im_backing); -+ ret = nouveau_bo_new(dev, NULL, *size, align, TTM_PL_FLAG_VRAM, -+ 0, 0x0000, true, false, &gpuobj->im_backing); - if (ret) { - NV_ERROR(dev, "error getting PRAMIN backing pages: %d\n", ret); - return ret; -@@ -399,9 +347,7 @@ - return ret; - } - -- gpuobj->im_backing_start = gpuobj->im_backing->bo.mem.mm_node->start; -- gpuobj->im_backing_start <<= PAGE_SHIFT; -- -+ gpuobj->vinst = gpuobj->im_backing->bo.mem.start << PAGE_SHIFT; - return 0; - } - -@@ -424,7 +370,7 @@ - { - struct drm_nouveau_private *dev_priv = dev->dev_private; - struct nv50_instmem_priv *priv = dev_priv->engine.instmem.priv; -- struct nouveau_gpuobj *pramin_pt = priv->pramin_pt->gpuobj; -+ struct nouveau_gpuobj *pramin_pt = priv->pramin_pt; - uint32_t pte, pte_end; - uint64_t vram; - -@@ -436,11 +382,11 @@ - - pte = (gpuobj->im_pramin->start >> 12) << 1; - pte_end = ((gpuobj->im_pramin->size >> 12) << 1) + pte; -- vram = gpuobj->im_backing_start; -+ vram = gpuobj->vinst; - - NV_DEBUG(dev, "pramin=0x%lx, pte=%d, pte_end=%d\n", - gpuobj->im_pramin->start, pte, pte_end); -- NV_DEBUG(dev, "first vram page: 0x%08x\n", gpuobj->im_backing_start); -+ NV_DEBUG(dev, "first vram page: 0x%010llx\n", gpuobj->vinst); - - vram |= 1; - if (dev_priv->vram_sys_base) { -@@ -449,13 +395,13 @@ - } - - while (pte < pte_end) { -- nv_wo32(dev, pramin_pt, pte++, lower_32_bits(vram)); -- nv_wo32(dev, pramin_pt, pte++, upper_32_bits(vram)); -- vram += NV50_INSTMEM_PAGE_SIZE; -+ nv_wo32(pramin_pt, (pte * 4) + 0, lower_32_bits(vram)); -+ nv_wo32(pramin_pt, (pte * 4) + 4, upper_32_bits(vram)); -+ vram += 0x1000; -+ pte += 2; - } - dev_priv->engine.instmem.flush(dev); - -- nv50_vm_flush(dev, 4); - nv50_vm_flush(dev, 6); - - gpuobj->im_bound = 1; -@@ -472,12 +418,17 @@ - if (gpuobj->im_bound == 0) - return -EINVAL; - -+ /* can happen during late takedown */ -+ if (unlikely(!dev_priv->ramin_available)) -+ return 0; -+ - pte = (gpuobj->im_pramin->start >> 12) << 1; - pte_end = ((gpuobj->im_pramin->size >> 12) << 1) + pte; - - while (pte < pte_end) { -- nv_wo32(dev, priv->pramin_pt->gpuobj, pte++, 0x00000000); -- nv_wo32(dev, priv->pramin_pt->gpuobj, pte++, 0x00000000); -+ nv_wo32(priv->pramin_pt, (pte * 4) + 0, 0x00000000); -+ nv_wo32(priv->pramin_pt, (pte * 4) + 4, 0x00000000); -+ pte += 2; - } - dev_priv->engine.instmem.flush(dev); - -@@ -489,7 +440,7 @@ - nv50_instmem_flush(struct drm_device *dev) - { - nv_wr32(dev, 0x00330c, 0x00000001); -- if (!nv_wait(0x00330c, 0x00000002, 0x00000000)) -+ if (!nv_wait(dev, 0x00330c, 0x00000002, 0x00000000)) - NV_ERROR(dev, "PRAMIN flush timeout\n"); - } - -@@ -497,7 +448,7 @@ - nv84_instmem_flush(struct drm_device *dev) - { - nv_wr32(dev, 0x070000, 0x00000001); -- if (!nv_wait(0x070000, 0x00000002, 0x00000000)) -+ if (!nv_wait(dev, 0x070000, 0x00000002, 0x00000000)) - NV_ERROR(dev, "PRAMIN flush timeout\n"); - } - -@@ -505,7 +456,7 @@ - nv50_vm_flush(struct drm_device *dev, int engine) - { - nv_wr32(dev, 0x100c80, (engine << 16) | 1); -- if (!nv_wait(0x100c80, 0x00000001, 0x00000000)) -+ if (!nv_wait(dev, 0x100c80, 0x00000001, 0x00000000)) - NV_ERROR(dev, "vm flush timeout: engine %d\n", engine); - } - -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_pm.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_pm.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_pm.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_pm.c 2010-10-30 22:24:25.000000000 +0200 -@@ -0,0 +1,131 @@ -+/* -+ * Copyright 2010 Red Hat Inc. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be included in -+ * all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR -+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ * -+ * Authors: Ben Skeggs -+ */ -+ -+#include "drmP.h" -+#include "nouveau_drv.h" -+#include "nouveau_bios.h" -+#include "nouveau_pm.h" -+ -+struct nv50_pm_state { -+ struct nouveau_pm_level *perflvl; -+ struct pll_lims pll; -+ enum pll_types type; -+ int N, M, P; -+}; -+ -+int -+nv50_pm_clock_get(struct drm_device *dev, u32 id) -+{ -+ struct pll_lims pll; -+ int P, N, M, ret; -+ u32 reg0, reg1; -+ -+ ret = get_pll_limits(dev, id, &pll); -+ if (ret) -+ return ret; -+ -+ reg0 = nv_rd32(dev, pll.reg + 0); -+ reg1 = nv_rd32(dev, pll.reg + 4); -+ P = (reg0 & 0x00070000) >> 16; -+ N = (reg1 & 0x0000ff00) >> 8; -+ M = (reg1 & 0x000000ff); -+ -+ return ((pll.refclk * N / M) >> P); -+} -+ -+void * -+nv50_pm_clock_pre(struct drm_device *dev, struct nouveau_pm_level *perflvl, -+ u32 id, int khz) -+{ -+ struct nv50_pm_state *state; -+ int dummy, ret; -+ -+ state = kzalloc(sizeof(*state), GFP_KERNEL); -+ if (!state) -+ return ERR_PTR(-ENOMEM); -+ state->type = id; -+ state->perflvl = perflvl; -+ -+ ret = get_pll_limits(dev, id, &state->pll); -+ if (ret < 0) { -+ kfree(state); -+ return (ret == -ENOENT) ? NULL : ERR_PTR(ret); -+ } -+ -+ ret = nv50_calc_pll(dev, &state->pll, khz, &state->N, &state->M, -+ &dummy, &dummy, &state->P); -+ if (ret < 0) { -+ kfree(state); -+ return ERR_PTR(ret); -+ } -+ -+ return state; -+} -+ -+void -+nv50_pm_clock_set(struct drm_device *dev, void *pre_state) -+{ -+ struct nv50_pm_state *state = pre_state; -+ struct nouveau_pm_level *perflvl = state->perflvl; -+ u32 reg = state->pll.reg, tmp; -+ struct bit_entry BIT_M; -+ u16 script; -+ int N = state->N; -+ int M = state->M; -+ int P = state->P; -+ -+ if (state->type == PLL_MEMORY && perflvl->memscript && -+ bit_table(dev, 'M', &BIT_M) == 0 && -+ BIT_M.version == 1 && BIT_M.length >= 0x0b) { -+ script = ROM16(BIT_M.data[0x05]); -+ if (script) -+ nouveau_bios_run_init_table(dev, script, NULL); -+ script = ROM16(BIT_M.data[0x07]); -+ if (script) -+ nouveau_bios_run_init_table(dev, script, NULL); -+ script = ROM16(BIT_M.data[0x09]); -+ if (script) -+ nouveau_bios_run_init_table(dev, script, NULL); -+ -+ nouveau_bios_run_init_table(dev, perflvl->memscript, NULL); -+ } -+ -+ if (state->type == PLL_MEMORY) { -+ nv_wr32(dev, 0x100210, 0); -+ nv_wr32(dev, 0x1002dc, 1); -+ } -+ -+ tmp = nv_rd32(dev, reg + 0) & 0xfff8ffff; -+ tmp |= 0x80000000 | (P << 16); -+ nv_wr32(dev, reg + 0, tmp); -+ nv_wr32(dev, reg + 4, (N << 8) | M); -+ -+ if (state->type == PLL_MEMORY) { -+ nv_wr32(dev, 0x1002dc, 0); -+ nv_wr32(dev, 0x100210, 0x80000000); -+ } -+ -+ kfree(state); -+} -+ -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv50_sor.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_sor.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv50_sor.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv50_sor.c 2010-10-30 22:24:25.000000000 +0200 -@@ -92,7 +92,7 @@ - } - - /* wait for it to be done */ -- if (!nv_wait(NV50_PDISPLAY_SOR_DPMS_CTRL(or), -+ if (!nv_wait(dev, NV50_PDISPLAY_SOR_DPMS_CTRL(or), - NV50_PDISPLAY_SOR_DPMS_CTRL_PENDING, 0)) { - NV_ERROR(dev, "timeout: SOR_DPMS_CTRL_PENDING(%d) == 0\n", or); - NV_ERROR(dev, "SOR_DPMS_CTRL(%d) = 0x%08x\n", or, -@@ -108,7 +108,7 @@ - - nv_wr32(dev, NV50_PDISPLAY_SOR_DPMS_CTRL(or), val | - NV50_PDISPLAY_SOR_DPMS_CTRL_PENDING); -- if (!nv_wait(NV50_PDISPLAY_SOR_DPMS_STATE(or), -+ if (!nv_wait(dev, NV50_PDISPLAY_SOR_DPMS_STATE(or), - NV50_PDISPLAY_SOR_DPMS_STATE_WAIT, 0)) { - NV_ERROR(dev, "timeout: SOR_DPMS_STATE_WAIT(%d) == 0\n", or); - NV_ERROR(dev, "SOR_DPMS_STATE(%d) = 0x%08x\n", or, -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nv84_crypt.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv84_crypt.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nv84_crypt.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nv84_crypt.c 2010-10-30 22:24:25.000000000 +0200 -@@ -0,0 +1,110 @@ -+/* -+ * Copyright 2010 Red Hat Inc. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be included in -+ * all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR -+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ * -+ * Authors: Ben Skeggs -+ */ -+ -+#include "drmP.h" -+#include "nouveau_drv.h" -+ -+int -+nv84_crypt_create_context(struct nouveau_channel *chan) -+{ -+ struct drm_device *dev = chan->dev; -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_gpuobj *ramin = chan->ramin; -+ int ret; -+ -+ NV_DEBUG(dev, "ch%d\n", chan->id); -+ -+ ret = nouveau_gpuobj_new(dev, chan, 256, 0, -+ NVOBJ_FLAG_ZERO_ALLOC | NVOBJ_FLAG_ZERO_FREE, -+ &chan->crypt_ctx); -+ if (ret) -+ return ret; -+ -+ nv_wo32(ramin, 0xa0, 0x00190000); -+ nv_wo32(ramin, 0xa4, chan->crypt_ctx->vinst + 0xff); -+ nv_wo32(ramin, 0xa8, chan->crypt_ctx->vinst); -+ nv_wo32(ramin, 0xac, 0); -+ nv_wo32(ramin, 0xb0, 0); -+ nv_wo32(ramin, 0xb4, 0); -+ -+ dev_priv->engine.instmem.flush(dev); -+ return 0; -+} -+ -+void -+nv84_crypt_destroy_context(struct nouveau_channel *chan) -+{ -+ struct drm_device *dev = chan->dev; -+ u32 inst; -+ -+ if (!chan->ramin) -+ return; -+ -+ inst = (chan->ramin->vinst >> 12); -+ inst |= 0x80000000; -+ -+ /* mark context as invalid if still on the hardware, not -+ * doing this causes issues the next time PCRYPT is used, -+ * unsurprisingly :) -+ */ -+ nv_wr32(dev, 0x10200c, 0x00000000); -+ if (nv_rd32(dev, 0x102188) == inst) -+ nv_mask(dev, 0x102188, 0x80000000, 0x00000000); -+ if (nv_rd32(dev, 0x10218c) == inst) -+ nv_mask(dev, 0x10218c, 0x80000000, 0x00000000); -+ nv_wr32(dev, 0x10200c, 0x00000010); -+ -+ nouveau_gpuobj_ref(NULL, &chan->crypt_ctx); -+} -+ -+void -+nv84_crypt_tlb_flush(struct drm_device *dev) -+{ -+ nv50_vm_flush(dev, 0x0a); -+} -+ -+int -+nv84_crypt_init(struct drm_device *dev) -+{ -+ struct drm_nouveau_private *dev_priv = dev->dev_private; -+ struct nouveau_crypt_engine *pcrypt = &dev_priv->engine.crypt; -+ -+ if (!pcrypt->registered) { -+ NVOBJ_CLASS(dev, 0x74c1, CRYPT); -+ pcrypt->registered = true; -+ } -+ -+ nv_mask(dev, 0x000200, 0x00004000, 0x00000000); -+ nv_mask(dev, 0x000200, 0x00004000, 0x00004000); -+ nv_wr32(dev, 0x102130, 0xffffffff); -+ nv_wr32(dev, 0x102140, 0xffffffbf); -+ nv_wr32(dev, 0x10200c, 0x00000010); -+ return 0; -+} -+ -+void -+nv84_crypt_fini(struct drm_device *dev) -+{ -+ nv_wr32(dev, 0x102140, 0x00000000); -+} -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nva3_pm.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nva3_pm.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nva3_pm.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nva3_pm.c 2010-10-30 22:24:25.000000000 +0200 -@@ -0,0 +1,95 @@ -+/* -+ * Copyright 2010 Red Hat Inc. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the "Software"), -+ * to deal in the Software without restriction, including without limitation -+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ * and/or sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following conditions: -+ * -+ * The above copyright notice and this permission notice shall be included in -+ * all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR -+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ * -+ * Authors: Ben Skeggs -+ */ -+ -+#include "drmP.h" -+#include "nouveau_drv.h" -+#include "nouveau_bios.h" -+#include "nouveau_pm.h" -+ -+/*XXX: boards using limits 0x40 need fixing, the register layout -+ * is correct here, but, there's some other funny magic -+ * that modifies things, so it's not likely we'll set/read -+ * the correct timings yet.. working on it... -+ */ -+ -+struct nva3_pm_state { -+ struct pll_lims pll; -+ int N, M, P; -+}; -+ -+int -+nva3_pm_clock_get(struct drm_device *dev, u32 id) -+{ -+ struct pll_lims pll; -+ int P, N, M, ret; -+ u32 reg; -+ -+ ret = get_pll_limits(dev, id, &pll); -+ if (ret) -+ return ret; -+ -+ reg = nv_rd32(dev, pll.reg + 4); -+ P = (reg & 0x003f0000) >> 16; -+ N = (reg & 0x0000ff00) >> 8; -+ M = (reg & 0x000000ff); -+ return pll.refclk * N / M / P; -+} -+ -+void * -+nva3_pm_clock_pre(struct drm_device *dev, struct nouveau_pm_level *perflvl, -+ u32 id, int khz) -+{ -+ struct nva3_pm_state *state; -+ int dummy, ret; -+ -+ state = kzalloc(sizeof(*state), GFP_KERNEL); -+ if (!state) -+ return ERR_PTR(-ENOMEM); -+ -+ ret = get_pll_limits(dev, id, &state->pll); -+ if (ret < 0) { -+ kfree(state); -+ return (ret == -ENOENT) ? NULL : ERR_PTR(ret); -+ } -+ -+ ret = nv50_calc_pll2(dev, &state->pll, khz, &state->N, &dummy, -+ &state->M, &state->P); -+ if (ret < 0) { -+ kfree(state); -+ return ERR_PTR(ret); -+ } -+ -+ return state; -+} -+ -+void -+nva3_pm_clock_set(struct drm_device *dev, void *pre_state) -+{ -+ struct nva3_pm_state *state = pre_state; -+ u32 reg = state->pll.reg; -+ -+ nv_wr32(dev, reg + 4, (state->P << 16) | (state->N << 8) | state->M); -+ kfree(state); -+} -+ -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nvc0_fifo.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nvc0_fifo.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nvc0_fifo.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nvc0_fifo.c 2010-10-30 22:24:25.000000000 +0200 -@@ -43,12 +43,6 @@ - } - - bool --nvc0_fifo_cache_flush(struct drm_device *dev) --{ -- return true; --} -- --bool - nvc0_fifo_cache_pull(struct drm_device *dev, bool enable) - { - return false; -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nvc0_instmem.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nvc0_instmem.c ---- linux-2.6.36/drivers/gpu/drm/nouveau/nvc0_instmem.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nvc0_instmem.c 2010-10-30 22:24:25.000000000 +0200 -@@ -28,7 +28,7 @@ - - int - nvc0_instmem_populate(struct drm_device *dev, struct nouveau_gpuobj *gpuobj, -- uint32_t *size) -+ u32 *size, u32 align) - { - int ret; - -@@ -36,8 +36,8 @@ - if (*size == 0) - return -EINVAL; - -- ret = nouveau_bo_new(dev, NULL, *size, 0, TTM_PL_FLAG_VRAM, 0, 0x0000, -- true, false, &gpuobj->im_backing); -+ ret = nouveau_bo_new(dev, NULL, *size, align, TTM_PL_FLAG_VRAM, -+ 0, 0x0000, true, false, &gpuobj->im_backing); - if (ret) { - NV_ERROR(dev, "error getting PRAMIN backing pages: %d\n", ret); - return ret; -@@ -50,8 +50,7 @@ - return ret; - } - -- gpuobj->im_backing_start = gpuobj->im_backing->bo.mem.mm_node->start; -- gpuobj->im_backing_start <<= PAGE_SHIFT; -+ gpuobj->vinst = gpuobj->im_backing->bo.mem.start << PAGE_SHIFT; - return 0; - } - -@@ -84,11 +83,11 @@ - - pte = gpuobj->im_pramin->start >> 12; - pte_end = (gpuobj->im_pramin->size >> 12) + pte; -- vram = gpuobj->im_backing_start; -+ vram = gpuobj->vinst; - - NV_DEBUG(dev, "pramin=0x%lx, pte=%d, pte_end=%d\n", - gpuobj->im_pramin->start, pte, pte_end); -- NV_DEBUG(dev, "first vram page: 0x%08x\n", gpuobj->im_backing_start); -+ NV_DEBUG(dev, "first vram page: 0x%010llx\n", gpuobj->vinst); - - while (pte < pte_end) { - nv_wr32(dev, 0x702000 + (pte * 8), (vram >> 8) | 1); -@@ -134,7 +133,7 @@ - nvc0_instmem_flush(struct drm_device *dev) - { - nv_wr32(dev, 0x070000, 1); -- if (!nv_wait(0x070000, 0x00000002, 0x00000000)) -+ if (!nv_wait(dev, 0x070000, 0x00000002, 0x00000000)) - NV_ERROR(dev, "PRAMIN flush timeout\n"); - } - -@@ -221,10 +220,6 @@ - return -ENOMEM; - } - -- /*XXX: incorrect, but needed to make hash func "work" */ -- dev_priv->ramht_offset = 0x10000; -- dev_priv->ramht_bits = 9; -- dev_priv->ramht_size = (1 << dev_priv->ramht_bits) * 8; - return 0; - } - -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/nvreg.h linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nvreg.h ---- linux-2.6.36/drivers/gpu/drm/nouveau/nvreg.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nvreg.h 2010-10-30 22:24:25.000000000 +0200 -@@ -153,7 +153,8 @@ - #define NV_PCRTC_START 0x00600800 - #define NV_PCRTC_CONFIG 0x00600804 - # define NV_PCRTC_CONFIG_START_ADDRESS_NON_VGA (1 << 0) --# define NV_PCRTC_CONFIG_START_ADDRESS_HSYNC (2 << 0) -+# define NV04_PCRTC_CONFIG_START_ADDRESS_HSYNC (4 << 0) -+# define NV10_PCRTC_CONFIG_START_ADDRESS_HSYNC (2 << 0) - #define NV_PCRTC_CURSOR_CONFIG 0x00600810 - # define NV_PCRTC_CURSOR_CONFIG_ENABLE_ENABLE (1 << 0) - # define NV_PCRTC_CURSOR_CONFIG_DOUBLE_SCAN_ENABLE (1 << 4) -@@ -263,6 +264,7 @@ - # define NV_CIO_CRE_HCUR_ADDR1_ADR 7:2 - # define NV_CIO_CRE_LCD__INDEX 0x33 - # define NV_CIO_CRE_LCD_LCD_SELECT 0:0 -+# define NV_CIO_CRE_LCD_ROUTE_MASK 0x3b - # define NV_CIO_CRE_DDC0_STATUS__INDEX 0x36 - # define NV_CIO_CRE_DDC0_WR__INDEX 0x37 - # define NV_CIO_CRE_ILACE__INDEX 0x39 /* interlace */ -diff -Naur linux-2.6.36/drivers/gpu/drm/radeon/radeon_object.c linux-2.6.36.nouveau/drivers/gpu/drm/radeon/radeon_object.c ---- linux-2.6.36/drivers/gpu/drm/radeon/radeon_object.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/radeon/radeon_object.c 2010-10-30 22:24:25.000000000 +0200 -@@ -435,7 +435,7 @@ - - out: - radeon_set_surface_reg(rdev, i, bo->tiling_flags, bo->pitch, -- bo->tbo.mem.mm_node->start << PAGE_SHIFT, -+ bo->tbo.mem.start << PAGE_SHIFT, - bo->tbo.num_pages << PAGE_SHIFT); - return 0; - } -@@ -532,7 +532,7 @@ - rdev = rbo->rdev; - if (bo->mem.mem_type == TTM_PL_VRAM) { - size = bo->mem.num_pages << PAGE_SHIFT; -- offset = bo->mem.mm_node->start << PAGE_SHIFT; -+ offset = bo->mem.start << PAGE_SHIFT; - if ((offset + size) > rdev->mc.visible_vram_size) { - /* hurrah the memory is not visible ! */ - radeon_ttm_placement_from_domain(rbo, RADEON_GEM_DOMAIN_VRAM); -@@ -540,7 +540,7 @@ - r = ttm_bo_validate(bo, &rbo->placement, false, true, false); - if (unlikely(r != 0)) - return r; -- offset = bo->mem.mm_node->start << PAGE_SHIFT; -+ offset = bo->mem.start << PAGE_SHIFT; - /* this should not happen */ - if ((offset + size) > rdev->mc.visible_vram_size) - return -EINVAL; -diff -Naur linux-2.6.36/drivers/gpu/drm/radeon/radeon_ttm.c linux-2.6.36.nouveau/drivers/gpu/drm/radeon/radeon_ttm.c ---- linux-2.6.36/drivers/gpu/drm/radeon/radeon_ttm.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/radeon/radeon_ttm.c 2010-10-30 22:24:25.000000000 +0200 -@@ -152,6 +152,7 @@ - man->default_caching = TTM_PL_FLAG_CACHED; - break; - case TTM_PL_TT: -+ man->func = &ttm_bo_manager_func; - man->gpu_offset = rdev->mc.gtt_start; - man->available_caching = TTM_PL_MASK_CACHING; - man->default_caching = TTM_PL_FLAG_CACHED; -@@ -173,6 +174,7 @@ - break; - case TTM_PL_VRAM: - /* "On-card" video ram */ -+ man->func = &ttm_bo_manager_func; - man->gpu_offset = rdev->mc.vram_start; - man->flags = TTM_MEMTYPE_FLAG_FIXED | - TTM_MEMTYPE_FLAG_MAPPABLE; -@@ -246,8 +248,8 @@ - if (unlikely(r)) { - return r; - } -- old_start = old_mem->mm_node->start << PAGE_SHIFT; -- new_start = new_mem->mm_node->start << PAGE_SHIFT; -+ old_start = old_mem->start << PAGE_SHIFT; -+ new_start = new_mem->start << PAGE_SHIFT; - - switch (old_mem->mem_type) { - case TTM_PL_VRAM: -@@ -326,14 +328,7 @@ - } - r = ttm_bo_move_ttm(bo, true, no_wait_reserve, no_wait_gpu, new_mem); - out_cleanup: -- if (tmp_mem.mm_node) { -- struct ttm_bo_global *glob = rdev->mman.bdev.glob; -- -- spin_lock(&glob->lru_lock); -- drm_mm_put_block(tmp_mem.mm_node); -- spin_unlock(&glob->lru_lock); -- return r; -- } -+ ttm_bo_mem_put(bo, &tmp_mem); - return r; - } - -@@ -372,14 +367,7 @@ - goto out_cleanup; - } - out_cleanup: -- if (tmp_mem.mm_node) { -- struct ttm_bo_global *glob = rdev->mman.bdev.glob; -- -- spin_lock(&glob->lru_lock); -- drm_mm_put_block(tmp_mem.mm_node); -- spin_unlock(&glob->lru_lock); -- return r; -- } -+ ttm_bo_mem_put(bo, &tmp_mem); - return r; - } - -@@ -449,14 +437,14 @@ - #if __OS_HAS_AGP - if (rdev->flags & RADEON_IS_AGP) { - /* RADEON_IS_AGP is set only if AGP is active */ -- mem->bus.offset = mem->mm_node->start << PAGE_SHIFT; -+ mem->bus.offset = mem->start << PAGE_SHIFT; - mem->bus.base = rdev->mc.agp_base; - mem->bus.is_iomem = !rdev->ddev->agp->cant_use_aperture; - } - #endif - break; - case TTM_PL_VRAM: -- mem->bus.offset = mem->mm_node->start << PAGE_SHIFT; -+ mem->bus.offset = mem->start << PAGE_SHIFT; - /* check if it's visible */ - if ((mem->bus.offset + mem->bus.size) > rdev->mc.visible_vram_size) - return -EINVAL; -@@ -699,7 +687,7 @@ - int r; - - gtt = container_of(backend, struct radeon_ttm_backend, backend); -- gtt->offset = bo_mem->mm_node->start << PAGE_SHIFT; -+ gtt->offset = bo_mem->start << PAGE_SHIFT; - if (!gtt->num_pages) { - WARN(1, "nothing to bind %lu pages for mreg %p back %p!\n", gtt->num_pages, bo_mem, backend); - } -@@ -798,9 +786,9 @@ - radeon_mem_types_list[i].show = &radeon_mm_dump_table; - radeon_mem_types_list[i].driver_features = 0; - if (i == 0) -- radeon_mem_types_list[i].data = &rdev->mman.bdev.man[TTM_PL_VRAM].manager; -+ radeon_mem_types_list[i].data = &rdev->mman.bdev.man[TTM_PL_VRAM].priv; - else -- radeon_mem_types_list[i].data = &rdev->mman.bdev.man[TTM_PL_TT].manager; -+ radeon_mem_types_list[i].data = &rdev->mman.bdev.man[TTM_PL_TT].priv; - - } - /* Add ttm page pool to debugfs */ -diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/Makefile linux-2.6.36.nouveau/drivers/gpu/drm/ttm/Makefile ---- linux-2.6.36/drivers/gpu/drm/ttm/Makefile 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/ttm/Makefile 2010-10-30 22:24:25.000000000 +0200 -@@ -4,6 +4,7 @@ - ccflags-y := -Iinclude/drm - ttm-y := ttm_agp_backend.o ttm_memory.o ttm_tt.o ttm_bo.o \ - ttm_bo_util.o ttm_bo_vm.o ttm_module.o \ -- ttm_object.o ttm_lock.o ttm_execbuf_util.o ttm_page_alloc.o -+ ttm_object.o ttm_lock.o ttm_execbuf_util.o ttm_page_alloc.o \ -+ ttm_bo_manager.o - - obj-$(CONFIG_DRM_TTM) += ttm.o -diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_agp_backend.c linux-2.6.36.nouveau/drivers/gpu/drm/ttm/ttm_agp_backend.c ---- linux-2.6.36/drivers/gpu/drm/ttm/ttm_agp_backend.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/ttm/ttm_agp_backend.c 2010-10-30 22:24:25.000000000 +0200 -@@ -74,6 +74,7 @@ - { - struct ttm_agp_backend *agp_be = - container_of(backend, struct ttm_agp_backend, backend); -+ struct drm_mm_node *node = bo_mem->mm_node; - struct agp_memory *mem = agp_be->mem; - int cached = (bo_mem->placement & TTM_PL_FLAG_CACHED); - int ret; -@@ -81,7 +82,7 @@ - mem->is_flushed = 1; - mem->type = (cached) ? AGP_USER_CACHED_MEMORY : AGP_USER_MEMORY; - -- ret = agp_bind_memory(mem, bo_mem->mm_node->start); -+ ret = agp_bind_memory(mem, node->start); - if (ret) - printk(KERN_ERR TTM_PFX "AGP Bind memory failed.\n"); - -diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo.c linux-2.6.36.nouveau/drivers/gpu/drm/ttm/ttm_bo.c ---- linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/ttm/ttm_bo.c 2010-10-30 22:24:25.000000000 +0200 -@@ -84,11 +84,8 @@ - man->available_caching); - printk(KERN_ERR TTM_PFX " default_caching: 0x%08X\n", - man->default_caching); -- if (mem_type != TTM_PL_SYSTEM) { -- spin_lock(&bdev->glob->lru_lock); -- drm_mm_debug_table(&man->manager, TTM_PFX); -- spin_unlock(&bdev->glob->lru_lock); -- } -+ if (mem_type != TTM_PL_SYSTEM) -+ (*man->func->debug)(man, TTM_PFX); - } - - static void ttm_bo_mem_space_debug(struct ttm_buffer_object *bo, -@@ -421,7 +418,7 @@ - - if (bo->mem.mm_node) { - spin_lock(&bo->lock); -- bo->offset = (bo->mem.mm_node->start << PAGE_SHIFT) + -+ bo->offset = (bo->mem.start << PAGE_SHIFT) + - bdev->man[bo->mem.mem_type].gpu_offset; - bo->cur_placement = bo->mem.placement; - spin_unlock(&bo->lock); -@@ -452,6 +449,7 @@ - static void ttm_bo_cleanup_memtype_use(struct ttm_buffer_object *bo) - { - struct ttm_bo_global *glob = bo->glob; -+ struct ttm_mem_reg tmp_mem; - - if (bo->ttm) { - -@@ -467,14 +465,14 @@ - spin_lock(&glob->lru_lock); - } - -- if (bo->mem.mm_node) { -- drm_mm_put_block(bo->mem.mm_node); -- bo->mem.mm_node = NULL; -- } -+ tmp_mem = bo->mem; -+ bo->mem.mm_node = NULL; - - atomic_set(&bo->reserved, 0); - wake_up_all(&bo->event_queue); - spin_unlock(&glob->lru_lock); -+ -+ ttm_bo_mem_put(bo, &tmp_mem); - } - - -@@ -680,7 +678,6 @@ - bool no_wait_reserve, bool no_wait_gpu) - { - struct ttm_bo_device *bdev = bo->bdev; -- struct ttm_bo_global *glob = bo->glob; - struct ttm_mem_reg evict_mem; - struct ttm_placement placement; - int ret = 0; -@@ -726,12 +723,7 @@ - if (ret) { - if (ret != -ERESTARTSYS) - printk(KERN_ERR TTM_PFX "Buffer eviction failed\n"); -- spin_lock(&glob->lru_lock); -- if (evict_mem.mm_node) { -- drm_mm_put_block(evict_mem.mm_node); -- evict_mem.mm_node = NULL; -- } -- spin_unlock(&glob->lru_lock); -+ ttm_bo_mem_put(bo, &evict_mem); - goto out; - } - bo->evicted = true; -@@ -792,41 +784,14 @@ - return ret; - } - --static int ttm_bo_man_get_node(struct ttm_buffer_object *bo, -- struct ttm_mem_type_manager *man, -- struct ttm_placement *placement, -- struct ttm_mem_reg *mem, -- struct drm_mm_node **node) -+void ttm_bo_mem_put(struct ttm_buffer_object *bo, struct ttm_mem_reg *mem) - { -- struct ttm_bo_global *glob = bo->glob; -- unsigned long lpfn; -- int ret; -- -- lpfn = placement->lpfn; -- if (!lpfn) -- lpfn = man->size; -- *node = NULL; -- do { -- ret = drm_mm_pre_get(&man->manager); -- if (unlikely(ret)) -- return ret; -+ struct ttm_mem_type_manager *man = &bo->bdev->man[mem->mem_type]; - -- spin_lock(&glob->lru_lock); -- *node = drm_mm_search_free_in_range(&man->manager, -- mem->num_pages, mem->page_alignment, -- placement->fpfn, lpfn, 1); -- if (unlikely(*node == NULL)) { -- spin_unlock(&glob->lru_lock); -- return 0; -- } -- *node = drm_mm_get_block_atomic_range(*node, mem->num_pages, -- mem->page_alignment, -- placement->fpfn, -- lpfn); -- spin_unlock(&glob->lru_lock); -- } while (*node == NULL); -- return 0; -+ if (mem->mm_node) -+ (*man->func->put_node)(man, mem); - } -+EXPORT_SYMBOL(ttm_bo_mem_put); - - /** - * Repeatedly evict memory from the LRU for @mem_type until we create enough -@@ -843,14 +808,13 @@ - struct ttm_bo_device *bdev = bo->bdev; - struct ttm_bo_global *glob = bdev->glob; - struct ttm_mem_type_manager *man = &bdev->man[mem_type]; -- struct drm_mm_node *node; - int ret; - - do { -- ret = ttm_bo_man_get_node(bo, man, placement, mem, &node); -+ ret = (*man->func->get_node)(man, bo, placement, mem); - if (unlikely(ret != 0)) - return ret; -- if (node) -+ if (mem->mm_node) - break; - spin_lock(&glob->lru_lock); - if (list_empty(&man->lru)) { -@@ -863,9 +827,8 @@ - if (unlikely(ret != 0)) - return ret; - } while (1); -- if (node == NULL) -+ if (mem->mm_node == NULL) - return -ENOMEM; -- mem->mm_node = node; - mem->mem_type = mem_type; - return 0; - } -@@ -939,7 +902,6 @@ - bool type_found = false; - bool type_ok = false; - bool has_erestartsys = false; -- struct drm_mm_node *node = NULL; - int i, ret; - - mem->mm_node = NULL; -@@ -973,17 +935,15 @@ - - if (man->has_type && man->use_type) { - type_found = true; -- ret = ttm_bo_man_get_node(bo, man, placement, mem, -- &node); -+ ret = (*man->func->get_node)(man, bo, placement, mem); - if (unlikely(ret)) - return ret; - } -- if (node) -+ if (mem->mm_node) - break; - } - -- if ((type_ok && (mem_type == TTM_PL_SYSTEM)) || node) { -- mem->mm_node = node; -+ if ((type_ok && (mem_type == TTM_PL_SYSTEM)) || mem->mm_node) { - mem->mem_type = mem_type; - mem->placement = cur_flags; - return 0; -@@ -1053,7 +1013,6 @@ - bool interruptible, bool no_wait_reserve, - bool no_wait_gpu) - { -- struct ttm_bo_global *glob = bo->glob; - int ret = 0; - struct ttm_mem_reg mem; - -@@ -1081,11 +1040,8 @@ - goto out_unlock; - ret = ttm_bo_handle_move_mem(bo, &mem, false, interruptible, no_wait_reserve, no_wait_gpu); - out_unlock: -- if (ret && mem.mm_node) { -- spin_lock(&glob->lru_lock); -- drm_mm_put_block(mem.mm_node); -- spin_unlock(&glob->lru_lock); -- } -+ if (ret && mem.mm_node) -+ ttm_bo_mem_put(bo, &mem); - return ret; - } - -@@ -1093,11 +1049,10 @@ - struct ttm_mem_reg *mem) - { - int i; -- struct drm_mm_node *node = mem->mm_node; - -- if (node && placement->lpfn != 0 && -- (node->start < placement->fpfn || -- node->start + node->size > placement->lpfn)) -+ if (mem->mm_node && placement->lpfn != 0 && -+ (mem->start < placement->fpfn || -+ mem->start + mem->num_pages > placement->lpfn)) - return -1; - - for (i = 0; i < placement->num_placement; i++) { -@@ -1341,7 +1296,6 @@ - - int ttm_bo_clean_mm(struct ttm_bo_device *bdev, unsigned mem_type) - { -- struct ttm_bo_global *glob = bdev->glob; - struct ttm_mem_type_manager *man; - int ret = -EINVAL; - -@@ -1364,13 +1318,7 @@ - if (mem_type > 0) { - ttm_bo_force_list_clean(bdev, mem_type, false); - -- spin_lock(&glob->lru_lock); -- if (drm_mm_clean(&man->manager)) -- drm_mm_takedown(&man->manager); -- else -- ret = -EBUSY; -- -- spin_unlock(&glob->lru_lock); -+ ret = (*man->func->takedown)(man); - } - - return ret; -@@ -1421,6 +1369,7 @@ - ret = bdev->driver->init_mem_type(bdev, type, man); - if (ret) - return ret; -+ man->bdev = bdev; - - ret = 0; - if (type != TTM_PL_SYSTEM) { -@@ -1430,7 +1379,8 @@ - type); - return ret; - } -- ret = drm_mm_init(&man->manager, 0, p_size); -+ -+ ret = (*man->func->init)(man, p_size); - if (ret) - return ret; - } -diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo_manager.c linux-2.6.36.nouveau/drivers/gpu/drm/ttm/ttm_bo_manager.c ---- linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo_manager.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/ttm/ttm_bo_manager.c 2010-10-30 22:24:25.000000000 +0200 -@@ -0,0 +1,148 @@ -+/************************************************************************** -+ * -+ * Copyright (c) 2007-2009 VMware, Inc., Palo Alto, CA., USA -+ * All Rights Reserved. -+ * -+ * Permission is hereby granted, free of charge, to any person obtaining a -+ * copy of this software and associated documentation files (the -+ * "Software"), to deal in the Software without restriction, including -+ * without limitation the rights to use, copy, modify, merge, publish, -+ * distribute, sub license, and/or sell copies of the Software, and to -+ * permit persons to whom the Software is furnished to do so, subject to -+ * the following conditions: -+ * -+ * The above copyright notice and this permission notice (including the -+ * next paragraph) shall be included in all copies or substantial portions -+ * of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -+ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, -+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -+ * USE OR OTHER DEALINGS IN THE SOFTWARE. -+ * -+ **************************************************************************/ -+/* -+ * Authors: Thomas Hellstrom -+ */ -+ -+#include "ttm/ttm_module.h" -+#include "ttm/ttm_bo_driver.h" -+#include "ttm/ttm_placement.h" -+#include -+#include -+#include -+#include -+#include -+#include -+ -+static int ttm_bo_man_get_node(struct ttm_mem_type_manager *man, -+ struct ttm_buffer_object *bo, -+ struct ttm_placement *placement, -+ struct ttm_mem_reg *mem) -+{ -+ struct ttm_bo_global *glob = man->bdev->glob; -+ struct drm_mm *mm = man->priv; -+ struct drm_mm_node *node = NULL; -+ unsigned long lpfn; -+ int ret; -+ -+ lpfn = placement->lpfn; -+ if (!lpfn) -+ lpfn = man->size; -+ do { -+ ret = drm_mm_pre_get(mm); -+ if (unlikely(ret)) -+ return ret; -+ -+ spin_lock(&glob->lru_lock); -+ node = drm_mm_search_free_in_range(mm, -+ mem->num_pages, mem->page_alignment, -+ placement->fpfn, lpfn, 1); -+ if (unlikely(node == NULL)) { -+ spin_unlock(&glob->lru_lock); -+ return 0; -+ } -+ node = drm_mm_get_block_atomic_range(node, mem->num_pages, -+ mem->page_alignment, -+ placement->fpfn, -+ lpfn); -+ spin_unlock(&glob->lru_lock); -+ } while (node == NULL); -+ -+ mem->mm_node = node; -+ mem->start = node->start; -+ return 0; -+} -+ -+static void ttm_bo_man_put_node(struct ttm_mem_type_manager *man, -+ struct ttm_mem_reg *mem) -+{ -+ struct ttm_bo_global *glob = man->bdev->glob; -+ -+ if (mem->mm_node) { -+ spin_lock(&glob->lru_lock); -+ drm_mm_put_block(mem->mm_node); -+ spin_unlock(&glob->lru_lock); -+ mem->mm_node = NULL; -+ } -+} -+ -+static int ttm_bo_man_init(struct ttm_mem_type_manager *man, -+ unsigned long p_size) -+{ -+ struct drm_mm *mm; -+ int ret; -+ -+ mm = kzalloc(sizeof(*mm), GFP_KERNEL); -+ if (!mm) -+ return -ENOMEM; -+ -+ ret = drm_mm_init(mm, 0, p_size); -+ if (ret) { -+ kfree(mm); -+ return ret; -+ } -+ -+ man->priv = mm; -+ return 0; -+} -+ -+static int ttm_bo_man_takedown(struct ttm_mem_type_manager *man) -+{ -+ struct ttm_bo_global *glob = man->bdev->glob; -+ struct drm_mm *mm = man->priv; -+ int ret = 0; -+ -+ spin_lock(&glob->lru_lock); -+ if (drm_mm_clean(mm)) { -+ drm_mm_takedown(mm); -+ kfree(mm); -+ man->priv = NULL; -+ } else -+ ret = -EBUSY; -+ spin_unlock(&glob->lru_lock); -+ return ret; -+} -+ -+static void ttm_bo_man_debug(struct ttm_mem_type_manager *man, -+ const char *prefix) -+{ -+ struct ttm_bo_global *glob = man->bdev->glob; -+ struct drm_mm *mm = man->priv; -+ -+ spin_lock(&glob->lru_lock); -+ drm_mm_debug_table(mm, prefix); -+ spin_unlock(&glob->lru_lock); -+} -+ -+const struct ttm_mem_type_manager_func ttm_bo_manager_func = { -+ ttm_bo_man_init, -+ ttm_bo_man_takedown, -+ ttm_bo_man_get_node, -+ ttm_bo_man_put_node, -+ ttm_bo_man_debug -+}; -+EXPORT_SYMBOL(ttm_bo_manager_func); -diff -Naur linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo_util.c linux-2.6.36.nouveau/drivers/gpu/drm/ttm/ttm_bo_util.c ---- linux-2.6.36/drivers/gpu/drm/ttm/ttm_bo_util.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/ttm/ttm_bo_util.c 2010-10-30 22:24:25.000000000 +0200 -@@ -39,14 +39,7 @@ - - void ttm_bo_free_old_node(struct ttm_buffer_object *bo) - { -- struct ttm_mem_reg *old_mem = &bo->mem; -- -- if (old_mem->mm_node) { -- spin_lock(&bo->glob->lru_lock); -- drm_mm_put_block(old_mem->mm_node); -- spin_unlock(&bo->glob->lru_lock); -- } -- old_mem->mm_node = NULL; -+ ttm_bo_mem_put(bo, &bo->mem); - } - - int ttm_bo_move_ttm(struct ttm_buffer_object *bo, -@@ -263,8 +256,7 @@ - dir = 1; - - if ((old_mem->mem_type == new_mem->mem_type) && -- (new_mem->mm_node->start < -- old_mem->mm_node->start + old_mem->mm_node->size)) { -+ (new_mem->start < old_mem->start + old_mem->size)) { - dir = -1; - add = new_mem->num_pages - 1; - } -diff -Naur linux-2.6.36/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c linux-2.6.36.nouveau/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c ---- linux-2.6.36/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c 2010-10-30 22:24:25.000000000 +0200 -@@ -147,6 +147,7 @@ - break; - case TTM_PL_VRAM: - /* "On-card" video ram */ -+ man->func = &ttm_bo_manager_func; - man->gpu_offset = 0; - man->flags = TTM_MEMTYPE_FLAG_FIXED | TTM_MEMTYPE_FLAG_MAPPABLE; - man->available_caching = TTM_PL_MASK_CACHING; -@@ -203,7 +204,7 @@ - /* System memory */ - return 0; - case TTM_PL_VRAM: -- mem->bus.offset = mem->mm_node->start << PAGE_SHIFT; -+ mem->bus.offset = mem->start << PAGE_SHIFT; - mem->bus.base = dev_priv->vram_start; - mem->bus.is_iomem = true; - break; -diff -Naur linux-2.6.36/include/drm/nouveau_drm.h linux-2.6.36.nouveau/include/drm/nouveau_drm.h ---- linux-2.6.36/include/drm/nouveau_drm.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/include/drm/nouveau_drm.h 2010-10-30 22:24:25.000000000 +0200 -@@ -80,6 +80,8 @@ - #define NOUVEAU_GETPARAM_VM_VRAM_BASE 12 - #define NOUVEAU_GETPARAM_GRAPH_UNITS 13 - #define NOUVEAU_GETPARAM_PTIMER_TIME 14 -+#define NOUVEAU_GETPARAM_HAS_BO_USAGE 15 -+#define NOUVEAU_GETPARAM_HAS_PAGEFLIP 16 - struct drm_nouveau_getparam { - uint64_t param; - uint64_t value; -@@ -95,6 +97,12 @@ - #define NOUVEAU_GEM_DOMAIN_GART (1 << 2) - #define NOUVEAU_GEM_DOMAIN_MAPPABLE (1 << 3) - -+#define NOUVEAU_GEM_TILE_LAYOUT_MASK 0x0000ff00 -+#define NOUVEAU_GEM_TILE_16BPP 0x00000001 -+#define NOUVEAU_GEM_TILE_32BPP 0x00000002 -+#define NOUVEAU_GEM_TILE_ZETA 0x00000004 -+#define NOUVEAU_GEM_TILE_NONCONTIG 0x00000008 -+ - struct drm_nouveau_gem_info { - uint32_t handle; - uint32_t domain; -@@ -164,7 +172,6 @@ - }; - - #define NOUVEAU_GEM_CPU_PREP_NOWAIT 0x00000001 --#define NOUVEAU_GEM_CPU_PREP_NOBLOCK 0x00000002 - #define NOUVEAU_GEM_CPU_PREP_WRITE 0x00000004 - struct drm_nouveau_gem_cpu_prep { - uint32_t handle; -diff -Naur linux-2.6.36/include/drm/ttm/ttm_bo_api.h linux-2.6.36.nouveau/include/drm/ttm/ttm_bo_api.h ---- linux-2.6.36/include/drm/ttm/ttm_bo_api.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/include/drm/ttm/ttm_bo_api.h 2010-10-30 22:24:25.000000000 +0200 -@@ -102,7 +102,8 @@ - */ - - struct ttm_mem_reg { -- struct drm_mm_node *mm_node; -+ void *mm_node; -+ unsigned long start; - unsigned long size; - unsigned long num_pages; - uint32_t page_alignment; -diff -Naur linux-2.6.36/include/drm/ttm/ttm_bo_driver.h linux-2.6.36.nouveau/include/drm/ttm/ttm_bo_driver.h ---- linux-2.6.36/include/drm/ttm/ttm_bo_driver.h 2010-10-20 22:30:22.000000000 +0200 -+++ linux-2.6.36.nouveau/include/drm/ttm/ttm_bo_driver.h 2010-10-30 22:24:25.000000000 +0200 -@@ -203,7 +203,22 @@ - * It's set up by the ttm_bo_driver::init_mem_type method. - */ - -+struct ttm_mem_type_manager; -+ -+struct ttm_mem_type_manager_func { -+ int (*init)(struct ttm_mem_type_manager *man, unsigned long p_size); -+ int (*takedown)(struct ttm_mem_type_manager *man); -+ int (*get_node)(struct ttm_mem_type_manager *man, -+ struct ttm_buffer_object *bo, -+ struct ttm_placement *placement, -+ struct ttm_mem_reg *mem); -+ void (*put_node)(struct ttm_mem_type_manager *man, -+ struct ttm_mem_reg *mem); -+ void (*debug)(struct ttm_mem_type_manager *man, const char *prefix); -+}; -+ - struct ttm_mem_type_manager { -+ struct ttm_bo_device *bdev; - - /* - * No protection. Constant from start. -@@ -222,8 +237,8 @@ - * TODO: Consider one lru_lock per ttm_mem_type_manager. - * Plays ill with list removal, though. - */ -- -- struct drm_mm manager; -+ const struct ttm_mem_type_manager_func *func; -+ void *priv; - struct list_head lru; - }; - -@@ -649,6 +664,10 @@ - struct ttm_mem_reg *mem, - bool interruptible, - bool no_wait_reserve, bool no_wait_gpu); -+ -+extern void ttm_bo_mem_put(struct ttm_buffer_object *bo, -+ struct ttm_mem_reg *mem); -+ - /** - * ttm_bo_wait_for_cpu - * -@@ -891,6 +910,8 @@ - */ - extern pgprot_t ttm_io_prot(uint32_t caching_flags, pgprot_t tmp); - -+extern const struct ttm_mem_type_manager_func ttm_bo_manager_func; -+ - #if (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE))) - #define TTM_HAS_AGP - #include diff --git a/packages/linux/patches/111-linux-2.6.36-drm_nouveau_revert_nv40_pcie_gart_size-0.1.diff b/packages/linux/patches/111-linux-2.6.36-drm_nouveau_revert_nv40_pcie_gart_size-0.1.diff deleted file mode 100644 index 5eea0b7b1b..0000000000 --- a/packages/linux/patches/111-linux-2.6.36-drm_nouveau_revert_nv40_pcie_gart_size-0.1.diff +++ /dev/null @@ -1,16 +0,0 @@ -diff -Naur linux-2.6.36.orig/drivers/gpu/drm/nouveau/nouveau_sgdma.c linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_sgdma.c ---- linux-2.6.36.orig/drivers/gpu/drm/nouveau/nouveau_sgdma.c 2010-10-23 16:00:10.512365461 +0200 -+++ linux-2.6.36.nouveau/drivers/gpu/drm/nouveau/nouveau_sgdma.c 2010-10-23 15:57:19.079304241 +0200 -@@ -224,11 +224,7 @@ - int i, ret; - - if (dev_priv->card_type < NV_50) { -- if(dev_priv->card_type < NV_40) { -- aper_size = (64 * 1024 * 1024); -- } else { -- aper_size = (512 * 1024 * 1024); -- } -+ aper_size = (64 * 1024 * 1024); - obj_size = (aper_size >> NV_CTXDMA_PAGE_SHIFT) * 4; - obj_size += 8; /* ctxdma header */ - } else { diff --git a/packages/linux/patches/112-linux-2.6.36-drm_noveau_dont_select_ACPI_VIDEO-0.1.diff b/packages/linux/patches/112-linux-2.6.36-drm_noveau_dont_select_ACPI_VIDEO-0.1.diff deleted file mode 100644 index 9838c136d4..0000000000 --- a/packages/linux/patches/112-linux-2.6.36-drm_noveau_dont_select_ACPI_VIDEO-0.1.diff +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naur linux-2.6.36/drivers/gpu/drm/nouveau/Kconfig linux-2.6.36.patch/drivers/gpu/drm/nouveau/Kconfig ---- linux-2.6.36/drivers/gpu/drm/nouveau/Kconfig 2010-10-24 04:19:00.872718004 +0200 -+++ linux-2.6.36.patch/drivers/gpu/drm/nouveau/Kconfig 2010-10-24 04:19:42.287230715 +0200 -@@ -10,7 +10,6 @@ - select FB - select FRAMEBUFFER_CONSOLE if !EMBEDDED - select FB_BACKLIGHT if DRM_NOUVEAU_BACKLIGHT -- select ACPI_VIDEO if ACPI - help - Choose this option for open-source nVidia support. - diff --git a/packages/linux/patches/000_crosscompile.diff b/packages/linux/patches/linux-2.6.36-000_crosscompile.patch similarity index 100% rename from packages/linux/patches/000_crosscompile.diff rename to packages/linux/patches/linux-2.6.36-000_crosscompile.patch diff --git a/packages/linux/patches/002-bash-only-feature.diff b/packages/linux/patches/linux-2.6.36-002_bash_only_feature.patch similarity index 100% rename from packages/linux/patches/002-bash-only-feature.diff rename to packages/linux/patches/linux-2.6.36-002_bash_only_feature.patch diff --git a/packages/linux/patches/003-no_dev_console.diff b/packages/linux/patches/linux-2.6.36-003-no_dev_console.patch similarity index 100% rename from packages/linux/patches/003-no_dev_console.diff rename to packages/linux/patches/linux-2.6.36-003-no_dev_console.patch diff --git a/packages/linux/patches/004-lower-undefined-mode-timeout.diff b/packages/linux/patches/linux-2.6.36-004_lower_undefined_mode_timeout.patch similarity index 100% rename from packages/linux/patches/004-lower-undefined-mode-timeout.diff rename to packages/linux/patches/linux-2.6.36-004_lower_undefined_mode_timeout.patch diff --git a/packages/linux/patches/005-kconfig-no-timestamp.diff b/packages/linux/patches/linux-2.6.36-005_kconfig_no_timestamp.patch similarity index 100% rename from packages/linux/patches/005-kconfig-no-timestamp.diff rename to packages/linux/patches/linux-2.6.36-005_kconfig_no_timestamp.patch diff --git a/packages/linux/patches/006-enable-utf8.diff b/packages/linux/patches/linux-2.6.36-006_enable_utf8.patch similarity index 100% rename from packages/linux/patches/006-enable-utf8.diff rename to packages/linux/patches/linux-2.6.36-006_enable_utf8.patch diff --git a/packages/linux/patches/007-die-floppy-die.diff b/packages/linux/patches/linux-2.6.36-007_die_floppy_die.patch similarity index 100% rename from packages/linux/patches/007-die-floppy-die.diff rename to packages/linux/patches/linux-2.6.36-007_die_floppy_die.patch diff --git a/packages/linux/patches/008-hda_intel-prealloc-4mb-dmabuffer.diff b/packages/linux/patches/linux-2.6.36-008-hda_intel_prealloc_4mb_dmabuffer.patch similarity index 100% rename from packages/linux/patches/008-hda_intel-prealloc-4mb-dmabuffer.diff rename to packages/linux/patches/linux-2.6.36-008-hda_intel_prealloc_4mb_dmabuffer.patch diff --git a/packages/linux/patches/009-disable-i8042-check-on-apple-mac.diff b/packages/linux/patches/linux-2.6.36-009_disable_i8042_check_on_apple_mac.patch similarity index 100% rename from packages/linux/patches/009-disable-i8042-check-on-apple-mac.diff rename to packages/linux/patches/linux-2.6.36-009_disable_i8042_check_on_apple_mac.patch diff --git a/packages/linux/patches/050-add-appleir-usb-driver.diff b/packages/linux/patches/linux-2.6.36-050_add_appleir_usb_driver.patch similarity index 100% rename from packages/linux/patches/050-add-appleir-usb-driver.diff rename to packages/linux/patches/linux-2.6.36-050_add_appleir_usb_driver.patch diff --git a/packages/linux/patches/051-linux-2.6.36-add_nuvoton_cir-0.2.diff b/packages/linux/patches/linux-2.6.36-051-add_nuvoton_cir-0.2.patch similarity index 100% rename from packages/linux/patches/051-linux-2.6.36-add_nuvoton_cir-0.2.diff rename to packages/linux/patches/linux-2.6.36-051-add_nuvoton_cir-0.2.patch diff --git a/packages/linux/patches/052-linux-2.6.36-aureal_remote_quirk-0.1.diff b/packages/linux/patches/linux-2.6.36-052-aureal_remote_quirk-0.1.patch similarity index 100% rename from packages/linux/patches/052-linux-2.6.36-aureal_remote_quirk-0.1.diff rename to packages/linux/patches/linux-2.6.36-052-aureal_remote_quirk-0.1.patch diff --git a/packages/linux/patches/linux-2.6.36-201-drm_vmware_revert_abb295f3b3db602f91accf58b526b30b48673af1.patch b/packages/linux/patches/linux-2.6.36-201-drm_vmware_revert_abb295f3b3db602f91accf58b526b30b48673af1.patch new file mode 100644 index 0000000000..7707c6144c --- /dev/null +++ b/packages/linux/patches/linux-2.6.36-201-drm_vmware_revert_abb295f3b3db602f91accf58b526b30b48673af1.patch @@ -0,0 +1,15 @@ +diff -Naur linux-2.6.36/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c linux-2.6.36.patch/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c +--- linux-2.6.36/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c 2010-10-20 22:30:22.000000000 +0200 ++++ linux-2.6.36.patch/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c 2010-11-09 00:40:07.000000000 +0100 +@@ -615,11 +615,6 @@ + if (unlikely(ret != 0)) + goto err_unlock; + +- if (bo->mem.mem_type == TTM_PL_VRAM && +- bo->mem.mm_node->start < bo->num_pages) +- (void) ttm_bo_validate(bo, &vmw_sys_placement, false, +- false, false); +- + ret = ttm_bo_validate(bo, &ne_placement, false, false, false); + + /* Could probably bug on */ diff --git a/packages/linux/patches/linux-2.6.37-rc3-000_crosscompile.patch b/packages/linux/patches/linux-2.6.37-rc3-000_crosscompile.patch new file mode 100644 index 0000000000..b4fc575828 --- /dev/null +++ b/packages/linux/patches/linux-2.6.37-rc3-000_crosscompile.patch @@ -0,0 +1,22 @@ +--- linux-2.6.24-rc2.orig/arch/x86/boot/tools/build.c 2007-10-06 12:26:14.000000000 +0200 ++++ linux-2.6.24-rc2/arch/x86/boot/tools/build.c 2007-10-06 12:27:36.000000000 +0200 +@@ -29,7 +29,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -42,6 +41,11 @@ + #define DEFAULT_MAJOR_ROOT 0 + #define DEFAULT_MINOR_ROOT 0 + ++#undef major ++#define major(dev) ((int)(((dev) >> 8) & 0xff)) ++#undef minor ++#define minor(dev) ((int)((dev) & 0xff)) ++ + /* Minimal number of setup sectors */ + #define SETUP_SECT_MIN 5 + #define SETUP_SECT_MAX 64 diff --git a/packages/linux/patches/linux-2.6.37-rc3-000_fix_userspace_build_of_fs.h.patch b/packages/linux/patches/linux-2.6.37-rc3-000_fix_userspace_build_of_fs.h.patch new file mode 100644 index 0000000000..e529618383 --- /dev/null +++ b/packages/linux/patches/linux-2.6.37-rc3-000_fix_userspace_build_of_fs.h.patch @@ -0,0 +1,16 @@ +diff -Naur linux-2.6.37-rc1/include/linux/fs.h linux-2.6.37-rc1.patch/include/linux/fs.h +--- linux-2.6.37-rc1/include/linux/fs.h 2010-11-01 12:54:12.000000000 +0100 ++++ linux-2.6.37-rc1.patch/include/linux/fs.h 2010-11-15 19:06:11.732172159 +0100 +@@ -34,9 +34,9 @@ + #define SEEK_MAX SEEK_END + + struct fstrim_range { +- uint64_t start; +- uint64_t len; +- uint64_t minlen; ++ __u64 start; ++ __u64 len; ++ __u64 minlen; + }; + + /* And dynamically-tunable limits and defaults: */ diff --git a/packages/linux/patches/linux-2.6.37-rc3-002_bash_only_feature.patch b/packages/linux/patches/linux-2.6.37-rc3-002_bash_only_feature.patch new file mode 100644 index 0000000000..a1028d15aa --- /dev/null +++ b/packages/linux/patches/linux-2.6.37-rc3-002_bash_only_feature.patch @@ -0,0 +1,15 @@ +Index: linux-2.6.16/scripts/gen_initramfs_list.sh +=================================================================== +--- linux-2.6.16.orig/scripts/gen_initramfs_list.sh 2006-03-20 18:41:34.000000000 +0100 ++++ linux-2.6.16/scripts/gen_initramfs_list.sh 2006-03-20 18:42:40.000000000 +0100 +@@ -56,9 +56,7 @@ + + parse() { + local location="$1" +- local name="${location/${srcdir}//}" +- # change '//' into '/' +- name="${name//\/\///}" ++ local name="$(echo "$location" | sed -e 's%$srcdir%%' -e 's%//*%/%g')" + local mode="$2" + local uid="$3" + local gid="$4" diff --git a/packages/linux/patches/linux-2.6.37-rc3-003-no_dev_console.patch b/packages/linux/patches/linux-2.6.37-rc3-003-no_dev_console.patch new file mode 100644 index 0000000000..9b5e51437d --- /dev/null +++ b/packages/linux/patches/linux-2.6.37-rc3-003-no_dev_console.patch @@ -0,0 +1,20 @@ +diff -Naur linux-2.6.34-rc7/init/main.c linux-2.6.34-rc7.patch/init/main.c +--- linux-2.6.34-rc7/init/main.c 2010-05-10 03:36:28.000000000 +0200 ++++ linux-2.6.34-rc7.patch/init/main.c 2010-05-15 12:28:34.767241760 +0200 +@@ -886,8 +886,14 @@ + do_basic_setup(); + + /* Open the /dev/console on the rootfs, this should never fail */ +- if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) +- printk(KERN_WARNING "Warning: unable to open an initial console.\n"); ++ char *console = "/dev_console"; ++ ++ if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) { ++ sys_mknod(console, S_IFCHR|0600, (TTYAUX_MAJOR<<8)|1); ++ if (sys_open(console, O_RDWR, 0) < 0) ++ printk(KERN_WARNING "Warning: unable to open an initial console.\n"); ++ sys_unlink(console); ++ } + + (void) sys_dup(0); + (void) sys_dup(0); diff --git a/packages/linux/patches/linux-2.6.37-rc3-004_lower_undefined_mode_timeout.patch b/packages/linux/patches/linux-2.6.37-rc3-004_lower_undefined_mode_timeout.patch new file mode 100644 index 0000000000..a0aca61d23 --- /dev/null +++ b/packages/linux/patches/linux-2.6.37-rc3-004_lower_undefined_mode_timeout.patch @@ -0,0 +1,24 @@ +diff -Naur linux-2.6.23-rc9.orig/arch/i386/boot/tty.c linux-2.6.23-rc9/arch/i386/boot/tty.c +--- linux-2.6.23-rc9.orig/arch/x86/boot/tty.c 2007-10-06 12:26:14.000000000 +0200 ++++ linux-2.6.23-rc9/arch/x86/boot/tty.c 2007-10-06 12:37:47.000000000 +0200 +@@ -92,7 +92,7 @@ + + int getchar_timeout(void) + { +- int cnt = 30; ++ int cnt = 3; + int t0, t1; + + t0 = gettime(); +diff -Naur linux-2.6.23-rc9.orig/arch/i386/boot/video.c linux-2.6.23-rc9/arch/i386/boot/video.c +--- linux-2.6.23-rc9.orig/arch/x86/boot/video.c 2007-10-06 12:26:14.000000000 +0200 ++++ linux-2.6.23-rc9/arch/x86/boot/video.c 2007-10-06 12:36:05.000000000 +0200 +@@ -329,7 +329,7 @@ + unsigned int sel; + + puts("Press to see video modes available, " +- " to continue, or wait 30 sec\n"); ++ " to continue, or wait 3 sec\n"); + + kbd_flush(); + while (1) { diff --git a/packages/linux/patches/linux-2.6.37-rc3-005_kconfig_no_timestamp.patch b/packages/linux/patches/linux-2.6.37-rc3-005_kconfig_no_timestamp.patch new file mode 100644 index 0000000000..332e553831 --- /dev/null +++ b/packages/linux/patches/linux-2.6.37-rc3-005_kconfig_no_timestamp.patch @@ -0,0 +1,13 @@ +Index: linux-2.6.16/scripts/kconfig/confdata.c +=================================================================== +--- linux-2.6.16.orig/scripts/kconfig/confdata.c 2006-03-20 06:53:29.000000000 +0100 ++++ linux-2.6.16/scripts/kconfig/confdata.c 2006-03-20 18:47:06.000000000 +0100 +@@ -340,7 +340,7 @@ + int type, l; + const char *str; + time_t now; +- int use_timestamp = 1; ++ int use_timestamp = 0; + char *env; + + dirname[0] = 0; diff --git a/packages/linux/patches/linux-2.6.37-rc3-006_enable_utf8.patch b/packages/linux/patches/linux-2.6.37-rc3-006_enable_utf8.patch new file mode 100644 index 0000000000..bee1cf3da8 --- /dev/null +++ b/packages/linux/patches/linux-2.6.37-rc3-006_enable_utf8.patch @@ -0,0 +1,25 @@ +diff -Naur linux-2.6.31-rc4.orig/fs/fat/inode.c linux-2.6.31-rc4/fs/fat/inode.c +--- linux-2.6.31-rc4.orig/fs/fat/inode.c 2009-07-25 12:47:41.000000000 +0200 ++++ linux-2.6.31-rc4/fs/fat/inode.c 2009-07-25 13:38:18.000000000 +0200 +@@ -979,7 +979,8 @@ + } + opts->name_check = 'n'; + opts->quiet = opts->showexec = opts->sys_immutable = opts->dotsOK = 0; +- opts->utf8 = opts->unicode_xlate = 0; ++ opts->utf8 = 1; ++ opts->unicode_xlate = 0; + opts->numtail = 1; + opts->usefree = opts->nocase = 0; + opts->tz_utc = 0; +diff -Naur linux-2.6.31-rc4.orig/fs/isofs/inode.c linux-2.6.31-rc4/fs/isofs/inode.c +--- linux-2.6.31-rc4.orig/fs/isofs/inode.c 2009-07-25 12:47:41.000000000 +0200 ++++ linux-2.6.31-rc4/fs/isofs/inode.c 2009-07-25 13:38:49.000000000 +0200 +@@ -377,7 +377,7 @@ + popt->gid = 0; + popt->uid = 0; + popt->iocharset = NULL; +- popt->utf8 = 0; ++ popt->utf8 = 1; + popt->overriderockperm = 0; + popt->session=-1; + popt->sbsector=-1; diff --git a/packages/linux/patches/linux-2.6.37-rc3-007_die_floppy_die.patch b/packages/linux/patches/linux-2.6.37-rc3-007_die_floppy_die.patch new file mode 100644 index 0000000000..76db312182 --- /dev/null +++ b/packages/linux/patches/linux-2.6.37-rc3-007_die_floppy_die.patch @@ -0,0 +1,30 @@ +From 4ff58b642f80dedb20533978123d89b5ac9b1ed5 Mon Sep 17 00:00:00 2001 +From: Kyle McMartin +Date: Tue, 30 Mar 2010 00:04:29 -0400 +Subject: die-floppy-die + +Kill the floppy.ko pnp modalias. We were surviving just fine without +autoloading floppy drivers, tyvm. + +Please feel free to register all complaints in the wastepaper bin. +--- + drivers/block/floppy.c | 3 +-- + 1 files changed, 1 insertions(+), 2 deletions(-) + +diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c +index 90c4038..f4a0b90 100644 +--- a/drivers/block/floppy.c ++++ b/drivers/block/floppy.c +@@ -4619,8 +4619,7 @@ static const struct pnp_device_id floppy_pnpids[] = { + {"PNP0700", 0}, + {} + }; +- +-MODULE_DEVICE_TABLE(pnp, floppy_pnpids); ++/* MODULE_DEVICE_TABLE(pnp, floppy_pnpids); */ + + #else + +-- +1.7.0.1 + diff --git a/packages/linux/patches/linux-2.6.37-rc3-008-hda_intel_prealloc_4mb_dmabuffer.patch b/packages/linux/patches/linux-2.6.37-rc3-008-hda_intel_prealloc_4mb_dmabuffer.patch new file mode 100644 index 0000000000..36e6aca4fa --- /dev/null +++ b/packages/linux/patches/linux-2.6.37-rc3-008-hda_intel_prealloc_4mb_dmabuffer.patch @@ -0,0 +1,47 @@ +From c69fcbd1f60b0842f7c1ad2c95692ffd19c4932b Mon Sep 17 00:00:00 2001 +From: Kyle McMartin +Date: Mon, 29 Mar 2010 23:56:08 -0400 +Subject: hda_intel-prealloc-4mb-dmabuffer + +--- + sound/pci/hda/hda_intel.c | 14 +++++++++++++- + 1 files changed, 13 insertions(+), 1 deletions(-) + +diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c +index 4bb9067..37db515 100644 +--- a/sound/pci/hda/hda_intel.c ++++ b/sound/pci/hda/hda_intel.c +@@ -1986,6 +1986,7 @@ azx_attach_pcm_stream(struct hda_bus *bus, struct hda_codec *codec, + struct azx_pcm *apcm; + int pcm_dev = cpcm->device; + int s, err; ++ size_t prealloc_min = 64*1024; /* 64KB */ + + if (pcm_dev >= HDA_MAX_PCMS) { + snd_printk(KERN_ERR SFX "Invalid PCM device number %d\n", +@@ -2019,10 +2020,21 @@ azx_attach_pcm_stream(struct hda_bus *bus, struct hda_codec *codec, + if (cpcm->stream[s].substreams) + snd_pcm_set_ops(pcm, s, &azx_pcm_ops); + } ++ + /* buffer pre-allocation */ ++ ++ /* subtle, don't allocate a big buffer for modems... ++ * also, don't just test 32BIT_MASK, since azx supports ++ * 64-bit DMA in some cases. ++ */ ++ /* lennart wants a 2.2MB buffer for 2sec of 48khz */ ++ if (pcm->dev_class == SNDRV_PCM_CLASS_GENERIC && ++ chip->pci->dma_mask >= DMA_32BIT_MASK) ++ prealloc_min = 4 * 1024 * 1024; /* 4MB */ ++ + snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, + snd_dma_pci_data(chip->pci), +- 1024 * 64, 32 * 1024 * 1024); ++ prealloc_min, 32 * 1024 * 1024); + return 0; + } + +-- +1.7.0.1 + diff --git a/packages/linux/patches/linux-2.6.37-rc3-009_disable_i8042_check_on_apple_mac.patch b/packages/linux/patches/linux-2.6.37-rc3-009_disable_i8042_check_on_apple_mac.patch new file mode 100644 index 0000000000..f99d0f900c --- /dev/null +++ b/packages/linux/patches/linux-2.6.37-rc3-009_disable_i8042_check_on_apple_mac.patch @@ -0,0 +1,59 @@ +From 2a79554c864ac58fa2ad982f0fcee2cc2aa33eb5 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Thu, 20 May 2010 10:30:31 -0400 +Subject: Disable i8042 checks on Intel Apple Macs + +As those computers never had any i8042 controllers, and the +current lookup code could potentially lock up/hang/wait for +timeout for long periods of time. + +Fixes intermittent hangs on boot on a MacbookAir1,1 + +Signed-off-by: Bastien Nocera +--- + drivers/input/serio/i8042.c | 22 ++++++++++++++++++++++ + 1 files changed, 22 insertions(+), 0 deletions(-) + +diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c +index 6440a8f..4d7cf98 100644 +--- a/drivers/input/serio/i8042.c ++++ b/drivers/input/serio/i8042.c +@@ -1451,6 +1451,22 @@ static struct platform_driver i8042_driver = { + .shutdown = i8042_shutdown, + }; + ++#ifdef CONFIG_DMI ++static struct dmi_system_id __initdata dmi_system_table[] = { ++ { ++ .matches = { ++ DMI_MATCH(DMI_BIOS_VENDOR, "Apple Computer, Inc.") ++ }, ++ }, ++ { ++ .matches = { ++ DMI_MATCH(DMI_BIOS_VENDOR, "Apple Inc.") ++ }, ++ }, ++ {} ++}; ++#endif /*CONFIG_DMI*/ ++ + static int __init i8042_init(void) + { + struct platform_device *pdev; +@@ -1458,6 +1474,12 @@ static int __init i8042_init(void) + + dbg_init(); + ++#ifdef CONFIG_DMI ++ /* Intel Apple Macs never have an i8042 controller */ ++ if (dmi_check_system(dmi_system_table) > 0) ++ return -ENODEV; ++#endif /*CONFIG_DMI*/ ++ + err = i8042_platform_init(); + if (err) + return err; +-- +1.7.0.1 + diff --git a/packages/linux/patches/linux-2.6.37-rc3-050_add_appleir_usb_driver.patch b/packages/linux/patches/linux-2.6.37-rc3-050_add_appleir_usb_driver.patch new file mode 100644 index 0000000000..61edb8061e --- /dev/null +++ b/packages/linux/patches/linux-2.6.37-rc3-050_add_appleir_usb_driver.patch @@ -0,0 +1,702 @@ +From e11e9e78799a7641fe0dc5289f35f2604a4b71a3 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Sun, 17 Jan 2010 00:40:15 +0000 +Subject: [PATCH] Input: add appleir USB driver + +This driver was originally written by James McKenzie, updated by +Greg Kroah-Hartman, further updated by myself, with suspend support +added. + +More recent versions of the IR receiver are also supported through +a patch by Alex Karpenko. The patch also adds support for the 2nd +and 5th generation of the controller, and the menu key on newer +brushed metal remotes. + +Tested on a MacbookAir1,1 + +Signed-off-by: Bastien Nocera +--- + Documentation/input/appleir.txt | 46 ++++ + drivers/hid/hid-apple.c | 4 - + drivers/hid/hid-core.c | 7 +- + drivers/hid/hid-ids.h | 5 +- + drivers/input/misc/Kconfig | 13 + + drivers/input/misc/Makefile | 1 + + drivers/input/misc/appleir.c | 519 +++++++++++++++++++++++++++++++++++++++ + 7 files changed, 588 insertions(+), 7 deletions(-) + create mode 100644 Documentation/input/appleir.txt + create mode 100644 drivers/input/misc/appleir.c + +diff --git a/Documentation/input/appleir.txt b/Documentation/input/appleir.txt +new file mode 100644 +index 0000000..db637fb +--- /dev/null ++++ b/Documentation/input/appleir.txt +@@ -0,0 +1,46 @@ ++Apple IR receiver Driver (appleir) ++---------------------------------- ++ Copyright (C) 2009 Bastien Nocera ++ ++The appleir driver is a kernel input driver to handle Apple's IR ++receivers (and associated remotes) in the kernel. ++ ++The driver is an input driver which only handles "official" remotes ++as built and sold by Apple. ++ ++Authors ++------- ++ ++James McKenzie (original driver) ++Alex Karpenko (05ac:8242 support) ++Greg Kroah-Hartman (cleanups and original submission) ++Bastien Nocera (further cleanups, brushed metal "enter" ++button support and suspend support) ++ ++Supported hardware ++------------------ ++ ++- All Apple laptops and desktops from 2005 onwards, except: ++ - the unibody Macbook (2009) ++ - Mac Pro (all versions) ++- Apple TV (all revisions prior to September 2010) ++ ++The remote will only support the 6 (old white) or 7 (brushed metal) buttons ++of the remotes as sold by Apple. See the next section if you want to use ++other remotes or want to use lirc with the device instead of the kernel driver. ++ ++Using lirc (native) instead of the kernel driver ++------------------------------------------------ ++ ++First, you will need to disable the kernel driver for the receiver. ++ ++This can be achieved by passing quirks to the usbhid driver. ++The quirk line would be: ++usbhid.quirks=0x05ac:0x8242:0x40000010 ++ ++With 0x05ac being the vendor ID (Apple, you shouldn't need to change this) ++With 0x8242 being the product ID (check the output of lsusb for your hardware) ++And 0x10 being "HID_QUIRK_HIDDEV_FORCE" and 0x40000000 being "HID_QUIRK_NO_IGNORE" ++ ++This should force the creation of a hiddev device for the receiver, and ++make it usable under lirc. +diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c +index bba05d0..0059d5a 100644 +--- a/drivers/hid/hid-apple.c ++++ b/drivers/hid/hid-apple.c +@@ -361,10 +361,6 @@ static void apple_remove(struct hid_device *hdev) + } + + static const struct hid_device_id apple_devices[] = { +- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ATV_IRCONTROL), +- .driver_data = APPLE_HIDDEV | APPLE_IGNORE_HIDINPUT }, +- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4), +- .driver_data = APPLE_HIDDEV | APPLE_IGNORE_HIDINPUT }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE), + .driver_data = APPLE_MIGHTYMOUSE | APPLE_INVERT_HWHEEL }, + +diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c +index baa25ad..abc5bd7 100644 +--- a/drivers/hid/hid-core.c ++++ b/drivers/hid/hid-core.c +@@ -1244,8 +1244,6 @@ static const struct hid_device_id hid_blacklist[] = { + #if defined(CONFIG_HID_ACRUX_FF) || defined(CONFIG_HID_ACRUX_FF_MODULE) + { HID_USB_DEVICE(USB_VENDOR_ID_ACRUX, 0x0802) }, + #endif +- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ATV_IRCONTROL) }, +- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE) }, + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGICMOUSE) }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI) }, +@@ -1577,6 +1575,11 @@ static const struct hid_device_id hid_ignore_list[] = { + { HID_USB_DEVICE(USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_24) }, + { HID_USB_DEVICE(USB_VENDOR_ID_AIRCABLE, USB_DEVICE_ID_AIRCABLE1) }, + { HID_USB_DEVICE(USB_VENDOR_ID_ALCOR, USB_DEVICE_ID_ALCOR_USBRS232) }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL) }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL2) }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL3) }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL5) }, + { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_LCM)}, + { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_LCM2)}, + { HID_USB_DEVICE(USB_VENDOR_ID_AVERMEDIA, USB_DEVICE_ID_AVER_FM_MR800) }, +diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h +index 11af537..360a5ca 100644 +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -100,8 +100,11 @@ + #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS 0x023b + #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a + #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b +-#define USB_DEVICE_ID_APPLE_ATV_IRCONTROL 0x8241 ++#define USB_DEVICE_ID_APPLE_IRCONTROL 0x8240 ++#define USB_DEVICE_ID_APPLE_IRCONTROL2 0x1440 ++#define USB_DEVICE_ID_APPLE_IRCONTROL3 0x8241 + #define USB_DEVICE_ID_APPLE_IRCONTROL4 0x8242 ++#define USB_DEVICE_ID_APPLE_IRCONTROL5 0x8243 + + #define USB_VENDOR_ID_ASUS 0x0486 + #define USB_DEVICE_ID_ASUS_T91MT 0x0185 +diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig +index 60de906..2f2f2e7 100644 +--- a/drivers/input/misc/Kconfig ++++ b/drivers/input/misc/Kconfig +@@ -209,6 +209,19 @@ config INPUT_KEYSPAN_REMOTE + To compile this driver as a module, choose M here: the module will + be called keyspan_remote. + ++config INPUT_APPLEIR ++ tristate "Apple infrared receiver (built in)" ++ depends on USB_ARCH_HAS_HCD ++ select USB ++ help ++ Say Y here if you want to use a Apple infrared remote control. All ++ the Apple computers from 2005 onwards include such a port, except ++ the unibody Macbook (2009), and Mac Pros. This receiver is also ++ used in the Apple TV set-top box prior to the 2010 model. ++ ++ To compile this driver as a module, choose M here: the module will ++ be called appleir. ++ + config INPUT_POWERMATE + tristate "Griffin PowerMate and Contour Jog support" + depends on USB_ARCH_HAS_HCD +diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile +index 1fe1f6c..d5ef2b9 100644 +--- a/drivers/input/misc/Makefile ++++ b/drivers/input/misc/Makefile +@@ -13,6 +13,7 @@ obj-$(CONFIG_INPUT_ADXL34X) += adxl34x.o + obj-$(CONFIG_INPUT_ADXL34X_I2C) += adxl34x-i2c.o + obj-$(CONFIG_INPUT_ADXL34X_SPI) += adxl34x-spi.o + obj-$(CONFIG_INPUT_APANEL) += apanel.o ++obj-$(CONFIG_INPUT_APPLEIR) += appleir.o + obj-$(CONFIG_INPUT_ATI_REMOTE) += ati_remote.o + obj-$(CONFIG_INPUT_ATI_REMOTE2) += ati_remote2.o + obj-$(CONFIG_INPUT_ATLAS_BTNS) += atlas_btns.o +diff --git a/drivers/input/misc/appleir.c b/drivers/input/misc/appleir.c +new file mode 100644 +index 0000000..3817a3c +--- /dev/null ++++ b/drivers/input/misc/appleir.c +@@ -0,0 +1,519 @@ ++/* ++ * appleir: USB driver for the apple ir device ++ * ++ * Original driver written by James McKenzie ++ * Ported to recent 2.6 kernel versions by Greg Kroah-Hartman ++ * ++ * Copyright (C) 2006 James McKenzie ++ * Copyright (C) 2008 Greg Kroah-Hartman ++ * Copyright (C) 2008 Novell Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the Free ++ * Software Foundation, version 2. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define DRIVER_VERSION "v1.2" ++#define DRIVER_AUTHOR "James McKenzie" ++#define DRIVER_DESC "Apple infrared receiver driver" ++#define DRIVER_LICENSE "GPL" ++ ++MODULE_AUTHOR(DRIVER_AUTHOR); ++MODULE_DESCRIPTION(DRIVER_DESC); ++MODULE_LICENSE(DRIVER_LICENSE); ++ ++#define USB_VENDOR_ID_APPLE 0x05ac ++#define USB_DEVICE_ID_APPLE_IRCONTROL 0x8240 ++#define USB_DEVICE_ID_APPLE_IRCONTROL2 0x1440 ++#define USB_DEVICE_ID_APPLE_IRCONTROL3 0x8241 ++#define USB_DEVICE_ID_APPLE_IRCONTROL4 0x8242 ++#define USB_DEVICE_ID_APPLE_IRCONTROL5 0x8243 ++ ++#define URB_SIZE 32 ++ ++#define MAX_KEYS 9 ++#define MAX_KEYS_MASK (MAX_KEYS - 1) ++ ++#define dbginfo(dev, format, arg...) do { if (debug) dev_info(dev , format , ## arg); } while (0) ++ ++static int debug; ++module_param(debug, int, 0644); ++MODULE_PARM_DESC(debug, "Enable extra debug messages and information"); ++ ++/* I have two devices both of which report the following */ ++/* 25 87 ee 83 0a + */ ++/* 25 87 ee 83 0c - */ ++/* 25 87 ee 83 09 << */ ++/* 25 87 ee 83 06 >> */ ++/* 25 87 ee 83 05 >" */ ++/* 25 87 ee 83 03 menu */ ++/* 26 00 00 00 00 for key repeat*/ ++ ++/* Thomas Glanzmann reports the following responses */ ++/* 25 87 ee ca 0b + */ ++/* 25 87 ee ca 0d - */ ++/* 25 87 ee ca 08 << */ ++/* 25 87 ee ca 07 >> */ ++/* 25 87 ee ca 04 >" */ ++/* 25 87 ee ca 02 menu */ ++/* 26 00 00 00 00 for key repeat*/ ++/* He also observes the following event sometimes */ ++/* sent after a key is release, which I interpret */ ++/* as a flat battery message */ ++/* 25 87 e0 ca 06 flat battery */ ++ ++/* Alexandre Karpenko reports the following responses for Device ID 0x8242 */ ++/* 25 87 ee 47 0b + */ ++/* 25 87 ee 47 0d - */ ++/* 25 87 ee 47 08 << */ ++/* 25 87 ee 47 07 >> */ ++/* 25 87 ee 47 04 >" */ ++/* 25 87 ee 47 02 menu */ ++/* 26 87 ee 47 ** for key repeat (** is the code of the key being held) */ ++ ++/* Bastien Nocera's "new" remote */ ++/* 25 87 ee 91 5f followed by ++ * 25 87 ee 91 05 gives you >" ++ * ++ * 25 87 ee 91 5c followed by ++ * 25 87 ee 91 05 gives you the middle button */ ++ ++static const unsigned short appleir_key_table[] = { ++ KEY_RESERVED, ++ KEY_MENU, ++ KEY_PLAYPAUSE, ++ KEY_FORWARD, ++ KEY_BACK, ++ KEY_VOLUMEUP, ++ KEY_VOLUMEDOWN, ++ KEY_ENTER, ++ KEY_RESERVED, ++}; ++ ++struct appleir { ++ struct input_dev *input_dev; ++ unsigned short keymap[ARRAY_SIZE(appleir_key_table)]; ++ u8 *data; ++ dma_addr_t dma_buf; ++ struct usb_device *usbdev; ++ unsigned int flags; ++ struct urb *urb; ++ struct timer_list key_up_timer; ++ int current_key; ++ int prev_key_idx; ++ char phys[32]; ++}; ++ ++static DEFINE_MUTEX(appleir_mutex); ++ ++enum { ++ APPLEIR_OPENED = 0x1, ++ APPLEIR_SUSPENDED = 0x2, ++}; ++ ++static struct usb_device_id appleir_ids[] = { ++ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL) }, ++ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL2) }, ++ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL3) }, ++ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) }, ++ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL5) }, ++ {} ++}; ++MODULE_DEVICE_TABLE(usb, appleir_ids); ++ ++static void dump_packet(struct appleir *appleir, char *msg, u8 *data, int len) ++{ ++ int i; ++ ++ printk(KERN_ERR "appleir: %s (%d bytes)", msg, len); ++ ++ for (i = 0; i < len; ++i) ++ printk(" %02x", data[i]); ++ printk(" (should be command %d)\n", (data[4] >> 1) & MAX_KEYS_MASK); ++} ++ ++static int get_key(int data) ++{ ++ switch (data) { ++ case 0x02: ++ case 0x03: ++ /* menu */ ++ return 1; ++ case 0x04: ++ case 0x05: ++ /* >" */ ++ return 2; ++ case 0x06: ++ case 0x07: ++ /* >> */ ++ return 3; ++ case 0x08: ++ case 0x09: ++ /* << */ ++ return 4; ++ case 0x0a: ++ case 0x0b: ++ /* + */ ++ return 5; ++ case 0x0c: ++ case 0x0d: ++ /* - */ ++ return 6; ++ case 0x5c: ++ /* Middle button, on newer remotes, ++ * part of a 2 packet-command */ ++ return -7; ++ default: ++ return -1; ++ } ++} ++ ++static void key_up(struct appleir *appleir, int key) ++{ ++ dbginfo(&appleir->input_dev->dev, "key %d up\n", key); ++ input_report_key(appleir->input_dev, key, 0); ++ input_sync(appleir->input_dev); ++} ++ ++static void key_down(struct appleir *appleir, int key) ++{ ++ dbginfo(&appleir->input_dev->dev, "key %d down\n", key); ++ input_report_key(appleir->input_dev, key, 1); ++ input_sync(appleir->input_dev); ++} ++ ++static void battery_flat(struct appleir *appleir) ++{ ++ dev_err(&appleir->input_dev->dev, "possible flat battery?\n"); ++} ++ ++static void key_up_tick(unsigned long data) ++{ ++ struct appleir *appleir = (struct appleir *)data; ++ ++ if (appleir->current_key) { ++ key_up(appleir, appleir->current_key); ++ appleir->current_key = 0; ++ } ++} ++ ++static void new_data(struct appleir *appleir, u8 *data, int len) ++{ ++ static const u8 keydown[] = { 0x25, 0x87, 0xee }; ++ static const u8 keyrepeat[] = { 0x26, }; ++ static const u8 flatbattery[] = { 0x25, 0x87, 0xe0 }; ++ ++ if (debug) ++ dump_packet(appleir, "received", data, len); ++ ++ if (len != 5) ++ return; ++ ++ if (!memcmp(data, keydown, sizeof(keydown))) { ++ int index; ++ ++ /* If we already have a key down, take it up before marking ++ this one down */ ++ if (appleir->current_key) ++ key_up(appleir, appleir->current_key); ++ ++ /* Handle dual packet commands */ ++ if (appleir->prev_key_idx > 0) ++ index = appleir->prev_key_idx; ++ else ++ index = get_key(data[4]); ++ ++ if (index > 0) { ++ appleir->current_key = appleir->keymap[index]; ++ ++ key_down(appleir, appleir->current_key); ++ /* Remote doesn't do key up, either pull them up, in the test ++ above, or here set a timer which pulls them up after 1/8 s */ ++ mod_timer(&appleir->key_up_timer, jiffies + HZ / 8); ++ appleir->prev_key_idx = 0; ++ return; ++ } else if (index == -7) { ++ /* Remember key for next packet */ ++ appleir->prev_key_idx = 0 - index; ++ return; ++ } ++ } ++ ++ appleir->prev_key_idx = 0; ++ ++ if (!memcmp(data, keyrepeat, sizeof(keyrepeat))) { ++ key_down(appleir, appleir->current_key); ++ /* Remote doesn't do key up, either pull them up, in the test ++ above, or here set a timer which pulls them up after 1/8 s */ ++ mod_timer(&appleir->key_up_timer, jiffies + HZ / 8); ++ return; ++ } ++ ++ if (!memcmp(data, flatbattery, sizeof(flatbattery))) { ++ battery_flat(appleir); ++ /* Fall through */ ++ } ++ ++ dump_packet(appleir, "unknown packet", data, len); ++} ++ ++static void appleir_urb(struct urb *urb) ++{ ++ struct appleir *appleir = urb->context; ++ int status = urb->status; ++ int retval; ++ ++ switch (status) { ++ case 0: ++ new_data(appleir, urb->transfer_buffer, urb->actual_length); ++ break; ++ case -ECONNRESET: ++ case -ENOENT: ++ case -ESHUTDOWN: ++ /* This urb is terminated, clean up */ ++ dbginfo(&appleir->input_dev->dev, "%s - urb shutting down with status: %d", __func__, ++ urb->status); ++ return; ++ default: ++ dbginfo(&appleir->input_dev->dev, "%s - nonzero urb status received: %d", __func__, ++ urb->status); ++ } ++ ++ retval = usb_submit_urb(urb, GFP_ATOMIC); ++ if (retval) ++ err("%s - usb_submit_urb failed with result %d", __func__, ++ retval); ++} ++ ++static int appleir_open(struct input_dev *dev) ++{ ++ struct appleir *appleir = input_get_drvdata(dev); ++ struct usb_interface *intf = usb_ifnum_to_if(appleir->usbdev, 0); ++ int r; ++ ++ r = usb_autopm_get_interface(intf); ++ if (r) { ++ dev_err(&intf->dev, ++ "%s(): usb_autopm_get_interface() = %d\n", __func__, r); ++ return r; ++ } ++ ++ mutex_lock(&appleir_mutex); ++ ++ if (usb_submit_urb(appleir->urb, GFP_ATOMIC)) { ++ r = -EIO; ++ goto fail; ++ } ++ ++ appleir->flags |= APPLEIR_OPENED; ++ ++ mutex_unlock(&appleir_mutex); ++ ++ usb_autopm_put_interface(intf); ++ ++ return 0; ++fail: ++ mutex_unlock(&appleir_mutex); ++ usb_autopm_put_interface(intf); ++ return r; ++} ++ ++static void appleir_close(struct input_dev *dev) ++{ ++ struct appleir *appleir = input_get_drvdata(dev); ++ ++ mutex_lock(&appleir_mutex); ++ ++ if (!(appleir->flags & APPLEIR_SUSPENDED)) { ++ usb_kill_urb(appleir->urb); ++ del_timer_sync(&appleir->key_up_timer); ++ } ++ ++ appleir->flags &= ~APPLEIR_OPENED; ++ ++ mutex_unlock(&appleir_mutex); ++} ++ ++static int appleir_probe(struct usb_interface *intf, ++ const struct usb_device_id *id) ++{ ++ struct usb_device *dev = interface_to_usbdev(intf); ++ struct usb_endpoint_descriptor *endpoint; ++ struct appleir *appleir = NULL; ++ struct input_dev *input_dev; ++ int retval = -ENOMEM; ++ int i; ++ ++ appleir = kzalloc(sizeof(struct appleir), GFP_KERNEL); ++ if (!appleir) ++ goto allocfail; ++ ++ appleir->data = usb_alloc_coherent(dev, URB_SIZE, GFP_KERNEL, ++ &appleir->dma_buf); ++ if (!appleir->data) ++ goto usbfail; ++ ++ appleir->urb = usb_alloc_urb(0, GFP_KERNEL); ++ if (!appleir->urb) ++ goto urbfail; ++ ++ appleir->usbdev = dev; ++ ++ input_dev = input_allocate_device(); ++ if (!input_dev) ++ goto inputfail; ++ ++ appleir->input_dev = input_dev; ++ ++ usb_make_path(dev, appleir->phys, sizeof(appleir->phys)); ++ strlcpy(appleir->phys, "/input0", sizeof(appleir->phys)); ++ ++ input_dev->name = "Apple Infrared Remote Controller"; ++ input_dev->phys = appleir->phys; ++ usb_to_input_id(dev, &input_dev->id); ++ input_dev->dev.parent = &intf->dev; ++ input_dev->keycode = appleir->keymap; ++ input_dev->keycodesize = sizeof(unsigned short); ++ input_dev->keycodemax = ARRAY_SIZE(appleir->keymap); ++ ++ input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); ++ ++ memcpy(appleir->keymap, appleir_key_table, sizeof(appleir->keymap)); ++ for (i = 0; i < ARRAY_SIZE(appleir_key_table); i++) ++ set_bit(appleir->keymap[i], input_dev->keybit); ++ clear_bit(KEY_RESERVED, input_dev->keybit); ++ ++ input_set_drvdata(input_dev, appleir); ++ input_dev->open = appleir_open; ++ input_dev->close = appleir_close; ++ ++ endpoint = &intf->cur_altsetting->endpoint[0].desc; ++ ++ usb_fill_int_urb(appleir->urb, dev, ++ usb_rcvintpipe(dev, endpoint->bEndpointAddress), ++ appleir->data, 8, ++ appleir_urb, appleir, endpoint->bInterval); ++ ++ appleir->urb->transfer_dma = appleir->dma_buf; ++ appleir->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; ++ ++ setup_timer(&appleir->key_up_timer, ++ key_up_tick, (unsigned long) appleir); ++ ++ retval = input_register_device(appleir->input_dev); ++ if (retval) ++ goto inputfail; ++ ++ usb_set_intfdata(intf, appleir); ++ ++ return 0; ++ ++inputfail: ++ input_free_device(appleir->input_dev); ++ ++urbfail: ++ usb_free_urb(appleir->urb); ++ ++usbfail: ++ usb_free_coherent(dev, URB_SIZE, appleir->data, ++ appleir->dma_buf); ++ ++allocfail: ++ kfree(appleir); ++ ++ return retval; ++} ++ ++static void appleir_disconnect(struct usb_interface *intf) ++{ ++ struct appleir *appleir = usb_get_intfdata(intf); ++ ++ usb_set_intfdata(intf, NULL); ++ input_unregister_device(appleir->input_dev); ++ usb_free_urb(appleir->urb); ++ usb_free_coherent(interface_to_usbdev(intf), URB_SIZE, ++ appleir->data, appleir->dma_buf); ++ kfree(appleir); ++} ++ ++static int appleir_suspend(struct usb_interface *interface, ++ pm_message_t message) ++{ ++ struct appleir *appleir = usb_get_intfdata(interface); ++ ++ mutex_lock(&appleir_mutex); ++ if (appleir->flags & APPLEIR_OPENED) ++ usb_kill_urb(appleir->urb); ++ ++ appleir->flags |= APPLEIR_SUSPENDED; ++ ++ mutex_unlock(&appleir_mutex); ++ ++ return 0; ++} ++ ++static int appleir_resume(struct usb_interface *interface) ++{ ++ struct appleir *appleir; ++ int r = 0; ++ ++ appleir = usb_get_intfdata(interface); ++ ++ mutex_lock(&appleir_mutex); ++ if (appleir->flags & APPLEIR_OPENED) { ++ struct usb_endpoint_descriptor *endpoint; ++ ++ endpoint = &interface->cur_altsetting->endpoint[0].desc; ++ usb_fill_int_urb(appleir->urb, appleir->usbdev, ++ usb_rcvintpipe(appleir->usbdev, endpoint->bEndpointAddress), ++ appleir->data, 8, ++ appleir_urb, appleir, endpoint->bInterval); ++ appleir->urb->transfer_dma = appleir->dma_buf; ++ appleir->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; ++ ++ /* And reset the USB device */ ++ if (usb_submit_urb(appleir->urb, GFP_ATOMIC)) ++ r = -EIO; ++ } ++ ++ appleir->flags &= ~APPLEIR_SUSPENDED; ++ ++ mutex_unlock(&appleir_mutex); ++ ++ return r; ++} ++ ++static struct usb_driver appleir_driver = { ++ .name = "appleir", ++ .probe = appleir_probe, ++ .disconnect = appleir_disconnect, ++ .suspend = appleir_suspend, ++ .resume = appleir_resume, ++ .reset_resume = appleir_resume, ++ .id_table = appleir_ids, ++}; ++ ++static int __init appleir_init(void) ++{ ++ return usb_register(&appleir_driver); ++} ++ ++static void __exit appleir_exit(void) ++{ ++ usb_deregister(&appleir_driver); ++} ++ ++module_init(appleir_init); ++module_exit(appleir_exit); +-- +1.7.2.2 + diff --git a/packages/linux/patches/linux-2.6.37-rc3-052-aureal_remote_quirk-0.1.patch b/packages/linux/patches/linux-2.6.37-rc3-052-aureal_remote_quirk-0.1.patch new file mode 100644 index 0000000000..2cf266aac9 --- /dev/null +++ b/packages/linux/patches/linux-2.6.37-rc3-052-aureal_remote_quirk-0.1.patch @@ -0,0 +1,113 @@ +diff -Naur linux-2.6.36-rc6/drivers/hid/hid-aureal.c linux-2.6.36-rc6.patch/drivers/hid/hid-aureal.c +--- linux-2.6.36-rc6/drivers/hid/hid-aureal.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.36-rc6.patch/drivers/hid/hid-aureal.c 2010-10-05 02:28:50.925421529 +0200 +@@ -0,0 +1,60 @@ ++/* ++ * HID driver for some sunplus "special" devices ++ * ++ * Copyright (c) 1999 Andreas Gal ++ * Copyright (c) 2000-2005 Vojtech Pavlik ++ * Copyright (c) 2005 Michael Haboustak for Concept2, Inc ++ * Copyright (c) 2006-2007 Jiri Kosina ++ * Copyright (c) 2007 Paul Walmsley ++ * Copyright (c) 2008 Jiri Slaby ++ * Copyright (c) 2010 Franco Catrin ++ */ ++ ++/* ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the Free ++ * Software Foundation; either version 2 of the License, or (at your option) ++ * any later version. ++ */ ++ ++#include ++#include ++#include ++ ++#include "hid-ids.h" ++ ++static void aureal_report_fixup(struct hid_device *hdev, __u8 *rdesc, ++ unsigned int rsize) ++{ ++ if (rsize >= 54 && rdesc[52] == 0x25 && rdesc[53] == 0x01) { ++ dev_info(&hdev->dev, "fixing Aureal Cy se W-01RN USB_V3.1 " ++ "report descriptor. Keyboard Logical Maximum = 101\n"); ++ rdesc[53] = 0x65; ++ } ++} ++ ++static const struct hid_device_id aureal_devices[] = { ++ { HID_USB_DEVICE(USB_VENDOR_ID_AUREAL, USB_DEVICE_ID_AUREAL_W01RN) }, ++ { } ++}; ++MODULE_DEVICE_TABLE(hid, aureal_devices); ++ ++static struct hid_driver aureal_driver = { ++ .name = "aureal", ++ .id_table = aureal_devices, ++ .report_fixup = aureal_report_fixup, ++}; ++ ++static int __init aureal_init(void) ++{ ++ return hid_register_driver(&aureal_driver); ++} ++ ++static void __exit aureal_exit(void) ++{ ++ hid_unregister_driver(&aureal_driver); ++} ++ ++module_init(aureal_init); ++module_exit(aureal_exit); ++MODULE_LICENSE("GPL"); +diff -Naur linux-2.6.36-rc6/drivers/hid/hid-ids.h linux-2.6.36-rc6.patch/drivers/hid/hid-ids.h +--- linux-2.6.36-rc6/drivers/hid/hid-ids.h 2010-09-29 03:01:22.000000000 +0200 ++++ linux-2.6.36-rc6.patch/drivers/hid/hid-ids.h 2010-10-05 02:30:00.651266940 +0200 +@@ -6,6 +6,7 @@ + * Copyright (c) 2005 Michael Haboustak for Concept2, Inc + * Copyright (c) 2006-2007 Jiri Kosina + * Copyright (c) 2007 Paul Walmsley ++ * Copyright (c) 2010 Franco Catrin + */ + + /* +@@ -316,6 +317,9 @@ + #define USB_DEVICE_ID_KYE_ERGO_525V 0x0087 + #define USB_DEVICE_ID_KYE_GPEN_560 0x5003 + ++#define USB_VENDOR_ID_AUREAL 0x0755 ++#define USB_DEVICE_ID_AUREAL_W01RN 0x2626 ++ + #define USB_VENDOR_ID_LABTEC 0x1020 + #define USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD 0x0006 + +diff -Naur linux-2.6.36-rc6/drivers/hid/Kconfig linux-2.6.36-rc6.patch/drivers/hid/Kconfig +--- linux-2.6.36-rc6/drivers/hid/Kconfig 2010-09-29 03:01:22.000000000 +0200 ++++ linux-2.6.36-rc6.patch/drivers/hid/Kconfig 2010-10-05 02:28:50.936421663 +0200 +@@ -87,6 +87,13 @@ + Say Y here if you want support for keyboards of Apple iBooks, PowerBooks, + MacBooks, MacBook Pros and Apple Aluminum. + ++config HID_AUREAL ++ tristate "Aureal" if EMBEDDED ++ depends on USB_HID ++ default !EMBEDDED ++ ---help--- ++ Support for Aureal Cy se W-01RN Remote Controller ++ + config HID_BELKIN + tristate "Belkin" if EMBEDDED + depends on USB_HID +diff -Naur linux-2.6.36-rc6/drivers/hid/Makefile linux-2.6.36-rc6.patch/drivers/hid/Makefile +--- linux-2.6.36-rc6/drivers/hid/Makefile 2010-09-29 03:01:22.000000000 +0200 ++++ linux-2.6.36-rc6.patch/drivers/hid/Makefile 2010-10-05 02:28:50.938421687 +0200 +@@ -26,6 +26,7 @@ + obj-$(CONFIG_HID_A4TECH) += hid-a4tech.o + obj-$(CONFIG_HID_ACRUX_FF) += hid-axff.o + obj-$(CONFIG_HID_APPLE) += hid-apple.o ++obj-$(CONFIG_HID_AUREAL) += hid-aureal.o + obj-$(CONFIG_HID_BELKIN) += hid-belkin.o + obj-$(CONFIG_HID_CANDO) += hid-cando.o + obj-$(CONFIG_HID_CHERRY) += hid-cherry.o diff --git a/packages/linux/patches/linux-2.6.37-rc3-110-drm_nouveau_upstream-20101122.patch b/packages/linux/patches/linux-2.6.37-rc3-110-drm_nouveau_upstream-20101122.patch new file mode 100644 index 0000000000..eadd453274 --- /dev/null +++ b/packages/linux/patches/linux-2.6.37-rc3-110-drm_nouveau_upstream-20101122.patch @@ -0,0 +1,11899 @@ +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/Makefile linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/Makefile +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/Makefile 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/Makefile 2010-11-22 06:33:32.000000000 +0100 +@@ -5,7 +5,7 @@ + ccflags-y := -Iinclude/drm + nouveau-y := nouveau_drv.o nouveau_state.o nouveau_channel.o nouveau_mem.o \ + nouveau_object.o nouveau_irq.o nouveau_notifier.o \ +- nouveau_sgdma.o nouveau_dma.o \ ++ nouveau_sgdma.o nouveau_dma.o nouveau_util.o \ + nouveau_bo.o nouveau_fence.o nouveau_gem.o nouveau_ttm.o \ + nouveau_hw.o nouveau_calc.o nouveau_bios.o nouveau_i2c.o \ + nouveau_display.o nouveau_connector.o nouveau_fbcon.o \ +@@ -18,8 +18,9 @@ + nv04_graph.o nv10_graph.o nv20_graph.o \ + nv40_graph.o nv50_graph.o nvc0_graph.o \ + nv40_grctx.o nv50_grctx.o \ ++ nv84_crypt.o \ + nv04_instmem.o nv50_instmem.o nvc0_instmem.o \ +- nv50_crtc.o nv50_dac.o nv50_sor.o \ ++ nv50_evo.o nv50_crtc.o nv50_dac.o nv50_sor.o \ + nv50_cursor.o nv50_display.o nv50_fbcon.o \ + nv04_dac.o nv04_dfp.o nv04_tv.o nv17_tv.o nv17_tv_modes.o \ + nv04_crtc.o nv04_display.o nv04_cursor.o nv04_fbcon.o \ +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_bios.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_bios.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_bios.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_bios.c 2010-11-22 06:33:32.000000000 +0100 +@@ -6039,7 +6039,6 @@ + if (type != cte->type) + NV_WARN(dev, " -> type 0x%02x\n", cte->type); + } +- + } + } + +@@ -6053,52 +6052,17 @@ + return entry; + } + +-static void fabricate_vga_output(struct dcb_table *dcb, int i2c, int heads) ++static void fabricate_dcb_output(struct dcb_table *dcb, int type, int i2c, ++ int heads, int or) + { + struct dcb_entry *entry = new_dcb_entry(dcb); + +- entry->type = 0; ++ entry->type = type; + entry->i2c_index = i2c; + entry->heads = heads; +- entry->location = DCB_LOC_ON_CHIP; +- entry->or = 1; +-} +- +-static void fabricate_dvi_i_output(struct dcb_table *dcb, bool twoHeads) +-{ +- struct dcb_entry *entry = new_dcb_entry(dcb); +- +- entry->type = 2; +- entry->i2c_index = LEGACY_I2C_PANEL; +- entry->heads = twoHeads ? 3 : 1; +- entry->location = !DCB_LOC_ON_CHIP; /* ie OFF CHIP */ +- entry->or = 1; /* means |0x10 gets set on CRE_LCD__INDEX */ +- entry->duallink_possible = false; /* SiI164 and co. are single link */ +- +-#if 0 +- /* +- * For dvi-a either crtc probably works, but my card appears to only +- * support dvi-d. "nvidia" still attempts to program it for dvi-a, +- * doing the full fp output setup (program 0x6808.. fp dimension regs, +- * setting 0x680848 to 0x10000111 to enable, maybe setting 0x680880); +- * the monitor picks up the mode res ok and lights up, but no pixel +- * data appears, so the board manufacturer probably connected up the +- * sync lines, but missed the video traces / components +- * +- * with this introduction, dvi-a left as an exercise for the reader. +- */ +- fabricate_vga_output(dcb, LEGACY_I2C_PANEL, entry->heads); +-#endif +-} +- +-static void fabricate_tv_output(struct dcb_table *dcb, bool twoHeads) +-{ +- struct dcb_entry *entry = new_dcb_entry(dcb); +- +- entry->type = 1; +- entry->i2c_index = LEGACY_I2C_TV; +- entry->heads = twoHeads ? 3 : 1; +- entry->location = !DCB_LOC_ON_CHIP; /* ie OFF CHIP */ ++ if (type != OUTPUT_ANALOG) ++ entry->location = !DCB_LOC_ON_CHIP; /* ie OFF CHIP */ ++ entry->or = or; + } + + static bool +@@ -6365,8 +6329,36 @@ + return true; + } + ++static void ++fabricate_dcb_encoder_table(struct drm_device *dev, struct nvbios *bios) ++{ ++ struct dcb_table *dcb = &bios->dcb; ++ int all_heads = (nv_two_heads(dev) ? 3 : 1); ++ ++#ifdef __powerpc__ ++ /* Apple iMac G4 NV17 */ ++ if (of_machine_is_compatible("PowerMac4,5")) { ++ fabricate_dcb_output(dcb, OUTPUT_TMDS, 0, all_heads, 1); ++ fabricate_dcb_output(dcb, OUTPUT_ANALOG, 1, all_heads, 2); ++ return; ++ } ++#endif ++ ++ /* Make up some sane defaults */ ++ fabricate_dcb_output(dcb, OUTPUT_ANALOG, LEGACY_I2C_CRT, 1, 1); ++ ++ if (nv04_tv_identify(dev, bios->legacy.i2c_indices.tv) >= 0) ++ fabricate_dcb_output(dcb, OUTPUT_TV, LEGACY_I2C_TV, ++ all_heads, 0); ++ ++ else if (bios->tmds.output0_script_ptr || ++ bios->tmds.output1_script_ptr) ++ fabricate_dcb_output(dcb, OUTPUT_TMDS, LEGACY_I2C_PANEL, ++ all_heads, 1); ++} ++ + static int +-parse_dcb_table(struct drm_device *dev, struct nvbios *bios, bool twoHeads) ++parse_dcb_table(struct drm_device *dev, struct nvbios *bios) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct dcb_table *dcb = &bios->dcb; +@@ -6386,12 +6378,7 @@ + + /* this situation likely means a really old card, pre DCB */ + if (dcbptr == 0x0) { +- NV_INFO(dev, "Assuming a CRT output exists\n"); +- fabricate_vga_output(dcb, LEGACY_I2C_CRT, 1); +- +- if (nv04_tv_identify(dev, bios->legacy.i2c_indices.tv) >= 0) +- fabricate_tv_output(dcb, twoHeads); +- ++ fabricate_dcb_encoder_table(dev, bios); + return 0; + } + +@@ -6451,21 +6438,7 @@ + */ + NV_TRACEWARN(dev, "No useful information in BIOS output table; " + "adding all possible outputs\n"); +- fabricate_vga_output(dcb, LEGACY_I2C_CRT, 1); +- +- /* +- * Attempt to detect TV before DVI because the test +- * for the former is more accurate and it rules the +- * latter out. +- */ +- if (nv04_tv_identify(dev, +- bios->legacy.i2c_indices.tv) >= 0) +- fabricate_tv_output(dcb, twoHeads); +- +- else if (bios->tmds.output0_script_ptr || +- bios->tmds.output1_script_ptr) +- fabricate_dvi_i_output(dcb, twoHeads); +- ++ fabricate_dcb_encoder_table(dev, bios); + return 0; + } + +@@ -6859,7 +6832,7 @@ + if (ret) + return ret; + +- ret = parse_dcb_table(dev, bios, nv_two_heads(dev)); ++ ret = parse_dcb_table(dev, bios); + if (ret) + return ret; + +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_bo.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_bo.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_bo.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_bo.c 2010-11-22 06:33:32.000000000 +0100 +@@ -46,9 +46,7 @@ + if (unlikely(nvbo->gem)) + DRM_ERROR("bo %p still attached to GEM object\n", bo); + +- if (nvbo->tile) +- nv10_mem_expire_tiling(dev, nvbo->tile, NULL); +- ++ nv10_mem_put_tile_region(dev, nvbo->tile, NULL); + kfree(nvbo); + } + +@@ -426,8 +424,9 @@ + switch (dev_priv->gart_info.type) { + case NOUVEAU_GART_AGP: + man->flags = TTM_MEMTYPE_FLAG_MAPPABLE; +- man->available_caching = TTM_PL_FLAG_UNCACHED; +- man->default_caching = TTM_PL_FLAG_UNCACHED; ++ man->available_caching = TTM_PL_FLAG_UNCACHED | ++ TTM_PL_FLAG_WC; ++ man->default_caching = TTM_PL_FLAG_WC; + break; + case NOUVEAU_GART_SGDMA: + man->flags = TTM_MEMTYPE_FLAG_MAPPABLE | +@@ -485,16 +484,9 @@ + if (ret) + return ret; + +- if (nvbo->channel) { +- ret = nouveau_fence_sync(fence, nvbo->channel); +- if (ret) +- goto out; +- } +- + ret = ttm_bo_move_accel_cleanup(&nvbo->bo, fence, NULL, evict, + no_wait_reserve, no_wait_gpu, new_mem); +-out: +- nouveau_fence_unref((void *)&fence); ++ nouveau_fence_unref(&fence); + return ret; + } + +@@ -683,17 +675,24 @@ + int ret; + + chan = nvbo->channel; +- if (!chan || nvbo->no_vm) ++ if (!chan || nvbo->no_vm) { + chan = dev_priv->channel; ++ mutex_lock_nested(&chan->mutex, NOUVEAU_KCHANNEL_MUTEX); ++ } + + if (dev_priv->card_type < NV_50) + ret = nv04_bo_move_m2mf(chan, bo, &bo->mem, new_mem); + else + ret = nv50_bo_move_m2mf(chan, bo, &bo->mem, new_mem); +- if (ret) +- return ret; ++ if (ret == 0) { ++ ret = nouveau_bo_move_accel_cleanup(chan, nvbo, evict, ++ no_wait_reserve, ++ no_wait_gpu, new_mem); ++ } + +- return nouveau_bo_move_accel_cleanup(chan, nvbo, evict, no_wait_reserve, no_wait_gpu, new_mem); ++ if (chan == dev_priv->channel) ++ mutex_unlock(&chan->mutex); ++ return ret; + } + + static int +@@ -792,7 +791,8 @@ + + } else if (dev_priv->card_type >= NV_10) { + *new_tile = nv10_mem_set_tiling(dev, offset, new_mem->size, +- nvbo->tile_mode); ++ nvbo->tile_mode, ++ nvbo->tile_flags); + } + + return 0; +@@ -808,9 +808,7 @@ + + if (dev_priv->card_type >= NV_10 && + dev_priv->card_type < NV_50) { +- if (*old_tile) +- nv10_mem_expire_tiling(dev, *old_tile, bo->sync_obj); +- ++ nv10_mem_put_tile_region(dev, *old_tile, bo->sync_obj); + *old_tile = new_tile; + } + } +@@ -942,6 +940,22 @@ + return ttm_bo_validate(bo, &nvbo->placement, false, true, false); + } + ++void ++nouveau_bo_fence(struct nouveau_bo *nvbo, struct nouveau_fence *fence) ++{ ++ struct nouveau_fence *old_fence; ++ ++ if (likely(fence)) ++ nouveau_fence_ref(fence); ++ ++ spin_lock(&nvbo->bo.lock); ++ old_fence = nvbo->bo.sync_obj; ++ nvbo->bo.sync_obj = fence; ++ spin_unlock(&nvbo->bo.lock); ++ ++ nouveau_fence_unref(&old_fence); ++} ++ + struct ttm_bo_driver nouveau_bo_driver = { + .create_ttm_backend_entry = nouveau_bo_create_ttm_backend_entry, + .invalidate_caches = nouveau_bo_invalidate_caches, +@@ -949,11 +963,11 @@ + .evict_flags = nouveau_bo_evict_flags, + .move = nouveau_bo_move, + .verify_access = nouveau_bo_verify_access, +- .sync_obj_signaled = nouveau_fence_signalled, +- .sync_obj_wait = nouveau_fence_wait, +- .sync_obj_flush = nouveau_fence_flush, +- .sync_obj_unref = nouveau_fence_unref, +- .sync_obj_ref = nouveau_fence_ref, ++ .sync_obj_signaled = __nouveau_fence_signalled, ++ .sync_obj_wait = __nouveau_fence_wait, ++ .sync_obj_flush = __nouveau_fence_flush, ++ .sync_obj_unref = __nouveau_fence_unref, ++ .sync_obj_ref = __nouveau_fence_ref, + .fault_reserve_notify = &nouveau_ttm_fault_reserve_notify, + .io_mem_reserve = &nouveau_ttm_io_mem_reserve, + .io_mem_free = &nouveau_ttm_io_mem_free, +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_channel.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_channel.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_channel.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_channel.c 2010-11-22 06:33:32.000000000 +0100 +@@ -39,22 +39,22 @@ + + if (dev_priv->card_type >= NV_50) { + ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, 0, +- dev_priv->vm_end, NV_DMA_ACCESS_RO, +- NV_DMA_TARGET_AGP, &pushbuf); ++ dev_priv->vm_end, NV_MEM_ACCESS_RO, ++ NV_MEM_TARGET_VM, &pushbuf); + chan->pushbuf_base = pb->bo.offset; + } else + if (pb->bo.mem.mem_type == TTM_PL_TT) { +- ret = nouveau_gpuobj_gart_dma_new(chan, 0, +- dev_priv->gart_info.aper_size, +- NV_DMA_ACCESS_RO, &pushbuf, +- NULL); ++ ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, 0, ++ dev_priv->gart_info.aper_size, ++ NV_MEM_ACCESS_RO, ++ NV_MEM_TARGET_GART, &pushbuf); + chan->pushbuf_base = pb->bo.mem.start << PAGE_SHIFT; + } else + if (dev_priv->card_type != NV_04) { + ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, 0, + dev_priv->fb_available_size, +- NV_DMA_ACCESS_RO, +- NV_DMA_TARGET_VIDMEM, &pushbuf); ++ NV_MEM_ACCESS_RO, ++ NV_MEM_TARGET_VRAM, &pushbuf); + chan->pushbuf_base = pb->bo.mem.start << PAGE_SHIFT; + } else { + /* NV04 cmdbuf hack, from original ddx.. not sure of it's +@@ -62,11 +62,10 @@ + * VRAM. + */ + ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, +- pci_resource_start(dev->pdev, +- 1), ++ pci_resource_start(dev->pdev, 1), + dev_priv->fb_available_size, +- NV_DMA_ACCESS_RO, +- NV_DMA_TARGET_PCI, &pushbuf); ++ NV_MEM_ACCESS_RO, ++ NV_MEM_TARGET_PCI, &pushbuf); + chan->pushbuf_base = pb->bo.mem.start << PAGE_SHIFT; + } + +@@ -107,53 +106,56 @@ + int + nouveau_channel_alloc(struct drm_device *dev, struct nouveau_channel **chan_ret, + struct drm_file *file_priv, +- uint32_t vram_handle, uint32_t tt_handle) ++ uint32_t vram_handle, uint32_t gart_handle) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; + struct nouveau_fifo_engine *pfifo = &dev_priv->engine.fifo; + struct nouveau_channel *chan; +- int channel, user; +- int ret; ++ unsigned long flags; ++ int user, ret; + +- /* +- * Alright, here is the full story +- * Nvidia cards have multiple hw fifo contexts (praise them for that, +- * no complicated crash-prone context switches) +- * We allocate a new context for each app and let it write to it +- * directly (woo, full userspace command submission !) +- * When there are no more contexts, you lost +- */ +- for (channel = 0; channel < pfifo->channels; channel++) { +- if (dev_priv->fifos[channel] == NULL) ++ /* allocate and lock channel structure */ ++ chan = kzalloc(sizeof(*chan), GFP_KERNEL); ++ if (!chan) ++ return -ENOMEM; ++ chan->dev = dev; ++ chan->file_priv = file_priv; ++ chan->vram_handle = vram_handle; ++ chan->gart_handle = gart_handle; ++ ++ kref_init(&chan->ref); ++ atomic_set(&chan->users, 1); ++ mutex_init(&chan->mutex); ++ mutex_lock(&chan->mutex); ++ ++ /* allocate hw channel id */ ++ spin_lock_irqsave(&dev_priv->channels.lock, flags); ++ for (chan->id = 0; chan->id < pfifo->channels; chan->id++) { ++ if (!dev_priv->channels.ptr[chan->id]) { ++ nouveau_channel_ref(chan, &dev_priv->channels.ptr[chan->id]); + break; ++ } + } ++ spin_unlock_irqrestore(&dev_priv->channels.lock, flags); + +- /* no more fifos. you lost. */ +- if (channel == pfifo->channels) +- return -EINVAL; ++ if (chan->id == pfifo->channels) { ++ mutex_unlock(&chan->mutex); ++ kfree(chan); ++ return -ENODEV; ++ } + +- dev_priv->fifos[channel] = kzalloc(sizeof(struct nouveau_channel), +- GFP_KERNEL); +- if (!dev_priv->fifos[channel]) +- return -ENOMEM; +- chan = dev_priv->fifos[channel]; ++ NV_DEBUG(dev, "initialising channel %d\n", chan->id); + INIT_LIST_HEAD(&chan->nvsw.vbl_wait); ++ INIT_LIST_HEAD(&chan->nvsw.flip); + INIT_LIST_HEAD(&chan->fence.pending); +- chan->dev = dev; +- chan->id = channel; +- chan->file_priv = file_priv; +- chan->vram_handle = vram_handle; +- chan->gart_handle = tt_handle; +- +- NV_INFO(dev, "Allocating FIFO number %d\n", channel); + + /* Allocate DMA push buffer */ + chan->pushbuf_bo = nouveau_channel_user_pushbuf_alloc(dev); + if (!chan->pushbuf_bo) { + ret = -ENOMEM; + NV_ERROR(dev, "pushbuf %d\n", ret); +- nouveau_channel_free(chan); ++ nouveau_channel_put(&chan); + return ret; + } + +@@ -161,18 +163,18 @@ + + /* Locate channel's user control regs */ + if (dev_priv->card_type < NV_40) +- user = NV03_USER(channel); ++ user = NV03_USER(chan->id); + else + if (dev_priv->card_type < NV_50) +- user = NV40_USER(channel); ++ user = NV40_USER(chan->id); + else +- user = NV50_USER(channel); ++ user = NV50_USER(chan->id); + + chan->user = ioremap(pci_resource_start(dev->pdev, 0) + user, + PAGE_SIZE); + if (!chan->user) { + NV_ERROR(dev, "ioremap of regs failed.\n"); +- nouveau_channel_free(chan); ++ nouveau_channel_put(&chan); + return -ENOMEM; + } + chan->user_put = 0x40; +@@ -182,15 +184,15 @@ + ret = nouveau_notifier_init_channel(chan); + if (ret) { + NV_ERROR(dev, "ntfy %d\n", ret); +- nouveau_channel_free(chan); ++ nouveau_channel_put(&chan); + return ret; + } + + /* Setup channel's default objects */ +- ret = nouveau_gpuobj_channel_init(chan, vram_handle, tt_handle); ++ ret = nouveau_gpuobj_channel_init(chan, vram_handle, gart_handle); + if (ret) { + NV_ERROR(dev, "gpuobj %d\n", ret); +- nouveau_channel_free(chan); ++ nouveau_channel_put(&chan); + return ret; + } + +@@ -198,7 +200,7 @@ + ret = nouveau_channel_pushbuf_ctxdma_init(chan); + if (ret) { + NV_ERROR(dev, "pbctxdma %d\n", ret); +- nouveau_channel_free(chan); ++ nouveau_channel_put(&chan); + return ret; + } + +@@ -206,16 +208,18 @@ + pfifo->reassign(dev, false); + + /* Create a graphics context for new channel */ +- ret = pgraph->create_context(chan); +- if (ret) { +- nouveau_channel_free(chan); +- return ret; ++ if (dev_priv->card_type < NV_50) { ++ ret = pgraph->create_context(chan); ++ if (ret) { ++ nouveau_channel_put(&chan); ++ return ret; ++ } + } + + /* Construct inital RAMFC for new channel */ + ret = pfifo->create_context(chan); + if (ret) { +- nouveau_channel_free(chan); ++ nouveau_channel_put(&chan); + return ret; + } + +@@ -225,83 +229,108 @@ + if (!ret) + ret = nouveau_fence_channel_init(chan); + if (ret) { +- nouveau_channel_free(chan); ++ nouveau_channel_put(&chan); + return ret; + } + + nouveau_debugfs_channel_init(chan); + +- NV_INFO(dev, "%s: initialised FIFO %d\n", __func__, channel); ++ NV_DEBUG(dev, "channel %d initialised\n", chan->id); + *chan_ret = chan; + return 0; + } + +-/* stops a fifo */ ++struct nouveau_channel * ++nouveau_channel_get_unlocked(struct nouveau_channel *ref) ++{ ++ struct nouveau_channel *chan = NULL; ++ ++ if (likely(ref && atomic_inc_not_zero(&ref->users))) ++ nouveau_channel_ref(ref, &chan); ++ ++ return chan; ++} ++ ++struct nouveau_channel * ++nouveau_channel_get(struct drm_device *dev, struct drm_file *file_priv, int id) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_channel *chan; ++ unsigned long flags; ++ ++ spin_lock_irqsave(&dev_priv->channels.lock, flags); ++ chan = nouveau_channel_get_unlocked(dev_priv->channels.ptr[id]); ++ spin_unlock_irqrestore(&dev_priv->channels.lock, flags); ++ ++ if (unlikely(!chan)) ++ return ERR_PTR(-EINVAL); ++ ++ if (unlikely(file_priv && chan->file_priv != file_priv)) { ++ nouveau_channel_put_unlocked(&chan); ++ return ERR_PTR(-EINVAL); ++ } ++ ++ mutex_lock(&chan->mutex); ++ return chan; ++} ++ + void +-nouveau_channel_free(struct nouveau_channel *chan) ++nouveau_channel_put_unlocked(struct nouveau_channel **pchan) + { ++ struct nouveau_channel *chan = *pchan; + struct drm_device *dev = chan->dev; + struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; + struct nouveau_fifo_engine *pfifo = &dev_priv->engine.fifo; ++ struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; ++ struct nouveau_crypt_engine *pcrypt = &dev_priv->engine.crypt; + unsigned long flags; +- int ret; + +- NV_INFO(dev, "%s: freeing fifo %d\n", __func__, chan->id); ++ /* decrement the refcount, and we're done if there's still refs */ ++ if (likely(!atomic_dec_and_test(&chan->users))) { ++ nouveau_channel_ref(NULL, pchan); ++ return; ++ } + ++ /* noone wants the channel anymore */ ++ NV_DEBUG(dev, "freeing channel %d\n", chan->id); + nouveau_debugfs_channel_fini(chan); + +- /* Give outstanding push buffers a chance to complete */ +- nouveau_fence_update(chan); +- if (chan->fence.sequence != chan->fence.sequence_ack) { +- struct nouveau_fence *fence = NULL; +- +- ret = nouveau_fence_new(chan, &fence, true); +- if (ret == 0) { +- ret = nouveau_fence_wait(fence, NULL, false, false); +- nouveau_fence_unref((void *)&fence); +- } +- +- if (ret) +- NV_ERROR(dev, "Failed to idle channel %d.\n", chan->id); +- } ++ /* give it chance to idle */ ++ nouveau_channel_idle(chan); + +- /* Ensure all outstanding fences are signaled. They should be if the ++ /* ensure all outstanding fences are signaled. they should be if the + * above attempts at idling were OK, but if we failed this'll tell TTM + * we're done with the buffers. + */ + nouveau_fence_channel_fini(chan); + +- /* This will prevent pfifo from switching channels. */ ++ /* boot it off the hardware */ + pfifo->reassign(dev, false); + +- /* We want to give pgraph a chance to idle and get rid of all potential +- * errors. We need to do this before the lock, otherwise the irq handler +- * is unable to process them. ++ /* We want to give pgraph a chance to idle and get rid of all ++ * potential errors. We need to do this without the context ++ * switch lock held, otherwise the irq handler is unable to ++ * process them. + */ + if (pgraph->channel(dev) == chan) + nouveau_wait_for_idle(dev); + +- spin_lock_irqsave(&dev_priv->context_switch_lock, flags); +- +- pgraph->fifo_access(dev, false); +- if (pgraph->channel(dev) == chan) +- pgraph->unload_context(dev); +- pgraph->destroy_context(chan); +- pgraph->fifo_access(dev, true); +- +- if (pfifo->channel_id(dev) == chan->id) { +- pfifo->disable(dev); +- pfifo->unload_context(dev); +- pfifo->enable(dev); +- } ++ /* destroy the engine specific contexts */ + pfifo->destroy_context(chan); ++ pgraph->destroy_context(chan); ++ if (pcrypt->destroy_context) ++ pcrypt->destroy_context(chan); + + pfifo->reassign(dev, true); + +- spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); ++ /* aside from its resources, the channel should now be dead, ++ * remove it from the channel list ++ */ ++ spin_lock_irqsave(&dev_priv->channels.lock, flags); ++ nouveau_channel_ref(NULL, &dev_priv->channels.ptr[chan->id]); ++ spin_unlock_irqrestore(&dev_priv->channels.lock, flags); + +- /* Release the channel's resources */ ++ /* destroy any resources the channel owned */ + nouveau_gpuobj_ref(NULL, &chan->pushbuf); + if (chan->pushbuf_bo) { + nouveau_bo_unmap(chan->pushbuf_bo); +@@ -310,44 +339,83 @@ + } + nouveau_gpuobj_channel_takedown(chan); + nouveau_notifier_takedown_channel(chan); ++ ++ nouveau_channel_ref(NULL, pchan); ++} ++ ++void ++nouveau_channel_put(struct nouveau_channel **pchan) ++{ ++ mutex_unlock(&(*pchan)->mutex); ++ nouveau_channel_put_unlocked(pchan); ++} ++ ++static void ++nouveau_channel_del(struct kref *ref) ++{ ++ struct nouveau_channel *chan = ++ container_of(ref, struct nouveau_channel, ref); ++ + if (chan->user) + iounmap(chan->user); + +- dev_priv->fifos[chan->id] = NULL; + kfree(chan); + } + ++void ++nouveau_channel_ref(struct nouveau_channel *chan, ++ struct nouveau_channel **pchan) ++{ ++ if (chan) ++ kref_get(&chan->ref); ++ ++ if (*pchan) ++ kref_put(&(*pchan)->ref, nouveau_channel_del); ++ ++ *pchan = chan; ++} ++ ++void ++nouveau_channel_idle(struct nouveau_channel *chan) ++{ ++ struct drm_device *dev = chan->dev; ++ struct nouveau_fence *fence = NULL; ++ int ret; ++ ++ nouveau_fence_update(chan); ++ ++ if (chan->fence.sequence != chan->fence.sequence_ack) { ++ ret = nouveau_fence_new(chan, &fence, true); ++ if (!ret) { ++ ret = nouveau_fence_wait(fence, false, false); ++ nouveau_fence_unref(&fence); ++ } ++ ++ if (ret) ++ NV_ERROR(dev, "Failed to idle channel %d.\n", chan->id); ++ } ++} ++ + /* cleans up all the fifos from file_priv */ + void + nouveau_channel_cleanup(struct drm_device *dev, struct drm_file *file_priv) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_engine *engine = &dev_priv->engine; ++ struct nouveau_channel *chan; + int i; + + NV_DEBUG(dev, "clearing FIFO enables from file_priv\n"); + for (i = 0; i < engine->fifo.channels; i++) { +- struct nouveau_channel *chan = dev_priv->fifos[i]; ++ chan = nouveau_channel_get(dev, file_priv, i); ++ if (IS_ERR(chan)) ++ continue; + +- if (chan && chan->file_priv == file_priv) +- nouveau_channel_free(chan); ++ atomic_dec(&chan->users); ++ nouveau_channel_put(&chan); + } + } + +-int +-nouveau_channel_owner(struct drm_device *dev, struct drm_file *file_priv, +- int channel) +-{ +- struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_engine *engine = &dev_priv->engine; +- +- if (channel >= engine->fifo.channels) +- return 0; +- if (dev_priv->fifos[channel] == NULL) +- return 0; +- +- return (dev_priv->fifos[channel]->file_priv == file_priv); +-} + + /*********************************** + * ioctls wrapping the functions +@@ -395,24 +463,26 @@ + /* Named memory object area */ + ret = drm_gem_handle_create(file_priv, chan->notifier_bo->gem, + &init->notifier_handle); +- if (ret) { +- nouveau_channel_free(chan); +- return ret; +- } + +- return 0; ++ if (ret == 0) ++ atomic_inc(&chan->users); /* userspace reference */ ++ nouveau_channel_put(&chan); ++ return ret; + } + + static int + nouveau_ioctl_fifo_free(struct drm_device *dev, void *data, + struct drm_file *file_priv) + { +- struct drm_nouveau_channel_free *cfree = data; ++ struct drm_nouveau_channel_free *req = data; + struct nouveau_channel *chan; + +- NOUVEAU_GET_USER_CHANNEL_WITH_RETURN(cfree->channel, file_priv, chan); ++ chan = nouveau_channel_get(dev, file_priv, req->channel); ++ if (IS_ERR(chan)) ++ return PTR_ERR(chan); + +- nouveau_channel_free(chan); ++ atomic_dec(&chan->users); ++ nouveau_channel_put(&chan); + return 0; + } + +@@ -421,18 +491,18 @@ + ***********************************/ + + struct drm_ioctl_desc nouveau_ioctls[] = { +- DRM_IOCTL_DEF_DRV(NOUVEAU_GETPARAM, nouveau_ioctl_getparam, DRM_AUTH), +- DRM_IOCTL_DEF_DRV(NOUVEAU_SETPARAM, nouveau_ioctl_setparam, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), +- DRM_IOCTL_DEF_DRV(NOUVEAU_CHANNEL_ALLOC, nouveau_ioctl_fifo_alloc, DRM_AUTH), +- DRM_IOCTL_DEF_DRV(NOUVEAU_CHANNEL_FREE, nouveau_ioctl_fifo_free, DRM_AUTH), +- DRM_IOCTL_DEF_DRV(NOUVEAU_GROBJ_ALLOC, nouveau_ioctl_grobj_alloc, DRM_AUTH), +- DRM_IOCTL_DEF_DRV(NOUVEAU_NOTIFIEROBJ_ALLOC, nouveau_ioctl_notifier_alloc, DRM_AUTH), +- DRM_IOCTL_DEF_DRV(NOUVEAU_GPUOBJ_FREE, nouveau_ioctl_gpuobj_free, DRM_AUTH), +- DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_NEW, nouveau_gem_ioctl_new, DRM_AUTH), +- DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_PUSHBUF, nouveau_gem_ioctl_pushbuf, DRM_AUTH), +- DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_CPU_PREP, nouveau_gem_ioctl_cpu_prep, DRM_AUTH), +- DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_CPU_FINI, nouveau_gem_ioctl_cpu_fini, DRM_AUTH), +- DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_INFO, nouveau_gem_ioctl_info, DRM_AUTH), ++ DRM_IOCTL_DEF_DRV(NOUVEAU_GETPARAM, nouveau_ioctl_getparam, DRM_UNLOCKED|DRM_AUTH), ++ DRM_IOCTL_DEF_DRV(NOUVEAU_SETPARAM, nouveau_ioctl_setparam, DRM_UNLOCKED|DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), ++ DRM_IOCTL_DEF_DRV(NOUVEAU_CHANNEL_ALLOC, nouveau_ioctl_fifo_alloc, DRM_UNLOCKED|DRM_AUTH), ++ DRM_IOCTL_DEF_DRV(NOUVEAU_CHANNEL_FREE, nouveau_ioctl_fifo_free, DRM_UNLOCKED|DRM_AUTH), ++ DRM_IOCTL_DEF_DRV(NOUVEAU_GROBJ_ALLOC, nouveau_ioctl_grobj_alloc, DRM_UNLOCKED|DRM_AUTH), ++ DRM_IOCTL_DEF_DRV(NOUVEAU_NOTIFIEROBJ_ALLOC, nouveau_ioctl_notifier_alloc, DRM_UNLOCKED|DRM_AUTH), ++ DRM_IOCTL_DEF_DRV(NOUVEAU_GPUOBJ_FREE, nouveau_ioctl_gpuobj_free, DRM_UNLOCKED|DRM_AUTH), ++ DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_NEW, nouveau_gem_ioctl_new, DRM_UNLOCKED|DRM_AUTH), ++ DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_PUSHBUF, nouveau_gem_ioctl_pushbuf, DRM_UNLOCKED|DRM_AUTH), ++ DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_CPU_PREP, nouveau_gem_ioctl_cpu_prep, DRM_UNLOCKED|DRM_AUTH), ++ DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_CPU_FINI, nouveau_gem_ioctl_cpu_fini, DRM_UNLOCKED|DRM_AUTH), ++ DRM_IOCTL_DEF_DRV(NOUVEAU_GEM_INFO, nouveau_gem_ioctl_info, DRM_UNLOCKED|DRM_AUTH), + }; + + int nouveau_max_ioctl = DRM_ARRAY_SIZE(nouveau_ioctls); +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_connector.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_connector.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_connector.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_connector.c 2010-11-22 06:33:32.000000000 +0100 +@@ -37,6 +37,8 @@ + #include "nouveau_connector.h" + #include "nouveau_hw.h" + ++static void nouveau_connector_hotplug(void *, int); ++ + static struct nouveau_encoder * + find_encoder_by_type(struct drm_connector *connector, int type) + { +@@ -94,22 +96,30 @@ + } + + static void +-nouveau_connector_destroy(struct drm_connector *drm_connector) ++nouveau_connector_destroy(struct drm_connector *connector) + { +- struct nouveau_connector *nv_connector = +- nouveau_connector(drm_connector); ++ struct nouveau_connector *nv_connector = nouveau_connector(connector); ++ struct drm_nouveau_private *dev_priv; ++ struct nouveau_gpio_engine *pgpio; + struct drm_device *dev; + + if (!nv_connector) + return; + + dev = nv_connector->base.dev; ++ dev_priv = dev->dev_private; + NV_DEBUG_KMS(dev, "\n"); + ++ pgpio = &dev_priv->engine.gpio; ++ if (pgpio->irq_unregister) { ++ pgpio->irq_unregister(dev, nv_connector->dcb->gpio_tag, ++ nouveau_connector_hotplug, connector); ++ } ++ + kfree(nv_connector->edid); +- drm_sysfs_connector_remove(drm_connector); +- drm_connector_cleanup(drm_connector); +- kfree(drm_connector); ++ drm_sysfs_connector_remove(connector); ++ drm_connector_cleanup(connector); ++ kfree(connector); + } + + static struct nouveau_i2c_chan * +@@ -760,6 +770,7 @@ + { + const struct drm_connector_funcs *funcs = &nouveau_connector_funcs; + struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_gpio_engine *pgpio = &dev_priv->engine.gpio; + struct nouveau_connector *nv_connector = NULL; + struct dcb_connector_table_entry *dcb = NULL; + struct drm_connector *connector; +@@ -876,6 +887,11 @@ + break; + } + ++ if (pgpio->irq_register) { ++ pgpio->irq_register(dev, nv_connector->dcb->gpio_tag, ++ nouveau_connector_hotplug, connector); ++ } ++ + drm_sysfs_connector_add(connector); + dcb->drm = connector; + return dcb->drm; +@@ -886,3 +902,29 @@ + return ERR_PTR(ret); + + } ++ ++static void ++nouveau_connector_hotplug(void *data, int plugged) ++{ ++ struct drm_connector *connector = data; ++ struct drm_device *dev = connector->dev; ++ ++ NV_INFO(dev, "%splugged %s\n", plugged ? "" : "un", ++ drm_get_connector_name(connector)); ++ ++ if (connector->encoder && connector->encoder->crtc && ++ connector->encoder->crtc->enabled) { ++ struct nouveau_encoder *nv_encoder = nouveau_encoder(connector->encoder); ++ struct drm_encoder_helper_funcs *helper = ++ connector->encoder->helper_private; ++ ++ if (nv_encoder->dcb->type == OUTPUT_DP) { ++ if (plugged) ++ helper->dpms(connector->encoder, DRM_MODE_DPMS_ON); ++ else ++ helper->dpms(connector->encoder, DRM_MODE_DPMS_OFF); ++ } ++ } ++ ++ drm_helper_hpd_irq_event(dev); ++} +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_display.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_display.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_display.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_display.c 2010-11-22 06:33:32.000000000 +0100 +@@ -29,6 +29,9 @@ + #include "nouveau_drv.h" + #include "nouveau_fb.h" + #include "nouveau_fbcon.h" ++#include "nouveau_hw.h" ++#include "nouveau_crtc.h" ++#include "nouveau_dma.h" + + static void + nouveau_user_framebuffer_destroy(struct drm_framebuffer *drm_fb) +@@ -104,3 +107,207 @@ + .output_poll_changed = nouveau_fbcon_output_poll_changed, + }; + ++int ++nouveau_vblank_enable(struct drm_device *dev, int crtc) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ ++ if (dev_priv->card_type >= NV_50) ++ nv_mask(dev, NV50_PDISPLAY_INTR_EN_1, 0, ++ NV50_PDISPLAY_INTR_EN_1_VBLANK_CRTC_(crtc)); ++ else ++ NVWriteCRTC(dev, crtc, NV_PCRTC_INTR_EN_0, ++ NV_PCRTC_INTR_0_VBLANK); ++ ++ return 0; ++} ++ ++void ++nouveau_vblank_disable(struct drm_device *dev, int crtc) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ ++ if (dev_priv->card_type >= NV_50) ++ nv_mask(dev, NV50_PDISPLAY_INTR_EN_1, ++ NV50_PDISPLAY_INTR_EN_1_VBLANK_CRTC_(crtc), 0); ++ else ++ NVWriteCRTC(dev, crtc, NV_PCRTC_INTR_EN_0, 0); ++} ++ ++static int ++nouveau_page_flip_reserve(struct nouveau_bo *old_bo, ++ struct nouveau_bo *new_bo) ++{ ++ int ret; ++ ++ ret = nouveau_bo_pin(new_bo, TTM_PL_FLAG_VRAM); ++ if (ret) ++ return ret; ++ ++ ret = ttm_bo_reserve(&new_bo->bo, false, false, false, 0); ++ if (ret) ++ goto fail; ++ ++ ret = ttm_bo_reserve(&old_bo->bo, false, false, false, 0); ++ if (ret) ++ goto fail_unreserve; ++ ++ return 0; ++ ++fail_unreserve: ++ ttm_bo_unreserve(&new_bo->bo); ++fail: ++ nouveau_bo_unpin(new_bo); ++ return ret; ++} ++ ++static void ++nouveau_page_flip_unreserve(struct nouveau_bo *old_bo, ++ struct nouveau_bo *new_bo, ++ struct nouveau_fence *fence) ++{ ++ nouveau_bo_fence(new_bo, fence); ++ ttm_bo_unreserve(&new_bo->bo); ++ ++ nouveau_bo_fence(old_bo, fence); ++ ttm_bo_unreserve(&old_bo->bo); ++ ++ nouveau_bo_unpin(old_bo); ++} ++ ++static int ++nouveau_page_flip_emit(struct nouveau_channel *chan, ++ struct nouveau_bo *old_bo, ++ struct nouveau_bo *new_bo, ++ struct nouveau_page_flip_state *s, ++ struct nouveau_fence **pfence) ++{ ++ struct drm_device *dev = chan->dev; ++ unsigned long flags; ++ int ret; ++ ++ /* Queue it to the pending list */ ++ spin_lock_irqsave(&dev->event_lock, flags); ++ list_add_tail(&s->head, &chan->nvsw.flip); ++ spin_unlock_irqrestore(&dev->event_lock, flags); ++ ++ /* Synchronize with the old framebuffer */ ++ ret = nouveau_fence_sync(old_bo->bo.sync_obj, chan); ++ if (ret) ++ goto fail; ++ ++ /* Emit the pageflip */ ++ ret = RING_SPACE(chan, 2); ++ if (ret) ++ goto fail; ++ ++ BEGIN_RING(chan, NvSubSw, NV_SW_PAGE_FLIP, 1); ++ OUT_RING(chan, 0); ++ FIRE_RING(chan); ++ ++ ret = nouveau_fence_new(chan, pfence, true); ++ if (ret) ++ goto fail; ++ ++ return 0; ++fail: ++ spin_lock_irqsave(&dev->event_lock, flags); ++ list_del(&s->head); ++ spin_unlock_irqrestore(&dev->event_lock, flags); ++ return ret; ++} ++ ++int ++nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, ++ struct drm_pending_vblank_event *event) ++{ ++ struct drm_device *dev = crtc->dev; ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_bo *old_bo = nouveau_framebuffer(crtc->fb)->nvbo; ++ struct nouveau_bo *new_bo = nouveau_framebuffer(fb)->nvbo; ++ struct nouveau_page_flip_state *s; ++ struct nouveau_channel *chan; ++ struct nouveau_fence *fence; ++ int ret; ++ ++ if (dev_priv->engine.graph.accel_blocked) ++ return -ENODEV; ++ ++ s = kzalloc(sizeof(*s), GFP_KERNEL); ++ if (!s) ++ return -ENOMEM; ++ ++ /* Don't let the buffers go away while we flip */ ++ ret = nouveau_page_flip_reserve(old_bo, new_bo); ++ if (ret) ++ goto fail_free; ++ ++ /* Initialize a page flip struct */ ++ *s = (struct nouveau_page_flip_state) ++ { { }, s->event, nouveau_crtc(crtc)->index, ++ fb->bits_per_pixel, fb->pitch, crtc->x, crtc->y, ++ new_bo->bo.offset }; ++ ++ /* Choose the channel the flip will be handled in */ ++ chan = nouveau_fence_channel(new_bo->bo.sync_obj); ++ if (!chan) ++ chan = nouveau_channel_get_unlocked(dev_priv->channel); ++ mutex_lock(&chan->mutex); ++ ++ /* Emit a page flip */ ++ ret = nouveau_page_flip_emit(chan, old_bo, new_bo, s, &fence); ++ nouveau_channel_put(&chan); ++ if (ret) ++ goto fail_unreserve; ++ ++ /* Update the crtc struct and cleanup */ ++ crtc->fb = fb; ++ ++ nouveau_page_flip_unreserve(old_bo, new_bo, fence); ++ nouveau_fence_unref(&fence); ++ return 0; ++ ++fail_unreserve: ++ nouveau_page_flip_unreserve(old_bo, new_bo, NULL); ++fail_free: ++ kfree(s); ++ return ret; ++} ++ ++int ++nouveau_finish_page_flip(struct nouveau_channel *chan, ++ struct nouveau_page_flip_state *ps) ++{ ++ struct drm_device *dev = chan->dev; ++ struct nouveau_page_flip_state *s; ++ unsigned long flags; ++ ++ spin_lock_irqsave(&dev->event_lock, flags); ++ ++ if (list_empty(&chan->nvsw.flip)) { ++ NV_ERROR(dev, "Unexpected pageflip in channel %d.\n", chan->id); ++ spin_unlock_irqrestore(&dev->event_lock, flags); ++ return -EINVAL; ++ } ++ ++ s = list_first_entry(&chan->nvsw.flip, ++ struct nouveau_page_flip_state, head); ++ if (s->event) { ++ struct drm_pending_vblank_event *e = s->event; ++ struct timeval now; ++ ++ do_gettimeofday(&now); ++ e->event.sequence = 0; ++ e->event.tv_sec = now.tv_sec; ++ e->event.tv_usec = now.tv_usec; ++ list_add_tail(&e->base.link, &e->base.file_priv->event_list); ++ wake_up_interruptible(&e->base.file_priv->event_wait); ++ } ++ ++ list_del(&s->head); ++ *ps = *s; ++ kfree(s); ++ ++ spin_unlock_irqrestore(&dev->event_lock, flags); ++ return 0; ++} +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_dp.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_dp.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_dp.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_dp.c 2010-11-22 06:33:32.000000000 +0100 +@@ -279,7 +279,7 @@ + struct bit_displayport_encoder_table *dpe; + int dpe_headerlen; + uint8_t config[4], status[3]; +- bool cr_done, cr_max_vs, eq_done; ++ bool cr_done, cr_max_vs, eq_done, hpd_state; + int ret = 0, i, tries, voltage; + + NV_DEBUG_KMS(dev, "link training!!\n"); +@@ -297,7 +297,7 @@ + /* disable hotplug detect, this flips around on some panels during + * link training. + */ +- pgpio->irq_enable(dev, nv_connector->dcb->gpio_tag, false); ++ hpd_state = pgpio->irq_enable(dev, nv_connector->dcb->gpio_tag, false); + + if (dpe->script0) { + NV_DEBUG_KMS(dev, "SOR-%d: running DP script 0\n", nv_encoder->or); +@@ -439,7 +439,7 @@ + } + + /* re-enable hotplug detect */ +- pgpio->irq_enable(dev, nv_connector->dcb->gpio_tag, true); ++ pgpio->irq_enable(dev, nv_connector->dcb->gpio_tag, hpd_state); + + return eq_done; + } +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_drv.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_drv.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.c 2010-11-22 06:33:32.000000000 +0100 +@@ -115,6 +115,10 @@ + int nouveau_perflvl_wr; + module_param_named(perflvl_wr, nouveau_perflvl_wr, int, 0400); + ++MODULE_PARM_DESC(msi, "Enable MSI (default: off)\n"); ++int nouveau_msi; ++module_param_named(msi, nouveau_msi, int, 0400); ++ + int nouveau_fbpercrtc; + #if 0 + module_param_named(fbpercrtc, nouveau_fbpercrtc, int, 0400); +@@ -193,23 +197,10 @@ + + NV_INFO(dev, "Idling channels...\n"); + for (i = 0; i < pfifo->channels; i++) { +- struct nouveau_fence *fence = NULL; +- +- chan = dev_priv->fifos[i]; +- if (!chan || (dev_priv->card_type >= NV_50 && +- chan == dev_priv->fifos[0])) +- continue; ++ chan = dev_priv->channels.ptr[i]; + +- ret = nouveau_fence_new(chan, &fence, true); +- if (ret == 0) { +- ret = nouveau_fence_wait(fence, NULL, false, false); +- nouveau_fence_unref((void *)&fence); +- } +- +- if (ret) { +- NV_ERROR(dev, "Failed to idle channel %d for suspend\n", +- chan->id); +- } ++ if (chan && chan->pushbuf_bo) ++ nouveau_channel_idle(chan); + } + + pgraph->fifo_access(dev, false); +@@ -219,17 +210,17 @@ + pfifo->unload_context(dev); + pgraph->unload_context(dev); + +- NV_INFO(dev, "Suspending GPU objects...\n"); +- ret = nouveau_gpuobj_suspend(dev); ++ ret = pinstmem->suspend(dev); + if (ret) { + NV_ERROR(dev, "... failed: %d\n", ret); + goto out_abort; + } + +- ret = pinstmem->suspend(dev); ++ NV_INFO(dev, "Suspending GPU objects...\n"); ++ ret = nouveau_gpuobj_suspend(dev); + if (ret) { + NV_ERROR(dev, "... failed: %d\n", ret); +- nouveau_gpuobj_suspend_cleanup(dev); ++ pinstmem->resume(dev); + goto out_abort; + } + +@@ -294,17 +285,18 @@ + } + } + ++ NV_INFO(dev, "Restoring GPU objects...\n"); ++ nouveau_gpuobj_resume(dev); ++ + NV_INFO(dev, "Reinitialising engines...\n"); + engine->instmem.resume(dev); + engine->mc.init(dev); + engine->timer.init(dev); + engine->fb.init(dev); + engine->graph.init(dev); ++ engine->crypt.init(dev); + engine->fifo.init(dev); + +- NV_INFO(dev, "Restoring GPU objects...\n"); +- nouveau_gpuobj_resume(dev); +- + nouveau_irq_postinstall(dev); + + /* Re-write SKIPS, they'll have been lost over the suspend */ +@@ -313,7 +305,7 @@ + int j; + + for (i = 0; i < dev_priv->engine.fifo.channels; i++) { +- chan = dev_priv->fifos[i]; ++ chan = dev_priv->channels.ptr[i]; + if (!chan || !chan->pushbuf_bo) + continue; + +@@ -393,6 +385,9 @@ + .irq_postinstall = nouveau_irq_postinstall, + .irq_uninstall = nouveau_irq_uninstall, + .irq_handler = nouveau_irq_handler, ++ .get_vblank_counter = drm_vblank_count, ++ .enable_vblank = nouveau_vblank_enable, ++ .disable_vblank = nouveau_vblank_disable, + .reclaim_buffers = drm_core_reclaim_buffers, + .ioctls = nouveau_ioctls, + .fops = { +@@ -403,6 +398,7 @@ + .mmap = nouveau_ttm_mmap, + .poll = drm_poll, + .fasync = drm_fasync, ++ .read = drm_read, + #if defined(CONFIG_COMPAT) + .compat_ioctl = nouveau_compat_ioctl, + #endif +@@ -448,6 +444,12 @@ + if (!nouveau_modeset) + return 0; + ++#if defined(CONFIG_FRAMEBUFFER_CONSOLE_MODULE) ++ request_module("fbcon"); ++#elif !defined(CONFIG_FRAMEBUFFER_CONSOLE) ++ printk(KERN_INFO "CONFIG_FRAMEBUFFER_CONSOLE was not enabled. You won't get any console output.\n"); ++#endif ++ + nouveau_register_dsm_handler(); + return drm_init(&driver); + } +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_drv.h linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.h +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_drv.h 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_drv.h 2010-11-22 06:33:32.000000000 +0100 +@@ -54,6 +54,7 @@ + #include "nouveau_drm.h" + #include "nouveau_reg.h" + #include "nouveau_bios.h" ++#include "nouveau_util.h" + struct nouveau_grctx; + + #define MAX_NUM_DCB_ENTRIES 16 +@@ -66,10 +67,13 @@ + #define NV50_VM_VRAM_NR (NV50_VM_MAX_VRAM / NV50_VM_BLOCK) + + struct nouveau_tile_reg { +- struct nouveau_fence *fence; +- uint32_t addr; +- uint32_t size; + bool used; ++ uint32_t addr; ++ uint32_t limit; ++ uint32_t pitch; ++ uint32_t zcomp; ++ struct drm_mm_node *tag_mem; ++ struct nouveau_fence *fence; + }; + + struct nouveau_bo { +@@ -96,7 +100,6 @@ + struct nouveau_tile_reg *tile; + + struct drm_gem_object *gem; +- struct drm_file *cpu_filp; + int pin_refcnt; + }; + +@@ -133,20 +136,26 @@ + + #define NVOBJ_ENGINE_SW 0 + #define NVOBJ_ENGINE_GR 1 +-#define NVOBJ_ENGINE_DISPLAY 2 ++#define NVOBJ_ENGINE_PPP 2 ++#define NVOBJ_ENGINE_COPY 3 ++#define NVOBJ_ENGINE_VP 4 ++#define NVOBJ_ENGINE_CRYPT 5 ++#define NVOBJ_ENGINE_BSP 6 ++#define NVOBJ_ENGINE_DISPLAY 0xcafe0001 + #define NVOBJ_ENGINE_INT 0xdeadbeef + + #define NVOBJ_FLAG_ZERO_ALLOC (1 << 1) + #define NVOBJ_FLAG_ZERO_FREE (1 << 2) ++ ++#define NVOBJ_CINST_GLOBAL 0xdeadbeef ++ + struct nouveau_gpuobj { + struct drm_device *dev; + struct kref refcount; + struct list_head list; + +- struct drm_mm_node *im_pramin; +- struct nouveau_bo *im_backing; +- uint32_t *im_backing_suspend; +- int im_bound; ++ void *node; ++ u32 *suspend; + + uint32_t flags; + +@@ -162,10 +171,29 @@ + void *priv; + }; + ++struct nouveau_page_flip_state { ++ struct list_head head; ++ struct drm_pending_vblank_event *event; ++ int crtc, bpp, pitch, x, y; ++ uint64_t offset; ++}; ++ ++enum nouveau_channel_mutex_class { ++ NOUVEAU_UCHANNEL_MUTEX, ++ NOUVEAU_KCHANNEL_MUTEX ++}; ++ + struct nouveau_channel { + struct drm_device *dev; + int id; + ++ /* references to the channel data structure */ ++ struct kref ref; ++ /* users of the hardware channel resources, the hardware ++ * context will be kicked off when it reaches zero. */ ++ atomic_t users; ++ struct mutex mutex; ++ + /* owner of this fifo */ + struct drm_file *file_priv; + /* mapping of the fifo itself */ +@@ -202,6 +230,7 @@ + /* PGRAPH context */ + /* XXX may be merge 2 pointers as private data ??? */ + struct nouveau_gpuobj *ramin_grctx; ++ struct nouveau_gpuobj *crypt_ctx; + void *pgraph_ctx; + + /* NV50 VM */ +@@ -238,9 +267,11 @@ + + struct { + struct nouveau_gpuobj *vblsem; ++ uint32_t vblsem_head; + uint32_t vblsem_offset; + uint32_t vblsem_rval; + struct list_head vbl_wait; ++ struct list_head flip; + } nvsw; + + struct { +@@ -258,11 +289,11 @@ + int (*suspend)(struct drm_device *dev); + void (*resume)(struct drm_device *dev); + +- int (*populate)(struct drm_device *, struct nouveau_gpuobj *, +- uint32_t *size); +- void (*clear)(struct drm_device *, struct nouveau_gpuobj *); +- int (*bind)(struct drm_device *, struct nouveau_gpuobj *); +- int (*unbind)(struct drm_device *, struct nouveau_gpuobj *); ++ int (*get)(struct nouveau_gpuobj *, u32 size, u32 align); ++ void (*put)(struct nouveau_gpuobj *); ++ int (*map)(struct nouveau_gpuobj *); ++ void (*unmap)(struct nouveau_gpuobj *); ++ + void (*flush)(struct drm_device *); + }; + +@@ -279,12 +310,17 @@ + + struct nouveau_fb_engine { + int num_tiles; ++ struct drm_mm tag_heap; ++ void *priv; + + int (*init)(struct drm_device *dev); + void (*takedown)(struct drm_device *dev); + +- void (*set_region_tiling)(struct drm_device *dev, int i, uint32_t addr, +- uint32_t size, uint32_t pitch); ++ void (*init_tile_region)(struct drm_device *dev, int i, ++ uint32_t addr, uint32_t size, ++ uint32_t pitch, uint32_t flags); ++ void (*set_tile_region)(struct drm_device *dev, int i); ++ void (*free_tile_region)(struct drm_device *dev, int i); + }; + + struct nouveau_fifo_engine { +@@ -310,21 +346,9 @@ + void (*tlb_flush)(struct drm_device *dev); + }; + +-struct nouveau_pgraph_object_method { +- int id; +- int (*exec)(struct nouveau_channel *chan, int grclass, int mthd, +- uint32_t data); +-}; +- +-struct nouveau_pgraph_object_class { +- int id; +- bool software; +- struct nouveau_pgraph_object_method *methods; +-}; +- + struct nouveau_pgraph_engine { +- struct nouveau_pgraph_object_class *grclass; + bool accel_blocked; ++ bool registered; + int grctx_size; + + /* NV2x/NV3x context table (0x400780) */ +@@ -342,8 +366,7 @@ + int (*unload_context)(struct drm_device *); + void (*tlb_flush)(struct drm_device *dev); + +- void (*set_region_tiling)(struct drm_device *dev, int i, uint32_t addr, +- uint32_t size, uint32_t pitch); ++ void (*set_tile_region)(struct drm_device *dev, int i); + }; + + struct nouveau_display_engine { +@@ -355,13 +378,19 @@ + }; + + struct nouveau_gpio_engine { ++ void *priv; ++ + int (*init)(struct drm_device *); + void (*takedown)(struct drm_device *); + + int (*get)(struct drm_device *, enum dcb_gpio_tag); + int (*set)(struct drm_device *, enum dcb_gpio_tag, int state); + +- void (*irq_enable)(struct drm_device *, enum dcb_gpio_tag, bool on); ++ int (*irq_register)(struct drm_device *, enum dcb_gpio_tag, ++ void (*)(void *, int), void *); ++ void (*irq_unregister)(struct drm_device *, enum dcb_gpio_tag, ++ void (*)(void *, int), void *); ++ bool (*irq_enable)(struct drm_device *, enum dcb_gpio_tag, bool on); + }; + + struct nouveau_pm_voltage_level { +@@ -437,6 +466,7 @@ + struct nouveau_pm_level *cur; + + struct device *hwmon; ++ struct notifier_block acpi_nb; + + int (*clock_get)(struct drm_device *, u32 id); + void *(*clock_pre)(struct drm_device *, struct nouveau_pm_level *, +@@ -449,6 +479,16 @@ + int (*temp_get)(struct drm_device *); + }; + ++struct nouveau_crypt_engine { ++ bool registered; ++ ++ int (*init)(struct drm_device *); ++ void (*takedown)(struct drm_device *); ++ int (*create_context)(struct nouveau_channel *); ++ void (*destroy_context)(struct nouveau_channel *); ++ void (*tlb_flush)(struct drm_device *dev); ++}; ++ + struct nouveau_engine { + struct nouveau_instmem_engine instmem; + struct nouveau_mc_engine mc; +@@ -459,6 +499,7 @@ + struct nouveau_display_engine display; + struct nouveau_gpio_engine gpio; + struct nouveau_pm_engine pm; ++ struct nouveau_crypt_engine crypt; + }; + + struct nouveau_pll_vals { +@@ -577,18 +618,15 @@ + bool ramin_available; + struct drm_mm ramin_heap; + struct list_head gpuobj_list; ++ struct list_head classes; + + struct nouveau_bo *vga_ram; + ++ /* interrupt handling */ ++ void (*irq_handler[32])(struct drm_device *); ++ bool msi_enabled; + struct workqueue_struct *wq; + struct work_struct irq_work; +- struct work_struct hpd_work; +- +- struct { +- spinlock_t lock; +- uint32_t hpd0_bits; +- uint32_t hpd1_bits; +- } hpd_state; + + struct list_head vbl_waiting; + +@@ -605,8 +643,10 @@ + struct nouveau_bo *bo; + } fence; + +- int fifo_alloc_count; +- struct nouveau_channel *fifos[NOUVEAU_MAX_CHANNEL_NR]; ++ struct { ++ spinlock_t lock; ++ struct nouveau_channel *ptr[NOUVEAU_MAX_CHANNEL_NR]; ++ } channels; + + struct nouveau_engine engine; + struct nouveau_channel *channel; +@@ -632,12 +672,13 @@ + uint64_t aper_free; + + struct nouveau_gpuobj *sg_ctxdma; +- struct page *sg_dummy_page; +- dma_addr_t sg_dummy_bus; + } gart_info; + + /* nv10-nv40 tiling regions */ +- struct nouveau_tile_reg tile[NOUVEAU_MAX_TILE_NR]; ++ struct { ++ struct nouveau_tile_reg reg[NOUVEAU_MAX_TILE_NR]; ++ spinlock_t lock; ++ } tile; + + /* VRAM/fb configuration */ + uint64_t vram_size; +@@ -674,6 +715,7 @@ + struct backlight_device *backlight; + + struct nouveau_channel *evo; ++ u32 evo_alloc; + struct { + struct dcb_entry *dcb; + u16 script; +@@ -719,16 +761,6 @@ + return 0; + } + +-#define NOUVEAU_GET_USER_CHANNEL_WITH_RETURN(id, cl, ch) do { \ +- struct drm_nouveau_private *nv = dev->dev_private; \ +- if (!nouveau_channel_owner(dev, (cl), (id))) { \ +- NV_ERROR(dev, "pid %d doesn't own channel %d\n", \ +- DRM_CURRENTPID, (id)); \ +- return -EPERM; \ +- } \ +- (ch) = nv->fifos[(id)]; \ +-} while (0) +- + /* nouveau_drv.c */ + extern int nouveau_agpmode; + extern int nouveau_duallink; +@@ -748,6 +780,7 @@ + extern int nouveau_override_conntype; + extern char *nouveau_perflvl; + extern int nouveau_perflvl_wr; ++extern int nouveau_msi; + + extern int nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state); + extern int nouveau_pci_resume(struct pci_dev *pdev); +@@ -775,13 +808,12 @@ + extern int nouveau_mem_init_agp(struct drm_device *); + extern int nouveau_mem_reset_agp(struct drm_device *); + extern void nouveau_mem_close(struct drm_device *); +-extern struct nouveau_tile_reg *nv10_mem_set_tiling(struct drm_device *dev, +- uint32_t addr, +- uint32_t size, +- uint32_t pitch); +-extern void nv10_mem_expire_tiling(struct drm_device *dev, +- struct nouveau_tile_reg *tile, +- struct nouveau_fence *fence); ++extern struct nouveau_tile_reg *nv10_mem_set_tiling( ++ struct drm_device *dev, uint32_t addr, uint32_t size, ++ uint32_t pitch, uint32_t flags); ++extern void nv10_mem_put_tile_region(struct drm_device *dev, ++ struct nouveau_tile_reg *tile, ++ struct nouveau_fence *fence); + extern int nv50_mem_vm_bind_linear(struct drm_device *, uint64_t virt, + uint32_t size, uint32_t flags, + uint64_t phys); +@@ -803,21 +835,44 @@ + extern struct drm_ioctl_desc nouveau_ioctls[]; + extern int nouveau_max_ioctl; + extern void nouveau_channel_cleanup(struct drm_device *, struct drm_file *); +-extern int nouveau_channel_owner(struct drm_device *, struct drm_file *, +- int channel); + extern int nouveau_channel_alloc(struct drm_device *dev, + struct nouveau_channel **chan, + struct drm_file *file_priv, + uint32_t fb_ctxdma, uint32_t tt_ctxdma); +-extern void nouveau_channel_free(struct nouveau_channel *); ++extern struct nouveau_channel * ++nouveau_channel_get_unlocked(struct nouveau_channel *); ++extern struct nouveau_channel * ++nouveau_channel_get(struct drm_device *, struct drm_file *, int id); ++extern void nouveau_channel_put_unlocked(struct nouveau_channel **); ++extern void nouveau_channel_put(struct nouveau_channel **); ++extern void nouveau_channel_ref(struct nouveau_channel *chan, ++ struct nouveau_channel **pchan); ++extern void nouveau_channel_idle(struct nouveau_channel *chan); + + /* nouveau_object.c */ ++#define NVOBJ_CLASS(d,c,e) do { \ ++ int ret = nouveau_gpuobj_class_new((d), (c), NVOBJ_ENGINE_##e); \ ++ if (ret) \ ++ return ret; \ ++} while(0) ++ ++#define NVOBJ_MTHD(d,c,m,e) do { \ ++ int ret = nouveau_gpuobj_mthd_new((d), (c), (m), (e)); \ ++ if (ret) \ ++ return ret; \ ++} while(0) ++ + extern int nouveau_gpuobj_early_init(struct drm_device *); + extern int nouveau_gpuobj_init(struct drm_device *); + extern void nouveau_gpuobj_takedown(struct drm_device *); + extern int nouveau_gpuobj_suspend(struct drm_device *dev); +-extern void nouveau_gpuobj_suspend_cleanup(struct drm_device *dev); + extern void nouveau_gpuobj_resume(struct drm_device *dev); ++extern int nouveau_gpuobj_class_new(struct drm_device *, u32 class, u32 eng); ++extern int nouveau_gpuobj_mthd_new(struct drm_device *, u32 class, u32 mthd, ++ int (*exec)(struct nouveau_channel *, ++ u32 class, u32 mthd, u32 data)); ++extern int nouveau_gpuobj_mthd_call(struct nouveau_channel *, u32, u32, u32); ++extern int nouveau_gpuobj_mthd_call2(struct drm_device *, int, u32, u32, u32); + extern int nouveau_gpuobj_channel_init(struct nouveau_channel *, + uint32_t vram_h, uint32_t tt_h); + extern void nouveau_gpuobj_channel_takedown(struct nouveau_channel *); +@@ -832,21 +887,26 @@ + extern int nouveau_gpuobj_dma_new(struct nouveau_channel *, int class, + uint64_t offset, uint64_t size, int access, + int target, struct nouveau_gpuobj **); +-extern int nouveau_gpuobj_gart_dma_new(struct nouveau_channel *, +- uint64_t offset, uint64_t size, +- int access, struct nouveau_gpuobj **, +- uint32_t *o_ret); + extern int nouveau_gpuobj_gr_new(struct nouveau_channel *, int class, + struct nouveau_gpuobj **); +-extern int nouveau_gpuobj_sw_new(struct nouveau_channel *, int class, +- struct nouveau_gpuobj **); ++extern int nv50_gpuobj_dma_new(struct nouveau_channel *, int class, u64 base, ++ u64 size, int target, int access, u32 type, ++ u32 comp, struct nouveau_gpuobj **pobj); ++extern void nv50_gpuobj_dma_init(struct nouveau_gpuobj *, u32 offset, ++ int class, u64 base, u64 size, int target, ++ int access, u32 type, u32 comp); + extern int nouveau_ioctl_grobj_alloc(struct drm_device *, void *data, + struct drm_file *); + extern int nouveau_ioctl_gpuobj_free(struct drm_device *, void *data, + struct drm_file *); + + /* nouveau_irq.c */ ++extern int nouveau_irq_init(struct drm_device *); ++extern void nouveau_irq_fini(struct drm_device *); + extern irqreturn_t nouveau_irq_handler(DRM_IRQ_ARGS); ++extern void nouveau_irq_register(struct drm_device *, int status_bit, ++ void (*)(struct drm_device *)); ++extern void nouveau_irq_unregister(struct drm_device *, int status_bit); + extern void nouveau_irq_preinstall(struct drm_device *); + extern int nouveau_irq_postinstall(struct drm_device *); + extern void nouveau_irq_uninstall(struct drm_device *); +@@ -966,18 +1026,25 @@ + /* nv10_fb.c */ + extern int nv10_fb_init(struct drm_device *); + extern void nv10_fb_takedown(struct drm_device *); +-extern void nv10_fb_set_region_tiling(struct drm_device *, int, uint32_t, +- uint32_t, uint32_t); ++extern void nv10_fb_init_tile_region(struct drm_device *dev, int i, ++ uint32_t addr, uint32_t size, ++ uint32_t pitch, uint32_t flags); ++extern void nv10_fb_set_tile_region(struct drm_device *dev, int i); ++extern void nv10_fb_free_tile_region(struct drm_device *dev, int i); + + /* nv30_fb.c */ + extern int nv30_fb_init(struct drm_device *); + extern void nv30_fb_takedown(struct drm_device *); ++extern void nv30_fb_init_tile_region(struct drm_device *dev, int i, ++ uint32_t addr, uint32_t size, ++ uint32_t pitch, uint32_t flags); ++extern void nv30_fb_free_tile_region(struct drm_device *dev, int i); + + /* nv40_fb.c */ + extern int nv40_fb_init(struct drm_device *); + extern void nv40_fb_takedown(struct drm_device *); +-extern void nv40_fb_set_region_tiling(struct drm_device *, int, uint32_t, +- uint32_t, uint32_t); ++extern void nv40_fb_set_tile_region(struct drm_device *dev, int i); ++ + /* nv50_fb.c */ + extern int nv50_fb_init(struct drm_device *); + extern void nv50_fb_takedown(struct drm_device *); +@@ -989,6 +1056,7 @@ + + /* nv04_fifo.c */ + extern int nv04_fifo_init(struct drm_device *); ++extern void nv04_fifo_fini(struct drm_device *); + extern void nv04_fifo_disable(struct drm_device *); + extern void nv04_fifo_enable(struct drm_device *); + extern bool nv04_fifo_reassign(struct drm_device *, bool); +@@ -998,19 +1066,18 @@ + extern void nv04_fifo_destroy_context(struct nouveau_channel *); + extern int nv04_fifo_load_context(struct nouveau_channel *); + extern int nv04_fifo_unload_context(struct drm_device *); ++extern void nv04_fifo_isr(struct drm_device *); + + /* nv10_fifo.c */ + extern int nv10_fifo_init(struct drm_device *); + extern int nv10_fifo_channel_id(struct drm_device *); + extern int nv10_fifo_create_context(struct nouveau_channel *); +-extern void nv10_fifo_destroy_context(struct nouveau_channel *); + extern int nv10_fifo_load_context(struct nouveau_channel *); + extern int nv10_fifo_unload_context(struct drm_device *); + + /* nv40_fifo.c */ + extern int nv40_fifo_init(struct drm_device *); + extern int nv40_fifo_create_context(struct nouveau_channel *); +-extern void nv40_fifo_destroy_context(struct nouveau_channel *); + extern int nv40_fifo_load_context(struct nouveau_channel *); + extern int nv40_fifo_unload_context(struct drm_device *); + +@@ -1038,7 +1105,6 @@ + extern int nvc0_fifo_unload_context(struct drm_device *); + + /* nv04_graph.c */ +-extern struct nouveau_pgraph_object_class nv04_graph_grclass[]; + extern int nv04_graph_init(struct drm_device *); + extern void nv04_graph_takedown(struct drm_device *); + extern void nv04_graph_fifo_access(struct drm_device *, bool); +@@ -1047,10 +1113,11 @@ + extern void nv04_graph_destroy_context(struct nouveau_channel *); + extern int nv04_graph_load_context(struct nouveau_channel *); + extern int nv04_graph_unload_context(struct drm_device *); +-extern void nv04_graph_context_switch(struct drm_device *); ++extern int nv04_graph_mthd_page_flip(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data); ++extern struct nouveau_bitfield nv04_graph_nsource[]; + + /* nv10_graph.c */ +-extern struct nouveau_pgraph_object_class nv10_graph_grclass[]; + extern int nv10_graph_init(struct drm_device *); + extern void nv10_graph_takedown(struct drm_device *); + extern struct nouveau_channel *nv10_graph_channel(struct drm_device *); +@@ -1058,13 +1125,11 @@ + extern void nv10_graph_destroy_context(struct nouveau_channel *); + extern int nv10_graph_load_context(struct nouveau_channel *); + extern int nv10_graph_unload_context(struct drm_device *); +-extern void nv10_graph_context_switch(struct drm_device *); +-extern void nv10_graph_set_region_tiling(struct drm_device *, int, uint32_t, +- uint32_t, uint32_t); ++extern void nv10_graph_set_tile_region(struct drm_device *dev, int i); ++extern struct nouveau_bitfield nv10_graph_intr[]; ++extern struct nouveau_bitfield nv10_graph_nstatus[]; + + /* nv20_graph.c */ +-extern struct nouveau_pgraph_object_class nv20_graph_grclass[]; +-extern struct nouveau_pgraph_object_class nv30_graph_grclass[]; + extern int nv20_graph_create_context(struct nouveau_channel *); + extern void nv20_graph_destroy_context(struct nouveau_channel *); + extern int nv20_graph_load_context(struct nouveau_channel *); +@@ -1072,11 +1137,9 @@ + extern int nv20_graph_init(struct drm_device *); + extern void nv20_graph_takedown(struct drm_device *); + extern int nv30_graph_init(struct drm_device *); +-extern void nv20_graph_set_region_tiling(struct drm_device *, int, uint32_t, +- uint32_t, uint32_t); ++extern void nv20_graph_set_tile_region(struct drm_device *dev, int i); + + /* nv40_graph.c */ +-extern struct nouveau_pgraph_object_class nv40_graph_grclass[]; + extern int nv40_graph_init(struct drm_device *); + extern void nv40_graph_takedown(struct drm_device *); + extern struct nouveau_channel *nv40_graph_channel(struct drm_device *); +@@ -1085,11 +1148,9 @@ + extern int nv40_graph_load_context(struct nouveau_channel *); + extern int nv40_graph_unload_context(struct drm_device *); + extern void nv40_grctx_init(struct nouveau_grctx *); +-extern void nv40_graph_set_region_tiling(struct drm_device *, int, uint32_t, +- uint32_t, uint32_t); ++extern void nv40_graph_set_tile_region(struct drm_device *dev, int i); + + /* nv50_graph.c */ +-extern struct nouveau_pgraph_object_class nv50_graph_grclass[]; + extern int nv50_graph_init(struct drm_device *); + extern void nv50_graph_takedown(struct drm_device *); + extern void nv50_graph_fifo_access(struct drm_device *, bool); +@@ -1098,7 +1159,6 @@ + extern void nv50_graph_destroy_context(struct nouveau_channel *); + extern int nv50_graph_load_context(struct nouveau_channel *); + extern int nv50_graph_unload_context(struct drm_device *); +-extern void nv50_graph_context_switch(struct drm_device *); + extern int nv50_grctx_init(struct nouveau_grctx *); + extern void nv50_graph_tlb_flush(struct drm_device *dev); + extern void nv86_graph_tlb_flush(struct drm_device *dev); +@@ -1113,16 +1173,22 @@ + extern int nvc0_graph_load_context(struct nouveau_channel *); + extern int nvc0_graph_unload_context(struct drm_device *); + ++/* nv84_crypt.c */ ++extern int nv84_crypt_init(struct drm_device *dev); ++extern void nv84_crypt_fini(struct drm_device *dev); ++extern int nv84_crypt_create_context(struct nouveau_channel *); ++extern void nv84_crypt_destroy_context(struct nouveau_channel *); ++extern void nv84_crypt_tlb_flush(struct drm_device *dev); ++ + /* nv04_instmem.c */ + extern int nv04_instmem_init(struct drm_device *); + extern void nv04_instmem_takedown(struct drm_device *); + extern int nv04_instmem_suspend(struct drm_device *); + extern void nv04_instmem_resume(struct drm_device *); +-extern int nv04_instmem_populate(struct drm_device *, struct nouveau_gpuobj *, +- uint32_t *size); +-extern void nv04_instmem_clear(struct drm_device *, struct nouveau_gpuobj *); +-extern int nv04_instmem_bind(struct drm_device *, struct nouveau_gpuobj *); +-extern int nv04_instmem_unbind(struct drm_device *, struct nouveau_gpuobj *); ++extern int nv04_instmem_get(struct nouveau_gpuobj *, u32 size, u32 align); ++extern void nv04_instmem_put(struct nouveau_gpuobj *); ++extern int nv04_instmem_map(struct nouveau_gpuobj *); ++extern void nv04_instmem_unmap(struct nouveau_gpuobj *); + extern void nv04_instmem_flush(struct drm_device *); + + /* nv50_instmem.c */ +@@ -1130,11 +1196,10 @@ + extern void nv50_instmem_takedown(struct drm_device *); + extern int nv50_instmem_suspend(struct drm_device *); + extern void nv50_instmem_resume(struct drm_device *); +-extern int nv50_instmem_populate(struct drm_device *, struct nouveau_gpuobj *, +- uint32_t *size); +-extern void nv50_instmem_clear(struct drm_device *, struct nouveau_gpuobj *); +-extern int nv50_instmem_bind(struct drm_device *, struct nouveau_gpuobj *); +-extern int nv50_instmem_unbind(struct drm_device *, struct nouveau_gpuobj *); ++extern int nv50_instmem_get(struct nouveau_gpuobj *, u32 size, u32 align); ++extern void nv50_instmem_put(struct nouveau_gpuobj *); ++extern int nv50_instmem_map(struct nouveau_gpuobj *); ++extern void nv50_instmem_unmap(struct nouveau_gpuobj *); + extern void nv50_instmem_flush(struct drm_device *); + extern void nv84_instmem_flush(struct drm_device *); + extern void nv50_vm_flush(struct drm_device *, int engine); +@@ -1144,11 +1209,10 @@ + extern void nvc0_instmem_takedown(struct drm_device *); + extern int nvc0_instmem_suspend(struct drm_device *); + extern void nvc0_instmem_resume(struct drm_device *); +-extern int nvc0_instmem_populate(struct drm_device *, struct nouveau_gpuobj *, +- uint32_t *size); +-extern void nvc0_instmem_clear(struct drm_device *, struct nouveau_gpuobj *); +-extern int nvc0_instmem_bind(struct drm_device *, struct nouveau_gpuobj *); +-extern int nvc0_instmem_unbind(struct drm_device *, struct nouveau_gpuobj *); ++extern int nvc0_instmem_get(struct nouveau_gpuobj *, u32 size, u32 align); ++extern void nvc0_instmem_put(struct nouveau_gpuobj *); ++extern int nvc0_instmem_map(struct nouveau_gpuobj *); ++extern void nvc0_instmem_unmap(struct nouveau_gpuobj *); + extern void nvc0_instmem_flush(struct drm_device *); + + /* nv04_mc.c */ +@@ -1219,6 +1283,7 @@ + extern void nouveau_bo_wr16(struct nouveau_bo *nvbo, unsigned index, u16 val); + extern u32 nouveau_bo_rd32(struct nouveau_bo *nvbo, unsigned index); + extern void nouveau_bo_wr32(struct nouveau_bo *nvbo, unsigned index, u32 val); ++extern void nouveau_bo_fence(struct nouveau_bo *, struct nouveau_fence *); + + /* nouveau_fence.c */ + struct nouveau_fence; +@@ -1234,12 +1299,35 @@ + void (*work)(void *priv, bool signalled), + void *priv); + struct nouveau_channel *nouveau_fence_channel(struct nouveau_fence *); +-extern bool nouveau_fence_signalled(void *obj, void *arg); +-extern int nouveau_fence_wait(void *obj, void *arg, bool lazy, bool intr); ++ ++extern bool __nouveau_fence_signalled(void *obj, void *arg); ++extern int __nouveau_fence_wait(void *obj, void *arg, bool lazy, bool intr); ++extern int __nouveau_fence_flush(void *obj, void *arg); ++extern void __nouveau_fence_unref(void **obj); ++extern void *__nouveau_fence_ref(void *obj); ++ ++static inline bool nouveau_fence_signalled(struct nouveau_fence *obj) ++{ ++ return __nouveau_fence_signalled(obj, NULL); ++} ++static inline int ++nouveau_fence_wait(struct nouveau_fence *obj, bool lazy, bool intr) ++{ ++ return __nouveau_fence_wait(obj, NULL, lazy, intr); ++} + extern int nouveau_fence_sync(struct nouveau_fence *, struct nouveau_channel *); +-extern int nouveau_fence_flush(void *obj, void *arg); +-extern void nouveau_fence_unref(void **obj); +-extern void *nouveau_fence_ref(void *obj); ++static inline int nouveau_fence_flush(struct nouveau_fence *obj) ++{ ++ return __nouveau_fence_flush(obj, NULL); ++} ++static inline void nouveau_fence_unref(struct nouveau_fence **obj) ++{ ++ __nouveau_fence_unref((void **)obj); ++} ++static inline struct nouveau_fence *nouveau_fence_ref(struct nouveau_fence *obj) ++{ ++ return __nouveau_fence_ref(obj); ++} + + /* nouveau_gem.c */ + extern int nouveau_gem_new(struct drm_device *, struct nouveau_channel *, +@@ -1259,15 +1347,28 @@ + extern int nouveau_gem_ioctl_info(struct drm_device *, void *, + struct drm_file *); + ++/* nouveau_display.c */ ++int nouveau_vblank_enable(struct drm_device *dev, int crtc); ++void nouveau_vblank_disable(struct drm_device *dev, int crtc); ++int nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, ++ struct drm_pending_vblank_event *event); ++int nouveau_finish_page_flip(struct nouveau_channel *, ++ struct nouveau_page_flip_state *); ++ + /* nv10_gpio.c */ + int nv10_gpio_get(struct drm_device *dev, enum dcb_gpio_tag tag); + int nv10_gpio_set(struct drm_device *dev, enum dcb_gpio_tag tag, int state); + + /* nv50_gpio.c */ + int nv50_gpio_init(struct drm_device *dev); ++void nv50_gpio_fini(struct drm_device *dev); + int nv50_gpio_get(struct drm_device *dev, enum dcb_gpio_tag tag); + int nv50_gpio_set(struct drm_device *dev, enum dcb_gpio_tag tag, int state); +-void nv50_gpio_irq_enable(struct drm_device *, enum dcb_gpio_tag, bool on); ++int nv50_gpio_irq_register(struct drm_device *, enum dcb_gpio_tag, ++ void (*)(void *, int), void *); ++void nv50_gpio_irq_unregister(struct drm_device *, enum dcb_gpio_tag, ++ void (*)(void *, int), void *); ++bool nv50_gpio_irq_enable(struct drm_device *, enum dcb_gpio_tag, bool on); + + /* nv50_calc. */ + int nv50_calc_pll(struct drm_device *, struct pll_lims *, int clk, +@@ -1447,6 +1548,22 @@ + dev->pdev->subsystem_device == sub_device; + } + ++/* memory type/access flags, do not match hardware values */ ++#define NV_MEM_ACCESS_RO 1 ++#define NV_MEM_ACCESS_WO 2 ++#define NV_MEM_ACCESS_RW (NV_MEM_ACCESS_RO | NV_MEM_ACCESS_WO) ++#define NV_MEM_ACCESS_VM 4 ++ ++#define NV_MEM_TARGET_VRAM 0 ++#define NV_MEM_TARGET_PCI 1 ++#define NV_MEM_TARGET_PCI_NOSNOOP 2 ++#define NV_MEM_TARGET_VM 3 ++#define NV_MEM_TARGET_GART 4 ++ ++#define NV_MEM_TYPE_VM 0x7f ++#define NV_MEM_COMP_VM 0x03 ++ ++/* NV_SW object class */ + #define NV_SW 0x0000506e + #define NV_SW_DMA_SEMAPHORE 0x00000060 + #define NV_SW_SEMAPHORE_OFFSET 0x00000064 +@@ -1457,5 +1574,6 @@ + #define NV_SW_VBLSEM_OFFSET 0x00000400 + #define NV_SW_VBLSEM_RELEASE_VALUE 0x00000404 + #define NV_SW_VBLSEM_RELEASE 0x00000408 ++#define NV_SW_PAGE_FLIP 0x00000500 + + #endif /* __NOUVEAU_DRV_H__ */ +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_fbcon.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_fbcon.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.c 2010-11-22 06:33:32.000000000 +0100 +@@ -49,6 +49,96 @@ + #include "nouveau_fbcon.h" + #include "nouveau_dma.h" + ++static void ++nouveau_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) ++{ ++ struct nouveau_fbdev *nfbdev = info->par; ++ struct drm_device *dev = nfbdev->dev; ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ int ret; ++ ++ if (info->state != FBINFO_STATE_RUNNING) ++ return; ++ ++ ret = -ENODEV; ++ if (!in_interrupt() && !(info->flags & FBINFO_HWACCEL_DISABLED) && ++ mutex_trylock(&dev_priv->channel->mutex)) { ++ if (dev_priv->card_type < NV_50) ++ ret = nv04_fbcon_fillrect(info, rect); ++ else ++ if (dev_priv->card_type < NV_C0) ++ ret = nv50_fbcon_fillrect(info, rect); ++ mutex_unlock(&dev_priv->channel->mutex); ++ } ++ ++ if (ret == 0) ++ return; ++ ++ if (ret != -ENODEV) ++ nouveau_fbcon_gpu_lockup(info); ++ cfb_fillrect(info, rect); ++} ++ ++static void ++nouveau_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *image) ++{ ++ struct nouveau_fbdev *nfbdev = info->par; ++ struct drm_device *dev = nfbdev->dev; ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ int ret; ++ ++ if (info->state != FBINFO_STATE_RUNNING) ++ return; ++ ++ ret = -ENODEV; ++ if (!in_interrupt() && !(info->flags & FBINFO_HWACCEL_DISABLED) && ++ mutex_trylock(&dev_priv->channel->mutex)) { ++ if (dev_priv->card_type < NV_50) ++ ret = nv04_fbcon_copyarea(info, image); ++ else ++ if (dev_priv->card_type < NV_C0) ++ ret = nv50_fbcon_copyarea(info, image); ++ mutex_unlock(&dev_priv->channel->mutex); ++ } ++ ++ if (ret == 0) ++ return; ++ ++ if (ret != -ENODEV) ++ nouveau_fbcon_gpu_lockup(info); ++ cfb_copyarea(info, image); ++} ++ ++static void ++nouveau_fbcon_imageblit(struct fb_info *info, const struct fb_image *image) ++{ ++ struct nouveau_fbdev *nfbdev = info->par; ++ struct drm_device *dev = nfbdev->dev; ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ int ret; ++ ++ if (info->state != FBINFO_STATE_RUNNING) ++ return; ++ ++ ret = -ENODEV; ++ if (!in_interrupt() && !(info->flags & FBINFO_HWACCEL_DISABLED) && ++ mutex_trylock(&dev_priv->channel->mutex)) { ++ if (dev_priv->card_type < NV_50) ++ ret = nv04_fbcon_imageblit(info, image); ++ else ++ if (dev_priv->card_type < NV_C0) ++ ret = nv50_fbcon_imageblit(info, image); ++ mutex_unlock(&dev_priv->channel->mutex); ++ } ++ ++ if (ret == 0) ++ return; ++ ++ if (ret != -ENODEV) ++ nouveau_fbcon_gpu_lockup(info); ++ cfb_imageblit(info, image); ++} ++ + static int + nouveau_fbcon_sync(struct fb_info *info) + { +@@ -58,12 +148,17 @@ + struct nouveau_channel *chan = dev_priv->channel; + int ret, i; + +- if (!chan || !chan->accel_done || ++ if (!chan || !chan->accel_done || in_interrupt() || + info->state != FBINFO_STATE_RUNNING || + info->flags & FBINFO_HWACCEL_DISABLED) + return 0; + +- if (RING_SPACE(chan, 4)) { ++ if (!mutex_trylock(&chan->mutex)) ++ return 0; ++ ++ ret = RING_SPACE(chan, 4); ++ if (ret) { ++ mutex_unlock(&chan->mutex); + nouveau_fbcon_gpu_lockup(info); + return 0; + } +@@ -74,6 +169,7 @@ + OUT_RING(chan, 0); + nouveau_bo_wr32(chan->notifier_bo, chan->m2mf_ntfy + 3, 0xffffffff); + FIRE_RING(chan); ++ mutex_unlock(&chan->mutex); + + ret = -EBUSY; + for (i = 0; i < 100000; i++) { +@@ -97,24 +193,9 @@ + .owner = THIS_MODULE, + .fb_check_var = drm_fb_helper_check_var, + .fb_set_par = drm_fb_helper_set_par, +- .fb_fillrect = cfb_fillrect, +- .fb_copyarea = cfb_copyarea, +- .fb_imageblit = cfb_imageblit, +- .fb_sync = nouveau_fbcon_sync, +- .fb_pan_display = drm_fb_helper_pan_display, +- .fb_blank = drm_fb_helper_blank, +- .fb_setcmap = drm_fb_helper_setcmap, +- .fb_debug_enter = drm_fb_helper_debug_enter, +- .fb_debug_leave = drm_fb_helper_debug_leave, +-}; +- +-static struct fb_ops nv04_fbcon_ops = { +- .owner = THIS_MODULE, +- .fb_check_var = drm_fb_helper_check_var, +- .fb_set_par = drm_fb_helper_set_par, +- .fb_fillrect = nv04_fbcon_fillrect, +- .fb_copyarea = nv04_fbcon_copyarea, +- .fb_imageblit = nv04_fbcon_imageblit, ++ .fb_fillrect = nouveau_fbcon_fillrect, ++ .fb_copyarea = nouveau_fbcon_copyarea, ++ .fb_imageblit = nouveau_fbcon_imageblit, + .fb_sync = nouveau_fbcon_sync, + .fb_pan_display = drm_fb_helper_pan_display, + .fb_blank = drm_fb_helper_blank, +@@ -123,14 +204,13 @@ + .fb_debug_leave = drm_fb_helper_debug_leave, + }; + +-static struct fb_ops nv50_fbcon_ops = { ++static struct fb_ops nouveau_fbcon_sw_ops = { + .owner = THIS_MODULE, + .fb_check_var = drm_fb_helper_check_var, + .fb_set_par = drm_fb_helper_set_par, +- .fb_fillrect = nv50_fbcon_fillrect, +- .fb_copyarea = nv50_fbcon_copyarea, +- .fb_imageblit = nv50_fbcon_imageblit, +- .fb_sync = nouveau_fbcon_sync, ++ .fb_fillrect = cfb_fillrect, ++ .fb_copyarea = cfb_copyarea, ++ .fb_imageblit = cfb_imageblit, + .fb_pan_display = drm_fb_helper_pan_display, + .fb_blank = drm_fb_helper_blank, + .fb_setcmap = drm_fb_helper_setcmap, +@@ -257,7 +337,7 @@ + FBINFO_HWACCEL_FILLRECT | + FBINFO_HWACCEL_IMAGEBLIT; + info->flags |= FBINFO_CAN_FORCE_OUTPUT; +- info->fbops = &nouveau_fbcon_ops; ++ info->fbops = &nouveau_fbcon_sw_ops; + info->fix.smem_start = dev->mode_config.fb_base + nvbo->bo.offset - + dev_priv->vm_vram_base; + info->fix.smem_len = size; +@@ -285,19 +365,18 @@ + info->pixmap.flags = FB_PIXMAP_SYSTEM; + info->pixmap.scan_align = 1; + ++ mutex_unlock(&dev->struct_mutex); ++ + if (dev_priv->channel && !nouveau_nofbaccel) { +- switch (dev_priv->card_type) { +- case NV_C0: +- break; +- case NV_50: +- nv50_fbcon_accel_init(info); +- info->fbops = &nv50_fbcon_ops; +- break; +- default: +- nv04_fbcon_accel_init(info); +- info->fbops = &nv04_fbcon_ops; +- break; +- }; ++ ret = -ENODEV; ++ if (dev_priv->card_type < NV_50) ++ ret = nv04_fbcon_accel_init(info); ++ else ++ if (dev_priv->card_type < NV_C0) ++ ret = nv50_fbcon_accel_init(info); ++ ++ if (ret == 0) ++ info->fbops = &nouveau_fbcon_ops; + } + + nouveau_fbcon_zfill(dev, nfbdev); +@@ -308,7 +387,6 @@ + nouveau_fb->base.height, + nvbo->bo.offset, nvbo); + +- mutex_unlock(&dev->struct_mutex); + vga_switcheroo_client_fb_set(dev->pdev, info); + return 0; + +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_fbcon.h linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.h +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_fbcon.h 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_fbcon.h 2010-11-22 06:33:32.000000000 +0100 +@@ -40,13 +40,13 @@ + + void nouveau_fbcon_restore(void); + +-void nv04_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region); +-void nv04_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect); +-void nv04_fbcon_imageblit(struct fb_info *info, const struct fb_image *image); ++int nv04_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region); ++int nv04_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect); ++int nv04_fbcon_imageblit(struct fb_info *info, const struct fb_image *image); + int nv04_fbcon_accel_init(struct fb_info *info); +-void nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect); +-void nv50_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region); +-void nv50_fbcon_imageblit(struct fb_info *info, const struct fb_image *image); ++int nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect); ++int nv50_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region); ++int nv50_fbcon_imageblit(struct fb_info *info, const struct fb_image *image); + int nv50_fbcon_accel_init(struct fb_info *info); + + void nouveau_fbcon_gpu_lockup(struct fb_info *info); +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_fence.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_fence.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_fence.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_fence.c 2010-11-22 06:33:32.000000000 +0100 +@@ -64,6 +64,7 @@ + struct nouveau_fence *fence = + container_of(ref, struct nouveau_fence, refcount); + ++ nouveau_channel_ref(NULL, &fence->channel); + kfree(fence); + } + +@@ -113,13 +114,13 @@ + if (!fence) + return -ENOMEM; + kref_init(&fence->refcount); +- fence->channel = chan; ++ nouveau_channel_ref(chan, &fence->channel); + + if (emit) + ret = nouveau_fence_emit(fence); + + if (ret) +- nouveau_fence_unref((void *)&fence); ++ nouveau_fence_unref(&fence); + *pfence = fence; + return ret; + } +@@ -127,7 +128,7 @@ + struct nouveau_channel * + nouveau_fence_channel(struct nouveau_fence *fence) + { +- return fence ? fence->channel : NULL; ++ return fence ? nouveau_channel_get_unlocked(fence->channel) : NULL; + } + + int +@@ -182,7 +183,7 @@ + } + + void +-nouveau_fence_unref(void **sync_obj) ++__nouveau_fence_unref(void **sync_obj) + { + struct nouveau_fence *fence = nouveau_fence(*sync_obj); + +@@ -192,7 +193,7 @@ + } + + void * +-nouveau_fence_ref(void *sync_obj) ++__nouveau_fence_ref(void *sync_obj) + { + struct nouveau_fence *fence = nouveau_fence(sync_obj); + +@@ -201,7 +202,7 @@ + } + + bool +-nouveau_fence_signalled(void *sync_obj, void *sync_arg) ++__nouveau_fence_signalled(void *sync_obj, void *sync_arg) + { + struct nouveau_fence *fence = nouveau_fence(sync_obj); + struct nouveau_channel *chan = fence->channel; +@@ -214,13 +215,13 @@ + } + + int +-nouveau_fence_wait(void *sync_obj, void *sync_arg, bool lazy, bool intr) ++__nouveau_fence_wait(void *sync_obj, void *sync_arg, bool lazy, bool intr) + { + unsigned long timeout = jiffies + (3 * DRM_HZ); + int ret = 0; + + while (1) { +- if (nouveau_fence_signalled(sync_obj, sync_arg)) ++ if (__nouveau_fence_signalled(sync_obj, sync_arg)) + break; + + if (time_after_eq(jiffies, timeout)) { +@@ -368,7 +369,7 @@ + + kref_get(&sema->ref); + nouveau_fence_work(fence, semaphore_work, sema); +- nouveau_fence_unref((void *)&fence); ++ nouveau_fence_unref(&fence); + + return 0; + } +@@ -380,33 +381,49 @@ + struct nouveau_channel *chan = nouveau_fence_channel(fence); + struct drm_device *dev = wchan->dev; + struct nouveau_semaphore *sema; +- int ret; ++ int ret = 0; + +- if (likely(!fence || chan == wchan || +- nouveau_fence_signalled(fence, NULL))) +- return 0; ++ if (likely(!chan || chan == wchan || ++ nouveau_fence_signalled(fence))) ++ goto out; + + sema = alloc_semaphore(dev); + if (!sema) { + /* Early card or broken userspace, fall back to + * software sync. */ +- return nouveau_fence_wait(fence, NULL, false, false); ++ ret = nouveau_fence_wait(fence, true, false); ++ goto out; ++ } ++ ++ /* try to take chan's mutex, if we can't take it right away ++ * we have to fallback to software sync to prevent locking ++ * order issues ++ */ ++ if (!mutex_trylock(&chan->mutex)) { ++ ret = nouveau_fence_wait(fence, true, false); ++ goto out_unref; + } + + /* Make wchan wait until it gets signalled */ + ret = emit_semaphore(wchan, NV_SW_SEMAPHORE_ACQUIRE, sema); + if (ret) +- goto out; ++ goto out_unlock; + + /* Signal the semaphore from chan */ + ret = emit_semaphore(chan, NV_SW_SEMAPHORE_RELEASE, sema); +-out: ++ ++out_unlock: ++ mutex_unlock(&chan->mutex); ++out_unref: + kref_put(&sema->ref, free_semaphore); ++out: ++ if (chan) ++ nouveau_channel_put_unlocked(&chan); + return ret; + } + + int +-nouveau_fence_flush(void *sync_obj, void *sync_arg) ++__nouveau_fence_flush(void *sync_obj, void *sync_arg) + { + return 0; + } +@@ -420,7 +437,7 @@ + int ret; + + /* Create an NV_SW object for various sync purposes */ +- ret = nouveau_gpuobj_sw_new(chan, NV_SW, &obj); ++ ret = nouveau_gpuobj_gr_new(chan, NV_SW, &obj); + if (ret) + return ret; + +@@ -442,8 +459,8 @@ + ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, + mem->start << PAGE_SHIFT, + mem->size << PAGE_SHIFT, +- NV_DMA_ACCESS_RW, +- NV_DMA_TARGET_VIDMEM, &obj); ++ NV_MEM_ACCESS_RW, ++ NV_MEM_TARGET_VRAM, &obj); + if (ret) + return ret; + +@@ -473,6 +490,8 @@ + { + struct nouveau_fence *tmp, *fence; + ++ spin_lock(&chan->fence.lock); ++ + list_for_each_entry_safe(fence, tmp, &chan->fence.pending, entry) { + fence->signalled = true; + list_del(&fence->entry); +@@ -482,6 +501,8 @@ + + kref_put(&fence->refcount, nouveau_fence_del); + } ++ ++ spin_unlock(&chan->fence.lock); + } + + int +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_gem.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_gem.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_gem.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_gem.c 2010-11-22 06:33:32.000000000 +0100 +@@ -48,9 +48,6 @@ + return; + nvbo->gem = NULL; + +- if (unlikely(nvbo->cpu_filp)) +- ttm_bo_synccpu_write_release(bo); +- + if (unlikely(nvbo->pin_refcnt)) { + nvbo->pin_refcnt = 1; + nouveau_bo_unpin(nvbo); +@@ -146,11 +143,6 @@ + if (unlikely(dev_priv->ttm.bdev.dev_mapping == NULL)) + dev_priv->ttm.bdev.dev_mapping = dev_priv->dev->dev_mapping; + +- if (req->channel_hint) { +- NOUVEAU_GET_USER_CHANNEL_WITH_RETURN(req->channel_hint, +- file_priv, chan); +- } +- + if (req->info.domain & NOUVEAU_GEM_DOMAIN_VRAM) + flags |= TTM_PL_FLAG_VRAM; + if (req->info.domain & NOUVEAU_GEM_DOMAIN_GART) +@@ -161,10 +153,18 @@ + if (!nouveau_gem_tile_flags_valid(dev, req->info.tile_flags)) + return -EINVAL; + ++ if (req->channel_hint) { ++ chan = nouveau_channel_get(dev, file_priv, req->channel_hint); ++ if (IS_ERR(chan)) ++ return PTR_ERR(chan); ++ } ++ + ret = nouveau_gem_new(dev, chan, req->info.size, req->align, flags, + req->info.tile_mode, req->info.tile_flags, false, + (req->info.domain & NOUVEAU_GEM_DOMAIN_MAPPABLE), + &nvbo); ++ if (chan) ++ nouveau_channel_put(&chan); + if (ret) + return ret; + +@@ -231,15 +231,8 @@ + + list_for_each_safe(entry, tmp, list) { + nvbo = list_entry(entry, struct nouveau_bo, entry); +- if (likely(fence)) { +- struct nouveau_fence *prev_fence; + +- spin_lock(&nvbo->bo.lock); +- prev_fence = nvbo->bo.sync_obj; +- nvbo->bo.sync_obj = nouveau_fence_ref(fence); +- spin_unlock(&nvbo->bo.lock); +- nouveau_fence_unref((void *)&prev_fence); +- } ++ nouveau_bo_fence(nvbo, fence); + + if (unlikely(nvbo->validate_mapped)) { + ttm_bo_kunmap(&nvbo->kmap); +@@ -299,14 +292,15 @@ + return -EINVAL; + } + +- ret = ttm_bo_reserve(&nvbo->bo, false, false, true, sequence); ++ ret = ttm_bo_reserve(&nvbo->bo, true, false, true, sequence); + if (ret) { + validate_fini(op, NULL); +- if (ret == -EAGAIN) +- ret = ttm_bo_wait_unreserved(&nvbo->bo, false); ++ if (unlikely(ret == -EAGAIN)) ++ ret = ttm_bo_wait_unreserved(&nvbo->bo, true); + drm_gem_object_unreference_unlocked(gem); +- if (ret) { +- NV_ERROR(dev, "fail reserve\n"); ++ if (unlikely(ret)) { ++ if (ret != -ERESTARTSYS) ++ NV_ERROR(dev, "fail reserve\n"); + return ret; + } + goto retry; +@@ -331,25 +325,6 @@ + validate_fini(op, NULL); + return -EINVAL; + } +- +- if (unlikely(atomic_read(&nvbo->bo.cpu_writers) > 0)) { +- validate_fini(op, NULL); +- +- if (nvbo->cpu_filp == file_priv) { +- NV_ERROR(dev, "bo %p mapped by process trying " +- "to validate it!\n", nvbo); +- return -EINVAL; +- } +- +- mutex_unlock(&drm_global_mutex); +- ret = ttm_bo_wait_cpu(&nvbo->bo, false); +- mutex_lock(&drm_global_mutex); +- if (ret) { +- NV_ERROR(dev, "fail wait_cpu\n"); +- return ret; +- } +- goto retry; +- } + } + + return 0; +@@ -384,10 +359,11 @@ + + nvbo->channel = (b->read_domains & (1 << 31)) ? NULL : chan; + ret = ttm_bo_validate(&nvbo->bo, &nvbo->placement, +- false, false, false); ++ true, false, false); + nvbo->channel = NULL; + if (unlikely(ret)) { +- NV_ERROR(dev, "fail ttm_validate\n"); ++ if (ret != -ERESTARTSYS) ++ NV_ERROR(dev, "fail ttm_validate\n"); + return ret; + } + +@@ -439,13 +415,15 @@ + + ret = validate_init(chan, file_priv, pbbo, nr_buffers, op); + if (unlikely(ret)) { +- NV_ERROR(dev, "validate_init\n"); ++ if (ret != -ERESTARTSYS) ++ NV_ERROR(dev, "validate_init\n"); + return ret; + } + + ret = validate_list(chan, &op->vram_list, pbbo, user_buffers); + if (unlikely(ret < 0)) { +- NV_ERROR(dev, "validate vram_list\n"); ++ if (ret != -ERESTARTSYS) ++ NV_ERROR(dev, "validate vram_list\n"); + validate_fini(op, NULL); + return ret; + } +@@ -453,7 +431,8 @@ + + ret = validate_list(chan, &op->gart_list, pbbo, user_buffers); + if (unlikely(ret < 0)) { +- NV_ERROR(dev, "validate gart_list\n"); ++ if (ret != -ERESTARTSYS) ++ NV_ERROR(dev, "validate gart_list\n"); + validate_fini(op, NULL); + return ret; + } +@@ -461,7 +440,8 @@ + + ret = validate_list(chan, &op->both_list, pbbo, user_buffers); + if (unlikely(ret < 0)) { +- NV_ERROR(dev, "validate both_list\n"); ++ if (ret != -ERESTARTSYS) ++ NV_ERROR(dev, "validate both_list\n"); + validate_fini(op, NULL); + return ret; + } +@@ -585,7 +565,9 @@ + struct nouveau_fence *fence = NULL; + int i, j, ret = 0, do_reloc = 0; + +- NOUVEAU_GET_USER_CHANNEL_WITH_RETURN(req->channel, file_priv, chan); ++ chan = nouveau_channel_get(dev, file_priv, req->channel); ++ if (IS_ERR(chan)) ++ return PTR_ERR(chan); + + req->vram_available = dev_priv->fb_aper_free; + req->gart_available = dev_priv->gart_info.aper_free; +@@ -595,28 +577,34 @@ + if (unlikely(req->nr_push > NOUVEAU_GEM_MAX_PUSH)) { + NV_ERROR(dev, "pushbuf push count exceeds limit: %d max %d\n", + req->nr_push, NOUVEAU_GEM_MAX_PUSH); ++ nouveau_channel_put(&chan); + return -EINVAL; + } + + if (unlikely(req->nr_buffers > NOUVEAU_GEM_MAX_BUFFERS)) { + NV_ERROR(dev, "pushbuf bo count exceeds limit: %d max %d\n", + req->nr_buffers, NOUVEAU_GEM_MAX_BUFFERS); ++ nouveau_channel_put(&chan); + return -EINVAL; + } + + if (unlikely(req->nr_relocs > NOUVEAU_GEM_MAX_RELOCS)) { + NV_ERROR(dev, "pushbuf reloc count exceeds limit: %d max %d\n", + req->nr_relocs, NOUVEAU_GEM_MAX_RELOCS); ++ nouveau_channel_put(&chan); + return -EINVAL; + } + + push = u_memcpya(req->push, req->nr_push, sizeof(*push)); +- if (IS_ERR(push)) ++ if (IS_ERR(push)) { ++ nouveau_channel_put(&chan); + return PTR_ERR(push); ++ } + + bo = u_memcpya(req->buffers, req->nr_buffers, sizeof(*bo)); + if (IS_ERR(bo)) { + kfree(push); ++ nouveau_channel_put(&chan); + return PTR_ERR(bo); + } + +@@ -639,7 +627,8 @@ + ret = nouveau_gem_pushbuf_validate(chan, file_priv, bo, req->buffers, + req->nr_buffers, &op, &do_reloc); + if (ret) { +- NV_ERROR(dev, "validate: %d\n", ret); ++ if (ret != -ERESTARTSYS) ++ NV_ERROR(dev, "validate: %d\n", ret); + goto out; + } + +@@ -732,7 +721,7 @@ + + out: + validate_fini(&op, fence); +- nouveau_fence_unref((void**)&fence); ++ nouveau_fence_unref(&fence); + kfree(bo); + kfree(push); + +@@ -750,6 +739,7 @@ + req->suffix1 = 0x00000000; + } + ++ nouveau_channel_put(&chan); + return ret; + } + +@@ -781,26 +771,9 @@ + return -ENOENT; + nvbo = nouveau_gem_object(gem); + +- if (nvbo->cpu_filp) { +- if (nvbo->cpu_filp == file_priv) +- goto out; +- +- ret = ttm_bo_wait_cpu(&nvbo->bo, no_wait); +- if (ret) +- goto out; +- } +- +- if (req->flags & NOUVEAU_GEM_CPU_PREP_NOBLOCK) { +- spin_lock(&nvbo->bo.lock); +- ret = ttm_bo_wait(&nvbo->bo, false, false, no_wait); +- spin_unlock(&nvbo->bo.lock); +- } else { +- ret = ttm_bo_synccpu_write_grab(&nvbo->bo, no_wait); +- if (ret == 0) +- nvbo->cpu_filp = file_priv; +- } +- +-out: ++ spin_lock(&nvbo->bo.lock); ++ ret = ttm_bo_wait(&nvbo->bo, true, true, no_wait); ++ spin_unlock(&nvbo->bo.lock); + drm_gem_object_unreference_unlocked(gem); + return ret; + } +@@ -809,26 +782,7 @@ + nouveau_gem_ioctl_cpu_fini(struct drm_device *dev, void *data, + struct drm_file *file_priv) + { +- struct drm_nouveau_gem_cpu_prep *req = data; +- struct drm_gem_object *gem; +- struct nouveau_bo *nvbo; +- int ret = -EINVAL; +- +- gem = drm_gem_object_lookup(dev, file_priv, req->handle); +- if (!gem) +- return -ENOENT; +- nvbo = nouveau_gem_object(gem); +- +- if (nvbo->cpu_filp != file_priv) +- goto out; +- nvbo->cpu_filp = NULL; +- +- ttm_bo_synccpu_write_release(&nvbo->bo); +- ret = 0; +- +-out: +- drm_gem_object_unreference_unlocked(gem); +- return ret; ++ return 0; + } + + int +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_hw.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_hw.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_hw.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_hw.c 2010-11-22 06:33:32.000000000 +0100 +@@ -953,7 +953,7 @@ + NVWriteCRTC(dev, head, NV_PCRTC_850, regp->crtc_850); + + reg900 = NVReadRAMDAC(dev, head, NV_PRAMDAC_900); +- if (regp->crtc_cfg == NV_PCRTC_CONFIG_START_ADDRESS_HSYNC) ++ if (regp->crtc_cfg == NV10_PCRTC_CONFIG_START_ADDRESS_HSYNC) + NVWriteRAMDAC(dev, head, NV_PRAMDAC_900, reg900 | 0x10000); + else + NVWriteRAMDAC(dev, head, NV_PRAMDAC_900, reg900 & ~0x10000); +@@ -1017,8 +1017,9 @@ + + NVWriteCRTC(dev, head, NV_PCRTC_START, regp->fb_start); + +- /* Setting 1 on this value gives you interrupts for every vblank period. */ +- NVWriteCRTC(dev, head, NV_PCRTC_INTR_EN_0, 0); ++ /* Enable vblank interrupts. */ ++ NVWriteCRTC(dev, head, NV_PCRTC_INTR_EN_0, ++ (dev->vblank_enabled[head] ? 1 : 0)); + NVWriteCRTC(dev, head, NV_PCRTC_INTR_0, NV_PCRTC_INTR_0_VBLANK); + } + +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_irq.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_irq.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_irq.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_irq.c 2010-11-22 06:33:32.000000000 +0100 +@@ -36,18 +36,7 @@ + #include "nouveau_drv.h" + #include "nouveau_reg.h" + #include "nouveau_ramht.h" +-#include +- +-/* needed for hotplug irq */ +-#include "nouveau_connector.h" +-#include "nv50_display.h" +- +-static DEFINE_RATELIMIT_STATE(nouveau_ratelimit_state, 3 * HZ, 20); +- +-static int nouveau_ratelimit(void) +-{ +- return __ratelimit(&nouveau_ratelimit_state); +-} ++#include "nouveau_util.h" + + void + nouveau_irq_preinstall(struct drm_device *dev) +@@ -57,19 +46,19 @@ + /* Master disable */ + nv_wr32(dev, NV03_PMC_INTR_EN_0, 0); + +- if (dev_priv->card_type >= NV_50) { +- INIT_WORK(&dev_priv->irq_work, nv50_display_irq_handler_bh); +- INIT_WORK(&dev_priv->hpd_work, nv50_display_irq_hotplug_bh); +- spin_lock_init(&dev_priv->hpd_state.lock); +- INIT_LIST_HEAD(&dev_priv->vbl_waiting); +- } ++ INIT_LIST_HEAD(&dev_priv->vbl_waiting); + } + + int + nouveau_irq_postinstall(struct drm_device *dev) + { ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ + /* Master enable */ + nv_wr32(dev, NV03_PMC_INTR_EN_0, NV_PMC_INTR_EN_0_MASTER_ENABLE); ++ if (dev_priv->msi_enabled) ++ nv_wr08(dev, 0x00088068, 0xff); ++ + return 0; + } + +@@ -80,1178 +69,83 @@ + nv_wr32(dev, NV03_PMC_INTR_EN_0, 0); + } + +-static int +-nouveau_call_method(struct nouveau_channel *chan, int class, int mthd, int data) +-{ +- struct drm_nouveau_private *dev_priv = chan->dev->dev_private; +- struct nouveau_pgraph_object_method *grm; +- struct nouveau_pgraph_object_class *grc; +- +- grc = dev_priv->engine.graph.grclass; +- while (grc->id) { +- if (grc->id == class) +- break; +- grc++; +- } +- +- if (grc->id != class || !grc->methods) +- return -ENOENT; +- +- grm = grc->methods; +- while (grm->id) { +- if (grm->id == mthd) +- return grm->exec(chan, class, mthd, data); +- grm++; +- } +- +- return -ENOENT; +-} +- +-static bool +-nouveau_fifo_swmthd(struct nouveau_channel *chan, uint32_t addr, uint32_t data) +-{ +- struct drm_device *dev = chan->dev; +- const int subc = (addr >> 13) & 0x7; +- const int mthd = addr & 0x1ffc; +- +- if (mthd == 0x0000) { +- struct nouveau_gpuobj *gpuobj; +- +- gpuobj = nouveau_ramht_find(chan, data); +- if (!gpuobj) +- return false; +- +- if (gpuobj->engine != NVOBJ_ENGINE_SW) +- return false; +- +- chan->sw_subchannel[subc] = gpuobj->class; +- nv_wr32(dev, NV04_PFIFO_CACHE1_ENGINE, nv_rd32(dev, +- NV04_PFIFO_CACHE1_ENGINE) & ~(0xf << subc * 4)); +- return true; +- } +- +- /* hw object */ +- if (nv_rd32(dev, NV04_PFIFO_CACHE1_ENGINE) & (1 << (subc*4))) +- return false; +- +- if (nouveau_call_method(chan, chan->sw_subchannel[subc], mthd, data)) +- return false; +- +- return true; +-} +- +-static void +-nouveau_fifo_irq_handler(struct drm_device *dev) +-{ +- struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_engine *engine = &dev_priv->engine; +- uint32_t status, reassign; +- int cnt = 0; +- +- reassign = nv_rd32(dev, NV03_PFIFO_CACHES) & 1; +- while ((status = nv_rd32(dev, NV03_PFIFO_INTR_0)) && (cnt++ < 100)) { +- struct nouveau_channel *chan = NULL; +- uint32_t chid, get; +- +- nv_wr32(dev, NV03_PFIFO_CACHES, 0); +- +- chid = engine->fifo.channel_id(dev); +- if (chid >= 0 && chid < engine->fifo.channels) +- chan = dev_priv->fifos[chid]; +- get = nv_rd32(dev, NV03_PFIFO_CACHE1_GET); +- +- if (status & NV_PFIFO_INTR_CACHE_ERROR) { +- uint32_t mthd, data; +- int ptr; +- +- /* NV_PFIFO_CACHE1_GET actually goes to 0xffc before +- * wrapping on my G80 chips, but CACHE1 isn't big +- * enough for this much data.. Tests show that it +- * wraps around to the start at GET=0x800.. No clue +- * as to why.. +- */ +- ptr = (get & 0x7ff) >> 2; +- +- if (dev_priv->card_type < NV_40) { +- mthd = nv_rd32(dev, +- NV04_PFIFO_CACHE1_METHOD(ptr)); +- data = nv_rd32(dev, +- NV04_PFIFO_CACHE1_DATA(ptr)); +- } else { +- mthd = nv_rd32(dev, +- NV40_PFIFO_CACHE1_METHOD(ptr)); +- data = nv_rd32(dev, +- NV40_PFIFO_CACHE1_DATA(ptr)); +- } +- +- if (!chan || !nouveau_fifo_swmthd(chan, mthd, data)) { +- NV_INFO(dev, "PFIFO_CACHE_ERROR - Ch %d/%d " +- "Mthd 0x%04x Data 0x%08x\n", +- chid, (mthd >> 13) & 7, mthd & 0x1ffc, +- data); +- } +- +- nv_wr32(dev, NV04_PFIFO_CACHE1_DMA_PUSH, 0); +- nv_wr32(dev, NV03_PFIFO_INTR_0, +- NV_PFIFO_INTR_CACHE_ERROR); +- +- nv_wr32(dev, NV03_PFIFO_CACHE1_PUSH0, +- nv_rd32(dev, NV03_PFIFO_CACHE1_PUSH0) & ~1); +- nv_wr32(dev, NV03_PFIFO_CACHE1_GET, get + 4); +- nv_wr32(dev, NV03_PFIFO_CACHE1_PUSH0, +- nv_rd32(dev, NV03_PFIFO_CACHE1_PUSH0) | 1); +- nv_wr32(dev, NV04_PFIFO_CACHE1_HASH, 0); +- +- nv_wr32(dev, NV04_PFIFO_CACHE1_DMA_PUSH, +- nv_rd32(dev, NV04_PFIFO_CACHE1_DMA_PUSH) | 1); +- nv_wr32(dev, NV04_PFIFO_CACHE1_PULL0, 1); +- +- status &= ~NV_PFIFO_INTR_CACHE_ERROR; +- } +- +- if (status & NV_PFIFO_INTR_DMA_PUSHER) { +- u32 dma_get = nv_rd32(dev, 0x003244); +- u32 dma_put = nv_rd32(dev, 0x003240); +- u32 push = nv_rd32(dev, 0x003220); +- u32 state = nv_rd32(dev, 0x003228); +- +- if (dev_priv->card_type == NV_50) { +- u32 ho_get = nv_rd32(dev, 0x003328); +- u32 ho_put = nv_rd32(dev, 0x003320); +- u32 ib_get = nv_rd32(dev, 0x003334); +- u32 ib_put = nv_rd32(dev, 0x003330); +- +- if (nouveau_ratelimit()) +- NV_INFO(dev, "PFIFO_DMA_PUSHER - Ch %d Get 0x%02x%08x " +- "Put 0x%02x%08x IbGet 0x%08x IbPut 0x%08x " +- "State 0x%08x Push 0x%08x\n", +- chid, ho_get, dma_get, ho_put, +- dma_put, ib_get, ib_put, state, +- push); +- +- /* METHOD_COUNT, in DMA_STATE on earlier chipsets */ +- nv_wr32(dev, 0x003364, 0x00000000); +- if (dma_get != dma_put || ho_get != ho_put) { +- nv_wr32(dev, 0x003244, dma_put); +- nv_wr32(dev, 0x003328, ho_put); +- } else +- if (ib_get != ib_put) { +- nv_wr32(dev, 0x003334, ib_put); +- } +- } else { +- NV_INFO(dev, "PFIFO_DMA_PUSHER - Ch %d Get 0x%08x " +- "Put 0x%08x State 0x%08x Push 0x%08x\n", +- chid, dma_get, dma_put, state, push); +- +- if (dma_get != dma_put) +- nv_wr32(dev, 0x003244, dma_put); +- } +- +- nv_wr32(dev, 0x003228, 0x00000000); +- nv_wr32(dev, 0x003220, 0x00000001); +- nv_wr32(dev, 0x002100, NV_PFIFO_INTR_DMA_PUSHER); +- status &= ~NV_PFIFO_INTR_DMA_PUSHER; +- } +- +- if (status & NV_PFIFO_INTR_SEMAPHORE) { +- uint32_t sem; +- +- status &= ~NV_PFIFO_INTR_SEMAPHORE; +- nv_wr32(dev, NV03_PFIFO_INTR_0, +- NV_PFIFO_INTR_SEMAPHORE); +- +- sem = nv_rd32(dev, NV10_PFIFO_CACHE1_SEMAPHORE); +- nv_wr32(dev, NV10_PFIFO_CACHE1_SEMAPHORE, sem | 0x1); +- +- nv_wr32(dev, NV03_PFIFO_CACHE1_GET, get + 4); +- nv_wr32(dev, NV04_PFIFO_CACHE1_PULL0, 1); +- } +- +- if (dev_priv->card_type == NV_50) { +- if (status & 0x00000010) { +- nv50_fb_vm_trap(dev, 1, "PFIFO_BAR_FAULT"); +- status &= ~0x00000010; +- nv_wr32(dev, 0x002100, 0x00000010); +- } +- } +- +- if (status) { +- if (nouveau_ratelimit()) +- NV_INFO(dev, "PFIFO_INTR 0x%08x - Ch %d\n", +- status, chid); +- nv_wr32(dev, NV03_PFIFO_INTR_0, status); +- status = 0; +- } +- +- nv_wr32(dev, NV03_PFIFO_CACHES, reassign); +- } +- +- if (status) { +- NV_INFO(dev, "PFIFO still angry after %d spins, halt\n", cnt); +- nv_wr32(dev, 0x2140, 0); +- nv_wr32(dev, 0x140, 0); +- } +- +- nv_wr32(dev, NV03_PMC_INTR_0, NV_PMC_INTR_0_PFIFO_PENDING); +-} +- +-struct nouveau_bitfield_names { +- uint32_t mask; +- const char *name; +-}; +- +-static struct nouveau_bitfield_names nstatus_names[] = +-{ +- { NV04_PGRAPH_NSTATUS_STATE_IN_USE, "STATE_IN_USE" }, +- { NV04_PGRAPH_NSTATUS_INVALID_STATE, "INVALID_STATE" }, +- { NV04_PGRAPH_NSTATUS_BAD_ARGUMENT, "BAD_ARGUMENT" }, +- { NV04_PGRAPH_NSTATUS_PROTECTION_FAULT, "PROTECTION_FAULT" } +-}; +- +-static struct nouveau_bitfield_names nstatus_names_nv10[] = +-{ +- { NV10_PGRAPH_NSTATUS_STATE_IN_USE, "STATE_IN_USE" }, +- { NV10_PGRAPH_NSTATUS_INVALID_STATE, "INVALID_STATE" }, +- { NV10_PGRAPH_NSTATUS_BAD_ARGUMENT, "BAD_ARGUMENT" }, +- { NV10_PGRAPH_NSTATUS_PROTECTION_FAULT, "PROTECTION_FAULT" } +-}; +- +-static struct nouveau_bitfield_names nsource_names[] = +-{ +- { NV03_PGRAPH_NSOURCE_NOTIFICATION, "NOTIFICATION" }, +- { NV03_PGRAPH_NSOURCE_DATA_ERROR, "DATA_ERROR" }, +- { NV03_PGRAPH_NSOURCE_PROTECTION_ERROR, "PROTECTION_ERROR" }, +- { NV03_PGRAPH_NSOURCE_RANGE_EXCEPTION, "RANGE_EXCEPTION" }, +- { NV03_PGRAPH_NSOURCE_LIMIT_COLOR, "LIMIT_COLOR" }, +- { NV03_PGRAPH_NSOURCE_LIMIT_ZETA, "LIMIT_ZETA" }, +- { NV03_PGRAPH_NSOURCE_ILLEGAL_MTHD, "ILLEGAL_MTHD" }, +- { NV03_PGRAPH_NSOURCE_DMA_R_PROTECTION, "DMA_R_PROTECTION" }, +- { NV03_PGRAPH_NSOURCE_DMA_W_PROTECTION, "DMA_W_PROTECTION" }, +- { NV03_PGRAPH_NSOURCE_FORMAT_EXCEPTION, "FORMAT_EXCEPTION" }, +- { NV03_PGRAPH_NSOURCE_PATCH_EXCEPTION, "PATCH_EXCEPTION" }, +- { NV03_PGRAPH_NSOURCE_STATE_INVALID, "STATE_INVALID" }, +- { NV03_PGRAPH_NSOURCE_DOUBLE_NOTIFY, "DOUBLE_NOTIFY" }, +- { NV03_PGRAPH_NSOURCE_NOTIFY_IN_USE, "NOTIFY_IN_USE" }, +- { NV03_PGRAPH_NSOURCE_METHOD_CNT, "METHOD_CNT" }, +- { NV03_PGRAPH_NSOURCE_BFR_NOTIFICATION, "BFR_NOTIFICATION" }, +- { NV03_PGRAPH_NSOURCE_DMA_VTX_PROTECTION, "DMA_VTX_PROTECTION" }, +- { NV03_PGRAPH_NSOURCE_DMA_WIDTH_A, "DMA_WIDTH_A" }, +- { NV03_PGRAPH_NSOURCE_DMA_WIDTH_B, "DMA_WIDTH_B" }, +-}; +- +-static void +-nouveau_print_bitfield_names_(uint32_t value, +- const struct nouveau_bitfield_names *namelist, +- const int namelist_len) +-{ +- /* +- * Caller must have already printed the KERN_* log level for us. +- * Also the caller is responsible for adding the newline. +- */ +- int i; +- for (i = 0; i < namelist_len; ++i) { +- uint32_t mask = namelist[i].mask; +- if (value & mask) { +- printk(" %s", namelist[i].name); +- value &= ~mask; +- } +- } +- if (value) +- printk(" (unknown bits 0x%08x)", value); +-} +-#define nouveau_print_bitfield_names(val, namelist) \ +- nouveau_print_bitfield_names_((val), (namelist), ARRAY_SIZE(namelist)) +- +-struct nouveau_enum_names { +- uint32_t value; +- const char *name; +-}; +- +-static void +-nouveau_print_enum_names_(uint32_t value, +- const struct nouveau_enum_names *namelist, +- const int namelist_len) +-{ +- /* +- * Caller must have already printed the KERN_* log level for us. +- * Also the caller is responsible for adding the newline. +- */ +- int i; +- for (i = 0; i < namelist_len; ++i) { +- if (value == namelist[i].value) { +- printk("%s", namelist[i].name); +- return; +- } +- } +- printk("unknown value 0x%08x", value); +-} +-#define nouveau_print_enum_names(val, namelist) \ +- nouveau_print_enum_names_((val), (namelist), ARRAY_SIZE(namelist)) +- +-static int +-nouveau_graph_chid_from_grctx(struct drm_device *dev) ++irqreturn_t ++nouveau_irq_handler(DRM_IRQ_ARGS) + { ++ struct drm_device *dev = (struct drm_device *)arg; + struct drm_nouveau_private *dev_priv = dev->dev_private; +- uint32_t inst; ++ unsigned long flags; ++ u32 stat; + int i; + +- if (dev_priv->card_type < NV_40) +- return dev_priv->engine.fifo.channels; +- else +- if (dev_priv->card_type < NV_50) { +- inst = (nv_rd32(dev, 0x40032c) & 0xfffff) << 4; +- +- for (i = 0; i < dev_priv->engine.fifo.channels; i++) { +- struct nouveau_channel *chan = dev_priv->fifos[i]; +- +- if (!chan || !chan->ramin_grctx) +- continue; +- +- if (inst == chan->ramin_grctx->pinst) +- break; +- } +- } else { +- inst = (nv_rd32(dev, 0x40032c) & 0xfffff) << 12; +- +- for (i = 0; i < dev_priv->engine.fifo.channels; i++) { +- struct nouveau_channel *chan = dev_priv->fifos[i]; +- +- if (!chan || !chan->ramin) +- continue; +- +- if (inst == chan->ramin->vinst) +- break; +- } +- } +- +- +- return i; +-} +- +-static int +-nouveau_graph_trapped_channel(struct drm_device *dev, int *channel_ret) +-{ +- struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_engine *engine = &dev_priv->engine; +- int channel; +- +- if (dev_priv->card_type < NV_10) +- channel = (nv_rd32(dev, NV04_PGRAPH_TRAPPED_ADDR) >> 24) & 0xf; +- else +- if (dev_priv->card_type < NV_40) +- channel = (nv_rd32(dev, NV04_PGRAPH_TRAPPED_ADDR) >> 20) & 0x1f; +- else +- channel = nouveau_graph_chid_from_grctx(dev); +- +- if (channel >= engine->fifo.channels || !dev_priv->fifos[channel]) { +- NV_ERROR(dev, "AIII, invalid/inactive channel id %d\n", channel); +- return -EINVAL; +- } +- +- *channel_ret = channel; +- return 0; +-} +- +-struct nouveau_pgraph_trap { +- int channel; +- int class; +- int subc, mthd, size; +- uint32_t data, data2; +- uint32_t nsource, nstatus; +-}; +- +-static void +-nouveau_graph_trap_info(struct drm_device *dev, +- struct nouveau_pgraph_trap *trap) +-{ +- struct drm_nouveau_private *dev_priv = dev->dev_private; +- uint32_t address; +- +- trap->nsource = trap->nstatus = 0; +- if (dev_priv->card_type < NV_50) { +- trap->nsource = nv_rd32(dev, NV03_PGRAPH_NSOURCE); +- trap->nstatus = nv_rd32(dev, NV03_PGRAPH_NSTATUS); +- } +- +- if (nouveau_graph_trapped_channel(dev, &trap->channel)) +- trap->channel = -1; +- address = nv_rd32(dev, NV04_PGRAPH_TRAPPED_ADDR); +- +- trap->mthd = address & 0x1FFC; +- trap->data = nv_rd32(dev, NV04_PGRAPH_TRAPPED_DATA); +- if (dev_priv->card_type < NV_10) { +- trap->subc = (address >> 13) & 0x7; +- } else { +- trap->subc = (address >> 16) & 0x7; +- trap->data2 = nv_rd32(dev, NV10_PGRAPH_TRAPPED_DATA_HIGH); +- } +- +- if (dev_priv->card_type < NV_10) +- trap->class = nv_rd32(dev, 0x400180 + trap->subc*4) & 0xFF; +- else if (dev_priv->card_type < NV_40) +- trap->class = nv_rd32(dev, 0x400160 + trap->subc*4) & 0xFFF; +- else if (dev_priv->card_type < NV_50) +- trap->class = nv_rd32(dev, 0x400160 + trap->subc*4) & 0xFFFF; +- else +- trap->class = nv_rd32(dev, 0x400814); +-} +- +-static void +-nouveau_graph_dump_trap_info(struct drm_device *dev, const char *id, +- struct nouveau_pgraph_trap *trap) +-{ +- struct drm_nouveau_private *dev_priv = dev->dev_private; +- uint32_t nsource = trap->nsource, nstatus = trap->nstatus; +- +- if (dev_priv->card_type < NV_50) { +- NV_INFO(dev, "%s - nSource:", id); +- nouveau_print_bitfield_names(nsource, nsource_names); +- printk(", nStatus:"); +- if (dev_priv->card_type < NV_10) +- nouveau_print_bitfield_names(nstatus, nstatus_names); +- else +- nouveau_print_bitfield_names(nstatus, nstatus_names_nv10); +- printk("\n"); +- } +- +- NV_INFO(dev, "%s - Ch %d/%d Class 0x%04x Mthd 0x%04x " +- "Data 0x%08x:0x%08x\n", +- id, trap->channel, trap->subc, +- trap->class, trap->mthd, +- trap->data2, trap->data); +-} +- +-static int +-nouveau_pgraph_intr_swmthd(struct drm_device *dev, +- struct nouveau_pgraph_trap *trap) +-{ +- struct drm_nouveau_private *dev_priv = dev->dev_private; +- +- if (trap->channel < 0 || +- trap->channel >= dev_priv->engine.fifo.channels || +- !dev_priv->fifos[trap->channel]) +- return -ENODEV; +- +- return nouveau_call_method(dev_priv->fifos[trap->channel], +- trap->class, trap->mthd, trap->data); +-} +- +-static inline void +-nouveau_pgraph_intr_notify(struct drm_device *dev, uint32_t nsource) +-{ +- struct nouveau_pgraph_trap trap; +- int unhandled = 0; ++ stat = nv_rd32(dev, NV03_PMC_INTR_0); ++ if (!stat) ++ return IRQ_NONE; + +- nouveau_graph_trap_info(dev, &trap); ++ spin_lock_irqsave(&dev_priv->context_switch_lock, flags); ++ for (i = 0; i < 32 && stat; i++) { ++ if (!(stat & (1 << i)) || !dev_priv->irq_handler[i]) ++ continue; + +- if (nsource & NV03_PGRAPH_NSOURCE_ILLEGAL_MTHD) { +- if (nouveau_pgraph_intr_swmthd(dev, &trap)) +- unhandled = 1; +- } else { +- unhandled = 1; ++ dev_priv->irq_handler[i](dev); ++ stat &= ~(1 << i); + } + +- if (unhandled) +- nouveau_graph_dump_trap_info(dev, "PGRAPH_NOTIFY", &trap); +-} +- +- +-static inline void +-nouveau_pgraph_intr_error(struct drm_device *dev, uint32_t nsource) +-{ +- struct nouveau_pgraph_trap trap; +- int unhandled = 0; +- +- nouveau_graph_trap_info(dev, &trap); +- trap.nsource = nsource; +- +- if (nsource & NV03_PGRAPH_NSOURCE_ILLEGAL_MTHD) { +- if (nouveau_pgraph_intr_swmthd(dev, &trap)) +- unhandled = 1; +- } else if (nsource & NV03_PGRAPH_NSOURCE_DMA_VTX_PROTECTION) { +- uint32_t v = nv_rd32(dev, 0x402000); +- nv_wr32(dev, 0x402000, v); +- +- /* dump the error anyway for now: it's useful for +- Gallium development */ +- unhandled = 1; +- } else { +- unhandled = 1; +- } ++ if (dev_priv->msi_enabled) ++ nv_wr08(dev, 0x00088068, 0xff); ++ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); + +- if (unhandled && nouveau_ratelimit()) +- nouveau_graph_dump_trap_info(dev, "PGRAPH_ERROR", &trap); ++ if (stat && nouveau_ratelimit()) ++ NV_ERROR(dev, "PMC - unhandled INTR 0x%08x\n", stat); ++ return IRQ_HANDLED; + } + +-static inline void +-nouveau_pgraph_intr_context_switch(struct drm_device *dev) ++int ++nouveau_irq_init(struct drm_device *dev) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_engine *engine = &dev_priv->engine; +- uint32_t chid; +- +- chid = engine->fifo.channel_id(dev); +- NV_DEBUG(dev, "PGRAPH context switch interrupt channel %x\n", chid); +- +- switch (dev_priv->card_type) { +- case NV_04: +- nv04_graph_context_switch(dev); +- break; +- case NV_10: +- nv10_graph_context_switch(dev); +- break; +- default: +- NV_ERROR(dev, "Context switch not implemented\n"); +- break; +- } +-} +- +-static void +-nouveau_pgraph_irq_handler(struct drm_device *dev) +-{ +- uint32_t status; +- +- while ((status = nv_rd32(dev, NV03_PGRAPH_INTR))) { +- uint32_t nsource = nv_rd32(dev, NV03_PGRAPH_NSOURCE); +- +- if (status & NV_PGRAPH_INTR_NOTIFY) { +- nouveau_pgraph_intr_notify(dev, nsource); +- +- status &= ~NV_PGRAPH_INTR_NOTIFY; +- nv_wr32(dev, NV03_PGRAPH_INTR, NV_PGRAPH_INTR_NOTIFY); +- } +- +- if (status & NV_PGRAPH_INTR_ERROR) { +- nouveau_pgraph_intr_error(dev, nsource); +- +- status &= ~NV_PGRAPH_INTR_ERROR; +- nv_wr32(dev, NV03_PGRAPH_INTR, NV_PGRAPH_INTR_ERROR); +- } +- +- if (status & NV_PGRAPH_INTR_CONTEXT_SWITCH) { +- status &= ~NV_PGRAPH_INTR_CONTEXT_SWITCH; +- nv_wr32(dev, NV03_PGRAPH_INTR, +- NV_PGRAPH_INTR_CONTEXT_SWITCH); ++ int ret; + +- nouveau_pgraph_intr_context_switch(dev); ++ if (nouveau_msi != 0 && dev_priv->card_type >= NV_50) { ++ ret = pci_enable_msi(dev->pdev); ++ if (ret == 0) { ++ NV_INFO(dev, "enabled MSI\n"); ++ dev_priv->msi_enabled = true; + } +- +- if (status) { +- NV_INFO(dev, "Unhandled PGRAPH_INTR - 0x%08x\n", status); +- nv_wr32(dev, NV03_PGRAPH_INTR, status); +- } +- +- if ((nv_rd32(dev, NV04_PGRAPH_FIFO) & (1 << 0)) == 0) +- nv_wr32(dev, NV04_PGRAPH_FIFO, 1); + } + +- nv_wr32(dev, NV03_PMC_INTR_0, NV_PMC_INTR_0_PGRAPH_PENDING); ++ return drm_irq_install(dev); + } + +-static struct nouveau_enum_names nv50_mp_exec_error_names[] = +-{ +- { 3, "STACK_UNDERFLOW" }, +- { 4, "QUADON_ACTIVE" }, +- { 8, "TIMEOUT" }, +- { 0x10, "INVALID_OPCODE" }, +- { 0x40, "BREAKPOINT" }, +-}; +- +-static void +-nv50_pgraph_mp_trap(struct drm_device *dev, int tpid, int display) +-{ +- struct drm_nouveau_private *dev_priv = dev->dev_private; +- uint32_t units = nv_rd32(dev, 0x1540); +- uint32_t addr, mp10, status, pc, oplow, ophigh; +- int i; +- int mps = 0; +- for (i = 0; i < 4; i++) { +- if (!(units & 1 << (i+24))) +- continue; +- if (dev_priv->chipset < 0xa0) +- addr = 0x408200 + (tpid << 12) + (i << 7); +- else +- addr = 0x408100 + (tpid << 11) + (i << 7); +- mp10 = nv_rd32(dev, addr + 0x10); +- status = nv_rd32(dev, addr + 0x14); +- if (!status) +- continue; +- if (display) { +- nv_rd32(dev, addr + 0x20); +- pc = nv_rd32(dev, addr + 0x24); +- oplow = nv_rd32(dev, addr + 0x70); +- ophigh= nv_rd32(dev, addr + 0x74); +- NV_INFO(dev, "PGRAPH_TRAP_MP_EXEC - " +- "TP %d MP %d: ", tpid, i); +- nouveau_print_enum_names(status, +- nv50_mp_exec_error_names); +- printk(" at %06x warp %d, opcode %08x %08x\n", +- pc&0xffffff, pc >> 24, +- oplow, ophigh); +- } +- nv_wr32(dev, addr + 0x10, mp10); +- nv_wr32(dev, addr + 0x14, 0); +- mps++; +- } +- if (!mps && display) +- NV_INFO(dev, "PGRAPH_TRAP_MP_EXEC - TP %d: " +- "No MPs claiming errors?\n", tpid); +-} +- +-static void +-nv50_pgraph_tp_trap(struct drm_device *dev, int type, uint32_t ustatus_old, +- uint32_t ustatus_new, int display, const char *name) ++void ++nouveau_irq_fini(struct drm_device *dev) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; +- int tps = 0; +- uint32_t units = nv_rd32(dev, 0x1540); +- int i, r; +- uint32_t ustatus_addr, ustatus; +- for (i = 0; i < 16; i++) { +- if (!(units & (1 << i))) +- continue; +- if (dev_priv->chipset < 0xa0) +- ustatus_addr = ustatus_old + (i << 12); +- else +- ustatus_addr = ustatus_new + (i << 11); +- ustatus = nv_rd32(dev, ustatus_addr) & 0x7fffffff; +- if (!ustatus) +- continue; +- tps++; +- switch (type) { +- case 6: /* texture error... unknown for now */ +- nv50_fb_vm_trap(dev, display, name); +- if (display) { +- NV_ERROR(dev, "magic set %d:\n", i); +- for (r = ustatus_addr + 4; r <= ustatus_addr + 0x10; r += 4) +- NV_ERROR(dev, "\t0x%08x: 0x%08x\n", r, +- nv_rd32(dev, r)); +- } +- break; +- case 7: /* MP error */ +- if (ustatus & 0x00010000) { +- nv50_pgraph_mp_trap(dev, i, display); +- ustatus &= ~0x00010000; +- } +- break; +- case 8: /* TPDMA error */ +- { +- uint32_t e0c = nv_rd32(dev, ustatus_addr + 4); +- uint32_t e10 = nv_rd32(dev, ustatus_addr + 8); +- uint32_t e14 = nv_rd32(dev, ustatus_addr + 0xc); +- uint32_t e18 = nv_rd32(dev, ustatus_addr + 0x10); +- uint32_t e1c = nv_rd32(dev, ustatus_addr + 0x14); +- uint32_t e20 = nv_rd32(dev, ustatus_addr + 0x18); +- uint32_t e24 = nv_rd32(dev, ustatus_addr + 0x1c); +- nv50_fb_vm_trap(dev, display, name); +- /* 2d engine destination */ +- if (ustatus & 0x00000010) { +- if (display) { +- NV_INFO(dev, "PGRAPH_TRAP_TPDMA_2D - TP %d - Unknown fault at address %02x%08x\n", +- i, e14, e10); +- NV_INFO(dev, "PGRAPH_TRAP_TPDMA_2D - TP %d - e0c: %08x, e18: %08x, e1c: %08x, e20: %08x, e24: %08x\n", +- i, e0c, e18, e1c, e20, e24); +- } +- ustatus &= ~0x00000010; +- } +- /* Render target */ +- if (ustatus & 0x00000040) { +- if (display) { +- NV_INFO(dev, "PGRAPH_TRAP_TPDMA_RT - TP %d - Unknown fault at address %02x%08x\n", +- i, e14, e10); +- NV_INFO(dev, "PGRAPH_TRAP_TPDMA_RT - TP %d - e0c: %08x, e18: %08x, e1c: %08x, e20: %08x, e24: %08x\n", +- i, e0c, e18, e1c, e20, e24); +- } +- ustatus &= ~0x00000040; +- } +- /* CUDA memory: l[], g[] or stack. */ +- if (ustatus & 0x00000080) { +- if (display) { +- if (e18 & 0x80000000) { +- /* g[] read fault? */ +- NV_INFO(dev, "PGRAPH_TRAP_TPDMA - TP %d - Global read fault at address %02x%08x\n", +- i, e14, e10 | ((e18 >> 24) & 0x1f)); +- e18 &= ~0x1f000000; +- } else if (e18 & 0xc) { +- /* g[] write fault? */ +- NV_INFO(dev, "PGRAPH_TRAP_TPDMA - TP %d - Global write fault at address %02x%08x\n", +- i, e14, e10 | ((e18 >> 7) & 0x1f)); +- e18 &= ~0x00000f80; +- } else { +- NV_INFO(dev, "PGRAPH_TRAP_TPDMA - TP %d - Unknown CUDA fault at address %02x%08x\n", +- i, e14, e10); +- } +- NV_INFO(dev, "PGRAPH_TRAP_TPDMA - TP %d - e0c: %08x, e18: %08x, e1c: %08x, e20: %08x, e24: %08x\n", +- i, e0c, e18, e1c, e20, e24); +- } +- ustatus &= ~0x00000080; +- } +- } +- break; +- } +- if (ustatus) { +- if (display) +- NV_INFO(dev, "%s - TP%d: Unhandled ustatus 0x%08x\n", name, i, ustatus); +- } +- nv_wr32(dev, ustatus_addr, 0xc0000000); +- } +- +- if (!tps && display) +- NV_INFO(dev, "%s - No TPs claiming errors?\n", name); +-} +- +-static void +-nv50_pgraph_trap_handler(struct drm_device *dev) +-{ +- struct nouveau_pgraph_trap trap; +- uint32_t status = nv_rd32(dev, 0x400108); +- uint32_t ustatus; +- int display = nouveau_ratelimit(); +- +- +- if (!status && display) { +- nouveau_graph_trap_info(dev, &trap); +- nouveau_graph_dump_trap_info(dev, "PGRAPH_TRAP", &trap); +- NV_INFO(dev, "PGRAPH_TRAP - no units reporting traps?\n"); +- } +- +- /* DISPATCH: Relays commands to other units and handles NOTIFY, +- * COND, QUERY. If you get a trap from it, the command is still stuck +- * in DISPATCH and you need to do something about it. */ +- if (status & 0x001) { +- ustatus = nv_rd32(dev, 0x400804) & 0x7fffffff; +- if (!ustatus && display) { +- NV_INFO(dev, "PGRAPH_TRAP_DISPATCH - no ustatus?\n"); +- } +- +- /* Known to be triggered by screwed up NOTIFY and COND... */ +- if (ustatus & 0x00000001) { +- nv50_fb_vm_trap(dev, display, "PGRAPH_TRAP_DISPATCH_FAULT"); +- nv_wr32(dev, 0x400500, 0); +- if (nv_rd32(dev, 0x400808) & 0x80000000) { +- if (display) { +- if (nouveau_graph_trapped_channel(dev, &trap.channel)) +- trap.channel = -1; +- trap.class = nv_rd32(dev, 0x400814); +- trap.mthd = nv_rd32(dev, 0x400808) & 0x1ffc; +- trap.subc = (nv_rd32(dev, 0x400808) >> 16) & 0x7; +- trap.data = nv_rd32(dev, 0x40080c); +- trap.data2 = nv_rd32(dev, 0x400810); +- nouveau_graph_dump_trap_info(dev, +- "PGRAPH_TRAP_DISPATCH_FAULT", &trap); +- NV_INFO(dev, "PGRAPH_TRAP_DISPATCH_FAULT - 400808: %08x\n", nv_rd32(dev, 0x400808)); +- NV_INFO(dev, "PGRAPH_TRAP_DISPATCH_FAULT - 400848: %08x\n", nv_rd32(dev, 0x400848)); +- } +- nv_wr32(dev, 0x400808, 0); +- } else if (display) { +- NV_INFO(dev, "PGRAPH_TRAP_DISPATCH_FAULT - No stuck command?\n"); +- } +- nv_wr32(dev, 0x4008e8, nv_rd32(dev, 0x4008e8) & 3); +- nv_wr32(dev, 0x400848, 0); +- ustatus &= ~0x00000001; +- } +- if (ustatus & 0x00000002) { +- nv50_fb_vm_trap(dev, display, "PGRAPH_TRAP_DISPATCH_QUERY"); +- nv_wr32(dev, 0x400500, 0); +- if (nv_rd32(dev, 0x40084c) & 0x80000000) { +- if (display) { +- if (nouveau_graph_trapped_channel(dev, &trap.channel)) +- trap.channel = -1; +- trap.class = nv_rd32(dev, 0x400814); +- trap.mthd = nv_rd32(dev, 0x40084c) & 0x1ffc; +- trap.subc = (nv_rd32(dev, 0x40084c) >> 16) & 0x7; +- trap.data = nv_rd32(dev, 0x40085c); +- trap.data2 = 0; +- nouveau_graph_dump_trap_info(dev, +- "PGRAPH_TRAP_DISPATCH_QUERY", &trap); +- NV_INFO(dev, "PGRAPH_TRAP_DISPATCH_QUERY - 40084c: %08x\n", nv_rd32(dev, 0x40084c)); +- } +- nv_wr32(dev, 0x40084c, 0); +- } else if (display) { +- NV_INFO(dev, "PGRAPH_TRAP_DISPATCH_QUERY - No stuck command?\n"); +- } +- ustatus &= ~0x00000002; +- } +- if (ustatus && display) +- NV_INFO(dev, "PGRAPH_TRAP_DISPATCH - Unhandled ustatus 0x%08x\n", ustatus); +- nv_wr32(dev, 0x400804, 0xc0000000); +- nv_wr32(dev, 0x400108, 0x001); +- status &= ~0x001; +- } +- +- /* TRAPs other than dispatch use the "normal" trap regs. */ +- if (status && display) { +- nouveau_graph_trap_info(dev, &trap); +- nouveau_graph_dump_trap_info(dev, +- "PGRAPH_TRAP", &trap); +- } +- +- /* M2MF: Memory to memory copy engine. */ +- if (status & 0x002) { +- ustatus = nv_rd32(dev, 0x406800) & 0x7fffffff; +- if (!ustatus && display) { +- NV_INFO(dev, "PGRAPH_TRAP_M2MF - no ustatus?\n"); +- } +- if (ustatus & 0x00000001) { +- nv50_fb_vm_trap(dev, display, "PGRAPH_TRAP_M2MF_NOTIFY"); +- ustatus &= ~0x00000001; +- } +- if (ustatus & 0x00000002) { +- nv50_fb_vm_trap(dev, display, "PGRAPH_TRAP_M2MF_IN"); +- ustatus &= ~0x00000002; +- } +- if (ustatus & 0x00000004) { +- nv50_fb_vm_trap(dev, display, "PGRAPH_TRAP_M2MF_OUT"); +- ustatus &= ~0x00000004; +- } +- NV_INFO (dev, "PGRAPH_TRAP_M2MF - %08x %08x %08x %08x\n", +- nv_rd32(dev, 0x406804), +- nv_rd32(dev, 0x406808), +- nv_rd32(dev, 0x40680c), +- nv_rd32(dev, 0x406810)); +- if (ustatus && display) +- NV_INFO(dev, "PGRAPH_TRAP_M2MF - Unhandled ustatus 0x%08x\n", ustatus); +- /* No sane way found yet -- just reset the bugger. */ +- nv_wr32(dev, 0x400040, 2); +- nv_wr32(dev, 0x400040, 0); +- nv_wr32(dev, 0x406800, 0xc0000000); +- nv_wr32(dev, 0x400108, 0x002); +- status &= ~0x002; +- } +- +- /* VFETCH: Fetches data from vertex buffers. */ +- if (status & 0x004) { +- ustatus = nv_rd32(dev, 0x400c04) & 0x7fffffff; +- if (!ustatus && display) { +- NV_INFO(dev, "PGRAPH_TRAP_VFETCH - no ustatus?\n"); +- } +- if (ustatus & 0x00000001) { +- nv50_fb_vm_trap(dev, display, "PGRAPH_TRAP_VFETCH_FAULT"); +- NV_INFO (dev, "PGRAPH_TRAP_VFETCH_FAULT - %08x %08x %08x %08x\n", +- nv_rd32(dev, 0x400c00), +- nv_rd32(dev, 0x400c08), +- nv_rd32(dev, 0x400c0c), +- nv_rd32(dev, 0x400c10)); +- ustatus &= ~0x00000001; +- } +- if (ustatus && display) +- NV_INFO(dev, "PGRAPH_TRAP_VFETCH - Unhandled ustatus 0x%08x\n", ustatus); +- nv_wr32(dev, 0x400c04, 0xc0000000); +- nv_wr32(dev, 0x400108, 0x004); +- status &= ~0x004; +- } +- +- /* STRMOUT: DirectX streamout / OpenGL transform feedback. */ +- if (status & 0x008) { +- ustatus = nv_rd32(dev, 0x401800) & 0x7fffffff; +- if (!ustatus && display) { +- NV_INFO(dev, "PGRAPH_TRAP_STRMOUT - no ustatus?\n"); +- } +- if (ustatus & 0x00000001) { +- nv50_fb_vm_trap(dev, display, "PGRAPH_TRAP_STRMOUT_FAULT"); +- NV_INFO (dev, "PGRAPH_TRAP_STRMOUT_FAULT - %08x %08x %08x %08x\n", +- nv_rd32(dev, 0x401804), +- nv_rd32(dev, 0x401808), +- nv_rd32(dev, 0x40180c), +- nv_rd32(dev, 0x401810)); +- ustatus &= ~0x00000001; +- } +- if (ustatus && display) +- NV_INFO(dev, "PGRAPH_TRAP_STRMOUT - Unhandled ustatus 0x%08x\n", ustatus); +- /* No sane way found yet -- just reset the bugger. */ +- nv_wr32(dev, 0x400040, 0x80); +- nv_wr32(dev, 0x400040, 0); +- nv_wr32(dev, 0x401800, 0xc0000000); +- nv_wr32(dev, 0x400108, 0x008); +- status &= ~0x008; +- } +- +- /* CCACHE: Handles code and c[] caches and fills them. */ +- if (status & 0x010) { +- ustatus = nv_rd32(dev, 0x405018) & 0x7fffffff; +- if (!ustatus && display) { +- NV_INFO(dev, "PGRAPH_TRAP_CCACHE - no ustatus?\n"); +- } +- if (ustatus & 0x00000001) { +- nv50_fb_vm_trap(dev, display, "PGRAPH_TRAP_CCACHE_FAULT"); +- NV_INFO (dev, "PGRAPH_TRAP_CCACHE_FAULT - %08x %08x %08x %08x %08x %08x %08x\n", +- nv_rd32(dev, 0x405800), +- nv_rd32(dev, 0x405804), +- nv_rd32(dev, 0x405808), +- nv_rd32(dev, 0x40580c), +- nv_rd32(dev, 0x405810), +- nv_rd32(dev, 0x405814), +- nv_rd32(dev, 0x40581c)); +- ustatus &= ~0x00000001; +- } +- if (ustatus && display) +- NV_INFO(dev, "PGRAPH_TRAP_CCACHE - Unhandled ustatus 0x%08x\n", ustatus); +- nv_wr32(dev, 0x405018, 0xc0000000); +- nv_wr32(dev, 0x400108, 0x010); +- status &= ~0x010; +- } +- +- /* Unknown, not seen yet... 0x402000 is the only trap status reg +- * remaining, so try to handle it anyway. Perhaps related to that +- * unknown DMA slot on tesla? */ +- if (status & 0x20) { +- nv50_fb_vm_trap(dev, display, "PGRAPH_TRAP_UNKC04"); +- ustatus = nv_rd32(dev, 0x402000) & 0x7fffffff; +- if (display) +- NV_INFO(dev, "PGRAPH_TRAP_UNKC04 - Unhandled ustatus 0x%08x\n", ustatus); +- nv_wr32(dev, 0x402000, 0xc0000000); +- /* no status modifiction on purpose */ +- } +- +- /* TEXTURE: CUDA texturing units */ +- if (status & 0x040) { +- nv50_pgraph_tp_trap (dev, 6, 0x408900, 0x408600, display, +- "PGRAPH_TRAP_TEXTURE"); +- nv_wr32(dev, 0x400108, 0x040); +- status &= ~0x040; +- } +- +- /* MP: CUDA execution engines. */ +- if (status & 0x080) { +- nv50_pgraph_tp_trap (dev, 7, 0x408314, 0x40831c, display, +- "PGRAPH_TRAP_MP"); +- nv_wr32(dev, 0x400108, 0x080); +- status &= ~0x080; +- } +- +- /* TPDMA: Handles TP-initiated uncached memory accesses: +- * l[], g[], stack, 2d surfaces, render targets. */ +- if (status & 0x100) { +- nv50_pgraph_tp_trap (dev, 8, 0x408e08, 0x408708, display, +- "PGRAPH_TRAP_TPDMA"); +- nv_wr32(dev, 0x400108, 0x100); +- status &= ~0x100; +- } + +- if (status) { +- if (display) +- NV_INFO(dev, "PGRAPH_TRAP - Unknown trap 0x%08x\n", +- status); +- nv_wr32(dev, 0x400108, status); +- } ++ drm_irq_uninstall(dev); ++ if (dev_priv->msi_enabled) ++ pci_disable_msi(dev->pdev); + } + +-/* There must be a *lot* of these. Will take some time to gather them up. */ +-static struct nouveau_enum_names nv50_data_error_names[] = +-{ +- { 4, "INVALID_VALUE" }, +- { 5, "INVALID_ENUM" }, +- { 8, "INVALID_OBJECT" }, +- { 0xc, "INVALID_BITFIELD" }, +- { 0x28, "MP_NO_REG_SPACE" }, +- { 0x2b, "MP_BLOCK_SIZE_MISMATCH" }, +-}; +- +-static void +-nv50_pgraph_irq_handler(struct drm_device *dev) +-{ +- struct nouveau_pgraph_trap trap; +- int unhandled = 0; +- uint32_t status; +- +- while ((status = nv_rd32(dev, NV03_PGRAPH_INTR))) { +- /* NOTIFY: You've set a NOTIFY an a command and it's done. */ +- if (status & 0x00000001) { +- nouveau_graph_trap_info(dev, &trap); +- if (nouveau_ratelimit()) +- nouveau_graph_dump_trap_info(dev, +- "PGRAPH_NOTIFY", &trap); +- status &= ~0x00000001; +- nv_wr32(dev, NV03_PGRAPH_INTR, 0x00000001); +- } +- +- /* COMPUTE_QUERY: Purpose and exact cause unknown, happens +- * when you write 0x200 to 0x50c0 method 0x31c. */ +- if (status & 0x00000002) { +- nouveau_graph_trap_info(dev, &trap); +- if (nouveau_ratelimit()) +- nouveau_graph_dump_trap_info(dev, +- "PGRAPH_COMPUTE_QUERY", &trap); +- status &= ~0x00000002; +- nv_wr32(dev, NV03_PGRAPH_INTR, 0x00000002); +- } +- +- /* Unknown, never seen: 0x4 */ +- +- /* ILLEGAL_MTHD: You used a wrong method for this class. */ +- if (status & 0x00000010) { +- nouveau_graph_trap_info(dev, &trap); +- if (nouveau_pgraph_intr_swmthd(dev, &trap)) +- unhandled = 1; +- if (unhandled && nouveau_ratelimit()) +- nouveau_graph_dump_trap_info(dev, +- "PGRAPH_ILLEGAL_MTHD", &trap); +- status &= ~0x00000010; +- nv_wr32(dev, NV03_PGRAPH_INTR, 0x00000010); +- } +- +- /* ILLEGAL_CLASS: You used a wrong class. */ +- if (status & 0x00000020) { +- nouveau_graph_trap_info(dev, &trap); +- if (nouveau_ratelimit()) +- nouveau_graph_dump_trap_info(dev, +- "PGRAPH_ILLEGAL_CLASS", &trap); +- status &= ~0x00000020; +- nv_wr32(dev, NV03_PGRAPH_INTR, 0x00000020); +- } +- +- /* DOUBLE_NOTIFY: You tried to set a NOTIFY on another NOTIFY. */ +- if (status & 0x00000040) { +- nouveau_graph_trap_info(dev, &trap); +- if (nouveau_ratelimit()) +- nouveau_graph_dump_trap_info(dev, +- "PGRAPH_DOUBLE_NOTIFY", &trap); +- status &= ~0x00000040; +- nv_wr32(dev, NV03_PGRAPH_INTR, 0x00000040); +- } +- +- /* CONTEXT_SWITCH: PGRAPH needs us to load a new context */ +- if (status & 0x00001000) { +- nv_wr32(dev, 0x400500, 0x00000000); +- nv_wr32(dev, NV03_PGRAPH_INTR, +- NV_PGRAPH_INTR_CONTEXT_SWITCH); +- nv_wr32(dev, NV40_PGRAPH_INTR_EN, nv_rd32(dev, +- NV40_PGRAPH_INTR_EN) & +- ~NV_PGRAPH_INTR_CONTEXT_SWITCH); +- nv_wr32(dev, 0x400500, 0x00010001); +- +- nv50_graph_context_switch(dev); +- +- status &= ~NV_PGRAPH_INTR_CONTEXT_SWITCH; +- } +- +- /* BUFFER_NOTIFY: Your m2mf transfer finished */ +- if (status & 0x00010000) { +- nouveau_graph_trap_info(dev, &trap); +- if (nouveau_ratelimit()) +- nouveau_graph_dump_trap_info(dev, +- "PGRAPH_BUFFER_NOTIFY", &trap); +- status &= ~0x00010000; +- nv_wr32(dev, NV03_PGRAPH_INTR, 0x00010000); +- } +- +- /* DATA_ERROR: Invalid value for this method, or invalid +- * state in current PGRAPH context for this operation */ +- if (status & 0x00100000) { +- nouveau_graph_trap_info(dev, &trap); +- if (nouveau_ratelimit()) { +- nouveau_graph_dump_trap_info(dev, +- "PGRAPH_DATA_ERROR", &trap); +- NV_INFO (dev, "PGRAPH_DATA_ERROR - "); +- nouveau_print_enum_names(nv_rd32(dev, 0x400110), +- nv50_data_error_names); +- printk("\n"); +- } +- status &= ~0x00100000; +- nv_wr32(dev, NV03_PGRAPH_INTR, 0x00100000); +- } +- +- /* TRAP: Something bad happened in the middle of command +- * execution. Has a billion types, subtypes, and even +- * subsubtypes. */ +- if (status & 0x00200000) { +- nv50_pgraph_trap_handler(dev); +- status &= ~0x00200000; +- nv_wr32(dev, NV03_PGRAPH_INTR, 0x00200000); +- } +- +- /* Unknown, never seen: 0x00400000 */ +- +- /* SINGLE_STEP: Happens on every method if you turned on +- * single stepping in 40008c */ +- if (status & 0x01000000) { +- nouveau_graph_trap_info(dev, &trap); +- if (nouveau_ratelimit()) +- nouveau_graph_dump_trap_info(dev, +- "PGRAPH_SINGLE_STEP", &trap); +- status &= ~0x01000000; +- nv_wr32(dev, NV03_PGRAPH_INTR, 0x01000000); +- } +- +- /* 0x02000000 happens when you pause a ctxprog... +- * but the only way this can happen that I know is by +- * poking the relevant MMIO register, and we don't +- * do that. */ +- +- if (status) { +- NV_INFO(dev, "Unhandled PGRAPH_INTR - 0x%08x\n", +- status); +- nv_wr32(dev, NV03_PGRAPH_INTR, status); +- } +- +- { +- const int isb = (1 << 16) | (1 << 0); +- +- if ((nv_rd32(dev, 0x400500) & isb) != isb) +- nv_wr32(dev, 0x400500, +- nv_rd32(dev, 0x400500) | isb); +- } +- } +- +- nv_wr32(dev, NV03_PMC_INTR_0, NV_PMC_INTR_0_PGRAPH_PENDING); +- if (nv_rd32(dev, 0x400824) & (1 << 31)) +- nv_wr32(dev, 0x400824, nv_rd32(dev, 0x400824) & ~(1 << 31)); +-} +- +-static void +-nouveau_crtc_irq_handler(struct drm_device *dev, int crtc) ++void ++nouveau_irq_register(struct drm_device *dev, int status_bit, ++ void (*handler)(struct drm_device *)) + { +- if (crtc & 1) +- nv_wr32(dev, NV_CRTC0_INTSTAT, NV_CRTC_INTR_VBLANK); ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ unsigned long flags; + +- if (crtc & 2) +- nv_wr32(dev, NV_CRTC1_INTSTAT, NV_CRTC_INTR_VBLANK); ++ spin_lock_irqsave(&dev_priv->context_switch_lock, flags); ++ dev_priv->irq_handler[status_bit] = handler; ++ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); + } + +-irqreturn_t +-nouveau_irq_handler(DRM_IRQ_ARGS) ++void ++nouveau_irq_unregister(struct drm_device *dev, int status_bit) + { +- struct drm_device *dev = (struct drm_device *)arg; + struct drm_nouveau_private *dev_priv = dev->dev_private; +- uint32_t status; + unsigned long flags; + +- status = nv_rd32(dev, NV03_PMC_INTR_0); +- if (!status) +- return IRQ_NONE; +- + spin_lock_irqsave(&dev_priv->context_switch_lock, flags); +- +- if (status & NV_PMC_INTR_0_PFIFO_PENDING) { +- nouveau_fifo_irq_handler(dev); +- status &= ~NV_PMC_INTR_0_PFIFO_PENDING; +- } +- +- if (status & NV_PMC_INTR_0_PGRAPH_PENDING) { +- if (dev_priv->card_type >= NV_50) +- nv50_pgraph_irq_handler(dev); +- else +- nouveau_pgraph_irq_handler(dev); +- +- status &= ~NV_PMC_INTR_0_PGRAPH_PENDING; +- } +- +- if (status & NV_PMC_INTR_0_CRTCn_PENDING) { +- nouveau_crtc_irq_handler(dev, (status>>24)&3); +- status &= ~NV_PMC_INTR_0_CRTCn_PENDING; +- } +- +- if (status & (NV_PMC_INTR_0_NV50_DISPLAY_PENDING | +- NV_PMC_INTR_0_NV50_I2C_PENDING)) { +- nv50_display_irq_handler(dev); +- status &= ~(NV_PMC_INTR_0_NV50_DISPLAY_PENDING | +- NV_PMC_INTR_0_NV50_I2C_PENDING); +- } +- +- if (status) +- NV_ERROR(dev, "Unhandled PMC INTR status bits 0x%08x\n", status); +- ++ dev_priv->irq_handler[status_bit] = NULL; + spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); +- +- return IRQ_HANDLED; + } +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_mem.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_mem.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_mem.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_mem.c 2010-11-22 06:33:32.000000000 +0100 +@@ -42,83 +42,104 @@ + */ + + static void +-nv10_mem_set_region_tiling(struct drm_device *dev, int i, uint32_t addr, +- uint32_t size, uint32_t pitch) ++nv10_mem_update_tile_region(struct drm_device *dev, ++ struct nouveau_tile_reg *tile, uint32_t addr, ++ uint32_t size, uint32_t pitch, uint32_t flags) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_fifo_engine *pfifo = &dev_priv->engine.fifo; + struct nouveau_fb_engine *pfb = &dev_priv->engine.fb; + struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; +- struct nouveau_tile_reg *tile = &dev_priv->tile[i]; ++ int i = tile - dev_priv->tile.reg; ++ unsigned long save; + +- tile->addr = addr; +- tile->size = size; +- tile->used = !!pitch; +- nouveau_fence_unref((void **)&tile->fence); ++ nouveau_fence_unref(&tile->fence); + ++ if (tile->pitch) ++ pfb->free_tile_region(dev, i); ++ ++ if (pitch) ++ pfb->init_tile_region(dev, i, addr, size, pitch, flags); ++ ++ spin_lock_irqsave(&dev_priv->context_switch_lock, save); + pfifo->reassign(dev, false); + pfifo->cache_pull(dev, false); + + nouveau_wait_for_idle(dev); + +- pgraph->set_region_tiling(dev, i, addr, size, pitch); +- pfb->set_region_tiling(dev, i, addr, size, pitch); ++ pfb->set_tile_region(dev, i); ++ pgraph->set_tile_region(dev, i); + + pfifo->cache_pull(dev, true); + pfifo->reassign(dev, true); ++ spin_unlock_irqrestore(&dev_priv->context_switch_lock, save); + } + +-struct nouveau_tile_reg * +-nv10_mem_set_tiling(struct drm_device *dev, uint32_t addr, uint32_t size, +- uint32_t pitch) ++static struct nouveau_tile_reg * ++nv10_mem_get_tile_region(struct drm_device *dev, int i) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_fb_engine *pfb = &dev_priv->engine.fb; +- struct nouveau_tile_reg *found = NULL; +- unsigned long i, flags; ++ struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; + +- spin_lock_irqsave(&dev_priv->context_switch_lock, flags); ++ spin_lock(&dev_priv->tile.lock); + +- for (i = 0; i < pfb->num_tiles; i++) { +- struct nouveau_tile_reg *tile = &dev_priv->tile[i]; +- +- if (tile->used) +- /* Tile region in use. */ +- continue; ++ if (!tile->used && ++ (!tile->fence || nouveau_fence_signalled(tile->fence))) ++ tile->used = true; ++ else ++ tile = NULL; + +- if (tile->fence && +- !nouveau_fence_signalled(tile->fence, NULL)) +- /* Pending tile region. */ +- continue; ++ spin_unlock(&dev_priv->tile.lock); ++ return tile; ++} + +- if (max(tile->addr, addr) < +- min(tile->addr + tile->size, addr + size)) +- /* Kill an intersecting tile region. */ +- nv10_mem_set_region_tiling(dev, i, 0, 0, 0); ++void ++nv10_mem_put_tile_region(struct drm_device *dev, struct nouveau_tile_reg *tile, ++ struct nouveau_fence *fence) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; + +- if (pitch && !found) { +- /* Free tile region. */ +- nv10_mem_set_region_tiling(dev, i, addr, size, pitch); +- found = tile; ++ if (tile) { ++ spin_lock(&dev_priv->tile.lock); ++ if (fence) { ++ /* Mark it as pending. */ ++ tile->fence = fence; ++ nouveau_fence_ref(fence); + } +- } +- +- spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); + +- return found; ++ tile->used = false; ++ spin_unlock(&dev_priv->tile.lock); ++ } + } + +-void +-nv10_mem_expire_tiling(struct drm_device *dev, struct nouveau_tile_reg *tile, +- struct nouveau_fence *fence) ++struct nouveau_tile_reg * ++nv10_mem_set_tiling(struct drm_device *dev, uint32_t addr, uint32_t size, ++ uint32_t pitch, uint32_t flags) + { +- if (fence) { +- /* Mark it as pending. */ +- tile->fence = fence; +- nouveau_fence_ref(fence); ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_fb_engine *pfb = &dev_priv->engine.fb; ++ struct nouveau_tile_reg *tile, *found = NULL; ++ int i; ++ ++ for (i = 0; i < pfb->num_tiles; i++) { ++ tile = nv10_mem_get_tile_region(dev, i); ++ ++ if (pitch && !found) { ++ found = tile; ++ continue; ++ ++ } else if (tile && tile->pitch) { ++ /* Kill an unused tile region. */ ++ nv10_mem_update_tile_region(dev, tile, 0, 0, 0, 0); ++ } ++ ++ nv10_mem_put_tile_region(dev, tile, NULL); + } + +- tile->used = false; ++ if (found) ++ nv10_mem_update_tile_region(dev, found, addr, size, ++ pitch, flags); ++ return found; + } + + /* +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_notifier.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_notifier.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_notifier.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_notifier.c 2010-11-22 06:33:32.000000000 +0100 +@@ -99,7 +99,6 @@ + int size, uint32_t *b_offset) + { + struct drm_device *dev = chan->dev; +- struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_gpuobj *nobj = NULL; + struct drm_mm_node *mem; + uint32_t offset; +@@ -113,31 +112,15 @@ + return -ENOMEM; + } + +- offset = chan->notifier_bo->bo.mem.start << PAGE_SHIFT; +- if (chan->notifier_bo->bo.mem.mem_type == TTM_PL_VRAM) { +- target = NV_DMA_TARGET_VIDMEM; +- } else +- if (chan->notifier_bo->bo.mem.mem_type == TTM_PL_TT) { +- if (dev_priv->gart_info.type == NOUVEAU_GART_SGDMA && +- dev_priv->card_type < NV_50) { +- ret = nouveau_sgdma_get_page(dev, offset, &offset); +- if (ret) +- return ret; +- target = NV_DMA_TARGET_PCI; +- } else { +- target = NV_DMA_TARGET_AGP; +- if (dev_priv->card_type >= NV_50) +- offset += dev_priv->vm_gart_base; +- } +- } else { +- NV_ERROR(dev, "Bad DMA target, mem_type %d!\n", +- chan->notifier_bo->bo.mem.mem_type); +- return -EINVAL; +- } ++ if (chan->notifier_bo->bo.mem.mem_type == TTM_PL_VRAM) ++ target = NV_MEM_TARGET_VRAM; ++ else ++ target = NV_MEM_TARGET_GART; ++ offset = chan->notifier_bo->bo.mem.start << PAGE_SHIFT; + offset += mem->start; + + ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, offset, +- mem->size, NV_DMA_ACCESS_RW, target, ++ mem->size, NV_MEM_ACCESS_RW, target, + &nobj); + if (ret) { + drm_mm_put_block(mem); +@@ -185,11 +168,11 @@ + struct nouveau_channel *chan; + int ret; + +- NOUVEAU_GET_USER_CHANNEL_WITH_RETURN(na->channel, file_priv, chan); ++ chan = nouveau_channel_get(dev, file_priv, na->channel); ++ if (IS_ERR(chan)) ++ return PTR_ERR(chan); + + ret = nouveau_notifier_alloc(chan, na->handle, na->size, &na->offset); +- if (ret) +- return ret; +- +- return 0; ++ nouveau_channel_put(&chan); ++ return ret; + } +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_object.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_object.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_object.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_object.c 2010-11-22 06:33:32.000000000 +0100 +@@ -36,6 +36,101 @@ + #include "nouveau_drm.h" + #include "nouveau_ramht.h" + ++struct nouveau_gpuobj_method { ++ struct list_head head; ++ u32 mthd; ++ int (*exec)(struct nouveau_channel *, u32 class, u32 mthd, u32 data); ++}; ++ ++struct nouveau_gpuobj_class { ++ struct list_head head; ++ struct list_head methods; ++ u32 id; ++ u32 engine; ++}; ++ ++int ++nouveau_gpuobj_class_new(struct drm_device *dev, u32 class, u32 engine) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_gpuobj_class *oc; ++ ++ oc = kzalloc(sizeof(*oc), GFP_KERNEL); ++ if (!oc) ++ return -ENOMEM; ++ ++ INIT_LIST_HEAD(&oc->methods); ++ oc->id = class; ++ oc->engine = engine; ++ list_add(&oc->head, &dev_priv->classes); ++ return 0; ++} ++ ++int ++nouveau_gpuobj_mthd_new(struct drm_device *dev, u32 class, u32 mthd, ++ int (*exec)(struct nouveau_channel *, u32, u32, u32)) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_gpuobj_method *om; ++ struct nouveau_gpuobj_class *oc; ++ ++ list_for_each_entry(oc, &dev_priv->classes, head) { ++ if (oc->id == class) ++ goto found; ++ } ++ ++ return -EINVAL; ++ ++found: ++ om = kzalloc(sizeof(*om), GFP_KERNEL); ++ if (!om) ++ return -ENOMEM; ++ ++ om->mthd = mthd; ++ om->exec = exec; ++ list_add(&om->head, &oc->methods); ++ return 0; ++} ++ ++int ++nouveau_gpuobj_mthd_call(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) ++{ ++ struct drm_nouveau_private *dev_priv = chan->dev->dev_private; ++ struct nouveau_gpuobj_method *om; ++ struct nouveau_gpuobj_class *oc; ++ ++ list_for_each_entry(oc, &dev_priv->classes, head) { ++ if (oc->id != class) ++ continue; ++ ++ list_for_each_entry(om, &oc->methods, head) { ++ if (om->mthd == mthd) ++ return om->exec(chan, class, mthd, data); ++ } ++ } ++ ++ return -ENOENT; ++} ++ ++int ++nouveau_gpuobj_mthd_call2(struct drm_device *dev, int chid, ++ u32 class, u32 mthd, u32 data) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_channel *chan = NULL; ++ unsigned long flags; ++ int ret = -EINVAL; ++ ++ spin_lock_irqsave(&dev_priv->channels.lock, flags); ++ if (chid > 0 && chid < dev_priv->engine.fifo.channels) ++ chan = dev_priv->channels.ptr[chid]; ++ if (chan) ++ ret = nouveau_gpuobj_mthd_call(chan, class, mthd, data); ++ spin_unlock_irqrestore(&dev_priv->channels.lock, flags); ++ return ret; ++} ++ + /* NVidia uses context objects to drive drawing operations. + + Context objects can be selected into 8 subchannels in the FIFO, +@@ -73,17 +168,14 @@ + struct nouveau_gpuobj **gpuobj_ret) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_engine *engine = &dev_priv->engine; ++ struct nouveau_instmem_engine *instmem = &dev_priv->engine.instmem; + struct nouveau_gpuobj *gpuobj; + struct drm_mm_node *ramin = NULL; +- int ret; ++ int ret, i; + + NV_DEBUG(dev, "ch%d size=%u align=%d flags=0x%08x\n", + chan ? chan->id : -1, size, align, flags); + +- if (!dev_priv || !gpuobj_ret || *gpuobj_ret != NULL) +- return -EINVAL; +- + gpuobj = kzalloc(sizeof(*gpuobj), GFP_KERNEL); + if (!gpuobj) + return -ENOMEM; +@@ -98,88 +190,41 @@ + spin_unlock(&dev_priv->ramin_lock); + + if (chan) { +- NV_DEBUG(dev, "channel heap\n"); +- + ramin = drm_mm_search_free(&chan->ramin_heap, size, align, 0); + if (ramin) + ramin = drm_mm_get_block(ramin, size, align); +- + if (!ramin) { + nouveau_gpuobj_ref(NULL, &gpuobj); + return -ENOMEM; + } +- } else { +- NV_DEBUG(dev, "global heap\n"); +- +- /* allocate backing pages, sets vinst */ +- ret = engine->instmem.populate(dev, gpuobj, &size); +- if (ret) { +- nouveau_gpuobj_ref(NULL, &gpuobj); +- return ret; +- } +- +- /* try and get aperture space */ +- do { +- if (drm_mm_pre_get(&dev_priv->ramin_heap)) +- return -ENOMEM; +- +- spin_lock(&dev_priv->ramin_lock); +- ramin = drm_mm_search_free(&dev_priv->ramin_heap, size, +- align, 0); +- if (ramin == NULL) { +- spin_unlock(&dev_priv->ramin_lock); +- nouveau_gpuobj_ref(NULL, &gpuobj); +- return -ENOMEM; +- } + +- ramin = drm_mm_get_block_atomic(ramin, size, align); +- spin_unlock(&dev_priv->ramin_lock); +- } while (ramin == NULL); +- +- /* on nv50 it's ok to fail, we have a fallback path */ +- if (!ramin && dev_priv->card_type < NV_50) { +- nouveau_gpuobj_ref(NULL, &gpuobj); +- return -ENOMEM; +- } +- } ++ gpuobj->pinst = chan->ramin->pinst; ++ if (gpuobj->pinst != ~0) ++ gpuobj->pinst += ramin->start; + +- /* if we got a chunk of the aperture, map pages into it */ +- gpuobj->im_pramin = ramin; +- if (!chan && gpuobj->im_pramin && dev_priv->ramin_available) { +- ret = engine->instmem.bind(dev, gpuobj); ++ gpuobj->cinst = ramin->start; ++ gpuobj->vinst = ramin->start + chan->ramin->vinst; ++ gpuobj->node = ramin; ++ } else { ++ ret = instmem->get(gpuobj, size, align); + if (ret) { + nouveau_gpuobj_ref(NULL, &gpuobj); + return ret; + } +- } +- +- /* calculate the various different addresses for the object */ +- if (chan) { +- gpuobj->pinst = chan->ramin->pinst; +- if (gpuobj->pinst != ~0) +- gpuobj->pinst += gpuobj->im_pramin->start; + +- if (dev_priv->card_type < NV_50) { +- gpuobj->cinst = gpuobj->pinst; +- } else { +- gpuobj->cinst = gpuobj->im_pramin->start; +- gpuobj->vinst = gpuobj->im_pramin->start + +- chan->ramin->vinst; +- } +- } else { +- if (gpuobj->im_pramin) +- gpuobj->pinst = gpuobj->im_pramin->start; +- else ++ ret = -ENOSYS; ++ if (dev_priv->ramin_available) ++ ret = instmem->map(gpuobj); ++ if (ret) + gpuobj->pinst = ~0; +- gpuobj->cinst = 0xdeadbeef; ++ ++ gpuobj->cinst = NVOBJ_CINST_GLOBAL; + } + + if (gpuobj->flags & NVOBJ_FLAG_ZERO_ALLOC) { +- int i; +- + for (i = 0; i < gpuobj->size; i += 4) + nv_wo32(gpuobj, i, 0); +- engine->instmem.flush(dev); ++ instmem->flush(dev); + } + + +@@ -195,6 +240,7 @@ + NV_DEBUG(dev, "\n"); + + INIT_LIST_HEAD(&dev_priv->gpuobj_list); ++ INIT_LIST_HEAD(&dev_priv->classes); + spin_lock_init(&dev_priv->ramin_lock); + dev_priv->ramin_base = ~0; + +@@ -205,13 +251,23 @@ + nouveau_gpuobj_takedown(struct drm_device *dev) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_gpuobj_method *om, *tm; ++ struct nouveau_gpuobj_class *oc, *tc; + + NV_DEBUG(dev, "\n"); + ++ list_for_each_entry_safe(oc, tc, &dev_priv->classes, head) { ++ list_for_each_entry_safe(om, tm, &oc->methods, head) { ++ list_del(&om->head); ++ kfree(om); ++ } ++ list_del(&oc->head); ++ kfree(oc); ++ } ++ + BUG_ON(!list_empty(&dev_priv->gpuobj_list)); + } + +- + static void + nouveau_gpuobj_del(struct kref *ref) + { +@@ -219,26 +275,34 @@ + container_of(ref, struct nouveau_gpuobj, refcount); + struct drm_device *dev = gpuobj->dev; + struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_engine *engine = &dev_priv->engine; ++ struct nouveau_instmem_engine *instmem = &dev_priv->engine.instmem; + int i; + + NV_DEBUG(dev, "gpuobj %p\n", gpuobj); + +- if (gpuobj->im_pramin && (gpuobj->flags & NVOBJ_FLAG_ZERO_FREE)) { ++ if (gpuobj->node && (gpuobj->flags & NVOBJ_FLAG_ZERO_FREE)) { + for (i = 0; i < gpuobj->size; i += 4) + nv_wo32(gpuobj, i, 0); +- engine->instmem.flush(dev); ++ instmem->flush(dev); + } + + if (gpuobj->dtor) + gpuobj->dtor(dev, gpuobj); + +- if (gpuobj->im_backing) +- engine->instmem.clear(dev, gpuobj); ++ if (gpuobj->cinst == NVOBJ_CINST_GLOBAL) { ++ if (gpuobj->node) { ++ instmem->unmap(gpuobj); ++ instmem->put(gpuobj); ++ } ++ } else { ++ if (gpuobj->node) { ++ spin_lock(&dev_priv->ramin_lock); ++ drm_mm_put_block(gpuobj->node); ++ spin_unlock(&dev_priv->ramin_lock); ++ } ++ } + + spin_lock(&dev_priv->ramin_lock); +- if (gpuobj->im_pramin) +- drm_mm_put_block(gpuobj->im_pramin); + list_del(&gpuobj->list); + spin_unlock(&dev_priv->ramin_lock); + +@@ -278,7 +342,7 @@ + kref_init(&gpuobj->refcount); + gpuobj->size = size; + gpuobj->pinst = pinst; +- gpuobj->cinst = 0xdeadbeef; ++ gpuobj->cinst = NVOBJ_CINST_GLOBAL; + gpuobj->vinst = vinst; + + if (gpuobj->flags & NVOBJ_FLAG_ZERO_ALLOC) { +@@ -335,113 +399,157 @@ + The method below creates a DMA object in instance RAM and returns a handle + to it that can be used to set up context objects. + */ +-int +-nouveau_gpuobj_dma_new(struct nouveau_channel *chan, int class, +- uint64_t offset, uint64_t size, int access, +- int target, struct nouveau_gpuobj **gpuobj) +-{ +- struct drm_device *dev = chan->dev; +- struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_instmem_engine *instmem = &dev_priv->engine.instmem; +- int ret; + +- NV_DEBUG(dev, "ch%d class=0x%04x offset=0x%llx size=0x%llx\n", +- chan->id, class, offset, size); +- NV_DEBUG(dev, "access=%d target=%d\n", access, target); ++void ++nv50_gpuobj_dma_init(struct nouveau_gpuobj *obj, u32 offset, int class, ++ u64 base, u64 size, int target, int access, ++ u32 type, u32 comp) ++{ ++ struct drm_nouveau_private *dev_priv = obj->dev->dev_private; ++ struct nouveau_instmem_engine *pinstmem = &dev_priv->engine.instmem; ++ u32 flags0; ++ ++ flags0 = (comp << 29) | (type << 22) | class; ++ flags0 |= 0x00100000; ++ ++ switch (access) { ++ case NV_MEM_ACCESS_RO: flags0 |= 0x00040000; break; ++ case NV_MEM_ACCESS_RW: ++ case NV_MEM_ACCESS_WO: flags0 |= 0x00080000; break; ++ default: ++ break; ++ } + + switch (target) { +- case NV_DMA_TARGET_AGP: +- offset += dev_priv->gart_info.aper_base; ++ case NV_MEM_TARGET_VRAM: ++ flags0 |= 0x00010000; ++ break; ++ case NV_MEM_TARGET_PCI: ++ flags0 |= 0x00020000; + break; ++ case NV_MEM_TARGET_PCI_NOSNOOP: ++ flags0 |= 0x00030000; ++ break; ++ case NV_MEM_TARGET_GART: ++ base += dev_priv->vm_gart_base; + default: ++ flags0 &= ~0x00100000; + break; + } + +- ret = nouveau_gpuobj_new(dev, chan, +- nouveau_gpuobj_class_instmem_size(dev, class), +- 16, NVOBJ_FLAG_ZERO_ALLOC | +- NVOBJ_FLAG_ZERO_FREE, gpuobj); +- if (ret) { +- NV_ERROR(dev, "Error creating gpuobj: %d\n", ret); +- return ret; +- } +- +- if (dev_priv->card_type < NV_50) { +- uint32_t frame, adjust, pte_flags = 0; ++ /* convert to base + limit */ ++ size = (base + size) - 1; + +- if (access != NV_DMA_ACCESS_RO) +- pte_flags |= (1<<1); +- adjust = offset & 0x00000fff; +- frame = offset & ~0x00000fff; +- +- nv_wo32(*gpuobj, 0, ((1<<12) | (1<<13) | (adjust << 20) | +- (access << 14) | (target << 16) | +- class)); +- nv_wo32(*gpuobj, 4, size - 1); +- nv_wo32(*gpuobj, 8, frame | pte_flags); +- nv_wo32(*gpuobj, 12, frame | pte_flags); +- } else { +- uint64_t limit = offset + size - 1; +- uint32_t flags0, flags5; ++ nv_wo32(obj, offset + 0x00, flags0); ++ nv_wo32(obj, offset + 0x04, lower_32_bits(size)); ++ nv_wo32(obj, offset + 0x08, lower_32_bits(base)); ++ nv_wo32(obj, offset + 0x0c, upper_32_bits(size) << 24 | ++ upper_32_bits(base)); ++ nv_wo32(obj, offset + 0x10, 0x00000000); ++ nv_wo32(obj, offset + 0x14, 0x00000000); + +- if (target == NV_DMA_TARGET_VIDMEM) { +- flags0 = 0x00190000; +- flags5 = 0x00010000; +- } else { +- flags0 = 0x7fc00000; +- flags5 = 0x00080000; +- } ++ pinstmem->flush(obj->dev); ++} + +- nv_wo32(*gpuobj, 0, flags0 | class); +- nv_wo32(*gpuobj, 4, lower_32_bits(limit)); +- nv_wo32(*gpuobj, 8, lower_32_bits(offset)); +- nv_wo32(*gpuobj, 12, ((upper_32_bits(limit) & 0xff) << 24) | +- (upper_32_bits(offset) & 0xff)); +- nv_wo32(*gpuobj, 20, flags5); +- } ++int ++nv50_gpuobj_dma_new(struct nouveau_channel *chan, int class, u64 base, u64 size, ++ int target, int access, u32 type, u32 comp, ++ struct nouveau_gpuobj **pobj) ++{ ++ struct drm_device *dev = chan->dev; ++ int ret; + +- instmem->flush(dev); ++ ret = nouveau_gpuobj_new(dev, chan, 24, 16, NVOBJ_FLAG_ZERO_ALLOC | ++ NVOBJ_FLAG_ZERO_FREE, pobj); ++ if (ret) ++ return ret; + +- (*gpuobj)->engine = NVOBJ_ENGINE_SW; +- (*gpuobj)->class = class; ++ nv50_gpuobj_dma_init(*pobj, 0, class, base, size, target, ++ access, type, comp); + return 0; + } + + int +-nouveau_gpuobj_gart_dma_new(struct nouveau_channel *chan, +- uint64_t offset, uint64_t size, int access, +- struct nouveau_gpuobj **gpuobj, +- uint32_t *o_ret) ++nouveau_gpuobj_dma_new(struct nouveau_channel *chan, int class, u64 base, ++ u64 size, int access, int target, ++ struct nouveau_gpuobj **pobj) + { ++ struct drm_nouveau_private *dev_priv = chan->dev->dev_private; + struct drm_device *dev = chan->dev; +- struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_gpuobj *obj; ++ u32 page_addr, flags0, flags2; + int ret; + +- if (dev_priv->gart_info.type == NOUVEAU_GART_AGP || +- (dev_priv->card_type >= NV_50 && +- dev_priv->gart_info.type == NOUVEAU_GART_SGDMA)) { +- ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, +- offset + dev_priv->vm_gart_base, +- size, access, NV_DMA_TARGET_AGP, +- gpuobj); +- if (o_ret) +- *o_ret = 0; +- } else +- if (dev_priv->gart_info.type == NOUVEAU_GART_SGDMA) { +- nouveau_gpuobj_ref(dev_priv->gart_info.sg_ctxdma, gpuobj); +- if (offset & ~0xffffffffULL) { +- NV_ERROR(dev, "obj offset exceeds 32-bits\n"); +- return -EINVAL; +- } +- if (o_ret) +- *o_ret = (uint32_t)offset; +- ret = (*gpuobj != NULL) ? 0 : -EINVAL; +- } else { +- NV_ERROR(dev, "Invalid GART type %d\n", dev_priv->gart_info.type); +- return -EINVAL; ++ if (dev_priv->card_type >= NV_50) { ++ u32 comp = (target == NV_MEM_TARGET_VM) ? NV_MEM_COMP_VM : 0; ++ u32 type = (target == NV_MEM_TARGET_VM) ? NV_MEM_TYPE_VM : 0; ++ ++ return nv50_gpuobj_dma_new(chan, class, base, size, ++ target, access, type, comp, pobj); + } + +- return ret; ++ if (target == NV_MEM_TARGET_GART) { ++ if (dev_priv->gart_info.type == NOUVEAU_GART_AGP) { ++ target = NV_MEM_TARGET_PCI_NOSNOOP; ++ base += dev_priv->gart_info.aper_base; ++ } else ++ if (base != 0) { ++ ret = nouveau_sgdma_get_page(dev, base, &page_addr); ++ if (ret) ++ return ret; ++ ++ target = NV_MEM_TARGET_PCI; ++ base = page_addr; ++ } else { ++ nouveau_gpuobj_ref(dev_priv->gart_info.sg_ctxdma, pobj); ++ return 0; ++ } ++ } ++ ++ flags0 = class; ++ flags0 |= 0x00003000; /* PT present, PT linear */ ++ flags2 = 0; ++ ++ switch (target) { ++ case NV_MEM_TARGET_PCI: ++ flags0 |= 0x00020000; ++ break; ++ case NV_MEM_TARGET_PCI_NOSNOOP: ++ flags0 |= 0x00030000; ++ break; ++ default: ++ break; ++ } ++ ++ switch (access) { ++ case NV_MEM_ACCESS_RO: ++ flags0 |= 0x00004000; ++ break; ++ case NV_MEM_ACCESS_WO: ++ flags0 |= 0x00008000; ++ default: ++ flags2 |= 0x00000002; ++ break; ++ } ++ ++ flags0 |= (base & 0x00000fff) << 20; ++ flags2 |= (base & 0xfffff000); ++ ++ ret = nouveau_gpuobj_new(dev, chan, (dev_priv->card_type >= NV_40) ? ++ 32 : 16, 16, NVOBJ_FLAG_ZERO_ALLOC | ++ NVOBJ_FLAG_ZERO_FREE, &obj); ++ if (ret) ++ return ret; ++ ++ nv_wo32(obj, 0x00, flags0); ++ nv_wo32(obj, 0x04, size - 1); ++ nv_wo32(obj, 0x08, flags2); ++ nv_wo32(obj, 0x0c, flags2); ++ ++ obj->engine = NVOBJ_ENGINE_SW; ++ obj->class = class; ++ *pobj = obj; ++ return 0; + } + + /* Context objects in the instance RAM have the following structure. +@@ -495,23 +603,86 @@ + entry[5]: + set to 0? + */ ++static int ++nouveau_gpuobj_sw_new(struct nouveau_channel *chan, int class, ++ struct nouveau_gpuobj **gpuobj_ret) ++{ ++ struct drm_nouveau_private *dev_priv; ++ struct nouveau_gpuobj *gpuobj; ++ ++ if (!chan || !gpuobj_ret || *gpuobj_ret != NULL) ++ return -EINVAL; ++ dev_priv = chan->dev->dev_private; ++ ++ gpuobj = kzalloc(sizeof(*gpuobj), GFP_KERNEL); ++ if (!gpuobj) ++ return -ENOMEM; ++ gpuobj->dev = chan->dev; ++ gpuobj->engine = NVOBJ_ENGINE_SW; ++ gpuobj->class = class; ++ kref_init(&gpuobj->refcount); ++ gpuobj->cinst = 0x40; ++ ++ spin_lock(&dev_priv->ramin_lock); ++ list_add_tail(&gpuobj->list, &dev_priv->gpuobj_list); ++ spin_unlock(&dev_priv->ramin_lock); ++ *gpuobj_ret = gpuobj; ++ return 0; ++} ++ + int + nouveau_gpuobj_gr_new(struct nouveau_channel *chan, int class, + struct nouveau_gpuobj **gpuobj) + { ++ struct drm_nouveau_private *dev_priv = chan->dev->dev_private; + struct drm_device *dev = chan->dev; +- struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_gpuobj_class *oc; + int ret; + + NV_DEBUG(dev, "ch%d class=0x%04x\n", chan->id, class); + ++ list_for_each_entry(oc, &dev_priv->classes, head) { ++ if (oc->id == class) ++ goto found; ++ } ++ ++ NV_ERROR(dev, "illegal object class: 0x%x\n", class); ++ return -EINVAL; ++ ++found: ++ if (oc->engine == NVOBJ_ENGINE_SW) ++ return nouveau_gpuobj_sw_new(chan, class, gpuobj); ++ ++ switch (oc->engine) { ++ case NVOBJ_ENGINE_GR: ++ if (dev_priv->card_type >= NV_50 && !chan->ramin_grctx) { ++ struct nouveau_pgraph_engine *pgraph = ++ &dev_priv->engine.graph; ++ ++ ret = pgraph->create_context(chan); ++ if (ret) ++ return ret; ++ } ++ break; ++ case NVOBJ_ENGINE_CRYPT: ++ if (!chan->crypt_ctx) { ++ struct nouveau_crypt_engine *pcrypt = ++ &dev_priv->engine.crypt; ++ ++ ret = pcrypt->create_context(chan); ++ if (ret) ++ return ret; ++ } ++ break; ++ } ++ + ret = nouveau_gpuobj_new(dev, chan, + nouveau_gpuobj_class_instmem_size(dev, class), + 16, + NVOBJ_FLAG_ZERO_ALLOC | NVOBJ_FLAG_ZERO_FREE, + gpuobj); + if (ret) { +- NV_ERROR(dev, "Error creating gpuobj: %d\n", ret); ++ NV_ERROR(dev, "error creating gpuobj: %d\n", ret); + return ret; + } + +@@ -541,35 +712,8 @@ + } + dev_priv->engine.instmem.flush(dev); + +- (*gpuobj)->engine = NVOBJ_ENGINE_GR; +- (*gpuobj)->class = class; +- return 0; +-} +- +-int +-nouveau_gpuobj_sw_new(struct nouveau_channel *chan, int class, +- struct nouveau_gpuobj **gpuobj_ret) +-{ +- struct drm_nouveau_private *dev_priv; +- struct nouveau_gpuobj *gpuobj; +- +- if (!chan || !gpuobj_ret || *gpuobj_ret != NULL) +- return -EINVAL; +- dev_priv = chan->dev->dev_private; +- +- gpuobj = kzalloc(sizeof(*gpuobj), GFP_KERNEL); +- if (!gpuobj) +- return -ENOMEM; +- gpuobj->dev = chan->dev; +- gpuobj->engine = NVOBJ_ENGINE_SW; +- gpuobj->class = class; +- kref_init(&gpuobj->refcount); +- gpuobj->cinst = 0x40; +- +- spin_lock(&dev_priv->ramin_lock); +- list_add_tail(&gpuobj->list, &dev_priv->gpuobj_list); +- spin_unlock(&dev_priv->ramin_lock); +- *gpuobj_ret = gpuobj; ++ (*gpuobj)->engine = oc->engine; ++ (*gpuobj)->class = oc->id; + return 0; + } + +@@ -585,7 +729,7 @@ + NV_DEBUG(dev, "ch%d\n", chan->id); + + /* Base amount for object storage (4KiB enough?) */ +- size = 0x1000; ++ size = 0x2000; + base = 0; + + /* PGRAPH context */ +@@ -701,8 +845,8 @@ + if (dev_priv->card_type >= NV_50) { + ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, + 0, dev_priv->vm_end, +- NV_DMA_ACCESS_RW, +- NV_DMA_TARGET_AGP, &vram); ++ NV_MEM_ACCESS_RW, ++ NV_MEM_TARGET_VM, &vram); + if (ret) { + NV_ERROR(dev, "Error creating VRAM ctxdma: %d\n", ret); + return ret; +@@ -710,8 +854,8 @@ + } else { + ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, + 0, dev_priv->fb_available_size, +- NV_DMA_ACCESS_RW, +- NV_DMA_TARGET_VIDMEM, &vram); ++ NV_MEM_ACCESS_RW, ++ NV_MEM_TARGET_VRAM, &vram); + if (ret) { + NV_ERROR(dev, "Error creating VRAM ctxdma: %d\n", ret); + return ret; +@@ -729,20 +873,13 @@ + if (dev_priv->card_type >= NV_50) { + ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, + 0, dev_priv->vm_end, +- NV_DMA_ACCESS_RW, +- NV_DMA_TARGET_AGP, &tt); +- if (ret) { +- NV_ERROR(dev, "Error creating VRAM ctxdma: %d\n", ret); +- return ret; +- } +- } else +- if (dev_priv->gart_info.type != NOUVEAU_GART_NONE) { +- ret = nouveau_gpuobj_gart_dma_new(chan, 0, +- dev_priv->gart_info.aper_size, +- NV_DMA_ACCESS_RW, &tt, NULL); ++ NV_MEM_ACCESS_RW, ++ NV_MEM_TARGET_VM, &tt); + } else { +- NV_ERROR(dev, "Invalid GART type %d\n", dev_priv->gart_info.type); +- ret = -EINVAL; ++ ret = nouveau_gpuobj_dma_new(chan, NV_CLASS_DMA_IN_MEMORY, ++ 0, dev_priv->gart_info.aper_size, ++ NV_MEM_ACCESS_RW, ++ NV_MEM_TARGET_GART, &tt); + } + + if (ret) { +@@ -791,119 +928,69 @@ + struct nouveau_gpuobj *gpuobj; + int i; + +- if (dev_priv->card_type < NV_50) { +- dev_priv->susres.ramin_copy = vmalloc(dev_priv->ramin_rsvd_vram); +- if (!dev_priv->susres.ramin_copy) +- return -ENOMEM; +- +- for (i = 0; i < dev_priv->ramin_rsvd_vram; i += 4) +- dev_priv->susres.ramin_copy[i/4] = nv_ri32(dev, i); +- return 0; +- } +- + list_for_each_entry(gpuobj, &dev_priv->gpuobj_list, list) { +- if (!gpuobj->im_backing) ++ if (gpuobj->cinst != NVOBJ_CINST_GLOBAL) + continue; + +- gpuobj->im_backing_suspend = vmalloc(gpuobj->size); +- if (!gpuobj->im_backing_suspend) { ++ gpuobj->suspend = vmalloc(gpuobj->size); ++ if (!gpuobj->suspend) { + nouveau_gpuobj_resume(dev); + return -ENOMEM; + } + + for (i = 0; i < gpuobj->size; i += 4) +- gpuobj->im_backing_suspend[i/4] = nv_ro32(gpuobj, i); ++ gpuobj->suspend[i/4] = nv_ro32(gpuobj, i); + } + + return 0; + } + + void +-nouveau_gpuobj_suspend_cleanup(struct drm_device *dev) +-{ +- struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_gpuobj *gpuobj; +- +- if (dev_priv->card_type < NV_50) { +- vfree(dev_priv->susres.ramin_copy); +- dev_priv->susres.ramin_copy = NULL; +- return; +- } +- +- list_for_each_entry(gpuobj, &dev_priv->gpuobj_list, list) { +- if (!gpuobj->im_backing_suspend) +- continue; +- +- vfree(gpuobj->im_backing_suspend); +- gpuobj->im_backing_suspend = NULL; +- } +-} +- +-void + nouveau_gpuobj_resume(struct drm_device *dev) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_gpuobj *gpuobj; + int i; + +- if (dev_priv->card_type < NV_50) { +- for (i = 0; i < dev_priv->ramin_rsvd_vram; i += 4) +- nv_wi32(dev, i, dev_priv->susres.ramin_copy[i/4]); +- nouveau_gpuobj_suspend_cleanup(dev); +- return; +- } +- + list_for_each_entry(gpuobj, &dev_priv->gpuobj_list, list) { +- if (!gpuobj->im_backing_suspend) ++ if (!gpuobj->suspend) + continue; + + for (i = 0; i < gpuobj->size; i += 4) +- nv_wo32(gpuobj, i, gpuobj->im_backing_suspend[i/4]); +- dev_priv->engine.instmem.flush(dev); ++ nv_wo32(gpuobj, i, gpuobj->suspend[i/4]); ++ ++ vfree(gpuobj->suspend); ++ gpuobj->suspend = NULL; + } + +- nouveau_gpuobj_suspend_cleanup(dev); ++ dev_priv->engine.instmem.flush(dev); + } + + int nouveau_ioctl_grobj_alloc(struct drm_device *dev, void *data, + struct drm_file *file_priv) + { +- struct drm_nouveau_private *dev_priv = dev->dev_private; + struct drm_nouveau_grobj_alloc *init = data; +- struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; +- struct nouveau_pgraph_object_class *grc; + struct nouveau_gpuobj *gr = NULL; + struct nouveau_channel *chan; + int ret; + +- NOUVEAU_GET_USER_CHANNEL_WITH_RETURN(init->channel, file_priv, chan); +- + if (init->handle == ~0) + return -EINVAL; + +- grc = pgraph->grclass; +- while (grc->id) { +- if (grc->id == init->class) +- break; +- grc++; +- } ++ chan = nouveau_channel_get(dev, file_priv, init->channel); ++ if (IS_ERR(chan)) ++ return PTR_ERR(chan); + +- if (!grc->id) { +- NV_ERROR(dev, "Illegal object class: 0x%x\n", init->class); +- return -EPERM; ++ if (nouveau_ramht_find(chan, init->handle)) { ++ ret = -EEXIST; ++ goto out; + } + +- if (nouveau_ramht_find(chan, init->handle)) +- return -EEXIST; +- +- if (!grc->software) +- ret = nouveau_gpuobj_gr_new(chan, grc->id, &gr); +- else +- ret = nouveau_gpuobj_sw_new(chan, grc->id, &gr); ++ ret = nouveau_gpuobj_gr_new(chan, init->class, &gr); + if (ret) { + NV_ERROR(dev, "Error creating object: %d (%d/0x%08x)\n", + ret, init->channel, init->handle); +- return ret; ++ goto out; + } + + ret = nouveau_ramht_insert(chan, init->handle, gr); +@@ -911,27 +998,30 @@ + if (ret) { + NV_ERROR(dev, "Error referencing object: %d (%d/0x%08x)\n", + ret, init->channel, init->handle); +- return ret; + } + +- return 0; ++out: ++ nouveau_channel_put(&chan); ++ return ret; + } + + int nouveau_ioctl_gpuobj_free(struct drm_device *dev, void *data, + struct drm_file *file_priv) + { + struct drm_nouveau_gpuobj_free *objfree = data; +- struct nouveau_gpuobj *gpuobj; + struct nouveau_channel *chan; ++ int ret; + +- NOUVEAU_GET_USER_CHANNEL_WITH_RETURN(objfree->channel, file_priv, chan); ++ chan = nouveau_channel_get(dev, file_priv, objfree->channel); ++ if (IS_ERR(chan)) ++ return PTR_ERR(chan); + +- gpuobj = nouveau_ramht_find(chan, objfree->handle); +- if (!gpuobj) +- return -ENOENT; ++ /* Synchronize with the user channel */ ++ nouveau_channel_idle(chan); + +- nouveau_ramht_remove(chan, objfree->handle); +- return 0; ++ ret = nouveau_ramht_remove(chan, objfree->handle); ++ nouveau_channel_put(&chan); ++ return ret; + } + + u32 +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_pm.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_pm.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_pm.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_pm.c 2010-11-22 06:33:32.000000000 +0100 +@@ -27,6 +27,10 @@ + #include "nouveau_drv.h" + #include "nouveau_pm.h" + ++#ifdef CONFIG_ACPI ++#include ++#endif ++#include + #include + #include + +@@ -446,6 +450,25 @@ + #endif + } + ++#ifdef CONFIG_ACPI ++static int ++nouveau_pm_acpi_event(struct notifier_block *nb, unsigned long val, void *data) ++{ ++ struct drm_nouveau_private *dev_priv = ++ container_of(nb, struct drm_nouveau_private, engine.pm.acpi_nb); ++ struct drm_device *dev = dev_priv->dev; ++ struct acpi_bus_event *entry = (struct acpi_bus_event *)data; ++ ++ if (strcmp(entry->device_class, "ac_adapter") == 0) { ++ bool ac = power_supply_is_system_supplied(); ++ ++ NV_DEBUG(dev, "power supply changed: %s\n", ac ? "AC" : "DC"); ++ } ++ ++ return NOTIFY_OK; ++} ++#endif ++ + int + nouveau_pm_init(struct drm_device *dev) + { +@@ -485,6 +508,10 @@ + + nouveau_sysfs_init(dev); + nouveau_hwmon_init(dev); ++#ifdef CONFIG_ACPI ++ pm->acpi_nb.notifier_call = nouveau_pm_acpi_event; ++ register_acpi_notifier(&pm->acpi_nb); ++#endif + + return 0; + } +@@ -503,6 +530,9 @@ + nouveau_perf_fini(dev); + nouveau_volt_fini(dev); + ++#ifdef CONFIG_ACPI ++ unregister_acpi_notifier(&pm->acpi_nb); ++#endif + nouveau_hwmon_fini(dev); + nouveau_sysfs_fini(dev); + } +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_ramht.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_ramht.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.c 2010-11-22 06:33:32.000000000 +0100 +@@ -104,17 +104,17 @@ + nouveau_gpuobj_ref(gpuobj, &entry->gpuobj); + + if (dev_priv->card_type < NV_40) { +- ctx = NV_RAMHT_CONTEXT_VALID | (gpuobj->cinst >> 4) | ++ ctx = NV_RAMHT_CONTEXT_VALID | (gpuobj->pinst >> 4) | + (chan->id << NV_RAMHT_CONTEXT_CHANNEL_SHIFT) | + (gpuobj->engine << NV_RAMHT_CONTEXT_ENGINE_SHIFT); + } else + if (dev_priv->card_type < NV_50) { +- ctx = (gpuobj->cinst >> 4) | ++ ctx = (gpuobj->pinst >> 4) | + (chan->id << NV40_RAMHT_CONTEXT_CHANNEL_SHIFT) | + (gpuobj->engine << NV40_RAMHT_CONTEXT_ENGINE_SHIFT); + } else { + if (gpuobj->engine == NVOBJ_ENGINE_DISPLAY) { +- ctx = (gpuobj->cinst << 10) | 2; ++ ctx = (gpuobj->cinst << 10) | chan->id; + } else { + ctx = (gpuobj->cinst >> 4) | + ((gpuobj->engine << +@@ -214,18 +214,19 @@ + spin_unlock_irqrestore(&chan->ramht->lock, flags); + } + +-void ++int + nouveau_ramht_remove(struct nouveau_channel *chan, u32 handle) + { + struct nouveau_ramht_entry *entry; + + entry = nouveau_ramht_remove_entry(chan, handle); + if (!entry) +- return; ++ return -ENOENT; + + nouveau_ramht_remove_hash(chan, entry->handle); + nouveau_gpuobj_ref(NULL, &entry->gpuobj); + kfree(entry); ++ return 0; + } + + struct nouveau_gpuobj * +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_ramht.h linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.h +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_ramht.h 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_ramht.h 2010-11-22 06:33:32.000000000 +0100 +@@ -48,7 +48,7 @@ + + extern int nouveau_ramht_insert(struct nouveau_channel *, u32 handle, + struct nouveau_gpuobj *); +-extern void nouveau_ramht_remove(struct nouveau_channel *, u32 handle); ++extern int nouveau_ramht_remove(struct nouveau_channel *, u32 handle); + extern struct nouveau_gpuobj * + nouveau_ramht_find(struct nouveau_channel *chan, u32 handle); + +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_reg.h linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_reg.h +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_reg.h 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_reg.h 2010-11-22 06:33:32.000000000 +0100 +@@ -45,6 +45,11 @@ + # define NV04_PFB_REF_CMD_REFRESH (1 << 0) + #define NV04_PFB_PRE 0x001002d4 + # define NV04_PFB_PRE_CMD_PRECHARGE (1 << 0) ++#define NV20_PFB_ZCOMP(i) (0x00100300 + 4*(i)) ++# define NV20_PFB_ZCOMP_MODE_32 (4 << 24) ++# define NV20_PFB_ZCOMP_EN (1 << 31) ++# define NV25_PFB_ZCOMP_MODE_16 (1 << 20) ++# define NV25_PFB_ZCOMP_MODE_32 (2 << 20) + #define NV10_PFB_CLOSE_PAGE2 0x0010033c + #define NV04_PFB_SCRAMBLE(i) (0x00100400 + 4 * (i)) + #define NV40_PFB_TILE(i) (0x00100600 + (i*16)) +@@ -74,17 +79,6 @@ + # define NV40_RAMHT_CONTEXT_ENGINE_SHIFT 20 + # define NV40_RAMHT_CONTEXT_INSTANCE_SHIFT 0 + +-/* DMA object defines */ +-#define NV_DMA_ACCESS_RW 0 +-#define NV_DMA_ACCESS_RO 1 +-#define NV_DMA_ACCESS_WO 2 +-#define NV_DMA_TARGET_VIDMEM 0 +-#define NV_DMA_TARGET_PCI 2 +-#define NV_DMA_TARGET_AGP 3 +-/* The following is not a real value used by the card, it's changed by +- * nouveau_object_dma_create */ +-#define NV_DMA_TARGET_PCI_NONLINEAR 8 +- + /* Some object classes we care about in the drm */ + #define NV_CLASS_DMA_FROM_MEMORY 0x00000002 + #define NV_CLASS_DMA_TO_MEMORY 0x00000003 +@@ -332,6 +326,7 @@ + #define NV04_PGRAPH_BSWIZZLE5 0x004006A0 + #define NV03_PGRAPH_STATUS 0x004006B0 + #define NV04_PGRAPH_STATUS 0x00400700 ++# define NV40_PGRAPH_STATUS_SYNC_STALL 0x00004000 + #define NV04_PGRAPH_TRAPPED_ADDR 0x00400704 + #define NV04_PGRAPH_TRAPPED_DATA 0x00400708 + #define NV04_PGRAPH_SURFACE 0x0040070C +@@ -378,6 +373,7 @@ + #define NV20_PGRAPH_TLIMIT(i) (0x00400904 + (i*16)) + #define NV20_PGRAPH_TSIZE(i) (0x00400908 + (i*16)) + #define NV20_PGRAPH_TSTATUS(i) (0x0040090C + (i*16)) ++#define NV20_PGRAPH_ZCOMP(i) (0x00400980 + 4*(i)) + #define NV10_PGRAPH_TILE(i) (0x00400B00 + (i*16)) + #define NV10_PGRAPH_TLIMIT(i) (0x00400B04 + (i*16)) + #define NV10_PGRAPH_TSIZE(i) (0x00400B08 + (i*16)) +@@ -714,31 +710,32 @@ + #define NV50_PDISPLAY_INTR_1_CLK_UNK10 0x00000010 + #define NV50_PDISPLAY_INTR_1_CLK_UNK20 0x00000020 + #define NV50_PDISPLAY_INTR_1_CLK_UNK40 0x00000040 +-#define NV50_PDISPLAY_INTR_EN 0x0061002c +-#define NV50_PDISPLAY_INTR_EN_VBLANK_CRTC 0x0000000c +-#define NV50_PDISPLAY_INTR_EN_VBLANK_CRTC_(n) (1 << ((n) + 2)) +-#define NV50_PDISPLAY_INTR_EN_VBLANK_CRTC_0 0x00000004 +-#define NV50_PDISPLAY_INTR_EN_VBLANK_CRTC_1 0x00000008 +-#define NV50_PDISPLAY_INTR_EN_CLK_UNK10 0x00000010 +-#define NV50_PDISPLAY_INTR_EN_CLK_UNK20 0x00000020 +-#define NV50_PDISPLAY_INTR_EN_CLK_UNK40 0x00000040 ++#define NV50_PDISPLAY_INTR_EN_0 0x00610028 ++#define NV50_PDISPLAY_INTR_EN_1 0x0061002c ++#define NV50_PDISPLAY_INTR_EN_1_VBLANK_CRTC 0x0000000c ++#define NV50_PDISPLAY_INTR_EN_1_VBLANK_CRTC_(n) (1 << ((n) + 2)) ++#define NV50_PDISPLAY_INTR_EN_1_VBLANK_CRTC_0 0x00000004 ++#define NV50_PDISPLAY_INTR_EN_1_VBLANK_CRTC_1 0x00000008 ++#define NV50_PDISPLAY_INTR_EN_1_CLK_UNK10 0x00000010 ++#define NV50_PDISPLAY_INTR_EN_1_CLK_UNK20 0x00000020 ++#define NV50_PDISPLAY_INTR_EN_1_CLK_UNK40 0x00000040 + #define NV50_PDISPLAY_UNK30_CTRL 0x00610030 + #define NV50_PDISPLAY_UNK30_CTRL_UPDATE_VCLK0 0x00000200 + #define NV50_PDISPLAY_UNK30_CTRL_UPDATE_VCLK1 0x00000400 + #define NV50_PDISPLAY_UNK30_CTRL_PENDING 0x80000000 +-#define NV50_PDISPLAY_TRAPPED_ADDR 0x00610080 +-#define NV50_PDISPLAY_TRAPPED_DATA 0x00610084 +-#define NV50_PDISPLAY_CHANNEL_STAT(i) ((i) * 0x10 + 0x00610200) +-#define NV50_PDISPLAY_CHANNEL_STAT_DMA 0x00000010 +-#define NV50_PDISPLAY_CHANNEL_STAT_DMA_DISABLED 0x00000000 +-#define NV50_PDISPLAY_CHANNEL_STAT_DMA_ENABLED 0x00000010 +-#define NV50_PDISPLAY_CHANNEL_DMA_CB(i) ((i) * 0x10 + 0x00610204) +-#define NV50_PDISPLAY_CHANNEL_DMA_CB_LOCATION 0x00000002 +-#define NV50_PDISPLAY_CHANNEL_DMA_CB_LOCATION_VRAM 0x00000000 +-#define NV50_PDISPLAY_CHANNEL_DMA_CB_LOCATION_SYSTEM 0x00000002 +-#define NV50_PDISPLAY_CHANNEL_DMA_CB_VALID 0x00000001 +-#define NV50_PDISPLAY_CHANNEL_UNK2(i) ((i) * 0x10 + 0x00610208) +-#define NV50_PDISPLAY_CHANNEL_UNK3(i) ((i) * 0x10 + 0x0061020c) ++#define NV50_PDISPLAY_TRAPPED_ADDR(i) ((i) * 0x08 + 0x00610080) ++#define NV50_PDISPLAY_TRAPPED_DATA(i) ((i) * 0x08 + 0x00610084) ++#define NV50_PDISPLAY_EVO_CTRL(i) ((i) * 0x10 + 0x00610200) ++#define NV50_PDISPLAY_EVO_CTRL_DMA 0x00000010 ++#define NV50_PDISPLAY_EVO_CTRL_DMA_DISABLED 0x00000000 ++#define NV50_PDISPLAY_EVO_CTRL_DMA_ENABLED 0x00000010 ++#define NV50_PDISPLAY_EVO_DMA_CB(i) ((i) * 0x10 + 0x00610204) ++#define NV50_PDISPLAY_EVO_DMA_CB_LOCATION 0x00000002 ++#define NV50_PDISPLAY_EVO_DMA_CB_LOCATION_VRAM 0x00000000 ++#define NV50_PDISPLAY_EVO_DMA_CB_LOCATION_SYSTEM 0x00000002 ++#define NV50_PDISPLAY_EVO_DMA_CB_VALID 0x00000001 ++#define NV50_PDISPLAY_EVO_UNK2(i) ((i) * 0x10 + 0x00610208) ++#define NV50_PDISPLAY_EVO_HASH_TAG(i) ((i) * 0x10 + 0x0061020c) + + #define NV50_PDISPLAY_CURSOR 0x00610270 + #define NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(i) ((i) * 0x10 + 0x00610270) +@@ -746,15 +743,11 @@ + #define NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS 0x00030000 + #define NV50_PDISPLAY_CURSOR_CURSOR_CTRL2_STATUS_ACTIVE 0x00010000 + +-#define NV50_PDISPLAY_CTRL_STATE 0x00610300 +-#define NV50_PDISPLAY_CTRL_STATE_PENDING 0x80000000 +-#define NV50_PDISPLAY_CTRL_STATE_METHOD 0x00001ffc +-#define NV50_PDISPLAY_CTRL_STATE_ENABLE 0x00000001 +-#define NV50_PDISPLAY_CTRL_VAL 0x00610304 +-#define NV50_PDISPLAY_UNK_380 0x00610380 +-#define NV50_PDISPLAY_RAM_AMOUNT 0x00610384 +-#define NV50_PDISPLAY_UNK_388 0x00610388 +-#define NV50_PDISPLAY_UNK_38C 0x0061038c ++#define NV50_PDISPLAY_PIO_CTRL 0x00610300 ++#define NV50_PDISPLAY_PIO_CTRL_PENDING 0x80000000 ++#define NV50_PDISPLAY_PIO_CTRL_MTHD 0x00001ffc ++#define NV50_PDISPLAY_PIO_CTRL_ENABLED 0x00000001 ++#define NV50_PDISPLAY_PIO_DATA 0x00610304 + + #define NV50_PDISPLAY_CRTC_P(i, r) ((i) * 0x540 + NV50_PDISPLAY_CRTC_##r) + #define NV50_PDISPLAY_CRTC_C(i, r) (4 + (i) * 0x540 + NV50_PDISPLAY_CRTC_##r) +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_sgdma.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_sgdma.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_sgdma.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_sgdma.c 2010-11-22 06:33:32.000000000 +0100 +@@ -144,19 +144,15 @@ + + pte = nvbe->pte_start; + for (i = 0; i < nvbe->nr_pages; i++) { +- dma_addr_t dma_offset = dev_priv->gart_info.sg_dummy_bus; +- + for (j = 0; j < PAGE_SIZE / NV_CTXDMA_PAGE_SIZE; j++) { + if (dev_priv->card_type < NV_50) { +- nv_wo32(gpuobj, (pte * 4) + 0, dma_offset | 3); ++ nv_wo32(gpuobj, (pte * 4) + 0, 0x00000000); + pte += 1; + } else { + nv_wo32(gpuobj, (pte * 4) + 0, 0x00000000); + nv_wo32(gpuobj, (pte * 4) + 4, 0x00000000); + pte += 2; + } +- +- dma_offset += NV_CTXDMA_PAGE_SIZE; + } + } + dev_priv->engine.instmem.flush(nvbe->dev); +@@ -218,7 +214,6 @@ + nouveau_sgdma_init(struct drm_device *dev) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct pci_dev *pdev = dev->pdev; + struct nouveau_gpuobj *gpuobj = NULL; + uint32_t aper_size, obj_size; + int i, ret; +@@ -245,42 +240,15 @@ + return ret; + } + +- dev_priv->gart_info.sg_dummy_page = +- alloc_page(GFP_KERNEL|__GFP_DMA32|__GFP_ZERO); +- if (!dev_priv->gart_info.sg_dummy_page) { +- nouveau_gpuobj_ref(NULL, &gpuobj); +- return -ENOMEM; +- } +- +- set_bit(PG_locked, &dev_priv->gart_info.sg_dummy_page->flags); +- dev_priv->gart_info.sg_dummy_bus = +- pci_map_page(pdev, dev_priv->gart_info.sg_dummy_page, 0, +- PAGE_SIZE, PCI_DMA_BIDIRECTIONAL); +- if (pci_dma_mapping_error(pdev, dev_priv->gart_info.sg_dummy_bus)) { +- nouveau_gpuobj_ref(NULL, &gpuobj); +- return -EFAULT; +- } +- + if (dev_priv->card_type < NV_50) { +- /* special case, allocated from global instmem heap so +- * cinst is invalid, we use it on all channels though so +- * cinst needs to be valid, set it the same as pinst +- */ +- gpuobj->cinst = gpuobj->pinst; +- +- /* Maybe use NV_DMA_TARGET_AGP for PCIE? NVIDIA do this, and +- * confirmed to work on c51. Perhaps means NV_DMA_TARGET_PCIE +- * on those cards? */ + nv_wo32(gpuobj, 0, NV_CLASS_DMA_IN_MEMORY | + (1 << 12) /* PT present */ | + (0 << 13) /* PT *not* linear */ | +- (NV_DMA_ACCESS_RW << 14) | +- (NV_DMA_TARGET_PCI << 16)); ++ (0 << 14) /* RW */ | ++ (2 << 16) /* PCI */); + nv_wo32(gpuobj, 4, aper_size - 1); +- for (i = 2; i < 2 + (aper_size >> 12); i++) { +- nv_wo32(gpuobj, i * 4, +- dev_priv->gart_info.sg_dummy_bus | 3); +- } ++ for (i = 2; i < 2 + (aper_size >> 12); i++) ++ nv_wo32(gpuobj, i * 4, 0x00000000); + } else { + for (i = 0; i < obj_size; i += 8) { + nv_wo32(gpuobj, i + 0, 0x00000000); +@@ -301,15 +269,6 @@ + { + struct drm_nouveau_private *dev_priv = dev->dev_private; + +- if (dev_priv->gart_info.sg_dummy_page) { +- pci_unmap_page(dev->pdev, dev_priv->gart_info.sg_dummy_bus, +- NV_CTXDMA_PAGE_SIZE, PCI_DMA_BIDIRECTIONAL); +- unlock_page(dev_priv->gart_info.sg_dummy_page); +- __free_page(dev_priv->gart_info.sg_dummy_page); +- dev_priv->gart_info.sg_dummy_page = NULL; +- dev_priv->gart_info.sg_dummy_bus = 0; +- } +- + nouveau_gpuobj_ref(NULL, &dev_priv->gart_info.sg_ctxdma); + } + +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_state.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_state.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_state.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_state.c 2010-11-22 06:33:32.000000000 +0100 +@@ -53,10 +53,10 @@ + engine->instmem.takedown = nv04_instmem_takedown; + engine->instmem.suspend = nv04_instmem_suspend; + engine->instmem.resume = nv04_instmem_resume; +- engine->instmem.populate = nv04_instmem_populate; +- engine->instmem.clear = nv04_instmem_clear; +- engine->instmem.bind = nv04_instmem_bind; +- engine->instmem.unbind = nv04_instmem_unbind; ++ engine->instmem.get = nv04_instmem_get; ++ engine->instmem.put = nv04_instmem_put; ++ engine->instmem.map = nv04_instmem_map; ++ engine->instmem.unmap = nv04_instmem_unmap; + engine->instmem.flush = nv04_instmem_flush; + engine->mc.init = nv04_mc_init; + engine->mc.takedown = nv04_mc_takedown; +@@ -65,7 +65,6 @@ + engine->timer.takedown = nv04_timer_takedown; + engine->fb.init = nv04_fb_init; + engine->fb.takedown = nv04_fb_takedown; +- engine->graph.grclass = nv04_graph_grclass; + engine->graph.init = nv04_graph_init; + engine->graph.takedown = nv04_graph_takedown; + engine->graph.fifo_access = nv04_graph_fifo_access; +@@ -76,7 +75,7 @@ + engine->graph.unload_context = nv04_graph_unload_context; + engine->fifo.channels = 16; + engine->fifo.init = nv04_fifo_init; +- engine->fifo.takedown = nouveau_stub_takedown; ++ engine->fifo.takedown = nv04_fifo_fini; + engine->fifo.disable = nv04_fifo_disable; + engine->fifo.enable = nv04_fifo_enable; + engine->fifo.reassign = nv04_fifo_reassign; +@@ -99,16 +98,18 @@ + engine->pm.clock_get = nv04_pm_clock_get; + engine->pm.clock_pre = nv04_pm_clock_pre; + engine->pm.clock_set = nv04_pm_clock_set; ++ engine->crypt.init = nouveau_stub_init; ++ engine->crypt.takedown = nouveau_stub_takedown; + break; + case 0x10: + engine->instmem.init = nv04_instmem_init; + engine->instmem.takedown = nv04_instmem_takedown; + engine->instmem.suspend = nv04_instmem_suspend; + engine->instmem.resume = nv04_instmem_resume; +- engine->instmem.populate = nv04_instmem_populate; +- engine->instmem.clear = nv04_instmem_clear; +- engine->instmem.bind = nv04_instmem_bind; +- engine->instmem.unbind = nv04_instmem_unbind; ++ engine->instmem.get = nv04_instmem_get; ++ engine->instmem.put = nv04_instmem_put; ++ engine->instmem.map = nv04_instmem_map; ++ engine->instmem.unmap = nv04_instmem_unmap; + engine->instmem.flush = nv04_instmem_flush; + engine->mc.init = nv04_mc_init; + engine->mc.takedown = nv04_mc_takedown; +@@ -117,8 +118,9 @@ + engine->timer.takedown = nv04_timer_takedown; + engine->fb.init = nv10_fb_init; + engine->fb.takedown = nv10_fb_takedown; +- engine->fb.set_region_tiling = nv10_fb_set_region_tiling; +- engine->graph.grclass = nv10_graph_grclass; ++ engine->fb.init_tile_region = nv10_fb_init_tile_region; ++ engine->fb.set_tile_region = nv10_fb_set_tile_region; ++ engine->fb.free_tile_region = nv10_fb_free_tile_region; + engine->graph.init = nv10_graph_init; + engine->graph.takedown = nv10_graph_takedown; + engine->graph.channel = nv10_graph_channel; +@@ -127,17 +129,17 @@ + engine->graph.fifo_access = nv04_graph_fifo_access; + engine->graph.load_context = nv10_graph_load_context; + engine->graph.unload_context = nv10_graph_unload_context; +- engine->graph.set_region_tiling = nv10_graph_set_region_tiling; ++ engine->graph.set_tile_region = nv10_graph_set_tile_region; + engine->fifo.channels = 32; + engine->fifo.init = nv10_fifo_init; +- engine->fifo.takedown = nouveau_stub_takedown; ++ engine->fifo.takedown = nv04_fifo_fini; + engine->fifo.disable = nv04_fifo_disable; + engine->fifo.enable = nv04_fifo_enable; + engine->fifo.reassign = nv04_fifo_reassign; + engine->fifo.cache_pull = nv04_fifo_cache_pull; + engine->fifo.channel_id = nv10_fifo_channel_id; + engine->fifo.create_context = nv10_fifo_create_context; +- engine->fifo.destroy_context = nv10_fifo_destroy_context; ++ engine->fifo.destroy_context = nv04_fifo_destroy_context; + engine->fifo.load_context = nv10_fifo_load_context; + engine->fifo.unload_context = nv10_fifo_unload_context; + engine->display.early_init = nv04_display_early_init; +@@ -153,16 +155,18 @@ + engine->pm.clock_get = nv04_pm_clock_get; + engine->pm.clock_pre = nv04_pm_clock_pre; + engine->pm.clock_set = nv04_pm_clock_set; ++ engine->crypt.init = nouveau_stub_init; ++ engine->crypt.takedown = nouveau_stub_takedown; + break; + case 0x20: + engine->instmem.init = nv04_instmem_init; + engine->instmem.takedown = nv04_instmem_takedown; + engine->instmem.suspend = nv04_instmem_suspend; + engine->instmem.resume = nv04_instmem_resume; +- engine->instmem.populate = nv04_instmem_populate; +- engine->instmem.clear = nv04_instmem_clear; +- engine->instmem.bind = nv04_instmem_bind; +- engine->instmem.unbind = nv04_instmem_unbind; ++ engine->instmem.get = nv04_instmem_get; ++ engine->instmem.put = nv04_instmem_put; ++ engine->instmem.map = nv04_instmem_map; ++ engine->instmem.unmap = nv04_instmem_unmap; + engine->instmem.flush = nv04_instmem_flush; + engine->mc.init = nv04_mc_init; + engine->mc.takedown = nv04_mc_takedown; +@@ -171,8 +175,9 @@ + engine->timer.takedown = nv04_timer_takedown; + engine->fb.init = nv10_fb_init; + engine->fb.takedown = nv10_fb_takedown; +- engine->fb.set_region_tiling = nv10_fb_set_region_tiling; +- engine->graph.grclass = nv20_graph_grclass; ++ engine->fb.init_tile_region = nv10_fb_init_tile_region; ++ engine->fb.set_tile_region = nv10_fb_set_tile_region; ++ engine->fb.free_tile_region = nv10_fb_free_tile_region; + engine->graph.init = nv20_graph_init; + engine->graph.takedown = nv20_graph_takedown; + engine->graph.channel = nv10_graph_channel; +@@ -181,17 +186,17 @@ + engine->graph.fifo_access = nv04_graph_fifo_access; + engine->graph.load_context = nv20_graph_load_context; + engine->graph.unload_context = nv20_graph_unload_context; +- engine->graph.set_region_tiling = nv20_graph_set_region_tiling; ++ engine->graph.set_tile_region = nv20_graph_set_tile_region; + engine->fifo.channels = 32; + engine->fifo.init = nv10_fifo_init; +- engine->fifo.takedown = nouveau_stub_takedown; ++ engine->fifo.takedown = nv04_fifo_fini; + engine->fifo.disable = nv04_fifo_disable; + engine->fifo.enable = nv04_fifo_enable; + engine->fifo.reassign = nv04_fifo_reassign; + engine->fifo.cache_pull = nv04_fifo_cache_pull; + engine->fifo.channel_id = nv10_fifo_channel_id; + engine->fifo.create_context = nv10_fifo_create_context; +- engine->fifo.destroy_context = nv10_fifo_destroy_context; ++ engine->fifo.destroy_context = nv04_fifo_destroy_context; + engine->fifo.load_context = nv10_fifo_load_context; + engine->fifo.unload_context = nv10_fifo_unload_context; + engine->display.early_init = nv04_display_early_init; +@@ -207,16 +212,18 @@ + engine->pm.clock_get = nv04_pm_clock_get; + engine->pm.clock_pre = nv04_pm_clock_pre; + engine->pm.clock_set = nv04_pm_clock_set; ++ engine->crypt.init = nouveau_stub_init; ++ engine->crypt.takedown = nouveau_stub_takedown; + break; + case 0x30: + engine->instmem.init = nv04_instmem_init; + engine->instmem.takedown = nv04_instmem_takedown; + engine->instmem.suspend = nv04_instmem_suspend; + engine->instmem.resume = nv04_instmem_resume; +- engine->instmem.populate = nv04_instmem_populate; +- engine->instmem.clear = nv04_instmem_clear; +- engine->instmem.bind = nv04_instmem_bind; +- engine->instmem.unbind = nv04_instmem_unbind; ++ engine->instmem.get = nv04_instmem_get; ++ engine->instmem.put = nv04_instmem_put; ++ engine->instmem.map = nv04_instmem_map; ++ engine->instmem.unmap = nv04_instmem_unmap; + engine->instmem.flush = nv04_instmem_flush; + engine->mc.init = nv04_mc_init; + engine->mc.takedown = nv04_mc_takedown; +@@ -225,8 +232,9 @@ + engine->timer.takedown = nv04_timer_takedown; + engine->fb.init = nv30_fb_init; + engine->fb.takedown = nv30_fb_takedown; +- engine->fb.set_region_tiling = nv10_fb_set_region_tiling; +- engine->graph.grclass = nv30_graph_grclass; ++ engine->fb.init_tile_region = nv30_fb_init_tile_region; ++ engine->fb.set_tile_region = nv10_fb_set_tile_region; ++ engine->fb.free_tile_region = nv30_fb_free_tile_region; + engine->graph.init = nv30_graph_init; + engine->graph.takedown = nv20_graph_takedown; + engine->graph.fifo_access = nv04_graph_fifo_access; +@@ -235,17 +243,17 @@ + engine->graph.destroy_context = nv20_graph_destroy_context; + engine->graph.load_context = nv20_graph_load_context; + engine->graph.unload_context = nv20_graph_unload_context; +- engine->graph.set_region_tiling = nv20_graph_set_region_tiling; ++ engine->graph.set_tile_region = nv20_graph_set_tile_region; + engine->fifo.channels = 32; + engine->fifo.init = nv10_fifo_init; +- engine->fifo.takedown = nouveau_stub_takedown; ++ engine->fifo.takedown = nv04_fifo_fini; + engine->fifo.disable = nv04_fifo_disable; + engine->fifo.enable = nv04_fifo_enable; + engine->fifo.reassign = nv04_fifo_reassign; + engine->fifo.cache_pull = nv04_fifo_cache_pull; + engine->fifo.channel_id = nv10_fifo_channel_id; + engine->fifo.create_context = nv10_fifo_create_context; +- engine->fifo.destroy_context = nv10_fifo_destroy_context; ++ engine->fifo.destroy_context = nv04_fifo_destroy_context; + engine->fifo.load_context = nv10_fifo_load_context; + engine->fifo.unload_context = nv10_fifo_unload_context; + engine->display.early_init = nv04_display_early_init; +@@ -263,6 +271,8 @@ + engine->pm.clock_set = nv04_pm_clock_set; + engine->pm.voltage_get = nouveau_voltage_gpio_get; + engine->pm.voltage_set = nouveau_voltage_gpio_set; ++ engine->crypt.init = nouveau_stub_init; ++ engine->crypt.takedown = nouveau_stub_takedown; + break; + case 0x40: + case 0x60: +@@ -270,10 +280,10 @@ + engine->instmem.takedown = nv04_instmem_takedown; + engine->instmem.suspend = nv04_instmem_suspend; + engine->instmem.resume = nv04_instmem_resume; +- engine->instmem.populate = nv04_instmem_populate; +- engine->instmem.clear = nv04_instmem_clear; +- engine->instmem.bind = nv04_instmem_bind; +- engine->instmem.unbind = nv04_instmem_unbind; ++ engine->instmem.get = nv04_instmem_get; ++ engine->instmem.put = nv04_instmem_put; ++ engine->instmem.map = nv04_instmem_map; ++ engine->instmem.unmap = nv04_instmem_unmap; + engine->instmem.flush = nv04_instmem_flush; + engine->mc.init = nv40_mc_init; + engine->mc.takedown = nv40_mc_takedown; +@@ -282,8 +292,9 @@ + engine->timer.takedown = nv04_timer_takedown; + engine->fb.init = nv40_fb_init; + engine->fb.takedown = nv40_fb_takedown; +- engine->fb.set_region_tiling = nv40_fb_set_region_tiling; +- engine->graph.grclass = nv40_graph_grclass; ++ engine->fb.init_tile_region = nv30_fb_init_tile_region; ++ engine->fb.set_tile_region = nv40_fb_set_tile_region; ++ engine->fb.free_tile_region = nv30_fb_free_tile_region; + engine->graph.init = nv40_graph_init; + engine->graph.takedown = nv40_graph_takedown; + engine->graph.fifo_access = nv04_graph_fifo_access; +@@ -292,17 +303,17 @@ + engine->graph.destroy_context = nv40_graph_destroy_context; + engine->graph.load_context = nv40_graph_load_context; + engine->graph.unload_context = nv40_graph_unload_context; +- engine->graph.set_region_tiling = nv40_graph_set_region_tiling; ++ engine->graph.set_tile_region = nv40_graph_set_tile_region; + engine->fifo.channels = 32; + engine->fifo.init = nv40_fifo_init; +- engine->fifo.takedown = nouveau_stub_takedown; ++ engine->fifo.takedown = nv04_fifo_fini; + engine->fifo.disable = nv04_fifo_disable; + engine->fifo.enable = nv04_fifo_enable; + engine->fifo.reassign = nv04_fifo_reassign; + engine->fifo.cache_pull = nv04_fifo_cache_pull; + engine->fifo.channel_id = nv10_fifo_channel_id; + engine->fifo.create_context = nv40_fifo_create_context; +- engine->fifo.destroy_context = nv40_fifo_destroy_context; ++ engine->fifo.destroy_context = nv04_fifo_destroy_context; + engine->fifo.load_context = nv40_fifo_load_context; + engine->fifo.unload_context = nv40_fifo_unload_context; + engine->display.early_init = nv04_display_early_init; +@@ -321,6 +332,8 @@ + engine->pm.voltage_get = nouveau_voltage_gpio_get; + engine->pm.voltage_set = nouveau_voltage_gpio_set; + engine->pm.temp_get = nv40_temp_get; ++ engine->crypt.init = nouveau_stub_init; ++ engine->crypt.takedown = nouveau_stub_takedown; + break; + case 0x50: + case 0x80: /* gotta love NVIDIA's consistency.. */ +@@ -330,10 +343,10 @@ + engine->instmem.takedown = nv50_instmem_takedown; + engine->instmem.suspend = nv50_instmem_suspend; + engine->instmem.resume = nv50_instmem_resume; +- engine->instmem.populate = nv50_instmem_populate; +- engine->instmem.clear = nv50_instmem_clear; +- engine->instmem.bind = nv50_instmem_bind; +- engine->instmem.unbind = nv50_instmem_unbind; ++ engine->instmem.get = nv50_instmem_get; ++ engine->instmem.put = nv50_instmem_put; ++ engine->instmem.map = nv50_instmem_map; ++ engine->instmem.unmap = nv50_instmem_unmap; + if (dev_priv->chipset == 0x50) + engine->instmem.flush = nv50_instmem_flush; + else +@@ -345,7 +358,6 @@ + engine->timer.takedown = nv04_timer_takedown; + engine->fb.init = nv50_fb_init; + engine->fb.takedown = nv50_fb_takedown; +- engine->graph.grclass = nv50_graph_grclass; + engine->graph.init = nv50_graph_init; + engine->graph.takedown = nv50_graph_takedown; + engine->graph.fifo_access = nv50_graph_fifo_access; +@@ -381,24 +393,32 @@ + engine->display.init = nv50_display_init; + engine->display.destroy = nv50_display_destroy; + engine->gpio.init = nv50_gpio_init; +- engine->gpio.takedown = nouveau_stub_takedown; ++ engine->gpio.takedown = nv50_gpio_fini; + engine->gpio.get = nv50_gpio_get; + engine->gpio.set = nv50_gpio_set; ++ engine->gpio.irq_register = nv50_gpio_irq_register; ++ engine->gpio.irq_unregister = nv50_gpio_irq_unregister; + engine->gpio.irq_enable = nv50_gpio_irq_enable; + switch (dev_priv->chipset) { +- case 0xa3: +- case 0xa5: +- case 0xa8: +- case 0xaf: +- engine->pm.clock_get = nva3_pm_clock_get; +- engine->pm.clock_pre = nva3_pm_clock_pre; +- engine->pm.clock_set = nva3_pm_clock_set; +- break; +- default: ++ case 0x84: ++ case 0x86: ++ case 0x92: ++ case 0x94: ++ case 0x96: ++ case 0x98: ++ case 0xa0: ++ case 0xaa: ++ case 0xac: ++ case 0x50: + engine->pm.clock_get = nv50_pm_clock_get; + engine->pm.clock_pre = nv50_pm_clock_pre; + engine->pm.clock_set = nv50_pm_clock_set; + break; ++ default: ++ engine->pm.clock_get = nva3_pm_clock_get; ++ engine->pm.clock_pre = nva3_pm_clock_pre; ++ engine->pm.clock_set = nva3_pm_clock_set; ++ break; + } + engine->pm.voltage_get = nouveau_voltage_gpio_get; + engine->pm.voltage_set = nouveau_voltage_gpio_set; +@@ -406,16 +426,34 @@ + engine->pm.temp_get = nv84_temp_get; + else + engine->pm.temp_get = nv40_temp_get; ++ switch (dev_priv->chipset) { ++ case 0x84: ++ case 0x86: ++ case 0x92: ++ case 0x94: ++ case 0x96: ++ case 0xa0: ++ engine->crypt.init = nv84_crypt_init; ++ engine->crypt.takedown = nv84_crypt_fini; ++ engine->crypt.create_context = nv84_crypt_create_context; ++ engine->crypt.destroy_context = nv84_crypt_destroy_context; ++ engine->crypt.tlb_flush = nv84_crypt_tlb_flush; ++ break; ++ default: ++ engine->crypt.init = nouveau_stub_init; ++ engine->crypt.takedown = nouveau_stub_takedown; ++ break; ++ } + break; + case 0xC0: + engine->instmem.init = nvc0_instmem_init; + engine->instmem.takedown = nvc0_instmem_takedown; + engine->instmem.suspend = nvc0_instmem_suspend; + engine->instmem.resume = nvc0_instmem_resume; +- engine->instmem.populate = nvc0_instmem_populate; +- engine->instmem.clear = nvc0_instmem_clear; +- engine->instmem.bind = nvc0_instmem_bind; +- engine->instmem.unbind = nvc0_instmem_unbind; ++ engine->instmem.get = nvc0_instmem_get; ++ engine->instmem.put = nvc0_instmem_put; ++ engine->instmem.map = nvc0_instmem_map; ++ engine->instmem.unmap = nvc0_instmem_unmap; + engine->instmem.flush = nvc0_instmem_flush; + engine->mc.init = nv50_mc_init; + engine->mc.takedown = nv50_mc_takedown; +@@ -424,7 +462,6 @@ + engine->timer.takedown = nv04_timer_takedown; + engine->fb.init = nvc0_fb_init; + engine->fb.takedown = nvc0_fb_takedown; +- engine->graph.grclass = NULL; //nvc0_graph_grclass; + engine->graph.init = nvc0_graph_init; + engine->graph.takedown = nvc0_graph_takedown; + engine->graph.fifo_access = nvc0_graph_fifo_access; +@@ -453,7 +490,11 @@ + engine->gpio.takedown = nouveau_stub_takedown; + engine->gpio.get = nv50_gpio_get; + engine->gpio.set = nv50_gpio_set; ++ engine->gpio.irq_register = nv50_gpio_irq_register; ++ engine->gpio.irq_unregister = nv50_gpio_irq_unregister; + engine->gpio.irq_enable = nv50_gpio_irq_enable; ++ engine->crypt.init = nouveau_stub_init; ++ engine->crypt.takedown = nouveau_stub_takedown; + break; + default: + NV_ERROR(dev, "NV%02x unsupported\n", dev_priv->chipset); +@@ -495,7 +536,7 @@ + + ret = nouveau_gpuobj_dma_new(dev_priv->channel, NV_CLASS_DMA_IN_MEMORY, + 0, dev_priv->vram_size, +- NV_DMA_ACCESS_RW, NV_DMA_TARGET_VIDMEM, ++ NV_MEM_ACCESS_RW, NV_MEM_TARGET_VRAM, + &gpuobj); + if (ret) + goto out_err; +@@ -505,9 +546,10 @@ + if (ret) + goto out_err; + +- ret = nouveau_gpuobj_gart_dma_new(dev_priv->channel, 0, +- dev_priv->gart_info.aper_size, +- NV_DMA_ACCESS_RW, &gpuobj, NULL); ++ ret = nouveau_gpuobj_dma_new(dev_priv->channel, NV_CLASS_DMA_IN_MEMORY, ++ 0, dev_priv->gart_info.aper_size, ++ NV_MEM_ACCESS_RW, NV_MEM_TARGET_GART, ++ &gpuobj); + if (ret) + goto out_err; + +@@ -516,11 +558,11 @@ + if (ret) + goto out_err; + ++ mutex_unlock(&dev_priv->channel->mutex); + return 0; + + out_err: +- nouveau_channel_free(dev_priv->channel); +- dev_priv->channel = NULL; ++ nouveau_channel_put(&dev_priv->channel); + return ret; + } + +@@ -567,6 +609,8 @@ + if (ret) + goto out; + engine = &dev_priv->engine; ++ spin_lock_init(&dev_priv->channels.lock); ++ spin_lock_init(&dev_priv->tile.lock); + spin_lock_init(&dev_priv->context_switch_lock); + + /* Make the CRTCs and I2C buses accessible */ +@@ -625,26 +669,28 @@ + if (ret) + goto out_fb; + ++ /* PCRYPT */ ++ ret = engine->crypt.init(dev); ++ if (ret) ++ goto out_graph; ++ + /* PFIFO */ + ret = engine->fifo.init(dev); + if (ret) +- goto out_graph; ++ goto out_crypt; + } + + ret = engine->display.create(dev); + if (ret) + goto out_fifo; + +- /* this call irq_preinstall, register irq handler and +- * call irq_postinstall +- */ +- ret = drm_irq_install(dev); ++ ret = drm_vblank_init(dev, nv_two_heads(dev) ? 2 : 1); + if (ret) +- goto out_display; ++ goto out_vblank; + +- ret = drm_vblank_init(dev, 0); ++ ret = nouveau_irq_init(dev); + if (ret) +- goto out_irq; ++ goto out_vblank; + + /* what about PVIDEO/PCRTC/PRAMDAC etc? */ + +@@ -669,12 +715,16 @@ + out_fence: + nouveau_fence_fini(dev); + out_irq: +- drm_irq_uninstall(dev); +-out_display: ++ nouveau_irq_fini(dev); ++out_vblank: ++ drm_vblank_cleanup(dev); + engine->display.destroy(dev); + out_fifo: + if (!nouveau_noaccel) + engine->fifo.takedown(dev); ++out_crypt: ++ if (!nouveau_noaccel) ++ engine->crypt.takedown(dev); + out_graph: + if (!nouveau_noaccel) + engine->graph.takedown(dev); +@@ -713,12 +763,12 @@ + + if (!engine->graph.accel_blocked) { + nouveau_fence_fini(dev); +- nouveau_channel_free(dev_priv->channel); +- dev_priv->channel = NULL; ++ nouveau_channel_put_unlocked(&dev_priv->channel); + } + + if (!nouveau_noaccel) { + engine->fifo.takedown(dev); ++ engine->crypt.takedown(dev); + engine->graph.takedown(dev); + } + engine->fb.takedown(dev); +@@ -737,7 +787,8 @@ + nouveau_gpuobj_takedown(dev); + nouveau_mem_vram_fini(dev); + +- drm_irq_uninstall(dev); ++ nouveau_irq_fini(dev); ++ drm_vblank_cleanup(dev); + + nouveau_pm_fini(dev); + nouveau_bios_takedown(dev); +@@ -1024,21 +1075,6 @@ + else + getparam->value = NV_PCI; + break; +- case NOUVEAU_GETPARAM_FB_PHYSICAL: +- getparam->value = dev_priv->fb_phys; +- break; +- case NOUVEAU_GETPARAM_AGP_PHYSICAL: +- getparam->value = dev_priv->gart_info.aper_base; +- break; +- case NOUVEAU_GETPARAM_PCI_PHYSICAL: +- if (dev->sg) { +- getparam->value = (unsigned long)dev->sg->virtual; +- } else { +- NV_ERROR(dev, "Requested PCIGART address, " +- "while no PCIGART was created\n"); +- return -EINVAL; +- } +- break; + case NOUVEAU_GETPARAM_FB_SIZE: + getparam->value = dev_priv->fb_available_size; + break; +@@ -1046,7 +1082,7 @@ + getparam->value = dev_priv->gart_info.aper_size; + break; + case NOUVEAU_GETPARAM_VM_VRAM_BASE: +- getparam->value = dev_priv->vm_vram_base; ++ getparam->value = 0; /* deprecated */ + break; + case NOUVEAU_GETPARAM_PTIMER_TIME: + getparam->value = dev_priv->engine.timer.read(dev); +@@ -1054,6 +1090,9 @@ + case NOUVEAU_GETPARAM_HAS_BO_USAGE: + getparam->value = 1; + break; ++ case NOUVEAU_GETPARAM_HAS_PAGEFLIP: ++ getparam->value = (dev_priv->card_type < NV_50); ++ break; + case NOUVEAU_GETPARAM_GRAPH_UNITS: + /* NV40 and NV50 versions are quite different, but register + * address is the same. User is supposed to know the card +@@ -1105,7 +1144,13 @@ + /* Waits for PGRAPH to go completely idle */ + bool nouveau_wait_for_idle(struct drm_device *dev) + { +- if (!nv_wait(dev, NV04_PGRAPH_STATUS, 0xffffffff, 0x00000000)) { ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ uint32_t mask = ~0; ++ ++ if (dev_priv->card_type == NV_40) ++ mask &= ~NV40_PGRAPH_STATUS_SYNC_STALL; ++ ++ if (!nv_wait(dev, NV04_PGRAPH_STATUS, mask, 0)) { + NV_ERROR(dev, "PGRAPH idle timed out with status 0x%08x\n", + nv_rd32(dev, NV04_PGRAPH_STATUS)); + return false; +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_util.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_util.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_util.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_util.c 2010-11-22 06:33:32.000000000 +0100 +@@ -0,0 +1,69 @@ ++/* ++ * Copyright (C) 2010 Nouveau Project ++ * ++ * All Rights Reserved. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining ++ * a copy of this software and associated documentation files (the ++ * "Software"), to deal in the Software without restriction, including ++ * without limitation the rights to use, copy, modify, merge, publish, ++ * distribute, sublicense, and/or sell copies of the Software, and to ++ * permit persons to whom the Software is furnished to do so, subject to ++ * the following conditions: ++ * ++ * The above copyright notice and this permission notice (including the ++ * next paragraph) shall be included in all copies or substantial ++ * portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ++ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE ++ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ * ++ */ ++ ++#include ++ ++#include "nouveau_util.h" ++ ++static DEFINE_RATELIMIT_STATE(nouveau_ratelimit_state, 3 * HZ, 20); ++ ++void ++nouveau_bitfield_print(const struct nouveau_bitfield *bf, u32 value) ++{ ++ while (bf->name) { ++ if (value & bf->mask) { ++ printk(" %s", bf->name); ++ value &= ~bf->mask; ++ } ++ ++ bf++; ++ } ++ ++ if (value) ++ printk(" (unknown bits 0x%08x)", value); ++} ++ ++void ++nouveau_enum_print(const struct nouveau_enum *en, u32 value) ++{ ++ while (en->name) { ++ if (value == en->value) { ++ printk("%s", en->name); ++ return; ++ } ++ ++ en++; ++ } ++ ++ printk("(unknown enum 0x%08x)", value); ++} ++ ++int ++nouveau_ratelimit(void) ++{ ++ return __ratelimit(&nouveau_ratelimit_state); ++} +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_util.h linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_util.h +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nouveau_util.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nouveau_util.h 2010-11-22 06:33:32.000000000 +0100 +@@ -0,0 +1,45 @@ ++/* ++ * Copyright (C) 2010 Nouveau Project ++ * ++ * All Rights Reserved. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining ++ * a copy of this software and associated documentation files (the ++ * "Software"), to deal in the Software without restriction, including ++ * without limitation the rights to use, copy, modify, merge, publish, ++ * distribute, sublicense, and/or sell copies of the Software, and to ++ * permit persons to whom the Software is furnished to do so, subject to ++ * the following conditions: ++ * ++ * The above copyright notice and this permission notice (including the ++ * next paragraph) shall be included in all copies or substantial ++ * portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ++ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE ++ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ * ++ */ ++ ++#ifndef __NOUVEAU_UTIL_H__ ++#define __NOUVEAU_UTIL_H__ ++ ++struct nouveau_bitfield { ++ u32 mask; ++ const char *name; ++}; ++ ++struct nouveau_enum { ++ u32 value; ++ const char *name; ++}; ++ ++void nouveau_bitfield_print(const struct nouveau_bitfield *, u32 value); ++void nouveau_enum_print(const struct nouveau_enum *, u32 value); ++int nouveau_ratelimit(void); ++ ++#endif +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv04_crtc.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv04_crtc.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv04_crtc.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv04_crtc.c 2010-11-22 06:33:32.000000000 +0100 +@@ -551,7 +551,10 @@ + if (dev_priv->card_type >= NV_30) + regp->gpio_ext = NVReadCRTC(dev, 0, NV_PCRTC_GPIO_EXT); + +- regp->crtc_cfg = NV_PCRTC_CONFIG_START_ADDRESS_HSYNC; ++ if (dev_priv->card_type >= NV_10) ++ regp->crtc_cfg = NV10_PCRTC_CONFIG_START_ADDRESS_HSYNC; ++ else ++ regp->crtc_cfg = NV04_PCRTC_CONFIG_START_ADDRESS_HSYNC; + + /* Some misc regs */ + if (dev_priv->card_type == NV_40) { +@@ -669,6 +672,7 @@ + if (nv_two_heads(dev)) + NVSetOwner(dev, nv_crtc->index); + ++ drm_vblank_pre_modeset(dev, nv_crtc->index); + funcs->dpms(crtc, DRM_MODE_DPMS_OFF); + + NVBlankScreen(dev, nv_crtc->index, true); +@@ -701,6 +705,7 @@ + #endif + + funcs->dpms(crtc, DRM_MODE_DPMS_ON); ++ drm_vblank_post_modeset(dev, nv_crtc->index); + } + + static void nv_crtc_destroy(struct drm_crtc *crtc) +@@ -986,6 +991,7 @@ + .cursor_move = nv04_crtc_cursor_move, + .gamma_set = nv_crtc_gamma_set, + .set_config = drm_crtc_helper_set_config, ++ .page_flip = nouveau_crtc_page_flip, + .destroy = nv_crtc_destroy, + }; + +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv04_display.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv04_display.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv04_display.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv04_display.c 2010-11-22 06:33:32.000000000 +0100 +@@ -32,6 +32,9 @@ + #include "nouveau_encoder.h" + #include "nouveau_connector.h" + ++static void nv04_vblank_crtc0_isr(struct drm_device *); ++static void nv04_vblank_crtc1_isr(struct drm_device *); ++ + static void + nv04_display_store_initial_head_owner(struct drm_device *dev) + { +@@ -197,6 +200,8 @@ + func->save(encoder); + } + ++ nouveau_irq_register(dev, 24, nv04_vblank_crtc0_isr); ++ nouveau_irq_register(dev, 25, nv04_vblank_crtc1_isr); + return 0; + } + +@@ -208,6 +213,9 @@ + + NV_DEBUG_KMS(dev, "\n"); + ++ nouveau_irq_unregister(dev, 24); ++ nouveau_irq_unregister(dev, 25); ++ + /* Turn every CRTC off. */ + list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { + struct drm_mode_set modeset = { +@@ -258,3 +266,16 @@ + return 0; + } + ++static void ++nv04_vblank_crtc0_isr(struct drm_device *dev) ++{ ++ nv_wr32(dev, NV_CRTC0_INTSTAT, NV_CRTC_INTR_VBLANK); ++ drm_handle_vblank(dev, 0); ++} ++ ++static void ++nv04_vblank_crtc1_isr(struct drm_device *dev) ++{ ++ nv_wr32(dev, NV_CRTC1_INTSTAT, NV_CRTC_INTR_VBLANK); ++ drm_handle_vblank(dev, 1); ++} +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv04_fbcon.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv04_fbcon.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv04_fbcon.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv04_fbcon.c 2010-11-22 06:33:32.000000000 +0100 +@@ -28,52 +28,39 @@ + #include "nouveau_ramht.h" + #include "nouveau_fbcon.h" + +-void ++int + nv04_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region) + { + struct nouveau_fbdev *nfbdev = info->par; + struct drm_device *dev = nfbdev->dev; + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_channel *chan = dev_priv->channel; ++ int ret; + +- if (info->state != FBINFO_STATE_RUNNING) +- return; +- +- if (!(info->flags & FBINFO_HWACCEL_DISABLED) && RING_SPACE(chan, 4)) { +- nouveau_fbcon_gpu_lockup(info); +- } +- +- if (info->flags & FBINFO_HWACCEL_DISABLED) { +- cfb_copyarea(info, region); +- return; +- } ++ ret = RING_SPACE(chan, 4); ++ if (ret) ++ return ret; + + BEGIN_RING(chan, NvSubImageBlit, 0x0300, 3); + OUT_RING(chan, (region->sy << 16) | region->sx); + OUT_RING(chan, (region->dy << 16) | region->dx); + OUT_RING(chan, (region->height << 16) | region->width); + FIRE_RING(chan); ++ return 0; + } + +-void ++int + nv04_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) + { + struct nouveau_fbdev *nfbdev = info->par; + struct drm_device *dev = nfbdev->dev; + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_channel *chan = dev_priv->channel; ++ int ret; + +- if (info->state != FBINFO_STATE_RUNNING) +- return; +- +- if (!(info->flags & FBINFO_HWACCEL_DISABLED) && RING_SPACE(chan, 7)) { +- nouveau_fbcon_gpu_lockup(info); +- } +- +- if (info->flags & FBINFO_HWACCEL_DISABLED) { +- cfb_fillrect(info, rect); +- return; +- } ++ ret = RING_SPACE(chan, 7); ++ if (ret) ++ return ret; + + BEGIN_RING(chan, NvSubGdiRect, 0x02fc, 1); + OUT_RING(chan, (rect->rop != ROP_COPY) ? 1 : 3); +@@ -87,9 +74,10 @@ + OUT_RING(chan, (rect->dx << 16) | rect->dy); + OUT_RING(chan, (rect->width << 16) | rect->height); + FIRE_RING(chan); ++ return 0; + } + +-void ++int + nv04_fbcon_imageblit(struct fb_info *info, const struct fb_image *image) + { + struct nouveau_fbdev *nfbdev = info->par; +@@ -101,23 +89,14 @@ + uint32_t dsize; + uint32_t width; + uint32_t *data = (uint32_t *)image->data; ++ int ret; + +- if (info->state != FBINFO_STATE_RUNNING) +- return; +- +- if (image->depth != 1) { +- cfb_imageblit(info, image); +- return; +- } +- +- if (!(info->flags & FBINFO_HWACCEL_DISABLED) && RING_SPACE(chan, 8)) { +- nouveau_fbcon_gpu_lockup(info); +- } ++ if (image->depth != 1) ++ return -ENODEV; + +- if (info->flags & FBINFO_HWACCEL_DISABLED) { +- cfb_imageblit(info, image); +- return; +- } ++ ret = RING_SPACE(chan, 8); ++ if (ret) ++ return ret; + + width = ALIGN(image->width, 8); + dsize = ALIGN(width * image->height, 32) >> 5; +@@ -144,11 +123,9 @@ + while (dsize) { + int iter_len = dsize > 128 ? 128 : dsize; + +- if (RING_SPACE(chan, iter_len + 1)) { +- nouveau_fbcon_gpu_lockup(info); +- cfb_imageblit(info, image); +- return; +- } ++ ret = RING_SPACE(chan, iter_len + 1); ++ if (ret) ++ return ret; + + BEGIN_RING(chan, NvSubGdiRect, 0x0c00, iter_len); + OUT_RINGp(chan, data, iter_len); +@@ -157,6 +134,7 @@ + } + + FIRE_RING(chan); ++ return 0; + } + + static int +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv04_fifo.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv04_fifo.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv04_fifo.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv04_fifo.c 2010-11-22 06:33:32.000000000 +0100 +@@ -28,6 +28,7 @@ + #include "drm.h" + #include "nouveau_drv.h" + #include "nouveau_ramht.h" ++#include "nouveau_util.h" + + #define NV04_RAMFC(c) (dev_priv->ramfc->pinst + ((c) * NV04_RAMFC__SIZE)) + #define NV04_RAMFC__SIZE 32 +@@ -151,10 +152,27 @@ + nv04_fifo_destroy_context(struct nouveau_channel *chan) + { + struct drm_device *dev = chan->dev; ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_fifo_engine *pfifo = &dev_priv->engine.fifo; ++ unsigned long flags; + +- nv_wr32(dev, NV04_PFIFO_MODE, +- nv_rd32(dev, NV04_PFIFO_MODE) & ~(1 << chan->id)); ++ spin_lock_irqsave(&dev_priv->context_switch_lock, flags); ++ pfifo->reassign(dev, false); ++ ++ /* Unload the context if it's the currently active one */ ++ if (pfifo->channel_id(dev) == chan->id) { ++ pfifo->disable(dev); ++ pfifo->unload_context(dev); ++ pfifo->enable(dev); ++ } + ++ /* Keep it from being rescheduled */ ++ nv_mask(dev, NV04_PFIFO_MODE, 1 << chan->id, 0); ++ ++ pfifo->reassign(dev, true); ++ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); ++ ++ /* Free the channel resources */ + nouveau_gpuobj_ref(NULL, &chan->ramfc); + } + +@@ -208,7 +226,7 @@ + if (chid < 0 || chid >= dev_priv->engine.fifo.channels) + return 0; + +- chan = dev_priv->fifos[chid]; ++ chan = dev_priv->channels.ptr[chid]; + if (!chan) { + NV_ERROR(dev, "Inactive channel on PFIFO: %d\n", chid); + return -EINVAL; +@@ -267,6 +285,7 @@ + static void + nv04_fifo_init_intr(struct drm_device *dev) + { ++ nouveau_irq_register(dev, 8, nv04_fifo_isr); + nv_wr32(dev, 0x002100, 0xffffffff); + nv_wr32(dev, 0x002140, 0xffffffff); + } +@@ -289,7 +308,7 @@ + pfifo->reassign(dev, true); + + for (i = 0; i < dev_priv->engine.fifo.channels; i++) { +- if (dev_priv->fifos[i]) { ++ if (dev_priv->channels.ptr[i]) { + uint32_t mode = nv_rd32(dev, NV04_PFIFO_MODE); + nv_wr32(dev, NV04_PFIFO_MODE, mode | (1 << i)); + } +@@ -298,3 +317,207 @@ + return 0; + } + ++void ++nv04_fifo_fini(struct drm_device *dev) ++{ ++ nv_wr32(dev, 0x2140, 0x00000000); ++ nouveau_irq_unregister(dev, 8); ++} ++ ++static bool ++nouveau_fifo_swmthd(struct drm_device *dev, u32 chid, u32 addr, u32 data) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_channel *chan = NULL; ++ struct nouveau_gpuobj *obj; ++ unsigned long flags; ++ const int subc = (addr >> 13) & 0x7; ++ const int mthd = addr & 0x1ffc; ++ bool handled = false; ++ u32 engine; ++ ++ spin_lock_irqsave(&dev_priv->channels.lock, flags); ++ if (likely(chid >= 0 && chid < dev_priv->engine.fifo.channels)) ++ chan = dev_priv->channels.ptr[chid]; ++ if (unlikely(!chan)) ++ goto out; ++ ++ switch (mthd) { ++ case 0x0000: /* bind object to subchannel */ ++ obj = nouveau_ramht_find(chan, data); ++ if (unlikely(!obj || obj->engine != NVOBJ_ENGINE_SW)) ++ break; ++ ++ chan->sw_subchannel[subc] = obj->class; ++ engine = 0x0000000f << (subc * 4); ++ ++ nv_mask(dev, NV04_PFIFO_CACHE1_ENGINE, engine, 0x00000000); ++ handled = true; ++ break; ++ default: ++ engine = nv_rd32(dev, NV04_PFIFO_CACHE1_ENGINE); ++ if (unlikely(((engine >> (subc * 4)) & 0xf) != 0)) ++ break; ++ ++ if (!nouveau_gpuobj_mthd_call(chan, chan->sw_subchannel[subc], ++ mthd, data)) ++ handled = true; ++ break; ++ } ++ ++out: ++ spin_unlock_irqrestore(&dev_priv->channels.lock, flags); ++ return handled; ++} ++ ++void ++nv04_fifo_isr(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_engine *engine = &dev_priv->engine; ++ uint32_t status, reassign; ++ int cnt = 0; ++ ++ reassign = nv_rd32(dev, NV03_PFIFO_CACHES) & 1; ++ while ((status = nv_rd32(dev, NV03_PFIFO_INTR_0)) && (cnt++ < 100)) { ++ uint32_t chid, get; ++ ++ nv_wr32(dev, NV03_PFIFO_CACHES, 0); ++ ++ chid = engine->fifo.channel_id(dev); ++ get = nv_rd32(dev, NV03_PFIFO_CACHE1_GET); ++ ++ if (status & NV_PFIFO_INTR_CACHE_ERROR) { ++ uint32_t mthd, data; ++ int ptr; ++ ++ /* NV_PFIFO_CACHE1_GET actually goes to 0xffc before ++ * wrapping on my G80 chips, but CACHE1 isn't big ++ * enough for this much data.. Tests show that it ++ * wraps around to the start at GET=0x800.. No clue ++ * as to why.. ++ */ ++ ptr = (get & 0x7ff) >> 2; ++ ++ if (dev_priv->card_type < NV_40) { ++ mthd = nv_rd32(dev, ++ NV04_PFIFO_CACHE1_METHOD(ptr)); ++ data = nv_rd32(dev, ++ NV04_PFIFO_CACHE1_DATA(ptr)); ++ } else { ++ mthd = nv_rd32(dev, ++ NV40_PFIFO_CACHE1_METHOD(ptr)); ++ data = nv_rd32(dev, ++ NV40_PFIFO_CACHE1_DATA(ptr)); ++ } ++ ++ if (!nouveau_fifo_swmthd(dev, chid, mthd, data)) { ++ NV_INFO(dev, "PFIFO_CACHE_ERROR - Ch %d/%d " ++ "Mthd 0x%04x Data 0x%08x\n", ++ chid, (mthd >> 13) & 7, mthd & 0x1ffc, ++ data); ++ } ++ ++ nv_wr32(dev, NV04_PFIFO_CACHE1_DMA_PUSH, 0); ++ nv_wr32(dev, NV03_PFIFO_INTR_0, ++ NV_PFIFO_INTR_CACHE_ERROR); ++ ++ nv_wr32(dev, NV03_PFIFO_CACHE1_PUSH0, ++ nv_rd32(dev, NV03_PFIFO_CACHE1_PUSH0) & ~1); ++ nv_wr32(dev, NV03_PFIFO_CACHE1_GET, get + 4); ++ nv_wr32(dev, NV03_PFIFO_CACHE1_PUSH0, ++ nv_rd32(dev, NV03_PFIFO_CACHE1_PUSH0) | 1); ++ nv_wr32(dev, NV04_PFIFO_CACHE1_HASH, 0); ++ ++ nv_wr32(dev, NV04_PFIFO_CACHE1_DMA_PUSH, ++ nv_rd32(dev, NV04_PFIFO_CACHE1_DMA_PUSH) | 1); ++ nv_wr32(dev, NV04_PFIFO_CACHE1_PULL0, 1); ++ ++ status &= ~NV_PFIFO_INTR_CACHE_ERROR; ++ } ++ ++ if (status & NV_PFIFO_INTR_DMA_PUSHER) { ++ u32 dma_get = nv_rd32(dev, 0x003244); ++ u32 dma_put = nv_rd32(dev, 0x003240); ++ u32 push = nv_rd32(dev, 0x003220); ++ u32 state = nv_rd32(dev, 0x003228); ++ ++ if (dev_priv->card_type == NV_50) { ++ u32 ho_get = nv_rd32(dev, 0x003328); ++ u32 ho_put = nv_rd32(dev, 0x003320); ++ u32 ib_get = nv_rd32(dev, 0x003334); ++ u32 ib_put = nv_rd32(dev, 0x003330); ++ ++ if (nouveau_ratelimit()) ++ NV_INFO(dev, "PFIFO_DMA_PUSHER - Ch %d Get 0x%02x%08x " ++ "Put 0x%02x%08x IbGet 0x%08x IbPut 0x%08x " ++ "State 0x%08x Push 0x%08x\n", ++ chid, ho_get, dma_get, ho_put, ++ dma_put, ib_get, ib_put, state, ++ push); ++ ++ /* METHOD_COUNT, in DMA_STATE on earlier chipsets */ ++ nv_wr32(dev, 0x003364, 0x00000000); ++ if (dma_get != dma_put || ho_get != ho_put) { ++ nv_wr32(dev, 0x003244, dma_put); ++ nv_wr32(dev, 0x003328, ho_put); ++ } else ++ if (ib_get != ib_put) { ++ nv_wr32(dev, 0x003334, ib_put); ++ } ++ } else { ++ NV_INFO(dev, "PFIFO_DMA_PUSHER - Ch %d Get 0x%08x " ++ "Put 0x%08x State 0x%08x Push 0x%08x\n", ++ chid, dma_get, dma_put, state, push); ++ ++ if (dma_get != dma_put) ++ nv_wr32(dev, 0x003244, dma_put); ++ } ++ ++ nv_wr32(dev, 0x003228, 0x00000000); ++ nv_wr32(dev, 0x003220, 0x00000001); ++ nv_wr32(dev, 0x002100, NV_PFIFO_INTR_DMA_PUSHER); ++ status &= ~NV_PFIFO_INTR_DMA_PUSHER; ++ } ++ ++ if (status & NV_PFIFO_INTR_SEMAPHORE) { ++ uint32_t sem; ++ ++ status &= ~NV_PFIFO_INTR_SEMAPHORE; ++ nv_wr32(dev, NV03_PFIFO_INTR_0, ++ NV_PFIFO_INTR_SEMAPHORE); ++ ++ sem = nv_rd32(dev, NV10_PFIFO_CACHE1_SEMAPHORE); ++ nv_wr32(dev, NV10_PFIFO_CACHE1_SEMAPHORE, sem | 0x1); ++ ++ nv_wr32(dev, NV03_PFIFO_CACHE1_GET, get + 4); ++ nv_wr32(dev, NV04_PFIFO_CACHE1_PULL0, 1); ++ } ++ ++ if (dev_priv->card_type == NV_50) { ++ if (status & 0x00000010) { ++ nv50_fb_vm_trap(dev, 1, "PFIFO_BAR_FAULT"); ++ status &= ~0x00000010; ++ nv_wr32(dev, 0x002100, 0x00000010); ++ } ++ } ++ ++ if (status) { ++ if (nouveau_ratelimit()) ++ NV_INFO(dev, "PFIFO_INTR 0x%08x - Ch %d\n", ++ status, chid); ++ nv_wr32(dev, NV03_PFIFO_INTR_0, status); ++ status = 0; ++ } ++ ++ nv_wr32(dev, NV03_PFIFO_CACHES, reassign); ++ } ++ ++ if (status) { ++ NV_INFO(dev, "PFIFO still angry after %d spins, halt\n", cnt); ++ nv_wr32(dev, 0x2140, 0); ++ nv_wr32(dev, 0x140, 0); ++ } ++ ++ nv_wr32(dev, NV03_PMC_INTR_0, NV_PMC_INTR_0_PFIFO_PENDING); ++} +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv04_graph.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv04_graph.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv04_graph.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv04_graph.c 2010-11-22 06:33:32.000000000 +0100 +@@ -26,6 +26,11 @@ + #include "drm.h" + #include "nouveau_drm.h" + #include "nouveau_drv.h" ++#include "nouveau_hw.h" ++#include "nouveau_util.h" ++ ++static int nv04_graph_register(struct drm_device *dev); ++static void nv04_graph_isr(struct drm_device *dev); + + static uint32_t nv04_graph_ctx_regs[] = { + 0x0040053c, +@@ -357,10 +362,10 @@ + if (chid >= dev_priv->engine.fifo.channels) + return NULL; + +- return dev_priv->fifos[chid]; ++ return dev_priv->channels.ptr[chid]; + } + +-void ++static void + nv04_graph_context_switch(struct drm_device *dev) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; +@@ -368,7 +373,6 @@ + struct nouveau_channel *chan = NULL; + int chid; + +- pgraph->fifo_access(dev, false); + nouveau_wait_for_idle(dev); + + /* If previous context is valid, we need to save it */ +@@ -376,11 +380,9 @@ + + /* Load context for next channel */ + chid = dev_priv->engine.fifo.channel_id(dev); +- chan = dev_priv->fifos[chid]; ++ chan = dev_priv->channels.ptr[chid]; + if (chan) + nv04_graph_load_context(chan); +- +- pgraph->fifo_access(dev, true); + } + + static uint32_t *ctx_reg(struct graph_state *ctx, uint32_t reg) +@@ -412,10 +414,25 @@ + + void nv04_graph_destroy_context(struct nouveau_channel *chan) + { ++ struct drm_device *dev = chan->dev; ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; + struct graph_state *pgraph_ctx = chan->pgraph_ctx; ++ unsigned long flags; ++ ++ spin_lock_irqsave(&dev_priv->context_switch_lock, flags); ++ pgraph->fifo_access(dev, false); ++ ++ /* Unload the context if it's the currently active one */ ++ if (pgraph->channel(dev) == chan) ++ pgraph->unload_context(dev); + ++ /* Free the context resources */ + kfree(pgraph_ctx); + chan->pgraph_ctx = NULL; ++ ++ pgraph->fifo_access(dev, true); ++ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); + } + + int nv04_graph_load_context(struct nouveau_channel *chan) +@@ -468,13 +485,19 @@ + { + struct drm_nouveau_private *dev_priv = dev->dev_private; + uint32_t tmp; ++ int ret; + + nv_wr32(dev, NV03_PMC_ENABLE, nv_rd32(dev, NV03_PMC_ENABLE) & + ~NV_PMC_ENABLE_PGRAPH); + nv_wr32(dev, NV03_PMC_ENABLE, nv_rd32(dev, NV03_PMC_ENABLE) | + NV_PMC_ENABLE_PGRAPH); + ++ ret = nv04_graph_register(dev); ++ if (ret) ++ return ret; ++ + /* Enable PGRAPH interrupts */ ++ nouveau_irq_register(dev, 12, nv04_graph_isr); + nv_wr32(dev, NV03_PGRAPH_INTR, 0xFFFFFFFF); + nv_wr32(dev, NV03_PGRAPH_INTR_EN, 0xFFFFFFFF); + +@@ -510,6 +533,8 @@ + + void nv04_graph_takedown(struct drm_device *dev) + { ++ nv_wr32(dev, NV03_PGRAPH_INTR_EN, 0x00000000); ++ nouveau_irq_unregister(dev, 12); + } + + void +@@ -524,13 +549,27 @@ + } + + static int +-nv04_graph_mthd_set_ref(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv04_graph_mthd_set_ref(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + atomic_set(&chan->fence.last_sequence_irq, data); + return 0; + } + ++int ++nv04_graph_mthd_page_flip(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) ++{ ++ struct drm_device *dev = chan->dev; ++ struct nouveau_page_flip_state s; ++ ++ if (!nouveau_finish_page_flip(chan, &s)) ++ nv_set_crtc_base(dev, s.crtc, ++ s.offset + s.y * s.pitch + s.x * s.bpp / 8); ++ ++ return 0; ++} ++ + /* + * Software methods, why they are needed, and how they all work: + * +@@ -606,12 +645,12 @@ + */ + + static void +-nv04_graph_set_ctx1(struct nouveau_channel *chan, uint32_t mask, uint32_t value) ++nv04_graph_set_ctx1(struct nouveau_channel *chan, u32 mask, u32 value) + { + struct drm_device *dev = chan->dev; +- uint32_t instance = (nv_rd32(dev, NV04_PGRAPH_CTX_SWITCH4) & 0xffff) << 4; ++ u32 instance = (nv_rd32(dev, NV04_PGRAPH_CTX_SWITCH4) & 0xffff) << 4; + int subc = (nv_rd32(dev, NV04_PGRAPH_TRAPPED_ADDR) >> 13) & 0x7; +- uint32_t tmp; ++ u32 tmp; + + tmp = nv_ri32(dev, instance); + tmp &= ~mask; +@@ -623,11 +662,11 @@ + } + + static void +-nv04_graph_set_ctx_val(struct nouveau_channel *chan, uint32_t mask, uint32_t value) ++nv04_graph_set_ctx_val(struct nouveau_channel *chan, u32 mask, u32 value) + { + struct drm_device *dev = chan->dev; +- uint32_t instance = (nv_rd32(dev, NV04_PGRAPH_CTX_SWITCH4) & 0xffff) << 4; +- uint32_t tmp, ctx1; ++ u32 instance = (nv_rd32(dev, NV04_PGRAPH_CTX_SWITCH4) & 0xffff) << 4; ++ u32 tmp, ctx1; + int class, op, valid = 1; + + ctx1 = nv_ri32(dev, instance); +@@ -672,13 +711,13 @@ + } + + static int +-nv04_graph_mthd_set_operation(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv04_graph_mthd_set_operation(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + if (data > 5) + return 1; + /* Old versions of the objects only accept first three operations. */ +- if (data > 2 && grclass < 0x40) ++ if (data > 2 && class < 0x40) + return 1; + nv04_graph_set_ctx1(chan, 0x00038000, data << 15); + /* changing operation changes set of objects needed for validation */ +@@ -687,8 +726,8 @@ + } + + static int +-nv04_graph_mthd_surf3d_clip_h(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv04_graph_mthd_surf3d_clip_h(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + uint32_t min = data & 0xffff, max; + uint32_t w = data >> 16; +@@ -706,8 +745,8 @@ + } + + static int +-nv04_graph_mthd_surf3d_clip_v(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv04_graph_mthd_surf3d_clip_v(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + uint32_t min = data & 0xffff, max; + uint32_t w = data >> 16; +@@ -725,8 +764,8 @@ + } + + static int +-nv04_graph_mthd_bind_surf2d(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv04_graph_mthd_bind_surf2d(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + switch (nv_ri32(chan->dev, data << 4) & 0xff) { + case 0x30: +@@ -742,8 +781,8 @@ + } + + static int +-nv04_graph_mthd_bind_surf2d_swzsurf(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv04_graph_mthd_bind_surf2d_swzsurf(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + switch (nv_ri32(chan->dev, data << 4) & 0xff) { + case 0x30: +@@ -763,8 +802,8 @@ + } + + static int +-nv04_graph_mthd_bind_nv01_patt(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv04_graph_mthd_bind_nv01_patt(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + switch (nv_ri32(chan->dev, data << 4) & 0xff) { + case 0x30: +@@ -778,8 +817,8 @@ + } + + static int +-nv04_graph_mthd_bind_nv04_patt(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv04_graph_mthd_bind_nv04_patt(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + switch (nv_ri32(chan->dev, data << 4) & 0xff) { + case 0x30: +@@ -793,8 +832,8 @@ + } + + static int +-nv04_graph_mthd_bind_rop(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv04_graph_mthd_bind_rop(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + switch (nv_ri32(chan->dev, data << 4) & 0xff) { + case 0x30: +@@ -808,8 +847,8 @@ + } + + static int +-nv04_graph_mthd_bind_beta1(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv04_graph_mthd_bind_beta1(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + switch (nv_ri32(chan->dev, data << 4) & 0xff) { + case 0x30: +@@ -823,8 +862,8 @@ + } + + static int +-nv04_graph_mthd_bind_beta4(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv04_graph_mthd_bind_beta4(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + switch (nv_ri32(chan->dev, data << 4) & 0xff) { + case 0x30: +@@ -838,8 +877,8 @@ + } + + static int +-nv04_graph_mthd_bind_surf_dst(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv04_graph_mthd_bind_surf_dst(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + switch (nv_ri32(chan->dev, data << 4) & 0xff) { + case 0x30: +@@ -853,8 +892,8 @@ + } + + static int +-nv04_graph_mthd_bind_surf_src(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv04_graph_mthd_bind_surf_src(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + switch (nv_ri32(chan->dev, data << 4) & 0xff) { + case 0x30: +@@ -868,8 +907,8 @@ + } + + static int +-nv04_graph_mthd_bind_surf_color(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv04_graph_mthd_bind_surf_color(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + switch (nv_ri32(chan->dev, data << 4) & 0xff) { + case 0x30: +@@ -883,8 +922,8 @@ + } + + static int +-nv04_graph_mthd_bind_surf_zeta(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv04_graph_mthd_bind_surf_zeta(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + switch (nv_ri32(chan->dev, data << 4) & 0xff) { + case 0x30: +@@ -898,8 +937,8 @@ + } + + static int +-nv04_graph_mthd_bind_clip(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv04_graph_mthd_bind_clip(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + switch (nv_ri32(chan->dev, data << 4) & 0xff) { + case 0x30: +@@ -913,8 +952,8 @@ + } + + static int +-nv04_graph_mthd_bind_chroma(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv04_graph_mthd_bind_chroma(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + switch (nv_ri32(chan->dev, data << 4) & 0xff) { + case 0x30: +@@ -930,194 +969,346 @@ + return 1; + } + +-static struct nouveau_pgraph_object_method nv04_graph_mthds_sw[] = { +- { 0x0150, nv04_graph_mthd_set_ref }, +- {} +-}; +- +-static struct nouveau_pgraph_object_method nv04_graph_mthds_nv03_gdirect[] = { +- { 0x0184, nv04_graph_mthd_bind_nv01_patt }, +- { 0x0188, nv04_graph_mthd_bind_rop }, +- { 0x018c, nv04_graph_mthd_bind_beta1 }, +- { 0x0190, nv04_graph_mthd_bind_surf_dst }, +- { 0x02fc, nv04_graph_mthd_set_operation }, +- {}, +-}; +- +-static struct nouveau_pgraph_object_method nv04_graph_mthds_nv04_gdirect[] = { +- { 0x0188, nv04_graph_mthd_bind_nv04_patt }, +- { 0x018c, nv04_graph_mthd_bind_rop }, +- { 0x0190, nv04_graph_mthd_bind_beta1 }, +- { 0x0194, nv04_graph_mthd_bind_beta4 }, +- { 0x0198, nv04_graph_mthd_bind_surf2d }, +- { 0x02fc, nv04_graph_mthd_set_operation }, +- {}, +-}; +- +-static struct nouveau_pgraph_object_method nv04_graph_mthds_nv01_imageblit[] = { +- { 0x0184, nv04_graph_mthd_bind_chroma }, +- { 0x0188, nv04_graph_mthd_bind_clip }, +- { 0x018c, nv04_graph_mthd_bind_nv01_patt }, +- { 0x0190, nv04_graph_mthd_bind_rop }, +- { 0x0194, nv04_graph_mthd_bind_beta1 }, +- { 0x0198, nv04_graph_mthd_bind_surf_dst }, +- { 0x019c, nv04_graph_mthd_bind_surf_src }, +- { 0x02fc, nv04_graph_mthd_set_operation }, +- {}, +-}; +- +-static struct nouveau_pgraph_object_method nv04_graph_mthds_nv04_imageblit_ifc[] = { +- { 0x0184, nv04_graph_mthd_bind_chroma }, +- { 0x0188, nv04_graph_mthd_bind_clip }, +- { 0x018c, nv04_graph_mthd_bind_nv04_patt }, +- { 0x0190, nv04_graph_mthd_bind_rop }, +- { 0x0194, nv04_graph_mthd_bind_beta1 }, +- { 0x0198, nv04_graph_mthd_bind_beta4 }, +- { 0x019c, nv04_graph_mthd_bind_surf2d }, +- { 0x02fc, nv04_graph_mthd_set_operation }, +- {}, +-}; +- +-static struct nouveau_pgraph_object_method nv04_graph_mthds_nv04_iifc[] = { +- { 0x0188, nv04_graph_mthd_bind_chroma }, +- { 0x018c, nv04_graph_mthd_bind_clip }, +- { 0x0190, nv04_graph_mthd_bind_nv04_patt }, +- { 0x0194, nv04_graph_mthd_bind_rop }, +- { 0x0198, nv04_graph_mthd_bind_beta1 }, +- { 0x019c, nv04_graph_mthd_bind_beta4 }, +- { 0x01a0, nv04_graph_mthd_bind_surf2d_swzsurf }, +- { 0x03e4, nv04_graph_mthd_set_operation }, +- {}, +-}; +- +-static struct nouveau_pgraph_object_method nv04_graph_mthds_nv01_ifc[] = { +- { 0x0184, nv04_graph_mthd_bind_chroma }, +- { 0x0188, nv04_graph_mthd_bind_clip }, +- { 0x018c, nv04_graph_mthd_bind_nv01_patt }, +- { 0x0190, nv04_graph_mthd_bind_rop }, +- { 0x0194, nv04_graph_mthd_bind_beta1 }, +- { 0x0198, nv04_graph_mthd_bind_surf_dst }, +- { 0x02fc, nv04_graph_mthd_set_operation }, +- {}, +-}; +- +-static struct nouveau_pgraph_object_method nv04_graph_mthds_nv03_sifc[] = { +- { 0x0184, nv04_graph_mthd_bind_chroma }, +- { 0x0188, nv04_graph_mthd_bind_nv01_patt }, +- { 0x018c, nv04_graph_mthd_bind_rop }, +- { 0x0190, nv04_graph_mthd_bind_beta1 }, +- { 0x0194, nv04_graph_mthd_bind_surf_dst }, +- { 0x02fc, nv04_graph_mthd_set_operation }, +- {}, +-}; ++static int ++nv04_graph_register(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; + +-static struct nouveau_pgraph_object_method nv04_graph_mthds_nv04_sifc[] = { +- { 0x0184, nv04_graph_mthd_bind_chroma }, +- { 0x0188, nv04_graph_mthd_bind_nv04_patt }, +- { 0x018c, nv04_graph_mthd_bind_rop }, +- { 0x0190, nv04_graph_mthd_bind_beta1 }, +- { 0x0194, nv04_graph_mthd_bind_beta4 }, +- { 0x0198, nv04_graph_mthd_bind_surf2d }, +- { 0x02fc, nv04_graph_mthd_set_operation }, +- {}, +-}; ++ if (dev_priv->engine.graph.registered) ++ return 0; + +-static struct nouveau_pgraph_object_method nv04_graph_mthds_nv03_sifm[] = { +- { 0x0188, nv04_graph_mthd_bind_nv01_patt }, +- { 0x018c, nv04_graph_mthd_bind_rop }, +- { 0x0190, nv04_graph_mthd_bind_beta1 }, +- { 0x0194, nv04_graph_mthd_bind_surf_dst }, +- { 0x0304, nv04_graph_mthd_set_operation }, +- {}, +-}; ++ /* dvd subpicture */ ++ NVOBJ_CLASS(dev, 0x0038, GR); + +-static struct nouveau_pgraph_object_method nv04_graph_mthds_nv04_sifm[] = { +- { 0x0188, nv04_graph_mthd_bind_nv04_patt }, +- { 0x018c, nv04_graph_mthd_bind_rop }, +- { 0x0190, nv04_graph_mthd_bind_beta1 }, +- { 0x0194, nv04_graph_mthd_bind_beta4 }, +- { 0x0198, nv04_graph_mthd_bind_surf2d_swzsurf }, +- { 0x0304, nv04_graph_mthd_set_operation }, +- {}, +-}; ++ /* m2mf */ ++ NVOBJ_CLASS(dev, 0x0039, GR); + +-static struct nouveau_pgraph_object_method nv04_graph_mthds_nv01_shape[] = { +- { 0x0184, nv04_graph_mthd_bind_clip }, +- { 0x0188, nv04_graph_mthd_bind_nv01_patt }, +- { 0x018c, nv04_graph_mthd_bind_rop }, +- { 0x0190, nv04_graph_mthd_bind_beta1 }, +- { 0x0194, nv04_graph_mthd_bind_surf_dst }, +- { 0x02fc, nv04_graph_mthd_set_operation }, +- {}, +-}; ++ /* nv03 gdirect */ ++ NVOBJ_CLASS(dev, 0x004b, GR); ++ NVOBJ_MTHD (dev, 0x004b, 0x0184, nv04_graph_mthd_bind_nv01_patt); ++ NVOBJ_MTHD (dev, 0x004b, 0x0188, nv04_graph_mthd_bind_rop); ++ NVOBJ_MTHD (dev, 0x004b, 0x018c, nv04_graph_mthd_bind_beta1); ++ NVOBJ_MTHD (dev, 0x004b, 0x0190, nv04_graph_mthd_bind_surf_dst); ++ NVOBJ_MTHD (dev, 0x004b, 0x02fc, nv04_graph_mthd_set_operation); ++ ++ /* nv04 gdirect */ ++ NVOBJ_CLASS(dev, 0x004a, GR); ++ NVOBJ_MTHD (dev, 0x004a, 0x0188, nv04_graph_mthd_bind_nv04_patt); ++ NVOBJ_MTHD (dev, 0x004a, 0x018c, nv04_graph_mthd_bind_rop); ++ NVOBJ_MTHD (dev, 0x004a, 0x0190, nv04_graph_mthd_bind_beta1); ++ NVOBJ_MTHD (dev, 0x004a, 0x0194, nv04_graph_mthd_bind_beta4); ++ NVOBJ_MTHD (dev, 0x004a, 0x0198, nv04_graph_mthd_bind_surf2d); ++ NVOBJ_MTHD (dev, 0x004a, 0x02fc, nv04_graph_mthd_set_operation); ++ ++ /* nv01 imageblit */ ++ NVOBJ_CLASS(dev, 0x001f, GR); ++ NVOBJ_MTHD (dev, 0x001f, 0x0184, nv04_graph_mthd_bind_chroma); ++ NVOBJ_MTHD (dev, 0x001f, 0x0188, nv04_graph_mthd_bind_clip); ++ NVOBJ_MTHD (dev, 0x001f, 0x018c, nv04_graph_mthd_bind_nv01_patt); ++ NVOBJ_MTHD (dev, 0x001f, 0x0190, nv04_graph_mthd_bind_rop); ++ NVOBJ_MTHD (dev, 0x001f, 0x0194, nv04_graph_mthd_bind_beta1); ++ NVOBJ_MTHD (dev, 0x001f, 0x0198, nv04_graph_mthd_bind_surf_dst); ++ NVOBJ_MTHD (dev, 0x001f, 0x019c, nv04_graph_mthd_bind_surf_src); ++ NVOBJ_MTHD (dev, 0x001f, 0x02fc, nv04_graph_mthd_set_operation); ++ ++ /* nv04 imageblit */ ++ NVOBJ_CLASS(dev, 0x005f, GR); ++ NVOBJ_MTHD (dev, 0x005f, 0x0184, nv04_graph_mthd_bind_chroma); ++ NVOBJ_MTHD (dev, 0x005f, 0x0188, nv04_graph_mthd_bind_clip); ++ NVOBJ_MTHD (dev, 0x005f, 0x018c, nv04_graph_mthd_bind_nv04_patt); ++ NVOBJ_MTHD (dev, 0x005f, 0x0190, nv04_graph_mthd_bind_rop); ++ NVOBJ_MTHD (dev, 0x005f, 0x0194, nv04_graph_mthd_bind_beta1); ++ NVOBJ_MTHD (dev, 0x005f, 0x0198, nv04_graph_mthd_bind_beta4); ++ NVOBJ_MTHD (dev, 0x005f, 0x019c, nv04_graph_mthd_bind_surf2d); ++ NVOBJ_MTHD (dev, 0x005f, 0x02fc, nv04_graph_mthd_set_operation); ++ ++ /* nv04 iifc */ ++ NVOBJ_CLASS(dev, 0x0060, GR); ++ NVOBJ_MTHD (dev, 0x0060, 0x0188, nv04_graph_mthd_bind_chroma); ++ NVOBJ_MTHD (dev, 0x0060, 0x018c, nv04_graph_mthd_bind_clip); ++ NVOBJ_MTHD (dev, 0x0060, 0x0190, nv04_graph_mthd_bind_nv04_patt); ++ NVOBJ_MTHD (dev, 0x0060, 0x0194, nv04_graph_mthd_bind_rop); ++ NVOBJ_MTHD (dev, 0x0060, 0x0198, nv04_graph_mthd_bind_beta1); ++ NVOBJ_MTHD (dev, 0x0060, 0x019c, nv04_graph_mthd_bind_beta4); ++ NVOBJ_MTHD (dev, 0x0060, 0x01a0, nv04_graph_mthd_bind_surf2d_swzsurf); ++ NVOBJ_MTHD (dev, 0x0060, 0x03e4, nv04_graph_mthd_set_operation); ++ ++ /* nv05 iifc */ ++ NVOBJ_CLASS(dev, 0x0064, GR); ++ ++ /* nv01 ifc */ ++ NVOBJ_CLASS(dev, 0x0021, GR); ++ NVOBJ_MTHD (dev, 0x0021, 0x0184, nv04_graph_mthd_bind_chroma); ++ NVOBJ_MTHD (dev, 0x0021, 0x0188, nv04_graph_mthd_bind_clip); ++ NVOBJ_MTHD (dev, 0x0021, 0x018c, nv04_graph_mthd_bind_nv01_patt); ++ NVOBJ_MTHD (dev, 0x0021, 0x0190, nv04_graph_mthd_bind_rop); ++ NVOBJ_MTHD (dev, 0x0021, 0x0194, nv04_graph_mthd_bind_beta1); ++ NVOBJ_MTHD (dev, 0x0021, 0x0198, nv04_graph_mthd_bind_surf_dst); ++ NVOBJ_MTHD (dev, 0x0021, 0x02fc, nv04_graph_mthd_set_operation); ++ ++ /* nv04 ifc */ ++ NVOBJ_CLASS(dev, 0x0061, GR); ++ NVOBJ_MTHD (dev, 0x0061, 0x0184, nv04_graph_mthd_bind_chroma); ++ NVOBJ_MTHD (dev, 0x0061, 0x0188, nv04_graph_mthd_bind_clip); ++ NVOBJ_MTHD (dev, 0x0061, 0x018c, nv04_graph_mthd_bind_nv04_patt); ++ NVOBJ_MTHD (dev, 0x0061, 0x0190, nv04_graph_mthd_bind_rop); ++ NVOBJ_MTHD (dev, 0x0061, 0x0194, nv04_graph_mthd_bind_beta1); ++ NVOBJ_MTHD (dev, 0x0061, 0x0198, nv04_graph_mthd_bind_beta4); ++ NVOBJ_MTHD (dev, 0x0061, 0x019c, nv04_graph_mthd_bind_surf2d); ++ NVOBJ_MTHD (dev, 0x0061, 0x02fc, nv04_graph_mthd_set_operation); ++ ++ /* nv05 ifc */ ++ NVOBJ_CLASS(dev, 0x0065, GR); ++ ++ /* nv03 sifc */ ++ NVOBJ_CLASS(dev, 0x0036, GR); ++ NVOBJ_MTHD (dev, 0x0036, 0x0184, nv04_graph_mthd_bind_chroma); ++ NVOBJ_MTHD (dev, 0x0036, 0x0188, nv04_graph_mthd_bind_nv01_patt); ++ NVOBJ_MTHD (dev, 0x0036, 0x018c, nv04_graph_mthd_bind_rop); ++ NVOBJ_MTHD (dev, 0x0036, 0x0190, nv04_graph_mthd_bind_beta1); ++ NVOBJ_MTHD (dev, 0x0036, 0x0194, nv04_graph_mthd_bind_surf_dst); ++ NVOBJ_MTHD (dev, 0x0036, 0x02fc, nv04_graph_mthd_set_operation); ++ ++ /* nv04 sifc */ ++ NVOBJ_CLASS(dev, 0x0076, GR); ++ NVOBJ_MTHD (dev, 0x0076, 0x0184, nv04_graph_mthd_bind_chroma); ++ NVOBJ_MTHD (dev, 0x0076, 0x0188, nv04_graph_mthd_bind_nv04_patt); ++ NVOBJ_MTHD (dev, 0x0076, 0x018c, nv04_graph_mthd_bind_rop); ++ NVOBJ_MTHD (dev, 0x0076, 0x0190, nv04_graph_mthd_bind_beta1); ++ NVOBJ_MTHD (dev, 0x0076, 0x0194, nv04_graph_mthd_bind_beta4); ++ NVOBJ_MTHD (dev, 0x0076, 0x0198, nv04_graph_mthd_bind_surf2d); ++ NVOBJ_MTHD (dev, 0x0076, 0x02fc, nv04_graph_mthd_set_operation); ++ ++ /* nv05 sifc */ ++ NVOBJ_CLASS(dev, 0x0066, GR); ++ ++ /* nv03 sifm */ ++ NVOBJ_CLASS(dev, 0x0037, GR); ++ NVOBJ_MTHD (dev, 0x0037, 0x0188, nv04_graph_mthd_bind_nv01_patt); ++ NVOBJ_MTHD (dev, 0x0037, 0x018c, nv04_graph_mthd_bind_rop); ++ NVOBJ_MTHD (dev, 0x0037, 0x0190, nv04_graph_mthd_bind_beta1); ++ NVOBJ_MTHD (dev, 0x0037, 0x0194, nv04_graph_mthd_bind_surf_dst); ++ NVOBJ_MTHD (dev, 0x0037, 0x0304, nv04_graph_mthd_set_operation); ++ ++ /* nv04 sifm */ ++ NVOBJ_CLASS(dev, 0x0077, GR); ++ NVOBJ_MTHD (dev, 0x0077, 0x0188, nv04_graph_mthd_bind_nv04_patt); ++ NVOBJ_MTHD (dev, 0x0077, 0x018c, nv04_graph_mthd_bind_rop); ++ NVOBJ_MTHD (dev, 0x0077, 0x0190, nv04_graph_mthd_bind_beta1); ++ NVOBJ_MTHD (dev, 0x0077, 0x0194, nv04_graph_mthd_bind_beta4); ++ NVOBJ_MTHD (dev, 0x0077, 0x0198, nv04_graph_mthd_bind_surf2d_swzsurf); ++ NVOBJ_MTHD (dev, 0x0077, 0x0304, nv04_graph_mthd_set_operation); ++ ++ /* null */ ++ NVOBJ_CLASS(dev, 0x0030, GR); ++ ++ /* surf2d */ ++ NVOBJ_CLASS(dev, 0x0042, GR); ++ ++ /* rop */ ++ NVOBJ_CLASS(dev, 0x0043, GR); ++ ++ /* beta1 */ ++ NVOBJ_CLASS(dev, 0x0012, GR); ++ ++ /* beta4 */ ++ NVOBJ_CLASS(dev, 0x0072, GR); ++ ++ /* cliprect */ ++ NVOBJ_CLASS(dev, 0x0019, GR); ++ ++ /* nv01 pattern */ ++ NVOBJ_CLASS(dev, 0x0018, GR); ++ ++ /* nv04 pattern */ ++ NVOBJ_CLASS(dev, 0x0044, GR); ++ ++ /* swzsurf */ ++ NVOBJ_CLASS(dev, 0x0052, GR); ++ ++ /* surf3d */ ++ NVOBJ_CLASS(dev, 0x0053, GR); ++ NVOBJ_MTHD (dev, 0x0053, 0x02f8, nv04_graph_mthd_surf3d_clip_h); ++ NVOBJ_MTHD (dev, 0x0053, 0x02fc, nv04_graph_mthd_surf3d_clip_v); ++ ++ /* nv03 tex_tri */ ++ NVOBJ_CLASS(dev, 0x0048, GR); ++ NVOBJ_MTHD (dev, 0x0048, 0x0188, nv04_graph_mthd_bind_clip); ++ NVOBJ_MTHD (dev, 0x0048, 0x018c, nv04_graph_mthd_bind_surf_color); ++ NVOBJ_MTHD (dev, 0x0048, 0x0190, nv04_graph_mthd_bind_surf_zeta); ++ ++ /* tex_tri */ ++ NVOBJ_CLASS(dev, 0x0054, GR); ++ ++ /* multitex_tri */ ++ NVOBJ_CLASS(dev, 0x0055, GR); ++ ++ /* nv01 chroma */ ++ NVOBJ_CLASS(dev, 0x0017, GR); ++ ++ /* nv04 chroma */ ++ NVOBJ_CLASS(dev, 0x0057, GR); ++ ++ /* surf_dst */ ++ NVOBJ_CLASS(dev, 0x0058, GR); ++ ++ /* surf_src */ ++ NVOBJ_CLASS(dev, 0x0059, GR); ++ ++ /* surf_color */ ++ NVOBJ_CLASS(dev, 0x005a, GR); ++ ++ /* surf_zeta */ ++ NVOBJ_CLASS(dev, 0x005b, GR); ++ ++ /* nv01 line */ ++ NVOBJ_CLASS(dev, 0x001c, GR); ++ NVOBJ_MTHD (dev, 0x001c, 0x0184, nv04_graph_mthd_bind_clip); ++ NVOBJ_MTHD (dev, 0x001c, 0x0188, nv04_graph_mthd_bind_nv01_patt); ++ NVOBJ_MTHD (dev, 0x001c, 0x018c, nv04_graph_mthd_bind_rop); ++ NVOBJ_MTHD (dev, 0x001c, 0x0190, nv04_graph_mthd_bind_beta1); ++ NVOBJ_MTHD (dev, 0x001c, 0x0194, nv04_graph_mthd_bind_surf_dst); ++ NVOBJ_MTHD (dev, 0x001c, 0x02fc, nv04_graph_mthd_set_operation); ++ ++ /* nv04 line */ ++ NVOBJ_CLASS(dev, 0x005c, GR); ++ NVOBJ_MTHD (dev, 0x005c, 0x0184, nv04_graph_mthd_bind_clip); ++ NVOBJ_MTHD (dev, 0x005c, 0x0188, nv04_graph_mthd_bind_nv04_patt); ++ NVOBJ_MTHD (dev, 0x005c, 0x018c, nv04_graph_mthd_bind_rop); ++ NVOBJ_MTHD (dev, 0x005c, 0x0190, nv04_graph_mthd_bind_beta1); ++ NVOBJ_MTHD (dev, 0x005c, 0x0194, nv04_graph_mthd_bind_beta4); ++ NVOBJ_MTHD (dev, 0x005c, 0x0198, nv04_graph_mthd_bind_surf2d); ++ NVOBJ_MTHD (dev, 0x005c, 0x02fc, nv04_graph_mthd_set_operation); ++ ++ /* nv01 tri */ ++ NVOBJ_CLASS(dev, 0x001d, GR); ++ NVOBJ_MTHD (dev, 0x001d, 0x0184, nv04_graph_mthd_bind_clip); ++ NVOBJ_MTHD (dev, 0x001d, 0x0188, nv04_graph_mthd_bind_nv01_patt); ++ NVOBJ_MTHD (dev, 0x001d, 0x018c, nv04_graph_mthd_bind_rop); ++ NVOBJ_MTHD (dev, 0x001d, 0x0190, nv04_graph_mthd_bind_beta1); ++ NVOBJ_MTHD (dev, 0x001d, 0x0194, nv04_graph_mthd_bind_surf_dst); ++ NVOBJ_MTHD (dev, 0x001d, 0x02fc, nv04_graph_mthd_set_operation); ++ ++ /* nv04 tri */ ++ NVOBJ_CLASS(dev, 0x005d, GR); ++ NVOBJ_MTHD (dev, 0x005d, 0x0184, nv04_graph_mthd_bind_clip); ++ NVOBJ_MTHD (dev, 0x005d, 0x0188, nv04_graph_mthd_bind_nv04_patt); ++ NVOBJ_MTHD (dev, 0x005d, 0x018c, nv04_graph_mthd_bind_rop); ++ NVOBJ_MTHD (dev, 0x005d, 0x0190, nv04_graph_mthd_bind_beta1); ++ NVOBJ_MTHD (dev, 0x005d, 0x0194, nv04_graph_mthd_bind_beta4); ++ NVOBJ_MTHD (dev, 0x005d, 0x0198, nv04_graph_mthd_bind_surf2d); ++ NVOBJ_MTHD (dev, 0x005d, 0x02fc, nv04_graph_mthd_set_operation); ++ ++ /* nv01 rect */ ++ NVOBJ_CLASS(dev, 0x001e, GR); ++ NVOBJ_MTHD (dev, 0x001e, 0x0184, nv04_graph_mthd_bind_clip); ++ NVOBJ_MTHD (dev, 0x001e, 0x0188, nv04_graph_mthd_bind_nv01_patt); ++ NVOBJ_MTHD (dev, 0x001e, 0x018c, nv04_graph_mthd_bind_rop); ++ NVOBJ_MTHD (dev, 0x001e, 0x0190, nv04_graph_mthd_bind_beta1); ++ NVOBJ_MTHD (dev, 0x001e, 0x0194, nv04_graph_mthd_bind_surf_dst); ++ NVOBJ_MTHD (dev, 0x001e, 0x02fc, nv04_graph_mthd_set_operation); ++ ++ /* nv04 rect */ ++ NVOBJ_CLASS(dev, 0x005e, GR); ++ NVOBJ_MTHD (dev, 0x005e, 0x0184, nv04_graph_mthd_bind_clip); ++ NVOBJ_MTHD (dev, 0x005e, 0x0188, nv04_graph_mthd_bind_nv04_patt); ++ NVOBJ_MTHD (dev, 0x005e, 0x018c, nv04_graph_mthd_bind_rop); ++ NVOBJ_MTHD (dev, 0x005e, 0x0190, nv04_graph_mthd_bind_beta1); ++ NVOBJ_MTHD (dev, 0x005e, 0x0194, nv04_graph_mthd_bind_beta4); ++ NVOBJ_MTHD (dev, 0x005e, 0x0198, nv04_graph_mthd_bind_surf2d); ++ NVOBJ_MTHD (dev, 0x005e, 0x02fc, nv04_graph_mthd_set_operation); ++ ++ /* nvsw */ ++ NVOBJ_CLASS(dev, 0x506e, SW); ++ NVOBJ_MTHD (dev, 0x506e, 0x0150, nv04_graph_mthd_set_ref); ++ NVOBJ_MTHD (dev, 0x506e, 0x0500, nv04_graph_mthd_page_flip); + +-static struct nouveau_pgraph_object_method nv04_graph_mthds_nv04_shape[] = { +- { 0x0184, nv04_graph_mthd_bind_clip }, +- { 0x0188, nv04_graph_mthd_bind_nv04_patt }, +- { 0x018c, nv04_graph_mthd_bind_rop }, +- { 0x0190, nv04_graph_mthd_bind_beta1 }, +- { 0x0194, nv04_graph_mthd_bind_beta4 }, +- { 0x0198, nv04_graph_mthd_bind_surf2d }, +- { 0x02fc, nv04_graph_mthd_set_operation }, +- {}, ++ dev_priv->engine.graph.registered = true; ++ return 0; + }; + +-static struct nouveau_pgraph_object_method nv04_graph_mthds_nv03_tex_tri[] = { +- { 0x0188, nv04_graph_mthd_bind_clip }, +- { 0x018c, nv04_graph_mthd_bind_surf_color }, +- { 0x0190, nv04_graph_mthd_bind_surf_zeta }, +- {}, ++static struct nouveau_bitfield nv04_graph_intr[] = { ++ { NV_PGRAPH_INTR_NOTIFY, "NOTIFY" }, ++ {} + }; + +-static struct nouveau_pgraph_object_method nv04_graph_mthds_surf3d[] = { +- { 0x02f8, nv04_graph_mthd_surf3d_clip_h }, +- { 0x02fc, nv04_graph_mthd_surf3d_clip_v }, +- {}, ++static struct nouveau_bitfield nv04_graph_nstatus[] = ++{ ++ { NV04_PGRAPH_NSTATUS_STATE_IN_USE, "STATE_IN_USE" }, ++ { NV04_PGRAPH_NSTATUS_INVALID_STATE, "INVALID_STATE" }, ++ { NV04_PGRAPH_NSTATUS_BAD_ARGUMENT, "BAD_ARGUMENT" }, ++ { NV04_PGRAPH_NSTATUS_PROTECTION_FAULT, "PROTECTION_FAULT" }, ++ {} + }; + +-struct nouveau_pgraph_object_class nv04_graph_grclass[] = { +- { 0x0038, false, NULL }, /* dvd subpicture */ +- { 0x0039, false, NULL }, /* m2mf */ +- { 0x004b, false, nv04_graph_mthds_nv03_gdirect }, /* nv03 gdirect */ +- { 0x004a, false, nv04_graph_mthds_nv04_gdirect }, /* nv04 gdirect */ +- { 0x001f, false, nv04_graph_mthds_nv01_imageblit }, /* nv01 imageblit */ +- { 0x005f, false, nv04_graph_mthds_nv04_imageblit_ifc }, /* nv04 imageblit */ +- { 0x0060, false, nv04_graph_mthds_nv04_iifc }, /* nv04 iifc */ +- { 0x0064, false, NULL }, /* nv05 iifc */ +- { 0x0021, false, nv04_graph_mthds_nv01_ifc }, /* nv01 ifc */ +- { 0x0061, false, nv04_graph_mthds_nv04_imageblit_ifc }, /* nv04 ifc */ +- { 0x0065, false, NULL }, /* nv05 ifc */ +- { 0x0036, false, nv04_graph_mthds_nv03_sifc }, /* nv03 sifc */ +- { 0x0076, false, nv04_graph_mthds_nv04_sifc }, /* nv04 sifc */ +- { 0x0066, false, NULL }, /* nv05 sifc */ +- { 0x0037, false, nv04_graph_mthds_nv03_sifm }, /* nv03 sifm */ +- { 0x0077, false, nv04_graph_mthds_nv04_sifm }, /* nv04 sifm */ +- { 0x0030, false, NULL }, /* null */ +- { 0x0042, false, NULL }, /* surf2d */ +- { 0x0043, false, NULL }, /* rop */ +- { 0x0012, false, NULL }, /* beta1 */ +- { 0x0072, false, NULL }, /* beta4 */ +- { 0x0019, false, NULL }, /* cliprect */ +- { 0x0018, false, NULL }, /* nv01 pattern */ +- { 0x0044, false, NULL }, /* nv04 pattern */ +- { 0x0052, false, NULL }, /* swzsurf */ +- { 0x0053, false, nv04_graph_mthds_surf3d }, /* surf3d */ +- { 0x0048, false, nv04_graph_mthds_nv03_tex_tri }, /* nv03 tex_tri */ +- { 0x0054, false, NULL }, /* tex_tri */ +- { 0x0055, false, NULL }, /* multitex_tri */ +- { 0x0017, false, NULL }, /* nv01 chroma */ +- { 0x0057, false, NULL }, /* nv04 chroma */ +- { 0x0058, false, NULL }, /* surf_dst */ +- { 0x0059, false, NULL }, /* surf_src */ +- { 0x005a, false, NULL }, /* surf_color */ +- { 0x005b, false, NULL }, /* surf_zeta */ +- { 0x001c, false, nv04_graph_mthds_nv01_shape }, /* nv01 line */ +- { 0x005c, false, nv04_graph_mthds_nv04_shape }, /* nv04 line */ +- { 0x001d, false, nv04_graph_mthds_nv01_shape }, /* nv01 tri */ +- { 0x005d, false, nv04_graph_mthds_nv04_shape }, /* nv04 tri */ +- { 0x001e, false, nv04_graph_mthds_nv01_shape }, /* nv01 rect */ +- { 0x005e, false, nv04_graph_mthds_nv04_shape }, /* nv04 rect */ +- { 0x506e, true, nv04_graph_mthds_sw }, ++struct nouveau_bitfield nv04_graph_nsource[] = ++{ ++ { NV03_PGRAPH_NSOURCE_NOTIFICATION, "NOTIFICATION" }, ++ { NV03_PGRAPH_NSOURCE_DATA_ERROR, "DATA_ERROR" }, ++ { NV03_PGRAPH_NSOURCE_PROTECTION_ERROR, "PROTECTION_ERROR" }, ++ { NV03_PGRAPH_NSOURCE_RANGE_EXCEPTION, "RANGE_EXCEPTION" }, ++ { NV03_PGRAPH_NSOURCE_LIMIT_COLOR, "LIMIT_COLOR" }, ++ { NV03_PGRAPH_NSOURCE_LIMIT_ZETA, "LIMIT_ZETA" }, ++ { NV03_PGRAPH_NSOURCE_ILLEGAL_MTHD, "ILLEGAL_MTHD" }, ++ { NV03_PGRAPH_NSOURCE_DMA_R_PROTECTION, "DMA_R_PROTECTION" }, ++ { NV03_PGRAPH_NSOURCE_DMA_W_PROTECTION, "DMA_W_PROTECTION" }, ++ { NV03_PGRAPH_NSOURCE_FORMAT_EXCEPTION, "FORMAT_EXCEPTION" }, ++ { NV03_PGRAPH_NSOURCE_PATCH_EXCEPTION, "PATCH_EXCEPTION" }, ++ { NV03_PGRAPH_NSOURCE_STATE_INVALID, "STATE_INVALID" }, ++ { NV03_PGRAPH_NSOURCE_DOUBLE_NOTIFY, "DOUBLE_NOTIFY" }, ++ { NV03_PGRAPH_NSOURCE_NOTIFY_IN_USE, "NOTIFY_IN_USE" }, ++ { NV03_PGRAPH_NSOURCE_METHOD_CNT, "METHOD_CNT" }, ++ { NV03_PGRAPH_NSOURCE_BFR_NOTIFICATION, "BFR_NOTIFICATION" }, ++ { NV03_PGRAPH_NSOURCE_DMA_VTX_PROTECTION, "DMA_VTX_PROTECTION" }, ++ { NV03_PGRAPH_NSOURCE_DMA_WIDTH_A, "DMA_WIDTH_A" }, ++ { NV03_PGRAPH_NSOURCE_DMA_WIDTH_B, "DMA_WIDTH_B" }, + {} + }; + ++static void ++nv04_graph_isr(struct drm_device *dev) ++{ ++ u32 stat; ++ ++ while ((stat = nv_rd32(dev, NV03_PGRAPH_INTR))) { ++ u32 nsource = nv_rd32(dev, NV03_PGRAPH_NSOURCE); ++ u32 nstatus = nv_rd32(dev, NV03_PGRAPH_NSTATUS); ++ u32 addr = nv_rd32(dev, NV04_PGRAPH_TRAPPED_ADDR); ++ u32 chid = (addr & 0x0f000000) >> 24; ++ u32 subc = (addr & 0x0000e000) >> 13; ++ u32 mthd = (addr & 0x00001ffc); ++ u32 data = nv_rd32(dev, NV04_PGRAPH_TRAPPED_DATA); ++ u32 class = nv_rd32(dev, 0x400180 + subc * 4) & 0xff; ++ u32 show = stat; ++ ++ if (stat & NV_PGRAPH_INTR_NOTIFY) { ++ if (nsource & NV03_PGRAPH_NSOURCE_ILLEGAL_MTHD) { ++ if (!nouveau_gpuobj_mthd_call2(dev, chid, class, mthd, data)) ++ show &= ~NV_PGRAPH_INTR_NOTIFY; ++ } ++ } ++ ++ if (stat & NV_PGRAPH_INTR_CONTEXT_SWITCH) { ++ nv_wr32(dev, NV03_PGRAPH_INTR, NV_PGRAPH_INTR_CONTEXT_SWITCH); ++ stat &= ~NV_PGRAPH_INTR_CONTEXT_SWITCH; ++ show &= ~NV_PGRAPH_INTR_CONTEXT_SWITCH; ++ nv04_graph_context_switch(dev); ++ } ++ ++ nv_wr32(dev, NV03_PGRAPH_INTR, stat); ++ nv_wr32(dev, NV04_PGRAPH_FIFO, 0x00000001); ++ ++ if (show && nouveau_ratelimit()) { ++ NV_INFO(dev, "PGRAPH -"); ++ nouveau_bitfield_print(nv04_graph_intr, show); ++ printk(" nsource:"); ++ nouveau_bitfield_print(nv04_graph_nsource, nsource); ++ printk(" nstatus:"); ++ nouveau_bitfield_print(nv04_graph_nstatus, nstatus); ++ printk("\n"); ++ NV_INFO(dev, "PGRAPH - ch %d/%d class 0x%04x " ++ "mthd 0x%04x data 0x%08x\n", ++ chid, subc, class, mthd, data); ++ } ++ } ++} +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv04_instmem.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv04_instmem.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv04_instmem.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv04_instmem.c 2010-11-22 06:33:32.000000000 +0100 +@@ -98,42 +98,66 @@ + } + + int +-nv04_instmem_populate(struct drm_device *dev, struct nouveau_gpuobj *gpuobj, +- uint32_t *sz) ++nv04_instmem_suspend(struct drm_device *dev) + { + return 0; + } + + void +-nv04_instmem_clear(struct drm_device *dev, struct nouveau_gpuobj *gpuobj) ++nv04_instmem_resume(struct drm_device *dev) + { + } + + int +-nv04_instmem_bind(struct drm_device *dev, struct nouveau_gpuobj *gpuobj) ++nv04_instmem_get(struct nouveau_gpuobj *gpuobj, u32 size, u32 align) + { +- return 0; +-} ++ struct drm_nouveau_private *dev_priv = gpuobj->dev->dev_private; ++ struct drm_mm_node *ramin = NULL; + +-int +-nv04_instmem_unbind(struct drm_device *dev, struct nouveau_gpuobj *gpuobj) +-{ ++ do { ++ if (drm_mm_pre_get(&dev_priv->ramin_heap)) ++ return -ENOMEM; ++ ++ spin_lock(&dev_priv->ramin_lock); ++ ramin = drm_mm_search_free(&dev_priv->ramin_heap, size, align, 0); ++ if (ramin == NULL) { ++ spin_unlock(&dev_priv->ramin_lock); ++ return -ENOMEM; ++ } ++ ++ ramin = drm_mm_get_block_atomic(ramin, size, align); ++ spin_unlock(&dev_priv->ramin_lock); ++ } while (ramin == NULL); ++ ++ gpuobj->node = ramin; ++ gpuobj->vinst = ramin->start; + return 0; + } + + void +-nv04_instmem_flush(struct drm_device *dev) ++nv04_instmem_put(struct nouveau_gpuobj *gpuobj) + { ++ struct drm_nouveau_private *dev_priv = gpuobj->dev->dev_private; ++ ++ spin_lock(&dev_priv->ramin_lock); ++ drm_mm_put_block(gpuobj->node); ++ gpuobj->node = NULL; ++ spin_unlock(&dev_priv->ramin_lock); + } + + int +-nv04_instmem_suspend(struct drm_device *dev) ++nv04_instmem_map(struct nouveau_gpuobj *gpuobj) + { ++ gpuobj->pinst = gpuobj->vinst; + return 0; + } + + void +-nv04_instmem_resume(struct drm_device *dev) ++nv04_instmem_unmap(struct nouveau_gpuobj *gpuobj) + { + } + ++void ++nv04_instmem_flush(struct drm_device *dev) ++{ ++} +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv10_fb.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv10_fb.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv10_fb.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv10_fb.c 2010-11-22 06:33:32.000000000 +0100 +@@ -3,23 +3,109 @@ + #include "nouveau_drv.h" + #include "nouveau_drm.h" + ++static struct drm_mm_node * ++nv20_fb_alloc_tag(struct drm_device *dev, uint32_t size) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_fb_engine *pfb = &dev_priv->engine.fb; ++ struct drm_mm_node *mem; ++ int ret; ++ ++ ret = drm_mm_pre_get(&pfb->tag_heap); ++ if (ret) ++ return NULL; ++ ++ spin_lock(&dev_priv->tile.lock); ++ mem = drm_mm_search_free(&pfb->tag_heap, size, 0, 0); ++ if (mem) ++ mem = drm_mm_get_block_atomic(mem, size, 0); ++ spin_unlock(&dev_priv->tile.lock); ++ ++ return mem; ++} ++ ++static void ++nv20_fb_free_tag(struct drm_device *dev, struct drm_mm_node *mem) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ ++ spin_lock(&dev_priv->tile.lock); ++ drm_mm_put_block(mem); ++ spin_unlock(&dev_priv->tile.lock); ++} ++ ++void ++nv10_fb_init_tile_region(struct drm_device *dev, int i, uint32_t addr, ++ uint32_t size, uint32_t pitch, uint32_t flags) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; ++ int bpp = (flags & NOUVEAU_GEM_TILE_32BPP ? 32 : 16); ++ ++ tile->addr = addr; ++ tile->limit = max(1u, addr + size) - 1; ++ tile->pitch = pitch; ++ ++ if (dev_priv->card_type == NV_20) { ++ if (flags & NOUVEAU_GEM_TILE_ZETA) { ++ /* ++ * Allocate some of the on-die tag memory, ++ * used to store Z compression meta-data (most ++ * likely just a bitmap determining if a given ++ * tile is compressed or not). ++ */ ++ tile->tag_mem = nv20_fb_alloc_tag(dev, size / 256); ++ ++ if (tile->tag_mem) { ++ /* Enable Z compression */ ++ if (dev_priv->chipset >= 0x25) ++ tile->zcomp = tile->tag_mem->start | ++ (bpp == 16 ? ++ NV25_PFB_ZCOMP_MODE_16 : ++ NV25_PFB_ZCOMP_MODE_32); ++ else ++ tile->zcomp = tile->tag_mem->start | ++ NV20_PFB_ZCOMP_EN | ++ (bpp == 16 ? 0 : ++ NV20_PFB_ZCOMP_MODE_32); ++ } ++ ++ tile->addr |= 3; ++ } else { ++ tile->addr |= 1; ++ } ++ ++ } else { ++ tile->addr |= 1 << 31; ++ } ++} ++ + void +-nv10_fb_set_region_tiling(struct drm_device *dev, int i, uint32_t addr, +- uint32_t size, uint32_t pitch) ++nv10_fb_free_tile_region(struct drm_device *dev, int i) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; +- uint32_t limit = max(1u, addr + size) - 1; ++ struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; + +- if (pitch) { +- if (dev_priv->card_type >= NV_20) +- addr |= 1; +- else +- addr |= 1 << 31; ++ if (tile->tag_mem) { ++ nv20_fb_free_tag(dev, tile->tag_mem); ++ tile->tag_mem = NULL; + } + +- nv_wr32(dev, NV10_PFB_TLIMIT(i), limit); +- nv_wr32(dev, NV10_PFB_TSIZE(i), pitch); +- nv_wr32(dev, NV10_PFB_TILE(i), addr); ++ tile->addr = tile->limit = tile->pitch = tile->zcomp = 0; ++} ++ ++void ++nv10_fb_set_tile_region(struct drm_device *dev, int i) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; ++ ++ nv_wr32(dev, NV10_PFB_TLIMIT(i), tile->limit); ++ nv_wr32(dev, NV10_PFB_TSIZE(i), tile->pitch); ++ nv_wr32(dev, NV10_PFB_TILE(i), tile->addr); ++ ++ if (dev_priv->card_type == NV_20) ++ nv_wr32(dev, NV20_PFB_ZCOMP(i), tile->zcomp); + } + + int +@@ -31,9 +117,14 @@ + + pfb->num_tiles = NV10_PFB_TILE__SIZE; + ++ if (dev_priv->card_type == NV_20) ++ drm_mm_init(&pfb->tag_heap, 0, ++ (dev_priv->chipset >= 0x25 ? ++ 64 * 1024 : 32 * 1024)); ++ + /* Turn all the tiling regions off. */ + for (i = 0; i < pfb->num_tiles; i++) +- pfb->set_region_tiling(dev, i, 0, 0, 0); ++ pfb->set_tile_region(dev, i); + + return 0; + } +@@ -41,4 +132,13 @@ + void + nv10_fb_takedown(struct drm_device *dev) + { ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_fb_engine *pfb = &dev_priv->engine.fb; ++ int i; ++ ++ for (i = 0; i < pfb->num_tiles; i++) ++ pfb->free_tile_region(dev, i); ++ ++ if (dev_priv->card_type == NV_20) ++ drm_mm_takedown(&pfb->tag_heap); + } +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv10_fifo.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv10_fifo.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv10_fifo.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv10_fifo.c 2010-11-22 06:33:32.000000000 +0100 +@@ -73,17 +73,6 @@ + return 0; + } + +-void +-nv10_fifo_destroy_context(struct nouveau_channel *chan) +-{ +- struct drm_device *dev = chan->dev; +- +- nv_wr32(dev, NV04_PFIFO_MODE, +- nv_rd32(dev, NV04_PFIFO_MODE) & ~(1 << chan->id)); +- +- nouveau_gpuobj_ref(NULL, &chan->ramfc); +-} +- + static void + nv10_fifo_do_load_context(struct drm_device *dev, int chid) + { +@@ -219,6 +208,7 @@ + static void + nv10_fifo_init_intr(struct drm_device *dev) + { ++ nouveau_irq_register(dev, 8, nv04_fifo_isr); + nv_wr32(dev, 0x002100, 0xffffffff); + nv_wr32(dev, 0x002140, 0xffffffff); + } +@@ -241,7 +231,7 @@ + pfifo->reassign(dev, true); + + for (i = 0; i < dev_priv->engine.fifo.channels; i++) { +- if (dev_priv->fifos[i]) { ++ if (dev_priv->channels.ptr[i]) { + uint32_t mode = nv_rd32(dev, NV04_PFIFO_MODE); + nv_wr32(dev, NV04_PFIFO_MODE, mode | (1 << i)); + } +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv10_graph.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv10_graph.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv10_graph.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv10_graph.c 2010-11-22 06:33:32.000000000 +0100 +@@ -26,6 +26,10 @@ + #include "drm.h" + #include "nouveau_drm.h" + #include "nouveau_drv.h" ++#include "nouveau_util.h" ++ ++static int nv10_graph_register(struct drm_device *); ++static void nv10_graph_isr(struct drm_device *); + + #define NV10_FIFO_NUMBER 32 + +@@ -786,15 +790,13 @@ + return 0; + } + +-void ++static void + nv10_graph_context_switch(struct drm_device *dev) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; + struct nouveau_channel *chan = NULL; + int chid; + +- pgraph->fifo_access(dev, false); + nouveau_wait_for_idle(dev); + + /* If previous context is valid, we need to save it */ +@@ -802,11 +804,9 @@ + + /* Load context for next channel */ + chid = (nv_rd32(dev, NV04_PGRAPH_TRAPPED_ADDR) >> 20) & 0x1f; +- chan = dev_priv->fifos[chid]; ++ chan = dev_priv->channels.ptr[chid]; + if (chan && chan->pgraph_ctx) + nv10_graph_load_context(chan); +- +- pgraph->fifo_access(dev, true); + } + + #define NV_WRITE_CTX(reg, val) do { \ +@@ -833,7 +833,7 @@ + if (chid >= dev_priv->engine.fifo.channels) + return NULL; + +- return dev_priv->fifos[chid]; ++ return dev_priv->channels.ptr[chid]; + } + + int nv10_graph_create_context(struct nouveau_channel *chan) +@@ -875,37 +875,54 @@ + + void nv10_graph_destroy_context(struct nouveau_channel *chan) + { ++ struct drm_device *dev = chan->dev; ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; + struct graph_state *pgraph_ctx = chan->pgraph_ctx; ++ unsigned long flags; ++ ++ spin_lock_irqsave(&dev_priv->context_switch_lock, flags); ++ pgraph->fifo_access(dev, false); ++ ++ /* Unload the context if it's the currently active one */ ++ if (pgraph->channel(dev) == chan) ++ pgraph->unload_context(dev); + ++ /* Free the context resources */ + kfree(pgraph_ctx); + chan->pgraph_ctx = NULL; ++ ++ pgraph->fifo_access(dev, true); ++ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); + } + + void +-nv10_graph_set_region_tiling(struct drm_device *dev, int i, uint32_t addr, +- uint32_t size, uint32_t pitch) ++nv10_graph_set_tile_region(struct drm_device *dev, int i) + { +- uint32_t limit = max(1u, addr + size) - 1; +- +- if (pitch) +- addr |= 1 << 31; ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; + +- nv_wr32(dev, NV10_PGRAPH_TLIMIT(i), limit); +- nv_wr32(dev, NV10_PGRAPH_TSIZE(i), pitch); +- nv_wr32(dev, NV10_PGRAPH_TILE(i), addr); ++ nv_wr32(dev, NV10_PGRAPH_TLIMIT(i), tile->limit); ++ nv_wr32(dev, NV10_PGRAPH_TSIZE(i), tile->pitch); ++ nv_wr32(dev, NV10_PGRAPH_TILE(i), tile->addr); + } + + int nv10_graph_init(struct drm_device *dev) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; + uint32_t tmp; +- int i; ++ int ret, i; + + nv_wr32(dev, NV03_PMC_ENABLE, nv_rd32(dev, NV03_PMC_ENABLE) & + ~NV_PMC_ENABLE_PGRAPH); + nv_wr32(dev, NV03_PMC_ENABLE, nv_rd32(dev, NV03_PMC_ENABLE) | + NV_PMC_ENABLE_PGRAPH); + ++ ret = nv10_graph_register(dev); ++ if (ret) ++ return ret; ++ ++ nouveau_irq_register(dev, 12, nv10_graph_isr); + nv_wr32(dev, NV03_PGRAPH_INTR , 0xFFFFFFFF); + nv_wr32(dev, NV03_PGRAPH_INTR_EN, 0xFFFFFFFF); + +@@ -928,7 +945,7 @@ + + /* Turn all the tiling regions off. */ + for (i = 0; i < NV10_PFB_TILE__SIZE; i++) +- nv10_graph_set_region_tiling(dev, i, 0, 0, 0); ++ nv10_graph_set_tile_region(dev, i); + + nv_wr32(dev, NV10_PGRAPH_CTX_SWITCH(0), 0x00000000); + nv_wr32(dev, NV10_PGRAPH_CTX_SWITCH(1), 0x00000000); +@@ -948,17 +965,17 @@ + + void nv10_graph_takedown(struct drm_device *dev) + { ++ nv_wr32(dev, NV03_PGRAPH_INTR_EN, 0x00000000); ++ nouveau_irq_unregister(dev, 12); + } + + static int +-nv17_graph_mthd_lma_window(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv17_graph_mthd_lma_window(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + struct drm_device *dev = chan->dev; + struct graph_state *ctx = chan->pgraph_ctx; + struct pipe_state *pipe = &ctx->pipe_state; +- struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; + uint32_t pipe_0x0040[1], pipe_0x64c0[8], pipe_0x6a80[3], pipe_0x6ab0[3]; + uint32_t xfmode0, xfmode1; + int i; +@@ -1025,18 +1042,14 @@ + + nouveau_wait_for_idle(dev); + +- pgraph->fifo_access(dev, true); +- + return 0; + } + + static int +-nv17_graph_mthd_lma_enable(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv17_graph_mthd_lma_enable(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + struct drm_device *dev = chan->dev; +- struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; + + nouveau_wait_for_idle(dev); + +@@ -1045,40 +1058,118 @@ + nv_wr32(dev, 0x004006b0, + nv_rd32(dev, 0x004006b0) | 0x8 << 24); + +- pgraph->fifo_access(dev, true); ++ return 0; ++} ++ ++static int ++nv10_graph_register(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ ++ if (dev_priv->engine.graph.registered) ++ return 0; ++ ++ NVOBJ_CLASS(dev, 0x506e, SW); /* nvsw */ ++ NVOBJ_CLASS(dev, 0x0030, GR); /* null */ ++ NVOBJ_CLASS(dev, 0x0039, GR); /* m2mf */ ++ NVOBJ_CLASS(dev, 0x004a, GR); /* gdirect */ ++ NVOBJ_CLASS(dev, 0x005f, GR); /* imageblit */ ++ NVOBJ_CLASS(dev, 0x009f, GR); /* imageblit (nv12) */ ++ NVOBJ_CLASS(dev, 0x008a, GR); /* ifc */ ++ NVOBJ_CLASS(dev, 0x0089, GR); /* sifm */ ++ NVOBJ_CLASS(dev, 0x0062, GR); /* surf2d */ ++ NVOBJ_CLASS(dev, 0x0043, GR); /* rop */ ++ NVOBJ_CLASS(dev, 0x0012, GR); /* beta1 */ ++ NVOBJ_CLASS(dev, 0x0072, GR); /* beta4 */ ++ NVOBJ_CLASS(dev, 0x0019, GR); /* cliprect */ ++ NVOBJ_CLASS(dev, 0x0044, GR); /* pattern */ ++ NVOBJ_CLASS(dev, 0x0052, GR); /* swzsurf */ ++ NVOBJ_CLASS(dev, 0x0093, GR); /* surf3d */ ++ NVOBJ_CLASS(dev, 0x0094, GR); /* tex_tri */ ++ NVOBJ_CLASS(dev, 0x0095, GR); /* multitex_tri */ ++ ++ /* celcius */ ++ if (dev_priv->chipset <= 0x10) { ++ NVOBJ_CLASS(dev, 0x0056, GR); ++ } else ++ if (dev_priv->chipset < 0x17 || dev_priv->chipset == 0x1a) { ++ NVOBJ_CLASS(dev, 0x0096, GR); ++ } else { ++ NVOBJ_CLASS(dev, 0x0099, GR); ++ NVOBJ_MTHD (dev, 0x0099, 0x1638, nv17_graph_mthd_lma_window); ++ NVOBJ_MTHD (dev, 0x0099, 0x163c, nv17_graph_mthd_lma_window); ++ NVOBJ_MTHD (dev, 0x0099, 0x1640, nv17_graph_mthd_lma_window); ++ NVOBJ_MTHD (dev, 0x0099, 0x1644, nv17_graph_mthd_lma_window); ++ NVOBJ_MTHD (dev, 0x0099, 0x1658, nv17_graph_mthd_lma_enable); ++ } ++ ++ /* nvsw */ ++ NVOBJ_CLASS(dev, 0x506e, SW); ++ NVOBJ_MTHD (dev, 0x506e, 0x0500, nv04_graph_mthd_page_flip); + ++ dev_priv->engine.graph.registered = true; + return 0; + } + +-static struct nouveau_pgraph_object_method nv17_graph_celsius_mthds[] = { +- { 0x1638, nv17_graph_mthd_lma_window }, +- { 0x163c, nv17_graph_mthd_lma_window }, +- { 0x1640, nv17_graph_mthd_lma_window }, +- { 0x1644, nv17_graph_mthd_lma_window }, +- { 0x1658, nv17_graph_mthd_lma_enable }, ++struct nouveau_bitfield nv10_graph_intr[] = { ++ { NV_PGRAPH_INTR_NOTIFY, "NOTIFY" }, ++ { NV_PGRAPH_INTR_ERROR, "ERROR" }, + {} + }; + +-struct nouveau_pgraph_object_class nv10_graph_grclass[] = { +- { 0x0030, false, NULL }, /* null */ +- { 0x0039, false, NULL }, /* m2mf */ +- { 0x004a, false, NULL }, /* gdirect */ +- { 0x005f, false, NULL }, /* imageblit */ +- { 0x009f, false, NULL }, /* imageblit (nv12) */ +- { 0x008a, false, NULL }, /* ifc */ +- { 0x0089, false, NULL }, /* sifm */ +- { 0x0062, false, NULL }, /* surf2d */ +- { 0x0043, false, NULL }, /* rop */ +- { 0x0012, false, NULL }, /* beta1 */ +- { 0x0072, false, NULL }, /* beta4 */ +- { 0x0019, false, NULL }, /* cliprect */ +- { 0x0044, false, NULL }, /* pattern */ +- { 0x0052, false, NULL }, /* swzsurf */ +- { 0x0093, false, NULL }, /* surf3d */ +- { 0x0094, false, NULL }, /* tex_tri */ +- { 0x0095, false, NULL }, /* multitex_tri */ +- { 0x0056, false, NULL }, /* celcius (nv10) */ +- { 0x0096, false, NULL }, /* celcius (nv11) */ +- { 0x0099, false, nv17_graph_celsius_mthds }, /* celcius (nv17) */ ++struct nouveau_bitfield nv10_graph_nstatus[] = ++{ ++ { NV10_PGRAPH_NSTATUS_STATE_IN_USE, "STATE_IN_USE" }, ++ { NV10_PGRAPH_NSTATUS_INVALID_STATE, "INVALID_STATE" }, ++ { NV10_PGRAPH_NSTATUS_BAD_ARGUMENT, "BAD_ARGUMENT" }, ++ { NV10_PGRAPH_NSTATUS_PROTECTION_FAULT, "PROTECTION_FAULT" }, + {} + }; ++ ++static void ++nv10_graph_isr(struct drm_device *dev) ++{ ++ u32 stat; ++ ++ while ((stat = nv_rd32(dev, NV03_PGRAPH_INTR))) { ++ u32 nsource = nv_rd32(dev, NV03_PGRAPH_NSOURCE); ++ u32 nstatus = nv_rd32(dev, NV03_PGRAPH_NSTATUS); ++ u32 addr = nv_rd32(dev, NV04_PGRAPH_TRAPPED_ADDR); ++ u32 chid = (addr & 0x01f00000) >> 20; ++ u32 subc = (addr & 0x00070000) >> 16; ++ u32 mthd = (addr & 0x00001ffc); ++ u32 data = nv_rd32(dev, NV04_PGRAPH_TRAPPED_DATA); ++ u32 class = nv_rd32(dev, 0x400160 + subc * 4) & 0xfff; ++ u32 show = stat; ++ ++ if (stat & NV_PGRAPH_INTR_ERROR) { ++ if (nsource & NV03_PGRAPH_NSOURCE_ILLEGAL_MTHD) { ++ if (!nouveau_gpuobj_mthd_call2(dev, chid, class, mthd, data)) ++ show &= ~NV_PGRAPH_INTR_ERROR; ++ } ++ } ++ ++ if (stat & NV_PGRAPH_INTR_CONTEXT_SWITCH) { ++ nv_wr32(dev, NV03_PGRAPH_INTR, NV_PGRAPH_INTR_CONTEXT_SWITCH); ++ stat &= ~NV_PGRAPH_INTR_CONTEXT_SWITCH; ++ show &= ~NV_PGRAPH_INTR_CONTEXT_SWITCH; ++ nv10_graph_context_switch(dev); ++ } ++ ++ nv_wr32(dev, NV03_PGRAPH_INTR, stat); ++ nv_wr32(dev, NV04_PGRAPH_FIFO, 0x00000001); ++ ++ if (show && nouveau_ratelimit()) { ++ NV_INFO(dev, "PGRAPH -"); ++ nouveau_bitfield_print(nv10_graph_intr, show); ++ printk(" nsource:"); ++ nouveau_bitfield_print(nv04_graph_nsource, nsource); ++ printk(" nstatus:"); ++ nouveau_bitfield_print(nv10_graph_nstatus, nstatus); ++ printk("\n"); ++ NV_INFO(dev, "PGRAPH - ch %d/%d class 0x%04x " ++ "mthd 0x%04x data 0x%08x\n", ++ chid, subc, class, mthd, data); ++ } ++ } ++} +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv20_graph.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv20_graph.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv20_graph.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv20_graph.c 2010-11-22 06:33:32.000000000 +0100 +@@ -32,6 +32,10 @@ + #define NV34_GRCTX_SIZE (18140) + #define NV35_36_GRCTX_SIZE (22396) + ++static int nv20_graph_register(struct drm_device *); ++static int nv30_graph_register(struct drm_device *); ++static void nv20_graph_isr(struct drm_device *); ++ + static void + nv20_graph_context_init(struct drm_device *dev, struct nouveau_gpuobj *ctx) + { +@@ -425,9 +429,21 @@ + struct drm_device *dev = chan->dev; + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; ++ unsigned long flags; + +- nouveau_gpuobj_ref(NULL, &chan->ramin_grctx); ++ spin_lock_irqsave(&dev_priv->context_switch_lock, flags); ++ pgraph->fifo_access(dev, false); ++ ++ /* Unload the context if it's the currently active one */ ++ if (pgraph->channel(dev) == chan) ++ pgraph->unload_context(dev); ++ ++ pgraph->fifo_access(dev, true); ++ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); ++ ++ /* Free the context resources */ + nv_wo32(pgraph->ctx_table, chan->id * 4, 0); ++ nouveau_gpuobj_ref(NULL, &chan->ramin_grctx); + } + + int +@@ -496,24 +512,27 @@ + } + + void +-nv20_graph_set_region_tiling(struct drm_device *dev, int i, uint32_t addr, +- uint32_t size, uint32_t pitch) ++nv20_graph_set_tile_region(struct drm_device *dev, int i) + { +- uint32_t limit = max(1u, addr + size) - 1; +- +- if (pitch) +- addr |= 1; ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; + +- nv_wr32(dev, NV20_PGRAPH_TLIMIT(i), limit); +- nv_wr32(dev, NV20_PGRAPH_TSIZE(i), pitch); +- nv_wr32(dev, NV20_PGRAPH_TILE(i), addr); ++ nv_wr32(dev, NV20_PGRAPH_TLIMIT(i), tile->limit); ++ nv_wr32(dev, NV20_PGRAPH_TSIZE(i), tile->pitch); ++ nv_wr32(dev, NV20_PGRAPH_TILE(i), tile->addr); + + nv_wr32(dev, NV10_PGRAPH_RDI_INDEX, 0x00EA0030 + 4 * i); +- nv_wr32(dev, NV10_PGRAPH_RDI_DATA, limit); ++ nv_wr32(dev, NV10_PGRAPH_RDI_DATA, tile->limit); + nv_wr32(dev, NV10_PGRAPH_RDI_INDEX, 0x00EA0050 + 4 * i); +- nv_wr32(dev, NV10_PGRAPH_RDI_DATA, pitch); ++ nv_wr32(dev, NV10_PGRAPH_RDI_DATA, tile->pitch); + nv_wr32(dev, NV10_PGRAPH_RDI_INDEX, 0x00EA0010 + 4 * i); +- nv_wr32(dev, NV10_PGRAPH_RDI_DATA, addr); ++ nv_wr32(dev, NV10_PGRAPH_RDI_DATA, tile->addr); ++ ++ if (dev_priv->card_type == NV_20) { ++ nv_wr32(dev, NV20_PGRAPH_ZCOMP(i), tile->zcomp); ++ nv_wr32(dev, NV10_PGRAPH_RDI_INDEX, 0x00ea0090 + 4 * i); ++ nv_wr32(dev, NV10_PGRAPH_RDI_DATA, tile->zcomp); ++ } + } + + int +@@ -560,6 +579,13 @@ + + nv20_graph_rdi(dev); + ++ ret = nv20_graph_register(dev); ++ if (ret) { ++ nouveau_gpuobj_ref(NULL, &pgraph->ctx_table); ++ return ret; ++ } ++ ++ nouveau_irq_register(dev, 12, nv20_graph_isr); + nv_wr32(dev, NV03_PGRAPH_INTR , 0xFFFFFFFF); + nv_wr32(dev, NV03_PGRAPH_INTR_EN, 0xFFFFFFFF); + +@@ -571,16 +597,17 @@ + nv_wr32(dev, 0x40009C , 0x00000040); + + if (dev_priv->chipset >= 0x25) { +- nv_wr32(dev, 0x400890, 0x00080000); ++ nv_wr32(dev, 0x400890, 0x00a8cfff); + nv_wr32(dev, 0x400610, 0x304B1FB6); +- nv_wr32(dev, 0x400B80, 0x18B82880); ++ nv_wr32(dev, 0x400B80, 0x1cbd3883); + nv_wr32(dev, 0x400B84, 0x44000000); + nv_wr32(dev, 0x400098, 0x40000080); + nv_wr32(dev, 0x400B88, 0x000000ff); ++ + } else { +- nv_wr32(dev, 0x400880, 0x00080000); /* 0x0008c7df */ ++ nv_wr32(dev, 0x400880, 0x0008c7df); + nv_wr32(dev, 0x400094, 0x00000005); +- nv_wr32(dev, 0x400B80, 0x45CAA208); /* 0x45eae20e */ ++ nv_wr32(dev, 0x400B80, 0x45eae20e); + nv_wr32(dev, 0x400B84, 0x24000000); + nv_wr32(dev, 0x400098, 0x00000040); + nv_wr32(dev, NV10_PGRAPH_RDI_INDEX, 0x00E00038); +@@ -591,14 +618,8 @@ + + /* Turn all the tiling regions off. */ + for (i = 0; i < NV10_PFB_TILE__SIZE; i++) +- nv20_graph_set_region_tiling(dev, i, 0, 0, 0); ++ nv20_graph_set_tile_region(dev, i); + +- for (i = 0; i < 8; i++) { +- nv_wr32(dev, 0x400980 + i * 4, nv_rd32(dev, 0x100300 + i * 4)); +- nv_wr32(dev, NV10_PGRAPH_RDI_INDEX, 0x00EA0090 + i * 4); +- nv_wr32(dev, NV10_PGRAPH_RDI_DATA, +- nv_rd32(dev, 0x100300 + i * 4)); +- } + nv_wr32(dev, 0x4009a0, nv_rd32(dev, 0x100324)); + nv_wr32(dev, NV10_PGRAPH_RDI_INDEX, 0x00EA000C); + nv_wr32(dev, NV10_PGRAPH_RDI_DATA, nv_rd32(dev, 0x100324)); +@@ -642,6 +663,9 @@ + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; + ++ nv_wr32(dev, NV03_PGRAPH_INTR_EN, 0x00000000); ++ nouveau_irq_unregister(dev, 12); ++ + nouveau_gpuobj_ref(NULL, &pgraph->ctx_table); + } + +@@ -684,9 +708,16 @@ + return ret; + } + ++ ret = nv30_graph_register(dev); ++ if (ret) { ++ nouveau_gpuobj_ref(NULL, &pgraph->ctx_table); ++ return ret; ++ } ++ + nv_wr32(dev, NV20_PGRAPH_CHANNEL_CTX_TABLE, + pgraph->ctx_table->pinst >> 4); + ++ nouveau_irq_register(dev, 12, nv20_graph_isr); + nv_wr32(dev, NV03_PGRAPH_INTR , 0xFFFFFFFF); + nv_wr32(dev, NV03_PGRAPH_INTR_EN, 0xFFFFFFFF); + +@@ -724,7 +755,7 @@ + + /* Turn all the tiling regions off. */ + for (i = 0; i < NV10_PFB_TILE__SIZE; i++) +- nv20_graph_set_region_tiling(dev, i, 0, 0, 0); ++ nv20_graph_set_tile_region(dev, i); + + nv_wr32(dev, NV10_PGRAPH_CTX_CONTROL, 0x10000100); + nv_wr32(dev, NV10_PGRAPH_STATE , 0xFFFFFFFF); +@@ -744,46 +775,125 @@ + return 0; + } + +-struct nouveau_pgraph_object_class nv20_graph_grclass[] = { +- { 0x0030, false, NULL }, /* null */ +- { 0x0039, false, NULL }, /* m2mf */ +- { 0x004a, false, NULL }, /* gdirect */ +- { 0x009f, false, NULL }, /* imageblit (nv12) */ +- { 0x008a, false, NULL }, /* ifc */ +- { 0x0089, false, NULL }, /* sifm */ +- { 0x0062, false, NULL }, /* surf2d */ +- { 0x0043, false, NULL }, /* rop */ +- { 0x0012, false, NULL }, /* beta1 */ +- { 0x0072, false, NULL }, /* beta4 */ +- { 0x0019, false, NULL }, /* cliprect */ +- { 0x0044, false, NULL }, /* pattern */ +- { 0x009e, false, NULL }, /* swzsurf */ +- { 0x0096, false, NULL }, /* celcius */ +- { 0x0097, false, NULL }, /* kelvin (nv20) */ +- { 0x0597, false, NULL }, /* kelvin (nv25) */ +- {} +-}; +- +-struct nouveau_pgraph_object_class nv30_graph_grclass[] = { +- { 0x0030, false, NULL }, /* null */ +- { 0x0039, false, NULL }, /* m2mf */ +- { 0x004a, false, NULL }, /* gdirect */ +- { 0x009f, false, NULL }, /* imageblit (nv12) */ +- { 0x008a, false, NULL }, /* ifc */ +- { 0x038a, false, NULL }, /* ifc (nv30) */ +- { 0x0089, false, NULL }, /* sifm */ +- { 0x0389, false, NULL }, /* sifm (nv30) */ +- { 0x0062, false, NULL }, /* surf2d */ +- { 0x0362, false, NULL }, /* surf2d (nv30) */ +- { 0x0043, false, NULL }, /* rop */ +- { 0x0012, false, NULL }, /* beta1 */ +- { 0x0072, false, NULL }, /* beta4 */ +- { 0x0019, false, NULL }, /* cliprect */ +- { 0x0044, false, NULL }, /* pattern */ +- { 0x039e, false, NULL }, /* swzsurf */ +- { 0x0397, false, NULL }, /* rankine (nv30) */ +- { 0x0497, false, NULL }, /* rankine (nv35) */ +- { 0x0697, false, NULL }, /* rankine (nv34) */ +- {} +-}; ++static int ++nv20_graph_register(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; + ++ if (dev_priv->engine.graph.registered) ++ return 0; ++ ++ NVOBJ_CLASS(dev, 0x506e, SW); /* nvsw */ ++ NVOBJ_CLASS(dev, 0x0030, GR); /* null */ ++ NVOBJ_CLASS(dev, 0x0039, GR); /* m2mf */ ++ NVOBJ_CLASS(dev, 0x004a, GR); /* gdirect */ ++ NVOBJ_CLASS(dev, 0x009f, GR); /* imageblit (nv12) */ ++ NVOBJ_CLASS(dev, 0x008a, GR); /* ifc */ ++ NVOBJ_CLASS(dev, 0x0089, GR); /* sifm */ ++ NVOBJ_CLASS(dev, 0x0062, GR); /* surf2d */ ++ NVOBJ_CLASS(dev, 0x0043, GR); /* rop */ ++ NVOBJ_CLASS(dev, 0x0012, GR); /* beta1 */ ++ NVOBJ_CLASS(dev, 0x0072, GR); /* beta4 */ ++ NVOBJ_CLASS(dev, 0x0019, GR); /* cliprect */ ++ NVOBJ_CLASS(dev, 0x0044, GR); /* pattern */ ++ NVOBJ_CLASS(dev, 0x009e, GR); /* swzsurf */ ++ NVOBJ_CLASS(dev, 0x0096, GR); /* celcius */ ++ ++ /* kelvin */ ++ if (dev_priv->chipset < 0x25) ++ NVOBJ_CLASS(dev, 0x0097, GR); ++ else ++ NVOBJ_CLASS(dev, 0x0597, GR); ++ ++ /* nvsw */ ++ NVOBJ_CLASS(dev, 0x506e, SW); ++ NVOBJ_MTHD (dev, 0x506e, 0x0500, nv04_graph_mthd_page_flip); ++ ++ dev_priv->engine.graph.registered = true; ++ return 0; ++} ++ ++static int ++nv30_graph_register(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ ++ if (dev_priv->engine.graph.registered) ++ return 0; ++ ++ NVOBJ_CLASS(dev, 0x506e, SW); /* nvsw */ ++ NVOBJ_CLASS(dev, 0x0030, GR); /* null */ ++ NVOBJ_CLASS(dev, 0x0039, GR); /* m2mf */ ++ NVOBJ_CLASS(dev, 0x004a, GR); /* gdirect */ ++ NVOBJ_CLASS(dev, 0x009f, GR); /* imageblit (nv12) */ ++ NVOBJ_CLASS(dev, 0x008a, GR); /* ifc */ ++ NVOBJ_CLASS(dev, 0x038a, GR); /* ifc (nv30) */ ++ NVOBJ_CLASS(dev, 0x0089, GR); /* sifm */ ++ NVOBJ_CLASS(dev, 0x0389, GR); /* sifm (nv30) */ ++ NVOBJ_CLASS(dev, 0x0062, GR); /* surf2d */ ++ NVOBJ_CLASS(dev, 0x0362, GR); /* surf2d (nv30) */ ++ NVOBJ_CLASS(dev, 0x0043, GR); /* rop */ ++ NVOBJ_CLASS(dev, 0x0012, GR); /* beta1 */ ++ NVOBJ_CLASS(dev, 0x0072, GR); /* beta4 */ ++ NVOBJ_CLASS(dev, 0x0019, GR); /* cliprect */ ++ NVOBJ_CLASS(dev, 0x0044, GR); /* pattern */ ++ NVOBJ_CLASS(dev, 0x039e, GR); /* swzsurf */ ++ ++ /* rankine */ ++ if (0x00000003 & (1 << (dev_priv->chipset & 0x0f))) ++ NVOBJ_CLASS(dev, 0x0397, GR); ++ else ++ if (0x00000010 & (1 << (dev_priv->chipset & 0x0f))) ++ NVOBJ_CLASS(dev, 0x0697, GR); ++ else ++ if (0x000001e0 & (1 << (dev_priv->chipset & 0x0f))) ++ NVOBJ_CLASS(dev, 0x0497, GR); ++ ++ /* nvsw */ ++ NVOBJ_CLASS(dev, 0x506e, SW); ++ NVOBJ_MTHD (dev, 0x506e, 0x0500, nv04_graph_mthd_page_flip); ++ ++ dev_priv->engine.graph.registered = true; ++ return 0; ++} ++ ++static void ++nv20_graph_isr(struct drm_device *dev) ++{ ++ u32 stat; ++ ++ while ((stat = nv_rd32(dev, NV03_PGRAPH_INTR))) { ++ u32 nsource = nv_rd32(dev, NV03_PGRAPH_NSOURCE); ++ u32 nstatus = nv_rd32(dev, NV03_PGRAPH_NSTATUS); ++ u32 addr = nv_rd32(dev, NV04_PGRAPH_TRAPPED_ADDR); ++ u32 chid = (addr & 0x01f00000) >> 20; ++ u32 subc = (addr & 0x00070000) >> 16; ++ u32 mthd = (addr & 0x00001ffc); ++ u32 data = nv_rd32(dev, NV04_PGRAPH_TRAPPED_DATA); ++ u32 class = nv_rd32(dev, 0x400160 + subc * 4) & 0xfff; ++ u32 show = stat; ++ ++ if (stat & NV_PGRAPH_INTR_ERROR) { ++ if (nsource & NV03_PGRAPH_NSOURCE_ILLEGAL_MTHD) { ++ if (!nouveau_gpuobj_mthd_call2(dev, chid, class, mthd, data)) ++ show &= ~NV_PGRAPH_INTR_ERROR; ++ } ++ } ++ ++ nv_wr32(dev, NV03_PGRAPH_INTR, stat); ++ nv_wr32(dev, NV04_PGRAPH_FIFO, 0x00000001); ++ ++ if (show && nouveau_ratelimit()) { ++ NV_INFO(dev, "PGRAPH -"); ++ nouveau_bitfield_print(nv10_graph_intr, show); ++ printk(" nsource:"); ++ nouveau_bitfield_print(nv04_graph_nsource, nsource); ++ printk(" nstatus:"); ++ nouveau_bitfield_print(nv10_graph_nstatus, nstatus); ++ printk("\n"); ++ NV_INFO(dev, "PGRAPH - ch %d/%d class 0x%04x " ++ "mthd 0x%04x data 0x%08x\n", ++ chid, subc, class, mthd, data); ++ } ++ } ++} +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv30_fb.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv30_fb.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv30_fb.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv30_fb.c 2010-11-22 06:33:32.000000000 +0100 +@@ -29,6 +29,27 @@ + #include "nouveau_drv.h" + #include "nouveau_drm.h" + ++void ++nv30_fb_init_tile_region(struct drm_device *dev, int i, uint32_t addr, ++ uint32_t size, uint32_t pitch, uint32_t flags) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; ++ ++ tile->addr = addr | 1; ++ tile->limit = max(1u, addr + size) - 1; ++ tile->pitch = pitch; ++} ++ ++void ++nv30_fb_free_tile_region(struct drm_device *dev, int i) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; ++ ++ tile->addr = tile->limit = tile->pitch = 0; ++} ++ + static int + calc_bias(struct drm_device *dev, int k, int i, int j) + { +@@ -65,7 +86,7 @@ + + /* Turn all the tiling regions off. */ + for (i = 0; i < pfb->num_tiles; i++) +- pfb->set_region_tiling(dev, i, 0, 0, 0); ++ pfb->set_tile_region(dev, i); + + /* Init the memory timing regs at 0x10037c/0x1003ac */ + if (dev_priv->chipset == 0x30 || +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv40_fb.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv40_fb.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv40_fb.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv40_fb.c 2010-11-22 06:33:32.000000000 +0100 +@@ -4,26 +4,22 @@ + #include "nouveau_drm.h" + + void +-nv40_fb_set_region_tiling(struct drm_device *dev, int i, uint32_t addr, +- uint32_t size, uint32_t pitch) ++nv40_fb_set_tile_region(struct drm_device *dev, int i) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; +- uint32_t limit = max(1u, addr + size) - 1; +- +- if (pitch) +- addr |= 1; ++ struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; + + switch (dev_priv->chipset) { + case 0x40: +- nv_wr32(dev, NV10_PFB_TLIMIT(i), limit); +- nv_wr32(dev, NV10_PFB_TSIZE(i), pitch); +- nv_wr32(dev, NV10_PFB_TILE(i), addr); ++ nv_wr32(dev, NV10_PFB_TLIMIT(i), tile->limit); ++ nv_wr32(dev, NV10_PFB_TSIZE(i), tile->pitch); ++ nv_wr32(dev, NV10_PFB_TILE(i), tile->addr); + break; + + default: +- nv_wr32(dev, NV40_PFB_TLIMIT(i), limit); +- nv_wr32(dev, NV40_PFB_TSIZE(i), pitch); +- nv_wr32(dev, NV40_PFB_TILE(i), addr); ++ nv_wr32(dev, NV40_PFB_TLIMIT(i), tile->limit); ++ nv_wr32(dev, NV40_PFB_TSIZE(i), tile->pitch); ++ nv_wr32(dev, NV40_PFB_TILE(i), tile->addr); + break; + } + } +@@ -64,7 +60,7 @@ + + /* Turn all the tiling regions off. */ + for (i = 0; i < pfb->num_tiles; i++) +- pfb->set_region_tiling(dev, i, 0, 0, 0); ++ pfb->set_tile_region(dev, i); + + return 0; + } +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv40_fifo.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv40_fifo.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv40_fifo.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv40_fifo.c 2010-11-22 06:33:32.000000000 +0100 +@@ -70,17 +70,6 @@ + return 0; + } + +-void +-nv40_fifo_destroy_context(struct nouveau_channel *chan) +-{ +- struct drm_device *dev = chan->dev; +- +- nv_wr32(dev, NV04_PFIFO_MODE, +- nv_rd32(dev, NV04_PFIFO_MODE) & ~(1 << chan->id)); +- +- nouveau_gpuobj_ref(NULL, &chan->ramfc); +-} +- + static void + nv40_fifo_do_load_context(struct drm_device *dev, int chid) + { +@@ -279,6 +268,7 @@ + static void + nv40_fifo_init_intr(struct drm_device *dev) + { ++ nouveau_irq_register(dev, 8, nv04_fifo_isr); + nv_wr32(dev, 0x002100, 0xffffffff); + nv_wr32(dev, 0x002140, 0xffffffff); + } +@@ -301,7 +291,7 @@ + pfifo->reassign(dev, true); + + for (i = 0; i < dev_priv->engine.fifo.channels; i++) { +- if (dev_priv->fifos[i]) { ++ if (dev_priv->channels.ptr[i]) { + uint32_t mode = nv_rd32(dev, NV04_PFIFO_MODE); + nv_wr32(dev, NV04_PFIFO_MODE, mode | (1 << i)); + } +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv40_graph.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv40_graph.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv40_graph.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv40_graph.c 2010-11-22 06:33:32.000000000 +0100 +@@ -29,6 +29,9 @@ + #include "nouveau_drv.h" + #include "nouveau_grctx.h" + ++static int nv40_graph_register(struct drm_device *); ++static void nv40_graph_isr(struct drm_device *); ++ + struct nouveau_channel * + nv40_graph_channel(struct drm_device *dev) + { +@@ -42,7 +45,7 @@ + inst = (inst & NV40_PGRAPH_CTXCTL_CUR_INSTANCE) << 4; + + for (i = 0; i < dev_priv->engine.fifo.channels; i++) { +- struct nouveau_channel *chan = dev_priv->fifos[i]; ++ struct nouveau_channel *chan = dev_priv->channels.ptr[i]; + + if (chan && chan->ramin_grctx && + chan->ramin_grctx->pinst == inst) +@@ -79,6 +82,22 @@ + void + nv40_graph_destroy_context(struct nouveau_channel *chan) + { ++ struct drm_device *dev = chan->dev; ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; ++ unsigned long flags; ++ ++ spin_lock_irqsave(&dev_priv->context_switch_lock, flags); ++ pgraph->fifo_access(dev, false); ++ ++ /* Unload the context if it's the currently active one */ ++ if (pgraph->channel(dev) == chan) ++ pgraph->unload_context(dev); ++ ++ pgraph->fifo_access(dev, true); ++ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); ++ ++ /* Free the context resources */ + nouveau_gpuobj_ref(NULL, &chan->ramin_grctx); + } + +@@ -174,43 +193,39 @@ + } + + void +-nv40_graph_set_region_tiling(struct drm_device *dev, int i, uint32_t addr, +- uint32_t size, uint32_t pitch) ++nv40_graph_set_tile_region(struct drm_device *dev, int i) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; +- uint32_t limit = max(1u, addr + size) - 1; +- +- if (pitch) +- addr |= 1; ++ struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; + + switch (dev_priv->chipset) { + case 0x44: + case 0x4a: + case 0x4e: +- nv_wr32(dev, NV20_PGRAPH_TSIZE(i), pitch); +- nv_wr32(dev, NV20_PGRAPH_TLIMIT(i), limit); +- nv_wr32(dev, NV20_PGRAPH_TILE(i), addr); ++ nv_wr32(dev, NV20_PGRAPH_TSIZE(i), tile->pitch); ++ nv_wr32(dev, NV20_PGRAPH_TLIMIT(i), tile->limit); ++ nv_wr32(dev, NV20_PGRAPH_TILE(i), tile->addr); + break; + + case 0x46: + case 0x47: + case 0x49: + case 0x4b: +- nv_wr32(dev, NV47_PGRAPH_TSIZE(i), pitch); +- nv_wr32(dev, NV47_PGRAPH_TLIMIT(i), limit); +- nv_wr32(dev, NV47_PGRAPH_TILE(i), addr); +- nv_wr32(dev, NV40_PGRAPH_TSIZE1(i), pitch); +- nv_wr32(dev, NV40_PGRAPH_TLIMIT1(i), limit); +- nv_wr32(dev, NV40_PGRAPH_TILE1(i), addr); ++ nv_wr32(dev, NV47_PGRAPH_TSIZE(i), tile->pitch); ++ nv_wr32(dev, NV47_PGRAPH_TLIMIT(i), tile->limit); ++ nv_wr32(dev, NV47_PGRAPH_TILE(i), tile->addr); ++ nv_wr32(dev, NV40_PGRAPH_TSIZE1(i), tile->pitch); ++ nv_wr32(dev, NV40_PGRAPH_TLIMIT1(i), tile->limit); ++ nv_wr32(dev, NV40_PGRAPH_TILE1(i), tile->addr); + break; + + default: +- nv_wr32(dev, NV20_PGRAPH_TSIZE(i), pitch); +- nv_wr32(dev, NV20_PGRAPH_TLIMIT(i), limit); +- nv_wr32(dev, NV20_PGRAPH_TILE(i), addr); +- nv_wr32(dev, NV40_PGRAPH_TSIZE1(i), pitch); +- nv_wr32(dev, NV40_PGRAPH_TLIMIT1(i), limit); +- nv_wr32(dev, NV40_PGRAPH_TILE1(i), addr); ++ nv_wr32(dev, NV20_PGRAPH_TSIZE(i), tile->pitch); ++ nv_wr32(dev, NV20_PGRAPH_TLIMIT(i), tile->limit); ++ nv_wr32(dev, NV20_PGRAPH_TILE(i), tile->addr); ++ nv_wr32(dev, NV40_PGRAPH_TSIZE1(i), tile->pitch); ++ nv_wr32(dev, NV40_PGRAPH_TLIMIT1(i), tile->limit); ++ nv_wr32(dev, NV40_PGRAPH_TILE1(i), tile->addr); + break; + } + } +@@ -232,7 +247,7 @@ + struct nouveau_fb_engine *pfb = &dev_priv->engine.fb; + struct nouveau_grctx ctx = {}; + uint32_t vramsz, *cp; +- int i, j; ++ int ret, i, j; + + nv_wr32(dev, NV03_PMC_ENABLE, nv_rd32(dev, NV03_PMC_ENABLE) & + ~NV_PMC_ENABLE_PGRAPH); +@@ -256,9 +271,14 @@ + + kfree(cp); + ++ ret = nv40_graph_register(dev); ++ if (ret) ++ return ret; ++ + /* No context present currently */ + nv_wr32(dev, NV40_PGRAPH_CTXCTL_CUR, 0x00000000); + ++ nouveau_irq_register(dev, 12, nv40_graph_isr); + nv_wr32(dev, NV03_PGRAPH_INTR , 0xFFFFFFFF); + nv_wr32(dev, NV40_PGRAPH_INTR_EN, 0xFFFFFFFF); + +@@ -347,7 +367,7 @@ + + /* Turn all the tiling regions off. */ + for (i = 0; i < pfb->num_tiles; i++) +- nv40_graph_set_region_tiling(dev, i, 0, 0, 0); ++ nv40_graph_set_tile_region(dev, i); + + /* begin RAM config */ + vramsz = pci_resource_len(dev->pdev, 0) - 1; +@@ -390,26 +410,111 @@ + + void nv40_graph_takedown(struct drm_device *dev) + { ++ nouveau_irq_unregister(dev, 12); ++} ++ ++static int ++nv40_graph_register(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ ++ if (dev_priv->engine.graph.registered) ++ return 0; ++ ++ NVOBJ_CLASS(dev, 0x506e, SW); /* nvsw */ ++ NVOBJ_CLASS(dev, 0x0030, GR); /* null */ ++ NVOBJ_CLASS(dev, 0x0039, GR); /* m2mf */ ++ NVOBJ_CLASS(dev, 0x004a, GR); /* gdirect */ ++ NVOBJ_CLASS(dev, 0x009f, GR); /* imageblit (nv12) */ ++ NVOBJ_CLASS(dev, 0x008a, GR); /* ifc */ ++ NVOBJ_CLASS(dev, 0x0089, GR); /* sifm */ ++ NVOBJ_CLASS(dev, 0x3089, GR); /* sifm (nv40) */ ++ NVOBJ_CLASS(dev, 0x0062, GR); /* surf2d */ ++ NVOBJ_CLASS(dev, 0x3062, GR); /* surf2d (nv40) */ ++ NVOBJ_CLASS(dev, 0x0043, GR); /* rop */ ++ NVOBJ_CLASS(dev, 0x0012, GR); /* beta1 */ ++ NVOBJ_CLASS(dev, 0x0072, GR); /* beta4 */ ++ NVOBJ_CLASS(dev, 0x0019, GR); /* cliprect */ ++ NVOBJ_CLASS(dev, 0x0044, GR); /* pattern */ ++ NVOBJ_CLASS(dev, 0x309e, GR); /* swzsurf */ ++ ++ /* curie */ ++ if (dev_priv->chipset >= 0x60 || ++ 0x00005450 & (1 << (dev_priv->chipset & 0x0f))) ++ NVOBJ_CLASS(dev, 0x4497, GR); ++ else ++ NVOBJ_CLASS(dev, 0x4097, GR); ++ ++ /* nvsw */ ++ NVOBJ_CLASS(dev, 0x506e, SW); ++ NVOBJ_MTHD (dev, 0x506e, 0x0500, nv04_graph_mthd_page_flip); ++ ++ dev_priv->engine.graph.registered = true; ++ return 0; ++} ++ ++static int ++nv40_graph_isr_chid(struct drm_device *dev, u32 inst) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_channel *chan; ++ unsigned long flags; ++ int i; ++ ++ spin_lock_irqsave(&dev_priv->channels.lock, flags); ++ for (i = 0; i < dev_priv->engine.fifo.channels; i++) { ++ chan = dev_priv->channels.ptr[i]; ++ if (!chan || !chan->ramin_grctx) ++ continue; ++ ++ if (inst == chan->ramin_grctx->pinst) ++ break; ++ } ++ spin_unlock_irqrestore(&dev_priv->channels.lock, flags); ++ return i; + } + +-struct nouveau_pgraph_object_class nv40_graph_grclass[] = { +- { 0x0030, false, NULL }, /* null */ +- { 0x0039, false, NULL }, /* m2mf */ +- { 0x004a, false, NULL }, /* gdirect */ +- { 0x009f, false, NULL }, /* imageblit (nv12) */ +- { 0x008a, false, NULL }, /* ifc */ +- { 0x0089, false, NULL }, /* sifm */ +- { 0x3089, false, NULL }, /* sifm (nv40) */ +- { 0x0062, false, NULL }, /* surf2d */ +- { 0x3062, false, NULL }, /* surf2d (nv40) */ +- { 0x0043, false, NULL }, /* rop */ +- { 0x0012, false, NULL }, /* beta1 */ +- { 0x0072, false, NULL }, /* beta4 */ +- { 0x0019, false, NULL }, /* cliprect */ +- { 0x0044, false, NULL }, /* pattern */ +- { 0x309e, false, NULL }, /* swzsurf */ +- { 0x4097, false, NULL }, /* curie (nv40) */ +- { 0x4497, false, NULL }, /* curie (nv44) */ +- {} +-}; ++static void ++nv40_graph_isr(struct drm_device *dev) ++{ ++ u32 stat; ++ ++ while ((stat = nv_rd32(dev, NV03_PGRAPH_INTR))) { ++ u32 nsource = nv_rd32(dev, NV03_PGRAPH_NSOURCE); ++ u32 nstatus = nv_rd32(dev, NV03_PGRAPH_NSTATUS); ++ u32 inst = (nv_rd32(dev, 0x40032c) & 0x000fffff) << 4; ++ u32 chid = nv40_graph_isr_chid(dev, inst); ++ u32 addr = nv_rd32(dev, NV04_PGRAPH_TRAPPED_ADDR); ++ u32 subc = (addr & 0x00070000) >> 16; ++ u32 mthd = (addr & 0x00001ffc); ++ u32 data = nv_rd32(dev, NV04_PGRAPH_TRAPPED_DATA); ++ u32 class = nv_rd32(dev, 0x400160 + subc * 4) & 0xffff; ++ u32 show = stat; ++ ++ if (stat & NV_PGRAPH_INTR_ERROR) { ++ if (nsource & NV03_PGRAPH_NSOURCE_ILLEGAL_MTHD) { ++ if (!nouveau_gpuobj_mthd_call2(dev, chid, class, mthd, data)) ++ show &= ~NV_PGRAPH_INTR_ERROR; ++ } else ++ if (nsource & NV03_PGRAPH_NSOURCE_DMA_VTX_PROTECTION) { ++ nv_mask(dev, 0x402000, 0, 0); ++ } ++ } ++ ++ nv_wr32(dev, NV03_PGRAPH_INTR, stat); ++ nv_wr32(dev, NV04_PGRAPH_FIFO, 0x00000001); + ++ if (show && nouveau_ratelimit()) { ++ NV_INFO(dev, "PGRAPH -"); ++ nouveau_bitfield_print(nv10_graph_intr, show); ++ printk(" nsource:"); ++ nouveau_bitfield_print(nv04_graph_nsource, nsource); ++ printk(" nstatus:"); ++ nouveau_bitfield_print(nv10_graph_nstatus, nstatus); ++ printk("\n"); ++ NV_INFO(dev, "PGRAPH - ch %d (0x%08x) subc %d " ++ "class 0x%04x mthd 0x%04x data 0x%08x\n", ++ chid, inst, subc, class, mthd, data); ++ } ++ } ++} +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv50_crtc.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv50_crtc.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv50_crtc.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv50_crtc.c 2010-11-22 06:33:32.000000000 +0100 +@@ -437,6 +437,7 @@ + .cursor_move = nv50_crtc_cursor_move, + .gamma_set = nv50_crtc_gamma_set, + .set_config = drm_crtc_helper_set_config, ++ .page_flip = nouveau_crtc_page_flip, + .destroy = nv50_crtc_destroy, + }; + +@@ -453,6 +454,7 @@ + + NV_DEBUG_KMS(dev, "index %d\n", nv_crtc->index); + ++ drm_vblank_pre_modeset(dev, nv_crtc->index); + nv50_crtc_blank(nv_crtc, true); + } + +@@ -468,6 +470,7 @@ + NV_DEBUG_KMS(dev, "index %d\n", nv_crtc->index); + + nv50_crtc_blank(nv_crtc, false); ++ drm_vblank_post_modeset(dev, nv_crtc->index); + + ret = RING_SPACE(evo, 2); + if (ret) { +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv50_display.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv50_display.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv50_display.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv50_display.c 2010-11-22 06:33:32.000000000 +0100 +@@ -33,6 +33,8 @@ + #include "nouveau_ramht.h" + #include "drm_crtc_helper.h" + ++static void nv50_display_isr(struct drm_device *); ++ + static inline int + nv50_sor_nr(struct drm_device *dev) + { +@@ -46,159 +48,6 @@ + return 4; + } + +-static void +-nv50_evo_channel_del(struct nouveau_channel **pchan) +-{ +- struct nouveau_channel *chan = *pchan; +- +- if (!chan) +- return; +- *pchan = NULL; +- +- nouveau_gpuobj_channel_takedown(chan); +- nouveau_bo_unmap(chan->pushbuf_bo); +- nouveau_bo_ref(NULL, &chan->pushbuf_bo); +- +- if (chan->user) +- iounmap(chan->user); +- +- kfree(chan); +-} +- +-static int +-nv50_evo_dmaobj_new(struct nouveau_channel *evo, uint32_t class, uint32_t name, +- uint32_t tile_flags, uint32_t magic_flags, +- uint32_t offset, uint32_t limit) +-{ +- struct drm_nouveau_private *dev_priv = evo->dev->dev_private; +- struct drm_device *dev = evo->dev; +- struct nouveau_gpuobj *obj = NULL; +- int ret; +- +- ret = nouveau_gpuobj_new(dev, evo, 6*4, 32, 0, &obj); +- if (ret) +- return ret; +- obj->engine = NVOBJ_ENGINE_DISPLAY; +- +- nv_wo32(obj, 0, (tile_flags << 22) | (magic_flags << 16) | class); +- nv_wo32(obj, 4, limit); +- nv_wo32(obj, 8, offset); +- nv_wo32(obj, 12, 0x00000000); +- nv_wo32(obj, 16, 0x00000000); +- if (dev_priv->card_type < NV_C0) +- nv_wo32(obj, 20, 0x00010000); +- else +- nv_wo32(obj, 20, 0x00020000); +- dev_priv->engine.instmem.flush(dev); +- +- ret = nouveau_ramht_insert(evo, name, obj); +- nouveau_gpuobj_ref(NULL, &obj); +- if (ret) { +- return ret; +- } +- +- return 0; +-} +- +-static int +-nv50_evo_channel_new(struct drm_device *dev, struct nouveau_channel **pchan) +-{ +- struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_gpuobj *ramht = NULL; +- struct nouveau_channel *chan; +- int ret; +- +- chan = kzalloc(sizeof(struct nouveau_channel), GFP_KERNEL); +- if (!chan) +- return -ENOMEM; +- *pchan = chan; +- +- chan->id = -1; +- chan->dev = dev; +- chan->user_get = 4; +- chan->user_put = 0; +- +- ret = nouveau_gpuobj_new(dev, NULL, 32768, 0x1000, +- NVOBJ_FLAG_ZERO_ALLOC, &chan->ramin); +- if (ret) { +- NV_ERROR(dev, "Error allocating EVO channel memory: %d\n", ret); +- nv50_evo_channel_del(pchan); +- return ret; +- } +- +- ret = drm_mm_init(&chan->ramin_heap, 0, 32768); +- if (ret) { +- NV_ERROR(dev, "Error initialising EVO PRAMIN heap: %d\n", ret); +- nv50_evo_channel_del(pchan); +- return ret; +- } +- +- ret = nouveau_gpuobj_new(dev, chan, 4096, 16, 0, &ramht); +- if (ret) { +- NV_ERROR(dev, "Unable to allocate EVO RAMHT: %d\n", ret); +- nv50_evo_channel_del(pchan); +- return ret; +- } +- +- ret = nouveau_ramht_new(dev, ramht, &chan->ramht); +- nouveau_gpuobj_ref(NULL, &ramht); +- if (ret) { +- nv50_evo_channel_del(pchan); +- return ret; +- } +- +- if (dev_priv->chipset != 0x50) { +- ret = nv50_evo_dmaobj_new(chan, 0x3d, NvEvoFB16, 0x70, 0x19, +- 0, 0xffffffff); +- if (ret) { +- nv50_evo_channel_del(pchan); +- return ret; +- } +- +- +- ret = nv50_evo_dmaobj_new(chan, 0x3d, NvEvoFB32, 0x7a, 0x19, +- 0, 0xffffffff); +- if (ret) { +- nv50_evo_channel_del(pchan); +- return ret; +- } +- } +- +- ret = nv50_evo_dmaobj_new(chan, 0x3d, NvEvoVRAM, 0, 0x19, +- 0, dev_priv->vram_size); +- if (ret) { +- nv50_evo_channel_del(pchan); +- return ret; +- } +- +- ret = nouveau_bo_new(dev, NULL, 4096, 0, TTM_PL_FLAG_VRAM, 0, 0, +- false, true, &chan->pushbuf_bo); +- if (ret == 0) +- ret = nouveau_bo_pin(chan->pushbuf_bo, TTM_PL_FLAG_VRAM); +- if (ret) { +- NV_ERROR(dev, "Error creating EVO DMA push buffer: %d\n", ret); +- nv50_evo_channel_del(pchan); +- return ret; +- } +- +- ret = nouveau_bo_map(chan->pushbuf_bo); +- if (ret) { +- NV_ERROR(dev, "Error mapping EVO DMA push buffer: %d\n", ret); +- nv50_evo_channel_del(pchan); +- return ret; +- } +- +- chan->user = ioremap(pci_resource_start(dev->pdev, 0) + +- NV50_PDISPLAY_USER(0), PAGE_SIZE); +- if (!chan->user) { +- NV_ERROR(dev, "Error mapping EVO control regs.\n"); +- nv50_evo_channel_del(pchan); +- return -ENOMEM; +- } +- +- return 0; +-} +- + int + nv50_display_early_init(struct drm_device *dev) + { +@@ -214,17 +63,16 @@ + nv50_display_init(struct drm_device *dev) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_timer_engine *ptimer = &dev_priv->engine.timer; + struct nouveau_gpio_engine *pgpio = &dev_priv->engine.gpio; +- struct nouveau_channel *evo = dev_priv->evo; + struct drm_connector *connector; +- uint32_t val, ram_amount; +- uint64_t start; ++ struct nouveau_channel *evo; + int ret, i; ++ u32 val; + + NV_DEBUG_KMS(dev, "\n"); + + nv_wr32(dev, 0x00610184, nv_rd32(dev, 0x00614004)); ++ + /* + * I think the 0x006101XX range is some kind of main control area + * that enables things. +@@ -240,16 +88,19 @@ + val = nv_rd32(dev, 0x0061610c + (i * 0x800)); + nv_wr32(dev, 0x0061019c + (i * 0x10), val); + } ++ + /* DAC */ + for (i = 0; i < 3; i++) { + val = nv_rd32(dev, 0x0061a000 + (i * 0x800)); + nv_wr32(dev, 0x006101d0 + (i * 0x04), val); + } ++ + /* SOR */ + for (i = 0; i < nv50_sor_nr(dev); i++) { + val = nv_rd32(dev, 0x0061c000 + (i * 0x800)); + nv_wr32(dev, 0x006101e0 + (i * 0x04), val); + } ++ + /* EXT */ + for (i = 0; i < 3; i++) { + val = nv_rd32(dev, 0x0061e000 + (i * 0x800)); +@@ -262,17 +113,6 @@ + nv_wr32(dev, NV50_PDISPLAY_DAC_CLK_CTRL1(i), 0x00000001); + } + +- /* This used to be in crtc unblank, but seems out of place there. */ +- nv_wr32(dev, NV50_PDISPLAY_UNK_380, 0); +- /* RAM is clamped to 256 MiB. */ +- ram_amount = dev_priv->vram_size; +- NV_DEBUG_KMS(dev, "ram_amount %d\n", ram_amount); +- if (ram_amount > 256*1024*1024) +- ram_amount = 256*1024*1024; +- nv_wr32(dev, NV50_PDISPLAY_RAM_AMOUNT, ram_amount - 1); +- nv_wr32(dev, NV50_PDISPLAY_UNK_388, 0x150000); +- nv_wr32(dev, NV50_PDISPLAY_UNK_38C, 0); +- + /* The precise purpose is unknown, i suspect it has something to do + * with text mode. + */ +@@ -287,37 +127,6 @@ + } + } + +- /* taken from nv bug #12637, attempts to un-wedge the hw if it's +- * stuck in some unspecified state +- */ +- start = ptimer->read(dev); +- nv_wr32(dev, NV50_PDISPLAY_CHANNEL_STAT(0), 0x2b00); +- while ((val = nv_rd32(dev, NV50_PDISPLAY_CHANNEL_STAT(0))) & 0x1e0000) { +- if ((val & 0x9f0000) == 0x20000) +- nv_wr32(dev, NV50_PDISPLAY_CHANNEL_STAT(0), +- val | 0x800000); +- +- if ((val & 0x3f0000) == 0x30000) +- nv_wr32(dev, NV50_PDISPLAY_CHANNEL_STAT(0), +- val | 0x200000); +- +- if (ptimer->read(dev) - start > 1000000000ULL) { +- NV_ERROR(dev, "timeout: (0x610200 & 0x1e0000) != 0\n"); +- NV_ERROR(dev, "0x610200 = 0x%08x\n", val); +- return -EBUSY; +- } +- } +- +- nv_wr32(dev, NV50_PDISPLAY_CTRL_STATE, NV50_PDISPLAY_CTRL_STATE_ENABLE); +- nv_wr32(dev, NV50_PDISPLAY_CHANNEL_STAT(0), 0x1000b03); +- if (!nv_wait(dev, NV50_PDISPLAY_CHANNEL_STAT(0), +- 0x40000000, 0x40000000)) { +- NV_ERROR(dev, "timeout: (0x610200 & 0x40000000) == 0x40000000\n"); +- NV_ERROR(dev, "0x610200 = 0x%08x\n", +- nv_rd32(dev, NV50_PDISPLAY_CHANNEL_STAT(0))); +- return -EBUSY; +- } +- + for (i = 0; i < 2; i++) { + nv_wr32(dev, NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(i), 0x2000); + if (!nv_wait(dev, NV50_PDISPLAY_CURSOR_CURSOR_CTRL2(i), +@@ -341,39 +150,31 @@ + } + } + +- nv_wr32(dev, NV50_PDISPLAY_OBJECTS, (evo->ramin->vinst >> 8) | 9); ++ nv_wr32(dev, NV50_PDISPLAY_PIO_CTRL, 0x00000000); ++ nv_mask(dev, NV50_PDISPLAY_INTR_0, 0x00000000, 0x00000000); ++ nv_wr32(dev, NV50_PDISPLAY_INTR_EN_0, 0x00000000); ++ nv_mask(dev, NV50_PDISPLAY_INTR_1, 0x00000000, 0x00000000); ++ nv_wr32(dev, NV50_PDISPLAY_INTR_EN_1, ++ NV50_PDISPLAY_INTR_EN_1_CLK_UNK10 | ++ NV50_PDISPLAY_INTR_EN_1_CLK_UNK20 | ++ NV50_PDISPLAY_INTR_EN_1_CLK_UNK40); ++ ++ /* enable hotplug interrupts */ ++ list_for_each_entry(connector, &dev->mode_config.connector_list, head) { ++ struct nouveau_connector *conn = nouveau_connector(connector); + +- /* initialise fifo */ +- nv_wr32(dev, NV50_PDISPLAY_CHANNEL_DMA_CB(0), +- ((evo->pushbuf_bo->bo.mem.start << PAGE_SHIFT) >> 8) | +- NV50_PDISPLAY_CHANNEL_DMA_CB_LOCATION_VRAM | +- NV50_PDISPLAY_CHANNEL_DMA_CB_VALID); +- nv_wr32(dev, NV50_PDISPLAY_CHANNEL_UNK2(0), 0x00010000); +- nv_wr32(dev, NV50_PDISPLAY_CHANNEL_UNK3(0), 0x00000002); +- if (!nv_wait(dev, 0x610200, 0x80000000, 0x00000000)) { +- NV_ERROR(dev, "timeout: (0x610200 & 0x80000000) == 0\n"); +- NV_ERROR(dev, "0x610200 = 0x%08x\n", nv_rd32(dev, 0x610200)); +- return -EBUSY; +- } +- nv_wr32(dev, NV50_PDISPLAY_CHANNEL_STAT(0), +- (nv_rd32(dev, NV50_PDISPLAY_CHANNEL_STAT(0)) & ~0x00000003) | +- NV50_PDISPLAY_CHANNEL_STAT_DMA_ENABLED); +- nv_wr32(dev, NV50_PDISPLAY_USER_PUT(0), 0); +- nv_wr32(dev, NV50_PDISPLAY_CHANNEL_STAT(0), 0x01000003 | +- NV50_PDISPLAY_CHANNEL_STAT_DMA_ENABLED); +- nv_wr32(dev, 0x610300, nv_rd32(dev, 0x610300) & ~1); +- +- evo->dma.max = (4096/4) - 2; +- evo->dma.put = 0; +- evo->dma.cur = evo->dma.put; +- evo->dma.free = evo->dma.max - evo->dma.cur; ++ if (conn->dcb->gpio_tag == 0xff) ++ continue; + +- ret = RING_SPACE(evo, NOUVEAU_DMA_SKIPS); ++ pgpio->irq_enable(dev, conn->dcb->gpio_tag, true); ++ } ++ ++ ret = nv50_evo_init(dev); + if (ret) + return ret; ++ evo = dev_priv->evo; + +- for (i = 0; i < NOUVEAU_DMA_SKIPS; i++) +- OUT_RING(evo, 0); ++ nv_wr32(dev, NV50_PDISPLAY_OBJECTS, (evo->ramin->vinst >> 8) | 9); + + ret = RING_SPACE(evo, 11); + if (ret) +@@ -393,21 +194,6 @@ + if (!nv_wait(dev, 0x640004, 0xffffffff, evo->dma.put << 2)) + NV_ERROR(dev, "evo pushbuf stalled\n"); + +- /* enable clock change interrupts. */ +- nv_wr32(dev, 0x610028, 0x00010001); +- nv_wr32(dev, NV50_PDISPLAY_INTR_EN, (NV50_PDISPLAY_INTR_EN_CLK_UNK10 | +- NV50_PDISPLAY_INTR_EN_CLK_UNK20 | +- NV50_PDISPLAY_INTR_EN_CLK_UNK40)); +- +- /* enable hotplug interrupts */ +- list_for_each_entry(connector, &dev->mode_config.connector_list, head) { +- struct nouveau_connector *conn = nouveau_connector(connector); +- +- if (conn->dcb->gpio_tag == 0xff) +- continue; +- +- pgpio->irq_enable(dev, conn->dcb->gpio_tag, true); +- } + + return 0; + } +@@ -452,13 +238,7 @@ + } + } + +- nv_wr32(dev, NV50_PDISPLAY_CHANNEL_STAT(0), 0); +- nv_wr32(dev, NV50_PDISPLAY_CTRL_STATE, 0); +- if (!nv_wait(dev, NV50_PDISPLAY_CHANNEL_STAT(0), 0x1e0000, 0)) { +- NV_ERROR(dev, "timeout: (0x610200 & 0x1e0000) == 0\n"); +- NV_ERROR(dev, "0x610200 = 0x%08x\n", +- nv_rd32(dev, NV50_PDISPLAY_CHANNEL_STAT(0))); +- } ++ nv50_evo_fini(dev); + + for (i = 0; i < 3; i++) { + if (!nv_wait(dev, NV50_PDISPLAY_SOR_DPMS_STATE(i), +@@ -470,7 +250,7 @@ + } + + /* disable interrupts. */ +- nv_wr32(dev, NV50_PDISPLAY_INTR_EN, 0x00000000); ++ nv_wr32(dev, NV50_PDISPLAY_INTR_EN_1, 0x00000000); + + /* disable hotplug interrupts */ + nv_wr32(dev, 0xe054, 0xffffffff); +@@ -508,13 +288,6 @@ + + dev->mode_config.fb_base = dev_priv->fb_phys; + +- /* Create EVO channel */ +- ret = nv50_evo_channel_new(dev, &dev_priv->evo); +- if (ret) { +- NV_ERROR(dev, "Error creating EVO channel: %d\n", ret); +- return ret; +- } +- + /* Create CRTC objects */ + for (i = 0; i < 2; i++) + nv50_crtc_create(dev, i); +@@ -557,6 +330,9 @@ + } + } + ++ INIT_WORK(&dev_priv->irq_work, nv50_display_irq_handler_bh); ++ nouveau_irq_register(dev, 26, nv50_display_isr); ++ + ret = nv50_display_init(dev); + if (ret) { + nv50_display_destroy(dev); +@@ -569,14 +345,12 @@ + void + nv50_display_destroy(struct drm_device *dev) + { +- struct drm_nouveau_private *dev_priv = dev->dev_private; +- + NV_DEBUG_KMS(dev, "\n"); + + drm_mode_config_cleanup(dev); + + nv50_display_disable(dev); +- nv50_evo_channel_del(&dev_priv->evo); ++ nouveau_irq_unregister(dev, 26); + } + + static u16 +@@ -660,32 +434,32 @@ + nv50_display_vblank_crtc_handler(struct drm_device *dev, int crtc) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_channel *chan; +- struct list_head *entry, *tmp; ++ struct nouveau_channel *chan, *tmp; + +- list_for_each_safe(entry, tmp, &dev_priv->vbl_waiting) { +- chan = list_entry(entry, struct nouveau_channel, nvsw.vbl_wait); ++ list_for_each_entry_safe(chan, tmp, &dev_priv->vbl_waiting, ++ nvsw.vbl_wait) { ++ if (chan->nvsw.vblsem_head != crtc) ++ continue; + + nouveau_bo_wr32(chan->notifier_bo, chan->nvsw.vblsem_offset, + chan->nvsw.vblsem_rval); + list_del(&chan->nvsw.vbl_wait); ++ drm_vblank_put(dev, crtc); + } ++ ++ drm_handle_vblank(dev, crtc); + } + + static void + nv50_display_vblank_handler(struct drm_device *dev, uint32_t intr) + { +- intr &= NV50_PDISPLAY_INTR_1_VBLANK_CRTC; +- + if (intr & NV50_PDISPLAY_INTR_1_VBLANK_CRTC_0) + nv50_display_vblank_crtc_handler(dev, 0); + + if (intr & NV50_PDISPLAY_INTR_1_VBLANK_CRTC_1) + nv50_display_vblank_crtc_handler(dev, 1); + +- nv_wr32(dev, NV50_PDISPLAY_INTR_EN, nv_rd32(dev, +- NV50_PDISPLAY_INTR_EN) & ~intr); +- nv_wr32(dev, NV50_PDISPLAY_INTR_1, intr); ++ nv_wr32(dev, NV50_PDISPLAY_INTR_1, NV50_PDISPLAY_INTR_1_VBLANK_CRTC); + } + + static void +@@ -1011,108 +785,31 @@ + static void + nv50_display_error_handler(struct drm_device *dev) + { +- uint32_t addr, data; +- +- nv_wr32(dev, NV50_PDISPLAY_INTR_0, 0x00010000); +- addr = nv_rd32(dev, NV50_PDISPLAY_TRAPPED_ADDR); +- data = nv_rd32(dev, NV50_PDISPLAY_TRAPPED_DATA); +- +- NV_ERROR(dev, "EvoCh %d Mthd 0x%04x Data 0x%08x (0x%04x 0x%02x)\n", +- 0, addr & 0xffc, data, addr >> 16, (addr >> 12) & 0xf); +- +- nv_wr32(dev, NV50_PDISPLAY_TRAPPED_ADDR, 0x90000000); +-} +- +-void +-nv50_display_irq_hotplug_bh(struct work_struct *work) +-{ +- struct drm_nouveau_private *dev_priv = +- container_of(work, struct drm_nouveau_private, hpd_work); +- struct drm_device *dev = dev_priv->dev; +- struct drm_connector *connector; +- const uint32_t gpio_reg[4] = { 0xe104, 0xe108, 0xe280, 0xe284 }; +- uint32_t unplug_mask, plug_mask, change_mask; +- uint32_t hpd0, hpd1; +- +- spin_lock_irq(&dev_priv->hpd_state.lock); +- hpd0 = dev_priv->hpd_state.hpd0_bits; +- dev_priv->hpd_state.hpd0_bits = 0; +- hpd1 = dev_priv->hpd_state.hpd1_bits; +- dev_priv->hpd_state.hpd1_bits = 0; +- spin_unlock_irq(&dev_priv->hpd_state.lock); +- +- hpd0 &= nv_rd32(dev, 0xe050); +- if (dev_priv->chipset >= 0x90) +- hpd1 &= nv_rd32(dev, 0xe070); +- +- plug_mask = (hpd0 & 0x0000ffff) | (hpd1 << 16); +- unplug_mask = (hpd0 >> 16) | (hpd1 & 0xffff0000); +- change_mask = plug_mask | unplug_mask; +- +- list_for_each_entry(connector, &dev->mode_config.connector_list, head) { +- struct drm_encoder_helper_funcs *helper; +- struct nouveau_connector *nv_connector = +- nouveau_connector(connector); +- struct nouveau_encoder *nv_encoder; +- struct dcb_gpio_entry *gpio; +- uint32_t reg; +- bool plugged; +- +- if (!nv_connector->dcb) +- continue; +- +- gpio = nouveau_bios_gpio_entry(dev, nv_connector->dcb->gpio_tag); +- if (!gpio || !(change_mask & (1 << gpio->line))) +- continue; ++ u32 channels = (nv_rd32(dev, NV50_PDISPLAY_INTR_0) & 0x001f0000) >> 16; ++ u32 addr, data; ++ int chid; ++ ++ for (chid = 0; chid < 5; chid++) { ++ if (!(channels & (1 << chid))) ++ continue; ++ ++ nv_wr32(dev, NV50_PDISPLAY_INTR_0, 0x00010000 << chid); ++ addr = nv_rd32(dev, NV50_PDISPLAY_TRAPPED_ADDR(chid)); ++ data = nv_rd32(dev, NV50_PDISPLAY_TRAPPED_DATA(chid)); ++ NV_ERROR(dev, "EvoCh %d Mthd 0x%04x Data 0x%08x " ++ "(0x%04x 0x%02x)\n", chid, ++ addr & 0xffc, data, addr >> 16, (addr >> 12) & 0xf); + +- reg = nv_rd32(dev, gpio_reg[gpio->line >> 3]); +- plugged = !!(reg & (4 << ((gpio->line & 7) << 2))); +- NV_INFO(dev, "%splugged %s\n", plugged ? "" : "un", +- drm_get_connector_name(connector)) ; +- +- if (!connector->encoder || !connector->encoder->crtc || +- !connector->encoder->crtc->enabled) +- continue; +- nv_encoder = nouveau_encoder(connector->encoder); +- helper = connector->encoder->helper_private; +- +- if (nv_encoder->dcb->type != OUTPUT_DP) +- continue; +- +- if (plugged) +- helper->dpms(connector->encoder, DRM_MODE_DPMS_ON); +- else +- helper->dpms(connector->encoder, DRM_MODE_DPMS_OFF); ++ nv_wr32(dev, NV50_PDISPLAY_TRAPPED_ADDR(chid), 0x90000000); + } +- +- drm_helper_hpd_irq_event(dev); + } + +-void +-nv50_display_irq_handler(struct drm_device *dev) ++static void ++nv50_display_isr(struct drm_device *dev) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; + uint32_t delayed = 0; + +- if (nv_rd32(dev, NV50_PMC_INTR_0) & NV50_PMC_INTR_0_HOTPLUG) { +- uint32_t hpd0_bits, hpd1_bits = 0; +- +- hpd0_bits = nv_rd32(dev, 0xe054); +- nv_wr32(dev, 0xe054, hpd0_bits); +- +- if (dev_priv->chipset >= 0x90) { +- hpd1_bits = nv_rd32(dev, 0xe074); +- nv_wr32(dev, 0xe074, hpd1_bits); +- } +- +- spin_lock(&dev_priv->hpd_state.lock); +- dev_priv->hpd_state.hpd0_bits |= hpd0_bits; +- dev_priv->hpd_state.hpd1_bits |= hpd1_bits; +- spin_unlock(&dev_priv->hpd_state.lock); +- +- queue_work(dev_priv->wq, &dev_priv->hpd_work); +- } +- + while (nv_rd32(dev, NV50_PMC_INTR_0) & NV50_PMC_INTR_0_DISPLAY) { + uint32_t intr0 = nv_rd32(dev, NV50_PDISPLAY_INTR_0); + uint32_t intr1 = nv_rd32(dev, NV50_PDISPLAY_INTR_1); +@@ -1123,9 +820,9 @@ + if (!intr0 && !(intr1 & ~delayed)) + break; + +- if (intr0 & 0x00010000) { ++ if (intr0 & 0x001f0000) { + nv50_display_error_handler(dev); +- intr0 &= ~0x00010000; ++ intr0 &= ~0x001f0000; + } + + if (intr1 & NV50_PDISPLAY_INTR_1_VBLANK_CRTC) { +@@ -1156,4 +853,3 @@ + } + } + } +- +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv50_display.h linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv50_display.h +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv50_display.h 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv50_display.h 2010-11-22 06:33:32.000000000 +0100 +@@ -35,9 +35,7 @@ + #include "nouveau_crtc.h" + #include "nv50_evo.h" + +-void nv50_display_irq_handler(struct drm_device *dev); + void nv50_display_irq_handler_bh(struct work_struct *work); +-void nv50_display_irq_hotplug_bh(struct work_struct *work); + int nv50_display_early_init(struct drm_device *dev); + void nv50_display_late_takedown(struct drm_device *dev); + int nv50_display_create(struct drm_device *dev); +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv50_evo.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv50_evo.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv50_evo.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv50_evo.c 2010-11-22 06:33:32.000000000 +0100 +@@ -0,0 +1,318 @@ ++/* ++ * Copyright 2010 Red Hat Inc. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included in ++ * all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR ++ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ++ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++ * OTHER DEALINGS IN THE SOFTWARE. ++ * ++ * Authors: Ben Skeggs ++ */ ++ ++#include "drmP.h" ++ ++#include "nouveau_drv.h" ++#include "nouveau_dma.h" ++#include "nouveau_ramht.h" ++ ++static void ++nv50_evo_channel_del(struct nouveau_channel **pevo) ++{ ++ struct drm_nouveau_private *dev_priv; ++ struct nouveau_channel *evo = *pevo; ++ ++ if (!evo) ++ return; ++ *pevo = NULL; ++ ++ dev_priv = evo->dev->dev_private; ++ dev_priv->evo_alloc &= ~(1 << evo->id); ++ ++ nouveau_gpuobj_channel_takedown(evo); ++ nouveau_bo_unmap(evo->pushbuf_bo); ++ nouveau_bo_ref(NULL, &evo->pushbuf_bo); ++ ++ if (evo->user) ++ iounmap(evo->user); ++ ++ kfree(evo); ++} ++ ++int ++nv50_evo_dmaobj_new(struct nouveau_channel *evo, u32 class, u32 name, ++ u32 tile_flags, u32 magic_flags, u32 offset, u32 limit) ++{ ++ struct drm_nouveau_private *dev_priv = evo->dev->dev_private; ++ struct drm_device *dev = evo->dev; ++ struct nouveau_gpuobj *obj = NULL; ++ int ret; ++ ++ ret = nouveau_gpuobj_new(dev, dev_priv->evo, 6*4, 32, 0, &obj); ++ if (ret) ++ return ret; ++ obj->engine = NVOBJ_ENGINE_DISPLAY; ++ ++ nv_wo32(obj, 0, (tile_flags << 22) | (magic_flags << 16) | class); ++ nv_wo32(obj, 4, limit); ++ nv_wo32(obj, 8, offset); ++ nv_wo32(obj, 12, 0x00000000); ++ nv_wo32(obj, 16, 0x00000000); ++ if (dev_priv->card_type < NV_C0) ++ nv_wo32(obj, 20, 0x00010000); ++ else ++ nv_wo32(obj, 20, 0x00020000); ++ dev_priv->engine.instmem.flush(dev); ++ ++ ret = nouveau_ramht_insert(evo, name, obj); ++ nouveau_gpuobj_ref(NULL, &obj); ++ if (ret) { ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int ++nv50_evo_channel_new(struct drm_device *dev, struct nouveau_channel **pevo) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_channel *evo; ++ int ret; ++ ++ evo = kzalloc(sizeof(struct nouveau_channel), GFP_KERNEL); ++ if (!evo) ++ return -ENOMEM; ++ *pevo = evo; ++ ++ for (evo->id = 0; evo->id < 5; evo->id++) { ++ if (dev_priv->evo_alloc & (1 << evo->id)) ++ continue; ++ ++ dev_priv->evo_alloc |= (1 << evo->id); ++ break; ++ } ++ ++ if (evo->id == 5) { ++ kfree(evo); ++ return -ENODEV; ++ } ++ ++ evo->dev = dev; ++ evo->user_get = 4; ++ evo->user_put = 0; ++ ++ ret = nouveau_bo_new(dev, NULL, 4096, 0, TTM_PL_FLAG_VRAM, 0, 0, ++ false, true, &evo->pushbuf_bo); ++ if (ret == 0) ++ ret = nouveau_bo_pin(evo->pushbuf_bo, TTM_PL_FLAG_VRAM); ++ if (ret) { ++ NV_ERROR(dev, "Error creating EVO DMA push buffer: %d\n", ret); ++ nv50_evo_channel_del(pevo); ++ return ret; ++ } ++ ++ ret = nouveau_bo_map(evo->pushbuf_bo); ++ if (ret) { ++ NV_ERROR(dev, "Error mapping EVO DMA push buffer: %d\n", ret); ++ nv50_evo_channel_del(pevo); ++ return ret; ++ } ++ ++ evo->user = ioremap(pci_resource_start(dev->pdev, 0) + ++ NV50_PDISPLAY_USER(evo->id), PAGE_SIZE); ++ if (!evo->user) { ++ NV_ERROR(dev, "Error mapping EVO control regs.\n"); ++ nv50_evo_channel_del(pevo); ++ return -ENOMEM; ++ } ++ ++ /* bind primary evo channel's ramht to the channel */ ++ if (dev_priv->evo && evo != dev_priv->evo) ++ nouveau_ramht_ref(dev_priv->evo->ramht, &evo->ramht, NULL); ++ ++ return 0; ++} ++ ++static int ++nv50_evo_channel_init(struct nouveau_channel *evo) ++{ ++ struct drm_device *dev = evo->dev; ++ int id = evo->id, ret, i; ++ u64 pushbuf = evo->pushbuf_bo->bo.mem.start << PAGE_SHIFT; ++ u32 tmp; ++ ++ tmp = nv_rd32(dev, NV50_PDISPLAY_EVO_CTRL(id)); ++ if ((tmp & 0x009f0000) == 0x00020000) ++ nv_wr32(dev, NV50_PDISPLAY_EVO_CTRL(id), tmp | 0x00800000); ++ ++ tmp = nv_rd32(dev, NV50_PDISPLAY_EVO_CTRL(id)); ++ if ((tmp & 0x003f0000) == 0x00030000) ++ nv_wr32(dev, NV50_PDISPLAY_EVO_CTRL(id), tmp | 0x00600000); ++ ++ /* initialise fifo */ ++ nv_wr32(dev, NV50_PDISPLAY_EVO_DMA_CB(id), pushbuf >> 8 | ++ NV50_PDISPLAY_EVO_DMA_CB_LOCATION_VRAM | ++ NV50_PDISPLAY_EVO_DMA_CB_VALID); ++ nv_wr32(dev, NV50_PDISPLAY_EVO_UNK2(id), 0x00010000); ++ nv_wr32(dev, NV50_PDISPLAY_EVO_HASH_TAG(id), id); ++ nv_mask(dev, NV50_PDISPLAY_EVO_CTRL(id), NV50_PDISPLAY_EVO_CTRL_DMA, ++ NV50_PDISPLAY_EVO_CTRL_DMA_ENABLED); ++ ++ nv_wr32(dev, NV50_PDISPLAY_USER_PUT(id), 0x00000000); ++ nv_wr32(dev, NV50_PDISPLAY_EVO_CTRL(id), 0x01000003 | ++ NV50_PDISPLAY_EVO_CTRL_DMA_ENABLED); ++ if (!nv_wait(dev, NV50_PDISPLAY_EVO_CTRL(id), 0x80000000, 0x00000000)) { ++ NV_ERROR(dev, "EvoCh %d init timeout: 0x%08x\n", id, ++ nv_rd32(dev, NV50_PDISPLAY_EVO_CTRL(id))); ++ return -EBUSY; ++ } ++ ++ /* enable error reporting on the channel */ ++ nv_mask(dev, 0x610028, 0x00000000, 0x00010001 << id); ++ ++ evo->dma.max = (4096/4) - 2; ++ evo->dma.put = 0; ++ evo->dma.cur = evo->dma.put; ++ evo->dma.free = evo->dma.max - evo->dma.cur; ++ ++ ret = RING_SPACE(evo, NOUVEAU_DMA_SKIPS); ++ if (ret) ++ return ret; ++ ++ for (i = 0; i < NOUVEAU_DMA_SKIPS; i++) ++ OUT_RING(evo, 0); ++ ++ return 0; ++} ++ ++static void ++nv50_evo_channel_fini(struct nouveau_channel *evo) ++{ ++ struct drm_device *dev = evo->dev; ++ int id = evo->id; ++ ++ nv_mask(dev, 0x610028, 0x00010001 << id, 0x00000000); ++ nv_mask(dev, NV50_PDISPLAY_EVO_CTRL(id), 0x00001010, 0x00001000); ++ nv_wr32(dev, NV50_PDISPLAY_INTR_0, (1 << id)); ++ nv_mask(dev, NV50_PDISPLAY_EVO_CTRL(id), 0x00000003, 0x00000000); ++ if (!nv_wait(dev, NV50_PDISPLAY_EVO_CTRL(id), 0x001e0000, 0x00000000)) { ++ NV_ERROR(dev, "EvoCh %d takedown timeout: 0x%08x\n", id, ++ nv_rd32(dev, NV50_PDISPLAY_EVO_CTRL(id))); ++ } ++} ++ ++static int ++nv50_evo_create(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_gpuobj *ramht = NULL; ++ struct nouveau_channel *evo; ++ int ret; ++ ++ /* create primary evo channel, the one we use for modesetting ++ * purporses ++ */ ++ ret = nv50_evo_channel_new(dev, &dev_priv->evo); ++ if (ret) ++ return ret; ++ evo = dev_priv->evo; ++ ++ /* setup object management on it, any other evo channel will ++ * use this also as there's no per-channel support on the ++ * hardware ++ */ ++ ret = nouveau_gpuobj_new(dev, NULL, 32768, 65536, ++ NVOBJ_FLAG_ZERO_ALLOC, &evo->ramin); ++ if (ret) { ++ NV_ERROR(dev, "Error allocating EVO channel memory: %d\n", ret); ++ nv50_evo_channel_del(&dev_priv->evo); ++ return ret; ++ } ++ ++ ret = drm_mm_init(&evo->ramin_heap, 0, 32768); ++ if (ret) { ++ NV_ERROR(dev, "Error initialising EVO PRAMIN heap: %d\n", ret); ++ nv50_evo_channel_del(&dev_priv->evo); ++ return ret; ++ } ++ ++ ret = nouveau_gpuobj_new(dev, evo, 4096, 16, 0, &ramht); ++ if (ret) { ++ NV_ERROR(dev, "Unable to allocate EVO RAMHT: %d\n", ret); ++ nv50_evo_channel_del(&dev_priv->evo); ++ return ret; ++ } ++ ++ ret = nouveau_ramht_new(dev, ramht, &evo->ramht); ++ nouveau_gpuobj_ref(NULL, &ramht); ++ if (ret) { ++ nv50_evo_channel_del(&dev_priv->evo); ++ return ret; ++ } ++ ++ /* create some default objects for the scanout memtypes we support */ ++ if (dev_priv->chipset != 0x50) { ++ ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoFB16, 0x70, 0x19, ++ 0, 0xffffffff); ++ if (ret) { ++ nv50_evo_channel_del(&dev_priv->evo); ++ return ret; ++ } ++ ++ ++ ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoFB32, 0x7a, 0x19, ++ 0, 0xffffffff); ++ if (ret) { ++ nv50_evo_channel_del(&dev_priv->evo); ++ return ret; ++ } ++ } ++ ++ ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoVRAM, 0, 0x19, ++ 0, dev_priv->vram_size); ++ if (ret) { ++ nv50_evo_channel_del(&dev_priv->evo); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++int ++nv50_evo_init(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ int ret; ++ ++ if (!dev_priv->evo) { ++ ret = nv50_evo_create(dev); ++ if (ret) ++ return ret; ++ } ++ ++ return nv50_evo_channel_init(dev_priv->evo); ++} ++ ++void ++nv50_evo_fini(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ ++ if (dev_priv->evo) { ++ nv50_evo_channel_fini(dev_priv->evo); ++ nv50_evo_channel_del(&dev_priv->evo); ++ } ++} +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv50_evo.h linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv50_evo.h +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv50_evo.h 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv50_evo.h 2010-11-22 06:33:32.000000000 +0100 +@@ -24,6 +24,15 @@ + * + */ + ++#ifndef __NV50_EVO_H__ ++#define __NV50_EVO_H__ ++ ++int nv50_evo_init(struct drm_device *dev); ++void nv50_evo_fini(struct drm_device *dev); ++int nv50_evo_dmaobj_new(struct nouveau_channel *, u32 class, u32 name, ++ u32 tile_flags, u32 magic_flags, ++ u32 offset, u32 limit); ++ + #define NV50_EVO_UPDATE 0x00000080 + #define NV50_EVO_UNK84 0x00000084 + #define NV50_EVO_UNK84_NOTIFY 0x40000000 +@@ -111,3 +120,4 @@ + #define NV50_EVO_CRTC_SCALE_RES1 0x000008d8 + #define NV50_EVO_CRTC_SCALE_RES2 0x000008dc + ++#endif +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv50_fb.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv50_fb.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv50_fb.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv50_fb.c 2010-11-22 06:33:32.000000000 +0100 +@@ -3,30 +3,75 @@ + #include "nouveau_drv.h" + #include "nouveau_drm.h" + ++struct nv50_fb_priv { ++ struct page *r100c08_page; ++ dma_addr_t r100c08; ++}; ++ ++static int ++nv50_fb_create(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nv50_fb_priv *priv; ++ ++ priv = kzalloc(sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ ++ priv->r100c08_page = alloc_page(GFP_KERNEL | __GFP_ZERO); ++ if (!priv->r100c08_page) { ++ kfree(priv); ++ return -ENOMEM; ++ } ++ ++ priv->r100c08 = pci_map_page(dev->pdev, priv->r100c08_page, 0, ++ PAGE_SIZE, PCI_DMA_BIDIRECTIONAL); ++ if (pci_dma_mapping_error(dev->pdev, priv->r100c08)) { ++ __free_page(priv->r100c08_page); ++ kfree(priv); ++ return -EFAULT; ++ } ++ ++ dev_priv->engine.fb.priv = priv; ++ return 0; ++} ++ + int + nv50_fb_init(struct drm_device *dev) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nv50_fb_priv *priv; ++ int ret; ++ ++ if (!dev_priv->engine.fb.priv) { ++ ret = nv50_fb_create(dev); ++ if (ret) ++ return ret; ++ } ++ priv = dev_priv->engine.fb.priv; + + /* Not a clue what this is exactly. Without pointing it at a + * scratch page, VRAM->GART blits with M2MF (as in DDX DFS) + * cause IOMMU "read from address 0" errors (rh#561267) + */ +- nv_wr32(dev, 0x100c08, dev_priv->gart_info.sg_dummy_bus >> 8); ++ nv_wr32(dev, 0x100c08, priv->r100c08 >> 8); + + /* This is needed to get meaningful information from 100c90 + * on traps. No idea what these values mean exactly. */ + switch (dev_priv->chipset) { + case 0x50: +- nv_wr32(dev, 0x100c90, 0x0707ff); ++ nv_wr32(dev, 0x100c90, 0x000707ff); + break; + case 0xa3: + case 0xa5: + case 0xa8: +- nv_wr32(dev, 0x100c90, 0x0d0fff); ++ nv_wr32(dev, 0x100c90, 0x000d0fff); ++ break; ++ case 0xaf: ++ nv_wr32(dev, 0x100c90, 0x089d1fff); + break; + default: +- nv_wr32(dev, 0x100c90, 0x1d07ff); ++ nv_wr32(dev, 0x100c90, 0x001d07ff); + break; + } + +@@ -36,12 +81,25 @@ + void + nv50_fb_takedown(struct drm_device *dev) + { ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nv50_fb_priv *priv; ++ ++ priv = dev_priv->engine.fb.priv; ++ if (!priv) ++ return; ++ dev_priv->engine.fb.priv = NULL; ++ ++ pci_unmap_page(dev->pdev, priv->r100c08, PAGE_SIZE, ++ PCI_DMA_BIDIRECTIONAL); ++ __free_page(priv->r100c08_page); ++ kfree(priv); + } + + void + nv50_fb_vm_trap(struct drm_device *dev, int display, const char *name) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; ++ unsigned long flags; + u32 trap[6], idx, chinst; + int i, ch; + +@@ -60,8 +118,10 @@ + return; + + chinst = (trap[2] << 16) | trap[1]; ++ ++ spin_lock_irqsave(&dev_priv->channels.lock, flags); + for (ch = 0; ch < dev_priv->engine.fifo.channels; ch++) { +- struct nouveau_channel *chan = dev_priv->fifos[ch]; ++ struct nouveau_channel *chan = dev_priv->channels.ptr[ch]; + + if (!chan || !chan->ramin) + continue; +@@ -69,6 +129,7 @@ + if (chinst == chan->ramin->vinst >> 12) + break; + } ++ spin_unlock_irqrestore(&dev_priv->channels.lock, flags); + + NV_INFO(dev, "%s - VM: Trapped %s at %02x%04x%04x status %08x " + "channel %d (0x%08x)\n", +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv50_fbcon.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv50_fbcon.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv50_fbcon.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv50_fbcon.c 2010-11-22 06:33:32.000000000 +0100 +@@ -4,26 +4,18 @@ + #include "nouveau_ramht.h" + #include "nouveau_fbcon.h" + +-void ++int + nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) + { + struct nouveau_fbdev *nfbdev = info->par; + struct drm_device *dev = nfbdev->dev; + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_channel *chan = dev_priv->channel; ++ int ret; + +- if (info->state != FBINFO_STATE_RUNNING) +- return; +- +- if (!(info->flags & FBINFO_HWACCEL_DISABLED) && +- RING_SPACE(chan, rect->rop == ROP_COPY ? 7 : 11)) { +- nouveau_fbcon_gpu_lockup(info); +- } +- +- if (info->flags & FBINFO_HWACCEL_DISABLED) { +- cfb_fillrect(info, rect); +- return; +- } ++ ret = RING_SPACE(chan, rect->rop == ROP_COPY ? 7 : 11); ++ if (ret) ++ return ret; + + if (rect->rop != ROP_COPY) { + BEGIN_RING(chan, NvSub2D, 0x02ac, 1); +@@ -45,27 +37,21 @@ + OUT_RING(chan, 3); + } + FIRE_RING(chan); ++ return 0; + } + +-void ++int + nv50_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region) + { + struct nouveau_fbdev *nfbdev = info->par; + struct drm_device *dev = nfbdev->dev; + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nouveau_channel *chan = dev_priv->channel; ++ int ret; + +- if (info->state != FBINFO_STATE_RUNNING) +- return; +- +- if (!(info->flags & FBINFO_HWACCEL_DISABLED) && RING_SPACE(chan, 12)) { +- nouveau_fbcon_gpu_lockup(info); +- } +- +- if (info->flags & FBINFO_HWACCEL_DISABLED) { +- cfb_copyarea(info, region); +- return; +- } ++ ret = RING_SPACE(chan, 12); ++ if (ret) ++ return ret; + + BEGIN_RING(chan, NvSub2D, 0x0110, 1); + OUT_RING(chan, 0); +@@ -80,9 +66,10 @@ + OUT_RING(chan, 0); + OUT_RING(chan, region->sy); + FIRE_RING(chan); ++ return 0; + } + +-void ++int + nv50_fbcon_imageblit(struct fb_info *info, const struct fb_image *image) + { + struct nouveau_fbdev *nfbdev = info->par; +@@ -92,23 +79,14 @@ + uint32_t width, dwords, *data = (uint32_t *)image->data; + uint32_t mask = ~(~0 >> (32 - info->var.bits_per_pixel)); + uint32_t *palette = info->pseudo_palette; ++ int ret; + +- if (info->state != FBINFO_STATE_RUNNING) +- return; +- +- if (image->depth != 1) { +- cfb_imageblit(info, image); +- return; +- } +- +- if (!(info->flags & FBINFO_HWACCEL_DISABLED) && RING_SPACE(chan, 11)) { +- nouveau_fbcon_gpu_lockup(info); +- } ++ if (image->depth != 1) ++ return -ENODEV; + +- if (info->flags & FBINFO_HWACCEL_DISABLED) { +- cfb_imageblit(info, image); +- return; +- } ++ ret = RING_SPACE(chan, 11); ++ if (ret) ++ return ret; + + width = ALIGN(image->width, 32); + dwords = (width * image->height) >> 5; +@@ -134,11 +112,9 @@ + while (dwords) { + int push = dwords > 2047 ? 2047 : dwords; + +- if (RING_SPACE(chan, push + 1)) { +- nouveau_fbcon_gpu_lockup(info); +- cfb_imageblit(info, image); +- return; +- } ++ ret = RING_SPACE(chan, push + 1); ++ if (ret) ++ return ret; + + dwords -= push; + +@@ -148,6 +124,7 @@ + } + + FIRE_RING(chan); ++ return 0; + } + + int +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv50_fifo.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv50_fifo.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv50_fifo.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv50_fifo.c 2010-11-22 06:33:32.000000000 +0100 +@@ -44,7 +44,8 @@ + + /* We never schedule channel 0 or 127 */ + for (i = 1, nr = 0; i < 127; i++) { +- if (dev_priv->fifos[i] && dev_priv->fifos[i]->ramfc) { ++ if (dev_priv->channels.ptr[i] && ++ dev_priv->channels.ptr[i]->ramfc) { + nv_wo32(cur, (nr * 4), i); + nr++; + } +@@ -60,7 +61,7 @@ + nv50_fifo_channel_enable(struct drm_device *dev, int channel) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_channel *chan = dev_priv->fifos[channel]; ++ struct nouveau_channel *chan = dev_priv->channels.ptr[channel]; + uint32_t inst; + + NV_DEBUG(dev, "ch%d\n", channel); +@@ -105,6 +106,7 @@ + { + NV_DEBUG(dev, "\n"); + ++ nouveau_irq_register(dev, 8, nv04_fifo_isr); + nv_wr32(dev, NV03_PFIFO_INTR_0, 0xFFFFFFFF); + nv_wr32(dev, NV03_PFIFO_INTR_EN_0, 0xFFFFFFFF); + } +@@ -118,7 +120,7 @@ + NV_DEBUG(dev, "\n"); + + for (i = 0; i < NV50_PFIFO_CTX_TABLE__SIZE; i++) { +- if (dev_priv->fifos[i]) ++ if (dev_priv->channels.ptr[i]) + nv50_fifo_channel_enable(dev, i); + else + nv50_fifo_channel_disable(dev, i); +@@ -206,6 +208,9 @@ + if (!pfifo->playlist[0]) + return; + ++ nv_wr32(dev, 0x2140, 0x00000000); ++ nouveau_irq_unregister(dev, 8); ++ + nouveau_gpuobj_ref(NULL, &pfifo->playlist[0]); + nouveau_gpuobj_ref(NULL, &pfifo->playlist[1]); + } +@@ -291,10 +296,23 @@ + nv50_fifo_destroy_context(struct nouveau_channel *chan) + { + struct drm_device *dev = chan->dev; ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_fifo_engine *pfifo = &dev_priv->engine.fifo; + struct nouveau_gpuobj *ramfc = NULL; ++ unsigned long flags; + + NV_DEBUG(dev, "ch%d\n", chan->id); + ++ spin_lock_irqsave(&dev_priv->context_switch_lock, flags); ++ pfifo->reassign(dev, false); ++ ++ /* Unload the context if it's the currently active one */ ++ if (pfifo->channel_id(dev) == chan->id) { ++ pfifo->disable(dev); ++ pfifo->unload_context(dev); ++ pfifo->enable(dev); ++ } ++ + /* This will ensure the channel is seen as disabled. */ + nouveau_gpuobj_ref(chan->ramfc, &ramfc); + nouveau_gpuobj_ref(NULL, &chan->ramfc); +@@ -305,6 +323,10 @@ + nv50_fifo_channel_disable(dev, 127); + nv50_fifo_playlist_update(dev); + ++ pfifo->reassign(dev, true); ++ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); ++ ++ /* Free the channel resources */ + nouveau_gpuobj_ref(NULL, &ramfc); + nouveau_gpuobj_ref(NULL, &chan->cache); + } +@@ -392,7 +414,7 @@ + if (chid < 1 || chid >= dev_priv->engine.fifo.channels - 1) + return 0; + +- chan = dev_priv->fifos[chid]; ++ chan = dev_priv->channels.ptr[chid]; + if (!chan) { + NV_ERROR(dev, "Inactive channel on PFIFO: %d\n", chid); + return -EINVAL; +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv50_gpio.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv50_gpio.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv50_gpio.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv50_gpio.c 2010-11-22 06:33:32.000000000 +0100 +@@ -26,6 +26,28 @@ + #include "nouveau_drv.h" + #include "nouveau_hw.h" + ++#include "nv50_display.h" ++ ++static void nv50_gpio_isr(struct drm_device *dev); ++static void nv50_gpio_isr_bh(struct work_struct *work); ++ ++struct nv50_gpio_priv { ++ struct list_head handlers; ++ spinlock_t lock; ++}; ++ ++struct nv50_gpio_handler { ++ struct drm_device *dev; ++ struct list_head head; ++ struct work_struct work; ++ bool inhibit; ++ ++ struct dcb_gpio_entry *gpio; ++ ++ void (*handler)(void *data, int state); ++ void *data; ++}; ++ + static int + nv50_gpio_location(struct dcb_gpio_entry *gpio, uint32_t *reg, uint32_t *shift) + { +@@ -75,29 +97,123 @@ + return 0; + } + ++int ++nv50_gpio_irq_register(struct drm_device *dev, enum dcb_gpio_tag tag, ++ void (*handler)(void *, int), void *data) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_gpio_engine *pgpio = &dev_priv->engine.gpio; ++ struct nv50_gpio_priv *priv = pgpio->priv; ++ struct nv50_gpio_handler *gpioh; ++ struct dcb_gpio_entry *gpio; ++ unsigned long flags; ++ ++ gpio = nouveau_bios_gpio_entry(dev, tag); ++ if (!gpio) ++ return -ENOENT; ++ ++ gpioh = kzalloc(sizeof(*gpioh), GFP_KERNEL); ++ if (!gpioh) ++ return -ENOMEM; ++ ++ INIT_WORK(&gpioh->work, nv50_gpio_isr_bh); ++ gpioh->dev = dev; ++ gpioh->gpio = gpio; ++ gpioh->handler = handler; ++ gpioh->data = data; ++ ++ spin_lock_irqsave(&priv->lock, flags); ++ list_add(&gpioh->head, &priv->handlers); ++ spin_unlock_irqrestore(&priv->lock, flags); ++ return 0; ++} ++ + void +-nv50_gpio_irq_enable(struct drm_device *dev, enum dcb_gpio_tag tag, bool on) ++nv50_gpio_irq_unregister(struct drm_device *dev, enum dcb_gpio_tag tag, ++ void (*handler)(void *, int), void *data) + { ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_gpio_engine *pgpio = &dev_priv->engine.gpio; ++ struct nv50_gpio_priv *priv = pgpio->priv; ++ struct nv50_gpio_handler *gpioh, *tmp; + struct dcb_gpio_entry *gpio; +- u32 reg, mask; ++ unsigned long flags; + + gpio = nouveau_bios_gpio_entry(dev, tag); +- if (!gpio) { +- NV_ERROR(dev, "gpio tag 0x%02x not found\n", tag); ++ if (!gpio) + return; ++ ++ spin_lock_irqsave(&priv->lock, flags); ++ list_for_each_entry_safe(gpioh, tmp, &priv->handlers, head) { ++ if (gpioh->gpio != gpio || ++ gpioh->handler != handler || ++ gpioh->data != data) ++ continue; ++ list_del(&gpioh->head); ++ kfree(gpioh); + } ++ spin_unlock_irqrestore(&priv->lock, flags); ++} ++ ++bool ++nv50_gpio_irq_enable(struct drm_device *dev, enum dcb_gpio_tag tag, bool on) ++{ ++ struct dcb_gpio_entry *gpio; ++ u32 reg, mask; ++ ++ gpio = nouveau_bios_gpio_entry(dev, tag); ++ if (!gpio) ++ return false; + + reg = gpio->line < 16 ? 0xe050 : 0xe070; + mask = 0x00010001 << (gpio->line & 0xf); + + nv_wr32(dev, reg + 4, mask); +- nv_mask(dev, reg + 0, mask, on ? mask : 0); ++ reg = nv_mask(dev, reg + 0, mask, on ? mask : 0); ++ return (reg & mask) == mask; ++} ++ ++static int ++nv50_gpio_create(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_gpio_engine *pgpio = &dev_priv->engine.gpio; ++ struct nv50_gpio_priv *priv; ++ ++ priv = kzalloc(sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ ++ INIT_LIST_HEAD(&priv->handlers); ++ spin_lock_init(&priv->lock); ++ pgpio->priv = priv; ++ return 0; ++} ++ ++static void ++nv50_gpio_destroy(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_gpio_engine *pgpio = &dev_priv->engine.gpio; ++ ++ kfree(pgpio->priv); ++ pgpio->priv = NULL; + } + + int + nv50_gpio_init(struct drm_device *dev) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_gpio_engine *pgpio = &dev_priv->engine.gpio; ++ struct nv50_gpio_priv *priv; ++ int ret; ++ ++ if (!pgpio->priv) { ++ ret = nv50_gpio_create(dev); ++ if (ret) ++ return ret; ++ } ++ priv = pgpio->priv; + + /* disable, and ack any pending gpio interrupts */ + nv_wr32(dev, 0xe050, 0x00000000); +@@ -107,5 +223,77 @@ + nv_wr32(dev, 0xe074, 0xffffffff); + } + ++ nouveau_irq_register(dev, 21, nv50_gpio_isr); + return 0; + } ++ ++void ++nv50_gpio_fini(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ ++ nv_wr32(dev, 0xe050, 0x00000000); ++ if (dev_priv->chipset >= 0x90) ++ nv_wr32(dev, 0xe070, 0x00000000); ++ nouveau_irq_unregister(dev, 21); ++ ++ nv50_gpio_destroy(dev); ++} ++ ++static void ++nv50_gpio_isr_bh(struct work_struct *work) ++{ ++ struct nv50_gpio_handler *gpioh = ++ container_of(work, struct nv50_gpio_handler, work); ++ struct drm_nouveau_private *dev_priv = gpioh->dev->dev_private; ++ struct nouveau_gpio_engine *pgpio = &dev_priv->engine.gpio; ++ struct nv50_gpio_priv *priv = pgpio->priv; ++ unsigned long flags; ++ int state; ++ ++ state = pgpio->get(gpioh->dev, gpioh->gpio->tag); ++ if (state < 0) ++ return; ++ ++ gpioh->handler(gpioh->data, state); ++ ++ spin_lock_irqsave(&priv->lock, flags); ++ gpioh->inhibit = false; ++ spin_unlock_irqrestore(&priv->lock, flags); ++} ++ ++static void ++nv50_gpio_isr(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_gpio_engine *pgpio = &dev_priv->engine.gpio; ++ struct nv50_gpio_priv *priv = pgpio->priv; ++ struct nv50_gpio_handler *gpioh; ++ u32 intr0, intr1 = 0; ++ u32 hi, lo, ch; ++ ++ intr0 = nv_rd32(dev, 0xe054) & nv_rd32(dev, 0xe050); ++ if (dev_priv->chipset >= 0x90) ++ intr1 = nv_rd32(dev, 0xe074) & nv_rd32(dev, 0xe070); ++ ++ hi = (intr0 & 0x0000ffff) | (intr1 << 16); ++ lo = (intr0 >> 16) | (intr1 & 0xffff0000); ++ ch = hi | lo; ++ ++ nv_wr32(dev, 0xe054, intr0); ++ if (dev_priv->chipset >= 0x90) ++ nv_wr32(dev, 0xe074, intr1); ++ ++ spin_lock(&priv->lock); ++ list_for_each_entry(gpioh, &priv->handlers, head) { ++ if (!(ch & (1 << gpioh->gpio->line))) ++ continue; ++ ++ if (gpioh->inhibit) ++ continue; ++ gpioh->inhibit = true; ++ ++ queue_work(dev_priv->wq, &gpioh->work); ++ } ++ spin_unlock(&priv->lock); ++} +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv50_graph.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv50_graph.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv50_graph.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv50_graph.c 2010-11-22 06:33:32.000000000 +0100 +@@ -29,6 +29,11 @@ + #include "nouveau_drv.h" + #include "nouveau_ramht.h" + #include "nouveau_grctx.h" ++#include "nouveau_dma.h" ++#include "nv50_evo.h" ++ ++static int nv50_graph_register(struct drm_device *); ++static void nv50_graph_isr(struct drm_device *); + + static void + nv50_graph_init_reset(struct drm_device *dev) +@@ -46,6 +51,7 @@ + { + NV_DEBUG(dev, "\n"); + ++ nouveau_irq_register(dev, 12, nv50_graph_isr); + nv_wr32(dev, NV03_PGRAPH_INTR, 0xffffffff); + nv_wr32(dev, 0x400138, 0xffffffff); + nv_wr32(dev, NV40_PGRAPH_INTR_EN, 0xffffffff); +@@ -145,12 +151,15 @@ + nv50_graph_init_reset(dev); + nv50_graph_init_regs__nv(dev); + nv50_graph_init_regs(dev); +- nv50_graph_init_intr(dev); + + ret = nv50_graph_init_ctxctl(dev); + if (ret) + return ret; + ++ ret = nv50_graph_register(dev); ++ if (ret) ++ return ret; ++ nv50_graph_init_intr(dev); + return 0; + } + +@@ -158,6 +167,8 @@ + nv50_graph_takedown(struct drm_device *dev) + { + NV_DEBUG(dev, "\n"); ++ nv_wr32(dev, 0x40013c, 0x00000000); ++ nouveau_irq_unregister(dev, 12); + } + + void +@@ -190,7 +201,7 @@ + inst = (inst & NV50_PGRAPH_CTXCTL_CUR_INSTANCE) << 12; + + for (i = 0; i < dev_priv->engine.fifo.channels; i++) { +- struct nouveau_channel *chan = dev_priv->fifos[i]; ++ struct nouveau_channel *chan = dev_priv->channels.ptr[i]; + + if (chan && chan->ramin && chan->ramin->vinst == inst) + return chan; +@@ -211,7 +222,7 @@ + + NV_DEBUG(dev, "ch%d\n", chan->id); + +- ret = nouveau_gpuobj_new(dev, chan, pgraph->grctx_size, 0x1000, ++ ret = nouveau_gpuobj_new(dev, chan, pgraph->grctx_size, 0, + NVOBJ_FLAG_ZERO_ALLOC | + NVOBJ_FLAG_ZERO_FREE, &chan->ramin_grctx); + if (ret) +@@ -242,17 +253,28 @@ + { + struct drm_device *dev = chan->dev; + struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; + int i, hdr = (dev_priv->chipset == 0x50) ? 0x200 : 0x20; ++ unsigned long flags; + + NV_DEBUG(dev, "ch%d\n", chan->id); + + if (!chan->ramin) + return; + ++ spin_lock_irqsave(&dev_priv->context_switch_lock, flags); ++ pgraph->fifo_access(dev, false); ++ ++ if (pgraph->channel(dev) == chan) ++ pgraph->unload_context(dev); ++ + for (i = hdr; i < hdr + 24; i += 4) + nv_wo32(chan->ramin, i, 0); + dev_priv->engine.instmem.flush(dev); + ++ pgraph->fifo_access(dev, true); ++ spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); ++ + nouveau_gpuobj_ref(NULL, &chan->ramin_grctx); + } + +@@ -306,7 +328,7 @@ + return 0; + } + +-void ++static void + nv50_graph_context_switch(struct drm_device *dev) + { + uint32_t inst; +@@ -322,8 +344,8 @@ + } + + static int +-nv50_graph_nvsw_dma_vblsem(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv50_graph_nvsw_dma_vblsem(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + struct nouveau_gpuobj *gpuobj; + +@@ -340,8 +362,8 @@ + } + + static int +-nv50_graph_nvsw_vblsem_offset(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv50_graph_nvsw_vblsem_offset(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + if (nouveau_notifier_offset(chan->nvsw.vblsem, &data)) + return -ERANGE; +@@ -351,16 +373,16 @@ + } + + static int +-nv50_graph_nvsw_vblsem_release_val(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv50_graph_nvsw_vblsem_release_val(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + chan->nvsw.vblsem_rval = data; + return 0; + } + + static int +-nv50_graph_nvsw_vblsem_release(struct nouveau_channel *chan, int grclass, +- int mthd, uint32_t data) ++nv50_graph_nvsw_vblsem_release(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) + { + struct drm_device *dev = chan->dev; + struct drm_nouveau_private *dev_priv = dev->dev_private; +@@ -368,40 +390,80 @@ + if (!chan->nvsw.vblsem || chan->nvsw.vblsem_offset == ~0 || data > 1) + return -EINVAL; + +- if (!(nv_rd32(dev, NV50_PDISPLAY_INTR_EN) & +- NV50_PDISPLAY_INTR_EN_VBLANK_CRTC_(data))) { +- nv_wr32(dev, NV50_PDISPLAY_INTR_1, +- NV50_PDISPLAY_INTR_1_VBLANK_CRTC_(data)); +- nv_wr32(dev, NV50_PDISPLAY_INTR_EN, nv_rd32(dev, +- NV50_PDISPLAY_INTR_EN) | +- NV50_PDISPLAY_INTR_EN_VBLANK_CRTC_(data)); +- } ++ drm_vblank_get(dev, data); + ++ chan->nvsw.vblsem_head = data; + list_add(&chan->nvsw.vbl_wait, &dev_priv->vbl_waiting); ++ + return 0; + } + +-static struct nouveau_pgraph_object_method nv50_graph_nvsw_methods[] = { +- { 0x018c, nv50_graph_nvsw_dma_vblsem }, +- { 0x0400, nv50_graph_nvsw_vblsem_offset }, +- { 0x0404, nv50_graph_nvsw_vblsem_release_val }, +- { 0x0408, nv50_graph_nvsw_vblsem_release }, +- {} +-}; ++static int ++nv50_graph_nvsw_mthd_page_flip(struct nouveau_channel *chan, ++ u32 class, u32 mthd, u32 data) ++{ ++ struct nouveau_page_flip_state s; + +-struct nouveau_pgraph_object_class nv50_graph_grclass[] = { +- { 0x506e, true, nv50_graph_nvsw_methods }, /* nvsw */ +- { 0x0030, false, NULL }, /* null */ +- { 0x5039, false, NULL }, /* m2mf */ +- { 0x502d, false, NULL }, /* 2d */ +- { 0x50c0, false, NULL }, /* compute */ +- { 0x85c0, false, NULL }, /* compute (nva3, nva5, nva8) */ +- { 0x5097, false, NULL }, /* tesla (nv50) */ +- { 0x8297, false, NULL }, /* tesla (nv8x/nv9x) */ +- { 0x8397, false, NULL }, /* tesla (nva0, nvaa, nvac) */ +- { 0x8597, false, NULL }, /* tesla (nva3, nva5, nva8) */ +- {} +-}; ++ if (!nouveau_finish_page_flip(chan, &s)) { ++ /* XXX - Do something here */ ++ } ++ ++ return 0; ++} ++ ++static int ++nv50_graph_register(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ ++ if (dev_priv->engine.graph.registered) ++ return 0; ++ ++ NVOBJ_CLASS(dev, 0x506e, SW); /* nvsw */ ++ NVOBJ_MTHD (dev, 0x506e, 0x018c, nv50_graph_nvsw_dma_vblsem); ++ NVOBJ_MTHD (dev, 0x506e, 0x0400, nv50_graph_nvsw_vblsem_offset); ++ NVOBJ_MTHD (dev, 0x506e, 0x0404, nv50_graph_nvsw_vblsem_release_val); ++ NVOBJ_MTHD (dev, 0x506e, 0x0408, nv50_graph_nvsw_vblsem_release); ++ NVOBJ_MTHD (dev, 0x506e, 0x0500, nv50_graph_nvsw_mthd_page_flip); ++ ++ NVOBJ_CLASS(dev, 0x0030, GR); /* null */ ++ NVOBJ_CLASS(dev, 0x5039, GR); /* m2mf */ ++ NVOBJ_CLASS(dev, 0x502d, GR); /* 2d */ ++ ++ /* tesla */ ++ if (dev_priv->chipset == 0x50) ++ NVOBJ_CLASS(dev, 0x5097, GR); /* tesla (nv50) */ ++ else ++ if (dev_priv->chipset < 0xa0) ++ NVOBJ_CLASS(dev, 0x8297, GR); /* tesla (nv8x/nv9x) */ ++ else { ++ switch (dev_priv->chipset) { ++ case 0xa0: ++ case 0xaa: ++ case 0xac: ++ NVOBJ_CLASS(dev, 0x8397, GR); ++ break; ++ case 0xa3: ++ case 0xa5: ++ case 0xa8: ++ NVOBJ_CLASS(dev, 0x8597, GR); ++ break; ++ case 0xaf: ++ NVOBJ_CLASS(dev, 0x8697, GR); ++ break; ++ } ++ } ++ ++ /* compute */ ++ NVOBJ_CLASS(dev, 0x50c0, GR); ++ if (dev_priv->chipset > 0xa0 && ++ dev_priv->chipset != 0xaa && ++ dev_priv->chipset != 0xac) ++ NVOBJ_CLASS(dev, 0x85c0, GR); ++ ++ dev_priv->engine.graph.registered = true; ++ return 0; ++} + + void + nv50_graph_tlb_flush(struct drm_device *dev) +@@ -454,3 +516,495 @@ + nv_mask(dev, 0x400500, 0x00000001, 0x00000001); + spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); + } ++ ++static struct nouveau_enum nv50_mp_exec_error_names[] = ++{ ++ { 3, "STACK_UNDERFLOW" }, ++ { 4, "QUADON_ACTIVE" }, ++ { 8, "TIMEOUT" }, ++ { 0x10, "INVALID_OPCODE" }, ++ { 0x40, "BREAKPOINT" }, ++ {} ++}; ++ ++static struct nouveau_bitfield nv50_graph_trap_m2mf[] = { ++ { 0x00000001, "NOTIFY" }, ++ { 0x00000002, "IN" }, ++ { 0x00000004, "OUT" }, ++ {} ++}; ++ ++static struct nouveau_bitfield nv50_graph_trap_vfetch[] = { ++ { 0x00000001, "FAULT" }, ++ {} ++}; ++ ++static struct nouveau_bitfield nv50_graph_trap_strmout[] = { ++ { 0x00000001, "FAULT" }, ++ {} ++}; ++ ++static struct nouveau_bitfield nv50_graph_trap_ccache[] = { ++ { 0x00000001, "FAULT" }, ++ {} ++}; ++ ++/* There must be a *lot* of these. Will take some time to gather them up. */ ++static struct nouveau_enum nv50_data_error_names[] = { ++ { 4, "INVALID_VALUE" }, ++ { 5, "INVALID_ENUM" }, ++ { 8, "INVALID_OBJECT" }, ++ { 0xc, "INVALID_BITFIELD" }, ++ { 0x28, "MP_NO_REG_SPACE" }, ++ { 0x2b, "MP_BLOCK_SIZE_MISMATCH" }, ++ {} ++}; ++ ++static struct nouveau_bitfield nv50_graph_intr[] = { ++ { 0x00000001, "NOTIFY" }, ++ { 0x00000002, "COMPUTE_QUERY" }, ++ { 0x00000010, "ILLEGAL_MTHD" }, ++ { 0x00000020, "ILLEGAL_CLASS" }, ++ { 0x00000040, "DOUBLE_NOTIFY" }, ++ { 0x00001000, "CONTEXT_SWITCH" }, ++ { 0x00010000, "BUFFER_NOTIFY" }, ++ { 0x00100000, "DATA_ERROR" }, ++ { 0x00200000, "TRAP" }, ++ { 0x01000000, "SINGLE_STEP" }, ++ {} ++}; ++ ++static void ++nv50_pgraph_mp_trap(struct drm_device *dev, int tpid, int display) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ uint32_t units = nv_rd32(dev, 0x1540); ++ uint32_t addr, mp10, status, pc, oplow, ophigh; ++ int i; ++ int mps = 0; ++ for (i = 0; i < 4; i++) { ++ if (!(units & 1 << (i+24))) ++ continue; ++ if (dev_priv->chipset < 0xa0) ++ addr = 0x408200 + (tpid << 12) + (i << 7); ++ else ++ addr = 0x408100 + (tpid << 11) + (i << 7); ++ mp10 = nv_rd32(dev, addr + 0x10); ++ status = nv_rd32(dev, addr + 0x14); ++ if (!status) ++ continue; ++ if (display) { ++ nv_rd32(dev, addr + 0x20); ++ pc = nv_rd32(dev, addr + 0x24); ++ oplow = nv_rd32(dev, addr + 0x70); ++ ophigh= nv_rd32(dev, addr + 0x74); ++ NV_INFO(dev, "PGRAPH_TRAP_MP_EXEC - " ++ "TP %d MP %d: ", tpid, i); ++ nouveau_enum_print(nv50_mp_exec_error_names, status); ++ printk(" at %06x warp %d, opcode %08x %08x\n", ++ pc&0xffffff, pc >> 24, ++ oplow, ophigh); ++ } ++ nv_wr32(dev, addr + 0x10, mp10); ++ nv_wr32(dev, addr + 0x14, 0); ++ mps++; ++ } ++ if (!mps && display) ++ NV_INFO(dev, "PGRAPH_TRAP_MP_EXEC - TP %d: " ++ "No MPs claiming errors?\n", tpid); ++} ++ ++static void ++nv50_pgraph_tp_trap(struct drm_device *dev, int type, uint32_t ustatus_old, ++ uint32_t ustatus_new, int display, const char *name) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ int tps = 0; ++ uint32_t units = nv_rd32(dev, 0x1540); ++ int i, r; ++ uint32_t ustatus_addr, ustatus; ++ for (i = 0; i < 16; i++) { ++ if (!(units & (1 << i))) ++ continue; ++ if (dev_priv->chipset < 0xa0) ++ ustatus_addr = ustatus_old + (i << 12); ++ else ++ ustatus_addr = ustatus_new + (i << 11); ++ ustatus = nv_rd32(dev, ustatus_addr) & 0x7fffffff; ++ if (!ustatus) ++ continue; ++ tps++; ++ switch (type) { ++ case 6: /* texture error... unknown for now */ ++ nv50_fb_vm_trap(dev, display, name); ++ if (display) { ++ NV_ERROR(dev, "magic set %d:\n", i); ++ for (r = ustatus_addr + 4; r <= ustatus_addr + 0x10; r += 4) ++ NV_ERROR(dev, "\t0x%08x: 0x%08x\n", r, ++ nv_rd32(dev, r)); ++ } ++ break; ++ case 7: /* MP error */ ++ if (ustatus & 0x00010000) { ++ nv50_pgraph_mp_trap(dev, i, display); ++ ustatus &= ~0x00010000; ++ } ++ break; ++ case 8: /* TPDMA error */ ++ { ++ uint32_t e0c = nv_rd32(dev, ustatus_addr + 4); ++ uint32_t e10 = nv_rd32(dev, ustatus_addr + 8); ++ uint32_t e14 = nv_rd32(dev, ustatus_addr + 0xc); ++ uint32_t e18 = nv_rd32(dev, ustatus_addr + 0x10); ++ uint32_t e1c = nv_rd32(dev, ustatus_addr + 0x14); ++ uint32_t e20 = nv_rd32(dev, ustatus_addr + 0x18); ++ uint32_t e24 = nv_rd32(dev, ustatus_addr + 0x1c); ++ nv50_fb_vm_trap(dev, display, name); ++ /* 2d engine destination */ ++ if (ustatus & 0x00000010) { ++ if (display) { ++ NV_INFO(dev, "PGRAPH_TRAP_TPDMA_2D - TP %d - Unknown fault at address %02x%08x\n", ++ i, e14, e10); ++ NV_INFO(dev, "PGRAPH_TRAP_TPDMA_2D - TP %d - e0c: %08x, e18: %08x, e1c: %08x, e20: %08x, e24: %08x\n", ++ i, e0c, e18, e1c, e20, e24); ++ } ++ ustatus &= ~0x00000010; ++ } ++ /* Render target */ ++ if (ustatus & 0x00000040) { ++ if (display) { ++ NV_INFO(dev, "PGRAPH_TRAP_TPDMA_RT - TP %d - Unknown fault at address %02x%08x\n", ++ i, e14, e10); ++ NV_INFO(dev, "PGRAPH_TRAP_TPDMA_RT - TP %d - e0c: %08x, e18: %08x, e1c: %08x, e20: %08x, e24: %08x\n", ++ i, e0c, e18, e1c, e20, e24); ++ } ++ ustatus &= ~0x00000040; ++ } ++ /* CUDA memory: l[], g[] or stack. */ ++ if (ustatus & 0x00000080) { ++ if (display) { ++ if (e18 & 0x80000000) { ++ /* g[] read fault? */ ++ NV_INFO(dev, "PGRAPH_TRAP_TPDMA - TP %d - Global read fault at address %02x%08x\n", ++ i, e14, e10 | ((e18 >> 24) & 0x1f)); ++ e18 &= ~0x1f000000; ++ } else if (e18 & 0xc) { ++ /* g[] write fault? */ ++ NV_INFO(dev, "PGRAPH_TRAP_TPDMA - TP %d - Global write fault at address %02x%08x\n", ++ i, e14, e10 | ((e18 >> 7) & 0x1f)); ++ e18 &= ~0x00000f80; ++ } else { ++ NV_INFO(dev, "PGRAPH_TRAP_TPDMA - TP %d - Unknown CUDA fault at address %02x%08x\n", ++ i, e14, e10); ++ } ++ NV_INFO(dev, "PGRAPH_TRAP_TPDMA - TP %d - e0c: %08x, e18: %08x, e1c: %08x, e20: %08x, e24: %08x\n", ++ i, e0c, e18, e1c, e20, e24); ++ } ++ ustatus &= ~0x00000080; ++ } ++ } ++ break; ++ } ++ if (ustatus) { ++ if (display) ++ NV_INFO(dev, "%s - TP%d: Unhandled ustatus 0x%08x\n", name, i, ustatus); ++ } ++ nv_wr32(dev, ustatus_addr, 0xc0000000); ++ } ++ ++ if (!tps && display) ++ NV_INFO(dev, "%s - No TPs claiming errors?\n", name); ++} ++ ++static int ++nv50_pgraph_trap_handler(struct drm_device *dev, u32 display, u64 inst, u32 chid) ++{ ++ u32 status = nv_rd32(dev, 0x400108); ++ u32 ustatus; ++ ++ if (!status && display) { ++ NV_INFO(dev, "PGRAPH - TRAP: no units reporting traps?\n"); ++ return 1; ++ } ++ ++ /* DISPATCH: Relays commands to other units and handles NOTIFY, ++ * COND, QUERY. If you get a trap from it, the command is still stuck ++ * in DISPATCH and you need to do something about it. */ ++ if (status & 0x001) { ++ ustatus = nv_rd32(dev, 0x400804) & 0x7fffffff; ++ if (!ustatus && display) { ++ NV_INFO(dev, "PGRAPH_TRAP_DISPATCH - no ustatus?\n"); ++ } ++ ++ nv_wr32(dev, 0x400500, 0x00000000); ++ ++ /* Known to be triggered by screwed up NOTIFY and COND... */ ++ if (ustatus & 0x00000001) { ++ u32 addr = nv_rd32(dev, 0x400808); ++ u32 subc = (addr & 0x00070000) >> 16; ++ u32 mthd = (addr & 0x00001ffc); ++ u32 datal = nv_rd32(dev, 0x40080c); ++ u32 datah = nv_rd32(dev, 0x400810); ++ u32 class = nv_rd32(dev, 0x400814); ++ u32 r848 = nv_rd32(dev, 0x400848); ++ ++ NV_INFO(dev, "PGRAPH - TRAP DISPATCH_FAULT\n"); ++ if (display && (addr & 0x80000000)) { ++ NV_INFO(dev, "PGRAPH - ch %d (0x%010llx) " ++ "subc %d class 0x%04x mthd 0x%04x " ++ "data 0x%08x%08x " ++ "400808 0x%08x 400848 0x%08x\n", ++ chid, inst, subc, class, mthd, datah, ++ datal, addr, r848); ++ } else ++ if (display) { ++ NV_INFO(dev, "PGRAPH - no stuck command?\n"); ++ } ++ ++ nv_wr32(dev, 0x400808, 0); ++ nv_wr32(dev, 0x4008e8, nv_rd32(dev, 0x4008e8) & 3); ++ nv_wr32(dev, 0x400848, 0); ++ ustatus &= ~0x00000001; ++ } ++ ++ if (ustatus & 0x00000002) { ++ u32 addr = nv_rd32(dev, 0x40084c); ++ u32 subc = (addr & 0x00070000) >> 16; ++ u32 mthd = (addr & 0x00001ffc); ++ u32 data = nv_rd32(dev, 0x40085c); ++ u32 class = nv_rd32(dev, 0x400814); ++ ++ NV_INFO(dev, "PGRAPH - TRAP DISPATCH_QUERY\n"); ++ if (display && (addr & 0x80000000)) { ++ NV_INFO(dev, "PGRAPH - ch %d (0x%010llx) " ++ "subc %d class 0x%04x mthd 0x%04x " ++ "data 0x%08x 40084c 0x%08x\n", ++ chid, inst, subc, class, mthd, ++ data, addr); ++ } else ++ if (display) { ++ NV_INFO(dev, "PGRAPH - no stuck command?\n"); ++ } ++ ++ nv_wr32(dev, 0x40084c, 0); ++ ustatus &= ~0x00000002; ++ } ++ ++ if (ustatus && display) { ++ NV_INFO(dev, "PGRAPH - TRAP_DISPATCH (unknown " ++ "0x%08x)\n", ustatus); ++ } ++ ++ nv_wr32(dev, 0x400804, 0xc0000000); ++ nv_wr32(dev, 0x400108, 0x001); ++ status &= ~0x001; ++ if (!status) ++ return 0; ++ } ++ ++ /* M2MF: Memory to memory copy engine. */ ++ if (status & 0x002) { ++ u32 ustatus = nv_rd32(dev, 0x406800) & 0x7fffffff; ++ if (display) { ++ NV_INFO(dev, "PGRAPH - TRAP_M2MF"); ++ nouveau_bitfield_print(nv50_graph_trap_m2mf, ustatus); ++ printk("\n"); ++ NV_INFO(dev, "PGRAPH - TRAP_M2MF %08x %08x %08x %08x\n", ++ nv_rd32(dev, 0x406804), nv_rd32(dev, 0x406808), ++ nv_rd32(dev, 0x40680c), nv_rd32(dev, 0x406810)); ++ ++ } ++ ++ /* No sane way found yet -- just reset the bugger. */ ++ nv_wr32(dev, 0x400040, 2); ++ nv_wr32(dev, 0x400040, 0); ++ nv_wr32(dev, 0x406800, 0xc0000000); ++ nv_wr32(dev, 0x400108, 0x002); ++ status &= ~0x002; ++ } ++ ++ /* VFETCH: Fetches data from vertex buffers. */ ++ if (status & 0x004) { ++ u32 ustatus = nv_rd32(dev, 0x400c04) & 0x7fffffff; ++ if (display) { ++ NV_INFO(dev, "PGRAPH - TRAP_VFETCH"); ++ nouveau_bitfield_print(nv50_graph_trap_vfetch, ustatus); ++ printk("\n"); ++ NV_INFO(dev, "PGRAPH - TRAP_VFETCH %08x %08x %08x %08x\n", ++ nv_rd32(dev, 0x400c00), nv_rd32(dev, 0x400c08), ++ nv_rd32(dev, 0x400c0c), nv_rd32(dev, 0x400c10)); ++ } ++ ++ nv_wr32(dev, 0x400c04, 0xc0000000); ++ nv_wr32(dev, 0x400108, 0x004); ++ status &= ~0x004; ++ } ++ ++ /* STRMOUT: DirectX streamout / OpenGL transform feedback. */ ++ if (status & 0x008) { ++ ustatus = nv_rd32(dev, 0x401800) & 0x7fffffff; ++ if (display) { ++ NV_INFO(dev, "PGRAPH - TRAP_STRMOUT"); ++ nouveau_bitfield_print(nv50_graph_trap_strmout, ustatus); ++ printk("\n"); ++ NV_INFO(dev, "PGRAPH - TRAP_STRMOUT %08x %08x %08x %08x\n", ++ nv_rd32(dev, 0x401804), nv_rd32(dev, 0x401808), ++ nv_rd32(dev, 0x40180c), nv_rd32(dev, 0x401810)); ++ ++ } ++ ++ /* No sane way found yet -- just reset the bugger. */ ++ nv_wr32(dev, 0x400040, 0x80); ++ nv_wr32(dev, 0x400040, 0); ++ nv_wr32(dev, 0x401800, 0xc0000000); ++ nv_wr32(dev, 0x400108, 0x008); ++ status &= ~0x008; ++ } ++ ++ /* CCACHE: Handles code and c[] caches and fills them. */ ++ if (status & 0x010) { ++ ustatus = nv_rd32(dev, 0x405018) & 0x7fffffff; ++ if (display) { ++ NV_INFO(dev, "PGRAPH - TRAP_CCACHE"); ++ nouveau_bitfield_print(nv50_graph_trap_ccache, ustatus); ++ printk("\n"); ++ NV_INFO(dev, "PGRAPH - TRAP_CCACHE %08x %08x %08x %08x" ++ " %08x %08x %08x\n", ++ nv_rd32(dev, 0x405800), nv_rd32(dev, 0x405804), ++ nv_rd32(dev, 0x405808), nv_rd32(dev, 0x40580c), ++ nv_rd32(dev, 0x405810), nv_rd32(dev, 0x405814), ++ nv_rd32(dev, 0x40581c)); ++ ++ } ++ ++ nv_wr32(dev, 0x405018, 0xc0000000); ++ nv_wr32(dev, 0x400108, 0x010); ++ status &= ~0x010; ++ } ++ ++ /* Unknown, not seen yet... 0x402000 is the only trap status reg ++ * remaining, so try to handle it anyway. Perhaps related to that ++ * unknown DMA slot on tesla? */ ++ if (status & 0x20) { ++ ustatus = nv_rd32(dev, 0x402000) & 0x7fffffff; ++ if (display) ++ NV_INFO(dev, "PGRAPH - TRAP_UNKC04 0x%08x\n", ustatus); ++ nv_wr32(dev, 0x402000, 0xc0000000); ++ /* no status modifiction on purpose */ ++ } ++ ++ /* TEXTURE: CUDA texturing units */ ++ if (status & 0x040) { ++ nv50_pgraph_tp_trap(dev, 6, 0x408900, 0x408600, display, ++ "PGRAPH - TRAP_TEXTURE"); ++ nv_wr32(dev, 0x400108, 0x040); ++ status &= ~0x040; ++ } ++ ++ /* MP: CUDA execution engines. */ ++ if (status & 0x080) { ++ nv50_pgraph_tp_trap(dev, 7, 0x408314, 0x40831c, display, ++ "PGRAPH - TRAP_MP"); ++ nv_wr32(dev, 0x400108, 0x080); ++ status &= ~0x080; ++ } ++ ++ /* TPDMA: Handles TP-initiated uncached memory accesses: ++ * l[], g[], stack, 2d surfaces, render targets. */ ++ if (status & 0x100) { ++ nv50_pgraph_tp_trap(dev, 8, 0x408e08, 0x408708, display, ++ "PGRAPH - TRAP_TPDMA"); ++ nv_wr32(dev, 0x400108, 0x100); ++ status &= ~0x100; ++ } ++ ++ if (status) { ++ if (display) ++ NV_INFO(dev, "PGRAPH - TRAP: unknown 0x%08x\n", status); ++ nv_wr32(dev, 0x400108, status); ++ } ++ ++ return 1; ++} ++ ++static int ++nv50_graph_isr_chid(struct drm_device *dev, u64 inst) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_channel *chan; ++ unsigned long flags; ++ int i; ++ ++ spin_lock_irqsave(&dev_priv->channels.lock, flags); ++ for (i = 0; i < dev_priv->engine.fifo.channels; i++) { ++ chan = dev_priv->channels.ptr[i]; ++ if (!chan || !chan->ramin) ++ continue; ++ ++ if (inst == chan->ramin->vinst) ++ break; ++ } ++ spin_unlock_irqrestore(&dev_priv->channels.lock, flags); ++ return i; ++} ++ ++static void ++nv50_graph_isr(struct drm_device *dev) ++{ ++ u32 stat; ++ ++ while ((stat = nv_rd32(dev, 0x400100))) { ++ u64 inst = (u64)(nv_rd32(dev, 0x40032c) & 0x0fffffff) << 12; ++ u32 chid = nv50_graph_isr_chid(dev, inst); ++ u32 addr = nv_rd32(dev, NV04_PGRAPH_TRAPPED_ADDR); ++ u32 subc = (addr & 0x00070000) >> 16; ++ u32 mthd = (addr & 0x00001ffc); ++ u32 data = nv_rd32(dev, NV04_PGRAPH_TRAPPED_DATA); ++ u32 class = nv_rd32(dev, 0x400814); ++ u32 show = stat; ++ ++ if (stat & 0x00000010) { ++ if (!nouveau_gpuobj_mthd_call2(dev, chid, class, ++ mthd, data)) ++ show &= ~0x00000010; ++ } ++ ++ if (stat & 0x00001000) { ++ nv_wr32(dev, 0x400500, 0x00000000); ++ nv_wr32(dev, 0x400100, 0x00001000); ++ nv_mask(dev, 0x40013c, 0x00001000, 0x00000000); ++ nv50_graph_context_switch(dev); ++ stat &= ~0x00001000; ++ show &= ~0x00001000; ++ } ++ ++ show = (show && nouveau_ratelimit()) ? show : 0; ++ ++ if (show & 0x00100000) { ++ u32 ecode = nv_rd32(dev, 0x400110); ++ NV_INFO(dev, "PGRAPH - DATA_ERROR "); ++ nouveau_enum_print(nv50_data_error_names, ecode); ++ printk("\n"); ++ } ++ ++ if (stat & 0x00200000) { ++ if (!nv50_pgraph_trap_handler(dev, show, inst, chid)) ++ show &= ~0x00200000; ++ } ++ ++ nv_wr32(dev, 0x400100, stat); ++ nv_wr32(dev, 0x400500, 0x00010001); ++ ++ if (show) { ++ NV_INFO(dev, "PGRAPH -"); ++ nouveau_bitfield_print(nv50_graph_intr, show); ++ printk("\n"); ++ NV_INFO(dev, "PGRAPH - ch %d (0x%010llx) subc %d " ++ "class 0x%04x mthd 0x%04x data 0x%08x\n", ++ chid, inst, subc, class, mthd, data); ++ } ++ } ++ ++ if (nv_rd32(dev, 0x400824) & (1 << 31)) ++ nv_wr32(dev, 0x400824, nv_rd32(dev, 0x400824) & ~(1 << 31)); ++} +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv50_instmem.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv50_instmem.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv50_instmem.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv50_instmem.c 2010-11-22 06:33:32.000000000 +0100 +@@ -131,10 +131,10 @@ + } + + /* we need a channel to plug into the hw to control the BARs */ +- ret = nv50_channel_new(dev, 128*1024, &dev_priv->fifos[0]); ++ ret = nv50_channel_new(dev, 128*1024, &dev_priv->channels.ptr[0]); + if (ret) + return ret; +- chan = dev_priv->fifos[127] = dev_priv->fifos[0]; ++ chan = dev_priv->channels.ptr[127] = dev_priv->channels.ptr[0]; + + /* allocate page table for PRAMIN BAR */ + ret = nouveau_gpuobj_new(dev, chan, (dev_priv->ramin_size >> 12) * 8, +@@ -157,10 +157,7 @@ + nv_wo32(priv->pramin_bar, 0x10, 0x00000000); + nv_wo32(priv->pramin_bar, 0x14, 0x00000000); + +- /* map channel into PRAMIN, gpuobj didn't do it for us */ +- ret = nv50_instmem_bind(dev, chan->ramin); +- if (ret) +- return ret; ++ nv50_instmem_map(chan->ramin); + + /* poke regs... */ + nv_wr32(dev, 0x001704, 0x00000000 | (chan->ramin->vinst >> 12)); +@@ -240,7 +237,7 @@ + { + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nv50_instmem_priv *priv = dev_priv->engine.instmem.priv; +- struct nouveau_channel *chan = dev_priv->fifos[0]; ++ struct nouveau_channel *chan = dev_priv->channels.ptr[0]; + int i; + + NV_DEBUG(dev, "\n"); +@@ -264,8 +261,8 @@ + nouveau_gpuobj_ref(NULL, &chan->vm_vram_pt[i]); + dev_priv->vm_vram_pt_nr = 0; + +- nv50_channel_del(&dev_priv->fifos[0]); +- dev_priv->fifos[127] = NULL; ++ nv50_channel_del(&dev_priv->channels.ptr[0]); ++ dev_priv->channels.ptr[127] = NULL; + } + + dev_priv->engine.instmem.priv = NULL; +@@ -276,16 +273,8 @@ + nv50_instmem_suspend(struct drm_device *dev) + { + struct drm_nouveau_private *dev_priv = dev->dev_private; +- struct nouveau_channel *chan = dev_priv->fifos[0]; +- struct nouveau_gpuobj *ramin = chan->ramin; +- int i; + +- ramin->im_backing_suspend = vmalloc(ramin->size); +- if (!ramin->im_backing_suspend) +- return -ENOMEM; +- +- for (i = 0; i < ramin->size; i += 4) +- ramin->im_backing_suspend[i/4] = nv_ri32(dev, i); ++ dev_priv->ramin_available = false; + return 0; + } + +@@ -294,18 +283,9 @@ + { + struct drm_nouveau_private *dev_priv = dev->dev_private; + struct nv50_instmem_priv *priv = dev_priv->engine.instmem.priv; +- struct nouveau_channel *chan = dev_priv->fifos[0]; +- struct nouveau_gpuobj *ramin = chan->ramin; ++ struct nouveau_channel *chan = dev_priv->channels.ptr[0]; + int i; + +- dev_priv->ramin_available = false; +- dev_priv->ramin_base = ~0; +- for (i = 0; i < ramin->size; i += 4) +- nv_wo32(ramin, i, ramin->im_backing_suspend[i/4]); +- dev_priv->ramin_available = true; +- vfree(ramin->im_backing_suspend); +- ramin->im_backing_suspend = NULL; +- + /* Poke the relevant regs, and pray it works :) */ + nv_wr32(dev, NV50_PUNK_BAR_CFG_BASE, (chan->ramin->vinst >> 12)); + nv_wr32(dev, NV50_PUNK_UNK1710, 0); +@@ -318,74 +298,95 @@ + + for (i = 0; i < 8; i++) + nv_wr32(dev, 0x1900 + (i*4), 0); ++ ++ dev_priv->ramin_available = true; + } + ++struct nv50_gpuobj_node { ++ struct nouveau_bo *vram; ++ struct drm_mm_node *ramin; ++ u32 align; ++}; ++ ++ + int +-nv50_instmem_populate(struct drm_device *dev, struct nouveau_gpuobj *gpuobj, +- uint32_t *sz) ++nv50_instmem_get(struct nouveau_gpuobj *gpuobj, u32 size, u32 align) + { ++ struct drm_device *dev = gpuobj->dev; ++ struct nv50_gpuobj_node *node = NULL; + int ret; + +- if (gpuobj->im_backing) +- return -EINVAL; +- +- *sz = ALIGN(*sz, 4096); +- if (*sz == 0) +- return -EINVAL; ++ node = kzalloc(sizeof(*node), GFP_KERNEL); ++ if (!node) ++ return -ENOMEM; ++ node->align = align; + +- ret = nouveau_bo_new(dev, NULL, *sz, 0, TTM_PL_FLAG_VRAM, 0, 0x0000, +- true, false, &gpuobj->im_backing); ++ ret = nouveau_bo_new(dev, NULL, size, align, TTM_PL_FLAG_VRAM, ++ 0, 0x0000, true, false, &node->vram); + if (ret) { + NV_ERROR(dev, "error getting PRAMIN backing pages: %d\n", ret); + return ret; + } + +- ret = nouveau_bo_pin(gpuobj->im_backing, TTM_PL_FLAG_VRAM); ++ ret = nouveau_bo_pin(node->vram, TTM_PL_FLAG_VRAM); + if (ret) { + NV_ERROR(dev, "error pinning PRAMIN backing VRAM: %d\n", ret); +- nouveau_bo_ref(NULL, &gpuobj->im_backing); ++ nouveau_bo_ref(NULL, &node->vram); + return ret; + } + +- gpuobj->vinst = gpuobj->im_backing->bo.mem.start << PAGE_SHIFT; ++ gpuobj->vinst = node->vram->bo.mem.start << PAGE_SHIFT; ++ gpuobj->size = node->vram->bo.mem.num_pages << PAGE_SHIFT; ++ gpuobj->node = node; + return 0; + } + + void +-nv50_instmem_clear(struct drm_device *dev, struct nouveau_gpuobj *gpuobj) ++nv50_instmem_put(struct nouveau_gpuobj *gpuobj) + { +- struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nv50_gpuobj_node *node; + +- if (gpuobj && gpuobj->im_backing) { +- if (gpuobj->im_bound) +- dev_priv->engine.instmem.unbind(dev, gpuobj); +- nouveau_bo_unpin(gpuobj->im_backing); +- nouveau_bo_ref(NULL, &gpuobj->im_backing); +- gpuobj->im_backing = NULL; +- } ++ node = gpuobj->node; ++ gpuobj->node = NULL; ++ ++ nouveau_bo_unpin(node->vram); ++ nouveau_bo_ref(NULL, &node->vram); ++ kfree(node); + } + + int +-nv50_instmem_bind(struct drm_device *dev, struct nouveau_gpuobj *gpuobj) ++nv50_instmem_map(struct nouveau_gpuobj *gpuobj) + { +- struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct drm_nouveau_private *dev_priv = gpuobj->dev->dev_private; + struct nv50_instmem_priv *priv = dev_priv->engine.instmem.priv; +- struct nouveau_gpuobj *pramin_pt = priv->pramin_pt; +- uint32_t pte, pte_end; +- uint64_t vram; +- +- if (!gpuobj->im_backing || !gpuobj->im_pramin || gpuobj->im_bound) +- return -EINVAL; ++ struct nv50_gpuobj_node *node = gpuobj->node; ++ struct drm_device *dev = gpuobj->dev; ++ struct drm_mm_node *ramin = NULL; ++ u32 pte, pte_end; ++ u64 vram; ++ ++ do { ++ if (drm_mm_pre_get(&dev_priv->ramin_heap)) ++ return -ENOMEM; ++ ++ spin_lock(&dev_priv->ramin_lock); ++ ramin = drm_mm_search_free(&dev_priv->ramin_heap, gpuobj->size, ++ node->align, 0); ++ if (ramin == NULL) { ++ spin_unlock(&dev_priv->ramin_lock); ++ return -ENOMEM; ++ } + +- NV_DEBUG(dev, "st=0x%lx sz=0x%lx\n", +- gpuobj->im_pramin->start, gpuobj->im_pramin->size); ++ ramin = drm_mm_get_block_atomic(ramin, gpuobj->size, node->align); ++ spin_unlock(&dev_priv->ramin_lock); ++ } while (ramin == NULL); + +- pte = (gpuobj->im_pramin->start >> 12) << 1; +- pte_end = ((gpuobj->im_pramin->size >> 12) << 1) + pte; ++ pte = (ramin->start >> 12) << 1; ++ pte_end = ((ramin->size >> 12) << 1) + pte; + vram = gpuobj->vinst; + + NV_DEBUG(dev, "pramin=0x%lx, pte=%d, pte_end=%d\n", +- gpuobj->im_pramin->start, pte, pte_end); ++ ramin->start, pte, pte_end); + NV_DEBUG(dev, "first vram page: 0x%010llx\n", gpuobj->vinst); + + vram |= 1; +@@ -395,8 +396,8 @@ + } + + while (pte < pte_end) { +- nv_wo32(pramin_pt, (pte * 4) + 0, lower_32_bits(vram)); +- nv_wo32(pramin_pt, (pte * 4) + 4, upper_32_bits(vram)); ++ nv_wo32(priv->pramin_pt, (pte * 4) + 0, lower_32_bits(vram)); ++ nv_wo32(priv->pramin_pt, (pte * 4) + 4, upper_32_bits(vram)); + vram += 0x1000; + pte += 2; + } +@@ -404,36 +405,36 @@ + + nv50_vm_flush(dev, 6); + +- gpuobj->im_bound = 1; ++ node->ramin = ramin; ++ gpuobj->pinst = ramin->start; + return 0; + } + +-int +-nv50_instmem_unbind(struct drm_device *dev, struct nouveau_gpuobj *gpuobj) ++void ++nv50_instmem_unmap(struct nouveau_gpuobj *gpuobj) + { +- struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct drm_nouveau_private *dev_priv = gpuobj->dev->dev_private; + struct nv50_instmem_priv *priv = dev_priv->engine.instmem.priv; +- uint32_t pte, pte_end; +- +- if (gpuobj->im_bound == 0) +- return -EINVAL; ++ struct nv50_gpuobj_node *node = gpuobj->node; ++ u32 pte, pte_end; + +- /* can happen during late takedown */ +- if (unlikely(!dev_priv->ramin_available)) +- return 0; ++ if (!node->ramin || !dev_priv->ramin_available) ++ return; + +- pte = (gpuobj->im_pramin->start >> 12) << 1; +- pte_end = ((gpuobj->im_pramin->size >> 12) << 1) + pte; ++ pte = (node->ramin->start >> 12) << 1; ++ pte_end = ((node->ramin->size >> 12) << 1) + pte; + + while (pte < pte_end) { + nv_wo32(priv->pramin_pt, (pte * 4) + 0, 0x00000000); + nv_wo32(priv->pramin_pt, (pte * 4) + 4, 0x00000000); + pte += 2; + } +- dev_priv->engine.instmem.flush(dev); ++ dev_priv->engine.instmem.flush(gpuobj->dev); + +- gpuobj->im_bound = 0; +- return 0; ++ spin_lock(&dev_priv->ramin_lock); ++ drm_mm_put_block(node->ramin); ++ node->ramin = NULL; ++ spin_unlock(&dev_priv->ramin_lock); + } + + void +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv84_crypt.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv84_crypt.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nv84_crypt.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nv84_crypt.c 2010-11-22 06:33:32.000000000 +0100 +@@ -0,0 +1,137 @@ ++/* ++ * Copyright 2010 Red Hat Inc. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included in ++ * all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR ++ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ++ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++ * OTHER DEALINGS IN THE SOFTWARE. ++ * ++ * Authors: Ben Skeggs ++ */ ++ ++#include "drmP.h" ++#include "nouveau_drv.h" ++#include "nouveau_util.h" ++ ++static void nv84_crypt_isr(struct drm_device *); ++ ++int ++nv84_crypt_create_context(struct nouveau_channel *chan) ++{ ++ struct drm_device *dev = chan->dev; ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_gpuobj *ramin = chan->ramin; ++ int ret; ++ ++ NV_DEBUG(dev, "ch%d\n", chan->id); ++ ++ ret = nouveau_gpuobj_new(dev, chan, 256, 0, ++ NVOBJ_FLAG_ZERO_ALLOC | NVOBJ_FLAG_ZERO_FREE, ++ &chan->crypt_ctx); ++ if (ret) ++ return ret; ++ ++ nv_wo32(ramin, 0xa0, 0x00190000); ++ nv_wo32(ramin, 0xa4, chan->crypt_ctx->vinst + 0xff); ++ nv_wo32(ramin, 0xa8, chan->crypt_ctx->vinst); ++ nv_wo32(ramin, 0xac, 0); ++ nv_wo32(ramin, 0xb0, 0); ++ nv_wo32(ramin, 0xb4, 0); ++ ++ dev_priv->engine.instmem.flush(dev); ++ return 0; ++} ++ ++void ++nv84_crypt_destroy_context(struct nouveau_channel *chan) ++{ ++ struct drm_device *dev = chan->dev; ++ u32 inst; ++ ++ if (!chan->crypt_ctx) ++ return; ++ ++ inst = (chan->ramin->vinst >> 12); ++ inst |= 0x80000000; ++ ++ /* mark context as invalid if still on the hardware, not ++ * doing this causes issues the next time PCRYPT is used, ++ * unsurprisingly :) ++ */ ++ nv_wr32(dev, 0x10200c, 0x00000000); ++ if (nv_rd32(dev, 0x102188) == inst) ++ nv_mask(dev, 0x102188, 0x80000000, 0x00000000); ++ if (nv_rd32(dev, 0x10218c) == inst) ++ nv_mask(dev, 0x10218c, 0x80000000, 0x00000000); ++ nv_wr32(dev, 0x10200c, 0x00000010); ++ ++ nouveau_gpuobj_ref(NULL, &chan->crypt_ctx); ++} ++ ++void ++nv84_crypt_tlb_flush(struct drm_device *dev) ++{ ++ nv50_vm_flush(dev, 0x0a); ++} ++ ++int ++nv84_crypt_init(struct drm_device *dev) ++{ ++ struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nouveau_crypt_engine *pcrypt = &dev_priv->engine.crypt; ++ ++ if (!pcrypt->registered) { ++ NVOBJ_CLASS(dev, 0x74c1, CRYPT); ++ pcrypt->registered = true; ++ } ++ ++ nv_mask(dev, 0x000200, 0x00004000, 0x00000000); ++ nv_mask(dev, 0x000200, 0x00004000, 0x00004000); ++ ++ nouveau_irq_register(dev, 14, nv84_crypt_isr); ++ nv_wr32(dev, 0x102130, 0xffffffff); ++ nv_wr32(dev, 0x102140, 0xffffffbf); ++ ++ nv_wr32(dev, 0x10200c, 0x00000010); ++ return 0; ++} ++ ++void ++nv84_crypt_fini(struct drm_device *dev) ++{ ++ nv_wr32(dev, 0x102140, 0x00000000); ++ nouveau_irq_unregister(dev, 14); ++} ++ ++static void ++nv84_crypt_isr(struct drm_device *dev) ++{ ++ u32 stat = nv_rd32(dev, 0x102130); ++ u32 mthd = nv_rd32(dev, 0x102190); ++ u32 data = nv_rd32(dev, 0x102194); ++ u32 inst = nv_rd32(dev, 0x102188) & 0x7fffffff; ++ int show = nouveau_ratelimit(); ++ ++ if (show) { ++ NV_INFO(dev, "PCRYPT_INTR: 0x%08x 0x%08x 0x%08x 0x%08x\n", ++ stat, mthd, data, inst); ++ } ++ ++ nv_wr32(dev, 0x102130, stat); ++ nv_wr32(dev, 0x10200c, 0x10); ++ ++ nv50_fb_vm_trap(dev, show, "PCRYPT"); ++} +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nvc0_instmem.c linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nvc0_instmem.c +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nvc0_instmem.c 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nvc0_instmem.c 2010-11-22 06:33:32.000000000 +0100 +@@ -26,67 +26,89 @@ + + #include "nouveau_drv.h" + ++struct nvc0_gpuobj_node { ++ struct nouveau_bo *vram; ++ struct drm_mm_node *ramin; ++ u32 align; ++}; ++ + int +-nvc0_instmem_populate(struct drm_device *dev, struct nouveau_gpuobj *gpuobj, +- uint32_t *size) ++nvc0_instmem_get(struct nouveau_gpuobj *gpuobj, u32 size, u32 align) + { ++ struct drm_device *dev = gpuobj->dev; ++ struct nvc0_gpuobj_node *node = NULL; + int ret; + +- *size = ALIGN(*size, 4096); +- if (*size == 0) +- return -EINVAL; ++ node = kzalloc(sizeof(*node), GFP_KERNEL); ++ if (!node) ++ return -ENOMEM; ++ node->align = align; + +- ret = nouveau_bo_new(dev, NULL, *size, 0, TTM_PL_FLAG_VRAM, 0, 0x0000, +- true, false, &gpuobj->im_backing); ++ ret = nouveau_bo_new(dev, NULL, size, align, TTM_PL_FLAG_VRAM, ++ 0, 0x0000, true, false, &node->vram); + if (ret) { + NV_ERROR(dev, "error getting PRAMIN backing pages: %d\n", ret); + return ret; + } + +- ret = nouveau_bo_pin(gpuobj->im_backing, TTM_PL_FLAG_VRAM); ++ ret = nouveau_bo_pin(node->vram, TTM_PL_FLAG_VRAM); + if (ret) { + NV_ERROR(dev, "error pinning PRAMIN backing VRAM: %d\n", ret); +- nouveau_bo_ref(NULL, &gpuobj->im_backing); ++ nouveau_bo_ref(NULL, &node->vram); + return ret; + } + +- gpuobj->vinst = gpuobj->im_backing->bo.mem.start << PAGE_SHIFT; ++ gpuobj->vinst = node->vram->bo.mem.start << PAGE_SHIFT; ++ gpuobj->size = node->vram->bo.mem.num_pages << PAGE_SHIFT; ++ gpuobj->node = node; + return 0; + } + + void +-nvc0_instmem_clear(struct drm_device *dev, struct nouveau_gpuobj *gpuobj) ++nvc0_instmem_put(struct nouveau_gpuobj *gpuobj) + { +- struct drm_nouveau_private *dev_priv = dev->dev_private; ++ struct nvc0_gpuobj_node *node; + +- if (gpuobj && gpuobj->im_backing) { +- if (gpuobj->im_bound) +- dev_priv->engine.instmem.unbind(dev, gpuobj); +- nouveau_bo_unpin(gpuobj->im_backing); +- nouveau_bo_ref(NULL, &gpuobj->im_backing); +- gpuobj->im_backing = NULL; +- } ++ node = gpuobj->node; ++ gpuobj->node = NULL; ++ ++ nouveau_bo_unpin(node->vram); ++ nouveau_bo_ref(NULL, &node->vram); ++ kfree(node); + } + + int +-nvc0_instmem_bind(struct drm_device *dev, struct nouveau_gpuobj *gpuobj) ++nvc0_instmem_map(struct nouveau_gpuobj *gpuobj) + { +- struct drm_nouveau_private *dev_priv = dev->dev_private; +- uint32_t pte, pte_end; +- uint64_t vram; +- +- if (!gpuobj->im_backing || !gpuobj->im_pramin || gpuobj->im_bound) +- return -EINVAL; +- +- NV_DEBUG(dev, "st=0x%lx sz=0x%lx\n", +- gpuobj->im_pramin->start, gpuobj->im_pramin->size); ++ struct drm_nouveau_private *dev_priv = gpuobj->dev->dev_private; ++ struct nvc0_gpuobj_node *node = gpuobj->node; ++ struct drm_device *dev = gpuobj->dev; ++ struct drm_mm_node *ramin = NULL; ++ u32 pte, pte_end; ++ u64 vram; ++ ++ do { ++ if (drm_mm_pre_get(&dev_priv->ramin_heap)) ++ return -ENOMEM; ++ ++ spin_lock(&dev_priv->ramin_lock); ++ ramin = drm_mm_search_free(&dev_priv->ramin_heap, gpuobj->size, ++ node->align, 0); ++ if (ramin == NULL) { ++ spin_unlock(&dev_priv->ramin_lock); ++ return -ENOMEM; ++ } ++ ++ ramin = drm_mm_get_block_atomic(ramin, gpuobj->size, node->align); ++ spin_unlock(&dev_priv->ramin_lock); ++ } while (ramin == NULL); + +- pte = gpuobj->im_pramin->start >> 12; +- pte_end = (gpuobj->im_pramin->size >> 12) + pte; ++ pte = (ramin->start >> 12) << 1; ++ pte_end = ((ramin->size >> 12) << 1) + pte; + vram = gpuobj->vinst; + + NV_DEBUG(dev, "pramin=0x%lx, pte=%d, pte_end=%d\n", +- gpuobj->im_pramin->start, pte, pte_end); ++ ramin->start, pte, pte_end); + NV_DEBUG(dev, "first vram page: 0x%010llx\n", gpuobj->vinst); + + while (pte < pte_end) { +@@ -103,30 +125,35 @@ + nv_wr32(dev, 0x100cbc, 0x80000005); + } + +- gpuobj->im_bound = 1; ++ node->ramin = ramin; ++ gpuobj->pinst = ramin->start; + return 0; + } + +-int +-nvc0_instmem_unbind(struct drm_device *dev, struct nouveau_gpuobj *gpuobj) ++void ++nvc0_instmem_unmap(struct nouveau_gpuobj *gpuobj) + { +- struct drm_nouveau_private *dev_priv = dev->dev_private; +- uint32_t pte, pte_end; ++ struct drm_nouveau_private *dev_priv = gpuobj->dev->dev_private; ++ struct nvc0_gpuobj_node *node = gpuobj->node; ++ u32 pte, pte_end; ++ ++ if (!node->ramin || !dev_priv->ramin_available) ++ return; + +- if (gpuobj->im_bound == 0) +- return -EINVAL; ++ pte = (node->ramin->start >> 12) << 1; ++ pte_end = ((node->ramin->size >> 12) << 1) + pte; + +- pte = gpuobj->im_pramin->start >> 12; +- pte_end = (gpuobj->im_pramin->size >> 12) + pte; + while (pte < pte_end) { +- nv_wr32(dev, 0x702000 + (pte * 8), 0); +- nv_wr32(dev, 0x702004 + (pte * 8), 0); ++ nv_wr32(gpuobj->dev, 0x702000 + (pte * 8), 0); ++ nv_wr32(gpuobj->dev, 0x702004 + (pte * 8), 0); + pte++; + } +- dev_priv->engine.instmem.flush(dev); ++ dev_priv->engine.instmem.flush(gpuobj->dev); + +- gpuobj->im_bound = 0; +- return 0; ++ spin_lock(&dev_priv->ramin_lock); ++ drm_mm_put_block(node->ramin); ++ node->ramin = NULL; ++ spin_unlock(&dev_priv->ramin_lock); + } + + void +diff -Naur linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nvreg.h linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nvreg.h +--- linux-2.6.37-rc3/drivers/gpu/drm/nouveau/nvreg.h 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/drivers/gpu/drm/nouveau/nvreg.h 2010-11-22 06:33:32.000000000 +0100 +@@ -153,7 +153,8 @@ + #define NV_PCRTC_START 0x00600800 + #define NV_PCRTC_CONFIG 0x00600804 + # define NV_PCRTC_CONFIG_START_ADDRESS_NON_VGA (1 << 0) +-# define NV_PCRTC_CONFIG_START_ADDRESS_HSYNC (2 << 0) ++# define NV04_PCRTC_CONFIG_START_ADDRESS_HSYNC (4 << 0) ++# define NV10_PCRTC_CONFIG_START_ADDRESS_HSYNC (2 << 0) + #define NV_PCRTC_CURSOR_CONFIG 0x00600810 + # define NV_PCRTC_CURSOR_CONFIG_ENABLE_ENABLE (1 << 0) + # define NV_PCRTC_CURSOR_CONFIG_DOUBLE_SCAN_ENABLE (1 << 4) +diff -Naur linux-2.6.37-rc3/include/drm/nouveau_drm.h linux-2.6.37-rc3.nouveau/include/drm/nouveau_drm.h +--- linux-2.6.37-rc3/include/drm/nouveau_drm.h 2010-11-22 00:18:56.000000000 +0100 ++++ linux-2.6.37-rc3.nouveau/include/drm/nouveau_drm.h 2010-11-22 06:33:32.000000000 +0100 +@@ -71,16 +71,15 @@ + #define NOUVEAU_GETPARAM_PCI_VENDOR 3 + #define NOUVEAU_GETPARAM_PCI_DEVICE 4 + #define NOUVEAU_GETPARAM_BUS_TYPE 5 +-#define NOUVEAU_GETPARAM_FB_PHYSICAL 6 +-#define NOUVEAU_GETPARAM_AGP_PHYSICAL 7 + #define NOUVEAU_GETPARAM_FB_SIZE 8 + #define NOUVEAU_GETPARAM_AGP_SIZE 9 +-#define NOUVEAU_GETPARAM_PCI_PHYSICAL 10 + #define NOUVEAU_GETPARAM_CHIPSET_ID 11 + #define NOUVEAU_GETPARAM_VM_VRAM_BASE 12 + #define NOUVEAU_GETPARAM_GRAPH_UNITS 13 + #define NOUVEAU_GETPARAM_PTIMER_TIME 14 + #define NOUVEAU_GETPARAM_HAS_BO_USAGE 15 ++#define NOUVEAU_GETPARAM_HAS_PAGEFLIP 16 ++ + struct drm_nouveau_getparam { + uint64_t param; + uint64_t value; +@@ -171,7 +170,6 @@ + }; + + #define NOUVEAU_GEM_CPU_PREP_NOWAIT 0x00000001 +-#define NOUVEAU_GEM_CPU_PREP_NOBLOCK 0x00000002 + #define NOUVEAU_GEM_CPU_PREP_WRITE 0x00000004 + struct drm_nouveau_gem_cpu_prep { + uint32_t handle; diff --git a/packages/linux/patches/linux-2.6.37-rc3-120_RFC-RFT-v3-sched-automated-per-tty-task-groups.patch b/packages/linux/patches/linux-2.6.37-rc3-120_RFC-RFT-v3-sched-automated-per-tty-task-groups.patch new file mode 100644 index 0000000000..25f948c4b8 --- /dev/null +++ b/packages/linux/patches/linux-2.6.37-rc3-120_RFC-RFT-v3-sched-automated-per-tty-task-groups.patch @@ -0,0 +1,359 @@ +Index: linux-2.6/include/linux/sched.h +=================================================================== +--- linux-2.6.orig/include/linux/sched.h ++++ linux-2.6/include/linux/sched.h +@@ -509,6 +509,8 @@ struct thread_group_cputimer { + spinlock_t lock; + }; + ++struct autogroup; ++ + /* + * NOTE! "signal_struct" does not have it's own + * locking, because a shared signal_struct always +@@ -576,6 +578,9 @@ struct signal_struct { + + struct tty_struct *tty; /* NULL if no tty */ + ++#ifdef CONFIG_SCHED_AUTOGROUP ++ struct autogroup *autogroup; ++#endif + /* + * Cumulative resource counters for dead threads in the group, + * and for reaped dead child processes forked by this group. +@@ -1931,6 +1936,20 @@ int sched_rt_handler(struct ctl_table *t + + extern unsigned int sysctl_sched_compat_yield; + ++#ifdef CONFIG_SCHED_AUTOGROUP ++extern unsigned int sysctl_sched_autogroup_enabled; ++ ++extern void sched_autogroup_create_attach(struct task_struct *p); ++extern void sched_autogroup_detach(struct task_struct *p); ++extern void sched_autogroup_fork(struct signal_struct *sig); ++extern void sched_autogroup_exit(struct signal_struct *sig); ++#else ++static inline void sched_autogroup_create_attach(struct task_struct *p) { } ++static inline void sched_autogroup_detach(struct task_struct *p) { } ++static inline void sched_autogroup_fork(struct signal_struct *sig) { } ++static inline void sched_autogroup_exit(struct signal_struct *sig) { } ++#endif ++ + #ifdef CONFIG_RT_MUTEXES + extern int rt_mutex_getprio(struct task_struct *p); + extern void rt_mutex_setprio(struct task_struct *p, int prio); +Index: linux-2.6/kernel/sched.c +=================================================================== +--- linux-2.6.orig/kernel/sched.c ++++ linux-2.6/kernel/sched.c +@@ -78,6 +78,7 @@ + + #include "sched_cpupri.h" + #include "workqueue_sched.h" ++#include "sched_autogroup.h" + + #define CREATE_TRACE_POINTS + #include +@@ -605,11 +606,14 @@ static inline int cpu_of(struct rq *rq) + */ + static inline struct task_group *task_group(struct task_struct *p) + { ++ struct task_group *tg; + struct cgroup_subsys_state *css; + + css = task_subsys_state_check(p, cpu_cgroup_subsys_id, + lockdep_is_held(&task_rq(p)->lock)); +- return container_of(css, struct task_group, css); ++ tg = container_of(css, struct task_group, css); ++ ++ return autogroup_task_group(p, tg); + } + + /* Change a task's cfs_rq and parent entity if it moves across CPUs/groups */ +@@ -2006,6 +2010,7 @@ static void sched_irq_time_avg_update(st + #include "sched_idletask.c" + #include "sched_fair.c" + #include "sched_rt.c" ++#include "sched_autogroup.c" + #include "sched_stoptask.c" + #ifdef CONFIG_SCHED_DEBUG + # include "sched_debug.c" +@@ -7979,7 +7984,7 @@ void __init sched_init(void) + #ifdef CONFIG_CGROUP_SCHED + list_add(&init_task_group.list, &task_groups); + INIT_LIST_HEAD(&init_task_group.children); +- ++ autogroup_init(&init_task); + #endif /* CONFIG_CGROUP_SCHED */ + + #if defined CONFIG_FAIR_GROUP_SCHED && defined CONFIG_SMP +Index: linux-2.6/kernel/fork.c +=================================================================== +--- linux-2.6.orig/kernel/fork.c ++++ linux-2.6/kernel/fork.c +@@ -174,8 +174,10 @@ static inline void free_signal_struct(st + + static inline void put_signal_struct(struct signal_struct *sig) + { +- if (atomic_dec_and_test(&sig->sigcnt)) ++ if (atomic_dec_and_test(&sig->sigcnt)) { ++ sched_autogroup_exit(sig); + free_signal_struct(sig); ++ } + } + + void __put_task_struct(struct task_struct *tsk) +@@ -904,6 +906,7 @@ static int copy_signal(unsigned long clo + posix_cpu_timers_init_group(sig); + + tty_audit_fork(sig); ++ sched_autogroup_fork(sig); + + sig->oom_adj = current->signal->oom_adj; + sig->oom_score_adj = current->signal->oom_score_adj; +Index: linux-2.6/drivers/tty/tty_io.c +=================================================================== +--- linux-2.6.orig/drivers/tty/tty_io.c ++++ linux-2.6/drivers/tty/tty_io.c +@@ -3160,6 +3160,7 @@ static void __proc_set_tty(struct task_s + put_pid(tsk->signal->tty_old_pgrp); + tsk->signal->tty = tty_kref_get(tty); + tsk->signal->tty_old_pgrp = NULL; ++ sched_autogroup_create_attach(tsk); + } + + static void proc_set_tty(struct task_struct *tsk, struct tty_struct *tty) +Index: linux-2.6/kernel/sched_autogroup.h +=================================================================== +--- /dev/null ++++ linux-2.6/kernel/sched_autogroup.h +@@ -0,0 +1,16 @@ ++#ifdef CONFIG_SCHED_AUTOGROUP ++ ++static inline struct task_group * ++autogroup_task_group(struct task_struct *p, struct task_group *tg); ++ ++#else /* !CONFIG_SCHED_AUTOGROUP */ ++ ++static inline void autogroup_init(struct task_struct *init_task) { } ++ ++static inline struct task_group * ++autogroup_task_group(struct task_struct *p, struct task_group *tg) ++{ ++ return tg; ++} ++ ++#endif /* CONFIG_SCHED_AUTOGROUP */ +Index: linux-2.6/kernel/sched_autogroup.c +=================================================================== +--- /dev/null ++++ linux-2.6/kernel/sched_autogroup.c +@@ -0,0 +1,150 @@ ++#ifdef CONFIG_SCHED_AUTOGROUP ++ ++unsigned int __read_mostly sysctl_sched_autogroup_enabled = 1; ++ ++struct autogroup { ++ struct kref kref; ++ struct task_group *tg; ++}; ++ ++static struct autogroup autogroup_default; ++ ++static void autogroup_init(struct task_struct *init_task) ++{ ++ autogroup_default.tg = &init_task_group; ++ kref_init(&autogroup_default.kref); ++ init_task->signal->autogroup = &autogroup_default; ++} ++ ++static inline void autogroup_destroy(struct kref *kref) ++{ ++ struct autogroup *ag = container_of(kref, struct autogroup, kref); ++ struct task_group *tg = ag->tg; ++ ++ kfree(ag); ++ sched_destroy_group(tg); ++} ++ ++static inline void autogroup_kref_put(struct autogroup *ag) ++{ ++ kref_put(&ag->kref, autogroup_destroy); ++} ++ ++static inline struct autogroup *autogroup_kref_get(struct autogroup *ag) ++{ ++ kref_get(&ag->kref); ++ return ag; ++} ++ ++static inline struct autogroup *autogroup_create(void) ++{ ++ struct autogroup *ag = kmalloc(sizeof(*ag), GFP_KERNEL); ++ ++ if (!ag) ++ goto out_fail; ++ ++ ag->tg = sched_create_group(&init_task_group); ++ kref_init(&ag->kref); ++ ++ if (!(IS_ERR(ag->tg))) ++ return ag; ++ ++out_fail: ++ if (ag) { ++ kfree(ag); ++ WARN_ON(1); ++ } else ++ WARN_ON(1); ++ ++ return autogroup_kref_get(&autogroup_default); ++} ++ ++static inline bool ++task_wants_autogroup(struct task_struct *p, struct task_group *tg) ++{ ++ if (tg != &root_task_group) ++ return false; ++ ++ if (p->sched_class != &fair_sched_class) ++ return false; ++ ++ if (p->flags & PF_EXITING) ++ return false; ++ ++ return true; ++} ++ ++static inline struct task_group * ++autogroup_task_group(struct task_struct *p, struct task_group *tg) ++{ ++ int enabled = ACCESS_ONCE(sysctl_sched_autogroup_enabled); ++ ++ if (enabled && task_wants_autogroup(p, tg)) ++ return p->signal->autogroup->tg; ++ ++ return tg; ++} ++ ++static void ++autogroup_move_group(struct task_struct *p, struct autogroup *ag) ++{ ++ struct autogroup *prev; ++ struct task_struct *t; ++ ++ prev = p->signal->autogroup; ++ if (prev == ag) ++ return; ++ ++ p->signal->autogroup = autogroup_kref_get(ag); ++ sched_move_task(p); ++ ++ rcu_read_lock(); ++ list_for_each_entry_rcu(t, &p->thread_group, thread_group) { ++ sched_move_task(t); ++ } ++ rcu_read_unlock(); ++ ++ autogroup_kref_put(prev); ++} ++ ++/* Must be called with siglock held */ ++void sched_autogroup_create_attach(struct task_struct *p) ++{ ++ struct autogroup *ag = autogroup_create(); ++ ++ autogroup_move_group(p, ag); ++ /* drop extra refrence added by autogroup_create() */ ++ autogroup_kref_put(ag); ++} ++EXPORT_SYMBOL(sched_autogroup_create_attach); ++ ++/* Must be called with siglock held. Currently has no users */ ++void sched_autogroup_detach(struct task_struct *p) ++{ ++ autogroup_move_group(p, &autogroup_default); ++} ++EXPORT_SYMBOL(sched_autogroup_detach); ++ ++void sched_autogroup_fork(struct signal_struct *sig) ++{ ++ struct sighand_struct *sighand = current->sighand; ++ ++ spin_lock(&sighand->siglock); ++ sig->autogroup = autogroup_kref_get(current->signal->autogroup); ++ spin_unlock(&sighand->siglock); ++} ++ ++void sched_autogroup_exit(struct signal_struct *sig) ++{ ++ autogroup_kref_put(sig->autogroup); ++} ++ ++static int __init setup_autogroup(char *str) ++{ ++ sysctl_sched_autogroup_enabled = 0; ++ ++ return 1; ++} ++ ++__setup("noautogroup", setup_autogroup); ++#endif +Index: linux-2.6/kernel/sysctl.c +=================================================================== +--- linux-2.6.orig/kernel/sysctl.c ++++ linux-2.6/kernel/sysctl.c +@@ -382,6 +382,17 @@ static struct ctl_table kern_table[] = { + .mode = 0644, + .proc_handler = proc_dointvec, + }, ++#ifdef CONFIG_SCHED_AUTOGROUP ++ { ++ .procname = "sched_autogroup_enabled", ++ .data = &sysctl_sched_autogroup_enabled, ++ .maxlen = sizeof(unsigned int), ++ .mode = 0644, ++ .proc_handler = proc_dointvec, ++ .extra1 = &zero, ++ .extra2 = &one, ++ }, ++#endif + #ifdef CONFIG_PROVE_LOCKING + { + .procname = "prove_locking", +Index: linux-2.6/init/Kconfig +=================================================================== +--- linux-2.6.orig/init/Kconfig ++++ linux-2.6/init/Kconfig +@@ -728,6 +728,18 @@ config NET_NS + + endif # NAMESPACES + ++config SCHED_AUTOGROUP ++ bool "Automatic process group scheduling" ++ select CGROUPS ++ select CGROUP_SCHED ++ select FAIR_GROUP_SCHED ++ help ++ This option optimizes the scheduler for common desktop workloads by ++ automatically creating and populating task groups. This separation ++ of workloads isolates aggressive CPU burners (like build jobs) from ++ desktop applications. Task group autogeneration is currently based ++ upon task tty association. ++ + config MM_OWNER + bool + +Index: linux-2.6/Documentation/kernel-parameters.txt +=================================================================== +--- linux-2.6.orig/Documentation/kernel-parameters.txt ++++ linux-2.6/Documentation/kernel-parameters.txt +@@ -1622,6 +1622,8 @@ and is between 256 and 4096 characters. + noapic [SMP,APIC] Tells the kernel to not make use of any + IOAPICs that may be present in the system. + ++ noautogroup Disable scheduler automatic task group creation. ++ + nobats [PPC] Do not use BATs for mapping kernel lowmem + on "Classic" PPC cores. + diff --git a/packages/linux/patches/rename.sh b/packages/linux/patches/rename.sh new file mode 100755 index 0000000000..e78f4eb137 --- /dev/null +++ b/packages/linux/patches/rename.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +for i in `ls linux-$1-*.patch`; do + mv $i `echo $i | sed "s,$1,$2,g"` +done diff --git a/packages/linux/unpack b/packages/linux/unpack index c9242d4d79..de85c8e0ab 100755 --- a/packages/linux/unpack +++ b/packages/linux/unpack @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/install make -$SCRIPTS/install sed - LINUX=`ls -d $PKG_BUILD` if [ -f $PROJECT_DIR/$PROJECT/$1/$1.$TARGET_ARCH.conf ]; then diff --git a/packages/mediacenter/meta b/packages/mediacenter/meta index a152178b53..d874b2d32f 100644 --- a/packages/mediacenter/meta +++ b/packages/mediacenter/meta @@ -13,6 +13,8 @@ PKG_SHORTDESC="Mediacenter: Metapackage" PKG_LONGDESC="" PKG_IS_ADDON="no" +PKG_AUTORECONF="no" + for i in "$SKINS"; do PKG_DEPENDS="$PKG_DEPENDS $MEDIACENTER-theme-$i" done \ No newline at end of file diff --git a/packages/mediacenter/xbmc-dharma-theme-Confluence/meta b/packages/mediacenter/xbmc-dharma-theme-Confluence/meta index 2f1c4af109..a2a33483ed 100644 --- a/packages/mediacenter/xbmc-dharma-theme-Confluence/meta +++ b/packages/mediacenter/xbmc-dharma-theme-Confluence/meta @@ -1,5 +1,5 @@ PKG_NAME="xbmc-dharma-theme-Confluence" -PKG_VERSION="35100" +PKG_VERSION="35492" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" @@ -12,3 +12,5 @@ PKG_SECTION="mediacenter" PKG_SHORTDESC="xbmc-theme-Confluence: XBMC Mediacenter default theme" PKG_LONGDESC="XBMC Media Center (which was formerly named Xbox Media Center) is a free and open source cross-platform media player and home entertainment system software with a 10-foot user interface designed for the living-room TV. Its graphical user interface allows the user to easily manage video, photos, podcasts, and music from a computer, optical disk, local network, and the internet using a remote control." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/mediacenter/xbmc-dharma-theme-Confluence/patches/010_Holiday-Theme-0.2.diff b/packages/mediacenter/xbmc-dharma-theme-Confluence/patches/010_Holiday-Theme-0.2.diff deleted file mode 100644 index f3be4b5989..0000000000 Binary files a/packages/mediacenter/xbmc-dharma-theme-Confluence/patches/010_Holiday-Theme-0.2.diff and /dev/null differ diff --git a/packages/mediacenter/xbmc-dharma/build b/packages/mediacenter/xbmc-dharma/build index 6ca5c55f73..942516f84f 100755 --- a/packages/mediacenter/xbmc-dharma/build +++ b/packages/mediacenter/xbmc-dharma/build @@ -62,6 +62,9 @@ else XBMC_CRYSTALHD="--disable-crystalhd" fi +# xbmc (ffmpeg) fails to build with LTO optimization + strip_lto + # dont use some optimizations because of problems # this fixes problems with faac implementation of ffmpeg LDFLAGS=`echo $LDFLAGS | sed -e "s|-Wl,--as-needed||"` @@ -84,9 +87,13 @@ fi cd $PKG_BUILD -./bootstrap - -$AUTORECONF xbmc/lib/libid3tag/libid3tag +do_autoreconf +do_autoreconf lib/cpluff +[ -d lib/libass ] && do_autoreconf lib/libass +[ -d xbmc/cores/dvdplayer/Codecs/libdvd/libdvdcss ] && do_autoreconf xbmc/cores/dvdplayer/Codecs/libdvd/libdvdcss +do_autoreconf xbmc/cores/dvdplayer/Codecs/libdvd/libdvdread +do_autoreconf xbmc/cores/dvdplayer/Codecs/libdvd/libdvdnav +do_autoreconf xbmc/lib/libid3tag/libid3tag ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/mediacenter/xbmc-dharma/init.d/61_xbmc b/packages/mediacenter/xbmc-dharma/init.d/61_xbmc index 6406c7e13e..d63a879008 100755 --- a/packages/mediacenter/xbmc-dharma/init.d/61_xbmc +++ b/packages/mediacenter/xbmc-dharma/init.d/61_xbmc @@ -33,10 +33,6 @@ progress "starting XBMC" XBMC_ARGS="--standalone -fs --lircdev $LIRCDEV" -# starting pulseaudio if avaible - [ -f /usr/bin/pulseaudio ] && /usr/bin/pulseaudio \ - --start --log-target=syslog --daemonize 2>&1 > /dev/null - # starting xbmc-wiimote if avaible [ "$(pidof bluetoothd)" -a -f /usr/bin/xbmc-wiiremote ] && \ /usr/bin/xbmc-wiiremote >/dev/null 2>&1 & diff --git a/packages/mediacenter/xbmc-dharma/install b/packages/mediacenter/xbmc-dharma/install index 682f8f53e5..d876c3f28a 100755 --- a/packages/mediacenter/xbmc-dharma/install +++ b/packages/mediacenter/xbmc-dharma/install @@ -21,7 +21,7 @@ cd $PKG_BUILD find addons language media scripts sounds userdata system \ -regextype posix-extended -type f \ - -not -iregex ".*-linux.*|.*\.vis|.*\.xbs|.*svn.*|.*\.so|.*\.dll|.*\.pyd|.*python/.*\.zlib" \ + -not -iregex ".*-linux.*|.*\.vis|.*\.xbs|.*svn.*|.*\.orig|.*\.so|.*\.dll|.*\.pyd|.*python/.*\.zlib" \ -exec install -D -m 0644 "{}" $ROOT/$INSTALL/usr/share/xbmc/"{}" ";" cd - diff --git a/packages/mediacenter/xbmc-dharma/meta b/packages/mediacenter/xbmc-dharma/meta index 4a5e944009..0eded258ee 100644 --- a/packages/mediacenter/xbmc-dharma/meta +++ b/packages/mediacenter/xbmc-dharma/meta @@ -1,22 +1,19 @@ PKG_NAME="xbmc-dharma" -PKG_VERSION="35100" +PKG_VERSION="35492" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.xbmc.org" PKG_URL="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="boost Python zlib bzip2 lzo pcre alsa-lib libass enca curl libssh rtmpdump dbus libXt libXtst libXmu libXrandr $MESA glew fontconfig fribidi $LIBJPEG libpng tiff freetype jasper libmad libsamplerate libogg libvorbis libcdio libmms libmodplug faad2 flac wavpack libmpeg2 libbluray SDL SDL_mixer SDL_image sqlite mysql samba alsa bc" -PKG_BUILD_DEPENDS="toolchain boost Python zlib bzip2 lzo pcre alsa-lib libass enca curl libssh rtmpdump dbus libXt libXtst libXmu libXrandr $MESA glew fontconfig fribidi $LIBJPEG libpng tiff freetype jasper libmad libsamplerate libogg libvorbis libcdio libmms libmodplug faad2 flac wavpack libmpeg2 libbluray SDL SDL_mixer SDL_image sqlite mysql samba" +PKG_DEPENDS="boost Python zlib bzip2 lzo pcre alsa-lib libass enca curl libssh rtmpdump dbus libXt libXtst libXmu libXrandr Mesa glew fontconfig fribidi $LIBJPEG libpng tiff freetype jasper libmad libsamplerate libogg libvorbis libcdio libmms libmodplug faad2 flac wavpack libmpeg2 libbluray SDL SDL_mixer SDL_image sqlite mysql samba alsa bc" +PKG_BUILD_DEPENDS="toolchain boost Python zlib bzip2 lzo pcre alsa-lib libass enca curl libssh rtmpdump dbus libXt libXtst libXmu libXrandr Mesa glew fontconfig fribidi $LIBJPEG libpng tiff freetype jasper libmad libsamplerate libogg libvorbis libcdio libmms libmodplug faad2 flac wavpack libmpeg2 libbluray SDL SDL_mixer SDL_image sqlite mysql samba" PKG_PRIORITY="optional" PKG_SECTION="mediacenter" PKG_SHORTDESC="xbmc: XBMC Mediacenter" PKG_LONGDESC="XBMC Media Center (which was formerly named Xbox Media Center) is a free and open source cross-platform media player and home entertainment system software with a 10-foot user interface designed for the living-room TV. Its graphical user interface allows the user to easily manage video, photos, podcasts, and music from a computer, optical disk, local network, and the internet using a remote control." PKG_IS_ADDON="no" -if [ "$PULSEAUDIO_SUPPORT" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS pulseaudio" - PKG_DEPENDS="$PKG_DEPENDS pulseaudio" -fi +PKG_AUTORECONF="no" if [ "$FAAC_SUPPORT" = yes ]; then PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS faac" diff --git a/packages/mediacenter/xbmc-dharma/patches/rename.sh b/packages/mediacenter/xbmc-dharma/patches/rename.sh new file mode 100755 index 0000000000..9bd9be5d89 --- /dev/null +++ b/packages/mediacenter/xbmc-dharma/patches/rename.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +for i in `ls xbmc-dharma-*.patch`; do + mv $i `echo $i | sed "s,$1,$2,g"` +done diff --git a/packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-002-arm_remove_forced_python2.5-0.1.patch b/packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-002-arm_remove_forced_python2.5-0.1.patch new file mode 100644 index 0000000000..f90ee1faa0 --- /dev/null +++ b/packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-002-arm_remove_forced_python2.5-0.1.patch @@ -0,0 +1,15 @@ +diff -Naur xbmc-dharma-35100/Makefile.in xbmc-dharma-35100.patch/Makefile.in +--- xbmc-dharma-35100/Makefile.in 2010-10-30 05:36:41.000000000 +0200 ++++ xbmc-dharma-35100.patch/Makefile.in 2010-11-01 04:53:48.542705631 +0100 +@@ -471,11 +471,6 @@ + xbmc/cores/DllLoader/exports/util/exports_utils.a \ + xbmc/cores/DllLoader/exports/exports.a + +-ifeq (arm, $(ARCH)) +-# Force external python2.5 for now! +-LIBS +=-lpython2.5 +-endif +- + xbmc.bin: $(OBJSXBMC) $(DYNOBJSXBMC) + ifeq ($(findstring osx,$(ARCH)), osx) + $(CXX) $(LDFLAGS) -o xbmc.bin -Wl,-all_load,-ObjC $(DYNOBJSXBMC) $(OBJSXBMC) $(LIBS) -rdynamic diff --git a/packages/mediacenter/xbmc-dharma/patches/201_xbmc-let_select_XBMCProjectM-0.1.diff b/packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-201-let_select_XBMCProjectM-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc-dharma/patches/201_xbmc-let_select_XBMCProjectM-0.1.diff rename to packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-201-let_select_XBMCProjectM-0.1.patch diff --git a/packages/mediacenter/xbmc-dharma/patches/202_xbmc-let_select_RSXS-0.1.diff b/packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-202-let_select_RSXS-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc-dharma/patches/202_xbmc-let_select_RSXS-0.1.diff rename to packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-202-let_select_RSXS-0.1.patch diff --git a/packages/mediacenter/xbmc-dharma/patches/301_xbmc-correct_lzo_include-0.1.diff b/packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-301-correct_lzo_include-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc-dharma/patches/301_xbmc-correct_lzo_include-0.1.diff rename to packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-301-correct_lzo_include-0.1.patch diff --git a/packages/mediacenter/xbmc-dharma/patches/302_xbmc-dont_hardcode_usr_include-0.1.diff b/packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-302-dont_hardcode_usr_include-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc-dharma/patches/302_xbmc-dont_hardcode_usr_include-0.1.diff rename to packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-302-dont_hardcode_usr_include-0.1.patch diff --git a/packages/mediacenter/xbmc-dharma/patches/xbmc-WiiRemote_crosscompiling-0.1.diff b/packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-303-WiiRemote_crosscompiling-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc-dharma/patches/xbmc-WiiRemote_crosscompiling-0.1.diff rename to packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-303-WiiRemote_crosscompiling-0.1.patch diff --git a/packages/mediacenter/xbmc-dharma/patches/xbmc-fix_libdvd_xFLAGS-0.1.diff b/packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-303-fix_libdvd_xFLAGS-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc-dharma/patches/xbmc-fix_libdvd_xFLAGS-0.1.diff rename to packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-303-fix_libdvd_xFLAGS-0.1.patch diff --git a/packages/mediacenter/xbmc-dharma/patches/401-xbmc-we_dont_need_libXinerama-0.1.diff b/packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-401-we_dont_need_libXinerama-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc-dharma/patches/401-xbmc-we_dont_need_libXinerama-0.1.diff rename to packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-401-we_dont_need_libXinerama-0.1.patch diff --git a/packages/mediacenter/xbmc-dharma/patches/402-xbmc-enable_yasm_in_ffmpeg-0.1.diff b/packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-402-enable_yasm_in_ffmpeg-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc-dharma/patches/402-xbmc-enable_yasm_in_ffmpeg-0.1.diff rename to packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-402-enable_yasm_in_ffmpeg-0.1.patch diff --git a/packages/mediacenter/xbmc-dharma/patches/451-xbmc-full_splash-0.1.diff b/packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-451-full_splash-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc-dharma/patches/451-xbmc-full_splash-0.1.diff rename to packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-451-full_splash-0.1.patch diff --git a/packages/mediacenter/xbmc-dharma/patches/452-xbmc-change_lcd_content-0.1.diff b/packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-452-change_lcd_content-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc-dharma/patches/452-xbmc-change_lcd_content-0.1.diff rename to packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-452-change_lcd_content-0.1.patch diff --git a/packages/mediacenter/xbmc-dharma/patches/xbmc-ps3_remote_be_more_quiet-0.1.diff b/packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-452-ps3_remote_be_more_quiet-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc-dharma/patches/xbmc-ps3_remote_be_more_quiet-0.1.diff rename to packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-452-ps3_remote_be_more_quiet-0.1.patch diff --git a/packages/mediacenter/xbmc-dharma/patches/462-xbmc-add_remote_irtrans_mediacenter-0.1.diff b/packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-462-add_remote_irtrans_mediacenter-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc-dharma/patches/462-xbmc-add_remote_irtrans_mediacenter-0.1.diff rename to packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-462-add_remote_irtrans_mediacenter-0.1.patch diff --git a/packages/mediacenter/xbmc-dharma/patches/463-xbmc-add_remote_devinput-0.1.diff b/packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-463-add_remote_devinput-0.1.patch similarity index 74% rename from packages/mediacenter/xbmc-dharma/patches/463-xbmc-add_remote_devinput-0.1.diff rename to packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-463-add_remote_devinput-0.1.patch index 546137d387..8b0ef3b6b2 100644 --- a/packages/mediacenter/xbmc-dharma/patches/463-xbmc-add_remote_devinput-0.1.diff +++ b/packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-463-add_remote_devinput-0.1.patch @@ -1,9 +1,17 @@ -diff -Naur xbmc-dharma-33971/system/Lircmap.xml xbmc-dharma-33971.patch/system/Lircmap.xml ---- xbmc-dharma-33971/system/Lircmap.xml 2010-09-19 14:54:06.000000000 +0200 -+++ xbmc-dharma-33971.patch/system/Lircmap.xml 2010-09-28 17:45:10.196337846 +0200 -@@ -406,4 +406,57 @@ - KEY_YELLOW - KEY_BLUE +diff -Naur xbmc-dharma-35248/system/Lircmap.xml xbmc-dharma-35248.patch/system/Lircmap.xml +--- xbmc-dharma-35248/system/Lircmap.xml 2010-11-12 13:25:11.464538074 +0100 ++++ xbmc-dharma-35248.patch/system/Lircmap.xml 2010-11-12 13:26:26.486568902 +0100 +@@ -365,7 +365,6 @@ + + + cx23885_remote +- devinput + KEY_LEFT + KEY_RIGHT + KEY_UP +@@ -452,4 +451,57 @@ + yellow + blue + + diff --git a/packages/mediacenter/xbmc-dharma/patches/901-advancedsettings-alwaysextractflags.diff b/packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-901-advancedsettings_alwaysextractflags.patch similarity index 100% rename from packages/mediacenter/xbmc-dharma/patches/901-advancedsettings-alwaysextractflags.diff rename to packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-901-advancedsettings_alwaysextractflags.patch diff --git a/packages/mediacenter/xbmc-dharma/patches/902-advancedsettings-videolibrary.flattenmoviesets.diff b/packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-902-advancedsettings_videolibrary.flattenmoviesets.patch similarity index 100% rename from packages/mediacenter/xbmc-dharma/patches/902-advancedsettings-videolibrary.flattenmoviesets.diff rename to packages/mediacenter/xbmc-dharma/patches/xbmc-dharma-35492-902-advancedsettings_videolibrary.flattenmoviesets.patch diff --git a/packages/mediacenter/xbmc-theme-Confluence/meta b/packages/mediacenter/xbmc-theme-Confluence/meta index 23d9bf285a..442ba57078 100644 --- a/packages/mediacenter/xbmc-theme-Confluence/meta +++ b/packages/mediacenter/xbmc-theme-Confluence/meta @@ -1,5 +1,5 @@ PKG_NAME="xbmc-theme-Confluence" -PKG_VERSION="34321" +PKG_VERSION="35326" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" @@ -12,3 +12,5 @@ PKG_SECTION="mediacenter" PKG_SHORTDESC="xbmc-theme-Confluence: XBMC Mediacenter default theme" PKG_LONGDESC="XBMC Media Center (which was formerly named Xbox Media Center) is a free and open source cross-platform media player and home entertainment system software with a 10-foot user interface designed for the living-room TV. Its graphical user interface allows the user to easily manage video, photos, podcasts, and music from a computer, optical disk, local network, and the internet using a remote control." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/mediacenter/xbmc-theme-Confluence/patches/010_Holiday-Theme-0.2.diff b/packages/mediacenter/xbmc-theme-Confluence/patches/010_Holiday-Theme-0.2.diff deleted file mode 100644 index f3be4b5989..0000000000 Binary files a/packages/mediacenter/xbmc-theme-Confluence/patches/010_Holiday-Theme-0.2.diff and /dev/null differ diff --git a/packages/mediacenter/xbmc/build b/packages/mediacenter/xbmc/build index 22cb6ccf53..e5938a31ce 100755 --- a/packages/mediacenter/xbmc/build +++ b/packages/mediacenter/xbmc/build @@ -56,6 +56,9 @@ else XBMC_CRYSTALHD="--disable-crystalhd" fi +# xbmc (ffmpeg) fails to build with LTO optimization + strip_lto + # dont use some optimizations because of problems # this fixes problems with faac implementation of ffmpeg LDFLAGS=`echo $LDFLAGS | sed -e "s|-Wl,--as-needed||"` diff --git a/packages/mediacenter/xbmc/init.d/61_xbmc b/packages/mediacenter/xbmc/init.d/61_xbmc index 6406c7e13e..d63a879008 100755 --- a/packages/mediacenter/xbmc/init.d/61_xbmc +++ b/packages/mediacenter/xbmc/init.d/61_xbmc @@ -33,10 +33,6 @@ progress "starting XBMC" XBMC_ARGS="--standalone -fs --lircdev $LIRCDEV" -# starting pulseaudio if avaible - [ -f /usr/bin/pulseaudio ] && /usr/bin/pulseaudio \ - --start --log-target=syslog --daemonize 2>&1 > /dev/null - # starting xbmc-wiimote if avaible [ "$(pidof bluetoothd)" -a -f /usr/bin/xbmc-wiiremote ] && \ /usr/bin/xbmc-wiiremote >/dev/null 2>&1 & diff --git a/packages/mediacenter/xbmc/install b/packages/mediacenter/xbmc/install index 682f8f53e5..d876c3f28a 100755 --- a/packages/mediacenter/xbmc/install +++ b/packages/mediacenter/xbmc/install @@ -21,7 +21,7 @@ cd $PKG_BUILD find addons language media scripts sounds userdata system \ -regextype posix-extended -type f \ - -not -iregex ".*-linux.*|.*\.vis|.*\.xbs|.*svn.*|.*\.so|.*\.dll|.*\.pyd|.*python/.*\.zlib" \ + -not -iregex ".*-linux.*|.*\.vis|.*\.xbs|.*svn.*|.*\.orig|.*\.so|.*\.dll|.*\.pyd|.*python/.*\.zlib" \ -exec install -D -m 0644 "{}" $ROOT/$INSTALL/usr/share/xbmc/"{}" ";" cd - diff --git a/packages/mediacenter/xbmc/meta b/packages/mediacenter/xbmc/meta index 2dd6b6b4ea..b607389e85 100644 --- a/packages/mediacenter/xbmc/meta +++ b/packages/mediacenter/xbmc/meta @@ -1,22 +1,19 @@ PKG_NAME="xbmc" -PKG_VERSION="34321" +PKG_VERSION="35326" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.xbmc.org" PKG_URL="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="boost Python zlib bzip2 lzo pcre alsa-lib libass enca curl libssh rtmpdump dbus libXt libXtst libXmu libXrandr $MESA glew fontconfig fribidi $LIBJPEG libpng tiff freetype jasper libmad libsamplerate libogg libvorbis libcdio libmms libmodplug faad2 flac wavpack libmpeg2 libbluray SDL SDL_mixer SDL_image sqlite mysql samba alsa bc" -PKG_BUILD_DEPENDS="toolchain boost Python zlib bzip2 lzo pcre alsa-lib libass enca curl libssh rtmpdump dbus libXt libXtst libXmu libXrandr $MESA glew fontconfig fribidi $LIBJPEG libpng tiff freetype jasper libmad libsamplerate libogg libvorbis libcdio libmms libmodplug faad2 flac wavpack libmpeg2 libbluray SDL SDL_mixer SDL_image sqlite mysql samba" +PKG_DEPENDS="boost Python zlib bzip2 lzo pcre alsa-lib libass enca curl libssh rtmpdump dbus libXt libXtst libXmu libXrandr Mesa glew fontconfig fribidi $LIBJPEG libpng tiff freetype jasper libmad libsamplerate libogg libvorbis libcdio libmms libmodplug faad2 flac wavpack libmpeg2 libbluray SDL SDL_mixer SDL_image sqlite mysql samba alsa bc" +PKG_BUILD_DEPENDS="toolchain boost Python zlib bzip2 lzo pcre alsa-lib libass enca curl libssh rtmpdump dbus libXt libXtst libXmu libXrandr Mesa glew fontconfig fribidi $LIBJPEG libpng tiff freetype jasper libmad libsamplerate libogg libvorbis libcdio libmms libmodplug faad2 flac wavpack libmpeg2 libbluray SDL SDL_mixer SDL_image sqlite mysql samba" PKG_PRIORITY="optional" PKG_SECTION="mediacenter" PKG_SHORTDESC="xbmc: XBMC Mediacenter" PKG_LONGDESC="XBMC Media Center (which was formerly named Xbox Media Center) is a free and open source cross-platform media player and home entertainment system software with a 10-foot user interface designed for the living-room TV. Its graphical user interface allows the user to easily manage video, photos, podcasts, and music from a computer, optical disk, local network, and the internet using a remote control." PKG_IS_ADDON="no" -if [ "$PULSEAUDIO_SUPPORT" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS pulseaudio" - PKG_DEPENDS="$PKG_DEPENDS pulseaudio" -fi +PKG_AUTORECONF="yes" if [ "$FAAC_SUPPORT" = yes ]; then PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS faac" diff --git a/packages/mediacenter/xbmc/patches/rename.sh b/packages/mediacenter/xbmc/patches/rename.sh new file mode 100755 index 0000000000..fb8a0dec17 --- /dev/null +++ b/packages/mediacenter/xbmc/patches/rename.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +for i in `ls xbmc-*.patch`; do + mv $i `echo $i | sed "s,$1,$2,g"` +done diff --git a/packages/mediacenter/xbmc/patches/xbmc-35326-002-arm_remove_forced_python2.5-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-35326-002-arm_remove_forced_python2.5-0.1.patch new file mode 100644 index 0000000000..f90ee1faa0 --- /dev/null +++ b/packages/mediacenter/xbmc/patches/xbmc-35326-002-arm_remove_forced_python2.5-0.1.patch @@ -0,0 +1,15 @@ +diff -Naur xbmc-dharma-35100/Makefile.in xbmc-dharma-35100.patch/Makefile.in +--- xbmc-dharma-35100/Makefile.in 2010-10-30 05:36:41.000000000 +0200 ++++ xbmc-dharma-35100.patch/Makefile.in 2010-11-01 04:53:48.542705631 +0100 +@@ -471,11 +471,6 @@ + xbmc/cores/DllLoader/exports/util/exports_utils.a \ + xbmc/cores/DllLoader/exports/exports.a + +-ifeq (arm, $(ARCH)) +-# Force external python2.5 for now! +-LIBS +=-lpython2.5 +-endif +- + xbmc.bin: $(OBJSXBMC) $(DYNOBJSXBMC) + ifeq ($(findstring osx,$(ARCH)), osx) + $(CXX) $(LDFLAGS) -o xbmc.bin -Wl,-all_load,-ObjC $(DYNOBJSXBMC) $(OBJSXBMC) $(LIBS) -rdynamic diff --git a/packages/mediacenter/xbmc/patches/201_xbmc-let_select_XBMCProjectM-0.1.diff b/packages/mediacenter/xbmc/patches/xbmc-35326-201-let_select_XBMCProjectM-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/201_xbmc-let_select_XBMCProjectM-0.1.diff rename to packages/mediacenter/xbmc/patches/xbmc-35326-201-let_select_XBMCProjectM-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/202_xbmc-let_select_RSXS-0.1.diff b/packages/mediacenter/xbmc/patches/xbmc-35326-202-let_select_RSXS-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/202_xbmc-let_select_RSXS-0.1.diff rename to packages/mediacenter/xbmc/patches/xbmc-35326-202-let_select_RSXS-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/301_xbmc-correct_lzo_include-0.1.diff b/packages/mediacenter/xbmc/patches/xbmc-35326-301-correct_lzo_include-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/301_xbmc-correct_lzo_include-0.1.diff rename to packages/mediacenter/xbmc/patches/xbmc-35326-301-correct_lzo_include-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/302_xbmc-dont_hardcode_usr_include-0.1.diff b/packages/mediacenter/xbmc/patches/xbmc-35326-302-dont_hardcode_usr_include-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/302_xbmc-dont_hardcode_usr_include-0.1.diff rename to packages/mediacenter/xbmc/patches/xbmc-35326-302-dont_hardcode_usr_include-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-WiiRemote_crosscompiling-0.1.diff b/packages/mediacenter/xbmc/patches/xbmc-35326-303-WiiRemote_crosscompiling-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-WiiRemote_crosscompiling-0.1.diff rename to packages/mediacenter/xbmc/patches/xbmc-35326-303-WiiRemote_crosscompiling-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-fix_libdvd_xFLAGS-0.1.diff b/packages/mediacenter/xbmc/patches/xbmc-35326-303-fix_libdvd_xFLAGS-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-fix_libdvd_xFLAGS-0.1.diff rename to packages/mediacenter/xbmc/patches/xbmc-35326-303-fix_libdvd_xFLAGS-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/401-xbmc-we_dont_need_libXinerama-0.1.diff b/packages/mediacenter/xbmc/patches/xbmc-35326-401-we_dont_need_libXinerama-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/401-xbmc-we_dont_need_libXinerama-0.1.diff rename to packages/mediacenter/xbmc/patches/xbmc-35326-401-we_dont_need_libXinerama-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/402-xbmc-enable_yasm_in_ffmpeg-0.1.diff b/packages/mediacenter/xbmc/patches/xbmc-35326-402-enable_yasm_in_ffmpeg-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/402-xbmc-enable_yasm_in_ffmpeg-0.1.diff rename to packages/mediacenter/xbmc/patches/xbmc-35326-402-enable_yasm_in_ffmpeg-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/451-xbmc-full_splash-0.1.diff b/packages/mediacenter/xbmc/patches/xbmc-35326-451-full_splash-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/451-xbmc-full_splash-0.1.diff rename to packages/mediacenter/xbmc/patches/xbmc-35326-451-full_splash-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/452-xbmc-change_lcd_content-0.1.diff b/packages/mediacenter/xbmc/patches/xbmc-35326-452-change_lcd_content-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/452-xbmc-change_lcd_content-0.1.diff rename to packages/mediacenter/xbmc/patches/xbmc-35326-452-change_lcd_content-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/xbmc-ps3_remote_be_more_quiet-0.1.diff b/packages/mediacenter/xbmc/patches/xbmc-35326-452-ps3_remote_be_more_quiet-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/xbmc-ps3_remote_be_more_quiet-0.1.diff rename to packages/mediacenter/xbmc/patches/xbmc-35326-452-ps3_remote_be_more_quiet-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/462-xbmc-add_remote_irtrans_mediacenter-0.1.diff b/packages/mediacenter/xbmc/patches/xbmc-35326-462-add_remote_irtrans_mediacenter-0.1.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/462-xbmc-add_remote_irtrans_mediacenter-0.1.diff rename to packages/mediacenter/xbmc/patches/xbmc-35326-462-add_remote_irtrans_mediacenter-0.1.patch diff --git a/packages/mediacenter/xbmc/patches/463-xbmc-add_remote_devinput-0.1.diff b/packages/mediacenter/xbmc/patches/xbmc-35326-463-add_remote_devinput-0.1.patch similarity index 74% rename from packages/mediacenter/xbmc/patches/463-xbmc-add_remote_devinput-0.1.diff rename to packages/mediacenter/xbmc/patches/xbmc-35326-463-add_remote_devinput-0.1.patch index 546137d387..8b0ef3b6b2 100644 --- a/packages/mediacenter/xbmc/patches/463-xbmc-add_remote_devinput-0.1.diff +++ b/packages/mediacenter/xbmc/patches/xbmc-35326-463-add_remote_devinput-0.1.patch @@ -1,9 +1,17 @@ -diff -Naur xbmc-dharma-33971/system/Lircmap.xml xbmc-dharma-33971.patch/system/Lircmap.xml ---- xbmc-dharma-33971/system/Lircmap.xml 2010-09-19 14:54:06.000000000 +0200 -+++ xbmc-dharma-33971.patch/system/Lircmap.xml 2010-09-28 17:45:10.196337846 +0200 -@@ -406,4 +406,57 @@ - KEY_YELLOW - KEY_BLUE +diff -Naur xbmc-dharma-35248/system/Lircmap.xml xbmc-dharma-35248.patch/system/Lircmap.xml +--- xbmc-dharma-35248/system/Lircmap.xml 2010-11-12 13:25:11.464538074 +0100 ++++ xbmc-dharma-35248.patch/system/Lircmap.xml 2010-11-12 13:26:26.486568902 +0100 +@@ -365,7 +365,6 @@ + + + cx23885_remote +- devinput + KEY_LEFT + KEY_RIGHT + KEY_UP +@@ -452,4 +451,57 @@ + yellow + blue + + diff --git a/packages/mediacenter/xbmc/patches/901-advancedsettings-alwaysextractflags.diff b/packages/mediacenter/xbmc/patches/xbmc-35326-901-advancedsettings_alwaysextractflags.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/901-advancedsettings-alwaysextractflags.diff rename to packages/mediacenter/xbmc/patches/xbmc-35326-901-advancedsettings_alwaysextractflags.patch diff --git a/packages/mediacenter/xbmc/patches/902-advancedsettings-videolibrary.flattenmoviesets.diff b/packages/mediacenter/xbmc/patches/xbmc-35326-902-advancedsettings_videolibrary.flattenmoviesets.patch similarity index 100% rename from packages/mediacenter/xbmc/patches/902-advancedsettings-videolibrary.flattenmoviesets.diff rename to packages/mediacenter/xbmc/patches/xbmc-35326-902-advancedsettings_videolibrary.flattenmoviesets.patch diff --git a/packages/multimedia/SDL/build b/packages/multimedia/SDL/build index 2e8b42354b..287b086b9a 100755 --- a/packages/multimedia/SDL/build +++ b/packages/multimedia/SDL/build @@ -2,13 +2,13 @@ . config/options $1 -if [ "$PULSEAUDIO_SUPPORT" = yes ]; then - SDL_PULSEAUDIO="--enable-pulseaudio --enable-pulseaudio-shared" -else - SDL_PULSEAUDIO="--disable-pulseaudio --disable-pulseaudio-shared" -fi - cd $PKG_BUILD + +rm -f acinclude/alsa.m4 +# Skip autoheader because there is a problem with AC_DEFINE's in the configure.in of SDL 1.2.14. +# Added include directory 'acinclude' because SDL 1.2.14 has no Makefile.am in which to specify it. + AUTOHEADER="true" autoreconf --verbose --install --force -I $SYSROOT_PREFIX/usr/share/aclocal -I acinclude + ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ @@ -38,7 +38,8 @@ cd $PKG_BUILD --disable-esd \ --disable-esdtest \ --disable-esd-shared \ - $SDL_PULSEAUDIO \ + --disable-pulseaudio \ + --disable-pulseaudio-shared \ --disable-arts \ --disable-arts-shared \ --disable-nas \ diff --git a/packages/multimedia/SDL/meta b/packages/multimedia/SDL/meta index 8fd26f3018..13fcd74ec2 100644 --- a/packages/multimedia/SDL/meta +++ b/packages/multimedia/SDL/meta @@ -5,15 +5,12 @@ PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.libsdl.org/" PKG_URL="http://www.libsdl.org/release/$PKG_NAME-$PKG_VERSION.tar.gz" -PKG_DEPENDS="alsa-lib libX11 libXrandr $MESA" -PKG_BUILD_DEPENDS="toolchain alsa-lib libX11 libXrandr $MESA" +PKG_DEPENDS="alsa-lib libX11 libXrandr Mesa" +PKG_BUILD_DEPENDS="toolchain yasm alsa-lib libX11 libXrandr Mesa" PKG_PRIORITY="optional" PKG_SECTION="multimedia" PKG_SHORTDESC="libsdl: A cross-platform Graphic API" PKG_LONGDESC="Simple DirectMedia Layer is a cross-platform multimedia library designed to provide fast access to the graphics framebuffer and audio device. It is used by MPEG playback software, emulators, and many popular games, including the award winning Linux port of 'Civilization: Call To Power.' Simple DirectMedia Layer supports Linux, Win32, BeOS, MacOS, Solaris, IRIX, and FreeBSD." PKG_IS_ADDON="no" -if [ "$PULSEAUDIO_SUPPORT" = yes ]; then - PKG_DEPENDS="$PKG_DEPENDS pulseaudio" - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS pulseaudio" -fi +PKG_AUTORECONF="" diff --git a/packages/multimedia/SDL/patches/SDL-1.2.14-audiodriver.diff b/packages/multimedia/SDL/patches/SDL-1.2.14-audiodriver.patch similarity index 100% rename from packages/multimedia/SDL/patches/SDL-1.2.14-audiodriver.diff rename to packages/multimedia/SDL/patches/SDL-1.2.14-audiodriver.patch diff --git a/packages/multimedia/SDL/patches/SDL-1.2.14-configure.patch b/packages/multimedia/SDL/patches/SDL-1.2.14-configure.patch new file mode 100644 index 0000000000..b6fdf484f5 --- /dev/null +++ b/packages/multimedia/SDL/patches/SDL-1.2.14-configure.patch @@ -0,0 +1,11 @@ +diff -Naur SDL-1.2.14-old/configure.in SDL-1.2.14-new/configure.in +--- SDL-1.2.14-old/configure.in 2009-10-17 10:35:03.000000000 -0700 ++++ SDL-1.2.14-new/configure.in 2010-08-17 16:42:33.000000000 -0700 +@@ -3,6 +3,7 @@ + AC_CONFIG_HEADER(include/SDL_config.h) + AC_GNU_SOURCE + AC_CONFIG_AUX_DIRS($srcdir/build-scripts) ++AC_CONFIG_MACRO_DIR([acinclude]) + + dnl Set various version strings - taken gratefully from the GTk sources + # diff --git a/packages/multimedia/SDL/patches/SDL-1.2.14-disable_yasm.diff b/packages/multimedia/SDL/patches/SDL-1.2.14-disable_yasm.diff deleted file mode 100644 index 6411eaf0b2..0000000000 --- a/packages/multimedia/SDL/patches/SDL-1.2.14-disable_yasm.diff +++ /dev/null @@ -1,11 +0,0 @@ -diff -Nur SDL-1.2.14/configure.in SDL-1.2.14-new/configure.in ---- SDL-1.2.14/configure.in 2009-10-18 01:35:03.000000000 +0800 -+++ SDL-1.2.14-new/configure.in 2010-01-08 15:14:09.000000000 +0800 -@@ -745,7 +745,6 @@ - esac - fi - -- AC_PATH_PROG(NASM, yasm) - echo "%ifidn __OUTPUT_FORMAT__,elf" > unquoted-sections - echo "section .note.GNU-stack noalloc noexec nowrite progbits" >> unquoted-sections - echo "%endif" >> unquoted-sections diff --git a/packages/multimedia/SDL/patches/SDL-1.2.13-rh484362.diff b/packages/multimedia/SDL/patches/SDL-1.2.14-rh484362.patch similarity index 100% rename from packages/multimedia/SDL/patches/SDL-1.2.13-rh484362.diff rename to packages/multimedia/SDL/patches/SDL-1.2.14-rh484362.patch diff --git a/packages/multimedia/SDL_image/build b/packages/multimedia/SDL_image/build index c277e2e018..4f670448cc 100755 --- a/packages/multimedia/SDL_image/build +++ b/packages/multimedia/SDL_image/build @@ -3,6 +3,11 @@ . config/options $1 cd $PKG_BUILD + +# create some files needed for autoreconf + touch NEWS AUTHORS ChangeLog + do_autoreconf + ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ @@ -25,6 +30,7 @@ cd $PKG_BUILD --enable-xcf \ --enable-xpm \ --enable-xv \ + --with-sdl-prefix=$SYSROOT_PREFIX/usr \ make diff --git a/packages/multimedia/SDL_image/meta b/packages/multimedia/SDL_image/meta index 9c8d37b6e8..128b81ab07 100644 --- a/packages/multimedia/SDL_image/meta +++ b/packages/multimedia/SDL_image/meta @@ -12,3 +12,5 @@ PKG_SECTION="multimedia" PKG_SHORTDESC="libsdl_image: A cross-platform Graphic API" PKG_LONGDESC="SDL_image is an image loading library that is used with the SDL library, and almost as portable. It allows a programmer to use multiple image formats without having to code all the loading and conversion algorithms themselves." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/multimedia/SDL_mixer/build b/packages/multimedia/SDL_mixer/build index e544e11e82..d96fa478be 100755 --- a/packages/multimedia/SDL_mixer/build +++ b/packages/multimedia/SDL_mixer/build @@ -2,12 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build SDL -#$SCRIPTS/build flac -$SCRIPTS/build libmad -$SCRIPTS/build libogg - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -31,6 +25,8 @@ cd $PKG_BUILD --enable-music-mp3-shared \ --enable-music-mp3-mad-gpl \ --disable-smpegtest \ + --with-gnu-ld \ + --with-sdl-prefix=$SYSROOT_PREFIX/usr \ make diff --git a/packages/multimedia/SDL_mixer/install b/packages/multimedia/SDL_mixer/install index 824deeae29..36ba845550 100755 --- a/packages/multimedia/SDL_mixer/install +++ b/packages/multimedia/SDL_mixer/install @@ -2,10 +2,5 @@ . config/options $1 -$SCRIPTS/install SDL -#$SCRIPTS/install flac -$SCRIPTS/install libmad -$SCRIPTS/install libogg - mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/build/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/multimedia/SDL_mixer/meta b/packages/multimedia/SDL_mixer/meta new file mode 100644 index 0000000000..3f0db82168 --- /dev/null +++ b/packages/multimedia/SDL_mixer/meta @@ -0,0 +1,16 @@ +PKG_NAME="SDL_mixer" +PKG_VERSION="1.2.11" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.libsdl.org/" +PKG_URL="http://www.libsdl.org/projects/SDL_mixer/release/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="SDL libmad libogg" +PKG_BUILD_DEPENDS="toolchain SDL libmad libogg" +PKG_PRIORITY="optional" +PKG_SECTION="multimedia" +PKG_SHORTDESC="libsdl_mixer: Simple Directmedia Layer - Mixer" +PKG_LONGDESC="SDL_mixer is a sound mixing library that is used with the SDL library, and almost as portable. It allows a programmer to use multiple samples along with music without having to code a mixing algorithm themselves. It also simplyfies the handling of loading and playing samples and music from all sorts of file formats." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/multimedia/SDL_mixer/url b/packages/multimedia/SDL_mixer/url deleted file mode 100644 index c2ad3df738..0000000000 --- a/packages/multimedia/SDL_mixer/url +++ /dev/null @@ -1 +0,0 @@ -http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.11.tar.gz diff --git a/packages/multimedia/SDL_net/build b/packages/multimedia/SDL_net/build index a908575d56..12e8243036 100755 --- a/packages/multimedia/SDL_net/build +++ b/packages/multimedia/SDL_net/build @@ -2,10 +2,9 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build SDL - cd $PKG_BUILD + +touch NEWS AUTHORS ChangeLog && do_autoreconf ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ diff --git a/packages/multimedia/SDL_net/install b/packages/multimedia/SDL_net/install index 5106af385c..c8844160fe 100755 --- a/packages/multimedia/SDL_net/install +++ b/packages/multimedia/SDL_net/install @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/install SDL - mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/multimedia/SDL_net/meta b/packages/multimedia/SDL_net/meta new file mode 100644 index 0000000000..6b0a2f2a54 --- /dev/null +++ b/packages/multimedia/SDL_net/meta @@ -0,0 +1,16 @@ +PKG_NAME="SDL_net" +PKG_VERSION="1.2.7" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.libsdl.org/" +PKG_URL="http://www.libsdl.org/projects/SDL_net/release/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="SDL" +PKG_BUILD_DEPENDS="toolchain SDL" +PKG_PRIORITY="optional" +PKG_SECTION="multimedia" +PKG_SHORTDESC="libsdl_net: A simple cross-platform network library" +PKG_LONGDESC="SDL_net is a network library that is used with the SDL library, and almost as portable. It allows a programmer to use network functionality without having to code different things for different platforms. It also simplyfies the handling of network connections and data transfer." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/multimedia/SDL_net/url b/packages/multimedia/SDL_net/url deleted file mode 100644 index 23fcfae54a..0000000000 --- a/packages/multimedia/SDL_net/url +++ /dev/null @@ -1 +0,0 @@ -http://www.libsdl.org/projects/SDL_net/release/SDL_net-1.2.7.tar.gz diff --git a/packages/multimedia/SDL_ttf/build b/packages/multimedia/SDL_ttf/build index 946b9e9162..0f506d6b9d 100755 --- a/packages/multimedia/SDL_ttf/build +++ b/packages/multimedia/SDL_ttf/build @@ -2,14 +2,9 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build SDL -$SCRIPTS/build libICE -$SCRIPTS/build libX11 -$SCRIPTS/build freetype -$SCRIPTS/build $MESA - cd $PKG_BUILD + +touch NEWS AUTHORS ChangeLog && do_autoreconf ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ @@ -17,6 +12,7 @@ cd $PKG_BUILD --localstatedir=/var \ --enable-shared \ --disable-static \ + --with-sdl-prefix=$SYSROOT_PREFIX/usr \ make diff --git a/packages/multimedia/SDL_ttf/install b/packages/multimedia/SDL_ttf/install index 981955a40c..c8844160fe 100755 --- a/packages/multimedia/SDL_ttf/install +++ b/packages/multimedia/SDL_ttf/install @@ -2,12 +2,6 @@ . config/options $1 -$SCRIPTS/install SDL -$SCRIPTS/install libICE -$SCRIPTS/install libX11 -$SCRIPTS/install freetype -$SCRIPTS/install $MESA - mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/multimedia/SDL_ttf/meta b/packages/multimedia/SDL_ttf/meta new file mode 100644 index 0000000000..45bc5b6eb0 --- /dev/null +++ b/packages/multimedia/SDL_ttf/meta @@ -0,0 +1,16 @@ +PKG_NAME="SDL_ttf" +PKG_VERSION="2.0.10" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.libsdl.org/" +PKG_URL="http://www.libsdl.org/projects/SDL_ttf/release/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="SDL libICE libX11 freetype Mesa" +PKG_BUILD_DEPENDS="toolchain SDL libICE libX11 freetype Mesa" +PKG_PRIORITY="optional" +PKG_SECTION="multimedia" +PKG_SHORTDESC="libsdl_ttf: A library to use TrueType fonts in SDL applications" +PKG_LONGDESC="This is a sample library which allows you to use TrueType fonts in your SDL applications. It comes with an example program 'showfont' which displays an example string for a given TrueType font file." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/multimedia/SDL_ttf/url b/packages/multimedia/SDL_ttf/url deleted file mode 100644 index 3fb7ec8a3a..0000000000 --- a/packages/multimedia/SDL_ttf/url +++ /dev/null @@ -1 +0,0 @@ -http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.10.tar.gz diff --git a/packages/multimedia/crystalhd/build b/packages/multimedia/crystalhd/build index f7ab019a4f..9a167377be 100755 --- a/packages/multimedia/crystalhd/build +++ b/packages/multimedia/crystalhd/build @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build linux - cd $PKG_BUILD/driver/linux ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/multimedia/crystalhd/install b/packages/multimedia/crystalhd/install index adf14ced80..cdbc0dde0c 100755 --- a/packages/multimedia/crystalhd/install +++ b/packages/multimedia/crystalhd/install @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build busybox-hosttools - VER=`ls $BUILD/linux*/modules/lib/modules` mkdir -p $INSTALL/lib/firmware diff --git a/packages/multimedia/crystalhd/meta b/packages/multimedia/crystalhd/meta new file mode 100644 index 0000000000..88d031c921 --- /dev/null +++ b/packages/multimedia/crystalhd/meta @@ -0,0 +1,16 @@ +PKG_NAME="crystalhd" +PKG_VERSION="171" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://code.google.com/p/crystalhd-for-osx/" +PKG_URL="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="linux" +PKG_BUILD_DEPENDS="toolchain busybox-hosttools linux" +PKG_PRIORITY="optional" +PKG_SECTION="multimedia" +PKG_SHORTDESC="crystalhd: OSX and Linux driver and library support for the Broadcom Crystal HD Video Accelerator." +PKG_LONGDESC="OSX and Linux driver and library support for the Broadcom Crystal HD Video Accelerator. Supported under XBMC for Mac on the AppleTV and under 10.4 and 10.5 OSX platforms." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/multimedia/crystalhd/need_unpack b/packages/multimedia/crystalhd/need_unpack index bfae889a4c..54c6c3621e 100755 --- a/packages/multimedia/crystalhd/need_unpack +++ b/packages/multimedia/crystalhd/need_unpack @@ -5,9 +5,7 @@ STAMP=$STAMPS/$1/unpack test $PKG_DIR/config/linux.$TARGET_ARCH.conf -nt $STAMP -o \ - $PKG_DIR/config/linux.$TARGET_PLATFORM.conf -nt $STAMP -o \ $PROJECT_DIR/$PROJECT/linux/linux.$TARGET_ARCH.conf -nt $STAMP -o \ - $PROJECT_DIR/$PROJECT/linux/linux.$TARGET_PLATFORM.conf -nt $STAMP -o \ $PKG_DIR/url -nt $STAMP && rm -f $STAMP exit 0 diff --git a/packages/multimedia/crystalhd/patches/010-crystalhd-crosscompiling-0.1.diff b/packages/multimedia/crystalhd/patches/crystalhd-171-crosscompiling-0.1.patch similarity index 100% rename from packages/multimedia/crystalhd/patches/010-crystalhd-crosscompiling-0.1.diff rename to packages/multimedia/crystalhd/patches/crystalhd-171-crosscompiling-0.1.patch diff --git a/packages/multimedia/crystalhd/patches/crystalhd-171-use_8_DMA_buffers-0.1.diff b/packages/multimedia/crystalhd/patches/crystalhd-171-use_8_DMA_buffers-0.1.patch similarity index 100% rename from packages/multimedia/crystalhd/patches/crystalhd-171-use_8_DMA_buffers-0.1.diff rename to packages/multimedia/crystalhd/patches/crystalhd-171-use_8_DMA_buffers-0.1.patch diff --git a/packages/multimedia/crystalhd/url b/packages/multimedia/crystalhd/url deleted file mode 100644 index ec02158bb9..0000000000 --- a/packages/multimedia/crystalhd/url +++ /dev/null @@ -1 +0,0 @@ -http://sources.openelec.tv/svn/crystalhd-171.tar.bz2 \ No newline at end of file diff --git a/packages/multimedia/libass/build b/packages/multimedia/libass/build index c9cce4f367..186f78693d 100755 --- a/packages/multimedia/libass/build +++ b/packages/multimedia/libass/build @@ -2,11 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build freetype -$SCRIPTS/build fontconfig -$SCRIPTS/build enca - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/multimedia/libass/install b/packages/multimedia/libass/install index e5dd9e345b..fcc3d9e029 100755 --- a/packages/multimedia/libass/install +++ b/packages/multimedia/libass/install @@ -2,10 +2,6 @@ . config/options $1 -$SCRIPTS/install freetype -$SCRIPTS/install fontconfig -$SCRIPTS/install enca - mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/libass/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/multimedia/libass/meta b/packages/multimedia/libass/meta new file mode 100644 index 0000000000..833dc5a125 --- /dev/null +++ b/packages/multimedia/libass/meta @@ -0,0 +1,16 @@ +PKG_NAME="libass" +PKG_VERSION="0.9.11" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="BSD" +PKG_SITE="http://code.google.com/p/libass/" +PKG_URL="http://libass.googlecode.com/files/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="freetype fontconfig enca" +PKG_BUILD_DEPENDS="toolchain freetype fontconfig enca" +PKG_PRIORITY="optional" +PKG_SECTION="multimedia" +PKG_SHORTDESC="libass: a portable subtitle renderer for the ASS/SSA (Advanced Substation Alpha/Substation Alpha) subtitle format." +PKG_LONGDESC="libass is a portable subtitle renderer for the ASS/SSA (Advanced Substation Alpha/Substation Alpha) subtitle format. It is mostly compatible with VSFilter" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/multimedia/libass/url b/packages/multimedia/libass/url deleted file mode 100644 index f0aaa8f540..0000000000 --- a/packages/multimedia/libass/url +++ /dev/null @@ -1 +0,0 @@ -http://libass.googlecode.com/files/libass-0.9.9.tar.bz2 \ No newline at end of file diff --git a/packages/multimedia/libbluray/meta b/packages/multimedia/libbluray/meta index ed999886e9..5e04af85b1 100644 --- a/packages/multimedia/libbluray/meta +++ b/packages/multimedia/libbluray/meta @@ -12,3 +12,5 @@ PKG_SECTION="multimedia" PKG_SHORTDESC="libbluray: A Blu-Ray Discs playback library" PKG_LONGDESC="libbluray is an open-source library designed for Blu-Ray Discs playback for media players, like VLC or MPlayer." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/multimedia/libmpeg2/build b/packages/multimedia/libmpeg2/build index 975fe0a351..c392efad1c 100755 --- a/packages/multimedia/libmpeg2/build +++ b/packages/multimedia/libmpeg2/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/multimedia/libmpeg2/install b/packages/multimedia/libmpeg2/install index 4276e56b52..1758626aa3 100755 --- a/packages/multimedia/libmpeg2/install +++ b/packages/multimedia/libmpeg2/install @@ -3,5 +3,5 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/libmpeg2/.libs/*.so* $INSTALL/usr/lib - cp -PR $PKG_BUILD/libmpeg2/convert/.libs/*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/libmpeg2/.libs/*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/libmpeg2/convert/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/multimedia/libmpeg2/meta b/packages/multimedia/libmpeg2/meta new file mode 100644 index 0000000000..0ec1a58a6b --- /dev/null +++ b/packages/multimedia/libmpeg2/meta @@ -0,0 +1,16 @@ +PKG_NAME="libmpeg2" +PKG_VERSION="0.5.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://libmpeg2.sourceforge.net/" +PKG_URL="http://libmpeg2.sourceforge.net/files/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="multimedia" +PKG_SHORTDESC="libmpeg2: The MPEG Library - version 2" +PKG_LONGDESC="The MPEG Library is a collection of C routines to decode MPEG-1 and MPEG-2 movies and dither them in a variety of colour schemes." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/multimedia/libmpeg2/url b/packages/multimedia/libmpeg2/url deleted file mode 100644 index dc46307d44..0000000000 --- a/packages/multimedia/libmpeg2/url +++ /dev/null @@ -1 +0,0 @@ -http://libmpeg2.sourceforge.net/files/libmpeg2-0.5.1.tar.gz diff --git a/packages/multimedia/libva/build b/packages/multimedia/libva/build index f098a70429..7db418d329 100755 --- a/packages/multimedia/libva/build +++ b/packages/multimedia/libva/build @@ -2,20 +2,11 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build libX11 -$SCRIPTS/build libXext -$SCRIPTS/build libXfixes -$SCRIPTS/build $LIBDRM -$SCRIPTS/build $MESA - -cd $PKG_BUILD +cd $BUILD/$PKG_NAME-* # apply patches provide with the source package cat debian/patches/*.patch | patch -p1 -$AUTORECONF - ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ diff --git a/packages/multimedia/libva/install b/packages/multimedia/libva/install index 625c93d110..cf8eed6b10 100755 --- a/packages/multimedia/libva/install +++ b/packages/multimedia/libva/install @@ -2,20 +2,14 @@ . config/options $1 -$SCRIPTS/install libX11 -$SCRIPTS/install libXext -$SCRIPTS/install libXfixes -$SCRIPTS/install $LIBDRM -$SCRIPTS/install $MESA - mkdir -p $INSTALL/usr/lib - cp -P $PKG_BUILD/va/.libs/libva*.so* $INSTALL/usr/lib + cp -P $BUILD/$PKG_NAME-*/va/.libs/libva*.so* $INSTALL/usr/lib rm -rf $INSTALL/usr/lib/libva-*.so*T mkdir -p $INSTALL/usr/lib/va - cp -P $PKG_BUILD/i965_drv_video/.libs/*.so $INSTALL/usr/lib/va + cp -P $BUILD/$PKG_NAME-*/i965_drv_video/.libs/*.so $INSTALL/usr/lib/va if [ "$DEVTOOLS" = yes ]; then mkdir -p $INSTALL/usr/bin - cp $PKG_BUILD/test/.libs/vainfo $INSTALL/usr/bin + cp $BUILD/$PKG_NAME-*/test/.libs/vainfo $INSTALL/usr/bin fi diff --git a/packages/multimedia/libva/meta b/packages/multimedia/libva/meta new file mode 100644 index 0000000000..d97f46387b --- /dev/null +++ b/packages/multimedia/libva/meta @@ -0,0 +1,16 @@ +PKG_NAME="libva" +PKG_VERSION="0.31.1-1+sds4" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://freedesktop.org/wiki/Software/vaapi" +PKG_URL="http://www.splitted-desktop.com/~gbeauchesne/libva/${PKG_NAME}_${PKG_VERSION}.tar.gz" +PKG_DEPENDS="libX11 libXext libXfixes libdrm Mesa" +PKG_BUILD_DEPENDS="toolchain libX11 libXext libXfixes libdrm Mesa" +PKG_PRIORITY="optional" +PKG_SECTION="multimedia" +PKG_SHORTDESC="libva: The main motivation for VAAPI (Video Acceleration API) is to enable hardware accelerated video decode/encode at various entry-points (VLD, IDCT, Motion Compensation etc.) for the prevailing coding standards today (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3)." +PKG_LONGDESC="The main motivation for VAAPI (Video Acceleration API) is to enable hardware accelerated video decode/encode at various entry-points (VLD, IDCT, Motion Compensation etc.) for the prevailing coding standards today (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3). Extending XvMC was considered, but due to its original design for MPEG-2 MotionComp only, it made more sense to design an interface from scratch that can fully expose the video decode capabilities in today's GPUs." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/multimedia/libva/url b/packages/multimedia/libva/url deleted file mode 100644 index 2a730c5c2b..0000000000 --- a/packages/multimedia/libva/url +++ /dev/null @@ -1 +0,0 @@ -http://www.splitted-desktop.com/~gbeauchesne/libva/libva_0.31.1-1+sds4.tar.gz \ No newline at end of file diff --git a/packages/multimedia/libvdpau/build b/packages/multimedia/libvdpau/build index 27c7e6cefd..09d5fbdc22 100755 --- a/packages/multimedia/libvdpau/build +++ b/packages/multimedia/libvdpau/build @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build libX11 - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/multimedia/libvdpau/install b/packages/multimedia/libvdpau/install index cc0480fe46..10a5a59579 100755 --- a/packages/multimedia/libvdpau/install +++ b/packages/multimedia/libvdpau/install @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/install libX11 -[ "$DEVTOOLS" = yes ] && $SCRIPTS/install vdpauinfo - mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/src/.libs/libvdpau.so* $INSTALL/usr/lib cp -P $PKG_BUILD/trace/.libs/libvdpau_trace.so* $INSTALL/usr/lib diff --git a/packages/multimedia/libvdpau/meta b/packages/multimedia/libvdpau/meta new file mode 100644 index 0000000000..3fdb44c405 --- /dev/null +++ b/packages/multimedia/libvdpau/meta @@ -0,0 +1,20 @@ +PKG_NAME="libvdpau" +PKG_VERSION="0.4.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://freedesktop.org/wiki/Software/VDPAU" +PKG_URL="http://people.freedesktop.org/~aplattner/vdpau/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="libX11" +PKG_BUILD_DEPENDS="toolchain libX11" +PKG_PRIORITY="optional" +PKG_SECTION="multimedia" +PKG_SHORTDESC="libvdpau: a Video Decode and Presentation API for UNIX." +PKG_LONGDESC="VDPAU is the Video Decode and Presentation API for UNIX. It provides an interface to video decode acceleration and presentation hardware present in modern GPUs." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" + +if [ "$DEVTOOLS" = "yes" ]; then + PKG_DEPENDS="$PKG_DEPENDS vdpauinfo" +fi diff --git a/packages/multimedia/libvdpau/url b/packages/multimedia/libvdpau/url deleted file mode 100644 index f6b087a521..0000000000 --- a/packages/multimedia/libvdpau/url +++ /dev/null @@ -1 +0,0 @@ -http://people.freedesktop.org/~aplattner/vdpau/libvdpau-0.4.1.tar.gz diff --git a/packages/multimedia/openal-soft/build b/packages/multimedia/openal-soft/build index 1ea9b264ac..b5834ebbf9 100755 --- a/packages/multimedia/openal-soft/build +++ b/packages/multimedia/openal-soft/build @@ -4,8 +4,7 @@ cd $PKG_BUILD -mkdir -p .build -cd .build +mkdir -p .build && cd .build cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \ -DCMAKE_INSTALL_PREFIX=/usr \ diff --git a/packages/multimedia/openal-soft/meta b/packages/multimedia/openal-soft/meta index d80ac22b8c..d04199e42b 100644 --- a/packages/multimedia/openal-soft/meta +++ b/packages/multimedia/openal-soft/meta @@ -13,7 +13,4 @@ PKG_SHORTDESC="openal: Open Audio Library" PKG_LONGDESC="OpenAL, the Open Audio Library, is a joint effort to create an open, vendor- neutral, cross-platform API for interactive, primarily spatialized audio. OpenAL's primary audience are application developers and desktop users that rely on portable standards like OpenGL, for games and other multimedia applications. OpenAL is already supported by a number of hardware vendors and developers." PKG_IS_ADDON="no" -if [ "$PULSEAUDIO_SUPPORT" = yes ]; then - PKG_DEPENDS="$PKG_DEPENDS pulseaudio" - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS pulseaudio" -fi +PKG_AUTORECONF="no" diff --git a/packages/multimedia/rtmpdump/build b/packages/multimedia/rtmpdump/build index 98ac7962a4..1c115177ee 100755 --- a/packages/multimedia/rtmpdump/build +++ b/packages/multimedia/rtmpdump/build @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/build zlib -$SCRIPTS/build openssl - cd $PKG_BUILD/librtmp make prefix=/usr \ diff --git a/packages/multimedia/rtmpdump/install b/packages/multimedia/rtmpdump/install index 7022c10c2f..a41b99f418 100755 --- a/packages/multimedia/rtmpdump/install +++ b/packages/multimedia/rtmpdump/install @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/install zlib -$SCRIPTS/install openssl - mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/librtmp/*.so* $INSTALL/usr/lib diff --git a/packages/multimedia/rtmpdump/meta b/packages/multimedia/rtmpdump/meta new file mode 100644 index 0000000000..6c31b97270 --- /dev/null +++ b/packages/multimedia/rtmpdump/meta @@ -0,0 +1,16 @@ +PKG_NAME="rtmpdump" +PKG_VERSION="2.3" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://rtmpdump.mplayerhq.hu/" +PKG_URL="http://rtmpdump.mplayerhq.hu/download/$PKG_NAME-$PKG_VERSION.tgz" +PKG_DEPENDS="zlib openssl" +PKG_BUILD_DEPENDS="toolchain zlib openssl" +PKG_PRIORITY="optional" +PKG_SECTION="multimedia" +PKG_SHORTDESC="rtmpdump: a toolkit for RTMP streams." +PKG_LONGDESC="rtmpdump is a toolkit for RTMP streams. All forms of RTMP are supported, including rtmp://, rtmpt://, rtmpe://, rtmpte://, and rtmps://." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/multimedia/rtmpdump/url b/packages/multimedia/rtmpdump/url deleted file mode 100644 index 1f1ced0c11..0000000000 --- a/packages/multimedia/rtmpdump/url +++ /dev/null @@ -1 +0,0 @@ -http://rtmpdump.mplayerhq.hu/download/rtmpdump-2.3.tgz diff --git a/packages/multimedia/tvheadend/build b/packages/multimedia/tvheadend/build new file mode 100755 index 0000000000..c3b94196c5 --- /dev/null +++ b/packages/multimedia/tvheadend/build @@ -0,0 +1,12 @@ +#!/bin/sh + +. config/options $1 + +cd $PKG_BUILD +./configure --prefix=/usr \ + --arch=$TARGET_ARCH \ + --cpu=$TARGET_CPU \ + --cc=$TARGET_CC \ + --release + +make diff --git a/packages/addons/emulators/mame/scripts/start.sh b/packages/multimedia/tvheadend/init.d/55_tvheadend similarity index 69% rename from packages/addons/emulators/mame/scripts/start.sh rename to packages/multimedia/tvheadend/init.d/55_tvheadend index 7133bc8d8f..06c3b0456f 100755 --- a/packages/addons/emulators/mame/scripts/start.sh +++ b/packages/multimedia/tvheadend/init.d/55_tvheadend @@ -20,21 +20,12 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -# make directory structure for mame - mkdir -p $HOME/emulators/mame/roms - mkdir -p $HOME/emulators/mame/samples - mkdir -p $HOME/emulators/mame/artwork - mkdir -p $HOME/emulators/mame/ctrlr - mkdir -p $HOME/emulators/mame/ini - mkdir -p $HOME/emulators/mame/fonts - mkdir -p $HOME/emulators/mame/cheat - mkdir -p $HOME/emulators/mame/crosshair +# start tvheadend tv server +# +# runlevels: openelec, textmode -mkdir -p image - mount -o loop mame.img image +. /etc/profile -ln -sf image/* . -./bin/mame $@ - -umount image + progress "starting TV Server" + tvheadend -C -s -f -u root -g root diff --git a/packages/multimedia/tvheadend/install b/packages/multimedia/tvheadend/install new file mode 100755 index 0000000000..fad8da7b9b --- /dev/null +++ b/packages/multimedia/tvheadend/install @@ -0,0 +1,6 @@ +#!/bin/sh + +. config/options $1 + +mkdir -p $INSTALL/usr/bin + cp -P $PKG_BUILD/build.Linux/tvheadend $INSTALL/usr/bin diff --git a/packages/multimedia/tvheadend/meta b/packages/multimedia/tvheadend/meta new file mode 100644 index 0000000000..bdee0c62da --- /dev/null +++ b/packages/multimedia/tvheadend/meta @@ -0,0 +1,16 @@ +PKG_NAME="tvheadend" +PKG_VERSION="5650" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.lonelycoder.com/hts/tvheadend_overview.html" +PKG_URL="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="avahi" +PKG_BUILD_DEPENDS="toolchain avahi" +PKG_PRIORITY="optional" +PKG_SECTION="multimedia" +PKG_SHORTDESC="tvheadend: a TV streaming server for Linux supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV, and Analog video (V4L) as input sources." +PKG_LONGDESC="Tvheadend is a TV streaming server for Linux supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV, and Analog video (V4L) as input sources. It also comes with a powerful and easy to use web interface both used for configuration and day-to-day operations, such as searching the EPG and scheduling recordings. Even so, the most notable feature of Tvheadend is how easy it is to set up: Install it, navigate to the web user interface, drill into the TV adapters tab, select your current location and Tvheadend will start scanning channels and present them to you in just a few minutes" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/multimedia/vdpauinfo/build b/packages/multimedia/vdpauinfo/build index 4face3f189..e51a6f213c 100755 --- a/packages/multimedia/vdpauinfo/build +++ b/packages/multimedia/vdpauinfo/build @@ -2,13 +2,9 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ make - -$STRIP $1 diff --git a/packages/multimedia/vdpauinfo/meta b/packages/multimedia/vdpauinfo/meta new file mode 100644 index 0000000000..f96ea90a27 --- /dev/null +++ b/packages/multimedia/vdpauinfo/meta @@ -0,0 +1,16 @@ +PKG_NAME="vdpauinfo" +PKG_VERSION="0.0.6" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://freedesktop.org/wiki/Software/VDPAU" +PKG_URL="http://people.freedesktop.org/~aplattner/vdpau/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="debug" +PKG_SHORTDESC="vdpauinfo: a tool to show vdpau infos " +PKG_LONGDESC="VDPAU is the Video Decode and Presentation API for UNIX. It provides an interface to video decode acceleration and presentation hardware present in modern GPUs." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/multimedia/vdpauinfo/url b/packages/multimedia/vdpauinfo/url deleted file mode 100644 index 9a0f48f92d..0000000000 --- a/packages/multimedia/vdpauinfo/url +++ /dev/null @@ -1 +0,0 @@ -http://people.freedesktop.org/~aplattner/vdpau/vdpauinfo-0.0.6.tar.gz diff --git a/packages/network/avahi/build b/packages/network/avahi/build index 71e7969a50..926526e32e 100755 --- a/packages/network/avahi/build +++ b/packages/network/avahi/build @@ -2,11 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build expat -$SCRIPTS/build libdaemon -$SCRIPTS/build dbus - cd $PKG_BUILD py_cv_mod_gtk_=yes \ py_cv_mod_dbus_=yes \ diff --git a/packages/network/avahi/install b/packages/network/avahi/install index 9e8a845170..cd67822ed4 100755 --- a/packages/network/avahi/install +++ b/packages/network/avahi/install @@ -2,11 +2,6 @@ . config/options $1 -$SCRIPTS/install expat -$SCRIPTS/install libdaemon -$SCRIPTS/install dbus -$SCRIPTS/install connman - add_user avahi x 495 495 "avahi-daemon" "/var/run/avahi-daemon" "/bin/sh" add_group avahi 495 diff --git a/packages/network/avahi/meta b/packages/network/avahi/meta new file mode 100644 index 0000000000..2a3b0694ab --- /dev/null +++ b/packages/network/avahi/meta @@ -0,0 +1,16 @@ +PKG_NAME="avahi" +PKG_VERSION="0.6.28" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://avahi.org/" +PKG_URL="http://www.avahi.org/download/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="expat libdaemon dbus connman" +PKG_BUILD_DEPENDS="toolchain expat libdaemon dbus" +PKG_PRIORITY="optional" +PKG_SECTION="network" +PKG_SHORTDESC="avahi: A Zeroconf mDNS/DNS-SD responder" +PKG_LONGDESC="Avahi is a framework for Multicast DNS Service Discovery (mDNS/DNS-SD a.k.a. Zeroconf) on Linux. It allows programs to publish and discover services running on a local network with no specific configuration. For example, you can plug into a network and instantly find printers to print to, files to look at, and people to talk to." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/network/avahi/url b/packages/network/avahi/url deleted file mode 100644 index 59bd81ebdf..0000000000 --- a/packages/network/avahi/url +++ /dev/null @@ -1 +0,0 @@ -http://www.avahi.org/download/avahi-0.6.27.tar.gz \ No newline at end of file diff --git a/packages/network/bluez/build b/packages/network/bluez/build index 5a15aff51f..d0f9b4b454 100755 --- a/packages/network/bluez/build +++ b/packages/network/bluez/build @@ -2,15 +2,6 @@ . config/options -$SCRIPTS/build toolchain -$SCRIPTS/build alsa-lib -$SCRIPTS/build libusb-compat -$SCRIPTS/build dbus -$SCRIPTS/build glib -#$SCRIPTS/build gettext - -cd $PKG_BUILD - if [ $DEBUG = yes ]; then DEBUG_CONFIG="--enable-debug" else @@ -22,6 +13,7 @@ else DEVTOOLS_CONFIG="--disable-bccmd --disable-test --disable-tools" fi +cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ @@ -41,7 +33,6 @@ fi --enable-input \ --disable-audio \ --enable-service \ - --disable-mcap \ --disable-pnat \ --disable-attrib \ --disable-gstreamer \ @@ -59,7 +50,6 @@ fi --disable-maemo6 \ --disable-hal \ --disable-capng \ - --disable-netlink \ --with-gnu-ld \ $DEBUG_CONFIG \ $DEVTOOLS_CONFIG diff --git a/packages/network/bluez/install b/packages/network/bluez/install index 8898dd0486..eb751ed838 100755 --- a/packages/network/bluez/install +++ b/packages/network/bluez/install @@ -2,16 +2,12 @@ . config/options -$SCRIPTS/install libusb-compat -$SCRIPTS/install dbus -$SCRIPTS/install glib -$SCRIPTS/install alsa-lib - PKG_DIR=`find $PACKAGES -type d -name $1` mkdir -p $INSTALL/etc/bluetooth cp $PKG_BUILD/src/main.conf $INSTALL/etc/bluetooth cp $PKG_BUILD/tools/rfcomm.conf $INSTALL/etc/bluetooth + cp $PKG_BUILD/input/input.conf $INSTALL/etc/bluetooth mkdir -p $INSTALL/etc/dbus-1/system.d cp $PKG_BUILD/src/bluetooth.conf $INSTALL/etc/dbus-1/system.d diff --git a/packages/network/bluez/meta b/packages/network/bluez/meta new file mode 100644 index 0000000000..9ec10a916e --- /dev/null +++ b/packages/network/bluez/meta @@ -0,0 +1,16 @@ +PKG_NAME="bluez" +PKG_VERSION="4.80" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.bluez.org/" +PKG_URL="http://www.kernel.org/pub/linux/bluetooth/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="alsa-lib libusb-compat dbus glib" +PKG_BUILD_DEPENDS="toolchain alsa-lib libusb-compat dbus glib" +PKG_PRIORITY="optional" +PKG_SECTION="network" +PKG_SHORTDESC="bluez: Bluetooth Tools and System Daemons for Linux." +PKG_LONGDESC="Bluetooth Tools and System Daemons for Linux." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/network/bluez/patches/bluez_ps3remote_4.76.diff b/packages/network/bluez/patches/bluez-4.80-ps3remote.patch similarity index 100% rename from packages/network/bluez/patches/bluez_ps3remote_4.76.diff rename to packages/network/bluez/patches/bluez-4.80-ps3remote.patch diff --git a/packages/network/bluez/url b/packages/network/bluez/url deleted file mode 100644 index eb5851187a..0000000000 --- a/packages/network/bluez/url +++ /dev/null @@ -1 +0,0 @@ -http://www.kernel.org/pub/linux/bluetooth/bluez-4.77.tar.bz2 \ No newline at end of file diff --git a/packages/network/connman/build b/packages/network/connman/build index c4d689021f..bd1fb79cdb 100755 --- a/packages/network/connman/build +++ b/packages/network/connman/build @@ -4,7 +4,6 @@ cd $PKG_BUILD ac_cv_path_WPASUPPLICANT="/sbin/wpa_supplicant" \ -ac_cv_path_NTPD="/usr/sbin/ntpd" \ ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ @@ -15,7 +14,6 @@ ac_cv_path_NTPD="/usr/sbin/ntpd" \ --disable-gtk-doc \ --disable-debug \ --enable-threads \ - --enable-loopback=builtin \ --enable-ethernet=builtin \ --enable-wifi=builtin \ --disable-bluetooth \ @@ -23,21 +21,24 @@ ac_cv_path_NTPD="/usr/sbin/ntpd" \ --disable-ofono \ --disable-dhclient \ --disable-openconnect \ - --disable-pacrunner \ + --enable-portal=builtin \ + --disable-openvpn \ + --enable-loopback=builtin \ --enable-dnsproxy=builtin \ + --disable-pacrunner \ --enable-google=builtin \ --enable-meego=builtin \ - --enable-portal=builtin \ --disable-iwmx \ --disable-iospm \ --enable-ntpd=builtin \ + --with-ntpd="/usr/sbin/ntpd" \ + --disable-systemd \ --disable-polkit \ --enable-client \ --disable-tools \ --disable-test \ --disable-fake \ --disable-capng \ - --enable-udev \ --enable-datafiles \ --disable-silent-rules \ diff --git a/packages/network/connman/config/hosts.conf b/packages/network/connman/config/hosts.conf index ca58cffac8..d6a73331ed 100644 --- a/packages/network/connman/config/hosts.conf +++ b/packages/network/connman/config/hosts.conf @@ -1,4 +1,7 @@ -# Here you can add additional hosts for usage with hosts.conf from system -# +# hosts.conf + +# This configuration file allows you to manually map hostnames to +# IP addresses + # Format: -# Example: 192.168.0.3 mynas mynas.mynetwork storage +# Example: 192.168.0.3 openelec openelec.mynetwork diff --git a/packages/network/connman/config/network.conf b/packages/network/connman/config/network.conf index 0fc764d667..31c4fd3431 100644 --- a/packages/network/connman/config/network.conf +++ b/packages/network/connman/config/network.conf @@ -1,40 +1,62 @@ -# Network configuration +# network.conf +# +# This configuration file allows you to customize your network +# configuration -# Hostname to use, this also affects Samba, Avahi and some others -# ypu can leave blank to use "openelec" as hostname (default) +# Hostname +# Sets the machine's hostname - This setting also also affects Samba, +# Avahi and some other services +# This option left blank sets the hostname to the default setting, "openelec" HOSTNAME="" -# Network technology ( LAN / WLAN ) -# "LAN" or leave blank to use Wired LAN Connection (default) +# Network Technology ( LAN / WLAN ) +# This option lets you switch between a LAN and WLAN connection +# Left blank or set to "LAN" sets the machine to use a wired network connection +# "WLAN" sets the machine to use a wireless connection NETWORK="" -# Network interface name or address (e.g. "eth0", "wlan0" or "00:0d:56:ec:ba:0c") -# you can leave blank to use eth0 (default) +# Network interface name or address +# This option lets you specificy a network device's name or address +# e.g. "eth0", "wlan0" or "00:0d:56:ec:ba:0c" +# Leaving this option blank uses the default setting "eth0" IFACE="" -# Static IP address in CIDR format (e.g. "192.168.1.1/24") -# leave blank to use DHCP server (default) +# Static IP address +# This option lets you set a static IP address in CIDR format +# e.g. "192.168.1.1/24" +# Leave blank to use DHCP (default) IPADDRESS="" -# Network gateway (e.g. "192.168.1.254") -# you must setup if you use an static IP address +# Network gateway +# This option lets you set your gateway address +# e.g. "192.168.1.254" +# This variable must be set if you are using a static IP address GATEWAY="" -# List of DNS servers (e.g. "192.168.1.253;192.168.1.254") -# you must setup if you use an static IP address +# DNS servers +# This option lets you set up DNS for your network +# e.g. "192.168.1.253;192.168.1.254" +# This variable must be set if you are using a static IP address NAMESERVER="" -# WLAN SSID (e.g. "MyNetwork") -# needed for Wireless network configuration +# WLAN SSID +# This option lets you set the SSID for your wireless network +# e.g. "MyNetwork" +# This variable must be set if you are using a wireless device SSID="" -# WLAN Security method ( NONE / WEP / PSK ) -# "NONE" or leave blank on an open WLAN (default) +# WLAN Security +# This option lets you chose the security protocol for your wireless +# network +# Options are "NONE" / "WEP" / "PSK" ) +# "NONE" or left blank for an open WLAN (default) # "WEP" for WEP protected WLAN's # "PSK" for WPA protected WLAN's SECURITY="" -# Passphrase to access your Wireless network (e.g. "TopSecret") -# needed for secure Wireless network configuration (WEP and WPA) +# WLAN Passphrase +# This option lets you set the password for your wireless network +# e.g. "TopSecret" +# This variable must be set if you are using a secure wireless network PASSPHRASE="" diff --git a/packages/network/connman/meta b/packages/network/connman/meta index 9491503c4e..c4f9375f12 100644 --- a/packages/network/connman/meta +++ b/packages/network/connman/meta @@ -1,18 +1,20 @@ PKG_NAME="connman" -PKG_VERSION="0.62" +PKG_VERSION="20101116" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.connman.net" -PKG_URL="http://www.kernel.org/pub/linux/network/connman/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="glib dbus udev wpa_supplicant ntp siglaunchd" -PKG_BUILD_DEPENDS="toolchain glib dbus udev" +PKG_URL="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="glib dbus udev iptables wpa_supplicant ntp siglaunchd" +PKG_BUILD_DEPENDS="toolchain glib dbus udev iptables" PKG_PRIORITY="optional" PKG_SECTION="network" PKG_SHORTDESC="connman: Network manager daemon" PKG_LONGDESC="The ConnMan project provides a daemon for managing internet connections within embedded devices running the Linux operating system. The Connection Manager is designed to be slim and to use as few resources as possible, so it can be easily integrated. It is a fully modular system that can be extended, through plug-ins, to support all kinds of wired or wireless technologies. Also, configuration methods, like DHCP and domain name resolving, are implemented using plug-ins. The plug-in approach allows for easy adaption and modification for various use cases." PKG_IS_ADDON="no" +PKG_AUTORECONF="yes" + if [ "$DEVTOOLS" = yes ]; then PKG_DEPENDS="$PKG_DEPENDS Python pygobject dbus-python" fi diff --git a/packages/network/dropbear/build b/packages/network/dropbear/build index 6b25db7b6a..2354a4176e 100755 --- a/packages/network/dropbear/build +++ b/packages/network/dropbear/build @@ -8,8 +8,6 @@ cd $PKG_BUILD --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ - --disable-static \ - --enable-shared \ --enable-largefile \ --enable-zlib \ --disable-pam \ diff --git a/packages/network/dropbear/meta b/packages/network/dropbear/meta index f4add09994..acc3036463 100644 --- a/packages/network/dropbear/meta +++ b/packages/network/dropbear/meta @@ -12,3 +12,5 @@ PKG_SECTION="security" PKG_SHORTDESC="dropbear: A relatively small SSH 2 server and client" PKG_LONGDESC="Dropbear is a relatively small SSH 2 server and client suitable for embedded systems. It runs on a variety of POSIX-based platforms." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/network/ethtool/build b/packages/network/ethtool/build index 01f86c4d70..6f3c8d4d29 100755 --- a/packages/network/ethtool/build +++ b/packages/network/ethtool/build @@ -2,7 +2,7 @@ . config/options $1 -$SCRIPTS/build toolchain +LDFLAGS="$LDFLAGS -fwhole-program" cd $PKG_BUILD diff --git a/packages/network/ethtool/meta b/packages/network/ethtool/meta new file mode 100644 index 0000000000..32de4f6ed9 --- /dev/null +++ b/packages/network/ethtool/meta @@ -0,0 +1,16 @@ +PKG_NAME="ethtool" +PKG_VERSION="2.6.36" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://sourceforge.net/projects/gkernel/" +PKG_URL="http://downloads.sourceforge.net/project/gkernel/$PKG_NAME/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="network" +PKG_SHORTDESC="ethtool: Display or change ethernet card settings" +PKG_LONGDESC="Ethtool is used for querying settings of an ethernet device and changing them." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/network/ethtool/url b/packages/network/ethtool/url deleted file mode 100644 index 4df1bb236e..0000000000 --- a/packages/network/ethtool/url +++ /dev/null @@ -1 +0,0 @@ -http://downloads.sourceforge.net/project/gkernel/ethtool/2.6.35/ethtool-2.6.35.tar.gz \ No newline at end of file diff --git a/packages/network/iptables/build b/packages/network/iptables/build new file mode 100755 index 0000000000..ae02f2cf85 --- /dev/null +++ b/packages/network/iptables/build @@ -0,0 +1,17 @@ +#!/bin/sh + +. config/options $1 + +cd $PKG_BUILD +./configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --disable-static \ + --enable-shared \ + --with-kernel="$(kernel_path)" \ + +make + +$MAKEINSTALL diff --git a/packages/network/iptables/install b/packages/network/iptables/install new file mode 100755 index 0000000000..5017bc5633 --- /dev/null +++ b/packages/network/iptables/install @@ -0,0 +1,6 @@ +#!/bin/sh + +. config/options $1 + +mkdir -p $INSTALL/usr/lib + cp -P $PKG_BUILD/.libs/*.so*[.0-9] $INSTALL/usr/lib/ diff --git a/packages/network/iptables/meta b/packages/network/iptables/meta new file mode 100644 index 0000000000..2933d9cd14 --- /dev/null +++ b/packages/network/iptables/meta @@ -0,0 +1,16 @@ +PKG_NAME="iptables" +PKG_VERSION="1.4.10" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.netfilter.org/" +PKG_URL="http://www.netfilter.org/projects/iptables/files/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain linux" +PKG_PRIORITY="optional" +PKG_SECTION="network" +PKG_SHORTDESC="iptables: IP packet filter administration" +PKG_LONGDESC="Iptables is used to set up, maintain, and inspect the tables of IP packet filter rules in the Linux kernel. There are several different tables which may be defined, and each table contains a number of built-in chains, and may contain user-defined chains." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/network/libnl/meta b/packages/network/libnl/meta new file mode 100644 index 0000000000..23b0056723 --- /dev/null +++ b/packages/network/libnl/meta @@ -0,0 +1,16 @@ +PKG_NAME="libnl" +PKG_VERSION="1.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="LGPL" +PKG_SITE="http://people.suug.ch/~tgr/libnl/" +PKG_URL="https://launchpad.net/ubuntu/hardy/+source/libnl/1.1-1/+files/${PKG_NAME}_${PKG_VERSION}.orig.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="network" +PKG_SHORTDESC="libnl: libnl - netlink library" +PKG_LONGDESC="libnl is a library for applications dealing with netlink socket. It provides an easy to use interface for raw netlink message but also netlink family specific APIs." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/network/libnl/patches/libnl-fix_missing_include-0.1.diff b/packages/network/libnl/patches/libnl-1.1-fix_missing_include-0.1.patch similarity index 100% rename from packages/network/libnl/patches/libnl-fix_missing_include-0.1.diff rename to packages/network/libnl/patches/libnl-1.1-fix_missing_include-0.1.patch diff --git a/packages/network/libnl/url b/packages/network/libnl/url deleted file mode 100644 index c0e4300eab..0000000000 --- a/packages/network/libnl/url +++ /dev/null @@ -1 +0,0 @@ -https://launchpad.net/ubuntu/hardy/+source/libnl/1.1-1/+files/libnl_1.1.orig.tar.gz \ No newline at end of file diff --git a/packages/network/libssh/build b/packages/network/libssh/build index 820ce25d77..97ab504326 100755 --- a/packages/network/libssh/build +++ b/packages/network/libssh/build @@ -2,13 +2,10 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build zlib -$SCRIPTS/build openssl +strip_lto # libssh fails to build with LTO optimization cd $PKG_BUILD -mkdir -p build -cd build +mkdir -p build && cd build cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \ -DCMAKE_INSTALL_PREFIX=/usr \ diff --git a/packages/network/libssh/install b/packages/network/libssh/install index 29840b7400..09373db289 100755 --- a/packages/network/libssh/install +++ b/packages/network/libssh/install @@ -2,8 +2,5 @@ . config/options $1 -$SCRIPTS/install zlib -$SCRIPTS/install openssl - mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/build/libssh/*.so* $INSTALL/usr/lib diff --git a/packages/network/libssh/meta b/packages/network/libssh/meta new file mode 100644 index 0000000000..7ce32af935 --- /dev/null +++ b/packages/network/libssh/meta @@ -0,0 +1,16 @@ +PKG_NAME="libssh" +PKG_VERSION="0.4.6" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OpenSource" +PKG_SITE="http://www.libssh.org/" +PKG_URL="http://www.libssh.org/files/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="zlib openssl" +PKG_BUILD_DEPENDS="toolchain zlib openssl" +PKG_PRIORITY="optional" +PKG_SECTION="network" +PKG_SHORTDESC="libssh: A working SSH implementation by means of a library" +PKG_LONGDESC="The ssh library was designed to be used by programmers needing a working SSH implementation by the mean of a library. The complete control of the client is made by the programmer. With libssh, you can remotely execute programs, transfer files, use a secure and transparent tunnel for your remote programs. With its Secure FTP implementation, you can play with remote files easily, without third-party programs others than libcrypto (from openssl)." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/network/libssh/url b/packages/network/libssh/url deleted file mode 100644 index 10316e369d..0000000000 --- a/packages/network/libssh/url +++ /dev/null @@ -1 +0,0 @@ -http://www.libssh.org/files/libssh-0.4.5.tar.gz \ No newline at end of file diff --git a/packages/network/netmount/config/netmount.conf.sample b/packages/network/netmount/config/netmount.conf.sample index ed5f5fac2b..0fda4757a7 100644 --- a/packages/network/netmount/config/netmount.conf.sample +++ b/packages/network/netmount/config/netmount.conf.sample @@ -1,17 +1,17 @@ -# Mounting Network shares on boot -# This configuration file allows to setup Network mounts via CIFS (Samba) or NFS -# (not yet included) -# This is an sample file, please rename or copy this file to netmount.conf -# (location /storage/.config/ or inside the samba share "Configfiles" +# netmount.conf +# +# This configuration file allows you to setup network mounts via +# CIFS (Samba) while the system is booting +# +# This is an sample file, please rename or copy this file to +# netmount.conf in the samba share "Configfiles" (or /storage/.config/) # # Usage: # service | share on server | local mountpoint | mount options # -# - please use an "|" as delimiter -# - dont use spaces in usernames, passwords and options. -# - local mountpoints can be only on /storage and /media (not recommended!). -# - you can use any dir inside the XBMC home /storage/.xbmc/... for local -# mountpoints if you need this for some reasons. +# - Please use an "|" as delimiter +# - Don't use spaces in usernames, passwords and options +# - Local mountpoints should only be on /storage # # Examples: # cifs | //192.168.1.44/videos | /storage/mount/videos | username=user,password=secret diff --git a/packages/network/netmount/meta b/packages/network/netmount/meta index 7001fd02fa..2f6528ccb8 100644 --- a/packages/network/netmount/meta +++ b/packages/network/netmount/meta @@ -12,3 +12,5 @@ PKG_SECTION="tools" PKG_SHORTDESC="netmount: scripts for mounting network shares on boottime" PKG_LONGDESC="netmount: scripts for mounting network shares on boottime" PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/network/ntp/build b/packages/network/ntp/build index 3aa8d9ac26..56ab709d13 100755 --- a/packages/network/ntp/build +++ b/packages/network/ntp/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -11,7 +9,12 @@ cd $PKG_BUILD --sysconfdir=/etc \ --disable-static \ --enable-shared \ + --disable-all-clocks \ + --disable-ipv6 \ + --without-rpath \ + --with-gnu-ld \ + --without-crypto make -C libopts make -C ntpd -make -C ntpdate +make -C ntpdate \ No newline at end of file diff --git a/packages/network/ntp/meta b/packages/network/ntp/meta new file mode 100644 index 0000000000..0e05c170f0 --- /dev/null +++ b/packages/network/ntp/meta @@ -0,0 +1,16 @@ +PKG_NAME="ntp" +PKG_VERSION="4.2.6p2" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.ntp.org/" +PKG_URL="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="network" +PKG_SHORTDESC="ntp: Network Time Protocol utilities" +PKG_LONGDESC="The Network Time Protocol (NTP) is used to synchronize the time of a computer client or server to another server or reference time source, such as a radio or satellite receiver or modem. It provides client accuracies typically within a millisecond on LANs and up to a few tens of milliseconds on WANs relative to a primary server synchronized to Coordinated Universal Time (UTC) via a Global Positioning Service (GPS) receiver, for example." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/network/ntp/url b/packages/network/ntp/url deleted file mode 100644 index 72503bfc26..0000000000 --- a/packages/network/ntp/url +++ /dev/null @@ -1 +0,0 @@ -http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.6p2.tar.gz \ No newline at end of file diff --git a/packages/network/ppp/build b/packages/network/ppp/build index e01daad882..8182a769d9 100755 --- a/packages/network/ppp/build +++ b/packages/network/ppp/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure diff --git a/packages/network/ppp/meta b/packages/network/ppp/meta new file mode 100644 index 0000000000..e75f30a220 --- /dev/null +++ b/packages/network/ppp/meta @@ -0,0 +1,16 @@ +PKG_NAME="ppp" +PKG_VERSION="2.4.5" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.samba.org/ppp/" +PKG_URL="http://ppp.samba.org/ftp/ppp/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="network" +PKG_SHORTDESC="ppp: The PPP user level programs" +PKG_LONGDESC="The Point-to-Point Protocol (PPP) provides a standard way to establish a network connection over a serial link. At present, this package supports IP and the protocols layered above IP, such as TCP and UDP. The Linux port of this package also has support for IPX." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/network/ppp/url b/packages/network/ppp/url deleted file mode 100644 index a965890a33..0000000000 --- a/packages/network/ppp/url +++ /dev/null @@ -1 +0,0 @@ -http://ppp.samba.org/ftp/ppp/ppp-2.4.5.tar.gz diff --git a/packages/network/samba/config/samba.conf.sample b/packages/network/samba/config/samba.conf.sample index 5b466c8818..da3784c7c4 100644 --- a/packages/network/samba/config/samba.conf.sample +++ b/packages/network/samba/config/samba.conf.sample @@ -1,5 +1,10 @@ +# samba.conf + +# This configuration file allows you to customize the samba shares +# available from your machine + [global] - server string = OpenELEC.tv Mediacenter(%i) + server string = Media Centre(%i) workgroup = WORKGROUP netbios name = openelec security = share @@ -9,7 +14,8 @@ syslog only = yes name resolve order = lmhosts wins bcast host -# here you can add a writable share of a disk under /storage +# Using the following configurations as a template allows you to add +# writable shares of disks and paths under /storage [Update] path = /storage/.update diff --git a/packages/network/samba/config/smb.conf b/packages/network/samba/config/smb.conf index 5b466c8818..da3784c7c4 100644 --- a/packages/network/samba/config/smb.conf +++ b/packages/network/samba/config/smb.conf @@ -1,5 +1,10 @@ +# samba.conf + +# This configuration file allows you to customize the samba shares +# available from your machine + [global] - server string = OpenELEC.tv Mediacenter(%i) + server string = Media Centre(%i) workgroup = WORKGROUP netbios name = openelec security = share @@ -9,7 +14,8 @@ syslog only = yes name resolve order = lmhosts wins bcast host -# here you can add a writable share of a disk under /storage +# Using the following configurations as a template allows you to add +# writable shares of disks and paths under /storage [Update] path = /storage/.update diff --git a/packages/network/samba/meta b/packages/network/samba/meta index b89fc76cbe..b4b91f56ed 100644 --- a/packages/network/samba/meta +++ b/packages/network/samba/meta @@ -13,6 +13,8 @@ PKG_SHORTDESC="samba: The free SMB / CIFS fileserver and client" PKG_LONGDESC="Samba is a SMB server that runs on Unix and other operating systems. It allows these operating systems (currently Unix, Netware, OS/2 and AmigaDOS) to act as a file and print server for SMB and CIFS clients. There are many Lan-Manager compatible clients such as LanManager for DOS, Windows for Workgroups, Windows NT, Windows 95, Linux smbfs, OS/2, Pathworks and more." PKG_IS_ADDON="no" +PKG_AUTORECONF="no" + if [ "$AVAHI_DAEMON" = yes ]; then PKG_DEPENDS="$PKG_DEPENDS avahi" PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS avahi" diff --git a/packages/network/samba/patches/010_samba-3.5.3-crosscompile-0.1.diff b/packages/network/samba/patches/samba-3.5.6-010_crosscompile-0.1.patch similarity index 100% rename from packages/network/samba/patches/010_samba-3.5.3-crosscompile-0.1.diff rename to packages/network/samba/patches/samba-3.5.6-010_crosscompile-0.1.patch diff --git a/packages/network/transmission/build b/packages/network/transmission/build index b3b389e534..6f9e6d2e3f 100755 --- a/packages/network/transmission/build +++ b/packages/network/transmission/build @@ -2,13 +2,7 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build zlib -$SCRIPTS/build openssl -$SCRIPTS/build curl - cd $PKG_BUILD - ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ diff --git a/packages/network/transmission/config/transmission.conf b/packages/network/transmission/config/transmission.conf index b42588e335..77bd069b4d 100644 --- a/packages/network/transmission/config/transmission.conf +++ b/packages/network/transmission/config/transmission.conf @@ -1,6 +1,9 @@ -# Setup Transmission BitTorrent daemon +# transmission.conf -# start transmission at boot ( yes / no ) +# This configuration file allows you to setup 'Transmission' a +# BitTorrent daemon + +# Start transmission at boot ( yes / no ) TRANSMISSION_START="no" # Allow RPC access to a comma-delimited whitelist of IP addresses. @@ -8,19 +11,25 @@ # "127.0.0.1" Example: "127.0.0.*,192.168.1.*" TRANSMISSION_IP="127.0.0.1,192.168.0.*" -# use authentification for the web frontend ( yes / no ) +# Use authentication for the web frontend ( yes / no ) TRANSMISSION_AUTH="yes" -# username for logging to the webfrontend +# Username for logging to the webfrontend TRANSMISSION_USER="openelec" # password for logging to the webfrontend TRANSMISSION_PWD="openelec" -# incoming dir for not completed files (relative to downloaddir / -# "none" for disabling incoming dir) +# Download directory for downloaded files +# Leave blank to use the default download dir (/storage/downloads) + TRANSMISSION_DLDIR="" + +# Incoming directory for non completed files +# Relative to 'Downloads' directory +# Set to "none" to disable TRANSMISSION_INCDIR="incoming" -# watch dir for .torrent files (relative to downloaddir / -# "none" for disabling watch dir) +# Watch directory for .torrent files +# Relative to 'Downloads' directory +# Set to "none" to disable watch folder TRANSMISSION_WATCHDIR="watch" diff --git a/packages/network/transmission/init.network/43_transmission b/packages/network/transmission/init.network/43_transmission index 8169d9636e..fe3316a1c0 100755 --- a/packages/network/transmission/init.network/43_transmission +++ b/packages/network/transmission/init.network/43_transmission @@ -33,7 +33,10 @@ progress "Starting Transmission BT daemon" - TRANSMISSION_ARG="$TRANSMISSION_ARG -w /storage/downloads" + [ -z "$TRANSMISSION_DLDIR" ] && TRANSMISSION_DLDIR="/storage/downloads" + mkdir -p "$TRANSMISSION_DLDIR" + + TRANSMISSION_ARG="$TRANSMISSION_ARG -w $TRANSMISSION_DLDIR" TRANSMISSION_ARG="$TRANSMISSION_ARG -e /var/log/transmission.log" TRANSMISSION_ARG="$TRANSMISSION_ARG -g /storage/.cache/transmission" TRANSMISSION_ARG="$TRANSMISSION_ARG -a $TRANSMISSION_IP" @@ -50,16 +53,16 @@ TRANSMISSION_ARG="$TRANSMISSION_ARG --no-incomplete-dir" else TRANSMISSION_ARG="$TRANSMISSION_ARG --incomplete-dir \ - /storage/downloads/$TRANSMISSION_INCDIR" - $IONICE mkdir -p /storage/downloads/$TRANSMISSION_INCDIR + /$TRANSMISSION_DLDIR/$TRANSMISSION_INCDIR" + $IONICE mkdir -p /$TRANSMISSION_DLDIR/$TRANSMISSION_INCDIR fi if [ "$TRANSMISSION_WATCHDIR" = "none" ]; then TRANSMISSION_ARG="$TRANSMISSION_ARG --no-watch-dir" else TRANSMISSION_ARG="$TRANSMISSION_ARG --watch-dir \ - /storage/downloads/$TRANSMISSION_WATCHDIR" - $IONICE mkdir -p /storage/downloads/$TRANSMISSION_WATCHDIR + /$TRANSMISSION_DLDIR/$TRANSMISSION_WATCHDIR" + $IONICE mkdir -p /$TRANSMISSION_DLDIR/$TRANSMISSION_WATCHDIR fi transmission-daemon $TRANSMISSION_ARG diff --git a/packages/network/transmission/install b/packages/network/transmission/install index 2f06fabb22..17df83c02f 100755 --- a/packages/network/transmission/install +++ b/packages/network/transmission/install @@ -2,11 +2,6 @@ . config/options $1 -$SCRIPTS/install zlib -$SCRIPTS/install openssl -$SCRIPTS/install curl -$SCRIPTS/install connman - mkdir -p $INSTALL/usr/sbin cp $PKG_BUILD/daemon/transmission-daemon $INSTALL/usr/sbin diff --git a/packages/network/transmission/meta b/packages/network/transmission/meta new file mode 100644 index 0000000000..0ee8bc9b67 --- /dev/null +++ b/packages/network/transmission/meta @@ -0,0 +1,16 @@ +PKG_NAME="transmission" +PKG_VERSION="2.11" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.transmissionbt.com/" +PKG_URL="http://download.m0k.org/transmission/files/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="zlib openssl curl libevent connman" +PKG_BUILD_DEPENDS="toolchain zlib openssl curl libevent" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="transmission: a fast, easy and free BitTorrent client" +PKG_LONGDESC="transmission is a fast, easy and free BitTorrent client" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/network/transmission/url b/packages/network/transmission/url deleted file mode 100644 index 3b77ff5833..0000000000 --- a/packages/network/transmission/url +++ /dev/null @@ -1 +0,0 @@ -http://mirrors.m0k.org/transmission/files/transmission-1.93.tar.bz2 \ No newline at end of file diff --git a/packages/network/wpa_supplicant/build b/packages/network/wpa_supplicant/build index f7e57f61ca..30baa014f3 100755 --- a/packages/network/wpa_supplicant/build +++ b/packages/network/wpa_supplicant/build @@ -2,9 +2,9 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build dbus -$SCRIPTS/build libnl +cd $PKG_BUILD/$1 + +cp $ROOT/$PKG_DIR/config/makefile.config .config +[ $DEBUG = no ] && echo "CONFIG_NO_STDOUT_DEBUG=y" >> .config -cd $PKG_BUILD/wpa_supplicant make diff --git a/packages/network/wpa_supplicant/install b/packages/network/wpa_supplicant/install index 9ac0944faf..b14034672f 100755 --- a/packages/network/wpa_supplicant/install +++ b/packages/network/wpa_supplicant/install @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/install dbus -$SCRIPTS/install libnl - mkdir -p $INSTALL/etc/dbus-1/system.d cp $PKG_BUILD/wpa_supplicant/dbus/dbus-wpa_supplicant.conf $INSTALL/etc/dbus-1/system.d diff --git a/packages/network/wpa_supplicant/meta b/packages/network/wpa_supplicant/meta new file mode 100644 index 0000000000..291736f874 --- /dev/null +++ b/packages/network/wpa_supplicant/meta @@ -0,0 +1,16 @@ +PKG_NAME="wpa_supplicant" +PKG_VERSION="0.7.3" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://hostap.epitest.fi/wpa_supplicant/" +PKG_URL="http://hostap.epitest.fi/releases/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="dbus libnl" +PKG_BUILD_DEPENDS="toolchain dbus libnl" +PKG_PRIORITY="optional" +PKG_SECTION="network" +PKG_SHORTDESC="wpa_supplicant: An IEEE 802.11i supplicant implementation" +PKG_LONGDESC="The wpa_supplicant is a free software implementation of an IEEE 802.11i supplicant. In addition to being a full-featured WPA2 supplicant, it also has support for WPA and older wireless LAN security protocols." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/network/wpa_supplicant/patches/bcm-custom_event-0.7.2.diff b/packages/network/wpa_supplicant/patches/wpa_supplicant-0.7.3-bcm_custom_event.patch similarity index 100% rename from packages/network/wpa_supplicant/patches/bcm-custom_event-0.7.2.diff rename to packages/network/wpa_supplicant/patches/wpa_supplicant-0.7.3-bcm_custom_event.patch diff --git a/packages/network/wpa_supplicant/unpack b/packages/network/wpa_supplicant/unpack deleted file mode 100755 index 27438d7b98..0000000000 --- a/packages/network/wpa_supplicant/unpack +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -. config/options $1 - -$SCRIPTS/build toolchain - -WPA_SUPPLICANT=`ls -d $PKG_BUILD`/wpa_supplicant - -cp $PKG_DIR/config/makefile.config $WPA_SUPPLICANT/.config - -if [ $DEBUG = no ]; then - echo "CONFIG_NO_STDOUT_DEBUG=y" >> $WPA_SUPPLICANT/.config -fi diff --git a/packages/network/wpa_supplicant/url b/packages/network/wpa_supplicant/url deleted file mode 100644 index 2e1807ae92..0000000000 --- a/packages/network/wpa_supplicant/url +++ /dev/null @@ -1 +0,0 @@ -http://hostap.epitest.fi/releases/wpa_supplicant-0.7.3.tar.gz diff --git a/packages/oem/meta b/packages/oem/meta index f3a3d61f3e..74a92c3b23 100644 --- a/packages/oem/meta +++ b/packages/oem/meta @@ -12,3 +12,5 @@ PKG_SECTION="oem" PKG_SHORTDESC="OEM: Metapackage for various OEM packages" PKG_LONGDESC="" PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/other/enca/build b/packages/other/enca/build index 79b1bf9463..574d74b712 100755 --- a/packages/other/enca/build +++ b/packages/other/enca/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ac_cv_file__dev_random=yes \ ac_cv_file__dev_urandom=no \ diff --git a/packages/other/enca/install b/packages/other/enca/install index 5924367d57..e984b7d01d 100755 --- a/packages/other/enca/install +++ b/packages/other/enca/install @@ -3,5 +3,5 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -P $PKG_BUILD/lib/.libs/*.so* $INSTALL/usr/lib + cp $PKG_BUILD/lib/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/other/enca/meta b/packages/other/enca/meta new file mode 100644 index 0000000000..b300bc7911 --- /dev/null +++ b/packages/other/enca/meta @@ -0,0 +1,16 @@ +PKG_NAME="enca" +PKG_VERSION="1.13" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://freshmeat.net/projects/enca/" +PKG_URL="http://dl.cihar.com/enca/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain libiconv" +PKG_PRIORITY="optional" +PKG_SECTION="other" +PKG_SHORTDESC="enca: detects the encoding of text files, on the basis of knowledge of their language." +PKG_LONGDESC="Enca detects the encoding of text files, on the basis of knowledge of their language. It can also convert them to other encodings, allowing you to recode files without knowing their current encoding. It supports most of Central and East European languages, and a few Unicode variants, independently on language." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/other/enca/patches/10-enca-crosscompile.diff b/packages/other/enca/patches/enca-1.13-crosscompile.patch similarity index 100% rename from packages/other/enca/patches/10-enca-crosscompile.diff rename to packages/other/enca/patches/enca-1.13-crosscompile.patch diff --git a/packages/other/enca/url b/packages/other/enca/url deleted file mode 100644 index dac8a76c82..0000000000 --- a/packages/other/enca/url +++ /dev/null @@ -1 +0,0 @@ -http://dl.cihar.com/enca/enca-1.13.tar.bz2 \ No newline at end of file diff --git a/packages/other/fribidi/build b/packages/other/fribidi/build index 8caa8aeaca..9792858b67 100755 --- a/packages/other/fribidi/build +++ b/packages/other/fribidi/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/other/fribidi/install b/packages/other/fribidi/install index 8fb846d505..6affa11e33 100755 --- a/packages/other/fribidi/install +++ b/packages/other/fribidi/install @@ -3,4 +3,4 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/lib/.libs/*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/lib/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/other/fribidi/meta b/packages/other/fribidi/meta new file mode 100644 index 0000000000..03270c8810 --- /dev/null +++ b/packages/other/fribidi/meta @@ -0,0 +1,16 @@ +PKG_NAME="fribidi" +PKG_VERSION="0.19.2" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="LGPL" +PKG_SITE="http://fribidi.org/" +PKG_URL="http://fribidi.org/download/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="other" +PKG_SHORTDESC="fribidi: The Bidirectional Algorithm library" +PKG_LONGDESC="The library implements all of the algorithm as described in the Unicode Standard Annex #9, The Bidirectional Algorithm, http://www.unicode.org/unicode/reports/tr9/. FriBidi is exhautively tested against Bidi Reference Code, and due to our best knowledge, does not contain any conformance bugs." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/other/fribidi/patches/10_chunk-size.diff b/packages/other/fribidi/patches/fribidi-0.19.2-chunk_size.patch similarity index 100% rename from packages/other/fribidi/patches/10_chunk-size.diff rename to packages/other/fribidi/patches/fribidi-0.19.2-chunk_size.patch diff --git a/packages/other/fribidi/url b/packages/other/fribidi/url deleted file mode 100644 index 4e2af438b2..0000000000 --- a/packages/other/fribidi/url +++ /dev/null @@ -1 +0,0 @@ -http://fribidi.org/download/fribidi-0.19.2.tar.gz \ No newline at end of file diff --git a/packages/other/libIDL-host/build b/packages/other/libIDL-host/build index 2a6da1f4ae..946108d5d0 100755 --- a/packages/other/libIDL-host/build +++ b/packages/other/libIDL-host/build @@ -2,16 +2,12 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build glib-host $SCRIPTS/unpack libIDL setup_toolchain host cd $BUILD/libIDL* - -mkdir -p .build-host -cd .build-host +mkdir -p .build-host && cd .build-host libIDL_cv_long_long_format=ll \ ../configure --prefix=$ROOT/$TOOLCHAIN diff --git a/packages/other/libIDL-host/meta b/packages/other/libIDL-host/meta new file mode 100644 index 0000000000..302adf4b65 --- /dev/null +++ b/packages/other/libIDL-host/meta @@ -0,0 +1,16 @@ +PKG_NAME="libIDL" +PKG_VERSION="" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="LGPL" +PKG_SITE="http://www.gnome.org" +PKG_URL="" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain glib-host" +PKG_PRIORITY="optional" +PKG_SECTION="other" +PKG_SHORTDESC="libidl: Library for creating trees of CORBA IDL files" +PKG_LONGDESC="libIDL is a library for creating trees of CORBA Interface Definition Language (IDL) files." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/other/libIDL/build b/packages/other/libIDL/build index 9cdd76be28..79a4055ce0 100755 --- a/packages/other/libIDL/build +++ b/packages/other/libIDL/build @@ -2,13 +2,9 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build glib - cd $PKG_BUILD -mkdir -p .build-target -cd .build-target +mkdir -p .build-target && cd .build-target libIDL_cv_long_long_format=ll \ ../configure --host=$TARGET_NAME \ diff --git a/packages/other/libIDL/install b/packages/other/libIDL/install index bda1a1af20..f08009babd 100755 --- a/packages/other/libIDL/install +++ b/packages/other/libIDL/install @@ -2,7 +2,5 @@ . config/options $1 -$SCRIPTS/install glib - mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/.build-target/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/other/libIDL/meta b/packages/other/libIDL/meta new file mode 100644 index 0000000000..d2acad1a0a --- /dev/null +++ b/packages/other/libIDL/meta @@ -0,0 +1,16 @@ +PKG_NAME="libIDL" +PKG_VERSION="0.8.14" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="LGPL" +PKG_SITE="http://www.gnome.org" +PKG_URL="ftp://ftp.gnome.org/pub/gnome/sources/libIDL/0.8/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="glib" +PKG_BUILD_DEPENDS="toolchain glib" +PKG_PRIORITY="optional" +PKG_SECTION="other" +PKG_SHORTDESC="libidl: Library for creating trees of CORBA IDL files" +PKG_LONGDESC="libIDL is a library for creating trees of CORBA Interface Definition Language (IDL) files." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/other/libIDL/url b/packages/other/libIDL/url deleted file mode 100644 index 3b1f067825..0000000000 --- a/packages/other/libIDL/url +++ /dev/null @@ -1 +0,0 @@ -ftp://ftp.gnome.org/pub/gnome/sources/libIDL/0.8/libIDL-0.8.14.tar.bz2 \ No newline at end of file diff --git a/packages/other/libdaemon/build b/packages/other/libdaemon/build index 04dfb735ec..a6260cd134 100755 --- a/packages/other/libdaemon/build +++ b/packages/other/libdaemon/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ac_cv_func_setpgrp_void=no \ ./configure --host=$TARGET_NAME \ diff --git a/packages/other/libdaemon/install b/packages/other/libdaemon/install index fd547a1173..ee48040034 100755 --- a/packages/other/libdaemon/install +++ b/packages/other/libdaemon/install @@ -3,4 +3,4 @@ . config/options $1 mkdir -p $INSTALL/usr/lib -cp -PR $PKG_BUILD/$1/.libs/*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/$1/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/other/libdaemon/meta b/packages/other/libdaemon/meta new file mode 100644 index 0000000000..cf6cde368f --- /dev/null +++ b/packages/other/libdaemon/meta @@ -0,0 +1,16 @@ +PKG_NAME="libdaemon" +PKG_VERSION="0.14" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://0pointer.de/lennart/projects/libdaemon/" +PKG_URL="http://0pointer.de/lennart/projects/libdaemon/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="other" +PKG_SHORTDESC="libdaemon: A lightweight C library which eases the writing of UNIX daemons" +PKG_LONGDESC="A wrapper around fork() which does the correct daemonization procedure of a process. A wrapper around syslog() for simpler and compatible log output to Syslog or STDERR. An API for writing PID files. An API for serializing UNIX signals into a pipe for usage with select() or poll()." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/other/libdaemon/url b/packages/other/libdaemon/url deleted file mode 100644 index 53d3d5ea89..0000000000 --- a/packages/other/libdaemon/url +++ /dev/null @@ -1 +0,0 @@ -http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.14.tar.gz \ No newline at end of file diff --git a/packages/plugins/SABnzbd/install b/packages/plugins/SABnzbd/install index 31e5722daf..9de4ba0c8a 100755 --- a/packages/plugins/SABnzbd/install +++ b/packages/plugins/SABnzbd/install @@ -2,16 +2,8 @@ . config/options $1 -$SCRIPTS/install Cheetah -$SCRIPTS/install yenc -$SCRIPTS/install pyOpenSSL -$SCRIPTS/install feedparser -$SCRIPTS/install unrar -$SCRIPTS/install unzip -$SCRIPTS/install par2cmdline - mkdir -p $INSTALL/usr/share/$1 - cp -P $BUILD/$1*/* $INSTALL/usr/share/$1 + cp -PR $BUILD/$1*/* $INSTALL/usr/share/$1 mkdir -p $INSTALL/etc - cp -P $PKG_DIR/config/*.conf $INSTALL/etc + cp $PKG_DIR/config/*.conf $INSTALL/etc diff --git a/packages/plugins/SABnzbd/meta b/packages/plugins/SABnzbd/meta new file mode 100644 index 0000000000..c775afa157 --- /dev/null +++ b/packages/plugins/SABnzbd/meta @@ -0,0 +1,16 @@ +PKG_NAME="SABnzbd" +PKG_VERSION="0.5.5" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://sabnzbd.org/" +PKG_URL="http://switch.dl.sourceforge.net/sourceforge/sabnzbdplus/${PKG_NAME}-${PKG_VERSION}-src.tar.gz" +PKG_DEPENDS="Cheetah yenc pyOpenSSL feedparser unrar unzip par2cmdline" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="plugins" +PKG_SHORTDESC="SABnzbd: makes Usenet as simple and streamlined as possible by automating everything we can." +PKG_LONGDESC="SABnzbd makes Usenet as simple and streamlined as possible by automating everything we can. All you have to do is add an .nzb. SABnzbd takes over from there, where it will be automatically downloaded, verified, repaired, extracted and filed away with zero human interaction." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/plugins/SABnzbd/url b/packages/plugins/SABnzbd/url deleted file mode 100644 index b26ed7cf10..0000000000 --- a/packages/plugins/SABnzbd/url +++ /dev/null @@ -1 +0,0 @@ -http://switch.dl.sourceforge.net/sourceforge/sabnzbdplus/SABnzbd-0.5.0-src.tar.gz diff --git a/packages/plugins/install b/packages/plugins/install deleted file mode 100755 index 0af5900c71..0000000000 --- a/packages/plugins/install +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -. config/options $1 - -for plugin in $XBMC_PLUGINS; do - $SCRIPTS/install $plugin -done diff --git a/packages/plugins/meta b/packages/plugins/meta new file mode 100644 index 0000000000..c51c8a1eec --- /dev/null +++ b/packages/plugins/meta @@ -0,0 +1,16 @@ +PKG_NAME="plugins" +PKG_VERSION="" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.openelec.tv" +PKG_URL="" +PKG_DEPENDS="$XBMC_PLUGINS" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="plugins" +PKG_SHORTDESC="plugins: Metafile to install plugins" +PKG_LONGDESC="Metafile to install plugins" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/print/freetype/build b/packages/print/freetype/build index eb9f269280..25aeddcef7 100755 --- a/packages/print/freetype/build +++ b/packages/print/freetype/build @@ -2,13 +2,12 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build zlib - # unset LIBTOOL because freetype uses its own unset LIBTOOL cd $PKG_BUILD + +sh autogen.sh ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ diff --git a/packages/print/freetype/install b/packages/print/freetype/install index 168de65dfa..2481f09e85 100755 --- a/packages/print/freetype/install +++ b/packages/print/freetype/install @@ -2,7 +2,5 @@ . config/options $1 -$SCRIPTS/install zlib - mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/objs/.libs/libfreetype.so* $INSTALL/usr/lib diff --git a/packages/print/freetype/meta b/packages/print/freetype/meta new file mode 100644 index 0000000000..d4a6a3b82d --- /dev/null +++ b/packages/print/freetype/meta @@ -0,0 +1,16 @@ +PKG_NAME="freetype" +PKG_VERSION="2.4.3" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.freetype.org" +PKG_URL="http://mirror.lihnidos.org/GNU/savannah/freetype/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="zlib" +PKG_BUILD_DEPENDS="toolchain zlib" +PKG_PRIORITY="optional" +PKG_SECTION="print" +PKG_SHORTDESC="freetype: TrueType font rendering library" +PKG_LONGDESC="The FreeType engine is a free and portable TrueType font rendering engine. It has been developed to provide TT support to a great variety of platforms and environments." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/print/freetype/url b/packages/print/freetype/url deleted file mode 100644 index 610c012b57..0000000000 --- a/packages/print/freetype/url +++ /dev/null @@ -1 +0,0 @@ -http://mirror.lihnidos.org/GNU/savannah/freetype/freetype-2.4.3.tar.bz2 \ No newline at end of file diff --git a/packages/python/devel/Cheetah/build b/packages/python/devel/Cheetah/build index 76397f3922..ad41cf4261 100755 --- a/packages/python/devel/Cheetah/build +++ b/packages/python/devel/Cheetah/build @@ -2,11 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build Python -$SCRIPTS/build distribute -$SCRIPTS/build distutilscross - export PYTHONXCPREFIX="$SYSROOT_PREFIX/usr" export LDFLAGS="$LDFLAGS -L$SYSROOT_PREFIX/usr/lib -L$SYSROOT_PREFIX/lib" diff --git a/packages/python/devel/Cheetah/install b/packages/python/devel/Cheetah/install index 4d0a7235de..73886a0890 100755 --- a/packages/python/devel/Cheetah/install +++ b/packages/python/devel/Cheetah/install @@ -2,7 +2,4 @@ . config/options $1 -$SCRIPTS/install Python -$SCRIPTS/install distribute - cp -PR $PKG_BUILD/.install/* $INSTALL diff --git a/packages/python/devel/Cheetah/meta b/packages/python/devel/Cheetah/meta new file mode 100644 index 0000000000..8355614ae1 --- /dev/null +++ b/packages/python/devel/Cheetah/meta @@ -0,0 +1,16 @@ +PKG_NAME="Cheetah" +PKG_VERSION="2.4.2.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.cheetahtemplate.org/" +PKG_URL="http://pypi.python.org/packages/source/C/Cheetah/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="Python distribute" +PKG_BUILD_DEPENDS="toolchain Python distribute distutilscross" +PKG_PRIORITY="optional" +PKG_SECTION="python/devel" +PKG_SHORTDESC="cheetah: Python-powered template engine and code generator" +PKG_LONGDESC="Cheetah is a Python-powered template engine and code generator. It can be used as a standalone utility or it can be combined with other tools. Cheetah has many potential uses, but web developers looking for a viable alternative to ASP, JSP, PHP and PSP are expected to be its principle user group." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/python/devel/Cheetah/patches/Cheetah-setuptools.diff b/packages/python/devel/Cheetah/patches/Cheetah-setuptools.diff deleted file mode 100644 index c1819042fa..0000000000 --- a/packages/python/devel/Cheetah/patches/Cheetah-setuptools.diff +++ /dev/null @@ -1,23 +0,0 @@ -diff -Naur Cheetah-2.0.1/SetupTools.py Cheetah-2.0.1.patch/SetupTools.py ---- Cheetah-2.0.1/SetupTools.py 2007-11-03 20:44:38.000000000 +0100 -+++ Cheetah-2.0.1.patch/SetupTools.py 2010-10-19 00:34:45.377616641 +0200 -@@ -19,18 +19,7 @@ - import string - import traceback - --from distutils.core import setup --if 'CHEETAH_USE_SETUPTOOLS' in os.environ: -- # @@TR: Please note that this is for testing purposes only! PEAK setuptools -- # is not required or recommended for installing Cheetah. Downstream -- # package managers (linux distros, etc.) should *not* enable this. -- try: -- # use http://peak.telecommunity.com/DevCenter/setuptools if it's installed -- # requires Py >=2.3 -- from setuptools import setup -- except ImportError: -- from distutils.core import setup -- -+from setuptools import setup - from distutils.core import Command - from distutils.command.install_data import install_data - diff --git a/packages/python/devel/Cheetah/url b/packages/python/devel/Cheetah/url deleted file mode 100644 index 73f6cf2f46..0000000000 --- a/packages/python/devel/Cheetah/url +++ /dev/null @@ -1 +0,0 @@ -http://mesh.dl.sourceforge.net/sourceforge/cheetahtemplate/Cheetah-2.0.1.tar.gz diff --git a/packages/python/devel/distribute/build b/packages/python/devel/distribute/build index b83c24d652..a7e5e1c0a7 100755 --- a/packages/python/devel/distribute/build +++ b/packages/python/devel/distribute/build @@ -4,10 +4,4 @@ cd $PKG_BUILD -#PYTHON_LIB_DIR="`ls -d $SYSROOT_PREFIX/usr/lib/python*`" -#PYTHON_IMAGE_DIR="`ls -d $ROOT/$BUILD/image/system/usr/lib/python*`" - -#export PYTHONPATH="$PYTHON_LIB_DIR/site-packages:$PYTHON_IMAGE_DIR/site-packages" - python setup.py install --prefix=$ROOT/$TOOLCHAIN -#python setup.py install --prefix=$SYSROOT_PREFIX/usr diff --git a/packages/python/devel/distribute/meta b/packages/python/devel/distribute/meta index 8f495ba637..6d697ae349 100644 --- a/packages/python/devel/distribute/meta +++ b/packages/python/devel/distribute/meta @@ -12,3 +12,5 @@ PKG_SECTION="python/devel" PKG_SHORTDESC="distribute: A collection of enhancements to the Python distutils" PKG_LONGDESC="Distribute is intended to replace Setuptools as the standard method for working with Python module distributions. Packages built and distributed using distribute look to the user like ordinary Python packages based on the distutils. Your users don't need to install or even know about setuptools in order to use them, and you don't have to include the entire setuptools package in your distributions. By including just a single bootstrap module (a 7K .py file), your package will automatically download and install setuptools if the user is building your package from source and doesn't have a suitable version already installed." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/python/devel/distutilscross/build b/packages/python/devel/distutilscross/build index 0618e4581d..a7e5e1c0a7 100755 --- a/packages/python/devel/distutilscross/build +++ b/packages/python/devel/distutilscross/build @@ -2,10 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build Python -$SCRIPTS/build distribute - cd $PKG_BUILD python setup.py install --prefix=$ROOT/$TOOLCHAIN diff --git a/packages/python/devel/distutilscross/meta b/packages/python/devel/distutilscross/meta new file mode 100644 index 0000000000..1ea08cfa01 --- /dev/null +++ b/packages/python/devel/distutilscross/meta @@ -0,0 +1,16 @@ +PKG_NAME="distutilscross" +PKG_VERSION="0.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://bitbucket.org/lambacck/distutilscross/" +PKG_URL="http://pypi.python.org/packages/source/d/distutilscross/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain Python distribute" +PKG_PRIORITY="optional" +PKG_SECTION="python/devel" +PKG_SHORTDESC="distutilscross: Cross Compile Python Extensions" +PKG_LONGDESC="distutilscross enhances distutils to support Cross Compile of Python extensions" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/python/devel/distutilscross/url b/packages/python/devel/distutilscross/url deleted file mode 100644 index 66faf4f942..0000000000 --- a/packages/python/devel/distutilscross/url +++ /dev/null @@ -1 +0,0 @@ -http://pypi.python.org/packages/source/d/distutilscross/distutilscross-0.1.tar.gz \ No newline at end of file diff --git a/packages/python/devel/pygobject/build b/packages/python/devel/pygobject/build index ac0a82b36b..6ae8656049 100755 --- a/packages/python/devel/pygobject/build +++ b/packages/python/devel/pygobject/build @@ -2,11 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build Python -$SCRIPTS/build glib -#$SCRIPTS/build libffi - PYTHON_LIBDIR="`ls -d $SYSROOT_PREFIX/usr/lib/python*`" cd $PKG_BUILD @@ -16,7 +11,8 @@ cd $PKG_BUILD --sysconfdir=/etc \ --disable-static \ --enable-shared \ - --enable-thread + --enable-thread \ + --disable-introspection \ make diff --git a/packages/python/devel/pygobject/install b/packages/python/devel/pygobject/install index 18ace73565..b06e231ed5 100755 --- a/packages/python/devel/pygobject/install +++ b/packages/python/devel/pygobject/install @@ -2,14 +2,10 @@ . config/options $1 -$SCRIPTS/install Python -$SCRIPTS/install glib -#$SCRIPTS/install libffi - PYTHON_LIB_DIR=`ls -d $INSTALL/usr/lib/python*` mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/glib/.libs/libpyglib*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/glib/.libs/libpyglib*.so* $INSTALL/usr/lib mkdir -p $PYTHON_LIB_DIR/site-packages cp $PKG_BUILD/pygtk.py $PYTHON_LIB_DIR/site-packages diff --git a/packages/python/devel/pygobject/meta b/packages/python/devel/pygobject/meta new file mode 100644 index 0000000000..b53ac1e9d7 --- /dev/null +++ b/packages/python/devel/pygobject/meta @@ -0,0 +1,16 @@ +PKG_NAME="pygobject" +PKG_VERSION="2.26.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="LGPL" +PKG_SITE="http://www.pygtk.org/" +PKG_URL="http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.26/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="Python glib libffi" +PKG_BUILD_DEPENDS="toolchain Python glib libffi" +PKG_PRIORITY="optional" +PKG_SECTION="python/devel" +PKG_SHORTDESC="pygobject: The Python bindings for GObject" +PKG_LONGDESC="PyGObject provides a convenient wrapper for the GObject+ library for use in Python programs, and takes care of many of the boring details such as managing memory and type casting. When combined with PyGTK, PyORBit and gnome-python, it can be used to write full featured Gnome applications." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/python/devel/pygobject/patches/010-binary-constants-module.diff b/packages/python/devel/pygobject/patches/010-binary-constants-module.diff deleted file mode 100644 index b8a3d5d77a..0000000000 --- a/packages/python/devel/pygobject/patches/010-binary-constants-module.diff +++ /dev/null @@ -1,5006 +0,0 @@ -diff -Naur pygobject-2.21.1/aclocal.m4 pygobject-2.21.1.patch/aclocal.m4 ---- pygobject-2.21.1/aclocal.m4 2009-12-26 22:08:32.000000000 +0100 -+++ pygobject-2.21.1.patch/aclocal.m4 2010-04-26 16:25:24.345767498 +0200 -@@ -1,7 +1,7 @@ --# generated automatically by aclocal 1.10.2 -*- Autoconf -*- -+# generated automatically by aclocal 1.11.1 -*- Autoconf -*- - - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, --# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -+# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -13,8 +13,8 @@ - - m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl --m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, --[m4_warning([this file was generated for autoconf 2.64. -+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -+[m4_warning([this file was generated for autoconf 2.65. - You have another version of autoconf. It may work, but is not guaranteed to. - If you have problems, you may need to regenerate the build system entirely. - To do so, use the procedure documented by the package, typically `autoreconf'.])]) -@@ -300,16 +300,14 @@ - # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) - # --------------------------------------------- - m4_define([_PKG_CONFIG], --[if test -n "$PKG_CONFIG"; then -- if test -n "$$1"; then -- pkg_cv_[]$1="$$1" -- else -- PKG_CHECK_EXISTS([$3], -- [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], -- [pkg_failed=yes]) -- fi --else -- pkg_failed=untried -+[if test -n "$$1"; then -+ pkg_cv_[]$1="$$1" -+ elif test -n "$PKG_CONFIG"; then -+ PKG_CHECK_EXISTS([$3], -+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], -+ [pkg_failed=yes]) -+ else -+ pkg_failed=untried - fi[]dnl - ])# _PKG_CONFIG - -@@ -353,9 +351,9 @@ - if test $pkg_failed = yes; then - _PKG_SHORT_ERRORS_SUPPORTED - if test $_pkg_short_errors_supported = yes; then -- $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` -+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` - else -- $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` -+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD -@@ -402,10 +400,10 @@ - # generated from the m4 files accompanying Automake X.Y. - # (This private macro should not be called outside this file.) - AC_DEFUN([AM_AUTOMAKE_VERSION], --[am__api_version='1.10' -+[am__api_version='1.11' - dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to - dnl require some minimum version. Point them to the right macro. --m4_if([$1], [1.10.2], [], -+m4_if([$1], [1.11.1], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl - ]) - -@@ -421,7 +419,7 @@ - # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. - # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. - AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], --[AM_AUTOMAKE_VERSION([1.10.2])dnl -+[AM_AUTOMAKE_VERSION([1.11.1])dnl - m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl - _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) -@@ -481,14 +479,14 @@ - - # AM_CONDITIONAL -*- Autoconf -*- - --# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 -+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 - # Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. - --# serial 8 -+# serial 9 - - # AM_CONDITIONAL(NAME, SHELL-CONDITION) - # ------------------------------------- -@@ -501,6 +499,7 @@ - AC_SUBST([$1_FALSE])dnl - _AM_SUBST_NOTMAKE([$1_TRUE])dnl - _AM_SUBST_NOTMAKE([$1_FALSE])dnl -+m4_define([_AM_COND_VALUE_$1], [$2])dnl - if $2; then - $1_TRUE= - $1_FALSE='#' -@@ -514,14 +513,14 @@ - Usually this means the macro was only invoked conditionally.]]) - fi])]) - --# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 -+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 - # Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. - --# serial 9 -+# serial 10 - - # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be - # written in clear, in which case automake, when reading aclocal.m4, -@@ -578,6 +577,16 @@ - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi -+ am__universal=false -+ m4_case([$1], [CC], -+ [case " $depcc " in #( -+ *\ -arch\ *\ -arch\ *) am__universal=true ;; -+ esac], -+ [CXX], -+ [case " $depcc " in #( -+ *\ -arch\ *\ -arch\ *) am__universal=true ;; -+ esac]) -+ - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and -@@ -595,7 +604,17 @@ - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - -+ # We check with `-c' and `-o' for the sake of the "dashmstdout" -+ # mode. It turns out that the SunPro C++ compiler does not properly -+ # handle `-M -o', and we need to detect this. Also, some Intel -+ # versions had trouble with output in subdirs -+ am__obj=sub/conftest.${OBJEXT-o} -+ am__minus_obj="-o $am__obj" - case $depmode in -+ gcc) -+ # This depmode causes a compiler race in universal mode. -+ test "$am__universal" = false || continue -+ ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested -@@ -605,19 +624,23 @@ - break - fi - ;; -+ msvisualcpp | msvcmsys) -+ # This compiler won't grok `-c -o', but also, the minuso test has -+ # not run yet. These depmodes are late enough in the game, and -+ # so weak that their functioning should not be impacted. -+ am__obj=conftest.${OBJEXT-o} -+ am__minus_obj= -+ ;; - none) break ;; - esac -- # We check with `-c' and `-o' for the sake of the "dashmstdout" -- # mode. It turns out that the SunPro C++ compiler does not properly -- # handle `-M -o', and we need to detect this. - if depmode=$depmode \ -- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ -+ source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ -- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ -+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && -- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && -+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message -@@ -767,13 +790,13 @@ - # Do all the work for Automake. -*- Autoconf -*- - - # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, --# 2005, 2006, 2008 Free Software Foundation, Inc. -+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. - --# serial 13 -+# serial 16 - - # This macro actually does too much. Some checks are only needed if - # your package does certain things. But this isn't really a big deal. -@@ -790,7 +813,7 @@ - # arguments mandatory, and then we can depend on a new Autoconf - # release and drop the old call support. - AC_DEFUN([AM_INIT_AUTOMAKE], --[AC_PREREQ([2.60])dnl -+[AC_PREREQ([2.62])dnl - dnl Autoconf wants to disallow AM_ names. We explicitly allow - dnl the ones we care about. - m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -@@ -841,8 +864,8 @@ - AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) - AM_MISSING_PROG(AUTOHEADER, autoheader) - AM_MISSING_PROG(MAKEINFO, makeinfo) --AM_PROG_INSTALL_SH --AM_PROG_INSTALL_STRIP -+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl - AC_REQUIRE([AM_PROG_MKDIR_P])dnl - # We need awk for the "check" target. The system "awk" is bad on - # some platforms. -@@ -850,24 +873,37 @@ - AC_REQUIRE([AC_PROG_MAKE_SET])dnl - AC_REQUIRE([AM_SET_LEADING_DOT])dnl - _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], -- [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], -- [_AM_PROG_TAR([v7])])]) -+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], -+ [_AM_PROG_TAR([v7])])]) - _AM_IF_OPTION([no-dependencies],, - [AC_PROVIDE_IFELSE([AC_PROG_CC], -- [_AM_DEPENDENCIES(CC)], -- [define([AC_PROG_CC], -- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -+ [_AM_DEPENDENCIES(CC)], -+ [define([AC_PROG_CC], -+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl - AC_PROVIDE_IFELSE([AC_PROG_CXX], -- [_AM_DEPENDENCIES(CXX)], -- [define([AC_PROG_CXX], -- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -+ [_AM_DEPENDENCIES(CXX)], -+ [define([AC_PROG_CXX], -+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl - AC_PROVIDE_IFELSE([AC_PROG_OBJC], -- [_AM_DEPENDENCIES(OBJC)], -- [define([AC_PROG_OBJC], -- defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -+ [_AM_DEPENDENCIES(OBJC)], -+ [define([AC_PROG_OBJC], -+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl - ]) -+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. -+AC_CONFIG_COMMANDS_PRE(dnl -+[m4_provide_if([_AM_COMPILER_EXEEXT], -+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl - ]) - -+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not -+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further -+dnl mangled by Autoconf and run in a shell conditional statement. -+m4_define([_AC_COMPILER_EXEEXT], -+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) -+ - - # When config.status generates a header, we must update the stamp-h file. - # This file resides in the same directory as the config header -@@ -890,7 +926,7 @@ - done - echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - --# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -+# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, -@@ -901,7 +937,14 @@ - # Define $install_sh. - AC_DEFUN([AM_PROG_INSTALL_SH], - [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl --install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} -+if test x"${install_sh}" != xset; then -+ case $am_aux_dir in -+ *\ * | *\ *) -+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; -+ *) -+ install_sh="\${SHELL} $am_aux_dir/install-sh" -+ esac -+fi - AC_SUBST(install_sh)]) - - # Copyright (C) 2003, 2005 Free Software Foundation, Inc. -@@ -927,13 +970,13 @@ - - # Check to see how 'make' treats includes. -*- Autoconf -*- - --# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -+# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. - --# serial 3 -+# serial 4 - - # AM_MAKE_INCLUDE() - # ----------------- -@@ -942,7 +985,7 @@ - [am_make=${MAKE-make} - cat > confinc << 'END' - am__doit: -- @echo done -+ @echo this is the am__doit target - .PHONY: am__doit - END - # If we don't find an include directive, just comment out the code. -@@ -952,24 +995,24 @@ - _am_result=none - # First try GNU make style include. - echo "include confinc" > confmf --# We grep out `Entering directory' and `Leaving directory' --# messages which can occur if `w' ends up in MAKEFLAGS. --# In particular we don't look at `^make:' because GNU make might --# be invoked under some other name (usually "gmake"), in which --# case it prints its new name instead of `make'. --if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then -- am__include=include -- am__quote= -- _am_result=GNU --fi -+# Ignore all kinds of additional output from `make'. -+case `$am_make -s -f confmf 2> /dev/null` in #( -+*the\ am__doit\ target*) -+ am__include=include -+ am__quote= -+ _am_result=GNU -+ ;; -+esac - # Now try BSD make style include. - if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf -- if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then -- am__include=.include -- am__quote="\"" -- _am_result=BSD -- fi -+ case `$am_make -s -f confmf 2> /dev/null` in #( -+ *the\ am__doit\ target*) -+ am__include=.include -+ am__quote="\"" -+ _am_result=BSD -+ ;; -+ esac - fi - AC_SUBST([am__include]) - AC_SUBST([am__quote]) -@@ -1014,14 +1057,14 @@ - - # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - --# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 -+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 - # Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. - --# serial 5 -+# serial 6 - - # AM_MISSING_PROG(NAME, PROGRAM) - # ------------------------------ -@@ -1038,7 +1081,14 @@ - AC_DEFUN([AM_MISSING_HAS_RUN], - [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl - AC_REQUIRE_AUX_FILE([missing])dnl --test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -+if test x"${MISSING+set}" != xset; then -+ case $am_aux_dir in -+ *\ * | *\ *) -+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; -+ *) -+ MISSING="\${SHELL} $am_aux_dir/missing" ;; -+ esac -+fi - # Use eval to expand $SHELL - if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -@@ -1107,7 +1157,7 @@ - AC_DEFUN([_AM_IF_OPTION], - [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - --# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009 - # Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation -@@ -1138,13 +1188,11 @@ - # numbers and dots only. - AC_DEFUN([AM_PATH_PYTHON], - [ -- dnl Find a Python interpreter. Python versions prior to 1.5 are not -- dnl supported because the default installation locations changed from -- dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages -- dnl in 1.5. -+ dnl Find a Python interpreter. Python versions prior to 2.0 are not -+ dnl supported. (2.0 was released on October 16, 2000). - m4_define_default([_AM_PYTHON_INTERPRETER_LIST], -- [python python2 python2.5 python2.4 python2.3 python2.2 dnl --python2.1 python2.0 python1.6 python1.5]) -+ [python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl -+python2.1 python2.0]) - - m4_if([$1],[],[ - dnl No version check is needed. -@@ -1191,7 +1239,7 @@ - dnl library. - - AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], -- [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`]) -+ [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`]) - AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) - - dnl Use the values of $prefix and $exec_prefix for the corresponding -@@ -1206,7 +1254,7 @@ - dnl to know which OS platform Python thinks this is. - - AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], -- [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`]) -+ [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) - AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) - - -@@ -1234,6 +1282,14 @@ - am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` - am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` - ;; -+ *) -+ case $am_py_prefix in -+ /usr|/System*) ;; -+ *) -+ am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages -+ ;; -+ esac -+ ;; - esac - ]) - AC_SUBST([pythondir], [$am_cv_python_pythondir]) -@@ -1264,6 +1320,14 @@ - am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` - am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` - ;; -+ *) -+ case $am_py_exec_prefix in -+ /usr|/System*) ;; -+ *) -+ am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages -+ ;; -+ esac -+ ;; - esac - ]) - AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) -@@ -1285,15 +1349,16 @@ - # Run ACTION-IF-FALSE otherwise. - # This test uses sys.hexversion instead of the string equivalent (first - # word of sys.version), in order to cope with versions such as 2.2c1. --# hexversion has been introduced in Python 1.5.2; it's probably not --# worth to support older versions (1.5.1 was released on October 31, 1998). -+# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). - AC_DEFUN([AM_PYTHON_CHECK_VERSION], -- [prog="import sys, string -+ [prog="import sys - # split strings by '.' and convert to numeric. Append some zeros - # because we need at least 4 digits for the hex conversion. --minver = map(int, string.split('$2', '.')) + [[0, 0, 0]] -+# map returns an iterator in Python 3.0 and a list in 2.x -+minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] - minverhex = 0 --for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]] -+# xrange is not present in Python 3.0 and range returns an iterator -+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] - sys.exit(sys.hexversion < minverhex)" - AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) - -@@ -1316,14 +1381,14 @@ - - # Check to make sure that the build environment is sane. -*- Autoconf -*- - --# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 - # Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. - --# serial 4 -+# serial 5 - - # AM_SANITY_CHECK - # --------------- -@@ -1332,16 +1397,29 @@ - # Just in case - sleep 1 - echo timestamp > conftest.file -+# Reject unsafe characters in $srcdir or the absolute working directory -+# name. Accept space and tab only in the latter. -+am_lf=' -+' -+case `pwd` in -+ *[[\\\"\#\$\&\'\`$am_lf]]*) -+ AC_MSG_ERROR([unsafe absolute working directory name]);; -+esac -+case $srcdir in -+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) -+ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; -+esac -+ - # Do `set' in a subshell so we don't clobber the current shell's - # arguments. Must try -L first in case configure is actually a - # symlink; some systems play weird games with the mod time of symlinks - # (eg FreeBSD returns the mod time of the symlink's containing - # directory). - if ( -- set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` -+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. -- set X `ls -t $srcdir/configure conftest.file` -+ set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ -@@ -1394,18 +1472,25 @@ - INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - AC_SUBST([INSTALL_STRIP_PROGRAM])]) - --# Copyright (C) 2006 Free Software Foundation, Inc. -+# Copyright (C) 2006, 2008 Free Software Foundation, Inc. - # - # This file is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. - -+# serial 2 -+ - # _AM_SUBST_NOTMAKE(VARIABLE) - # --------------------------- - # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. - # This macro is traced by Automake. - AC_DEFUN([_AM_SUBST_NOTMAKE]) - -+# AM_SUBST_NOTMAKE(VARIABLE) -+# --------------------------- -+# Public sister of _AM_SUBST_NOTMAKE. -+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) -+ - # Check how to create a tarball. -*- Autoconf -*- - - # Copyright (C) 2004, 2005 Free Software Foundation, Inc. -diff -Naur pygobject-2.21.1/codegen/Makefile.in pygobject-2.21.1.patch/codegen/Makefile.in ---- pygobject-2.21.1/codegen/Makefile.in 2009-12-26 22:08:33.000000000 +0100 -+++ pygobject-2.21.1.patch/codegen/Makefile.in 2010-04-26 16:25:27.101863587 +0200 -@@ -1,8 +1,9 @@ --# Makefile.in generated by automake 1.10.2 from Makefile.am. -+# Makefile.in generated by automake 1.11.1 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, --# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -+# Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -16,8 +17,9 @@ - - VPATH = @srcdir@ - pkgdatadir = $(datadir)/@PACKAGE@ --pkglibdir = $(libdir)/@PACKAGE@ - pkgincludedir = $(includedir)/@PACKAGE@ -+pkglibdir = $(libdir)/@PACKAGE@ -+pkglibexecdir = $(libexecdir)/@PACKAGE@ - am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd - install_sh_DATA = $(install_sh) -c -m 644 - install_sh_PROGRAM = $(install_sh) -c -@@ -46,20 +48,33 @@ - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = pygobject-codegen-2.0 --am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(codegendir)" \ -- "$(DESTDIR)$(codegendir)" --binSCRIPT_INSTALL = $(INSTALL_SCRIPT) --codegenSCRIPT_INSTALL = $(INSTALL_SCRIPT) --SCRIPTS = $(bin_SCRIPTS) $(codegen_SCRIPTS) --SOURCES = --DIST_SOURCES = -+CONFIG_CLEAN_VPATH_FILES = - am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; - am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; --am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; --codegenPYTHON_INSTALL = $(INSTALL_DATA) -+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -+am__install_max = 40 -+am__nobase_strip_setup = \ -+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -+am__nobase_strip = \ -+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -+am__nobase_list = $(am__nobase_strip_setup); \ -+ for p in $$list; do echo "$$p $$p"; done | \ -+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ -+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ -+ if (++n[$$2] == $(am__install_max)) \ -+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ -+ END { for (dir in files) print dir, files[dir] }' -+am__base_list = \ -+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ -+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(codegendir)" \ -+ "$(DESTDIR)$(codegendir)" -+SCRIPTS = $(bin_SCRIPTS) $(codegen_SCRIPTS) -+SOURCES = -+DIST_SOURCES = - py_compile = $(top_srcdir)/py-compile - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ -@@ -248,9 +263,9 @@ - exit 1;; \ - esac; \ - done; \ -- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu codegen/Makefile'; \ -- cd $(top_srcdir) && \ -- $(AUTOMAKE) --gnu codegen/Makefile -+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu codegen/Makefile'; \ -+ $(am__cd) $(top_srcdir) && \ -+ $(AUTOMAKE) --gnu codegen/Makefile - .PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ -@@ -268,46 +283,77 @@ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - $(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -+$(am__aclocal_m4_deps): - pygobject-codegen-2.0: $(top_builddir)/config.status $(srcdir)/pygobject-codegen-2.0.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ - install-binSCRIPTS: $(bin_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" -- @list='$(bin_SCRIPTS)'; for p in $$list; do \ -+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ -+ for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ -- if test -f $$d$$p; then \ -- f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ -- echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ -- $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ -- else :; fi; \ -- done -+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ -+ done | \ -+ sed -e 'p;s,.*/,,;n' \ -+ -e 'h;s|.*|.|' \ -+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ -+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ -+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ -+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ -+ if (++n[d] == $(am__install_max)) { \ -+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ -+ else { print "f", d "/" $$4, $$1 } } \ -+ END { for (d in files) print "f", d, files[d] }' | \ -+ while read type dir files; do \ -+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ -+ test -z "$$files" || { \ -+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ -+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ -+ } \ -+ ; done - - uninstall-binSCRIPTS: - @$(NORMAL_UNINSTALL) -- @list='$(bin_SCRIPTS)'; for p in $$list; do \ -- f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ -- echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ -- rm -f "$(DESTDIR)$(bindir)/$$f"; \ -- done -+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ -+ files=`for p in $$list; do echo "$$p"; done | \ -+ sed -e 's,.*/,,;$(transform)'`; \ -+ test -n "$$list" || exit 0; \ -+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ -+ cd "$(DESTDIR)$(bindir)" && rm -f $$files - install-codegenSCRIPTS: $(codegen_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(codegendir)" || $(MKDIR_P) "$(DESTDIR)$(codegendir)" -- @list='$(codegen_SCRIPTS)'; for p in $$list; do \ -+ @list='$(codegen_SCRIPTS)'; test -n "$(codegendir)" || list=; \ -+ for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ -- if test -f $$d$$p; then \ -- f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ -- echo " $(codegenSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(codegendir)/$$f'"; \ -- $(codegenSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(codegendir)/$$f"; \ -- else :; fi; \ -- done -+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ -+ done | \ -+ sed -e 'p;s,.*/,,;n' \ -+ -e 'h;s|.*|.|' \ -+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ -+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ -+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ -+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ -+ if (++n[d] == $(am__install_max)) { \ -+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ -+ else { print "f", d "/" $$4, $$1 } } \ -+ END { for (d in files) print "f", d, files[d] }' | \ -+ while read type dir files; do \ -+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ -+ test -z "$$files" || { \ -+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(codegendir)$$dir'"; \ -+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(codegendir)$$dir" || exit $$?; \ -+ } \ -+ ; done - - uninstall-codegenSCRIPTS: - @$(NORMAL_UNINSTALL) -- @list='$(codegen_SCRIPTS)'; for p in $$list; do \ -- f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ -- echo " rm -f '$(DESTDIR)$(codegendir)/$$f'"; \ -- rm -f "$(DESTDIR)$(codegendir)/$$f"; \ -- done -+ @list='$(codegen_SCRIPTS)'; test -n "$(codegendir)" || exit 0; \ -+ files=`for p in $$list; do echo "$$p"; done | \ -+ sed -e 's,.*/,,;$(transform)'`; \ -+ test -n "$$list" || exit 0; \ -+ echo " ( cd '$(DESTDIR)$(codegendir)' && rm -f" $$files ")"; \ -+ cd "$(DESTDIR)$(codegendir)" && rm -f $$files - - mostlyclean-libtool: - -rm -f *.lo -@@ -317,15 +363,20 @@ - install-codegenPYTHON: $(codegen_PYTHON) - @$(NORMAL_INSTALL) - test -z "$(codegendir)" || $(MKDIR_P) "$(DESTDIR)$(codegendir)" -- @list='$(codegen_PYTHON)'; dlist=''; for p in $$list; do\ -+ @list='$(codegen_PYTHON)'; dlist=; list2=; test -n "$(codegendir)" || list=; \ -+ for p in $$list; do \ - if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ - if test -f $$b$$p; then \ -- f=$(am__strip_dir) \ -+ $(am__strip_dir) \ - dlist="$$dlist $$f"; \ -- echo " $(codegenPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(codegendir)/$$f'"; \ -- $(codegenPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(codegendir)/$$f"; \ -+ list2="$$list2 $$b$$p"; \ - else :; fi; \ - done; \ -+ for file in $$list2; do echo $$file; done | $(am__base_list) | \ -+ while read files; do \ -+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(codegendir)'"; \ -+ $(INSTALL_DATA) $$files "$(DESTDIR)$(codegendir)" || exit $$?; \ -+ done || exit $$?; \ - if test -n "$$dlist"; then \ - if test -z "$(DESTDIR)"; then \ - PYTHON=$(PYTHON) $(py_compile) --basedir "$(codegendir)" $$dlist; \ -@@ -336,12 +387,17 @@ - - uninstall-codegenPYTHON: - @$(NORMAL_UNINSTALL) -- @list='$(codegen_PYTHON)'; dlist=''; for p in $$list; do\ -- f=$(am__strip_dir) \ -- rm -f "$(DESTDIR)$(codegendir)/$$f"; \ -- rm -f "$(DESTDIR)$(codegendir)/$${f}c"; \ -- rm -f "$(DESTDIR)$(codegendir)/$${f}o"; \ -- done -+ @list='$(codegen_PYTHON)'; test -n "$(codegendir)" || list=; \ -+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ -+ test -n "$$files" || exit 0; \ -+ filesc=`echo "$$files" | sed 's|$$|c|'`; \ -+ fileso=`echo "$$files" | sed 's|$$|o|'`; \ -+ echo " ( cd '$(DESTDIR)$(codegendir)' && rm -f" $$files ")"; \ -+ cd "$(DESTDIR)$(codegendir)" && rm -f $$files || exit $$?; \ -+ echo " ( cd '$(DESTDIR)$(codegendir)' && rm -f" $$filesc ")"; \ -+ cd "$(DESTDIR)$(codegendir)" && rm -f $$filesc || exit $$?; \ -+ echo " ( cd '$(DESTDIR)$(codegendir)' && rm -f" $$fileso ")"; \ -+ cd "$(DESTDIR)$(codegendir)" && rm -f $$fileso - tags: TAGS - TAGS: - -@@ -365,13 +421,17 @@ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ -+ if test -d "$(distdir)/$$file"; then \ -+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ -+ fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ -- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ -+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ -+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ -- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ -+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ -- test -f $(distdir)/$$file \ -- || cp -p $$d/$$file $(distdir)/$$file \ -+ test -f "$(distdir)/$$file" \ -+ || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -@@ -402,6 +462,7 @@ - - distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - - maintainer-clean-generic: - @echo "This command is intended for maintainers to use" -@@ -420,6 +481,8 @@ - - html: html-am - -+html-am: -+ - info: info-am - - info-am: -@@ -428,18 +491,28 @@ - - install-dvi: install-dvi-am - -+install-dvi-am: -+ - install-exec-am: install-binSCRIPTS - - install-html: install-html-am - -+install-html-am: -+ - install-info: install-info-am - -+install-info-am: -+ - install-man: - - install-pdf: install-pdf-am - -+install-pdf-am: -+ - install-ps: install-ps-am - -+install-ps-am: -+ - installcheck-am: - - maintainer-clean: maintainer-clean-am -@@ -477,6 +550,7 @@ - ps ps-am uninstall uninstall-am uninstall-binSCRIPTS \ - uninstall-codegenPYTHON uninstall-codegenSCRIPTS - -+ - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. - .NOEXPORT: -diff -Naur pygobject-2.21.1/configure pygobject-2.21.1.patch/configure ---- pygobject-2.21.1/configure 2009-12-26 22:08:34.000000000 +0100 -+++ pygobject-2.21.1.patch/configure 2010-04-26 16:25:26.035738238 +0200 -@@ -1,12 +1,14 @@ - #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.64 for pygobject 2.21.1. -+# Generated by GNU Autoconf 2.65 for pygobject 2.21.1. - # - # Report bugs to . - # -+# - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, --# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software --# Foundation, Inc. -+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -+# Inc. -+# - # - # This configure script is free software; the Free Software Foundation - # gives unlimited permission to copy, distribute and modify it. -@@ -677,7 +679,8 @@ - - - --exec 7<&0 &1 -+test -n "$DJDIR" || exec 7<&0 &1 - - # Name of the host. - # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -@@ -741,7 +744,9 @@ - # include - #endif" - --ac_subst_vars='LTLIBOBJS -+ac_subst_vars='am__EXEEXT_FALSE -+am__EXEEXT_TRUE -+LTLIBOBJS - LIBOBJS - BUILD_GIOUNIX_FALSE - BUILD_GIOUNIX_TRUE -@@ -1573,7 +1578,7 @@ - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l -- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if -+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - PKG_CONFIG path to pkg-config utility -@@ -1653,7 +1658,7 @@ - if $ac_init_version; then - cat <<\_ACEOF - pygobject configure 2.21.1 --generated by GNU Autoconf 2.64 -+generated by GNU Autoconf 2.65 - - Copyright (C) 2009 Free Software Foundation, Inc. - This configure script is free software; the Free Software Foundation -@@ -1700,7 +1705,7 @@ - ac_retval=1 - fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- return $ac_retval -+ as_fn_set_status $ac_retval - - } # ac_fn_c_try_compile - -@@ -1746,7 +1751,7 @@ - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- return $ac_retval -+ as_fn_set_status $ac_retval - - } # ac_fn_c_try_link - -@@ -1814,7 +1819,7 @@ - ac_retval=1 - fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- return $ac_retval -+ as_fn_set_status $ac_retval - - } # ac_fn_c_try_cpp - -@@ -1856,7 +1861,7 @@ - fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} -- return $ac_retval -+ as_fn_set_status $ac_retval - - } # ac_fn_c_try_run - -@@ -1931,7 +1936,7 @@ - running configure, to aid debugging if configure makes a mistake. - - It was created by pygobject $as_me 2.21.1, which was --generated by GNU Autoconf 2.64. Invocation command line was -+generated by GNU Autoconf 2.65. Invocation command line was - - $ $0 $@ - -@@ -2184,7 +2189,7 @@ - for ac_site_file in "$ac_site_file1" "$ac_site_file2" - do - test "x$ac_site_file" = xNONE && continue -- if test -r "$ac_site_file"; then -+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 - $as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 -@@ -2193,9 +2198,9 @@ - done - - if test -r "$cache_file"; then -- # Some versions of bash will fail to source /dev/null (special -- # files actually), so we avoid doing that. -- if test -f "$cache_file"; then -+ # Some versions of bash will fail to source /dev/null (special files -+ # actually), so we avoid doing that. DJGPP emulates it as a regular file. -+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 - $as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in -@@ -2301,7 +2306,7 @@ - ac_config_headers="$ac_config_headers config.h" - - --am__api_version='1.10' -+am__api_version='1.11' - - ac_aux_dir= - for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do -@@ -2424,16 +2429,29 @@ - # Just in case - sleep 1 - echo timestamp > conftest.file -+# Reject unsafe characters in $srcdir or the absolute working directory -+# name. Accept space and tab only in the latter. -+am_lf=' -+' -+case `pwd` in -+ *[\\\"\#\$\&\'\`$am_lf]*) -+ as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; -+esac -+case $srcdir in -+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*) -+ as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; -+esac -+ - # Do `set' in a subshell so we don't clobber the current shell's - # arguments. Must try -L first in case configure is actually a - # symlink; some systems play weird games with the mod time of symlinks - # (eg FreeBSD returns the mod time of the symlink's containing - # directory). - if ( -- set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` -+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. -- set X `ls -t $srcdir/configure conftest.file` -+ set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ -@@ -2471,7 +2489,14 @@ - # expand $ac_aux_dir to an absolute path - am_aux_dir=`cd $ac_aux_dir && pwd` - --test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -+if test x"${MISSING+set}" != xset; then -+ case $am_aux_dir in -+ *\ * | *\ *) -+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; -+ *) -+ MISSING="\${SHELL} $am_aux_dir/missing" ;; -+ esac -+fi - # Use eval to expand $SHELL - if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -@@ -2481,6 +2506,115 @@ - $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} - fi - -+if test x"${install_sh}" != xset; then -+ case $am_aux_dir in -+ *\ * | *\ *) -+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; -+ *) -+ install_sh="\${SHELL} $am_aux_dir/install-sh" -+ esac -+fi -+ -+# Installed binaries are usually stripped using `strip' when the user -+# run `make install-strip'. However `strip' might not be the right -+# tool to use in cross-compilation environments, therefore Automake -+# will honor the `STRIP' environment variable to overrule this program. -+if test "$cross_compiling" != no; then -+ if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -+set dummy ${ac_tool_prefix}strip; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_STRIP+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$STRIP"; then -+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_STRIP="${ac_tool_prefix}strip" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+STRIP=$ac_cv_prog_STRIP -+if test -n "$STRIP"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -+$as_echo "$STRIP" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ -+fi -+if test -z "$ac_cv_prog_STRIP"; then -+ ac_ct_STRIP=$STRIP -+ # Extract the first word of "strip", so it can be a program name with args. -+set dummy strip; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test -n "$ac_ct_STRIP"; then -+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -+else -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_prog_ac_ct_STRIP="strip" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi -+done -+ done -+IFS=$as_save_IFS -+ -+fi -+fi -+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -+if test -n "$ac_ct_STRIP"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -+$as_echo "$ac_ct_STRIP" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi -+ -+ if test "x$ac_ct_STRIP" = x; then -+ STRIP=":" -+ else -+ case $cross_compiling:$ac_tool_warned in -+yes:) -+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -+ac_tool_warned=yes ;; -+esac -+ STRIP=$ac_ct_STRIP -+ fi -+else -+ STRIP="$ac_cv_prog_STRIP" -+fi -+ -+fi -+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 - $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } - if test -z "$MKDIR_P"; then -@@ -2509,6 +2643,7 @@ - - fi - -+ test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else -@@ -2516,7 +2651,6 @@ - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. -- test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi - fi -@@ -2661,108 +2795,6 @@ - - MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - --install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} -- --# Installed binaries are usually stripped using `strip' when the user --# run `make install-strip'. However `strip' might not be the right --# tool to use in cross-compilation environments, therefore Automake --# will honor the `STRIP' environment variable to overrule this program. --if test "$cross_compiling" != no; then -- if test -n "$ac_tool_prefix"; then -- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. --set dummy ${ac_tool_prefix}strip; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_prog_STRIP+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- if test -n "$STRIP"; then -- ac_cv_prog_STRIP="$STRIP" # Let the user override the test. --else --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_STRIP="${ac_tool_prefix}strip" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- --fi --fi --STRIP=$ac_cv_prog_STRIP --if test -n "$STRIP"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 --$as_echo "$STRIP" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } --fi -- -- --fi --if test -z "$ac_cv_prog_STRIP"; then -- ac_ct_STRIP=$STRIP -- # Extract the first word of "strip", so it can be a program name with args. --set dummy strip; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- if test -n "$ac_ct_STRIP"; then -- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. --else --as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_prog_ac_ct_STRIP="strip" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- --fi --fi --ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP --if test -n "$ac_ct_STRIP"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 --$as_echo "$ac_ct_STRIP" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } --fi -- -- if test "x$ac_ct_STRIP" = x; then -- STRIP=":" -- else -- case $cross_compiling:$ac_tool_warned in --yes:) --{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 --$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} --ac_tool_warned=yes ;; --esac -- STRIP=$ac_ct_STRIP -- fi --else -- STRIP="$ac_cv_prog_STRIP" --fi -- --fi --INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -- - # We need awk for the "check" target. The system "awk" is bad on - # some platforms. - # Always define AMTAR for backward compatibility. -@@ -3261,7 +3293,7 @@ - am_make=${MAKE-make} - cat > confinc << 'END' - am__doit: -- @echo done -+ @echo this is the am__doit target - .PHONY: am__doit - END - # If we don't find an include directive, just comment out the code. -@@ -3272,24 +3304,24 @@ - _am_result=none - # First try GNU make style include. - echo "include confinc" > confmf --# We grep out `Entering directory' and `Leaving directory' --# messages which can occur if `w' ends up in MAKEFLAGS. --# In particular we don't look at `^make:' because GNU make might --# be invoked under some other name (usually "gmake"), in which --# case it prints its new name instead of `make'. --if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then -- am__include=include -- am__quote= -- _am_result=GNU --fi -+# Ignore all kinds of additional output from `make'. -+case `$am_make -s -f confmf 2> /dev/null` in #( -+*the\ am__doit\ target*) -+ am__include=include -+ am__quote= -+ _am_result=GNU -+ ;; -+esac - # Now try BSD make style include. - if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf -- if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then -- am__include=.include -- am__quote="\"" -- _am_result=BSD -- fi -+ case `$am_make -s -f confmf 2> /dev/null` in #( -+ *the\ am__doit\ target*) -+ am__include=.include -+ am__quote="\"" -+ _am_result=BSD -+ ;; -+ esac - fi - - -@@ -3637,32 +3669,30 @@ - ... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 -- rm -f conftest.er1 conftest.err - fi -+ rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - done - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ --#include -+ - int - main () - { --FILE *f = fopen ("conftest.out", "w"); -- return ferror (f) || fclose (f) != 0; - - ; - return 0; - } - _ACEOF - ac_clean_files_save=$ac_clean_files --ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" -+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" - # Try to create an executable without -o first, disregard a.out. - # It will help us diagnose broken compilers, and finding out an intuition - # of exeext. --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 --$as_echo_n "checking for C compiler default output file name... " >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -+$as_echo_n "checking whether the C compiler works... " >&6; } - ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - - # The possible output files: -@@ -3724,10 +3754,10 @@ - else - ac_file='' - fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 --$as_echo "$ac_file" >&6; } - if test -z "$ac_file"; then : -- $as_echo "$as_me: failed program was:" >&5 -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+$as_echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -@@ -3735,51 +3765,18 @@ - { as_fn_set_status 77 - as_fn_error "C compiler cannot create executables - See \`config.log' for more details." "$LINENO" 5; }; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } - fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -+$as_echo_n "checking for C compiler default output file name... " >&6; } -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -+$as_echo "$ac_file" >&6; } - ac_exeext=$ac_cv_exeext - --# Check that the compiler produces executables we can run. If not, either --# the compiler is broken, or we cross compile. --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 --$as_echo_n "checking whether the C compiler works... " >&6; } --# If not cross compiling, check that we can run a simple program. --if test "$cross_compiling" != yes; then -- if { ac_try='./$ac_file' -- { { case "(($ac_try" in -- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -- *) ac_try_echo=$ac_try;; --esac --eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" --$as_echo "$ac_try_echo"; } >&5 -- (eval "$ac_try") 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; }; }; then -- cross_compiling=no -- else -- if test "$cross_compiling" = maybe; then -- cross_compiling=yes -- else -- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 --$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error "cannot run C compiled programs. --If you meant to cross compile, use \`--host'. --See \`config.log' for more details." "$LINENO" 5; } -- fi -- fi --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- --rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out -+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out - ac_clean_files=$ac_clean_files_save --# Check that the compiler produces executables we can run. If not, either --# the compiler is broken, or we cross compile. --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 --$as_echo_n "checking whether we are cross compiling... " >&6; } --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 --$as_echo "$cross_compiling" >&6; } -- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 - $as_echo_n "checking for suffix of executables... " >&6; } - if { { ac_try="$ac_link" -@@ -3812,13 +3809,72 @@ - as_fn_error "cannot compute suffix of executables: cannot compile and link - See \`config.log' for more details." "$LINENO" 5; } - fi --rm -f conftest$ac_cv_exeext -+rm -f conftest conftest$ac_cv_exeext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 - $as_echo "$ac_cv_exeext" >&6; } - - rm -f conftest.$ac_ext - EXEEXT=$ac_cv_exeext - ac_exeext=$EXEEXT -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+FILE *f = fopen ("conftest.out", "w"); -+ return ferror (f) || fclose (f) != 0; -+ -+ ; -+ return 0; -+} -+_ACEOF -+ac_clean_files="$ac_clean_files conftest.out" -+# Check that the compiler produces executables we can run. If not, either -+# the compiler is broken, or we cross compile. -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -+$as_echo_n "checking whether we are cross compiling... " >&6; } -+if test "$cross_compiling" != yes; then -+ { { ac_try="$ac_link" -+case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -+$as_echo "$ac_try_echo"; } >&5 -+ (eval "$ac_link") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; } -+ if { ac_try='./conftest$ac_cv_exeext' -+ { { case "(($ac_try" in -+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; -+ *) ac_try_echo=$ac_try;; -+esac -+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -+$as_echo "$ac_try_echo"; } >&5 -+ (eval "$ac_try") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; }; then -+ cross_compiling=no -+ else -+ if test "$cross_compiling" = maybe; then -+ cross_compiling=yes -+ else -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+as_fn_error "cannot run C compiled programs. -+If you meant to cross compile, use \`--host'. -+See \`config.log' for more details." "$LINENO" 5; } -+ fi -+ fi -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -+$as_echo "$cross_compiling" >&6; } -+ -+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -+ac_clean_files=$ac_clean_files_save - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 - $as_echo_n "checking for suffix of object files... " >&6; } - if test "${ac_cv_objext+set}" = set; then : -@@ -4112,6 +4168,11 @@ - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi -+ am__universal=false -+ case " $depcc " in #( -+ *\ -arch\ *\ -arch\ *) am__universal=true ;; -+ esac -+ - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and -@@ -4129,7 +4190,17 @@ - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - -+ # We check with `-c' and `-o' for the sake of the "dashmstdout" -+ # mode. It turns out that the SunPro C++ compiler does not properly -+ # handle `-M -o', and we need to detect this. Also, some Intel -+ # versions had trouble with output in subdirs -+ am__obj=sub/conftest.${OBJEXT-o} -+ am__minus_obj="-o $am__obj" - case $depmode in -+ gcc) -+ # This depmode causes a compiler race in universal mode. -+ test "$am__universal" = false || continue -+ ;; - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested -@@ -4139,19 +4210,23 @@ - break - fi - ;; -+ msvisualcpp | msvcmsys) -+ # This compiler won't grok `-c -o', but also, the minuso test has -+ # not run yet. These depmodes are late enough in the game, and -+ # so weak that their functioning should not be impacted. -+ am__obj=conftest.${OBJEXT-o} -+ am__minus_obj= -+ ;; - none) break ;; - esac -- # We check with `-c' and `-o' for the sake of the "dashmstdout" -- # mode. It turns out that the SunPro C++ compiler does not properly -- # handle `-M -o', and we need to detect this. - if depmode=$depmode \ -- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ -+ source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ -- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ -+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && -- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && -+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message -@@ -4774,13 +4849,13 @@ - else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext -- (eval echo "\"\$as_me:4777: $ac_compile\"" >&5) -+ (eval echo "\"\$as_me:4852: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 -- (eval echo "\"\$as_me:4780: $NM \\\"conftest.$ac_objext\\\"\"" >&5) -+ (eval echo "\"\$as_me:4855: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 -- (eval echo "\"\$as_me:4783: output\"" >&5) -+ (eval echo "\"\$as_me:4858: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" -@@ -5983,7 +6058,7 @@ - ;; - *-*-irix6*) - # Find out which ABI we are using. -- echo '#line 5986 "configure"' > conftest.$ac_ext -+ echo '#line 6061 "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -@@ -7481,11 +7556,11 @@ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:7484: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:7559: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:7488: \$? = $ac_status" >&5 -+ echo "$as_me:7563: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. -@@ -7820,11 +7895,11 @@ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:7823: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:7898: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:7827: \$? = $ac_status" >&5 -+ echo "$as_me:7902: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. -@@ -7925,11 +8000,11 @@ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:7928: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:8003: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:7932: \$? = $ac_status" >&5 -+ echo "$as_me:8007: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -7980,11 +8055,11 @@ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:7983: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:8058: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:7987: \$? = $ac_status" >&5 -+ echo "$as_me:8062: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -10363,7 +10438,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 10366 "configure" -+#line 10441 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -10459,7 +10534,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 10462 "configure" -+#line 10537 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11099,7 +11174,7 @@ - - lt_cl_version="\ - pygobject config.lt 2.21.1 --configured by $0, generated by GNU Autoconf 2.64. -+configured by $0, generated by GNU Autoconf 2.65. - - Copyright (C) 2008 Free Software Foundation, Inc. - This config.lt script is free software; the Free Software Foundation -@@ -12430,7 +12505,7 @@ - if test "${am_cv_python_version+set}" = set; then : - $as_echo_n "(cached) " >&6 - else -- am_cv_python_version=`$PYTHON -c "import sys; print sys.version[:3]"` -+ am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 - $as_echo "$am_cv_python_version" >&6; } -@@ -12449,7 +12524,7 @@ - if test "${am_cv_python_platform+set}" = set; then : - $as_echo_n "(cached) " >&6 - else -- am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"` -+ am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 - $as_echo "$am_cv_python_platform" >&6; } -@@ -12476,6 +12551,14 @@ - am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` - am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` - ;; -+ *) -+ case $am_py_prefix in -+ /usr|/System*) ;; -+ *) -+ am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages -+ ;; -+ esac -+ ;; - esac - - fi -@@ -12506,6 +12589,14 @@ - am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` - am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` - ;; -+ *) -+ case $am_py_exec_prefix in -+ /usr|/System*) ;; -+ *) -+ am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages -+ ;; -+ esac -+ ;; - esac - - fi -@@ -13126,11 +13217,10 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FFI" >&5 - $as_echo_n "checking for FFI... " >&6; } - --if test -n "$PKG_CONFIG"; then -- if test -n "$FFI_CFLAGS"; then -- pkg_cv_FFI_CFLAGS="$FFI_CFLAGS" -- else -- if test -n "$PKG_CONFIG" && \ -+if test -n "$FFI_CFLAGS"; then -+ pkg_cv_FFI_CFLAGS="$FFI_CFLAGS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi >= 3.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libffi >= 3.0") 2>&5 - ac_status=$? -@@ -13140,15 +13230,13 @@ - else - pkg_failed=yes - fi -- fi --else -- pkg_failed=untried -+ else -+ pkg_failed=untried - fi --if test -n "$PKG_CONFIG"; then -- if test -n "$FFI_LIBS"; then -- pkg_cv_FFI_LIBS="$FFI_LIBS" -- else -- if test -n "$PKG_CONFIG" && \ -+if test -n "$FFI_LIBS"; then -+ pkg_cv_FFI_LIBS="$FFI_LIBS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi >= 3.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libffi >= 3.0") 2>&5 - ac_status=$? -@@ -13158,9 +13246,8 @@ - else - pkg_failed=yes - fi -- fi --else -- pkg_failed=untried -+ else -+ pkg_failed=untried - fi - - -@@ -13173,9 +13260,9 @@ - _pkg_short_errors_supported=no - fi - if test $_pkg_short_errors_supported = yes; then -- FFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libffi >= 3.0"` -+ FFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi >= 3.0" 2>&1` - else -- FFI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libffi >= 3.0"` -+ FFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi >= 3.0" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$FFI_PKG_ERRORS" >&5 -@@ -13221,11 +13308,10 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GIO" >&5 - $as_echo_n "checking for GIO... " >&6; } - --if test -n "$PKG_CONFIG"; then -- if test -n "$GIO_CFLAGS"; then -- pkg_cv_GIO_CFLAGS="$GIO_CFLAGS" -- else -- if test -n "$PKG_CONFIG" && \ -+if test -n "$GIO_CFLAGS"; then -+ pkg_cv_GIO_CFLAGS="$GIO_CFLAGS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.22.4\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.22.4") 2>&5 - ac_status=$? -@@ -13235,15 +13321,13 @@ - else - pkg_failed=yes - fi -- fi --else -- pkg_failed=untried -+ else -+ pkg_failed=untried - fi --if test -n "$PKG_CONFIG"; then -- if test -n "$GIO_LIBS"; then -- pkg_cv_GIO_LIBS="$GIO_LIBS" -- else -- if test -n "$PKG_CONFIG" && \ -+if test -n "$GIO_LIBS"; then -+ pkg_cv_GIO_LIBS="$GIO_LIBS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.22.4\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.22.4") 2>&5 - ac_status=$? -@@ -13253,9 +13337,8 @@ - else - pkg_failed=yes - fi -- fi --else -- pkg_failed=untried -+ else -+ pkg_failed=untried - fi - - -@@ -13268,9 +13351,9 @@ - _pkg_short_errors_supported=no - fi - if test $_pkg_short_errors_supported = yes; then -- GIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gio-2.0 >= 2.22.4"` -+ GIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gio-2.0 >= 2.22.4" 2>&1` - else -- GIO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 >= 2.22.4"` -+ GIO_PKG_ERRORS=`$PKG_CONFIG --print-errors "gio-2.0 >= 2.22.4" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$GIO_PKG_ERRORS" >&5 -@@ -13306,11 +13389,10 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GIOUNIX" >&5 - $as_echo_n "checking for GIOUNIX... " >&6; } - --if test -n "$PKG_CONFIG"; then -- if test -n "$GIOUNIX_CFLAGS"; then -- pkg_cv_GIOUNIX_CFLAGS="$GIOUNIX_CFLAGS" -- else -- if test -n "$PKG_CONFIG" && \ -+if test -n "$GIOUNIX_CFLAGS"; then -+ pkg_cv_GIOUNIX_CFLAGS="$GIOUNIX_CFLAGS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-unix-2.0 >= 2.22.4\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gio-unix-2.0 >= 2.22.4") 2>&5 - ac_status=$? -@@ -13320,15 +13402,13 @@ - else - pkg_failed=yes - fi -- fi --else -- pkg_failed=untried -+ else -+ pkg_failed=untried - fi --if test -n "$PKG_CONFIG"; then -- if test -n "$GIOUNIX_LIBS"; then -- pkg_cv_GIOUNIX_LIBS="$GIOUNIX_LIBS" -- else -- if test -n "$PKG_CONFIG" && \ -+if test -n "$GIOUNIX_LIBS"; then -+ pkg_cv_GIOUNIX_LIBS="$GIOUNIX_LIBS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-unix-2.0 >= 2.22.4\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gio-unix-2.0 >= 2.22.4") 2>&5 - ac_status=$? -@@ -13338,9 +13418,8 @@ - else - pkg_failed=yes - fi -- fi --else -- pkg_failed=untried -+ else -+ pkg_failed=untried - fi - - -@@ -13353,9 +13432,9 @@ - _pkg_short_errors_supported=no - fi - if test $_pkg_short_errors_supported = yes; then -- GIOUNIX_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gio-unix-2.0 >= 2.22.4"` -+ GIOUNIX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gio-unix-2.0 >= 2.22.4" 2>&1` - else -- GIOUNIX_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-unix-2.0 >= 2.22.4"` -+ GIOUNIX_PKG_ERRORS=`$PKG_CONFIG --print-errors "gio-unix-2.0 >= 2.22.4" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$GIOUNIX_PKG_ERRORS" >&5 -@@ -13608,6 +13687,14 @@ - LTLIBOBJS=$ac_ltlibobjs - - -+ if test -n "$EXEEXT"; then -+ am__EXEEXT_TRUE= -+ am__EXEEXT_FALSE='#' -+else -+ am__EXEEXT_TRUE='#' -+ am__EXEEXT_FALSE= -+fi -+ - if test -z "${PLATFORM_WIN32_TRUE}" && test -z "${PLATFORM_WIN32_FALSE}"; then - as_fn_error "conditional \"PLATFORM_WIN32\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 -@@ -14049,7 +14136,7 @@ - # values after options handling. - ac_log=" - This file was extended by pygobject $as_me 2.21.1, which was --generated by GNU Autoconf 2.64. Invocation command line was -+generated by GNU Autoconf 2.65. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS -@@ -14089,6 +14176,7 @@ - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit -+ --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files -@@ -14111,10 +14199,11 @@ - - _ACEOF - cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" - ac_cs_version="\\ - pygobject config.status 2.21.1 --configured by $0, generated by GNU Autoconf 2.64, -- with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -+configured by $0, generated by GNU Autoconf 2.65, -+ with options \\"\$ac_cs_config\\" - - Copyright (C) 2009 Free Software Foundation, Inc. - This config.status script is free software; the Free Software Foundation -@@ -14152,6 +14241,8 @@ - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; -+ --config | --confi | --conf | --con | --co | --c ) -+ $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) -@@ -14610,7 +14701,7 @@ - t delim - :nl - h --s/\(.\{148\}\).*/\1/ -+s/\(.\{148\}\)..*/\1/ - t more1 - s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ - p -@@ -14624,7 +14715,7 @@ - t nl - :delim - h --s/\(.\{148\}\).*/\1/ -+s/\(.\{148\}\)..*/\1/ - t more2 - s/["\\]/\\&/g; s/^/"/; s/$/"/ - p -diff -Naur pygobject-2.21.1/docs/Makefile.in pygobject-2.21.1.patch/docs/Makefile.in ---- pygobject-2.21.1/docs/Makefile.in 2009-12-26 22:08:33.000000000 +0100 -+++ pygobject-2.21.1.patch/docs/Makefile.in 2010-04-26 16:25:27.186863464 +0200 -@@ -1,8 +1,9 @@ --# Makefile.in generated by automake 1.10.2 from Makefile.am. -+# Makefile.in generated by automake 1.11.1 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, --# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -+# Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -16,8 +17,9 @@ - - VPATH = @srcdir@ - pkgdatadir = $(datadir)/@PACKAGE@ --pkglibdir = $(libdir)/@PACKAGE@ - pkgincludedir = $(includedir)/@PACKAGE@ -+pkglibdir = $(libdir)/@PACKAGE@ -+pkglibexecdir = $(libexecdir)/@PACKAGE@ - am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd - install_sh_DATA = $(install_sh) -c -m 644 - install_sh_PROGRAM = $(install_sh) -c -@@ -45,6 +47,7 @@ - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -+CONFIG_CLEAN_VPATH_FILES = - SOURCES = - DIST_SOURCES = - am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -@@ -52,10 +55,23 @@ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; --am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -+am__install_max = 40 -+am__nobase_strip_setup = \ -+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -+am__nobase_strip = \ -+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -+am__nobase_list = $(am__nobase_strip_setup); \ -+ for p in $$list; do echo "$$p $$p"; done | \ -+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ -+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ -+ if (++n[$$2] == $(am__install_max)) \ -+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ -+ END { for (dir in files) print dir, files[dir] }' -+am__base_list = \ -+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ -+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' - am__installdirs = "$(DESTDIR)$(CSSdir)" "$(DESTDIR)$(XSLdir)" --CSSDATA_INSTALL = $(INSTALL_DATA) --XSLDATA_INSTALL = $(INSTALL_DATA) - DATA = $(CSS_DATA) $(XSL_DATA) - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ -@@ -361,9 +377,9 @@ - exit 1;; \ - esac; \ - done; \ -- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ -- cd $(top_srcdir) && \ -- $(AUTOMAKE) --gnu docs/Makefile -+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ -+ $(am__cd) $(top_srcdir) && \ -+ $(AUTOMAKE) --gnu docs/Makefile - .PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ -@@ -381,6 +397,7 @@ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - $(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -+$(am__aclocal_m4_deps): - - mostlyclean-libtool: - -rm -f *.lo -@@ -390,37 +407,43 @@ - install-CSSDATA: $(CSS_DATA) - @$(NORMAL_INSTALL) - test -z "$(CSSdir)" || $(MKDIR_P) "$(DESTDIR)$(CSSdir)" -- @list='$(CSS_DATA)'; for p in $$list; do \ -+ @list='$(CSS_DATA)'; test -n "$(CSSdir)" || list=; \ -+ for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ -- f=$(am__strip_dir) \ -- echo " $(CSSDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(CSSdir)/$$f'"; \ -- $(CSSDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(CSSdir)/$$f"; \ -+ echo "$$d$$p"; \ -+ done | $(am__base_list) | \ -+ while read files; do \ -+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(CSSdir)'"; \ -+ $(INSTALL_DATA) $$files "$(DESTDIR)$(CSSdir)" || exit $$?; \ - done - - uninstall-CSSDATA: - @$(NORMAL_UNINSTALL) -- @list='$(CSS_DATA)'; for p in $$list; do \ -- f=$(am__strip_dir) \ -- echo " rm -f '$(DESTDIR)$(CSSdir)/$$f'"; \ -- rm -f "$(DESTDIR)$(CSSdir)/$$f"; \ -- done -+ @list='$(CSS_DATA)'; test -n "$(CSSdir)" || list=; \ -+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ -+ test -n "$$files" || exit 0; \ -+ echo " ( cd '$(DESTDIR)$(CSSdir)' && rm -f" $$files ")"; \ -+ cd "$(DESTDIR)$(CSSdir)" && rm -f $$files - install-XSLDATA: $(XSL_DATA) - @$(NORMAL_INSTALL) - test -z "$(XSLdir)" || $(MKDIR_P) "$(DESTDIR)$(XSLdir)" -- @list='$(XSL_DATA)'; for p in $$list; do \ -+ @list='$(XSL_DATA)'; test -n "$(XSLdir)" || list=; \ -+ for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ -- f=$(am__strip_dir) \ -- echo " $(XSLDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(XSLdir)/$$f'"; \ -- $(XSLDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(XSLdir)/$$f"; \ -+ echo "$$d$$p"; \ -+ done | $(am__base_list) | \ -+ while read files; do \ -+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(XSLdir)'"; \ -+ $(INSTALL_DATA) $$files "$(DESTDIR)$(XSLdir)" || exit $$?; \ - done - - uninstall-XSLDATA: - @$(NORMAL_UNINSTALL) -- @list='$(XSL_DATA)'; for p in $$list; do \ -- f=$(am__strip_dir) \ -- echo " rm -f '$(DESTDIR)$(XSLdir)/$$f'"; \ -- rm -f "$(DESTDIR)$(XSLdir)/$$f"; \ -- done -+ @list='$(XSL_DATA)'; test -n "$(XSLdir)" || list=; \ -+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ -+ test -n "$$files" || exit 0; \ -+ echo " ( cd '$(DESTDIR)$(XSLdir)' && rm -f" $$files ")"; \ -+ cd "$(DESTDIR)$(XSLdir)" && rm -f $$files - tags: TAGS - TAGS: - -@@ -444,13 +467,17 @@ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ -+ if test -d "$(distdir)/$$file"; then \ -+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ -+ fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ -- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ -+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ -+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ -- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ -+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ -- test -f $(distdir)/$$file \ -- || cp -p $$d/$$file $(distdir)/$$file \ -+ test -f "$(distdir)/$$file" \ -+ || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -@@ -484,6 +511,7 @@ - - distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - - maintainer-clean-generic: - @echo "This command is intended for maintainers to use" -@@ -503,6 +531,8 @@ - - html: html-am - -+html-am: -+ - info: info-am - - info-am: -@@ -511,18 +541,28 @@ - - install-dvi: install-dvi-am - -+install-dvi-am: -+ - install-exec-am: - - install-html: install-html-am - -+install-html-am: -+ - install-info: install-info-am - -+install-info-am: -+ - install-man: - - install-pdf: install-pdf-am - -+install-pdf-am: -+ - install-ps: install-ps-am - -+install-ps-am: -+ - installcheck-am: - - maintainer-clean: maintainer-clean-am -@@ -543,7 +583,7 @@ - - uninstall-am: uninstall-CSSDATA uninstall-XSLDATA uninstall-local - --.MAKE: install-am install-strip -+.MAKE: all check install install-am install-strip - - .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ -@@ -596,6 +636,7 @@ - # xsltproc --nonet --xinclude -o pygobject-ref.fo xsl/pdf-style.xsl \ - # reference/pygobject-ref.xml - # pdfxmltex pygobject-ref.fo >output -+#include -+ -+DL_EXPORT(void) -+init_constants(void) -+{ -+ PyObject *m, *d; -+ -+ m = Py_InitModule("gobject._constants", NULL); -+ d = PyModule_GetDict(m); -+ -+ PyDict_SetItemString(d, "G_MINFLOAT", PyFloat_FromDouble(G_MINFLOAT)); -+ PyDict_SetItemString(d, "G_MAXFLOAT", PyFloat_FromDouble(G_MAXFLOAT)); -+ PyDict_SetItemString(d, "G_MINDOUBLE", PyFloat_FromDouble(G_MINDOUBLE)); -+ PyDict_SetItemString(d, "G_MAXDOUBLE", PyFloat_FromDouble(G_MAXDOUBLE)); -+ PyDict_SetItemString(d, "G_MINSHORT", PyLong_FromLong(G_MINSHORT)); -+ PyDict_SetItemString(d, "G_MAXSHORT", PyLong_FromLong(G_MAXSHORT)); -+ PyDict_SetItemString(d, "G_MAXUSHORT", PyLong_FromUnsignedLong(G_MAXUSHORT)); -+ PyDict_SetItemString(d, "G_MININT", PyLong_FromLong(G_MININT)); -+ PyDict_SetItemString(d, "G_MAXINT", PyLong_FromLong(G_MAXINT)); -+ PyDict_SetItemString(d, "G_MAXUINT", PyLong_FromUnsignedLong(G_MAXUINT)); -+ PyDict_SetItemString(d, "G_MINLONG", PyLong_FromLong(G_MINLONG)); -+ PyDict_SetItemString(d, "G_MAXLONG", PyLong_FromLong(G_MAXLONG)); -+ PyDict_SetItemString(d, "G_MAXULONG", PyLong_FromUnsignedLong(G_MAXULONG)); -+} -+ -diff -Naur pygobject-2.21.1/gobject/constants.py pygobject-2.21.1.patch/gobject/constants.py ---- pygobject-2.21.1/gobject/constants.py 1970-01-01 01:00:00.000000000 +0100 -+++ pygobject-2.21.1.patch/gobject/constants.py 2010-04-26 16:24:13.560740838 +0200 -@@ -0,0 +1,51 @@ -+# -*- Mode: Python; py-indent-offset: 4 -*- -+# pygobject - Python bindings for the GObject library -+# Copyright (C) 2006-2007 Johan Dahlin -+# -+# gobject/constants.py: GObject type constants -+# -+# This library is free software; you can redistribute it and/or -+# modify it under the terms of the GNU Lesser General Public -+# License as published by the Free Software Foundation; either -+# version 2.1 of the License, or (at your option) any later version. -+# -+# This library is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+# Lesser General Public License for more details. -+# -+# You should have received a copy of the GNU Lesser General Public -+# License along with this library; if not, write to the Free Software -+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -+# USA -+ -+import sys -+ -+import gobject._gobject -+_gobject = sys.modules['gobject._gobject'] -+from _constants import * -+ -+# TYPE_INVALID defined in gobjectmodule.c -+TYPE_NONE = _gobject.type_from_name('void') -+TYPE_INTERFACE = _gobject.type_from_name('GInterface') -+TYPE_CHAR = _gobject.type_from_name('gchar') -+TYPE_UCHAR = _gobject.type_from_name('guchar') -+TYPE_BOOLEAN = _gobject.type_from_name('gboolean') -+TYPE_INT = _gobject.type_from_name('gint') -+TYPE_UINT = _gobject.type_from_name('guint') -+TYPE_LONG = _gobject.type_from_name('glong') -+TYPE_ULONG = _gobject.type_from_name('gulong') -+TYPE_INT64 = _gobject.type_from_name('gint64') -+TYPE_UINT64 = _gobject.type_from_name('guint64') -+TYPE_ENUM = _gobject.type_from_name('GEnum') -+TYPE_FLAGS = _gobject.type_from_name('GFlags') -+TYPE_FLOAT = _gobject.type_from_name('gfloat') -+TYPE_DOUBLE = _gobject.type_from_name('gdouble') -+TYPE_STRING = _gobject.type_from_name('gchararray') -+TYPE_POINTER = _gobject.type_from_name('gpointer') -+TYPE_BOXED = _gobject.type_from_name('GBoxed') -+TYPE_PARAM = _gobject.type_from_name('GParam') -+TYPE_OBJECT = _gobject.type_from_name('GObject') -+TYPE_PYOBJECT = _gobject.type_from_name('PyObject') -+TYPE_UNICHAR = TYPE_UINT -+ -diff -Naur pygobject-2.21.1/gobject/Makefile.am pygobject-2.21.1.patch/gobject/Makefile.am ---- pygobject-2.21.1/gobject/Makefile.am 2009-12-18 10:07:17.000000000 +0100 -+++ pygobject-2.21.1.patch/gobject/Makefile.am 2010-04-26 16:24:19.033865493 +0200 -@@ -11,7 +11,7 @@ - pygobject_PYTHON = \ - __init__.py \ - propertyhelper.py --pygobject_LTLIBRARIES = _gobject.la -+pygobject_LTLIBRARIES = _gobject.la _constants.la - nodist_pygobject_PYTHON = constants.py - - common_ldflags = -module -avoid-version -@@ -19,18 +19,11 @@ - common_ldflags += -no-undefined - endif - --constants.py: generate-constants$(EXEEXT) constants.py.in -- rm -f constants.py -- cp $(srcdir)/constants.py.in constants.py -- chmod 644 constants.py -- $(top_builddir)/gobject/generate-constants$(EXEEXT) >> constants.py -- chmod 444 constants.py -- --generate_constants_CFLAGS = $(GLIB_CFLAGS) $(PYTHON_INCLUDES) -- --noinst_PROGRAMS = generate-constants - CLEANFILES = constants.py --EXTRA_DIST = constants.py.in -+ -+_constants_la_CFLAGS = $(PYTHON_INCLUDES) $(GLIB_CFLAGS) -+_constants_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_constants -+_constants_la_SOURCES = _constants.c - - _gobject_la_CFLAGS = \ - -I$(top_srcdir)/glib \ -diff -Naur pygobject-2.21.1/gobject/Makefile.in pygobject-2.21.1.patch/gobject/Makefile.in ---- pygobject-2.21.1/gobject/Makefile.in 2009-12-26 22:08:34.000000000 +0100 -+++ pygobject-2.21.1.patch/gobject/Makefile.in 2010-04-26 16:25:27.758863642 +0200 -@@ -1,8 +1,9 @@ --# Makefile.in generated by automake 1.10.2 from Makefile.am. -+# Makefile.in generated by automake 1.11.1 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, --# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -+# Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -15,10 +16,10 @@ - @SET_MAKE@ - - -- - VPATH = @srcdir@ - pkgdatadir = $(datadir)/@PACKAGE@ - pkglibdir = $(libdir)/@PACKAGE@ -+pkglibexecdir = $(libexecdir)/@PACKAGE@ - am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd - install_sh_DATA = $(install_sh) -c -m 644 - install_sh_PROGRAM = $(install_sh) -c -@@ -34,7 +35,6 @@ - build_triplet = @build@ - host_triplet = @host@ - @PLATFORM_WIN32_TRUE@am__append_1 = -no-undefined --noinst_PROGRAMS = generate-constants$(EXEEXT) - @HAVE_LIBFFI_TRUE@am__append_2 = ffi-marshaller.c ffi-marshaller.h - @PLATFORM_WIN32_TRUE@am__append_3 = -DPLATFORM_WIN32 - subdir = gobject -@@ -51,17 +51,38 @@ - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -+CONFIG_CLEAN_VPATH_FILES = - am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; - am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; --am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -+am__install_max = 40 -+am__nobase_strip_setup = \ -+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -+am__nobase_strip = \ -+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -+am__nobase_list = $(am__nobase_strip_setup); \ -+ for p in $$list; do echo "$$p $$p"; done | \ -+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ -+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ -+ if (++n[$$2] == $(am__install_max)) \ -+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ -+ END { for (dir in files) print dir, files[dir] }' -+am__base_list = \ -+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ -+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' - am__installdirs = "$(DESTDIR)$(pygobjectdir)" \ - "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pygobjectdir)" \ - "$(DESTDIR)$(pkgincludedir)" --pygobjectLTLIBRARIES_INSTALL = $(INSTALL) - LTLIBRARIES = $(pygobject_LTLIBRARIES) -+_constants_la_LIBADD = -+am__constants_la_OBJECTS = _constants_la-_constants.lo -+_constants_la_OBJECTS = $(am__constants_la_OBJECTS) -+_constants_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ -+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(_constants_la_CFLAGS) \ -+ $(CFLAGS) $(_constants_la_LDFLAGS) $(LDFLAGS) -o $@ - am__DEPENDENCIES_1 = - am___gobject_la_SOURCES_DIST = gobjectmodule.c pygboxed.c pygboxed.h \ - pygenum.c pygenum.h pygflags.c pygflags.h pyginterface.c \ -@@ -80,18 +101,10 @@ - _gobject_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(_gobject_la_CFLAGS) \ - $(CFLAGS) $(_gobject_la_LDFLAGS) $(LDFLAGS) -o $@ --PROGRAMS = $(noinst_PROGRAMS) --generate_constants_SOURCES = generate-constants.c --generate_constants_OBJECTS = \ -- generate_constants-generate-constants.$(OBJEXT) --generate_constants_LDADD = $(LDADD) --generate_constants_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ -- $(LIBTOOLFLAGS) --mode=link $(CCLD) \ -- $(generate_constants_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ -- $(LDFLAGS) -o $@ - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = $(SHELL) $(top_srcdir)/depcomp - am__depfiles_maybe = depfiles -+am__mv = mv -f - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ -@@ -101,12 +114,10 @@ - LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ --SOURCES = $(_gobject_la_SOURCES) generate-constants.c --DIST_SOURCES = $(am___gobject_la_SOURCES_DIST) generate-constants.c --nodist_pygobjectPYTHON_INSTALL = $(INSTALL_DATA) --pygobjectPYTHON_INSTALL = $(INSTALL_DATA) -+SOURCES = $(_constants_la_SOURCES) $(_gobject_la_SOURCES) -+DIST_SOURCES = $(_constants_la_SOURCES) \ -+ $(am___gobject_la_SOURCES_DIST) - py_compile = $(top_srcdir)/py-compile --pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER) - HEADERS = $(pkginclude_HEADERS) - ETAGS = etags - CTAGS = ctags -@@ -268,12 +279,13 @@ - __init__.py \ - propertyhelper.py - --pygobject_LTLIBRARIES = _gobject.la -+pygobject_LTLIBRARIES = _gobject.la _constants.la - nodist_pygobject_PYTHON = constants.py - common_ldflags = -module -avoid-version $(am__append_1) --generate_constants_CFLAGS = $(GLIB_CFLAGS) $(PYTHON_INCLUDES) - CLEANFILES = constants.py --EXTRA_DIST = constants.py.in -+_constants_la_CFLAGS = $(PYTHON_INCLUDES) $(GLIB_CFLAGS) -+_constants_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_constants -+_constants_la_SOURCES = _constants.c - _gobject_la_CFLAGS = -I$(top_srcdir)/glib $(PYTHON_INCLUDES) \ - $(FFI_CFLAGS) $(GLIB_CFLAGS) -DPY_SSIZE_T_CLEAN \ - $(am__append_3) -@@ -302,9 +314,9 @@ - exit 1;; \ - esac; \ - done; \ -- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gobject/Makefile'; \ -- cd $(top_srcdir) && \ -- $(AUTOMAKE) --gnu gobject/Makefile -+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gobject/Makefile'; \ -+ $(am__cd) $(top_srcdir) && \ -+ $(AUTOMAKE) --gnu gobject/Makefile - .PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ -@@ -322,23 +334,28 @@ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - $(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -+$(am__aclocal_m4_deps): - install-pygobjectLTLIBRARIES: $(pygobject_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(pygobjectdir)" || $(MKDIR_P) "$(DESTDIR)$(pygobjectdir)" -- @list='$(pygobject_LTLIBRARIES)'; for p in $$list; do \ -+ @list='$(pygobject_LTLIBRARIES)'; test -n "$(pygobjectdir)" || list=; \ -+ list2=; for p in $$list; do \ - if test -f $$p; then \ -- f=$(am__strip_dir) \ -- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pygobjectLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pygobjectdir)/$$f'"; \ -- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pygobjectLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pygobjectdir)/$$f"; \ -+ list2="$$list2 $$p"; \ - else :; fi; \ -- done -+ done; \ -+ test -z "$$list2" || { \ -+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pygobjectdir)'"; \ -+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pygobjectdir)"; \ -+ } - - uninstall-pygobjectLTLIBRARIES: - @$(NORMAL_UNINSTALL) -- @list='$(pygobject_LTLIBRARIES)'; for p in $$list; do \ -- p=$(am__strip_dir) \ -- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pygobjectdir)/$$p'"; \ -- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pygobjectdir)/$$p"; \ -+ @list='$(pygobject_LTLIBRARIES)'; test -n "$(pygobjectdir)" || list=; \ -+ for p in $$list; do \ -+ $(am__strip_dir) \ -+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pygobjectdir)/$$f'"; \ -+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pygobjectdir)/$$f"; \ - done - - clean-pygobjectLTLIBRARIES: -@@ -349,25 +366,18 @@ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -+_constants.la: $(_constants_la_OBJECTS) $(_constants_la_DEPENDENCIES) -+ $(_constants_la_LINK) -rpath $(pygobjectdir) $(_constants_la_OBJECTS) $(_constants_la_LIBADD) $(LIBS) - _gobject.la: $(_gobject_la_OBJECTS) $(_gobject_la_DEPENDENCIES) - $(_gobject_la_LINK) -rpath $(pygobjectdir) $(_gobject_la_OBJECTS) $(_gobject_la_LIBADD) $(LIBS) - --clean-noinstPROGRAMS: -- @list='$(noinst_PROGRAMS)'; for p in $$list; do \ -- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ -- echo " rm -f $$p $$f"; \ -- rm -f $$p $$f ; \ -- done --generate-constants$(EXEEXT): $(generate_constants_OBJECTS) $(generate_constants_DEPENDENCIES) -- @rm -f generate-constants$(EXEEXT) -- $(generate_constants_LINK) $(generate_constants_OBJECTS) $(generate_constants_LDADD) $(LIBS) -- - mostlyclean-compile: - -rm -f *.$(OBJEXT) - - distclean-compile: - -rm -f *.tab.c - -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_constants_la-_constants.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-ffi-marshaller.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-gobjectmodule.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygboxed.Plo@am__quote@ -@@ -378,112 +388,104 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygparamspec.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygpointer.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gobject_la-pygtype.Plo@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate_constants-generate-constants.Po@am__quote@ - - .c.o: - @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< --@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(COMPILE) -c $< - - .c.obj: - @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` --@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - - .c.lo: - @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< --@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -+_constants_la-_constants.lo: _constants.c -+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_constants_la_CFLAGS) $(CFLAGS) -MT _constants_la-_constants.lo -MD -MP -MF $(DEPDIR)/_constants_la-_constants.Tpo -c -o _constants_la-_constants.lo `test -f '_constants.c' || echo '$(srcdir)/'`_constants.c -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_constants_la-_constants.Tpo $(DEPDIR)/_constants_la-_constants.Plo -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='_constants.c' object='_constants_la-_constants.lo' libtool=yes @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_constants_la_CFLAGS) $(CFLAGS) -c -o _constants_la-_constants.lo `test -f '_constants.c' || echo '$(srcdir)/'`_constants.c -+ - _gobject_la-gobjectmodule.lo: gobjectmodule.c --@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-gobjectmodule.lo -MD -MP -MF $(DEPDIR)/_gobject_la-gobjectmodule.Tpo -c -o _gobject_la-gobjectmodule.lo `test -f 'gobjectmodule.c' || echo '$(srcdir)/'`gobjectmodule.c --@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/_gobject_la-gobjectmodule.Tpo $(DEPDIR)/_gobject_la-gobjectmodule.Plo -+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-gobjectmodule.lo -MD -MP -MF $(DEPDIR)/_gobject_la-gobjectmodule.Tpo -c -o _gobject_la-gobjectmodule.lo `test -f 'gobjectmodule.c' || echo '$(srcdir)/'`gobjectmodule.c -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gobject_la-gobjectmodule.Tpo $(DEPDIR)/_gobject_la-gobjectmodule.Plo - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gobjectmodule.c' object='_gobject_la-gobjectmodule.lo' libtool=yes @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-gobjectmodule.lo `test -f 'gobjectmodule.c' || echo '$(srcdir)/'`gobjectmodule.c -+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-gobjectmodule.lo `test -f 'gobjectmodule.c' || echo '$(srcdir)/'`gobjectmodule.c - - _gobject_la-pygboxed.lo: pygboxed.c --@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygboxed.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygboxed.Tpo -c -o _gobject_la-pygboxed.lo `test -f 'pygboxed.c' || echo '$(srcdir)/'`pygboxed.c --@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/_gobject_la-pygboxed.Tpo $(DEPDIR)/_gobject_la-pygboxed.Plo -+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygboxed.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygboxed.Tpo -c -o _gobject_la-pygboxed.lo `test -f 'pygboxed.c' || echo '$(srcdir)/'`pygboxed.c -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gobject_la-pygboxed.Tpo $(DEPDIR)/_gobject_la-pygboxed.Plo - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygboxed.c' object='_gobject_la-pygboxed.lo' libtool=yes @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygboxed.lo `test -f 'pygboxed.c' || echo '$(srcdir)/'`pygboxed.c -+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygboxed.lo `test -f 'pygboxed.c' || echo '$(srcdir)/'`pygboxed.c - - _gobject_la-pygenum.lo: pygenum.c --@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygenum.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygenum.Tpo -c -o _gobject_la-pygenum.lo `test -f 'pygenum.c' || echo '$(srcdir)/'`pygenum.c --@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/_gobject_la-pygenum.Tpo $(DEPDIR)/_gobject_la-pygenum.Plo -+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygenum.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygenum.Tpo -c -o _gobject_la-pygenum.lo `test -f 'pygenum.c' || echo '$(srcdir)/'`pygenum.c -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gobject_la-pygenum.Tpo $(DEPDIR)/_gobject_la-pygenum.Plo - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygenum.c' object='_gobject_la-pygenum.lo' libtool=yes @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygenum.lo `test -f 'pygenum.c' || echo '$(srcdir)/'`pygenum.c -+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygenum.lo `test -f 'pygenum.c' || echo '$(srcdir)/'`pygenum.c - - _gobject_la-pygflags.lo: pygflags.c --@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygflags.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygflags.Tpo -c -o _gobject_la-pygflags.lo `test -f 'pygflags.c' || echo '$(srcdir)/'`pygflags.c --@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/_gobject_la-pygflags.Tpo $(DEPDIR)/_gobject_la-pygflags.Plo -+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygflags.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygflags.Tpo -c -o _gobject_la-pygflags.lo `test -f 'pygflags.c' || echo '$(srcdir)/'`pygflags.c -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gobject_la-pygflags.Tpo $(DEPDIR)/_gobject_la-pygflags.Plo - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygflags.c' object='_gobject_la-pygflags.lo' libtool=yes @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygflags.lo `test -f 'pygflags.c' || echo '$(srcdir)/'`pygflags.c -+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygflags.lo `test -f 'pygflags.c' || echo '$(srcdir)/'`pygflags.c - - _gobject_la-pyginterface.lo: pyginterface.c --@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pyginterface.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pyginterface.Tpo -c -o _gobject_la-pyginterface.lo `test -f 'pyginterface.c' || echo '$(srcdir)/'`pyginterface.c --@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/_gobject_la-pyginterface.Tpo $(DEPDIR)/_gobject_la-pyginterface.Plo -+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pyginterface.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pyginterface.Tpo -c -o _gobject_la-pyginterface.lo `test -f 'pyginterface.c' || echo '$(srcdir)/'`pyginterface.c -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gobject_la-pyginterface.Tpo $(DEPDIR)/_gobject_la-pyginterface.Plo - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pyginterface.c' object='_gobject_la-pyginterface.lo' libtool=yes @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pyginterface.lo `test -f 'pyginterface.c' || echo '$(srcdir)/'`pyginterface.c -+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pyginterface.lo `test -f 'pyginterface.c' || echo '$(srcdir)/'`pyginterface.c - - _gobject_la-pygobject.lo: pygobject.c --@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygobject.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygobject.Tpo -c -o _gobject_la-pygobject.lo `test -f 'pygobject.c' || echo '$(srcdir)/'`pygobject.c --@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/_gobject_la-pygobject.Tpo $(DEPDIR)/_gobject_la-pygobject.Plo -+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygobject.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygobject.Tpo -c -o _gobject_la-pygobject.lo `test -f 'pygobject.c' || echo '$(srcdir)/'`pygobject.c -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gobject_la-pygobject.Tpo $(DEPDIR)/_gobject_la-pygobject.Plo - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygobject.c' object='_gobject_la-pygobject.lo' libtool=yes @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygobject.lo `test -f 'pygobject.c' || echo '$(srcdir)/'`pygobject.c -+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygobject.lo `test -f 'pygobject.c' || echo '$(srcdir)/'`pygobject.c - - _gobject_la-pygparamspec.lo: pygparamspec.c --@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygparamspec.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygparamspec.Tpo -c -o _gobject_la-pygparamspec.lo `test -f 'pygparamspec.c' || echo '$(srcdir)/'`pygparamspec.c --@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/_gobject_la-pygparamspec.Tpo $(DEPDIR)/_gobject_la-pygparamspec.Plo -+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygparamspec.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygparamspec.Tpo -c -o _gobject_la-pygparamspec.lo `test -f 'pygparamspec.c' || echo '$(srcdir)/'`pygparamspec.c -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gobject_la-pygparamspec.Tpo $(DEPDIR)/_gobject_la-pygparamspec.Plo - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygparamspec.c' object='_gobject_la-pygparamspec.lo' libtool=yes @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygparamspec.lo `test -f 'pygparamspec.c' || echo '$(srcdir)/'`pygparamspec.c -+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygparamspec.lo `test -f 'pygparamspec.c' || echo '$(srcdir)/'`pygparamspec.c - - _gobject_la-pygpointer.lo: pygpointer.c --@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygpointer.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygpointer.Tpo -c -o _gobject_la-pygpointer.lo `test -f 'pygpointer.c' || echo '$(srcdir)/'`pygpointer.c --@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/_gobject_la-pygpointer.Tpo $(DEPDIR)/_gobject_la-pygpointer.Plo -+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygpointer.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygpointer.Tpo -c -o _gobject_la-pygpointer.lo `test -f 'pygpointer.c' || echo '$(srcdir)/'`pygpointer.c -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gobject_la-pygpointer.Tpo $(DEPDIR)/_gobject_la-pygpointer.Plo - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygpointer.c' object='_gobject_la-pygpointer.lo' libtool=yes @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygpointer.lo `test -f 'pygpointer.c' || echo '$(srcdir)/'`pygpointer.c -+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygpointer.lo `test -f 'pygpointer.c' || echo '$(srcdir)/'`pygpointer.c - - _gobject_la-pygtype.lo: pygtype.c --@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygtype.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygtype.Tpo -c -o _gobject_la-pygtype.lo `test -f 'pygtype.c' || echo '$(srcdir)/'`pygtype.c --@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/_gobject_la-pygtype.Tpo $(DEPDIR)/_gobject_la-pygtype.Plo -+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-pygtype.lo -MD -MP -MF $(DEPDIR)/_gobject_la-pygtype.Tpo -c -o _gobject_la-pygtype.lo `test -f 'pygtype.c' || echo '$(srcdir)/'`pygtype.c -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gobject_la-pygtype.Tpo $(DEPDIR)/_gobject_la-pygtype.Plo - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pygtype.c' object='_gobject_la-pygtype.lo' libtool=yes @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygtype.lo `test -f 'pygtype.c' || echo '$(srcdir)/'`pygtype.c -+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-pygtype.lo `test -f 'pygtype.c' || echo '$(srcdir)/'`pygtype.c - - _gobject_la-ffi-marshaller.lo: ffi-marshaller.c --@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-ffi-marshaller.lo -MD -MP -MF $(DEPDIR)/_gobject_la-ffi-marshaller.Tpo -c -o _gobject_la-ffi-marshaller.lo `test -f 'ffi-marshaller.c' || echo '$(srcdir)/'`ffi-marshaller.c --@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/_gobject_la-ffi-marshaller.Tpo $(DEPDIR)/_gobject_la-ffi-marshaller.Plo -+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -MT _gobject_la-ffi-marshaller.lo -MD -MP -MF $(DEPDIR)/_gobject_la-ffi-marshaller.Tpo -c -o _gobject_la-ffi-marshaller.lo `test -f 'ffi-marshaller.c' || echo '$(srcdir)/'`ffi-marshaller.c -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/_gobject_la-ffi-marshaller.Tpo $(DEPDIR)/_gobject_la-ffi-marshaller.Plo - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ffi-marshaller.c' object='_gobject_la-ffi-marshaller.lo' libtool=yes @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-ffi-marshaller.lo `test -f 'ffi-marshaller.c' || echo '$(srcdir)/'`ffi-marshaller.c -- --generate_constants-generate-constants.o: generate-constants.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generate_constants_CFLAGS) $(CFLAGS) -MT generate_constants-generate-constants.o -MD -MP -MF $(DEPDIR)/generate_constants-generate-constants.Tpo -c -o generate_constants-generate-constants.o `test -f 'generate-constants.c' || echo '$(srcdir)/'`generate-constants.c --@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/generate_constants-generate-constants.Tpo $(DEPDIR)/generate_constants-generate-constants.Po --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate-constants.c' object='generate_constants-generate-constants.o' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generate_constants_CFLAGS) $(CFLAGS) -c -o generate_constants-generate-constants.o `test -f 'generate-constants.c' || echo '$(srcdir)/'`generate-constants.c -- --generate_constants-generate-constants.obj: generate-constants.c --@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generate_constants_CFLAGS) $(CFLAGS) -MT generate_constants-generate-constants.obj -MD -MP -MF $(DEPDIR)/generate_constants-generate-constants.Tpo -c -o generate_constants-generate-constants.obj `if test -f 'generate-constants.c'; then $(CYGPATH_W) 'generate-constants.c'; else $(CYGPATH_W) '$(srcdir)/generate-constants.c'; fi` --@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/generate_constants-generate-constants.Tpo $(DEPDIR)/generate_constants-generate-constants.Po --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='generate-constants.c' object='generate_constants-generate-constants.obj' libtool=no @AMDEPBACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(generate_constants_CFLAGS) $(CFLAGS) -c -o generate_constants-generate-constants.obj `if test -f 'generate-constants.c'; then $(CYGPATH_W) 'generate-constants.c'; else $(CYGPATH_W) '$(srcdir)/generate-constants.c'; fi` -+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_gobject_la_CFLAGS) $(CFLAGS) -c -o _gobject_la-ffi-marshaller.lo `test -f 'ffi-marshaller.c' || echo '$(srcdir)/'`ffi-marshaller.c - - mostlyclean-libtool: - -rm -f *.lo -@@ -493,15 +495,20 @@ - install-nodist_pygobjectPYTHON: $(nodist_pygobject_PYTHON) - @$(NORMAL_INSTALL) - test -z "$(pygobjectdir)" || $(MKDIR_P) "$(DESTDIR)$(pygobjectdir)" -- @list='$(nodist_pygobject_PYTHON)'; dlist=''; for p in $$list; do\ -+ @list='$(nodist_pygobject_PYTHON)'; dlist=; list2=; test -n "$(pygobjectdir)" || list=; \ -+ for p in $$list; do \ - if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ - if test -f $$b$$p; then \ -- f=$(am__strip_dir) \ -+ $(am__strip_dir) \ - dlist="$$dlist $$f"; \ -- echo " $(nodist_pygobjectPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(pygobjectdir)/$$f'"; \ -- $(nodist_pygobjectPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(pygobjectdir)/$$f"; \ -+ list2="$$list2 $$b$$p"; \ - else :; fi; \ - done; \ -+ for file in $$list2; do echo $$file; done | $(am__base_list) | \ -+ while read files; do \ -+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pygobjectdir)'"; \ -+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pygobjectdir)" || exit $$?; \ -+ done || exit $$?; \ - if test -n "$$dlist"; then \ - if test -z "$(DESTDIR)"; then \ - PYTHON=$(PYTHON) $(py_compile) --basedir "$(pygobjectdir)" $$dlist; \ -@@ -512,24 +519,34 @@ - - uninstall-nodist_pygobjectPYTHON: - @$(NORMAL_UNINSTALL) -- @list='$(nodist_pygobject_PYTHON)'; dlist=''; for p in $$list; do\ -- f=$(am__strip_dir) \ -- rm -f "$(DESTDIR)$(pygobjectdir)/$$f"; \ -- rm -f "$(DESTDIR)$(pygobjectdir)/$${f}c"; \ -- rm -f "$(DESTDIR)$(pygobjectdir)/$${f}o"; \ -- done -+ @list='$(nodist_pygobject_PYTHON)'; test -n "$(pygobjectdir)" || list=; \ -+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ -+ test -n "$$files" || exit 0; \ -+ filesc=`echo "$$files" | sed 's|$$|c|'`; \ -+ fileso=`echo "$$files" | sed 's|$$|o|'`; \ -+ echo " ( cd '$(DESTDIR)$(pygobjectdir)' && rm -f" $$files ")"; \ -+ cd "$(DESTDIR)$(pygobjectdir)" && rm -f $$files || exit $$?; \ -+ echo " ( cd '$(DESTDIR)$(pygobjectdir)' && rm -f" $$filesc ")"; \ -+ cd "$(DESTDIR)$(pygobjectdir)" && rm -f $$filesc || exit $$?; \ -+ echo " ( cd '$(DESTDIR)$(pygobjectdir)' && rm -f" $$fileso ")"; \ -+ cd "$(DESTDIR)$(pygobjectdir)" && rm -f $$fileso - install-pygobjectPYTHON: $(pygobject_PYTHON) - @$(NORMAL_INSTALL) - test -z "$(pygobjectdir)" || $(MKDIR_P) "$(DESTDIR)$(pygobjectdir)" -- @list='$(pygobject_PYTHON)'; dlist=''; for p in $$list; do\ -+ @list='$(pygobject_PYTHON)'; dlist=; list2=; test -n "$(pygobjectdir)" || list=; \ -+ for p in $$list; do \ - if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ - if test -f $$b$$p; then \ -- f=$(am__strip_dir) \ -+ $(am__strip_dir) \ - dlist="$$dlist $$f"; \ -- echo " $(pygobjectPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(pygobjectdir)/$$f'"; \ -- $(pygobjectPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(pygobjectdir)/$$f"; \ -+ list2="$$list2 $$b$$p"; \ - else :; fi; \ - done; \ -+ for file in $$list2; do echo $$file; done | $(am__base_list) | \ -+ while read files; do \ -+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pygobjectdir)'"; \ -+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pygobjectdir)" || exit $$?; \ -+ done || exit $$?; \ - if test -n "$$dlist"; then \ - if test -z "$(DESTDIR)"; then \ - PYTHON=$(PYTHON) $(py_compile) --basedir "$(pygobjectdir)" $$dlist; \ -@@ -540,29 +557,37 @@ - - uninstall-pygobjectPYTHON: - @$(NORMAL_UNINSTALL) -- @list='$(pygobject_PYTHON)'; dlist=''; for p in $$list; do\ -- f=$(am__strip_dir) \ -- rm -f "$(DESTDIR)$(pygobjectdir)/$$f"; \ -- rm -f "$(DESTDIR)$(pygobjectdir)/$${f}c"; \ -- rm -f "$(DESTDIR)$(pygobjectdir)/$${f}o"; \ -- done -+ @list='$(pygobject_PYTHON)'; test -n "$(pygobjectdir)" || list=; \ -+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ -+ test -n "$$files" || exit 0; \ -+ filesc=`echo "$$files" | sed 's|$$|c|'`; \ -+ fileso=`echo "$$files" | sed 's|$$|o|'`; \ -+ echo " ( cd '$(DESTDIR)$(pygobjectdir)' && rm -f" $$files ")"; \ -+ cd "$(DESTDIR)$(pygobjectdir)" && rm -f $$files || exit $$?; \ -+ echo " ( cd '$(DESTDIR)$(pygobjectdir)' && rm -f" $$filesc ")"; \ -+ cd "$(DESTDIR)$(pygobjectdir)" && rm -f $$filesc || exit $$?; \ -+ echo " ( cd '$(DESTDIR)$(pygobjectdir)' && rm -f" $$fileso ")"; \ -+ cd "$(DESTDIR)$(pygobjectdir)" && rm -f $$fileso - install-pkgincludeHEADERS: $(pkginclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" -- @list='$(pkginclude_HEADERS)'; for p in $$list; do \ -+ @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ -+ for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ -- f=$(am__strip_dir) \ -- echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \ -- $(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \ -+ echo "$$d$$p"; \ -+ done | $(am__base_list) | \ -+ while read files; do \ -+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ -+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ - done - - uninstall-pkgincludeHEADERS: - @$(NORMAL_UNINSTALL) -- @list='$(pkginclude_HEADERS)'; for p in $$list; do \ -- f=$(am__strip_dir) \ -- echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \ -- rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \ -- done -+ @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ -+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ -+ test -n "$$files" || exit 0; \ -+ echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ -+ cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files - - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ -@@ -576,7 +601,7 @@ - - TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) -- tags=; \ -+ set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ -@@ -584,29 +609,34 @@ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ -- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ -+ shift; \ -+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ -- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ -- $$tags $$unique; \ -+ if test $$# -gt 0; then \ -+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ -+ "$$@" $$unique; \ -+ else \ -+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ -+ $$unique; \ -+ fi; \ - fi - ctags: CTAGS - CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) -- tags=; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ -- test -z "$(CTAGS_ARGS)$$tags$$unique" \ -+ test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ -- $$tags $$unique -+ $$unique - - GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ -- && cd $(top_srcdir) \ -- && gtags -i $(GTAGS_ARGS) $$here -+ && $(am__cd) $(top_srcdir) \ -+ && gtags -i $(GTAGS_ARGS) "$$here" - - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -@@ -627,19 +657,23 @@ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ -+ if test -d "$(distdir)/$$file"; then \ -+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ -+ fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ -- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ -+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ -+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ -- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ -+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ -- test -f $(distdir)/$$file \ -- || cp -p $$d/$$file $(distdir)/$$file \ -+ test -f "$(distdir)/$$file" \ -+ || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - check-am: all-am - check: check-am --all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) -+all-am: Makefile $(LTLIBRARIES) $(HEADERS) - installdirs: - for dir in "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pygobjectdir)" "$(DESTDIR)$(pkgincludedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ -@@ -665,13 +699,14 @@ - - distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - - maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - clean: clean-am - --clean-am: clean-generic clean-libtool clean-local clean-noinstPROGRAMS \ -+clean-am: clean-generic clean-libtool clean-local \ - clean-pygobjectLTLIBRARIES mostlyclean-am - - distclean: distclean-am -@@ -686,6 +721,8 @@ - - html: html-am - -+html-am: -+ - info: info-am - - info-am: -@@ -696,18 +733,28 @@ - - install-dvi: install-dvi-am - -+install-dvi-am: -+ - install-exec-am: - - install-html: install-html-am - -+install-html-am: -+ - install-info: install-info-am - -+install-info-am: -+ - install-man: - - install-pdf: install-pdf-am - -+install-pdf-am: -+ - install-ps: install-ps-am - -+install-ps-am: -+ - installcheck-am: - - maintainer-clean: maintainer-clean-am -@@ -735,36 +782,30 @@ - .MAKE: install-am install-strip - - .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ -- clean-libtool clean-local clean-noinstPROGRAMS \ -- clean-pygobjectLTLIBRARIES ctags distclean distclean-compile \ -- distclean-generic distclean-libtool distclean-tags distdir dvi \ -- dvi-am html html-am info info-am install install-am \ -- install-data install-data-am install-dvi install-dvi-am \ -- install-exec install-exec-am install-html install-html-am \ -- install-info install-info-am install-man \ -- install-nodist_pygobjectPYTHON install-pdf install-pdf-am \ -- install-pkgincludeHEADERS install-ps install-ps-am \ -- install-pygobjectLTLIBRARIES install-pygobjectPYTHON \ -- install-strip installcheck installcheck-am installdirs \ -- maintainer-clean maintainer-clean-generic mostlyclean \ -- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ -- pdf pdf-am ps ps-am tags uninstall uninstall-am \ -- uninstall-nodist_pygobjectPYTHON uninstall-pkgincludeHEADERS \ -- uninstall-pygobjectLTLIBRARIES uninstall-pygobjectPYTHON -- -- --constants.py: generate-constants$(EXEEXT) constants.py.in -- rm -f constants.py -- cp $(srcdir)/constants.py.in constants.py -- chmod 644 constants.py -- $(top_builddir)/gobject/generate-constants$(EXEEXT) >> constants.py -- chmod 444 constants.py -+ clean-libtool clean-local clean-pygobjectLTLIBRARIES ctags \ -+ distclean distclean-compile distclean-generic \ -+ distclean-libtool distclean-tags distdir dvi dvi-am html \ -+ html-am info info-am install install-am install-data \ -+ install-data-am install-dvi install-dvi-am install-exec \ -+ install-exec-am install-html install-html-am install-info \ -+ install-info-am install-man install-nodist_pygobjectPYTHON \ -+ install-pdf install-pdf-am install-pkgincludeHEADERS \ -+ install-ps install-ps-am install-pygobjectLTLIBRARIES \ -+ install-pygobjectPYTHON install-strip installcheck \ -+ installcheck-am installdirs maintainer-clean \ -+ maintainer-clean-generic mostlyclean mostlyclean-compile \ -+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ -+ tags uninstall uninstall-am uninstall-nodist_pygobjectPYTHON \ -+ uninstall-pkgincludeHEADERS uninstall-pygobjectLTLIBRARIES \ -+ uninstall-pygobjectPYTHON -+ - - all: $(pygobject_LTLIBRARIES:.la=.so) - clean-local: - rm -f $(pygobject_LTLIBRARIES:.la=.so) - .la.so: - $(LN_S) .libs/$@ $@ || true -+ - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. - .NOEXPORT: -diff -Naur pygobject-2.21.1/Makefile.in pygobject-2.21.1.patch/Makefile.in ---- pygobject-2.21.1/Makefile.in 2009-12-26 22:08:34.000000000 +0100 -+++ pygobject-2.21.1.patch/Makefile.in 2010-04-26 16:25:27.962863862 +0200 -@@ -1,8 +1,9 @@ --# Makefile.in generated by automake 1.10.2 from Makefile.am. -+# Makefile.in generated by automake 1.11.1 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, --# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -+# Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -17,8 +18,9 @@ - - VPATH = @srcdir@ - pkgdatadir = $(datadir)/@PACKAGE@ --pkglibdir = $(libdir)/@PACKAGE@ - pkgincludedir = $(includedir)/@PACKAGE@ -+pkglibdir = $(libdir)/@PACKAGE@ -+pkglibexecdir = $(libexecdir)/@PACKAGE@ - am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd - install_sh_DATA = $(install_sh) -c -m 644 - install_sh_PROGRAM = $(install_sh) -c -@@ -58,17 +60,31 @@ - CONFIG_HEADER = config.h - CONFIG_CLEAN_FILES = pygobject-2.0.pc pygobject-2.0-uninstalled.pc \ - docs/reference/entities.docbook docs/xsl/fixxref.py PKG-INFO -+CONFIG_CLEAN_VPATH_FILES = - am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; - am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; --am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -+am__install_max = 40 -+am__nobase_strip_setup = \ -+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -+am__nobase_strip = \ -+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -+am__nobase_list = $(am__nobase_strip_setup); \ -+ for p in $$list; do echo "$$p $$p"; done | \ -+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ -+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ -+ if (++n[$$2] == $(am__install_max)) \ -+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ -+ END { for (dir in files) print dir, files[dir] }' -+am__base_list = \ -+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ -+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' - am__installdirs = "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" \ - "$(DESTDIR)$(pkgpyexecdir)" "$(DESTDIR)$(pyexecdir)" \ - "$(DESTDIR)$(pkgconfigdir)" --pkgpyexecLTLIBRARIES_INSTALL = $(INSTALL) --pyexecLTLIBRARIES_INSTALL = $(INSTALL) - LTLIBRARIES = $(pkgpyexec_LTLIBRARIES) $(pyexec_LTLIBRARIES) - SOURCES = - DIST_SOURCES = -@@ -79,13 +95,13 @@ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive --pkgpyexecPYTHON_INSTALL = $(INSTALL_DATA) --pyexecPYTHON_INSTALL = $(INSTALL_DATA) - py_compile = $(top_srcdir)/py-compile --pkgconfigDATA_INSTALL = $(INSTALL_DATA) - DATA = $(pkgconfig_DATA) - RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ -+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ -+ distdir dist dist-all distcheck - ETAGS = etags - CTAGS = ctags - DIST_SUBDIRS = $(SUBDIRS) -@@ -93,9 +109,34 @@ - distdir = $(PACKAGE)-$(VERSION) - top_distdir = $(distdir) - am__remove_distdir = \ -- { test ! -d $(distdir) \ -- || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ -- && rm -fr $(distdir); }; } -+ { test ! -d "$(distdir)" \ -+ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ -+ && rm -fr "$(distdir)"; }; } -+am__relativize = \ -+ dir0=`pwd`; \ -+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ -+ sed_rest='s,^[^/]*/*,,'; \ -+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ -+ sed_butlast='s,/*[^/]*$$,,'; \ -+ while test -n "$$dir1"; do \ -+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ -+ if test "$$first" != "."; then \ -+ if test "$$first" = ".."; then \ -+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ -+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ -+ else \ -+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ -+ if test "$$first2" = "$$first"; then \ -+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ -+ else \ -+ dir2="../$$dir2"; \ -+ fi; \ -+ dir0="$$dir0"/"$$first"; \ -+ fi; \ -+ fi; \ -+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ -+ done; \ -+ reldir="$$dir2" - DIST_ARCHIVES = $(distdir).tar.gz - GZIP_ENV = --best - distuninstallcheck_listfiles = find . -type f -print -@@ -295,15 +336,15 @@ - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ -- echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ -- cd $(srcdir) && $(AUTOMAKE) --gnu \ -+ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ -+ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ -- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ -- cd $(top_srcdir) && \ -- $(AUTOMAKE) --gnu Makefile -+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ -+ $(am__cd) $(top_srcdir) && \ -+ $(AUTOMAKE) --gnu Makefile - .PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ -@@ -319,9 +360,10 @@ - $(SHELL) ./config.status --recheck - - $(top_srcdir)/configure: $(am__configure_deps) -- cd $(srcdir) && $(AUTOCONF) -+ $(am__cd) $(srcdir) && $(AUTOCONF) - $(ACLOCAL_M4): $(am__aclocal_m4_deps) -- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -+$(am__aclocal_m4_deps): - - config.h: stamp-h1 - @if test ! -f $@; then \ -@@ -333,7 +375,7 @@ - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status config.h - $(srcdir)/config.h.in: $(am__configure_deps) -- cd $(top_srcdir) && $(AUTOHEADER) -+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ - -@@ -352,20 +394,24 @@ - install-pkgpyexecLTLIBRARIES: $(pkgpyexec_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(pkgpyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgpyexecdir)" -- @list='$(pkgpyexec_LTLIBRARIES)'; for p in $$list; do \ -+ @list='$(pkgpyexec_LTLIBRARIES)'; test -n "$(pkgpyexecdir)" || list=; \ -+ list2=; for p in $$list; do \ - if test -f $$p; then \ -- f=$(am__strip_dir) \ -- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pkgpyexecLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pkgpyexecdir)/$$f'"; \ -- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pkgpyexecLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pkgpyexecdir)/$$f"; \ -+ list2="$$list2 $$p"; \ - else :; fi; \ -- done -+ done; \ -+ test -z "$$list2" || { \ -+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgpyexecdir)'"; \ -+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgpyexecdir)"; \ -+ } - - uninstall-pkgpyexecLTLIBRARIES: - @$(NORMAL_UNINSTALL) -- @list='$(pkgpyexec_LTLIBRARIES)'; for p in $$list; do \ -- p=$(am__strip_dir) \ -- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgpyexecdir)/$$p'"; \ -- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgpyexecdir)/$$p"; \ -+ @list='$(pkgpyexec_LTLIBRARIES)'; test -n "$(pkgpyexecdir)" || list=; \ -+ for p in $$list; do \ -+ $(am__strip_dir) \ -+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgpyexecdir)/$$f'"; \ -+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgpyexecdir)/$$f"; \ - done - - clean-pkgpyexecLTLIBRARIES: -@@ -379,20 +425,24 @@ - install-pyexecLTLIBRARIES: $(pyexec_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(pyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pyexecdir)" -- @list='$(pyexec_LTLIBRARIES)'; for p in $$list; do \ -+ @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \ -+ list2=; for p in $$list; do \ - if test -f $$p; then \ -- f=$(am__strip_dir) \ -- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pyexecLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pyexecdir)/$$f'"; \ -- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pyexecLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pyexecdir)/$$f"; \ -+ list2="$$list2 $$p"; \ - else :; fi; \ -- done -+ done; \ -+ test -z "$$list2" || { \ -+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pyexecdir)'"; \ -+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pyexecdir)"; \ -+ } - - uninstall-pyexecLTLIBRARIES: - @$(NORMAL_UNINSTALL) -- @list='$(pyexec_LTLIBRARIES)'; for p in $$list; do \ -- p=$(am__strip_dir) \ -- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pyexecdir)/$$p'"; \ -- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pyexecdir)/$$p"; \ -+ @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \ -+ for p in $$list; do \ -+ $(am__strip_dir) \ -+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pyexecdir)/$$f'"; \ -+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pyexecdir)/$$f"; \ - done - - clean-pyexecLTLIBRARIES: -@@ -415,15 +465,20 @@ - install-pkgpyexecPYTHON: $(pkgpyexec_PYTHON) - @$(NORMAL_INSTALL) - test -z "$(pkgpyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgpyexecdir)" -- @list='$(pkgpyexec_PYTHON)'; dlist=''; for p in $$list; do\ -+ @list='$(pkgpyexec_PYTHON)'; dlist=; list2=; test -n "$(pkgpyexecdir)" || list=; \ -+ for p in $$list; do \ - if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ - if test -f $$b$$p; then \ -- f=$(am__strip_dir) \ -+ $(am__strip_dir) \ - dlist="$$dlist $$f"; \ -- echo " $(pkgpyexecPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(pkgpyexecdir)/$$f'"; \ -- $(pkgpyexecPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(pkgpyexecdir)/$$f"; \ -+ list2="$$list2 $$b$$p"; \ - else :; fi; \ - done; \ -+ for file in $$list2; do echo $$file; done | $(am__base_list) | \ -+ while read files; do \ -+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgpyexecdir)'"; \ -+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgpyexecdir)" || exit $$?; \ -+ done || exit $$?; \ - if test -n "$$dlist"; then \ - if test -z "$(DESTDIR)"; then \ - PYTHON=$(PYTHON) $(py_compile) --basedir "$(pkgpyexecdir)" $$dlist; \ -@@ -434,24 +489,34 @@ - - uninstall-pkgpyexecPYTHON: - @$(NORMAL_UNINSTALL) -- @list='$(pkgpyexec_PYTHON)'; dlist=''; for p in $$list; do\ -- f=$(am__strip_dir) \ -- rm -f "$(DESTDIR)$(pkgpyexecdir)/$$f"; \ -- rm -f "$(DESTDIR)$(pkgpyexecdir)/$${f}c"; \ -- rm -f "$(DESTDIR)$(pkgpyexecdir)/$${f}o"; \ -- done -+ @list='$(pkgpyexec_PYTHON)'; test -n "$(pkgpyexecdir)" || list=; \ -+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ -+ test -n "$$files" || exit 0; \ -+ filesc=`echo "$$files" | sed 's|$$|c|'`; \ -+ fileso=`echo "$$files" | sed 's|$$|o|'`; \ -+ echo " ( cd '$(DESTDIR)$(pkgpyexecdir)' && rm -f" $$files ")"; \ -+ cd "$(DESTDIR)$(pkgpyexecdir)" && rm -f $$files || exit $$?; \ -+ echo " ( cd '$(DESTDIR)$(pkgpyexecdir)' && rm -f" $$filesc ")"; \ -+ cd "$(DESTDIR)$(pkgpyexecdir)" && rm -f $$filesc || exit $$?; \ -+ echo " ( cd '$(DESTDIR)$(pkgpyexecdir)' && rm -f" $$fileso ")"; \ -+ cd "$(DESTDIR)$(pkgpyexecdir)" && rm -f $$fileso - install-pyexecPYTHON: $(pyexec_PYTHON) - @$(NORMAL_INSTALL) - test -z "$(pyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pyexecdir)" -- @list='$(pyexec_PYTHON)'; dlist=''; for p in $$list; do\ -+ @list='$(pyexec_PYTHON)'; dlist=; list2=; test -n "$(pyexecdir)" || list=; \ -+ for p in $$list; do \ - if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ - if test -f $$b$$p; then \ -- f=$(am__strip_dir) \ -+ $(am__strip_dir) \ - dlist="$$dlist $$f"; \ -- echo " $(pyexecPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(pyexecdir)/$$f'"; \ -- $(pyexecPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(pyexecdir)/$$f"; \ -+ list2="$$list2 $$b$$p"; \ - else :; fi; \ - done; \ -+ for file in $$list2; do echo $$file; done | $(am__base_list) | \ -+ while read files; do \ -+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pyexecdir)'"; \ -+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pyexecdir)" || exit $$?; \ -+ done || exit $$?; \ - if test -n "$$dlist"; then \ - if test -z "$(DESTDIR)"; then \ - PYTHON=$(PYTHON) $(py_compile) --basedir "$(pyexecdir)" $$dlist; \ -@@ -462,29 +527,37 @@ - - uninstall-pyexecPYTHON: - @$(NORMAL_UNINSTALL) -- @list='$(pyexec_PYTHON)'; dlist=''; for p in $$list; do\ -- f=$(am__strip_dir) \ -- rm -f "$(DESTDIR)$(pyexecdir)/$$f"; \ -- rm -f "$(DESTDIR)$(pyexecdir)/$${f}c"; \ -- rm -f "$(DESTDIR)$(pyexecdir)/$${f}o"; \ -- done -+ @list='$(pyexec_PYTHON)'; test -n "$(pyexecdir)" || list=; \ -+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ -+ test -n "$$files" || exit 0; \ -+ filesc=`echo "$$files" | sed 's|$$|c|'`; \ -+ fileso=`echo "$$files" | sed 's|$$|o|'`; \ -+ echo " ( cd '$(DESTDIR)$(pyexecdir)' && rm -f" $$files ")"; \ -+ cd "$(DESTDIR)$(pyexecdir)" && rm -f $$files || exit $$?; \ -+ echo " ( cd '$(DESTDIR)$(pyexecdir)' && rm -f" $$filesc ")"; \ -+ cd "$(DESTDIR)$(pyexecdir)" && rm -f $$filesc || exit $$?; \ -+ echo " ( cd '$(DESTDIR)$(pyexecdir)' && rm -f" $$fileso ")"; \ -+ cd "$(DESTDIR)$(pyexecdir)" && rm -f $$fileso - install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" -- @list='$(pkgconfig_DATA)'; for p in $$list; do \ -+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ -+ for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ -- f=$(am__strip_dir) \ -- echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ -- $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ -+ echo "$$d$$p"; \ -+ done | $(am__base_list) | \ -+ while read files; do \ -+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ -+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ - done - - uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) -- @list='$(pkgconfig_DATA)'; for p in $$list; do \ -- f=$(am__strip_dir) \ -- echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ -- rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ -- done -+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ -+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ -+ test -n "$$files" || exit 0; \ -+ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ -+ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files - - # This directory's subdirectories are mostly independent; you can cd - # into them and run `make' without going through this Makefile. -@@ -493,7 +566,7 @@ - # (which will cause the Makefiles to be regenerated when you run `make'); - # (2) otherwise, pass the desired values on the `make' command line. - $(RECURSIVE_TARGETS): -- @failcom='exit 1'; \ -+ @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ -@@ -510,7 +583,7 @@ - else \ - local_target="$$target"; \ - fi; \ -- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ -+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ -@@ -518,7 +591,7 @@ - fi; test -z "$$fail" - - $(RECURSIVE_CLEAN_TARGETS): -- @failcom='exit 1'; \ -+ @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ -@@ -544,16 +617,16 @@ - else \ - local_target="$$target"; \ - fi; \ -- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ -+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" - tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ -- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ -+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done - ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ -- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ -+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) -@@ -568,7 +641,7 @@ - - TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) -- tags=; \ -+ set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ -@@ -580,7 +653,7 @@ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ -- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ -+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ -@@ -589,36 +662,41 @@ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ -- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ -+ shift; \ -+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ -- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ -- $$tags $$unique; \ -+ if test $$# -gt 0; then \ -+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ -+ "$$@" $$unique; \ -+ else \ -+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ -+ $$unique; \ -+ fi; \ - fi - ctags: CTAGS - CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) -- tags=; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ -- test -z "$(CTAGS_ARGS)$$tags$$unique" \ -+ test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ -- $$tags $$unique -+ $$unique - - GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ -- && cd $(top_srcdir) \ -- && gtags -i $(GTAGS_ARGS) $$here -+ && $(am__cd) $(top_srcdir) \ -+ && gtags -i $(GTAGS_ARGS) "$$here" - - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - - distdir: $(DISTFILES) - $(am__remove_distdir) -- test -d $(distdir) || mkdir $(distdir) -+ test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ -@@ -634,29 +712,44 @@ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ -+ if test -d "$(distdir)/$$file"; then \ -+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ -+ fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ -- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ -+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ -+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ -- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ -+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ -- test -f $(distdir)/$$file \ -- || cp -p $$d/$$file $(distdir)/$$file \ -+ test -f "$(distdir)/$$file" \ -+ || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ -+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ -- distdir=`$(am__cd) $(distdir) && pwd`; \ -- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ -- (cd $$subdir && \ -+ fi; \ -+ done -+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ -+ if test "$$subdir" = .; then :; else \ -+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ -+ $(am__relativize); \ -+ new_distdir=$$reldir; \ -+ dir1=$$subdir; dir2="$(top_distdir)"; \ -+ $(am__relativize); \ -+ new_top_distdir=$$reldir; \ -+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ -+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ -+ ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ -- top_distdir="$$top_distdir" \ -- distdir="$$distdir/$$subdir" \ -+ top_distdir="$$new_top_distdir" \ -+ distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ -+ am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ -@@ -664,11 +757,13 @@ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ -+ -test -n "$(am__skip_mode_fix)" \ -+ || find "$(distdir)" -type d ! -perm -755 \ -+ -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ -- || chmod -R a+r $(distdir) -+ || chmod -R a+r "$(distdir)" - dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) -@@ -681,6 +776,10 @@ - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) - -+dist-xz: distdir -+ tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz -+ $(am__remove_distdir) -+ - dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) -@@ -704,15 +803,17 @@ - distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ -- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ -+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ -- bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ -+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ -- unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ -+ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ -+ *.tar.xz*) \ -+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ -- GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ -+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac -@@ -720,9 +821,11 @@ - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) -+ test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ -- && cd $(distdir)/_build \ -+ && am__cwd=`pwd` \ -+ && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ -@@ -744,13 +847,15 @@ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ -- && $(MAKE) $(AM_MAKEFLAGS) distcleancheck -+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ -+ && cd "$$am__cwd" \ -+ || exit 1 - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' - distuninstallcheck: -- @cd $(distuninstallcheck_dir) \ -+ @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ -@@ -796,6 +901,7 @@ - - distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - - maintainer-clean-generic: - @echo "This command is intended for maintainers to use" -@@ -817,6 +923,8 @@ - - html: html-recursive - -+html-am: -+ - info: info-recursive - - info-am: -@@ -825,20 +933,30 @@ - - install-dvi: install-dvi-recursive - -+install-dvi-am: -+ - install-exec-am: install-exec-local install-pkgpyexecLTLIBRARIES \ - install-pkgpyexecPYTHON install-pyexecLTLIBRARIES \ - install-pyexecPYTHON - - install-html: install-html-recursive - -+install-html-am: -+ - install-info: install-info-recursive - -+install-info-am: -+ - install-man: - - install-pdf: install-pdf-recursive - -+install-pdf-am: -+ - install-ps: install-ps-recursive - -+install-ps-am: -+ - installcheck-am: - - maintainer-clean: maintainer-clean-recursive -@@ -863,16 +981,16 @@ - uninstall-pkgpyexecLTLIBRARIES uninstall-pkgpyexecPYTHON \ - uninstall-pyexecLTLIBRARIES uninstall-pyexecPYTHON - --.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ -- install-strip -+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ -+ ctags-recursive install-am install-strip tags-recursive - - .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - clean-libtool clean-pkgpyexecLTLIBRARIES \ - clean-pyexecLTLIBRARIES ctags ctags-recursive dist dist-all \ - dist-bzip2 dist-gzip dist-hook dist-lzma dist-shar dist-tarZ \ -- dist-zip distcheck distclean distclean-generic distclean-hdr \ -- distclean-libtool distclean-local distclean-tags \ -+ dist-xz dist-zip distcheck distclean distclean-generic \ -+ distclean-hdr distclean-libtool distclean-local distclean-tags \ - distcleancheck distdir distuninstallcheck dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-data-local install-dvi install-dvi-am \ -@@ -959,6 +1077,7 @@ - for f in $$files; do \ - if test -f $$f; then d=.; else d=$(srcdir); fi; \ - rm -f $(distdir)/$$f && cp $$d/$$f $(distdir) || exit 1; done -+ - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. - .NOEXPORT: -diff -Naur pygobject-2.21.1/tests/Makefile.in pygobject-2.21.1.patch/tests/Makefile.in ---- pygobject-2.21.1/tests/Makefile.in 2009-12-26 22:08:34.000000000 +0100 -+++ pygobject-2.21.1.patch/tests/Makefile.in 2010-04-26 16:25:27.851863698 +0200 -@@ -1,8 +1,9 @@ --# Makefile.in generated by automake 1.10.2 from Makefile.am. -+# Makefile.in generated by automake 1.11.1 from Makefile.am. - # @configure_input@ - - # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, --# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -+# Inc. - # This Makefile.in is free software; the Free Software Foundation - # gives unlimited permission to copy and/or distribute it, - # with or without modifications, as long as this notice is preserved. -@@ -16,8 +17,9 @@ - - VPATH = @srcdir@ - pkgdatadir = $(datadir)/@PACKAGE@ --pkglibdir = $(libdir)/@PACKAGE@ - pkgincludedir = $(includedir)/@PACKAGE@ -+pkglibdir = $(libdir)/@PACKAGE@ -+pkglibexecdir = $(libexecdir)/@PACKAGE@ - am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd - install_sh_DATA = $(install_sh) -c -m 644 - install_sh_PROGRAM = $(install_sh) -c -@@ -45,6 +47,7 @@ - mkinstalldirs = $(install_sh) -d - CONFIG_HEADER = $(top_builddir)/config.h - CONFIG_CLEAN_FILES = -+CONFIG_CLEAN_VPATH_FILES = - LTLIBRARIES = $(noinst_LTLIBRARIES) - am__DEPENDENCIES_1 = - testhelper_la_DEPENDENCIES = $(am__DEPENDENCIES_1) -@@ -57,6 +60,7 @@ - DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) - depcomp = $(SHELL) $(top_srcdir)/depcomp - am__depfiles_maybe = depfiles -+am__mv = mv -f - COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ -@@ -268,9 +272,9 @@ - exit 1;; \ - esac; \ - done; \ -- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ -- cd $(top_srcdir) && \ -- $(AUTOMAKE) --gnu tests/Makefile -+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ -+ $(am__cd) $(top_srcdir) && \ -+ $(AUTOMAKE) --gnu tests/Makefile - .PRECIOUS: Makefile - Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ -@@ -288,6 +292,7 @@ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - $(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -+$(am__aclocal_m4_deps): - - clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) -@@ -310,21 +315,21 @@ - - .c.o: - @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< --@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(COMPILE) -c $< - - .c.obj: - @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` --@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - - .c.lo: - @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< --@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo - @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< -@@ -347,7 +352,7 @@ - - TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) -- tags=; \ -+ set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ -@@ -355,29 +360,34 @@ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ -- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ -+ shift; \ -+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ -- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ -- $$tags $$unique; \ -+ if test $$# -gt 0; then \ -+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ -+ "$$@" $$unique; \ -+ else \ -+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ -+ $$unique; \ -+ fi; \ - fi - ctags: CTAGS - CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) -- tags=; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ -- test -z "$(CTAGS_ARGS)$$tags$$unique" \ -+ test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ -- $$tags $$unique -+ $$unique - - GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ -- && cd $(top_srcdir) \ -- && gtags -i $(GTAGS_ARGS) $$here -+ && $(am__cd) $(top_srcdir) \ -+ && gtags -i $(GTAGS_ARGS) "$$here" - - distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -@@ -398,13 +408,17 @@ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ -+ if test -d "$(distdir)/$$file"; then \ -+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ -+ fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ -- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ -+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ -+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ -- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ -+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ -- test -f $(distdir)/$$file \ -- || cp -p $$d/$$file $(distdir)/$$file \ -+ test -f "$(distdir)/$$file" \ -+ || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -@@ -433,6 +447,7 @@ - - distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - - maintainer-clean-generic: - @echo "This command is intended for maintainers to use" -@@ -454,6 +469,8 @@ - - html: html-am - -+html-am: -+ - info: info-am - - info-am: -@@ -462,18 +479,28 @@ - - install-dvi: install-dvi-am - -+install-dvi-am: -+ - install-exec-am: - - install-html: install-html-am - -+install-html-am: -+ - install-info: install-info-am - -+install-info-am: -+ - install-man: - - install-pdf: install-pdf-am - -+install-pdf-am: -+ - install-ps: install-ps-am - -+install-ps-am: -+ - installcheck-am: - - maintainer-clean: maintainer-clean-am -@@ -496,7 +523,7 @@ - - uninstall-am: - --.MAKE: install-am install-strip -+.MAKE: check-am install-am install-strip - - .PHONY: CTAGS GTAGS all all-am check check-am check-local clean \ - clean-generic clean-libtool clean-local \ -@@ -538,6 +565,7 @@ - rm -f $(LTLIBRARIES:.la=.so) - .la.so: - $(LN_S) .libs/$@ $@ || true -+ - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. - .NOEXPORT: diff --git a/packages/python/devel/pygobject/url b/packages/python/devel/pygobject/url deleted file mode 100644 index 5162f0b10c..0000000000 --- a/packages/python/devel/pygobject/url +++ /dev/null @@ -1 +0,0 @@ -http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.21/pygobject-2.21.1.tar.bz2 \ No newline at end of file diff --git a/packages/python/security/pyOpenSSL/build b/packages/python/security/pyOpenSSL/build index de5b62cfb5..ad41cf4261 100755 --- a/packages/python/security/pyOpenSSL/build +++ b/packages/python/security/pyOpenSSL/build @@ -2,11 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build Python -$SCRIPTS/build distutilscross -$SCRIPTS/build openssl - export PYTHONXCPREFIX="$SYSROOT_PREFIX/usr" export LDFLAGS="$LDFLAGS -L$SYSROOT_PREFIX/usr/lib -L$SYSROOT_PREFIX/lib" diff --git a/packages/python/security/pyOpenSSL/install b/packages/python/security/pyOpenSSL/install index 34d4bd411e..73886a0890 100755 --- a/packages/python/security/pyOpenSSL/install +++ b/packages/python/security/pyOpenSSL/install @@ -2,7 +2,4 @@ . config/options $1 -$SCRIPTS/install Python -$SCRIPTS/install openssl - cp -PR $PKG_BUILD/.install/* $INSTALL diff --git a/packages/python/security/pyOpenSSL/meta b/packages/python/security/pyOpenSSL/meta new file mode 100644 index 0000000000..90a71b33ae --- /dev/null +++ b/packages/python/security/pyOpenSSL/meta @@ -0,0 +1,16 @@ +PKG_NAME="pyOpenSSL" +PKG_VERSION="0.11" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="LGPL" +PKG_SITE="https://launchpad.net/pyopenssl" +PKG_URL="http://launchpad.net/pyopenssl/main/$PKG_VERSION/+download/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="Python distutilscross openssl" +PKG_BUILD_DEPENDS="toolchain Python distutilscross openssl" +PKG_PRIORITY="optional" +PKG_SECTION="python/security" +PKG_SHORTDESC="pyOpenSSL: Python interface to the OpenSSL library" +PKG_LONGDESC="Python interface to the OpenSSL library. Includes: SSL Context objects, SSL Connection objects, using Python sockets as transport layer. The Connection object wraps all the socket methods and can therefore be used interchangeably." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/python/security/pyOpenSSL/patches/pyOpenSSL-setuptools.diff b/packages/python/security/pyOpenSSL/patches/pyOpenSSL-0.11-setuptools.patch similarity index 100% rename from packages/python/security/pyOpenSSL/patches/pyOpenSSL-setuptools.diff rename to packages/python/security/pyOpenSSL/patches/pyOpenSSL-0.11-setuptools.patch diff --git a/packages/python/security/pyOpenSSL/url b/packages/python/security/pyOpenSSL/url deleted file mode 100644 index fa131a2078..0000000000 --- a/packages/python/security/pyOpenSSL/url +++ /dev/null @@ -1 +0,0 @@ -http://pypi.python.org/packages/source/p/pyOpenSSL/pyOpenSSL-0.10.tar.gz diff --git a/packages/python/system/PyBluez/build b/packages/python/system/PyBluez/build index 878ba9a4cc..42f2c0e873 100755 --- a/packages/python/system/PyBluez/build +++ b/packages/python/system/PyBluez/build @@ -2,12 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build Python -$SCRIPTS/build distutilscross -$SCRIPTS/build distribute -$SCRIPTS/build bluez - export PYTHONXCPREFIX="$SYSROOT_PREFIX/usr" export LDFLAGS="$LDFLAGS -L$SYSROOT_PREFIX/usr/lib -L$SYSROOT_PREFIX/lib" diff --git a/packages/python/system/PyBluez/install b/packages/python/system/PyBluez/install index eea8ed6655..73886a0890 100755 --- a/packages/python/system/PyBluez/install +++ b/packages/python/system/PyBluez/install @@ -2,8 +2,4 @@ . config/options $1 -$SCRIPTS/install Python -$SCRIPTS/install distribute -$SCRIPTS/install bluez - cp -PR $PKG_BUILD/.install/* $INSTALL diff --git a/packages/python/system/PyBluez/meta b/packages/python/system/PyBluez/meta new file mode 100644 index 0000000000..44cd91b5d1 --- /dev/null +++ b/packages/python/system/PyBluez/meta @@ -0,0 +1,16 @@ +PKG_NAME="PyBluez" +PKG_VERSION="0.18" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://code.google.com/p/pybluez/" +PKG_URL="http://pybluez.googlecode.com/files/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="Python distribute bluez" +PKG_BUILD_DEPENDS="toolchain Python distutilscross distribute bluez" +PKG_PRIORITY="optional" +PKG_SECTION="python/system" +PKG_SHORTDESC="PyBluez: an effort to create python wrappers around system Bluetooth resources" +PKG_LONGDESC="PyBluez is an effort to create python wrappers around system Bluetooth resources to allow Python developers to easily and quickly create Bluetooth applications." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/python/system/PyBluez/patches/PyBluez-setuptools.diff b/packages/python/system/PyBluez/patches/PyBluez-0.18-setuptools.patch similarity index 100% rename from packages/python/system/PyBluez/patches/PyBluez-setuptools.diff rename to packages/python/system/PyBluez/patches/PyBluez-0.18-setuptools.patch diff --git a/packages/python/system/PyBluez/url b/packages/python/system/PyBluez/url deleted file mode 100644 index e3bf882c8b..0000000000 --- a/packages/python/system/PyBluez/url +++ /dev/null @@ -1 +0,0 @@ -http://pybluez.googlecode.com/files/PyBluez-0.18.tar.gz \ No newline at end of file diff --git a/packages/python/system/dbus-python/build b/packages/python/system/dbus-python/build index 9f3eb8478d..8cd121f3a2 100755 --- a/packages/python/system/dbus-python/build +++ b/packages/python/system/dbus-python/build @@ -2,15 +2,9 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build Python -$SCRIPTS/build dbus -$SCRIPTS/build dbus-glib - PYTHON_LIBDIR="`ls -d $SYSROOT_PREFIX/usr/lib/python*`" cd $PKG_BUILD - ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ diff --git a/packages/python/system/dbus-python/install b/packages/python/system/dbus-python/install index 852c35b961..b16e823dcd 100755 --- a/packages/python/system/dbus-python/install +++ b/packages/python/system/dbus-python/install @@ -2,19 +2,15 @@ . config/options $1 -$SCRIPTS/install Python -$SCRIPTS/install dbus -$SCRIPTS/install dbus-glib - PYTHON_LIB_DIR=`ls -d $INSTALL/usr/lib/python*` mkdir -p $PYTHON_LIB_DIR/site-packages - cp -PR $PKG_BUILD/_dbus_bindings/.libs/*.so $PYTHON_LIB_DIR/site-packages - cp -PR $PKG_BUILD/_dbus_glib_bindings/.libs/*.so $PYTHON_LIB_DIR/site-packages - cp -PR $PKG_BUILD/*.pyc $PYTHON_LIB_DIR/site-packages + cp -P $PKG_BUILD/_dbus_bindings/.libs/*.so $PYTHON_LIB_DIR/site-packages + cp -P $PKG_BUILD/_dbus_glib_bindings/.libs/*.so $PYTHON_LIB_DIR/site-packages + cp $PKG_BUILD/*.pyc $PYTHON_LIB_DIR/site-packages mkdir -p $PYTHON_LIB_DIR/site-packages/dbus - cp -PR $PKG_BUILD/dbus/*.pyc $PYTHON_LIB_DIR/site-packages/dbus + cp $PKG_BUILD/dbus/*.pyc $PYTHON_LIB_DIR/site-packages/dbus mkdir -p $PYTHON_LIB_DIR/site-packages/dbus/mainloop - cp -PR $PKG_BUILD/dbus/mainloop/*.pyc $PYTHON_LIB_DIR/site-packages/dbus/mainloop + cp $PKG_BUILD/dbus/mainloop/*.pyc $PYTHON_LIB_DIR/site-packages/dbus/mainloop diff --git a/packages/python/system/dbus-python/meta b/packages/python/system/dbus-python/meta new file mode 100644 index 0000000000..feee211aee --- /dev/null +++ b/packages/python/system/dbus-python/meta @@ -0,0 +1,16 @@ +PKG_NAME="dbus-python" +PKG_VERSION="0.83.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://freedesktop.org/wiki/Software/dbus" +PKG_URL="http://dbus.freedesktop.org/releases/dbus-python/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="Python dbus dbus-glib" +PKG_BUILD_DEPENDS="toolchain Python dbus dbus-glib" +PKG_PRIORITY="optional" +PKG_SECTION="python/system" +PKG_SHORTDESC="dbus-python: A message bus system" +PKG_LONGDESC="D-BUS is a message bus, used for sending messages between applications. Conceptually, it fits somewhere in between raw sockets and CORBA in terms of complexity. D-BUS supports broadcast messages, asynchronous messages (thus decreasing latency), authentication, and more. It is designed to be low-overhead; messages are sent using a binary protocol, not using XML. D-BUS also supports a method call mapping for its messages, but it is not required; this makes using the system quite simple." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/python/system/dbus-python/url b/packages/python/system/dbus-python/url deleted file mode 100644 index 50df5d53f6..0000000000 --- a/packages/python/system/dbus-python/url +++ /dev/null @@ -1 +0,0 @@ -http://dbus.freedesktop.org/releases/dbus-python/dbus-python-0.83.1.tar.gz \ No newline at end of file diff --git a/packages/python/system/yenc/build b/packages/python/system/yenc/build index 76397f3922..ad41cf4261 100755 --- a/packages/python/system/yenc/build +++ b/packages/python/system/yenc/build @@ -2,11 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build Python -$SCRIPTS/build distribute -$SCRIPTS/build distutilscross - export PYTHONXCPREFIX="$SYSROOT_PREFIX/usr" export LDFLAGS="$LDFLAGS -L$SYSROOT_PREFIX/usr/lib -L$SYSROOT_PREFIX/lib" diff --git a/packages/python/system/yenc/install b/packages/python/system/yenc/install index 4d0a7235de..73886a0890 100755 --- a/packages/python/system/yenc/install +++ b/packages/python/system/yenc/install @@ -2,7 +2,4 @@ . config/options $1 -$SCRIPTS/install Python -$SCRIPTS/install distribute - cp -PR $PKG_BUILD/.install/* $INSTALL diff --git a/packages/python/system/yenc/meta b/packages/python/system/yenc/meta new file mode 100644 index 0000000000..e61e40b6b4 --- /dev/null +++ b/packages/python/system/yenc/meta @@ -0,0 +1,16 @@ +PKG_NAME="yenc" +PKG_VERSION="0.3" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.golug.it/yenc.html" +PKG_URL="http://www.golug.it/pub/yenc/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="Python distribute" +PKG_BUILD_DEPENDS="toolchain Python distribute distutilscross" +PKG_PRIORITY="optional" +PKG_SECTION="python/system" +PKG_SHORTDESC="yenc: a fairly simple module, it provide only raw yEnc encoding/decoding with builitin crc32 calculation." +PKG_LONGDESC="This a fairly simple module, it provide only raw yEnc encoding/decoding with builitin crc32 calculation. Header parsing, checkings and yenc formatting are left to you (see examples directory for possible implementations). The interface is similar to the uu module from python standard library." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/python/system/yenc/patches/yenc-setuptools.diff b/packages/python/system/yenc/patches/yenc-0.3-setuptools.patch similarity index 100% rename from packages/python/system/yenc/patches/yenc-setuptools.diff rename to packages/python/system/yenc/patches/yenc-0.3-setuptools.patch diff --git a/packages/python/system/yenc/url b/packages/python/system/yenc/url deleted file mode 100644 index 40e4af7695..0000000000 --- a/packages/python/system/yenc/url +++ /dev/null @@ -1 +0,0 @@ -http://www.golug.it/pub/yenc/yenc-0.3.tar.gz diff --git a/packages/python/web/TwistedCore/meta b/packages/python/web/TwistedCore/meta index 28d692d1da..0587355460 100644 --- a/packages/python/web/TwistedCore/meta +++ b/packages/python/web/TwistedCore/meta @@ -12,3 +12,5 @@ PKG_SECTION="python/web" PKG_SHORTDESC="TwistedCore: An event-based networking framework for Internet applications" PKG_LONGDESC="Twisted is an event-based framework for Internet applications. It includes a Web server, an SMTP/POP3 server, a telnet server, an SSH server, an IRC server, a DNS server, a generic client/server pair for remote object access (Perspective Broker), and APIs for creating new protocols. It supports integration with GTK+, GTK+ 2, Qt, Tkinter, wxPython, Mac OS X (PyObjC) and Win32 event loops. It also supports TCP, SSL and TLS, UDP, Unix sockets, multicast, and serial ports. Supported protocols include HTTP, FTP, SMTP, POP3, IMAP, TOC, OSCAR (AIM and ICQ), SSH, DNS, IRC, NNTP, Jabber, SOCKSv4, Telnet, SIP (for VoIP), and XML-RPC and SOAP using external packages. Most protocols are supported as both servers and clients." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/python/web/TwistedCore/patches/TwistedCore-setuptools.diff b/packages/python/web/TwistedCore/patches/TwistedCore-10.1.0-setuptools.patch similarity index 100% rename from packages/python/web/TwistedCore/patches/TwistedCore-setuptools.diff rename to packages/python/web/TwistedCore/patches/TwistedCore-10.1.0-setuptools.patch diff --git a/packages/python/web/TwistedNames/meta b/packages/python/web/TwistedNames/meta index e8903887f9..f7c5d6b889 100644 --- a/packages/python/web/TwistedNames/meta +++ b/packages/python/web/TwistedNames/meta @@ -12,3 +12,5 @@ PKG_SECTION="python/web" PKG_SHORTDESC="TwistedNames: Name resolution part of Twisted framework" PKG_LONGDESC="Twisted is an event-based framework for Internet applications. It includes a Web server, an SMTP/POP3 server, a telnet server, an SSH server, an IRC server, a DNS server, a generic client/server pair for remote object access (Perspective Broker), and APIs for creating new protocols. It supports integration with GTK+, GTK+ 2, Qt, Tkinter, wxPython, Mac OS X (PyObjC) and Win32 event loops. It also supports TCP, SSL and TLS, UDP, Unix sockets, multicast, and serial ports. Supported protocols include HTTP, FTP, SMTP, POP3, IMAP, TOC, OSCAR (AIM and ICQ), SSH, DNS, IRC, NNTP, Jabber, SOCKSv4, Telnet, SIP (for VoIP), and XML-RPC and SOAP using external packages. Most protocols are supported as both servers and clients." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/python/web/TwistedWeb/meta b/packages/python/web/TwistedWeb/meta index 431b270863..a3dce97c17 100644 --- a/packages/python/web/TwistedWeb/meta +++ b/packages/python/web/TwistedWeb/meta @@ -12,3 +12,5 @@ PKG_SECTION="python/web" PKG_SHORTDESC="TwistedWeb: An event-based networking framework for Internet applications" PKG_LONGDESC="Twisted is an event-based framework for Internet applications. It includes a Web server, an SMTP/POP3 server, a telnet server, an SSH server, an IRC server, a DNS server, a generic client/server pair for remote object access (Perspective Broker), and APIs for creating new protocols. It supports integration with GTK+, GTK+ 2, Qt, Tkinter, wxPython, Mac OS X (PyObjC) and Win32 event loops. It also supports TCP, SSL and TLS, UDP, Unix sockets, multicast, and serial ports. Supported protocols include HTTP, FTP, SMTP, POP3, IMAP, TOC, OSCAR (AIM and ICQ), SSH, DNS, IRC, NNTP, Jabber, SOCKSv4, Telnet, SIP (for VoIP), and XML-RPC and SOAP using external packages. Most protocols are supported as both servers and clients." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/python/web/TwistedWords/meta b/packages/python/web/TwistedWords/meta index 5303fb332b..db0fa17dd1 100644 --- a/packages/python/web/TwistedWords/meta +++ b/packages/python/web/TwistedWords/meta @@ -12,3 +12,5 @@ PKG_SECTION="python/web" PKG_SHORTDESC="TwistedWords: An event-based networking framework for Internet applications" PKG_LONGDESC="Twisted is an event-based framework for Internet applications. It includes a Web server, an SMTP/POP3 server, a telnet server, an SSH server, an IRC server, a DNS server, a generic client/server pair for remote object access (Perspective Broker), and APIs for creating new protocols. It supports integration with GTK+, GTK+ 2, Qt, Tkinter, wxPython, Mac OS X (PyObjC) and Win32 event loops. It also supports TCP, SSL and TLS, UDP, Unix sockets, multicast, and serial ports. Supported protocols include HTTP, FTP, SMTP, POP3, IMAP, TOC, OSCAR (AIM and ICQ), SSH, DNS, IRC, NNTP, Jabber, SOCKSv4, Telnet, SIP (for VoIP), and XML-RPC and SOAP using external packages. Most protocols are supported as both servers and clients." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/python/web/feedparser/build b/packages/python/web/feedparser/build index 833810c468..42f2c0e873 100755 --- a/packages/python/web/feedparser/build +++ b/packages/python/web/feedparser/build @@ -2,11 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build Python -$SCRIPTS/build distribute -$SCRIPTS/build distutilscross - export PYTHONXCPREFIX="$SYSROOT_PREFIX/usr" export LDFLAGS="$LDFLAGS -L$SYSROOT_PREFIX/usr/lib -L$SYSROOT_PREFIX/lib" diff --git a/packages/python/web/feedparser/install b/packages/python/web/feedparser/install index 4d0a7235de..73886a0890 100755 --- a/packages/python/web/feedparser/install +++ b/packages/python/web/feedparser/install @@ -2,7 +2,4 @@ . config/options $1 -$SCRIPTS/install Python -$SCRIPTS/install distribute - cp -PR $PKG_BUILD/.install/* $INSTALL diff --git a/packages/python/web/feedparser/meta b/packages/python/web/feedparser/meta new file mode 100644 index 0000000000..efc9e01acf --- /dev/null +++ b/packages/python/web/feedparser/meta @@ -0,0 +1,16 @@ +PKG_NAME="feedparser" +PKG_VERSION="4.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="MIT" +PKG_SITE="http://www.feedparser.org/" +PKG_URL="http://poc.ginf.hu/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="Python distribute" +PKG_BUILD_DEPENDS="toolchain Python distribute distutilscross" +PKG_PRIORITY="optional" +PKG_SECTION="python/web" +PKG_SHORTDESC="feedparser: Parse RSS and Atom feeds in Python." +PKG_LONGDESC="Parse RSS and Atom feeds in Python." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/python/web/feedparser/patches/feedparser-setuptools.diff b/packages/python/web/feedparser/patches/feedparser-4.1-setuptools.patch similarity index 100% rename from packages/python/web/feedparser/patches/feedparser-setuptools.diff rename to packages/python/web/feedparser/patches/feedparser-4.1-setuptools.patch diff --git a/packages/python/web/feedparser/url b/packages/python/web/feedparser/url deleted file mode 100644 index 7242138af9..0000000000 --- a/packages/python/web/feedparser/url +++ /dev/null @@ -1 +0,0 @@ -http://poc.ginf.hu/feedparser-4.1.tar.bz2 diff --git a/packages/python/web/wokkel/meta b/packages/python/web/wokkel/meta index 591b22ead5..8e841e3186 100644 --- a/packages/python/web/wokkel/meta +++ b/packages/python/web/wokkel/meta @@ -12,3 +12,5 @@ PKG_SECTION="python/web" PKG_SHORTDESC="wokkel: Wokkel is a Python module for experimenting with future enhancements to TwistedWords" PKG_LONGDESC="Wokkel is collection of enhancements on top of the Twisted networking framework, written in Python. It mostly provides a testing ground for enhancements to the Jabber/XMPP protocol implementation as found in Twisted Words, that are meant to eventually move there." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/python/web/zope.interface/meta b/packages/python/web/zope.interface/meta index bb4737c22a..613c2a4912 100644 --- a/packages/python/web/zope.interface/meta +++ b/packages/python/web/zope.interface/meta @@ -12,3 +12,5 @@ PKG_SECTION="python/web" PKG_SHORTDESC="zopeinterface: zope.interface package from Zope 3" PKG_LONGDESC="This is a separate distribution of the zope.interface package used in Zope 3, along with the packages it depends on." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/sdk/games-sdk/install b/packages/sdk/games-sdk/install index 2c40deae7f..8d17d6d98e 100755 --- a/packages/sdk/games-sdk/install +++ b/packages/sdk/games-sdk/install @@ -19,4 +19,4 @@ $SCRIPTS/install openal-soft $SCRIPTS/install libX11 $SCRIPTS/install pango $SCRIPTS/install fontconfig -$SCRIPTS/install $MESA +$SCRIPTS/install Mesa diff --git a/packages/security/openssl/build b/packages/security/openssl/build index 7dab710388..ad2caf3adc 100755 --- a/packages/security/openssl/build +++ b/packages/security/openssl/build @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build zlib - export MAKEFLAGS=-j1 case $TARGET_ARCH in diff --git a/packages/security/openssl/install b/packages/security/openssl/install index 5777d11969..106899b2c5 100755 --- a/packages/security/openssl/install +++ b/packages/security/openssl/install @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/install zlib - mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/libcrypto.so* $INSTALL/usr/lib cp -P $PKG_BUILD/libssl.so* $INSTALL/usr/lib diff --git a/packages/security/openssl/meta b/packages/security/openssl/meta new file mode 100644 index 0000000000..7c233368ec --- /dev/null +++ b/packages/security/openssl/meta @@ -0,0 +1,16 @@ +PKG_NAME="openssl" +PKG_VERSION="1.0.0b" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.openssl.org/" +PKG_URL="http://www.openssl.org/source/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="zlib" +PKG_BUILD_DEPENDS="toolchain zlib" +PKG_PRIORITY="optional" +PKG_SECTION="security" +PKG_SHORTDESC="openssl: Open Source toolkit for Secure Sockets Layer and Transport Layer Security" +PKG_LONGDESC="The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, fully featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a full-strength general purpose cryptography library. The project is managed by a worldwide community of volunteers that use the Internet to communicate, plan, and develop the OpenSSL toolkit and its related documentation." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/security/openssl/url b/packages/security/openssl/url deleted file mode 100644 index 91fdd6d0bc..0000000000 --- a/packages/security/openssl/url +++ /dev/null @@ -1 +0,0 @@ -http://www.openssl.org/source/openssl-1.0.0a.tar.gz \ No newline at end of file diff --git a/packages/security/polkit/install b/packages/security/polkit/install index 0ed199aeaa..cdb9bf9e22 100755 --- a/packages/security/polkit/install +++ b/packages/security/polkit/install @@ -2,13 +2,6 @@ . config/options $1 -$SCRIPTS/install zlib -$SCRIPTS/install sg3_utils -$SCRIPTS/install glib -$SCRIPTS/install udev -$SCRIPTS/install eggdbus -$SCRIPTS/install expat - mkdir -p $INSTALL/etc/dbus-1/system.d cp -P $PKG_BUILD/data/org.freedesktop.PolicyKit1.conf $INSTALL/etc/dbus-1/system.d diff --git a/packages/security/polkit/meta b/packages/security/polkit/meta new file mode 100644 index 0000000000..926149f581 --- /dev/null +++ b/packages/security/polkit/meta @@ -0,0 +1,16 @@ +PKG_NAME="polkit" +PKG_VERSION="0.99" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="MIT" +PKG_SITE="http://gitweb.freedesktop.org/?p=PolicyKit.git;a=summary" +PKG_URL="http://hal.freedesktop.org/releases/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="zlib sg3_utils glib udev eggdbus expat" +PKG_BUILD_DEPENDS="toolchain zlib sg3_utils glib udev eggdbus expat" +PKG_PRIORITY="optional" +PKG_SECTION="security" +PKG_SHORTDESC="polkit: Authorization Toolkit" +PKG_LONGDESC="PolicyKit is a toolkit for defining and handling authorizations. It is used for allowing unprivileged processes to speak to privileged processes." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/security/polkit/patches/polkit-1-shadow.diff b/packages/security/polkit/patches/polkit-1-shadow.diff deleted file mode 100644 index 2b12441e0c..0000000000 --- a/packages/security/polkit/patches/polkit-1-shadow.diff +++ /dev/null @@ -1,1967 +0,0 @@ -diff -Naur polkit-0.96/src/polkitagent/Makefile.am polkit-0.96.patch/src/polkitagent/Makefile.am ---- polkit-0.96/src/polkitagent/Makefile.am 2009-09-13 19:31:29.000000000 +0200 -+++ polkit-0.96.patch/src/polkitagent/Makefile.am 2010-09-28 23:57:21.559875461 +0200 -@@ -68,8 +68,15 @@ - libexec_PROGRAMS = polkit-agent-helper-1 - - polkit_agent_helper_1_SOURCES = \ -- polkitagenthelper.c \ -- $(NULL) -+ polkitagenthelperprivate.c polkitagenthelperprivate.h -+ -+if POLKIT_AUTHFW_PAM -+polkit_agent_helper_1_SOURCES += polkitagenthelper-pam.c -+endif -+if POLKIT_AUTHFW_SHADOW -+polkit_agent_helper_1_SOURCES += polkitagenthelper-shadow.c -+endif -+polkit_agent_helper_1_SOURCES += $(NULL) - - polkit_agent_helper_1_CFLAGS = \ - -D_POLKIT_COMPILATION \ -diff -Naur polkit-0.96/src/polkitagent/Makefile.in polkit-0.96.patch/src/polkitagent/Makefile.in ---- polkit-0.96/src/polkitagent/Makefile.in 2010-01-15 19:53:03.000000000 +0100 -+++ polkit-0.96.patch/src/polkitagent/Makefile.in 2010-09-28 23:57:34.190000422 +0200 -@@ -37,6 +37,8 @@ - build_triplet = @build@ - host_triplet = @host@ - libexec_PROGRAMS = polkit-agent-helper-1$(EXEEXT) -+@POLKIT_AUTHFW_PAM_TRUE@am__append_1 = polkitagenthelper-pam.c -+@POLKIT_AUTHFW_SHADOW_TRUE@am__append_2 = polkitagenthelper-shadow.c - subdir = src/polkitagent - DIST_COMMON = $(libpolkit_agent_1include_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in -@@ -93,9 +95,14 @@ - $(libpolkit_agent_1_la_CFLAGS) $(CFLAGS) \ - $(libpolkit_agent_1_la_LDFLAGS) $(LDFLAGS) -o $@ - PROGRAMS = $(libexec_PROGRAMS) -+am__polkit_agent_helper_1_SOURCES_DIST = polkitagenthelperprivate.c \ -+ polkitagenthelperprivate.h polkitagenthelper-pam.c \ -+ polkitagenthelper-shadow.c -+@POLKIT_AUTHFW_PAM_TRUE@am__objects_4 = polkit_agent_helper_1-polkitagenthelper-pam.$(OBJEXT) -+@POLKIT_AUTHFW_SHADOW_TRUE@am__objects_5 = polkit_agent_helper_1-polkitagenthelper-shadow.$(OBJEXT) - am_polkit_agent_helper_1_OBJECTS = \ -- polkit_agent_helper_1-polkitagenthelper.$(OBJEXT) \ -- $(am__objects_1) -+ polkit_agent_helper_1-polkitagenthelperprivate.$(OBJEXT) \ -+ $(am__objects_4) $(am__objects_5) $(am__objects_1) - polkit_agent_helper_1_OBJECTS = $(am_polkit_agent_helper_1_OBJECTS) - polkit_agent_helper_1_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(top_builddir)/src/polkit/libpolkit-gobject-1.la \ -@@ -133,7 +140,7 @@ - SOURCES = $(libpolkit_agent_1_la_SOURCES) \ - $(polkit_agent_helper_1_SOURCES) - DIST_SOURCES = $(libpolkit_agent_1_la_SOURCES) \ -- $(polkit_agent_helper_1_SOURCES) -+ $(am__polkit_agent_helper_1_SOURCES_DIST) - HEADERS = $(libpolkit_agent_1include_HEADERS) - ETAGS = etags - CTAGS = ctags -@@ -361,10 +368,9 @@ - $(NULL) - - libpolkit_agent_1_la_LDFLAGS = -export-symbols-regex '(^polkit_.*)' --polkit_agent_helper_1_SOURCES = \ -- polkitagenthelper.c \ -+polkit_agent_helper_1_SOURCES = polkitagenthelperprivate.c \ -+ polkitagenthelperprivate.h $(am__append_1) $(am__append_2) \ - $(NULL) -- - polkit_agent_helper_1_CFLAGS = \ - -D_POLKIT_COMPILATION \ - $(GLIB_CFLAGS) \ -@@ -500,7 +506,9 @@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpolkit_agent_1_la-polkitagentlistener.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpolkit_agent_1_la-polkitagentmarshal.Plo@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpolkit_agent_1_la-polkitagentsession.Plo@am__quote@ --@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polkit_agent_helper_1-polkitagenthelper.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polkit_agent_helper_1-polkitagenthelper-pam.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polkit_agent_helper_1-polkitagenthelper-shadow.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polkit_agent_helper_1-polkitagenthelperprivate.Po@am__quote@ - - .c.o: - @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@@ -550,21 +558,53 @@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpolkit_agent_1_la_CFLAGS) $(CFLAGS) -c -o libpolkit_agent_1_la-polkitagentlistener.lo `test -f 'polkitagentlistener.c' || echo '$(srcdir)/'`polkitagentlistener.c - --polkit_agent_helper_1-polkitagenthelper.o: polkitagenthelper.c --@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(polkit_agent_helper_1_CFLAGS) $(CFLAGS) -MT polkit_agent_helper_1-polkitagenthelper.o -MD -MP -MF $(DEPDIR)/polkit_agent_helper_1-polkitagenthelper.Tpo -c -o polkit_agent_helper_1-polkitagenthelper.o `test -f 'polkitagenthelper.c' || echo '$(srcdir)/'`polkitagenthelper.c --@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/polkit_agent_helper_1-polkitagenthelper.Tpo $(DEPDIR)/polkit_agent_helper_1-polkitagenthelper.Po -+polkit_agent_helper_1-polkitagenthelperprivate.o: polkitagenthelperprivate.c -+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(polkit_agent_helper_1_CFLAGS) $(CFLAGS) -MT polkit_agent_helper_1-polkitagenthelperprivate.o -MD -MP -MF $(DEPDIR)/polkit_agent_helper_1-polkitagenthelperprivate.Tpo -c -o polkit_agent_helper_1-polkitagenthelperprivate.o `test -f 'polkitagenthelperprivate.c' || echo '$(srcdir)/'`polkitagenthelperprivate.c -+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/polkit_agent_helper_1-polkitagenthelperprivate.Tpo $(DEPDIR)/polkit_agent_helper_1-polkitagenthelperprivate.Po -+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polkitagenthelperprivate.c' object='polkit_agent_helper_1-polkitagenthelperprivate.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(polkit_agent_helper_1_CFLAGS) $(CFLAGS) -c -o polkit_agent_helper_1-polkitagenthelperprivate.o `test -f 'polkitagenthelperprivate.c' || echo '$(srcdir)/'`polkitagenthelperprivate.c -+ -+polkit_agent_helper_1-polkitagenthelperprivate.obj: polkitagenthelperprivate.c -+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(polkit_agent_helper_1_CFLAGS) $(CFLAGS) -MT polkit_agent_helper_1-polkitagenthelperprivate.obj -MD -MP -MF $(DEPDIR)/polkit_agent_helper_1-polkitagenthelperprivate.Tpo -c -o polkit_agent_helper_1-polkitagenthelperprivate.obj `if test -f 'polkitagenthelperprivate.c'; then $(CYGPATH_W) 'polkitagenthelperprivate.c'; else $(CYGPATH_W) '$(srcdir)/polkitagenthelperprivate.c'; fi` -+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/polkit_agent_helper_1-polkitagenthelperprivate.Tpo $(DEPDIR)/polkit_agent_helper_1-polkitagenthelperprivate.Po -+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polkitagenthelperprivate.c' object='polkit_agent_helper_1-polkitagenthelperprivate.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(polkit_agent_helper_1_CFLAGS) $(CFLAGS) -c -o polkit_agent_helper_1-polkitagenthelperprivate.obj `if test -f 'polkitagenthelperprivate.c'; then $(CYGPATH_W) 'polkitagenthelperprivate.c'; else $(CYGPATH_W) '$(srcdir)/polkitagenthelperprivate.c'; fi` -+ -+polkit_agent_helper_1-polkitagenthelper-pam.o: polkitagenthelper-pam.c -+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(polkit_agent_helper_1_CFLAGS) $(CFLAGS) -MT polkit_agent_helper_1-polkitagenthelper-pam.o -MD -MP -MF $(DEPDIR)/polkit_agent_helper_1-polkitagenthelper-pam.Tpo -c -o polkit_agent_helper_1-polkitagenthelper-pam.o `test -f 'polkitagenthelper-pam.c' || echo '$(srcdir)/'`polkitagenthelper-pam.c -+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/polkit_agent_helper_1-polkitagenthelper-pam.Tpo $(DEPDIR)/polkit_agent_helper_1-polkitagenthelper-pam.Po -+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polkitagenthelper-pam.c' object='polkit_agent_helper_1-polkitagenthelper-pam.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(polkit_agent_helper_1_CFLAGS) $(CFLAGS) -c -o polkit_agent_helper_1-polkitagenthelper-pam.o `test -f 'polkitagenthelper-pam.c' || echo '$(srcdir)/'`polkitagenthelper-pam.c -+ -+polkit_agent_helper_1-polkitagenthelper-pam.obj: polkitagenthelper-pam.c -+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(polkit_agent_helper_1_CFLAGS) $(CFLAGS) -MT polkit_agent_helper_1-polkitagenthelper-pam.obj -MD -MP -MF $(DEPDIR)/polkit_agent_helper_1-polkitagenthelper-pam.Tpo -c -o polkit_agent_helper_1-polkitagenthelper-pam.obj `if test -f 'polkitagenthelper-pam.c'; then $(CYGPATH_W) 'polkitagenthelper-pam.c'; else $(CYGPATH_W) '$(srcdir)/polkitagenthelper-pam.c'; fi` -+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/polkit_agent_helper_1-polkitagenthelper-pam.Tpo $(DEPDIR)/polkit_agent_helper_1-polkitagenthelper-pam.Po -+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polkitagenthelper-pam.c' object='polkit_agent_helper_1-polkitagenthelper-pam.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(polkit_agent_helper_1_CFLAGS) $(CFLAGS) -c -o polkit_agent_helper_1-polkitagenthelper-pam.obj `if test -f 'polkitagenthelper-pam.c'; then $(CYGPATH_W) 'polkitagenthelper-pam.c'; else $(CYGPATH_W) '$(srcdir)/polkitagenthelper-pam.c'; fi` -+ -+polkit_agent_helper_1-polkitagenthelper-shadow.o: polkitagenthelper-shadow.c -+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(polkit_agent_helper_1_CFLAGS) $(CFLAGS) -MT polkit_agent_helper_1-polkitagenthelper-shadow.o -MD -MP -MF $(DEPDIR)/polkit_agent_helper_1-polkitagenthelper-shadow.Tpo -c -o polkit_agent_helper_1-polkitagenthelper-shadow.o `test -f 'polkitagenthelper-shadow.c' || echo '$(srcdir)/'`polkitagenthelper-shadow.c -+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/polkit_agent_helper_1-polkitagenthelper-shadow.Tpo $(DEPDIR)/polkit_agent_helper_1-polkitagenthelper-shadow.Po - @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polkitagenthelper.c' object='polkit_agent_helper_1-polkitagenthelper.o' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polkitagenthelper-shadow.c' object='polkit_agent_helper_1-polkitagenthelper-shadow.o' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(polkit_agent_helper_1_CFLAGS) $(CFLAGS) -c -o polkit_agent_helper_1-polkitagenthelper.o `test -f 'polkitagenthelper.c' || echo '$(srcdir)/'`polkitagenthelper.c -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(polkit_agent_helper_1_CFLAGS) $(CFLAGS) -c -o polkit_agent_helper_1-polkitagenthelper-shadow.o `test -f 'polkitagenthelper-shadow.c' || echo '$(srcdir)/'`polkitagenthelper-shadow.c - --polkit_agent_helper_1-polkitagenthelper.obj: polkitagenthelper.c --@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(polkit_agent_helper_1_CFLAGS) $(CFLAGS) -MT polkit_agent_helper_1-polkitagenthelper.obj -MD -MP -MF $(DEPDIR)/polkit_agent_helper_1-polkitagenthelper.Tpo -c -o polkit_agent_helper_1-polkitagenthelper.obj `if test -f 'polkitagenthelper.c'; then $(CYGPATH_W) 'polkitagenthelper.c'; else $(CYGPATH_W) '$(srcdir)/polkitagenthelper.c'; fi` --@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/polkit_agent_helper_1-polkitagenthelper.Tpo $(DEPDIR)/polkit_agent_helper_1-polkitagenthelper.Po -+polkit_agent_helper_1-polkitagenthelper-shadow.obj: polkitagenthelper-shadow.c -+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(polkit_agent_helper_1_CFLAGS) $(CFLAGS) -MT polkit_agent_helper_1-polkitagenthelper-shadow.obj -MD -MP -MF $(DEPDIR)/polkit_agent_helper_1-polkitagenthelper-shadow.Tpo -c -o polkit_agent_helper_1-polkitagenthelper-shadow.obj `if test -f 'polkitagenthelper-shadow.c'; then $(CYGPATH_W) 'polkitagenthelper-shadow.c'; else $(CYGPATH_W) '$(srcdir)/polkitagenthelper-shadow.c'; fi` -+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/polkit_agent_helper_1-polkitagenthelper-shadow.Tpo $(DEPDIR)/polkit_agent_helper_1-polkitagenthelper-shadow.Po - @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ --@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polkitagenthelper.c' object='polkit_agent_helper_1-polkitagenthelper.obj' libtool=no @AMDEPBACKSLASH@ -+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polkitagenthelper-shadow.c' object='polkit_agent_helper_1-polkitagenthelper-shadow.obj' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ --@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(polkit_agent_helper_1_CFLAGS) $(CFLAGS) -c -o polkit_agent_helper_1-polkitagenthelper.obj `if test -f 'polkitagenthelper.c'; then $(CYGPATH_W) 'polkitagenthelper.c'; else $(CYGPATH_W) '$(srcdir)/polkitagenthelper.c'; fi` -+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(polkit_agent_helper_1_CFLAGS) $(CFLAGS) -c -o polkit_agent_helper_1-polkitagenthelper-shadow.obj `if test -f 'polkitagenthelper-shadow.c'; then $(CYGPATH_W) 'polkitagenthelper-shadow.c'; else $(CYGPATH_W) '$(srcdir)/polkitagenthelper-shadow.c'; fi` - - mostlyclean-libtool: - -rm -f *.lo -diff -Naur polkit-0.96/src/polkitagent/polkitagenthelper.c polkit-0.96.patch/src/polkitagent/polkitagenthelper.c ---- polkit-0.96/src/polkitagent/polkitagenthelper.c 2009-10-21 19:07:51.000000000 +0200 -+++ polkit-0.96.patch/src/polkitagent/polkitagenthelper.c 1970-01-01 01:00:00.000000000 +0100 -@@ -1,339 +0,0 @@ --/* -- * Copyright (C) 2008 Red Hat, Inc. -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 2 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- * -- * You should have received a copy of the GNU Lesser General -- * Public License along with this library; if not, write to the -- * Free Software Foundation, Inc., 59 Temple Place, Suite 330, -- * Boston, MA 02111-1307, USA. -- * -- * Author: David Zeuthen -- */ -- --#include "config.h" --#include --#include --#include --#include --#include --#include --#include --#include -- --#include -- --#ifdef HAVE_SOLARIS --# define LOG_AUTHPRIV (10<<3) --#endif -- --#ifndef HAVE_CLEARENV --extern char **environ; -- --static int --clearenv (void) --{ -- if (environ != NULL) -- environ[0] = NULL; -- return 0; --} --#endif -- --/* Development aid: define PAH_DEBUG to get debugging output. Do _NOT_ -- * enable this in production builds; it may leak passwords and other -- * sensitive information. -- */ --#undef PAH_DEBUG --// #define PAH_DEBUG -- --static gboolean send_dbus_message (const char *cookie, const char *user); -- --static int conversation_function (int n, const struct pam_message **msg, struct pam_response **resp, void *data); -- --int --main (int argc, char *argv[]) --{ -- int rc; -- const char *user_to_auth; -- const char *cookie; -- struct pam_conv pam_conversation; -- pam_handle_t *pam_h; -- const void *authed_user; -- -- rc = 0; -- pam_h = NULL; -- -- /* clear the entire environment to avoid attacks using with libraries honoring environment variables */ -- if (clearenv () != 0) -- goto error; -- -- /* set a minimal environment */ -- setenv ("PATH", "/usr/sbin:/usr/bin:/sbin:/bin", 1); -- -- /* check that we are setuid root */ -- if (geteuid () != 0) -- { -- fprintf (stderr, "polkit-agent-helper-1: needs to be setuid root\n"); -- goto error; -- } -- -- openlog ("polkit-agent-helper-1", LOG_CONS | LOG_PID, LOG_AUTHPRIV); -- -- /* check for correct invocation */ -- if (argc != 3) -- { -- syslog (LOG_NOTICE, "inappropriate use of helper, wrong number of arguments [uid=%d]", getuid ()); -- fprintf (stderr, "polkit-agent-helper-1: wrong number of arguments. This incident has been logged.\n"); -- goto error; -- } -- -- user_to_auth = argv[1]; -- cookie = argv[2]; -- -- if (getuid () != 0) -- { -- /* check we're running with a non-tty stdin */ -- if (isatty (STDIN_FILENO) != 0) -- { -- syslog (LOG_NOTICE, "inappropriate use of helper, stdin is a tty [uid=%d]", getuid ()); -- fprintf (stderr, "polkit-agent-helper-1: inappropriate use of helper, stdin is a tty. This incident has been logged.\n"); -- goto error; -- } -- } -- --#ifdef PAH_DEBUG -- fprintf (stderr, "polkit-agent-helper-1: user to auth is '%s'.\n", user_to_auth); --#endif /* PAH_DEBUG */ -- -- pam_conversation.conv = conversation_function; -- pam_conversation.appdata_ptr = NULL; -- -- /* start the pam stack */ -- rc = pam_start ("polkit-1", -- user_to_auth, -- &pam_conversation, -- &pam_h); -- if (rc != PAM_SUCCESS) -- { -- fprintf (stderr, "polkit-agent-helper-1: pam_start failed: %s\n", pam_strerror (pam_h, rc)); -- goto error; -- } -- -- /* set the requesting user */ -- rc = pam_set_item (pam_h, PAM_RUSER, user_to_auth); -- if (rc != PAM_SUCCESS) -- { -- fprintf (stderr, "polkit-agent-helper-1: pam_set_item failed: %s\n", pam_strerror (pam_h, rc)); -- goto error; -- } -- -- /* is user really user? */ -- rc = pam_authenticate (pam_h, 0); -- if (rc != PAM_SUCCESS) -- { -- fprintf (stderr, "polkit-agent-helper-1: pam_authenticated failed: %s\n", pam_strerror (pam_h, rc)); -- goto error; -- } -- -- /* permitted access? */ -- rc = pam_acct_mgmt (pam_h, 0); -- if (rc != PAM_SUCCESS) -- { -- fprintf (stderr, "polkit-agent-helper-1: pam_acct_mgmt failed: %s\n", pam_strerror (pam_h, rc)); -- goto error; -- } -- -- /* did we auth the right user? */ -- rc = pam_get_item (pam_h, PAM_USER, &authed_user); -- if (rc != PAM_SUCCESS) -- { -- fprintf (stderr, "polkit-agent-helper-1: pam_get_item failed: %s\n", pam_strerror (pam_h, rc)); -- goto error; -- } -- -- if (strcmp (authed_user, user_to_auth) != 0) -- { -- fprintf (stderr, "polkit-agent-helper-1: Tried to auth user '%s' but we got auth for user '%s' instead", -- user_to_auth, (const char *) authed_user); -- goto error; -- } -- --#ifdef PAH_DEBUG -- fprintf (stderr, "polkit-agent-helper-1: successfully authenticated user '%s'.\n", user_to_auth); --#endif /* PAH_DEBUG */ -- -- pam_end (pam_h, rc); -- pam_h = NULL; -- --#ifdef PAH_DEBUG -- fprintf (stderr, "polkit-agent-helper-1: sending D-Bus message to PolicyKit daemon\n"); --#endif /* PAH_DEBUG */ -- -- /* now send a D-Bus message to the PolicyKit daemon that -- * includes a) the cookie; and b) the user we authenticated -- */ -- if (!send_dbus_message (cookie, user_to_auth)) -- { --#ifdef PAH_DEBUG -- fprintf (stderr, "polkit-agent-helper-1: error sending D-Bus message to PolicyKit daemon\n"); --#endif /* PAH_DEBUG */ -- goto error; -- } -- --#ifdef PAH_DEBUG -- fprintf (stderr, "polkit-agent-helper-1: successfully sent D-Bus message to PolicyKit daemon\n"); --#endif /* PAH_DEBUG */ -- -- fprintf (stdout, "SUCCESS\n"); -- fflush (stdout); -- fflush (stderr); -- usleep (10 * 1000); /* since fflush(3) seems buggy */ -- return 0; -- --error: -- if (pam_h != NULL) -- pam_end (pam_h, rc); -- -- fprintf (stdout, "FAILURE\n"); -- fflush (stdout); -- fflush (stderr); -- usleep (10 * 1000); /* since fflush(3) seems buggy */ -- return 1; --} -- --static int --conversation_function (int n, const struct pam_message **msg, struct pam_response **resp, void *data) --{ -- struct pam_response *aresp; -- char buf[PAM_MAX_RESP_SIZE]; -- int i; -- -- data = data; -- if (n <= 0 || n > PAM_MAX_NUM_MSG) -- return PAM_CONV_ERR; -- -- if ((aresp = calloc(n, sizeof *aresp)) == NULL) -- return PAM_BUF_ERR; -- -- for (i = 0; i < n; ++i) -- { -- aresp[i].resp_retcode = 0; -- aresp[i].resp = NULL; -- switch (msg[i]->msg_style) -- { -- -- case PAM_PROMPT_ECHO_OFF: -- fprintf (stdout, "PAM_PROMPT_ECHO_OFF "); -- goto conv1; -- -- case PAM_PROMPT_ECHO_ON: -- fprintf (stdout, "PAM_PROMPT_ECHO_ON "); -- conv1: -- fputs (msg[i]->msg, stdout); -- if (strlen (msg[i]->msg) > 0 && msg[i]->msg[strlen (msg[i]->msg) - 1] != '\n') -- fputc ('\n', stdout); -- fflush (stdout); -- -- if (fgets (buf, sizeof buf, stdin) == NULL) -- goto error; -- -- if (strlen (buf) > 0 && -- buf[strlen (buf) - 1] == '\n') -- buf[strlen (buf) - 1] = '\0'; -- -- aresp[i].resp = strdup (buf); -- if (aresp[i].resp == NULL) -- goto error; -- break; -- -- case PAM_ERROR_MSG: -- fprintf (stdout, "PAM_ERROR_MSG "); -- goto conv2; -- -- case PAM_TEXT_INFO: -- fprintf (stdout, "PAM_TEXT_INFO "); -- conv2: -- fputs (msg[i]->msg, stdout); -- if (strlen (msg[i]->msg) > 0 && -- msg[i]->msg[strlen (msg[i]->msg) - 1] != '\n') -- fputc ('\n', stdout); -- fflush (stdout); -- break; -- -- default: -- goto error; -- } -- } -- -- *resp = aresp; -- return PAM_SUCCESS; -- --error: -- -- for (i = 0; i < n; ++i) -- { -- if (aresp[i].resp != NULL) { -- memset (aresp[i].resp, 0, strlen(aresp[i].resp)); -- free (aresp[i].resp); -- } -- } -- memset (aresp, 0, n * sizeof *aresp); -- *resp = NULL; -- return PAM_CONV_ERR; --} -- --static gboolean --send_dbus_message (const char *cookie, const char *user) --{ -- PolkitAuthority *authority; -- PolkitIdentity *identity; -- GError *error; -- gboolean ret; -- -- ret = FALSE; -- -- error = NULL; -- -- g_type_init (); -- -- authority = polkit_authority_get (); -- -- identity = polkit_unix_user_new_for_name (user, &error); -- if (identity == NULL) -- { -- g_printerr ("Error constructing identity: %s\n", error->message); -- g_error_free (error); -- goto out; -- } -- -- if (!polkit_authority_authentication_agent_response_sync (authority, -- cookie, -- identity, -- NULL, -- &error)) -- { -- g_printerr ("polkit-agent-helper-1: error response to PolicyKit daemon: %s\n", error->message); -- g_error_free (error); -- goto out; -- } -- -- ret = TRUE; -- -- out: -- -- if (identity != NULL) -- g_object_unref (identity); -- -- if (authority != NULL) -- g_object_unref (authority); -- -- return ret; --} -diff -Naur polkit-0.96/src/polkitagent/polkitagenthelper-pam.c polkit-0.96.patch/src/polkitagent/polkitagenthelper-pam.c ---- polkit-0.96/src/polkitagent/polkitagenthelper-pam.c 1970-01-01 01:00:00.000000000 +0100 -+++ polkit-0.96.patch/src/polkitagent/polkitagenthelper-pam.c 2010-09-28 23:57:21.559875461 +0200 -@@ -0,0 +1,264 @@ -+/* -+ * Copyright (C) 2008, 2010 Red Hat, Inc. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General -+ * Public License along with this library; if not, write to the -+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330, -+ * Boston, MA 02111-1307, USA. -+ * -+ * Author: David Zeuthen -+ */ -+ -+#include "config.h" -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include "polkitagenthelperprivate.h" -+ -+static int conversation_function (int n, const struct pam_message **msg, struct pam_response **resp, void *data); -+ -+int -+main (int argc, char *argv[]) -+{ -+ int rc; -+ const char *user_to_auth; -+ const char *cookie; -+ struct pam_conv pam_conversation; -+ pam_handle_t *pam_h; -+ const void *authed_user; -+ -+ rc = 0; -+ pam_h = NULL; -+ -+ /* clear the entire environment to avoid attacks using with libraries honoring environment variables */ -+ if (clearenv () != 0) -+ goto error; -+ -+ /* set a minimal environment */ -+ setenv ("PATH", "/usr/sbin:/usr/bin:/sbin:/bin", 1); -+ -+ /* check that we are setuid root */ -+ if (geteuid () != 0) -+ { -+ fprintf (stderr, "polkit-agent-helper-1: needs to be setuid root\n"); -+ goto error; -+ } -+ -+ openlog ("polkit-agent-helper-1", LOG_CONS | LOG_PID, LOG_AUTHPRIV); -+ -+ /* check for correct invocation */ -+ if (argc != 3) -+ { -+ syslog (LOG_NOTICE, "inappropriate use of helper, wrong number of arguments [uid=%d]", getuid ()); -+ fprintf (stderr, "polkit-agent-helper-1: wrong number of arguments. This incident has been logged.\n"); -+ goto error; -+ } -+ -+ user_to_auth = argv[1]; -+ cookie = argv[2]; -+ -+ if (getuid () != 0) -+ { -+ /* check we're running with a non-tty stdin */ -+ if (isatty (STDIN_FILENO) != 0) -+ { -+ syslog (LOG_NOTICE, "inappropriate use of helper, stdin is a tty [uid=%d]", getuid ()); -+ fprintf (stderr, "polkit-agent-helper-1: inappropriate use of helper, stdin is a tty. This incident has been logged.\n"); -+ goto error; -+ } -+ } -+ -+#ifdef PAH_DEBUG -+ fprintf (stderr, "polkit-agent-helper-1: user to auth is '%s'.\n", user_to_auth); -+#endif /* PAH_DEBUG */ -+ -+ pam_conversation.conv = conversation_function; -+ pam_conversation.appdata_ptr = NULL; -+ -+ /* start the pam stack */ -+ rc = pam_start ("polkit-1", -+ user_to_auth, -+ &pam_conversation, -+ &pam_h); -+ if (rc != PAM_SUCCESS) -+ { -+ fprintf (stderr, "polkit-agent-helper-1: pam_start failed: %s\n", pam_strerror (pam_h, rc)); -+ goto error; -+ } -+ -+ /* set the requesting user */ -+ rc = pam_set_item (pam_h, PAM_RUSER, user_to_auth); -+ if (rc != PAM_SUCCESS) -+ { -+ fprintf (stderr, "polkit-agent-helper-1: pam_set_item failed: %s\n", pam_strerror (pam_h, rc)); -+ goto error; -+ } -+ -+ /* is user really user? */ -+ rc = pam_authenticate (pam_h, 0); -+ if (rc != PAM_SUCCESS) -+ { -+ fprintf (stderr, "polkit-agent-helper-1: pam_authenticated failed: %s\n", pam_strerror (pam_h, rc)); -+ goto error; -+ } -+ -+ /* permitted access? */ -+ rc = pam_acct_mgmt (pam_h, 0); -+ if (rc != PAM_SUCCESS) -+ { -+ fprintf (stderr, "polkit-agent-helper-1: pam_acct_mgmt failed: %s\n", pam_strerror (pam_h, rc)); -+ goto error; -+ } -+ -+ /* did we auth the right user? */ -+ rc = pam_get_item (pam_h, PAM_USER, &authed_user); -+ if (rc != PAM_SUCCESS) -+ { -+ fprintf (stderr, "polkit-agent-helper-1: pam_get_item failed: %s\n", pam_strerror (pam_h, rc)); -+ goto error; -+ } -+ -+ if (strcmp (authed_user, user_to_auth) != 0) -+ { -+ fprintf (stderr, "polkit-agent-helper-1: Tried to auth user '%s' but we got auth for user '%s' instead", -+ user_to_auth, (const char *) authed_user); -+ goto error; -+ } -+ -+#ifdef PAH_DEBUG -+ fprintf (stderr, "polkit-agent-helper-1: successfully authenticated user '%s'.\n", user_to_auth); -+#endif /* PAH_DEBUG */ -+ -+ pam_end (pam_h, rc); -+ pam_h = NULL; -+ -+#ifdef PAH_DEBUG -+ fprintf (stderr, "polkit-agent-helper-1: sending D-Bus message to PolicyKit daemon\n"); -+#endif /* PAH_DEBUG */ -+ -+ /* now send a D-Bus message to the PolicyKit daemon that -+ * includes a) the cookie; and b) the user we authenticated -+ */ -+ if (!send_dbus_message (cookie, user_to_auth)) -+ { -+#ifdef PAH_DEBUG -+ fprintf (stderr, "polkit-agent-helper-1: error sending D-Bus message to PolicyKit daemon\n"); -+#endif /* PAH_DEBUG */ -+ goto error; -+ } -+ -+#ifdef PAH_DEBUG -+ fprintf (stderr, "polkit-agent-helper-1: successfully sent D-Bus message to PolicyKit daemon\n"); -+#endif /* PAH_DEBUG */ -+ -+ fprintf (stdout, "SUCCESS\n"); -+ flush_and_wait(); -+ return 0; -+ -+error: -+ if (pam_h != NULL) -+ pam_end (pam_h, rc); -+ -+ fprintf (stdout, "FAILURE\n"); -+ flush_and_wait(); -+ return 1; -+} -+ -+static int -+conversation_function (int n, const struct pam_message **msg, struct pam_response **resp, void *data) -+{ -+ struct pam_response *aresp; -+ char buf[PAM_MAX_RESP_SIZE]; -+ int i; -+ -+ data = data; -+ if (n <= 0 || n > PAM_MAX_NUM_MSG) -+ return PAM_CONV_ERR; -+ -+ if ((aresp = calloc(n, sizeof *aresp)) == NULL) -+ return PAM_BUF_ERR; -+ -+ for (i = 0; i < n; ++i) -+ { -+ aresp[i].resp_retcode = 0; -+ aresp[i].resp = NULL; -+ switch (msg[i]->msg_style) -+ { -+ -+ case PAM_PROMPT_ECHO_OFF: -+ fprintf (stdout, "PAM_PROMPT_ECHO_OFF "); -+ goto conv1; -+ -+ case PAM_PROMPT_ECHO_ON: -+ fprintf (stdout, "PAM_PROMPT_ECHO_ON "); -+ conv1: -+ fputs (msg[i]->msg, stdout); -+ if (strlen (msg[i]->msg) > 0 && msg[i]->msg[strlen (msg[i]->msg) - 1] != '\n') -+ fputc ('\n', stdout); -+ fflush (stdout); -+ -+ if (fgets (buf, sizeof buf, stdin) == NULL) -+ goto error; -+ -+ if (strlen (buf) > 0 && -+ buf[strlen (buf) - 1] == '\n') -+ buf[strlen (buf) - 1] = '\0'; -+ -+ aresp[i].resp = strdup (buf); -+ if (aresp[i].resp == NULL) -+ goto error; -+ break; -+ -+ case PAM_ERROR_MSG: -+ fprintf (stdout, "PAM_ERROR_MSG "); -+ goto conv2; -+ -+ case PAM_TEXT_INFO: -+ fprintf (stdout, "PAM_TEXT_INFO "); -+ conv2: -+ fputs (msg[i]->msg, stdout); -+ if (strlen (msg[i]->msg) > 0 && -+ msg[i]->msg[strlen (msg[i]->msg) - 1] != '\n') -+ fputc ('\n', stdout); -+ fflush (stdout); -+ break; -+ -+ default: -+ goto error; -+ } -+ } -+ -+ *resp = aresp; -+ return PAM_SUCCESS; -+ -+error: -+ -+ for (i = 0; i < n; ++i) -+ { -+ if (aresp[i].resp != NULL) { -+ memset (aresp[i].resp, 0, strlen(aresp[i].resp)); -+ free (aresp[i].resp); -+ } -+ } -+ memset (aresp, 0, n * sizeof *aresp); -+ *resp = NULL; -+ return PAM_CONV_ERR; -+} -+ -diff -Naur polkit-0.96/src/polkitagent/polkitagenthelperprivate.c polkit-0.96.patch/src/polkitagent/polkitagenthelperprivate.c ---- polkit-0.96/src/polkitagent/polkitagenthelperprivate.c 1970-01-01 01:00:00.000000000 +0100 -+++ polkit-0.96.patch/src/polkitagent/polkitagenthelperprivate.c 2010-09-28 23:57:22.074877607 +0200 -@@ -0,0 +1,97 @@ -+/* -+ * Copyright (C) 2009-2010 Red Hat, Inc. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General -+ * Public License along with this library; if not, write to the -+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -+ * Boston, MA 02110-1301, USA. -+ * -+ * Authors: David Zeuthen , -+ * Andrew Psaltis -+ */ -+ -+#include "polkitagenthelperprivate.h" -+#include -+ -+#ifndef HAVE_CLEARENV -+extern char **environ; -+ -+static int -+clearenv (void) -+{ -+ if (environ != NULL) -+ environ[0] = NULL; -+ return 0; -+} -+#endif -+ -+ -+gboolean -+send_dbus_message (const char *cookie, const char *user) -+{ -+ PolkitAuthority *authority; -+ PolkitIdentity *identity; -+ GError *error; -+ gboolean ret; -+ -+ ret = FALSE; -+ -+ error = NULL; -+ -+ g_type_init (); -+ -+ authority = polkit_authority_get (); -+ -+ identity = polkit_unix_user_new_for_name (user, &error); -+ if (identity == NULL) -+ { -+ g_printerr ("Error constructing identity: %s\n", error->message); -+ g_error_free (error); -+ goto out; -+ } -+ -+ if (!polkit_authority_authentication_agent_response_sync (authority, -+ cookie, -+ identity, -+ NULL, -+ &error)) -+ { -+ g_printerr ("polkit-agent-helper-1: error response to PolicyKit daemon: %s\n", error->message); -+ g_error_free (error); -+ goto out; -+ } -+ -+ ret = TRUE; -+ -+ out: -+ -+ if (identity != NULL) -+ g_object_unref (identity); -+ -+ if (authority != NULL) -+ g_object_unref (authority); -+ -+ return ret; -+} -+ -+/* fflush(3) stdin and stdout and wait a little bit. -+ * This replaces the three-line commands at the bottom of -+ * polkit-agent-helper-1's main() function. -+ */ -+void -+flush_and_wait () -+{ -+ fflush (stdout); -+ fflush (stderr); -+ usleep (10 * 1000); /* since fflush(3) seems buggy */ -+} -diff -Naur polkit-0.96/src/polkitagent/polkitagenthelperprivate.h polkit-0.96.patch/src/polkitagent/polkitagenthelperprivate.h ---- polkit-0.96/src/polkitagent/polkitagenthelperprivate.h 1970-01-01 01:00:00.000000000 +0100 -+++ polkit-0.96.patch/src/polkitagent/polkitagenthelperprivate.h 2010-09-28 23:57:22.075877241 +0200 -@@ -0,0 +1,42 @@ -+/* -+ * Copyright (C) 2009-2010 Red Hat, Inc. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General -+ * Public License along with this library; if not, write to the -+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -+ * Boston, MA 02110-1301, USA. -+ * -+ * Authors: David Zeuthen , -+ * Andrew Psaltis -+ */ -+#ifndef __POLKIT_AGENT_HELPER_PRIVATE_H -+#define __POLKIT_AGENT_HELPER_PRIVATE_H -+ -+#include -+ -+/* Development aid: define PAH_DEBUG to get debugging output. Do _NOT_ -+ * enable this in production builds; it may leak passwords and other -+ * sensitive information. -+ */ -+#undef PAH_DEBUG -+// #define PAH_DEBUG -+ -+#ifdef HAVE_SOLARIS -+# define LOG_AUTHPRIV (10<<3) -+#endif -+ -+gboolean send_dbus_message (const char *cookie, const char *user); -+ -+void flush_and_wait (); -+ -+#endif /* __POLKIT_AGENT_HELPER_PRIVATE_H */ -diff -Naur polkit-0.96/src/polkitagent/polkitagenthelper-shadow.c polkit-0.96.patch/src/polkitagent/polkitagenthelper-shadow.c ---- polkit-0.96/src/polkitagent/polkitagenthelper-shadow.c 1970-01-01 01:00:00.000000000 +0100 -+++ polkit-0.96.patch/src/polkitagent/polkitagenthelper-shadow.c 2010-09-28 23:57:22.071876889 +0200 -@@ -0,0 +1,189 @@ -+/* -+ * Copyright (C) 2008 Red Hat, Inc. -+ * Copyright (C) 2009-2010 Andrew Psaltis -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General -+ * Public License along with this library; if not, write to the -+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330, -+ * Boston, MA 02111-1307, USA. -+ * -+ * Authors: Andrew Psaltis , based on -+ * polkitagenthelper.c which was written by -+ * David Zeuthen -+ */ -+ -+#include "config.h" -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include "polkitagenthelperprivate.h" -+ -+ -+extern char *crypt (); -+static int shadow_authenticate (struct spwd *shadow); -+ -+int -+main (int argc, char *argv[]) -+{ -+ struct spwd *shadow; -+ const char *user_to_auth; -+ const char *cookie; -+ time_t tm; -+ -+ /* clear the entire environment to avoid attacks with -+ libraries honoring environment variables */ -+ if (clearenv () != 0) -+ goto error; -+ -+ /* set a minimal environment */ -+ setenv ("PATH", "/usr/sbin:/usr/bin:/sbin:/bin", 1); -+ -+ /* check that we are setuid root */ -+ if (geteuid () != 0) -+ { -+ fprintf (stderr, "polkit-agent-helper-1: needs to be setuid root\n"); -+ goto error; -+ } -+ -+ openlog ("polkit-agent-helper-1", LOG_CONS | LOG_PID, LOG_AUTHPRIV); -+ -+ /* check for correct invocation */ -+ if (argc != 3) -+ { -+ syslog (LOG_NOTICE, "inappropriate use of helper, wrong number of arguments [uid=%d]", getuid ()); -+ fprintf (stderr, "polkit-agent-helper-1: wrong number of arguments. This incident has been logged.\n"); -+ goto error; -+ } -+ -+ if (getuid () != 0) -+ { -+ /* check we're running with a non-tty stdin */ -+ if (isatty (STDIN_FILENO) != 0) -+ { -+ syslog (LOG_NOTICE, "inappropriate use of helper, stdin is a tty [uid=%d]", getuid ()); -+ fprintf (stderr, "polkit-agent-helper-1: inappropriate use of helper, stdin is a tty. This incident has been logged.\n"); -+ goto error; -+ } -+ } -+ -+ user_to_auth = argv[1]; -+ cookie = argv[2]; -+ -+#ifdef PAH_DEBUG -+ fprintf (stderr, "polkit-agent-helper-1: user to auth is '%s'.\n", user_to_auth); -+#endif /* PAH_DEBUG */ -+ -+ /* Ask shadow about the user requesting authentication */ -+ if ((shadow = getspnam (user_to_auth)) == NULL) -+ { -+ syslog (LOG_NOTICE, "shadow file data information request for user %s [uid=%d] failed", user_to_auth, getuid()); -+ fprintf(stderr, "polkit-agent-helper-1: could not get shadow information for%.100s", user_to_auth); -+ goto error; -+ } -+ -+ /* Check the user's identity */ -+ if(!shadow_authenticate (shadow)) -+ { -+ syslog (LOG_NOTICE, "authentication failure [uid=%d] trying to authenticate '%s'", getuid (), user_to_auth); -+ fprintf (stderr, "polkit-agent-helper-1: authentication failure. This incident has been logged.\n"); -+ goto error; -+ } -+ -+ /* Check whether the user's password has expired */ -+ time(&tm); -+ if( shadow->sp_max >= 0 && (shadow->sp_lstchg + shadow->sp_max) * 60 * 60 * 24 <= tm) -+ { -+ syslog (LOG_NOTICE, "password expired for user '%s' [uid=%d] trying to authenticate", user_to_auth, getuid () ); -+ fprintf (stderr, "polkit-agent-helper-1: authorization failure. This incident has been logged.\n"); -+ goto error; -+ } -+ -+ /* Check whether the user's password has aged (and account expired along -+ * with it) -+ */ -+ if( shadow->sp_inact >= 0 && (shadow->sp_lstchg + shadow->sp_max + shadow->sp_inact) * 60 * 60 * 24 <= tm) -+ { -+ syslog (LOG_NOTICE, "password aged for user '%s' [uid=%d] trying to authenticate", user_to_auth, getuid () ); -+ fprintf (stderr, "polkit-agent-helper-1: authorization failure. This incident has been logged.\n"); -+ goto error; -+ } -+ -+ /* Check whether the user's account has expired */ -+ if(shadow->sp_expire >= 0 && shadow->sp_expire * 60 * 60 * 24 <= tm) -+ { -+ syslog (LOG_NOTICE, "account expired for user '%s' [uid=%d] trying to authenticate", user_to_auth, getuid () ); -+ fprintf (stderr, "polkit-agent-helper-1: authorization failure. This incident has been logged.\n"); -+ goto error; -+ } -+ -+#ifdef PAH_DEBUG -+ fprintf (stderr, "polkit-agent-helper-1: sending D-Bus message to PolicyKit daemon\n"); -+#endif /* PAH_DEBUG */ -+ -+ /* now send a D-Bus message to the PolicyKit daemon that -+ * includes a) the cookie; and b) the user we authenticated -+ */ -+ if (!send_dbus_message (cookie, user_to_auth)) -+ { -+#ifdef PAH_DEBUG -+ fprintf (stderr, "polkit-agent-helper-1: error sending D-Bus message to PolicyKit daemon\n"); -+#endif /* PAH_DEBUG */ -+ goto error; -+ } -+ -+#ifdef PAH_DEBUG -+ fprintf (stderr, "polkit-agent-helper-1: successfully sent D-Bus message to PolicyKit daemon\n"); -+#endif /* PAH_DEBUG */ -+ -+ fprintf (stdout, "SUCCESS\n"); -+ flush_and_wait(); -+ return 0; -+ -+error: -+ fprintf (stdout, "FAILURE\n"); -+ flush_and_wait(); -+ return 1; -+} -+ -+static int -+shadow_authenticate(struct spwd *shadow) -+{ -+ /* Speak PAM to the daemon, thanks to David Zeuthen for the idea. */ -+ char passwd[512]; -+ fprintf(stdout, "PAM_PROMPT_ECHO_OFF password:\n"); -+ fflush(stdout); -+ usleep (10 * 1000); /* since fflush(3) seems buggy */ -+ -+ if (fgets (passwd, sizeof (passwd), stdin) == NULL) -+ goto error; -+ -+ if (strlen (passwd) > 0 && passwd[strlen (passwd) - 1] == '\n') -+ passwd[strlen (passwd) - 1] = '\0'; -+ -+ if (strcmp (shadow->sp_pwdp, crypt (passwd, shadow->sp_pwdp)) != 0) -+ goto error; -+ return 1; -+error: -+ return 0; -+} -+ -diff -Naur polkit-0.96/src/programs/pkexec.c polkit-0.96.patch/src/programs/pkexec.c ---- polkit-0.96/src/programs/pkexec.c 2009-12-15 20:04:15.000000000 +0100 -+++ polkit-0.96.patch/src/programs/pkexec.c 2010-09-28 23:57:22.077877347 +0200 -@@ -34,7 +34,11 @@ - #include - #include - #include -+ -+#ifdef POLKIT_AUTHFW_PAM - #include -+#endif /* POLKIT_AUTHFW_PAM */ -+ - #include - #include - -@@ -115,6 +119,7 @@ - - /* ---------------------------------------------------------------------------------------------------- */ - -+#ifdef POLKIT_AUTHFW_PAM - static int - pam_conversation_function (int n, - const struct pam_message **msg, -@@ -167,6 +172,7 @@ - pam_end (pam_h, rc); - return ret; - } -+#endif /* POLKIT_AUTHFW_PAM */ - - /* ---------------------------------------------------------------------------------------------------- */ - -@@ -742,11 +748,13 @@ - * TODO: The question here is whether we should clear the limits before applying them? - * As evident above, neither su(1) (and, for that matter, nor sudo(8)) does this. - */ -+#ifdef POLKIT_AUTHW_PAM - if (!open_session (pw->pw_name)) - { - goto out; - } -- -+#endif /* POLKIT_AUTHFW_PAM */ -+ - /* become the user */ - if (setgroups (0, NULL) != 0) - { -diff -Naur polkit-0.96/src/programs/pkexec.c.orig polkit-0.96.patch/src/programs/pkexec.c.orig ---- polkit-0.96/src/programs/pkexec.c.orig 1970-01-01 01:00:00.000000000 +0100 -+++ polkit-0.96.patch/src/programs/pkexec.c.orig 2009-12-15 20:04:15.000000000 +0100 -@@ -0,0 +1,819 @@ -+/* -+ * Copyright (C) 2008 Red Hat, Inc. -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General -+ * Public License along with this library; if not, write to the -+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330, -+ * Boston, MA 02111-1307, USA. -+ * -+ * Author: David Zeuthen -+ */ -+ -+#ifdef HAVE_CONFIG_H -+# include "config.h" -+#endif -+ -+#define _GNU_SOURCE -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+static gchar *original_user_name = NULL; -+static gchar *original_cwd = NULL; -+static gchar *command_line = NULL; -+static struct passwd *pw; -+ -+#ifndef HAVE_CLEARENV -+extern char **environ; -+ -+static int -+clearenv (void) -+{ -+ if (environ != NULL) -+ environ[0] = NULL; -+ return 0; -+} -+#endif -+ -+static void -+usage (int argc, char *argv[]) -+{ -+ g_printerr ("pkexec --version |\n" -+ " --help |\n" -+ " [--user username] PROGRAM [ARGUMENTS...]\n" -+ "\n" -+ "See the pkexec manual page for more details.\n"); -+} -+ -+/* ---------------------------------------------------------------------------------------------------- */ -+ -+static void -+log_message (gint level, -+ gboolean print_to_stderr, -+ const gchar *format, -+ ...) -+{ -+ static gboolean is_log_open = FALSE; -+ va_list var_args; -+ gchar *s; -+ const gchar *tty; -+ -+ if (!is_log_open) -+ { -+ openlog ("pkexec", -+ LOG_PID, -+ LOG_AUTHPRIV); /* security/authorization messages (private) */ -+ is_log_open = TRUE; -+ } -+ -+ va_start (var_args, format); -+ s = g_strdup_vprintf (format, var_args); -+ va_end (var_args); -+ -+ tty = ttyname (0); -+ if (tty == NULL) -+ tty = "unknown"; -+ -+ /* first complain to syslog */ -+ syslog (level, -+ "%s: %s [USER=%s] [TTY=%s] [CWD=%s] [COMMAND=%s]", -+ original_user_name, -+ s, -+ pw->pw_name, -+ tty, -+ original_cwd, -+ command_line); -+ -+ /* and then on stderr */ -+ if (print_to_stderr) -+ g_printerr ("%s\n", s); -+ -+ g_free (s); -+} -+ -+/* ---------------------------------------------------------------------------------------------------- */ -+ -+static int -+pam_conversation_function (int n, -+ const struct pam_message **msg, -+ struct pam_response **resp, -+ void *data) -+{ -+ g_assert_not_reached (); -+ return PAM_CONV_ERR; -+} -+ -+static gboolean -+open_session (const gchar *user_to_auth) -+{ -+ gboolean ret; -+ gint rc; -+ pam_handle_t *pam_h; -+ struct pam_conv conversation; -+ -+ ret = FALSE; -+ -+ pam_h = NULL; -+ -+ conversation.conv = pam_conversation_function; -+ conversation.appdata_ptr = NULL; -+ -+ /* start the pam stack */ -+ rc = pam_start ("polkit-1", -+ user_to_auth, -+ &conversation, -+ &pam_h); -+ if (rc != PAM_SUCCESS) -+ { -+ g_printerr ("pam_start() failed: %s\n", pam_strerror (pam_h, rc)); -+ goto out; -+ } -+ -+ /* open a session */ -+ rc = pam_open_session (pam_h, -+ 0); /* flags */ -+ if (rc != PAM_SUCCESS) -+ { -+ g_printerr ("pam_open_session() failed: %s\n", pam_strerror (pam_h, rc)); -+ goto out; -+ } -+ -+ ret = TRUE; -+ -+out: -+ if (pam_h != NULL) -+ pam_end (pam_h, rc); -+ return ret; -+} -+ -+/* ---------------------------------------------------------------------------------------------------- */ -+ -+typedef gboolean (*FdCallback) (gint fd, gpointer user_data); -+ -+static gboolean -+set_close_on_exec (gint fd, -+ gpointer user_data) -+{ -+ gint fd_bottom; -+ -+ fd_bottom = GPOINTER_TO_INT (user_data); -+ -+ if (fd >= fd_bottom) -+ { -+ if (fcntl (fd, F_SETFD, FD_CLOEXEC) != 0 && errno != EBADF) -+ { -+ return FALSE; -+ } -+ } -+ -+ return TRUE; -+} -+ -+static gboolean -+fdwalk (FdCallback callback, -+ gpointer user_data) -+{ -+ gint fd; -+ gint max_fd; -+ -+ g_return_val_if_fail (callback != NULL, FALSE); -+ -+ max_fd = sysconf (_SC_OPEN_MAX); -+ for (fd = 0; fd < max_fd; fd++) -+ { -+ if (!callback (fd, user_data)) -+ return FALSE; -+ } -+ -+ return TRUE; -+} -+ -+/* ---------------------------------------------------------------------------------------------------- */ -+ -+static gchar * -+find_action_for_path (PolkitAuthority *authority, -+ const gchar *path) -+{ -+ GList *l; -+ GList *actions; -+ gchar *action_id; -+ GError *error; -+ -+ actions = NULL; -+ action_id = NULL; -+ error = NULL; -+ -+ actions = polkit_authority_enumerate_actions_sync (authority, -+ NULL, -+ &error); -+ if (actions == NULL) -+ { -+ g_warning ("Error enumerating actions: %s", error->message); -+ g_error_free (error); -+ goto out; -+ } -+ -+ for (l = actions; l != NULL; l = l->next) -+ { -+ PolkitActionDescription *action_desc = POLKIT_ACTION_DESCRIPTION (l->data); -+ const gchar *path_for_action; -+ -+ path_for_action = polkit_action_description_get_annotation (action_desc, "org.freedesktop.policykit.exec.path"); -+ if (path_for_action == NULL) -+ continue; -+ -+ if (g_strcmp0 (path_for_action, path) == 0) -+ { -+ action_id = g_strdup (polkit_action_description_get_action_id (action_desc)); -+ goto out; -+ } -+ } -+ -+ out: -+ g_list_foreach (actions, (GFunc) g_object_unref, NULL); -+ g_list_free (actions); -+ -+ /* Fall back to org.freedesktop.policykit.exec */ -+ -+ if (action_id == NULL) -+ action_id = g_strdup ("org.freedesktop.policykit.exec"); -+ -+ return action_id; -+} -+ -+/* ---------------------------------------------------------------------------------------------------- */ -+ -+static gboolean -+is_valid_shell (const gchar *shell) -+{ -+ gboolean ret; -+ gchar *contents; -+ gchar **shells; -+ GError *error; -+ guint n; -+ -+ ret = FALSE; -+ -+ contents = NULL; -+ shells = NULL; -+ -+ error = NULL; -+ if (!g_file_get_contents ("/etc/shells", -+ &contents, -+ NULL, /* gsize *length */ -+ &error)) -+ { -+ g_printerr ("Error getting contents of /etc/shells: %s\n", error->message); -+ g_error_free (error); -+ goto out; -+ } -+ -+ shells = g_strsplit (contents, "\n", 0); -+ for (n = 0; shells != NULL && shells[n] != NULL; n++) -+ { -+ if (g_strcmp0 (shell, shells[n]) == 0) -+ { -+ ret = TRUE; -+ goto out; -+ } -+ } -+ -+ out: -+ g_free (contents); -+ g_strfreev (shells); -+ return ret; -+} -+ -+static gboolean -+validate_environment_variable (const gchar *key, -+ const gchar *value) -+{ -+ gboolean ret; -+ -+ /* Generally we bail if any environment variable value contains -+ * -+ * - '/' characters -+ * - '%' characters -+ * - '..' substrings -+ */ -+ -+ g_return_val_if_fail (key != NULL, FALSE); -+ g_return_val_if_fail (value != NULL, FALSE); -+ -+ ret = FALSE; -+ -+ /* special case $SHELL */ -+ if (g_strcmp0 (key, "SHELL") == 0) -+ { -+ /* check if it's in /etc/shells */ -+ if (!is_valid_shell (value)) -+ { -+ log_message (LOG_CRIT, TRUE, -+ "The value for the SHELL variable was not found the /etc/shells file"); -+ g_printerr ("\n" -+ "This incident has been reported.\n"); -+ goto out; -+ } -+ } -+ else if (strstr (value, "/") != NULL || -+ strstr (value, "%") != NULL || -+ strstr (value, "..") != NULL) -+ { -+ log_message (LOG_CRIT, TRUE, -+ "The value for environment variable %s contains suscipious content", -+ key); -+ g_printerr ("\n" -+ "This incident has been reported.\n"); -+ goto out; -+ } -+ -+ ret = TRUE; -+ -+ out: -+ return ret; -+} -+ -+/* ---------------------------------------------------------------------------------------------------- */ -+ -+int -+main (int argc, char *argv[]) -+{ -+ guint n; -+ guint ret; -+ gint rc; -+ gboolean opt_show_help; -+ gboolean opt_show_version; -+ PolkitAuthority *authority; -+ PolkitAuthorizationResult *result; -+ PolkitSubject *subject; -+ PolkitDetails *details; -+ GError *error; -+ gchar *action_id; -+ gchar **exec_argv; -+ gchar *path; -+ struct passwd pwstruct; -+ gchar pwbuf[8192]; -+ gchar *s; -+ const gchar *environment_variables_to_save[] = { -+ "SHELL", -+ "LANG", -+ "LINGUAS", -+ "LANGUAGE", -+ "LC_COLLATE", -+ "LC_CTYPE", -+ "LC_MESSAGES", -+ "LC_MONETARY", -+ "LC_NUMERIC", -+ "LC_TIME", -+ "LC_ALL", -+ "TERM", -+ "COLORTERM", -+ -+ /* For now, avoiding pretend that running X11 apps as another user in the same session -+ * will ever work... See -+ * -+ * https://bugs.freedesktop.org/show_bug.cgi?id=17970#c26 -+ * -+ * and surrounding comments for a lot of discussion about this. -+ */ -+#if 0 -+ "DESKTOP_STARTUP_ID", -+ "DISPLAY", -+ "XAUTHORITY", -+ "DBUS_SESSION_BUS_ADDRESS", -+ "ORBIT_SOCKETDIR", -+#endif -+ NULL -+ }; -+ GPtrArray *saved_env; -+ gchar *opt_user; -+ pid_t pid_of_caller; -+ uid_t uid_of_caller; -+ struct stat statbuf; -+ -+ ret = 127; -+ authority = NULL; -+ subject = NULL; -+ details = NULL; -+ result = NULL; -+ action_id = NULL; -+ saved_env = NULL; -+ path = NULL; -+ command_line = NULL; -+ opt_user = NULL; -+ -+ /* check for correct invocation */ -+ if (geteuid () != 0) -+ { -+ g_printerr ("pkexec must be setuid root\n"); -+ goto out; -+ } -+ -+ original_user_name = g_strdup (g_get_user_name ()); -+ if (original_user_name == NULL) -+ { -+ g_printerr ("Error getting user name.\n"); -+ goto out; -+ } -+ -+ original_cwd = g_strdup (get_current_dir_name ()); -+ if (original_cwd == NULL) -+ { -+ g_printerr ("Error getting cwd.\n"); -+ goto out; -+ } -+ -+ /* First process options and find the command-line to invoke. Avoid using fancy library routines -+ * that depend on environtment variables since we haven't cleared the environment just yet. -+ */ -+ opt_show_help = FALSE; -+ opt_show_version = FALSE; -+ for (n = 1; n < (guint) argc; n++) -+ { -+ if (strcmp (argv[n], "--help") == 0) -+ { -+ opt_show_help = TRUE; -+ } -+ else if (strcmp (argv[n], "--version") == 0) -+ { -+ opt_show_version = TRUE; -+ } -+ else if (strcmp (argv[n], "--user") == 0 || strcmp (argv[n], "-u") == 0) -+ { -+ n++; -+ if (n >= (guint) argc) -+ { -+ usage (argc, argv); -+ goto out; -+ } -+ -+ opt_user = g_strdup (argv[n]); -+ } -+ else -+ { -+ break; -+ } -+ } -+ -+ if (opt_show_help) -+ { -+ usage (argc, argv); -+ ret = 0; -+ goto out; -+ } -+ else if (opt_show_version) -+ { -+ g_print ("pkexec version %s\n", PACKAGE_VERSION); -+ ret = 0; -+ goto out; -+ } -+ -+ if (opt_user == NULL) -+ opt_user = g_strdup ("root"); -+ -+ /* Now figure out the command-line to run - argv is guaranteed to be NULL-terminated, see -+ * -+ * http://lkml.indiana.edu/hypermail/linux/kernel/0409.2/0287.html -+ * -+ * but do check this is the case. -+ * -+ * We also try to locate the program in the path if a non-absolute path is given. -+ */ -+ g_assert (argv[argc] == NULL); -+ path = g_strdup (argv[n]); -+ if (path == NULL) -+ { -+ usage (argc, argv); -+ goto out; -+ } -+ if (path[0] != '/') -+ { -+ /* g_find_program_in_path() is not suspectible to attacks via the environment */ -+ s = g_find_program_in_path (path); -+ if (s == NULL) -+ { -+ g_printerr ("Cannot run program %s: %s\n", path, strerror (ENOENT)); -+ goto out; -+ } -+ g_free (path); -+ argv[n] = path = s; -+ } -+ if (stat (path, &statbuf) != 0) -+ { -+ g_printerr ("Error getting information about %s: %s\n", path, g_strerror (errno)); -+ goto out; -+ } -+ command_line = g_strjoinv (" ", argv + n); -+ exec_argv = argv + n; -+ -+ /* Look up information about the user we care about - yes, the return -+ * value of this function is a bit funky -+ */ -+ rc = getpwnam_r (opt_user, &pwstruct, pwbuf, sizeof pwbuf, &pw); -+ if (rc == 0 && pw == NULL) -+ { -+ g_printerr ("User `%s' does not exist.\n", opt_user); -+ goto out; -+ } -+ else if (pw == NULL) -+ { -+ g_printerr ("Error getting information for user `%s': %s\n", opt_user, g_strerror (rc)); -+ goto out; -+ } -+ -+ /* now save the environment variables we care about */ -+ saved_env = g_ptr_array_new (); -+ for (n = 0; environment_variables_to_save[n] != NULL; n++) -+ { -+ const gchar *key = environment_variables_to_save[n]; -+ const gchar *value; -+ -+ value = g_getenv (key); -+ if (value == NULL) -+ continue; -+ -+ /* To qualify for the paranoia goldstar - we validate the value of each -+ * environment variable passed through - this is to attempt to avoid -+ * exploits in (potentially broken) programs launched via pkexec(1). -+ */ -+ if (!validate_environment_variable (key, value)) -+ goto out; -+ -+ g_ptr_array_add (saved_env, g_strdup (key)); -+ g_ptr_array_add (saved_env, g_strdup (value)); -+ } -+ -+ /* Nuke the environment to get a well-known and sanitized environment to avoid attacks -+ * via e.g. the DBUS_SYSTEM_BUS_ADDRESS environment variable and similar. -+ */ -+ if (clearenv () != 0) -+ { -+ g_printerr ("Error clearing environment: %s\n", g_strerror (errno)); -+ goto out; -+ } -+ -+ /* Initialize the GLib type system - this is needed to interact with the -+ * PolicyKit daemon -+ */ -+ g_type_init (); -+ -+ /* now check if the program that invoked us is authorized */ -+ pid_of_caller = getppid (); -+ if (pid_of_caller == 1) -+ { -+ /* getppid() can return 1 if the parent died (meaning that we are reaped -+ * by /sbin/init); get process group leader instead - for example, this -+ * happens when launching via gnome-panel (alt+f2, then 'pkexec gedit'). -+ */ -+ pid_of_caller = getpgrp (); -+ } -+ -+ subject = polkit_unix_process_new (pid_of_caller); -+ if (subject == NULL) -+ { -+ g_printerr ("No such process for pid %d: %s\n", (gint) pid_of_caller, error->message); -+ g_error_free (error); -+ goto out; -+ } -+ -+ /* paranoia: check that the uid of pid_of_caller matches getuid() */ -+ error = NULL; -+ uid_of_caller = polkit_unix_process_get_owner (POLKIT_UNIX_PROCESS (subject), -+ &error); -+ if (error != NULL) -+ { -+ g_printerr ("Error determing pid of caller (pid %d): %s\n", (gint) pid_of_caller, error->message); -+ g_error_free (error); -+ goto out; -+ } -+ if (uid_of_caller != getuid ()) -+ { -+ g_printerr ("User of caller (%d) does not match our uid (%d)\n", uid_of_caller, getuid ()); -+ goto out; -+ } -+ -+ authority = polkit_authority_get (); -+ -+ details = polkit_details_new (); -+ -+ polkit_details_insert (details, "command-line", command_line); -+ s = g_strdup_printf ("%s (%s)", pw->pw_gecos, pw->pw_name); -+ polkit_details_insert (details, "user", s); -+ g_free (s); -+ s = g_strdup_printf ("%d", (gint) pw->pw_uid); -+ polkit_details_insert (details, "uid", s); -+ g_free (s); -+ polkit_details_insert (details, "program", path); -+ -+ action_id = find_action_for_path (authority, path); -+ g_assert (action_id != NULL); -+ -+ error = NULL; -+ result = polkit_authority_check_authorization_sync (authority, -+ subject, -+ action_id, -+ details, -+ POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION, -+ NULL, -+ &error); -+ if (result == NULL) -+ { -+ g_printerr ("Error checking for authorization %s: %s\n", -+ action_id, -+ error->message); -+ goto out; -+ } -+ -+ if (polkit_authorization_result_get_is_authorized (result)) -+ { -+ /* do nothing */ -+ } -+ else if (polkit_authorization_result_get_is_challenge (result)) -+ { -+ g_printerr ("Error executing command as another user: No authentication agent was found.\n"); -+ goto out; -+ } -+ else -+ { -+ log_message (LOG_WARNING, TRUE, -+ "Error executing command as another user: Not authorized"); -+ g_printerr ("\n" -+ "This incident has been reported.\n"); -+ goto out; -+ } -+ -+ /* Set PATH to a safe list */ -+ g_ptr_array_add (saved_env, g_strdup ("PATH")); -+ if (pw->pw_uid != 0) -+ s = g_strdup_printf ("/usr/bin:/bin:/usr/sbin:/sbin:%s/bin", pw->pw_dir); -+ else -+ s = g_strdup_printf ("/usr/sbin:/usr/bin:/sbin:/bin:%s/bin", pw->pw_dir); -+ g_ptr_array_add (saved_env, s); -+ g_ptr_array_add (saved_env, g_strdup ("LOGNAME")); -+ g_ptr_array_add (saved_env, g_strdup (pw->pw_name)); -+ g_ptr_array_add (saved_env, g_strdup ("USER")); -+ g_ptr_array_add (saved_env, g_strdup (pw->pw_name)); -+ g_ptr_array_add (saved_env, g_strdup ("HOME")); -+ g_ptr_array_add (saved_env, g_strdup (pw->pw_dir)); -+ -+ s = g_strdup_printf ("%d", getuid ()); -+ g_ptr_array_add (saved_env, g_strdup ("PKEXEC_UID")); -+ g_ptr_array_add (saved_env, s); -+ -+ /* set the environment */ -+ for (n = 0; n < saved_env->len - 1; n += 2) -+ { -+ const gchar *key = saved_env->pdata[n]; -+ const gchar *value = saved_env->pdata[n + 1]; -+ -+ if (!g_setenv (key, value, TRUE)) -+ { -+ g_printerr ("Error setting environment variable %s to '%s': %s\n", -+ key, -+ value, -+ g_strerror (errno)); -+ goto out; -+ } -+ } -+ -+ /* set close_on_exec on all file descriptors except stdin, stdout, stderr */ -+ if (!fdwalk (set_close_on_exec, GINT_TO_POINTER (3))) -+ { -+ g_printerr ("Error setting close-on-exec for file desriptors\n"); -+ goto out; -+ } -+ -+ /* if not changing to uid 0, become uid 0 before changing to the user */ -+ if (pw->pw_uid != 0) -+ { -+ setreuid (0, 0); -+ if ((geteuid () != 0) || (getuid () != 0)) -+ { -+ g_printerr ("Error becoming uid 0: %s\n", g_strerror (errno)); -+ goto out; -+ } -+ } -+ -+ /* open session - with PAM enabled, this runs the open_session() part of the PAM -+ * stack - this includes applying limits via pam_limits.so but also other things -+ * requested via the current PAM configuration. -+ * -+ * NOTE NOTE NOTE: pam_limits.so doesn't seem to clear existing limits - e.g. -+ * -+ * $ ulimit -t -+ * unlimited -+ * -+ * $ su - -+ * Password: -+ * # ulimit -t -+ * unlimited -+ * # logout -+ * -+ * $ ulimit -t 1000 -+ * $ ulimit -t -+ * 1000 -+ * $ su - -+ * Password: -+ * # ulimit -t -+ * 1000 -+ * -+ * TODO: The question here is whether we should clear the limits before applying them? -+ * As evident above, neither su(1) (and, for that matter, nor sudo(8)) does this. -+ */ -+ if (!open_session (pw->pw_name)) -+ { -+ goto out; -+ } -+ -+ /* become the user */ -+ if (setgroups (0, NULL) != 0) -+ { -+ g_printerr ("Error setting groups: %s\n", g_strerror (errno)); -+ goto out; -+ } -+ if (initgroups (pw->pw_name, pw->pw_gid) != 0) -+ { -+ g_printerr ("Error initializing groups for %s: %s\n", pw->pw_name, g_strerror (errno)); -+ goto out; -+ } -+ setregid (pw->pw_gid, pw->pw_gid); -+ setreuid (pw->pw_uid, pw->pw_uid); -+ if ((geteuid () != pw->pw_uid) || (getuid () != pw->pw_uid) || -+ (getegid () != pw->pw_gid) || (getgid () != pw->pw_gid)) -+ { -+ g_printerr ("Error becoming real+effective uid %d and gid %d: %s\n", pw->pw_uid, pw->pw_gid, g_strerror (errno)); -+ goto out; -+ } -+ -+ /* change to home directory */ -+ if (chdir (pw->pw_dir) != 0) -+ { -+ g_printerr ("Error changing to home directory %s: %s\n", pw->pw_dir, g_strerror (errno)); -+ goto out; -+ } -+ -+ /* Log the fact that we're executing a command */ -+ log_message (LOG_NOTICE, FALSE, "Executing command"); -+ -+ /* exec the program */ -+ if (execv (path, exec_argv) != 0) -+ { -+ g_printerr ("Error executing %s: %s\n", path, g_strerror (errno)); -+ goto out; -+ } -+ -+ /* if exec doesn't fail, it never returns... */ -+ g_assert_not_reached (); -+ -+ out: -+ if (result != NULL) -+ g_object_unref (result); -+ -+ g_free (action_id); -+ -+ if (details != NULL) -+ g_object_unref (details); -+ -+ if (subject != NULL) -+ g_object_unref (subject); -+ -+ if (authority != NULL) -+ g_object_unref (authority); -+ -+ if (saved_env != NULL) -+ { -+ g_ptr_array_foreach (saved_env, (GFunc) g_free, NULL); -+ g_ptr_array_free (saved_env, TRUE); -+ } -+ -+ g_free (path); -+ g_free (command_line); -+ g_free (opt_user); -+ g_free (original_user_name); -+ g_free (original_cwd); -+ -+ return ret; -+} -+ diff --git a/packages/security/polkit/patches/polkit-1-shadow.readme b/packages/security/polkit/patches/polkit-1-shadow.readme deleted file mode 100644 index 27e1eca9a6..0000000000 --- a/packages/security/polkit/patches/polkit-1-shadow.readme +++ /dev/null @@ -1,2 +0,0 @@ -http://lists.freedesktop.org/archives/polkit-devel/2010-January/000288.html -http://mirrors.dotsrc.org/slackware/slackware-13.1/source/l/polkit/ \ No newline at end of file diff --git a/packages/security/polkit/url b/packages/security/polkit/url deleted file mode 100644 index d9613275dc..0000000000 --- a/packages/security/polkit/url +++ /dev/null @@ -1 +0,0 @@ -http://hal.freedesktop.org/releases/polkit-0.96.tar.gz \ No newline at end of file diff --git a/packages/sysutils/ConsoleKit/build b/packages/sysutils/ConsoleKit/build index de5f370d75..414e8b6743 100755 --- a/packages/sysutils/ConsoleKit/build +++ b/packages/sysutils/ConsoleKit/build @@ -2,11 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build dbus -$SCRIPTS/build dbus-glib -$SCRIPTS/build polkit - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/sysutils/ConsoleKit/install b/packages/sysutils/ConsoleKit/install index 59bce68b93..0f67e9afde 100755 --- a/packages/sysutils/ConsoleKit/install +++ b/packages/sysutils/ConsoleKit/install @@ -2,10 +2,6 @@ . config/options $1 -$SCRIPTS/install dbus -$SCRIPTS/install dbus-glib -$SCRIPTS/install polkit - mkdir -p $INSTALL/etc/ConsoleKit/run-seat.d mkdir -p $INSTALL/etc/ConsoleKit/run-session.d mkdir -p $INSTALL/etc/ConsoleKit/seats.d diff --git a/packages/sysutils/ConsoleKit/meta b/packages/sysutils/ConsoleKit/meta new file mode 100644 index 0000000000..7869f3b54e --- /dev/null +++ b/packages/sysutils/ConsoleKit/meta @@ -0,0 +1,16 @@ +PKG_NAME="ConsoleKit" +PKG_VERSION="0.4.2" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.freedesktop.org/wiki/Software/ConsoleKit" +PKG_URL="http://www.freedesktop.org/software/ConsoleKit/dist/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="dbus dbus-glib polkit" +PKG_BUILD_DEPENDS="toolchain dbus dbus-glib polkit" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="ConsoleKit: a framework for defining and tracking users, login sessions, and seats." +PKG_LONGDESC="ConsoleKit is a framework for defining and tracking users, login sessions, and seats." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/sysutils/ConsoleKit/url b/packages/sysutils/ConsoleKit/url deleted file mode 100644 index 5641dfba24..0000000000 --- a/packages/sysutils/ConsoleKit/url +++ /dev/null @@ -1 +0,0 @@ -http://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-0.4.1.tar.bz2 \ No newline at end of file diff --git a/packages/sysutils/LVM2/build b/packages/sysutils/LVM2/build index 42885fd48e..eb9f772b84 100755 --- a/packages/sysutils/LVM2/build +++ b/packages/sysutils/LVM2/build @@ -2,9 +2,7 @@ . config/options $1 -$SCRIPTS/build toolchain - -cd $BUILD/$1* +cd $PKG_BUILD ac_cv_func_malloc_0_nonnull=yes \ ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/sysutils/LVM2/install b/packages/sysutils/LVM2/install index 447ce64cfd..2c82305b3c 100755 --- a/packages/sysutils/LVM2/install +++ b/packages/sysutils/LVM2/install @@ -3,20 +3,13 @@ . config/options $1 mkdir -p $INSTALL/etc/lvm - cp $BUILD/$1*/doc/example.conf $INSTALL/etc/lvm/lvm.conf + cp $PKG_BUILD/doc/example.conf $INSTALL/etc/lvm/lvm.conf mkdir -p $INSTALL/usr/lib - cp -P $BUILD/$1*/libdm/ioctl/libdevmapper.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/libdm/ioctl/libdevmapper.so* $INSTALL/usr/lib if [ "$DEVTOOLS" = yes ]; then mkdir -p $INSTALL/sbin - cp $BUILD/$1*/tools/lvm $INSTALL/sbin - - mkdir -p $INSTALL/usr/lib -# cp -P $BUILD/$1*/liblvm/liblvm2app.so $INSTALL/usr/lib/liblvm2app.so.2.1 -# ln -sf /usr/lib/liblvm2app.so.2.1 $INSTALL/usr/lib/liblvm2app.so - -# cp -P $BUILD/$1*/tools/liblvm2cmd.so $INSTALL/usr/lib/liblvm2cmd.so.2.02 -# ln -sf /usr/lib/liblvm2cmd.2.02 $INSTALL/usr/lib/liblvm2cmd.so + cp $PKG_BUILD/tools/lvm $INSTALL/sbin fi diff --git a/packages/sysutils/LVM2/meta b/packages/sysutils/LVM2/meta new file mode 100644 index 0000000000..0395712e75 --- /dev/null +++ b/packages/sysutils/LVM2/meta @@ -0,0 +1,16 @@ +PKG_NAME="LVM2" +PKG_VERSION="2.02.75" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="" +PKG_SITE="http://sources.redhat.com/lvm2/" +PKG_URL="ftp://sources.redhat.com/pub/lvm2/${PKG_NAME}.${PKG_VERSION}.tgz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="lvm2: Logical Volume Management (Version 2)" +PKG_LONGDESC="LVM includes all of the support for handling read/write operations on physical volumes (hard disks, RAID-Systems, magneto optical, etc., multiple devices (MD), see mdadd(8) or even loop devices, see losetup(8)), creating volume groups (kind of virtual disks) from one or more physical volumes and creating one or more logical volumes (kind of logical partitions) in volume groups. This 2nd version is based on device-mapper available in linux-2.6." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/sysutils/LVM2/url b/packages/sysutils/LVM2/url deleted file mode 100644 index e25f8a9808..0000000000 --- a/packages/sysutils/LVM2/url +++ /dev/null @@ -1 +0,0 @@ -ftp://sources.redhat.com/pub/lvm2/LVM2.2.02.68.tgz diff --git a/packages/sysutils/acpid/build b/packages/sysutils/acpid/build index 9153c4aac6..56feb9c9b4 100755 --- a/packages/sysutils/acpid/build +++ b/packages/sysutils/acpid/build @@ -2,8 +2,8 @@ . config/options $1 -$SCRIPTS/build toolchain +LDFLAGS="$CFLAGS $LDFLAGS -fwhole-program" cd $PKG_BUILD -make +make OPT="$CFLAGS" diff --git a/packages/sysutils/acpid/meta b/packages/sysutils/acpid/meta new file mode 100644 index 0000000000..2da5636227 --- /dev/null +++ b/packages/sysutils/acpid/meta @@ -0,0 +1,16 @@ +PKG_NAME="acpid" +PKG_VERSION="2.0.7" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://acpid.sourceforge.net/" +PKG_URL="http://www.tedfelix.com/linux/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="acpid: A daemon for delivering ACPI events" +PKG_LONGDESC="ACPID is a completely flexible and expandable mechanism for delivering ACPI events from the kernel to user-space. It can be configured to perform any action at all when events occur, through regex matches and arbitrary action rules." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/sysutils/acpid/url b/packages/sysutils/acpid/url deleted file mode 100644 index 1ec9d9b4db..0000000000 --- a/packages/sysutils/acpid/url +++ /dev/null @@ -1 +0,0 @@ -http://www.tedfelix.com/linux/acpid-2.0.6.tar.gz \ No newline at end of file diff --git a/packages/sysutils/bash/meta b/packages/sysutils/bash/meta index e4d86f6385..6ac1f5cc90 100644 --- a/packages/sysutils/bash/meta +++ b/packages/sysutils/bash/meta @@ -3,12 +3,14 @@ PKG_VERSION="4.1" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" -PKG_SITE="http://http://www.gnu.org/software/bash " +PKG_SITE="http://http://www.gnu.org/software/bash" PKG_URL="http://ftp.gnu.org/gnu/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS="" PKG_BUILD_DEPENDS="toolchain" PKG_PRIORITY="required" PKG_SECTION="system" -PKG_SHORTDESC="Bourne Again Shell" +PKG_SHORTDESC="bash: Bourne Again Shell" PKG_LONGDESC="Bash is the shell, or command language interpreter, that will appear in the GNU operating system. Bash is an sh-compatible shell that incorporates useful features from the Korn shell (ksh) and C shell (csh). It is intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard. It offers functional improvements over sh for both programming and interactive use. In addition, most sh scripts can be run by Bash without modification." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/sysutils/bash/patches/bash-4.1-fixes-1.diff b/packages/sysutils/bash/patches/bash-4.1-fixes-1.patch similarity index 100% rename from packages/sysutils/bash/patches/bash-4.1-fixes-1.diff rename to packages/sysutils/bash/patches/bash-4.1-fixes-1.patch diff --git a/packages/sysutils/busybox-hosttools/build b/packages/sysutils/busybox-hosttools/build index 85f48a939f..86384260bd 100755 --- a/packages/sysutils/busybox-hosttools/build +++ b/packages/sysutils/busybox-hosttools/build @@ -11,8 +11,13 @@ cd $BUILD/busybox* cp $ROOT/$PKG_DIR/config/$1.conf .config make oldconfig - ARCH=$TARGET_ARCH make CROSS_COMPILE="" install + ARCH=$TARGET_ARCH make CROSS_COMPILE="" KBUILD_VERBOSE="1" install mkdir -p $ROOT/$TOOLCHAIN/bin - cp -R _install-hosttools/* $ROOT/$TOOLCHAIN + cp -R _install-hosttools/bin/* $ROOT/$TOOLCHAIN/bin chmod 4755 $ROOT/$TOOLCHAIN/bin/busybox + ln -sf busybox $ROOT/$TOOLCHAIN/bin/cryptpw + ln -sf busybox $ROOT/$TOOLCHAIN/bin/mkpasswd + + mkdir -p $ROOT/$TOOLCHAIN/sbin + ln -sf ../bin/busybox $ROOT/$TOOLCHAIN/sbin/depmod diff --git a/packages/sysutils/busybox-hosttools/config/busybox-hosttools.conf b/packages/sysutils/busybox-hosttools/config/busybox-hosttools.conf index 1e32ee95b6..3a9b3dd096 100644 --- a/packages/sysutils/busybox-hosttools/config/busybox-hosttools.conf +++ b/packages/sysutils/busybox-hosttools/config/busybox-hosttools.conf @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Busybox version: 1.17.0 -# Tue Jul 27 12:32:00 2010 +# Busybox version: 1.18.0 +# Tue Nov 23 18:28:14 2010 # CONFIG_HAVE_DOT_CONFIG=y @@ -16,6 +16,7 @@ CONFIG_HAVE_DOT_CONFIG=y # CONFIG_EXTRA_COMPAT is not set # CONFIG_INCLUDE_SUSv2 is not set # CONFIG_USE_PORTABLE_CODE is not set +CONFIG_PLATFORM_LINUX=y # CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y # CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set @@ -23,6 +24,7 @@ CONFIG_SHOW_USAGE=y CONFIG_FEATURE_VERBOSE_USAGE=y # CONFIG_FEATURE_COMPRESS_USAGE is not set # CONFIG_FEATURE_INSTALLER is not set +CONFIG_INSTALL_NO_USR=y # CONFIG_LOCALE_SUPPORT is not set CONFIG_UNICODE_SUPPORT=y # CONFIG_UNICODE_USING_LOCALE is not set @@ -37,8 +39,8 @@ CONFIG_LAST_SUPPORTED_WCHAR=767 # CONFIG_LONG_OPTS is not set # CONFIG_FEATURE_DEVPTS is not set # CONFIG_FEATURE_CLEAN_UP is not set -# CONFIG_FEATURE_UTMP is not set # CONFIG_FEATURE_WTMP is not set +# CONFIG_FEATURE_UTMP is not set # CONFIG_FEATURE_PIDFILE is not set # CONFIG_FEATURE_SUID is not set # CONFIG_FEATURE_SUID_CONFIG is not set @@ -73,9 +75,8 @@ CONFIG_NO_DEBUG_LIB=y # CONFIG_EFENCE is not set # -# Installation Options +# Installation Options ("make install" behavior) # -CONFIG_INSTALL_NO_USR=y CONFIG_INSTALL_APPLET_SYMLINKS=y # CONFIG_INSTALL_APPLET_HARDLINKS is not set # CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set @@ -92,6 +93,7 @@ CONFIG_PASSWORD_MINLEN=6 CONFIG_MD5_SIZE_VS_SPEED=1 CONFIG_FEATURE_FAST_TOP=y # CONFIG_FEATURE_ETC_NETWORKS is not set +# CONFIG_FEATURE_USE_TERMIOS is not set CONFIG_FEATURE_EDITING=y CONFIG_FEATURE_EDITING_MAX_LEN=1024 # CONFIG_FEATURE_EDITING_VI is not set @@ -172,6 +174,7 @@ CONFIG_MONOTONIC_SYSCALL=y # CONFIG_TR is not set # CONFIG_FEATURE_TR_CLASSES is not set # CONFIG_FEATURE_TR_EQUIV is not set +# CONFIG_BASE64 is not set # CONFIG_CAL is not set # CONFIG_CATV is not set # CONFIG_CHGRP is not set @@ -326,6 +329,7 @@ CONFIG_DEFAULT_SETFONT_DIR="" # # Editors # +# CONFIG_PATCH is not set # CONFIG_AWK is not set # CONFIG_FEATURE_AWK_LIBM is not set # CONFIG_CMP is not set @@ -333,7 +337,6 @@ CONFIG_DEFAULT_SETFONT_DIR="" # CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set # CONFIG_FEATURE_DIFF_DIR is not set # CONFIG_ED is not set -# CONFIG_PATCH is not set # CONFIG_SED is not set # CONFIG_VI is not set CONFIG_FEATURE_VI_MAX_LEN=0 @@ -393,6 +396,9 @@ CONFIG_FEATURE_VI_MAX_LEN=0 # CONFIG_BOOTCHARTD is not set # CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set # CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set +# CONFIG_HALT is not set +# CONFIG_FEATURE_CALL_TELINIT is not set +CONFIG_TELINIT_PATH="" # CONFIG_INIT is not set # CONFIG_FEATURE_USE_INITTAB is not set # CONFIG_FEATURE_KILL_REMOVED is not set @@ -402,30 +408,30 @@ CONFIG_FEATURE_KILL_DELAY=0 # CONFIG_FEATURE_EXTRA_QUIET is not set # CONFIG_FEATURE_INIT_COREDUMPS is not set # CONFIG_FEATURE_INITRD is not set -# CONFIG_HALT is not set -# CONFIG_FEATURE_CALL_TELINIT is not set -CONFIG_TELINIT_PATH="" +CONFIG_INIT_TERMINAL_TYPE="" # CONFIG_MESG is not set # # Login/Password Management Utilities # +# CONFIG_ADD_SHELL is not set +# CONFIG_REMOVE_SHELL is not set # CONFIG_FEATURE_SHADOWPASSWDS is not set # CONFIG_USE_BB_PWD_GRP is not set # CONFIG_USE_BB_SHADOW is not set # CONFIG_USE_BB_CRYPT is not set # CONFIG_USE_BB_CRYPT_SHA is not set +# CONFIG_ADDUSER is not set +# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set +# CONFIG_FEATURE_CHECK_NAMES is not set +CONFIG_FIRST_SYSTEM_ID=0 +CONFIG_LAST_SYSTEM_ID=0 # CONFIG_ADDGROUP is not set # CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set # CONFIG_FEATURE_ADDUSER_TO_GROUP is not set +# CONFIG_DELUSER is not set # CONFIG_DELGROUP is not set # CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set -# CONFIG_FEATURE_CHECK_NAMES is not set -# CONFIG_ADDUSER is not set -# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set -CONFIG_FIRST_SYSTEM_ID=0 -CONFIG_LAST_SYSTEM_ID=0 -# CONFIG_DELUSER is not set # CONFIG_GETTY is not set # CONFIG_LOGIN is not set # CONFIG_PAM is not set @@ -484,6 +490,7 @@ CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" # # Linux System Utilities # +# CONFIG_BLOCKDEV is not set # CONFIG_REV is not set # CONFIG_ACPID is not set # CONFIG_FEATURE_ACPID_COMPAT is not set @@ -502,6 +509,7 @@ CONFIG_FDISK_SUPPORT_LARGE_DISKS=y # CONFIG_FEATURE_SGI_LABEL is not set # CONFIG_FEATURE_SUN_LABEL is not set # CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_GPT_LABEL is not set # CONFIG_FEATURE_FDISK_ADVANCED is not set # CONFIG_FINDFS is not set # CONFIG_FLOCK is not set @@ -534,7 +542,6 @@ CONFIG_FDISK_SUPPORT_LARGE_DISKS=y # CONFIG_MKSWAP is not set # CONFIG_FEATURE_MKSWAP_UUID is not set # CONFIG_MORE is not set -# CONFIG_FEATURE_USE_TERMIOS is not set # CONFIG_MOUNT is not set # CONFIG_FEATURE_MOUNT_FAKE is not set # CONFIG_FEATURE_MOUNT_VERBOSE is not set @@ -583,10 +590,13 @@ CONFIG_FDISK_SUPPORT_LARGE_DISKS=y # Miscellaneous Utilities # # CONFIG_CONSPY is not set +# CONFIG_NANDWRITE is not set +# CONFIG_NANDDUMP is not set # CONFIG_UBIATTACH is not set # CONFIG_UBIDETACH is not set # CONFIG_ADJTIMEX is not set # CONFIG_BBCONFIG is not set +# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set # CONFIG_BEEP is not set CONFIG_FEATURE_BEEP_FREQ=0 CONFIG_FEATURE_BEEP_LENGTH_MS=0 @@ -666,6 +676,7 @@ CONFIG_FEATURE_LESS_MAXLINES=0 # # Networking Utilities # +# CONFIG_NBDCLIENT is not set # CONFIG_NC is not set # CONFIG_NC_SERVER is not set # CONFIG_NC_EXTRA is not set @@ -701,6 +712,7 @@ CONFIG_FEATURE_LESS_MAXLINES=0 # CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set # CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set # CONFIG_FEATURE_HTTPD_PROXY is not set +# CONFIG_FEATURE_HTTPD_GZIP is not set # CONFIG_IFCONFIG is not set # CONFIG_FEATURE_IFCONFIG_STATUS is not set # CONFIG_FEATURE_IFCONFIG_SLIP is not set @@ -795,6 +807,7 @@ CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="" # CONFIG_FEATURE_WGET_STATUSBAR is not set # CONFIG_FEATURE_WGET_AUTHENTICATION is not set # CONFIG_FEATURE_WGET_LONG_OPTIONS is not set +# CONFIG_FEATURE_WGET_TIMEOUT is not set # CONFIG_ZCIP is not set # @@ -818,6 +831,10 @@ CONFIG_FEATURE_MIME_CHARSET="" # # Process Utilities # +# CONFIG_IOSTAT is not set +# CONFIG_MPSTAT is not set +# CONFIG_PMAP is not set +# CONFIG_POWERTOP is not set # CONFIG_SMEMCAP is not set # CONFIG_FREE is not set # CONFIG_FUSER is not set @@ -894,10 +911,13 @@ CONFIG_SV_DEFAULT_SERVICE_DIR="" # CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set # CONFIG_ASH_RANDOM_SUPPORT is not set # CONFIG_ASH_EXPAND_PRMT is not set +# CONFIG_CTTYHACK is not set # CONFIG_HUSH is not set # CONFIG_HUSH_BASH_COMPAT is not set +# CONFIG_HUSH_BRACE_EXPANSION is not set # CONFIG_HUSH_HELP is not set # CONFIG_HUSH_INTERACTIVE is not set +# CONFIG_HUSH_SAVEHISTORY is not set # CONFIG_HUSH_JOB is not set # CONFIG_HUSH_TICK is not set # CONFIG_HUSH_IF is not set @@ -905,22 +925,21 @@ CONFIG_SV_DEFAULT_SERVICE_DIR="" # CONFIG_HUSH_CASE is not set # CONFIG_HUSH_FUNCTIONS is not set # CONFIG_HUSH_LOCAL is not set -# CONFIG_HUSH_EXPORT_N is not set # CONFIG_HUSH_RANDOM_SUPPORT is not set +# CONFIG_HUSH_EXPORT_N is not set +# CONFIG_HUSH_MODE_X is not set +# CONFIG_MSH is not set # CONFIG_FEATURE_SH_IS_ASH is not set # CONFIG_FEATURE_SH_IS_HUSH is not set CONFIG_FEATURE_SH_IS_NONE=y # CONFIG_FEATURE_BASH_IS_ASH is not set # CONFIG_FEATURE_BASH_IS_HUSH is not set CONFIG_FEATURE_BASH_IS_NONE=y -# CONFIG_LASH is not set -# CONFIG_MSH is not set # CONFIG_SH_MATH_SUPPORT is not set # CONFIG_SH_MATH_SUPPORT_64 is not set # CONFIG_FEATURE_SH_EXTRA_QUIET is not set # CONFIG_FEATURE_SH_STANDALONE is not set # CONFIG_FEATURE_SH_NOFORK is not set -# CONFIG_CTTYHACK is not set # # System Logging Utilities @@ -935,4 +954,5 @@ CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0 # CONFIG_LOGREAD is not set # CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set # CONFIG_KLOGD is not set +# CONFIG_FEATURE_KLOGD_KLOGCTL is not set # CONFIG_LOGGER is not set diff --git a/packages/sysutils/busybox-hosttools/meta b/packages/sysutils/busybox-hosttools/meta index 0b1f9273ab..e68816fdd4 100644 --- a/packages/sysutils/busybox-hosttools/meta +++ b/packages/sysutils/busybox-hosttools/meta @@ -12,3 +12,5 @@ PKG_SECTION="system" PKG_SHORTDESC="BusyBox: The Swiss Army Knife of Embedded Linux" PKG_LONGDESC="BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full-featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox provides a fairly complete environment for any small or embedded system." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/sysutils/busybox-initramfs/build b/packages/sysutils/busybox-initramfs/build index 17ec507b18..fb04de2490 100755 --- a/packages/sysutils/busybox-initramfs/build +++ b/packages/sysutils/busybox-initramfs/build @@ -10,6 +10,11 @@ else BUSYBOX_CFG_FILE=$ROOT/$PKG_DIR/config/$1.conf fi +# optimize for size + CFLAGS=`echo $CFLAGS | sed -e "s|-O.|-Os|"` + +LDFLAGS="$LDFLAGS -fwhole-program" + cd $BUILD/busybox* # Build Busybox for initramfs @@ -17,4 +22,8 @@ cd $BUILD/busybox* cp $BUSYBOX_CFG_FILE .config make oldconfig - ARCH=$TARGET_ARCH make install + make ARCH=$TARGET_ARCH \ + HOSTCC=$HOST_CC \ + CROSS_COMPILE=$TARGET_PREFIX \ + KBUILD_VERBOSE="1" \ + install diff --git a/packages/sysutils/busybox-initramfs/config/busybox-initramfs.conf b/packages/sysutils/busybox-initramfs/config/busybox-initramfs.conf index 570af963c7..0d3038fa5e 100644 --- a/packages/sysutils/busybox-initramfs/config/busybox-initramfs.conf +++ b/packages/sysutils/busybox-initramfs/config/busybox-initramfs.conf @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Busybox version: 1.17.3 -# Thu Oct 28 23:39:58 2010 +# Busybox version: 1.18.0 +# Tue Nov 23 18:27:38 2010 # CONFIG_HAVE_DOT_CONFIG=y @@ -16,6 +16,7 @@ CONFIG_HAVE_DOT_CONFIG=y # CONFIG_EXTRA_COMPAT is not set # CONFIG_INCLUDE_SUSv2 is not set # CONFIG_USE_PORTABLE_CODE is not set +CONFIG_PLATFORM_LINUX=y # CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y # CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set @@ -23,6 +24,7 @@ CONFIG_SHOW_USAGE=y CONFIG_FEATURE_VERBOSE_USAGE=y # CONFIG_FEATURE_COMPRESS_USAGE is not set # CONFIG_FEATURE_INSTALLER is not set +# CONFIG_INSTALL_NO_USR is not set # CONFIG_LOCALE_SUPPORT is not set CONFIG_UNICODE_SUPPORT=y # CONFIG_UNICODE_USING_LOCALE is not set @@ -37,8 +39,8 @@ CONFIG_LAST_SUPPORTED_WCHAR=767 # CONFIG_LONG_OPTS is not set CONFIG_FEATURE_DEVPTS=y # CONFIG_FEATURE_CLEAN_UP is not set -# CONFIG_FEATURE_UTMP is not set # CONFIG_FEATURE_WTMP is not set +# CONFIG_FEATURE_UTMP is not set # CONFIG_FEATURE_PIDFILE is not set # CONFIG_FEATURE_SUID is not set # CONFIG_FEATURE_SUID_CONFIG is not set @@ -73,9 +75,8 @@ CONFIG_NO_DEBUG_LIB=y # CONFIG_EFENCE is not set # -# Installation Options +# Installation Options ("make install" behavior) # -CONFIG_INSTALL_NO_USR=y # CONFIG_INSTALL_APPLET_SYMLINKS is not set # CONFIG_INSTALL_APPLET_HARDLINKS is not set # CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set @@ -92,6 +93,7 @@ CONFIG_PASSWORD_MINLEN=6 CONFIG_MD5_SIZE_VS_SPEED=1 CONFIG_FEATURE_FAST_TOP=y # CONFIG_FEATURE_ETC_NETWORKS is not set +# CONFIG_FEATURE_USE_TERMIOS is not set CONFIG_FEATURE_EDITING=y CONFIG_FEATURE_EDITING_MAX_LEN=1024 # CONFIG_FEATURE_EDITING_VI is not set @@ -172,6 +174,7 @@ CONFIG_FEATURE_TEST_64=y # CONFIG_TR is not set # CONFIG_FEATURE_TR_CLASSES is not set # CONFIG_FEATURE_TR_EQUIV is not set +# CONFIG_BASE64 is not set # CONFIG_CAL is not set # CONFIG_CATV is not set # CONFIG_CHGRP is not set @@ -224,7 +227,7 @@ CONFIG_LS=y # CONFIG_FEATURE_LS_USERNAME is not set # CONFIG_FEATURE_LS_COLOR is not set # CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set -# CONFIG_MD5SUM is not set +CONFIG_MD5SUM=y CONFIG_MKDIR=y # CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set # CONFIG_MKFIFO is not set @@ -294,6 +297,10 @@ CONFIG_USLEEP=y # Common options for df, du, ls # # CONFIG_FEATURE_HUMAN_READABLE is not set + +# +# Common options for md5sum, sha1sum, sha256sum, sha512sum +# # CONFIG_FEATURE_MD5_SHA1_SUM_CHECK is not set # @@ -338,6 +345,7 @@ CONFIG_DEFAULT_SETFONT_DIR="" # # Editors # +# CONFIG_PATCH is not set # CONFIG_AWK is not set # CONFIG_FEATURE_AWK_LIBM is not set # CONFIG_CMP is not set @@ -345,7 +353,6 @@ CONFIG_DEFAULT_SETFONT_DIR="" # CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set # CONFIG_FEATURE_DIFF_DIR is not set # CONFIG_ED is not set -# CONFIG_PATCH is not set # CONFIG_SED is not set CONFIG_VI=y CONFIG_FEATURE_VI_MAX_LEN=4096 @@ -405,6 +412,9 @@ CONFIG_FEATURE_ALLOW_EXEC=y # CONFIG_BOOTCHARTD is not set # CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set # CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set +CONFIG_HALT=y +# CONFIG_FEATURE_CALL_TELINIT is not set +CONFIG_TELINIT_PATH="" # CONFIG_INIT is not set # CONFIG_FEATURE_USE_INITTAB is not set # CONFIG_FEATURE_KILL_REMOVED is not set @@ -414,30 +424,30 @@ CONFIG_FEATURE_KILL_DELAY=0 # CONFIG_FEATURE_EXTRA_QUIET is not set # CONFIG_FEATURE_INIT_COREDUMPS is not set # CONFIG_FEATURE_INITRD is not set -CONFIG_HALT=y -# CONFIG_FEATURE_CALL_TELINIT is not set -CONFIG_TELINIT_PATH="" +CONFIG_INIT_TERMINAL_TYPE="" # CONFIG_MESG is not set # # Login/Password Management Utilities # +# CONFIG_ADD_SHELL is not set +# CONFIG_REMOVE_SHELL is not set # CONFIG_FEATURE_SHADOWPASSWDS is not set # CONFIG_USE_BB_PWD_GRP is not set # CONFIG_USE_BB_SHADOW is not set # CONFIG_USE_BB_CRYPT is not set # CONFIG_USE_BB_CRYPT_SHA is not set +# CONFIG_ADDUSER is not set +# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set +# CONFIG_FEATURE_CHECK_NAMES is not set +CONFIG_FIRST_SYSTEM_ID=0 +CONFIG_LAST_SYSTEM_ID=0 # CONFIG_ADDGROUP is not set # CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set # CONFIG_FEATURE_ADDUSER_TO_GROUP is not set +# CONFIG_DELUSER is not set # CONFIG_DELGROUP is not set # CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set -# CONFIG_FEATURE_CHECK_NAMES is not set -# CONFIG_ADDUSER is not set -# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set -CONFIG_FIRST_SYSTEM_ID=0 -CONFIG_LAST_SYSTEM_ID=0 -# CONFIG_DELUSER is not set # CONFIG_GETTY is not set # CONFIG_LOGIN is not set # CONFIG_PAM is not set @@ -496,6 +506,7 @@ CONFIG_DEFAULT_DEPMOD_FILE="" # # Linux System Utilities # +# CONFIG_BLOCKDEV is not set # CONFIG_REV is not set # CONFIG_ACPID is not set # CONFIG_FEATURE_ACPID_COMPAT is not set @@ -514,6 +525,7 @@ CONFIG_FDISK_SUPPORT_LARGE_DISKS=y # CONFIG_FEATURE_SGI_LABEL is not set # CONFIG_FEATURE_SUN_LABEL is not set # CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_GPT_LABEL is not set # CONFIG_FEATURE_FDISK_ADVANCED is not set # CONFIG_FINDFS is not set # CONFIG_FLOCK is not set @@ -546,7 +558,6 @@ CONFIG_FDISK_SUPPORT_LARGE_DISKS=y # CONFIG_MKSWAP is not set # CONFIG_FEATURE_MKSWAP_UUID is not set # CONFIG_MORE is not set -# CONFIG_FEATURE_USE_TERMIOS is not set CONFIG_MOUNT=y CONFIG_FEATURE_MOUNT_FAKE=y # CONFIG_FEATURE_MOUNT_VERBOSE is not set @@ -603,10 +614,13 @@ CONFIG_FEATURE_VOLUMEID_LINUXRAID=y # Miscellaneous Utilities # # CONFIG_CONSPY is not set +# CONFIG_NANDWRITE is not set +# CONFIG_NANDDUMP is not set # CONFIG_UBIATTACH is not set # CONFIG_UBIDETACH is not set # CONFIG_ADJTIMEX is not set # CONFIG_BBCONFIG is not set +# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set # CONFIG_BEEP is not set CONFIG_FEATURE_BEEP_FREQ=0 CONFIG_FEATURE_BEEP_LENGTH_MS=0 @@ -686,6 +700,7 @@ CONFIG_FEATURE_LESS_MAXLINES=0 # # Networking Utilities # +# CONFIG_NBDCLIENT is not set # CONFIG_NC is not set # CONFIG_NC_SERVER is not set # CONFIG_NC_EXTRA is not set @@ -721,6 +736,7 @@ CONFIG_FEATURE_LESS_MAXLINES=0 # CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set # CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set # CONFIG_FEATURE_HTTPD_PROXY is not set +# CONFIG_FEATURE_HTTPD_GZIP is not set # CONFIG_IFCONFIG is not set # CONFIG_FEATURE_IFCONFIG_STATUS is not set # CONFIG_FEATURE_IFCONFIG_SLIP is not set @@ -815,6 +831,7 @@ CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="" # CONFIG_FEATURE_WGET_STATUSBAR is not set # CONFIG_FEATURE_WGET_AUTHENTICATION is not set # CONFIG_FEATURE_WGET_LONG_OPTIONS is not set +# CONFIG_FEATURE_WGET_TIMEOUT is not set # CONFIG_ZCIP is not set # @@ -838,6 +855,10 @@ CONFIG_FEATURE_MIME_CHARSET="" # # Process Utilities # +# CONFIG_IOSTAT is not set +# CONFIG_MPSTAT is not set +# CONFIG_PMAP is not set +# CONFIG_POWERTOP is not set # CONFIG_SMEMCAP is not set # CONFIG_FREE is not set # CONFIG_FUSER is not set @@ -914,10 +935,13 @@ CONFIG_ASH_BUILTIN_TEST=y # CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set # CONFIG_ASH_RANDOM_SUPPORT is not set # CONFIG_ASH_EXPAND_PRMT is not set +# CONFIG_CTTYHACK is not set # CONFIG_HUSH is not set # CONFIG_HUSH_BASH_COMPAT is not set +# CONFIG_HUSH_BRACE_EXPANSION is not set # CONFIG_HUSH_HELP is not set # CONFIG_HUSH_INTERACTIVE is not set +# CONFIG_HUSH_SAVEHISTORY is not set # CONFIG_HUSH_JOB is not set # CONFIG_HUSH_TICK is not set # CONFIG_HUSH_IF is not set @@ -925,22 +949,21 @@ CONFIG_ASH_BUILTIN_TEST=y # CONFIG_HUSH_CASE is not set # CONFIG_HUSH_FUNCTIONS is not set # CONFIG_HUSH_LOCAL is not set -# CONFIG_HUSH_EXPORT_N is not set # CONFIG_HUSH_RANDOM_SUPPORT is not set +# CONFIG_HUSH_EXPORT_N is not set +# CONFIG_HUSH_MODE_X is not set +# CONFIG_MSH is not set CONFIG_FEATURE_SH_IS_ASH=y # CONFIG_FEATURE_SH_IS_HUSH is not set # CONFIG_FEATURE_SH_IS_NONE is not set CONFIG_FEATURE_BASH_IS_ASH=y # CONFIG_FEATURE_BASH_IS_HUSH is not set # CONFIG_FEATURE_BASH_IS_NONE is not set -# CONFIG_LASH is not set -# CONFIG_MSH is not set CONFIG_SH_MATH_SUPPORT=y # CONFIG_SH_MATH_SUPPORT_64 is not set CONFIG_FEATURE_SH_EXTRA_QUIET=y CONFIG_FEATURE_SH_STANDALONE=y # CONFIG_FEATURE_SH_NOFORK is not set -# CONFIG_CTTYHACK is not set # # System Logging Utilities @@ -955,4 +978,5 @@ CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0 # CONFIG_LOGREAD is not set # CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set # CONFIG_KLOGD is not set +# CONFIG_FEATURE_KLOGD_KLOGCTL is not set # CONFIG_LOGGER is not set diff --git a/packages/sysutils/busybox-initramfs/meta b/packages/sysutils/busybox-initramfs/meta index af15c3c461..efa30aac56 100644 --- a/packages/sysutils/busybox-initramfs/meta +++ b/packages/sysutils/busybox-initramfs/meta @@ -12,3 +12,5 @@ PKG_SECTION="system" PKG_SHORTDESC="BusyBox: The Swiss Army Knife of Embedded Linux" PKG_LONGDESC="BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full-featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox provides a fairly complete environment for any small or embedded system." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/sysutils/busybox/build b/packages/sysutils/busybox/build index 4476274f91..1e1b99b9df 100755 --- a/packages/sysutils/busybox/build +++ b/packages/sysutils/busybox/build @@ -8,12 +8,20 @@ else BUSYBOX_CFG_FILE=$ROOT/$PKG_DIR/config/$1.conf fi +# optimize for size + CFLAGS=`echo $CFLAGS | sed -e "s|-O.|-Os|"` + +LDFLAGS="$LDFLAGS -fwhole-program" + cd $BUILD/busybox* # Build Busybox for system make distclean cp $BUSYBOX_CFG_FILE .config - [ -n "$TIMEZONE" ] && sed -i -e 's/^# CONFIG_HWCLOCK .*$/CONFIG_HWCLOCK=yes/g' -e 's/^# CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS .*/CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=yes/g' $BUSYBOX/.config make oldconfig - ARCH=$TARGET_ARCH make install + make ARCH=$TARGET_ARCH \ + HOSTCC=$HOST_CC \ + CROSS_COMPILE=$TARGET_PREFIX \ + KBUILD_VERBOSE="1" \ + install diff --git a/packages/sysutils/busybox/config/busybox.conf b/packages/sysutils/busybox/config/busybox.conf index 3cd2126b5b..1a41ef7974 100644 --- a/packages/sysutils/busybox/config/busybox.conf +++ b/packages/sysutils/busybox/config/busybox.conf @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Busybox version: 1.17.3 -# Thu Oct 28 23:38:16 2010 +# Busybox version: 1.18.0 +# Tue Nov 23 18:26:37 2010 # CONFIG_HAVE_DOT_CONFIG=y @@ -16,6 +16,7 @@ CONFIG_DESKTOP=y # CONFIG_EXTRA_COMPAT is not set # CONFIG_INCLUDE_SUSv2 is not set # CONFIG_USE_PORTABLE_CODE is not set +CONFIG_PLATFORM_LINUX=y # CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y # CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set @@ -23,6 +24,7 @@ CONFIG_SHOW_USAGE=y CONFIG_FEATURE_VERBOSE_USAGE=y # CONFIG_FEATURE_COMPRESS_USAGE is not set # CONFIG_FEATURE_INSTALLER is not set +# CONFIG_INSTALL_NO_USR is not set # CONFIG_LOCALE_SUPPORT is not set CONFIG_UNICODE_SUPPORT=y # CONFIG_UNICODE_USING_LOCALE is not set @@ -37,8 +39,8 @@ CONFIG_LAST_SUPPORTED_WCHAR=767 CONFIG_LONG_OPTS=y CONFIG_FEATURE_DEVPTS=y # CONFIG_FEATURE_CLEAN_UP is not set -CONFIG_FEATURE_UTMP=y CONFIG_FEATURE_WTMP=y +CONFIG_FEATURE_UTMP=y CONFIG_FEATURE_PIDFILE=y CONFIG_FEATURE_SUID=y # CONFIG_FEATURE_SUID_CONFIG is not set @@ -73,9 +75,8 @@ CONFIG_NO_DEBUG_LIB=y # CONFIG_EFENCE is not set # -# Installation Options +# Installation Options ("make install" behavior) # -# CONFIG_INSTALL_NO_USR is not set CONFIG_INSTALL_APPLET_SYMLINKS=y # CONFIG_INSTALL_APPLET_HARDLINKS is not set # CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set @@ -92,6 +93,7 @@ CONFIG_PASSWORD_MINLEN=6 CONFIG_MD5_SIZE_VS_SPEED=1 CONFIG_FEATURE_FAST_TOP=y # CONFIG_FEATURE_ETC_NETWORKS is not set +CONFIG_FEATURE_USE_TERMIOS=y CONFIG_FEATURE_EDITING=y CONFIG_FEATURE_EDITING_MAX_LEN=1024 # CONFIG_FEATURE_EDITING_VI is not set @@ -172,6 +174,7 @@ CONFIG_TEST=y CONFIG_TR=y CONFIG_FEATURE_TR_CLASSES=y CONFIG_FEATURE_TR_EQUIV=y +# CONFIG_BASE64 is not set # CONFIG_CAL is not set # CONFIG_CATV is not set # CONFIG_CHGRP is not set @@ -224,7 +227,7 @@ CONFIG_FEATURE_LS_TIMESTAMPS=y CONFIG_FEATURE_LS_USERNAME=y CONFIG_FEATURE_LS_COLOR=y CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y -# CONFIG_MD5SUM is not set +CONFIG_MD5SUM=y CONFIG_MKDIR=y CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y CONFIG_MKFIFO=y @@ -294,6 +297,10 @@ CONFIG_WHOAMI=y # Common options for df, du, ls # CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum, sha256sum, sha512sum +# # CONFIG_FEATURE_MD5_SHA1_SUM_CHECK is not set # @@ -338,6 +345,7 @@ CONFIG_WHICH=y # # Editors # +# CONFIG_PATCH is not set CONFIG_AWK=y CONFIG_FEATURE_AWK_LIBM=y # CONFIG_CMP is not set @@ -345,7 +353,6 @@ CONFIG_FEATURE_AWK_LIBM=y # CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set # CONFIG_FEATURE_DIFF_DIR is not set # CONFIG_ED is not set -# CONFIG_PATCH is not set CONFIG_SED=y CONFIG_VI=y CONFIG_FEATURE_VI_MAX_LEN=4096 @@ -405,6 +412,9 @@ CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y CONFIG_BOOTCHARTD=y CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER=y CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE=y +CONFIG_HALT=y +# CONFIG_FEATURE_CALL_TELINIT is not set +CONFIG_TELINIT_PATH="" # CONFIG_INIT is not set # CONFIG_FEATURE_USE_INITTAB is not set # CONFIG_FEATURE_KILL_REMOVED is not set @@ -414,30 +424,30 @@ CONFIG_FEATURE_KILL_DELAY=0 # CONFIG_FEATURE_EXTRA_QUIET is not set # CONFIG_FEATURE_INIT_COREDUMPS is not set # CONFIG_FEATURE_INITRD is not set -CONFIG_HALT=y -# CONFIG_FEATURE_CALL_TELINIT is not set -CONFIG_TELINIT_PATH="" +CONFIG_INIT_TERMINAL_TYPE="" # CONFIG_MESG is not set # # Login/Password Management Utilities # +# CONFIG_ADD_SHELL is not set +# CONFIG_REMOVE_SHELL is not set # CONFIG_FEATURE_SHADOWPASSWDS is not set CONFIG_USE_BB_PWD_GRP=y # CONFIG_USE_BB_SHADOW is not set CONFIG_USE_BB_CRYPT=y CONFIG_USE_BB_CRYPT_SHA=y +# CONFIG_ADDUSER is not set +# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set +# CONFIG_FEATURE_CHECK_NAMES is not set +CONFIG_FIRST_SYSTEM_ID=0 +CONFIG_LAST_SYSTEM_ID=0 # CONFIG_ADDGROUP is not set # CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set # CONFIG_FEATURE_ADDUSER_TO_GROUP is not set +# CONFIG_DELUSER is not set # CONFIG_DELGROUP is not set # CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set -# CONFIG_FEATURE_CHECK_NAMES is not set -# CONFIG_ADDUSER is not set -# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set -CONFIG_FIRST_SYSTEM_ID=0 -CONFIG_LAST_SYSTEM_ID=0 -# CONFIG_DELUSER is not set CONFIG_GETTY=y CONFIG_LOGIN=y # CONFIG_PAM is not set @@ -496,6 +506,7 @@ CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" # # Linux System Utilities # +# CONFIG_BLOCKDEV is not set # CONFIG_REV is not set # CONFIG_ACPID is not set # CONFIG_FEATURE_ACPID_COMPAT is not set @@ -514,6 +525,7 @@ CONFIG_FDISK_SUPPORT_LARGE_DISKS=y # CONFIG_FEATURE_SGI_LABEL is not set # CONFIG_FEATURE_SUN_LABEL is not set # CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_GPT_LABEL is not set # CONFIG_FEATURE_FDISK_ADVANCED is not set CONFIG_FINDFS=y CONFIG_FLOCK=y @@ -546,7 +558,6 @@ CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y CONFIG_MKSWAP=y CONFIG_FEATURE_MKSWAP_UUID=y CONFIG_MORE=y -CONFIG_FEATURE_USE_TERMIOS=y # CONFIG_MOUNT is not set # CONFIG_FEATURE_MOUNT_FAKE is not set # CONFIG_FEATURE_MOUNT_VERBOSE is not set @@ -599,10 +610,13 @@ CONFIG_FEATURE_VOLUMEID_LINUXRAID=y # Miscellaneous Utilities # # CONFIG_CONSPY is not set +# CONFIG_NANDWRITE is not set +# CONFIG_NANDDUMP is not set # CONFIG_UBIATTACH is not set # CONFIG_UBIDETACH is not set # CONFIG_ADJTIMEX is not set # CONFIG_BBCONFIG is not set +# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set # CONFIG_BEEP is not set CONFIG_FEATURE_BEEP_FREQ=0 CONFIG_FEATURE_BEEP_LENGTH_MS=0 @@ -682,6 +696,7 @@ CONFIG_TTYSIZE=y # # Networking Utilities # +CONFIG_NBDCLIENT=y CONFIG_NC=y # CONFIG_NC_SERVER is not set # CONFIG_NC_EXTRA is not set @@ -717,6 +732,7 @@ CONFIG_HOSTNAME=y # CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set # CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set # CONFIG_FEATURE_HTTPD_PROXY is not set +# CONFIG_FEATURE_HTTPD_GZIP is not set CONFIG_IFCONFIG=y CONFIG_FEATURE_IFCONFIG_STATUS=y # CONFIG_FEATURE_IFCONFIG_SLIP is not set @@ -811,6 +827,7 @@ CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="" # CONFIG_FEATURE_WGET_STATUSBAR is not set # CONFIG_FEATURE_WGET_AUTHENTICATION is not set # CONFIG_FEATURE_WGET_LONG_OPTIONS is not set +# CONFIG_FEATURE_WGET_TIMEOUT is not set # CONFIG_ZCIP is not set # @@ -834,7 +851,11 @@ CONFIG_FEATURE_MIME_CHARSET="" # # Process Utilities # -# CONFIG_SMEMCAP is not set +CONFIG_IOSTAT=y +CONFIG_MPSTAT=y +CONFIG_PMAP=y +CONFIG_POWERTOP=y +CONFIG_SMEMCAP=y CONFIG_FREE=y CONFIG_FUSER=y CONFIG_KILL=y @@ -910,10 +931,13 @@ CONFIG_SV_DEFAULT_SERVICE_DIR="" # CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set # CONFIG_ASH_RANDOM_SUPPORT is not set # CONFIG_ASH_EXPAND_PRMT is not set +# CONFIG_CTTYHACK is not set # CONFIG_HUSH is not set # CONFIG_HUSH_BASH_COMPAT is not set +# CONFIG_HUSH_BRACE_EXPANSION is not set # CONFIG_HUSH_HELP is not set # CONFIG_HUSH_INTERACTIVE is not set +# CONFIG_HUSH_SAVEHISTORY is not set # CONFIG_HUSH_JOB is not set # CONFIG_HUSH_TICK is not set # CONFIG_HUSH_IF is not set @@ -921,22 +945,21 @@ CONFIG_SV_DEFAULT_SERVICE_DIR="" # CONFIG_HUSH_CASE is not set # CONFIG_HUSH_FUNCTIONS is not set # CONFIG_HUSH_LOCAL is not set -# CONFIG_HUSH_EXPORT_N is not set # CONFIG_HUSH_RANDOM_SUPPORT is not set +# CONFIG_HUSH_EXPORT_N is not set +# CONFIG_HUSH_MODE_X is not set +# CONFIG_MSH is not set # CONFIG_FEATURE_SH_IS_ASH is not set # CONFIG_FEATURE_SH_IS_HUSH is not set CONFIG_FEATURE_SH_IS_NONE=y # CONFIG_FEATURE_BASH_IS_ASH is not set # CONFIG_FEATURE_BASH_IS_HUSH is not set CONFIG_FEATURE_BASH_IS_NONE=y -# CONFIG_LASH is not set -# CONFIG_MSH is not set # CONFIG_SH_MATH_SUPPORT is not set # CONFIG_SH_MATH_SUPPORT_64 is not set # CONFIG_FEATURE_SH_EXTRA_QUIET is not set # CONFIG_FEATURE_SH_STANDALONE is not set # CONFIG_FEATURE_SH_NOFORK is not set -# CONFIG_CTTYHACK is not set # # System Logging Utilities @@ -951,4 +974,5 @@ CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=32 CONFIG_LOGREAD=y # CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set CONFIG_KLOGD=y +CONFIG_FEATURE_KLOGD_KLOGCTL=y CONFIG_LOGGER=y diff --git a/packages/sysutils/busybox/meta b/packages/sysutils/busybox/meta index add8f81c84..cf9e57f84a 100644 --- a/packages/sysutils/busybox/meta +++ b/packages/sysutils/busybox/meta @@ -1,5 +1,5 @@ PKG_NAME="busybox" -PKG_VERSION="1.17.3" +PKG_VERSION="1.18.0" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" @@ -12,3 +12,5 @@ PKG_SECTION="system" PKG_SHORTDESC="BusyBox: The Swiss Army Knife of Embedded Linux" PKG_LONGDESC="BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. The utilities in BusyBox generally have fewer options than their full-featured GNU cousins; however, the options that are included provide the expected functionality and behave very much like their GNU counterparts. BusyBox provides a fairly complete environment for any small or embedded system." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/sysutils/busybox/need_unpack b/packages/sysutils/busybox/need_unpack deleted file mode 100755 index 08eb4d014b..0000000000 --- a/packages/sysutils/busybox/need_unpack +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -. config/options $1 - -STAMP=$STAMPS/$1/unpack - -. $STAMP - -test $PKG_DIR/config/$1.conf -nt $STAMP && rm -f $STAMP -# test $STAMP_DEVTOOLS != $DEVTOOLS && rm -f $STAMP - -exit 0 diff --git a/packages/sysutils/busybox/patches/10_halt-no-init.diff b/packages/sysutils/busybox/patches/busybox-1.17.3-00_halt_no_init.patch similarity index 100% rename from packages/sysutils/busybox/patches/10_halt-no-init.diff rename to packages/sysutils/busybox/patches/busybox-1.17.3-00_halt_no_init.patch diff --git a/packages/sysutils/busybox/patches/busybox-1.17.3-dnsd.patch b/packages/sysutils/busybox/patches/busybox-1.17.3-dnsd.patch new file mode 100644 index 0000000000..b135c14637 --- /dev/null +++ b/packages/sysutils/busybox/patches/busybox-1.17.3-dnsd.patch @@ -0,0 +1,12 @@ +diff -urpN busybox-1.17.3/networking/dnsd.c busybox-1.17.3-dnsd/networking/dnsd.c +--- busybox-1.17.3/networking/dnsd.c 2010-10-09 21:57:14.000000000 +0200 ++++ busybox-1.17.3-dnsd/networking/dnsd.c 2010-10-29 00:37:43.066043841 +0200 +@@ -388,7 +388,7 @@ static int process_packet(struct dns_ent + query_len = strlen(query_string) + 1; + /* may be unaligned! */ + unaligned_type_class = (void *)(query_string + query_len); +- query_len += sizeof(unaligned_type_class); ++ query_len += sizeof(*unaligned_type_class); + /* where to append answer block */ + answb = (void *)(unaligned_type_class + 1); + diff --git a/packages/sysutils/busybox/patches/busybox-1.17.3-sort.patch b/packages/sysutils/busybox/patches/busybox-1.17.3-sort.patch new file mode 100644 index 0000000000..ebc9bf9f94 --- /dev/null +++ b/packages/sysutils/busybox/patches/busybox-1.17.3-sort.patch @@ -0,0 +1,12 @@ +diff -urpN busybox-1.17.3/coreutils/sort.c busybox-1.17.3-sort/coreutils/sort.c +--- busybox-1.17.3/coreutils/sort.c 2010-10-09 21:57:13.000000000 +0200 ++++ busybox-1.17.3-sort/coreutils/sort.c 2010-10-20 15:17:35.320293543 +0200 +@@ -412,7 +412,7 @@ int sort_main(int argc UNUSED_PARAM, cha + #if ENABLE_FEATURE_SORT_BIG + /* Open output file _after_ we read all input ones */ + if (option_mask32 & FLAG_o) +- xmove_fd(xopen3(str_o, O_WRONLY, 0666), STDOUT_FILENO); ++ xmove_fd(xopen3(str_o, O_WRONLY|O_CREAT|O_TRUNC, 0666), STDOUT_FILENO); + #endif + flag = (option_mask32 & FLAG_z) ? '\0' : '\n'; + for (i = 0; i < linecount; i++) diff --git a/packages/sysutils/busybox/patches/busybox-1.17.3-unicode.patch b/packages/sysutils/busybox/patches/busybox-1.17.3-unicode.patch new file mode 100644 index 0000000000..dc3b02e22d --- /dev/null +++ b/packages/sysutils/busybox/patches/busybox-1.17.3-unicode.patch @@ -0,0 +1,12 @@ +diff -urpN busybox-1.17.3/libbb/unicode.c busybox-1.17.3-unicode/libbb/unicode.c +--- busybox-1.17.3/libbb/unicode.c 2010-10-09 21:58:13.000000000 +0200 ++++ busybox-1.17.3-unicode/libbb/unicode.c 2010-10-29 00:48:36.951494079 +0200 +@@ -1006,7 +1006,7 @@ static char* FAST_FUNC unicode_conv_to_p + } + } + if (stats) +- stats->byte_count = stats->unicode_count = (d - dst); ++ stats->byte_count = stats->unicode_count = stats->unicode_width = (d - dst); + return dst; + } + diff --git a/packages/sysutils/busybox/patches/busybox-1.18.0-00_halt_no_init.patch b/packages/sysutils/busybox/patches/busybox-1.18.0-00_halt_no_init.patch new file mode 100644 index 0000000000..ce454f4c07 --- /dev/null +++ b/packages/sysutils/busybox/patches/busybox-1.18.0-00_halt_no_init.patch @@ -0,0 +1,12 @@ +diff -Naur busybox-1.13.2/init/halt.c busybox-1.13.2a/init/halt.c +--- busybox-1.13.2/init/halt.c 2008-11-09 18:28:19.000000000 +0100 ++++ busybox-1.13.2a/init/halt.c 2009-02-01 16:38:37.000000000 +0100 +@@ -79,7 +79,7 @@ + + /* Perform action. */ + rc = 1; +- if (!(flags & 4)) { /* no -f */ ++ if (ENABLE_INIT && !(flags & 4)) { /* no -f */ + //TODO: I tend to think that signalling linuxrc is wrong + // pity original author didn't comment on it... + if (ENABLE_FEATURE_INITRD) { diff --git a/packages/sysutils/busybox/patches/busybox-1.18.0-01_check_cc.patch b/packages/sysutils/busybox/patches/busybox-1.18.0-01_check_cc.patch new file mode 100644 index 0000000000..64c2d68559 --- /dev/null +++ b/packages/sysutils/busybox/patches/busybox-1.18.0-01_check_cc.patch @@ -0,0 +1,12 @@ +diff -Naur busybox-1.17.3-old/scripts/trylink busybox-1.17.3-new/scripts/trylink +--- busybox-1.17.3-old/scripts/trylink 2010-09-16 16:05:35.000000000 -0700 ++++ busybox-1.17.3-new/scripts/trylink 2010-10-10 07:38:03.000000000 -0700 +@@ -49,7 +49,7 @@ + local tempname="/tmp/temp.$$.$RANDOM" + # Can use "-o /dev/null", but older gcc tend to *unlink it* on failure! :( + # "-xc": C language. "/dev/null" is an empty source file. +- if $CC $1 -shared -xc /dev/null -o "$tempname".o >/dev/null 2>&1; then ++ if $CC $CFLAGS $LDFLAGS $1 -shared -xc /dev/null -o "$tempname".o >/dev/null 2>&1; then + echo "$1"; + else + echo "$2"; diff --git a/packages/sysutils/busybox/patches/busybox-1.18.0-buildsys.patch b/packages/sysutils/busybox/patches/busybox-1.18.0-buildsys.patch new file mode 100644 index 0000000000..c72e4d3b56 --- /dev/null +++ b/packages/sysutils/busybox/patches/busybox-1.18.0-buildsys.patch @@ -0,0 +1,21 @@ +diff -urpN busybox-1.18.0/scripts/gen_build_files.sh busybox-1.18.0-buildsys/scripts/gen_build_files.sh +--- busybox-1.18.0/scripts/gen_build_files.sh 2010-11-22 21:43:22.000000000 +0100 ++++ busybox-1.18.0-buildsys/scripts/gen_build_files.sh 2010-11-24 14:59:47.732712663 +0100 +@@ -18,14 +18,14 @@ generate() + local src="$1" dst="$2" header="$3" insert="$4" + #chk "${dst}" + ( +- echo "${header}" ++ printf "%s\n" "${header}" + if grep -qs '^INSERT$' "${src}"; then + sed -n '1,/^INSERT$/p' "${src}" +- echo "${insert}" ++ printf "%s\n" "${insert}" + sed -n '/^INSERT$/,$p' "${src}" + else + if [ -n "${insert}" ]; then +- echo "ERROR: INSERT line missing in: ${src}" 1>&2 ++ printf "%s\n" "ERROR: INSERT line missing in: ${src}" 1>&2 + fi + cat "${src}" + fi diff --git a/packages/sysutils/busybox/unpack b/packages/sysutils/busybox/unpack deleted file mode 100755 index 15e0f94efc..0000000000 --- a/packages/sysutils/busybox/unpack +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -. config/options $1 - -$SCRIPTS/build toolchain - -BUSYBOX=`ls -d $PKG_BUILD` - -cat <>$BUSYBOX/Makefile.custom -HOSTCC = $HOST_CC -CROSS_COMPILE = $TARGET_PREFIX -CFLAGS += -std=gnu99 -Os -EOF diff --git a/packages/sysutils/dbus-host/build b/packages/sysutils/dbus-host/build index 7d61139e3a..0824bf6000 100755 --- a/packages/sysutils/dbus-host/build +++ b/packages/sysutils/dbus-host/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build expat-host $SCRIPTS/unpack dbus DBUS_DIR=`ls -d $BUILD/dbus-[0-9]*` @@ -11,9 +9,10 @@ DBUS_DIR=`ls -d $BUILD/dbus-[0-9]*` setup_toolchain host cd $DBUS_DIR -mkdir -p .build-host -cd .build-host +do_autoreconf + +mkdir -p .build-host && cd .build-host ../configure --prefix=$ROOT/$TOOLCHAIN \ --sysconfdir=$ROOT/$TOOLCHAIN/etc \ --disable-tests \ diff --git a/packages/sysutils/dbus-host/meta b/packages/sysutils/dbus-host/meta index 3c9ef9a964..f9fd23c1fa 100644 --- a/packages/sysutils/dbus-host/meta +++ b/packages/sysutils/dbus-host/meta @@ -9,6 +9,8 @@ PKG_DEPENDS="" PKG_BUILD_DEPENDS="toolchain expat-host" PKG_PRIORITY="optional" PKG_SECTION="system" -PKG_SHORTDESC="simple interprocess messaging system" +PKG_SHORTDESC="dbus: simple interprocess messaging system" PKG_LONGDESC="D-Bus is a message bus, used for sending messages between applications. This package contains the D-Bus daemon and related utilities and the dbus shared library." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/sysutils/dbus/build b/packages/sysutils/dbus/build index eb46a4078f..130d005b56 100755 --- a/packages/sysutils/dbus/build +++ b/packages/sysutils/dbus/build @@ -5,10 +5,7 @@ export ac_cv_have_abstract_sockets=yes cd $PKG_BUILD - -mkdir -p .build-target -cd .build-target - +mkdir -p .build-target && cd .build-target ../configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ diff --git a/packages/sysutils/dbus/meta b/packages/sysutils/dbus/meta index c8b5320b27..ab53e31a17 100644 --- a/packages/sysutils/dbus/meta +++ b/packages/sysutils/dbus/meta @@ -9,6 +9,8 @@ PKG_DEPENDS="expat libX11" PKG_BUILD_DEPENDS="toolchain expat libX11" PKG_PRIORITY="required" PKG_SECTION="system" -PKG_SHORTDESC="simple interprocess messaging system" +PKG_SHORTDESC="dbus: simple interprocess messaging system" PKG_LONGDESC="D-Bus is a message bus, used for sending messages between applications. This package contains the D-Bus daemon and related utilities and the dbus shared library." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/sysutils/dmidecode/build b/packages/sysutils/dmidecode/build index 9443f96ded..f7a2c4e344 100755 --- a/packages/sysutils/dmidecode/build +++ b/packages/sysutils/dmidecode/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD make CC=$TARGET_CC dmidecode diff --git a/packages/sysutils/dmidecode/meta b/packages/sysutils/dmidecode/meta new file mode 100644 index 0000000000..c43e22c3d9 --- /dev/null +++ b/packages/sysutils/dmidecode/meta @@ -0,0 +1,16 @@ +PKG_NAME="dmidecode" +PKG_VERSION="2.10" +PKG_REV="1" +PKG_ARCH="i386 x86_64" +PKG_LICENSE="GPL" +PKG_SITE="http://nongnu.org/dmidecode/" +PKG_URL="http://mirror.lihnidos.org/GNU/savannah/dmidecode/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="dmidecode: Reports BIOS information according to the SMBIOS/DMI standard" +PKG_LONGDESC="Reports BIOS information according to the SMBIOS/DMI standard, typically including system manufactor, model name, serial number and a lot of other details of varying level of interest and reliability." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/sysutils/dmidecode/url b/packages/sysutils/dmidecode/url deleted file mode 100644 index 2db33ad769..0000000000 --- a/packages/sysutils/dmidecode/url +++ /dev/null @@ -1 +0,0 @@ -http://mirror.lihnidos.org/GNU/savannah/dmidecode/dmidecode-2.10.tar.bz2 diff --git a/packages/sysutils/fuse/build b/packages/sysutils/fuse/build index b739f8029d..c07e8a7f59 100755 --- a/packages/sysutils/fuse/build +++ b/packages/sysutils/fuse/build @@ -2,7 +2,8 @@ . config/options $1 -$SCRIPTS/build toolchain +# fuse fails to build with GOLD linker + strip_gold cd $PKG_BUILD ./configure --host=$TARGET_NAME \ diff --git a/packages/sysutils/fuse/install b/packages/sysutils/fuse/install index 5c611d75e0..2c0e865796 100755 --- a/packages/sysutils/fuse/install +++ b/packages/sysutils/fuse/install @@ -13,5 +13,5 @@ mkdir -p $INSTALL/bin cp $PKG_BUILD/util/ulockmgr_server $INSTALL/bin mkdir -p $INSTALL/lib - cp -PR $PKG_BUILD/lib/.libs/*.so* $INSTALL/lib + cp -P $PKG_BUILD/lib/.libs/*.so* $INSTALL/lib diff --git a/packages/sysutils/fuse/meta b/packages/sysutils/fuse/meta new file mode 100644 index 0000000000..95bda618e1 --- /dev/null +++ b/packages/sysutils/fuse/meta @@ -0,0 +1,16 @@ +PKG_NAME="fuse" +PKG_VERSION="2.8.5" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://sourceforge.net/projects/fuse/" +PKG_URL="http://downloads.sourceforge.net/project/fuse/fuse-2.X/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="fuse: A simple user-space filesystem interface for Linux" +PKG_LONGDESC="FUSE provides a simple interface for userspace programs to export a virtual filesystem to the Linux kernel. FUSE also aims to provide a secure method for non privileged users to create and mount their own filesystem implementations." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/sysutils/fuse/url b/packages/sysutils/fuse/url deleted file mode 100644 index f1ea98e3f3..0000000000 --- a/packages/sysutils/fuse/url +++ /dev/null @@ -1 +0,0 @@ -http://downloads.sourceforge.net/project/fuse/fuse-2.X/2.8.4/fuse-2.8.4.tar.gz \ No newline at end of file diff --git a/packages/sysutils/grep/build b/packages/sysutils/grep/build index a18b353899..0ee1106f5b 100755 --- a/packages/sysutils/grep/build +++ b/packages/sysutils/grep/build @@ -2,12 +2,12 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build pcre - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ + --disable-silent-rules \ + --disable-rpath \ + --with-gnu-ld \ make diff --git a/packages/sysutils/grep/install b/packages/sysutils/grep/install index 218e9c6907..8643d6793f 100755 --- a/packages/sysutils/grep/install +++ b/packages/sysutils/grep/install @@ -2,7 +2,5 @@ . config/options $1 -$SCRIPTS/install pcre - mkdir -p $INSTALL/usr/bin cp $PKG_BUILD/src/grep $INSTALL/usr/bin diff --git a/packages/sysutils/grep/meta b/packages/sysutils/grep/meta new file mode 100644 index 0000000000..5e7fd4dff9 --- /dev/null +++ b/packages/sysutils/grep/meta @@ -0,0 +1,16 @@ +PKG_NAME="grep" +PKG_VERSION="2.7" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.gnu.org/software/grep/" +PKG_URL="ftp://sunsite.cnlab-switch.ch/mirror/gnu/grep/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="pcre" +PKG_BUILD_DEPENDS="toolchain pcre" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="grep: This is GNU grep, the fastest grep in the west" +PKG_LONGDESC="GNU grep is based on a fast lazy-state deterministic matcher (about twice as fast as stock Unix egrep) hybridized with a Boyer-Moore-Gosper search for a fixed string that eliminates impossible text from being considered by the full regexp matcher without necessarily having to look at every character. The result is typically many times faster than Unix grep or egrep." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/sysutils/grep/url b/packages/sysutils/grep/url deleted file mode 100644 index 5395ad54af..0000000000 --- a/packages/sysutils/grep/url +++ /dev/null @@ -1 +0,0 @@ -ftp://sunsite.cnlab-switch.ch/mirror/gnu/grep/grep-2.7.tar.gz diff --git a/packages/sysutils/kbd/build b/packages/sysutils/kbd/build index b03dbd53f4..5d39750d1c 100755 --- a/packages/sysutils/kbd/build +++ b/packages/sysutils/kbd/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/sysutils/kbd/meta b/packages/sysutils/kbd/meta new file mode 100644 index 0000000000..920cf9d58f --- /dev/null +++ b/packages/sysutils/kbd/meta @@ -0,0 +1,16 @@ +PKG_NAME="kbd" +PKG_VERSION="1.15.2" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="ftp://devel.altlinux.org/legion/kbd/" +PKG_URL="http://www.kernel.org/pub/linux/utils/kbd/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="kbd: Keyboard and console utilities for Linux" +PKG_LONGDESC="The Linux Console Tools are a set of programs allowing the user to setup/customize your console (restricted meaning: text mode screen + keyboard only)." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/sysutils/kbd/url b/packages/sysutils/kbd/url deleted file mode 100644 index 363dd719c0..0000000000 --- a/packages/sysutils/kbd/url +++ /dev/null @@ -1 +0,0 @@ -http://www.kernel.org/pub/linux/utils/kbd/kbd-1.15.2.tar.bz2 \ No newline at end of file diff --git a/packages/sysutils/lcdproc/build b/packages/sysutils/lcdproc/build index 511dc040a6..bf31aca1e8 100755 --- a/packages/sysutils/lcdproc/build +++ b/packages/sysutils/lcdproc/build @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build libusb - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/sysutils/lcdproc/config/lcd.conf b/packages/sysutils/lcdproc/config/lcd.conf index 6259b17772..b12ad5d6e9 100644 --- a/packages/sysutils/lcdproc/config/lcd.conf +++ b/packages/sysutils/lcdproc/config/lcd.conf @@ -1,7 +1,10 @@ -# Setup LCD/VFD driver ( none / irtrans ) -# -# none: no LCD/VFD hardware is installed -# -# irtrans: use irtrans as LCD/VFD driver +# lcd.conf + +# This configuration file allows you to enable a LCD/VFD driver + +# Valid options are "none" / "irtrans" + +# none: No LCD/VFD hardware is installed (default) +# irtrans: Use irtrans as LCD/VFD driver LCD_DRIVER="none" diff --git a/packages/sysutils/lcdproc/install b/packages/sysutils/lcdproc/install index 103b3bf124..b8c96f89a5 100755 --- a/packages/sysutils/lcdproc/install +++ b/packages/sysutils/lcdproc/install @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/install libusb -$SCRIPTS/install irserver - add_user nobody x 999 999 "Nobody" "/" "/bin/sh" add_group nobody 999 diff --git a/packages/sysutils/lcdproc/meta b/packages/sysutils/lcdproc/meta new file mode 100644 index 0000000000..aecc7581fe --- /dev/null +++ b/packages/sysutils/lcdproc/meta @@ -0,0 +1,16 @@ +PKG_NAME="lcdproc" +PKG_VERSION="20100423" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://lcdproc.org/" +PKG_URL="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libusb irserver" +PKG_BUILD_DEPENDS="toolchain libusb" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="lcdproc: Software to display system information from your Linux/*BSD box on a LCD" +PKG_LONGDESC="LCDproc is a piece of software that displays real-time system information from your Linux/*BSD box on a LCD. The server supports several serial devices: Matrix Orbital, Crystal Fontz, Bayrad, LB216, LCDM001 (kernelconcepts.de), Wirz-SLI, Cwlinux(.com) and PIC-an-LCD; and some devices connected to the LPT port: HD44780, STV5730, T6963, SED1520 and SED1330. Various clients are available that display things like CPU load, system load, memory usage, uptime, and a lot more." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/sysutils/lcdproc/url b/packages/sysutils/lcdproc/url deleted file mode 100644 index c71ab7f949..0000000000 --- a/packages/sysutils/lcdproc/url +++ /dev/null @@ -1 +0,0 @@ -http://sources.openelec.tv/svn/lcdproc-20100423.tar.bz2 \ No newline at end of file diff --git a/packages/sysutils/libatasmart/build b/packages/sysutils/libatasmart/build index 9d0730d321..a6c30371f2 100755 --- a/packages/sysutils/libatasmart/build +++ b/packages/sysutils/libatasmart/build @@ -2,10 +2,9 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build udev - cd $PKG_BUILD + +mkdir -p m4 && do_autoreconf ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ diff --git a/packages/sysutils/libatasmart/install b/packages/sysutils/libatasmart/install index fc1656cd3d..f08eba389f 100755 --- a/packages/sysutils/libatasmart/install +++ b/packages/sysutils/libatasmart/install @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/install udev - mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/sysutils/libatasmart/meta b/packages/sysutils/libatasmart/meta new file mode 100644 index 0000000000..f9728caa87 --- /dev/null +++ b/packages/sysutils/libatasmart/meta @@ -0,0 +1,16 @@ +PKG_NAME="libatasmart" +PKG_VERSION="0.17" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://0pointer.de/blog/projects/being-smart.html" +PKG_URL="http://0pointer.de/public/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="udev" +PKG_BUILD_DEPENDS="toolchain udev" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="libatasmart: a lean, small and clean implementation of an ATA S.M.A.R.T. reading and parsing library" +PKG_LONGDESC="libatasmart is a lean, small and clean implementation of an ATA S.M.A.R.T. reading and parsing library. It's fairly comprehensive, however I only support a subset of the full S.M.A.R.T. set of functions: those parts which made sense to me, not the esoteric stuff." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/sysutils/libatasmart/url b/packages/sysutils/libatasmart/url deleted file mode 100644 index 541ce815f1..0000000000 --- a/packages/sysutils/libatasmart/url +++ /dev/null @@ -1 +0,0 @@ -http://0pointer.de/public/libatasmart-0.17.tar.gz \ No newline at end of file diff --git a/packages/sysutils/libusb-compat/build b/packages/sysutils/libusb-compat/build index 3af0bf24e2..29edf34235 100755 --- a/packages/sysutils/libusb-compat/build +++ b/packages/sysutils/libusb-compat/build @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build libusb - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/sysutils/libusb-compat/install b/packages/sysutils/libusb-compat/install index e69f6b06a7..9224267ca5 100755 --- a/packages/sysutils/libusb-compat/install +++ b/packages/sysutils/libusb-compat/install @@ -2,7 +2,5 @@ . config/options $1 -$SCRIPTS/install libusb - mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/libusb/.libs/libusb*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/libusb/.libs/libusb*.so* $INSTALL/usr/lib diff --git a/packages/sysutils/libusb-compat/meta b/packages/sysutils/libusb-compat/meta new file mode 100644 index 0000000000..15cd83a6f6 --- /dev/null +++ b/packages/sysutils/libusb-compat/meta @@ -0,0 +1,16 @@ +PKG_NAME="libusb-compat" +PKG_VERSION="0.1.3" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://libusb.sourceforge.net/" +PKG_URL="http://downloads.sourceforge.net/libusb/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libusb" +PKG_BUILD_DEPENDS="toolchain libusb" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="libusb-compat: OS independent USB device access" +PKG_LONGDESC="The libusb project's aim is to create a Library for use by user level applications to USB devices regardless of OS." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/sysutils/libusb-compat/url b/packages/sysutils/libusb-compat/url deleted file mode 100644 index bae0e599e0..0000000000 --- a/packages/sysutils/libusb-compat/url +++ /dev/null @@ -1 +0,0 @@ -http://downloads.sourceforge.net/libusb/libusb-compat-0.1.3.tar.bz2 \ No newline at end of file diff --git a/packages/sysutils/libusb/build b/packages/sysutils/libusb/build index f71ba02a83..fcf400b498 100755 --- a/packages/sysutils/libusb/build +++ b/packages/sysutils/libusb/build @@ -2,9 +2,8 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD +mkdir -p m4 && do_autoreconf ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ diff --git a/packages/sysutils/libusb/install b/packages/sysutils/libusb/install index b9e0b497e9..62643ac0f8 100755 --- a/packages/sysutils/libusb/install +++ b/packages/sysutils/libusb/install @@ -3,5 +3,5 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/$1/.libs/libusb*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/$1/.libs/libusb*.so* $INSTALL/usr/lib diff --git a/packages/sysutils/libusb/meta b/packages/sysutils/libusb/meta new file mode 100644 index 0000000000..dbae603941 --- /dev/null +++ b/packages/sysutils/libusb/meta @@ -0,0 +1,16 @@ +PKG_NAME="libusb" +PKG_VERSION="1.0.8" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://libusb.sourceforge.net/" +PKG_URL="http://freefr.dl.sourceforge.net/sourceforge/libusb/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="libusb: OS independent USB device access" +PKG_LONGDESC="The libusb project's aim is to create a Library for use by user level applications to USB devices regardless of OS." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/sysutils/libusb/url b/packages/sysutils/libusb/url deleted file mode 100644 index 75f070b856..0000000000 --- a/packages/sysutils/libusb/url +++ /dev/null @@ -1 +0,0 @@ -http://freefr.dl.sourceforge.net/sourceforge/libusb/libusb-1.0.8.tar.bz2 diff --git a/packages/sysutils/lm_sensors/build b/packages/sysutils/lm_sensors/build index cdb4885bda..c367dfe85d 100755 --- a/packages/sysutils/lm_sensors/build +++ b/packages/sysutils/lm_sensors/build @@ -2,10 +2,5 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD - -make PREFIX=/usr CC=$TARGET_CC - -$STRIP prog/sensors/sensors + make PREFIX=/usr CC=$TARGET_CC CFLAGS="$TARGET_CFLAGS" CPPFLAGS="$TARGET_CPPFLAGS" AR="$TARGET_AR" diff --git a/packages/sysutils/lm_sensors/meta b/packages/sysutils/lm_sensors/meta new file mode 100644 index 0000000000..49cc0f5c69 --- /dev/null +++ b/packages/sysutils/lm_sensors/meta @@ -0,0 +1,16 @@ +PKG_NAME="lm_sensors" +PKG_VERSION="3.2.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://secure.netroedge.com/~lm78/" +PKG_URL="http://dl.lm-sensors.org/lm-sensors/releases/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="lm_sensors: Hardware monitoring via the SMBus" +PKG_LONGDESC="lm_sensors is a package to get data from the SMB (System Management Bus - an i2c bus) on modern mainboards. It consists of kernel modules and users space tools to get stuff like cpu / mb temperature, voltages, fan speed..." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/sysutils/lm_sensors/url b/packages/sysutils/lm_sensors/url deleted file mode 100644 index bcfca65e9b..0000000000 --- a/packages/sysutils/lm_sensors/url +++ /dev/null @@ -1 +0,0 @@ -http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-3.2.0.tar.bz2 \ No newline at end of file diff --git a/packages/sysutils/ntfs-3g/build b/packages/sysutils/ntfs-3g/build index bd83721d64..06c9b2d0e9 100755 --- a/packages/sysutils/ntfs-3g/build +++ b/packages/sysutils/ntfs-3g/build @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build fuse - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/sysutils/ntfs-3g/install b/packages/sysutils/ntfs-3g/install index dd5465ccdb..f368cfec17 100755 --- a/packages/sysutils/ntfs-3g/install +++ b/packages/sysutils/ntfs-3g/install @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/install fuse - mkdir -p $INSTALL/bin cp $PKG_BUILD/src/ntfs-3g $INSTALL/bin diff --git a/packages/sysutils/ntfs-3g/meta b/packages/sysutils/ntfs-3g/meta new file mode 100644 index 0000000000..7091b029be --- /dev/null +++ b/packages/sysutils/ntfs-3g/meta @@ -0,0 +1,16 @@ +PKG_NAME="ntfs-3g" +PKG_VERSION="2010.10.2" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.ntfs-3g.org/" +PKG_URL="http://tuxera.com/opensource/$PKG_NAME-$PKG_VERSION.tgz" +PKG_DEPENDS="fuse" +PKG_BUILD_DEPENDS="toolchain fuse" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="ntfs-3g: NTFS-3G Read/Write userspace driver" +PKG_LONGDESC="The NTFS-3G driver is an open source, freely available NTFS driver for Linux with read and write support. It provides safe and fast handling of the Windows XP, Windows Server 2003, Windows 2000 and Windows Vista file systems." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/sysutils/ntfs-3g/url b/packages/sysutils/ntfs-3g/url deleted file mode 100644 index bf017e2337..0000000000 --- a/packages/sysutils/ntfs-3g/url +++ /dev/null @@ -1 +0,0 @@ -http://tuxera.com/opensource/ntfs-3g-2010.8.8.tgz \ No newline at end of file diff --git a/packages/sysutils/par2cmdline/build b/packages/sysutils/par2cmdline/build index c7a6a0997d..34dac54a72 100755 --- a/packages/sysutils/par2cmdline/build +++ b/packages/sysutils/par2cmdline/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/sysutils/par2cmdline/install b/packages/sysutils/par2cmdline/install index 7edfc19b0a..c48d170f1e 100755 --- a/packages/sysutils/par2cmdline/install +++ b/packages/sysutils/par2cmdline/install @@ -3,4 +3,4 @@ . config/options $1 mkdir -p $INSTALL/usr/bin - cp -PR $PKG_BUILD/par2 $INSTALL/usr/bin + cp -P $PKG_BUILD/par2 $INSTALL/usr/bin diff --git a/packages/sysutils/par2cmdline/meta b/packages/sysutils/par2cmdline/meta new file mode 100644 index 0000000000..e85016dbcb --- /dev/null +++ b/packages/sysutils/par2cmdline/meta @@ -0,0 +1,16 @@ +PKG_NAME="par2cmdline" +PKG_VERSION="0.4" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.chuchusoft.com/par2_tbb/index.html" +PKG_URL="http://mesh.dl.sourceforge.net/project/parchive/par2cmdline/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="par2cmdline: a utility to create and repair data files using Reed Solomon coding." +PKG_LONGDESC="This is a concurrent (multithreaded) version of par2cmdline, a utility to create and repair data files using Reed Solomon coding. par2 parity archives are commonly used on Usenet postings to allow corrupted postings to be repaired instead of needing the original poster to repost the corrupted file(s)." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/sysutils/par2cmdline/patches/010_par2cmdline-0.4-gcc4.patch.diff b/packages/sysutils/par2cmdline/patches/par2cmdline-0.4-gcc4.patch similarity index 100% rename from packages/sysutils/par2cmdline/patches/010_par2cmdline-0.4-gcc4.patch.diff rename to packages/sysutils/par2cmdline/patches/par2cmdline-0.4-gcc4.patch diff --git a/packages/sysutils/par2cmdline/url b/packages/sysutils/par2cmdline/url deleted file mode 100644 index b7c404740d..0000000000 --- a/packages/sysutils/par2cmdline/url +++ /dev/null @@ -1,2 +0,0 @@ -http://mesh.dl.sourceforge.net/project/parchive/par2cmdline/0.4/par2cmdline-0.4.tar.gz - diff --git a/packages/sysutils/parted/build b/packages/sysutils/parted/build index 1725d56b85..e2aee46bdc 100755 --- a/packages/sysutils/parted/build +++ b/packages/sysutils/parted/build @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build util-linux-ng - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/sysutils/parted/install b/packages/sysutils/parted/install index f61d4e3bdd..42c6be6e64 100755 --- a/packages/sysutils/parted/install +++ b/packages/sysutils/parted/install @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/install util-linux-ng - mkdir -p $INSTALL/usr/bin cp $PKG_BUILD/parted/.libs/parted $INSTALL/usr/bin cp $PKG_BUILD/partprobe/.libs/partprobe $INSTALL/usr/bin diff --git a/packages/sysutils/parted/meta b/packages/sysutils/parted/meta new file mode 100644 index 0000000000..5bad807510 --- /dev/null +++ b/packages/sysutils/parted/meta @@ -0,0 +1,16 @@ +PKG_NAME="parted" +PKG_VERSION="2.3" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.gnu.org/software/parted/" +PKG_URL="http://ftp.gnu.org/gnu/parted/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="util-linux-ng" +PKG_BUILD_DEPENDS="toolchain util-linux-ng" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="parted: GNU partition editor" +PKG_LONGDESC="GNU Parted is a program for creating, destroying, resizing, checking and copying partitions, and the file systems on them. This is useful for creating space for new operating systems, reorganising disk usage, copying data between hard disks and disk imaging." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/sysutils/parted/patches.old/appletv_parted-1.8.8.diff b/packages/sysutils/parted/patches.old/appletv_parted-1.8.8.diff deleted file mode 100644 index b6c0df37d2..0000000000 --- a/packages/sysutils/parted/patches.old/appletv_parted-1.8.8.diff +++ /dev/null @@ -1,165 +0,0 @@ -diff -rup parted-1.8.8/include/parted/disk.h parted-1.8.8_atv/include/parted/disk.h ---- parted-1.8.8/include/parted/disk.h 2007-08-09 11:20:33.000000000 -0400 -+++ parted-1.8.8_atv/include/parted/disk.h 2008-01-11 23:28:45.000000000 -0500 -@@ -52,10 +52,11 @@ enum _PedPartitionFlag { - PED_PARTITION_HPSERVICE=8, - PED_PARTITION_PALO=9, - PED_PARTITION_PREP=10, -- PED_PARTITION_MSFT_RESERVED=11 -+ PED_PARTITION_MSFT_RESERVED=11, -+ PED_PARTITION_APPLE_TV_RECOVERY=12 - }; - #define PED_PARTITION_FIRST_FLAG PED_PARTITION_BOOT --#define PED_PARTITION_LAST_FLAG PED_PARTITION_MSFT_RESERVED -+#define PED_PARTITION_LAST_FLAG PED_PARTITION_APPLE_TV_RECOVERY - - enum _PedDiskTypeFeature { - PED_DISK_TYPE_EXTENDED=1, /**< supports extended partitions */ -diff -rup parted-1.8.8/libparted/disk.c parted-1.8.8_atv/libparted/disk.c ---- parted-1.8.8/libparted/disk.c 2007-08-09 14:47:57.000000000 -0400 -+++ parted-1.8.8_atv/libparted/disk.c 2008-01-11 23:28:45.000000000 -0500 -@@ -2181,6 +2181,8 @@ ped_partition_flag_get_name (PedPartitio - return N_("prep"); - case PED_PARTITION_MSFT_RESERVED: - return N_("msftres"); -+ case PED_PARTITION_APPLE_TV_RECOVERY: -+ return N_("atvrecv"); - - default: - ped_exception_throw ( -diff -rup parted-1.8.8/libparted/labels/gpt.c parted-1.8.8_atv/libparted/labels/gpt.c ---- parted-1.8.8/libparted/labels/gpt.c 2007-07-31 13:36:57.000000000 -0400 -+++ parted-1.8.8_atv/libparted/labels/gpt.c 2008-01-11 23:28:45.000000000 -0500 -@@ -122,6 +122,10 @@ typedef struct { - ((efi_guid_t) { PED_CPU_TO_LE32 (0x48465300), PED_CPU_TO_LE16 (0x0000), \ - PED_CPU_TO_LE16 (0x11AA), 0xaa, 0x11, \ - { 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC }}) -+#define PARTITION_APPLE_TV_RECOVERY_GUID \ -+ ((efi_guid_t) { PED_CPU_TO_LE32 (0x5265636F), PED_CPU_TO_LE16 (0x7665), \ -+ PED_CPU_TO_LE16 (0x11AA), 0xaa, 0x11, \ -+ { 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC }}) - - struct __attribute__ ((packed)) _GuidPartitionTableHeader_t { - uint64_t Signature; -@@ -248,6 +252,7 @@ typedef struct _GPTPartitionData { - int hp_service; - int hidden; - int msftres; -+ int atvrecv; - } GPTPartitionData; - - static PedDiskType gpt_disk_type; -@@ -753,7 +758,8 @@ _parse_part_entry (PedDisk* disk, GuidPa - - gpt_part_data->lvm = gpt_part_data->raid - = gpt_part_data->boot = gpt_part_data->hp_service -- = gpt_part_data->hidden = gpt_part_data->msftres = 0; -+ = gpt_part_data->hidden = gpt_part_data->msftres -+ = gpt_part_data->atvrecv = 0; - - if (pte->Attributes.RequiredToFunction & 0x1) - gpt_part_data->hidden = 1; -@@ -768,6 +774,8 @@ _parse_part_entry (PedDisk* disk, GuidPa - gpt_part_data->hp_service = 1; - else if (!guid_cmp (gpt_part_data->type, PARTITION_MSFT_RESERVED_GUID)) - gpt_part_data->msftres = 1; -+ else if (!guid_cmp (gpt_part_data->type, PARTITION_APPLE_TV_RECOVERY_GUID)) -+ gpt_part_data->atvrecv = 1; - - return part; - } -@@ -1133,6 +1141,7 @@ gpt_partition_new (const PedDisk* disk, - gpt_part_data->hp_service = 0; - gpt_part_data->hidden = 0; - gpt_part_data->msftres = 0; -+ gpt_part_data->atvrecv = 0; - uuid_generate ((unsigned char*) &gpt_part_data->uuid); - swap_uuid_and_efi_guid((unsigned char*)(&gpt_part_data->uuid)); - strcpy (gpt_part_data->name, ""); -@@ -1232,6 +1241,10 @@ gpt_partition_set_system (PedPartition* - return 1; - } - } -+ if (gpt_part_data->atvrecv) { -+ gpt_part_data->type = PARTITION_APPLE_TV_RECOVERY_GUID; -+ return 1; -+ } - - gpt_part_data->type = PARTITION_BASIC_DATA_GUID; - return 1; -@@ -1307,7 +1320,8 @@ gpt_partition_set_flag(PedPartition *par - gpt_part_data->raid - = gpt_part_data->lvm - = gpt_part_data->hp_service -- = gpt_part_data->msftres = 0; -+ = gpt_part_data->msftres -+ = gpt_part_data->atvrecv = 0; - return gpt_partition_set_system (part, part->fs_type); - case PED_PARTITION_RAID: - gpt_part_data->raid = state; -@@ -1315,7 +1329,8 @@ gpt_partition_set_flag(PedPartition *par - gpt_part_data->boot - = gpt_part_data->lvm - = gpt_part_data->hp_service -- = gpt_part_data->msftres = 0; -+ = gpt_part_data->msftres -+ = gpt_part_data->atvrecv = 0; - return gpt_partition_set_system (part, part->fs_type); - case PED_PARTITION_LVM: - gpt_part_data->lvm = state; -@@ -1323,7 +1338,8 @@ gpt_partition_set_flag(PedPartition *par - gpt_part_data->boot - = gpt_part_data->raid - = gpt_part_data->hp_service -- = gpt_part_data->msftres = 0; -+ = gpt_part_data->msftres -+ = gpt_part_data->atvrecv = 0; - return gpt_partition_set_system (part, part->fs_type); - case PED_PARTITION_HPSERVICE: - gpt_part_data->hp_service = state; -@@ -1331,7 +1347,8 @@ gpt_partition_set_flag(PedPartition *par - gpt_part_data->boot - = gpt_part_data->raid - = gpt_part_data->lvm -- = gpt_part_data->msftres = 0; -+ = gpt_part_data->msftres -+ = gpt_part_data->atvrecv = 0; - return gpt_partition_set_system (part, part->fs_type); - case PED_PARTITION_MSFT_RESERVED: - gpt_part_data->msftres = state; -@@ -1339,7 +1356,17 @@ gpt_partition_set_flag(PedPartition *par - gpt_part_data->boot - = gpt_part_data->raid - = gpt_part_data->lvm -- = gpt_part_data->hp_service = 0; -+ = gpt_part_data->hp_service -+ = gpt_part_data->atvrecv = 0; -+ return gpt_partition_set_system (part, part->fs_type); -+ case PED_PARTITION_APPLE_TV_RECOVERY: -+ gpt_part_data->atvrecv = state; -+ if (state) -+ gpt_part_data->boot -+ = gpt_part_data->raid -+ = gpt_part_data->lvm -+ = gpt_part_data->hp_service -+ = gpt_part_data->msftres = 0; - return gpt_partition_set_system (part, part->fs_type); - case PED_PARTITION_HIDDEN: - gpt_part_data->hidden = state; -@@ -1371,6 +1398,8 @@ gpt_partition_get_flag(const PedPartitio - return gpt_part_data->hp_service; - case PED_PARTITION_MSFT_RESERVED: - return gpt_part_data->msftres; -+ case PED_PARTITION_APPLE_TV_RECOVERY: -+ return gpt_part_data->atvrecv; - case PED_PARTITION_HIDDEN: - return gpt_part_data->hidden; - case PED_PARTITION_SWAP: -@@ -1392,6 +1421,7 @@ gpt_partition_is_flag_available(const Pe - case PED_PARTITION_BOOT: - case PED_PARTITION_HPSERVICE: - case PED_PARTITION_MSFT_RESERVED: -+ case PED_PARTITION_APPLE_TV_RECOVERY: - case PED_PARTITION_HIDDEN: - return 1; - case PED_PARTITION_SWAP: diff --git a/packages/sysutils/parted/patches/parted-2.2-hi-major-sd-rh611691.diff b/packages/sysutils/parted/patches/parted-2.3-hi_major_sd_rh611691.patch similarity index 100% rename from packages/sysutils/parted/patches/parted-2.2-hi-major-sd-rh611691.diff rename to packages/sysutils/parted/patches/parted-2.3-hi_major_sd_rh611691.patch diff --git a/packages/sysutils/parted/patches/parted-2.3-lpn.diff b/packages/sysutils/parted/patches/parted-2.3-lpn.patch similarity index 100% rename from packages/sysutils/parted/patches/parted-2.3-lpn.diff rename to packages/sysutils/parted/patches/parted-2.3-lpn.patch diff --git a/packages/sysutils/parted/url b/packages/sysutils/parted/url deleted file mode 100644 index ee82b65033..0000000000 --- a/packages/sysutils/parted/url +++ /dev/null @@ -1 +0,0 @@ -http://ftp.gnu.org/gnu/parted/parted-2.3.tar.gz diff --git a/packages/sysutils/pciutils/build b/packages/sysutils/pciutils/build index 307c98f84d..a18f89ab13 100755 --- a/packages/sysutils/pciutils/build +++ b/packages/sysutils/pciutils/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD make OPT="$TARGET_CFLAGS" \ diff --git a/packages/sysutils/pciutils/meta b/packages/sysutils/pciutils/meta new file mode 100644 index 0000000000..b8ddc324a4 --- /dev/null +++ b/packages/sysutils/pciutils/meta @@ -0,0 +1,16 @@ +PKG_NAME="pciutils" +PKG_VERSION="3.1.7" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://mj.ucw.cz/pciutils.shtml" +PKG_URL="http://ftp.de.kernel.org/pub/software/utils/pciutils/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="pciutils: Linux PCI Utilities" +PKG_LONGDESC="This package contains various utilities for inspecting and setting of devices connected to the PCI bus and the PCI vendor/product ID database." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/sysutils/pciutils/url b/packages/sysutils/pciutils/url deleted file mode 100644 index 31f0339444..0000000000 --- a/packages/sysutils/pciutils/url +++ /dev/null @@ -1 +0,0 @@ -http://ftp.de.kernel.org/pub/software/utils/pciutils/pciutils-3.1.7.tar.bz2 diff --git a/packages/sysutils/plymouth-lite/build b/packages/sysutils/plymouth-lite/build index 16668aa344..a23008fd07 100755 --- a/packages/sysutils/plymouth-lite/build +++ b/packages/sysutils/plymouth-lite/build @@ -2,13 +2,12 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build libpng - # ensure we use size optimization. CFLAGS=`echo $CFLAGS | sed -e "s|-O2|-Os|"` CFLAGS=`echo $CFLAGS | sed -e "s|-O3|-Os|"` +LDFLAGS="$LDFLAGS -fwhole-program" + cd $PKG_BUILD make diff --git a/packages/sysutils/plymouth-lite/meta b/packages/sysutils/plymouth-lite/meta new file mode 100644 index 0000000000..63cfa5e27e --- /dev/null +++ b/packages/sysutils/plymouth-lite/meta @@ -0,0 +1,16 @@ +PKG_NAME="plymouth-lite" +PKG_VERSION="0.6.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.meego.com" +PKG_URL="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain libpng" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="plymouth-lite: Boot splash screen based on Fedora's Plymouth code" +PKG_LONGDESC="Boot splash screen based on Fedora's Plymouth code" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/sysutils/plymouth-lite/patches/cursor.diff b/packages/sysutils/plymouth-lite/patches/plymouth-lite-0.6.0-cursor.patch similarity index 100% rename from packages/sysutils/plymouth-lite/patches/cursor.diff rename to packages/sysutils/plymouth-lite/patches/plymouth-lite-0.6.0-cursor.patch diff --git a/packages/sysutils/plymouth-lite/patches/plymouth-fix-build.diff b/packages/sysutils/plymouth-lite/patches/plymouth-lite-0.6.0-fix-build.patch similarity index 100% rename from packages/sysutils/plymouth-lite/patches/plymouth-fix-build.diff rename to packages/sysutils/plymouth-lite/patches/plymouth-lite-0.6.0-fix-build.patch diff --git a/packages/sysutils/plymouth-lite/patches/plymouth-lite-0.6.0_libpng-1.4.0.diff b/packages/sysutils/plymouth-lite/patches/plymouth-lite-0.6.0-libpng_1.4.0.patch similarity index 100% rename from packages/sysutils/plymouth-lite/patches/plymouth-lite-0.6.0_libpng-1.4.0.diff rename to packages/sysutils/plymouth-lite/patches/plymouth-lite-0.6.0-libpng_1.4.0.patch diff --git a/packages/sysutils/plymouth-lite/patches/plymouth-resize.diff b/packages/sysutils/plymouth-lite/patches/plymouth-lite-0.6.0-resize.patch similarity index 100% rename from packages/sysutils/plymouth-lite/patches/plymouth-resize.diff rename to packages/sysutils/plymouth-lite/patches/plymouth-lite-0.6.0-resize.patch diff --git a/packages/sysutils/plymouth-lite/url b/packages/sysutils/plymouth-lite/url deleted file mode 100644 index d4557ad929..0000000000 --- a/packages/sysutils/plymouth-lite/url +++ /dev/null @@ -1 +0,0 @@ -http://sources.openelec.tv/svn/plymouth-lite-0.6.0.tar.bz2 \ No newline at end of file diff --git a/packages/sysutils/pm-utils/build b/packages/sysutils/pm-utils/build index b03dbd53f4..5d39750d1c 100755 --- a/packages/sysutils/pm-utils/build +++ b/packages/sysutils/pm-utils/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/sysutils/pm-utils/install b/packages/sysutils/pm-utils/install index 8945223185..cfa27b5ff8 100755 --- a/packages/sysutils/pm-utils/install +++ b/packages/sysutils/pm-utils/install @@ -2,10 +2,6 @@ . config/options $1 -$SCRIPTS/install grep -$SCRIPTS/install dmidecode -$SCRIPTS/install kbd - mkdir -p $INSTALL/etc/pm/config.d mkdir -p $INSTALL/etc/pm/power.d mkdir -p $INSTALL/etc/pm/sleep.d diff --git a/packages/sysutils/pm-utils/meta b/packages/sysutils/pm-utils/meta new file mode 100644 index 0000000000..0e6714d7c8 --- /dev/null +++ b/packages/sysutils/pm-utils/meta @@ -0,0 +1,16 @@ +PKG_NAME="pm-utils" +PKG_VERSION="1.4.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://pm-utils.freedesktop.org/wiki/" +PKG_URL="http://pm-utils.freedesktop.org/releases/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="grep dmidecode kbd" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="pm-utils: a small collection of scripts that handle suspend and resume on behalf of HAL." +PKG_LONGDESC="pm-utils is a small collection of scripts that handle suspend and resume on behalf of HAL." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/sysutils/pm-utils/quirks/url b/packages/sysutils/pm-utils/quirks/url.txt similarity index 100% rename from packages/sysutils/pm-utils/quirks/url rename to packages/sysutils/pm-utils/quirks/url.txt diff --git a/packages/sysutils/pm-utils/url b/packages/sysutils/pm-utils/url deleted file mode 100644 index d6883b385e..0000000000 --- a/packages/sysutils/pm-utils/url +++ /dev/null @@ -1 +0,0 @@ -http://pm-utils.freedesktop.org/releases/pm-utils-1.4.1.tar.gz \ No newline at end of file diff --git a/packages/sysutils/remote/atvclient/meta b/packages/sysutils/remote/atvclient/meta index 2b9d6d7f96..678993e2cc 100644 --- a/packages/sysutils/remote/atvclient/meta +++ b/packages/sysutils/remote/atvclient/meta @@ -12,3 +12,5 @@ PKG_SECTION="system/remote" PKG_SHORTDESC="atvclient: a background application for Linux that reads input from the AppleTV’s internal infra-red receiver" PKG_LONGDESC="atvclient is a background application for Linux that reads input from the AppleTV’s internal infra-red receiver and submits it to XBMC in a way very similar to how XBMCHelper does this under the native AppleTV OS. It implements most of the functionality the ATV OS HID driver supports, including pairing and control of the status LED." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/sysutils/remote/atvclient/patches/atvclient-change_config_location-0.1.diff b/packages/sysutils/remote/atvclient/patches/atvclient-0.1-change_config_location-0.1.patch similarity index 100% rename from packages/sysutils/remote/atvclient/patches/atvclient-change_config_location-0.1.diff rename to packages/sysutils/remote/atvclient/patches/atvclient-0.1-change_config_location-0.1.patch diff --git a/packages/sysutils/remote/config/remote.conf b/packages/sysutils/remote/config/remote.conf index aafd0b010e..0a6be12bd4 100644 --- a/packages/sysutils/remote/config/remote.conf +++ b/packages/sysutils/remote/config/remote.conf @@ -1,9 +1,11 @@ -# Setup remote control ( none / lirc / irtrans ) -# -# none: no remote control hardware is installed -# -# lirc: use lirc as remotecontrol backend (default) -# -# irtrans: use irtrans as remotecontrol backend +# remote.conf + +# This configuration file lets you setup remote control access for your +# system +# Options are "none" / "lirc" / "irtrans" + +# none: No remote control hardware is installed +# lirc: Use lirc as remote control backend (default) +# irtrans: Use irtrans as remote control backend REMOTE_BACKEND="lirc" diff --git a/packages/sysutils/remote/eventlircd/config/evmap/03_0bc7_0006.evmap b/packages/sysutils/remote/eventlircd/config/evmap/03_0bc7_0006.evmap new file mode 100644 index 0000000000..65f4681e89 --- /dev/null +++ b/packages/sysutils/remote/eventlircd/config/evmap/03_0bc7_0006.evmap @@ -0,0 +1,40 @@ +# X10 Remote + + KEY_0 = KEY_NUMERIC_0 # 0 + KEY_1 = KEY_NUMERIC_1 # 1 + KEY_2 = KEY_NUMERIC_2 # 2 + KEY_3 = KEY_NUMERIC_3 # 3 + KEY_4 = KEY_NUMERIC_4 # 4 + KEY_5 = KEY_NUMERIC_5 # 5 + KEY_6 = KEY_NUMERIC_6 # 6 + KEY_7 = KEY_NUMERIC_7 # 7 + KEY_8 = KEY_NUMERIC_8 # 8 + KEY_9 = KEY_NUMERIC_9 # 9 + + KEY_VOLUMEUP = KEY_VOLUMEUP # Volume Up + KEY_VOLUMEDOWN = KEY_VOLUMEDOWN # Volume Down + KEY_PAGEDOWN = KEY_CHANNELDOWN # Channel Up + KEY_PAGEUP = KEY_CHANNELUP # Channel Down +#KEY_0 = KEY_MUTE # Mute (also Button 0) + + KEY_OK = KEY_OK # Direction OK (also used for Enter) + KEY_UP = KEY_UP # Direction Up + KEY_DOWN = KEY_DOWN # Direction Down + KEY_LEFT = KEY_LEFT # Direction Left + KEY_RIGHT = KEY_RIGHT # Direction Right + + KEY_PLAY = KEY_PLAY # Play (also used for Pause) + KEY_STOP = KEY_STOP # Stop + KEY_RECORD = KEY_RECORD # Record + KEY_FORWARD = KEY_FORWARD # Forward + KEY_REWIND = KEY_REWIND # Reverse + KEY_F = KEY_NEXT # Next track + KEY_E = KEY_PREVIOUS # Pre-track + + KEY_INFO = KEY_VIDEO # My Videos + KEY_DVD = KEY_CAMERA # My Pictures + KEY_BOOKMARKS = KEY_AUDIO # My Music + KEY_HOME = KEY_PROG1 # Start Key + + KEY_MENU = KEY_EXIT # Back + KEY_END = KEY_DELETE # Button "RC" diff --git a/packages/sysutils/remote/eventlircd/config/rules/98-eventlircd.rules b/packages/sysutils/remote/eventlircd/config/rules/98-eventlircd.rules index b4f40e6183..1006e59a5e 100644 --- a/packages/sysutils/remote/eventlircd/config/rules/98-eventlircd.rules +++ b/packages/sysutils/remote/eventlircd/config/rules/98-eventlircd.rules @@ -68,6 +68,10 @@ LABEL="begin-usb" ENV{ID_USB_INTERFACES}=="", IMPORT{program}="usb_id --export %p" +ENV{ID_VENDOR_ID}=="0bc7", ENV{ID_MODEL_ID}=="0006", \ + ENV{eventlircd_enable}="true", + ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap" + ENV{ID_VENDOR_ID}=="0419", ENV{ID_MODEL_ID}=="0001", \ ENV{eventlircd_enable}="true", ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap" diff --git a/packages/sysutils/remote/eventlircd/meta b/packages/sysutils/remote/eventlircd/meta index a18ae143d6..02175a4907 100644 --- a/packages/sysutils/remote/eventlircd/meta +++ b/packages/sysutils/remote/eventlircd/meta @@ -12,3 +12,5 @@ PKG_SECTION="system/remote" PKG_SHORTDESC="eventlircd:The eventlircd daemon provides various functions for LIRC devices" PKG_LONGDESC="The eventlircd daemon provides four functions for LIRC devices" PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/sysutils/remote/eventlircd/patches/eventlircd-17-fixes-0.1.diff b/packages/sysutils/remote/eventlircd/patches/eventlircd-17-fixes-0.1.patch similarity index 100% rename from packages/sysutils/remote/eventlircd/patches/eventlircd-17-fixes-0.1.diff rename to packages/sysutils/remote/eventlircd/patches/eventlircd-17-fixes-0.1.patch diff --git a/packages/sysutils/remote/eventlircd/patches/eventlircd-17-repeat-0.1.diff b/packages/sysutils/remote/eventlircd/patches/eventlircd-17-repeat-0.1.patch similarity index 100% rename from packages/sysutils/remote/eventlircd/patches/eventlircd-17-repeat-0.1.diff rename to packages/sysutils/remote/eventlircd/patches/eventlircd-17-repeat-0.1.patch diff --git a/packages/sysutils/remote/install b/packages/sysutils/remote/install index 48ee8edfd9..a5aac648f3 100755 --- a/packages/sysutils/remote/install +++ b/packages/sysutils/remote/install @@ -2,9 +2,5 @@ . config/options $1 -$SCRIPTS/install irserver -$SCRIPTS/install eventlircd -[ "$ATVCLIENT_SUPPORT" = "yes" ] && $SCRIPTS/install atvclient - mkdir -p $INSTALL/usr/config cp $PKG_DIR/config/*.conf $INSTALL/usr/config \ No newline at end of file diff --git a/packages/sysutils/remote/irserver/build b/packages/sysutils/remote/irserver/build index bb2434d5fa..5a028a3950 100755 --- a/packages/sysutils/remote/irserver/build +++ b/packages/sysutils/remote/irserver/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD [ $TARGET_ARCH = i386 ] && make CC=$TARGET_CC irserver diff --git a/packages/sysutils/remote/irserver/meta b/packages/sysutils/remote/irserver/meta new file mode 100644 index 0000000000..6d90ebbf9a --- /dev/null +++ b/packages/sysutils/remote/irserver/meta @@ -0,0 +1,16 @@ +PKG_NAME="irserver" +PKG_VERSION="6.02.82" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="Freeware" +PKG_SITE="http://http://www.irtrans.de" +PKG_URL="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="sysutils/remote" +PKG_SHORTDESC="irserver: IR Trans transforms your PC into a programmable remote control." +PKG_LONGDESC="IR Trans transforms your PC into a programmable remote control: It learns the codes of your remote control, stores them in a database and sends them controlled by your applications." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/sysutils/remote/irserver/patches/01-irserver-add_support_for_dev_irtransX-0.1.diff b/packages/sysutils/remote/irserver/patches/irserver-6.02.82-add_support_for_dev_irtransX-0.1.patch similarity index 100% rename from packages/sysutils/remote/irserver/patches/01-irserver-add_support_for_dev_irtransX-0.1.diff rename to packages/sysutils/remote/irserver/patches/irserver-6.02.82-add_support_for_dev_irtransX-0.1.patch diff --git a/packages/sysutils/remote/irserver/patches/irserver-20100817-lirc_0.8.6.diff b/packages/sysutils/remote/irserver/patches/irserver-6.02.82-lirc_0.8.6.patch similarity index 100% rename from packages/sysutils/remote/irserver/patches/irserver-20100817-lirc_0.8.6.diff rename to packages/sysutils/remote/irserver/patches/irserver-6.02.82-lirc_0.8.6.patch diff --git a/packages/sysutils/remote/irserver/url b/packages/sysutils/remote/irserver/url deleted file mode 100644 index ad860a076b..0000000000 --- a/packages/sysutils/remote/irserver/url +++ /dev/null @@ -1 +0,0 @@ -http://sources.openelec.tv/svn/irserver-6.02.82.tar.bz2 \ No newline at end of file diff --git a/packages/sysutils/remote/lirc/meta b/packages/sysutils/remote/lirc/meta index 932cccba3b..0270fdf713 100644 --- a/packages/sysutils/remote/lirc/meta +++ b/packages/sysutils/remote/lirc/meta @@ -8,7 +8,9 @@ PKG_URL="http://prdownloads.sourceforge.net/lirc/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" PKG_BUILD_DEPENDS="toolchain" PKG_PRIORITY="optional" -PKG_SECTION="system/remote" +PKG_SECTION="sysutils/remote" PKG_SHORTDESC="lirc: Linux Infrared Remote Control" PKG_LONGDESC="LIRC is a package that allows you to decode and send infra-red signals of many (but not all) commonly used remote controls." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/sysutils/remote/lirc/patches/lirc-in-kernel-ioctls.diff b/packages/sysutils/remote/lirc/patches/lirc-0.8.7-in_kernel_ioctls.patch similarity index 100% rename from packages/sysutils/remote/lirc/patches/lirc-in-kernel-ioctls.diff rename to packages/sysutils/remote/lirc/patches/lirc-0.8.7-in_kernel_ioctls.patch diff --git a/packages/sysutils/remote/lirc/patches/lirc-0.8.7-uinput_key_fix.diff b/packages/sysutils/remote/lirc/patches/lirc-0.8.7-uinput_key_fix.patch similarity index 100% rename from packages/sysutils/remote/lirc/patches/lirc-0.8.7-uinput_key_fix.diff rename to packages/sysutils/remote/lirc/patches/lirc-0.8.7-uinput_key_fix.patch diff --git a/packages/sysutils/remote/meta b/packages/sysutils/remote/meta new file mode 100644 index 0000000000..b1fefb37c1 --- /dev/null +++ b/packages/sysutils/remote/meta @@ -0,0 +1,20 @@ +PKG_NAME="remote" +PKG_VERSION="" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.openelec.tv" +PKG_URL="" +PKG_DEPENDS="irserver eventlircd" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="system/remote" +PKG_SHORTDESC="remote: Meta package for installing various tools needed for remote support" +PKG_LONGDESC="Meta package for installing various tools needed for remote support" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" + +if [ "$ATVCLIENT_SUPPORT" = "yes" ]; then + PKG_DEPENDS="$PKG_DEPENDS atvclient" +fi diff --git a/packages/sysutils/sg3_utils/build b/packages/sysutils/sg3_utils/build index 4b6fa620c3..2b7d031b87 100755 --- a/packages/sysutils/sg3_utils/build +++ b/packages/sysutils/sg3_utils/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/sysutils/sg3_utils/install b/packages/sysutils/sg3_utils/install index 8fb846d505..6affa11e33 100755 --- a/packages/sysutils/sg3_utils/install +++ b/packages/sysutils/sg3_utils/install @@ -3,4 +3,4 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/lib/.libs/*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/lib/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/sysutils/sg3_utils/meta b/packages/sysutils/sg3_utils/meta new file mode 100644 index 0000000000..079a736828 --- /dev/null +++ b/packages/sysutils/sg3_utils/meta @@ -0,0 +1,16 @@ +PKG_NAME="sg3_utils" +PKG_VERSION="1.29" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://freshmeat.net/projects/sg3_utils/" +PKG_URL="http://sg.danny.cz/sg/p/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="sg3_utils: a package of utilities for accessing devices that use SCSI command sets." +PKG_LONGDESC="sg3_utils is a package of utilities for accessing devices that use SCSI command sets. Most utilities issue a single command and display the response, while some work at a slightly higher level. There are utilities for fetching INQUIRY data and VPD, mode, and log pages. There is support for modern SCSI transports such as SAS and FCP." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/sysutils/sg3_utils/url b/packages/sysutils/sg3_utils/url deleted file mode 100644 index 8f7070e5b2..0000000000 --- a/packages/sysutils/sg3_utils/url +++ /dev/null @@ -1 +0,0 @@ -http://sg.danny.cz/sg/p/sg3_utils-1.29.tar.bz2 \ No newline at end of file diff --git a/packages/sysutils/siglaunchd/build b/packages/sysutils/siglaunchd/build index d4ffcb370d..cf6d510702 100755 --- a/packages/sysutils/siglaunchd/build +++ b/packages/sysutils/siglaunchd/build @@ -3,7 +3,6 @@ . config/options $1 cd $PKG_BUILD -$AUTORECONF ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ diff --git a/packages/sysutils/siglaunchd/meta b/packages/sysutils/siglaunchd/meta index acef7f4405..bbfc44aa42 100644 --- a/packages/sysutils/siglaunchd/meta +++ b/packages/sysutils/siglaunchd/meta @@ -12,3 +12,5 @@ PKG_SECTION="system" PKG_SHORTDESC="siglaunchd: This project is daemon which listens to dbus signals and runs applications accordingly." PKG_LONGDESC="This project is daemon which listens to dbus signals and runs applications accordingly. The signals, application to run and some rules that will be evaluated against incoming dbus signals can be easily changed in the configuration file. " PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/sysutils/timezone-data/meta b/packages/sysutils/timezone-data/meta index 80f5d90a02..7715c34231 100644 --- a/packages/sysutils/timezone-data/meta +++ b/packages/sysutils/timezone-data/meta @@ -1,5 +1,5 @@ PKG_NAME="timezone-data" -PKG_VERSION="2010n" +PKG_VERSION="2010o" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="Public Domain" @@ -12,3 +12,5 @@ PKG_SECTION="system" PKG_SHORTDESC="timezone-data" PKG_LONGDESC="timezone-data" PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/sysutils/udev/build b/packages/sysutils/udev/build index 09c27d94cf..60c2fea416 100755 --- a/packages/sysutils/udev/build +++ b/packages/sysutils/udev/build @@ -2,15 +2,7 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build glib -$SCRIPTS/build pciutils -$SCRIPTS/build usbutils -$SCRIPTS/build libusb-compat - cd $PKG_BUILD -$AUTORECONF - ac_cv_file__usr_share_pci_ids="yes" \ ac_cv_file__usr_share_hwdata_pci_ids="no" \ ac_cv_file__usr_share_misc_pci_ids="no" \ diff --git a/packages/sysutils/udev/install b/packages/sysutils/udev/install index d3d4e22317..86c4ef90e0 100755 --- a/packages/sysutils/udev/install +++ b/packages/sysutils/udev/install @@ -2,20 +2,15 @@ . config/options $1 -$SCRIPTS/install glib -$SCRIPTS/install pciutils -$SCRIPTS/install usbutils -$SCRIPTS/install libusb-compat - - add_group cdrom 11 - add_group dialout 18 - add_group disk 6 - add_group floppy 19 - add_group kmem 9 - add_group lp 7 - add_group tape 33 - add_group tty 5 - add_group video 39 +add_group cdrom 11 +add_group dialout 18 +add_group disk 6 +add_group floppy 19 +add_group kmem 9 +add_group lp 7 +add_group tape 33 +add_group tty 5 +add_group video 39 mkdir -p $INSTALL/sbin cp $PKG_BUILD/$1/udevadm $INSTALL/sbin diff --git a/packages/sysutils/udev/meta b/packages/sysutils/udev/meta new file mode 100644 index 0000000000..e3eba540a7 --- /dev/null +++ b/packages/sysutils/udev/meta @@ -0,0 +1,16 @@ +PKG_NAME="udev" +PKG_VERSION="164" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://ftp.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" +PKG_URL="http://www.eu.kernel.org/pub/linux/utils/kernel/hotplug/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="glib pciutils usbutils libusb-compat" +PKG_BUILD_DEPENDS="toolchain glib pciutils usbutils libusb-compat" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="udev: A Userspace Implementation for dynamic /dev nodes" +PKG_LONGDESC="U/dev is a program that replaces the functionality of DevFS (only providing /dev entries for devices that are in the system at any point in time). It is an attempt to move all naming policy out of the kernel." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/sysutils/udev/patches/10_udev-162_remove_keymap_and_acl-0.1.diff b/packages/sysutils/udev/patches/udev-164-remove_keymap_and_acl-0.1.patch similarity index 100% rename from packages/sysutils/udev/patches/10_udev-162_remove_keymap_and_acl-0.1.diff rename to packages/sysutils/udev/patches/udev-164-remove_keymap_and_acl-0.1.patch diff --git a/packages/sysutils/udev/url b/packages/sysutils/udev/url deleted file mode 100644 index 2f87dbb3b8..0000000000 --- a/packages/sysutils/udev/url +++ /dev/null @@ -1 +0,0 @@ -http://www.eu.kernel.org/pub/linux/utils/kernel/hotplug/udev-164.tar.bz2 diff --git a/packages/sysutils/udisks/build b/packages/sysutils/udisks/build index a512566626..4dd0ce0941 100755 --- a/packages/sysutils/udisks/build +++ b/packages/sysutils/udisks/build @@ -2,17 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build sg3_utils -$SCRIPTS/build udev -$SCRIPTS/build glib -$SCRIPTS/build dbus -$SCRIPTS/build dbus-glib -$SCRIPTS/build parted -$SCRIPTS/build LVM2 -$SCRIPTS/build polkit -$SCRIPTS/build libatasmart - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/sysutils/udisks/install b/packages/sysutils/udisks/install index 66db80ca36..057d67ad53 100755 --- a/packages/sysutils/udisks/install +++ b/packages/sysutils/udisks/install @@ -2,18 +2,8 @@ . config/options $1 -$SCRIPTS/install sg3_utils -$SCRIPTS/install udev -$SCRIPTS/install glib -$SCRIPTS/install dbus -$SCRIPTS/install dbus-glib -$SCRIPTS/install parted -$SCRIPTS/install LVM2 -$SCRIPTS/install polkit -$SCRIPTS/install libatasmart - mkdir -p $INSTALL/etc/dbus-1/system.d - cp -P $PKG_BUILD/data/org.freedesktop.UDisks.conf $INSTALL/etc/dbus-1/system.d + cp $PKG_BUILD/data/org.freedesktop.UDisks.conf $INSTALL/etc/dbus-1/system.d mkdir -p $INSTALL/lib/udev cp -P $PKG_BUILD/src/probers/udisks-dm-export $INSTALL/lib/udev diff --git a/packages/sysutils/udisks/meta b/packages/sysutils/udisks/meta new file mode 100644 index 0000000000..9415a19a2b --- /dev/null +++ b/packages/sysutils/udisks/meta @@ -0,0 +1,16 @@ +PKG_NAME="udisks" +PKG_VERSION="1.0.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.freedesktop.org/wiki/Software/udisks" +PKG_URL="http://hal.freedesktop.org/releases/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="sg3_utils udev glib dbus dbus-glib parted LVM2 polkit libatasmart" +PKG_BUILD_DEPENDS="toolchain sg3_utils udev glib dbus dbus-glib parted LVM2 polkit libatasmart" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="udisks: a modular hardware abstraction layer designed for use in Linux systems that is designed to simplify device management." +PKG_LONGDESC="Udisks is a modular hardware abstraction layer designed for use in Linux systems that is designed to simplify device management and replace the current monolithic Linux HAL. Udisks includes the ability to enumerate system devices and send notifications when hardware is added or removed from the computer system." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/sysutils/udisks/url b/packages/sysutils/udisks/url deleted file mode 100644 index 91ff561e1a..0000000000 --- a/packages/sysutils/udisks/url +++ /dev/null @@ -1 +0,0 @@ -http://hal.freedesktop.org/releases/udisks-1.0.1.tar.gz diff --git a/packages/sysutils/upower/build b/packages/sysutils/upower/build index d085b3a555..449c424d59 100755 --- a/packages/sysutils/upower/build +++ b/packages/sysutils/upower/build @@ -2,13 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build udev -$SCRIPTS/build glib -$SCRIPTS/build dbus -$SCRIPTS/build dbus-glib -$SCRIPTS/build polkit - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/sysutils/upower/install b/packages/sysutils/upower/install index b03b420288..5e9298dcf7 100755 --- a/packages/sysutils/upower/install +++ b/packages/sysutils/upower/install @@ -2,13 +2,6 @@ . config/options $1 -$SCRIPTS/install udev -$SCRIPTS/install glib -$SCRIPTS/install dbus -$SCRIPTS/install dbus-glib -$SCRIPTS/install polkit -$SCRIPTS/install pm-utils - mkdir -p $INSTALL/etc/UPower cp $PKG_BUILD/etc/UPower.conf $INSTALL/etc/UPower diff --git a/packages/sysutils/upower/meta b/packages/sysutils/upower/meta new file mode 100644 index 0000000000..a907a90a87 --- /dev/null +++ b/packages/sysutils/upower/meta @@ -0,0 +1,16 @@ +PKG_NAME="upower" +PKG_VERSION="0.9.7" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://upower.freedesktop.org/" +PKG_URL="http://upower.freedesktop.org/releases/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="udev glib dbus dbus-glib polkit pm-utils" +PKG_BUILD_DEPENDS="toolchain udev glib dbus dbus-glib gobject-introspection polkit" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="upower: a modular hardware abstraction layer designed for use in Linux systems that is designed to simplify device management." +PKG_LONGDESC="Upower is a modular hardware abstraction layer designed for use in Linux systems that is designed to simplify device management and replace the current monolithic Linux HAL. Upower includes the ability to enumerate system devices and send notifications when hardware is added or removed from the computer system." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/sysutils/upower/url b/packages/sysutils/upower/url deleted file mode 100644 index a01c2427c4..0000000000 --- a/packages/sysutils/upower/url +++ /dev/null @@ -1 +0,0 @@ -http://upower.freedesktop.org/releases/upower-0.9.6.tar.bz2 \ No newline at end of file diff --git a/packages/sysutils/usbutils/build b/packages/sysutils/usbutils/build index 2a8c47b27f..302329f595 100755 --- a/packages/sysutils/usbutils/build +++ b/packages/sysutils/usbutils/build @@ -2,10 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build zlib -$SCRIPTS/build libusb-compat - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/sysutils/usbutils/install b/packages/sysutils/usbutils/install index 08ccea9614..cec1729ca1 100755 --- a/packages/sysutils/usbutils/install +++ b/packages/sysutils/usbutils/install @@ -2,11 +2,8 @@ . config/options $1 -$SCRIPTS/install zlib -$SCRIPTS/install libusb-compat - mkdir -p $INSTALL/usr/sbin - cp -PR $PKG_BUILD/lsusb $INSTALL/usr/sbin + cp -P $PKG_BUILD/lsusb $INSTALL/usr/sbin mkdir -p $INSTALL/usr/share/misc - cp -PR $PKG_BUILD/usb.ids $INSTALL/usr/share + cp $PKG_BUILD/usb.ids $INSTALL/usr/share diff --git a/packages/sysutils/usbutils/meta b/packages/sysutils/usbutils/meta new file mode 100644 index 0000000000..4328e5f7ce --- /dev/null +++ b/packages/sysutils/usbutils/meta @@ -0,0 +1,16 @@ +PKG_NAME="usbutils" +PKG_VERSION="0.90" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.linux-usb.org/" +PKG_URL="http://www.kernel.org/pub/linux/utils/usb/usbutils/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="zlib libusb-compat" +PKG_BUILD_DEPENDS="toolchain zlib libusb-compat" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="usbutils: Linux USB Utilities" +PKG_LONGDESC="This package contains various utilities for inspecting and setting of devices connected to the USB bus. Requires a kernel version including usbdevfs support - and this usbdevfs mounted to /proc/bus/usb." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/sysutils/usbutils/url b/packages/sysutils/usbutils/url deleted file mode 100644 index c31de262f9..0000000000 --- a/packages/sysutils/usbutils/url +++ /dev/null @@ -1 +0,0 @@ -http://downloads.sourceforge.net/linux-usb/usbutils-0.86.tar.gz diff --git a/packages/sysutils/util-linux-ng/build b/packages/sysutils/util-linux-ng/build index b52175f579..c1d2857e80 100755 --- a/packages/sysutils/util-linux-ng/build +++ b/packages/sysutils/util-linux-ng/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD gt_cv_func_gnugettext1_libintl=no \ ./configure --host=$TARGET_NAME \ diff --git a/packages/sysutils/util-linux-ng/init.d/09_swapfile b/packages/sysutils/util-linux-ng/init.d/09_swapfile index 13bf3441fa..c27695ed20 100755 --- a/packages/sysutils/util-linux-ng/init.d/09_swapfile +++ b/packages/sysutils/util-linux-ng/init.d/09_swapfile @@ -28,27 +28,29 @@ . /etc/profile INSTALLED_MEMORY=`cat /proc/meminfo | grep 'MemTotal:' | awk '{print $2}'` +SWAP=`blkid -t TYPE="swap" -o device` +SWAPFILE="$HOME/.cache/swapfile" -if [ $INSTALLED_MEMORY -le 500000 -a -f $HOME/.config/swapon ]; then - - if [ ! -f $HOME/.cache/swapfile ]; then +if [ $INSTALLED_MEMORY -le 500000 ]; then + if [ -z "$SWAP" -a ! -f $SWAPFILE ]; then progress "creating swapfile" - - mkdir -p $HOME/.cache - dd if=/dev/zero of=$HOME/.cache/swapfile bs=1024 count=524288 2>&1 > /dev/null - mkswap $HOME/.cache/swapfile 2>&1 > /dev/null + mkdir -p $HOME/.cache + dd if=/dev/zero of=$SWAPFILE bs=1024 count=262144 2>&1 > /dev/null + mkswap $SWAPFILE 2>&1 > /dev/null fi - progress "enable swapfile" - swapon -p 10000 $HOME/.cache/swapfile - - [ $INSTALLED_MEMORY -le 260000 ] \ - && sysctl -w vm.swappiness=100 2>&1 > /dev/null \ - || sysctl -w vm.swappiness=60 2>&1 > /dev/null + progress "enable swap" + [ -z "$SWAP" -a -f $SWAPFILE ] && SWAP=$SWAPFILE + for i in $SWAP; do + swapon -p 10000 $SWAP 2>&1 > /dev/null + done + if [ $INSTALLED_MEMORY -le 260000 ]; then + sysctl -w vm.swappiness=100 2>&1 > /dev/null + else + sysctl -w vm.swappiness=60 2>&1 > /dev/null + fi else - sysctl -w vm.swappiness=0 2>&1 > /dev/null - fi diff --git a/packages/sysutils/util-linux-ng/meta b/packages/sysutils/util-linux-ng/meta new file mode 100644 index 0000000000..09840fa18e --- /dev/null +++ b/packages/sysutils/util-linux-ng/meta @@ -0,0 +1,16 @@ +PKG_NAME="util-linux-ng" +PKG_VERSION="2.18" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://userweb.kernel.org/~kzak/util-linux-ng/" +PKG_URL="http://www.kernel.org/pub/linux/utils/util-linux-ng/v$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="util-linux: Miscellaneous system utilities for Linux" +PKG_LONGDESC="The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among many features, Util-linux contains the fdisk configuration tool and the login program." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/sysutils/util-linux-ng/url b/packages/sysutils/util-linux-ng/url deleted file mode 100644 index acbdb64b0d..0000000000 --- a/packages/sysutils/util-linux-ng/url +++ /dev/null @@ -1 +0,0 @@ -http://www.kernel.org/pub/linux/utils/util-linux-ng/v2.18/util-linux-ng-2.18.tar.bz2 diff --git a/packages/sysutils/wiiuse/build b/packages/sysutils/wiiuse/build index a0ce8b29a8..1da091b916 100755 --- a/packages/sysutils/wiiuse/build +++ b/packages/sysutils/wiiuse/build @@ -2,7 +2,7 @@ . config/options $1 -cd $BUILD/${PKG_NAME}_v${PKG_VERSION} +cd $PKG_BUILD make wiiuse diff --git a/packages/sysutils/wiiuse/install b/packages/sysutils/wiiuse/install index aa4f48b3c1..b02e898372 100755 --- a/packages/sysutils/wiiuse/install +++ b/packages/sysutils/wiiuse/install @@ -3,4 +3,4 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -PR $BUILD/${PKG_NAME}_v${PKG_VERSION}/src/release*/*.so $INSTALL/usr/lib + cp -PR $PKG_BUILD/src/release*/*.so $INSTALL/usr/lib diff --git a/packages/sysutils/wiiuse/meta b/packages/sysutils/wiiuse/meta index c377328e06..957b07f5c9 100644 --- a/packages/sysutils/wiiuse/meta +++ b/packages/sysutils/wiiuse/meta @@ -1,10 +1,10 @@ PKG_NAME="wiiuse" -PKG_VERSION="0.12" +PKG_VERSION="v0.12" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPLv3" PKG_SITE="http://www.wiiuse.net/" -PKG_URL="http://downloads.sourceforge.net/project/wiiuse/wiiuse/v0.12/wiiuse_v0.12_src.tar.gz" +PKG_URL="http://downloads.sourceforge.net/project/wiiuse/wiiuse/$PKG_VERSION/${PKG_NAME}_${PKG_VERSION}_src.tar.gz" PKG_DEPENDS="bluez" PKG_BUILD_DEPENDS="toolchain bluez" PKG_PRIORITY="optional" @@ -12,3 +12,5 @@ PKG_SECTION="system" PKG_SHORTDESC="Wiiuse is a library written in C that connects with several Nintendo Wii remotes." PKG_LONGDESC="Wiiuse is a library written in C that connects with several Nintendo Wii remotes. Supports motion sensing, IR tracking, nunchuk, classic controller, and the Guitar Hero 3 controller. Single threaded and nonblocking makes a light weight and clean API." PKG_IS_ADDON="yes" + +PKG_AUTORECONF="no" diff --git a/packages/sysutils/wiiuse/patches/wiiuse-connect-0.1.diff b/packages/sysutils/wiiuse/patches/wiiuse-v0.12-connect-0.1.patch similarity index 100% rename from packages/sysutils/wiiuse/patches/wiiuse-connect-0.1.diff rename to packages/sysutils/wiiuse/patches/wiiuse-v0.12-connect-0.1.patch diff --git a/packages/sysutils/wiiuse/patches/wiiuse-crosscompiling-0.1.diff b/packages/sysutils/wiiuse/patches/wiiuse-v0.12-crosscompiling-0.1.patch similarity index 100% rename from packages/sysutils/wiiuse/patches/wiiuse-crosscompiling-0.1.diff rename to packages/sysutils/wiiuse/patches/wiiuse-v0.12-crosscompiling-0.1.patch diff --git a/packages/textproc/expat-host/build b/packages/textproc/expat-host/build index a7214af002..a3ef8f8563 100755 --- a/packages/textproc/expat-host/build +++ b/packages/textproc/expat-host/build @@ -2,14 +2,14 @@ . config/options $1 -$SCRIPTS/build toolchain $SCRIPTS/unpack expat setup_toolchain host cd $BUILD/expat-* -mkdir -p .build-host && cd .build-host +do_autoreconf -I conftools +mkdir -p .build-host && cd .build-host ../configure --prefix=$ROOT/$TOOLCHAIN \ --enable-shared \ --disable-static \ diff --git a/packages/textproc/expat-host/meta b/packages/textproc/expat-host/meta new file mode 100644 index 0000000000..dfa064ba5f --- /dev/null +++ b/packages/textproc/expat-host/meta @@ -0,0 +1,16 @@ +PKG_NAME="expat-host" +PKG_VERSION="" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://expat.sourceforge.net/" +PKG_URL="" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="textproc" +PKG_SHORTDESC="expat: XML parser library" +PKG_LONGDESC="Expat is an XML parser library written in C. It is a stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags). An introductory article on using Expat is available on xml.com." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/textproc/expat/build b/packages/textproc/expat/build index 3d260f0444..cdefacd081 100755 --- a/packages/textproc/expat/build +++ b/packages/textproc/expat/build @@ -2,11 +2,11 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD -mkdir -p .build-target && cd .build-target +do_autoreconf -I conftools + +mkdir -p .build-target && cd .build-target ../configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ diff --git a/packages/textproc/expat/install b/packages/textproc/expat/install index 11602b5522..baab1c9a7f 100755 --- a/packages/textproc/expat/install +++ b/packages/textproc/expat/install @@ -3,4 +3,4 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/.build-target/.libs/libexpat.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/.build-target/.libs/libexpat.so* $INSTALL/usr/lib diff --git a/packages/textproc/expat/meta b/packages/textproc/expat/meta new file mode 100644 index 0000000000..db86db551e --- /dev/null +++ b/packages/textproc/expat/meta @@ -0,0 +1,16 @@ +PKG_NAME="expat" +PKG_VERSION="2.0.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://expat.sourceforge.net/" +PKG_URL="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="textproc" +PKG_SHORTDESC="expat: XML parser library" +PKG_LONGDESC="Expat is an XML parser library written in C. It is a stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags). An introductory article on using Expat is available on xml.com." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/textproc/expat/patches/expat-2.0.1-configure.patch b/packages/textproc/expat/patches/expat-2.0.1-configure.patch new file mode 100644 index 0000000000..0f92407a8e --- /dev/null +++ b/packages/textproc/expat/patches/expat-2.0.1-configure.patch @@ -0,0 +1,21 @@ +diff -Naur expat-2.0.1-old/configure.in expat-2.0.1-new/configure.in +--- expat-2.0.1-old/configure.in 2007-05-09 06:26:48.000000000 -0700 ++++ expat-2.0.1-new/configure.in 2010-08-17 13:12:17.000000000 -0700 +@@ -31,6 +31,7 @@ + + AC_CONFIG_SRCDIR(Makefile.in) + AC_CONFIG_AUX_DIR(conftools) ++AC_CONFIG_MACRO_DIR([conftools]) + + + dnl +@@ -50,9 +51,6 @@ + + AC_CONFIG_HEADER(expat_config.h) + +-sinclude(conftools/libtool.m4) +-sinclude(conftools/ac_c_bigendian_cross.m4) +- + AC_LIBTOOL_WIN32_DLL + AC_PROG_LIBTOOL + diff --git a/packages/textproc/expat/url b/packages/textproc/expat/url deleted file mode 100644 index a3cfcd6cd4..0000000000 --- a/packages/textproc/expat/url +++ /dev/null @@ -1 +0,0 @@ -http://sources.openelec.tv/svn/expat-2.0.1.tar.bz2 diff --git a/packages/textproc/libxml2-host/build b/packages/textproc/libxml2-host/build index 3c48ef62b8..8746bc842d 100755 --- a/packages/textproc/libxml2-host/build +++ b/packages/textproc/libxml2-host/build @@ -2,16 +2,14 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build Python $SCRIPTS/unpack libxml2 setup_toolchain host cd $BUILD/libxml2-* -mkdir -p .build-host -cd .build-host +do_autoreconf +mkdir -p .build-host && cd .build-host ../configure --prefix=$ROOT/$TOOLCHAIN \ --disable-ipv6 \ --with-python \ diff --git a/packages/textproc/libxml2-host/meta b/packages/textproc/libxml2-host/meta new file mode 100644 index 0000000000..2affe1cc3e --- /dev/null +++ b/packages/textproc/libxml2-host/meta @@ -0,0 +1,16 @@ +PKG_NAME="libxml2-host" +PKG_VERSION="" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="MIT" +PKG_SITE="http://xmlsoft.org" +PKG_URL="" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain Python" +PKG_PRIORITY="optional" +PKG_SECTION="textproc" +PKG_SHORTDESC="libxml: XML parser library for Gnome" +PKG_LONGDESC="The libxml package contains an XML library, which allows you to manipulate XML files. XML (eXtensible Markup Language) is a data format for structured document interchange via the Web." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/textproc/libxml2-host/url b/packages/textproc/libxml2-host/url deleted file mode 100644 index f4ddb0d914..0000000000 --- a/packages/textproc/libxml2-host/url +++ /dev/null @@ -1 +0,0 @@ -ftp://xmlsoft.org/libxml2/libxml2-2.7.7.tar.gz \ No newline at end of file diff --git a/packages/textproc/libxml2/build b/packages/textproc/libxml2/build index 1d1a537aea..58933585b3 100755 --- a/packages/textproc/libxml2/build +++ b/packages/textproc/libxml2/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD mkdir -p .build-target diff --git a/packages/textproc/libxml2/meta b/packages/textproc/libxml2/meta new file mode 100644 index 0000000000..c4ce32d021 --- /dev/null +++ b/packages/textproc/libxml2/meta @@ -0,0 +1,16 @@ +PKG_NAME="libxml2" +PKG_VERSION="2.7.8" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="MIT" +PKG_SITE="http://xmlsoft.org" +PKG_URL="ftp://xmlsoft.org/libxml2/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="textproc" +PKG_SHORTDESC="libxml: XML parser library for Gnome" +PKG_LONGDESC="The libxml package contains an XML library, which allows you to manipulate XML files. XML (eXtensible Markup Language) is a data format for structured document interchange via the Web." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/textproc/libxml2/url b/packages/textproc/libxml2/url deleted file mode 100644 index f4ddb0d914..0000000000 --- a/packages/textproc/libxml2/url +++ /dev/null @@ -1 +0,0 @@ -ftp://xmlsoft.org/libxml2/libxml2-2.7.7.tar.gz \ No newline at end of file diff --git a/packages/textproc/xerces-c/build b/packages/textproc/xerces-c/build index 82c9ce5a24..22dc76fcb1 100755 --- a/packages/textproc/xerces-c/build +++ b/packages/textproc/xerces-c/build @@ -2,8 +2,8 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build curl +# xerces_c fails to build with LTO support + strip_lto cd $PKG_BUILD ./configure --host=$TARGET_NAME \ diff --git a/packages/textproc/xerces-c/install b/packages/textproc/xerces-c/install index c93415f587..6508276a1e 100755 --- a/packages/textproc/xerces-c/install +++ b/packages/textproc/xerces-c/install @@ -2,7 +2,5 @@ . config/options $1 -$SCRIPTS/install curl - mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/src/.libs/*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/src/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/textproc/xerces-c/meta b/packages/textproc/xerces-c/meta new file mode 100644 index 0000000000..ee24c254e2 --- /dev/null +++ b/packages/textproc/xerces-c/meta @@ -0,0 +1,16 @@ +PKG_NAME="xerces-c" +PKG_VERSION="3.1.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="APL" +PKG_SITE="http://xml.apache.org/xerces-c/" +PKG_URL="http://mirror.switch.ch/mirror/apache/dist/xerces/c/3/sources/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="curl" +PKG_BUILD_DEPENDS="toolchain curl" +PKG_PRIORITY="optional" +PKG_SECTION="textproc" +PKG_SHORTDESC="xerces-c: A C++ XML parser" +PKG_LONGDESC="Xerces C++ is a validating XML parser written in a portable subset of C++. It makes it easy to give your application the ability to read and write XML data. A shared library is provided for parsing, generating, manipulating, and validating XML documents. It is faithful to the XML 1. 0 recommendation and associated standards ( DOM 1. 0, DOM 2. 0. SAX 1. 0, SAX 2. 0, Namespaces). It also provides an implementation of a subset of the Schema." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/textproc/xerces-c/url b/packages/textproc/xerces-c/url deleted file mode 100644 index b8cf167d8d..0000000000 --- a/packages/textproc/xerces-c/url +++ /dev/null @@ -1 +0,0 @@ -http://mirror.switch.ch/mirror/apache/dist/xerces/c/3/sources/xerces-c-3.1.1.tar.gz \ No newline at end of file diff --git a/packages/toolchain/archivers/lzma/meta b/packages/toolchain/archivers/lzma/meta new file mode 100644 index 0000000000..122f52f2bf --- /dev/null +++ b/packages/toolchain/archivers/lzma/meta @@ -0,0 +1,16 @@ +PKG_NAME="lzma" +PKG_VERSION="907" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.7-zip.org/sdk.html" +PKG_URL="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="ccache" +PKG_PRIORITY="optional" +PKG_SECTION="toolchain/archivers" +PKG_SHORTDESC="lzma: A file compression utility using the LZMA algorithm" +PKG_LONGDESC="LZMA utils in a nutshell. Average compression ratio of LZMA is about 30% better than that of gzip, and 15% better than that of bzip2. Decompression speed is only little slower than that of gzip, being two to five times faster than bzip2. In fast mode, compresses faster than bzip2 with a comparable compression ratio. However achieving the best compression ratios takes four to even twelve times longer than with bzip2. However, this doesn't affect decompressing speed." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/toolchain/archivers/lzma/url b/packages/toolchain/archivers/lzma/url deleted file mode 100644 index 767ae3a820..0000000000 --- a/packages/toolchain/archivers/lzma/url +++ /dev/null @@ -1 +0,0 @@ -http://sources.openelec.tv/svn/lzma-907.tar.bz2 \ No newline at end of file diff --git a/packages/toolchain/build b/packages/toolchain/build deleted file mode 100755 index 6e96896882..0000000000 --- a/packages/toolchain/build +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -. config/options $1 - -$SCRIPTS/build configtools toolchain - -$SCRIPTS/install make -$SCRIPTS/install sed -$SCRIPTS/install pkg-config - -$SCRIPTS/build autotools - -$SCRIPTS/build intltool -$SCRIPTS/build gcc-final -$SCRIPTS/install ccache toolchain - -$SCRIPTS/build cmake -$SCRIPTS/build jam -$SCRIPTS/build yasm diff --git a/packages/toolchain/devel/autotools/autoconf-2.64/build b/packages/toolchain/devel/autotools/autoconf-2.64/build index e041477622..3fc029aa05 100755 --- a/packages/toolchain/devel/autotools/autoconf-2.64/build +++ b/packages/toolchain/devel/autotools/autoconf-2.64/build @@ -2,12 +2,10 @@ . config/options $1 -$SCRIPTS/build m4 -$SCRIPTS/build libtool-host - setup_toolchain host -cd $BUILD/$1 +cd $BUILD/$PKG_NAME + EMACS="no" \ ac_cv_path_M4=$ROOT/$TOOLCHAIN/bin/m4 \ ac_cv_prog_gnu_m4_gnu=no \ @@ -19,16 +17,16 @@ ac_cv_prog_gnu_m4_gnu=no \ make install \ prefix=$ROOT/$TOOLCHAIN \ - pkgdatadir=$ROOT/$TOOLCHAIN/share/autoconf-2.64 \ - pkgdatadir=$ROOT/$TOOLCHAIN/lib/autoconf-2.64 \ - pkgdatadir=$ROOT/$TOOLCHAIN/include/autoconf-2.64 \ + pkgdatadir=$ROOT/$TOOLCHAIN/share/$PKG_NAME \ + pkgdatadir=$ROOT/$TOOLCHAIN/lib/$PKG_NAME \ + pkgdatadir=$ROOT/$TOOLCHAIN/include/$PKG_NAME \ install make clean make install \ prefix=$SYSROOT_PREFIX/usr \ - pkgdatadir=$SYSROOT_PREFIX/usr/share/autoconf-2.64 \ - pkgdatadir=$SYSROOT_PREFIX/usr/lib/autoconf-2.64 \ - pkgdatadir=$SYSROOT_PREFIX/usr/include/autoconf-2.64 \ + pkgdatadir=$SYSROOT_PREFIX/usr/share/$PKG_NAME \ + pkgdatadir=$SYSROOT_PREFIX/usr/lib/$PKG_NAME \ + pkgdatadir=$SYSROOT_PREFIX/usr/include/$PKG_NAME \ install diff --git a/packages/toolchain/devel/autotools/autoconf-2.64/meta b/packages/toolchain/devel/autotools/autoconf-2.64/meta new file mode 100644 index 0000000000..50f8e92141 --- /dev/null +++ b/packages/toolchain/devel/autotools/autoconf-2.64/meta @@ -0,0 +1,16 @@ +PKG_NAME="autoconf-2.64" +PKG_VERSION="" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://sources.redhat.com/autoconf/" +PKG_URL="http://ftp.gnu.org/gnu/autoconf/$PKG_NAME.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="ccache m4 libtool-host" +PKG_PRIORITY="optional" +PKG_SECTION="toolchain/devel" +PKG_SHORTDESC="autoconf: A GNU tool for automatically configuring source code" +PKG_LONGDESC="Autoconf is an extensible package of m4 macros that produce shell scripts to automatically configure software source code packages. These scripts can adapt the packages to many kinds of UNIX-like systems without manual user intervention. Autoconf creates a configuration script for a package from a template file that lists the operating system features that the package can use, in the form of m4 macro calls." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/toolchain/devel/autotools/autoconf-2.64/url b/packages/toolchain/devel/autotools/autoconf-2.64/url deleted file mode 100644 index 9cbbe33a61..0000000000 --- a/packages/toolchain/devel/autotools/autoconf-2.64/url +++ /dev/null @@ -1 +0,0 @@ -http://ftp.gnu.org/gnu/autoconf/autoconf-2.64.tar.bz2 \ No newline at end of file diff --git a/packages/toolchain/devel/autotools/autoconf/build b/packages/toolchain/devel/autotools/autoconf/build index cc8557dbda..7109c170c1 100755 --- a/packages/toolchain/devel/autotools/autoconf/build +++ b/packages/toolchain/devel/autotools/autoconf/build @@ -2,12 +2,10 @@ . config/options $1 -$SCRIPTS/build m4 -$SCRIPTS/build libtool-host - setup_toolchain host -cd $BUILD/autoconf-2.68 +cd $BUILD/$PKG_NAME-$PKG_VERSION + EMACS="no" \ ac_cv_path_M4=$ROOT/$TOOLCHAIN/bin/m4 \ ac_cv_prog_gnu_m4_gnu=no \ diff --git a/packages/toolchain/devel/autotools/autoconf/meta b/packages/toolchain/devel/autotools/autoconf/meta new file mode 100644 index 0000000000..05343207ce --- /dev/null +++ b/packages/toolchain/devel/autotools/autoconf/meta @@ -0,0 +1,16 @@ +PKG_NAME="autoconf" +PKG_VERSION="2.68" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://sources.redhat.com/autoconf/" +PKG_URL="http://ftp.gnu.org/gnu/autoconf/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="ccache m4 libtool-host" +PKG_PRIORITY="optional" +PKG_SECTION="toolchain/devel" +PKG_SHORTDESC="autoconf: A GNU tool for automatically configuring source code" +PKG_LONGDESC="Autoconf is an extensible package of m4 macros that produce shell scripts to automatically configure software source code packages. These scripts can adapt the packages to many kinds of UNIX-like systems without manual user intervention. Autoconf creates a configuration script for a package from a template file that lists the operating system features that the package can use, in the form of m4 macro calls." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/toolchain/devel/autotools/autoconf/url b/packages/toolchain/devel/autotools/autoconf/url deleted file mode 100644 index bdff90139d..0000000000 --- a/packages/toolchain/devel/autotools/autoconf/url +++ /dev/null @@ -1 +0,0 @@ -http://ftp.gnu.org/gnu/autoconf/autoconf-2.68.tar.bz2 \ No newline at end of file diff --git a/packages/toolchain/devel/autotools/automake/build b/packages/toolchain/devel/autotools/automake/build index 55ff28b426..7197b13e40 100755 --- a/packages/toolchain/devel/autotools/automake/build +++ b/packages/toolchain/devel/autotools/automake/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build autoconf - setup_toolchain host cd $PKG_BUILD diff --git a/packages/toolchain/devel/autotools/automake/meta b/packages/toolchain/devel/autotools/automake/meta new file mode 100644 index 0000000000..cf514f98b7 --- /dev/null +++ b/packages/toolchain/devel/autotools/automake/meta @@ -0,0 +1,16 @@ +PKG_NAME="automake" +PKG_VERSION="1.11.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://sources.redhat.com/automake/" +PKG_URL="http://ftp.gnu.org/gnu/automake/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="ccache autoconf" +PKG_PRIORITY="optional" +PKG_SECTION="toolchain/devel" +PKG_SHORTDESC="automake: A GNU tool for automatically creating Makefiles" +PKG_LONGDESC="This is Automake, a Makefile generator. It was inspired by the 4.4BSD make and include files, but aims to be portable and to conform to the GNU standards for Makefile variables and targets. Automake is a Perl script. The input files are called Makefile.am. The output files are called Makefile.in; they are intended for use with Autoconf. Automake requires certain things to be done in your configure.in." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/toolchain/devel/autotools/automake/url b/packages/toolchain/devel/autotools/automake/url deleted file mode 100644 index 9722fc7fa6..0000000000 --- a/packages/toolchain/devel/autotools/automake/url +++ /dev/null @@ -1 +0,0 @@ -http://ftp.gnu.org/gnu/automake/automake-1.11.1.tar.bz2 \ No newline at end of file diff --git a/packages/toolchain/devel/autotools/build b/packages/toolchain/devel/autotools/build deleted file mode 100755 index 1380f5ea78..0000000000 --- a/packages/toolchain/devel/autotools/build +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -. config/options $1 - -$SCRIPTS/build autoconf-2.64 -$SCRIPTS/build automake diff --git a/packages/toolchain/devel/autotools/libtool-host/build b/packages/toolchain/devel/autotools/libtool-host/build index 357f69099e..f8778f6175 100755 --- a/packages/toolchain/devel/autotools/libtool-host/build +++ b/packages/toolchain/devel/autotools/libtool-host/build @@ -8,8 +8,7 @@ setup_toolchain host cd $BUILD/libtool* -mkdir -p .objdir-host -cd .objdir-host +mkdir -p .objdir-host && cd .objdir-host ../configure --host=$HOST_NAME \ --build=$HOST_NAME \ diff --git a/packages/toolchain/devel/autotools/libtool-host/meta b/packages/toolchain/devel/autotools/libtool-host/meta new file mode 100644 index 0000000000..354505eea3 --- /dev/null +++ b/packages/toolchain/devel/autotools/libtool-host/meta @@ -0,0 +1,16 @@ +PKG_NAME="libtool-host" +PKG_VERSION="" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.gnu.org/software/libtool/libtool.html" +PKG_URL="" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="ccache" +PKG_PRIORITY="optional" +PKG_SECTION="toolchain/devel" +PKG_SHORTDESC="libtool: Generic library support script" +PKG_LONGDESC="This is GNU Libtool, a generic library support script. Libtool hides the complexity of using shared libraries behind a consistent, portable interface." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/toolchain/devel/autotools/m4/meta b/packages/toolchain/devel/autotools/m4/meta new file mode 100644 index 0000000000..c3567fed64 --- /dev/null +++ b/packages/toolchain/devel/autotools/m4/meta @@ -0,0 +1,16 @@ +PKG_NAME="m4" +PKG_VERSION="1.4.15" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="ftp://ftp.gnu.org/pub/gnu/m4/" +PKG_URL="http://ftp.gnu.org/gnu/m4/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="ccache" +PKG_PRIORITY="optional" +PKG_SECTION="toolchain/devel" +PKG_SHORTDESC="m4: The m4 macro processor" +PKG_LONGDESC="GNU 'M4' is an implementation of the traditional Unix macro processor. It is mostly SVR4 compatible, although it has some extensions (for example, handling more than 9 positional parameters to macros). 'M4' also has built-in functions for including files, running shell commands, doing arithmetic, etc. Autoconf needs GNU 'M4' for generating 'configure' scripts, but not for running them." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/toolchain/devel/autotools/m4/patches/10-m4-include_stat.h-0.1.diff b/packages/toolchain/devel/autotools/m4/patches/m4-1.4.15-include_stat.h-0.1.patch similarity index 100% rename from packages/toolchain/devel/autotools/m4/patches/10-m4-include_stat.h-0.1.diff rename to packages/toolchain/devel/autotools/m4/patches/m4-1.4.15-include_stat.h-0.1.patch diff --git a/packages/toolchain/devel/autotools/m4/url b/packages/toolchain/devel/autotools/m4/url deleted file mode 100644 index 6bdc816ef6..0000000000 --- a/packages/toolchain/devel/autotools/m4/url +++ /dev/null @@ -1 +0,0 @@ -http://ftp.gnu.org/gnu/m4/m4-1.4.14.tar.bz2 \ No newline at end of file diff --git a/packages/toolchain/devel/binutils/build b/packages/toolchain/devel/binutils/build index feec1c1c15..ba49bbd59d 100755 --- a/packages/toolchain/devel/binutils/build +++ b/packages/toolchain/devel/binutils/build @@ -2,23 +2,19 @@ . config/options $1 -$SCRIPTS/install ccache -$SCRIPTS/install linux-headers -$SCRIPTS/build gmp -$SCRIPTS/build mpfr -$SCRIPTS/build ppl -$SCRIPTS/build cloog-ppl -$SCRIPTS/build libelf - if [ $TARGET_ARCH = "x86_64" ]; then WITH_64B_BFD="--enable-64-bit-bfd" fi setup_toolchain host +CPPFLAGS="" +CFLAGS="" +CXXFLAGS="" +LDFLAGS="" + cd $PKG_BUILD -mkdir -p objdir -cd objdir +mkdir -p objdir && cd objdir ../configure --host=$HOST_NAME \ --build=$HOST_NAME \ --target=$TARGET_NAME \ @@ -35,6 +31,9 @@ cd objdir --disable-libssp \ --enable-version-specific-runtime-libs \ $WITH_64B_BFD \ + --enable-plugins \ + --enable-gold=both/ld \ + --enable-lto \ --disable-nls make configure-host @@ -44,7 +43,5 @@ cp -v ../include/libiberty.h $SYSROOT_PREFIX/usr/include make install -# add a link named 'strip' in the toolchain, it overrides the host -# 'strip' with `install -s` - ln -s $TARGET_NAME-strip $ROOT/$TOOLCHAIN/bin/strip - +cp ${TARGET_PREFIX}ld.gold ${TARGET_PREFIX}gold +cp $ROOT/$TOOLCHAIN/$TARGET_NAME/bin/ld.gold $ROOT/$TOOLCHAIN/$TARGET_NAME/bin/gold diff --git a/packages/toolchain/devel/binutils/meta b/packages/toolchain/devel/binutils/meta new file mode 100644 index 0000000000..a225767dc3 --- /dev/null +++ b/packages/toolchain/devel/binutils/meta @@ -0,0 +1,16 @@ +PKG_NAME="binutils" +PKG_VERSION="2.21.51.0.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.gnu.org/software/binutils/binutils.html" +PKG_URL="ftp://ftp.kernel.org/pub/linux/devel/binutils/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="ccache linux-headers gmp mpfr ppl cloog-ppl libelf" +PKG_PRIORITY="optional" +PKG_SECTION="toolchain/devel" +PKG_SHORTDESC="binutils: A GNU collection of binary utilities" +PKG_LONGDESC="The GNU binutils are utilities of use when dealing with object files. the packages includes ld - the GNU linker, as - the GNU assembler, addr2line - converts addresses into filenames and line numbers, ar - a utility for creating, modifying and extracting from archives, c++filt - filter to demangle encoded C++ symbols, gprof - displays profiling information, nlmconv - converts object code into an NLM, nm - lists symbols from object files, objcopy - Copys and translates object files, objdump - displays information from object files, ranlib - generates an index to the contents of an archive, readelf - displays information from any ELF format object file, size - lists the section sizes of an object or archive file, strings - lists printable strings from files, strip - discards symbols as well as windres - a compiler for Windows resource files." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/toolchain/devel/binutils/patches/binutils-2.20.51.0.9-multi_os_directory.diff b/packages/toolchain/devel/binutils/patches/binutils-2.21.51.0.1-multi_os_directory.patch similarity index 100% rename from packages/toolchain/devel/binutils/patches/binutils-2.20.51.0.9-multi_os_directory.diff rename to packages/toolchain/devel/binutils/patches/binutils-2.21.51.0.1-multi_os_directory.patch diff --git a/packages/toolchain/devel/binutils/patches/binutils-2.21.51.0.1-visibility.patch b/packages/toolchain/devel/binutils/patches/binutils-2.21.51.0.1-visibility.patch new file mode 100644 index 0000000000..58067c1e86 --- /dev/null +++ b/packages/toolchain/devel/binutils/patches/binutils-2.21.51.0.1-visibility.patch @@ -0,0 +1,71 @@ +diff -Naur binutils-2.20.51.0.12-old/gold/plugin.cc binutils-2.20.51.0.12-new/gold/plugin.cc +--- binutils-2.20.51.0.12-old/gold/plugin.cc 2010-10-22 06:41:04.000000000 -0700 ++++ binutils-2.20.51.0.12-new/gold/plugin.cc 2010-10-23 06:03:56.000000000 -0700 +@@ -668,28 +668,50 @@ + break; + } + +- switch (isym->visibility) +- { +- case LDPV_PROTECTED: +- vis = elfcpp::STV_PROTECTED; +- break; +- case LDPV_INTERNAL: +- vis = elfcpp::STV_INTERNAL; +- break; +- case LDPV_HIDDEN: +- vis = elfcpp::STV_HIDDEN; +- break; +- case LDPV_DEFAULT: +- default: +- vis = elfcpp::STV_DEFAULT; +- break; +- } +- + if (isym->comdat_key != NULL + && isym->comdat_key[0] != '\0' + && !this->include_comdat_group(isym->comdat_key, layout)) + shndx = elfcpp::SHN_UNDEF; + ++ if (shndx == elfcpp::SHN_UNDEF) ++ { ++ switch (isym->visibility) ++ { ++ case LDPV_PROTECTED: ++ vis = elfcpp::STV_DEFAULT; ++ break; ++ case LDPV_INTERNAL: ++ vis = elfcpp::STV_DEFAULT; ++ break; ++ case LDPV_HIDDEN: ++ vis = elfcpp::STV_DEFAULT; ++ break; ++ case LDPV_DEFAULT: ++ default: ++ vis = elfcpp::STV_DEFAULT; ++ break; ++ } ++ } ++ else ++ { ++ switch (isym->visibility) ++ { ++ case LDPV_PROTECTED: ++ vis = elfcpp::STV_PROTECTED; ++ break; ++ case LDPV_INTERNAL: ++ vis = elfcpp::STV_INTERNAL; ++ break; ++ case LDPV_HIDDEN: ++ vis = elfcpp::STV_HIDDEN; ++ break; ++ case LDPV_DEFAULT: ++ default: ++ vis = elfcpp::STV_DEFAULT; ++ break; ++ } ++ } ++ + osym.put_st_name(0); + osym.put_st_value(0); + osym.put_st_size(static_cast(isym->size)); diff --git a/packages/toolchain/devel/binutils/patches/crossmingw64-binutils-zlib.diff b/packages/toolchain/devel/binutils/patches/crossmingw64-binutils-zlib.diff deleted file mode 100644 index 74f3e90c54..0000000000 --- a/packages/toolchain/devel/binutils/patches/crossmingw64-binutils-zlib.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- binutils-2.20.51.0.11/bfd/compress.c.orig 2010-08-11 23:52:42.000000000 +0200 -+++ binutils-2.20.51.0.11/bfd/compress.c 2010-09-26 11:08:50.196564435 +0200 -@@ -94,7 +94,7 @@ - bfd_set_error (bfd_error_invalid_operation); - return FALSE; - #else -- bfd_size_type compressed_size; -+ uLong compressed_size; - bfd_byte *compressed_buffer; - - compressed_size = compressBound (uncompressed_size) + 12; diff --git a/packages/toolchain/devel/binutils/url b/packages/toolchain/devel/binutils/url deleted file mode 100644 index 8060a5db57..0000000000 --- a/packages/toolchain/devel/binutils/url +++ /dev/null @@ -1 +0,0 @@ -ftp://ftp.kernel.org/pub/linux/devel/binutils/binutils-2.20.51.0.11.tar.bz2 \ No newline at end of file diff --git a/packages/toolchain/devel/ccache/build b/packages/toolchain/devel/ccache/build index 144fd6c4cb..4b29061140 100755 --- a/packages/toolchain/devel/ccache/build +++ b/packages/toolchain/devel/ccache/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/install make - setup_toolchain host CC=$LOCAL_CC @@ -12,3 +10,18 @@ cd $PKG_BUILD --build=$HOST_NAME \ --prefix=$ROOT/$TOOLCHAIN make + +mkdir -p $ROOT/$TOOLCHAIN/bin + cp -f ccache $ROOT/$TOOLCHAIN/bin + +cat > $HOST_CC < $HOST_CXX <$TARGET_CC - echo "$ROOT/$TOOLCHAIN/bin/ccache $CROSS_CC \"\$@\"" >>$TARGET_CC - chmod +x $TARGET_CC - # To avoid cache trashing - DATE="0501`echo $GCC_VERSION | sed 's/\([0-9]\)/0\1/g' | sed 's/\.//g'`" - touch -c -t $DATE $CROSS_CC - - CROSS_CXX=$TARGET_CXX-$GCC_VERSION - if [ -f "$TARGET_CXX" ]; then - [ ! -f "$CROSS_CXX" ] && mv $TARGET_CXX $CROSS_CXX - echo "#!/bin/sh" >$TARGET_CXX - echo "$ROOT/$TOOLCHAIN/bin/ccache $CROSS_CXX \"\$@\"" >>$TARGET_CXX - chmod +x $TARGET_CXX - # To avoid cache trashing - touch -c -t $DATE $CROSS_CXX - fi -else - echo "#!/bin/sh" >$HOST_CC - echo "$ROOT/$TOOLCHAIN/bin/ccache $LOCAL_CC \"\$@\"" >>$HOST_CC - chmod +x $HOST_CC - echo "#!/bin/sh" >$HOST_CXX - echo "$ROOT/$TOOLCHAIN/bin/ccache $LOCAL_CXX \"\$@\"" >>$HOST_CXX - chmod +x $HOST_CXX -fi diff --git a/packages/toolchain/devel/ccache/meta b/packages/toolchain/devel/ccache/meta new file mode 100644 index 0000000000..3408f0f47d --- /dev/null +++ b/packages/toolchain/devel/ccache/meta @@ -0,0 +1,16 @@ +PKG_NAME="ccache" +PKG_VERSION="3.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://ccache.samba.org/" +PKG_URL="http://samba.org/ftp/ccache/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="" +PKG_PRIORITY="optional" +PKG_SECTION="toolchain/devel" +PKG_SHORTDESC="ccache: A fast compiler cache" +PKG_LONGDESC="Ccache is a compiler cache. It speeds up re-compilation of C/C++ code by caching previous compiles and detecting when the same compile is being done again." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/toolchain/devel/ccache/patches/ccache-fix_configure-0.1.diff b/packages/toolchain/devel/ccache/patches/ccache-3.1-fix_configure-0.1.patch similarity index 100% rename from packages/toolchain/devel/ccache/patches/ccache-fix_configure-0.1.diff rename to packages/toolchain/devel/ccache/patches/ccache-3.1-fix_configure-0.1.patch diff --git a/packages/toolchain/devel/ccache/url b/packages/toolchain/devel/ccache/url deleted file mode 100644 index fc650d685b..0000000000 --- a/packages/toolchain/devel/ccache/url +++ /dev/null @@ -1 +0,0 @@ -http://samba.org/ftp/ccache/ccache-3.1.tar.bz2 \ No newline at end of file diff --git a/packages/toolchain/devel/cmake/meta b/packages/toolchain/devel/cmake/meta new file mode 100644 index 0000000000..968250112d --- /dev/null +++ b/packages/toolchain/devel/cmake/meta @@ -0,0 +1,16 @@ +PKG_NAME="cmake" +PKG_VERSION="2.8.3-rc4" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="BSD" +PKG_SITE="http://www.cmake.org/" +PKG_URL="http://www.cmake.org/files/v2.8/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="ccache" +PKG_PRIORITY="optional" +PKG_SECTION="toolchain/devel" +PKG_SHORTDESC="cmake: A cross-platform, open-source make system" +PKG_LONGDESC="CMake is used to control the software compilation process using simple platform and compiler independent configuration files. CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice. CMake is quite sophisticated: it is possible to support complex environments requiring system configuration, preprocessor generation, code generation, and template instantiation." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/toolchain/devel/cmake/url b/packages/toolchain/devel/cmake/url deleted file mode 100644 index 8c6712ea09..0000000000 --- a/packages/toolchain/devel/cmake/url +++ /dev/null @@ -1 +0,0 @@ -http://www.cmake.org/files/v2.8/cmake-2.8.1.tar.gz \ No newline at end of file diff --git a/packages/toolchain/devel/configtools/build b/packages/toolchain/devel/configtools/build deleted file mode 100755 index 473feeb26b..0000000000 --- a/packages/toolchain/devel/configtools/build +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -. config/options $1 - -$BUILD/$1/config.guess > $HOST_NAME_CACHE diff --git a/packages/toolchain/devel/configtools/url b/packages/toolchain/devel/configtools/url deleted file mode 100644 index dcdb5316f6..0000000000 --- a/packages/toolchain/devel/configtools/url +++ /dev/null @@ -1 +0,0 @@ -http://sources.openelec.tv/svn/configtools.tar.bz2 diff --git a/packages/toolchain/devel/eglibc/build b/packages/toolchain/devel/eglibc/build index d07daf3c50..522beb382d 100755 --- a/packages/toolchain/devel/eglibc/build +++ b/packages/toolchain/devel/eglibc/build @@ -2,19 +2,11 @@ . config/options $1 -$SCRIPTS/install ccache - -rm -rf "$SYSROOT_PREFIX/lib" -rm -rf "$SYSROOT_PREFIX/usr/lib" -rm -rf "$SYSROOT_PREFIX/usr/include" - -$SCRIPTS/build autotools -$SCRIPTS/install linux-headers -$SCRIPTS/build gcc-core +strip_lto # Fails to compile with GCC's link time optimization. +strip_gold # Fails to compile using the gold linker. # Filter out some problematic CFLAGS - CFLAGS=`echo $CFLAGS | sed -e "s|-ffast-math||"` - CFLAGS=`echo $CFLAGS | sed -e "s|-Os|-O2|"` + CFLAGS=`echo $CFLAGS | sed -e "s|-ffast-math||"` # -e "s|-O.|-O3|" # set some CFLAGS we need CFLAGS="$CFLAGS -g -fno-stack-protector" @@ -39,8 +31,7 @@ cd $PKG_BUILD autoconf -mkdir -p objdir-$1 -cd objdir-$1 +mkdir -p objdir-$1 && cd objdir-$1 cat >config.cache < $TARGET_CC < $TARGET_CXX <= argc) ++ break; ++ else if (!*lopt) ++ lopt = argv[n]; ++ prepended = concat (prepended, "-plugin-opt=-pass-through=-l", ++ lopt, " ", NULL); ++ } ++ else if (!strcmp (".a", argv[n] + strlen (argv[n]) - 2)) ++ { ++ prepended = concat (prepended, "-plugin-opt=-pass-through=", ++ argv[n], " ", NULL); ++ } ++ if (prepended != old) ++ free (old); ++ } ++ return prepended; ++} diff --git a/packages/toolchain/lang/gcc/patches/gcc-4.5-bfd_and_gold.diff b/packages/toolchain/lang/gcc/patches/gcc-4.5-20101125-bfd_and_gold.patch similarity index 89% rename from packages/toolchain/lang/gcc/patches/gcc-4.5-bfd_and_gold.diff rename to packages/toolchain/lang/gcc/patches/gcc-4.5-20101125-bfd_and_gold.patch index a279019b5a..a3b33273d3 100644 --- a/packages/toolchain/lang/gcc/patches/gcc-4.5-bfd_and_gold.diff +++ b/packages/toolchain/lang/gcc/patches/gcc-4.5-20101125-bfd_and_gold.patch @@ -1,7 +1,6 @@ -diff -Naur gcc-4.5-20100624-old/configure gcc-4.5-20100624-new/configure -diff -Naur gcc-4.5-20100624-old/configure.ac gcc-4.5-20100624-new/configure.ac ---- gcc-4.5-20100624-old/configure.ac 2010-06-24 14:06:37.000000000 -0700 -+++ gcc-4.5-20100624-new/configure.ac 2010-06-25 07:18:18.000000000 -0700 +diff -Naur gcc-4.5-20101118/configure.ac gcc-4.5-20101118.patch/configure.ac +--- gcc-4.5-20101118/configure.ac 2010-10-06 12:29:55.000000000 +0200 ++++ gcc-4.5-20101118.patch/configure.ac 2010-11-26 03:48:17.007444557 +0100 @@ -174,7 +174,7 @@ # know that we are building the simulator. # binutils, gas and ld appear in that order because it makes sense to run @@ -82,7 +81,7 @@ diff -Naur gcc-4.5-20100624-old/configure.ac gcc-4.5-20100624-new/configure.ac - # Check for target supported by gold. - case "${target}" in - i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-*) -- configdirs="`echo " ${configdirs} " | sed -e 's/ ld / gold /'`" +- configdirs=`echo " ${configdirs} " | sed -e 's/ ld / gold /'` - ;; - esac - fi @@ -91,9 +90,9 @@ diff -Naur gcc-4.5-20100624-old/configure.ac gcc-4.5-20100624-new/configure.ac # Configure extra directories which are host specific case "${host}" in -diff -Naur gcc-4.5-20100624-old/gcc/collect2.c gcc-4.5-20100624-new/gcc/collect2.c ---- gcc-4.5-20100624-old/gcc/collect2.c 2010-06-24 14:06:37.000000000 -0700 -+++ gcc-4.5-20100624-new/gcc/collect2.c 2010-06-25 07:18:18.000000000 -0700 +diff -Naur gcc-4.5-20101118/gcc/collect2.c gcc-4.5-20101118.patch/gcc/collect2.c +--- gcc-4.5-20101118/gcc/collect2.c 2010-06-24 23:06:37.000000000 +0200 ++++ gcc-4.5-20101118.patch/gcc/collect2.c 2010-11-26 03:42:31.162881405 +0100 @@ -1114,17 +1114,19 @@ int main (int argc, char **argv) @@ -336,9 +335,9 @@ diff -Naur gcc-4.5-20100624-old/gcc/collect2.c gcc-4.5-20100624-new/gcc/collect2 #ifdef REAL_NM_FILE_NAME nm_file_name = find_a_file (&path, REAL_NM_FILE_NAME); -diff -Naur gcc-4.5-20100624-old/gcc/common.opt gcc-4.5-20100624-new/gcc/common.opt ---- gcc-4.5-20100624-old/gcc/common.opt 2010-03-17 20:01:09.000000000 -0700 -+++ gcc-4.5-20100624-new/gcc/common.opt 2010-06-25 07:18:18.000000000 -0700 +diff -Naur gcc-4.5-20101118/gcc/common.opt gcc-4.5-20101118.patch/gcc/common.opt +--- gcc-4.5-20101118/gcc/common.opt 2010-03-18 04:01:09.000000000 +0100 ++++ gcc-4.5-20101118.patch/gcc/common.opt 2010-11-26 03:42:31.164881431 +0100 @@ -1401,6 +1401,9 @@ Common Report Var(flag_unwind_tables) Optimization Just generate unwind tables for exception handling @@ -349,9 +348,9 @@ diff -Naur gcc-4.5-20100624-old/gcc/common.opt gcc-4.5-20100624-new/gcc/common.o fuse-linker-plugin Common Undocumented -diff -Naur gcc-4.5-20100624-old/gcc/configure gcc-4.5-20100624-new/gcc/configure ---- gcc-4.5-20100624-old/gcc/configure 2010-06-14 03:38:18.000000000 -0700 -+++ gcc-4.5-20100624-new/gcc/configure 2010-06-25 07:18:18.000000000 -0700 +diff -Naur gcc-4.5-20101118/gcc/configure gcc-4.5-20101118.patch/gcc/configure +--- gcc-4.5-20101118/gcc/configure 2010-10-06 21:09:10.000000000 +0200 ++++ gcc-4.5-20101118.patch/gcc/configure 2010-11-26 03:42:31.184881696 +0100 @@ -684,6 +684,7 @@ gcc_cv_objdump ORIGINAL_NM_FOR_TARGET @@ -410,9 +409,9 @@ diff -Naur gcc-4.5-20100624-old/gcc/configure gcc-4.5-20100624-new/gcc/configure { $as_echo "$as_me:${as_lineno-$LINENO}: checking what linker to use" >&5 $as_echo_n "checking what linker to use... " >&6; } if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then -diff -Naur gcc-4.5-20100624-old/gcc/configure.ac gcc-4.5-20100624-new/gcc/configure.ac ---- gcc-4.5-20100624-old/gcc/configure.ac 2010-06-14 03:38:18.000000000 -0700 -+++ gcc-4.5-20100624-new/gcc/configure.ac 2010-06-25 07:18:18.000000000 -0700 +diff -Naur gcc-4.5-20101118/gcc/configure.ac gcc-4.5-20101118.patch/gcc/configure.ac +--- gcc-4.5-20101118/gcc/configure.ac 2010-10-06 21:09:10.000000000 +0200 ++++ gcc-4.5-20101118.patch/gcc/configure.ac 2010-11-26 03:42:31.201881922 +0100 @@ -1947,6 +1947,17 @@ AC_PATH_PROG(gcc_cv_ld, $LD_FOR_TARGET) fi]) @@ -441,9 +440,9 @@ diff -Naur gcc-4.5-20100624-old/gcc/configure.ac gcc-4.5-20100624-new/gcc/config AC_MSG_CHECKING(what linker to use) if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext; then # Single tree build which includes ld. We want to prefer it -diff -Naur gcc-4.5-20100624-old/gcc/doc/invoke.texi gcc-4.5-20100624-new/gcc/doc/invoke.texi ---- gcc-4.5-20100624-old/gcc/doc/invoke.texi 2010-04-06 07:02:22.000000000 -0700 -+++ gcc-4.5-20100624-new/gcc/doc/invoke.texi 2010-06-25 07:18:18.000000000 -0700 +diff -Naur gcc-4.5-20101118/gcc/doc/invoke.texi gcc-4.5-20101118.patch/gcc/doc/invoke.texi +--- gcc-4.5-20101118/gcc/doc/invoke.texi 2010-09-08 19:36:40.000000000 +0200 ++++ gcc-4.5-20101118.patch/gcc/doc/invoke.texi 2010-11-26 03:42:31.218882146 +0100 @@ -390,7 +390,7 @@ -funit-at-a-time -funroll-all-loops -funroll-loops @gol -funsafe-loop-optimizations -funsafe-math-optimizations -funswitch-loops @gol @@ -453,7 +452,7 @@ diff -Naur gcc-4.5-20100624-old/gcc/doc/invoke.texi gcc-4.5-20100624-new/gcc/doc --param @var{name}=@var{value} -O -O0 -O1 -O2 -O3 -Os} -@@ -7415,6 +7415,16 @@ +@@ -7416,6 +7416,16 @@ Disabled by default. @@ -470,9 +469,10 @@ diff -Naur gcc-4.5-20100624-old/gcc/doc/invoke.texi gcc-4.5-20100624-new/gcc/doc @item -fcprop-registers @opindex fcprop-registers After register allocation and post-register allocation instruction splitting, -diff -Naur gcc-4.5-20100624-old/gcc/exec-tool.in gcc-4.5-20100624-new/gcc/exec-tool.in ---- gcc-4.5-20100624-old/gcc/exec-tool.in 2009-11-08 14:36:51.000000000 -0800 -+++ gcc-4.5-20100624-new/gcc/exec-tool.in 2010-06-25 07:18:18.000000000 -0700 +diff -Naur gcc-4.5-20101118/gcc/doc/invoke.texi.orig gcc-4.5-20101118.patch/gcc/doc/invoke.texi.orig +diff -Naur gcc-4.5-20101118/gcc/exec-tool.in gcc-4.5-20101118.patch/gcc/exec-tool.in +--- gcc-4.5-20101118/gcc/exec-tool.in 2009-11-08 23:36:51.000000000 +0100 ++++ gcc-4.5-20101118.patch/gcc/exec-tool.in 2010-11-26 03:42:31.226882250 +0100 @@ -1,6 +1,6 @@ #! /bin/sh @@ -637,9 +637,9 @@ diff -Naur gcc-4.5-20100624-old/gcc/exec-tool.in gcc-4.5-20100624-new/gcc/exec-t + echo "$invoked: unable to locate executable: $original" + exit 1 +fi -diff -Naur gcc-4.5-20100624-old/gcc/gcc.c gcc-4.5-20100624-new/gcc/gcc.c ---- gcc-4.5-20100624-old/gcc/gcc.c 2010-04-18 10:46:08.000000000 -0700 -+++ gcc-4.5-20100624-new/gcc/gcc.c 2010-06-25 07:18:18.000000000 -0700 +diff -Naur gcc-4.5-20101118/gcc/gcc.c gcc-4.5-20101118.patch/gcc/gcc.c +--- gcc-4.5-20101118/gcc/gcc.c 2010-04-18 19:46:08.000000000 +0200 ++++ gcc-4.5-20101118.patch/gcc/gcc.c 2010-11-26 03:42:31.230882305 +0100 @@ -790,6 +790,9 @@ %{v:-plugin-opt=-v} \ } \ @@ -650,9 +650,9 @@ diff -Naur gcc-4.5-20100624-old/gcc/gcc.c gcc-4.5-20100624-new/gcc/gcc.c "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\ %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\ %{static:} %{L*} %(mfwrap) %(link_libgcc) %o\ -diff -Naur gcc-4.5-20100624-old/gcc/opts.c gcc-4.5-20100624-new/gcc/opts.c ---- gcc-4.5-20100624-old/gcc/opts.c 2010-05-17 03:13:28.000000000 -0700 -+++ gcc-4.5-20100624-new/gcc/opts.c 2010-06-25 07:18:18.000000000 -0700 +diff -Naur gcc-4.5-20101118/gcc/opts.c gcc-4.5-20101118.patch/gcc/opts.c +--- gcc-4.5-20101118/gcc/opts.c 2010-05-17 12:13:28.000000000 +0200 ++++ gcc-4.5-20101118.patch/gcc/opts.c 2010-11-26 03:42:31.236882383 +0100 @@ -2138,8 +2138,9 @@ /* These are no-ops, preserved for backward compatibility. */ break; diff --git a/packages/toolchain/lang/gcc/patches/gcc-4.5-disable_multilib_i386_linux64.diff b/packages/toolchain/lang/gcc/patches/gcc-4.5-20101125-disable_multilib_i386_linux64.patch similarity index 100% rename from packages/toolchain/lang/gcc/patches/gcc-4.5-disable_multilib_i386_linux64.diff rename to packages/toolchain/lang/gcc/patches/gcc-4.5-20101125-disable_multilib_i386_linux64.patch diff --git a/packages/toolchain/lang/gcc/patches/gcc-4.5-dynamic_linker.diff b/packages/toolchain/lang/gcc/patches/gcc-4.5-20101125-dynamic_linker.patch similarity index 100% rename from packages/toolchain/lang/gcc/patches/gcc-4.5-dynamic_linker.diff rename to packages/toolchain/lang/gcc/patches/gcc-4.5-20101125-dynamic_linker.patch diff --git a/packages/toolchain/lang/gcc/patches/gcc-4.5-libstdc++-v3_config.diff b/packages/toolchain/lang/gcc/patches/gcc-4.5-20101125-libstdc++-v3_config.patch similarity index 100% rename from packages/toolchain/lang/gcc/patches/gcc-4.5-libstdc++-v3_config.diff rename to packages/toolchain/lang/gcc/patches/gcc-4.5-20101125-libstdc++-v3_config.patch diff --git a/packages/toolchain/lang/gcc/patches/gcc-4.5.1-ppl-0.11-0.1.diff b/packages/toolchain/lang/gcc/patches/gcc-4.5-20101125-ppl-0.11-0.1.patch similarity index 100% rename from packages/toolchain/lang/gcc/patches/gcc-4.5.1-ppl-0.11-0.1.diff rename to packages/toolchain/lang/gcc/patches/gcc-4.5-20101125-ppl-0.11-0.1.patch diff --git a/packages/toolchain/lang/gcc/unpack b/packages/toolchain/lang/gcc/unpack deleted file mode 100755 index 2470ca522c..0000000000 --- a/packages/toolchain/lang/gcc/unpack +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -. config/options $1 - -$SCRIPTS/fixconfigtools $PKG_BUILD/gcc - diff --git a/packages/toolchain/lang/gcc/url b/packages/toolchain/lang/gcc/url deleted file mode 100644 index c04fe247a1..0000000000 --- a/packages/toolchain/lang/gcc/url +++ /dev/null @@ -1,2 +0,0 @@ -ftp://ftp.gwdg.de/pub/misc/gcc/releases/gcc-4.5.1/gcc-core-4.5.1.tar.bz2 -ftp://ftp.gwdg.de/pub/misc/gcc/releases/gcc-4.5.1/gcc-g++-4.5.1.tar.bz2 diff --git a/packages/toolchain/lang/yasm/meta b/packages/toolchain/lang/yasm/meta new file mode 100644 index 0000000000..6fb3b2fb3a --- /dev/null +++ b/packages/toolchain/lang/yasm/meta @@ -0,0 +1,16 @@ +PKG_NAME="yasm" +PKG_VERSION="1.1.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="BSD" +PKG_SITE="http://www.tortall.net/projects/yasm/" +PKG_URL="http://www.tortall.net/projects/yasm/releases/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="ccache" +PKG_PRIORITY="optional" +PKG_SECTION="toolchain/lang" +PKG_SHORTDESC="yasm: A complete rewrite of the NASM assembler" +PKG_LONGDESC="Yasm is a complete rewrite of the NASM assembler under the new BSD License (some portions are under other licenses, see COPYING for details). It is designed from the ground up to allow for multiple assembler syntaxes to be supported (eg, NASM, TASM, GAS, etc.) in addition to multiple output object formats and even multiple instruction sets. Another primary module of the overall design is an optimizer module." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/toolchain/lang/yasm/url b/packages/toolchain/lang/yasm/url deleted file mode 100644 index 2f287d1001..0000000000 --- a/packages/toolchain/lang/yasm/url +++ /dev/null @@ -1 +0,0 @@ -http://www.tortall.net/projects/yasm/releases/yasm-1.1.0.tar.gz \ No newline at end of file diff --git a/packages/toolchain/math/cloog-ppl/build b/packages/toolchain/math/cloog-ppl/build index f29fd10672..c62dd6bbcb 100755 --- a/packages/toolchain/math/cloog-ppl/build +++ b/packages/toolchain/math/cloog-ppl/build @@ -2,16 +2,11 @@ . config/options $1 -$SCRIPTS/install ccache -$SCRIPTS/build gmp -$SCRIPTS/build ppl - setup_toolchain host cd $BUILD/$1* -mkdir -p objdir -cd objdir +mkdir -p objdir && cd objdir ../configure --host=$HOST_NAME \ --build=$HOST_NAME \ diff --git a/packages/toolchain/math/cloog-ppl/meta b/packages/toolchain/math/cloog-ppl/meta new file mode 100644 index 0000000000..c7b71abc31 --- /dev/null +++ b/packages/toolchain/math/cloog-ppl/meta @@ -0,0 +1,16 @@ +PKG_NAME="cloog-ppl" +PKG_VERSION="0.15.10" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.cloog.org/" +PKG_URL="ftp://gcc.gnu.org/pub/gcc/infrastructure/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="ccache gmp ppl" +PKG_PRIORITY="optional" +PKG_SECTION="toolchain/math" +PKG_SHORTDESC="cloog-ppl: Code Generator in the Polyhedral Model's Home" +PKG_LONGDESC="CLooG-PPL is a library to generate code for scanning Z-polyhedra. In other words, it finds code that reaches each integral point of one or more parameterized polyhedra. GCC links with this library in order to enable the new loop generation code known as Graphite." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/toolchain/math/cloog-ppl/patches/cloog-ppl-0.15.10-configure.diff b/packages/toolchain/math/cloog-ppl/patches/cloog-ppl-0.15.10-configure.patch similarity index 100% rename from packages/toolchain/math/cloog-ppl/patches/cloog-ppl-0.15.10-configure.diff rename to packages/toolchain/math/cloog-ppl/patches/cloog-ppl-0.15.10-configure.patch diff --git a/packages/toolchain/math/cloog-ppl/url b/packages/toolchain/math/cloog-ppl/url deleted file mode 100644 index da00553641..0000000000 --- a/packages/toolchain/math/cloog-ppl/url +++ /dev/null @@ -1 +0,0 @@ -ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-ppl-0.15.10.tar.gz diff --git a/packages/toolchain/math/gmp/build b/packages/toolchain/math/gmp/build index f63b5258d8..b841675bc1 100755 --- a/packages/toolchain/math/gmp/build +++ b/packages/toolchain/math/gmp/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/install ccache - setup_toolchain host export CFLAGS="$CFLAGS -fPIC" diff --git a/packages/toolchain/math/gmp/meta b/packages/toolchain/math/gmp/meta index 86ba00261b..e158fbd2d1 100644 --- a/packages/toolchain/math/gmp/meta +++ b/packages/toolchain/math/gmp/meta @@ -6,9 +6,11 @@ PKG_LICENSE="LGPL" PKG_SITE="http://www.swox.com/gmp/" PKG_URL="http://ftp.sunet.se/pub/gnu/gmp/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="" +PKG_BUILD_DEPENDS="ccache" PKG_PRIORITY="optional" PKG_SECTION="toolchain/math" PKG_SHORTDESC="gmp: The GNU MP (multiple precision arithmetic) library" PKG_LONGDESC="GNU MP is a library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. It has a rich set of functions, and the functions have a regular interface. GNU MP is designed to be as fast as possible, both for small operands and for huge operands. The speed is achieved by using fullwords as the basic arithmetic type, by using fast algorithms, by carefully optimized assembly code for the most common inner loops for a lots of CPUs, and by a general emphasis on speed (instead of simplicity or elegance). The speed of GNU MP is believed to be faster than any other similar library. The advantage for GNU MP increases with the operand sizes for certain operations, since GNU MP in many cases has asymptotically faster algorithms." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/toolchain/math/mpc/build b/packages/toolchain/math/mpc/build index d892eb088d..a5889c1211 100755 --- a/packages/toolchain/math/mpc/build +++ b/packages/toolchain/math/mpc/build @@ -2,7 +2,6 @@ . config/options $1 -$SCRIPTS/install ccache $SCRIPTS/build gmp $SCRIPTS/build mpfr diff --git a/packages/toolchain/math/mpc/meta b/packages/toolchain/math/mpc/meta index a143d1ee02..26fba428cc 100644 --- a/packages/toolchain/math/mpc/meta +++ b/packages/toolchain/math/mpc/meta @@ -3,12 +3,14 @@ PKG_VERSION="0.8.2" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="LGPL" -PKG_SITE="" +PKG_SITE="http://www.multiprecision.org" PKG_URL="http://www.multiprecision.org/mpc/download/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="gmp mpfr" +PKG_BUILD_DEPENDS="ccache gmp mpfr" PKG_PRIORITY="optional" PKG_SECTION="toolchain/math" PKG_SHORTDESC="mpc: A C library for the arithmetic of high precision complex numbers" PKG_LONGDESC="pc is a C library for the arithmetic of complex numbers with arbitrarily high precision and correct rounding of the result. It is built upon and follows the same principles as Mpfr." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/toolchain/math/mpfr/build b/packages/toolchain/math/mpfr/build index e9ad23a24e..da092b3f9a 100755 --- a/packages/toolchain/math/mpfr/build +++ b/packages/toolchain/math/mpfr/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/install ccache - setup_toolchain host cd $PKG_BUILD diff --git a/packages/toolchain/math/mpfr/meta b/packages/toolchain/math/mpfr/meta index 9af9a290d5..b930a90a4b 100644 --- a/packages/toolchain/math/mpfr/meta +++ b/packages/toolchain/math/mpfr/meta @@ -6,9 +6,11 @@ PKG_LICENSE="LGPL" PKG_SITE="http://www.mpfr.org/" PKG_URL="http://www.mpfr.org/mpfr-current/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="gmp" +PKG_BUILD_DEPENDS="ccache gmp" PKG_PRIORITY="optional" PKG_SECTION="toolchain/math" PKG_SHORTDESC="mpfr: A C library for multiple-precision floating-point computations with exact roundi" PKG_LONGDESC="The MPFR library is a C library for multiple-precision floating-point computations with exact rounding (also called correct rounding). It is based on the GMP multiple-precision library. The main goal of MPFR is to provide a library for multiple-precision floating-point computation which is both efficient and has well-defined semantics. It copies the good ideas from the ANSI/IEEE-754 standard for double-precision floating-point arithmetic (53-bit mantissa)." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/toolchain/math/mpfr/patches/mpfr-3.0.0-allpatches_20100710.diff b/packages/toolchain/math/mpfr/patches/mpfr-3.0.0-allpatches_20100710.diff deleted file mode 100644 index ec09117793..0000000000 --- a/packages/toolchain/math/mpfr/patches/mpfr-3.0.0-allpatches_20100710.diff +++ /dev/null @@ -1,621 +0,0 @@ -diff -Naur mpfr-3.0.0-old/acinclude.m4 mpfr-3.0.0-new/acinclude.m4 ---- mpfr-3.0.0-old/acinclude.m4 2010-06-10 04:00:14.000000000 -0700 -+++ mpfr-3.0.0-new/acinclude.m4 2010-07-11 08:07:36.000000000 -0700 -@@ -59,6 +59,9 @@ - dnl sys/fpu.h - MIPS specific - AC_CHECK_HEADERS([sys/time.h sys/fpu.h]) - -+dnl Check how to get `alloca' -+AC_FUNC_ALLOCA -+ - dnl SIZE_MAX macro - gl_SIZE_MAX - -diff -Naur mpfr-3.0.0-old/configure mpfr-3.0.0-new/configure ---- mpfr-3.0.0-old/configure 2010-06-10 04:00:51.000000000 -0700 -+++ mpfr-3.0.0-new/configure 2010-07-11 08:07:36.000000000 -0700 -@@ -783,6 +783,7 @@ - OBJDUMP - DLLTOOL - AS -+ALLOCA - MPFR_LIBM - ANSI2KNR - U -@@ -5622,6 +5623,197 @@ - done - - -+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -+# for constant arguments. Useless! -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -+$as_echo_n "checking for working alloca.h... " >&6; } -+if test "${ac_cv_working_alloca_h+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#include -+int -+main () -+{ -+char *p = (char *) alloca (2 * sizeof (int)); -+ if (p) return 0; -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_working_alloca_h=yes -+else -+ ac_cv_working_alloca_h=no -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -+$as_echo "$ac_cv_working_alloca_h" >&6; } -+if test $ac_cv_working_alloca_h = yes; then -+ -+$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h -+ -+fi -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -+$as_echo_n "checking for alloca... " >&6; } -+if test "${ac_cv_func_alloca_works+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#ifdef __GNUC__ -+# define alloca __builtin_alloca -+#else -+# ifdef _MSC_VER -+# include -+# define alloca _alloca -+# else -+# ifdef HAVE_ALLOCA_H -+# include -+# else -+# ifdef _AIX -+ #pragma alloca -+# else -+# ifndef alloca /* predefined by HP cc +Olibcalls */ -+char *alloca (); -+# endif -+# endif -+# endif -+# endif -+#endif -+ -+int -+main () -+{ -+char *p = (char *) alloca (1); -+ if (p) return 0; -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_link "$LINENO"; then : -+ ac_cv_func_alloca_works=yes -+else -+ ac_cv_func_alloca_works=no -+fi -+rm -f core conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -+$as_echo "$ac_cv_func_alloca_works" >&6; } -+ -+if test $ac_cv_func_alloca_works = yes; then -+ -+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h -+ -+else -+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions -+# that cause trouble. Some versions do not even contain alloca or -+# contain a buggy version. If you still want to use their alloca, -+# use ar to extract alloca.o from them instead of compiling alloca.c. -+ -+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext -+ -+$as_echo "#define C_ALLOCA 1" >>confdefs.h -+ -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 -+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -+if test "${ac_cv_os_cray+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+#if defined CRAY && ! defined CRAY2 -+webecray -+#else -+wenotbecray -+#endif -+ -+_ACEOF -+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | -+ $EGREP "webecray" >/dev/null 2>&1; then : -+ ac_cv_os_cray=yes -+else -+ ac_cv_os_cray=no -+fi -+rm -f conftest* -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 -+$as_echo "$ac_cv_os_cray" >&6; } -+if test $ac_cv_os_cray = yes; then -+ for ac_func in _getb67 GETB67 getb67; do -+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -+eval as_val=\$$as_ac_var -+ if test "x$as_val" = x""yes; then : -+ -+cat >>confdefs.h <<_ACEOF -+#define CRAY_STACKSEG_END $ac_func -+_ACEOF -+ -+ break -+fi -+ -+ done -+fi -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -+$as_echo_n "checking stack direction for C alloca... " >&6; } -+if test "${ac_cv_c_stack_direction+set}" = set; then : -+ $as_echo_n "(cached) " >&6 -+else -+ if test "$cross_compiling" = yes; then : -+ ac_cv_c_stack_direction=0 -+else -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+$ac_includes_default -+int -+find_stack_direction () -+{ -+ static char *addr = 0; -+ auto char dummy; -+ if (addr == 0) -+ { -+ addr = &dummy; -+ return find_stack_direction (); -+ } -+ else -+ return (&dummy > addr) ? 1 : -1; -+} -+ -+int -+main () -+{ -+ return find_stack_direction () < 0; -+} -+_ACEOF -+if ac_fn_c_try_run "$LINENO"; then : -+ ac_cv_c_stack_direction=1 -+else -+ ac_cv_c_stack_direction=-1 -+fi -+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -+ conftest.$ac_objext conftest.beam conftest.$ac_ext -+fi -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -+$as_echo "$ac_cv_c_stack_direction" >&6; } -+cat >>confdefs.h <<_ACEOF -+#define STACK_DIRECTION $ac_cv_c_stack_direction -+_ACEOF -+ -+ -+fi -+ -+ - - for ac_header in stdint.h - do : -@@ -7564,13 +7756,13 @@ - else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext -- (eval echo "\"\$as_me:7567: $ac_compile\"" >&5) -+ (eval echo "\"\$as_me:7759: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 -- (eval echo "\"\$as_me:7570: $NM \\\"conftest.$ac_objext\\\"\"" >&5) -+ (eval echo "\"\$as_me:7762: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 -- (eval echo "\"\$as_me:7573: output\"" >&5) -+ (eval echo "\"\$as_me:7765: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" -@@ -8772,7 +8964,7 @@ - ;; - *-*-irix6*) - # Find out which ABI we are using. -- echo '#line 8775 "configure"' > conftest.$ac_ext -+ echo '#line 8967 "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -@@ -10032,11 +10224,11 @@ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:10035: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:10227: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:10039: \$? = $ac_status" >&5 -+ echo "$as_me:10231: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. -@@ -10371,11 +10563,11 @@ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:10374: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:10566: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:10378: \$? = $ac_status" >&5 -+ echo "$as_me:10570: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. -@@ -10476,11 +10668,11 @@ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:10479: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:10671: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:10483: \$? = $ac_status" >&5 -+ echo "$as_me:10675: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -10531,11 +10723,11 @@ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:10534: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:10726: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:10538: \$? = $ac_status" >&5 -+ echo "$as_me:10730: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -12915,7 +13107,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 12918 "configure" -+#line 13110 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -13011,7 +13203,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 13014 "configure" -+#line 13206 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -diff -Naur mpfr-3.0.0-old/gamma.c mpfr-3.0.0-new/gamma.c ---- mpfr-3.0.0-old/gamma.c 2010-06-10 04:00:14.000000000 -0700 -+++ mpfr-3.0.0-new/gamma.c 2010-07-11 08:07:36.000000000 -0700 -@@ -274,7 +274,7 @@ - /* we want an upper bound for x * [log(2-x)-1]. - since x < 0, we need a lower bound on log(2-x) */ - mpfr_ui_sub (xp, 2, x, MPFR_RNDD); -- mpfr_log (xp, xp, MPFR_RNDD); -+ mpfr_log2 (xp, xp, MPFR_RNDD); - mpfr_sub_ui (xp, xp, 1, MPFR_RNDD); - mpfr_mul (xp, xp, x, MPFR_RNDU); - -@@ -303,8 +303,8 @@ - { - mpfr_sub (tmp, tmp, tmp2, MPFR_RNDZ); /* low bnd on |sin(Pi*(2-x))| */ - mpfr_ui_div (tmp, 12, tmp, MPFR_RNDU); /* upper bound */ -- mpfr_log (tmp, tmp, MPFR_RNDU); -- mpfr_add (tmp, tmp, xp, MPFR_RNDU); -+ mpfr_log2 (tmp, tmp, MPFR_RNDU); -+ mpfr_add (xp, tmp, xp, MPFR_RNDU); - underflow = mpfr_cmp_si (xp, expo.saved_emin - 2) <= 0; - } - -diff -Naur mpfr-3.0.0-old/Makefile.in mpfr-3.0.0-new/Makefile.in ---- mpfr-3.0.0-old/Makefile.in 2010-06-10 04:00:52.000000000 -0700 -+++ mpfr-3.0.0-new/Makefile.in 2010-07-11 08:07:36.000000000 -0700 -@@ -239,6 +239,7 @@ - distuninstallcheck_listfiles = find . -type f -print - distcleancheck_listfiles = find . -type f -print - ACLOCAL = @ACLOCAL@ -+ALLOCA = @ALLOCA@ - AMTAR = @AMTAR@ - AR = @AR@ - AS = @AS@ -diff -Naur mpfr-3.0.0-old/mpfr.h mpfr-3.0.0-new/mpfr.h ---- mpfr-3.0.0-old/mpfr.h 2010-06-10 04:00:14.000000000 -0700 -+++ mpfr-3.0.0-new/mpfr.h 2010-07-11 08:07:36.000000000 -0700 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 0 - #define MPFR_VERSION_PATCHLEVEL 0 --#define MPFR_VERSION_STRING "3.0.0" -+#define MPFR_VERSION_STRING "3.0.0-p3" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naur mpfr-3.0.0-old/mpfr.texi mpfr-3.0.0-new/mpfr.texi ---- mpfr-3.0.0-old/mpfr.texi 2010-06-10 04:00:14.000000000 -0700 -+++ mpfr-3.0.0-new/mpfr.texi 2010-07-11 08:07:36.000000000 -0700 -@@ -2050,7 +2050,7 @@ - are printed. If @var{base} is greater than 10, @samp{@@} will be used - instead of @samp{e} as exponent delimiter. - --Return the number of bytes written, or if an error occurred, return 0. -+Return the number of characters written, or if an error occurred, return 0. - @end deftypefun - - @deftypefun size_t mpfr_inp_str (mpfr_t @var{rop}, FILE *@var{stream}, int @var{base}, mpfr_rnd_t @var{rnd}) -diff -Naur mpfr-3.0.0-old/out_str.c mpfr-3.0.0-new/out_str.c ---- mpfr-3.0.0-old/out_str.c 2010-06-10 04:00:14.000000000 -0700 -+++ mpfr-3.0.0-new/out_str.c 2010-07-11 08:07:36.000000000 -0700 -@@ -22,6 +22,16 @@ - - #include "mpfr-impl.h" - -+/* Warning! S should not contain "%". */ -+#define OUT_STR_RET(S) \ -+ do \ -+ { \ -+ int r; \ -+ r = fprintf (stream, (S)); \ -+ return r < 0 ? 0 : r; \ -+ } \ -+ while (0) -+ - size_t - mpfr_out_str (FILE *stream, int base, size_t n_digits, mpfr_srcptr op, - mpfr_rnd_t rnd_mode) -@@ -29,6 +39,7 @@ - char *s, *s0; - size_t l; - mpfr_exp_t e; -+ int err; - - MPFR_ASSERTN (base >= 2 && base <= 62); - -@@ -36,37 +47,16 @@ - if (stream == NULL) - stream = stdout; - -- if (MPFR_IS_NAN(op)) -- { -- fprintf (stream, "@NaN@"); -- return 3; -- } -- -- if (MPFR_IS_INF(op)) -- { -- if (MPFR_SIGN(op) > 0) -- { -- fprintf (stream, "@Inf@"); -- return 3; -- } -- else -- { -- fprintf (stream, "-@Inf@"); -- return 4; -- } -- } -- -- if (MPFR_IS_ZERO(op)) -+ if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (op))) - { -- if (MPFR_SIGN(op) > 0) -- { -- fprintf(stream, "0"); -- return 1; -- } -+ if (MPFR_IS_NAN (op)) -+ OUT_STR_RET ("@NaN@"); -+ else if (MPFR_IS_INF (op)) -+ OUT_STR_RET (MPFR_IS_POS (op) ? "@Inf@" : "-@Inf@"); - else - { -- fprintf(stream, "-0"); -- return 2; -+ MPFR_ASSERTD (MPFR_IS_ZERO (op)); -+ OUT_STR_RET (MPFR_IS_POS (op) ? "0" : "-0"); - } - } - -@@ -77,21 +67,31 @@ - - l = strlen (s) + 1; /* size of allocated block returned by mpfr_get_str - - may be incorrect, as only an upper bound? */ -- if (*s == '-') -- fputc (*s++, stream); - -- /* outputs mantissa */ -- fputc (*s++, stream); e--; /* leading digit */ -- fputc ((unsigned char) MPFR_DECIMAL_POINT, stream); -- fputs (s, stream); /* rest of mantissa */ -+ /* outputs possible sign and significand */ -+ err = (*s == '-' && fputc (*s++, stream) == EOF) -+ || fputc (*s++, stream) == EOF /* leading digit */ -+ || fputc ((unsigned char) MPFR_DECIMAL_POINT, stream) == EOF -+ || fputs (s, stream) == EOF; /* trailing significand */ - (*__gmp_free_func) (s0, l); -+ if (MPFR_UNLIKELY (err)) -+ return 0; -+ -+ e--; /* due to the leading digit */ - - /* outputs exponent */ - if (e) - { -+ int r; -+ - MPFR_ASSERTN(e >= LONG_MIN); - MPFR_ASSERTN(e <= LONG_MAX); -- l += fprintf (stream, (base <= 10 ? "e%ld" : "@%ld"), (long) e); -+ -+ r = fprintf (stream, (base <= 10 ? "e%ld" : "@%ld"), (long) e); -+ if (MPFR_UNLIKELY (r < 0)) -+ return 0; -+ -+ l += r; - } - - return l; -diff -Naur mpfr-3.0.0-old/PATCHES mpfr-3.0.0-new/PATCHES ---- mpfr-3.0.0-old/PATCHES 2010-06-10 04:00:14.000000000 -0700 -+++ mpfr-3.0.0-new/PATCHES 2010-07-11 08:07:36.000000000 -0700 -@@ -0,0 +1,3 @@ -+gamma_underflow -+alloca -+mpfr_out_str -diff -Naur mpfr-3.0.0-old/tests/Makefile.in mpfr-3.0.0-new/tests/Makefile.in ---- mpfr-3.0.0-old/tests/Makefile.in 2010-06-10 04:00:52.000000000 -0700 -+++ mpfr-3.0.0-new/tests/Makefile.in 2010-07-11 08:07:36.000000000 -0700 -@@ -960,6 +960,7 @@ - red=; grn=; lgn=; blu=; std= - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - ACLOCAL = @ACLOCAL@ -+ALLOCA = @ALLOCA@ - AMTAR = @AMTAR@ - AR = @AR@ - AS = @AS@ -diff -Naur mpfr-3.0.0-old/tests/tgamma.c mpfr-3.0.0-new/tests/tgamma.c ---- mpfr-3.0.0-old/tests/tgamma.c 2010-06-10 04:00:13.000000000 -0700 -+++ mpfr-3.0.0-new/tests/tgamma.c 2010-07-11 08:07:36.000000000 -0700 -@@ -461,6 +461,20 @@ - mpfr_clear (x); - } - -+/* bug found by Stathis, only occurs on 32-bit machines */ -+static void -+test20100709 (void) -+{ -+ mpfr_t x; -+ int inex; -+ -+ mpfr_init2 (x, 100); -+ mpfr_set_str (x, "-4.6308260837372266e+07", 10, MPFR_RNDN); -+ inex = mpfr_gamma (x, x, MPFR_RNDN); -+ MPFR_ASSERTN(MPFR_IS_ZERO(x) && MPFR_IS_NEG(x) && inex > 0); -+ mpfr_clear (x); -+} -+ - int - main (int argc, char *argv[]) - { -@@ -471,6 +485,7 @@ - test_generic (2, 100, 2); - gamma_integer (); - test20071231 (); -+ test20100709 (); - - data_check ("data/gamma", mpfr_gamma, "mpfr_gamma"); - -diff -Naur mpfr-3.0.0-old/tests/tout_str.c mpfr-3.0.0-new/tests/tout_str.c ---- mpfr-3.0.0-old/tests/tout_str.c 2010-06-10 04:00:13.000000000 -0700 -+++ mpfr-3.0.0-new/tests/tout_str.c 2010-07-11 08:07:36.000000000 -0700 -@@ -46,22 +46,54 @@ - special (void) - { - mpfr_t x; -+ unsigned int n; - - mpfr_init (x); - - mpfr_set_nan (x); -- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ if (n != 5) -+ { -+ printf ("Error: mpfr_out_str (file, 10, 0, NaN, MPFR_RNDN) wrote %u " -+ "characters instead of 5.\n", n); -+ exit (1); -+ } - - mpfr_set_inf (x, 1); -- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ if (n != 5) -+ { -+ printf ("Error: mpfr_out_str (file, 10, 0, +Inf, MPFR_RNDN) wrote %u " -+ "characters instead of 5.\n", n); -+ exit (1); -+ } - - mpfr_set_inf (x, -1); -- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ if (n != 6) -+ { -+ printf ("Error: mpfr_out_str (file, 10, 0, -Inf, MPFR_RNDN) wrote %u " -+ "characters instead of 6.\n", n); -+ exit (1); -+ } - - mpfr_set_ui (x, 0, MPFR_RNDN); -- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ if (n != 1) -+ { -+ printf ("Error: mpfr_out_str (file, 10, 0, +0, MPFR_RNDN) wrote %u " -+ "characters instead of 1.\n", n); -+ exit (1); -+ } -+ - mpfr_neg (x, x, MPFR_RNDN); -- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); -+ if (n != 2) -+ { -+ printf ("Error: mpfr_out_str (file, 10, 0, -0, MPFR_RNDN) wrote %u " -+ "characters instead of 2.\n", n); -+ exit (1); -+ } - - mpfr_clear (x); - } -diff -Naur mpfr-3.0.0-old/VERSION mpfr-3.0.0-new/VERSION ---- mpfr-3.0.0-old/VERSION 2010-06-10 04:00:14.000000000 -0700 -+++ mpfr-3.0.0-new/VERSION 2010-07-11 08:07:36.000000000 -0700 -@@ -1 +1 @@ --3.0.0 -+3.0.0-p3 -diff -Naur mpfr-3.0.0-old/version.c mpfr-3.0.0-new/version.c ---- mpfr-3.0.0-old/version.c 2010-06-10 04:00:14.000000000 -0700 -+++ mpfr-3.0.0-new/version.c 2010-07-11 08:07:36.000000000 -0700 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.0.0"; -+ return "3.0.0-p3"; - } diff --git a/packages/toolchain/math/mpfr/patches/mpfr-3.0.0-allpatches_20101110.patch b/packages/toolchain/math/mpfr/patches/mpfr-3.0.0-allpatches_20101110.patch new file mode 100644 index 0000000000..0d64508321 --- /dev/null +++ b/packages/toolchain/math/mpfr/patches/mpfr-3.0.0-allpatches_20101110.patch @@ -0,0 +1,1668 @@ +diff -Naur mpfr-3.0.0-old/acinclude.m4 mpfr-3.0.0-new/acinclude.m4 +--- mpfr-3.0.0-old/acinclude.m4 2010-06-10 04:00:14.000000000 -0700 ++++ mpfr-3.0.0-new/acinclude.m4 2010-11-10 16:53:44.000000000 -0800 +@@ -59,6 +59,9 @@ + dnl sys/fpu.h - MIPS specific + AC_CHECK_HEADERS([sys/time.h sys/fpu.h]) + ++dnl Check how to get `alloca' ++AC_FUNC_ALLOCA ++ + dnl SIZE_MAX macro + gl_SIZE_MAX + +diff -Naur mpfr-3.0.0-old/configure mpfr-3.0.0-new/configure +--- mpfr-3.0.0-old/configure 2010-06-10 04:00:51.000000000 -0700 ++++ mpfr-3.0.0-new/configure 2010-11-10 16:53:44.000000000 -0800 +@@ -783,6 +783,7 @@ + OBJDUMP + DLLTOOL + AS ++ALLOCA + MPFR_LIBM + ANSI2KNR + U +@@ -5622,6 +5623,197 @@ + done + + ++# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works ++# for constant arguments. Useless! ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 ++$as_echo_n "checking for working alloca.h... " >&6; } ++if test "${ac_cv_working_alloca_h+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++int ++main () ++{ ++char *p = (char *) alloca (2 * sizeof (int)); ++ if (p) return 0; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_working_alloca_h=yes ++else ++ ac_cv_working_alloca_h=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 ++$as_echo "$ac_cv_working_alloca_h" >&6; } ++if test $ac_cv_working_alloca_h = yes; then ++ ++$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h ++ ++fi ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 ++$as_echo_n "checking for alloca... " >&6; } ++if test "${ac_cv_func_alloca_works+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#ifdef __GNUC__ ++# define alloca __builtin_alloca ++#else ++# ifdef _MSC_VER ++# include ++# define alloca _alloca ++# else ++# ifdef HAVE_ALLOCA_H ++# include ++# else ++# ifdef _AIX ++ #pragma alloca ++# else ++# ifndef alloca /* predefined by HP cc +Olibcalls */ ++char *alloca (); ++# endif ++# endif ++# endif ++# endif ++#endif ++ ++int ++main () ++{ ++char *p = (char *) alloca (1); ++ if (p) return 0; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_func_alloca_works=yes ++else ++ ac_cv_func_alloca_works=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 ++$as_echo "$ac_cv_func_alloca_works" >&6; } ++ ++if test $ac_cv_func_alloca_works = yes; then ++ ++$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h ++ ++else ++ # The SVR3 libPW and SVR4 libucb both contain incompatible functions ++# that cause trouble. Some versions do not even contain alloca or ++# contain a buggy version. If you still want to use their alloca, ++# use ar to extract alloca.o from them instead of compiling alloca.c. ++ ++ALLOCA=\${LIBOBJDIR}alloca.$ac_objext ++ ++$as_echo "#define C_ALLOCA 1" >>confdefs.h ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 ++$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } ++if test "${ac_cv_os_cray+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#if defined CRAY && ! defined CRAY2 ++webecray ++#else ++wenotbecray ++#endif ++ ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "webecray" >/dev/null 2>&1; then : ++ ac_cv_os_cray=yes ++else ++ ac_cv_os_cray=no ++fi ++rm -f conftest* ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 ++$as_echo "$ac_cv_os_cray" >&6; } ++if test $ac_cv_os_cray = yes; then ++ for ac_func in _getb67 GETB67 getb67; do ++ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" ++eval as_val=\$$as_ac_var ++ if test "x$as_val" = x""yes; then : ++ ++cat >>confdefs.h <<_ACEOF ++#define CRAY_STACKSEG_END $ac_func ++_ACEOF ++ ++ break ++fi ++ ++ done ++fi ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 ++$as_echo_n "checking stack direction for C alloca... " >&6; } ++if test "${ac_cv_c_stack_direction+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test "$cross_compiling" = yes; then : ++ ac_cv_c_stack_direction=0 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$ac_includes_default ++int ++find_stack_direction () ++{ ++ static char *addr = 0; ++ auto char dummy; ++ if (addr == 0) ++ { ++ addr = &dummy; ++ return find_stack_direction (); ++ } ++ else ++ return (&dummy > addr) ? 1 : -1; ++} ++ ++int ++main () ++{ ++ return find_stack_direction () < 0; ++} ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ ac_cv_c_stack_direction=1 ++else ++ ac_cv_c_stack_direction=-1 ++fi ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext ++fi ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 ++$as_echo "$ac_cv_c_stack_direction" >&6; } ++cat >>confdefs.h <<_ACEOF ++#define STACK_DIRECTION $ac_cv_c_stack_direction ++_ACEOF ++ ++ ++fi ++ ++ + + for ac_header in stdint.h + do : +@@ -7564,13 +7756,13 @@ + else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext +- (eval echo "\"\$as_me:7567: $ac_compile\"" >&5) ++ (eval echo "\"\$as_me:7759: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 +- (eval echo "\"\$as_me:7570: $NM \\\"conftest.$ac_objext\\\"\"" >&5) ++ (eval echo "\"\$as_me:7762: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 +- (eval echo "\"\$as_me:7573: output\"" >&5) ++ (eval echo "\"\$as_me:7765: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" +@@ -8772,7 +8964,7 @@ + ;; + *-*-irix6*) + # Find out which ABI we are using. +- echo '#line 8775 "configure"' > conftest.$ac_ext ++ echo '#line 8967 "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +@@ -10032,11 +10224,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:10035: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:10227: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:10039: \$? = $ac_status" >&5 ++ echo "$as_me:10231: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -10371,11 +10563,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:10374: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:10566: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:10378: \$? = $ac_status" >&5 ++ echo "$as_me:10570: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -10476,11 +10668,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:10479: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:10671: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:10483: \$? = $ac_status" >&5 ++ echo "$as_me:10675: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -10531,11 +10723,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:10534: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:10726: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:10538: \$? = $ac_status" >&5 ++ echo "$as_me:10730: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -12915,7 +13107,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12918 "configure" ++#line 13110 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -13011,7 +13203,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 13014 "configure" ++#line 13206 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +diff -Naur mpfr-3.0.0-old/gamma.c mpfr-3.0.0-new/gamma.c +--- mpfr-3.0.0-old/gamma.c 2010-06-10 04:00:14.000000000 -0700 ++++ mpfr-3.0.0-new/gamma.c 2010-11-10 16:53:44.000000000 -0800 +@@ -274,7 +274,7 @@ + /* we want an upper bound for x * [log(2-x)-1]. + since x < 0, we need a lower bound on log(2-x) */ + mpfr_ui_sub (xp, 2, x, MPFR_RNDD); +- mpfr_log (xp, xp, MPFR_RNDD); ++ mpfr_log2 (xp, xp, MPFR_RNDD); + mpfr_sub_ui (xp, xp, 1, MPFR_RNDD); + mpfr_mul (xp, xp, x, MPFR_RNDU); + +@@ -303,8 +303,8 @@ + { + mpfr_sub (tmp, tmp, tmp2, MPFR_RNDZ); /* low bnd on |sin(Pi*(2-x))| */ + mpfr_ui_div (tmp, 12, tmp, MPFR_RNDU); /* upper bound */ +- mpfr_log (tmp, tmp, MPFR_RNDU); +- mpfr_add (tmp, tmp, xp, MPFR_RNDU); ++ mpfr_log2 (tmp, tmp, MPFR_RNDU); ++ mpfr_add (xp, tmp, xp, MPFR_RNDU); + underflow = mpfr_cmp_si (xp, expo.saved_emin - 2) <= 0; + } + +diff -Naur mpfr-3.0.0-old/Makefile.in mpfr-3.0.0-new/Makefile.in +--- mpfr-3.0.0-old/Makefile.in 2010-06-10 04:00:52.000000000 -0700 ++++ mpfr-3.0.0-new/Makefile.in 2010-11-10 16:53:44.000000000 -0800 +@@ -239,6 +239,7 @@ + distuninstallcheck_listfiles = find . -type f -print + distcleancheck_listfiles = find . -type f -print + ACLOCAL = @ACLOCAL@ ++ALLOCA = @ALLOCA@ + AMTAR = @AMTAR@ + AR = @AR@ + AS = @AS@ +diff -Naur mpfr-3.0.0-old/mpfr.h mpfr-3.0.0-new/mpfr.h +--- mpfr-3.0.0-old/mpfr.h 2010-06-10 04:00:14.000000000 -0700 ++++ mpfr-3.0.0-new/mpfr.h 2010-11-10 16:53:44.000000000 -0800 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 3 + #define MPFR_VERSION_MINOR 0 + #define MPFR_VERSION_PATCHLEVEL 0 +-#define MPFR_VERSION_STRING "3.0.0" ++#define MPFR_VERSION_STRING "3.0.0-p8" + + /* Macros dealing with MPFR VERSION */ + #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) +@@ -67,6 +67,16 @@ + # define _MPFR_H_HAVE_INTMAX_T 1 + #endif + ++/* Avoid some problems with macro expansion if the user defines macros ++ with the same name as keywords. By convention, identifiers and macro ++ names starting with mpfr_ are reserved by MPFR. */ ++typedef void mpfr_void; ++typedef int mpfr_int; ++typedef unsigned int mpfr_uint; ++typedef long mpfr_long; ++typedef unsigned long mpfr_ulong; ++typedef size_t mpfr_size_t; ++ + /* Definition of rounding modes (DON'T USE MPFR_RNDNA!). + Warning! Changing the contents of this enum should be seen as an + interface change since the old and the new types are not compatible +@@ -136,7 +146,7 @@ + typedef mp_exp_t mpfr_exp_t; + + /* Definition of the standard exponent limits */ +-#define MPFR_EMAX_DEFAULT ((mpfr_exp_t) (((unsigned long) 1 << 30) - 1)) ++#define MPFR_EMAX_DEFAULT ((mpfr_exp_t) (((mpfr_ulong) 1 << 30) - 1)) + #define MPFR_EMIN_DEFAULT (-(MPFR_EMAX_DEFAULT)) + + /* Definition of the main structure */ +@@ -725,13 +735,13 @@ + unexpected results with future compilers and aggressive optimisations. + Why not working only with signed types, using INT_MIN and LONG_MIN? */ + #if __GMP_MP_SIZE_T_INT +-#define __MPFR_EXP_NAN ((mpfr_exp_t)((~((~(unsigned int)0)>>1))+2)) +-#define __MPFR_EXP_ZERO ((mpfr_exp_t)((~((~(unsigned int)0)>>1))+1)) +-#define __MPFR_EXP_INF ((mpfr_exp_t)((~((~(unsigned int)0)>>1))+3)) ++#define __MPFR_EXP_NAN ((mpfr_exp_t)((~((~(mpfr_uint)0)>>1))+2)) ++#define __MPFR_EXP_ZERO ((mpfr_exp_t)((~((~(mpfr_uint)0)>>1))+1)) ++#define __MPFR_EXP_INF ((mpfr_exp_t)((~((~(mpfr_uint)0)>>1))+3)) + #else +-#define __MPFR_EXP_NAN ((mpfr_exp_t)((~((~(unsigned long)0)>>1))+2)) +-#define __MPFR_EXP_ZERO ((mpfr_exp_t)((~((~(unsigned long)0)>>1))+1)) +-#define __MPFR_EXP_INF ((mpfr_exp_t)((~((~(unsigned long)0)>>1))+3)) ++#define __MPFR_EXP_NAN ((mpfr_exp_t)((~((~(mpfr_ulong)0)>>1))+2)) ++#define __MPFR_EXP_ZERO ((mpfr_exp_t)((~((~(mpfr_ulong)0)>>1))+1)) ++#define __MPFR_EXP_INF ((mpfr_exp_t)((~((~(mpfr_ulong)0)>>1))+3)) + #endif + + /* Define MPFR_USE_EXTENSION to avoid "gcc -pedantic" warnings. */ +@@ -760,9 +770,9 @@ + #define mpfr_inf_p(_x) ((_x)->_mpfr_exp == __MPFR_EXP_INF) + #define mpfr_zero_p(_x) ((_x)->_mpfr_exp == __MPFR_EXP_ZERO) + #define mpfr_regular_p(_x) ((_x)->_mpfr_exp > __MPFR_EXP_INF) +-#define mpfr_sgn(_x) \ +- ((_x)->_mpfr_exp < __MPFR_EXP_INF ? \ +- (mpfr_nan_p (_x) ? mpfr_set_erangeflag () : (void) 0), 0 : \ ++#define mpfr_sgn(_x) \ ++ ((_x)->_mpfr_exp < __MPFR_EXP_INF ? \ ++ (mpfr_nan_p (_x) ? mpfr_set_erangeflag () : (mpfr_void) 0), 0 : \ + MPFR_SIGN (_x)) + + /* Prevent them from using as lvalues */ +@@ -798,50 +808,72 @@ + anyway. Checking with other ICC versions is needed. Possibly detect + whether warnings are produced or not with a configure test. + + Remove C++ too, since it complains too much. */ ++/* Added casts to improve robustness in case of undefined behavior and ++ compiler extensions based on UB (in particular -fwrapv). MPFR doesn't ++ use such extensions, but these macros will be used by 3rd-party code, ++ where such extensions may be required. ++ Moreover casts to unsigned long have been added to avoid warnings in ++ programs that use MPFR and are compiled with -Wconversion; such casts ++ are OK since if X is a constant expression, then (unsigned long) X is ++ also a constant expression, so that the optimizations still work. The ++ warnings are probably related to the following two bugs: ++ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210 ++ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38470 (possibly a variant) ++ and the casts could be removed once these bugs are fixed. ++ Casts shouldn't be used on the generic calls (to the ..._2exp functions), ++ where implicit conversions are performed. Indeed, having at least one ++ implicit conversion in the macro allows the compiler to emit diagnostics ++ when normally expected, for instance in the following call: ++ mpfr_set_ui (x, "foo", MPFR_RNDN); ++ If this is not possible (for future macros), one of the tricks described ++ on http://groups.google.com/group/comp.std.c/msg/e92abd24bf9eaf7b could ++ be used. */ + #if defined (__GNUC__) && !defined(__ICC) && !defined(__cplusplus) + #if (__GNUC__ >= 2) + #undef mpfr_cmp_ui +-/* We use the fact that mpfr_sgn on NaN sets the erange flag and returns 0. */ +-#define mpfr_cmp_ui(_f,_u) \ +- (__builtin_constant_p (_u) && (_u) == 0 ? \ +- mpfr_sgn (_f) : \ +- mpfr_cmp_ui_2exp ((_f),(_u),0)) ++/* We use the fact that mpfr_sgn on NaN sets the erange flag and returns 0. ++ But warning! mpfr_sgn is specified as a macro in the API, thus the macro ++ mustn't be used if side effects are possible, like here. */ ++#define mpfr_cmp_ui(_f,_u) \ ++ (__builtin_constant_p (_u) && (mpfr_ulong) (_u) == 0 ? \ ++ (mpfr_sgn) (_f) : \ ++ mpfr_cmp_ui_2exp ((_f), (_u), 0)) + #undef mpfr_cmp_si +-#define mpfr_cmp_si(_f,_s) \ +- (__builtin_constant_p (_s) && (_s) >= 0 ? \ +- mpfr_cmp_ui ((_f), (_s)) : \ ++#define mpfr_cmp_si(_f,_s) \ ++ (__builtin_constant_p (_s) && (mpfr_long) (_s) >= 0 ? \ ++ mpfr_cmp_ui ((_f), (mpfr_ulong) (mpfr_long) (_s)) : \ + mpfr_cmp_si_2exp ((_f), (_s), 0)) + #if __GNUC__ > 2 || __GNUC_MINOR__ >= 95 + #undef mpfr_set_ui +-#define mpfr_set_ui(_f,_u,_r) \ +- (__builtin_constant_p (_u) && (_u) == 0 ? \ +- __extension__ ({ \ +- mpfr_ptr _p = (_f); \ +- _p->_mpfr_sign = 1; \ +- _p->_mpfr_exp = __MPFR_EXP_ZERO; \ +- (void) (_r); 0; }) : \ ++#define mpfr_set_ui(_f,_u,_r) \ ++ (__builtin_constant_p (_u) && (mpfr_ulong) (_u) == 0 ? \ ++ __extension__ ({ \ ++ mpfr_ptr _p = (_f); \ ++ _p->_mpfr_sign = 1; \ ++ _p->_mpfr_exp = __MPFR_EXP_ZERO; \ ++ (mpfr_void) (_r); 0; }) : \ + mpfr_set_ui_2exp ((_f), (_u), 0, (_r))) + #endif + #undef mpfr_set_si +-#define mpfr_set_si(_f,_s,_r) \ +- (__builtin_constant_p (_s) && (_s) >= 0 ? \ +- mpfr_set_ui ((_f), (_s), (_r)) : \ ++#define mpfr_set_si(_f,_s,_r) \ ++ (__builtin_constant_p (_s) && (mpfr_long) (_s) >= 0 ? \ ++ mpfr_set_ui ((_f), (mpfr_ulong) (mpfr_long) (_s), (_r)) : \ + mpfr_set_si_2exp ((_f), (_s), 0, (_r))) + #endif + #endif + + /* Macro version of mpfr_stack interface for fast access */ +-#define mpfr_custom_get_size(p) ((size_t) \ ++#define mpfr_custom_get_size(p) ((mpfr_size_t) \ + (((p)+GMP_NUMB_BITS-1)/GMP_NUMB_BITS*sizeof (mp_limb_t))) + #define mpfr_custom_init(m,p) do {} while (0) +-#define mpfr_custom_get_significand(x) ((void*)((x)->_mpfr_d)) ++#define mpfr_custom_get_significand(x) ((mpfr_void*)((x)->_mpfr_d)) + #define mpfr_custom_get_exp(x) ((x)->_mpfr_exp) + #define mpfr_custom_move(x,m) do { ((x)->_mpfr_d = (mp_limb_t*)(m)); } while (0) + #define mpfr_custom_init_set(x,k,e,p,m) do { \ + mpfr_ptr _x = (x); \ + mpfr_exp_t _e; \ + mpfr_kind_t _t; \ +- int _s, _k; \ ++ mpfr_int _s, _k; \ + _k = (k); \ + if (_k >= 0) { \ + _t = (mpfr_kind_t) _k; \ +@@ -858,11 +890,13 @@ + _x->_mpfr_exp = _e; \ + _x->_mpfr_d = (mp_limb_t*) (m); \ + } while (0) +-#define mpfr_custom_get_kind(x) \ +- ( (x)->_mpfr_exp > __MPFR_EXP_INF ? (int)MPFR_REGULAR_KIND*MPFR_SIGN (x) \ +- : (x)->_mpfr_exp == __MPFR_EXP_INF ? (int)MPFR_INF_KIND*MPFR_SIGN (x) \ +- : (x)->_mpfr_exp == __MPFR_EXP_NAN ? (int)MPFR_NAN_KIND \ +- : (int) MPFR_ZERO_KIND * MPFR_SIGN (x) ) ++#define mpfr_custom_get_kind(x) \ ++ ( (x)->_mpfr_exp > __MPFR_EXP_INF ? \ ++ (mpfr_int) MPFR_REGULAR_KIND * MPFR_SIGN (x) \ ++ : (x)->_mpfr_exp == __MPFR_EXP_INF ? \ ++ (mpfr_int) MPFR_INF_KIND * MPFR_SIGN (x) \ ++ : (x)->_mpfr_exp == __MPFR_EXP_NAN ? (mpfr_int) MPFR_NAN_KIND \ ++ : (mpfr_int) MPFR_ZERO_KIND * MPFR_SIGN (x) ) + + + #endif /* MPFR_USE_NO_MACRO */ +diff -Naur mpfr-3.0.0-old/mpfr.texi mpfr-3.0.0-new/mpfr.texi +--- mpfr-3.0.0-old/mpfr.texi 2010-06-10 04:00:14.000000000 -0700 ++++ mpfr-3.0.0-new/mpfr.texi 2010-11-10 16:53:44.000000000 -0800 +@@ -2050,7 +2050,7 @@ + are printed. If @var{base} is greater than 10, @samp{@@} will be used + instead of @samp{e} as exponent delimiter. + +-Return the number of bytes written, or if an error occurred, return 0. ++Return the number of characters written, or if an error occurred, return 0. + @end deftypefun + + @deftypefun size_t mpfr_inp_str (mpfr_t @var{rop}, FILE *@var{stream}, int @var{base}, mpfr_rnd_t @var{rnd}) +diff -Naur mpfr-3.0.0-old/out_str.c mpfr-3.0.0-new/out_str.c +--- mpfr-3.0.0-old/out_str.c 2010-06-10 04:00:14.000000000 -0700 ++++ mpfr-3.0.0-new/out_str.c 2010-11-10 16:53:44.000000000 -0800 +@@ -22,6 +22,16 @@ + + #include "mpfr-impl.h" + ++/* Warning! S should not contain "%". */ ++#define OUT_STR_RET(S) \ ++ do \ ++ { \ ++ int r; \ ++ r = fprintf (stream, (S)); \ ++ return r < 0 ? 0 : r; \ ++ } \ ++ while (0) ++ + size_t + mpfr_out_str (FILE *stream, int base, size_t n_digits, mpfr_srcptr op, + mpfr_rnd_t rnd_mode) +@@ -29,6 +39,7 @@ + char *s, *s0; + size_t l; + mpfr_exp_t e; ++ int err; + + MPFR_ASSERTN (base >= 2 && base <= 62); + +@@ -36,37 +47,16 @@ + if (stream == NULL) + stream = stdout; + +- if (MPFR_IS_NAN(op)) +- { +- fprintf (stream, "@NaN@"); +- return 3; +- } +- +- if (MPFR_IS_INF(op)) +- { +- if (MPFR_SIGN(op) > 0) +- { +- fprintf (stream, "@Inf@"); +- return 3; +- } +- else +- { +- fprintf (stream, "-@Inf@"); +- return 4; +- } +- } +- +- if (MPFR_IS_ZERO(op)) ++ if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (op))) + { +- if (MPFR_SIGN(op) > 0) +- { +- fprintf(stream, "0"); +- return 1; +- } ++ if (MPFR_IS_NAN (op)) ++ OUT_STR_RET ("@NaN@"); ++ else if (MPFR_IS_INF (op)) ++ OUT_STR_RET (MPFR_IS_POS (op) ? "@Inf@" : "-@Inf@"); + else + { +- fprintf(stream, "-0"); +- return 2; ++ MPFR_ASSERTD (MPFR_IS_ZERO (op)); ++ OUT_STR_RET (MPFR_IS_POS (op) ? "0" : "-0"); + } + } + +@@ -77,21 +67,31 @@ + + l = strlen (s) + 1; /* size of allocated block returned by mpfr_get_str + - may be incorrect, as only an upper bound? */ +- if (*s == '-') +- fputc (*s++, stream); + +- /* outputs mantissa */ +- fputc (*s++, stream); e--; /* leading digit */ +- fputc ((unsigned char) MPFR_DECIMAL_POINT, stream); +- fputs (s, stream); /* rest of mantissa */ ++ /* outputs possible sign and significand */ ++ err = (*s == '-' && fputc (*s++, stream) == EOF) ++ || fputc (*s++, stream) == EOF /* leading digit */ ++ || fputc ((unsigned char) MPFR_DECIMAL_POINT, stream) == EOF ++ || fputs (s, stream) == EOF; /* trailing significand */ + (*__gmp_free_func) (s0, l); ++ if (MPFR_UNLIKELY (err)) ++ return 0; ++ ++ e--; /* due to the leading digit */ + + /* outputs exponent */ + if (e) + { ++ int r; ++ + MPFR_ASSERTN(e >= LONG_MIN); + MPFR_ASSERTN(e <= LONG_MAX); +- l += fprintf (stream, (base <= 10 ? "e%ld" : "@%ld"), (long) e); ++ ++ r = fprintf (stream, (base <= 10 ? "e%ld" : "@%ld"), (long) e); ++ if (MPFR_UNLIKELY (r < 0)) ++ return 0; ++ ++ l += r; + } + + return l; +diff -Naur mpfr-3.0.0-old/PATCHES mpfr-3.0.0-new/PATCHES +--- mpfr-3.0.0-old/PATCHES 2010-06-10 04:00:14.000000000 -0700 ++++ mpfr-3.0.0-new/PATCHES 2010-11-10 16:53:44.000000000 -0800 +@@ -0,0 +1,8 @@ ++macros ++mpfr_set_ld ++mpfr_sub1 ++tcan_round ++mpfr_cmp/set_ui/si ++gamma_underflow ++alloca ++mpfr_out_str +diff -Naur mpfr-3.0.0-old/set_ld.c mpfr-3.0.0-new/set_ld.c +--- mpfr-3.0.0-old/set_ld.c 2010-06-10 04:00:14.000000000 -0700 ++++ mpfr-3.0.0-new/set_ld.c 2010-11-10 16:53:44.000000000 -0800 +@@ -102,21 +102,25 @@ + { + x /= div13; /* exact */ + shift_exp += 8192; ++ mpfr_div_2si (t, t, 8192, MPFR_RNDZ); + } + if (ABS (x) >= div12) + { + x /= div12; /* exact */ + shift_exp += 4096; ++ mpfr_div_2si (t, t, 4096, MPFR_RNDZ); + } + if (ABS (x) >= div11) + { + x /= div11; /* exact */ + shift_exp += 2048; ++ mpfr_div_2si (t, t, 2048, MPFR_RNDZ); + } + if (ABS (x) >= div10) + { + x /= div10; /* exact */ + shift_exp += 1024; ++ mpfr_div_2si (t, t, 1024, MPFR_RNDZ); + } + /* warning: we may have DBL_MAX=2^1024*(1-2^(-53)) < x < 2^1024, + therefore we have one extra exponent reduction step */ +@@ -124,9 +128,10 @@ + { + x /= div9; /* exact */ + shift_exp += 512; ++ mpfr_div_2si (t, t, 512, MPFR_RNDZ); + } + } /* Check overflow of double */ +- else ++ else /* no overflow on double */ + { + long double div9, div10, div11; + +@@ -149,29 +154,34 @@ + { + x /= div13; /* exact */ + shift_exp -= 8192; ++ mpfr_mul_2si (t, t, 8192, MPFR_RNDZ); + } + if (ABS (x) <= div12) + { + x /= div12; /* exact */ + shift_exp -= 4096; ++ mpfr_mul_2si (t, t, 4096, MPFR_RNDZ); + } + if (ABS (x) <= div11) + { + x /= div11; /* exact */ + shift_exp -= 2048; ++ mpfr_mul_2si (t, t, 2048, MPFR_RNDZ); + } + if (ABS (x) <= div10) + { + x /= div10; /* exact */ + shift_exp -= 1024; ++ mpfr_mul_2si (t, t, 1024, MPFR_RNDZ); + } + if (ABS(x) <= div9) + { + x /= div9; /* exact */ + shift_exp -= 512; ++ mpfr_mul_2si (t, t, 512, MPFR_RNDZ); + } + } +- else ++ else /* no underflow */ + { + inexact = mpfr_set_d (u, (double) x, MPFR_RNDZ); + MPFR_ASSERTD (inexact == 0); +diff -Naur mpfr-3.0.0-old/sub1.c mpfr-3.0.0-new/sub1.c +--- mpfr-3.0.0-old/sub1.c 2010-06-10 04:00:14.000000000 -0700 ++++ mpfr-3.0.0-new/sub1.c 2010-11-10 16:53:44.000000000 -0800 +@@ -37,7 +37,9 @@ + mp_size_t cancel2, an, bn, cn, cn0; + mp_limb_t *ap, *bp, *cp; + mp_limb_t carry, bb, cc, borrow = 0; +- int inexact, shift_b, shift_c, is_exact = 1, down = 0, add_exp = 0; ++ int inexact, shift_b, shift_c, add_exp = 0; ++ int cmp_low = 0; /* used for rounding to nearest: 0 if low(b) = low(c), ++ negative if low(b) < low(c), positive if low(b)>low(c) */ + int sh, k; + MPFR_TMP_DECL(marker); + +@@ -196,7 +198,8 @@ + } + + #ifdef DEBUG +- printf ("shift_b=%d shift_c=%d diffexp=%lu\n", shift_b, shift_c, ++ printf ("rnd=%s shift_b=%d shift_c=%d diffexp=%lu\n", ++ mpfr_print_rnd_mode (rnd_mode), shift_b, shift_c, + (unsigned long) diff_exp); + #endif + +@@ -307,17 +310,18 @@ + { + if (MPFR_LIKELY(sh)) + { +- is_exact = (carry == 0); + /* can decide except when carry = 2^(sh-1) [middle] + or carry = 0 [truncate, but cannot decide inexact flag] */ +- down = (carry < (MPFR_LIMB_ONE << (sh - 1))); + if (carry > (MPFR_LIMB_ONE << (sh - 1))) + goto add_one_ulp; +- else if ((0 < carry) && down) ++ else if ((0 < carry) && (carry < (MPFR_LIMB_ONE << (sh - 1)))) + { + inexact = -1; /* result if smaller than exact value */ + goto truncate; + } ++ /* now carry = 2^(sh-1), in which case cmp_low=2, ++ or carry = 0, in which case cmp_low=0 */ ++ cmp_low = (carry == 0) ? 0 : 2; + } + } + else /* directed rounding: set rnd_mode to RNDZ iff toward zero */ +@@ -344,12 +348,32 @@ + cn -= (long int) an + cancel2; + + #ifdef DEBUG +- printf ("last %d bits from a are %lu, bn=%ld, cn=%ld\n", ++ printf ("last sh=%d bits from a are %lu, bn=%ld, cn=%ld\n", + sh, (unsigned long) carry, (long) bn, (long) cn); + #endif + ++ /* for rounding to nearest, we couldn't conclude up to here in the following ++ cases: ++ 1. sh = 0, then cmp_low=0: we can either truncate, subtract one ulp ++ or add one ulp: -1 ulp < low(b)-low(c) < 1 ulp ++ 2. sh > 0 but the low sh bits from high(b)-high(c) equal 2^(sh-1): ++ -0.5 ulp <= -1/2^sh < low(b)-low(c)-0.5 < 1/2^sh <= 0.5 ulp ++ we can't decide the rounding, in that case cmp_low=2: ++ either we truncate and flag=-1, or we add one ulp and flag=1 ++ 3. the low sh>0 bits from high(b)-high(c) equal 0: we know we have to ++ truncate but we can't decide the ternary value, here cmp_low=0: ++ -0.5 ulp <= -1/2^sh < low(b)-low(c) < 1/2^sh <= 0.5 ulp ++ we always truncate and inexact can be any of -1,0,1 ++ */ ++ ++ /* note: here cn might exceed cn0, in which case we consider a zero limb */ + for (k = 0; (bn > 0) || (cn > 0); k = 1) + { ++ /* if cmp_low < 0, we know low(b) - low(c) < 0 ++ if cmp_low > 0, we know low(b) - low(c) > 0 ++ (more precisely if cmp_low = 2, low(b) - low(c) = 0.5 ulp so far) ++ if cmp_low = 0, so far low(b) - low(c) = 0 */ ++ + /* get next limbs */ + bb = (bn > 0) ? bp[--bn] : 0; + if ((cn > 0) && (cn-- <= cn0)) +@@ -357,76 +381,115 @@ + else + cc = 0; + +- /* down is set when low(b) < low(c) */ +- if (down == 0) +- down = (bb < cc); ++ /* cmp_low compares low(b) and low(c) */ ++ if (cmp_low == 0) /* case 1 or 3 */ ++ cmp_low = (bb < cc) ? -2+k : (bb > cc) ? 1 : 0; ++ ++ /* Case 1 for k=0 splits into 7 subcases: ++ 1a: bb > cc + half ++ 1b: bb = cc + half ++ 1c: 0 < bb - cc < half ++ 1d: bb = cc ++ 1e: -half < bb - cc < 0 ++ 1f: bb - cc = -half ++ 1g: bb - cc < -half ++ ++ Case 2 splits into 3 subcases: ++ 2a: bb > cc ++ 2b: bb = cc ++ 2c: bb < cc ++ ++ Case 3 splits into 3 subcases: ++ 3a: bb > cc ++ 3b: bb = cc ++ 3c: bb < cc ++ */ + + /* the case rounding to nearest with sh=0 is special since one couldn't + subtract above 1/2 ulp in the trailing limb of the result */ +- if ((rnd_mode == MPFR_RNDN) && sh == 0 && k == 0) ++ if (rnd_mode == MPFR_RNDN && sh == 0 && k == 0) /* case 1 for k=0 */ + { + mp_limb_t half = MPFR_LIMB_HIGHBIT; + +- is_exact = (bb == cc); +- + /* add one ulp if bb > cc + half + truncate if cc - half < bb < cc + half + sub one ulp if bb < cc - half + */ + +- if (down) ++ if (cmp_low < 0) /* bb < cc: -1 ulp < low(b) - low(c) < 0, ++ cases 1e, 1f and 1g */ + { + if (cc >= half) + cc -= half; +- else ++ else /* since bb < cc < half, bb+half < 2*half */ + bb += half; ++ /* now we have bb < cc + half: ++ we have to subtract one ulp if bb < cc, ++ and truncate if bb > cc */ + } +- else /* bb >= cc */ ++ else if (cmp_low >= 0) /* bb >= cc, cases 1a to 1d */ + { + if (cc < half) + cc += half; +- else ++ else /* since bb >= cc >= half, bb - half >= 0 */ + bb -= half; ++ /* now we have bb > cc - half: we have to add one ulp if bb > cc, ++ and truncate if bb < cc */ ++ if (cmp_low > 0) ++ cmp_low = 2; + } + } + + #ifdef DEBUG +- printf (" bb=%lu cc=%lu down=%d is_exact=%d\n", +- (unsigned long) bb, (unsigned long) cc, down, is_exact); ++ printf ("k=%u bb=%lu cc=%lu cmp_low=%d\n", k, ++ (unsigned long) bb, (unsigned long) cc, cmp_low); + #endif +- if (bb < cc) ++ if (cmp_low < 0) /* low(b) - low(c) < 0: either truncate or subtract ++ one ulp */ + { + if (rnd_mode == MPFR_RNDZ) +- goto sub_one_ulp; ++ goto sub_one_ulp; /* set inexact=-1 */ + else if (rnd_mode != MPFR_RNDN) /* round away */ + { + inexact = 1; + goto truncate; + } +- else /* round to nearest: special case here since for sh=k=0 +- bb = bb0 - MPFR_LIMB_HIGHBIT */ ++ else /* round to nearest */ + { +- if (is_exact && sh == 0) +- { +- /* For k=0 we can't decide exactness since it may depend +- from low order bits. +- For k=1, the first low limbs matched: low(b)-low(c)<0. */ +- if (k) +- { +- inexact = 1; +- goto truncate; +- } +- } +- else if (down && sh == 0) +- goto sub_one_ulp; +- else +- { +- inexact = (is_exact) ? 1 : -1; ++ /* If cmp_low < 0 and bb > cc, then -0.5 ulp < low(b)-low(c) < 0, ++ whatever the value of sh. ++ If sh>0, then cmp_low < 0 implies that the initial neglected ++ sh bits were 0 (otherwise cmp_low=2 initially), thus the ++ weight of the new bits is less than 0.5 ulp too. ++ If k > 0 (and sh=0) this means that either the first neglected ++ limbs bb and cc were equal (thus cmp_low was 0 for k=0), ++ or we had bb - cc = -0.5 ulp or 0.5 ulp. ++ The last case is not possible here since we would have ++ cmp_low > 0 which is sticky. ++ In the first case (where we have cmp_low = -1), we truncate, ++ whereas in the 2nd case we have cmp_low = -2 and we subtract ++ one ulp. ++ */ ++ if (bb > cc || sh > 0 || cmp_low == -1) ++ { /* -0.5 ulp < low(b)-low(c) < 0, ++ bb > cc corresponds to cases 1e and 1f1 ++ sh > 0 corresponds to cases 3c and 3b3 ++ cmp_low = -1 corresponds to case 1d3 (also 3b3) */ ++ inexact = 1; + goto truncate; + } ++ else if (bb < cc) /* here sh = 0 and low(b)-low(c) < -0.5 ulp, ++ this corresponds to cases 1g and 1f3 */ ++ goto sub_one_ulp; ++ /* the only case where we can't conclude is sh=0 and bb=cc, ++ i.e., we have low(b) - low(c) = -0.5 ulp (up to now), thus ++ we don't know if we must truncate or subtract one ulp. ++ Note: for sh=0 we can't have low(b) - low(c) = -0.5 ulp up to ++ now, since low(b) - low(c) > 1/2^sh */ + } + } +- else if (bb > cc) ++ else if (cmp_low > 0) /* 0 < low(b) - low(c): either truncate or ++ add one ulp */ + { + if (rnd_mode == MPFR_RNDZ) + { +@@ -437,34 +500,70 @@ + goto add_one_ulp; + else /* round to nearest */ + { +- if (is_exact) ++ if (bb > cc) + { +- inexact = -1; +- goto truncate; ++ /* if sh=0, then bb>cc means that low(b)-low(c) > 0.5 ulp, ++ and similarly when cmp_low=2 */ ++ if (cmp_low == 2) /* cases 1a, 1b1, 2a and 2b1 */ ++ goto add_one_ulp; ++ /* sh > 0 and cmp_low > 0: this implies that the sh initial ++ neglected bits were 0, and the remaining low(b)-low(c)>0, ++ but its weight is less than 0.5 ulp */ ++ else /* 0 < low(b) - low(c) < 0.5 ulp, this corresponds to ++ cases 3a, 1d1 and 3b1 */ ++ { ++ inexact = -1; ++ goto truncate; ++ } + } +- else if (down) ++ else if (bb < cc) /* 0 < low(b) - low(c) < 0.5 ulp, cases 1c, ++ 1b3, 2b3 and 2c */ + { +- inexact = 1; ++ inexact = -1; + goto truncate; + } +- else +- goto add_one_ulp; +- } +- } ++ /* the only case where we can't conclude is bb=cc, i.e., ++ low(b) - low(c) = 0.5 ulp (up to now), thus we don't know ++ if we must truncate or add one ulp. */ ++ } ++ } ++ /* after k=0, we cannot conclude in the following cases, we split them ++ according to the values of bb and cc for k=1: ++ 1b. sh=0 and cmp_low = 1 and bb-cc = half [around 0.5 ulp] ++ 1b1. bb > cc: add one ulp, inex = 1 ++ 1b2: bb = cc: cannot conclude ++ 1b3: bb < cc: truncate, inex = -1 ++ 1d. sh=0 and cmp_low = 0 and bb-cc = 0 [around 0] ++ 1d1: bb > cc: truncate, inex = -1 ++ 1d2: bb = cc: cannot conclude ++ 1d3: bb < cc: truncate, inex = +1 ++ 1f. sh=0 and cmp_low = -1 and bb-cc = -half [around -0.5 ulp] ++ 1f1: bb > cc: truncate, inex = +1 ++ 1f2: bb = cc: cannot conclude ++ 1f3: bb < cc: sub one ulp, inex = -1 ++ 2b. sh > 0 and cmp_low = 2 and bb=cc [around 0.5 ulp] ++ 2b1. bb > cc: add one ulp, inex = 1 ++ 2b2: bb = cc: cannot conclude ++ 2b3: bb < cc: truncate, inex = -1 ++ 3b. sh > 0 and cmp_low = 0 [around 0] ++ 3b1. bb > cc: truncate, inex = -1 ++ 3b2: bb = cc: cannot conclude ++ 3b3: bb < cc: truncate, inex = +1 ++ */ + } + +- if ((rnd_mode == MPFR_RNDN) && !is_exact) ++ if ((rnd_mode == MPFR_RNDN) && cmp_low != 0) + { + /* even rounding rule */ + if ((ap[0] >> sh) & 1) + { +- if (down) ++ if (cmp_low < 0) + goto sub_one_ulp; + else + goto add_one_ulp; + } + else +- inexact = (down) ? 1 : -1; ++ inexact = (cmp_low > 0) ? -1 : 1; + } + else + inexact = 0; +diff -Naur mpfr-3.0.0-old/tests/Makefile.in mpfr-3.0.0-new/tests/Makefile.in +--- mpfr-3.0.0-old/tests/Makefile.in 2010-06-10 04:00:52.000000000 -0700 ++++ mpfr-3.0.0-new/tests/Makefile.in 2010-11-10 16:53:44.000000000 -0800 +@@ -960,6 +960,7 @@ + red=; grn=; lgn=; blu=; std= + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + ACLOCAL = @ACLOCAL@ ++ALLOCA = @ALLOCA@ + AMTAR = @AMTAR@ + AR = @AR@ + AS = @AS@ +diff -Naur mpfr-3.0.0-old/tests/tcan_round.c mpfr-3.0.0-new/tests/tcan_round.c +--- mpfr-3.0.0-old/tests/tcan_round.c 2010-06-10 04:00:13.000000000 -0700 ++++ mpfr-3.0.0-new/tests/tcan_round.c 2010-11-10 16:53:44.000000000 -0800 +@@ -41,7 +41,7 @@ + /* avoid mpn_random which leaks memory */ + for (i = 0; i < n; i++) + buf[i] = randlimb (); +- p = (mpfr_prec_t) randlimb() % ((n-1) * GMP_NUMB_BITS) + MPFR_PREC_MIN; ++ p = randlimb() % ((n-1) * GMP_NUMB_BITS) + MPFR_PREC_MIN; + err = p + randlimb () % GMP_NUMB_BITS; + r1 = mpfr_round_p (buf, n, err, p); + r2 = mpfr_can_round_raw (buf, n, MPFR_SIGN_POS, err, +diff -Naur mpfr-3.0.0-old/tests/tcmp_ui.c mpfr-3.0.0-new/tests/tcmp_ui.c +--- mpfr-3.0.0-old/tests/tcmp_ui.c 2010-06-10 04:00:13.000000000 -0700 ++++ mpfr-3.0.0-new/tests/tcmp_ui.c 2010-11-10 16:53:44.000000000 -0800 +@@ -88,6 +88,126 @@ + mpfr_clear (x); + } + ++/* Since mpfr_cmp_ui and mpfr_cmp_si are also implemented by a macro ++ with __builtin_constant_p for GCC, check that side effects are ++ handled correctly. */ ++static void ++check_macros (void) ++{ ++ mpfr_t x; ++ int c; ++ ++ mpfr_init2 (x, 32); ++ ++ c = 0; ++ mpfr_set_ui (x, 17, MPFR_RNDN); ++ if (mpfr_cmp_ui (x, 17) != 0) ++ { ++ printf ("Error 1 on mpfr_cmp_ui(x,17) in check_macros\n"); ++ exit (1); ++ } ++ if (mpfr_cmp_ui (x, (c++, 17)) != 0) ++ { ++ printf ("Error 2 on mpfr_cmp_ui(x,17) in check_macros\n"); ++ exit (1); ++ } ++ if (c != 1) ++ { ++ printf ("Error 3 on mpfr_cmp_ui(x,17) in check_macros\n" ++ "(c = %d instead of 1)\n", c); ++ exit (1); ++ } ++ if (mpfr_cmp_si (x, 17) != 0) ++ { ++ printf ("Error 1 on mpfr_cmp_si(x,17) in check_macros\n"); ++ exit (1); ++ } ++ if (mpfr_cmp_si (x, (c++, 17)) != 0) ++ { ++ printf ("Error 2 on mpfr_cmp_si(x,17) in check_macros\n"); ++ exit (1); ++ } ++ if (c != 2) ++ { ++ printf ("Error 3 on mpfr_cmp_si(x,17) in check_macros\n" ++ "(c = %d instead of 2)\n", c); ++ exit (1); ++ } ++ ++ c = 0; ++ mpfr_set_ui (x, 0, MPFR_RNDN); ++ if (mpfr_cmp_ui (x, 0) != 0) ++ { ++ printf ("Error 1 on mpfr_cmp_ui(x,0) in check_macros\n"); ++ exit (1); ++ } ++ if (mpfr_cmp_ui (x, (c++, 0)) != 0) ++ { ++ printf ("Error 2 on mpfr_cmp_ui(x,0) in check_macros\n"); ++ exit (1); ++ } ++ if (c != 1) ++ { ++ printf ("Error 3 on mpfr_cmp_ui(x,0) in check_macros\n" ++ "(c = %d instead of 1)\n", c); ++ exit (1); ++ } ++ if (mpfr_cmp_si (x, 0) != 0) ++ { ++ printf ("Error 1 on mpfr_cmp_si(x,0) in check_macros\n"); ++ exit (1); ++ } ++ if (mpfr_cmp_si (x, (c++, 0)) != 0) ++ { ++ printf ("Error 2 on mpfr_cmp_si(x,0) in check_macros\n"); ++ exit (1); ++ } ++ if (c != 2) ++ { ++ printf ("Error 3 on mpfr_cmp_si(x,0) in check_macros\n" ++ "(c = %d instead of 2)\n", c); ++ exit (1); ++ } ++ ++ mpfr_clear (x); ++} ++ ++/* Bug in r7114 */ ++static void ++test_macros (void) ++{ ++ mpfr_t x[3]; ++ mpfr_ptr p; ++ ++ mpfr_inits (x[0], x[1], x[2], (mpfr_ptr) 0); ++ mpfr_set_ui (x[0], 0, MPFR_RNDN); ++ p = x[0]; ++ if (mpfr_cmp_ui (p++, 0) != 0) ++ { ++ printf ("Error in mpfr_cmp_ui macro: result should be 0.\n"); ++ exit (1); ++ } ++ if (p != x[1]) ++ { ++ printf ("Error in mpfr_cmp_ui macro: p - x[0] = %d (expecting 1)\n", ++ (int) (p - x[0])); ++ exit (1); ++ } ++ p = x[0]; ++ if (mpfr_cmp_si (p++, 0) != 0) ++ { ++ printf ("Error in mpfr_cmp_si macro: result should be 0.\n"); ++ exit (1); ++ } ++ if (p != x[1]) ++ { ++ printf ("Error in mpfr_cmp_si macro: p - x[0] = %d (expecting 1)\n", ++ (int) (p - x[0])); ++ exit (1); ++ } ++ mpfr_clears (x[0], x[1], x[2], (mpfr_ptr) 0); ++} ++ + int + main (void) + { +@@ -216,6 +336,8 @@ + mpfr_clear (x); + + check_nan (); ++ check_macros (); ++ test_macros (); + + tests_end_mpfr (); + return 0; +diff -Naur mpfr-3.0.0-old/tests/tfma.c mpfr-3.0.0-new/tests/tfma.c +--- mpfr-3.0.0-old/tests/tfma.c 2010-06-10 04:00:13.000000000 -0700 ++++ mpfr-3.0.0-new/tests/tfma.c 2010-11-10 16:53:44.000000000 -0800 +@@ -337,6 +337,94 @@ + mpfr_clears (x, y, z, r, (mpfr_ptr) 0); + } + ++static void ++bug20101018 (void) ++{ ++ mpfr_t x, y, z, t, u; ++ int i; ++ ++ mpfr_init2 (x, 64); ++ mpfr_init2 (y, 64); ++ mpfr_init2 (z, 64); ++ mpfr_init2 (t, 64); ++ mpfr_init2 (u, 64); ++ ++ mpfr_set_str (x, "0xf.fffffffffffffffp-14766", 16, MPFR_RNDN); ++ mpfr_set_str (y, "-0xf.fffffffffffffffp+317", 16, MPFR_RNDN); ++ mpfr_set_str (z, "0x8.3ffffffffffe3ffp-14443", 16, MPFR_RNDN); ++ mpfr_set_str (t, "0x8.7ffffffffffc7ffp-14444", 16, MPFR_RNDN); ++ i = mpfr_fma (u, x, y, z, MPFR_RNDN); ++ if (mpfr_cmp (u, t) != 0) ++ { ++ printf ("Wrong result in bug20101018 (a)\n"); ++ printf ("Expected "); ++ mpfr_out_str (stdout, 16, 0, t, MPFR_RNDN); ++ printf ("\nGot "); ++ mpfr_out_str (stdout, 16, 0, u, MPFR_RNDN); ++ printf ("\n"); ++ exit (1); ++ } ++ if (i <= 0) ++ { ++ printf ("Wrong ternary value in bug20101018 (a)\n"); ++ printf ("Expected > 0\n"); ++ printf ("Got %d\n", i); ++ exit (1); ++ } ++ ++ mpfr_set_str (x, "-0xf.fffffffffffffffp-11420", 16, MPFR_RNDN); ++ mpfr_set_str (y, "0xf.fffffffffffffffp+9863", 16, MPFR_RNDN); ++ mpfr_set_str (z, "0x8.fffff80ffffffffp-1551", 16, MPFR_RNDN); ++ mpfr_set_str (t, "0x9.fffff01ffffffffp-1552", 16, MPFR_RNDN); ++ i = mpfr_fma (u, x, y, z, MPFR_RNDN); ++ if (mpfr_cmp (u, t) != 0) ++ { ++ printf ("Wrong result in bug20101018 (b)\n"); ++ printf ("Expected "); ++ mpfr_out_str (stdout, 16, 0, t, MPFR_RNDN); ++ printf ("\nGot "); ++ mpfr_out_str (stdout, 16, 0, u, MPFR_RNDN); ++ printf ("\n"); ++ exit (1); ++ } ++ if (i <= 0) ++ { ++ printf ("Wrong ternary value in bug20101018 (b)\n"); ++ printf ("Expected > 0\n"); ++ printf ("Got %d\n", i); ++ exit (1); ++ } ++ ++ mpfr_set_str (x, "0xf.fffffffffffffffp-2125", 16, MPFR_RNDN); ++ mpfr_set_str (y, "-0xf.fffffffffffffffp-6000", 16, MPFR_RNDN); ++ mpfr_set_str (z, "0x8p-8119", 16, MPFR_RNDN); ++ mpfr_set_str (t, "0x8.000000000000001p-8120", 16, MPFR_RNDN); ++ i = mpfr_fma (u, x, y, z, MPFR_RNDN); ++ if (mpfr_cmp (u, t) != 0) ++ { ++ printf ("Wrong result in bug20101018 (c)\n"); ++ printf ("Expected "); ++ mpfr_out_str (stdout, 16, 0, t, MPFR_RNDN); ++ printf ("\nGot "); ++ mpfr_out_str (stdout, 16, 0, u, MPFR_RNDN); ++ printf ("\n"); ++ exit (1); ++ } ++ if (i <= 0) ++ { ++ printf ("Wrong ternary value in bug20101018 (c)\n"); ++ printf ("Expected > 0\n"); ++ printf ("Got %d\n", i); ++ exit (1); ++ } ++ ++ mpfr_clear (x); ++ mpfr_clear (y); ++ mpfr_clear (z); ++ mpfr_clear (t); ++ mpfr_clear (u); ++} ++ + int + main (int argc, char *argv[]) + { +@@ -345,6 +433,8 @@ + + tests_start_mpfr (); + ++ bug20101018 (); ++ + mpfr_init (x); + mpfr_init (s); + mpfr_init (y); +diff -Naur mpfr-3.0.0-old/tests/tgamma.c mpfr-3.0.0-new/tests/tgamma.c +--- mpfr-3.0.0-old/tests/tgamma.c 2010-06-10 04:00:13.000000000 -0700 ++++ mpfr-3.0.0-new/tests/tgamma.c 2010-11-10 16:53:44.000000000 -0800 +@@ -461,6 +461,20 @@ + mpfr_clear (x); + } + ++/* bug found by Stathis, only occurs on 32-bit machines */ ++static void ++test20100709 (void) ++{ ++ mpfr_t x; ++ int inex; ++ ++ mpfr_init2 (x, 100); ++ mpfr_set_str (x, "-4.6308260837372266e+07", 10, MPFR_RNDN); ++ inex = mpfr_gamma (x, x, MPFR_RNDN); ++ MPFR_ASSERTN(MPFR_IS_ZERO(x) && MPFR_IS_NEG(x) && inex > 0); ++ mpfr_clear (x); ++} ++ + int + main (int argc, char *argv[]) + { +@@ -471,6 +485,7 @@ + test_generic (2, 100, 2); + gamma_integer (); + test20071231 (); ++ test20100709 (); + + data_check ("data/gamma", mpfr_gamma, "mpfr_gamma"); + +diff -Naur mpfr-3.0.0-old/tests/tout_str.c mpfr-3.0.0-new/tests/tout_str.c +--- mpfr-3.0.0-old/tests/tout_str.c 2010-06-10 04:00:13.000000000 -0700 ++++ mpfr-3.0.0-new/tests/tout_str.c 2010-11-10 16:53:44.000000000 -0800 +@@ -46,22 +46,54 @@ + special (void) + { + mpfr_t x; ++ unsigned int n; + + mpfr_init (x); + + mpfr_set_nan (x); +- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); ++ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); ++ if (n != 5) ++ { ++ printf ("Error: mpfr_out_str (file, 10, 0, NaN, MPFR_RNDN) wrote %u " ++ "characters instead of 5.\n", n); ++ exit (1); ++ } + + mpfr_set_inf (x, 1); +- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); ++ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); ++ if (n != 5) ++ { ++ printf ("Error: mpfr_out_str (file, 10, 0, +Inf, MPFR_RNDN) wrote %u " ++ "characters instead of 5.\n", n); ++ exit (1); ++ } + + mpfr_set_inf (x, -1); +- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); ++ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); ++ if (n != 6) ++ { ++ printf ("Error: mpfr_out_str (file, 10, 0, -Inf, MPFR_RNDN) wrote %u " ++ "characters instead of 6.\n", n); ++ exit (1); ++ } + + mpfr_set_ui (x, 0, MPFR_RNDN); +- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); ++ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); ++ if (n != 1) ++ { ++ printf ("Error: mpfr_out_str (file, 10, 0, +0, MPFR_RNDN) wrote %u " ++ "characters instead of 1.\n", n); ++ exit (1); ++ } ++ + mpfr_neg (x, x, MPFR_RNDN); +- mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); ++ n = mpfr_out_str (fout, 10, 0, x, MPFR_RNDN); ++ if (n != 2) ++ { ++ printf ("Error: mpfr_out_str (file, 10, 0, -0, MPFR_RNDN) wrote %u " ++ "characters instead of 2.\n", n); ++ exit (1); ++ } + + mpfr_clear (x); + } +diff -Naur mpfr-3.0.0-old/tests/tset_ld.c mpfr-3.0.0-new/tests/tset_ld.c +--- mpfr-3.0.0-old/tests/tset_ld.c 2010-06-10 04:00:13.000000000 -0700 ++++ mpfr-3.0.0-new/tests/tset_ld.c 2010-11-10 16:53:44.000000000 -0800 +@@ -147,12 +147,39 @@ + test_fixed_bugs (void) + { + mpfr_t x; +- long double d; ++ long double l, m; + + /* bug found by Steve Kargl (2009-03-14) */ + mpfr_init2 (x, 64); + mpfr_set_ui_2exp (x, 1, -16447, MPFR_RNDN); +- d = mpfr_get_ld (x, MPFR_RNDN); /* an assertion failed in init2.c:50 */ ++ mpfr_get_ld (x, MPFR_RNDN); /* an assertion failed in init2.c:50 */ ++ ++ /* bug reported by Jakub Jelinek (2010-10-17) ++ https://gforge.inria.fr/tracker/?func=detail&aid=11300 */ ++ mpfr_set_prec (x, MPFR_LDBL_MANT_DIG); ++ /* l = 0x1.23456789abcdef0123456789abcdp-914L; */ ++ l = 8.215640181713713164092636634579e-276; ++ mpfr_set_ld (x, l, MPFR_RNDN); ++ m = mpfr_get_ld (x, MPFR_RNDN); ++ if (m != l) ++ { ++ printf ("Error in get_ld o set_ld for l=%Le\n", l); ++ printf ("Got m=%Le instead of l\n", m); ++ exit (1); ++ } ++ ++ /* another similar test which failed with extended double precision and the ++ generic code for mpfr_set_ld */ ++ /* l = 0x1.23456789abcdef0123456789abcdp-968L; */ ++ l = 4.560596445887084662336528403703e-292; ++ mpfr_set_ld (x, l, MPFR_RNDN); ++ m = mpfr_get_ld (x, MPFR_RNDN); ++ if (m != l) ++ { ++ printf ("Error in get_ld o set_ld for l=%Le\n", l); ++ printf ("Got m=%Le instead of l\n", m); ++ exit (1); ++ } + + mpfr_clear (x); + } +diff -Naur mpfr-3.0.0-old/tests/tsub.c mpfr-3.0.0-new/tests/tsub.c +--- mpfr-3.0.0-old/tests/tsub.c 2010-06-10 04:00:13.000000000 -0700 ++++ mpfr-3.0.0-new/tests/tsub.c 2010-11-10 16:53:44.000000000 -0800 +@@ -201,6 +201,8 @@ + if (mpfr_cmp (z, x)) + { + printf ("Error in mpfr_sub (2)\n"); ++ printf ("Expected "); mpfr_print_binary (x); puts (""); ++ printf ("Got "); mpfr_print_binary (z); puts (""); + exit (1); + } + mpfr_set_str_binary (x, "1.1110111011110001110111011111111111101000011001011100101100101101"); +@@ -478,6 +480,156 @@ + mpfr_clear (u); + } + ++/* Bug found by Jakub Jelinek ++ * http://bugzilla.redhat.com/643657 ++ * https://gforge.inria.fr/tracker/index.php?func=detail&aid=11301 ++ * The consequence can be either an assertion failure (i = 2 in the ++ * testcase below, in debug mode) or an incorrectly rounded value. ++ */ ++static void ++bug20101017 (void) ++{ ++ mpfr_t a, b, c; ++ int inex; ++ int i; ++ ++ mpfr_init2 (a, GMP_NUMB_BITS * 2); ++ mpfr_init2 (b, GMP_NUMB_BITS); ++ mpfr_init2 (c, GMP_NUMB_BITS); ++ ++ /* a = 2^(2N) + k.2^(2N-1) + 2^N and b = 1 ++ with N = GMP_NUMB_BITS and k = 0 or 1. ++ c = a - b should round to the same value as a. */ ++ ++ for (i = 2; i <= 3; i++) ++ { ++ mpfr_set_ui_2exp (a, i, GMP_NUMB_BITS - 1, MPFR_RNDN); ++ mpfr_add_ui (a, a, 1, MPFR_RNDN); ++ mpfr_mul_2ui (a, a, GMP_NUMB_BITS, MPFR_RNDN); ++ mpfr_set_ui (b, 1, MPFR_RNDN); ++ inex = mpfr_sub (c, a, b, MPFR_RNDN); ++ mpfr_set (b, a, MPFR_RNDN); ++ if (! mpfr_equal_p (c, b)) ++ { ++ printf ("Error in bug20101017 for i = %d.\n", i); ++ printf ("Expected "); ++ mpfr_out_str (stdout, 16, 0, b, MPFR_RNDN); ++ putchar ('\n'); ++ printf ("Got "); ++ mpfr_out_str (stdout, 16, 0, c, MPFR_RNDN); ++ putchar ('\n'); ++ exit (1); ++ } ++ if (inex >= 0) ++ { ++ printf ("Error in bug20101017 for i = %d: bad inex value.\n", i); ++ printf ("Expected negative, got %d.\n", inex); ++ exit (1); ++ } ++ } ++ ++ mpfr_set_prec (a, 64); ++ mpfr_set_prec (b, 129); ++ mpfr_set_prec (c, 2); ++ mpfr_set_str_binary (b, "0.100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001E65"); ++ mpfr_set_str_binary (c, "0.10E1"); ++ inex = mpfr_sub (a, b, c, MPFR_RNDN); ++ if (mpfr_cmp_ui_2exp (a, 1, 64) != 0 || inex >= 0) ++ { ++ printf ("Error in mpfr_sub for b-c for b=2^64+1+2^(-64), c=1\n"); ++ printf ("Expected result 2^64 with inex < 0\n"); ++ printf ("Got "); mpfr_print_binary (a); ++ printf (" with inex=%d\n", inex); ++ exit (1); ++ } ++ ++ mpfr_clears (a, b, c, (mpfr_ptr) 0); ++} ++ ++/* hard test of rounding */ ++static void ++check_rounding (void) ++{ ++ mpfr_t a, b, c, res; ++ mpfr_prec_t p; ++ long k, l; ++ int i; ++ ++#define MAXKL (2 * GMP_NUMB_BITS) ++ for (p = MPFR_PREC_MIN; p <= GMP_NUMB_BITS; p++) ++ { ++ mpfr_init2 (a, p); ++ mpfr_init2 (res, p); ++ mpfr_init2 (b, p + 1 + MAXKL); ++ mpfr_init2 (c, MPFR_PREC_MIN); ++ ++ /* b = 2^p + 1 + 2^(-k), c = 2^(-l) */ ++ for (k = 0; k <= MAXKL; k++) ++ for (l = 0; l <= MAXKL; l++) ++ { ++ mpfr_set_ui_2exp (b, 1, p, MPFR_RNDN); ++ mpfr_add_ui (b, b, 1, MPFR_RNDN); ++ mpfr_mul_2ui (b, b, k, MPFR_RNDN); ++ mpfr_add_ui (b, b, 1, MPFR_RNDN); ++ mpfr_div_2ui (b, b, k, MPFR_RNDN); ++ mpfr_set_ui_2exp (c, 1, -l, MPFR_RNDN); ++ i = mpfr_sub (a, b, c, MPFR_RNDN); ++ /* b - c = 2^p + 1 + 2^(-k) - 2^(-l), should be rounded to ++ 2^p for l <= k, and 2^p+2 for l < k */ ++ if (l <= k) ++ { ++ if (mpfr_cmp_ui_2exp (a, 1, p) != 0) ++ { ++ printf ("Wrong result in check_rounding\n"); ++ printf ("p=%lu k=%ld l=%ld\n", p, k, l); ++ printf ("b="); mpfr_print_binary (b); puts (""); ++ printf ("c="); mpfr_print_binary (c); puts (""); ++ printf ("Expected 2^%lu\n", p); ++ printf ("Got "); mpfr_print_binary (a); puts (""); ++ exit (1); ++ } ++ if (i >= 0) ++ { ++ printf ("Wrong ternary value in check_rounding\n"); ++ printf ("p=%lu k=%ld l=%ld\n", p, k, l); ++ printf ("b="); mpfr_print_binary (b); puts (""); ++ printf ("c="); mpfr_print_binary (c); puts (""); ++ printf ("a="); mpfr_print_binary (a); puts (""); ++ printf ("Expected < 0, got %d\n", i); ++ exit (1); ++ } ++ } ++ else /* l < k */ ++ { ++ mpfr_set_ui_2exp (res, 1, p, MPFR_RNDN); ++ mpfr_add_ui (res, res, 2, MPFR_RNDN); ++ if (mpfr_cmp (a, res) != 0) ++ { ++ printf ("Wrong result in check_rounding\n"); ++ printf ("b="); mpfr_print_binary (b); puts (""); ++ printf ("c="); mpfr_print_binary (c); puts (""); ++ printf ("Expected "); mpfr_print_binary (res); puts (""); ++ printf ("Got "); mpfr_print_binary (a); puts (""); ++ exit (1); ++ } ++ if (i <= 0) ++ { ++ printf ("Wrong ternary value in check_rounding\n"); ++ printf ("b="); mpfr_print_binary (b); puts (""); ++ printf ("c="); mpfr_print_binary (c); puts (""); ++ printf ("Expected > 0, got %d\n", i); ++ exit (1); ++ } ++ } ++ } ++ ++ mpfr_clear (a); ++ mpfr_clear (res); ++ mpfr_clear (b); ++ mpfr_clear (c); ++ } ++} ++ + #define TEST_FUNCTION test_sub + #define TWO_ARGS + #define RAND_FUNCTION(x) mpfr_random2(x, MPFR_LIMB_SIZE (x), randlimb () % 100, RANDS) +@@ -491,6 +643,8 @@ + + tests_start_mpfr (); + ++ bug20101017 (); ++ check_rounding (); + check_diverse (); + check_inexact (); + bug_ddefour (); +diff -Naur mpfr-3.0.0-old/VERSION mpfr-3.0.0-new/VERSION +--- mpfr-3.0.0-old/VERSION 2010-06-10 04:00:14.000000000 -0700 ++++ mpfr-3.0.0-new/VERSION 2010-11-10 16:53:44.000000000 -0800 +@@ -1 +1 @@ +-3.0.0 ++3.0.0-p8 +diff -Naur mpfr-3.0.0-old/version.c mpfr-3.0.0-new/version.c +--- mpfr-3.0.0-old/version.c 2010-06-10 04:00:14.000000000 -0700 ++++ mpfr-3.0.0-new/version.c 2010-11-10 16:53:44.000000000 -0800 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "3.0.0"; ++ return "3.0.0-p8"; + } diff --git a/packages/toolchain/math/ppl/build b/packages/toolchain/math/ppl/build index 15fc83add8..344ea91765 100755 --- a/packages/toolchain/math/ppl/build +++ b/packages/toolchain/math/ppl/build @@ -2,15 +2,11 @@ . config/options $1 -$SCRIPTS/install ccache -$SCRIPTS/build gmp - setup_toolchain host cd $BUILD/$1* -mkdir -p objdir -cd objdir +mkdir -p objdir && cd objdir ../configure --host=$HOST_NAME \ --build=$HOST_NAME \ diff --git a/packages/toolchain/math/ppl/meta b/packages/toolchain/math/ppl/meta new file mode 100644 index 0000000000..13b1e87a3a --- /dev/null +++ b/packages/toolchain/math/ppl/meta @@ -0,0 +1,16 @@ +PKG_NAME="ppl" +PKG_VERSION="0.11" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.cs.unipr.it/ppl" +PKG_URL="http://www.cs.unipr.it/ppl/Download/ftp/releases/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="ccache gmp" +PKG_PRIORITY="optional" +PKG_SECTION="toolchain/math" +PKG_SHORTDESC="ppl: Parma Polyhedra Library" +PKG_LONGDESC="The Parma Polyhedra Library (PPL) provides numerical abstractions especially targeted at applications in the field of analysis and verification of complex systems." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/toolchain/math/ppl/url b/packages/toolchain/math/ppl/url deleted file mode 100644 index 31fc4fae56..0000000000 --- a/packages/toolchain/math/ppl/url +++ /dev/null @@ -1 +0,0 @@ -http://www.cs.unipr.it/ppl/Download/ftp/releases/0.11/ppl-0.11.tar.bz2 diff --git a/packages/toolchain/meta b/packages/toolchain/meta new file mode 100644 index 0000000000..3849140aee --- /dev/null +++ b/packages/toolchain/meta @@ -0,0 +1,16 @@ +PKG_NAME="toolchain" +PKG_VERSION="" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.openelec.tv" +PKG_URL="" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="make sed pkg-config automake autoconf intltool gcc-final cmake jam yasm" +PKG_PRIORITY="optional" +PKG_SECTION="toolchain/devel" +PKG_SHORTDESC="toolchain: OpenELEC.tv' toolchain" +PKG_LONGDESC="a crosscompiling toolchain to compile all packages" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/toolchain/sed/install b/packages/toolchain/sed/install deleted file mode 100755 index 0d16970743..0000000000 --- a/packages/toolchain/sed/install +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -. config/options $1 - -make -C $PKG_BUILD/$1 install diff --git a/packages/toolchain/sed/unpack b/packages/toolchain/sed/unpack deleted file mode 100755 index 057c199c26..0000000000 --- a/packages/toolchain/sed/unpack +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -. config/options $1 - -$SCRIPTS/fixconfigtools $PKG_BUILD/config - diff --git a/packages/toolchain/sed/url b/packages/toolchain/sed/url deleted file mode 100644 index f6126cf7db..0000000000 --- a/packages/toolchain/sed/url +++ /dev/null @@ -1 +0,0 @@ -http://ftp.gnu.org/gnu/sed/sed-4.2.1.tar.bz2 \ No newline at end of file diff --git a/packages/toolchain/sed/build b/packages/toolchain/sysutils/sed/build similarity index 89% rename from packages/toolchain/sed/build rename to packages/toolchain/sysutils/sed/build index ced5964f48..243f0a72a3 100755 --- a/packages/toolchain/sed/build +++ b/packages/toolchain/sysutils/sed/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/install ccache - setup_toolchain host cd $PKG_BUILD @@ -12,3 +10,4 @@ cd $PKG_BUILD --prefix=$ROOT/$TOOLCHAIN \ --disable-nls make +make -C sed install diff --git a/packages/toolchain/sysutils/sed/meta b/packages/toolchain/sysutils/sed/meta new file mode 100644 index 0000000000..72c308413e --- /dev/null +++ b/packages/toolchain/sysutils/sed/meta @@ -0,0 +1,16 @@ +PKG_NAME="sed" +PKG_VERSION="4.2.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="ftp://ftp.gnu.org/pub/gnu/sed/" +PKG_URL="http://ftp.gnu.org/gnu/sed/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="ccache" +PKG_PRIORITY="optional" +PKG_SECTION="toolchain/sysutils" +PKG_SHORTDESC="sed: This is the GNU implementation of the POSIX stream editor" +PKG_LONGDESC="The sed (Stream EDitor) editor is a stream or batch (non-interactive) editor. Sed takes text as input, performs an operation or set of operations on the text and outputs the modified text. The operations that sed performs (substitutions, deletions, insertions, etc.) can be specified in a script file or from the command line." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/toolchain/sysutils/squashfs/build b/packages/toolchain/sysutils/squashfs/build index b8fb58b5ee..b7f21583ec 100755 --- a/packages/toolchain/sysutils/squashfs/build +++ b/packages/toolchain/sysutils/squashfs/build @@ -2,7 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain $SCRIPTS/unpack lzma LZMA_DIR=`ls -d $ROOT/$BUILD/lzma*` diff --git a/packages/toolchain/sysutils/squashfs/install b/packages/toolchain/sysutils/squashfs/install deleted file mode 100755 index 40df218cf0..0000000000 --- a/packages/toolchain/sysutils/squashfs/install +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -. config/options $1 - -mkdir -p $ROOT/$TOOLCHAIN/bin - cp -rf $BUILD/$1*/squashfs-tools/mksquashfs $ROOT/$TOOLCHAIN/bin diff --git a/packages/toolchain/sysutils/squashfs/meta b/packages/toolchain/sysutils/squashfs/meta new file mode 100644 index 0000000000..9dfaeda153 --- /dev/null +++ b/packages/toolchain/sysutils/squashfs/meta @@ -0,0 +1,16 @@ +PKG_NAME="squashfs" +PKG_VERSION="4.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://squashfs.sourceforge.net/" +PKG_URL="http://downloads.sourceforge.net/project/squashfs/squashfs/${PKG_NAME}${PKG_VERSION}/${PKG_NAME}${PKG_VERSION}.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="ccache" +PKG_PRIORITY="optional" +PKG_SECTION="toolchain/sysutils" +PKG_SHORTDESC="squashfs-tools: A compressed read-only filesystem for Linux" +PKG_LONGDESC="Squashfs is intended to be a general read-only filesystem, for archival use (i.e. in cases where a .tar.gz file may be used), and in constrained block device/memory systems (e.g. embedded systems) where low overhead is needed. The filesystem is currently stable and has been tested on PowerPC, i386, SPARC and ARM architectures." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/toolchain/sysutils/squashfs/patches/squashfs-4.1-defaults-0.1.diff b/packages/toolchain/sysutils/squashfs/patches/squashfs-4.1-defaults-0.1.patch similarity index 100% rename from packages/toolchain/sysutils/squashfs/patches/squashfs-4.1-defaults-0.1.diff rename to packages/toolchain/sysutils/squashfs/patches/squashfs-4.1-defaults-0.1.patch diff --git a/packages/toolchain/sysutils/squashfs/url b/packages/toolchain/sysutils/squashfs/url deleted file mode 100644 index 0a1e085f9c..0000000000 --- a/packages/toolchain/sysutils/squashfs/url +++ /dev/null @@ -1 +0,0 @@ -http://downloads.sourceforge.net/project/squashfs/squashfs/squashfs4.1/squashfs4.1.tar.gz \ No newline at end of file diff --git a/packages/tools/autoupdate/config/update.conf b/packages/tools/autoupdate/config/update.conf index e6b47b08a3..15193243a4 100644 --- a/packages/tools/autoupdate/config/update.conf +++ b/packages/tools/autoupdate/config/update.conf @@ -1,15 +1,29 @@ -# Setup autoupdate ( no / manually / auto ) -# -# no: no popup-information about new updates, no automatically download, -# no autoupdate. -# -# manually: shows popupinformation about updates, you must manually download the -# and extract the update package. Copy the files "SYSTEM" and "KERNEL" -# locally or per SSH/SCP to /storage/.update or via SMB to the -# "Update" share. Then reboot the system to install the update. -# -# auto: shows popupinformation about updates, the autoupdater downloads the -# update package and shows an information that the system must -# manually rebooted to install the update. +# update.conf + +# This configuration file allows you to setup the update feature of +# openelec + +# The update features retain all custom settings and files from both +# the openelec base system and xbmc + +# Options are "no" / "manually" / "auto" ) + +# no: -Disable updates +# -No pop-up information about available updates +# -No automatic downloadling + +# manually: Manual updates +# -Shows pop-up information about available updates +# -No automatic downloading +# -To update: Download the required openelec version, extract +# and copy the two files "SYSTEM" and "KERNEL" to the "Update" +# share (or /storage/.update) +# Reboot the system and the update will install automatically + +# auto: Automatic updates +# -Shows pop-up information about available updates +# -New updates will be automatically downloaded +# -The system will notify you that a reboot is all that's +# required to complete the upgrade AUTOUPDATE=manually \ No newline at end of file diff --git a/packages/tools/autoupdate/meta b/packages/tools/autoupdate/meta index ee38fd24dd..f81e498ceb 100644 --- a/packages/tools/autoupdate/meta +++ b/packages/tools/autoupdate/meta @@ -12,3 +12,5 @@ PKG_SECTION="tools" PKG_SHORTDESC="autoupdate: an simple automatic update script" PKG_LONGDESC="autoupdate: an simple automatic update script." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/tools/bc/meta b/packages/tools/bc/meta index a90ed344c8..8c5cf03e9e 100644 --- a/packages/tools/bc/meta +++ b/packages/tools/bc/meta @@ -12,3 +12,5 @@ PKG_SECTION="tools" PKG_SHORTDESC="bc: GNU's numeric processing language and a calculator" PKG_LONGDESC="Bc is an arbitrary precision numeric processing language. Syntax is similar to C, but differs in many substantial areas. It supports interactive execution of statements. Bc is a utility included in the POSIX P1003.2/D11 draft standard. Since the POSIX document does not specify how bc must be implemented, this version does not use the historical method of having bc be a compiler for the dc calculator. This version has a single executable that both compiles the language and runs the resulting 'byte code'. The byte code is not the dc language." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/tools/dialog/build b/packages/tools/dialog/build index 36860f5c7e..4918c7a383 100755 --- a/packages/tools/dialog/build +++ b/packages/tools/dialog/build @@ -2,11 +2,11 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build ncurses - cd $PKG_BUILD +# dialog fails to build with GOLD linker + strip_gold + ac_cv_path_NCURSES_CONFIG="$ROOT/$TOOLCHAIN/bin/ncurses-config" \ ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/tools/dialog/install b/packages/tools/dialog/install index 1663879f1b..7096d78a6a 100755 --- a/packages/tools/dialog/install +++ b/packages/tools/dialog/install @@ -2,7 +2,5 @@ . config/options $1 -$SCRIPTS/install ncurses - mkdir -p $INSTALL/usr/bin cp $PKG_BUILD/dialog $INSTALL/usr/bin diff --git a/packages/tools/dialog/meta b/packages/tools/dialog/meta new file mode 100644 index 0000000000..7b8aab144c --- /dev/null +++ b/packages/tools/dialog/meta @@ -0,0 +1,16 @@ +PKG_NAME="dialog" +PKG_VERSION="1.1-20100428" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://invisible-island.net/dialog/" +PKG_URL="ftp://invisible-island.net/dialog/$PKG_NAME-$PKG_VERSION.tgz" +PKG_DEPENDS="ncurses" +PKG_BUILD_DEPENDS="toolchain ncurses" +PKG_PRIORITY="optional" +PKG_SECTION="tools" +PKG_SHORTDESC="dialog: A utility for creating TTY dialog boxes" +PKG_LONGDESC="Dialog is a utility that allows you to show dialog boxes (containing questions or messages) in TTY (text mode) interfaces from shell scripts. Dialog is initally written by Savio Lam and various branches do exist (e.g. lxdialog which is used for a linux kernel make menuconfig). This is the branch maintained by Thomas Dickey." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/tools/dialog/url b/packages/tools/dialog/url deleted file mode 100644 index 580adcdd76..0000000000 --- a/packages/tools/dialog/url +++ /dev/null @@ -1 +0,0 @@ -ftp://invisible-island.net/dialog/dialog-1.1-20100428.tgz diff --git a/packages/tools/e2fsprogs/build b/packages/tools/e2fsprogs/build index 184bd2df66..c9e45fb328 100755 --- a/packages/tools/e2fsprogs/build +++ b/packages/tools/e2fsprogs/build @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build util-linux-ng - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ @@ -26,8 +23,8 @@ cd $PKG_BUILD --disable-libblkid \ --disable-debugfs \ --disable-imager \ - --disable-resizer \ - --disable-fsck \ + --enable-resizer \ + --enable-fsck \ --disable-e2initrd-helper \ --enable-tls \ --disable-uuidd \ diff --git a/packages/tools/e2fsprogs/install b/packages/tools/e2fsprogs/install index c8ad902821..cee6bbcbb5 100755 --- a/packages/tools/e2fsprogs/install +++ b/packages/tools/e2fsprogs/install @@ -2,15 +2,24 @@ . config/options $1 -$SCRIPTS/install util-linux-ng - mkdir -p $INSTALL/etc cp $PKG_BUILD/misc/mke2fs.conf $INSTALL/etc mkdir -p $INSTALL/usr/sbin - cp $PKG_BUILD/misc/mke2fs $INSTALL/usr/sbin - cp $PKG_BUILD/misc/tune2fs $INSTALL/usr/sbin cp $PKG_BUILD/e2fsck/e2fsck $INSTALL/usr/sbin + cp $PKG_BUILD/misc/fsck $INSTALL/usr/sbin + ln -sf fsck $INSTALL/usr/sbin/fsck.ext2 + ln -sf fsck $INSTALL/usr/sbin/fsck.ext3 + ln -sf fsck $INSTALL/usr/sbin/fsck.ext4 + ln -sf fsck $INSTALL/usr/sbin/fsck.ext4dev + cp $PKG_BUILD/misc/mke2fs $INSTALL/usr/sbin + ln -sf mke2fs $INSTALL/usr/sbin/mkfs.ext2 + ln -sf mke2fs $INSTALL/usr/sbin/mkfs.ext3 + ln -sf mke2fs $INSTALL/usr/sbin/mkfs.ext4 + ln -sf mke2fs $INSTALL/usr/sbin/mkfs.ext4dev + cp $PKG_BUILD/resize/resize2fs $INSTALL/usr/sbin + cp $PKG_BUILD/misc/tune2fs $INSTALL/usr/sbin + mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/lib/*.so.[0-9] $INSTALL/usr/lib diff --git a/packages/tools/e2fsprogs/meta b/packages/tools/e2fsprogs/meta new file mode 100644 index 0000000000..6dc574cb64 --- /dev/null +++ b/packages/tools/e2fsprogs/meta @@ -0,0 +1,16 @@ +PKG_NAME="e2fsprogs" +PKG_VERSION="1.41.12" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://e2fsprogs.sourceforge.net/" +PKG_URL="http://downloads.sourceforge.net/project/$PKG_NAME/$PKG_NAME/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="util-linux-ng" +PKG_BUILD_DEPENDS="toolchain util-linux-ng" +PKG_PRIORITY="optional" +PKG_SECTION="tools" +PKG_SHORTDESC="e2fsprogs: Utilities for use with the ext2 filesystem" +PKG_LONGDESC="The filesystem utilities for the EXT2 filesystem, including e2fsck, mke2fs, dumpe2fs, fsck, and others." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/tools/e2fsprogs/url b/packages/tools/e2fsprogs/url deleted file mode 100644 index edcf5deeab..0000000000 --- a/packages/tools/e2fsprogs/url +++ /dev/null @@ -1 +0,0 @@ -http://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/1.41.12/e2fsprogs-1.41.12.tar.gz \ No newline at end of file diff --git a/packages/tools/flashrom/meta b/packages/tools/flashrom/meta index 20899a8f79..0bcb05e2ed 100644 --- a/packages/tools/flashrom/meta +++ b/packages/tools/flashrom/meta @@ -12,3 +12,5 @@ PKG_SECTION="tools" PKG_SHORTDESC="flashrom: linux BIOS programmer" PKG_LONGDESC="flashrom is a utility for identifying, reading, writing, verifying and erasing flash chips. It is designed to flash BIOS/EFI/coreboot/firmware/optionROM images on mainboards, network/graphics/storage controller cards, and various programmer devices." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/tools/flashrom/patches/Add-Nvidia-nForce-MCP6x-MCP7x-series-SPI-flashing-support.diff b/packages/tools/flashrom/patches/flashrom-1061-Add_Nvidia_nForce_MCP6x_MCP7x_series_SPI_flashing_support.patch similarity index 100% rename from packages/tools/flashrom/patches/Add-Nvidia-nForce-MCP6x-MCP7x-series-SPI-flashing-support.diff rename to packages/tools/flashrom/patches/flashrom-1061-Add_Nvidia_nForce_MCP6x_MCP7x_series_SPI_flashing_support.patch diff --git a/packages/tools/hdparm/build b/packages/tools/hdparm/build index bf0ba7aaec..6d40e8db36 100755 --- a/packages/tools/hdparm/build +++ b/packages/tools/hdparm/build @@ -2,9 +2,7 @@ . config/options $1 -$SCRIPTS/build toolchain +LDFLAGS="$CFLAGS $LDFLAGS -fwhole-program" cd $PKG_BUILD -make binprefix="/usr" \ - sbindir="/sbin" \ - LDFLAGS="$LDFLAGS -s" \ No newline at end of file + make binprefix="/usr" sbindir="/sbin" diff --git a/packages/tools/hdparm/meta b/packages/tools/hdparm/meta new file mode 100644 index 0000000000..c34e8180a7 --- /dev/null +++ b/packages/tools/hdparm/meta @@ -0,0 +1,16 @@ +PKG_NAME="hdparm" +PKG_VERSION="9.36" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="BSD" +PKG_SITE="http://sourceforge.net/projects/hdparm/" +PKG_URL="http://downloads.sourceforge.net/project/$PKG_NAME/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="tools" +PKG_SHORTDESC="hdparm: Get/set hard disk parameters" +PKG_LONGDESC="Shell utility to access/tune ioctl features of the Linux IDE driver and IDE drives." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/tools/hdparm/url b/packages/tools/hdparm/url deleted file mode 100644 index a423def420..0000000000 --- a/packages/tools/hdparm/url +++ /dev/null @@ -1 +0,0 @@ -http://downloads.sourceforge.net/project/hdparm/hdparm/hdparm-9.35.tar.gz \ No newline at end of file diff --git a/packages/tools/installer/config/installer.conf b/packages/tools/installer/config/installer.conf index 0522b7bd6d..14ce42403d 100644 --- a/packages/tools/installer/config/installer.conf +++ b/packages/tools/installer/config/installer.conf @@ -3,7 +3,7 @@ DISKLABEL_STORAGE="Storage" # Defaultsize of system partition (Cylinder: 16=132MB, 31=255MB) - PARTSIZE_SYSTEM="16" + PARTSIZE_SYSTEM="23" # additional parameters to extlinux EXTLINUX_PARAMETERS="" diff --git a/packages/tools/installer/meta b/packages/tools/installer/meta new file mode 100644 index 0000000000..f8be4cb96a --- /dev/null +++ b/packages/tools/installer/meta @@ -0,0 +1,16 @@ +PKG_NAME="installer" +PKG_VERSION="" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.openelec.tv/" +PKG_URL="" +PKG_DEPENDS="busybox bash dialog parted e2fsprogs syslinux flashrom" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="tools" +PKG_SHORTDESC="installer: OpenELEC.tv Install manager" +PKG_LONGDESC="OpenELEC.tv Install manager to install the system on any disk" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/tools/syslinux/arch b/packages/tools/syslinux/arch deleted file mode 100644 index 7414689203..0000000000 --- a/packages/tools/syslinux/arch +++ /dev/null @@ -1,2 +0,0 @@ -i386 -x86_64 diff --git a/packages/tools/syslinux/meta b/packages/tools/syslinux/meta index cb4e4619c4..3f66037aa1 100644 --- a/packages/tools/syslinux/meta +++ b/packages/tools/syslinux/meta @@ -12,3 +12,5 @@ PKG_SECTION="tools" PKG_SHORTDESC="syslinux: Linux bootloader collection" PKG_LONGDESC="The SYSLINUX project covers lightweight linux bootloaders for floppy media (syslinux), network booting (pxelinux) and bootable el-torito cd-roms (isolinux)." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/web/curl/install b/packages/web/curl/install index 5881c18b2b..e38ac1b0e4 100755 --- a/packages/web/curl/install +++ b/packages/web/curl/install @@ -2,5 +2,8 @@ . config/options $1 +mkdir -p $INSTALL/usr/bin + cp $PKG_BUILD/src/.libs/curl $INSTALL/usr/bin + mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/lib/.libs/libcurl.so* $INSTALL/usr/lib diff --git a/packages/web/curl/meta b/packages/web/curl/meta index d740de3862..cf29701aef 100644 --- a/packages/web/curl/meta +++ b/packages/web/curl/meta @@ -4,7 +4,7 @@ PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="MIT" PKG_SITE="http://curl.haxx.se" -PKG_URL=" http://curl.haxx.se/download/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_URL="http://curl.haxx.se/download/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="zlib openssl rtmpdump" PKG_BUILD_DEPENDS="toolchain zlib openssl rtmpdump" PKG_PRIORITY="optional" @@ -12,3 +12,5 @@ PKG_SECTION="web" PKG_SHORTDESC="curl: Client and library for (HTTP, HTTPS, FTP, ...) transfers" PKG_LONGDESC="Curl is a client to get documents/files from or send documents to a server, using any of the supported protocols (HTTP, HTTPS, FTP, FTPS, GOPHER, DICT, TELNET, LDAP or FILE). The command is designed to work without user interaction or any kind of interactivity." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/web/curl/patches/0108-curl-7.20.1-threaded-dns-multi.diff b/packages/web/curl/patches/curl-7.21.2-0108-threaded_dns_multi.patch similarity index 100% rename from packages/web/curl/patches/0108-curl-7.20.1-threaded-dns-multi.diff rename to packages/web/curl/patches/curl-7.21.2-0108-threaded_dns_multi.patch diff --git a/packages/web/libmicrohttpd/build b/packages/web/libmicrohttpd/build index 826d8d1b09..b71d5fc58a 100755 --- a/packages/web/libmicrohttpd/build +++ b/packages/web/libmicrohttpd/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/web/libmicrohttpd/install b/packages/web/libmicrohttpd/install index 7cc66a3bd8..413abff2c8 100755 --- a/packages/web/libmicrohttpd/install +++ b/packages/web/libmicrohttpd/install @@ -3,5 +3,5 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/src/daemon/.libs/*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/src/daemon/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/web/libmicrohttpd/meta b/packages/web/libmicrohttpd/meta new file mode 100644 index 0000000000..fedac78c27 --- /dev/null +++ b/packages/web/libmicrohttpd/meta @@ -0,0 +1,16 @@ +PKG_NAME="libmicrohttpd" +PKG_VERSION="0.4.6" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.gnu.org/software/libmicrohttpd/" +PKG_URL="ftp://sunsite.cnlab-switch.ch/mirror/gnu/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="web" +PKG_SHORTDESC="libmicrohttpd: a small webserver C library" +PKG_LONGDESC="GNU libmicrohttpd is a small C library that is supposed to make it easy to run an HTTP server as part of another application." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/web/libmicrohttpd/url b/packages/web/libmicrohttpd/url deleted file mode 100644 index 1502e63b3d..0000000000 --- a/packages/web/libmicrohttpd/url +++ /dev/null @@ -1 +0,0 @@ -ftp://sunsite.cnlab-switch.ch/mirror/gnu/libmicrohttpd/libmicrohttpd-0.4.6.tar.gz \ No newline at end of file diff --git a/packages/web/wget/meta b/packages/web/wget/meta index 47b16a75c9..50f761e9ae 100644 --- a/packages/web/wget/meta +++ b/packages/web/wget/meta @@ -12,3 +12,5 @@ PKG_SECTION="web" PKG_SHORTDESC="wget: A non-interactive network retriever" PKG_LONGDESC="GNU Wget is a free network utility to retrieve files from the World Wide Web using HTTP and FTP, the two most widely used Internet protocols. It works non-interactively, thus enabling work in the background, after having logged off. The recursive retrieval of HTML pages, as well as FTP sites is supported -- you can use Wget to make mirrors of archives and home pages, or traverse the web like a WWW robot (Wget understands /robots.txt)." PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/x11/app/xkbcomp/build b/packages/x11/app/xkbcomp/build index 2394f415b5..8f123f6a04 100755 --- a/packages/x11/app/xkbcomp/build +++ b/packages/x11/app/xkbcomp/build @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build libX11 - cd $PKG_BUILD ac_cv_file___xkbparse_c=yes \ diff --git a/packages/x11/app/xkbcomp/install b/packages/x11/app/xkbcomp/install index 0421503101..3314d80b37 100755 --- a/packages/x11/app/xkbcomp/install +++ b/packages/x11/app/xkbcomp/install @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/install libX11 - mkdir -p $INSTALL/usr/bin cp $PKG_BUILD/$1 $INSTALL/usr/bin diff --git a/packages/x11/app/xkbcomp/meta b/packages/x11/app/xkbcomp/meta new file mode 100644 index 0000000000..3976c1540a --- /dev/null +++ b/packages/x11/app/xkbcomp/meta @@ -0,0 +1,16 @@ +PKG_NAME="xkbcomp" +PKG_VERSION="1.2.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/app/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libX11" +PKG_BUILD_DEPENDS="toolchain util-macros libX11" +PKG_PRIORITY="optional" +PKG_SECTION="x11/app" +PKG_SHORTDESC="xkbcomp: Compiles XKB keyboard description" +PKG_LONGDESC="The xkbcomp keymap compiler converts a description of an XKB keymap into one of several output formats." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/app/xkbcomp/url b/packages/x11/app/xkbcomp/url deleted file mode 100644 index c2fc48bcce..0000000000 --- a/packages/x11/app/xkbcomp/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/app/xkbcomp-1.2.0.tar.bz2 \ No newline at end of file diff --git a/packages/x11/app/xrandr/build b/packages/x11/app/xrandr/build index df62558a3f..ce9b997b64 100755 --- a/packages/x11/app/xrandr/build +++ b/packages/x11/app/xrandr/build @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build libXrandr - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/x11/app/xrandr/install b/packages/x11/app/xrandr/install index 2692fc1ef8..7376a20619 100755 --- a/packages/x11/app/xrandr/install +++ b/packages/x11/app/xrandr/install @@ -1,7 +1,6 @@ #!/bin/sh . config/options $1 -$SCRIPTS/install libXrandr mkdir -p $INSTALL/usr/bin cp $PKG_BUILD/$1 $INSTALL/usr/bin diff --git a/packages/x11/app/xrandr/meta b/packages/x11/app/xrandr/meta new file mode 100644 index 0000000000..0c16fc00e7 --- /dev/null +++ b/packages/x11/app/xrandr/meta @@ -0,0 +1,16 @@ +PKG_NAME="xrandr" +PKG_VERSION="1.3.4" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/app/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libXrandr" +PKG_BUILD_DEPENDS="toolchain util-macros libXrandr" +PKG_PRIORITY="optional" +PKG_SECTION="x11/app" +PKG_SHORTDESC="xrandr: A primitive command line interface to RandR extension" +PKG_LONGDESC="Xrandr is a primitive command line interface to the RandR extension and used to set the screen size, orientation and/or reflection." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/app/xrandr/url b/packages/x11/app/xrandr/url deleted file mode 100644 index 2086afb759..0000000000 --- a/packages/x11/app/xrandr/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/app/xrandr-1.3.4.tar.bz2 \ No newline at end of file diff --git a/packages/x11/app/xwd/build b/packages/x11/app/xwd/build index 4aff6c09ee..30f6c85948 100755 --- a/packages/x11/app/xwd/build +++ b/packages/x11/app/xwd/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -11,5 +9,3 @@ cd $PKG_BUILD --sysconfdir=/etc \ make - -$STRIP $1 diff --git a/packages/x11/app/xwd/install b/packages/x11/app/xwd/install index 563ff0dd6c..469b7dee6d 100755 --- a/packages/x11/app/xwd/install +++ b/packages/x11/app/xwd/install @@ -3,5 +3,5 @@ . config/options $1 mkdir -p $INSTALL/usr/bin -cp -PR $PKG_BUILD/$1 $INSTALL/usr/bin -cp -PR $PKG_DIR/scripts/screenshot $INSTALL/usr/bin + cp $PKG_BUILD/$1 $INSTALL/usr/bin + cp $PKG_DIR/scripts/screenshot $INSTALL/usr/bin diff --git a/packages/x11/app/xwd/meta b/packages/x11/app/xwd/meta new file mode 100644 index 0000000000..20cfd8e4ec --- /dev/null +++ b/packages/x11/app/xwd/meta @@ -0,0 +1,16 @@ +PKG_NAME="xwd" +PKG_VERSION="1.0.3" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/app/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/app" +PKG_SHORTDESC="xwd: Dumps an image of an X window" +PKG_LONGDESC="Xwd is an X Window System window dumping utility. Xwd allows X users to store window images in a specially formatted dump file." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/app/xwd/url b/packages/x11/app/xwd/url deleted file mode 100644 index e5cbe6036c..0000000000 --- a/packages/x11/app/xwd/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/app/xwd-1.0.3.tar.bz2 \ No newline at end of file diff --git a/packages/x11/data/xkeyboard-config/build b/packages/x11/data/xkeyboard-config/build index 97400b8449..85a7cd0cdf 100755 --- a/packages/x11/data/xkeyboard-config/build +++ b/packages/x11/data/xkeyboard-config/build @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build xkbcomp - cd $PKG_BUILD XKBCOMP="/usr/bin/xkbcomp" \ ./configure --host=$TARGET_NAME \ @@ -15,8 +12,5 @@ XKBCOMP="/usr/bin/xkbcomp" \ --with-xkb-base=$XORG_PATH_XKB \ --without-xkb-rules-symlink \ -# --with-xkb-rules-symlink=xorg - make - make DESTDIR=`pwd`/.install install diff --git a/packages/x11/data/xkeyboard-config/meta b/packages/x11/data/xkeyboard-config/meta new file mode 100644 index 0000000000..a80818c4ef --- /dev/null +++ b/packages/x11/data/xkeyboard-config/meta @@ -0,0 +1,16 @@ +PKG_NAME="xkeyboard-config" +PKG_VERSION="2.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://people.freedesktop.org/~svu/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros xkbcomp" +PKG_PRIORITY="optional" +PKG_SECTION="x11/data" +PKG_SHORTDESC="xkeyboard-config: X keyboard extension data files" +PKG_LONGDESC="X keyboard extension data files." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/data/xkeyboard-config/url b/packages/x11/data/xkeyboard-config/url deleted file mode 100644 index ef8072ce31..0000000000 --- a/packages/x11/data/xkeyboard-config/url +++ /dev/null @@ -1 +0,0 @@ -http://people.freedesktop.org/~svu/xkeyboard-config-2.0.tar.bz2 \ No newline at end of file diff --git a/packages/x11/driver/xf86-input-evdev/build b/packages/x11/driver/xf86-input-evdev/build index 7e1ce08367..3de33eb99d 100755 --- a/packages/x11/driver/xf86-input-evdev/build +++ b/packages/x11/driver/xf86-input-evdev/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/x11/driver/xf86-input-evdev/meta b/packages/x11/driver/xf86-input-evdev/meta new file mode 100644 index 0000000000..23a03cfcff --- /dev/null +++ b/packages/x11/driver/xf86-input-evdev/meta @@ -0,0 +1,16 @@ +PKG_NAME="xf86-input-evdev" +PKG_VERSION="2.5.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/driver/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/driver" +PKG_SHORTDESC="xf86-input-evdev: Generic Xorg Linux input driver" +PKG_LONGDESC="Evdev is an Xorg input driver for Linux's generic event devices. It therefore supports all input devices that the kernel knows about, including most mice and keyboards." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/driver/xf86-input-evdev/url b/packages/x11/driver/xf86-input-evdev/url deleted file mode 100644 index 2029cb210f..0000000000 --- a/packages/x11/driver/xf86-input-evdev/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/driver/xf86-input-evdev-2.5.0.tar.bz2 \ No newline at end of file diff --git a/packages/x11/driver/xf86-input-synaptics/build b/packages/x11/driver/xf86-input-synaptics/build index 4345772d43..e6935d9fff 100755 --- a/packages/x11/driver/xf86-input-synaptics/build +++ b/packages/x11/driver/xf86-input-synaptics/build @@ -2,12 +2,7 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build libXi - cd $PKG_BUILD - -$AUTORECONF ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ diff --git a/packages/x11/driver/xf86-input-synaptics/install b/packages/x11/driver/xf86-input-synaptics/install index 5b4008c9d9..540d5e65a3 100755 --- a/packages/x11/driver/xf86-input-synaptics/install +++ b/packages/x11/driver/xf86-input-synaptics/install @@ -2,7 +2,5 @@ . config/options $1 -$SCRIPTS/install libXi - mkdir -p $INSTALL/$XORG_PATH_MODULES/input cp -P $PKG_BUILD/src/.libs/synaptics_drv.so $INSTALL/$XORG_PATH_MODULES/input diff --git a/packages/x11/driver/xf86-input-synaptics/meta b/packages/x11/driver/xf86-input-synaptics/meta new file mode 100644 index 0000000000..983c0e8866 --- /dev/null +++ b/packages/x11/driver/xf86-input-synaptics/meta @@ -0,0 +1,16 @@ +PKG_NAME="xf86-input-synaptics" +PKG_VERSION="1.3.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/driver/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libXi" +PKG_BUILD_DEPENDS="toolchain util-macros libXi" +PKG_PRIORITY="optional" +PKG_SECTION="x11/driver" +PKG_SHORTDESC="xf86-input-synaptics: A (alternate) Synaptics touchpad X driver" +PKG_LONGDESC="This package provides an (alternate) Synaptics touchpad driver." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/driver/xf86-input-synaptics/url b/packages/x11/driver/xf86-input-synaptics/url deleted file mode 100644 index 926ad858d8..0000000000 --- a/packages/x11/driver/xf86-input-synaptics/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/driver/xf86-input-synaptics-1.2.99.901.tar.bz2 \ No newline at end of file diff --git a/packages/x11/driver/xf86-input-wacom/build b/packages/x11/driver/xf86-input-wacom/build index 7e1ce08367..3de33eb99d 100755 --- a/packages/x11/driver/xf86-input-wacom/build +++ b/packages/x11/driver/xf86-input-wacom/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/x11/driver/xf86-input-wacom/meta b/packages/x11/driver/xf86-input-wacom/meta new file mode 100644 index 0000000000..774ad4ec98 --- /dev/null +++ b/packages/x11/driver/xf86-input-wacom/meta @@ -0,0 +1,16 @@ +PKG_NAME="xf86-input-wacom" +PKG_VERSION="0.10.8" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OpenSource" +PKG_SITE="http://www.X.org" +PKG_URL="http://freefr.dl.sourceforge.net/project/linuxwacom/xf86-input-wacom/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11" +PKG_SHORTDESC="xf86-input-wacom: The Xorg wacom driver" +PKG_LONGDESC="The Xorg wacomdriver for all sorts of common tablets." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/driver/xf86-input-wacom/url b/packages/x11/driver/xf86-input-wacom/url deleted file mode 100644 index c561b4c2ea..0000000000 --- a/packages/x11/driver/xf86-input-wacom/url +++ /dev/null @@ -1 +0,0 @@ -http://freefr.dl.sourceforge.net/project/linuxwacom/xf86-input-wacom/xf86-input-wacom-0.10.6.tar.bz2 diff --git a/packages/x11/driver/xf86-video-ati/meta b/packages/x11/driver/xf86-video-ati/meta index 0552fdb318..c5248376b7 100644 --- a/packages/x11/driver/xf86-video-ati/meta +++ b/packages/x11/driver/xf86-video-ati/meta @@ -5,10 +5,12 @@ PKG_ARCH="i386 x86_64" PKG_LICENSE="OSS" PKG_SITE="http://www.x.org/" PKG_URL="http://xorg.freedesktop.org/archive/individual/driver/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="libXrandr libXrender libXext libpciaccess $LIBDRM udev" -PKG_BUILD_DEPENDS="toolchain util-macros libXrandr libXrender libXext libpciaccess $LIBDRM udev xorg-server" +PKG_DEPENDS="libXrandr libXrender libXext libpciaccess libdrm udev" +PKG_BUILD_DEPENDS="toolchain util-macros util-macros libXrandr libXrender libXext libpciaccess libdrm udev xorg-server" PKG_PRIORITY="optional" PKG_SECTION="x11/driver" PKG_SHORTDESC="xf86-video-ati: The Xorg driver for ATI video chips" PKG_LONGDESC="The ati driver supports various ATi, know AMD, video chips." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/driver/xf86-video-intel/build b/packages/x11/driver/xf86-video-intel/build index e493baea35..dc9fbe5be0 100755 --- a/packages/x11/driver/xf86-video-intel/build +++ b/packages/x11/driver/xf86-video-intel/build @@ -2,21 +2,12 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build util-macros -$SCRIPTS/build fontsproto -$SCRIPTS/build udev -$SCRIPTS/build xorg-server - xorg_drv_configure_prepend PKG_CONFIG="$PKG_CONFIG --define-variable=sdkdir=$SYSROOT_PREFIX/usr/include/xorg" CFLAGS="$CFLAGS -I$SYSROOT_PREFIX/usr/include/xorg/" cd $PKG_BUILD - -$AUTORECONF - ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ diff --git a/packages/x11/driver/xf86-video-intel/install b/packages/x11/driver/xf86-video-intel/install index 0f9f6f439a..d7bc1fa053 100755 --- a/packages/x11/driver/xf86-video-intel/install +++ b/packages/x11/driver/xf86-video-intel/install @@ -2,7 +2,5 @@ . config/options $1 -$SCRIPTS/install udev - mkdir -p $INSTALL/$XORG_PATH_MODULES/drivers cp -P $PKG_BUILD/src/.libs/intel_drv.so $INSTALL/$XORG_PATH_MODULES/drivers diff --git a/packages/x11/driver/xf86-video-intel/meta b/packages/x11/driver/xf86-video-intel/meta index e8df3e23c9..13007ee2cb 100644 --- a/packages/x11/driver/xf86-video-intel/meta +++ b/packages/x11/driver/xf86-video-intel/meta @@ -6,9 +6,11 @@ PKG_LICENSE="OSS" PKG_SITE="http://intellinuxgraphics.org/" PKG_URL="http://xorg.freedesktop.org/archive/individual/driver/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="udev" -PKG_BUILD_DEPENDS="toolchain util-macros fontsproto udev xorg-server" +PKG_BUILD_DEPENDS="toolchain util-macros util-macros fontsproto udev xorg-server" PKG_PRIORITY="optional" PKG_SECTION="x11/driver" PKG_SHORTDESC="xf86-video-intel: The Xorg driver for Intel video chips" PKG_LONGDESC="The Xorg driver for Intel i810, i815, 830M, 845G, 852GM, 855GM, 865G, 915G, 915GM and 965G video chips." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/driver/xf86-video-nouveau/config/xorg-nouveau.conf b/packages/x11/driver/xf86-video-nouveau/config/xorg-nouveau.conf index 1d7095cdf6..e72d77d690 100644 --- a/packages/x11/driver/xf86-video-nouveau/config/xorg-nouveau.conf +++ b/packages/x11/driver/xf86-video-nouveau/config/xorg-nouveau.conf @@ -1,23 +1,9 @@ -Section "ServerLayout" - Identifier "Layout0" - Screen 0 "Screen0" -EndSection - -Section "Monitor" - Identifier "Monitor0" - VendorName "Unknown" - ModelName "Unknown" - HorizSync 28.0 - 33.0 - VertRefresh 43.0 - 72.0 - Option "DPMS" -EndSection - Section "Device" Identifier "Device0" Driver "nouveau" VendorName "Nouveau" Option "HWCursor" "on" - Option "GLXVBlank" "off" + Option "GLXVBlank" "on" EndSection Section "Extensions" diff --git a/packages/x11/driver/xf86-video-nouveau/meta b/packages/x11/driver/xf86-video-nouveau/meta index e1aef8d755..619e85a946 100644 --- a/packages/x11/driver/xf86-video-nouveau/meta +++ b/packages/x11/driver/xf86-video-nouveau/meta @@ -5,10 +5,12 @@ PKG_ARCH="i386 x86_64" PKG_LICENSE="OSS" PKG_SITE="http://www.x.org/" PKG_URL="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="libXrandr libXrender $LIBDRM libXext libpciaccess udev $MESA" -PKG_BUILD_DEPENDS="toolchain libXrandr libXrender $LIBDRM libXext libpciaccess udev $MESA xorg-server" +PKG_DEPENDS="libXrandr libXrender libdrm libXext libpciaccess udev Mesa" +PKG_BUILD_DEPENDS="toolchain util-macros libXrandr libXrender libdrm libXext libpciaccess udev Mesa xorg-server" PKG_PRIORITY="optional" PKG_SECTION="x11/driver" PKG_SHORTDESC="xf86-video-nouveau: Nouveau display driver (experimental)" PKG_LONGDESC="This driver for the X.Org X server (see xserver-xorg for a further description) provides support for NVIDIA Riva, TNT, GeForce, and Quadro cards. Although the nouveau project aims to provide full 3D support it is not yet complete, and these packages do not include any 3D support. Users requiring 3D support should use the non-free "nvidia" driver." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/driver/xf86-video-nvidia/meta b/packages/x11/driver/xf86-video-nvidia/meta index 4863346a82..a1551f42a5 100644 --- a/packages/x11/driver/xf86-video-nvidia/meta +++ b/packages/x11/driver/xf86-video-nvidia/meta @@ -1,5 +1,5 @@ PKG_NAME="xf86-video-nvidia" -PKG_VERSION="256.53" +PKG_VERSION="260.19.21" PKG_REV="1" PKG_ARCH="i386 x86_64" PKG_LICENSE="nonfree" @@ -7,10 +7,11 @@ PKG_SITE="http://www.nvidia.com/" [ $TARGET_ARCH = i386 ] && PKG_URL="ftp://download.nvidia.com/XFree86/Linux-x86/$PKG_VERSION/NVIDIA-Linux-x86-$PKG_VERSION.run" [ $TARGET_ARCH = x86_64 ] && PKG_URL="ftp://download.nvidia.com/XFree86/Linux-x86_64/$PKG_VERSION/NVIDIA-Linux-x86_64-$PKG_VERSION-no-compat32.run" PKG_DEPENDS="linux libXinerama" -PKG_BUILD_DEPENDS="toolchain linux xorg-server" +PKG_BUILD_DEPENDS="toolchain util-macros linux xorg-server" PKG_PRIORITY="optional" PKG_SECTION="x11/driver" PKG_SHORTDESC="xf86-video-nvidia: The Xorg driver for NVIDIA video chips" PKG_LONGDESC="These binary drivers provide optimized hardware acceleration of OpenGL applications via a direct-rendering X Server. AGP, PCIe, SLI, TV-out and flat panel displays are also supported. This version only supports GeForce 6xxx and higher of the Geforce GPUs plus complimentary Quadros and nforce." PKG_IS_ADDON="no" +PKG_AUTORECONF="no" diff --git a/packages/x11/driver/xf86-video-nvidia/meta.new b/packages/x11/driver/xf86-video-nvidia/meta.new deleted file mode 100644 index 8ceb814f5f..0000000000 --- a/packages/x11/driver/xf86-video-nvidia/meta.new +++ /dev/null @@ -1,16 +0,0 @@ -PKG_NAME="xf86-video-nvidia" -PKG_VERSION="260.19.12" -PKG_REV="1" -PKG_ARCH="i386 x86_64" -PKG_LICENSE="nonfree" -PKG_SITE="http://www.nvidia.com/" -[ $TARGET_ARCH = i386 ] && PKG_URL="ftp://download.nvidia.com/XFree86/Linux-x86/$PKG_VERSION/NVIDIA-Linux-x86-$PKG_VERSION.run" -[ $TARGET_ARCH = x86_64 ] && PKG_URL="ftp://download.nvidia.com/XFree86/Linux-x86_64/$PKG_VERSION/NVIDIA-Linux-x86_64-$PKG_VERSION-no-compat32.run" -PKG_DEPENDS="linux libXinerama" -PKG_BUILD_DEPENDS="toolchain linux xorg-server" -PKG_PRIORITY="optional" -PKG_SECTION="x11/driver" -PKG_SHORTDESC="xf86-video-nvidia: The Xorg driver for NVIDIA video chips" -PKG_LONGDESC="These binary drivers provide optimized hardware acceleration of OpenGL applications via a direct-rendering X Server. AGP, PCIe, SLI, TV-out and flat panel displays are also supported. This version only supports GeForce 6xxx and higher of the Geforce GPUs plus complimentary Quadros and nforce." -PKG_IS_ADDON="no" - diff --git a/packages/x11/driver/xf86-video-nvidia/need_unpack b/packages/x11/driver/xf86-video-nvidia/need_unpack index bfae889a4c..54c6c3621e 100755 --- a/packages/x11/driver/xf86-video-nvidia/need_unpack +++ b/packages/x11/driver/xf86-video-nvidia/need_unpack @@ -5,9 +5,7 @@ STAMP=$STAMPS/$1/unpack test $PKG_DIR/config/linux.$TARGET_ARCH.conf -nt $STAMP -o \ - $PKG_DIR/config/linux.$TARGET_PLATFORM.conf -nt $STAMP -o \ $PROJECT_DIR/$PROJECT/linux/linux.$TARGET_ARCH.conf -nt $STAMP -o \ - $PROJECT_DIR/$PROJECT/linux/linux.$TARGET_PLATFORM.conf -nt $STAMP -o \ $PKG_DIR/url -nt $STAMP && rm -f $STAMP exit 0 diff --git a/packages/x11/driver/xf86-video-nvidia/patches.upstream/NVIDIA-256.44-2.6.36-0.1.diff b/packages/x11/driver/xf86-video-nvidia/patches.upstream/NVIDIA-256.44-2.6.36-0.1.diff deleted file mode 100644 index cf5ed96d9b..0000000000 --- a/packages/x11/driver/xf86-video-nvidia/patches.upstream/NVIDIA-256.44-2.6.36-0.1.diff +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naur NVIDIA-Linux-x86_64-256.53-no-compat32/kernel/nv.c NVIDIA-Linux-x86_64-256.53-no-compat32.patch/kernel/nv.c ---- NVIDIA-Linux-x86_64-256.53-no-compat32/kernel/nv.c 2010-08-28 05:28:03.000000000 +0200 -+++ NVIDIA-Linux-x86_64-256.53-no-compat32.patch/kernel/nv.c 2010-10-27 13:30:54.202322884 +0200 -@@ -423,7 +423,6 @@ - static struct file_operations nv_fops = { - .owner = THIS_MODULE, - .poll = nv_kern_poll, -- .ioctl = nv_kern_ioctl, - #if defined(HAVE_UNLOCKED_IOCTL) - .unlocked_ioctl = nv_kern_unlocked_ioctl, - #endif diff --git a/packages/x11/font/encodings/build b/packages/x11/font/encodings/build index c4f658d81c..bc41317461 100755 --- a/packages/x11/font/encodings/build +++ b/packages/x11/font/encodings/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/x11/font/encodings/meta b/packages/x11/font/encodings/meta new file mode 100644 index 0000000000..e482ee2777 --- /dev/null +++ b/packages/x11/font/encodings/meta @@ -0,0 +1,16 @@ +PKG_NAME="encodings" +PKG_VERSION="1.0.4" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/font/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/font" +PKG_SHORTDESC="encodings: X font encodings" +PKG_LONGDESC="X font encoding meta files." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/font/encodings/url b/packages/x11/font/encodings/url deleted file mode 100644 index da5ab9872d..0000000000 --- a/packages/x11/font/encodings/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/font/encodings-1.0.4.tar.bz2 \ No newline at end of file diff --git a/packages/x11/font/font-bitstream-type1/build b/packages/x11/font/font-bitstream-type1/build index eb1cf414d1..024bfa5a6a 100755 --- a/packages/x11/font/font-bitstream-type1/build +++ b/packages/x11/font/font-bitstream-type1/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -12,11 +10,10 @@ cd $PKG_BUILD --localstatedir=/var \ --with-fontdir=$XORG_PATH_FONTS -$MAKE +make mkdir -p fonts - cp *.afm fonts - cp *.pfb fonts + cp *.afm *.pfb fonts cd fonts mkfontdir diff --git a/packages/x11/font/font-bitstream-type1/install b/packages/x11/font/font-bitstream-type1/install index 177c5d2709..15f67fb940 100755 --- a/packages/x11/font/font-bitstream-type1/install +++ b/packages/x11/font/font-bitstream-type1/install @@ -3,4 +3,4 @@ . config/options $1 mkdir -p $INSTALL/$XORG_PATH_FONTS/Type1 -cp $PKG_BUILD/fonts/* $INSTALL/$XORG_PATH_FONTS/Type1 + cp $PKG_BUILD/fonts/* $INSTALL/$XORG_PATH_FONTS/Type1 diff --git a/packages/x11/font/font-bitstream-type1/meta b/packages/x11/font/font-bitstream-type1/meta new file mode 100644 index 0000000000..d4f8657dc0 --- /dev/null +++ b/packages/x11/font/font-bitstream-type1/meta @@ -0,0 +1,16 @@ +PKG_NAME="font-bitstream-type1" +PKG_VERSION="1.0.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/font/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/font" +PKG_SHORTDESC="font-bitstream-type1: Bitstream font family" +PKG_LONGDESC="Bitstream font family." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/font/font-bitstream-type1/url b/packages/x11/font/font-bitstream-type1/url deleted file mode 100644 index f943fa16c3..0000000000 --- a/packages/x11/font/font-bitstream-type1/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/font/font-bitstream-type1-1.0.1.tar.bz2 \ No newline at end of file diff --git a/packages/x11/font/font-cursor-misc/build b/packages/x11/font/font-cursor-misc/build index ad8d7c5406..fbc5963448 100755 --- a/packages/x11/font/font-cursor-misc/build +++ b/packages/x11/font/font-cursor-misc/build @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build font-util - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -13,4 +10,4 @@ cd $PKG_BUILD --localstatedir=/var \ --with-fontdir=$XORG_PATH_FONTS -$MAKE UTIL_DIR="`ls -d $ROOT/$BUILD/font-util*`" +make UTIL_DIR="`ls -d $ROOT/$BUILD/font-util*`" diff --git a/packages/x11/font/font-cursor-misc/install b/packages/x11/font/font-cursor-misc/install deleted file mode 100755 index 1e5d23e1cd..0000000000 --- a/packages/x11/font/font-cursor-misc/install +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -. config/options $1 -$SCRIPTS/install font-util diff --git a/packages/x11/font/font-cursor-misc/meta b/packages/x11/font/font-cursor-misc/meta new file mode 100644 index 0000000000..218de1ac3a --- /dev/null +++ b/packages/x11/font/font-cursor-misc/meta @@ -0,0 +1,16 @@ +PKG_NAME="font-cursor-misc" +PKG_VERSION="1.0.3" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/font/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="font-util" +PKG_BUILD_DEPENDS="toolchain util-macros font-util" +PKG_PRIORITY="optional" +PKG_SECTION="x11/font" +PKG_SHORTDESC="font-cursor-misc: X11 cursor fonts" +PKG_LONGDESC="X11 cursor fonts." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/font/font-cursor-misc/url b/packages/x11/font/font-cursor-misc/url deleted file mode 100644 index 231c56da93..0000000000 --- a/packages/x11/font/font-cursor-misc/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/font/font-cursor-misc-1.0.1.tar.bz2 \ No newline at end of file diff --git a/packages/x11/font/font-misc-misc/build b/packages/x11/font/font-misc-misc/build index ba36ef0510..bf76b5df16 100755 --- a/packages/x11/font/font-misc-misc/build +++ b/packages/x11/font/font-misc-misc/build @@ -2,10 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build font-cursor-misc -$SCRIPTS/build font-util - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -14,7 +10,7 @@ cd $PKG_BUILD --localstatedir=/var \ --with-fontdir=$XORG_PATH_FONTS -$MAKE UTIL_DIR="`ls -d $ROOT/$BUILD/font-util*`" +make UTIL_DIR="`ls -d $ROOT/$BUILD/font-util*`" mkdir -p fonts cp 6x13-ISO8859-1.pcf.gz fonts diff --git a/packages/x11/font/font-misc-misc/install b/packages/x11/font/font-misc-misc/install index ba1ab99ddc..607e9e8c9b 100755 --- a/packages/x11/font/font-misc-misc/install +++ b/packages/x11/font/font-misc-misc/install @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/install font-cursor-misc -$SCRIPTS/install font-util - mkdir -p $INSTALL/$XORG_PATH_FONTS/misc -cp $PKG_BUILD/fonts/* $INSTALL/$XORG_PATH_FONTS/misc -cp $PKG_DIR/config/fonts.alias $INSTALL/$XORG_PATH_FONTS/misc + cp $PKG_BUILD/fonts/* $INSTALL/$XORG_PATH_FONTS/misc + cp $PKG_DIR/config/fonts.alias $INSTALL/$XORG_PATH_FONTS/misc diff --git a/packages/x11/font/font-misc-misc/meta b/packages/x11/font/font-misc-misc/meta new file mode 100644 index 0000000000..206c2deb0c --- /dev/null +++ b/packages/x11/font/font-misc-misc/meta @@ -0,0 +1,16 @@ +PKG_NAME="font-misc-misc" +PKG_VERSION="1.1.2" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/font/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="font-cursor-misc font-util" +PKG_BUILD_DEPENDS="toolchain util-macros font-cursor-misc font-util" +PKG_PRIORITY="optional" +PKG_SECTION="x11/font" +PKG_SHORTDESC="font-misc-misc: A misc. public domain font" +PKG_LONGDESC="A misc. public domain font." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/font/font-misc-misc/url b/packages/x11/font/font-misc-misc/url deleted file mode 100644 index 2f85ed3856..0000000000 --- a/packages/x11/font/font-misc-misc/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/font/font-misc-misc-1.1.0.tar.bz2 diff --git a/packages/x11/font/font-util/build b/packages/x11/font/font-util/build index 500cc6f8bc..953d2d76da 100755 --- a/packages/x11/font/font-util/build +++ b/packages/x11/font/font-util/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - setup_toolchain host cd $PKG_BUILD diff --git a/packages/x11/font/font-util/install b/packages/x11/font/font-util/install index 55d65a84c3..47c9845748 100755 --- a/packages/x11/font/font-util/install +++ b/packages/x11/font/font-util/install @@ -3,4 +3,4 @@ . config/options $1 mkdir -p $INSTALL/$XORG_PATH_MAPS -cp $PKG_BUILD/map-* $INSTALL/$XORG_PATH_MAPS + cp $PKG_BUILD/map-* $INSTALL/$XORG_PATH_MAPS diff --git a/packages/x11/font/font-util/meta b/packages/x11/font/font-util/meta new file mode 100644 index 0000000000..06585b0f69 --- /dev/null +++ b/packages/x11/font/font-util/meta @@ -0,0 +1,16 @@ +PKG_NAME="font-util" +PKG_VERSION="1.2.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/font/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/font" +PKG_SHORTDESC="font-util: X.org font utilities" +PKG_LONGDESC="X.org font utilities." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/font/font-util/url b/packages/x11/font/font-util/url deleted file mode 100644 index c5285b969d..0000000000 --- a/packages/x11/font/font-util/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/font/font-util-1.2.0.tar.bz2 \ No newline at end of file diff --git a/packages/x11/font/font-xfree86-type1/build b/packages/x11/font/font-xfree86-type1/build index 93157cf2bd..5981097c8f 100755 --- a/packages/x11/font/font-xfree86-type1/build +++ b/packages/x11/font/font-xfree86-type1/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -12,4 +10,4 @@ cd $PKG_BUILD --localstatedir=/var \ --with-fontdir=$XORG_PATH_FONTS -$MAKE +make \ No newline at end of file diff --git a/packages/x11/font/font-xfree86-type1/install b/packages/x11/font/font-xfree86-type1/install index 94cb6e70cb..c83b1cabbc 100755 --- a/packages/x11/font/font-xfree86-type1/install +++ b/packages/x11/font/font-xfree86-type1/install @@ -3,4 +3,4 @@ . config/options $1 mkdir -p $INSTALL/$XORG_PATH_FONTS -cp $PKG_BUILD/cursor.pfa $INSTALL/$XORG_PATH_FONTS + cp $PKG_BUILD/cursor.pfa $INSTALL/$XORG_PATH_FONTS diff --git a/packages/x11/font/font-xfree86-type1/meta b/packages/x11/font/font-xfree86-type1/meta new file mode 100644 index 0000000000..c363cf156b --- /dev/null +++ b/packages/x11/font/font-xfree86-type1/meta @@ -0,0 +1,16 @@ +PKG_NAME="font-xfree86-type1" +PKG_VERSION="1.0.3" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/releases/individual/font/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/font" +PKG_SHORTDESC="font-xfree86-type1: A Xfree86 Inc. Type1 font" +PKG_LONGDESC="A Xfree86 Inc. Type1 font." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/font/font-xfree86-type1/url b/packages/x11/font/font-xfree86-type1/url deleted file mode 100644 index 4a0ed3c7d4..0000000000 --- a/packages/x11/font/font-xfree86-type1/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/releases/individual/font/font-xfree86-type1-1.0.2.tar.bz2 diff --git a/packages/x11/font/liberation-fonts-ttf/meta b/packages/x11/font/liberation-fonts-ttf/meta index 4b1f98c5df..ad591f7abf 100644 --- a/packages/x11/font/liberation-fonts-ttf/meta +++ b/packages/x11/font/liberation-fonts-ttf/meta @@ -6,11 +6,11 @@ PKG_LICENSE="GPL" PKG_SITE="https://www.redhat.com/promo/fonts/" PKG_URL="https://fedorahosted.org/releases/l/i/liberation-fonts/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain" +PKG_BUILD_DEPENDS="toolchain util-macros" PKG_PRIORITY="optional" -PKG_SECTION="fonts" +PKG_SECTION="x11/fonts" PKG_SHORTDESC="liberation-fonts: High quality "open-sourced" vector fonts" PKG_LONGDESC="This packages included the high-quality and open-sourced TrueType vector fonts released by RedHat." PKG_IS_ADDON="no" - +PKG_AUTORECONF="no" diff --git a/packages/x11/lib/libICE/build b/packages/x11/lib/libICE/build index 21aacd8e3a..44f40c1d2b 100755 --- a/packages/x11/lib/libICE/build +++ b/packages/x11/lib/libICE/build @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build xtrans - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -14,9 +11,6 @@ cd $PKG_BUILD --disable-static \ --enable-shared \ --disable-ipv6 \ -# --enable-unix-transport \ -# --disable-tcp-transport \ -# --disable-local-transport \ make diff --git a/packages/x11/lib/libICE/install b/packages/x11/lib/libICE/install index a7274b2c80..6508276a1e 100755 --- a/packages/x11/lib/libICE/install +++ b/packages/x11/lib/libICE/install @@ -3,4 +3,4 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/src/.libs/*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/src/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/x11/lib/libICE/meta b/packages/x11/lib/libICE/meta new file mode 100644 index 0000000000..6313c854ea --- /dev/null +++ b/packages/x11/lib/libICE/meta @@ -0,0 +1,16 @@ +PKG_NAME="libICE" +PKG_VERSION="1.0.7" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros xtrans" +PKG_PRIORITY="optional" +PKG_SECTION="x11/lib" +PKG_SHORTDESC="libice: X Inter-Client Exchange (ICE) protocol library" +PKG_LONGDESC="X Inter-Client Exchange (ICE) protocol library." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/libICE/url b/packages/x11/lib/libICE/url deleted file mode 100644 index 1ec280177e..0000000000 --- a/packages/x11/lib/libICE/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/lib/libICE-1.0.7.tar.bz2 \ No newline at end of file diff --git a/packages/x11/lib/libSM/build b/packages/x11/lib/libSM/build index 0cb5a193bf..52eef8ba6b 100755 --- a/packages/x11/lib/libSM/build +++ b/packages/x11/lib/libSM/build @@ -2,10 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build util-linux-ng -$SCRIPTS/build libICE - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ diff --git a/packages/x11/lib/libSM/install b/packages/x11/lib/libSM/install index 87cdcae0eb..6508276a1e 100755 --- a/packages/x11/lib/libSM/install +++ b/packages/x11/lib/libSM/install @@ -2,8 +2,5 @@ . config/options $1 -$SCRIPTS/install util-linux-ng -$SCRIPTS/install libICE - mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/src/.libs/*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/src/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/x11/lib/libSM/meta b/packages/x11/lib/libSM/meta new file mode 100644 index 0000000000..99266ec0de --- /dev/null +++ b/packages/x11/lib/libSM/meta @@ -0,0 +1,16 @@ +PKG_NAME="libSM" +PKG_VERSION="1.2.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="util-linux-ng libICE" +PKG_BUILD_DEPENDS="toolchain util-macros util-linux-ng libICE" +PKG_PRIORITY="optional" +PKG_SECTION="x11/lib" +PKG_SHORTDESC="libSM: X11 Inter-Client Exchange library" +PKG_LONGDESC="This package provides the main interface to the X11 Session Management library, which allows for applications to both manage sessions, and make use of session managers to save and restore their state for later use." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/libSM/url b/packages/x11/lib/libSM/url deleted file mode 100644 index b53e737e8d..0000000000 --- a/packages/x11/lib/libSM/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/lib/libSM-1.2.0.tar.bz2 \ No newline at end of file diff --git a/packages/x11/lib/libX11/build b/packages/x11/lib/libX11/build index 9f9d2c6337..b7dfea14ed 100755 --- a/packages/x11/lib/libX11/build +++ b/packages/x11/lib/libX11/build @@ -22,15 +22,15 @@ cd $PKG_BUILD --disable-loadable-i18n \ --enable-xthreads \ --disable-xcms \ - --with-xcb \ --enable-xlocale \ --enable-xkb \ --disable-xlocaledir \ --disable-xf86bigfont \ --enable-malloc0returnsnull \ - --disable-man-pages \ --disable-specs \ - --disable-composecache \ + --without-xmlto \ + --without-fop \ + --enable-composecache \ --disable-lint-library \ --disable-ipv6 \ --without-launchd \ diff --git a/packages/x11/lib/libX11/meta b/packages/x11/lib/libX11/meta index 397da45389..d43bc916a1 100644 --- a/packages/x11/lib/libX11/meta +++ b/packages/x11/lib/libX11/meta @@ -1,14 +1,16 @@ PKG_NAME="libX11" -PKG_VERSION="1.3.6" +PKG_VERSION="1.4.0" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OSS" PKG_SITE="http://www.x.org/" PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="libXau libxcb" -PKG_BUILD_DEPENDS="toolchain xextproto xcmiscproto bigreqsproto kbproto inputproto xtrans libXau libxcb util-macros" +PKG_BUILD_DEPENDS="toolchain util-macros xextproto xcmiscproto bigreqsproto kbproto inputproto xtrans libXau libxcb util-macros" PKG_PRIORITY="optional" PKG_SECTION="x11/lib" PKG_SHORTDESC="libx11: The X11 library" PKG_LONGDESC="LibX11 is the main X11 library containing all the client-side code to access the X11 windowing system." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/libXau/build b/packages/x11/lib/libXau/build index 524e98fd00..dcfb68751c 100755 --- a/packages/x11/lib/libXau/build +++ b/packages/x11/lib/libXau/build @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build xproto - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -16,5 +13,4 @@ cd $PKG_BUILD --enable-xthreads \ make - $MAKEINSTALL diff --git a/packages/x11/lib/libXau/install b/packages/x11/lib/libXau/install index 72c6df79ed..d40413806c 100755 --- a/packages/x11/lib/libXau/install +++ b/packages/x11/lib/libXau/install @@ -3,4 +3,4 @@ . config/options $1 mkdir -p $INSTALL/usr/lib -cp -PR $PKG_BUILD/.libs/libXau.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/.libs/libXau.so* $INSTALL/usr/lib diff --git a/packages/x11/lib/libXau/meta b/packages/x11/lib/libXau/meta new file mode 100644 index 0000000000..0fcb2b9b88 --- /dev/null +++ b/packages/x11/lib/libXau/meta @@ -0,0 +1,16 @@ +PKG_NAME="libXau" +PKG_VERSION="1.0.6" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros xproto" +PKG_PRIORITY="optional" +PKG_SECTION="x11/lib" +PKG_SHORTDESC="libXau: X authorization file management libary" +PKG_LONGDESC="X authorization file management libary" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/libXau/url b/packages/x11/lib/libXau/url deleted file mode 100644 index d6cd348687..0000000000 --- a/packages/x11/lib/libXau/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/lib/libXau-1.0.6.tar.bz2 diff --git a/packages/x11/lib/libXdamage/build b/packages/x11/lib/libXdamage/build index f7cb5bcb09..990b153791 100755 --- a/packages/x11/lib/libXdamage/build +++ b/packages/x11/lib/libXdamage/build @@ -2,12 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build damageproto -$SCRIPTS/build fixesproto -$SCRIPTS/build libX11 -$SCRIPTS/build libXfixes - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -16,8 +10,6 @@ cd $PKG_BUILD --localstatedir=/var \ --disable-static \ --enable-shared \ - --with-x - -$MAKE +make $MAKEINSTALL diff --git a/packages/x11/lib/libXdamage/install b/packages/x11/lib/libXdamage/install index 9b9ef36bc0..936c545f1b 100755 --- a/packages/x11/lib/libXdamage/install +++ b/packages/x11/lib/libXdamage/install @@ -2,8 +2,5 @@ . config/options $1 -$SCRIPTS/install libX11 -$SCRIPTS/install libXfixes - mkdir -p $INSTALL/usr/lib -cp -PR $PKG_BUILD/src/.libs/libXdamage.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/src/.libs/libXdamage.so* $INSTALL/usr/lib diff --git a/packages/x11/lib/libXdamage/meta b/packages/x11/lib/libXdamage/meta new file mode 100644 index 0000000000..5ad60e2378 --- /dev/null +++ b/packages/x11/lib/libXdamage/meta @@ -0,0 +1,16 @@ +PKG_NAME="libXdamage" +PKG_VERSION="1.1.3" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libX11 libXfixes" +PKG_BUILD_DEPENDS="toolchain util-macros damageproto fixesproto libX11 libXfixes" +PKG_PRIORITY="optional" +PKG_SECTION="x11/lib" +PKG_SHORTDESC="libXdamage: X11 damaged region extension library" +PKG_LONGDESC="LibXdamage provides an X Window System client interface to the DAMAGE extension to the X protocol. The Damage extension provides for notification of when on-screen regions have been 'damaged' (altered)." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/libXdamage/url b/packages/x11/lib/libXdamage/url deleted file mode 100644 index f7f56a0df4..0000000000 --- a/packages/x11/lib/libXdamage/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/lib/libXdamage-1.1.3.tar.bz2 diff --git a/packages/x11/lib/libXext/build b/packages/x11/lib/libXext/build index 8c72798f19..abe467a290 100755 --- a/packages/x11/lib/libXext/build +++ b/packages/x11/lib/libXext/build @@ -2,10 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build libX11 -$SCRIPTS/build xextproto - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -16,6 +12,5 @@ cd $PKG_BUILD --enable-shared \ --enable-malloc0returnsnull -$MAKE - +make $MAKEINSTALL diff --git a/packages/x11/lib/libXext/install b/packages/x11/lib/libXext/install index 02654dc2e2..750fd6d714 100755 --- a/packages/x11/lib/libXext/install +++ b/packages/x11/lib/libXext/install @@ -2,7 +2,5 @@ . config/options $1 -$SCRIPTS/install libX11 - mkdir -p $INSTALL/usr/lib -cp -PR $PKG_BUILD/src/.libs/libXext.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/src/.libs/libXext.so* $INSTALL/usr/lib diff --git a/packages/x11/lib/libXext/meta b/packages/x11/lib/libXext/meta new file mode 100644 index 0000000000..66337d1ee6 --- /dev/null +++ b/packages/x11/lib/libXext/meta @@ -0,0 +1,16 @@ +PKG_NAME="libXext" +PKG_VERSION="1.2.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libX11" +PKG_BUILD_DEPENDS="toolchain util-macros xextproto libX11" +PKG_PRIORITY="optional" +PKG_SECTION="x11/lib" +PKG_SHORTDESC="libxext: X11 miscellaneous extensions library" +PKG_LONGDESC="LibXext provides an X Window System client interface to several extensions to the X protocol, iincluding DOUBLE-BUFFER (DBE), DPMS, Extended-Visual-Information (EVI), LBX, MIT-SHM, MIT-SUNDRY-NONSTANDARD, Multi-Buffering, SECURITY, SHAPE, SHAPE, SYNC, TOG-CUP, XC-APPGROUP, XC-MISC, XTEST and possibly others." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/libXext/url b/packages/x11/lib/libXext/url deleted file mode 100644 index 301e5225cf..0000000000 --- a/packages/x11/lib/libXext/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/lib/libXext-1.2.0.tar.bz2 \ No newline at end of file diff --git a/packages/x11/lib/libXfixes/build b/packages/x11/lib/libXfixes/build index 97b0cdf440..990b153791 100755 --- a/packages/x11/lib/libXfixes/build +++ b/packages/x11/lib/libXfixes/build @@ -2,10 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build fixesproto -$SCRIPTS/build libX11 - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -15,6 +11,5 @@ cd $PKG_BUILD --disable-static \ --enable-shared \ -$MAKE - +make $MAKEINSTALL diff --git a/packages/x11/lib/libXfixes/install b/packages/x11/lib/libXfixes/install index e2f9135499..be8e2c2e55 100755 --- a/packages/x11/lib/libXfixes/install +++ b/packages/x11/lib/libXfixes/install @@ -2,7 +2,5 @@ . config/options $1 -$SCRIPTS/install libX11 - mkdir -p $INSTALL/usr/lib -cp -P $PKG_BUILD/src/.libs/libXfixes.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/src/.libs/libXfixes.so* $INSTALL/usr/lib diff --git a/packages/x11/lib/libXfixes/meta b/packages/x11/lib/libXfixes/meta new file mode 100644 index 0000000000..e2faada9b7 --- /dev/null +++ b/packages/x11/lib/libXfixes/meta @@ -0,0 +1,16 @@ +PKG_NAME="libXfixes" +PKG_VERSION="4.0.5" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libX11" +PKG_BUILD_DEPENDS="toolchain util-macros fixesproto libX11" +PKG_PRIORITY="optional" +PKG_SECTION="x11/lib" +PKG_SHORTDESC="libxfixes: X Fixes Library" +PKG_LONGDESC="X Fixes Library" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/libXfixes/url b/packages/x11/lib/libXfixes/url deleted file mode 100644 index c0a27af376..0000000000 --- a/packages/x11/lib/libXfixes/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/lib/libXfixes-4.0.5.tar.bz2 diff --git a/packages/x11/lib/libXfont/build b/packages/x11/lib/libXfont/build index 1a67a942f9..dcc9da4ec5 100755 --- a/packages/x11/lib/libXfont/build +++ b/packages/x11/lib/libXfont/build @@ -2,13 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build fontcacheproto -$SCRIPTS/build xtrans -$SCRIPTS/build fontsproto -$SCRIPTS/build freetype -$SCRIPTS/build libfontenc - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -27,5 +20,4 @@ cd $PKG_BUILD --with-gnu-ld make - $MAKEINSTALL diff --git a/packages/x11/lib/libXfont/install b/packages/x11/lib/libXfont/install index 638cbf9bcd..cc3cf5263f 100755 --- a/packages/x11/lib/libXfont/install +++ b/packages/x11/lib/libXfont/install @@ -2,7 +2,5 @@ . config/options $1 -$SCRIPTS/install freetype - mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/src/.libs/libXfont.so* $INSTALL/usr/lib diff --git a/packages/x11/lib/libXfont/meta b/packages/x11/lib/libXfont/meta new file mode 100644 index 0000000000..3b96dccbd0 --- /dev/null +++ b/packages/x11/lib/libXfont/meta @@ -0,0 +1,16 @@ +PKG_NAME="libXfont" +PKG_VERSION="1.4.3" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="freetype" +PKG_BUILD_DEPENDS="toolchain util-macros fontcacheproto fontsproto xtrans freetype libfontenc" +PKG_PRIORITY="optional" +PKG_SECTION="x11/lib" +PKG_SHORTDESC="libxfont: X font Library" +PKG_LONGDESC="X font Library" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/libXfont/url b/packages/x11/lib/libXfont/url deleted file mode 100644 index a0689be10e..0000000000 --- a/packages/x11/lib/libXfont/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/lib/libXfont-1.4.3.tar.bz2 \ No newline at end of file diff --git a/packages/x11/lib/libXft/build b/packages/x11/lib/libXft/build index be99145de4..a0549a4507 100755 --- a/packages/x11/lib/libXft/build +++ b/packages/x11/lib/libXft/build @@ -2,12 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build fontconfig -$SCRIPTS/build freetype -$SCRIPTS/build xproto -$SCRIPTS/build libXrender - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -18,5 +12,4 @@ cd $PKG_BUILD --localstatedir=/var \ make - $MAKEINSTALL diff --git a/packages/x11/lib/libXft/install b/packages/x11/lib/libXft/install index 3320781a45..6508276a1e 100755 --- a/packages/x11/lib/libXft/install +++ b/packages/x11/lib/libXft/install @@ -2,9 +2,5 @@ . config/options $1 -$SCRIPTS/install fontconfig -$SCRIPTS/install freetype -$SCRIPTS/install libXrender - mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/src/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/x11/lib/libXft/meta b/packages/x11/lib/libXft/meta new file mode 100644 index 0000000000..a00a57b655 --- /dev/null +++ b/packages/x11/lib/libXft/meta @@ -0,0 +1,16 @@ +PKG_NAME="libXft" +PKG_VERSION="2.2.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libXrender fontconfig freetype" +PKG_BUILD_DEPENDS="toolchain util-macros xproto libXrender fontconfig freetype" +PKG_PRIORITY="optional" +PKG_SECTION="x11/lib" +PKG_SHORTDESC="libxft: X FreeType library" +PKG_LONGDESC="X FreeType library" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/libXft/url b/packages/x11/lib/libXft/url deleted file mode 100644 index 769f14c44a..0000000000 --- a/packages/x11/lib/libXft/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/lib/libXft-2.2.0.tar.bz2 \ No newline at end of file diff --git a/packages/x11/lib/libXi/build b/packages/x11/lib/libXi/build index be47cac197..653a4eacf6 100755 --- a/packages/x11/lib/libXi/build +++ b/packages/x11/lib/libXi/build @@ -14,5 +14,4 @@ cd $PKG_BUILD --enable-malloc0returnsnull \ make SUBDIRS="src" - $MAKEINSTALL SUBDIRS="src" diff --git a/packages/x11/lib/libXi/meta b/packages/x11/lib/libXi/meta index ab9936b55e..579f5ecdf3 100644 --- a/packages/x11/lib/libXi/meta +++ b/packages/x11/lib/libXi/meta @@ -1,14 +1,16 @@ PKG_NAME="libXi" -PKG_VERSION="1.3.2" +PKG_VERSION="1.4.0" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OSS" PKG_SITE="http://www.x.org/" PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="libX11" -PKG_BUILD_DEPENDS="toolchain libX11" +PKG_BUILD_DEPENDS="toolchain util-macros libX11" PKG_PRIORITY="optional" PKG_SECTION="x11/lib" PKG_SHORTDESC="libxi: X11 Input extension library" PKG_LONGDESC="LibXi provides an X Window System client interface to the XINPUT extension to the X protocol." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/libXinerama/build b/packages/x11/lib/libXinerama/build index 63ab168a12..3d6501cb93 100755 --- a/packages/x11/lib/libXinerama/build +++ b/packages/x11/lib/libXinerama/build @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build xineramaproto - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -16,5 +13,4 @@ cd $PKG_BUILD --enable-malloc0returnsnull \ make - $MAKEINSTALL diff --git a/packages/x11/lib/libXinerama/meta b/packages/x11/lib/libXinerama/meta new file mode 100644 index 0000000000..1259d0cec9 --- /dev/null +++ b/packages/x11/lib/libXinerama/meta @@ -0,0 +1,16 @@ +PKG_NAME="libXinerama" +PKG_VERSION="1.1.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libXext" +PKG_BUILD_DEPENDS="toolchain util-macros xineramaproto libXext" +PKG_PRIORITY="optional" +PKG_SECTION="x11/lib" +PKG_SHORTDESC="libxft: X FreeType library" +PKG_LONGDESC="X FreeType library" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/libXinerama/url b/packages/x11/lib/libXinerama/url deleted file mode 100644 index a76f00594b..0000000000 --- a/packages/x11/lib/libXinerama/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/lib/libXinerama-1.1.1.tar.bz2 \ No newline at end of file diff --git a/packages/x11/lib/libXmu/build b/packages/x11/lib/libXmu/build index 5c39bf9dc8..f5e79a4e10 100755 --- a/packages/x11/lib/libXmu/build +++ b/packages/x11/lib/libXmu/build @@ -2,12 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build xextproto -$SCRIPTS/build libX11 -$SCRIPTS/build libXext -$SCRIPTS/build libXt - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -19,5 +13,4 @@ cd $PKG_BUILD --with-gnu-ld \ make - $MAKEINSTALL diff --git a/packages/x11/lib/libXmu/install b/packages/x11/lib/libXmu/install index 86aab431b2..6508276a1e 100755 --- a/packages/x11/lib/libXmu/install +++ b/packages/x11/lib/libXmu/install @@ -2,9 +2,5 @@ . config/options $1 -$SCRIPTS/install libX11 -$SCRIPTS/install libXext -$SCRIPTS/install libXt - mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/src/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/x11/lib/libXmu/meta b/packages/x11/lib/libXmu/meta new file mode 100644 index 0000000000..861f75cae0 --- /dev/null +++ b/packages/x11/lib/libXmu/meta @@ -0,0 +1,16 @@ +PKG_NAME="libXmu" +PKG_VERSION="1.1.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libXext libX11 libXt" +PKG_BUILD_DEPENDS="toolchain util-macros xextproto libXext libX11 libXt" +PKG_PRIORITY="optional" +PKG_SECTION="x11/lib" +PKG_SHORTDESC="libxmu: X11 miscellaneous utility library" +PKG_LONGDESC="LibXmu provides a set of miscellaneous utility convenience functions for X libraries to use." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/libXmu/url b/packages/x11/lib/libXmu/url deleted file mode 100644 index 79ce68f0b1..0000000000 --- a/packages/x11/lib/libXmu/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/lib/libXmu-1.1.0.tar.bz2 \ No newline at end of file diff --git a/packages/x11/lib/libXrandr/build b/packages/x11/lib/libXrandr/build index ba5897ebae..abe467a290 100755 --- a/packages/x11/lib/libXrandr/build +++ b/packages/x11/lib/libXrandr/build @@ -2,12 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build randrproto -$SCRIPTS/build libX11 -$SCRIPTS/build libXrender -$SCRIPTS/build libXext - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -18,6 +12,5 @@ cd $PKG_BUILD --enable-shared \ --enable-malloc0returnsnull -$MAKE - +make $MAKEINSTALL diff --git a/packages/x11/lib/libXrandr/install b/packages/x11/lib/libXrandr/install index b3f0846136..f85023cc82 100755 --- a/packages/x11/lib/libXrandr/install +++ b/packages/x11/lib/libXrandr/install @@ -2,9 +2,5 @@ . config/options $1 -$SCRIPTS/install libX11 -$SCRIPTS/install libXrender -$SCRIPTS/install libXext - mkdir -p $INSTALL/usr/lib - cp -PR $PKG_BUILD/src/.libs/libXrandr.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/src/.libs/libXrandr.so* $INSTALL/usr/lib diff --git a/packages/x11/lib/libXrandr/meta b/packages/x11/lib/libXrandr/meta new file mode 100644 index 0000000000..ea03da5b76 --- /dev/null +++ b/packages/x11/lib/libXrandr/meta @@ -0,0 +1,16 @@ +PKG_NAME="libXrandr" +PKG_VERSION="1.3.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libX11 libXrender libXext" +PKG_BUILD_DEPENDS="toolchain util-macros randrproto libX11 libXrender libXext" +PKG_PRIORITY="optional" +PKG_SECTION="x11/lib" +PKG_SHORTDESC="libxrandr: X Resize, Rotate and Reflection extension client library" +PKG_LONGDESC="Xrandr is a simple library designed to interface the X Resize and Rotate Extension. This allows clients to change the size and rotation of the root window of a screen, along with the ability to reflect the screen about either axis." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/libXrandr/url b/packages/x11/lib/libXrandr/url deleted file mode 100644 index 512f2bfa62..0000000000 --- a/packages/x11/lib/libXrandr/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/lib/libXrandr-1.3.1.tar.bz2 \ No newline at end of file diff --git a/packages/x11/lib/libXrender/build b/packages/x11/lib/libXrender/build index d0bbf808ed..82d94c4013 100755 --- a/packages/x11/lib/libXrender/build +++ b/packages/x11/lib/libXrender/build @@ -2,10 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build renderproto -$SCRIPTS/build libX11 - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -16,6 +12,5 @@ cd $PKG_BUILD --enable-shared \ --enable-malloc0returnsnull -$MAKE - +make $MAKEINSTALL \ No newline at end of file diff --git a/packages/x11/lib/libXrender/install b/packages/x11/lib/libXrender/install index 014c49cb2b..cc56913e5c 100755 --- a/packages/x11/lib/libXrender/install +++ b/packages/x11/lib/libXrender/install @@ -2,7 +2,5 @@ . config/options $1 -$SCRIPTS/install libX11 - mkdir -p $INSTALL/usr/lib -cp -PR $PKG_BUILD/src/.libs/libXrender.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/src/.libs/libXrender.so* $INSTALL/usr/lib diff --git a/packages/x11/lib/libXrender/meta b/packages/x11/lib/libXrender/meta new file mode 100644 index 0000000000..52e7d7af43 --- /dev/null +++ b/packages/x11/lib/libXrender/meta @@ -0,0 +1,16 @@ +PKG_NAME="libXrender" +PKG_VERSION="0.9.6" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libX11" +PKG_BUILD_DEPENDS="toolchain util-macros renderproto libX11" +PKG_PRIORITY="optional" +PKG_SECTION="x11/lib" +PKG_SHORTDESC="libxrender: X Rendering Extension client library" +PKG_LONGDESC="The X Rendering Extension (Render) introduces digital image composition as the foundation of a new rendering model within the X Window System. Rendering geometric figures is accomplished by client-side tesselation into either triangles or trapezoids." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/libXrender/url b/packages/x11/lib/libXrender/url deleted file mode 100644 index 3b7400be58..0000000000 --- a/packages/x11/lib/libXrender/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/lib/libXrender-0.9.6.tar.bz2 diff --git a/packages/x11/lib/libXt/build b/packages/x11/lib/libXt/build index a8f77b541d..cf77851531 100755 --- a/packages/x11/lib/libXt/build +++ b/packages/x11/lib/libXt/build @@ -2,10 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build libX11 -$SCRIPTS/build libSM - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -19,5 +15,4 @@ cd $PKG_BUILD make -C util CC=$HOST_CC CFLAGS="$HOST_CFLAGS -I$SYSROOT_PREFIX/usr/include" LDFLAGS="$HOST_LDFLAGS" makestrs make - $MAKEINSTALL diff --git a/packages/x11/lib/libXt/install b/packages/x11/lib/libXt/install index b8a801e70e..6508276a1e 100755 --- a/packages/x11/lib/libXt/install +++ b/packages/x11/lib/libXt/install @@ -2,8 +2,5 @@ . config/options $1 -$SCRIPTS/install libX11 -$SCRIPTS/install libSM - mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/src/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/x11/lib/libXt/meta b/packages/x11/lib/libXt/meta new file mode 100644 index 0000000000..0c1c29b92f --- /dev/null +++ b/packages/x11/lib/libXt/meta @@ -0,0 +1,16 @@ +PKG_NAME="libXt" +PKG_VERSION="1.0.9" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libX11 libSM" +PKG_BUILD_DEPENDS="toolchain util-macros libX11 libSM" +PKG_PRIORITY="optional" +PKG_SECTION="x11/lib" +PKG_SHORTDESC="libxt: X11 toolkit intrinsics library" +PKG_LONGDESC="LibXt provides the X Toolkit Intrinsics, an abstract widget library upon which other toolkits are based. Xt is the basis for many toolkits, including the Athena widgets (Xaw), and LessTif." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/libXt/url b/packages/x11/lib/libXt/url deleted file mode 100644 index d75f835923..0000000000 --- a/packages/x11/lib/libXt/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/lib/libXt-1.0.9.tar.bz2 \ No newline at end of file diff --git a/packages/x11/lib/libXtst/build b/packages/x11/lib/libXtst/build index 23ce60bf58..f5e79a4e10 100755 --- a/packages/x11/lib/libXtst/build +++ b/packages/x11/lib/libXtst/build @@ -2,14 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build recordproto -$SCRIPTS/build xextproto -$SCRIPTS/build inputproto -$SCRIPTS/build libX11 -$SCRIPTS/build libXext -$SCRIPTS/build libXi - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -21,5 +13,4 @@ cd $PKG_BUILD --with-gnu-ld \ make - $MAKEINSTALL diff --git a/packages/x11/lib/libXtst/install b/packages/x11/lib/libXtst/install index 8b592544eb..6508276a1e 100755 --- a/packages/x11/lib/libXtst/install +++ b/packages/x11/lib/libXtst/install @@ -2,9 +2,5 @@ . config/options $1 -$SCRIPTS/install libXext -$SCRIPTS/install libX11 -$SCRIPTS/install libXi - mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/src/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/x11/lib/libXtst/meta b/packages/x11/lib/libXtst/meta new file mode 100644 index 0000000000..8c260db4e6 --- /dev/null +++ b/packages/x11/lib/libXtst/meta @@ -0,0 +1,16 @@ +PKG_NAME="libXtst" +PKG_VERSION="1.2.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libXext libXi libX11" +PKG_BUILD_DEPENDS="toolchain util-macros recordproto xextproto libXext inputproto libXi libX11" +PKG_PRIORITY="optional" +PKG_SECTION="x11/lib" +PKG_SHORTDESC="libxtst: The Xtst Library" +PKG_LONGDESC="The Xtst Library" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/libXtst/url b/packages/x11/lib/libXtst/url deleted file mode 100644 index e96080ca72..0000000000 --- a/packages/x11/lib/libXtst/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/lib/libXtst-1.2.0.tar.bz2 \ No newline at end of file diff --git a/packages/x11/lib/libXxf86vm/build b/packages/x11/lib/libXxf86vm/build index 43b6df3836..82d94c4013 100755 --- a/packages/x11/lib/libXxf86vm/build +++ b/packages/x11/lib/libXxf86vm/build @@ -2,11 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build xf86vidmodeproto -$SCRIPTS/build libX11 -$SCRIPTS/build libXext - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -17,6 +12,5 @@ cd $PKG_BUILD --enable-shared \ --enable-malloc0returnsnull -$MAKE - +make $MAKEINSTALL \ No newline at end of file diff --git a/packages/x11/lib/libXxf86vm/install b/packages/x11/lib/libXxf86vm/install index 784f1a5d4f..5fde11a25f 100755 --- a/packages/x11/lib/libXxf86vm/install +++ b/packages/x11/lib/libXxf86vm/install @@ -2,8 +2,5 @@ . config/options $1 -$SCRIPTS/install libX11 -$SCRIPTS/install libXext - mkdir -p $INSTALL/usr/lib -cp -PR $PKG_BUILD/src/.libs/libXxf86vm.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/src/.libs/libXxf86vm.so* $INSTALL/usr/lib diff --git a/packages/x11/lib/libXxf86vm/meta b/packages/x11/lib/libXxf86vm/meta new file mode 100644 index 0000000000..0d53d52b25 --- /dev/null +++ b/packages/x11/lib/libXxf86vm/meta @@ -0,0 +1,16 @@ +PKG_NAME="libXxf86vm" +PKG_VERSION="1.1.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libX11 libXext" +PKG_BUILD_DEPENDS="toolchain util-macros xf86vidmodeproto libX11 libXext" +PKG_PRIORITY="optional" +PKG_SECTION="x11/lib" +PKG_SHORTDESC="libxxf86vm: Extension library for the XFree86-VidMode X extension" +PKG_LONGDESC="The libxxf86vm provides an interface to the server extension XFree86-VidModeExtension which allows the video modes to be queried and adjusted dynamically and mode switching to be controlled." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/libXxf86vm/url b/packages/x11/lib/libXxf86vm/url deleted file mode 100644 index 94c55fa0ca..0000000000 --- a/packages/x11/lib/libXxf86vm/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/lib/libXxf86vm-1.1.1.tar.bz2 \ No newline at end of file diff --git a/packages/x11/lib/libfontenc/build b/packages/x11/lib/libfontenc/build index c3d1e8e18c..79015a39ef 100755 --- a/packages/x11/lib/libfontenc/build +++ b/packages/x11/lib/libfontenc/build @@ -2,10 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build xproto -$SCRIPTS/build zlib - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -14,6 +10,5 @@ cd $PKG_BUILD --enable-static \ --disable-shared \ -$MAKE - +make $MAKEINSTALL diff --git a/packages/x11/lib/libfontenc/meta b/packages/x11/lib/libfontenc/meta new file mode 100644 index 0000000000..c78bee723f --- /dev/null +++ b/packages/x11/lib/libfontenc/meta @@ -0,0 +1,16 @@ +PKG_NAME="libfontenc" +PKG_VERSION="1.1.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros xproto zlib" +PKG_PRIORITY="optional" +PKG_SECTION="x11/lib" +PKG_SHORTDESC="libfontenc: X11 font encoding library" +PKG_LONGDESC="Libfontenc is a library which helps font libraries portably determine and deal with different encodings of fonts." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/libfontenc/url b/packages/x11/lib/libfontenc/url deleted file mode 100644 index 370fa4c2b2..0000000000 --- a/packages/x11/lib/libfontenc/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/lib/libfontenc-1.1.0.tar.bz2 \ No newline at end of file diff --git a/packages/x11/lib/libpciaccess/build b/packages/x11/lib/libpciaccess/build index 704f726a27..bf22e6461f 100755 --- a/packages/x11/lib/libpciaccess/build +++ b/packages/x11/lib/libpciaccess/build @@ -2,9 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build zlib - export ac_cv_header_asm_mtrr_h=set cd $PKG_BUILD @@ -18,5 +15,4 @@ cd $PKG_BUILD --with-zlib \ make - $MAKEINSTALL diff --git a/packages/x11/lib/libpciaccess/install b/packages/x11/lib/libpciaccess/install index 41f828e368..3f8ae6e743 100755 --- a/packages/x11/lib/libpciaccess/install +++ b/packages/x11/lib/libpciaccess/install @@ -1,11 +1,10 @@ #!/bin/sh . config/options $1 -$SCRIPTS/install zlib mkdir -p $INSTALL/usr/lib -cp -PR $PKG_BUILD/src/.libs/libpciaccess.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/src/.libs/libpciaccess.so* $INSTALL/usr/lib mkdir -p $INSTALL/usr/bin -cp -PR $PKG_BUILD/src/.libs/scanpci $INSTALL/usr/bin + cp -P $PKG_BUILD/src/.libs/scanpci $INSTALL/usr/bin diff --git a/packages/x11/lib/libpciaccess/meta b/packages/x11/lib/libpciaccess/meta new file mode 100644 index 0000000000..74553d3cde --- /dev/null +++ b/packages/x11/lib/libpciaccess/meta @@ -0,0 +1,16 @@ +PKG_NAME="libpciaccess" +PKG_VERSION="0.12.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://freedesktop.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="zlib" +PKG_BUILD_DEPENDS="toolchain util-macros zlib" +PKG_PRIORITY="optional" +PKG_SECTION="x11/lib" +PKG_SHORTDESC="libpciaccess: X.org libpciaccess library" +PKG_LONGDESC="X.org libpciaccess library." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/libpciaccess/url b/packages/x11/lib/libpciaccess/url deleted file mode 100644 index 579ff4373b..0000000000 --- a/packages/x11/lib/libpciaccess/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/lib/libpciaccess-0.12.0.tar.bz2 \ No newline at end of file diff --git a/packages/x11/lib/libxcb/build b/packages/x11/lib/libxcb/build index 856ce030ed..2d262fafd7 100755 --- a/packages/x11/lib/libxcb/build +++ b/packages/x11/lib/libxcb/build @@ -17,5 +17,4 @@ cd $PKG_BUILD --enable-shared \ make - $MAKEINSTALL diff --git a/packages/x11/lib/libxcb/install b/packages/x11/lib/libxcb/install index 96380926c9..70ba8769a4 100755 --- a/packages/x11/lib/libxcb/install +++ b/packages/x11/lib/libxcb/install @@ -4,5 +4,5 @@ mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/src/.libs/libxcb.so* $INSTALL/usr/lib - cp -P $PKG_BUILD/src/.libs/libxcb-glx*.so* $INSTALL/usr/lib - rm -rf $INSTALL/usr/lib/libxcb-glx*.so*T + cp -P $PKG_BUILD/src/.libs/libxcb-*.so* $INSTALL/usr/lib + rm -rf $INSTALL/usr/lib/libxcb-*.so*T diff --git a/packages/x11/lib/libxcb/meta b/packages/x11/lib/libxcb/meta index b31f24e1ac..ee13825c82 100644 --- a/packages/x11/lib/libxcb/meta +++ b/packages/x11/lib/libxcb/meta @@ -6,9 +6,11 @@ PKG_LICENSE="OSS" PKG_SITE="http://xcb.freedesktop.org" PKG_URL="http://xcb.freedesktop.org/dist/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="libXau" -PKG_BUILD_DEPENDS="toolchain Python xcb-proto libpthread-stubs libXau" +PKG_BUILD_DEPENDS="toolchain util-macros Python xcb-proto libpthread-stubs libXau" PKG_PRIORITY="optional" PKG_SECTION="x11/lib" PKG_SHORTDESC="libxcb: X C-language Bindings library" PKG_LONGDESC="X C-language Bindings library." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/libxkbfile/build b/packages/x11/lib/libxkbfile/build index 281fde6e5d..79015a39ef 100755 --- a/packages/x11/lib/libxkbfile/build +++ b/packages/x11/lib/libxkbfile/build @@ -2,10 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build libX11 -$SCRIPTS/build kbproto - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -14,6 +10,5 @@ cd $PKG_BUILD --enable-static \ --disable-shared \ -$MAKE - +make $MAKEINSTALL diff --git a/packages/x11/lib/libxkbfile/meta b/packages/x11/lib/libxkbfile/meta new file mode 100644 index 0000000000..2103ff91e6 --- /dev/null +++ b/packages/x11/lib/libxkbfile/meta @@ -0,0 +1,16 @@ +PKG_NAME="libxkbfile" +PKG_VERSION="1.0.7" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros kbproto libX11" +PKG_PRIORITY="optional" +PKG_SECTION="x11/lib" +PKG_SHORTDESC="libxkbfile: X11 keyboard file manipulation library" +PKG_LONGDESC="Libxkbfile provides an interface to read and manipulate description files for XKB, the X11 keyboard configuration extension." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/libxkbfile/url b/packages/x11/lib/libxkbfile/url deleted file mode 100644 index f3c56c93c4..0000000000 --- a/packages/x11/lib/libxkbfile/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/lib/libxkbfile-1.0.7.tar.bz2 \ No newline at end of file diff --git a/packages/x11/lib/pixman/build b/packages/x11/lib/pixman/build index 72037b7664..13ed8a63fd 100755 --- a/packages/x11/lib/pixman/build +++ b/packages/x11/lib/pixman/build @@ -24,7 +24,6 @@ cd $PKG_BUILD echo "" > test/Makefile.am make - $MAKEINSTALL cp $SYSROOT_PREFIX/usr/lib/pkgconfig/pixman-1.pc \ diff --git a/packages/x11/lib/pixman/meta b/packages/x11/lib/pixman/meta index a6fef81500..ac48893b59 100644 --- a/packages/x11/lib/pixman/meta +++ b/packages/x11/lib/pixman/meta @@ -1,14 +1,16 @@ PKG_NAME="pixman" -PKG_VERSION="0.20.0" +PKG_VERSION="0.21.2" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OSS" PKG_SITE="http://www.x.org/" -PKG_URL="http://cairographics.org/releases/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain" +PKG_BUILD_DEPENDS="toolchain util-macros" PKG_PRIORITY="optional" PKG_SECTION="x11/lib" PKG_SHORTDESC="pixman: Pixel manipulation library" PKG_LONGDESC="Pixman is a generic library for manipulating pixel regions, contains low-level pixel manipulation routines and is used by both xorg and cairo." PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/xtrans/build b/packages/x11/lib/xtrans/build index 1c065f0b81..6034829445 100755 --- a/packages/x11/lib/xtrans/build +++ b/packages/x11/lib/xtrans/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -11,7 +9,6 @@ cd $PKG_BUILD --sysconfdir=/etc \ make - $MAKEINSTALL mkdir -p $SYSROOT_PREFIX/usr/lib/pkgconfig diff --git a/packages/x11/lib/xtrans/meta b/packages/x11/lib/xtrans/meta new file mode 100644 index 0000000000..26b63e8bb2 --- /dev/null +++ b/packages/x11/lib/xtrans/meta @@ -0,0 +1,16 @@ +PKG_NAME="xtrans" +PKG_VERSION="1.2.5" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/lib/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/lib" +PKG_SHORTDESC="xtrans: Abstract network code for X" +PKG_LONGDESC="Abstract network code for X." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/lib/xtrans/url b/packages/x11/lib/xtrans/url deleted file mode 100644 index 71742bb9c6..0000000000 --- a/packages/x11/lib/xtrans/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/lib/xtrans-1.2.5.tar.bz2 diff --git a/packages/x11/other/fontconfig/build b/packages/x11/other/fontconfig/build index fd91741bcf..da76952f1a 100755 --- a/packages/x11/other/fontconfig/build +++ b/packages/x11/other/fontconfig/build @@ -2,11 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build freetype -$SCRIPTS/build libxml2 -$SCRIPTS/build zlib - # ensure we dont use '-O3' optimization. CFLAGS=`echo $CFLAGS | sed -e "s|-O3|-O2|"` CXXFLAGS=`echo $CXXFLAGS | sed -e "s|-O3|-O2|"` diff --git a/packages/x11/other/fontconfig/install b/packages/x11/other/fontconfig/install index 4021d2c9c4..bb4526d9b8 100755 --- a/packages/x11/other/fontconfig/install +++ b/packages/x11/other/fontconfig/install @@ -2,10 +2,6 @@ . config/options $1 -$SCRIPTS/install zlib -$SCRIPTS/install freetype -$SCRIPTS/install libxml2 - mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/src/.libs/libfontconfig.so* $INSTALL/usr/lib diff --git a/packages/x11/other/fontconfig/meta b/packages/x11/other/fontconfig/meta new file mode 100644 index 0000000000..7b05b9927d --- /dev/null +++ b/packages/x11/other/fontconfig/meta @@ -0,0 +1,16 @@ +PKG_NAME="fontconfig" +PKG_VERSION="2.8.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.fontconfig.org" +PKG_URL="http://fontconfig.org/release/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="freetype libxml2 zlib" +PKG_BUILD_DEPENDS="toolchain util-macros freetype libxml2 zlib" +PKG_PRIORITY="optional" +PKG_SECTION="x11/other" +PKG_SHORTDESC="fontconfig: A library for font customization and configuration" +PKG_LONGDESC="Fontconfig is a library for font customization and configuration." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/other/fontconfig/url b/packages/x11/other/fontconfig/url deleted file mode 100644 index 307a703f05..0000000000 --- a/packages/x11/other/fontconfig/url +++ /dev/null @@ -1 +0,0 @@ -http://fontconfig.org/release/fontconfig-2.8.0.tar.gz \ No newline at end of file diff --git a/packages/x11/other/ratpoison/build b/packages/x11/other/ratpoison/build index 97d695cbc0..0741a42efe 100755 --- a/packages/x11/other/ratpoison/build +++ b/packages/x11/other/ratpoison/build @@ -5,8 +5,6 @@ LDFLAGS="$LDFLAGS -fwhole-program" cd $PKG_BUILD - -$AUTORECONF ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ diff --git a/packages/x11/other/ratpoison/meta b/packages/x11/other/ratpoison/meta index 558a75d092..2b9273cf0b 100644 --- a/packages/x11/other/ratpoison/meta +++ b/packages/x11/other/ratpoison/meta @@ -6,11 +6,11 @@ PKG_LICENSE="GPL" PKG_SITE="http://www.nongnu.org/ratpoison" PKG_URL="http://mirror.lihnidos.org/GNU/savannah/ratpoison/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS="libXft libICE libX11 libXext libXtst libXinerama liberation-fonts-ttf" -PKG_BUILD_DEPENDS="toolchain libXft libICE libX11 libXext libXtst libXinerama" +PKG_BUILD_DEPENDS="toolchain util-macros libXft libICE libX11 libXext libXtst libXinerama" PKG_PRIORITY="optional" PKG_SECTION="x11/other" PKG_SHORTDESC="ratpoison: A window manager that lets you say good-bye to the rodent" PKG_LONGDESC="Ratpoison is a simple window manager with no large library dependencies, no fancy graphics, no window decorations, and no rodent dependence. It is largely modeled after GNU Screen, which has done wonders in the virtual terminal market. All interaction with the window manager is done through keystrokes. Ratpoison has a prefix map to minimize the key clobbering that cripples EMACS and other quality pieces of software. All windows are maximized and kept maximized to avoid wasting precious screen space." PKG_IS_ADDON="no" - +PKG_AUTORECONF="yes" diff --git a/packages/x11/other/ratpoison/patches/ratpoison-1.4.5-getline.diff b/packages/x11/other/ratpoison/patches/ratpoison-1.4.5-getline.patch similarity index 100% rename from packages/x11/other/ratpoison/patches/ratpoison-1.4.5-getline.diff rename to packages/x11/other/ratpoison/patches/ratpoison-1.4.5-getline.patch diff --git a/packages/x11/other/ratpoison/patches/ratpoison-1.4.5-staticgravity.diff b/packages/x11/other/ratpoison/patches/ratpoison-1.4.5-staticgravity.patch similarity index 100% rename from packages/x11/other/ratpoison/patches/ratpoison-1.4.5-staticgravity.diff rename to packages/x11/other/ratpoison/patches/ratpoison-1.4.5-staticgravity.patch diff --git a/packages/x11/proto/bigreqsproto/build b/packages/x11/proto/bigreqsproto/build index 7f8e351572..1944564d96 100755 --- a/packages/x11/proto/bigreqsproto/build +++ b/packages/x11/proto/bigreqsproto/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -12,5 +10,4 @@ cd $PKG_BUILD --localstatedir=/var \ make - $MAKEINSTALL diff --git a/packages/x11/proto/bigreqsproto/meta b/packages/x11/proto/bigreqsproto/meta new file mode 100644 index 0000000000..0537953df5 --- /dev/null +++ b/packages/x11/proto/bigreqsproto/meta @@ -0,0 +1,16 @@ +PKG_NAME="bigreqsproto" +PKG_VERSION="1.1.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/proto/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/proto" +PKG_SHORTDESC="bigreqsproto: BigReqs extension headers" +PKG_LONGDESC="BigReqs extension headers" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/proto/bigreqsproto/url b/packages/x11/proto/bigreqsproto/url deleted file mode 100644 index 8ab5b0b16e..0000000000 --- a/packages/x11/proto/bigreqsproto/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/proto/bigreqsproto-1.1.1.tar.bz2 \ No newline at end of file diff --git a/packages/x11/proto/damageproto/build b/packages/x11/proto/damageproto/build index cb0bb91ee5..1944564d96 100755 --- a/packages/x11/proto/damageproto/build +++ b/packages/x11/proto/damageproto/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -11,6 +9,5 @@ cd $PKG_BUILD --sysconfdir=/etc \ --localstatedir=/var \ -$MAKE - +make $MAKEINSTALL diff --git a/packages/x11/proto/damageproto/meta b/packages/x11/proto/damageproto/meta new file mode 100644 index 0000000000..020c5df214 --- /dev/null +++ b/packages/x11/proto/damageproto/meta @@ -0,0 +1,16 @@ +PKG_NAME="damageproto" +PKG_VERSION="1.2.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/proto/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/proto" +PKG_SHORTDESC="damageproto: Damage extension header" +PKG_LONGDESC="Damage extension headers" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/proto/damageproto/url b/packages/x11/proto/damageproto/url deleted file mode 100644 index 304d5e8ed2..0000000000 --- a/packages/x11/proto/damageproto/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/proto/damageproto-1.2.1.tar.bz2 \ No newline at end of file diff --git a/packages/x11/proto/dri2proto/build b/packages/x11/proto/dri2proto/build index cb0bb91ee5..1944564d96 100755 --- a/packages/x11/proto/dri2proto/build +++ b/packages/x11/proto/dri2proto/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -11,6 +9,5 @@ cd $PKG_BUILD --sysconfdir=/etc \ --localstatedir=/var \ -$MAKE - +make $MAKEINSTALL diff --git a/packages/x11/proto/dri2proto/meta b/packages/x11/proto/dri2proto/meta new file mode 100644 index 0000000000..348ebb7089 --- /dev/null +++ b/packages/x11/proto/dri2proto/meta @@ -0,0 +1,16 @@ +PKG_NAME="dri2proto" +PKG_VERSION="2.3" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/proto/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/proto" +PKG_SHORTDESC="dri2proto: X.Org DRI2 protocol headers" +PKG_LONGDESC="X.Org DRI2 protocol headers." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/proto/dri2proto/url b/packages/x11/proto/dri2proto/url deleted file mode 100644 index 23a11eec8a..0000000000 --- a/packages/x11/proto/dri2proto/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/proto/dri2proto-2.3.tar.bz2 diff --git a/packages/x11/proto/fixesproto/build b/packages/x11/proto/fixesproto/build index cb0bb91ee5..1944564d96 100755 --- a/packages/x11/proto/fixesproto/build +++ b/packages/x11/proto/fixesproto/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -11,6 +9,5 @@ cd $PKG_BUILD --sysconfdir=/etc \ --localstatedir=/var \ -$MAKE - +make $MAKEINSTALL diff --git a/packages/x11/proto/fixesproto/meta b/packages/x11/proto/fixesproto/meta new file mode 100644 index 0000000000..6d5706c4d3 --- /dev/null +++ b/packages/x11/proto/fixesproto/meta @@ -0,0 +1,16 @@ +PKG_NAME="fixesproto" +PKG_VERSION="4.1.2" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/proto/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/proto" +PKG_SHORTDESC="fixesproto: Fixes extension headers" +PKG_LONGDESC="Fixes extension headers" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/proto/fixesproto/url b/packages/x11/proto/fixesproto/url deleted file mode 100644 index 787dcae392..0000000000 --- a/packages/x11/proto/fixesproto/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/proto/fixesproto-4.1.2.tar.bz2 \ No newline at end of file diff --git a/packages/x11/proto/fontcacheproto/build b/packages/x11/proto/fontcacheproto/build index cb0bb91ee5..1944564d96 100755 --- a/packages/x11/proto/fontcacheproto/build +++ b/packages/x11/proto/fontcacheproto/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -11,6 +9,5 @@ cd $PKG_BUILD --sysconfdir=/etc \ --localstatedir=/var \ -$MAKE - +make $MAKEINSTALL diff --git a/packages/x11/proto/fontcacheproto/meta b/packages/x11/proto/fontcacheproto/meta new file mode 100644 index 0000000000..ee35862255 --- /dev/null +++ b/packages/x11/proto/fontcacheproto/meta @@ -0,0 +1,16 @@ +PKG_NAME="fontcacheproto" +PKG_VERSION="0.1.3" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/proto/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/proto" +PKG_SHORTDESC="fontcacheproto: Fontcache extension headers" +PKG_LONGDESC="Fontcache extension headers" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/proto/fontcacheproto/url b/packages/x11/proto/fontcacheproto/url deleted file mode 100644 index 8c1ae576fe..0000000000 --- a/packages/x11/proto/fontcacheproto/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/proto/fontcacheproto-0.1.3.tar.bz2 diff --git a/packages/x11/proto/fontsproto/build b/packages/x11/proto/fontsproto/build index cb0bb91ee5..1944564d96 100755 --- a/packages/x11/proto/fontsproto/build +++ b/packages/x11/proto/fontsproto/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -11,6 +9,5 @@ cd $PKG_BUILD --sysconfdir=/etc \ --localstatedir=/var \ -$MAKE - +make $MAKEINSTALL diff --git a/packages/x11/proto/fontsproto/meta b/packages/x11/proto/fontsproto/meta new file mode 100644 index 0000000000..d285bf184a --- /dev/null +++ b/packages/x11/proto/fontsproto/meta @@ -0,0 +1,16 @@ +PKG_NAME="fontsproto" +PKG_VERSION="2.1.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/proto/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/proto" +PKG_SHORTDESC="fontsproto: Fonts extension headers" +PKG_LONGDESC="Fonts extension headers" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/proto/fontsproto/url b/packages/x11/proto/fontsproto/url deleted file mode 100644 index 9eb6d9e8f4..0000000000 --- a/packages/x11/proto/fontsproto/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/proto/fontsproto-2.1.1.tar.bz2 \ No newline at end of file diff --git a/packages/x11/proto/glproto/build b/packages/x11/proto/glproto/build index a81f6395d6..1944564d96 100755 --- a/packages/x11/proto/glproto/build +++ b/packages/x11/proto/glproto/build @@ -10,5 +10,4 @@ cd $PKG_BUILD --localstatedir=/var \ make - $MAKEINSTALL diff --git a/packages/x11/proto/glproto/meta b/packages/x11/proto/glproto/meta index c4eed50d9a..7e07e049b9 100644 --- a/packages/x11/proto/glproto/meta +++ b/packages/x11/proto/glproto/meta @@ -6,9 +6,11 @@ PKG_LICENSE="OSS" PKG_SITE="http://www.x.org/" PKG_URL="http://xorg.freedesktop.org/archive/individual/proto/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain" +PKG_BUILD_DEPENDS="toolchain util-macros" PKG_PRIORITY="optional" PKG_SECTION="x11/proto" PKG_SHORTDESC="glproto: GL extension headers" PKG_LONGDESC="GL extension headers" PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/proto/inputproto/build b/packages/x11/proto/inputproto/build index cb0bb91ee5..1944564d96 100755 --- a/packages/x11/proto/inputproto/build +++ b/packages/x11/proto/inputproto/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -11,6 +9,5 @@ cd $PKG_BUILD --sysconfdir=/etc \ --localstatedir=/var \ -$MAKE - +make $MAKEINSTALL diff --git a/packages/x11/proto/inputproto/meta b/packages/x11/proto/inputproto/meta new file mode 100644 index 0000000000..d238adf155 --- /dev/null +++ b/packages/x11/proto/inputproto/meta @@ -0,0 +1,16 @@ +PKG_NAME="inputproto" +PKG_VERSION="2.0.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/proto/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/proto" +PKG_SHORTDESC="inputproto: Input extension headers" +PKG_LONGDESC="Input extension headers" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/proto/inputproto/url b/packages/x11/proto/inputproto/url deleted file mode 100644 index 9a2a95f153..0000000000 --- a/packages/x11/proto/inputproto/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/proto/inputproto-2.0.tar.bz2 \ No newline at end of file diff --git a/packages/x11/proto/kbproto/build b/packages/x11/proto/kbproto/build index a81f6395d6..1944564d96 100755 --- a/packages/x11/proto/kbproto/build +++ b/packages/x11/proto/kbproto/build @@ -10,5 +10,4 @@ cd $PKG_BUILD --localstatedir=/var \ make - $MAKEINSTALL diff --git a/packages/x11/proto/kbproto/meta b/packages/x11/proto/kbproto/meta index 31369b99ff..bc2a0be166 100644 --- a/packages/x11/proto/kbproto/meta +++ b/packages/x11/proto/kbproto/meta @@ -6,9 +6,11 @@ PKG_LICENSE="OSS" PKG_SITE="http://www.x.org/" PKG_URL="http://xorg.freedesktop.org/archive/individual/proto/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain" +PKG_BUILD_DEPENDS="toolchain util-macros" PKG_PRIORITY="optional" PKG_SECTION="x11/proto" PKG_SHORTDESC="kbproto: KB extension headers" PKG_LONGDESC="KB extension headers" PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/proto/randrproto/build b/packages/x11/proto/randrproto/build index 1c031ac4c1..581858ec30 100755 --- a/packages/x11/proto/randrproto/build +++ b/packages/x11/proto/randrproto/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -11,5 +9,4 @@ cd $PKG_BUILD --sysconfdir=/etc \ make - $MAKEINSTALL diff --git a/packages/x11/proto/randrproto/meta b/packages/x11/proto/randrproto/meta new file mode 100644 index 0000000000..0aea3fbf20 --- /dev/null +++ b/packages/x11/proto/randrproto/meta @@ -0,0 +1,16 @@ +PKG_NAME="randrproto" +PKG_VERSION="1.3.2" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/proto/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/proto" +PKG_SHORTDESC="randrproto: Randr extension headers" +PKG_LONGDESC="Randr extension headers" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/proto/randrproto/url b/packages/x11/proto/randrproto/url deleted file mode 100644 index f91056bcff..0000000000 --- a/packages/x11/proto/randrproto/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/proto/randrproto-1.3.2.tar.bz2 \ No newline at end of file diff --git a/packages/x11/proto/recordproto/build b/packages/x11/proto/recordproto/build index 1c031ac4c1..581858ec30 100755 --- a/packages/x11/proto/recordproto/build +++ b/packages/x11/proto/recordproto/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -11,5 +9,4 @@ cd $PKG_BUILD --sysconfdir=/etc \ make - $MAKEINSTALL diff --git a/packages/x11/proto/recordproto/meta b/packages/x11/proto/recordproto/meta new file mode 100644 index 0000000000..9a06a91ff4 --- /dev/null +++ b/packages/x11/proto/recordproto/meta @@ -0,0 +1,16 @@ +PKG_NAME="recordproto" +PKG_VERSION="1.14.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/proto/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/proto" +PKG_SHORTDESC="recordproto: Record extension headers" +PKG_LONGDESC="Record extension headers" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/proto/recordproto/url b/packages/x11/proto/recordproto/url deleted file mode 100644 index f86531c12d..0000000000 --- a/packages/x11/proto/recordproto/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/proto/recordproto-1.14.1.tar.bz2 \ No newline at end of file diff --git a/packages/x11/proto/renderproto/build b/packages/x11/proto/renderproto/build index a019cde178..581858ec30 100755 --- a/packages/x11/proto/renderproto/build +++ b/packages/x11/proto/renderproto/build @@ -9,5 +9,4 @@ cd $PKG_BUILD --sysconfdir=/etc \ make - $MAKEINSTALL diff --git a/packages/x11/proto/renderproto/meta b/packages/x11/proto/renderproto/meta index 937c137048..c045c05b2a 100644 --- a/packages/x11/proto/renderproto/meta +++ b/packages/x11/proto/renderproto/meta @@ -6,9 +6,11 @@ PKG_LICENSE="OSS" PKG_SITE="http://www.x.org/" PKG_URL="http://xorg.freedesktop.org/archive/individual/proto/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain" +PKG_BUILD_DEPENDS="toolchain util-macros" PKG_PRIORITY="optional" PKG_SECTION="x11/proto" PKG_SHORTDESC="renderproto: KB extension headers" PKG_LONGDESC="Render extension headers" PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/proto/scrnsaverproto/build b/packages/x11/proto/scrnsaverproto/build index 1c031ac4c1..581858ec30 100755 --- a/packages/x11/proto/scrnsaverproto/build +++ b/packages/x11/proto/scrnsaverproto/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -11,5 +9,4 @@ cd $PKG_BUILD --sysconfdir=/etc \ make - $MAKEINSTALL diff --git a/packages/x11/proto/scrnsaverproto/meta b/packages/x11/proto/scrnsaverproto/meta new file mode 100644 index 0000000000..f2f0aa08dd --- /dev/null +++ b/packages/x11/proto/scrnsaverproto/meta @@ -0,0 +1,16 @@ +PKG_NAME="scrnsaverproto" +PKG_VERSION="1.2.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/proto/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/proto" +PKG_SHORTDESC="scrnsaverproto: ScrnSaver extension headers" +PKG_LONGDESC="ScrnSaver extension headers" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/proto/scrnsaverproto/url b/packages/x11/proto/scrnsaverproto/url deleted file mode 100644 index 8150463c2d..0000000000 --- a/packages/x11/proto/scrnsaverproto/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/proto/scrnsaverproto-1.2.1.tar.bz2 \ No newline at end of file diff --git a/packages/x11/proto/videoproto/build b/packages/x11/proto/videoproto/build index a019cde178..581858ec30 100755 --- a/packages/x11/proto/videoproto/build +++ b/packages/x11/proto/videoproto/build @@ -9,5 +9,4 @@ cd $PKG_BUILD --sysconfdir=/etc \ make - $MAKEINSTALL diff --git a/packages/x11/proto/videoproto/meta b/packages/x11/proto/videoproto/meta index c3225b366f..ca38d3ef46 100644 --- a/packages/x11/proto/videoproto/meta +++ b/packages/x11/proto/videoproto/meta @@ -6,9 +6,11 @@ PKG_LICENSE="OSS" PKG_SITE="http://www.x.org/" PKG_URL="http://xorg.freedesktop.org/archive/individual/proto/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain" +PKG_BUILD_DEPENDS="toolchain util-macros" PKG_PRIORITY="optional" PKG_SECTION="x11/proto" PKG_SHORTDESC="videoproto: KB extension headers" PKG_LONGDESC="Video extension headers" PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/proto/xcb-proto/build b/packages/x11/proto/xcb-proto/build index c4d9d1a80f..655e874cdd 100755 --- a/packages/x11/proto/xcb-proto/build +++ b/packages/x11/proto/xcb-proto/build @@ -2,14 +2,10 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build Python - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ make - $MAKEINSTALL diff --git a/packages/x11/proto/xcb-proto/meta b/packages/x11/proto/xcb-proto/meta new file mode 100644 index 0000000000..6e64373c18 --- /dev/null +++ b/packages/x11/proto/xcb-proto/meta @@ -0,0 +1,16 @@ +PKG_NAME="xcb-proto" +PKG_VERSION="1.6" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xcb.freedesktop.org/dist/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros Python" +PKG_PRIORITY="optional" +PKG_SECTION="x11/proto" +PKG_SHORTDESC="xcb-proto: X C-language Bindings protocol headers" +PKG_LONGDESC="X C-language Bindings protocol headers." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/proto/xcb-proto/url b/packages/x11/proto/xcb-proto/url deleted file mode 100644 index b2cfaf7bb0..0000000000 --- a/packages/x11/proto/xcb-proto/url +++ /dev/null @@ -1 +0,0 @@ -http://xcb.freedesktop.org/dist/xcb-proto-1.6.tar.bz2 \ No newline at end of file diff --git a/packages/x11/proto/xcmiscproto/build b/packages/x11/proto/xcmiscproto/build index 1c031ac4c1..581858ec30 100755 --- a/packages/x11/proto/xcmiscproto/build +++ b/packages/x11/proto/xcmiscproto/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -11,5 +9,4 @@ cd $PKG_BUILD --sysconfdir=/etc \ make - $MAKEINSTALL diff --git a/packages/x11/proto/xcmiscproto/meta b/packages/x11/proto/xcmiscproto/meta new file mode 100644 index 0000000000..4b5d05879e --- /dev/null +++ b/packages/x11/proto/xcmiscproto/meta @@ -0,0 +1,16 @@ +PKG_NAME="xcmiscproto" +PKG_VERSION="1.2.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OpenSource" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/proto/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/proto" +PKG_SHORTDESC="xcmiscproto: XCMisc extension headers" +PKG_LONGDESC="XCMisc extension headers" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/proto/xcmiscproto/url b/packages/x11/proto/xcmiscproto/url deleted file mode 100644 index 1e3bbf7eb4..0000000000 --- a/packages/x11/proto/xcmiscproto/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/proto/xcmiscproto-1.2.1.tar.bz2 \ No newline at end of file diff --git a/packages/x11/proto/xextproto/build b/packages/x11/proto/xextproto/build index a019cde178..581858ec30 100755 --- a/packages/x11/proto/xextproto/build +++ b/packages/x11/proto/xextproto/build @@ -9,5 +9,4 @@ cd $PKG_BUILD --sysconfdir=/etc \ make - $MAKEINSTALL diff --git a/packages/x11/proto/xextproto/meta b/packages/x11/proto/xextproto/meta index 26936fbdf1..925b8ea115 100644 --- a/packages/x11/proto/xextproto/meta +++ b/packages/x11/proto/xextproto/meta @@ -6,9 +6,11 @@ PKG_LICENSE="OSS" PKG_SITE="http://www.x.org/" PKG_URL="http://xorg.freedesktop.org/archive/individual/proto/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain" +PKG_BUILD_DEPENDS="toolchain util-macros" PKG_PRIORITY="optional" PKG_SECTION="x11/proto" PKG_SHORTDESC="xextproto: KB extension headers" PKG_LONGDESC="Xext extension headers" PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/proto/xf86dgaproto/build b/packages/x11/proto/xf86dgaproto/build index 1c031ac4c1..581858ec30 100755 --- a/packages/x11/proto/xf86dgaproto/build +++ b/packages/x11/proto/xf86dgaproto/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -11,5 +9,4 @@ cd $PKG_BUILD --sysconfdir=/etc \ make - $MAKEINSTALL diff --git a/packages/x11/proto/xf86dgaproto/meta b/packages/x11/proto/xf86dgaproto/meta new file mode 100644 index 0000000000..06097238df --- /dev/null +++ b/packages/x11/proto/xf86dgaproto/meta @@ -0,0 +1,16 @@ +PKG_NAME="xf86dgaproto" +PKG_VERSION="2.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/proto/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/proto" +PKG_SHORTDESC="xf86dgaproto: XF86DGA extension headers" +PKG_LONGDESC="XF86DGA extension headers" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/proto/xf86dgaproto/url b/packages/x11/proto/xf86dgaproto/url deleted file mode 100644 index 5d3092dab3..0000000000 --- a/packages/x11/proto/xf86dgaproto/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/proto/xf86dgaproto-2.1.tar.bz2 \ No newline at end of file diff --git a/packages/x11/proto/xf86driproto/build b/packages/x11/proto/xf86driproto/build index 1c031ac4c1..581858ec30 100755 --- a/packages/x11/proto/xf86driproto/build +++ b/packages/x11/proto/xf86driproto/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -11,5 +9,4 @@ cd $PKG_BUILD --sysconfdir=/etc \ make - $MAKEINSTALL diff --git a/packages/x11/proto/xf86driproto/meta b/packages/x11/proto/xf86driproto/meta new file mode 100644 index 0000000000..88f011eb56 --- /dev/null +++ b/packages/x11/proto/xf86driproto/meta @@ -0,0 +1,16 @@ +PKG_NAME="xf86driproto" +PKG_VERSION="2.1.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/proto/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/proto" +PKG_SHORTDESC="xf86driproto: XF86DRI extension headers" +PKG_LONGDESC="XF86DRI extension headers" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/proto/xf86driproto/url b/packages/x11/proto/xf86driproto/url deleted file mode 100644 index 24c98493ea..0000000000 --- a/packages/x11/proto/xf86driproto/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/proto/xf86driproto-2.1.0.tar.bz2 \ No newline at end of file diff --git a/packages/x11/proto/xf86miscproto/build b/packages/x11/proto/xf86miscproto/build index 1c031ac4c1..581858ec30 100755 --- a/packages/x11/proto/xf86miscproto/build +++ b/packages/x11/proto/xf86miscproto/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -11,5 +9,4 @@ cd $PKG_BUILD --sysconfdir=/etc \ make - $MAKEINSTALL diff --git a/packages/x11/proto/xf86miscproto/meta b/packages/x11/proto/xf86miscproto/meta new file mode 100644 index 0000000000..0c6e6f120b --- /dev/null +++ b/packages/x11/proto/xf86miscproto/meta @@ -0,0 +1,16 @@ +PKG_NAME="xf86miscproto" +PKG_VERSION="0.9.3" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/proto/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/proto" +PKG_SHORTDESC="xf86miscproto: XF86Misc extension headers" +PKG_LONGDESC="XF86Misc extension headers" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/proto/xf86miscproto/url b/packages/x11/proto/xf86miscproto/url deleted file mode 100644 index 5a1bc170a8..0000000000 --- a/packages/x11/proto/xf86miscproto/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/proto/xf86miscproto-0.9.3.tar.bz2 diff --git a/packages/x11/proto/xf86vidmodeproto/build b/packages/x11/proto/xf86vidmodeproto/build index 1c031ac4c1..581858ec30 100755 --- a/packages/x11/proto/xf86vidmodeproto/build +++ b/packages/x11/proto/xf86vidmodeproto/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -11,5 +9,4 @@ cd $PKG_BUILD --sysconfdir=/etc \ make - $MAKEINSTALL diff --git a/packages/x11/proto/xf86vidmodeproto/meta b/packages/x11/proto/xf86vidmodeproto/meta new file mode 100644 index 0000000000..7282e21637 --- /dev/null +++ b/packages/x11/proto/xf86vidmodeproto/meta @@ -0,0 +1,16 @@ +PKG_NAME="xf86vidmodeproto" +PKG_VERSION="2.3" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/proto/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/proto" +PKG_SHORTDESC="xf86vidmodeproto: XF86VidMode extension headers" +PKG_LONGDESC="XF86VidMode extension headers" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/proto/xf86vidmodeproto/url b/packages/x11/proto/xf86vidmodeproto/url deleted file mode 100644 index bf77787c37..0000000000 --- a/packages/x11/proto/xf86vidmodeproto/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/proto/xf86vidmodeproto-2.3.tar.bz2 \ No newline at end of file diff --git a/packages/x11/proto/xineramaproto/build b/packages/x11/proto/xineramaproto/build index 1c031ac4c1..581858ec30 100755 --- a/packages/x11/proto/xineramaproto/build +++ b/packages/x11/proto/xineramaproto/build @@ -2,8 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain - cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ @@ -11,5 +9,4 @@ cd $PKG_BUILD --sysconfdir=/etc \ make - $MAKEINSTALL diff --git a/packages/x11/proto/xineramaproto/meta b/packages/x11/proto/xineramaproto/meta new file mode 100644 index 0000000000..3b944d09a1 --- /dev/null +++ b/packages/x11/proto/xineramaproto/meta @@ -0,0 +1,16 @@ +PKG_NAME="xineramaproto" +PKG_VERSION="1.2" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/proto/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain util-macros" +PKG_PRIORITY="optional" +PKG_SECTION="x11/proto" +PKG_SHORTDESC="xineramaproto: Xinerama extension headers" +PKG_LONGDESC="Xinerama extension headers" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/proto/xineramaproto/url b/packages/x11/proto/xineramaproto/url deleted file mode 100644 index 72b50c4754..0000000000 --- a/packages/x11/proto/xineramaproto/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/proto/xineramaproto-1.2.tar.bz2 \ No newline at end of file diff --git a/packages/x11/proto/xproto/build b/packages/x11/proto/xproto/build index 8eb9858414..8fe1e3c994 100755 --- a/packages/x11/proto/xproto/build +++ b/packages/x11/proto/xproto/build @@ -10,5 +10,4 @@ cd $PKG_BUILD --prefix=/usr \ make - $MAKEINSTALL diff --git a/packages/x11/proto/xproto/meta b/packages/x11/proto/xproto/meta index 1010902c21..6b165a34bb 100644 --- a/packages/x11/proto/xproto/meta +++ b/packages/x11/proto/xproto/meta @@ -1,14 +1,16 @@ PKG_NAME="xproto" -PKG_VERSION="7.0.18" +PKG_VERSION="7.0.19" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OSS" PKG_SITE="http://www.x.org/" PKG_URL="http://xorg.freedesktop.org/archive/individual/proto/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain" +PKG_BUILD_DEPENDS="toolchain util-macros" PKG_PRIORITY="optional" PKG_SECTION="x11/proto" PKG_SHORTDESC="xproto: KB extension headers" PKG_LONGDESC="X11 extension headers" PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/toolkits/gdk-pixbuf/build b/packages/x11/toolkits/gdk-pixbuf/build index 81baacbb12..3b9bebb8f5 100755 --- a/packages/x11/toolkits/gdk-pixbuf/build +++ b/packages/x11/toolkits/gdk-pixbuf/build @@ -2,13 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build glib -$SCRIPTS/build tiff -$SCRIPTS/build $LIBJPEG -$SCRIPTS/build libpng -$SCRIPTS/build jasper - cd $PKG_BUILD gio_can_sniff=yes \ ./configure --host=$TARGET_NAME \ diff --git a/packages/x11/toolkits/gdk-pixbuf/install b/packages/x11/toolkits/gdk-pixbuf/install index f92a40193b..2ca2d84e45 100755 --- a/packages/x11/toolkits/gdk-pixbuf/install +++ b/packages/x11/toolkits/gdk-pixbuf/install @@ -2,12 +2,6 @@ . config/options $1 -$SCRIPTS/build glib -$SCRIPTS/build tiff -$SCRIPTS/build $LIBJPEG -$SCRIPTS/build libpng -$SCRIPTS/build jasper - GDK_BINARY_VERSION=`pkg-config gdk-pixbuf-2.0 --variable=gdk_pixbuf_binary_version` GDK_LIB_DIR="gdk-pixbuf-2.0/$GDK_BINARY_VERSION" diff --git a/packages/x11/toolkits/gdk-pixbuf/meta b/packages/x11/toolkits/gdk-pixbuf/meta new file mode 100644 index 0000000000..f342e14927 --- /dev/null +++ b/packages/x11/toolkits/gdk-pixbuf/meta @@ -0,0 +1,16 @@ +PKG_NAME="gdk-pixbuf" +PKG_VERSION="2.22.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.gtk.org/" +PKG_URL="http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.22/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="glib tiff $LIBJPEG libpng jasper" +PKG_BUILD_DEPENDS="toolchain glib tiff $LIBJPEG libpng jasper" +PKG_PRIORITY="optional" +PKG_SECTION="x11/toolkits" +PKG_SHORTDESC="gdk-pixbuf: a GNOME library for image loading and manipulation." +PKG_LONGDESC="gdk-pixbuf (GdkPixbuf) is a GNOME library for image loading and manipulation. The GdkPixbuf documentation contains both the programmer's guide and the API reference." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/toolkits/gdk-pixbuf/url b/packages/x11/toolkits/gdk-pixbuf/url deleted file mode 100644 index 60654ff0f1..0000000000 --- a/packages/x11/toolkits/gdk-pixbuf/url +++ /dev/null @@ -1 +0,0 @@ -http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.22/gdk-pixbuf-2.22.0.tar.bz2 \ No newline at end of file diff --git a/packages/x11/toolkits/gtk+/build b/packages/x11/toolkits/gtk+/build index c35c3ea5b3..b4af1278de 100755 --- a/packages/x11/toolkits/gtk+/build +++ b/packages/x11/toolkits/gtk+/build @@ -2,16 +2,6 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build atk -$SCRIPTS/build libX11 -$SCRIPTS/build libXrandr -$SCRIPTS/build libXi -$SCRIPTS/build glib -$SCRIPTS/build pango -$SCRIPTS/build cairo -$SCRIPTS/build gdk-pixbuf - cd $PKG_BUILD ac_cv_path_GLIB_GENMARSHAL=$ROOT/$TOOLCHAIN/bin/glib-genmarshal \ ./configure --host=$TARGET_NAME \ diff --git a/packages/x11/toolkits/gtk+/install b/packages/x11/toolkits/gtk+/install index 07a76fe47a..062929c83f 100755 --- a/packages/x11/toolkits/gtk+/install +++ b/packages/x11/toolkits/gtk+/install @@ -2,15 +2,6 @@ . config/options $1 -$SCRIPTS/install atk -$SCRIPTS/install libX11 -$SCRIPTS/install libXrandr -$SCRIPTS/install libXi -$SCRIPTS/install glib -$SCRIPTS/install pango -$SCRIPTS/install cairo -$SCRIPTS/install gdk-pixbuf - GTK_BINARY_VERSION=`pkg-config gtk+-2.0 --variable=gtk_binary_version` GTK_LIB_DIR="gtk-2.0/$GTK_BINARY_VERSION" diff --git a/packages/x11/toolkits/gtk+/meta b/packages/x11/toolkits/gtk+/meta new file mode 100644 index 0000000000..4e1ea5d099 --- /dev/null +++ b/packages/x11/toolkits/gtk+/meta @@ -0,0 +1,16 @@ +PKG_NAME="gtk+" +PKG_VERSION="2.22.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.gtk.org/" +PKG_URL="http://ftp.gnome.org/pub/gnome/sources/gtk+/2.22/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="atk libX11 libXrandr libXi glib pango cairo gdk-pixbuf" +PKG_BUILD_DEPENDS="toolchain atk libX11 libXrandr libXi glib pango cairo gdk-pixbuf" +PKG_PRIORITY="optional" +PKG_SECTION="x11/toolkits" +PKG_SHORTDESC="gtk+: The Gimp ToolKit (GTK)" +PKG_LONGDESC="This is GTK+. GTK+, which stands for the Gimp ToolKit, is a library for creating graphical user interfaces for the X Window System. It is designed to be small, efficient, and flexible. GTK+ is written in C with a very object-oriented approach." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/toolkits/gtk+/url b/packages/x11/toolkits/gtk+/url deleted file mode 100644 index d66a4cf260..0000000000 --- a/packages/x11/toolkits/gtk+/url +++ /dev/null @@ -1 +0,0 @@ -http://ftp.gnome.org/pub/gnome/sources/gtk+/2.22/gtk+-2.22.0.tar.bz2 \ No newline at end of file diff --git a/packages/x11/toolkits/gtk-doc/build b/packages/x11/toolkits/gtk-doc/build new file mode 100755 index 0000000000..1c5c55a3a0 --- /dev/null +++ b/packages/x11/toolkits/gtk-doc/build @@ -0,0 +1,7 @@ +#!/bin/sh + +. config/options $1 + +cd $PKG_BUILD + mkdir -p $SYSROOT_PREFIX/usr/share/aclocal + cp gtk-doc.m4 $SYSROOT_PREFIX/usr/share/aclocal diff --git a/packages/x11/toolkits/gtk-doc/meta b/packages/x11/toolkits/gtk-doc/meta new file mode 100644 index 0000000000..60530b4733 --- /dev/null +++ b/packages/x11/toolkits/gtk-doc/meta @@ -0,0 +1,16 @@ +PKG_NAME="gtk-doc" +PKG_VERSION="1.15" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.gtk.org/gtk-doc/" +PKG_URL="http://ftp.acc.umu.se/pub/GNOME/sources/gtk-doc/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="x11/toolkits" +PKG_SHORTDESC="gtk-doc: a project which was started to generate API documentation from comments added to C code." +PKG_LONGDESC="GTK-Doc is a project which was started to generate API documentation from comments added to C code. It is typically used to document the public API of GTK+ and GNOME libraries, but it can also be used to document application code." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/x11/toolkits/pango/build b/packages/x11/toolkits/pango/build index 8d14c00282..cf458d138d 100755 --- a/packages/x11/toolkits/pango/build +++ b/packages/x11/toolkits/pango/build @@ -2,13 +2,8 @@ . config/options $1 -$SCRIPTS/build toolchain -$SCRIPTS/build glib -$SCRIPTS/build cairo -$SCRIPTS/build freetype -$SCRIPTS/build fontconfig -$SCRIPTS/build libX11 -$SCRIPTS/build libXft +# pango fails to build with linker plugin (segfault) + strip_linker_plugin cd $PKG_BUILD ./configure --host=$TARGET_NAME \ diff --git a/packages/x11/toolkits/pango/install b/packages/x11/toolkits/pango/install index 265ecd4004..985d64f649 100755 --- a/packages/x11/toolkits/pango/install +++ b/packages/x11/toolkits/pango/install @@ -2,13 +2,6 @@ . config/options $1 -$SCRIPTS/install glib -$SCRIPTS/install cairo -$SCRIPTS/install freetype -$SCRIPTS/install fontconfig -$SCRIPTS/install libX11 -$SCRIPTS/install libXft - MODULE_VERSION=`pkg-config pango --variable=pango_module_version` mkdir -p $INSTALL/usr/lib diff --git a/packages/x11/toolkits/pango/meta b/packages/x11/toolkits/pango/meta new file mode 100644 index 0000000000..913edef2b1 --- /dev/null +++ b/packages/x11/toolkits/pango/meta @@ -0,0 +1,16 @@ +PKG_NAME="pango" +PKG_VERSION="1.28.3" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.pango.org/" +PKG_URL="http://ftp.gnome.org/pub/gnome/sources/pango/1.28/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="glib cairo freetype fontconfig libX11 libXft" +PKG_BUILD_DEPENDS="toolchain glib cairo freetype fontconfig libX11 libXft" +PKG_PRIORITY="optional" +PKG_SECTION="x11/toolkits" +PKG_SHORTDESC="pango: Library for layout and rendering of internationalized text" +PKG_LONGDESC="The goal of the Pango project is to provide an open-source framework for the layout and rendering of internationalized text. Pango is an offshoot of the GTK+ and GNOME projects, and the initial focus is operation in those environments, however there is nothing fundamentally GTK+ or GNOME specific about Pango. Pango uses Unicode for all of its encoding, and will eventually support output in all the worlds major languages." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/toolkits/pango/url b/packages/x11/toolkits/pango/url deleted file mode 100644 index 5d96504940..0000000000 --- a/packages/x11/toolkits/pango/url +++ /dev/null @@ -1 +0,0 @@ -http://ftp.gnome.org/pub/gnome/sources/pango/1.28/pango-1.28.3.tar.bz2 \ No newline at end of file diff --git a/packages/x11/util/util-macros/meta b/packages/x11/util/util-macros/meta new file mode 100644 index 0000000000..b352f4ca5e --- /dev/null +++ b/packages/x11/util/util-macros/meta @@ -0,0 +1,16 @@ +PKG_NAME="util-macros" +PKG_VERSION="1.11.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/util/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="x11/util" +PKG_SHORTDESC="util-macros: X.org autoconf utilities" +PKG_LONGDESC="X.org autoconf utilities such as M4 macros." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/x11/util/util-macros/url b/packages/x11/util/util-macros/url deleted file mode 100644 index 51820d1b7e..0000000000 --- a/packages/x11/util/util-macros/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/util/util-macros-1.11.0.tar.bz2 \ No newline at end of file diff --git a/packages/x11/xserver/xorg-server/build b/packages/x11/xserver/xorg-server/build index a289ffac39..477f3ba66d 100755 --- a/packages/x11/xserver/xorg-server/build +++ b/packages/x11/xserver/xorg-server/build @@ -6,43 +6,13 @@ XORG_SRC="$PKG_BUILD/hw/xfree86" get_graphicdrivers -$SCRIPTS/build toolchain - -$SCRIPTS/build util-macros -$SCRIPTS/build font-util -$SCRIPTS/build fontsproto -$SCRIPTS/build randrproto -$SCRIPTS/build renderproto -$SCRIPTS/build scrnsaverproto -$SCRIPTS/build videoproto -$SCRIPTS/build inputproto -$SCRIPTS/build xf86dgaproto -$SCRIPTS/build xf86driproto -$SCRIPTS/build xf86miscproto -$SCRIPTS/build glproto -$SCRIPTS/build libpciaccess -$SCRIPTS/build libX11 -$SCRIPTS/build libXfont -$SCRIPTS/build libxkbfile -$SCRIPTS/build $LIBDRM -$SCRIPTS/build $MESA -$SCRIPTS/build openssl -$SCRIPTS/build freetype -$SCRIPTS/build pixman -$SCRIPTS/build fontsproto -$SCRIPTS/build udev - if [ "$XINERAMA_SUPPORT" = "yes" ]; then - $SCRIPTS/build libXinerama XORG_XINERAMA="--enable-xinerama" else XORG_XINERAMA="--disable-xinerama" fi cd $PKG_BUILD - -$AUTORECONF - ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ diff --git a/packages/x11/xserver/xorg-server/install b/packages/x11/xserver/xorg-server/install index 658fc6bd09..768fb4ad6e 100755 --- a/packages/x11/xserver/xorg-server/install +++ b/packages/x11/xserver/xorg-server/install @@ -4,18 +4,6 @@ get_graphicdrivers -$SCRIPTS/install libpciaccess -$SCRIPTS/install freetype -$SCRIPTS/install openssl -$SCRIPTS/install libX11 -$SCRIPTS/install libXfont -$SCRIPTS/install $LIBDRM -$SCRIPTS/install $MESA -$SCRIPTS/install pixman -$SCRIPTS/install udev - -[ "$XINERAMA_SUPPORT" = "yes" ] && $SCRIPTS/install libXinerama - XORG_SRC="$PKG_BUILD/hw/xfree86" XORG_DST="$INSTALL/$XORG_PATH_MODULES" @@ -54,30 +42,6 @@ mkdir -p $INSTALL/usr/lib/xorg mkdir -p $INSTALL/usr/share/X11/xorg.conf.d cp $PKG_BUILD/config/10-evdev.conf $INSTALL/usr/share/X11/xorg.conf.d -#Fonts - $SCRIPTS/install encodings - $SCRIPTS/install font-xfree86-type1 - $SCRIPTS/install font-bitstream-type1 - $SCRIPTS/install font-misc-misc - -#Server - $SCRIPTS/install xkeyboard-config - $SCRIPTS/install xkbcomp - -#Drivers - $SCRIPTS/install xf86-input-evdev -# $SCRIPTS/install xf86-input-synaptics -# $SCRIPTS/install xf86-input-wacom - - for drv in $XORG_DRIVERS; do - $SCRIPTS/install xf86-video-$drv - done - -# Tools - $SCRIPTS/install pciutils - $SCRIPTS/install ratpoison - $SCRIPTS/install xrandr - if [ "$DEVTOOLS" = yes ]; then cp $XORG_SRC/utils/cvt/cvt $INSTALL/usr/bin cp $XORG_SRC/utils/gtf/gtf $INSTALL/usr/bin diff --git a/packages/x11/xserver/xorg-server/meta b/packages/x11/xserver/xorg-server/meta new file mode 100644 index 0000000000..a638143e2a --- /dev/null +++ b/packages/x11/xserver/xorg-server/meta @@ -0,0 +1,39 @@ +PKG_NAME="xorg-server" +PKG_VERSION="1.9.2" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.X.org" +PKG_URL="http://xorg.freedesktop.org/archive/individual/xserver/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libpciaccess freetype openssl libX11 libXfont libdrm Mesa pixman udev" +PKG_BUILD_DEPENDS="toolchain util-macros font-util fontsproto randrproto renderproto scrnsaverproto videoproto inputproto xf86dgaproto xf86driproto xf86miscproto glproto libpciaccess libX11 libXfont libxkbfile libdrm Mesa-GL openssl freetype pixman fontsproto udev" +PKG_PRIORITY="optional" +PKG_SECTION="x11/xserver" +PKG_SHORTDESC="xorg-server: The Xorg X server" +PKG_LONGDESC="Xorg is a full featured X server that was originally designed for UNIX and UNIX-like operating systems running on Intel x86 hardware." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" + +get_graphicdrivers +if [ "$XINERAMA_SUPPORT" = "yes" ]; then + PKG_DEPENDS="$PKG_DEPENDS libXinerama" + PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libXinerama" +fi + +# Additional packages we need for using xorg-server: +# Fonts + PKG_DEPENDS="$PKG_DEPENDS encodings font-xfree86-type1 font-bitstream-type1 font-misc-misc" + +# Server + PKG_DEPENDS="$PKG_DEPENDS xkeyboard-config xkbcomp" + +# Drivers + PKG_DEPENDS="$PKG_DEPENDS xf86-input-evdev" # xf86-input-synaptics xf86-input-wacom + + for drv in $XORG_DRIVERS; do + PKG_DEPENDS="$PKG_DEPENDS xf86-video-$drv" + done + +# Tools + PKG_DEPENDS="$PKG_DEPENDS pciutils ratpoison xrandr" diff --git a/packages/x11/xserver/xorg-server/patches/xorg-server-1.8.2-pkg_config.diff b/packages/x11/xserver/xorg-server/patches/xorg-server-1.9.2-05_pkg_config.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xorg-server-1.8.2-pkg_config.diff rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.9.2-05_pkg_config.patch diff --git a/packages/x11/xserver/xorg-server/patches/cache-xkbcomp-output-for-fast-start-up.diff b/packages/x11/xserver/xorg-server/patches/xorg-server-1.9.2-10_cache_xkbcomp_output_for_fast_start_up.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/cache-xkbcomp-output-for-fast-start-up.diff rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.9.2-10_cache_xkbcomp_output_for_fast_start_up.patch diff --git a/packages/x11/xserver/xorg-server/patches/use-sloppy-heuristic-first-for-initial-mode.diff b/packages/x11/xserver/xorg-server/patches/xorg-server-1.9.2-11_use_sloppy_heuristic_first_for_initial_mode.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/use-sloppy-heuristic-first-for-initial-mode.diff rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.9.2-11_use_sloppy_heuristic_first_for_initial_mode.patch diff --git a/packages/x11/xserver/xorg-server/patches/xserver-1.6.1-nouveau.diff b/packages/x11/xserver/xorg-server/patches/xorg-server-1.9.2-12_nouveau.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xserver-1.6.1-nouveau.diff rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.9.2-12_nouveau.patch diff --git a/packages/x11/xserver/xorg-server/patches/20_extra_modelines_fromxorg.diff b/packages/x11/xserver/xorg-server/patches/xorg-server-1.9.2-20_extra_modelines_fromxorg.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/20_extra_modelines_fromxorg.diff rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.9.2-20_extra_modelines_fromxorg.patch diff --git a/packages/x11/xserver/xorg-server/patches/xorg-x11-nonroot-vesa.diff b/packages/x11/xserver/xorg-server/patches/xorg-server-1.9.2-21_x11_nonroot-vesa.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xorg-x11-nonroot-vesa.diff rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.9.2-21_x11_nonroot-vesa.patch diff --git a/packages/x11/xserver/xorg-server/patches/xserver-1.5.0-bg-none-root.diff b/packages/x11/xserver/xorg-server/patches/xorg-server-1.9.2-22_bg_none_root.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xserver-1.5.0-bg-none-root.diff rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.9.2-22_bg_none_root.patch diff --git a/packages/x11/xserver/xorg-server/patches/do-not-zap-xserver.diff b/packages/x11/xserver/xorg-server/patches/xorg-server-1.9.2-22_do_not_zap_xserver.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/do-not-zap-xserver.diff rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.9.2-22_do_not_zap_xserver.patch diff --git a/packages/x11/xserver/xorg-server/patches/xserver-1.6.0-less-acpi-brokenness.diff b/packages/x11/xserver/xorg-server/patches/xorg-server-1.9.2-25_less_acpi_brokenness.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xserver-1.6.0-less-acpi-brokenness.diff rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.9.2-25_less_acpi_brokenness.patch diff --git a/packages/x11/xserver/xorg-server/url b/packages/x11/xserver/xorg-server/url deleted file mode 100644 index 14160a1005..0000000000 --- a/packages/x11/xserver/xorg-server/url +++ /dev/null @@ -1 +0,0 @@ -http://xorg.freedesktop.org/archive/individual/xserver/xorg-server-1.9.2.tar.bz2 \ No newline at end of file diff --git a/projects/ATV/linux/linux.i386.conf b/projects/ATV/linux/linux.i386.conf index a2d5b2eb7d..02b396ffe8 100644 --- a/projects/ATV/linux/linux.i386.conf +++ b/projects/ATV/linux/linux.i386.conf @@ -1,6 +1,6 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.36 +# Linux/i386 2.6.37-rc3 Kernel Configuration # # CONFIG_64BIT is not set CONFIG_X86_32=y @@ -43,21 +43,22 @@ CONFIG_ARCH_POPULATES_NODE_MAP=y # CONFIG_AUDIT_ARCH is not set CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y -CONFIG_HAVE_EARLY_RES=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y -CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_USE_GENERIC_SMP_HELPERS=y +CONFIG_X86_32_SMP=y +CONFIG_X86_HT=y +CONFIG_X86_TRAMPOLINE=y +CONFIG_X86_32_LAZY_GS=y CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-ecx -fcall-saved-edx" CONFIG_KTIME_SCALAR=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" CONFIG_CONSTRUCTORS=y +CONFIG_HAVE_IRQ_WORK=y +CONFIG_IRQ_WORK=y # # General setup # CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_LOCK_KERNEL=y CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_CROSS_COMPILE="" CONFIG_LOCALVERSION="" @@ -79,13 +80,27 @@ CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set # CONFIG_TASKSTATS is not set # CONFIG_AUDIT is not set +CONFIG_HAVE_GENERIC_HARDIRQS=y + +# +# IRQ subsystem +# +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y +# CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED is not set +CONFIG_HAVE_SPARSE_IRQ=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_PENDING_IRQ=y +# CONFIG_AUTO_IRQ_AFFINITY is not set +# CONFIG_IRQ_PER_CPU is not set +# CONFIG_HARDIRQS_SW_RESEND is not set +# CONFIG_SPARSE_IRQ is not set # # RCU Subsystem # -CONFIG_TREE_RCU=y -# CONFIG_TREE_PREEMPT_RCU is not set -# CONFIG_TINY_RCU is not set +CONFIG_TREE_PREEMPT_RCU=y +CONFIG_PREEMPT_RCU=y # CONFIG_RCU_TRACE is not set CONFIG_RCU_FANOUT=32 # CONFIG_RCU_FANOUT_EXACT is not set @@ -96,18 +111,26 @@ CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y CONFIG_CGROUPS=y # CONFIG_CGROUP_DEBUG is not set CONFIG_CGROUP_NS=y -CONFIG_CGROUP_FREEZER=y +# CONFIG_CGROUP_FREEZER is not set # CONFIG_CGROUP_DEVICE is not set -CONFIG_CPUSETS=y -CONFIG_PROC_PID_CPUSET=y -CONFIG_CGROUP_CPUACCT=y +# CONFIG_CPUSETS is not set +# CONFIG_CGROUP_CPUACCT is not set CONFIG_RESOURCE_COUNTERS=y # CONFIG_CGROUP_MEM_RES_CTLR is not set -# CONFIG_CGROUP_SCHED is not set -# CONFIG_BLK_CGROUP is not set -# CONFIG_SYSFS_DEPRECATED_V2 is not set +CONFIG_CGROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +CONFIG_RT_GROUP_SCHED=y +CONFIG_BLK_CGROUP=y +# CONFIG_DEBUG_BLK_CGROUP is not set +CONFIG_NAMESPACES=y +CONFIG_UTS_NS=y +CONFIG_IPC_NS=y +CONFIG_USER_NS=y +CONFIG_PID_NS=y +CONFIG_NET_NS=y +CONFIG_SCHED_AUTOGROUP=y +# CONFIG_SYSFS_DEPRECATED is not set # CONFIG_RELAY is not set -# CONFIG_NAMESPACES is not set CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE=" " CONFIG_INITRAMFS_ROOT_UID=0 @@ -117,7 +140,7 @@ CONFIG_INITRAMFS_ROOT_GID=0 # CONFIG_RD_LZMA is not set # CONFIG_RD_LZO is not set CONFIG_INITRAMFS_COMPRESSION_NONE=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL=y CONFIG_ANON_INODES=y CONFIG_EMBEDDED=y @@ -146,14 +169,14 @@ CONFIG_PERF_EVENTS=y # CONFIG_PERF_COUNTERS is not set # CONFIG_VM_EVENT_COUNTERS is not set CONFIG_PCI_QUIRKS=y -# CONFIG_SLUB_DEBUG is not set # CONFIG_COMPAT_BRK is not set # CONFIG_SLAB is not set -CONFIG_SLUB=y -# CONFIG_SLOB is not set +# CONFIG_SLUB is not set +CONFIG_SLOB=y # CONFIG_PROFILING is not set CONFIG_HAVE_OPROFILE=y # CONFIG_KPROBES is not set +CONFIG_JUMP_LABEL=y CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y CONFIG_HAVE_IOREMAP_PROT=y CONFIG_HAVE_KPROBES=y @@ -167,6 +190,7 @@ CONFIG_HAVE_HW_BREAKPOINT=y CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y CONFIG_HAVE_USER_RETURN_NOTIFIER=y CONFIG_HAVE_PERF_EVENTS_NMI=y +CONFIG_HAVE_ARCH_JUMP_LABEL=y # # GCOV-based kernel profiling @@ -180,10 +204,12 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_MODULE_FORCE_UNLOAD is not set # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_STOP_MACHINE=y CONFIG_BLOCK=y CONFIG_LBDAF=y CONFIG_BLK_DEV_BSG=y # CONFIG_BLK_DEV_INTEGRITY is not set +# CONFIG_BLK_DEV_THROTTLING is not set # # IO Schedulers @@ -191,6 +217,7 @@ CONFIG_BLK_DEV_BSG=y CONFIG_IOSCHED_NOOP=y # CONFIG_IOSCHED_DEADLINE is not set CONFIG_IOSCHED_CFQ=y +# CONFIG_CFQ_GROUP_IOSCHED is not set CONFIG_DEFAULT_CFQ=y # CONFIG_DEFAULT_NOOP is not set CONFIG_DEFAULT_IOSCHED="cfq" @@ -222,8 +249,8 @@ CONFIG_DEFAULT_IOSCHED="cfq" # CONFIG_INLINE_WRITE_UNLOCK_BH is not set # CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set # CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set -# CONFIG_MUTEX_SPIN_ON_OWNER is not set -CONFIG_FREEZER=y +CONFIG_MUTEX_SPIN_ON_OWNER=y +# CONFIG_FREEZER is not set # # Processor type and features @@ -232,10 +259,11 @@ CONFIG_TICK_ONESHOT=y # CONFIG_NO_HZ is not set CONFIG_HIGH_RES_TIMERS=y CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -# CONFIG_SMP is not set -# CONFIG_SPARSE_IRQ is not set +CONFIG_SMP=y CONFIG_X86_MPPARSE=y +# CONFIG_X86_BIGSMP is not set # CONFIG_X86_EXTENDED_PLATFORM is not set +CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y CONFIG_SCHED_OMIT_FRAME_POINTER=y # CONFIG_PARAVIRT_GUEST is not set CONFIG_NO_BOOTMEM=y @@ -293,12 +321,13 @@ CONFIG_HPET_EMULATE_RTC=y CONFIG_DMI=y # CONFIG_IOMMU_HELPER is not set # CONFIG_IOMMU_API is not set -CONFIG_NR_CPUS=1 +CONFIG_NR_CPUS=2 +# CONFIG_SCHED_SMT is not set +# CONFIG_SCHED_MC is not set +CONFIG_IRQ_TIME_ACCOUNTING=y # CONFIG_PREEMPT_NONE is not set # CONFIG_PREEMPT_VOLUNTARY is not set CONFIG_PREEMPT=y -CONFIG_X86_UP_APIC=y -CONFIG_X86_UP_IOAPIC=y CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y @@ -327,17 +356,19 @@ CONFIG_VMSPLIT_3G_OPT=y CONFIG_PAGE_OFFSET=0xB0000000 # CONFIG_X86_PAE is not set # CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set -CONFIG_NEED_NODE_MEMMAP_SIZE=y +# CONFIG_ARCH_DMA_ADDR_T_64BIT is not set CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_ARCH_SELECT_MEMORY_MODEL=y CONFIG_ILLEGAL_POINTER_VALUE=0 CONFIG_SELECT_MEMORY_MODEL=y -# CONFIG_FLATMEM_MANUAL is not set -CONFIG_SPARSEMEM_MANUAL=y -CONFIG_SPARSEMEM=y -CONFIG_HAVE_MEMORY_PRESENT=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_SPARSEMEM_STATIC=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_PAGEFLAGS_EXTENDED=y CONFIG_SPLIT_PTLOCK_CPUS=4 # CONFIG_PHYS_ADDR_T_64BIT is not set CONFIG_ZONE_DMA_FLAG=1 @@ -345,8 +376,10 @@ CONFIG_BOUNCE=y CONFIG_VIRT_TO_BUS=y # CONFIG_KSM is not set CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y +# CONFIG_MEMORY_FAILURE is not set # CONFIG_X86_CHECK_BIOS_CORRUPTION is not set -# CONFIG_X86_RESERVE_LOW_64K is not set +CONFIG_X86_RESERVE_LOW=64 # CONFIG_MATH_EMULATION is not set CONFIG_MTRR=y CONFIG_MTRR_SANITIZER=y @@ -356,7 +389,7 @@ CONFIG_X86_PAT=y CONFIG_ARCH_USES_PG_UNCACHED=y CONFIG_EFI=y CONFIG_SECCOMP=y -CONFIG_CC_STACKPROTECTOR=y +# CONFIG_CC_STACKPROTECTOR is not set # CONFIG_HZ_100 is not set # CONFIG_HZ_250 is not set CONFIG_HZ_300=y @@ -367,6 +400,7 @@ CONFIG_SCHED_HRTICK=y CONFIG_PHYSICAL_START=0x1000000 # CONFIG_RELOCATABLE is not set CONFIG_PHYSICAL_ALIGN=0x1000000 +# CONFIG_HOTPLUG_CPU is not set # CONFIG_COMPAT_VDSO is not set CONFIG_CMDLINE_BOOL=y CONFIG_CMDLINE="fastboot root=/dev/ram0 rdinit=/init" @@ -383,12 +417,12 @@ CONFIG_PM=y CONFIG_ACPI=y # CONFIG_ACPI_PROCFS is not set # CONFIG_ACPI_PROCFS_POWER is not set -CONFIG_ACPI_SYSFS_POWER=y # CONFIG_ACPI_EC_DEBUGFS is not set # CONFIG_ACPI_PROC_EVENT is not set # CONFIG_ACPI_AC is not set # CONFIG_ACPI_BATTERY is not set # CONFIG_ACPI_BUTTON is not set +CONFIG_ACPI_VIDEO=y CONFIG_ACPI_FAN=y # CONFIG_ACPI_DOCK is not set CONFIG_ACPI_PROCESSOR=y @@ -418,8 +452,8 @@ CONFIG_CPU_FREQ_TABLE=y CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_GOV_USERSPACE is not set CONFIG_CPU_FREQ_GOV_ONDEMAND=y # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set @@ -447,7 +481,7 @@ CONFIG_X86_ACPI_CPUFREQ=y # CONFIG_X86_SPEEDSTEP_LIB is not set CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_GOV_LADDER=y -# CONFIG_INTEL_IDLE is not set +CONFIG_INTEL_IDLE=y # # Bus options (PCI etc.) @@ -490,6 +524,7 @@ CONFIG_HAVE_AOUT=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set CONFIG_HAVE_ATOMIC_IOMAP=y +CONFIG_HAVE_TEXT_POKE_SMP=y CONFIG_NET=y # @@ -509,7 +544,7 @@ CONFIG_IP_MULTICAST=y CONFIG_IP_FIB_HASH=y # CONFIG_IP_PNP is not set # CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set +# CONFIG_NET_IPGRE_DEMUX is not set # CONFIG_IP_MROUTE is not set # CONFIG_ARPD is not set # CONFIG_SYN_COOKIES is not set @@ -528,7 +563,7 @@ CONFIG_INET_TCP_DIAG=y CONFIG_TCP_CONG_CUBIC=y CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=m +CONFIG_IPV6=y # CONFIG_IPV6_PRIVACY is not set # CONFIG_IPV6_ROUTER_PREF is not set # CONFIG_IPV6_OPTIMISTIC_DAD is not set @@ -562,9 +597,6 @@ CONFIG_IPV6_NDISC_NODETYPE=y # CONFIG_VLAN_8021Q is not set # CONFIG_DECNET is not set # CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set # CONFIG_LAPB is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set @@ -573,6 +605,7 @@ CONFIG_IPV6_NDISC_NODETYPE=y # CONFIG_NET_SCHED is not set # CONFIG_DCB is not set CONFIG_DNS_RESOLVER=y +CONFIG_RPS=y # # Network testing @@ -584,8 +617,10 @@ CONFIG_DNS_RESOLVER=y # CONFIG_BT is not set # CONFIG_AF_RXRPC is not set CONFIG_WIRELESS=y +CONFIG_WIRELESS_EXT=y CONFIG_WEXT_CORE=y CONFIG_WEXT_PROC=y +CONFIG_WEXT_PRIV=y CONFIG_CFG80211=y # CONFIG_NL80211_TESTMODE is not set # CONFIG_CFG80211_DEVELOPER_WARNINGS is not set @@ -612,6 +647,7 @@ CONFIG_RFKILL_LEDS=y CONFIG_RFKILL_INPUT=y # CONFIG_NET_9P is not set # CONFIG_CAIF is not set +# CONFIG_CEPH_LIB is not set # # Device Drivers @@ -662,6 +698,7 @@ CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set # CONFIG_BLK_DEV_HD is not set +# CONFIG_BLK_DEV_RBD is not set # CONFIG_MISC_DEVICES is not set CONFIG_HAVE_IDE=y # CONFIG_IDE is not set @@ -806,20 +843,11 @@ CONFIG_PATA_ACPI=y # # IEEE 1394 (FireWire) support # - -# -# You can enable one or both FireWire driver stacks. -# - -# -# The newer stack is recommended. -# CONFIG_FIREWIRE=m CONFIG_FIREWIRE_OHCI=m CONFIG_FIREWIRE_OHCI_DEBUG=y CONFIG_FIREWIRE_SBP2=m # CONFIG_FIREWIRE_NET is not set -# CONFIG_IEEE1394 is not set # CONFIG_FIREWIRE_NOSY is not set # CONFIG_I2O is not set # CONFIG_MACINTOSH_DRIVERS is not set @@ -832,9 +860,9 @@ CONFIG_NETDEVICES=y # CONFIG_VETH is not set # CONFIG_NET_SB1000 is not set # CONFIG_ARCNET is not set +CONFIG_MII=y # CONFIG_PHYLIB is not set CONFIG_NET_ETHERNET=y -CONFIG_MII=y # CONFIG_HAPPYMEAL is not set # CONFIG_SUNGEM is not set # CONFIG_CASSINI is not set @@ -886,7 +914,7 @@ CONFIG_WLAN=y # CONFIG_ATMEL is not set # CONFIG_AT76C50X_USB is not set # CONFIG_PRISM54 is not set -# CONFIG_USB_ZD1201 is not set +CONFIG_USB_ZD1201=m # CONFIG_USB_NET_RNDIS_WLAN is not set # CONFIG_RTL8180 is not set # CONFIG_RTL8187 is not set @@ -894,13 +922,7 @@ CONFIG_WLAN=y # CONFIG_MAC80211_HWSIM is not set # CONFIG_MWL8K is not set # CONFIG_ATH_COMMON is not set -CONFIG_B43=m -CONFIG_B43_PCI_AUTOSELECT=y -CONFIG_B43_PCICORE_AUTOSELECT=y -CONFIG_B43_PIO=y -CONFIG_B43_PHY_LP=y -CONFIG_B43_LEDS=y -# CONFIG_B43_DEBUG is not set +# CONFIG_B43 is not set # CONFIG_B43LEGACY is not set # CONFIG_HOSTAP is not set # CONFIG_IPW2100 is not set @@ -910,6 +932,7 @@ CONFIG_B43_LEDS=y # CONFIG_HERMES is not set # CONFIG_P54_COMMON is not set # CONFIG_RT2X00 is not set +# CONFIG_WL1251 is not set # CONFIG_WL12XX is not set # CONFIG_ZD1211RW is not set @@ -1049,6 +1072,7 @@ CONFIG_SERIO_I8042=y CONFIG_SERIO_LIBPS2=y # CONFIG_SERIO_RAW is not set # CONFIG_SERIO_ALTERA_PS2 is not set +# CONFIG_SERIO_PS2MULT is not set # CONFIG_GAMEPORT is not set # @@ -1088,6 +1112,7 @@ CONFIG_SERIAL_CORE=y CONFIG_UNIX98_PTYS=y # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set # CONFIG_LEGACY_PTYS is not set +# CONFIG_TTY_PRINTK is not set # CONFIG_IPMI_HANDLER is not set # CONFIG_HW_RANDOM is not set CONFIG_NVRAM=y @@ -1111,7 +1136,7 @@ CONFIG_I2C_BOARDINFO=y CONFIG_I2C_CHARDEV=m # CONFIG_I2C_MUX is not set CONFIG_I2C_HELPER_AUTO=y -CONFIG_I2C_ALGOBIT=m +CONFIG_I2C_ALGOBIT=y # # I2C Hardware Bus support @@ -1143,6 +1168,7 @@ CONFIG_I2C_I801=y # # I2C system bus drivers (mostly embedded / system-on-chip) # +# CONFIG_I2C_INTEL_MID is not set # CONFIG_I2C_OCORES is not set # CONFIG_I2C_PCA_PLATFORM is not set # CONFIG_I2C_SIMTEC is not set @@ -1176,8 +1202,8 @@ CONFIG_POWER_SUPPLY=y # CONFIG_POWER_SUPPLY_DEBUG is not set # CONFIG_PDA_POWER is not set # CONFIG_TEST_POWER is not set -# CONFIG_BATTERY_DS2760 is not set # CONFIG_BATTERY_DS2782 is not set +# CONFIG_BATTERY_BQ20Z75 is not set # CONFIG_BATTERY_BQ27x00 is not set # CONFIG_BATTERY_MAX17040 is not set # CONFIG_HWMON is not set @@ -1190,10 +1216,9 @@ CONFIG_SSB_POSSIBLE=y # CONFIG_SSB=m CONFIG_SSB_SPROM=y -CONFIG_SSB_BLOCKIO=y CONFIG_SSB_PCIHOST_POSSIBLE=y CONFIG_SSB_PCIHOST=y -CONFIG_SSB_B43_PCI_BRIDGE=y +# CONFIG_SSB_B43_PCI_BRIDGE is not set # CONFIG_SSB_SILENT is not set # CONFIG_SSB_DEBUG is not set CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y @@ -1206,8 +1231,8 @@ CONFIG_MEDIA_SUPPORT=m # Multimedia core support # # CONFIG_VIDEO_DEV is not set -# CONFIG_DVB_CORE is not set -# CONFIG_VIDEO_MEDIA is not set +CONFIG_DVB_CORE=m +CONFIG_VIDEO_MEDIA=m # # Multimedia drivers @@ -1221,22 +1246,243 @@ CONFIG_IR_RC5_DECODER=m CONFIG_IR_RC6_DECODER=m CONFIG_IR_JVC_DECODER=m CONFIG_IR_SONY_DECODER=m +CONFIG_IR_RC5_SZ_DECODER=m # CONFIG_IR_LIRC_CODEC is not set -# CONFIG_IR_IMON is not set -# CONFIG_IR_NUVOTON is not set -CONFIG_IR_MCEUSB=m # CONFIG_IR_ENE is not set +# CONFIG_IR_IMON is not set +CONFIG_IR_MCEUSB=m +# CONFIG_IR_NUVOTON is not set # CONFIG_IR_STREAMZAP is not set +# CONFIG_MEDIA_ATTACH is not set +CONFIG_MEDIA_TUNER=m +CONFIG_MEDIA_TUNER_CUSTOMISE=y +# CONFIG_MEDIA_TUNER_SIMPLE is not set +# CONFIG_MEDIA_TUNER_TDA8290 is not set +# CONFIG_MEDIA_TUNER_TDA827X is not set +# CONFIG_MEDIA_TUNER_TDA18271 is not set +# CONFIG_MEDIA_TUNER_TDA9887 is not set +# CONFIG_MEDIA_TUNER_TEA5761 is not set +# CONFIG_MEDIA_TUNER_TEA5767 is not set +# CONFIG_MEDIA_TUNER_MT20XX is not set +# CONFIG_MEDIA_TUNER_MT2060 is not set +# CONFIG_MEDIA_TUNER_MT2266 is not set +# CONFIG_MEDIA_TUNER_MT2131 is not set +# CONFIG_MEDIA_TUNER_QT1010 is not set +# CONFIG_MEDIA_TUNER_XC2028 is not set +# CONFIG_MEDIA_TUNER_XC5000 is not set +# CONFIG_MEDIA_TUNER_MXL5005S is not set +# CONFIG_MEDIA_TUNER_MXL5007T is not set +# CONFIG_MEDIA_TUNER_MC44S803 is not set +# CONFIG_MEDIA_TUNER_MAX2165 is not set +# CONFIG_MEDIA_TUNER_TDA18218 is not set +CONFIG_DVB_MAX_ADAPTERS=2 +# CONFIG_DVB_DYNAMIC_MINORS is not set +CONFIG_DVB_CAPTURE_DRIVERS=y + +# +# Supported SAA7146 based PCI Adapters +# +# CONFIG_TTPCI_EEPROM is not set +# CONFIG_DVB_BUDGET_CORE is not set + +# +# Supported USB Adapters +# +CONFIG_DVB_USB=m +# CONFIG_DVB_USB_DEBUG is not set +# CONFIG_DVB_USB_A800 is not set +# CONFIG_DVB_USB_DIBUSB_MB is not set +# CONFIG_DVB_USB_DIBUSB_MC is not set +# CONFIG_DVB_USB_DIB0700 is not set +# CONFIG_DVB_USB_UMT_010 is not set +# CONFIG_DVB_USB_CXUSB is not set +# CONFIG_DVB_USB_M920X is not set +# CONFIG_DVB_USB_GL861 is not set +# CONFIG_DVB_USB_AU6610 is not set +# CONFIG_DVB_USB_DIGITV is not set +# CONFIG_DVB_USB_VP7045 is not set +# CONFIG_DVB_USB_VP702X is not set +# CONFIG_DVB_USB_GP8PSK is not set +# CONFIG_DVB_USB_NOVA_T_USB2 is not set +# CONFIG_DVB_USB_TTUSB2 is not set +# CONFIG_DVB_USB_DTT200U is not set +# CONFIG_DVB_USB_OPERA1 is not set +# CONFIG_DVB_USB_AF9005 is not set +# CONFIG_DVB_USB_DW2102 is not set +# CONFIG_DVB_USB_CINERGY_T2 is not set +CONFIG_DVB_USB_ANYSEE=m +# CONFIG_DVB_USB_DTV5100 is not set +# CONFIG_DVB_USB_AF9015 is not set +# CONFIG_DVB_USB_CE6230 is not set +# CONFIG_DVB_USB_FRIIO is not set +# CONFIG_DVB_USB_EC168 is not set +# CONFIG_DVB_USB_AZ6027 is not set +# CONFIG_DVB_USB_LME2510 is not set +# CONFIG_DVB_TTUSB_BUDGET is not set +# CONFIG_DVB_TTUSB_DEC is not set +# CONFIG_SMS_SIANO_MDTV is not set + +# +# Supported FlexCopII (B2C2) Adapters +# +# CONFIG_DVB_B2C2_FLEXCOP is not set + +# +# Supported BT878 Adapters +# + +# +# Supported Pluto2 Adapters +# +# CONFIG_DVB_PLUTO2 is not set + +# +# Supported SDMC DM1105 Adapters +# +# CONFIG_DVB_DM1105 is not set +# CONFIG_DVB_FIREDTV is not set + +# +# Supported Earthsoft PT1 Adapters +# +# CONFIG_DVB_PT1 is not set + +# +# Supported Mantis Adapters +# +# CONFIG_MANTIS_CORE is not set + +# +# Supported nGene Adapters +# +# CONFIG_DVB_NGENE is not set + +# +# Supported DVB Frontends +# +CONFIG_DVB_FE_CUSTOMISE=y + +# +# Customise DVB Frontends +# + +# +# Multistandard (satellite) frontends +# +# CONFIG_DVB_STB0899 is not set +# CONFIG_DVB_STB6100 is not set +# CONFIG_DVB_STV090x is not set +# CONFIG_DVB_STV6110x is not set + +# +# DVB-S (satellite) frontends +# +# CONFIG_DVB_CX24110 is not set +# CONFIG_DVB_CX24123 is not set +# CONFIG_DVB_MT312 is not set +# CONFIG_DVB_ZL10036 is not set +# CONFIG_DVB_ZL10039 is not set +# CONFIG_DVB_S5H1420 is not set +# CONFIG_DVB_STV0288 is not set +# CONFIG_DVB_STB6000 is not set +# CONFIG_DVB_STV0299 is not set +# CONFIG_DVB_STV6110 is not set +# CONFIG_DVB_STV0900 is not set +# CONFIG_DVB_TDA8083 is not set +# CONFIG_DVB_TDA10086 is not set +# CONFIG_DVB_TDA8261 is not set +# CONFIG_DVB_VES1X93 is not set +# CONFIG_DVB_TUNER_ITD1000 is not set +# CONFIG_DVB_TUNER_CX24113 is not set +# CONFIG_DVB_TDA826X is not set +# CONFIG_DVB_TUA6100 is not set +# CONFIG_DVB_CX24116 is not set +# CONFIG_DVB_SI21XX is not set +# CONFIG_DVB_DS3000 is not set +# CONFIG_DVB_MB86A16 is not set + +# +# DVB-T (terrestrial) frontends +# +# CONFIG_DVB_SP8870 is not set +# CONFIG_DVB_SP887X is not set +# CONFIG_DVB_CX22700 is not set +# CONFIG_DVB_CX22702 is not set +# CONFIG_DVB_S5H1432 is not set +# CONFIG_DVB_DRX397XD is not set +# CONFIG_DVB_L64781 is not set +# CONFIG_DVB_TDA1004X is not set +# CONFIG_DVB_NXT6000 is not set +CONFIG_DVB_MT352=m +CONFIG_DVB_ZL10353=m +# CONFIG_DVB_DIB3000MB is not set +# CONFIG_DVB_DIB3000MC is not set +# CONFIG_DVB_DIB7000M is not set +# CONFIG_DVB_DIB7000P is not set +# CONFIG_DVB_TDA10048 is not set +# CONFIG_DVB_AF9013 is not set +# CONFIG_DVB_EC100 is not set + +# +# DVB-C (cable) frontends +# +# CONFIG_DVB_VES1820 is not set +# CONFIG_DVB_TDA10021 is not set +CONFIG_DVB_TDA10023=m +# CONFIG_DVB_STV0297 is not set + +# +# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# +# CONFIG_DVB_NXT200X is not set +# CONFIG_DVB_OR51211 is not set +# CONFIG_DVB_OR51132 is not set +# CONFIG_DVB_BCM3510 is not set +# CONFIG_DVB_LGDT330X is not set +# CONFIG_DVB_LGDT3305 is not set +# CONFIG_DVB_S5H1409 is not set +# CONFIG_DVB_S5H1411 is not set + +# +# ISDB-T (terrestrial) frontends +# +# CONFIG_DVB_S921 is not set +# CONFIG_DVB_DIB8000 is not set + +# +# Digital terrestrial only tuners/PLL +# +CONFIG_DVB_PLL=m +# CONFIG_DVB_TUNER_DIB0070 is not set +# CONFIG_DVB_TUNER_DIB0090 is not set + +# +# SEC control devices for DVB-S +# +# CONFIG_DVB_LNBP21 is not set +# CONFIG_DVB_ISL6405 is not set +# CONFIG_DVB_ISL6421 is not set +# CONFIG_DVB_ISL6423 is not set +# CONFIG_DVB_LGS8GL5 is not set +# CONFIG_DVB_LGS8GXX is not set +# CONFIG_DVB_ATBM8830 is not set +# CONFIG_DVB_TDA665x is not set +# CONFIG_DVB_IX2505V is not set + +# +# Tools to develop new frontends +# +# CONFIG_DVB_DUMMY_FE is not set # CONFIG_DAB is not set # # Graphics support # -CONFIG_AGP=m +CONFIG_AGP=y # CONFIG_AGP_ALI is not set # CONFIG_AGP_ATI is not set # CONFIG_AGP_AMD is not set -CONFIG_AGP_INTEL=m +CONFIG_AGP_INTEL=y # CONFIG_AGP_NVIDIA is not set # CONFIG_AGP_SIS is not set # CONFIG_AGP_SWORKS is not set @@ -1245,26 +1491,26 @@ CONFIG_AGP_INTEL=m CONFIG_VGA_ARB=y CONFIG_VGA_ARB_MAX_GPUS=1 # CONFIG_VGA_SWITCHEROO is not set -CONFIG_DRM=m -CONFIG_DRM_KMS_HELPER=m -CONFIG_DRM_TTM=m +CONFIG_DRM=y +CONFIG_DRM_KMS_HELPER=y +CONFIG_DRM_TTM=y # CONFIG_DRM_TDFX is not set # CONFIG_DRM_R128 is not set # CONFIG_DRM_RADEON is not set -# CONFIG_DRM_I810 is not set # CONFIG_DRM_MGA is not set # CONFIG_DRM_SIS is not set # CONFIG_DRM_VIA is not set # CONFIG_DRM_SAVAGE is not set +# CONFIG_STUB_POULSBO is not set # CONFIG_VGASTATE is not set -# CONFIG_VIDEO_OUTPUT_CONTROL is not set +CONFIG_VIDEO_OUTPUT_CONTROL=y CONFIG_FB=y # CONFIG_FIRMWARE_EDID is not set # CONFIG_FB_DDC is not set # CONFIG_FB_BOOT_VESA_SUPPORT is not set -CONFIG_FB_CFB_FILLRECT=m -CONFIG_FB_CFB_COPYAREA=m -CONFIG_FB_CFB_IMAGEBLIT=m +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set # CONFIG_FB_SYS_FILLRECT is not set # CONFIG_FB_SYS_COPYAREA is not set @@ -1273,7 +1519,7 @@ CONFIG_FB_CFB_IMAGEBLIT=m # CONFIG_FB_SYS_FOPS is not set # CONFIG_FB_SVGALIB is not set # CONFIG_FB_MACMODES is not set -# CONFIG_FB_BACKLIGHT is not set +CONFIG_FB_BACKLIGHT=y # CONFIG_FB_MODE_HELPERS is not set # CONFIG_FB_TILEBLITTING is not set @@ -1319,7 +1565,14 @@ CONFIG_FB_CFB_IMAGEBLIT=m # CONFIG_FB_METRONOME is not set # CONFIG_FB_MB862XX is not set # CONFIG_FB_BROADSHEET is not set -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_LCD_CLASS_DEVICE is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y +# CONFIG_BACKLIGHT_GENERIC is not set +# CONFIG_BACKLIGHT_PROGEAR is not set +# CONFIG_BACKLIGHT_MBP_NVIDIA is not set +# CONFIG_BACKLIGHT_SAHARA is not set +# CONFIG_BACKLIGHT_ADP8860 is not set # # Display device support @@ -1411,9 +1664,7 @@ CONFIG_SND_HDA_CODEC_REALTEK=y # CONFIG_SND_HDA_CODEC_ANALOG is not set # CONFIG_SND_HDA_CODEC_SIGMATEL is not set # CONFIG_SND_HDA_CODEC_VIA is not set -CONFIG_SND_HDA_CODEC_ATIHDMI=y -# CONFIG_SND_HDA_CODEC_NVHDMI is not set -# CONFIG_SND_HDA_CODEC_INTELHDMI is not set +CONFIG_SND_HDA_CODEC_HDMI=y # CONFIG_SND_HDA_CODEC_CIRRUS is not set # CONFIG_SND_HDA_CODEC_CONEXANT is not set # CONFIG_SND_HDA_CODEC_CA0110 is not set @@ -1479,6 +1730,8 @@ CONFIG_HID_AUREAL=y # CONFIG_HID_EGALAX is not set # CONFIG_HID_EZKEY is not set # CONFIG_HID_KYE is not set +# CONFIG_HID_UCLOGIC is not set +# CONFIG_HID_WALTOP is not set # CONFIG_HID_GYRATION is not set CONFIG_HID_TWINHAN=y # CONFIG_HID_KENSINGTON is not set @@ -1486,6 +1739,7 @@ CONFIG_HID_LOGITECH=y CONFIG_LOGITECH_FF=y CONFIG_LOGIRUMBLEPAD2_FF=y CONFIG_LOGIG940_FF=y +CONFIG_LOGIWII_FF=y CONFIG_HID_MICROSOFT=y # CONFIG_HID_MOSART is not set # CONFIG_HID_MONTEREY is not set @@ -1497,10 +1751,11 @@ CONFIG_HID_MICROSOFT=y # CONFIG_HID_QUANTA is not set # CONFIG_HID_ROCCAT is not set # CONFIG_HID_ROCCAT_KONE is not set +# CONFIG_HID_ROCCAT_PYRA is not set # CONFIG_HID_SAMSUNG is not set CONFIG_HID_SONY=y # CONFIG_HID_STANTUM is not set -# CONFIG_HID_SUNPLUS is not set +CONFIG_HID_SUNPLUS=y # CONFIG_HID_GREENASIA is not set # CONFIG_HID_SMARTJOYPLUS is not set CONFIG_HID_TOPSEED=y @@ -1574,6 +1829,7 @@ CONFIG_USB_STORAGE=y # CONFIG_USB_STORAGE_ONETOUCH is not set # CONFIG_USB_STORAGE_KARMA is not set # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set +# CONFIG_USB_UAS is not set # CONFIG_USB_LIBUSUAL is not set # @@ -1623,6 +1879,7 @@ CONFIG_USB_SERIAL_FTDI_SIO=m # CONFIG_USB_SERIAL_SPCP8X5 is not set # CONFIG_USB_SERIAL_HP4X is not set # CONFIG_USB_SERIAL_SAFE is not set +# CONFIG_USB_SERIAL_SAMBA is not set # CONFIG_USB_SERIAL_SIEMENS_MPI is not set # CONFIG_USB_SERIAL_SIERRAWIRELESS is not set # CONFIG_USB_SERIAL_SYMBOL is not set @@ -1659,6 +1916,7 @@ CONFIG_USB_SERIAL_FTDI_SIO=m # CONFIG_USB_IOWARRIOR is not set # CONFIG_USB_TEST is not set # CONFIG_USB_ISIGHTFW is not set +# CONFIG_USB_YUREX is not set # CONFIG_USB_GADGET is not set # @@ -1669,7 +1927,7 @@ CONFIG_USB_SERIAL_FTDI_SIO=m # CONFIG_MMC is not set # CONFIG_MEMSTICK is not set CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=m +CONFIG_LEDS_CLASS=y # # LED drivers @@ -1677,6 +1935,8 @@ CONFIG_LEDS_CLASS=m # CONFIG_LEDS_ALIX2 is not set # CONFIG_LEDS_PCA9532 is not set # CONFIG_LEDS_LP3944 is not set +# CONFIG_LEDS_LP5521 is not set +# CONFIG_LEDS_LP5523 is not set # CONFIG_LEDS_CLEVO_MAIL is not set # CONFIG_LEDS_PCA955X is not set # CONFIG_LEDS_BD2802 is not set @@ -1762,26 +2022,25 @@ CONFIG_RTC_DRV_CMOS=y # CONFIG_UIO is not set CONFIG_STAGING=y # CONFIG_STAGING_EXCLUDE_BUILD is not set -# CONFIG_USB_IP_COMMON is not set # CONFIG_W35UND is not set # CONFIG_PRISM2_USB is not set # CONFIG_ECHO is not set -# CONFIG_OTUS is not set +# CONFIG_BRCM80211 is not set # CONFIG_RT2860 is not set # CONFIG_RT2870 is not set # CONFIG_COMEDI is not set # CONFIG_ASUS_OLED is not set # CONFIG_R8187SE is not set -# CONFIG_RTL8192SU is not set # CONFIG_RTL8192U is not set # CONFIG_RTL8192E is not set +# CONFIG_R8712U is not set # CONFIG_TRANZPORT is not set # CONFIG_POHMELFS is not set # CONFIG_IDE_PHISON is not set # CONFIG_LINE6_USB is not set # CONFIG_DRM_VMWGFX is not set -CONFIG_DRM_NOUVEAU=m -# CONFIG_DRM_NOUVEAU_BACKLIGHT is not set +CONFIG_DRM_NOUVEAU=y +CONFIG_DRM_NOUVEAU_BACKLIGHT=y # # I2C encoder or helper chips @@ -1798,16 +2057,25 @@ CONFIG_DRM_I2C_SIL164=m # CONFIG_IIO is not set # CONFIG_ZRAM is not set # CONFIG_BATMAN_ADV is not set +# CONFIG_SAMSUNG_LAPTOP is not set # CONFIG_FB_SM7XX is not set # CONFIG_CRYSTALHD is not set # # Texas Instruments shared transport line discipline # -# CONFIG_TI_ST is not set # CONFIG_FB_XGI is not set # CONFIG_LIRC_STAGING is not set # CONFIG_ACPI_QUICKSTART is not set +CONFIG_MACH_NO_WESTBRIDGE=y +# CONFIG_USB_ENESTORAGE is not set +# CONFIG_BCM_WIMAX is not set +# CONFIG_FT1000 is not set + +# +# Speakup console speech +# +# CONFIG_SPEAKUP is not set # CONFIG_X86_PLATFORM_DEVICES is not set # @@ -1843,8 +2111,9 @@ CONFIG_FILE_LOCKING=y CONFIG_FSNOTIFY=y CONFIG_DNOTIFY=y CONFIG_INOTIFY_USER=y +# CONFIG_FANOTIFY is not set # CONFIG_QUOTA is not set -# CONFIG_AUTOFS_FS is not set +# CONFIG_QUOTACTL is not set CONFIG_AUTOFS4_FS=y CONFIG_FUSE_FS=y # CONFIG_CUSE is not set @@ -1860,8 +2129,6 @@ CONFIG_FUSE_FS=y CONFIG_ISO9660_FS=y CONFIG_JOLIET=y CONFIG_ZISOFS=y -CONFIG_UDF_FS=y -CONFIG_UDF_NLS=y # # DOS/FAT/NT Filesystems @@ -1887,7 +2154,6 @@ CONFIG_TMPFS=y # CONFIG_HUGETLB_PAGE is not set # CONFIG_CONFIGFS_FS is not set CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_ECRYPT_FS is not set # CONFIG_HFS_FS is not set @@ -1905,11 +2171,9 @@ CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 # CONFIG_VXFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set # CONFIG_QNX4FS_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set CONFIG_NETWORK_FILESYSTEMS=y CONFIG_NFS_FS=y CONFIG_NFS_V3=y @@ -1918,6 +2182,7 @@ CONFIG_NFS_V4=y # CONFIG_NFS_V4_1 is not set # CONFIG_NFS_USE_LEGACY_DNS is not set CONFIG_NFS_USE_KERNEL_DNS=y +# CONFIG_NFS_USE_NEW_IDMAPPER is not set # CONFIG_NFSD is not set CONFIG_LOCKD=y CONFIG_LOCKD_V4=y @@ -1925,8 +2190,6 @@ CONFIG_NFS_COMMON=y CONFIG_SUNRPC=y CONFIG_SUNRPC_GSS=y CONFIG_RPCSEC_GSS_KRB5=y -# CONFIG_RPCSEC_GSS_SPKM3 is not set -# CONFIG_SMB_FS is not set # CONFIG_CEPH_FS is not set CONFIG_CIFS=y CONFIG_CIFS_STATS=y @@ -2020,6 +2283,8 @@ CONFIG_FRAME_WARN=1024 # CONFIG_HEADERS_CHECK is not set # CONFIG_DEBUG_KERNEL is not set # CONFIG_HARDLOCKUP_DETECTOR is not set +# CONFIG_BKL is not set +# CONFIG_SPARSE_RCU_POINTER is not set # CONFIG_DEBUG_MEMORY_INIT is not set CONFIG_ARCH_WANT_FRAME_POINTERS=y # CONFIG_FRAME_POINTER is not set @@ -2033,6 +2298,7 @@ CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y CONFIG_HAVE_DYNAMIC_FTRACE=y CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HAVE_C_RECORDMCOUNT=y CONFIG_TRACING_SUPPORT=y # CONFIG_FTRACE is not set # CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set @@ -2045,7 +2311,6 @@ CONFIG_HAVE_ARCH_KMEMCHECK=y CONFIG_STRICT_DEVMEM=y # CONFIG_X86_VERBOSE_BOOTUP is not set # CONFIG_EARLY_PRINTK is not set -# CONFIG_4KSTACKS is not set CONFIG_DOUBLEFAULT=y # CONFIG_IOMMU_STRESS is not set CONFIG_HAVE_MMIOTRACE_SUPPORT=y @@ -2058,13 +2323,14 @@ CONFIG_IO_DELAY_0X80=y # CONFIG_IO_DELAY_UDELAY is not set # CONFIG_IO_DELAY_NONE is not set CONFIG_DEFAULT_IO_DELAY_TYPE=0 -# CONFIG_OPTIMIZE_INLINING is not set +CONFIG_OPTIMIZE_INLINING=y # # Security options # CONFIG_KEYS=y # CONFIG_KEYS_DEBUG_PROC_KEYS is not set +# CONFIG_SECURITY_DMESG_RESTRICT is not set # CONFIG_SECURITY is not set # CONFIG_SECURITYFS is not set CONFIG_DEFAULT_SECURITY_DAC=y @@ -2088,6 +2354,7 @@ CONFIG_CRYPTO_MANAGER2=y CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y # CONFIG_CRYPTO_GF128MUL is not set # CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_PCRYPT is not set CONFIG_CRYPTO_WORKQUEUE=y # CONFIG_CRYPTO_CRYPTD is not set # CONFIG_CRYPTO_AUTHENC is not set diff --git a/projects/ATV/linux/linux.i386.conf.2.6.36 b/projects/ATV/linux/linux.i386.conf.2.6.36 new file mode 100644 index 0000000000..09d9088dc3 --- /dev/null +++ b/projects/ATV/linux/linux.i386.conf.2.6.36 @@ -0,0 +1,2206 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.36 +# +# CONFIG_64BIT is not set +CONFIG_X86_32=y +# CONFIG_X86_64 is not set +CONFIG_X86=y +CONFIG_INSTRUCTION_DECODER=y +CONFIG_OUTPUT_FORMAT="elf32-i386" +CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig" +CONFIG_GENERIC_CMOS_UPDATE=y +CONFIG_CLOCKSOURCE_WATCHDOG=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_MMU=y +CONFIG_ZONE_DMA=y +# CONFIG_NEED_DMA_MAP_STATE is not set +CONFIG_NEED_SG_DMA_LENGTH=y +CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_IOMAP=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_ARCH_MAY_HAVE_PC_FDC=y +# CONFIG_RWSEM_GENERIC_SPINLOCK is not set +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +# CONFIG_GENERIC_TIME_VSYSCALL is not set +CONFIG_ARCH_HAS_CPU_RELAX=y +CONFIG_ARCH_HAS_DEFAULT_IDLE=y +CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y +CONFIG_HAVE_SETUP_PER_CPU_AREA=y +CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y +CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y +# CONFIG_HAVE_CPUMASK_OF_CPU_MAP is not set +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +# CONFIG_ZONE_DMA32 is not set +CONFIG_ARCH_POPULATES_NODE_MAP=y +# CONFIG_AUDIT_ARCH is not set +CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y +CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y +CONFIG_HAVE_EARLY_RES=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_X86_32_LAZY_GS=y +CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-ecx -fcall-saved-edx" +CONFIG_KTIME_SCALAR=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_CONSTRUCTORS=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_BZIP2=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_LZO=y +# CONFIG_KERNEL_GZIP is not set +# CONFIG_KERNEL_BZIP2 is not set +CONFIG_KERNEL_LZMA=y +# CONFIG_KERNEL_LZO is not set +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +# CONFIG_TASKSTATS is not set +# CONFIG_AUDIT is not set + +# +# RCU Subsystem +# +CONFIG_TREE_RCU=y +# CONFIG_TREE_PREEMPT_RCU is not set +# CONFIG_TINY_RCU is not set +# CONFIG_RCU_TRACE is not set +CONFIG_RCU_FANOUT=32 +# CONFIG_RCU_FANOUT_EXACT is not set +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_IKCONFIG is not set +CONFIG_LOG_BUF_SHIFT=16 +CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y +CONFIG_CGROUPS=y +# CONFIG_CGROUP_DEBUG is not set +CONFIG_CGROUP_NS=y +CONFIG_CGROUP_FREEZER=y +# CONFIG_CGROUP_DEVICE is not set +CONFIG_CPUSETS=y +CONFIG_PROC_PID_CPUSET=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_RESOURCE_COUNTERS=y +# CONFIG_CGROUP_MEM_RES_CTLR is not set +# CONFIG_CGROUP_SCHED is not set +# CONFIG_BLK_CGROUP is not set +# CONFIG_SYSFS_DEPRECATED_V2 is not set +# CONFIG_RELAY is not set +# CONFIG_NAMESPACES is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE=" " +CONFIG_INITRAMFS_ROOT_UID=0 +CONFIG_INITRAMFS_ROOT_GID=0 +# CONFIG_RD_GZIP is not set +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +# CONFIG_RD_LZO is not set +CONFIG_INITRAMFS_COMPRESSION_NONE=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_EMBEDDED=y +CONFIG_UID16=y +CONFIG_SYSCTL_SYSCALL=y +# CONFIG_KALLSYMS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +# CONFIG_BUG is not set +CONFIG_ELF_CORE=y +# CONFIG_PCSPKR_PLATFORM is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_HAVE_PERF_EVENTS=y + +# +# Kernel Performance Events And Counters +# +CONFIG_PERF_EVENTS=y +# CONFIG_PERF_COUNTERS is not set +# CONFIG_VM_EVENT_COUNTERS is not set +CONFIG_PCI_QUIRKS=y +# CONFIG_COMPAT_BRK is not set +# CONFIG_SLAB is not set +# CONFIG_SLUB is not set +CONFIG_SLOB=y +# CONFIG_PROFILING is not set +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y +CONFIG_HAVE_IOREMAP_PROT=y +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_OPTPROBES=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_HW_BREAKPOINT=y +CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y +CONFIG_HAVE_USER_RETURN_NOTIFIER=y +CONFIG_HAVE_PERF_EVENTS_NMI=y + +# +# GCOV-based kernel profiling +# +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_LOAD is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_BLOCK=y +CONFIG_LBDAF=y +CONFIG_BLK_DEV_BSG=y +# CONFIG_BLK_DEV_INTEGRITY is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_DEADLINE is not set +CONFIG_IOSCHED_CFQ=y +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +# CONFIG_INLINE_SPIN_TRYLOCK is not set +# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK is not set +# CONFIG_INLINE_SPIN_LOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK_IRQ is not set +# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set +# CONFIG_INLINE_SPIN_UNLOCK is not set +# CONFIG_INLINE_SPIN_UNLOCK_BH is not set +# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set +# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_READ_TRYLOCK is not set +# CONFIG_INLINE_READ_LOCK is not set +# CONFIG_INLINE_READ_LOCK_BH is not set +# CONFIG_INLINE_READ_LOCK_IRQ is not set +# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set +# CONFIG_INLINE_READ_UNLOCK is not set +# CONFIG_INLINE_READ_UNLOCK_BH is not set +# CONFIG_INLINE_READ_UNLOCK_IRQ is not set +# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_WRITE_TRYLOCK is not set +# CONFIG_INLINE_WRITE_LOCK is not set +# CONFIG_INLINE_WRITE_LOCK_BH is not set +# CONFIG_INLINE_WRITE_LOCK_IRQ is not set +# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set +# CONFIG_INLINE_WRITE_UNLOCK is not set +# CONFIG_INLINE_WRITE_UNLOCK_BH is not set +# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set +# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set +# CONFIG_MUTEX_SPIN_ON_OWNER is not set +CONFIG_FREEZER=y + +# +# Processor type and features +# +CONFIG_TICK_ONESHOT=y +# CONFIG_NO_HZ is not set +CONFIG_HIGH_RES_TIMERS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +# CONFIG_SMP is not set +# CONFIG_SPARSE_IRQ is not set +CONFIG_X86_MPPARSE=y +# CONFIG_X86_EXTENDED_PLATFORM is not set +CONFIG_SCHED_OMIT_FRAME_POINTER=y +# CONFIG_PARAVIRT_GUEST is not set +# CONFIG_NO_BOOTMEM is not set +# CONFIG_MEMTEST is not set +# CONFIG_M386 is not set +# CONFIG_M486 is not set +# CONFIG_M586 is not set +# CONFIG_M586TSC is not set +# CONFIG_M586MMX is not set +# CONFIG_M686 is not set +# CONFIG_MPENTIUMII is not set +# CONFIG_MPENTIUMIII is not set +CONFIG_MPENTIUMM=y +# CONFIG_MPENTIUM4 is not set +# CONFIG_MK6 is not set +# CONFIG_MK7 is not set +# CONFIG_MK8 is not set +# CONFIG_MCRUSOE is not set +# CONFIG_MEFFICEON is not set +# CONFIG_MWINCHIPC6 is not set +# CONFIG_MWINCHIP3D is not set +# CONFIG_MGEODEGX1 is not set +# CONFIG_MGEODE_LX is not set +# CONFIG_MCYRIXIII is not set +# CONFIG_MVIAC3_2 is not set +# CONFIG_MVIAC7 is not set +# CONFIG_MCORE2 is not set +# CONFIG_MATOM is not set +# CONFIG_X86_GENERIC is not set +CONFIG_X86_CPU=y +CONFIG_X86_INTERNODE_CACHE_SHIFT=6 +CONFIG_X86_CMPXCHG=y +CONFIG_X86_L1_CACHE_SHIFT=6 +CONFIG_X86_XADD=y +CONFIG_X86_WP_WORKS_OK=y +CONFIG_X86_INVLPG=y +CONFIG_X86_BSWAP=y +CONFIG_X86_POPAD_OK=y +CONFIG_X86_INTEL_USERCOPY=y +CONFIG_X86_USE_PPRO_CHECKSUM=y +CONFIG_X86_TSC=y +CONFIG_X86_CMPXCHG64=y +CONFIG_X86_CMOV=y +CONFIG_X86_MINIMUM_CPU_FAMILY=5 +CONFIG_X86_DEBUGCTLMSR=y +CONFIG_PROCESSOR_SELECT=y +CONFIG_CPU_SUP_INTEL=y +# CONFIG_CPU_SUP_CYRIX_32 is not set +# CONFIG_CPU_SUP_AMD is not set +# CONFIG_CPU_SUP_CENTAUR is not set +# CONFIG_CPU_SUP_TRANSMETA_32 is not set +# CONFIG_CPU_SUP_UMC_32 is not set +CONFIG_HPET_TIMER=y +CONFIG_HPET_EMULATE_RTC=y +CONFIG_DMI=y +# CONFIG_IOMMU_HELPER is not set +# CONFIG_IOMMU_API is not set +CONFIG_NR_CPUS=1 +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_X86_UP_APIC=y +CONFIG_X86_UP_IOAPIC=y +CONFIG_X86_LOCAL_APIC=y +CONFIG_X86_IO_APIC=y +CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y +CONFIG_X86_MCE=y +CONFIG_X86_MCE_INTEL=y +# CONFIG_X86_MCE_AMD is not set +# CONFIG_X86_ANCIENT_MCE is not set +CONFIG_X86_MCE_THRESHOLD=y +# CONFIG_X86_MCE_INJECT is not set +CONFIG_X86_THERMAL_VECTOR=y +# CONFIG_VM86 is not set +# CONFIG_TOSHIBA is not set +# CONFIG_I8K is not set +# CONFIG_X86_REBOOTFIXUPS is not set +# CONFIG_MICROCODE is not set +CONFIG_X86_MSR=y +CONFIG_X86_CPUID=y +CONFIG_NOHIGHMEM=y +# CONFIG_HIGHMEM4G is not set +# CONFIG_HIGHMEM64G is not set +# CONFIG_VMSPLIT_3G is not set +CONFIG_VMSPLIT_3G_OPT=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_2G_OPT is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xB0000000 +# CONFIG_X86_PAE is not set +# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set +CONFIG_NEED_NODE_MEMMAP_SIZE=y +CONFIG_ARCH_FLATMEM_ENABLE=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_ILLEGAL_POINTER_VALUE=0 +CONFIG_SELECT_MEMORY_MODEL=y +# CONFIG_FLATMEM_MANUAL is not set +CONFIG_SPARSEMEM_MANUAL=y +CONFIG_SPARSEMEM=y +CONFIG_HAVE_MEMORY_PRESENT=y +CONFIG_SPARSEMEM_STATIC=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=1 +CONFIG_BOUNCE=y +CONFIG_VIRT_TO_BUS=y +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +# CONFIG_X86_CHECK_BIOS_CORRUPTION is not set +# CONFIG_X86_RESERVE_LOW_64K is not set +# CONFIG_MATH_EMULATION is not set +CONFIG_MTRR=y +CONFIG_MTRR_SANITIZER=y +CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0 +CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1 +CONFIG_X86_PAT=y +CONFIG_ARCH_USES_PG_UNCACHED=y +CONFIG_EFI=y +CONFIG_SECCOMP=y +# CONFIG_CC_STACKPROTECTOR is not set +# CONFIG_HZ_100 is not set +# CONFIG_HZ_250 is not set +CONFIG_HZ_300=y +# CONFIG_HZ_1000 is not set +CONFIG_HZ=300 +CONFIG_SCHED_HRTICK=y +# CONFIG_KEXEC is not set +CONFIG_PHYSICAL_START=0x1000000 +# CONFIG_RELOCATABLE is not set +CONFIG_PHYSICAL_ALIGN=0x1000000 +# CONFIG_COMPAT_VDSO is not set +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="fastboot root=/dev/ram0 rdinit=/init" +# CONFIG_CMDLINE_OVERRIDE is not set + +# +# Power management and ACPI options +# +CONFIG_PM=y +# CONFIG_PM_DEBUG is not set +# CONFIG_SUSPEND is not set +# CONFIG_HIBERNATION is not set +# CONFIG_PM_RUNTIME is not set +CONFIG_ACPI=y +# CONFIG_ACPI_PROCFS is not set +# CONFIG_ACPI_PROCFS_POWER is not set +CONFIG_ACPI_SYSFS_POWER=y +# CONFIG_ACPI_EC_DEBUGFS is not set +# CONFIG_ACPI_PROC_EVENT is not set +# CONFIG_ACPI_AC is not set +# CONFIG_ACPI_BATTERY is not set +# CONFIG_ACPI_BUTTON is not set +CONFIG_ACPI_VIDEO=y +CONFIG_ACPI_FAN=y +# CONFIG_ACPI_DOCK is not set +CONFIG_ACPI_PROCESSOR=y +# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set +CONFIG_ACPI_THERMAL=y +# CONFIG_ACPI_CUSTOM_DSDT is not set +CONFIG_ACPI_BLACKLIST_YEAR=0 +# CONFIG_ACPI_DEBUG is not set +# CONFIG_ACPI_PCI_SLOT is not set +CONFIG_X86_PM_TIMER=y +# CONFIG_ACPI_CONTAINER is not set +# CONFIG_ACPI_SBS is not set +# CONFIG_ACPI_HED is not set +# CONFIG_ACPI_APEI is not set +# CONFIG_SFI is not set + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +# CONFIG_CPU_FREQ_DEBUG is not set +# CONFIG_CPU_FREQ_STAT is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set + +# +# CPUFreq processor drivers +# +# CONFIG_X86_PCC_CPUFREQ is not set +CONFIG_X86_ACPI_CPUFREQ=y +# CONFIG_X86_POWERNOW_K6 is not set +# CONFIG_X86_POWERNOW_K7 is not set +# CONFIG_X86_POWERNOW_K8 is not set +# CONFIG_X86_GX_SUSPMOD is not set +# CONFIG_X86_SPEEDSTEP_CENTRINO is not set +# CONFIG_X86_SPEEDSTEP_ICH is not set +# CONFIG_X86_SPEEDSTEP_SMI is not set +# CONFIG_X86_P4_CLOCKMOD is not set +# CONFIG_X86_CPUFREQ_NFORCE2 is not set +# CONFIG_X86_LONGRUN is not set +# CONFIG_X86_LONGHAUL is not set +# CONFIG_X86_E_POWERSAVER is not set + +# +# shared options +# +# CONFIG_X86_SPEEDSTEP_LIB is not set +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_GOV_LADDER=y +# CONFIG_INTEL_IDLE is not set + +# +# Bus options (PCI etc.) +# +CONFIG_PCI=y +# CONFIG_PCI_GOBIOS is not set +# CONFIG_PCI_GOMMCONFIG is not set +# CONFIG_PCI_GODIRECT is not set +CONFIG_PCI_GOANY=y +CONFIG_PCI_BIOS=y +CONFIG_PCI_DIRECT=y +CONFIG_PCI_MMCONFIG=y +CONFIG_PCI_DOMAINS=y +# CONFIG_PCI_CNB20LE_QUIRK is not set +# CONFIG_DMAR is not set +CONFIG_PCIEPORTBUS=y +# CONFIG_PCIEAER is not set +# CONFIG_PCIEASPM is not set +CONFIG_ARCH_SUPPORTS_MSI=y +CONFIG_PCI_MSI=y +# CONFIG_PCI_STUB is not set +CONFIG_HT_IRQ=y +# CONFIG_PCI_IOV is not set +CONFIG_PCI_IOAPIC=y +CONFIG_ISA_DMA_API=y +# CONFIG_ISA is not set +# CONFIG_MCA is not set +# CONFIG_SCx200 is not set +# CONFIG_OLPC is not set +# CONFIG_OLPC_OPENFIRMWARE is not set +# CONFIG_PCCARD is not set +# CONFIG_HOTPLUG_PCI is not set + +# +# Executable file formats / Emulations +# +CONFIG_BINFMT_ELF=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_HAVE_AOUT=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set +CONFIG_HAVE_ATOMIC_IOMAP=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_XFRM_MIGRATE is not set +# CONFIG_XFRM_STATISTICS is not set +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_FIB_HASH=y +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +CONFIG_INET_TUNNEL=m +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_XFRM_MODE_BEET=y +CONFIG_INET_LRO=y +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +CONFIG_IPV6=y +# CONFIG_IPV6_PRIVACY is not set +# CONFIG_IPV6_ROUTER_PREF is not set +# CONFIG_IPV6_OPTIMISTIC_DAD is not set +# CONFIG_INET6_AH is not set +# CONFIG_INET6_ESP is not set +# CONFIG_INET6_IPCOMP is not set +# CONFIG_IPV6_MIP6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +CONFIG_INET6_XFRM_MODE_TRANSPORT=m +CONFIG_INET6_XFRM_MODE_TUNNEL=m +CONFIG_INET6_XFRM_MODE_BEET=m +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +CONFIG_IPV6_SIT=m +# CONFIG_IPV6_SIT_6RD is not set +CONFIG_IPV6_NDISC_NODETYPE=y +# CONFIG_IPV6_TUNNEL is not set +# CONFIG_IPV6_MULTIPLE_TABLES is not set +# CONFIG_IPV6_MROUTE is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set +# CONFIG_NETFILTER is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_L2TP is not set +# CONFIG_BRIDGE is not set +# CONFIG_NET_DSA is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_PHONET is not set +# CONFIG_IEEE802154 is not set +# CONFIG_NET_SCHED is not set +# CONFIG_DCB is not set +CONFIG_DNS_RESOLVER=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_AF_RXRPC is not set +CONFIG_WIRELESS=y +CONFIG_WEXT_CORE=y +CONFIG_WEXT_PROC=y +CONFIG_CFG80211=y +# CONFIG_NL80211_TESTMODE is not set +# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set +# CONFIG_CFG80211_REG_DEBUG is not set +# CONFIG_CFG80211_DEFAULT_PS is not set +# CONFIG_CFG80211_INTERNAL_REGDB is not set +CONFIG_CFG80211_WEXT=y +CONFIG_WIRELESS_EXT_SYSFS=y +CONFIG_LIB80211=y +# CONFIG_LIB80211_DEBUG is not set +CONFIG_MAC80211=y +CONFIG_MAC80211_HAS_RC=y +# CONFIG_MAC80211_RC_PID is not set +CONFIG_MAC80211_RC_MINSTREL=y +CONFIG_MAC80211_RC_MINSTREL_HT=y +CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y +CONFIG_MAC80211_RC_DEFAULT="minstrel_ht" +# CONFIG_MAC80211_MESH is not set +CONFIG_MAC80211_LEDS=y +# CONFIG_MAC80211_DEBUG_MENU is not set +# CONFIG_WIMAX is not set +CONFIG_RFKILL=y +CONFIG_RFKILL_LEDS=y +CONFIG_RFKILL_INPUT=y +# CONFIG_NET_9P is not set +# CONFIG_CAIF is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_STANDALONE=y +# CONFIG_PREVENT_FIRMWARE_BUILD is not set +CONFIG_FW_LOADER=y +CONFIG_FIRMWARE_IN_KERNEL=y +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_CONNECTOR is not set +# CONFIG_MTD is not set +# CONFIG_PARPORT is not set +CONFIG_PNP=y +# CONFIG_PNP_DEBUG_MESSAGES is not set + +# +# Protocols +# +CONFIG_PNPACPI=y +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set + +# +# DRBD disabled because PROC_FS, INET or CONNECTOR not selected +# +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=4 +CONFIG_BLK_DEV_RAM_SIZE=4096 +# CONFIG_BLK_DEV_XIP is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_BLK_DEV_HD is not set +# CONFIG_MISC_DEVICES is not set +CONFIG_HAVE_IDE=y +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +# CONFIG_SCSI_PROC_FS is not set + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +# CONFIG_BLK_DEV_SR_VENDOR is not set +CONFIG_CHR_DEV_SG=y +# CONFIG_CHR_DEV_SCH is not set +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set +CONFIG_SCSI_WAIT_SCAN=m + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +# CONFIG_SCSI_LOWLEVEL is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +CONFIG_ATA=y +# CONFIG_ATA_NONSTANDARD is not set +# CONFIG_ATA_VERBOSE_ERROR is not set +CONFIG_ATA_ACPI=y +# CONFIG_SATA_PMP is not set + +# +# Controllers with non-SFF native interface +# +# CONFIG_SATA_AHCI is not set +# CONFIG_SATA_AHCI_PLATFORM is not set +# CONFIG_SATA_INIC162X is not set +# CONFIG_SATA_SIL24 is not set +CONFIG_ATA_SFF=y + +# +# SFF controllers with custom DMA interface +# +# CONFIG_PDC_ADMA is not set +# CONFIG_SATA_QSTOR is not set +# CONFIG_SATA_SX4 is not set +CONFIG_ATA_BMDMA=y + +# +# SATA SFF controllers with BMDMA +# +CONFIG_ATA_PIIX=y +# CONFIG_SATA_MV is not set +# CONFIG_SATA_NV is not set +# CONFIG_SATA_PROMISE is not set +# CONFIG_SATA_SIL is not set +# CONFIG_SATA_SIS is not set +# CONFIG_SATA_SVW is not set +# CONFIG_SATA_ULI is not set +# CONFIG_SATA_VIA is not set +# CONFIG_SATA_VITESSE is not set + +# +# PATA SFF controllers with BMDMA +# +# CONFIG_PATA_ALI is not set +# CONFIG_PATA_AMD is not set +# CONFIG_PATA_ARTOP is not set +# CONFIG_PATA_ATIIXP is not set +# CONFIG_PATA_ATP867X is not set +# CONFIG_PATA_CMD64X is not set +# CONFIG_PATA_CS5520 is not set +# CONFIG_PATA_CS5530 is not set +# CONFIG_PATA_CS5535 is not set +# CONFIG_PATA_CS5536 is not set +# CONFIG_PATA_CYPRESS is not set +# CONFIG_PATA_EFAR is not set +# CONFIG_PATA_HPT366 is not set +# CONFIG_PATA_HPT37X is not set +# CONFIG_PATA_HPT3X2N is not set +# CONFIG_PATA_HPT3X3 is not set +# CONFIG_PATA_IT8213 is not set +# CONFIG_PATA_IT821X is not set +# CONFIG_PATA_JMICRON is not set +# CONFIG_PATA_MARVELL is not set +# CONFIG_PATA_NETCELL is not set +# CONFIG_PATA_NINJA32 is not set +# CONFIG_PATA_NS87415 is not set +# CONFIG_PATA_OLDPIIX is not set +# CONFIG_PATA_OPTIDMA is not set +# CONFIG_PATA_PDC2027X is not set +# CONFIG_PATA_PDC_OLD is not set +# CONFIG_PATA_RADISYS is not set +# CONFIG_PATA_RDC is not set +# CONFIG_PATA_SC1200 is not set +# CONFIG_PATA_SCH is not set +# CONFIG_PATA_SERVERWORKS is not set +# CONFIG_PATA_SIL680 is not set +# CONFIG_PATA_SIS is not set +# CONFIG_PATA_TOSHIBA is not set +# CONFIG_PATA_TRIFLEX is not set +# CONFIG_PATA_VIA is not set +# CONFIG_PATA_WINBOND is not set + +# +# PIO-only SFF controllers +# +# CONFIG_PATA_CMD640_PCI is not set +# CONFIG_PATA_MPIIX is not set +# CONFIG_PATA_NS87410 is not set +# CONFIG_PATA_OPTI is not set +# CONFIG_PATA_PLATFORM is not set +# CONFIG_PATA_RZ1000 is not set + +# +# Generic fallback / legacy drivers +# +CONFIG_PATA_ACPI=y +# CONFIG_ATA_GENERIC is not set +# CONFIG_PATA_LEGACY is not set +# CONFIG_MD is not set +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# + +# +# You can enable one or both FireWire driver stacks. +# + +# +# The newer stack is recommended. +# +CONFIG_FIREWIRE=m +CONFIG_FIREWIRE_OHCI=m +CONFIG_FIREWIRE_OHCI_DEBUG=y +CONFIG_FIREWIRE_SBP2=m +# CONFIG_FIREWIRE_NET is not set +# CONFIG_IEEE1394 is not set +# CONFIG_FIREWIRE_NOSY is not set +# CONFIG_I2O is not set +# CONFIG_MACINTOSH_DRIVERS is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_MACVLAN is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_VETH is not set +# CONFIG_NET_SB1000 is not set +# CONFIG_ARCNET is not set +# CONFIG_PHYLIB is not set +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +# CONFIG_CASSINI is not set +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_ETHOC is not set +# CONFIG_DNET is not set +# CONFIG_NET_TULIP is not set +# CONFIG_HP100 is not set +# CONFIG_IBM_NEW_EMAC_ZMII is not set +# CONFIG_IBM_NEW_EMAC_RGMII is not set +# CONFIG_IBM_NEW_EMAC_TAH is not set +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set +# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set +# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set +# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set +CONFIG_NET_PCI=y +# CONFIG_PCNET32 is not set +# CONFIG_AMD8111_ETH is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_KSZ884X_PCI is not set +# CONFIG_B44 is not set +# CONFIG_FORCEDETH is not set +# CONFIG_E100 is not set +# CONFIG_FEALNX is not set +# CONFIG_NATSEMI is not set +# CONFIG_NE2K_PCI is not set +# CONFIG_8139CP is not set +CONFIG_8139TOO=y +CONFIG_8139TOO_PIO=y +# CONFIG_8139TOO_TUNE_TWISTER is not set +# CONFIG_8139TOO_8129 is not set +# CONFIG_8139_OLD_RX_RESET is not set +# CONFIG_R6040 is not set +# CONFIG_SIS900 is not set +# CONFIG_EPIC100 is not set +# CONFIG_SMSC9420 is not set +# CONFIG_SUNDANCE is not set +# CONFIG_TLAN is not set +# CONFIG_KS8851_MLL is not set +# CONFIG_VIA_RHINE is not set +# CONFIG_SC92031 is not set +# CONFIG_ATL2 is not set +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set +# CONFIG_TR is not set +CONFIG_WLAN=y +# CONFIG_LIBERTAS_THINFIRM is not set +# CONFIG_AIRO is not set +# CONFIG_ATMEL is not set +# CONFIG_AT76C50X_USB is not set +# CONFIG_PRISM54 is not set +# CONFIG_USB_ZD1201 is not set +# CONFIG_USB_NET_RNDIS_WLAN is not set +# CONFIG_RTL8180 is not set +# CONFIG_RTL8187 is not set +# CONFIG_ADM8211 is not set +# CONFIG_MAC80211_HWSIM is not set +# CONFIG_MWL8K is not set +# CONFIG_ATH_COMMON is not set +CONFIG_B43=m +CONFIG_B43_PCI_AUTOSELECT=y +CONFIG_B43_PCICORE_AUTOSELECT=y +CONFIG_B43_PIO=y +CONFIG_B43_PHY_LP=y +CONFIG_B43_LEDS=y +# CONFIG_B43_DEBUG is not set +# CONFIG_B43LEGACY is not set +# CONFIG_HOSTAP is not set +# CONFIG_IPW2100 is not set +# CONFIG_IPW2200 is not set +# CONFIG_IWLWIFI is not set +# CONFIG_LIBERTAS is not set +# CONFIG_HERMES is not set +# CONFIG_P54_COMMON is not set +# CONFIG_RT2X00 is not set +# CONFIG_WL12XX is not set +# CONFIG_ZD1211RW is not set + +# +# Enable WiMAX (Networking options) to see the WiMAX drivers +# + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET is not set +# CONFIG_USB_HSO is not set +# CONFIG_USB_IPHETH is not set +# CONFIG_WAN is not set + +# +# CAIF transport drivers +# +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_NET_FC is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_VMXNET3 is not set +# CONFIG_ISDN is not set +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_FF_MEMLESS=y +# CONFIG_INPUT_POLLDEV is not set +# CONFIG_INPUT_SPARSEKMAP is not set + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ADP5588 is not set +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_QT2160 is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_TCA6416 is not set +# CONFIG_KEYBOARD_LM8323 is not set +# CONFIG_KEYBOARD_MAX7359 is not set +# CONFIG_KEYBOARD_MCS is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_OPENCORES is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +CONFIG_MOUSE_PS2_ALPS=y +CONFIG_MOUSE_PS2_LOGIPS2PP=y +CONFIG_MOUSE_PS2_SYNAPTICS=y +CONFIG_MOUSE_PS2_LIFEBOOK=y +CONFIG_MOUSE_PS2_TRACKPOINT=y +# CONFIG_MOUSE_PS2_ELANTECH is not set +# CONFIG_MOUSE_PS2_SENTELIC is not set +# CONFIG_MOUSE_PS2_TOUCHKIT is not set +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_APPLETOUCH is not set +# CONFIG_MOUSE_BCM5974 is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_MOUSE_SYNAPTICS_I2C is not set +CONFIG_INPUT_JOYSTICK=y +# CONFIG_JOYSTICK_ANALOG is not set +# CONFIG_JOYSTICK_A3D is not set +# CONFIG_JOYSTICK_ADI is not set +# CONFIG_JOYSTICK_COBRA is not set +# CONFIG_JOYSTICK_GF2K is not set +# CONFIG_JOYSTICK_GRIP is not set +# CONFIG_JOYSTICK_GRIP_MP is not set +# CONFIG_JOYSTICK_GUILLEMOT is not set +# CONFIG_JOYSTICK_INTERACT is not set +# CONFIG_JOYSTICK_SIDEWINDER is not set +# CONFIG_JOYSTICK_TMDC is not set +# CONFIG_JOYSTICK_IFORCE is not set +# CONFIG_JOYSTICK_WARRIOR is not set +# CONFIG_JOYSTICK_MAGELLAN is not set +# CONFIG_JOYSTICK_SPACEORB is not set +# CONFIG_JOYSTICK_SPACEBALL is not set +# CONFIG_JOYSTICK_STINGER is not set +# CONFIG_JOYSTICK_TWIDJOY is not set +# CONFIG_JOYSTICK_ZHENHUA is not set +# CONFIG_JOYSTICK_JOYDUMP is not set +CONFIG_JOYSTICK_XPAD=m +CONFIG_JOYSTICK_XPAD_FF=y +CONFIG_JOYSTICK_XPAD_LEDS=y +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_AD714X is not set +# CONFIG_INPUT_APANEL is not set +# CONFIG_INPUT_WISTRON_BTNS is not set +# CONFIG_INPUT_ATLAS_BTNS is not set +# CONFIG_INPUT_ATI_REMOTE is not set +# CONFIG_INPUT_ATI_REMOTE2 is not set +# CONFIG_INPUT_KEYSPAN_REMOTE is not set +CONFIG_INPUT_APPLEIR=y +# CONFIG_INPUT_POWERMATE is not set +# CONFIG_INPUT_YEALINK is not set +# CONFIG_INPUT_CM109 is not set +CONFIG_INPUT_UINPUT=y +# CONFIG_INPUT_WINBOND_CIR is not set +# CONFIG_INPUT_PCF8574 is not set +# CONFIG_INPUT_ADXL34X is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_I8042=y +# CONFIG_SERIO_SERPORT is not set +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_PCIPS2 is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_SERIO_ALTERA_PS2 is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_DEVKMEM is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_N_GSM is not set +# CONFIG_NOZOMI is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +# CONFIG_SERIAL_8250_CONSOLE is not set +CONFIG_FIX_EARLYCON_MEM=y +CONFIG_SERIAL_8250_PCI=y +# CONFIG_SERIAL_8250_PNP is not set +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_MFD_HSU is not set +CONFIG_SERIAL_CORE=y +# CONFIG_SERIAL_JSM is not set +# CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +CONFIG_NVRAM=y +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set +# CONFIG_SONYPI is not set +# CONFIG_MWAVE is not set +# CONFIG_PC8736x_GPIO is not set +# CONFIG_NSC_GPIO is not set +# CONFIG_CS5535_GPIO is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_HPET is not set +# CONFIG_HANGCHECK_TIMER is not set +# CONFIG_TCG_TPM is not set +# CONFIG_TELCLOCK is not set +CONFIG_DEVPORT=y +# CONFIG_RAMOOPS is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=m +# CONFIG_I2C_MUX is not set +CONFIG_I2C_HELPER_AUTO=y +CONFIG_I2C_ALGOBIT=y + +# +# I2C Hardware Bus support +# + +# +# PC SMBus host controller drivers +# +# CONFIG_I2C_ALI1535 is not set +# CONFIG_I2C_ALI1563 is not set +# CONFIG_I2C_ALI15X3 is not set +# CONFIG_I2C_AMD756 is not set +# CONFIG_I2C_AMD8111 is not set +CONFIG_I2C_I801=y +# CONFIG_I2C_ISCH is not set +# CONFIG_I2C_PIIX4 is not set +# CONFIG_I2C_NFORCE2 is not set +# CONFIG_I2C_SIS5595 is not set +# CONFIG_I2C_SIS630 is not set +# CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_VIA is not set +# CONFIG_I2C_VIAPRO is not set + +# +# ACPI drivers +# +# CONFIG_I2C_SCMI is not set + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_XILINX is not set + +# +# External I2C/SMBus adapter drivers +# +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_STUB is not set +# CONFIG_SCx200_ACB is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_SPI is not set + +# +# PPS support +# +# CONFIG_PPS is not set +CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y +# CONFIG_GPIOLIB is not set +# CONFIG_W1 is not set +CONFIG_POWER_SUPPLY=y +# CONFIG_POWER_SUPPLY_DEBUG is not set +# CONFIG_PDA_POWER is not set +# CONFIG_TEST_POWER is not set +# CONFIG_BATTERY_DS2760 is not set +# CONFIG_BATTERY_DS2782 is not set +# CONFIG_BATTERY_BQ27x00 is not set +# CONFIG_BATTERY_MAX17040 is not set +# CONFIG_HWMON is not set +CONFIG_THERMAL=y +# CONFIG_WATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +CONFIG_SSB=m +CONFIG_SSB_SPROM=y +CONFIG_SSB_BLOCKIO=y +CONFIG_SSB_PCIHOST_POSSIBLE=y +CONFIG_SSB_PCIHOST=y +CONFIG_SSB_B43_PCI_BRIDGE=y +# CONFIG_SSB_SILENT is not set +# CONFIG_SSB_DEBUG is not set +CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y +CONFIG_SSB_DRIVER_PCICORE=y +# CONFIG_MFD_SUPPORT is not set +# CONFIG_REGULATOR is not set +CONFIG_MEDIA_SUPPORT=m + +# +# Multimedia core support +# +# CONFIG_VIDEO_DEV is not set +# CONFIG_DVB_CORE is not set +# CONFIG_VIDEO_MEDIA is not set + +# +# Multimedia drivers +# +CONFIG_IR_CORE=m +CONFIG_VIDEO_IR=m +CONFIG_LIRC=m +CONFIG_RC_MAP=m +CONFIG_IR_NEC_DECODER=m +CONFIG_IR_RC5_DECODER=m +CONFIG_IR_RC6_DECODER=m +CONFIG_IR_JVC_DECODER=m +CONFIG_IR_SONY_DECODER=m +# CONFIG_IR_LIRC_CODEC is not set +# CONFIG_IR_IMON is not set +# CONFIG_IR_NUVOTON is not set +CONFIG_IR_MCEUSB=m +# CONFIG_IR_ENE is not set +# CONFIG_IR_STREAMZAP is not set +# CONFIG_DAB is not set + +# +# Graphics support +# +CONFIG_AGP=y +# CONFIG_AGP_ALI is not set +# CONFIG_AGP_ATI is not set +# CONFIG_AGP_AMD is not set +CONFIG_AGP_INTEL=y +# CONFIG_AGP_NVIDIA is not set +# CONFIG_AGP_SIS is not set +# CONFIG_AGP_SWORKS is not set +# CONFIG_AGP_VIA is not set +# CONFIG_AGP_EFFICEON is not set +CONFIG_VGA_ARB=y +CONFIG_VGA_ARB_MAX_GPUS=1 +# CONFIG_VGA_SWITCHEROO is not set +CONFIG_DRM=y +CONFIG_DRM_KMS_HELPER=y +CONFIG_DRM_TTM=y +# CONFIG_DRM_TDFX is not set +# CONFIG_DRM_R128 is not set +# CONFIG_DRM_RADEON is not set +# CONFIG_DRM_I810 is not set +# CONFIG_DRM_MGA is not set +# CONFIG_DRM_SIS is not set +# CONFIG_DRM_VIA is not set +# CONFIG_DRM_SAVAGE is not set +# CONFIG_VGASTATE is not set +CONFIG_VIDEO_OUTPUT_CONTROL=y +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +# CONFIG_FB_BOOT_VESA_SUPPORT is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +# CONFIG_FB_SYS_FILLRECT is not set +# CONFIG_FB_SYS_COPYAREA is not set +# CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_FOREIGN_ENDIAN is not set +# CONFIG_FB_SYS_FOPS is not set +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +CONFIG_FB_BACKLIGHT=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_CIRRUS is not set +# CONFIG_FB_PM2 is not set +# CONFIG_FB_CYBER2000 is not set +# CONFIG_FB_ARC is not set +# CONFIG_FB_ASILIANT is not set +# CONFIG_FB_IMSTT is not set +# CONFIG_FB_VGA16 is not set +# CONFIG_FB_VESA is not set +# CONFIG_FB_EFI is not set +# CONFIG_FB_N411 is not set +# CONFIG_FB_HGA is not set +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_NVIDIA is not set +# CONFIG_FB_RIVA is not set +# CONFIG_FB_I810 is not set +# CONFIG_FB_LE80578 is not set +# CONFIG_FB_INTEL is not set +# CONFIG_FB_MATROX is not set +# CONFIG_FB_RADEON is not set +# CONFIG_FB_ATY128 is not set +# CONFIG_FB_ATY is not set +# CONFIG_FB_S3 is not set +# CONFIG_FB_SAVAGE is not set +# CONFIG_FB_SIS is not set +# CONFIG_FB_VIA is not set +# CONFIG_FB_NEOMAGIC is not set +# CONFIG_FB_KYRO is not set +# CONFIG_FB_3DFX is not set +# CONFIG_FB_VOODOO1 is not set +# CONFIG_FB_VT8623 is not set +# CONFIG_FB_TRIDENT is not set +# CONFIG_FB_ARK is not set +# CONFIG_FB_PM3 is not set +# CONFIG_FB_CARMINE is not set +# CONFIG_FB_GEODE is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_MB862XX is not set +# CONFIG_FB_BROADSHEET is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_LCD_CLASS_DEVICE is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y +# CONFIG_BACKLIGHT_GENERIC is not set +# CONFIG_BACKLIGHT_PROGEAR is not set +# CONFIG_BACKLIGHT_MBP_NVIDIA is not set +# CONFIG_BACKLIGHT_SAHARA is not set +# CONFIG_BACKLIGHT_ADP8860 is not set + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set + +# +# Console display driver support +# +CONFIG_VGA_CONSOLE=y +CONFIG_VGACON_SOFT_SCROLLBACK=y +CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256 +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE is not set +# CONFIG_LOGO is not set +CONFIG_SOUND=y +# CONFIG_SOUND_OSS_CORE is not set +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=y +# CONFIG_SND_SEQUENCER is not set +# CONFIG_SND_MIXER_OSS is not set +# CONFIG_SND_PCM_OSS is not set +# CONFIG_SND_HRTIMER is not set +CONFIG_SND_DYNAMIC_MINORS=y +# CONFIG_SND_SUPPORT_OLD_API is not set +# CONFIG_SND_VERBOSE_PROCFS is not set +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +CONFIG_SND_VMASTER=y +CONFIG_SND_DMA_SGBUF=y +# CONFIG_SND_RAWMIDI_SEQ is not set +# CONFIG_SND_OPL3_LIB_SEQ is not set +# CONFIG_SND_OPL4_LIB_SEQ is not set +# CONFIG_SND_SBAWE_SEQ is not set +# CONFIG_SND_EMU10K1_SEQ is not set +# CONFIG_SND_DRIVERS is not set +CONFIG_SND_PCI=y +# CONFIG_SND_AD1889 is not set +# CONFIG_SND_ALS300 is not set +# CONFIG_SND_ALS4000 is not set +# CONFIG_SND_ALI5451 is not set +# CONFIG_SND_ASIHPI is not set +# CONFIG_SND_ATIIXP is not set +# CONFIG_SND_ATIIXP_MODEM is not set +# CONFIG_SND_AU8810 is not set +# CONFIG_SND_AU8820 is not set +# CONFIG_SND_AU8830 is not set +# CONFIG_SND_AW2 is not set +# CONFIG_SND_AZT3328 is not set +# CONFIG_SND_BT87X is not set +# CONFIG_SND_CA0106 is not set +# CONFIG_SND_CMIPCI is not set +# CONFIG_SND_OXYGEN is not set +# CONFIG_SND_CS4281 is not set +# CONFIG_SND_CS46XX is not set +# CONFIG_SND_CS5530 is not set +# CONFIG_SND_CS5535AUDIO is not set +# CONFIG_SND_CTXFI is not set +# CONFIG_SND_DARLA20 is not set +# CONFIG_SND_GINA20 is not set +# CONFIG_SND_LAYLA20 is not set +# CONFIG_SND_DARLA24 is not set +# CONFIG_SND_GINA24 is not set +# CONFIG_SND_LAYLA24 is not set +# CONFIG_SND_MONA is not set +# CONFIG_SND_MIA is not set +# CONFIG_SND_ECHO3G is not set +# CONFIG_SND_INDIGO is not set +# CONFIG_SND_INDIGOIO is not set +# CONFIG_SND_INDIGODJ is not set +# CONFIG_SND_INDIGOIOX is not set +# CONFIG_SND_INDIGODJX is not set +# CONFIG_SND_EMU10K1 is not set +# CONFIG_SND_EMU10K1X is not set +# CONFIG_SND_ENS1370 is not set +# CONFIG_SND_ENS1371 is not set +# CONFIG_SND_ES1938 is not set +# CONFIG_SND_ES1968 is not set +# CONFIG_SND_FM801 is not set +CONFIG_SND_HDA_INTEL=y +CONFIG_SND_HDA_HWDEP=y +# CONFIG_SND_HDA_RECONFIG is not set +# CONFIG_SND_HDA_INPUT_BEEP is not set +# CONFIG_SND_HDA_INPUT_JACK is not set +# CONFIG_SND_HDA_PATCH_LOADER is not set +CONFIG_SND_HDA_CODEC_REALTEK=y +# CONFIG_SND_HDA_CODEC_ANALOG is not set +# CONFIG_SND_HDA_CODEC_SIGMATEL is not set +# CONFIG_SND_HDA_CODEC_VIA is not set +CONFIG_SND_HDA_CODEC_ATIHDMI=y +# CONFIG_SND_HDA_CODEC_NVHDMI is not set +# CONFIG_SND_HDA_CODEC_INTELHDMI is not set +# CONFIG_SND_HDA_CODEC_CIRRUS is not set +# CONFIG_SND_HDA_CODEC_CONEXANT is not set +# CONFIG_SND_HDA_CODEC_CA0110 is not set +# CONFIG_SND_HDA_CODEC_CMEDIA is not set +# CONFIG_SND_HDA_CODEC_SI3054 is not set +CONFIG_SND_HDA_GENERIC=y +CONFIG_SND_HDA_POWER_SAVE=y +CONFIG_SND_HDA_POWER_SAVE_DEFAULT=5 +# CONFIG_SND_HDSP is not set +# CONFIG_SND_HDSPM is not set +# CONFIG_SND_HIFIER is not set +# CONFIG_SND_ICE1712 is not set +# CONFIG_SND_ICE1724 is not set +# CONFIG_SND_INTEL8X0 is not set +# CONFIG_SND_INTEL8X0M is not set +# CONFIG_SND_KORG1212 is not set +# CONFIG_SND_LX6464ES is not set +# CONFIG_SND_MAESTRO3 is not set +# CONFIG_SND_MIXART is not set +# CONFIG_SND_NM256 is not set +# CONFIG_SND_PCXHR is not set +# CONFIG_SND_RIPTIDE is not set +# CONFIG_SND_RME32 is not set +# CONFIG_SND_RME96 is not set +# CONFIG_SND_RME9652 is not set +# CONFIG_SND_SIS7019 is not set +# CONFIG_SND_SONICVIBES is not set +# CONFIG_SND_TRIDENT is not set +# CONFIG_SND_VIA82XX is not set +# CONFIG_SND_VIA82XX_MODEM is not set +# CONFIG_SND_VIRTUOSO is not set +# CONFIG_SND_VX222 is not set +# CONFIG_SND_YMFPCI is not set +# CONFIG_SND_USB is not set +# CONFIG_SND_SOC is not set +# CONFIG_SOUND_PRIME is not set +CONFIG_HID_SUPPORT=y +CONFIG_HID=y +CONFIG_HIDRAW=y + +# +# USB Input Devices +# +CONFIG_USB_HID=y +# CONFIG_HID_PID is not set +CONFIG_USB_HIDDEV=y + +# +# Special HID drivers +# +# CONFIG_HID_3M_PCT is not set +# CONFIG_HID_A4TECH is not set +# CONFIG_HID_ACRUX_FF is not set +CONFIG_HID_APPLE=y +CONFIG_HID_AUREAL=y +# CONFIG_HID_BELKIN is not set +# CONFIG_HID_CANDO is not set +# CONFIG_HID_CHERRY is not set +# CONFIG_HID_CHICONY is not set +# CONFIG_HID_PRODIKEYS is not set +# CONFIG_HID_CYPRESS is not set +# CONFIG_HID_DRAGONRISE is not set +# CONFIG_HID_EGALAX is not set +# CONFIG_HID_EZKEY is not set +# CONFIG_HID_KYE is not set +# CONFIG_HID_GYRATION is not set +CONFIG_HID_TWINHAN=y +# CONFIG_HID_KENSINGTON is not set +CONFIG_HID_LOGITECH=y +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_HID_MICROSOFT=y +# CONFIG_HID_MOSART is not set +# CONFIG_HID_MONTEREY is not set +# CONFIG_HID_NTRIG is not set +# CONFIG_HID_ORTEK is not set +# CONFIG_HID_PANTHERLORD is not set +# CONFIG_HID_PETALYNX is not set +# CONFIG_HID_PICOLCD is not set +# CONFIG_HID_QUANTA is not set +# CONFIG_HID_ROCCAT is not set +# CONFIG_HID_ROCCAT_KONE is not set +# CONFIG_HID_SAMSUNG is not set +CONFIG_HID_SONY=y +# CONFIG_HID_STANTUM is not set +CONFIG_HID_SUNPLUS=y +# CONFIG_HID_GREENASIA is not set +# CONFIG_HID_SMARTJOYPLUS is not set +CONFIG_HID_TOPSEED=y +# CONFIG_HID_THRUSTMASTER is not set +# CONFIG_HID_ZEROPLUS is not set +# CONFIG_HID_ZYDACRON is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set +# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set + +# +# Miscellaneous USB options +# +# CONFIG_USB_DEVICEFS is not set +# CONFIG_USB_DEVICE_CLASS is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set +# CONFIG_USB_MON is not set +# CONFIG_USB_WUSB is not set +# CONFIG_USB_WUSB_CBAF is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +# CONFIG_USB_XHCI_HCD is not set +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +# CONFIG_USB_EHCI_TT_NEWSCHED is not set +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1760_HCD is not set +# CONFIG_USB_ISP1362_HCD is not set +# CONFIG_USB_OHCI_HCD is not set +CONFIG_USB_UHCI_HCD=y +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_WHCI_HCD is not set +# CONFIG_USB_HWA_HCD is not set + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set +# CONFIG_USB_WDM is not set +# CONFIG_USB_TMC is not set + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_ONETOUCH is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB port drivers +# +CONFIG_USB_SERIAL=m +# CONFIG_USB_EZUSB is not set +# CONFIG_USB_SERIAL_GENERIC is not set +# CONFIG_USB_SERIAL_AIRCABLE is not set +# CONFIG_USB_SERIAL_ARK3116 is not set +# CONFIG_USB_SERIAL_BELKIN is not set +# CONFIG_USB_SERIAL_CH341 is not set +# CONFIG_USB_SERIAL_WHITEHEAT is not set +# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +# CONFIG_USB_SERIAL_CP210X is not set +# CONFIG_USB_SERIAL_CYPRESS_M8 is not set +# CONFIG_USB_SERIAL_EMPEG is not set +CONFIG_USB_SERIAL_FTDI_SIO=m +# CONFIG_USB_SERIAL_FUNSOFT is not set +# CONFIG_USB_SERIAL_VISOR is not set +# CONFIG_USB_SERIAL_IPAQ is not set +# CONFIG_USB_SERIAL_IR is not set +# CONFIG_USB_SERIAL_EDGEPORT is not set +# CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_GARMIN is not set +# CONFIG_USB_SERIAL_IPW is not set +# CONFIG_USB_SERIAL_IUU is not set +# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set +# CONFIG_USB_SERIAL_KEYSPAN is not set +# CONFIG_USB_SERIAL_KLSI is not set +# CONFIG_USB_SERIAL_KOBIL_SCT is not set +# CONFIG_USB_SERIAL_MCT_U232 is not set +# CONFIG_USB_SERIAL_MOS7720 is not set +# CONFIG_USB_SERIAL_MOS7840 is not set +# CONFIG_USB_SERIAL_MOTOROLA is not set +# CONFIG_USB_SERIAL_NAVMAN is not set +# CONFIG_USB_SERIAL_PL2303 is not set +# CONFIG_USB_SERIAL_OTI6858 is not set +# CONFIG_USB_SERIAL_QCAUX is not set +# CONFIG_USB_SERIAL_QUALCOMM is not set +# CONFIG_USB_SERIAL_SPCP8X5 is not set +# CONFIG_USB_SERIAL_HP4X is not set +# CONFIG_USB_SERIAL_SAFE is not set +# CONFIG_USB_SERIAL_SIEMENS_MPI is not set +# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set +# CONFIG_USB_SERIAL_SYMBOL is not set +# CONFIG_USB_SERIAL_TI is not set +# CONFIG_USB_SERIAL_CYBERJACK is not set +# CONFIG_USB_SERIAL_XIRCOM is not set +# CONFIG_USB_SERIAL_OPTION is not set +# CONFIG_USB_SERIAL_OMNINET is not set +# CONFIG_USB_SERIAL_OPTICON is not set +# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set +# CONFIG_USB_SERIAL_ZIO is not set +# CONFIG_USB_SERIAL_SSU100 is not set +# CONFIG_USB_SERIAL_DEBUG is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_SEVSEG is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set +# CONFIG_USB_TEST is not set +# CONFIG_USB_ISIGHTFW is not set +# CONFIG_USB_GADGET is not set + +# +# OTG and related infrastructure +# +# CONFIG_NOP_USB_XCEIV is not set +# CONFIG_UWB is not set +# CONFIG_MMC is not set +# CONFIG_MEMSTICK is not set +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# LED drivers +# +# CONFIG_LEDS_ALIX2 is not set +# CONFIG_LEDS_PCA9532 is not set +# CONFIG_LEDS_LP3944 is not set +# CONFIG_LEDS_CLEVO_MAIL is not set +# CONFIG_LEDS_PCA955X is not set +# CONFIG_LEDS_BD2802 is not set +# CONFIG_LEDS_INTEL_SS4200 is not set +CONFIG_LEDS_TRIGGERS=y + +# +# LED Triggers +# +# CONFIG_LEDS_TRIGGER_TIMER is not set +# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set +# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set +# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set + +# +# iptables trigger is under Netfilter config (LED target) +# +# CONFIG_ACCESSIBILITY is not set +# CONFIG_INFINIBAND is not set +# CONFIG_EDAC is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_DS3232 is not set +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_ISL12022 is not set +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set +# CONFIG_RTC_DRV_BQ32K is not set +# CONFIG_RTC_DRV_S35390A is not set +# CONFIG_RTC_DRV_FM3130 is not set +# CONFIG_RTC_DRV_RX8581 is not set +# CONFIG_RTC_DRV_RX8025 is not set + +# +# SPI RTC drivers +# + +# +# Platform RTC drivers +# +CONFIG_RTC_DRV_CMOS=y +# CONFIG_RTC_DRV_DS1286 is not set +# CONFIG_RTC_DRV_DS1511 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T35 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_MSM6242 is not set +# CONFIG_RTC_DRV_BQ4802 is not set +# CONFIG_RTC_DRV_RP5C01 is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# on-CPU RTC drivers +# +# CONFIG_DMADEVICES is not set +# CONFIG_AUXDISPLAY is not set +# CONFIG_UIO is not set +CONFIG_STAGING=y +# CONFIG_STAGING_EXCLUDE_BUILD is not set +# CONFIG_USB_IP_COMMON is not set +# CONFIG_W35UND is not set +# CONFIG_PRISM2_USB is not set +# CONFIG_ECHO is not set +# CONFIG_OTUS is not set +# CONFIG_RT2860 is not set +# CONFIG_RT2870 is not set +# CONFIG_COMEDI is not set +# CONFIG_ASUS_OLED is not set +# CONFIG_R8187SE is not set +# CONFIG_RTL8192SU is not set +# CONFIG_RTL8192U is not set +# CONFIG_RTL8192E is not set +# CONFIG_TRANZPORT is not set +# CONFIG_POHMELFS is not set +# CONFIG_IDE_PHISON is not set +# CONFIG_LINE6_USB is not set +# CONFIG_DRM_VMWGFX is not set +CONFIG_DRM_NOUVEAU=y +CONFIG_DRM_NOUVEAU_BACKLIGHT=y + +# +# I2C encoder or helper chips +# +CONFIG_DRM_I2C_CH7006=m +CONFIG_DRM_I2C_SIL164=m +# CONFIG_USB_SERIAL_QUATECH2 is not set +# CONFIG_USB_SERIAL_QUATECH_USB2 is not set +# CONFIG_VT6655 is not set +# CONFIG_VT6656 is not set +# CONFIG_FB_UDL is not set +# CONFIG_HYPERV is not set +# CONFIG_VME_BUS is not set +# CONFIG_IIO is not set +# CONFIG_ZRAM is not set +# CONFIG_BATMAN_ADV is not set +# CONFIG_SAMSUNG_LAPTOP is not set +# CONFIG_FB_SM7XX is not set +# CONFIG_CRYSTALHD is not set + +# +# Texas Instruments shared transport line discipline +# +# CONFIG_TI_ST is not set +# CONFIG_FB_XGI is not set +# CONFIG_LIRC_STAGING is not set +# CONFIG_ACPI_QUICKSTART is not set +# CONFIG_X86_PLATFORM_DEVICES is not set + +# +# Firmware Drivers +# +# CONFIG_EDD is not set +CONFIG_FIRMWARE_MEMMAP=y +# CONFIG_EFI_VARS is not set +# CONFIG_DELL_RBU is not set +# CONFIG_DCDBAS is not set +CONFIG_DMIID=y +# CONFIG_ISCSI_IBFT_FIND is not set + +# +# File systems +# +# CONFIG_EXT2_FS is not set +# CONFIG_EXT3_FS is not set +CONFIG_EXT4_FS=y +CONFIG_EXT4_USE_FOR_EXT23=y +# CONFIG_EXT4_FS_XATTR is not set +# CONFIG_EXT4_DEBUG is not set +CONFIG_JBD2=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_FS_POSIX_ACL is not set +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_BTRFS_FS is not set +# CONFIG_NILFS2_FS is not set +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +CONFIG_DNOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=y +# CONFIG_CUSE is not set + +# +# Caches +# +# CONFIG_FSCACHE is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=y +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +# CONFIG_MSDOS_FS is not set +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="ascii" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_HUGETLBFS is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_ECRYPT_FS is not set +# CONFIG_HFS_FS is not set +CONFIG_HFSPLUS_FS=y +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_LOGFS is not set +# CONFIG_CRAMFS is not set +CONFIG_SQUASHFS=y +CONFIG_SQUASHFS_XATTR=y +CONFIG_SQUASHFS_LZO=y +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +CONFIG_NFS_V4=y +# CONFIG_NFS_V4_1 is not set +# CONFIG_NFS_USE_LEGACY_DNS is not set +CONFIG_NFS_USE_KERNEL_DNS=y +# CONFIG_NFSD is not set +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_SMB_FS is not set +# CONFIG_CEPH_FS is not set +CONFIG_CIFS=y +CONFIG_CIFS_STATS=y +CONFIG_CIFS_STATS2=y +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_UPCALL is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_DFS_UPCALL is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +CONFIG_MAC_PARTITION=y +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +CONFIG_LDM_PARTITION=y +# CONFIG_LDM_DEBUG is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +CONFIG_EFI_PARTITION=y +# CONFIG_SYSV68_PARTITION is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="utf8" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=y +# CONFIG_DLM is not set + +# +# Kernel hacking +# +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_PRINTK_TIME=y +# CONFIG_ENABLE_WARN_DEPRECATED is not set +# CONFIG_ENABLE_MUST_CHECK is not set +CONFIG_FRAME_WARN=1024 +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_HARDLOCKUP_DETECTOR is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +CONFIG_ARCH_WANT_FRAME_POINTERS=y +# CONFIG_FRAME_POINTER is not set +# CONFIG_RCU_CPU_STALL_DETECTOR is not set +CONFIG_SYSCTL_SYSCALL_CHECK=y +CONFIG_USER_STACKTRACE_SUPPORT=y +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y +CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_TRACING_SUPPORT=y +# CONFIG_FTRACE is not set +# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set +# CONFIG_FIREWIRE_OHCI_REMOTE_DMA is not set +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +CONFIG_HAVE_ARCH_KMEMCHECK=y +CONFIG_STRICT_DEVMEM=y +# CONFIG_X86_VERBOSE_BOOTUP is not set +# CONFIG_EARLY_PRINTK is not set +# CONFIG_4KSTACKS is not set +CONFIG_DOUBLEFAULT=y +# CONFIG_IOMMU_STRESS is not set +CONFIG_HAVE_MMIOTRACE_SUPPORT=y +CONFIG_IO_DELAY_TYPE_0X80=0 +CONFIG_IO_DELAY_TYPE_0XED=1 +CONFIG_IO_DELAY_TYPE_UDELAY=2 +CONFIG_IO_DELAY_TYPE_NONE=3 +CONFIG_IO_DELAY_0X80=y +# CONFIG_IO_DELAY_0XED is not set +# CONFIG_IO_DELAY_UDELAY is not set +# CONFIG_IO_DELAY_NONE is not set +CONFIG_DEFAULT_IO_DELAY_TYPE=0 +CONFIG_OPTIMIZE_INLINING=y + +# +# Security options +# +CONFIG_KEYS=y +# CONFIG_KEYS_DEBUG_PROC_KEYS is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITYFS is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_DEFAULT_SECURITY="" +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y +# CONFIG_CRYPTO_GF128MUL is not set +# CONFIG_CRYPTO_NULL is not set +CONFIG_CRYPTO_WORKQUEUE=y +# CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_AUTHENC is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Authenticated Encryption with Associated Data +# +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_GCM is not set +# CONFIG_CRYPTO_SEQIV is not set + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +# CONFIG_CRYPTO_CTR is not set +# CONFIG_CRYPTO_CTS is not set +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +# CONFIG_CRYPTO_HMAC is not set +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_CRC32C_INTEL is not set +# CONFIG_CRYPTO_GHASH is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_MICHAEL_MIC=y +# CONFIG_CRYPTO_RMD128 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# Ciphers +# +CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_AES_586 is not set +# CONFIG_CRYPTO_ANUBIS is not set +CONFIG_CRYPTO_ARC4=y +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_SALSA20_586 is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_TWOFISH_586 is not set + +# +# Compression +# +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_ZLIB is not set +# CONFIG_CRYPTO_LZO is not set + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_HW is not set +CONFIG_HAVE_KVM=y +# CONFIG_VIRTUALIZATION is not set +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_GENERIC_FIND_FIRST_BIT=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_GENERIC_FIND_LAST_BIT=y +CONFIG_CRC_CCITT=m +CONFIG_CRC16=y +# CONFIG_CRC_T10DIF is not set +CONFIG_CRC_ITU_T=y +CONFIG_CRC32=y +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_NLATTR=y diff --git a/projects/ATV/linux/linux.i386.conf.2.6.37-1 b/projects/ATV/linux/linux.i386.conf.2.6.37-1 new file mode 100644 index 0000000000..8c44dd05a8 --- /dev/null +++ b/projects/ATV/linux/linux.i386.conf.2.6.37-1 @@ -0,0 +1,2228 @@ +# +# Automatically generated make config: don't edit +# Linux/i386 2.6.37-rc2 Kernel Configuration +# +# CONFIG_64BIT is not set +CONFIG_X86_32=y +# CONFIG_X86_64 is not set +CONFIG_X86=y +CONFIG_INSTRUCTION_DECODER=y +CONFIG_OUTPUT_FORMAT="elf32-i386" +CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig" +CONFIG_GENERIC_CMOS_UPDATE=y +CONFIG_CLOCKSOURCE_WATCHDOG=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_MMU=y +CONFIG_ZONE_DMA=y +# CONFIG_NEED_DMA_MAP_STATE is not set +CONFIG_NEED_SG_DMA_LENGTH=y +CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_IOMAP=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_ARCH_MAY_HAVE_PC_FDC=y +# CONFIG_RWSEM_GENERIC_SPINLOCK is not set +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +# CONFIG_GENERIC_TIME_VSYSCALL is not set +CONFIG_ARCH_HAS_CPU_RELAX=y +CONFIG_ARCH_HAS_DEFAULT_IDLE=y +CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y +CONFIG_HAVE_SETUP_PER_CPU_AREA=y +CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y +CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y +# CONFIG_HAVE_CPUMASK_OF_CPU_MAP is not set +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +# CONFIG_ZONE_DMA32 is not set +CONFIG_ARCH_POPULATES_NODE_MAP=y +# CONFIG_AUDIT_ARCH is not set +CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y +CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y +CONFIG_X86_32_LAZY_GS=y +CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-ecx -fcall-saved-edx" +CONFIG_KTIME_SCALAR=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_CONSTRUCTORS=y +CONFIG_HAVE_IRQ_WORK=y +CONFIG_IRQ_WORK=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_BZIP2=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_LZO=y +# CONFIG_KERNEL_GZIP is not set +# CONFIG_KERNEL_BZIP2 is not set +CONFIG_KERNEL_LZMA=y +# CONFIG_KERNEL_LZO is not set +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +# CONFIG_TASKSTATS is not set +# CONFIG_AUDIT is not set +CONFIG_HAVE_GENERIC_HARDIRQS=y + +# +# IRQ subsystem +# +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y +# CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED is not set +CONFIG_HAVE_SPARSE_IRQ=y +CONFIG_GENERIC_IRQ_PROBE=y +# CONFIG_GENERIC_PENDING_IRQ is not set +# CONFIG_AUTO_IRQ_AFFINITY is not set +# CONFIG_IRQ_PER_CPU is not set +# CONFIG_HARDIRQS_SW_RESEND is not set +# CONFIG_SPARSE_IRQ is not set + +# +# RCU Subsystem +# +# CONFIG_TREE_PREEMPT_RCU is not set +# CONFIG_TINY_RCU is not set +CONFIG_TINY_PREEMPT_RCU=y +CONFIG_PREEMPT_RCU=y +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_IKCONFIG is not set +CONFIG_LOG_BUF_SHIFT=16 +CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y +CONFIG_CGROUPS=y +# CONFIG_CGROUP_DEBUG is not set +CONFIG_CGROUP_NS=y +CONFIG_CGROUP_FREEZER=y +# CONFIG_CGROUP_DEVICE is not set +CONFIG_CPUSETS=y +CONFIG_PROC_PID_CPUSET=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_RESOURCE_COUNTERS=y +# CONFIG_CGROUP_MEM_RES_CTLR is not set +# CONFIG_CGROUP_SCHED is not set +# CONFIG_BLK_CGROUP is not set +# CONFIG_NAMESPACES is not set +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE=" " +CONFIG_INITRAMFS_ROOT_UID=0 +CONFIG_INITRAMFS_ROOT_GID=0 +# CONFIG_RD_GZIP is not set +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +# CONFIG_RD_LZO is not set +CONFIG_INITRAMFS_COMPRESSION_NONE=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_EMBEDDED=y +CONFIG_UID16=y +CONFIG_SYSCTL_SYSCALL=y +# CONFIG_KALLSYMS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +# CONFIG_BUG is not set +CONFIG_ELF_CORE=y +# CONFIG_PCSPKR_PLATFORM is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_HAVE_PERF_EVENTS=y + +# +# Kernel Performance Events And Counters +# +CONFIG_PERF_EVENTS=y +# CONFIG_PERF_COUNTERS is not set +# CONFIG_VM_EVENT_COUNTERS is not set +CONFIG_PCI_QUIRKS=y +# CONFIG_COMPAT_BRK is not set +# CONFIG_SLAB is not set +# CONFIG_SLUB is not set +CONFIG_SLOB=y +# CONFIG_PROFILING is not set +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +CONFIG_JUMP_LABEL=y +CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y +CONFIG_HAVE_IOREMAP_PROT=y +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_OPTPROBES=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_HW_BREAKPOINT=y +CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y +CONFIG_HAVE_USER_RETURN_NOTIFIER=y +CONFIG_HAVE_PERF_EVENTS_NMI=y +CONFIG_HAVE_ARCH_JUMP_LABEL=y + +# +# GCOV-based kernel profiling +# +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_LOAD is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_BLOCK=y +CONFIG_LBDAF=y +CONFIG_BLK_DEV_BSG=y +# CONFIG_BLK_DEV_INTEGRITY is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_DEADLINE is not set +CONFIG_IOSCHED_CFQ=y +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +# CONFIG_INLINE_SPIN_TRYLOCK is not set +# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK is not set +# CONFIG_INLINE_SPIN_LOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK_IRQ is not set +# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set +# CONFIG_INLINE_SPIN_UNLOCK is not set +# CONFIG_INLINE_SPIN_UNLOCK_BH is not set +# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set +# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_READ_TRYLOCK is not set +# CONFIG_INLINE_READ_LOCK is not set +# CONFIG_INLINE_READ_LOCK_BH is not set +# CONFIG_INLINE_READ_LOCK_IRQ is not set +# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set +# CONFIG_INLINE_READ_UNLOCK is not set +# CONFIG_INLINE_READ_UNLOCK_BH is not set +# CONFIG_INLINE_READ_UNLOCK_IRQ is not set +# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_WRITE_TRYLOCK is not set +# CONFIG_INLINE_WRITE_LOCK is not set +# CONFIG_INLINE_WRITE_LOCK_BH is not set +# CONFIG_INLINE_WRITE_LOCK_IRQ is not set +# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set +# CONFIG_INLINE_WRITE_UNLOCK is not set +# CONFIG_INLINE_WRITE_UNLOCK_BH is not set +# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set +# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set +# CONFIG_MUTEX_SPIN_ON_OWNER is not set +CONFIG_FREEZER=y + +# +# Processor type and features +# +CONFIG_TICK_ONESHOT=y +# CONFIG_NO_HZ is not set +CONFIG_HIGH_RES_TIMERS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +# CONFIG_SMP is not set +CONFIG_X86_MPPARSE=y +# CONFIG_X86_EXTENDED_PLATFORM is not set +CONFIG_SCHED_OMIT_FRAME_POINTER=y +# CONFIG_PARAVIRT_GUEST is not set +CONFIG_NO_BOOTMEM=y +# CONFIG_MEMTEST is not set +# CONFIG_M386 is not set +# CONFIG_M486 is not set +# CONFIG_M586 is not set +# CONFIG_M586TSC is not set +# CONFIG_M586MMX is not set +# CONFIG_M686 is not set +# CONFIG_MPENTIUMII is not set +# CONFIG_MPENTIUMIII is not set +CONFIG_MPENTIUMM=y +# CONFIG_MPENTIUM4 is not set +# CONFIG_MK6 is not set +# CONFIG_MK7 is not set +# CONFIG_MK8 is not set +# CONFIG_MCRUSOE is not set +# CONFIG_MEFFICEON is not set +# CONFIG_MWINCHIPC6 is not set +# CONFIG_MWINCHIP3D is not set +# CONFIG_MGEODEGX1 is not set +# CONFIG_MGEODE_LX is not set +# CONFIG_MCYRIXIII is not set +# CONFIG_MVIAC3_2 is not set +# CONFIG_MVIAC7 is not set +# CONFIG_MCORE2 is not set +# CONFIG_MATOM is not set +# CONFIG_X86_GENERIC is not set +CONFIG_X86_CPU=y +CONFIG_X86_INTERNODE_CACHE_SHIFT=6 +CONFIG_X86_CMPXCHG=y +CONFIG_X86_L1_CACHE_SHIFT=6 +CONFIG_X86_XADD=y +CONFIG_X86_WP_WORKS_OK=y +CONFIG_X86_INVLPG=y +CONFIG_X86_BSWAP=y +CONFIG_X86_POPAD_OK=y +CONFIG_X86_INTEL_USERCOPY=y +CONFIG_X86_USE_PPRO_CHECKSUM=y +CONFIG_X86_TSC=y +CONFIG_X86_CMPXCHG64=y +CONFIG_X86_CMOV=y +CONFIG_X86_MINIMUM_CPU_FAMILY=5 +CONFIG_X86_DEBUGCTLMSR=y +CONFIG_PROCESSOR_SELECT=y +CONFIG_CPU_SUP_INTEL=y +# CONFIG_CPU_SUP_CYRIX_32 is not set +# CONFIG_CPU_SUP_AMD is not set +# CONFIG_CPU_SUP_CENTAUR is not set +# CONFIG_CPU_SUP_TRANSMETA_32 is not set +# CONFIG_CPU_SUP_UMC_32 is not set +CONFIG_HPET_TIMER=y +CONFIG_HPET_EMULATE_RTC=y +CONFIG_DMI=y +# CONFIG_IOMMU_HELPER is not set +# CONFIG_IOMMU_API is not set +CONFIG_NR_CPUS=1 +CONFIG_IRQ_TIME_ACCOUNTING=y +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_X86_UP_APIC=y +CONFIG_X86_UP_IOAPIC=y +CONFIG_X86_LOCAL_APIC=y +CONFIG_X86_IO_APIC=y +CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y +CONFIG_X86_MCE=y +CONFIG_X86_MCE_INTEL=y +# CONFIG_X86_MCE_AMD is not set +# CONFIG_X86_ANCIENT_MCE is not set +CONFIG_X86_MCE_THRESHOLD=y +# CONFIG_X86_MCE_INJECT is not set +CONFIG_X86_THERMAL_VECTOR=y +# CONFIG_VM86 is not set +# CONFIG_TOSHIBA is not set +# CONFIG_I8K is not set +# CONFIG_X86_REBOOTFIXUPS is not set +# CONFIG_MICROCODE is not set +CONFIG_X86_MSR=y +CONFIG_X86_CPUID=y +CONFIG_NOHIGHMEM=y +# CONFIG_HIGHMEM4G is not set +# CONFIG_HIGHMEM64G is not set +# CONFIG_VMSPLIT_3G is not set +CONFIG_VMSPLIT_3G_OPT=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_2G_OPT is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xB0000000 +# CONFIG_X86_PAE is not set +# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set +# CONFIG_ARCH_DMA_ADDR_T_64BIT is not set +CONFIG_NEED_NODE_MEMMAP_SIZE=y +CONFIG_ARCH_FLATMEM_ENABLE=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_ILLEGAL_POINTER_VALUE=0 +CONFIG_SELECT_MEMORY_MODEL=y +# CONFIG_FLATMEM_MANUAL is not set +CONFIG_SPARSEMEM_MANUAL=y +CONFIG_SPARSEMEM=y +CONFIG_HAVE_MEMORY_PRESENT=y +CONFIG_SPARSEMEM_STATIC=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=1 +CONFIG_BOUNCE=y +CONFIG_VIRT_TO_BUS=y +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_NEED_PER_CPU_KM=y +# CONFIG_X86_CHECK_BIOS_CORRUPTION is not set +CONFIG_X86_RESERVE_LOW=64 +# CONFIG_MATH_EMULATION is not set +CONFIG_MTRR=y +CONFIG_MTRR_SANITIZER=y +CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0 +CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1 +CONFIG_X86_PAT=y +CONFIG_ARCH_USES_PG_UNCACHED=y +CONFIG_EFI=y +CONFIG_SECCOMP=y +# CONFIG_CC_STACKPROTECTOR is not set +# CONFIG_HZ_100 is not set +# CONFIG_HZ_250 is not set +CONFIG_HZ_300=y +# CONFIG_HZ_1000 is not set +CONFIG_HZ=300 +CONFIG_SCHED_HRTICK=y +# CONFIG_KEXEC is not set +CONFIG_PHYSICAL_START=0x1000000 +# CONFIG_RELOCATABLE is not set +CONFIG_PHYSICAL_ALIGN=0x1000000 +# CONFIG_COMPAT_VDSO is not set +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="fastboot root=/dev/ram0 rdinit=/init" +# CONFIG_CMDLINE_OVERRIDE is not set + +# +# Power management and ACPI options +# +CONFIG_PM=y +# CONFIG_PM_DEBUG is not set +# CONFIG_SUSPEND is not set +# CONFIG_HIBERNATION is not set +# CONFIG_PM_RUNTIME is not set +# CONFIG_PM_OPP is not set +CONFIG_ACPI=y +# CONFIG_ACPI_PROCFS is not set +# CONFIG_ACPI_PROCFS_POWER is not set +# CONFIG_ACPI_EC_DEBUGFS is not set +# CONFIG_ACPI_PROC_EVENT is not set +# CONFIG_ACPI_AC is not set +# CONFIG_ACPI_BATTERY is not set +# CONFIG_ACPI_BUTTON is not set +CONFIG_ACPI_VIDEO=y +CONFIG_ACPI_FAN=y +# CONFIG_ACPI_DOCK is not set +CONFIG_ACPI_PROCESSOR=y +# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set +CONFIG_ACPI_THERMAL=y +# CONFIG_ACPI_CUSTOM_DSDT is not set +CONFIG_ACPI_BLACKLIST_YEAR=0 +# CONFIG_ACPI_DEBUG is not set +# CONFIG_ACPI_PCI_SLOT is not set +CONFIG_X86_PM_TIMER=y +# CONFIG_ACPI_CONTAINER is not set +# CONFIG_ACPI_SBS is not set +# CONFIG_ACPI_HED is not set +# CONFIG_ACPI_APEI is not set +# CONFIG_SFI is not set + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +# CONFIG_CPU_FREQ_DEBUG is not set +# CONFIG_CPU_FREQ_STAT is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set + +# +# CPUFreq processor drivers +# +# CONFIG_X86_PCC_CPUFREQ is not set +CONFIG_X86_ACPI_CPUFREQ=y +# CONFIG_X86_POWERNOW_K6 is not set +# CONFIG_X86_POWERNOW_K7 is not set +# CONFIG_X86_POWERNOW_K8 is not set +# CONFIG_X86_GX_SUSPMOD is not set +# CONFIG_X86_SPEEDSTEP_CENTRINO is not set +# CONFIG_X86_SPEEDSTEP_ICH is not set +# CONFIG_X86_SPEEDSTEP_SMI is not set +# CONFIG_X86_P4_CLOCKMOD is not set +# CONFIG_X86_CPUFREQ_NFORCE2 is not set +# CONFIG_X86_LONGRUN is not set +# CONFIG_X86_LONGHAUL is not set +# CONFIG_X86_E_POWERSAVER is not set + +# +# shared options +# +# CONFIG_X86_SPEEDSTEP_LIB is not set +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_GOV_LADDER=y +# CONFIG_INTEL_IDLE is not set + +# +# Bus options (PCI etc.) +# +CONFIG_PCI=y +# CONFIG_PCI_GOBIOS is not set +# CONFIG_PCI_GOMMCONFIG is not set +# CONFIG_PCI_GODIRECT is not set +CONFIG_PCI_GOANY=y +CONFIG_PCI_BIOS=y +CONFIG_PCI_DIRECT=y +CONFIG_PCI_MMCONFIG=y +CONFIG_PCI_DOMAINS=y +# CONFIG_PCI_CNB20LE_QUIRK is not set +# CONFIG_DMAR is not set +CONFIG_PCIEPORTBUS=y +# CONFIG_PCIEAER is not set +# CONFIG_PCIEASPM is not set +CONFIG_ARCH_SUPPORTS_MSI=y +CONFIG_PCI_MSI=y +# CONFIG_PCI_STUB is not set +CONFIG_HT_IRQ=y +# CONFIG_PCI_IOV is not set +CONFIG_PCI_IOAPIC=y +CONFIG_ISA_DMA_API=y +# CONFIG_ISA is not set +# CONFIG_MCA is not set +# CONFIG_SCx200 is not set +# CONFIG_OLPC is not set +# CONFIG_OLPC_OPENFIRMWARE is not set +# CONFIG_PCCARD is not set +# CONFIG_HOTPLUG_PCI is not set + +# +# Executable file formats / Emulations +# +CONFIG_BINFMT_ELF=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_HAVE_AOUT=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set +CONFIG_HAVE_ATOMIC_IOMAP=y +CONFIG_HAVE_TEXT_POKE_SMP=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_XFRM_MIGRATE is not set +# CONFIG_XFRM_STATISTICS is not set +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_FIB_HASH=y +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE_DEMUX is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +CONFIG_INET_TUNNEL=m +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_XFRM_MODE_BEET=y +CONFIG_INET_LRO=y +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +CONFIG_IPV6=y +# CONFIG_IPV6_PRIVACY is not set +# CONFIG_IPV6_ROUTER_PREF is not set +# CONFIG_IPV6_OPTIMISTIC_DAD is not set +# CONFIG_INET6_AH is not set +# CONFIG_INET6_ESP is not set +# CONFIG_INET6_IPCOMP is not set +# CONFIG_IPV6_MIP6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +CONFIG_INET6_XFRM_MODE_TRANSPORT=m +CONFIG_INET6_XFRM_MODE_TUNNEL=m +CONFIG_INET6_XFRM_MODE_BEET=m +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +CONFIG_IPV6_SIT=m +# CONFIG_IPV6_SIT_6RD is not set +CONFIG_IPV6_NDISC_NODETYPE=y +# CONFIG_IPV6_TUNNEL is not set +# CONFIG_IPV6_MULTIPLE_TABLES is not set +# CONFIG_IPV6_MROUTE is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set +# CONFIG_NETFILTER is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_L2TP is not set +# CONFIG_BRIDGE is not set +# CONFIG_NET_DSA is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_PHONET is not set +# CONFIG_IEEE802154 is not set +# CONFIG_NET_SCHED is not set +# CONFIG_DCB is not set +CONFIG_DNS_RESOLVER=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_AF_RXRPC is not set +CONFIG_WIRELESS=y +CONFIG_WEXT_CORE=y +CONFIG_WEXT_PROC=y +CONFIG_CFG80211=y +# CONFIG_NL80211_TESTMODE is not set +# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set +# CONFIG_CFG80211_REG_DEBUG is not set +# CONFIG_CFG80211_DEFAULT_PS is not set +# CONFIG_CFG80211_INTERNAL_REGDB is not set +CONFIG_CFG80211_WEXT=y +CONFIG_WIRELESS_EXT_SYSFS=y +CONFIG_LIB80211=y +# CONFIG_LIB80211_DEBUG is not set +CONFIG_MAC80211=y +CONFIG_MAC80211_HAS_RC=y +# CONFIG_MAC80211_RC_PID is not set +CONFIG_MAC80211_RC_MINSTREL=y +CONFIG_MAC80211_RC_MINSTREL_HT=y +CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y +CONFIG_MAC80211_RC_DEFAULT="minstrel_ht" +# CONFIG_MAC80211_MESH is not set +CONFIG_MAC80211_LEDS=y +# CONFIG_MAC80211_DEBUG_MENU is not set +# CONFIG_WIMAX is not set +CONFIG_RFKILL=y +CONFIG_RFKILL_LEDS=y +CONFIG_RFKILL_INPUT=y +# CONFIG_NET_9P is not set +# CONFIG_CAIF is not set +# CONFIG_CEPH_LIB is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_STANDALONE=y +# CONFIG_PREVENT_FIRMWARE_BUILD is not set +CONFIG_FW_LOADER=y +CONFIG_FIRMWARE_IN_KERNEL=y +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_CONNECTOR is not set +# CONFIG_MTD is not set +# CONFIG_PARPORT is not set +CONFIG_PNP=y +# CONFIG_PNP_DEBUG_MESSAGES is not set + +# +# Protocols +# +CONFIG_PNPACPI=y +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set + +# +# DRBD disabled because PROC_FS, INET or CONNECTOR not selected +# +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=4 +CONFIG_BLK_DEV_RAM_SIZE=4096 +# CONFIG_BLK_DEV_XIP is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_BLK_DEV_HD is not set +# CONFIG_BLK_DEV_RBD is not set +# CONFIG_MISC_DEVICES is not set +CONFIG_HAVE_IDE=y +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +# CONFIG_SCSI_PROC_FS is not set + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +# CONFIG_BLK_DEV_SR_VENDOR is not set +CONFIG_CHR_DEV_SG=y +# CONFIG_CHR_DEV_SCH is not set +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set +CONFIG_SCSI_WAIT_SCAN=m + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +# CONFIG_SCSI_LOWLEVEL is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +CONFIG_ATA=y +# CONFIG_ATA_NONSTANDARD is not set +# CONFIG_ATA_VERBOSE_ERROR is not set +CONFIG_ATA_ACPI=y +# CONFIG_SATA_PMP is not set + +# +# Controllers with non-SFF native interface +# +# CONFIG_SATA_AHCI is not set +# CONFIG_SATA_AHCI_PLATFORM is not set +# CONFIG_SATA_INIC162X is not set +# CONFIG_SATA_SIL24 is not set +CONFIG_ATA_SFF=y + +# +# SFF controllers with custom DMA interface +# +# CONFIG_PDC_ADMA is not set +# CONFIG_SATA_QSTOR is not set +# CONFIG_SATA_SX4 is not set +CONFIG_ATA_BMDMA=y + +# +# SATA SFF controllers with BMDMA +# +CONFIG_ATA_PIIX=y +# CONFIG_SATA_MV is not set +# CONFIG_SATA_NV is not set +# CONFIG_SATA_PROMISE is not set +# CONFIG_SATA_SIL is not set +# CONFIG_SATA_SIS is not set +# CONFIG_SATA_SVW is not set +# CONFIG_SATA_ULI is not set +# CONFIG_SATA_VIA is not set +# CONFIG_SATA_VITESSE is not set + +# +# PATA SFF controllers with BMDMA +# +# CONFIG_PATA_ALI is not set +# CONFIG_PATA_AMD is not set +# CONFIG_PATA_ARTOP is not set +# CONFIG_PATA_ATIIXP is not set +# CONFIG_PATA_ATP867X is not set +# CONFIG_PATA_CMD64X is not set +# CONFIG_PATA_CS5520 is not set +# CONFIG_PATA_CS5530 is not set +# CONFIG_PATA_CS5535 is not set +# CONFIG_PATA_CS5536 is not set +# CONFIG_PATA_CYPRESS is not set +# CONFIG_PATA_EFAR is not set +# CONFIG_PATA_HPT366 is not set +# CONFIG_PATA_HPT37X is not set +# CONFIG_PATA_HPT3X2N is not set +# CONFIG_PATA_HPT3X3 is not set +# CONFIG_PATA_IT8213 is not set +# CONFIG_PATA_IT821X is not set +# CONFIG_PATA_JMICRON is not set +# CONFIG_PATA_MARVELL is not set +# CONFIG_PATA_NETCELL is not set +# CONFIG_PATA_NINJA32 is not set +# CONFIG_PATA_NS87415 is not set +# CONFIG_PATA_OLDPIIX is not set +# CONFIG_PATA_OPTIDMA is not set +# CONFIG_PATA_PDC2027X is not set +# CONFIG_PATA_PDC_OLD is not set +# CONFIG_PATA_RADISYS is not set +# CONFIG_PATA_RDC is not set +# CONFIG_PATA_SC1200 is not set +# CONFIG_PATA_SCH is not set +# CONFIG_PATA_SERVERWORKS is not set +# CONFIG_PATA_SIL680 is not set +# CONFIG_PATA_SIS is not set +# CONFIG_PATA_TOSHIBA is not set +# CONFIG_PATA_TRIFLEX is not set +# CONFIG_PATA_VIA is not set +# CONFIG_PATA_WINBOND is not set + +# +# PIO-only SFF controllers +# +# CONFIG_PATA_CMD640_PCI is not set +# CONFIG_PATA_MPIIX is not set +# CONFIG_PATA_NS87410 is not set +# CONFIG_PATA_OPTI is not set +# CONFIG_PATA_PLATFORM is not set +# CONFIG_PATA_RZ1000 is not set + +# +# Generic fallback / legacy drivers +# +CONFIG_PATA_ACPI=y +# CONFIG_ATA_GENERIC is not set +# CONFIG_PATA_LEGACY is not set +# CONFIG_MD is not set +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# +CONFIG_FIREWIRE=m +CONFIG_FIREWIRE_OHCI=m +CONFIG_FIREWIRE_OHCI_DEBUG=y +CONFIG_FIREWIRE_SBP2=m +# CONFIG_FIREWIRE_NET is not set +# CONFIG_FIREWIRE_NOSY is not set +# CONFIG_I2O is not set +# CONFIG_MACINTOSH_DRIVERS is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_MACVLAN is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_VETH is not set +# CONFIG_NET_SB1000 is not set +# CONFIG_ARCNET is not set +CONFIG_MII=y +# CONFIG_PHYLIB is not set +CONFIG_NET_ETHERNET=y +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +# CONFIG_CASSINI is not set +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_ETHOC is not set +# CONFIG_DNET is not set +# CONFIG_NET_TULIP is not set +# CONFIG_HP100 is not set +# CONFIG_IBM_NEW_EMAC_ZMII is not set +# CONFIG_IBM_NEW_EMAC_RGMII is not set +# CONFIG_IBM_NEW_EMAC_TAH is not set +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set +# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set +# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set +# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set +CONFIG_NET_PCI=y +# CONFIG_PCNET32 is not set +# CONFIG_AMD8111_ETH is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_KSZ884X_PCI is not set +# CONFIG_B44 is not set +# CONFIG_FORCEDETH is not set +# CONFIG_E100 is not set +# CONFIG_FEALNX is not set +# CONFIG_NATSEMI is not set +# CONFIG_NE2K_PCI is not set +# CONFIG_8139CP is not set +CONFIG_8139TOO=y +CONFIG_8139TOO_PIO=y +# CONFIG_8139TOO_TUNE_TWISTER is not set +# CONFIG_8139TOO_8129 is not set +# CONFIG_8139_OLD_RX_RESET is not set +# CONFIG_R6040 is not set +# CONFIG_SIS900 is not set +# CONFIG_EPIC100 is not set +# CONFIG_SMSC9420 is not set +# CONFIG_SUNDANCE is not set +# CONFIG_TLAN is not set +# CONFIG_KS8851_MLL is not set +# CONFIG_VIA_RHINE is not set +# CONFIG_SC92031 is not set +# CONFIG_ATL2 is not set +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set +# CONFIG_TR is not set +CONFIG_WLAN=y +# CONFIG_LIBERTAS_THINFIRM is not set +# CONFIG_AIRO is not set +# CONFIG_ATMEL is not set +# CONFIG_AT76C50X_USB is not set +# CONFIG_PRISM54 is not set +# CONFIG_USB_ZD1201 is not set +# CONFIG_USB_NET_RNDIS_WLAN is not set +# CONFIG_RTL8180 is not set +# CONFIG_RTL8187 is not set +# CONFIG_ADM8211 is not set +# CONFIG_MAC80211_HWSIM is not set +# CONFIG_MWL8K is not set +# CONFIG_ATH_COMMON is not set +CONFIG_B43=m +CONFIG_B43_PCI_AUTOSELECT=y +CONFIG_B43_PCICORE_AUTOSELECT=y +CONFIG_B43_PIO=y +CONFIG_B43_PHY_LP=y +CONFIG_B43_LEDS=y +# CONFIG_B43_DEBUG is not set +# CONFIG_B43LEGACY is not set +# CONFIG_HOSTAP is not set +# CONFIG_IPW2100 is not set +# CONFIG_IPW2200 is not set +# CONFIG_IWLWIFI is not set +# CONFIG_LIBERTAS is not set +# CONFIG_HERMES is not set +# CONFIG_P54_COMMON is not set +# CONFIG_RT2X00 is not set +# CONFIG_WL1251 is not set +# CONFIG_WL12XX is not set +# CONFIG_ZD1211RW is not set + +# +# Enable WiMAX (Networking options) to see the WiMAX drivers +# + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET is not set +# CONFIG_USB_HSO is not set +# CONFIG_USB_IPHETH is not set +# CONFIG_WAN is not set + +# +# CAIF transport drivers +# +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_NET_FC is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_VMXNET3 is not set +# CONFIG_ISDN is not set +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_FF_MEMLESS=y +# CONFIG_INPUT_POLLDEV is not set +# CONFIG_INPUT_SPARSEKMAP is not set + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ADP5588 is not set +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_QT2160 is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_TCA6416 is not set +# CONFIG_KEYBOARD_LM8323 is not set +# CONFIG_KEYBOARD_MAX7359 is not set +# CONFIG_KEYBOARD_MCS is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_OPENCORES is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +CONFIG_MOUSE_PS2_ALPS=y +CONFIG_MOUSE_PS2_LOGIPS2PP=y +CONFIG_MOUSE_PS2_SYNAPTICS=y +CONFIG_MOUSE_PS2_LIFEBOOK=y +CONFIG_MOUSE_PS2_TRACKPOINT=y +# CONFIG_MOUSE_PS2_ELANTECH is not set +# CONFIG_MOUSE_PS2_SENTELIC is not set +# CONFIG_MOUSE_PS2_TOUCHKIT is not set +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_APPLETOUCH is not set +# CONFIG_MOUSE_BCM5974 is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_MOUSE_SYNAPTICS_I2C is not set +CONFIG_INPUT_JOYSTICK=y +# CONFIG_JOYSTICK_ANALOG is not set +# CONFIG_JOYSTICK_A3D is not set +# CONFIG_JOYSTICK_ADI is not set +# CONFIG_JOYSTICK_COBRA is not set +# CONFIG_JOYSTICK_GF2K is not set +# CONFIG_JOYSTICK_GRIP is not set +# CONFIG_JOYSTICK_GRIP_MP is not set +# CONFIG_JOYSTICK_GUILLEMOT is not set +# CONFIG_JOYSTICK_INTERACT is not set +# CONFIG_JOYSTICK_SIDEWINDER is not set +# CONFIG_JOYSTICK_TMDC is not set +# CONFIG_JOYSTICK_IFORCE is not set +# CONFIG_JOYSTICK_WARRIOR is not set +# CONFIG_JOYSTICK_MAGELLAN is not set +# CONFIG_JOYSTICK_SPACEORB is not set +# CONFIG_JOYSTICK_SPACEBALL is not set +# CONFIG_JOYSTICK_STINGER is not set +# CONFIG_JOYSTICK_TWIDJOY is not set +# CONFIG_JOYSTICK_ZHENHUA is not set +# CONFIG_JOYSTICK_JOYDUMP is not set +CONFIG_JOYSTICK_XPAD=m +CONFIG_JOYSTICK_XPAD_FF=y +CONFIG_JOYSTICK_XPAD_LEDS=y +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_AD714X is not set +# CONFIG_INPUT_APANEL is not set +# CONFIG_INPUT_WISTRON_BTNS is not set +# CONFIG_INPUT_ATLAS_BTNS is not set +# CONFIG_INPUT_ATI_REMOTE is not set +# CONFIG_INPUT_ATI_REMOTE2 is not set +# CONFIG_INPUT_KEYSPAN_REMOTE is not set +CONFIG_INPUT_APPLEIR=y +# CONFIG_INPUT_POWERMATE is not set +# CONFIG_INPUT_YEALINK is not set +# CONFIG_INPUT_CM109 is not set +CONFIG_INPUT_UINPUT=y +# CONFIG_INPUT_WINBOND_CIR is not set +# CONFIG_INPUT_PCF8574 is not set +# CONFIG_INPUT_ADXL34X is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_I8042=y +# CONFIG_SERIO_SERPORT is not set +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_PCIPS2 is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_SERIO_ALTERA_PS2 is not set +# CONFIG_SERIO_PS2MULT is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_DEVKMEM is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_N_GSM is not set +# CONFIG_NOZOMI is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +# CONFIG_SERIAL_8250_CONSOLE is not set +CONFIG_FIX_EARLYCON_MEM=y +CONFIG_SERIAL_8250_PCI=y +# CONFIG_SERIAL_8250_PNP is not set +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_MFD_HSU is not set +CONFIG_SERIAL_CORE=y +# CONFIG_SERIAL_JSM is not set +# CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_TTY_PRINTK is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +CONFIG_NVRAM=y +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set +# CONFIG_SONYPI is not set +# CONFIG_MWAVE is not set +# CONFIG_PC8736x_GPIO is not set +# CONFIG_NSC_GPIO is not set +# CONFIG_CS5535_GPIO is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_HPET is not set +# CONFIG_HANGCHECK_TIMER is not set +# CONFIG_TCG_TPM is not set +# CONFIG_TELCLOCK is not set +CONFIG_DEVPORT=y +# CONFIG_RAMOOPS is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=m +# CONFIG_I2C_MUX is not set +CONFIG_I2C_HELPER_AUTO=y +CONFIG_I2C_ALGOBIT=y + +# +# I2C Hardware Bus support +# + +# +# PC SMBus host controller drivers +# +# CONFIG_I2C_ALI1535 is not set +# CONFIG_I2C_ALI1563 is not set +# CONFIG_I2C_ALI15X3 is not set +# CONFIG_I2C_AMD756 is not set +# CONFIG_I2C_AMD8111 is not set +CONFIG_I2C_I801=y +# CONFIG_I2C_ISCH is not set +# CONFIG_I2C_PIIX4 is not set +# CONFIG_I2C_NFORCE2 is not set +# CONFIG_I2C_SIS5595 is not set +# CONFIG_I2C_SIS630 is not set +# CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_VIA is not set +# CONFIG_I2C_VIAPRO is not set + +# +# ACPI drivers +# +# CONFIG_I2C_SCMI is not set + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_INTEL_MID is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_XILINX is not set + +# +# External I2C/SMBus adapter drivers +# +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_STUB is not set +# CONFIG_SCx200_ACB is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_SPI is not set + +# +# PPS support +# +# CONFIG_PPS is not set +CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y +# CONFIG_GPIOLIB is not set +# CONFIG_W1 is not set +CONFIG_POWER_SUPPLY=y +# CONFIG_POWER_SUPPLY_DEBUG is not set +# CONFIG_PDA_POWER is not set +# CONFIG_TEST_POWER is not set +# CONFIG_BATTERY_DS2782 is not set +# CONFIG_BATTERY_BQ20Z75 is not set +# CONFIG_BATTERY_BQ27x00 is not set +# CONFIG_BATTERY_MAX17040 is not set +# CONFIG_HWMON is not set +CONFIG_THERMAL=y +# CONFIG_WATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +CONFIG_SSB=m +CONFIG_SSB_SPROM=y +CONFIG_SSB_BLOCKIO=y +CONFIG_SSB_PCIHOST_POSSIBLE=y +CONFIG_SSB_PCIHOST=y +CONFIG_SSB_B43_PCI_BRIDGE=y +# CONFIG_SSB_SILENT is not set +# CONFIG_SSB_DEBUG is not set +CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y +CONFIG_SSB_DRIVER_PCICORE=y +# CONFIG_MFD_SUPPORT is not set +# CONFIG_REGULATOR is not set +CONFIG_MEDIA_SUPPORT=m + +# +# Multimedia core support +# +# CONFIG_VIDEO_DEV is not set +# CONFIG_DVB_CORE is not set +# CONFIG_VIDEO_MEDIA is not set + +# +# Multimedia drivers +# +CONFIG_IR_CORE=m +CONFIG_VIDEO_IR=m +CONFIG_LIRC=m +CONFIG_RC_MAP=m +CONFIG_IR_NEC_DECODER=m +CONFIG_IR_RC5_DECODER=m +CONFIG_IR_RC6_DECODER=m +CONFIG_IR_JVC_DECODER=m +CONFIG_IR_SONY_DECODER=m +CONFIG_IR_RC5_SZ_DECODER=m +# CONFIG_IR_LIRC_CODEC is not set +# CONFIG_IR_ENE is not set +# CONFIG_IR_IMON is not set +CONFIG_IR_MCEUSB=m +# CONFIG_IR_NUVOTON is not set +# CONFIG_IR_STREAMZAP is not set +# CONFIG_DAB is not set + +# +# Graphics support +# +CONFIG_AGP=y +# CONFIG_AGP_ALI is not set +# CONFIG_AGP_ATI is not set +# CONFIG_AGP_AMD is not set +CONFIG_AGP_INTEL=y +# CONFIG_AGP_NVIDIA is not set +# CONFIG_AGP_SIS is not set +# CONFIG_AGP_SWORKS is not set +# CONFIG_AGP_VIA is not set +# CONFIG_AGP_EFFICEON is not set +CONFIG_VGA_ARB=y +CONFIG_VGA_ARB_MAX_GPUS=1 +# CONFIG_VGA_SWITCHEROO is not set +CONFIG_DRM=y +CONFIG_DRM_KMS_HELPER=y +CONFIG_DRM_TTM=y +# CONFIG_DRM_TDFX is not set +# CONFIG_DRM_R128 is not set +# CONFIG_DRM_RADEON is not set +# CONFIG_DRM_MGA is not set +# CONFIG_DRM_SIS is not set +# CONFIG_DRM_VIA is not set +# CONFIG_DRM_SAVAGE is not set +# CONFIG_STUB_POULSBO is not set +# CONFIG_VGASTATE is not set +CONFIG_VIDEO_OUTPUT_CONTROL=y +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +# CONFIG_FB_BOOT_VESA_SUPPORT is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +# CONFIG_FB_SYS_FILLRECT is not set +# CONFIG_FB_SYS_COPYAREA is not set +# CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_FOREIGN_ENDIAN is not set +# CONFIG_FB_SYS_FOPS is not set +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +CONFIG_FB_BACKLIGHT=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_CIRRUS is not set +# CONFIG_FB_PM2 is not set +# CONFIG_FB_CYBER2000 is not set +# CONFIG_FB_ARC is not set +# CONFIG_FB_ASILIANT is not set +# CONFIG_FB_IMSTT is not set +# CONFIG_FB_VGA16 is not set +# CONFIG_FB_VESA is not set +# CONFIG_FB_EFI is not set +# CONFIG_FB_N411 is not set +# CONFIG_FB_HGA is not set +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_NVIDIA is not set +# CONFIG_FB_RIVA is not set +# CONFIG_FB_I810 is not set +# CONFIG_FB_LE80578 is not set +# CONFIG_FB_INTEL is not set +# CONFIG_FB_MATROX is not set +# CONFIG_FB_RADEON is not set +# CONFIG_FB_ATY128 is not set +# CONFIG_FB_ATY is not set +# CONFIG_FB_S3 is not set +# CONFIG_FB_SAVAGE is not set +# CONFIG_FB_SIS is not set +# CONFIG_FB_VIA is not set +# CONFIG_FB_NEOMAGIC is not set +# CONFIG_FB_KYRO is not set +# CONFIG_FB_3DFX is not set +# CONFIG_FB_VOODOO1 is not set +# CONFIG_FB_VT8623 is not set +# CONFIG_FB_TRIDENT is not set +# CONFIG_FB_ARK is not set +# CONFIG_FB_PM3 is not set +# CONFIG_FB_CARMINE is not set +# CONFIG_FB_GEODE is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_MB862XX is not set +# CONFIG_FB_BROADSHEET is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_LCD_CLASS_DEVICE is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y +# CONFIG_BACKLIGHT_GENERIC is not set +# CONFIG_BACKLIGHT_PROGEAR is not set +# CONFIG_BACKLIGHT_MBP_NVIDIA is not set +# CONFIG_BACKLIGHT_SAHARA is not set +# CONFIG_BACKLIGHT_ADP8860 is not set + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set + +# +# Console display driver support +# +CONFIG_VGA_CONSOLE=y +CONFIG_VGACON_SOFT_SCROLLBACK=y +CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256 +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE is not set +# CONFIG_LOGO is not set +CONFIG_SOUND=y +# CONFIG_SOUND_OSS_CORE is not set +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=y +# CONFIG_SND_SEQUENCER is not set +# CONFIG_SND_MIXER_OSS is not set +# CONFIG_SND_PCM_OSS is not set +# CONFIG_SND_HRTIMER is not set +CONFIG_SND_DYNAMIC_MINORS=y +# CONFIG_SND_SUPPORT_OLD_API is not set +# CONFIG_SND_VERBOSE_PROCFS is not set +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +CONFIG_SND_VMASTER=y +CONFIG_SND_DMA_SGBUF=y +# CONFIG_SND_RAWMIDI_SEQ is not set +# CONFIG_SND_OPL3_LIB_SEQ is not set +# CONFIG_SND_OPL4_LIB_SEQ is not set +# CONFIG_SND_SBAWE_SEQ is not set +# CONFIG_SND_EMU10K1_SEQ is not set +# CONFIG_SND_DRIVERS is not set +CONFIG_SND_PCI=y +# CONFIG_SND_AD1889 is not set +# CONFIG_SND_ALS300 is not set +# CONFIG_SND_ALS4000 is not set +# CONFIG_SND_ALI5451 is not set +# CONFIG_SND_ASIHPI is not set +# CONFIG_SND_ATIIXP is not set +# CONFIG_SND_ATIIXP_MODEM is not set +# CONFIG_SND_AU8810 is not set +# CONFIG_SND_AU8820 is not set +# CONFIG_SND_AU8830 is not set +# CONFIG_SND_AW2 is not set +# CONFIG_SND_AZT3328 is not set +# CONFIG_SND_BT87X is not set +# CONFIG_SND_CA0106 is not set +# CONFIG_SND_CMIPCI is not set +# CONFIG_SND_OXYGEN is not set +# CONFIG_SND_CS4281 is not set +# CONFIG_SND_CS46XX is not set +# CONFIG_SND_CS5530 is not set +# CONFIG_SND_CS5535AUDIO is not set +# CONFIG_SND_CTXFI is not set +# CONFIG_SND_DARLA20 is not set +# CONFIG_SND_GINA20 is not set +# CONFIG_SND_LAYLA20 is not set +# CONFIG_SND_DARLA24 is not set +# CONFIG_SND_GINA24 is not set +# CONFIG_SND_LAYLA24 is not set +# CONFIG_SND_MONA is not set +# CONFIG_SND_MIA is not set +# CONFIG_SND_ECHO3G is not set +# CONFIG_SND_INDIGO is not set +# CONFIG_SND_INDIGOIO is not set +# CONFIG_SND_INDIGODJ is not set +# CONFIG_SND_INDIGOIOX is not set +# CONFIG_SND_INDIGODJX is not set +# CONFIG_SND_EMU10K1 is not set +# CONFIG_SND_EMU10K1X is not set +# CONFIG_SND_ENS1370 is not set +# CONFIG_SND_ENS1371 is not set +# CONFIG_SND_ES1938 is not set +# CONFIG_SND_ES1968 is not set +# CONFIG_SND_FM801 is not set +CONFIG_SND_HDA_INTEL=y +CONFIG_SND_HDA_HWDEP=y +# CONFIG_SND_HDA_RECONFIG is not set +# CONFIG_SND_HDA_INPUT_BEEP is not set +# CONFIG_SND_HDA_INPUT_JACK is not set +# CONFIG_SND_HDA_PATCH_LOADER is not set +CONFIG_SND_HDA_CODEC_REALTEK=y +# CONFIG_SND_HDA_CODEC_ANALOG is not set +# CONFIG_SND_HDA_CODEC_SIGMATEL is not set +# CONFIG_SND_HDA_CODEC_VIA is not set +CONFIG_SND_HDA_CODEC_HDMI=y +# CONFIG_SND_HDA_CODEC_CIRRUS is not set +# CONFIG_SND_HDA_CODEC_CONEXANT is not set +# CONFIG_SND_HDA_CODEC_CA0110 is not set +# CONFIG_SND_HDA_CODEC_CMEDIA is not set +# CONFIG_SND_HDA_CODEC_SI3054 is not set +CONFIG_SND_HDA_GENERIC=y +CONFIG_SND_HDA_POWER_SAVE=y +CONFIG_SND_HDA_POWER_SAVE_DEFAULT=5 +# CONFIG_SND_HDSP is not set +# CONFIG_SND_HDSPM is not set +# CONFIG_SND_HIFIER is not set +# CONFIG_SND_ICE1712 is not set +# CONFIG_SND_ICE1724 is not set +# CONFIG_SND_INTEL8X0 is not set +# CONFIG_SND_INTEL8X0M is not set +# CONFIG_SND_KORG1212 is not set +# CONFIG_SND_LX6464ES is not set +# CONFIG_SND_MAESTRO3 is not set +# CONFIG_SND_MIXART is not set +# CONFIG_SND_NM256 is not set +# CONFIG_SND_PCXHR is not set +# CONFIG_SND_RIPTIDE is not set +# CONFIG_SND_RME32 is not set +# CONFIG_SND_RME96 is not set +# CONFIG_SND_RME9652 is not set +# CONFIG_SND_SIS7019 is not set +# CONFIG_SND_SONICVIBES is not set +# CONFIG_SND_TRIDENT is not set +# CONFIG_SND_VIA82XX is not set +# CONFIG_SND_VIA82XX_MODEM is not set +# CONFIG_SND_VIRTUOSO is not set +# CONFIG_SND_VX222 is not set +# CONFIG_SND_YMFPCI is not set +# CONFIG_SND_USB is not set +# CONFIG_SND_SOC is not set +# CONFIG_SOUND_PRIME is not set +CONFIG_HID_SUPPORT=y +CONFIG_HID=y +CONFIG_HIDRAW=y + +# +# USB Input Devices +# +CONFIG_USB_HID=y +# CONFIG_HID_PID is not set +CONFIG_USB_HIDDEV=y + +# +# Special HID drivers +# +# CONFIG_HID_3M_PCT is not set +# CONFIG_HID_A4TECH is not set +# CONFIG_HID_ACRUX_FF is not set +CONFIG_HID_APPLE=y +CONFIG_HID_AUREAL=y +# CONFIG_HID_BELKIN is not set +# CONFIG_HID_CANDO is not set +# CONFIG_HID_CHERRY is not set +# CONFIG_HID_CHICONY is not set +# CONFIG_HID_PRODIKEYS is not set +# CONFIG_HID_CYPRESS is not set +# CONFIG_HID_DRAGONRISE is not set +# CONFIG_HID_EGALAX is not set +# CONFIG_HID_EZKEY is not set +# CONFIG_HID_KYE is not set +# CONFIG_HID_UCLOGIC is not set +# CONFIG_HID_WALTOP is not set +# CONFIG_HID_GYRATION is not set +CONFIG_HID_TWINHAN=y +# CONFIG_HID_KENSINGTON is not set +CONFIG_HID_LOGITECH=y +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_LOGIWII_FF=y +CONFIG_HID_MICROSOFT=y +# CONFIG_HID_MOSART is not set +# CONFIG_HID_MONTEREY is not set +# CONFIG_HID_NTRIG is not set +# CONFIG_HID_ORTEK is not set +# CONFIG_HID_PANTHERLORD is not set +# CONFIG_HID_PETALYNX is not set +# CONFIG_HID_PICOLCD is not set +# CONFIG_HID_QUANTA is not set +# CONFIG_HID_ROCCAT is not set +# CONFIG_HID_ROCCAT_KONE is not set +# CONFIG_HID_ROCCAT_PYRA is not set +# CONFIG_HID_SAMSUNG is not set +CONFIG_HID_SONY=y +# CONFIG_HID_STANTUM is not set +CONFIG_HID_SUNPLUS=y +# CONFIG_HID_GREENASIA is not set +# CONFIG_HID_SMARTJOYPLUS is not set +CONFIG_HID_TOPSEED=y +# CONFIG_HID_THRUSTMASTER is not set +# CONFIG_HID_ZEROPLUS is not set +# CONFIG_HID_ZYDACRON is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set +# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set + +# +# Miscellaneous USB options +# +# CONFIG_USB_DEVICEFS is not set +# CONFIG_USB_DEVICE_CLASS is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set +# CONFIG_USB_MON is not set +# CONFIG_USB_WUSB is not set +# CONFIG_USB_WUSB_CBAF is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +# CONFIG_USB_XHCI_HCD is not set +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +# CONFIG_USB_EHCI_TT_NEWSCHED is not set +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1760_HCD is not set +# CONFIG_USB_ISP1362_HCD is not set +# CONFIG_USB_OHCI_HCD is not set +CONFIG_USB_UHCI_HCD=y +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_WHCI_HCD is not set +# CONFIG_USB_HWA_HCD is not set + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set +# CONFIG_USB_WDM is not set +# CONFIG_USB_TMC is not set + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_ONETOUCH is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set +# CONFIG_USB_UAS is not set +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB port drivers +# +CONFIG_USB_SERIAL=m +# CONFIG_USB_EZUSB is not set +# CONFIG_USB_SERIAL_GENERIC is not set +# CONFIG_USB_SERIAL_AIRCABLE is not set +# CONFIG_USB_SERIAL_ARK3116 is not set +# CONFIG_USB_SERIAL_BELKIN is not set +# CONFIG_USB_SERIAL_CH341 is not set +# CONFIG_USB_SERIAL_WHITEHEAT is not set +# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +# CONFIG_USB_SERIAL_CP210X is not set +# CONFIG_USB_SERIAL_CYPRESS_M8 is not set +# CONFIG_USB_SERIAL_EMPEG is not set +CONFIG_USB_SERIAL_FTDI_SIO=m +# CONFIG_USB_SERIAL_FUNSOFT is not set +# CONFIG_USB_SERIAL_VISOR is not set +# CONFIG_USB_SERIAL_IPAQ is not set +# CONFIG_USB_SERIAL_IR is not set +# CONFIG_USB_SERIAL_EDGEPORT is not set +# CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_GARMIN is not set +# CONFIG_USB_SERIAL_IPW is not set +# CONFIG_USB_SERIAL_IUU is not set +# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set +# CONFIG_USB_SERIAL_KEYSPAN is not set +# CONFIG_USB_SERIAL_KLSI is not set +# CONFIG_USB_SERIAL_KOBIL_SCT is not set +# CONFIG_USB_SERIAL_MCT_U232 is not set +# CONFIG_USB_SERIAL_MOS7720 is not set +# CONFIG_USB_SERIAL_MOS7840 is not set +# CONFIG_USB_SERIAL_MOTOROLA is not set +# CONFIG_USB_SERIAL_NAVMAN is not set +# CONFIG_USB_SERIAL_PL2303 is not set +# CONFIG_USB_SERIAL_OTI6858 is not set +# CONFIG_USB_SERIAL_QCAUX is not set +# CONFIG_USB_SERIAL_QUALCOMM is not set +# CONFIG_USB_SERIAL_SPCP8X5 is not set +# CONFIG_USB_SERIAL_HP4X is not set +# CONFIG_USB_SERIAL_SAFE is not set +# CONFIG_USB_SERIAL_SAMBA is not set +# CONFIG_USB_SERIAL_SIEMENS_MPI is not set +# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set +# CONFIG_USB_SERIAL_SYMBOL is not set +# CONFIG_USB_SERIAL_TI is not set +# CONFIG_USB_SERIAL_CYBERJACK is not set +# CONFIG_USB_SERIAL_XIRCOM is not set +# CONFIG_USB_SERIAL_OPTION is not set +# CONFIG_USB_SERIAL_OMNINET is not set +# CONFIG_USB_SERIAL_OPTICON is not set +# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set +# CONFIG_USB_SERIAL_ZIO is not set +# CONFIG_USB_SERIAL_SSU100 is not set +# CONFIG_USB_SERIAL_DEBUG is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_SEVSEG is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set +# CONFIG_USB_TEST is not set +# CONFIG_USB_ISIGHTFW is not set +# CONFIG_USB_YUREX is not set +# CONFIG_USB_GADGET is not set + +# +# OTG and related infrastructure +# +# CONFIG_NOP_USB_XCEIV is not set +# CONFIG_UWB is not set +# CONFIG_MMC is not set +# CONFIG_MEMSTICK is not set +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# LED drivers +# +# CONFIG_LEDS_ALIX2 is not set +# CONFIG_LEDS_PCA9532 is not set +# CONFIG_LEDS_LP3944 is not set +# CONFIG_LEDS_LP5521 is not set +# CONFIG_LEDS_LP5523 is not set +# CONFIG_LEDS_CLEVO_MAIL is not set +# CONFIG_LEDS_PCA955X is not set +# CONFIG_LEDS_BD2802 is not set +# CONFIG_LEDS_INTEL_SS4200 is not set +CONFIG_LEDS_TRIGGERS=y + +# +# LED Triggers +# +# CONFIG_LEDS_TRIGGER_TIMER is not set +# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set +# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set +# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set + +# +# iptables trigger is under Netfilter config (LED target) +# +# CONFIG_ACCESSIBILITY is not set +# CONFIG_INFINIBAND is not set +# CONFIG_EDAC is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_DS3232 is not set +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_ISL12022 is not set +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set +# CONFIG_RTC_DRV_BQ32K is not set +# CONFIG_RTC_DRV_S35390A is not set +# CONFIG_RTC_DRV_FM3130 is not set +# CONFIG_RTC_DRV_RX8581 is not set +# CONFIG_RTC_DRV_RX8025 is not set + +# +# SPI RTC drivers +# + +# +# Platform RTC drivers +# +CONFIG_RTC_DRV_CMOS=y +# CONFIG_RTC_DRV_DS1286 is not set +# CONFIG_RTC_DRV_DS1511 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T35 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_MSM6242 is not set +# CONFIG_RTC_DRV_BQ4802 is not set +# CONFIG_RTC_DRV_RP5C01 is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# on-CPU RTC drivers +# +# CONFIG_DMADEVICES is not set +# CONFIG_AUXDISPLAY is not set +# CONFIG_UIO is not set +CONFIG_STAGING=y +# CONFIG_STAGING_EXCLUDE_BUILD is not set +# CONFIG_W35UND is not set +# CONFIG_PRISM2_USB is not set +# CONFIG_ECHO is not set +# CONFIG_BRCM80211 is not set +# CONFIG_RT2860 is not set +# CONFIG_RT2870 is not set +# CONFIG_COMEDI is not set +# CONFIG_ASUS_OLED is not set +# CONFIG_R8187SE is not set +# CONFIG_RTL8192U is not set +# CONFIG_RTL8192E is not set +# CONFIG_R8712U is not set +# CONFIG_TRANZPORT is not set +# CONFIG_POHMELFS is not set +# CONFIG_IDE_PHISON is not set +# CONFIG_LINE6_USB is not set +# CONFIG_DRM_VMWGFX is not set +CONFIG_DRM_NOUVEAU=y +CONFIG_DRM_NOUVEAU_BACKLIGHT=y + +# +# I2C encoder or helper chips +# +CONFIG_DRM_I2C_CH7006=m +CONFIG_DRM_I2C_SIL164=m +# CONFIG_USB_SERIAL_QUATECH2 is not set +# CONFIG_USB_SERIAL_QUATECH_USB2 is not set +# CONFIG_VT6655 is not set +# CONFIG_VT6656 is not set +# CONFIG_FB_UDL is not set +# CONFIG_HYPERV is not set +# CONFIG_VME_BUS is not set +# CONFIG_IIO is not set +# CONFIG_ZRAM is not set +# CONFIG_BATMAN_ADV is not set +# CONFIG_SAMSUNG_LAPTOP is not set +# CONFIG_FB_SM7XX is not set +# CONFIG_CRYSTALHD is not set + +# +# Texas Instruments shared transport line discipline +# +# CONFIG_FB_XGI is not set +# CONFIG_LIRC_STAGING is not set +# CONFIG_ACPI_QUICKSTART is not set +CONFIG_MACH_NO_WESTBRIDGE=y +# CONFIG_USB_ENESTORAGE is not set +# CONFIG_BCM_WIMAX is not set +# CONFIG_FT1000 is not set + +# +# Speakup console speech +# +# CONFIG_SPEAKUP is not set +# CONFIG_X86_PLATFORM_DEVICES is not set + +# +# Firmware Drivers +# +# CONFIG_EDD is not set +CONFIG_FIRMWARE_MEMMAP=y +# CONFIG_EFI_VARS is not set +# CONFIG_DELL_RBU is not set +# CONFIG_DCDBAS is not set +CONFIG_DMIID=y +# CONFIG_ISCSI_IBFT_FIND is not set + +# +# File systems +# +# CONFIG_EXT2_FS is not set +# CONFIG_EXT3_FS is not set +CONFIG_EXT4_FS=y +CONFIG_EXT4_USE_FOR_EXT23=y +# CONFIG_EXT4_FS_XATTR is not set +# CONFIG_EXT4_DEBUG is not set +CONFIG_JBD2=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_FS_POSIX_ACL is not set +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_BTRFS_FS is not set +# CONFIG_NILFS2_FS is not set +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +CONFIG_DNOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_FANOTIFY is not set +# CONFIG_QUOTA is not set +# CONFIG_QUOTACTL is not set +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=y +# CONFIG_CUSE is not set + +# +# Caches +# +# CONFIG_FSCACHE is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +# CONFIG_MSDOS_FS is not set +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="ascii" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_HUGETLBFS is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_AFFS_FS is not set +# CONFIG_ECRYPT_FS is not set +# CONFIG_HFS_FS is not set +CONFIG_HFSPLUS_FS=y +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_LOGFS is not set +# CONFIG_CRAMFS is not set +CONFIG_SQUASHFS=y +CONFIG_SQUASHFS_XATTR=y +CONFIG_SQUASHFS_LZO=y +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_SYSV_FS is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +CONFIG_NFS_V4=y +# CONFIG_NFS_V4_1 is not set +# CONFIG_NFS_USE_LEGACY_DNS is not set +CONFIG_NFS_USE_KERNEL_DNS=y +# CONFIG_NFS_USE_NEW_IDMAPPER is not set +# CONFIG_NFSD is not set +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_CEPH_FS is not set +CONFIG_CIFS=y +CONFIG_CIFS_STATS=y +CONFIG_CIFS_STATS2=y +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_UPCALL is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_DFS_UPCALL is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +CONFIG_MAC_PARTITION=y +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +CONFIG_LDM_PARTITION=y +# CONFIG_LDM_DEBUG is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +CONFIG_EFI_PARTITION=y +# CONFIG_SYSV68_PARTITION is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="utf8" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=y +# CONFIG_DLM is not set + +# +# Kernel hacking +# +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_PRINTK_TIME=y +# CONFIG_ENABLE_WARN_DEPRECATED is not set +# CONFIG_ENABLE_MUST_CHECK is not set +CONFIG_FRAME_WARN=1024 +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_HARDLOCKUP_DETECTOR is not set +# CONFIG_BKL is not set +# CONFIG_SPARSE_RCU_POINTER is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +CONFIG_ARCH_WANT_FRAME_POINTERS=y +# CONFIG_FRAME_POINTER is not set +CONFIG_SYSCTL_SYSCALL_CHECK=y +CONFIG_USER_STACKTRACE_SUPPORT=y +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y +CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_TRACING_SUPPORT=y +# CONFIG_FTRACE is not set +# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set +# CONFIG_FIREWIRE_OHCI_REMOTE_DMA is not set +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +CONFIG_HAVE_ARCH_KMEMCHECK=y +CONFIG_STRICT_DEVMEM=y +# CONFIG_X86_VERBOSE_BOOTUP is not set +# CONFIG_EARLY_PRINTK is not set +CONFIG_DOUBLEFAULT=y +# CONFIG_IOMMU_STRESS is not set +CONFIG_HAVE_MMIOTRACE_SUPPORT=y +CONFIG_IO_DELAY_TYPE_0X80=0 +CONFIG_IO_DELAY_TYPE_0XED=1 +CONFIG_IO_DELAY_TYPE_UDELAY=2 +CONFIG_IO_DELAY_TYPE_NONE=3 +CONFIG_IO_DELAY_0X80=y +# CONFIG_IO_DELAY_0XED is not set +# CONFIG_IO_DELAY_UDELAY is not set +# CONFIG_IO_DELAY_NONE is not set +CONFIG_DEFAULT_IO_DELAY_TYPE=0 +CONFIG_OPTIMIZE_INLINING=y + +# +# Security options +# +CONFIG_KEYS=y +# CONFIG_KEYS_DEBUG_PROC_KEYS is not set +# CONFIG_SECURITY_DMESG_RESTRICT is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITYFS is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_DEFAULT_SECURITY="" +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y +# CONFIG_CRYPTO_GF128MUL is not set +# CONFIG_CRYPTO_NULL is not set +CONFIG_CRYPTO_WORKQUEUE=y +# CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_AUTHENC is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Authenticated Encryption with Associated Data +# +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_GCM is not set +# CONFIG_CRYPTO_SEQIV is not set + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +# CONFIG_CRYPTO_CTR is not set +# CONFIG_CRYPTO_CTS is not set +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +# CONFIG_CRYPTO_HMAC is not set +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_CRC32C_INTEL is not set +# CONFIG_CRYPTO_GHASH is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_MICHAEL_MIC=y +# CONFIG_CRYPTO_RMD128 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# Ciphers +# +CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_AES_586 is not set +# CONFIG_CRYPTO_ANUBIS is not set +CONFIG_CRYPTO_ARC4=y +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_SALSA20_586 is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_TWOFISH_586 is not set + +# +# Compression +# +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_ZLIB is not set +# CONFIG_CRYPTO_LZO is not set + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_HW is not set +CONFIG_HAVE_KVM=y +# CONFIG_VIRTUALIZATION is not set +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_GENERIC_FIND_FIRST_BIT=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_GENERIC_FIND_LAST_BIT=y +CONFIG_CRC_CCITT=m +CONFIG_CRC16=y +# CONFIG_CRC_T10DIF is not set +CONFIG_CRC_ITU_T=y +CONFIG_CRC32=y +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_NLATTR=y diff --git a/projects/ATV/linux/linux.i386.conf.2.6.37-2 b/projects/ATV/linux/linux.i386.conf.2.6.37-2 new file mode 100644 index 0000000000..87c03aef29 --- /dev/null +++ b/projects/ATV/linux/linux.i386.conf.2.6.37-2 @@ -0,0 +1,2246 @@ +# +# Automatically generated make config: don't edit +# Linux/i386 2.6.37-rc2 Kernel Configuration +# +# CONFIG_64BIT is not set +CONFIG_X86_32=y +# CONFIG_X86_64 is not set +CONFIG_X86=y +CONFIG_INSTRUCTION_DECODER=y +CONFIG_OUTPUT_FORMAT="elf32-i386" +CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig" +CONFIG_GENERIC_CMOS_UPDATE=y +CONFIG_CLOCKSOURCE_WATCHDOG=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_MMU=y +CONFIG_ZONE_DMA=y +# CONFIG_NEED_DMA_MAP_STATE is not set +CONFIG_NEED_SG_DMA_LENGTH=y +CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_IOMAP=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_ARCH_MAY_HAVE_PC_FDC=y +# CONFIG_RWSEM_GENERIC_SPINLOCK is not set +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +# CONFIG_GENERIC_TIME_VSYSCALL is not set +CONFIG_ARCH_HAS_CPU_RELAX=y +CONFIG_ARCH_HAS_DEFAULT_IDLE=y +CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y +CONFIG_HAVE_SETUP_PER_CPU_AREA=y +CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y +CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y +# CONFIG_HAVE_CPUMASK_OF_CPU_MAP is not set +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +# CONFIG_ZONE_DMA32 is not set +CONFIG_ARCH_POPULATES_NODE_MAP=y +# CONFIG_AUDIT_ARCH is not set +CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y +CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y +CONFIG_USE_GENERIC_SMP_HELPERS=y +CONFIG_X86_32_SMP=y +CONFIG_X86_HT=y +CONFIG_X86_TRAMPOLINE=y +CONFIG_X86_32_LAZY_GS=y +CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-ecx -fcall-saved-edx" +CONFIG_KTIME_SCALAR=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_CONSTRUCTORS=y +CONFIG_HAVE_IRQ_WORK=y +CONFIG_IRQ_WORK=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_BZIP2=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_LZO=y +# CONFIG_KERNEL_GZIP is not set +# CONFIG_KERNEL_BZIP2 is not set +CONFIG_KERNEL_LZMA=y +# CONFIG_KERNEL_LZO is not set +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +# CONFIG_TASKSTATS is not set +# CONFIG_AUDIT is not set +CONFIG_HAVE_GENERIC_HARDIRQS=y + +# +# IRQ subsystem +# +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y +# CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED is not set +CONFIG_HAVE_SPARSE_IRQ=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_PENDING_IRQ=y +# CONFIG_AUTO_IRQ_AFFINITY is not set +# CONFIG_IRQ_PER_CPU is not set +# CONFIG_HARDIRQS_SW_RESEND is not set +# CONFIG_SPARSE_IRQ is not set + +# +# RCU Subsystem +# +CONFIG_TREE_PREEMPT_RCU=y +CONFIG_PREEMPT_RCU=y +# CONFIG_RCU_TRACE is not set +CONFIG_RCU_FANOUT=32 +# CONFIG_RCU_FANOUT_EXACT is not set +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_IKCONFIG is not set +CONFIG_LOG_BUF_SHIFT=16 +CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y +CONFIG_CGROUPS=y +# CONFIG_CGROUP_DEBUG is not set +CONFIG_CGROUP_NS=y +# CONFIG_CGROUP_FREEZER is not set +# CONFIG_CGROUP_DEVICE is not set +# CONFIG_CPUSETS is not set +# CONFIG_CGROUP_CPUACCT is not set +CONFIG_RESOURCE_COUNTERS=y +# CONFIG_CGROUP_MEM_RES_CTLR is not set +CONFIG_CGROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +CONFIG_RT_GROUP_SCHED=y +CONFIG_BLK_CGROUP=y +# CONFIG_DEBUG_BLK_CGROUP is not set +CONFIG_NAMESPACES=y +CONFIG_UTS_NS=y +CONFIG_IPC_NS=y +CONFIG_USER_NS=y +CONFIG_PID_NS=y +CONFIG_NET_NS=y +CONFIG_SCHED_AUTOGROUP=y +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE=" " +CONFIG_INITRAMFS_ROOT_UID=0 +CONFIG_INITRAMFS_ROOT_GID=0 +# CONFIG_RD_GZIP is not set +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +# CONFIG_RD_LZO is not set +CONFIG_INITRAMFS_COMPRESSION_NONE=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_EMBEDDED=y +CONFIG_UID16=y +CONFIG_SYSCTL_SYSCALL=y +# CONFIG_KALLSYMS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +# CONFIG_BUG is not set +CONFIG_ELF_CORE=y +# CONFIG_PCSPKR_PLATFORM is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_HAVE_PERF_EVENTS=y + +# +# Kernel Performance Events And Counters +# +CONFIG_PERF_EVENTS=y +# CONFIG_PERF_COUNTERS is not set +# CONFIG_VM_EVENT_COUNTERS is not set +CONFIG_PCI_QUIRKS=y +# CONFIG_COMPAT_BRK is not set +# CONFIG_SLAB is not set +# CONFIG_SLUB is not set +CONFIG_SLOB=y +# CONFIG_PROFILING is not set +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +CONFIG_JUMP_LABEL=y +CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y +CONFIG_HAVE_IOREMAP_PROT=y +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_OPTPROBES=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_HW_BREAKPOINT=y +CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y +CONFIG_HAVE_USER_RETURN_NOTIFIER=y +CONFIG_HAVE_PERF_EVENTS_NMI=y +CONFIG_HAVE_ARCH_JUMP_LABEL=y + +# +# GCOV-based kernel profiling +# +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_LOAD is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_STOP_MACHINE=y +CONFIG_BLOCK=y +CONFIG_LBDAF=y +CONFIG_BLK_DEV_BSG=y +# CONFIG_BLK_DEV_INTEGRITY is not set +# CONFIG_BLK_DEV_THROTTLING is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_DEADLINE is not set +CONFIG_IOSCHED_CFQ=y +# CONFIG_CFQ_GROUP_IOSCHED is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +# CONFIG_INLINE_SPIN_TRYLOCK is not set +# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK is not set +# CONFIG_INLINE_SPIN_LOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK_IRQ is not set +# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set +# CONFIG_INLINE_SPIN_UNLOCK is not set +# CONFIG_INLINE_SPIN_UNLOCK_BH is not set +# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set +# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_READ_TRYLOCK is not set +# CONFIG_INLINE_READ_LOCK is not set +# CONFIG_INLINE_READ_LOCK_BH is not set +# CONFIG_INLINE_READ_LOCK_IRQ is not set +# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set +# CONFIG_INLINE_READ_UNLOCK is not set +# CONFIG_INLINE_READ_UNLOCK_BH is not set +# CONFIG_INLINE_READ_UNLOCK_IRQ is not set +# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_WRITE_TRYLOCK is not set +# CONFIG_INLINE_WRITE_LOCK is not set +# CONFIG_INLINE_WRITE_LOCK_BH is not set +# CONFIG_INLINE_WRITE_LOCK_IRQ is not set +# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set +# CONFIG_INLINE_WRITE_UNLOCK is not set +# CONFIG_INLINE_WRITE_UNLOCK_BH is not set +# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set +# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set +CONFIG_MUTEX_SPIN_ON_OWNER=y +# CONFIG_FREEZER is not set + +# +# Processor type and features +# +CONFIG_TICK_ONESHOT=y +# CONFIG_NO_HZ is not set +CONFIG_HIGH_RES_TIMERS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_SMP=y +CONFIG_X86_MPPARSE=y +# CONFIG_X86_BIGSMP is not set +# CONFIG_X86_EXTENDED_PLATFORM is not set +CONFIG_SCHED_OMIT_FRAME_POINTER=y +# CONFIG_PARAVIRT_GUEST is not set +CONFIG_NO_BOOTMEM=y +# CONFIG_MEMTEST is not set +# CONFIG_M386 is not set +# CONFIG_M486 is not set +# CONFIG_M586 is not set +# CONFIG_M586TSC is not set +# CONFIG_M586MMX is not set +# CONFIG_M686 is not set +# CONFIG_MPENTIUMII is not set +# CONFIG_MPENTIUMIII is not set +CONFIG_MPENTIUMM=y +# CONFIG_MPENTIUM4 is not set +# CONFIG_MK6 is not set +# CONFIG_MK7 is not set +# CONFIG_MK8 is not set +# CONFIG_MCRUSOE is not set +# CONFIG_MEFFICEON is not set +# CONFIG_MWINCHIPC6 is not set +# CONFIG_MWINCHIP3D is not set +# CONFIG_MGEODEGX1 is not set +# CONFIG_MGEODE_LX is not set +# CONFIG_MCYRIXIII is not set +# CONFIG_MVIAC3_2 is not set +# CONFIG_MVIAC7 is not set +# CONFIG_MCORE2 is not set +# CONFIG_MATOM is not set +# CONFIG_X86_GENERIC is not set +CONFIG_X86_CPU=y +CONFIG_X86_INTERNODE_CACHE_SHIFT=6 +CONFIG_X86_CMPXCHG=y +CONFIG_X86_L1_CACHE_SHIFT=6 +CONFIG_X86_XADD=y +CONFIG_X86_WP_WORKS_OK=y +CONFIG_X86_INVLPG=y +CONFIG_X86_BSWAP=y +CONFIG_X86_POPAD_OK=y +CONFIG_X86_INTEL_USERCOPY=y +CONFIG_X86_USE_PPRO_CHECKSUM=y +CONFIG_X86_TSC=y +CONFIG_X86_CMPXCHG64=y +CONFIG_X86_CMOV=y +CONFIG_X86_MINIMUM_CPU_FAMILY=5 +CONFIG_X86_DEBUGCTLMSR=y +CONFIG_PROCESSOR_SELECT=y +CONFIG_CPU_SUP_INTEL=y +# CONFIG_CPU_SUP_CYRIX_32 is not set +# CONFIG_CPU_SUP_AMD is not set +# CONFIG_CPU_SUP_CENTAUR is not set +# CONFIG_CPU_SUP_TRANSMETA_32 is not set +# CONFIG_CPU_SUP_UMC_32 is not set +CONFIG_HPET_TIMER=y +CONFIG_HPET_EMULATE_RTC=y +CONFIG_DMI=y +# CONFIG_IOMMU_HELPER is not set +# CONFIG_IOMMU_API is not set +CONFIG_NR_CPUS=2 +CONFIG_SCHED_SMT=y +CONFIG_SCHED_MC=y +CONFIG_IRQ_TIME_ACCOUNTING=y +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_X86_LOCAL_APIC=y +CONFIG_X86_IO_APIC=y +CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y +CONFIG_X86_MCE=y +CONFIG_X86_MCE_INTEL=y +# CONFIG_X86_MCE_AMD is not set +# CONFIG_X86_ANCIENT_MCE is not set +CONFIG_X86_MCE_THRESHOLD=y +# CONFIG_X86_MCE_INJECT is not set +CONFIG_X86_THERMAL_VECTOR=y +# CONFIG_VM86 is not set +# CONFIG_TOSHIBA is not set +# CONFIG_I8K is not set +# CONFIG_X86_REBOOTFIXUPS is not set +# CONFIG_MICROCODE is not set +CONFIG_X86_MSR=y +CONFIG_X86_CPUID=y +CONFIG_NOHIGHMEM=y +# CONFIG_HIGHMEM4G is not set +# CONFIG_HIGHMEM64G is not set +# CONFIG_VMSPLIT_3G is not set +CONFIG_VMSPLIT_3G_OPT=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_2G_OPT is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xB0000000 +# CONFIG_X86_PAE is not set +# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set +# CONFIG_ARCH_DMA_ADDR_T_64BIT is not set +CONFIG_NEED_NODE_MEMMAP_SIZE=y +CONFIG_ARCH_FLATMEM_ENABLE=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_ILLEGAL_POINTER_VALUE=0 +CONFIG_SELECT_MEMORY_MODEL=y +# CONFIG_FLATMEM_MANUAL is not set +CONFIG_SPARSEMEM_MANUAL=y +CONFIG_SPARSEMEM=y +CONFIG_HAVE_MEMORY_PRESENT=y +CONFIG_SPARSEMEM_STATIC=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=1 +CONFIG_BOUNCE=y +CONFIG_VIRT_TO_BUS=y +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +# CONFIG_X86_CHECK_BIOS_CORRUPTION is not set +CONFIG_X86_RESERVE_LOW=64 +# CONFIG_MATH_EMULATION is not set +CONFIG_MTRR=y +CONFIG_MTRR_SANITIZER=y +CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0 +CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1 +CONFIG_X86_PAT=y +CONFIG_ARCH_USES_PG_UNCACHED=y +CONFIG_EFI=y +CONFIG_SECCOMP=y +# CONFIG_CC_STACKPROTECTOR is not set +# CONFIG_HZ_100 is not set +# CONFIG_HZ_250 is not set +CONFIG_HZ_300=y +# CONFIG_HZ_1000 is not set +CONFIG_HZ=300 +CONFIG_SCHED_HRTICK=y +# CONFIG_KEXEC is not set +CONFIG_PHYSICAL_START=0x1000000 +# CONFIG_RELOCATABLE is not set +CONFIG_PHYSICAL_ALIGN=0x1000000 +# CONFIG_HOTPLUG_CPU is not set +# CONFIG_COMPAT_VDSO is not set +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="fastboot root=/dev/ram0 rdinit=/init" +# CONFIG_CMDLINE_OVERRIDE is not set + +# +# Power management and ACPI options +# +CONFIG_PM=y +# CONFIG_PM_DEBUG is not set +# CONFIG_SUSPEND is not set +# CONFIG_HIBERNATION is not set +# CONFIG_PM_RUNTIME is not set +# CONFIG_PM_OPP is not set +CONFIG_ACPI=y +# CONFIG_ACPI_PROCFS is not set +# CONFIG_ACPI_PROCFS_POWER is not set +# CONFIG_ACPI_EC_DEBUGFS is not set +# CONFIG_ACPI_PROC_EVENT is not set +# CONFIG_ACPI_AC is not set +# CONFIG_ACPI_BATTERY is not set +# CONFIG_ACPI_BUTTON is not set +CONFIG_ACPI_VIDEO=y +CONFIG_ACPI_FAN=y +# CONFIG_ACPI_DOCK is not set +CONFIG_ACPI_PROCESSOR=y +# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set +CONFIG_ACPI_THERMAL=y +# CONFIG_ACPI_CUSTOM_DSDT is not set +CONFIG_ACPI_BLACKLIST_YEAR=0 +# CONFIG_ACPI_DEBUG is not set +# CONFIG_ACPI_PCI_SLOT is not set +CONFIG_X86_PM_TIMER=y +# CONFIG_ACPI_CONTAINER is not set +# CONFIG_ACPI_SBS is not set +# CONFIG_ACPI_HED is not set +# CONFIG_ACPI_APEI is not set +# CONFIG_SFI is not set + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +# CONFIG_CPU_FREQ_DEBUG is not set +# CONFIG_CPU_FREQ_STAT is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set + +# +# CPUFreq processor drivers +# +# CONFIG_X86_PCC_CPUFREQ is not set +CONFIG_X86_ACPI_CPUFREQ=y +# CONFIG_X86_POWERNOW_K6 is not set +# CONFIG_X86_POWERNOW_K7 is not set +# CONFIG_X86_POWERNOW_K8 is not set +# CONFIG_X86_GX_SUSPMOD is not set +# CONFIG_X86_SPEEDSTEP_CENTRINO is not set +# CONFIG_X86_SPEEDSTEP_ICH is not set +# CONFIG_X86_SPEEDSTEP_SMI is not set +# CONFIG_X86_P4_CLOCKMOD is not set +# CONFIG_X86_CPUFREQ_NFORCE2 is not set +# CONFIG_X86_LONGRUN is not set +# CONFIG_X86_LONGHAUL is not set +# CONFIG_X86_E_POWERSAVER is not set + +# +# shared options +# +# CONFIG_X86_SPEEDSTEP_LIB is not set +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_GOV_LADDER=y +# CONFIG_INTEL_IDLE is not set + +# +# Bus options (PCI etc.) +# +CONFIG_PCI=y +# CONFIG_PCI_GOBIOS is not set +# CONFIG_PCI_GOMMCONFIG is not set +# CONFIG_PCI_GODIRECT is not set +CONFIG_PCI_GOANY=y +CONFIG_PCI_BIOS=y +CONFIG_PCI_DIRECT=y +CONFIG_PCI_MMCONFIG=y +CONFIG_PCI_DOMAINS=y +# CONFIG_PCI_CNB20LE_QUIRK is not set +# CONFIG_DMAR is not set +CONFIG_PCIEPORTBUS=y +# CONFIG_PCIEAER is not set +# CONFIG_PCIEASPM is not set +CONFIG_ARCH_SUPPORTS_MSI=y +CONFIG_PCI_MSI=y +# CONFIG_PCI_STUB is not set +CONFIG_HT_IRQ=y +# CONFIG_PCI_IOV is not set +CONFIG_PCI_IOAPIC=y +CONFIG_ISA_DMA_API=y +# CONFIG_ISA is not set +# CONFIG_MCA is not set +# CONFIG_SCx200 is not set +# CONFIG_OLPC is not set +# CONFIG_OLPC_OPENFIRMWARE is not set +# CONFIG_PCCARD is not set +# CONFIG_HOTPLUG_PCI is not set + +# +# Executable file formats / Emulations +# +CONFIG_BINFMT_ELF=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_HAVE_AOUT=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set +CONFIG_HAVE_ATOMIC_IOMAP=y +CONFIG_HAVE_TEXT_POKE_SMP=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_XFRM_MIGRATE is not set +# CONFIG_XFRM_STATISTICS is not set +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_FIB_HASH=y +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE_DEMUX is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +CONFIG_INET_TUNNEL=m +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_XFRM_MODE_BEET=y +CONFIG_INET_LRO=y +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +CONFIG_IPV6=y +# CONFIG_IPV6_PRIVACY is not set +# CONFIG_IPV6_ROUTER_PREF is not set +# CONFIG_IPV6_OPTIMISTIC_DAD is not set +# CONFIG_INET6_AH is not set +# CONFIG_INET6_ESP is not set +# CONFIG_INET6_IPCOMP is not set +# CONFIG_IPV6_MIP6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +CONFIG_INET6_XFRM_MODE_TRANSPORT=m +CONFIG_INET6_XFRM_MODE_TUNNEL=m +CONFIG_INET6_XFRM_MODE_BEET=m +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +CONFIG_IPV6_SIT=m +# CONFIG_IPV6_SIT_6RD is not set +CONFIG_IPV6_NDISC_NODETYPE=y +# CONFIG_IPV6_TUNNEL is not set +# CONFIG_IPV6_MULTIPLE_TABLES is not set +# CONFIG_IPV6_MROUTE is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set +# CONFIG_NETFILTER is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_L2TP is not set +# CONFIG_BRIDGE is not set +# CONFIG_NET_DSA is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_PHONET is not set +# CONFIG_IEEE802154 is not set +# CONFIG_NET_SCHED is not set +# CONFIG_DCB is not set +CONFIG_DNS_RESOLVER=y +CONFIG_RPS=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_AF_RXRPC is not set +CONFIG_WIRELESS=y +CONFIG_WIRELESS_EXT=y +CONFIG_WEXT_CORE=y +CONFIG_WEXT_PROC=y +CONFIG_WEXT_PRIV=y +CONFIG_CFG80211=y +# CONFIG_NL80211_TESTMODE is not set +# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set +# CONFIG_CFG80211_REG_DEBUG is not set +# CONFIG_CFG80211_DEFAULT_PS is not set +# CONFIG_CFG80211_INTERNAL_REGDB is not set +CONFIG_CFG80211_WEXT=y +CONFIG_WIRELESS_EXT_SYSFS=y +CONFIG_LIB80211=y +# CONFIG_LIB80211_DEBUG is not set +CONFIG_MAC80211=y +CONFIG_MAC80211_HAS_RC=y +# CONFIG_MAC80211_RC_PID is not set +CONFIG_MAC80211_RC_MINSTREL=y +CONFIG_MAC80211_RC_MINSTREL_HT=y +CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y +CONFIG_MAC80211_RC_DEFAULT="minstrel_ht" +# CONFIG_MAC80211_MESH is not set +CONFIG_MAC80211_LEDS=y +# CONFIG_MAC80211_DEBUG_MENU is not set +# CONFIG_WIMAX is not set +CONFIG_RFKILL=y +CONFIG_RFKILL_LEDS=y +CONFIG_RFKILL_INPUT=y +# CONFIG_NET_9P is not set +# CONFIG_CAIF is not set +# CONFIG_CEPH_LIB is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_STANDALONE=y +# CONFIG_PREVENT_FIRMWARE_BUILD is not set +CONFIG_FW_LOADER=y +CONFIG_FIRMWARE_IN_KERNEL=y +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_CONNECTOR is not set +# CONFIG_MTD is not set +# CONFIG_PARPORT is not set +CONFIG_PNP=y +# CONFIG_PNP_DEBUG_MESSAGES is not set + +# +# Protocols +# +CONFIG_PNPACPI=y +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set + +# +# DRBD disabled because PROC_FS, INET or CONNECTOR not selected +# +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=4 +CONFIG_BLK_DEV_RAM_SIZE=4096 +# CONFIG_BLK_DEV_XIP is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_BLK_DEV_HD is not set +# CONFIG_BLK_DEV_RBD is not set +# CONFIG_MISC_DEVICES is not set +CONFIG_HAVE_IDE=y +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +# CONFIG_SCSI_PROC_FS is not set + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +# CONFIG_BLK_DEV_SR_VENDOR is not set +CONFIG_CHR_DEV_SG=y +# CONFIG_CHR_DEV_SCH is not set +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set +CONFIG_SCSI_WAIT_SCAN=m + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +# CONFIG_SCSI_LOWLEVEL is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +CONFIG_ATA=y +# CONFIG_ATA_NONSTANDARD is not set +# CONFIG_ATA_VERBOSE_ERROR is not set +CONFIG_ATA_ACPI=y +# CONFIG_SATA_PMP is not set + +# +# Controllers with non-SFF native interface +# +# CONFIG_SATA_AHCI is not set +# CONFIG_SATA_AHCI_PLATFORM is not set +# CONFIG_SATA_INIC162X is not set +# CONFIG_SATA_SIL24 is not set +CONFIG_ATA_SFF=y + +# +# SFF controllers with custom DMA interface +# +# CONFIG_PDC_ADMA is not set +# CONFIG_SATA_QSTOR is not set +# CONFIG_SATA_SX4 is not set +CONFIG_ATA_BMDMA=y + +# +# SATA SFF controllers with BMDMA +# +CONFIG_ATA_PIIX=y +# CONFIG_SATA_MV is not set +# CONFIG_SATA_NV is not set +# CONFIG_SATA_PROMISE is not set +# CONFIG_SATA_SIL is not set +# CONFIG_SATA_SIS is not set +# CONFIG_SATA_SVW is not set +# CONFIG_SATA_ULI is not set +# CONFIG_SATA_VIA is not set +# CONFIG_SATA_VITESSE is not set + +# +# PATA SFF controllers with BMDMA +# +# CONFIG_PATA_ALI is not set +# CONFIG_PATA_AMD is not set +# CONFIG_PATA_ARTOP is not set +# CONFIG_PATA_ATIIXP is not set +# CONFIG_PATA_ATP867X is not set +# CONFIG_PATA_CMD64X is not set +# CONFIG_PATA_CS5520 is not set +# CONFIG_PATA_CS5530 is not set +# CONFIG_PATA_CS5535 is not set +# CONFIG_PATA_CS5536 is not set +# CONFIG_PATA_CYPRESS is not set +# CONFIG_PATA_EFAR is not set +# CONFIG_PATA_HPT366 is not set +# CONFIG_PATA_HPT37X is not set +# CONFIG_PATA_HPT3X2N is not set +# CONFIG_PATA_HPT3X3 is not set +# CONFIG_PATA_IT8213 is not set +# CONFIG_PATA_IT821X is not set +# CONFIG_PATA_JMICRON is not set +# CONFIG_PATA_MARVELL is not set +# CONFIG_PATA_NETCELL is not set +# CONFIG_PATA_NINJA32 is not set +# CONFIG_PATA_NS87415 is not set +# CONFIG_PATA_OLDPIIX is not set +# CONFIG_PATA_OPTIDMA is not set +# CONFIG_PATA_PDC2027X is not set +# CONFIG_PATA_PDC_OLD is not set +# CONFIG_PATA_RADISYS is not set +# CONFIG_PATA_RDC is not set +# CONFIG_PATA_SC1200 is not set +# CONFIG_PATA_SCH is not set +# CONFIG_PATA_SERVERWORKS is not set +# CONFIG_PATA_SIL680 is not set +# CONFIG_PATA_SIS is not set +# CONFIG_PATA_TOSHIBA is not set +# CONFIG_PATA_TRIFLEX is not set +# CONFIG_PATA_VIA is not set +# CONFIG_PATA_WINBOND is not set + +# +# PIO-only SFF controllers +# +# CONFIG_PATA_CMD640_PCI is not set +# CONFIG_PATA_MPIIX is not set +# CONFIG_PATA_NS87410 is not set +# CONFIG_PATA_OPTI is not set +# CONFIG_PATA_PLATFORM is not set +# CONFIG_PATA_RZ1000 is not set + +# +# Generic fallback / legacy drivers +# +CONFIG_PATA_ACPI=y +# CONFIG_ATA_GENERIC is not set +# CONFIG_PATA_LEGACY is not set +# CONFIG_MD is not set +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# +CONFIG_FIREWIRE=m +CONFIG_FIREWIRE_OHCI=m +CONFIG_FIREWIRE_OHCI_DEBUG=y +CONFIG_FIREWIRE_SBP2=m +# CONFIG_FIREWIRE_NET is not set +# CONFIG_FIREWIRE_NOSY is not set +# CONFIG_I2O is not set +# CONFIG_MACINTOSH_DRIVERS is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_MACVLAN is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_VETH is not set +# CONFIG_NET_SB1000 is not set +# CONFIG_ARCNET is not set +CONFIG_MII=y +# CONFIG_PHYLIB is not set +CONFIG_NET_ETHERNET=y +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +# CONFIG_CASSINI is not set +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_ETHOC is not set +# CONFIG_DNET is not set +# CONFIG_NET_TULIP is not set +# CONFIG_HP100 is not set +# CONFIG_IBM_NEW_EMAC_ZMII is not set +# CONFIG_IBM_NEW_EMAC_RGMII is not set +# CONFIG_IBM_NEW_EMAC_TAH is not set +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set +# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set +# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set +# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set +CONFIG_NET_PCI=y +# CONFIG_PCNET32 is not set +# CONFIG_AMD8111_ETH is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_KSZ884X_PCI is not set +# CONFIG_B44 is not set +# CONFIG_FORCEDETH is not set +# CONFIG_E100 is not set +# CONFIG_FEALNX is not set +# CONFIG_NATSEMI is not set +# CONFIG_NE2K_PCI is not set +# CONFIG_8139CP is not set +CONFIG_8139TOO=y +CONFIG_8139TOO_PIO=y +# CONFIG_8139TOO_TUNE_TWISTER is not set +# CONFIG_8139TOO_8129 is not set +# CONFIG_8139_OLD_RX_RESET is not set +# CONFIG_R6040 is not set +# CONFIG_SIS900 is not set +# CONFIG_EPIC100 is not set +# CONFIG_SMSC9420 is not set +# CONFIG_SUNDANCE is not set +# CONFIG_TLAN is not set +# CONFIG_KS8851_MLL is not set +# CONFIG_VIA_RHINE is not set +# CONFIG_SC92031 is not set +# CONFIG_ATL2 is not set +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set +# CONFIG_TR is not set +CONFIG_WLAN=y +# CONFIG_LIBERTAS_THINFIRM is not set +# CONFIG_AIRO is not set +# CONFIG_ATMEL is not set +# CONFIG_AT76C50X_USB is not set +# CONFIG_PRISM54 is not set +CONFIG_USB_ZD1201=m +# CONFIG_USB_NET_RNDIS_WLAN is not set +# CONFIG_RTL8180 is not set +# CONFIG_RTL8187 is not set +# CONFIG_ADM8211 is not set +# CONFIG_MAC80211_HWSIM is not set +# CONFIG_MWL8K is not set +# CONFIG_ATH_COMMON is not set +# CONFIG_B43 is not set +# CONFIG_B43LEGACY is not set +# CONFIG_B43LEGACY_DMA_AND_PIO_MODE is not set +# CONFIG_B43LEGACY_DMA_MODE is not set +# CONFIG_B43LEGACY_PIO_MODE is not set +# CONFIG_HOSTAP is not set +# CONFIG_IPW2100 is not set +# CONFIG_IPW2200 is not set +# CONFIG_IWLWIFI is not set +# CONFIG_LIBERTAS is not set +# CONFIG_HERMES is not set +# CONFIG_P54_COMMON is not set +# CONFIG_RT2X00 is not set +# CONFIG_WL1251 is not set +# CONFIG_WL12XX is not set +# CONFIG_ZD1211RW is not set + +# +# Enable WiMAX (Networking options) to see the WiMAX drivers +# + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_USBNET is not set +# CONFIG_USB_HSO is not set +# CONFIG_USB_IPHETH is not set +# CONFIG_WAN is not set + +# +# CAIF transport drivers +# +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_NET_FC is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_VMXNET3 is not set +# CONFIG_ISDN is not set +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_FF_MEMLESS=y +# CONFIG_INPUT_POLLDEV is not set +# CONFIG_INPUT_SPARSEKMAP is not set + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ADP5588 is not set +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_QT2160 is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_TCA6416 is not set +# CONFIG_KEYBOARD_LM8323 is not set +# CONFIG_KEYBOARD_MAX7359 is not set +# CONFIG_KEYBOARD_MCS is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_OPENCORES is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +CONFIG_MOUSE_PS2_ALPS=y +CONFIG_MOUSE_PS2_LOGIPS2PP=y +CONFIG_MOUSE_PS2_SYNAPTICS=y +CONFIG_MOUSE_PS2_LIFEBOOK=y +CONFIG_MOUSE_PS2_TRACKPOINT=y +# CONFIG_MOUSE_PS2_ELANTECH is not set +# CONFIG_MOUSE_PS2_SENTELIC is not set +# CONFIG_MOUSE_PS2_TOUCHKIT is not set +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_APPLETOUCH is not set +# CONFIG_MOUSE_BCM5974 is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_MOUSE_SYNAPTICS_I2C is not set +CONFIG_INPUT_JOYSTICK=y +# CONFIG_JOYSTICK_ANALOG is not set +# CONFIG_JOYSTICK_A3D is not set +# CONFIG_JOYSTICK_ADI is not set +# CONFIG_JOYSTICK_COBRA is not set +# CONFIG_JOYSTICK_GF2K is not set +# CONFIG_JOYSTICK_GRIP is not set +# CONFIG_JOYSTICK_GRIP_MP is not set +# CONFIG_JOYSTICK_GUILLEMOT is not set +# CONFIG_JOYSTICK_INTERACT is not set +# CONFIG_JOYSTICK_SIDEWINDER is not set +# CONFIG_JOYSTICK_TMDC is not set +# CONFIG_JOYSTICK_IFORCE is not set +# CONFIG_JOYSTICK_WARRIOR is not set +# CONFIG_JOYSTICK_MAGELLAN is not set +# CONFIG_JOYSTICK_SPACEORB is not set +# CONFIG_JOYSTICK_SPACEBALL is not set +# CONFIG_JOYSTICK_STINGER is not set +# CONFIG_JOYSTICK_TWIDJOY is not set +# CONFIG_JOYSTICK_ZHENHUA is not set +# CONFIG_JOYSTICK_JOYDUMP is not set +CONFIG_JOYSTICK_XPAD=m +CONFIG_JOYSTICK_XPAD_FF=y +CONFIG_JOYSTICK_XPAD_LEDS=y +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_AD714X is not set +# CONFIG_INPUT_APANEL is not set +# CONFIG_INPUT_WISTRON_BTNS is not set +# CONFIG_INPUT_ATLAS_BTNS is not set +# CONFIG_INPUT_ATI_REMOTE is not set +# CONFIG_INPUT_ATI_REMOTE2 is not set +# CONFIG_INPUT_KEYSPAN_REMOTE is not set +CONFIG_INPUT_APPLEIR=y +# CONFIG_INPUT_POWERMATE is not set +# CONFIG_INPUT_YEALINK is not set +# CONFIG_INPUT_CM109 is not set +CONFIG_INPUT_UINPUT=y +# CONFIG_INPUT_WINBOND_CIR is not set +# CONFIG_INPUT_PCF8574 is not set +# CONFIG_INPUT_ADXL34X is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_I8042=y +# CONFIG_SERIO_SERPORT is not set +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_PCIPS2 is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_SERIO_ALTERA_PS2 is not set +# CONFIG_SERIO_PS2MULT is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_DEVKMEM is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_N_GSM is not set +# CONFIG_NOZOMI is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +# CONFIG_SERIAL_8250_CONSOLE is not set +CONFIG_FIX_EARLYCON_MEM=y +CONFIG_SERIAL_8250_PCI=y +# CONFIG_SERIAL_8250_PNP is not set +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_MFD_HSU is not set +CONFIG_SERIAL_CORE=y +# CONFIG_SERIAL_JSM is not set +# CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_TTY_PRINTK is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +CONFIG_NVRAM=y +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set +# CONFIG_SONYPI is not set +# CONFIG_MWAVE is not set +# CONFIG_PC8736x_GPIO is not set +# CONFIG_NSC_GPIO is not set +# CONFIG_CS5535_GPIO is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_HPET is not set +# CONFIG_HANGCHECK_TIMER is not set +# CONFIG_TCG_TPM is not set +# CONFIG_TELCLOCK is not set +CONFIG_DEVPORT=y +# CONFIG_RAMOOPS is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=m +# CONFIG_I2C_MUX is not set +CONFIG_I2C_HELPER_AUTO=y +CONFIG_I2C_ALGOBIT=y + +# +# I2C Hardware Bus support +# + +# +# PC SMBus host controller drivers +# +# CONFIG_I2C_ALI1535 is not set +# CONFIG_I2C_ALI1563 is not set +# CONFIG_I2C_ALI15X3 is not set +# CONFIG_I2C_AMD756 is not set +# CONFIG_I2C_AMD8111 is not set +CONFIG_I2C_I801=y +# CONFIG_I2C_ISCH is not set +# CONFIG_I2C_PIIX4 is not set +# CONFIG_I2C_NFORCE2 is not set +# CONFIG_I2C_SIS5595 is not set +# CONFIG_I2C_SIS630 is not set +# CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_VIA is not set +# CONFIG_I2C_VIAPRO is not set + +# +# ACPI drivers +# +# CONFIG_I2C_SCMI is not set + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_INTEL_MID is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_XILINX is not set + +# +# External I2C/SMBus adapter drivers +# +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_STUB is not set +# CONFIG_SCx200_ACB is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_SPI is not set + +# +# PPS support +# +# CONFIG_PPS is not set +CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y +# CONFIG_GPIOLIB is not set +# CONFIG_W1 is not set +CONFIG_POWER_SUPPLY=y +# CONFIG_POWER_SUPPLY_DEBUG is not set +# CONFIG_PDA_POWER is not set +# CONFIG_TEST_POWER is not set +# CONFIG_BATTERY_DS2782 is not set +# CONFIG_BATTERY_BQ20Z75 is not set +# CONFIG_BATTERY_BQ27x00 is not set +# CONFIG_BATTERY_MAX17040 is not set +# CONFIG_HWMON is not set +CONFIG_THERMAL=y +# CONFIG_WATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +CONFIG_SSB=m +CONFIG_SSB_SPROM=y +CONFIG_SSB_PCIHOST_POSSIBLE=y +CONFIG_SSB_PCIHOST=y +# CONFIG_SSB_B43_PCI_BRIDGE is not set +# CONFIG_SSB_SILENT is not set +# CONFIG_SSB_DEBUG is not set +CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y +CONFIG_SSB_DRIVER_PCICORE=y +# CONFIG_MFD_SUPPORT is not set +# CONFIG_REGULATOR is not set +CONFIG_MEDIA_SUPPORT=m + +# +# Multimedia core support +# +# CONFIG_VIDEO_DEV is not set +# CONFIG_DVB_CORE is not set +# CONFIG_VIDEO_MEDIA is not set + +# +# Multimedia drivers +# +CONFIG_IR_CORE=m +CONFIG_VIDEO_IR=m +CONFIG_LIRC=m +CONFIG_RC_MAP=m +CONFIG_IR_NEC_DECODER=m +CONFIG_IR_RC5_DECODER=m +CONFIG_IR_RC6_DECODER=m +CONFIG_IR_JVC_DECODER=m +CONFIG_IR_SONY_DECODER=m +CONFIG_IR_RC5_SZ_DECODER=m +# CONFIG_IR_LIRC_CODEC is not set +# CONFIG_IR_ENE is not set +# CONFIG_IR_IMON is not set +CONFIG_IR_MCEUSB=m +# CONFIG_IR_NUVOTON is not set +# CONFIG_IR_STREAMZAP is not set +# CONFIG_DAB is not set + +# +# Graphics support +# +CONFIG_AGP=y +# CONFIG_AGP_ALI is not set +# CONFIG_AGP_ATI is not set +# CONFIG_AGP_AMD is not set +CONFIG_AGP_INTEL=y +# CONFIG_AGP_NVIDIA is not set +# CONFIG_AGP_SIS is not set +# CONFIG_AGP_SWORKS is not set +# CONFIG_AGP_VIA is not set +# CONFIG_AGP_EFFICEON is not set +CONFIG_VGA_ARB=y +CONFIG_VGA_ARB_MAX_GPUS=1 +# CONFIG_VGA_SWITCHEROO is not set +CONFIG_DRM=y +CONFIG_DRM_KMS_HELPER=y +CONFIG_DRM_TTM=y +# CONFIG_DRM_TDFX is not set +# CONFIG_DRM_R128 is not set +# CONFIG_DRM_RADEON is not set +# CONFIG_DRM_MGA is not set +# CONFIG_DRM_SIS is not set +# CONFIG_DRM_VIA is not set +# CONFIG_DRM_SAVAGE is not set +# CONFIG_STUB_POULSBO is not set +# CONFIG_VGASTATE is not set +CONFIG_VIDEO_OUTPUT_CONTROL=y +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +# CONFIG_FB_BOOT_VESA_SUPPORT is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +# CONFIG_FB_SYS_FILLRECT is not set +# CONFIG_FB_SYS_COPYAREA is not set +# CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_FOREIGN_ENDIAN is not set +# CONFIG_FB_SYS_FOPS is not set +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +CONFIG_FB_BACKLIGHT=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_CIRRUS is not set +# CONFIG_FB_PM2 is not set +# CONFIG_FB_CYBER2000 is not set +# CONFIG_FB_ARC is not set +# CONFIG_FB_ASILIANT is not set +# CONFIG_FB_IMSTT is not set +# CONFIG_FB_VGA16 is not set +# CONFIG_FB_VESA is not set +# CONFIG_FB_EFI is not set +# CONFIG_FB_N411 is not set +# CONFIG_FB_HGA is not set +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_NVIDIA is not set +# CONFIG_FB_RIVA is not set +# CONFIG_FB_I810 is not set +# CONFIG_FB_LE80578 is not set +# CONFIG_FB_INTEL is not set +# CONFIG_FB_MATROX is not set +# CONFIG_FB_RADEON is not set +# CONFIG_FB_ATY128 is not set +# CONFIG_FB_ATY is not set +# CONFIG_FB_S3 is not set +# CONFIG_FB_SAVAGE is not set +# CONFIG_FB_SIS is not set +# CONFIG_FB_VIA is not set +# CONFIG_FB_NEOMAGIC is not set +# CONFIG_FB_KYRO is not set +# CONFIG_FB_3DFX is not set +# CONFIG_FB_VOODOO1 is not set +# CONFIG_FB_VT8623 is not set +# CONFIG_FB_TRIDENT is not set +# CONFIG_FB_ARK is not set +# CONFIG_FB_PM3 is not set +# CONFIG_FB_CARMINE is not set +# CONFIG_FB_GEODE is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_MB862XX is not set +# CONFIG_FB_BROADSHEET is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_LCD_CLASS_DEVICE is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y +# CONFIG_BACKLIGHT_GENERIC is not set +# CONFIG_BACKLIGHT_PROGEAR is not set +# CONFIG_BACKLIGHT_MBP_NVIDIA is not set +# CONFIG_BACKLIGHT_SAHARA is not set +# CONFIG_BACKLIGHT_ADP8860 is not set + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set + +# +# Console display driver support +# +CONFIG_VGA_CONSOLE=y +CONFIG_VGACON_SOFT_SCROLLBACK=y +CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256 +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE is not set +# CONFIG_LOGO is not set +CONFIG_SOUND=y +# CONFIG_SOUND_OSS_CORE is not set +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=y +# CONFIG_SND_SEQUENCER is not set +# CONFIG_SND_MIXER_OSS is not set +# CONFIG_SND_PCM_OSS is not set +# CONFIG_SND_HRTIMER is not set +CONFIG_SND_DYNAMIC_MINORS=y +# CONFIG_SND_SUPPORT_OLD_API is not set +# CONFIG_SND_VERBOSE_PROCFS is not set +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +CONFIG_SND_VMASTER=y +CONFIG_SND_DMA_SGBUF=y +# CONFIG_SND_RAWMIDI_SEQ is not set +# CONFIG_SND_OPL3_LIB_SEQ is not set +# CONFIG_SND_OPL4_LIB_SEQ is not set +# CONFIG_SND_SBAWE_SEQ is not set +# CONFIG_SND_EMU10K1_SEQ is not set +# CONFIG_SND_DRIVERS is not set +CONFIG_SND_PCI=y +# CONFIG_SND_AD1889 is not set +# CONFIG_SND_ALS300 is not set +# CONFIG_SND_ALS4000 is not set +# CONFIG_SND_ALI5451 is not set +# CONFIG_SND_ASIHPI is not set +# CONFIG_SND_ATIIXP is not set +# CONFIG_SND_ATIIXP_MODEM is not set +# CONFIG_SND_AU8810 is not set +# CONFIG_SND_AU8820 is not set +# CONFIG_SND_AU8830 is not set +# CONFIG_SND_AW2 is not set +# CONFIG_SND_AZT3328 is not set +# CONFIG_SND_BT87X is not set +# CONFIG_SND_CA0106 is not set +# CONFIG_SND_CMIPCI is not set +# CONFIG_SND_OXYGEN is not set +# CONFIG_SND_CS4281 is not set +# CONFIG_SND_CS46XX is not set +# CONFIG_SND_CS5530 is not set +# CONFIG_SND_CS5535AUDIO is not set +# CONFIG_SND_CTXFI is not set +# CONFIG_SND_DARLA20 is not set +# CONFIG_SND_GINA20 is not set +# CONFIG_SND_LAYLA20 is not set +# CONFIG_SND_DARLA24 is not set +# CONFIG_SND_GINA24 is not set +# CONFIG_SND_LAYLA24 is not set +# CONFIG_SND_MONA is not set +# CONFIG_SND_MIA is not set +# CONFIG_SND_ECHO3G is not set +# CONFIG_SND_INDIGO is not set +# CONFIG_SND_INDIGOIO is not set +# CONFIG_SND_INDIGODJ is not set +# CONFIG_SND_INDIGOIOX is not set +# CONFIG_SND_INDIGODJX is not set +# CONFIG_SND_EMU10K1 is not set +# CONFIG_SND_EMU10K1X is not set +# CONFIG_SND_ENS1370 is not set +# CONFIG_SND_ENS1371 is not set +# CONFIG_SND_ES1938 is not set +# CONFIG_SND_ES1968 is not set +# CONFIG_SND_FM801 is not set +CONFIG_SND_HDA_INTEL=y +CONFIG_SND_HDA_HWDEP=y +# CONFIG_SND_HDA_RECONFIG is not set +# CONFIG_SND_HDA_INPUT_BEEP is not set +# CONFIG_SND_HDA_INPUT_JACK is not set +# CONFIG_SND_HDA_PATCH_LOADER is not set +CONFIG_SND_HDA_CODEC_REALTEK=y +# CONFIG_SND_HDA_CODEC_ANALOG is not set +# CONFIG_SND_HDA_CODEC_SIGMATEL is not set +# CONFIG_SND_HDA_CODEC_VIA is not set +CONFIG_SND_HDA_CODEC_HDMI=y +# CONFIG_SND_HDA_CODEC_CIRRUS is not set +# CONFIG_SND_HDA_CODEC_CONEXANT is not set +# CONFIG_SND_HDA_CODEC_CA0110 is not set +# CONFIG_SND_HDA_CODEC_CMEDIA is not set +# CONFIG_SND_HDA_CODEC_SI3054 is not set +CONFIG_SND_HDA_GENERIC=y +CONFIG_SND_HDA_POWER_SAVE=y +CONFIG_SND_HDA_POWER_SAVE_DEFAULT=5 +# CONFIG_SND_HDSP is not set +# CONFIG_SND_HDSPM is not set +# CONFIG_SND_HIFIER is not set +# CONFIG_SND_ICE1712 is not set +# CONFIG_SND_ICE1724 is not set +# CONFIG_SND_INTEL8X0 is not set +# CONFIG_SND_INTEL8X0M is not set +# CONFIG_SND_KORG1212 is not set +# CONFIG_SND_LX6464ES is not set +# CONFIG_SND_MAESTRO3 is not set +# CONFIG_SND_MIXART is not set +# CONFIG_SND_NM256 is not set +# CONFIG_SND_PCXHR is not set +# CONFIG_SND_RIPTIDE is not set +# CONFIG_SND_RME32 is not set +# CONFIG_SND_RME96 is not set +# CONFIG_SND_RME9652 is not set +# CONFIG_SND_SIS7019 is not set +# CONFIG_SND_SONICVIBES is not set +# CONFIG_SND_TRIDENT is not set +# CONFIG_SND_VIA82XX is not set +# CONFIG_SND_VIA82XX_MODEM is not set +# CONFIG_SND_VIRTUOSO is not set +# CONFIG_SND_VX222 is not set +# CONFIG_SND_YMFPCI is not set +# CONFIG_SND_USB is not set +# CONFIG_SND_SOC is not set +# CONFIG_SOUND_PRIME is not set +CONFIG_HID_SUPPORT=y +CONFIG_HID=y +CONFIG_HIDRAW=y + +# +# USB Input Devices +# +CONFIG_USB_HID=y +# CONFIG_HID_PID is not set +CONFIG_USB_HIDDEV=y + +# +# Special HID drivers +# +# CONFIG_HID_3M_PCT is not set +# CONFIG_HID_A4TECH is not set +# CONFIG_HID_ACRUX_FF is not set +CONFIG_HID_APPLE=y +CONFIG_HID_AUREAL=y +# CONFIG_HID_BELKIN is not set +# CONFIG_HID_CANDO is not set +# CONFIG_HID_CHERRY is not set +# CONFIG_HID_CHICONY is not set +# CONFIG_HID_PRODIKEYS is not set +# CONFIG_HID_CYPRESS is not set +# CONFIG_HID_DRAGONRISE is not set +# CONFIG_HID_EGALAX is not set +# CONFIG_HID_EZKEY is not set +# CONFIG_HID_KYE is not set +# CONFIG_HID_UCLOGIC is not set +# CONFIG_HID_WALTOP is not set +# CONFIG_HID_GYRATION is not set +CONFIG_HID_TWINHAN=y +# CONFIG_HID_KENSINGTON is not set +CONFIG_HID_LOGITECH=y +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_LOGIWII_FF=y +CONFIG_HID_MICROSOFT=y +# CONFIG_HID_MOSART is not set +# CONFIG_HID_MONTEREY is not set +# CONFIG_HID_NTRIG is not set +# CONFIG_HID_ORTEK is not set +# CONFIG_HID_PANTHERLORD is not set +# CONFIG_HID_PETALYNX is not set +# CONFIG_HID_PICOLCD is not set +# CONFIG_HID_QUANTA is not set +# CONFIG_HID_ROCCAT is not set +# CONFIG_HID_ROCCAT_KONE is not set +# CONFIG_HID_ROCCAT_PYRA is not set +# CONFIG_HID_SAMSUNG is not set +CONFIG_HID_SONY=y +# CONFIG_HID_STANTUM is not set +CONFIG_HID_SUNPLUS=y +# CONFIG_HID_GREENASIA is not set +# CONFIG_HID_SMARTJOYPLUS is not set +CONFIG_HID_TOPSEED=y +# CONFIG_HID_THRUSTMASTER is not set +# CONFIG_HID_ZEROPLUS is not set +# CONFIG_HID_ZYDACRON is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set +# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set + +# +# Miscellaneous USB options +# +# CONFIG_USB_DEVICEFS is not set +# CONFIG_USB_DEVICE_CLASS is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set +# CONFIG_USB_MON is not set +# CONFIG_USB_WUSB is not set +# CONFIG_USB_WUSB_CBAF is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +# CONFIG_USB_XHCI_HCD is not set +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +# CONFIG_USB_EHCI_TT_NEWSCHED is not set +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1760_HCD is not set +# CONFIG_USB_ISP1362_HCD is not set +# CONFIG_USB_OHCI_HCD is not set +CONFIG_USB_UHCI_HCD=y +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_WHCI_HCD is not set +# CONFIG_USB_HWA_HCD is not set + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set +# CONFIG_USB_WDM is not set +# CONFIG_USB_TMC is not set + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_ONETOUCH is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set +# CONFIG_USB_UAS is not set +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB port drivers +# +CONFIG_USB_SERIAL=m +# CONFIG_USB_EZUSB is not set +# CONFIG_USB_SERIAL_GENERIC is not set +# CONFIG_USB_SERIAL_AIRCABLE is not set +# CONFIG_USB_SERIAL_ARK3116 is not set +# CONFIG_USB_SERIAL_BELKIN is not set +# CONFIG_USB_SERIAL_CH341 is not set +# CONFIG_USB_SERIAL_WHITEHEAT is not set +# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +# CONFIG_USB_SERIAL_CP210X is not set +# CONFIG_USB_SERIAL_CYPRESS_M8 is not set +# CONFIG_USB_SERIAL_EMPEG is not set +CONFIG_USB_SERIAL_FTDI_SIO=m +# CONFIG_USB_SERIAL_FUNSOFT is not set +# CONFIG_USB_SERIAL_VISOR is not set +# CONFIG_USB_SERIAL_IPAQ is not set +# CONFIG_USB_SERIAL_IR is not set +# CONFIG_USB_SERIAL_EDGEPORT is not set +# CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_GARMIN is not set +# CONFIG_USB_SERIAL_IPW is not set +# CONFIG_USB_SERIAL_IUU is not set +# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set +# CONFIG_USB_SERIAL_KEYSPAN is not set +# CONFIG_USB_SERIAL_KLSI is not set +# CONFIG_USB_SERIAL_KOBIL_SCT is not set +# CONFIG_USB_SERIAL_MCT_U232 is not set +# CONFIG_USB_SERIAL_MOS7720 is not set +# CONFIG_USB_SERIAL_MOS7840 is not set +# CONFIG_USB_SERIAL_MOTOROLA is not set +# CONFIG_USB_SERIAL_NAVMAN is not set +# CONFIG_USB_SERIAL_PL2303 is not set +# CONFIG_USB_SERIAL_OTI6858 is not set +# CONFIG_USB_SERIAL_QCAUX is not set +# CONFIG_USB_SERIAL_QUALCOMM is not set +# CONFIG_USB_SERIAL_SPCP8X5 is not set +# CONFIG_USB_SERIAL_HP4X is not set +# CONFIG_USB_SERIAL_SAFE is not set +# CONFIG_USB_SERIAL_SAMBA is not set +# CONFIG_USB_SERIAL_SIEMENS_MPI is not set +# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set +# CONFIG_USB_SERIAL_SYMBOL is not set +# CONFIG_USB_SERIAL_TI is not set +# CONFIG_USB_SERIAL_CYBERJACK is not set +# CONFIG_USB_SERIAL_XIRCOM is not set +# CONFIG_USB_SERIAL_OPTION is not set +# CONFIG_USB_SERIAL_OMNINET is not set +# CONFIG_USB_SERIAL_OPTICON is not set +# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set +# CONFIG_USB_SERIAL_ZIO is not set +# CONFIG_USB_SERIAL_SSU100 is not set +# CONFIG_USB_SERIAL_DEBUG is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_SEVSEG is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set +# CONFIG_USB_TEST is not set +# CONFIG_USB_ISIGHTFW is not set +# CONFIG_USB_YUREX is not set +# CONFIG_USB_GADGET is not set + +# +# OTG and related infrastructure +# +# CONFIG_NOP_USB_XCEIV is not set +# CONFIG_UWB is not set +# CONFIG_MMC is not set +# CONFIG_MEMSTICK is not set +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# LED drivers +# +# CONFIG_LEDS_ALIX2 is not set +# CONFIG_LEDS_PCA9532 is not set +# CONFIG_LEDS_LP3944 is not set +# CONFIG_LEDS_LP5521 is not set +# CONFIG_LEDS_LP5523 is not set +# CONFIG_LEDS_CLEVO_MAIL is not set +# CONFIG_LEDS_PCA955X is not set +# CONFIG_LEDS_BD2802 is not set +# CONFIG_LEDS_INTEL_SS4200 is not set +CONFIG_LEDS_TRIGGERS=y + +# +# LED Triggers +# +# CONFIG_LEDS_TRIGGER_TIMER is not set +# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set +# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set +# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set + +# +# iptables trigger is under Netfilter config (LED target) +# +# CONFIG_ACCESSIBILITY is not set +# CONFIG_INFINIBAND is not set +# CONFIG_EDAC is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_DS3232 is not set +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_ISL12022 is not set +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set +# CONFIG_RTC_DRV_BQ32K is not set +# CONFIG_RTC_DRV_S35390A is not set +# CONFIG_RTC_DRV_FM3130 is not set +# CONFIG_RTC_DRV_RX8581 is not set +# CONFIG_RTC_DRV_RX8025 is not set + +# +# SPI RTC drivers +# + +# +# Platform RTC drivers +# +CONFIG_RTC_DRV_CMOS=y +# CONFIG_RTC_DRV_DS1286 is not set +# CONFIG_RTC_DRV_DS1511 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T35 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_MSM6242 is not set +# CONFIG_RTC_DRV_BQ4802 is not set +# CONFIG_RTC_DRV_RP5C01 is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# on-CPU RTC drivers +# +# CONFIG_DMADEVICES is not set +# CONFIG_AUXDISPLAY is not set +# CONFIG_UIO is not set +CONFIG_STAGING=y +# CONFIG_STAGING_EXCLUDE_BUILD is not set +# CONFIG_W35UND is not set +# CONFIG_PRISM2_USB is not set +# CONFIG_ECHO is not set +# CONFIG_BRCM80211 is not set +# CONFIG_BRCM80211_PCI is not set +# CONFIG_RT2860 is not set +# CONFIG_RT2870 is not set +# CONFIG_COMEDI is not set +# CONFIG_ASUS_OLED is not set +# CONFIG_R8187SE is not set +# CONFIG_RTL8192U is not set +# CONFIG_RTL8192E is not set +# CONFIG_R8712U is not set +# CONFIG_TRANZPORT is not set +# CONFIG_POHMELFS is not set +# CONFIG_IDE_PHISON is not set +# CONFIG_LINE6_USB is not set +# CONFIG_DRM_VMWGFX is not set +CONFIG_DRM_NOUVEAU=y +CONFIG_DRM_NOUVEAU_BACKLIGHT=y + +# +# I2C encoder or helper chips +# +CONFIG_DRM_I2C_CH7006=m +CONFIG_DRM_I2C_SIL164=m +# CONFIG_USB_SERIAL_QUATECH2 is not set +# CONFIG_USB_SERIAL_QUATECH_USB2 is not set +# CONFIG_VT6655 is not set +# CONFIG_VT6656 is not set +# CONFIG_FB_UDL is not set +# CONFIG_HYPERV is not set +# CONFIG_VME_BUS is not set +# CONFIG_IIO is not set +# CONFIG_ZRAM is not set +# CONFIG_BATMAN_ADV is not set +# CONFIG_SAMSUNG_LAPTOP is not set +# CONFIG_FB_SM7XX is not set +# CONFIG_CRYSTALHD is not set + +# +# Texas Instruments shared transport line discipline +# +# CONFIG_FB_XGI is not set +# CONFIG_LIRC_STAGING is not set +# CONFIG_ACPI_QUICKSTART is not set +CONFIG_MACH_NO_WESTBRIDGE=y +# CONFIG_USB_ENESTORAGE is not set +# CONFIG_BCM_WIMAX is not set +# CONFIG_FT1000 is not set + +# +# Speakup console speech +# +# CONFIG_SPEAKUP is not set +# CONFIG_X86_PLATFORM_DEVICES is not set + +# +# Firmware Drivers +# +# CONFIG_EDD is not set +CONFIG_FIRMWARE_MEMMAP=y +# CONFIG_EFI_VARS is not set +# CONFIG_DELL_RBU is not set +# CONFIG_DCDBAS is not set +CONFIG_DMIID=y +# CONFIG_ISCSI_IBFT_FIND is not set + +# +# File systems +# +# CONFIG_EXT2_FS is not set +# CONFIG_EXT3_FS is not set +CONFIG_EXT4_FS=y +CONFIG_EXT4_USE_FOR_EXT23=y +# CONFIG_EXT4_FS_XATTR is not set +# CONFIG_EXT4_DEBUG is not set +CONFIG_JBD2=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_FS_POSIX_ACL is not set +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_BTRFS_FS is not set +# CONFIG_NILFS2_FS is not set +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +CONFIG_DNOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_FANOTIFY is not set +# CONFIG_QUOTA is not set +# CONFIG_QUOTACTL is not set +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=y +# CONFIG_CUSE is not set + +# +# Caches +# +# CONFIG_FSCACHE is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +# CONFIG_MSDOS_FS is not set +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="ascii" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_HUGETLBFS is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_AFFS_FS is not set +# CONFIG_ECRYPT_FS is not set +# CONFIG_HFS_FS is not set +CONFIG_HFSPLUS_FS=y +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_LOGFS is not set +# CONFIG_CRAMFS is not set +CONFIG_SQUASHFS=y +CONFIG_SQUASHFS_XATTR=y +CONFIG_SQUASHFS_LZO=y +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_SYSV_FS is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +CONFIG_NFS_V4=y +# CONFIG_NFS_V4_1 is not set +# CONFIG_NFS_USE_LEGACY_DNS is not set +CONFIG_NFS_USE_KERNEL_DNS=y +# CONFIG_NFS_USE_NEW_IDMAPPER is not set +# CONFIG_NFSD is not set +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_CEPH_FS is not set +CONFIG_CIFS=y +CONFIG_CIFS_STATS=y +CONFIG_CIFS_STATS2=y +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_UPCALL is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_DFS_UPCALL is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +CONFIG_MAC_PARTITION=y +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +CONFIG_LDM_PARTITION=y +# CONFIG_LDM_DEBUG is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +CONFIG_EFI_PARTITION=y +# CONFIG_SYSV68_PARTITION is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="utf8" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=y +# CONFIG_DLM is not set + +# +# Kernel hacking +# +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_PRINTK_TIME=y +# CONFIG_ENABLE_WARN_DEPRECATED is not set +# CONFIG_ENABLE_MUST_CHECK is not set +CONFIG_FRAME_WARN=1024 +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_HARDLOCKUP_DETECTOR is not set +# CONFIG_BKL is not set +# CONFIG_SPARSE_RCU_POINTER is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +CONFIG_ARCH_WANT_FRAME_POINTERS=y +# CONFIG_FRAME_POINTER is not set +# CONFIG_RCU_CPU_STALL_DETECTOR is not set +CONFIG_SYSCTL_SYSCALL_CHECK=y +CONFIG_USER_STACKTRACE_SUPPORT=y +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y +CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_TRACING_SUPPORT=y +# CONFIG_FTRACE is not set +# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set +# CONFIG_FIREWIRE_OHCI_REMOTE_DMA is not set +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +CONFIG_HAVE_ARCH_KMEMCHECK=y +CONFIG_STRICT_DEVMEM=y +# CONFIG_X86_VERBOSE_BOOTUP is not set +# CONFIG_EARLY_PRINTK is not set +CONFIG_DOUBLEFAULT=y +# CONFIG_IOMMU_STRESS is not set +CONFIG_HAVE_MMIOTRACE_SUPPORT=y +CONFIG_IO_DELAY_TYPE_0X80=0 +CONFIG_IO_DELAY_TYPE_0XED=1 +CONFIG_IO_DELAY_TYPE_UDELAY=2 +CONFIG_IO_DELAY_TYPE_NONE=3 +CONFIG_IO_DELAY_0X80=y +# CONFIG_IO_DELAY_0XED is not set +# CONFIG_IO_DELAY_UDELAY is not set +# CONFIG_IO_DELAY_NONE is not set +CONFIG_DEFAULT_IO_DELAY_TYPE=0 +CONFIG_OPTIMIZE_INLINING=y + +# +# Security options +# +CONFIG_KEYS=y +# CONFIG_KEYS_DEBUG_PROC_KEYS is not set +# CONFIG_SECURITY_DMESG_RESTRICT is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITYFS is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_DEFAULT_SECURITY="" +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y +# CONFIG_CRYPTO_GF128MUL is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_PCRYPT is not set +CONFIG_CRYPTO_WORKQUEUE=y +# CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_AUTHENC is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Authenticated Encryption with Associated Data +# +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_GCM is not set +# CONFIG_CRYPTO_SEQIV is not set + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +# CONFIG_CRYPTO_CTR is not set +# CONFIG_CRYPTO_CTS is not set +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +# CONFIG_CRYPTO_HMAC is not set +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_CRC32C_INTEL is not set +# CONFIG_CRYPTO_GHASH is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_MICHAEL_MIC=y +# CONFIG_CRYPTO_RMD128 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# Ciphers +# +CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_AES_586 is not set +# CONFIG_CRYPTO_ANUBIS is not set +CONFIG_CRYPTO_ARC4=y +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_SALSA20_586 is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_TWOFISH_586 is not set + +# +# Compression +# +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_ZLIB is not set +# CONFIG_CRYPTO_LZO is not set + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_HW is not set +CONFIG_HAVE_KVM=y +# CONFIG_VIRTUALIZATION is not set +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_GENERIC_FIND_FIRST_BIT=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_GENERIC_FIND_LAST_BIT=y +CONFIG_CRC_CCITT=m +CONFIG_CRC16=y +# CONFIG_CRC_T10DIF is not set +CONFIG_CRC_ITU_T=y +CONFIG_CRC32=y +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_NLATTR=y diff --git a/projects/ATV/options b/projects/ATV/options index 1501a8d87f..10528b908e 100644 --- a/projects/ATV/options +++ b/projects/ATV/options @@ -1,6 +1,6 @@ # Welcome Message for e.g. SSH Server (up to 5 Lines) GREATING0="#######################################################" - GREATING1="# Welcome to OpenELEC - the powerfull Mediacenter4you #" + GREATING1="# Welcome to OpenELEC - the powerful Mediacenter4you #" GREATING2="# .......... visit http://www.openelec.tv ........... #" GREATING3="#######################################################" GREATING4="" @@ -45,18 +45,17 @@ esac # Build optimizations (size/speed) - OPTIMIZATIONS="speed" + OPTIMIZATIONS="size" # Project CFLAGS PROJECT_CFLAGS="" -# Timezone to use (empty disables timezone support) -# use a TZ environment string - TIMEZONE="" - # Mediacenter to use (xbmc / no) MEDIACENTER="xbmc-dharma" +# build and install Tvheadend TV server (yes / no) + TVHEADEND="no" + # Skins to install (Confluence) SKINS="Confluence" @@ -83,11 +82,16 @@ # FAAC is an MPEG-4 and MPEG-2 AAC encoder (yes / no) FAAC_SUPPORT="yes" +# build and install Tvheadend TV server (yes / no) + TVHEADEND="yes" + # additional drivers to install: +# bcm_sta: Broadcom STA WLAN Driver # rtl8192se: Realtek RTL8192SE WLAN driver +# bcm_sta: Broadcom STA WLAN Driver # Space separated list is supported, # e.g. ADDITIONAL_DRIVERS="rtl8192se" - ADDITIONAL_DRIVERS="" + ADDITIONAL_DRIVERS="bcm_sta" # build with network support (yes / no) NETWORK="yes" @@ -101,14 +105,11 @@ # build and install Avahi (Zeroconf) daemon (yes / no) AVAHI_DAEMON="yes" -# build and install PulseAudio support (yes / no) - PULSEAUDIO_SUPPORT="no" - # build and install Samba Server (yes / no) SAMBA_SERVER="yes" # build and install Transmission BitTorrent daemon (yes / no) - TRANSMISSION="yes" + TRANSMISSION="no" # todo (need for vdr?) SERVICES="yes" @@ -127,16 +128,19 @@ # Displayserver to use (xorg-server / no) DISPLAYSERVER="xorg-server" -# Graphic drivers to use (all / i915,i965,r200,r300,r600,radeon,nvidia,nouveau) +# Graphic drivers to use (all / i915,i965,r200,r300,r600,radeon,nvidia,nouveau,vmware) # Space separated list is supported, # e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 radeon nvidia nouveau" GRAPHIC_DRIVERS="nouveau" -# libdrm to use (libdrm / libdrm-master) - LIBDRM="libdrm-master" +# use libdrm-master (latest git) instead latest released version + LIBDRM_MASTER="yes" -# Mesa to use (Mesa / mesa-master) - MESA="mesa-master" +# use Mesa-master (latest git) instead latest released version + MESA_MASTER="yes" + +# use linux-next (latest rc) instead latest released version + LINUX_NEXT="yes" # Use VDPAU video acceleration (needs nVidia driver and a supported card) VDPAU="no" @@ -151,12 +155,6 @@ # build and install remote support (yes / no) REMOTE_SUPPORT="yes" -# Remote to Use (pctv/logitech/hauppauge/realmagic/creative/leadtek/ -# leadtek-pvr2000/RM-S6/RX-V850/animax/askey/avermedia/packard_bell/atiusb/ -# atiusb2/LG/D-10/digimatrix/mceusb/streamzap/cinergy1400/nova-s-plus/twinhan/ -# tosh-vt76f/flytv-prime/Medion-X10/imonknob/ultrax/dvico/MCE-X10) - REMOTE="mceusb" - # build and install WiiMote support (yes / no) WIIMOTE_SUPPORT="no" @@ -178,7 +176,7 @@ # "none" for disable LCD support LCD_DRIVER="none" -# Firmware to use (iwl1000, iwl3945, iwl4965, iwl5000, iwl5150, iwl6000) +# Firmware to use (iwl1000, iwl3945, iwl4965, iwl5000, iwl5150, iwl6000, iwl6050) # Space separated list is supported, # e.g. FIRMWARE="iwl3945 iwl5000" FIRMWARE="" diff --git a/projects/ION/linux/linux.i386.conf b/projects/ION/linux/linux.i386.conf index f732d8e8f5..1b0754d775 100644 --- a/projects/ION/linux/linux.i386.conf +++ b/projects/ION/linux/linux.i386.conf @@ -90,13 +90,14 @@ CONFIG_BSD_PROCESS_ACCT=y # RCU Subsystem # CONFIG_TREE_RCU=y +# CONFIG_TREE_PREEMPT_RCU is not set # CONFIG_RCU_TRACE is not set CONFIG_RCU_FANOUT=32 # CONFIG_RCU_FANOUT_EXACT is not set # CONFIG_TREE_RCU_TRACE is not set CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=18 +CONFIG_LOG_BUF_SHIFT=16 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y CONFIG_CGROUPS=y # CONFIG_CGROUP_DEBUG is not set @@ -152,9 +153,9 @@ CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set CONFIG_PCI_QUIRKS=y # CONFIG_COMPAT_BRK is not set -CONFIG_SLAB=y +# CONFIG_SLAB is not set # CONFIG_SLUB is not set -# CONFIG_SLOB is not set +CONFIG_SLOB=y # CONFIG_PROFILING is not set CONFIG_HAVE_OPROFILE=y # CONFIG_KPROBES is not set @@ -176,7 +177,6 @@ CONFIG_HAVE_PERF_EVENTS_NMI=y # GCOV-based kernel profiling # CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_SLABINFO=y CONFIG_RT_MUTEXES=y CONFIG_BASE_SMALL=0 CONFIG_MODULES=y @@ -206,27 +206,27 @@ CONFIG_DEFAULT_IOSCHED="cfq" # CONFIG_INLINE_SPIN_LOCK_BH is not set # CONFIG_INLINE_SPIN_LOCK_IRQ is not set # CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set -CONFIG_INLINE_SPIN_UNLOCK=y +# CONFIG_INLINE_SPIN_UNLOCK is not set # CONFIG_INLINE_SPIN_UNLOCK_BH is not set -CONFIG_INLINE_SPIN_UNLOCK_IRQ=y +# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set # CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set # CONFIG_INLINE_READ_TRYLOCK is not set # CONFIG_INLINE_READ_LOCK is not set # CONFIG_INLINE_READ_LOCK_BH is not set # CONFIG_INLINE_READ_LOCK_IRQ is not set # CONFIG_INLINE_READ_LOCK_IRQSAVE is not set -CONFIG_INLINE_READ_UNLOCK=y +# CONFIG_INLINE_READ_UNLOCK is not set # CONFIG_INLINE_READ_UNLOCK_BH is not set -CONFIG_INLINE_READ_UNLOCK_IRQ=y +# CONFIG_INLINE_READ_UNLOCK_IRQ is not set # CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set # CONFIG_INLINE_WRITE_TRYLOCK is not set # CONFIG_INLINE_WRITE_LOCK is not set # CONFIG_INLINE_WRITE_LOCK_BH is not set # CONFIG_INLINE_WRITE_LOCK_IRQ is not set # CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set -CONFIG_INLINE_WRITE_UNLOCK=y +# CONFIG_INLINE_WRITE_UNLOCK is not set # CONFIG_INLINE_WRITE_UNLOCK_BH is not set -CONFIG_INLINE_WRITE_UNLOCK_IRQ=y +# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set # CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_FREEZER=y @@ -303,8 +303,8 @@ CONFIG_NR_CPUS=4 CONFIG_SCHED_SMT=y CONFIG_SCHED_MC=y # CONFIG_PREEMPT_NONE is not set -CONFIG_PREEMPT_VOLUNTARY=y -# CONFIG_PREEMPT is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y # CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set @@ -547,7 +547,7 @@ CONFIG_INET_TCP_DIAG=y CONFIG_TCP_CONG_CUBIC=y CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=m +CONFIG_IPV6=y # CONFIG_IPV6_PRIVACY is not set # CONFIG_IPV6_ROUTER_PREF is not set # CONFIG_IPV6_OPTIMISTIC_DAD is not set @@ -1378,8 +1378,8 @@ CONFIG_MEDIA_SUPPORT=m # Multimedia core support # # CONFIG_VIDEO_DEV is not set -# CONFIG_DVB_CORE is not set -# CONFIG_VIDEO_MEDIA is not set +CONFIG_DVB_CORE=m +CONFIG_VIDEO_MEDIA=m # # Multimedia drivers @@ -1399,6 +1399,223 @@ CONFIG_IR_NUVOTON=m CONFIG_IR_MCEUSB=m CONFIG_IR_ENE=m CONFIG_IR_STREAMZAP=m +CONFIG_MEDIA_ATTACH=y +CONFIG_MEDIA_TUNER=m +CONFIG_MEDIA_TUNER_CUSTOMISE=y +# CONFIG_MEDIA_TUNER_SIMPLE is not set +# CONFIG_MEDIA_TUNER_TDA8290 is not set +# CONFIG_MEDIA_TUNER_TDA827X is not set +# CONFIG_MEDIA_TUNER_TDA18271 is not set +# CONFIG_MEDIA_TUNER_TDA9887 is not set +# CONFIG_MEDIA_TUNER_TEA5761 is not set +# CONFIG_MEDIA_TUNER_TEA5767 is not set +# CONFIG_MEDIA_TUNER_MT20XX is not set +# CONFIG_MEDIA_TUNER_MT2060 is not set +# CONFIG_MEDIA_TUNER_MT2266 is not set +# CONFIG_MEDIA_TUNER_MT2131 is not set +# CONFIG_MEDIA_TUNER_QT1010 is not set +# CONFIG_MEDIA_TUNER_XC2028 is not set +# CONFIG_MEDIA_TUNER_XC5000 is not set +# CONFIG_MEDIA_TUNER_MXL5005S is not set +# CONFIG_MEDIA_TUNER_MXL5007T is not set +# CONFIG_MEDIA_TUNER_MC44S803 is not set +# CONFIG_MEDIA_TUNER_MAX2165 is not set +CONFIG_DVB_MAX_ADAPTERS=8 +# CONFIG_DVB_DYNAMIC_MINORS is not set +CONFIG_DVB_CAPTURE_DRIVERS=y + +# +# Supported SAA7146 based PCI Adapters +# +# CONFIG_TTPCI_EEPROM is not set +# CONFIG_DVB_BUDGET_CORE is not set + +# +# Supported USB Adapters +# +CONFIG_DVB_USB=m +# CONFIG_DVB_USB_DEBUG is not set +# CONFIG_DVB_USB_A800 is not set +# CONFIG_DVB_USB_DIBUSB_MB is not set +# CONFIG_DVB_USB_DIBUSB_MC is not set +# CONFIG_DVB_USB_DIB0700 is not set +# CONFIG_DVB_USB_UMT_010 is not set +# CONFIG_DVB_USB_CXUSB is not set +# CONFIG_DVB_USB_M920X is not set +# CONFIG_DVB_USB_GL861 is not set +# CONFIG_DVB_USB_AU6610 is not set +# CONFIG_DVB_USB_DIGITV is not set +# CONFIG_DVB_USB_VP7045 is not set +# CONFIG_DVB_USB_VP702X is not set +# CONFIG_DVB_USB_GP8PSK is not set +# CONFIG_DVB_USB_NOVA_T_USB2 is not set +# CONFIG_DVB_USB_TTUSB2 is not set +# CONFIG_DVB_USB_DTT200U is not set +# CONFIG_DVB_USB_OPERA1 is not set +# CONFIG_DVB_USB_AF9005 is not set +# CONFIG_DVB_USB_DW2102 is not set +# CONFIG_DVB_USB_CINERGY_T2 is not set +CONFIG_DVB_USB_ANYSEE=m +# CONFIG_DVB_USB_DTV5100 is not set +# CONFIG_DVB_USB_AF9015 is not set +# CONFIG_DVB_USB_CE6230 is not set +# CONFIG_DVB_USB_FRIIO is not set +# CONFIG_DVB_USB_EC168 is not set +# CONFIG_DVB_USB_AZ6027 is not set +# CONFIG_DVB_TTUSB_BUDGET is not set +# CONFIG_DVB_TTUSB_DEC is not set +# CONFIG_SMS_SIANO_MDTV is not set + +# +# Supported FlexCopII (B2C2) Adapters +# +# CONFIG_DVB_B2C2_FLEXCOP is not set + +# +# Supported BT878 Adapters +# + +# +# Supported Pluto2 Adapters +# +# CONFIG_DVB_PLUTO2 is not set + +# +# Supported SDMC DM1105 Adapters +# +# CONFIG_DVB_DM1105 is not set +# CONFIG_DVB_FIREDTV is not set + +# +# Supported Earthsoft PT1 Adapters +# +# CONFIG_DVB_PT1 is not set + +# +# Supported Mantis Adapters +# +# CONFIG_MANTIS_CORE is not set + +# +# Supported nGene Adapters +# +# CONFIG_DVB_NGENE is not set + +# +# Supported DVB Frontends +# +CONFIG_DVB_FE_CUSTOMISE=y + +# +# Customise DVB Frontends +# + +# +# Multistandard (satellite) frontends +# +# CONFIG_DVB_STB0899 is not set +# CONFIG_DVB_STB6100 is not set +# CONFIG_DVB_STV090x is not set +# CONFIG_DVB_STV6110x is not set + +# +# DVB-S (satellite) frontends +# +# CONFIG_DVB_CX24110 is not set +# CONFIG_DVB_CX24123 is not set +# CONFIG_DVB_MT312 is not set +# CONFIG_DVB_ZL10036 is not set +# CONFIG_DVB_ZL10039 is not set +# CONFIG_DVB_S5H1420 is not set +# CONFIG_DVB_STV0288 is not set +# CONFIG_DVB_STB6000 is not set +# CONFIG_DVB_STV0299 is not set +# CONFIG_DVB_STV6110 is not set +# CONFIG_DVB_STV0900 is not set +# CONFIG_DVB_TDA8083 is not set +# CONFIG_DVB_TDA10086 is not set +# CONFIG_DVB_TDA8261 is not set +# CONFIG_DVB_VES1X93 is not set +# CONFIG_DVB_TUNER_ITD1000 is not set +# CONFIG_DVB_TUNER_CX24113 is not set +# CONFIG_DVB_TDA826X is not set +# CONFIG_DVB_TUA6100 is not set +# CONFIG_DVB_CX24116 is not set +# CONFIG_DVB_SI21XX is not set +# CONFIG_DVB_DS3000 is not set +# CONFIG_DVB_MB86A16 is not set + +# +# DVB-T (terrestrial) frontends +# +# CONFIG_DVB_SP8870 is not set +# CONFIG_DVB_SP887X is not set +# CONFIG_DVB_CX22700 is not set +# CONFIG_DVB_CX22702 is not set +# CONFIG_DVB_DRX397XD is not set +# CONFIG_DVB_L64781 is not set +# CONFIG_DVB_TDA1004X is not set +# CONFIG_DVB_NXT6000 is not set +CONFIG_DVB_MT352=m +CONFIG_DVB_ZL10353=m +# CONFIG_DVB_DIB3000MB is not set +# CONFIG_DVB_DIB3000MC is not set +# CONFIG_DVB_DIB7000M is not set +# CONFIG_DVB_DIB7000P is not set +# CONFIG_DVB_TDA10048 is not set +# CONFIG_DVB_AF9013 is not set +# CONFIG_DVB_EC100 is not set + +# +# DVB-C (cable) frontends +# +# CONFIG_DVB_VES1820 is not set +# CONFIG_DVB_TDA10021 is not set +CONFIG_DVB_TDA10023=m +# CONFIG_DVB_STV0297 is not set + +# +# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# +# CONFIG_DVB_NXT200X is not set +# CONFIG_DVB_OR51211 is not set +# CONFIG_DVB_OR51132 is not set +# CONFIG_DVB_BCM3510 is not set +# CONFIG_DVB_LGDT330X is not set +# CONFIG_DVB_LGDT3304 is not set +# CONFIG_DVB_LGDT3305 is not set +# CONFIG_DVB_S5H1409 is not set +# CONFIG_DVB_S5H1411 is not set + +# +# ISDB-T (terrestrial) frontends +# +# CONFIG_DVB_S921 is not set +# CONFIG_DVB_DIB8000 is not set + +# +# Digital terrestrial only tuners/PLL +# +CONFIG_DVB_PLL=m +# CONFIG_DVB_TUNER_DIB0070 is not set +# CONFIG_DVB_TUNER_DIB0090 is not set + +# +# SEC control devices for DVB-S +# +# CONFIG_DVB_LNBP21 is not set +# CONFIG_DVB_ISL6405 is not set +# CONFIG_DVB_ISL6421 is not set +# CONFIG_DVB_ISL6423 is not set +# CONFIG_DVB_LGS8GL5 is not set +# CONFIG_DVB_LGS8GXX is not set +# CONFIG_DVB_ATBM8830 is not set +# CONFIG_DVB_TDA665x is not set + +# +# Tools to develop new frontends +# +# CONFIG_DVB_DUMMY_FE is not set # CONFIG_DAB is not set # @@ -1670,7 +1887,7 @@ CONFIG_HID_MICROSOFT=y # CONFIG_HID_SAMSUNG is not set CONFIG_HID_SONY=y # CONFIG_HID_STANTUM is not set -# CONFIG_HID_SUNPLUS is not set +CONFIG_HID_SUNPLUS=y # CONFIG_HID_GREENASIA is not set # CONFIG_HID_SMARTJOYPLUS is not set CONFIG_HID_TOPSEED=y @@ -2014,7 +2231,7 @@ CONFIG_DNOTIFY=y CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set # CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m +CONFIG_AUTOFS4_FS=y CONFIG_FUSE_FS=m # CONFIG_CUSE is not set diff --git a/projects/ION/linux/linux.x86_64.conf b/projects/ION/linux/linux.x86_64.conf index 53981e8fd8..23fb8cb4d4 100644 --- a/projects/ION/linux/linux.x86_64.conf +++ b/projects/ION/linux/linux.x86_64.conf @@ -90,13 +90,14 @@ CONFIG_BSD_PROCESS_ACCT=y # RCU Subsystem # CONFIG_TREE_RCU=y +# CONFIG_TREE_PREEMPT_RCU is not set # CONFIG_RCU_TRACE is not set CONFIG_RCU_FANOUT=32 # CONFIG_RCU_FANOUT_EXACT is not set # CONFIG_TREE_RCU_TRACE is not set CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=18 +CONFIG_LOG_BUF_SHIFT=16 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y CONFIG_CGROUPS=y # CONFIG_CGROUP_DEBUG is not set @@ -151,9 +152,9 @@ CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set CONFIG_PCI_QUIRKS=y # CONFIG_COMPAT_BRK is not set -CONFIG_SLAB=y +# CONFIG_SLAB is not set # CONFIG_SLUB is not set -# CONFIG_SLOB is not set +CONFIG_SLOB=y # CONFIG_PROFILING is not set CONFIG_HAVE_OPROFILE=y # CONFIG_KPROBES is not set @@ -175,7 +176,6 @@ CONFIG_HAVE_PERF_EVENTS_NMI=y # GCOV-based kernel profiling # # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set -CONFIG_SLABINFO=y CONFIG_RT_MUTEXES=y CONFIG_BASE_SMALL=0 CONFIG_MODULES=y @@ -204,27 +204,27 @@ CONFIG_DEFAULT_IOSCHED="cfq" # CONFIG_INLINE_SPIN_LOCK_BH is not set # CONFIG_INLINE_SPIN_LOCK_IRQ is not set # CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set -CONFIG_INLINE_SPIN_UNLOCK=y +# CONFIG_INLINE_SPIN_UNLOCK is not set # CONFIG_INLINE_SPIN_UNLOCK_BH is not set -CONFIG_INLINE_SPIN_UNLOCK_IRQ=y +# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set # CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set # CONFIG_INLINE_READ_TRYLOCK is not set # CONFIG_INLINE_READ_LOCK is not set # CONFIG_INLINE_READ_LOCK_BH is not set # CONFIG_INLINE_READ_LOCK_IRQ is not set # CONFIG_INLINE_READ_LOCK_IRQSAVE is not set -CONFIG_INLINE_READ_UNLOCK=y +# CONFIG_INLINE_READ_UNLOCK is not set # CONFIG_INLINE_READ_UNLOCK_BH is not set -CONFIG_INLINE_READ_UNLOCK_IRQ=y +# CONFIG_INLINE_READ_UNLOCK_IRQ is not set # CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set # CONFIG_INLINE_WRITE_TRYLOCK is not set # CONFIG_INLINE_WRITE_LOCK is not set # CONFIG_INLINE_WRITE_LOCK_BH is not set # CONFIG_INLINE_WRITE_LOCK_IRQ is not set # CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set -CONFIG_INLINE_WRITE_UNLOCK=y +# CONFIG_INLINE_WRITE_UNLOCK is not set # CONFIG_INLINE_WRITE_UNLOCK_BH is not set -CONFIG_INLINE_WRITE_UNLOCK_IRQ=y +# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set # CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_FREEZER=y @@ -277,8 +277,8 @@ CONFIG_NR_CPUS=4 CONFIG_SCHED_SMT=y CONFIG_SCHED_MC=y # CONFIG_PREEMPT_NONE is not set -CONFIG_PREEMPT_VOLUNTARY=y -# CONFIG_PREEMPT is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y # CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set @@ -497,7 +497,7 @@ CONFIG_INET_TCP_DIAG=y CONFIG_TCP_CONG_CUBIC=y CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=m +CONFIG_IPV6=y # CONFIG_IPV6_PRIVACY is not set # CONFIG_IPV6_ROUTER_PREF is not set # CONFIG_IPV6_OPTIMISTIC_DAD is not set @@ -1320,8 +1320,8 @@ CONFIG_MEDIA_SUPPORT=m # Multimedia core support # # CONFIG_VIDEO_DEV is not set -# CONFIG_DVB_CORE is not set -# CONFIG_VIDEO_MEDIA is not set +CONFIG_DVB_CORE=m +CONFIG_VIDEO_MEDIA=m # # Multimedia drivers @@ -1341,6 +1341,223 @@ CONFIG_IR_NUVOTON=m CONFIG_IR_MCEUSB=m CONFIG_IR_ENE=m CONFIG_IR_STREAMZAP=m +CONFIG_MEDIA_ATTACH=y +CONFIG_MEDIA_TUNER=m +CONFIG_MEDIA_TUNER_CUSTOMISE=y +# CONFIG_MEDIA_TUNER_SIMPLE is not set +# CONFIG_MEDIA_TUNER_TDA8290 is not set +# CONFIG_MEDIA_TUNER_TDA827X is not set +# CONFIG_MEDIA_TUNER_TDA18271 is not set +# CONFIG_MEDIA_TUNER_TDA9887 is not set +# CONFIG_MEDIA_TUNER_TEA5761 is not set +# CONFIG_MEDIA_TUNER_TEA5767 is not set +# CONFIG_MEDIA_TUNER_MT20XX is not set +# CONFIG_MEDIA_TUNER_MT2060 is not set +# CONFIG_MEDIA_TUNER_MT2266 is not set +# CONFIG_MEDIA_TUNER_MT2131 is not set +# CONFIG_MEDIA_TUNER_QT1010 is not set +# CONFIG_MEDIA_TUNER_XC2028 is not set +# CONFIG_MEDIA_TUNER_XC5000 is not set +# CONFIG_MEDIA_TUNER_MXL5005S is not set +# CONFIG_MEDIA_TUNER_MXL5007T is not set +# CONFIG_MEDIA_TUNER_MC44S803 is not set +# CONFIG_MEDIA_TUNER_MAX2165 is not set +CONFIG_DVB_MAX_ADAPTERS=8 +# CONFIG_DVB_DYNAMIC_MINORS is not set +CONFIG_DVB_CAPTURE_DRIVERS=y + +# +# Supported SAA7146 based PCI Adapters +# +# CONFIG_TTPCI_EEPROM is not set +# CONFIG_DVB_BUDGET_CORE is not set + +# +# Supported USB Adapters +# +CONFIG_DVB_USB=m +# CONFIG_DVB_USB_DEBUG is not set +# CONFIG_DVB_USB_A800 is not set +# CONFIG_DVB_USB_DIBUSB_MB is not set +# CONFIG_DVB_USB_DIBUSB_MC is not set +# CONFIG_DVB_USB_DIB0700 is not set +# CONFIG_DVB_USB_UMT_010 is not set +# CONFIG_DVB_USB_CXUSB is not set +# CONFIG_DVB_USB_M920X is not set +# CONFIG_DVB_USB_GL861 is not set +# CONFIG_DVB_USB_AU6610 is not set +# CONFIG_DVB_USB_DIGITV is not set +# CONFIG_DVB_USB_VP7045 is not set +# CONFIG_DVB_USB_VP702X is not set +# CONFIG_DVB_USB_GP8PSK is not set +# CONFIG_DVB_USB_NOVA_T_USB2 is not set +# CONFIG_DVB_USB_TTUSB2 is not set +# CONFIG_DVB_USB_DTT200U is not set +# CONFIG_DVB_USB_OPERA1 is not set +# CONFIG_DVB_USB_AF9005 is not set +# CONFIG_DVB_USB_DW2102 is not set +# CONFIG_DVB_USB_CINERGY_T2 is not set +CONFIG_DVB_USB_ANYSEE=m +# CONFIG_DVB_USB_DTV5100 is not set +# CONFIG_DVB_USB_AF9015 is not set +# CONFIG_DVB_USB_CE6230 is not set +# CONFIG_DVB_USB_FRIIO is not set +# CONFIG_DVB_USB_EC168 is not set +# CONFIG_DVB_USB_AZ6027 is not set +# CONFIG_DVB_TTUSB_BUDGET is not set +# CONFIG_DVB_TTUSB_DEC is not set +# CONFIG_SMS_SIANO_MDTV is not set + +# +# Supported FlexCopII (B2C2) Adapters +# +# CONFIG_DVB_B2C2_FLEXCOP is not set + +# +# Supported BT878 Adapters +# + +# +# Supported Pluto2 Adapters +# +# CONFIG_DVB_PLUTO2 is not set + +# +# Supported SDMC DM1105 Adapters +# +# CONFIG_DVB_DM1105 is not set +# CONFIG_DVB_FIREDTV is not set + +# +# Supported Earthsoft PT1 Adapters +# +# CONFIG_DVB_PT1 is not set + +# +# Supported Mantis Adapters +# +# CONFIG_MANTIS_CORE is not set + +# +# Supported nGene Adapters +# +# CONFIG_DVB_NGENE is not set + +# +# Supported DVB Frontends +# +CONFIG_DVB_FE_CUSTOMISE=y + +# +# Customise DVB Frontends +# + +# +# Multistandard (satellite) frontends +# +# CONFIG_DVB_STB0899 is not set +# CONFIG_DVB_STB6100 is not set +# CONFIG_DVB_STV090x is not set +# CONFIG_DVB_STV6110x is not set + +# +# DVB-S (satellite) frontends +# +# CONFIG_DVB_CX24110 is not set +# CONFIG_DVB_CX24123 is not set +# CONFIG_DVB_MT312 is not set +# CONFIG_DVB_ZL10036 is not set +# CONFIG_DVB_ZL10039 is not set +# CONFIG_DVB_S5H1420 is not set +# CONFIG_DVB_STV0288 is not set +# CONFIG_DVB_STB6000 is not set +# CONFIG_DVB_STV0299 is not set +# CONFIG_DVB_STV6110 is not set +# CONFIG_DVB_STV0900 is not set +# CONFIG_DVB_TDA8083 is not set +# CONFIG_DVB_TDA10086 is not set +# CONFIG_DVB_TDA8261 is not set +# CONFIG_DVB_VES1X93 is not set +# CONFIG_DVB_TUNER_ITD1000 is not set +# CONFIG_DVB_TUNER_CX24113 is not set +# CONFIG_DVB_TDA826X is not set +# CONFIG_DVB_TUA6100 is not set +# CONFIG_DVB_CX24116 is not set +# CONFIG_DVB_SI21XX is not set +# CONFIG_DVB_DS3000 is not set +# CONFIG_DVB_MB86A16 is not set + +# +# DVB-T (terrestrial) frontends +# +# CONFIG_DVB_SP8870 is not set +# CONFIG_DVB_SP887X is not set +# CONFIG_DVB_CX22700 is not set +# CONFIG_DVB_CX22702 is not set +# CONFIG_DVB_DRX397XD is not set +# CONFIG_DVB_L64781 is not set +# CONFIG_DVB_TDA1004X is not set +# CONFIG_DVB_NXT6000 is not set +CONFIG_DVB_MT352=m +CONFIG_DVB_ZL10353=m +# CONFIG_DVB_DIB3000MB is not set +# CONFIG_DVB_DIB3000MC is not set +# CONFIG_DVB_DIB7000M is not set +# CONFIG_DVB_DIB7000P is not set +# CONFIG_DVB_TDA10048 is not set +# CONFIG_DVB_AF9013 is not set +# CONFIG_DVB_EC100 is not set + +# +# DVB-C (cable) frontends +# +# CONFIG_DVB_VES1820 is not set +# CONFIG_DVB_TDA10021 is not set +CONFIG_DVB_TDA10023=m +# CONFIG_DVB_STV0297 is not set + +# +# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# +# CONFIG_DVB_NXT200X is not set +# CONFIG_DVB_OR51211 is not set +# CONFIG_DVB_OR51132 is not set +# CONFIG_DVB_BCM3510 is not set +# CONFIG_DVB_LGDT330X is not set +# CONFIG_DVB_LGDT3304 is not set +# CONFIG_DVB_LGDT3305 is not set +# CONFIG_DVB_S5H1409 is not set +# CONFIG_DVB_S5H1411 is not set + +# +# ISDB-T (terrestrial) frontends +# +# CONFIG_DVB_S921 is not set +# CONFIG_DVB_DIB8000 is not set + +# +# Digital terrestrial only tuners/PLL +# +CONFIG_DVB_PLL=m +# CONFIG_DVB_TUNER_DIB0070 is not set +# CONFIG_DVB_TUNER_DIB0090 is not set + +# +# SEC control devices for DVB-S +# +# CONFIG_DVB_LNBP21 is not set +# CONFIG_DVB_ISL6405 is not set +# CONFIG_DVB_ISL6421 is not set +# CONFIG_DVB_ISL6423 is not set +# CONFIG_DVB_LGS8GL5 is not set +# CONFIG_DVB_LGS8GXX is not set +# CONFIG_DVB_ATBM8830 is not set +# CONFIG_DVB_TDA665x is not set + +# +# Tools to develop new frontends +# +# CONFIG_DVB_DUMMY_FE is not set # CONFIG_DAB is not set # @@ -1604,7 +1821,7 @@ CONFIG_HID_MICROSOFT=y # CONFIG_HID_SAMSUNG is not set CONFIG_HID_SONY=y # CONFIG_HID_STANTUM is not set -# CONFIG_HID_SUNPLUS is not set +CONFIG_HID_SUNPLUS=y # CONFIG_HID_GREENASIA is not set # CONFIG_HID_SMARTJOYPLUS is not set CONFIG_HID_TOPSEED=y @@ -1948,7 +2165,7 @@ CONFIG_DNOTIFY=y CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set # CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m +CONFIG_AUTOFS4_FS=y CONFIG_FUSE_FS=m # CONFIG_CUSE is not set diff --git a/projects/ION/options b/projects/ION/options index aacf39b204..ba359d64e9 100644 --- a/projects/ION/options +++ b/projects/ION/options @@ -1,6 +1,6 @@ # Welcome Message for e.g. SSH Server (up to 5 Lines) GREATING0="#######################################################" - GREATING1="# Welcome to OpenELEC - the powerfull Mediacenter4you #" + GREATING1="# Welcome to OpenELEC - the powerful Mediacenter4you #" GREATING2="# .......... visit http://www.openelec.tv ........... #" GREATING3="#######################################################" GREATING4="" @@ -50,13 +50,12 @@ # Project CFLAGS PROJECT_CFLAGS="-mfpmath=sse -ftree-vectorize -mmovbe" -# Timezone to use (empty disables timezone support) -# use a TZ environment string - TIMEZONE="" - # Mediacenter to use (xbmc / no) MEDIACENTER="xbmc-dharma" +# build and install Tvheadend TV server (yes / no) + TVHEADEND="yes" + # Skins to install (Confluence) SKINS="Confluence" @@ -83,7 +82,11 @@ # FAAC is an MPEG-4 and MPEG-2 AAC encoder (yes / no) FAAC_SUPPORT="yes" +# build and install Tvheadend TV server (yes / no) + TVHEADEND="yes" + # additional drivers to install: +# bcm_sta: Broadcom STA WLAN Driver # rtl8192se: Realtek RTL8192SE WLAN driver # Space separated list is supported, # e.g. ADDITIONAL_DRIVERS="rtl8192se" @@ -101,9 +104,6 @@ # build and install Avahi (Zeroconf) daemon (yes / no) AVAHI_DAEMON="yes" -# build and install PulseAudio support (yes / no) - PULSEAUDIO_SUPPORT="no" - # build and install Samba Server (yes / no) SAMBA_SERVER="yes" @@ -127,16 +127,19 @@ # Displayserver to use (xorg-server / no) DISPLAYSERVER="xorg-server" -# Graphic drivers to use (all / i915,i965,r200,r300,r600,radeon,nvidia,nouveau) -# Space separated list is supported, -# e.g. GRAPHIC_DRIVERS="i915 i965 radeon nvidia nouveau" +# Graphic drivers to use (all / i915,i965,r200,r300,r600,radeon,nvidia,nouveau,vmware) +# Space separated list is supported, +# e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 radeon nvidia nouveau" GRAPHIC_DRIVERS="nvidia" -# libdrm to use (libdrm / libdrm-master) - LIBDRM="libdrm" +# use libdrm-master (latest git) instead latest released version + LIBDRM_MASTER="no" -# Mesa to use (Mesa / mesa-master) - MESA="Mesa" +# use Mesa-master (latest git) instead latest released version + MESA_MASTER="no" + +# use linux-next (latest rc) instead latest released version + LINUX_NEXT="no" # Use VDPAU video acceleration (needs nVidia driver and a supported card) VDPAU="yes" @@ -151,12 +154,6 @@ # build and install remote support (yes / no) REMOTE_SUPPORT="yes" -# Remote to Use (pctv/logitech/hauppauge/realmagic/creative/leadtek/ -# leadtek-pvr2000/RM-S6/RX-V850/animax/askey/avermedia/packard_bell/atiusb/ -# atiusb2/LG/D-10/digimatrix/mceusb/streamzap/cinergy1400/nova-s-plus/twinhan/ -# tosh-vt76f/flytv-prime/Medion-X10/imonknob/ultrax/dvico/MCE-X10) - REMOTE="mceusb" - # build and install WiiMote support (yes / no) WIIMOTE_SUPPORT="yes" @@ -178,7 +175,7 @@ # "none" for disable LCD support LCD_DRIVER="irtrans" -# Firmware to use (iwl1000, iwl3945, iwl4965, iwl5000, iwl5150, iwl6000) +# Firmware to use (iwl1000, iwl3945, iwl4965, iwl5000, iwl5150, iwl6000, iwl6050) # Space separated list is supported, # e.g. FIRMWARE="iwl3945 iwl5000" FIRMWARE="" diff --git a/projects/generic/linux/linux.i386.conf b/projects/generic/linux/linux.i386.conf index 89ea845e9a..f85dbe149e 100644 --- a/projects/generic/linux/linux.i386.conf +++ b/projects/generic/linux/linux.i386.conf @@ -90,13 +90,14 @@ CONFIG_BSD_PROCESS_ACCT=y # RCU Subsystem # CONFIG_TREE_RCU=y +# CONFIG_TREE_PREEMPT_RCU is not set # CONFIG_RCU_TRACE is not set CONFIG_RCU_FANOUT=32 # CONFIG_RCU_FANOUT_EXACT is not set # CONFIG_TREE_RCU_TRACE is not set CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=18 +CONFIG_LOG_BUF_SHIFT=16 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y CONFIG_CGROUPS=y # CONFIG_CGROUP_DEBUG is not set @@ -152,9 +153,9 @@ CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set CONFIG_PCI_QUIRKS=y # CONFIG_COMPAT_BRK is not set -CONFIG_SLAB=y +# CONFIG_SLAB is not set # CONFIG_SLUB is not set -# CONFIG_SLOB is not set +CONFIG_SLOB=y # CONFIG_PROFILING is not set CONFIG_HAVE_OPROFILE=y # CONFIG_KPROBES is not set @@ -176,7 +177,6 @@ CONFIG_HAVE_PERF_EVENTS_NMI=y # GCOV-based kernel profiling # CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_SLABINFO=y CONFIG_RT_MUTEXES=y CONFIG_BASE_SMALL=0 CONFIG_MODULES=y @@ -206,27 +206,27 @@ CONFIG_DEFAULT_IOSCHED="cfq" # CONFIG_INLINE_SPIN_LOCK_BH is not set # CONFIG_INLINE_SPIN_LOCK_IRQ is not set # CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set -CONFIG_INLINE_SPIN_UNLOCK=y +# CONFIG_INLINE_SPIN_UNLOCK is not set # CONFIG_INLINE_SPIN_UNLOCK_BH is not set -CONFIG_INLINE_SPIN_UNLOCK_IRQ=y +# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set # CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set # CONFIG_INLINE_READ_TRYLOCK is not set # CONFIG_INLINE_READ_LOCK is not set # CONFIG_INLINE_READ_LOCK_BH is not set # CONFIG_INLINE_READ_LOCK_IRQ is not set # CONFIG_INLINE_READ_LOCK_IRQSAVE is not set -CONFIG_INLINE_READ_UNLOCK=y +# CONFIG_INLINE_READ_UNLOCK is not set # CONFIG_INLINE_READ_UNLOCK_BH is not set -CONFIG_INLINE_READ_UNLOCK_IRQ=y +# CONFIG_INLINE_READ_UNLOCK_IRQ is not set # CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set # CONFIG_INLINE_WRITE_TRYLOCK is not set # CONFIG_INLINE_WRITE_LOCK is not set # CONFIG_INLINE_WRITE_LOCK_BH is not set # CONFIG_INLINE_WRITE_LOCK_IRQ is not set # CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set -CONFIG_INLINE_WRITE_UNLOCK=y +# CONFIG_INLINE_WRITE_UNLOCK is not set # CONFIG_INLINE_WRITE_UNLOCK_BH is not set -CONFIG_INLINE_WRITE_UNLOCK_IRQ=y +# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set # CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_FREEZER=y @@ -304,8 +304,8 @@ CONFIG_NR_CPUS=8 CONFIG_SCHED_SMT=y CONFIG_SCHED_MC=y # CONFIG_PREEMPT_NONE is not set -CONFIG_PREEMPT_VOLUNTARY=y -# CONFIG_PREEMPT is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y # CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set @@ -550,7 +550,7 @@ CONFIG_INET_TCP_DIAG=y CONFIG_TCP_CONG_CUBIC=y CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=m +CONFIG_IPV6=y # CONFIG_IPV6_PRIVACY is not set # CONFIG_IPV6_ROUTER_PREF is not set # CONFIG_IPV6_OPTIMISTIC_DAD is not set @@ -1488,8 +1488,8 @@ CONFIG_MEDIA_SUPPORT=m # Multimedia core support # # CONFIG_VIDEO_DEV is not set -# CONFIG_DVB_CORE is not set -# CONFIG_VIDEO_MEDIA is not set +CONFIG_DVB_CORE=m +CONFIG_VIDEO_MEDIA=m # # Multimedia drivers @@ -1509,6 +1509,223 @@ CONFIG_IR_NUVOTON=m CONFIG_IR_MCEUSB=m CONFIG_IR_ENE=m CONFIG_IR_STREAMZAP=m +CONFIG_MEDIA_ATTACH=y +CONFIG_MEDIA_TUNER=m +CONFIG_MEDIA_TUNER_CUSTOMISE=y +# CONFIG_MEDIA_TUNER_SIMPLE is not set +# CONFIG_MEDIA_TUNER_TDA8290 is not set +# CONFIG_MEDIA_TUNER_TDA827X is not set +# CONFIG_MEDIA_TUNER_TDA18271 is not set +# CONFIG_MEDIA_TUNER_TDA9887 is not set +# CONFIG_MEDIA_TUNER_TEA5761 is not set +# CONFIG_MEDIA_TUNER_TEA5767 is not set +# CONFIG_MEDIA_TUNER_MT20XX is not set +# CONFIG_MEDIA_TUNER_MT2060 is not set +# CONFIG_MEDIA_TUNER_MT2266 is not set +# CONFIG_MEDIA_TUNER_MT2131 is not set +# CONFIG_MEDIA_TUNER_QT1010 is not set +# CONFIG_MEDIA_TUNER_XC2028 is not set +# CONFIG_MEDIA_TUNER_XC5000 is not set +# CONFIG_MEDIA_TUNER_MXL5005S is not set +# CONFIG_MEDIA_TUNER_MXL5007T is not set +# CONFIG_MEDIA_TUNER_MC44S803 is not set +# CONFIG_MEDIA_TUNER_MAX2165 is not set +CONFIG_DVB_MAX_ADAPTERS=8 +# CONFIG_DVB_DYNAMIC_MINORS is not set +CONFIG_DVB_CAPTURE_DRIVERS=y + +# +# Supported SAA7146 based PCI Adapters +# +# CONFIG_TTPCI_EEPROM is not set +# CONFIG_DVB_BUDGET_CORE is not set + +# +# Supported USB Adapters +# +CONFIG_DVB_USB=m +# CONFIG_DVB_USB_DEBUG is not set +# CONFIG_DVB_USB_A800 is not set +# CONFIG_DVB_USB_DIBUSB_MB is not set +# CONFIG_DVB_USB_DIBUSB_MC is not set +# CONFIG_DVB_USB_DIB0700 is not set +# CONFIG_DVB_USB_UMT_010 is not set +# CONFIG_DVB_USB_CXUSB is not set +# CONFIG_DVB_USB_M920X is not set +# CONFIG_DVB_USB_GL861 is not set +# CONFIG_DVB_USB_AU6610 is not set +# CONFIG_DVB_USB_DIGITV is not set +# CONFIG_DVB_USB_VP7045 is not set +# CONFIG_DVB_USB_VP702X is not set +# CONFIG_DVB_USB_GP8PSK is not set +# CONFIG_DVB_USB_NOVA_T_USB2 is not set +# CONFIG_DVB_USB_TTUSB2 is not set +# CONFIG_DVB_USB_DTT200U is not set +# CONFIG_DVB_USB_OPERA1 is not set +# CONFIG_DVB_USB_AF9005 is not set +# CONFIG_DVB_USB_DW2102 is not set +# CONFIG_DVB_USB_CINERGY_T2 is not set +CONFIG_DVB_USB_ANYSEE=m +# CONFIG_DVB_USB_DTV5100 is not set +# CONFIG_DVB_USB_AF9015 is not set +# CONFIG_DVB_USB_CE6230 is not set +# CONFIG_DVB_USB_FRIIO is not set +# CONFIG_DVB_USB_EC168 is not set +# CONFIG_DVB_USB_AZ6027 is not set +# CONFIG_DVB_TTUSB_BUDGET is not set +# CONFIG_DVB_TTUSB_DEC is not set +# CONFIG_SMS_SIANO_MDTV is not set + +# +# Supported FlexCopII (B2C2) Adapters +# +# CONFIG_DVB_B2C2_FLEXCOP is not set + +# +# Supported BT878 Adapters +# + +# +# Supported Pluto2 Adapters +# +# CONFIG_DVB_PLUTO2 is not set + +# +# Supported SDMC DM1105 Adapters +# +# CONFIG_DVB_DM1105 is not set +# CONFIG_DVB_FIREDTV is not set + +# +# Supported Earthsoft PT1 Adapters +# +# CONFIG_DVB_PT1 is not set + +# +# Supported Mantis Adapters +# +# CONFIG_MANTIS_CORE is not set + +# +# Supported nGene Adapters +# +# CONFIG_DVB_NGENE is not set + +# +# Supported DVB Frontends +# +CONFIG_DVB_FE_CUSTOMISE=y + +# +# Customise DVB Frontends +# + +# +# Multistandard (satellite) frontends +# +# CONFIG_DVB_STB0899 is not set +# CONFIG_DVB_STB6100 is not set +# CONFIG_DVB_STV090x is not set +# CONFIG_DVB_STV6110x is not set + +# +# DVB-S (satellite) frontends +# +# CONFIG_DVB_CX24110 is not set +# CONFIG_DVB_CX24123 is not set +# CONFIG_DVB_MT312 is not set +# CONFIG_DVB_ZL10036 is not set +# CONFIG_DVB_ZL10039 is not set +# CONFIG_DVB_S5H1420 is not set +# CONFIG_DVB_STV0288 is not set +# CONFIG_DVB_STB6000 is not set +# CONFIG_DVB_STV0299 is not set +# CONFIG_DVB_STV6110 is not set +# CONFIG_DVB_STV0900 is not set +# CONFIG_DVB_TDA8083 is not set +# CONFIG_DVB_TDA10086 is not set +# CONFIG_DVB_TDA8261 is not set +# CONFIG_DVB_VES1X93 is not set +# CONFIG_DVB_TUNER_ITD1000 is not set +# CONFIG_DVB_TUNER_CX24113 is not set +# CONFIG_DVB_TDA826X is not set +# CONFIG_DVB_TUA6100 is not set +# CONFIG_DVB_CX24116 is not set +# CONFIG_DVB_SI21XX is not set +# CONFIG_DVB_DS3000 is not set +# CONFIG_DVB_MB86A16 is not set + +# +# DVB-T (terrestrial) frontends +# +# CONFIG_DVB_SP8870 is not set +# CONFIG_DVB_SP887X is not set +# CONFIG_DVB_CX22700 is not set +# CONFIG_DVB_CX22702 is not set +# CONFIG_DVB_DRX397XD is not set +# CONFIG_DVB_L64781 is not set +# CONFIG_DVB_TDA1004X is not set +# CONFIG_DVB_NXT6000 is not set +CONFIG_DVB_MT352=m +CONFIG_DVB_ZL10353=m +# CONFIG_DVB_DIB3000MB is not set +# CONFIG_DVB_DIB3000MC is not set +# CONFIG_DVB_DIB7000M is not set +# CONFIG_DVB_DIB7000P is not set +# CONFIG_DVB_TDA10048 is not set +# CONFIG_DVB_AF9013 is not set +# CONFIG_DVB_EC100 is not set + +# +# DVB-C (cable) frontends +# +# CONFIG_DVB_VES1820 is not set +# CONFIG_DVB_TDA10021 is not set +CONFIG_DVB_TDA10023=m +# CONFIG_DVB_STV0297 is not set + +# +# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# +# CONFIG_DVB_NXT200X is not set +# CONFIG_DVB_OR51211 is not set +# CONFIG_DVB_OR51132 is not set +# CONFIG_DVB_BCM3510 is not set +# CONFIG_DVB_LGDT330X is not set +# CONFIG_DVB_LGDT3304 is not set +# CONFIG_DVB_LGDT3305 is not set +# CONFIG_DVB_S5H1409 is not set +# CONFIG_DVB_S5H1411 is not set + +# +# ISDB-T (terrestrial) frontends +# +# CONFIG_DVB_S921 is not set +# CONFIG_DVB_DIB8000 is not set + +# +# Digital terrestrial only tuners/PLL +# +CONFIG_DVB_PLL=m +# CONFIG_DVB_TUNER_DIB0070 is not set +# CONFIG_DVB_TUNER_DIB0090 is not set + +# +# SEC control devices for DVB-S +# +# CONFIG_DVB_LNBP21 is not set +# CONFIG_DVB_ISL6405 is not set +# CONFIG_DVB_ISL6421 is not set +# CONFIG_DVB_ISL6423 is not set +# CONFIG_DVB_LGS8GL5 is not set +# CONFIG_DVB_LGS8GXX is not set +# CONFIG_DVB_ATBM8830 is not set +# CONFIG_DVB_TDA665x is not set + +# +# Tools to develop new frontends +# +# CONFIG_DVB_DUMMY_FE is not set # CONFIG_DAB is not set # @@ -1558,6 +1775,7 @@ CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_SYS_IMAGEBLIT is not set # CONFIG_FB_FOREIGN_ENDIAN is not set # CONFIG_FB_SYS_FOPS is not set +CONFIG_FB_DEFERRED_IO=y # CONFIG_FB_SVGALIB is not set # CONFIG_FB_MACMODES is not set # CONFIG_FB_BACKLIGHT is not set @@ -1798,7 +2016,7 @@ CONFIG_HID_MICROSOFT=y # CONFIG_HID_SAMSUNG is not set CONFIG_HID_SONY=y # CONFIG_HID_STANTUM is not set -# CONFIG_HID_SUNPLUS is not set +CONFIG_HID_SUNPLUS=y # CONFIG_HID_GREENASIA is not set # CONFIG_HID_SMARTJOYPLUS is not set CONFIG_HID_TOPSEED=y @@ -2092,7 +2310,7 @@ CONFIG_RTL8192E=m # CONFIG_POHMELFS is not set # CONFIG_IDE_PHISON is not set # CONFIG_LINE6_USB is not set -# CONFIG_DRM_VMWGFX is not set +CONFIG_DRM_VMWGFX=y # CONFIG_DRM_NOUVEAU is not set # @@ -2158,7 +2376,7 @@ CONFIG_DNOTIFY=y CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set # CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m +CONFIG_AUTOFS4_FS=y CONFIG_FUSE_FS=m # CONFIG_CUSE is not set diff --git a/projects/generic/options b/projects/generic/options index 297f33128c..ab1118ddeb 100644 --- a/projects/generic/options +++ b/projects/generic/options @@ -1,6 +1,6 @@ # Welcome Message for e.g. SSH Server (up to 5 Lines) GREATING0="#######################################################" - GREATING1="# Welcome to OpenELEC - the powerfull Mediacenter4you #" + GREATING1="# Welcome to OpenELEC - the powerful Mediacenter4you #" GREATING2="# .......... visit http://www.openelec.tv ........... #" GREATING3="#######################################################" GREATING4="" @@ -50,10 +50,6 @@ # Project CFLAGS PROJECT_CFLAGS="-mmmx -msse -msse2 -mfpmath=sse" -# Timezone to use (empty disables timezone support) -# use a TZ environment string - TIMEZONE="" - # Mediacenter to use (xbmc / no) MEDIACENTER="xbmc-dharma" @@ -83,7 +79,11 @@ # FAAC is an MPEG-4 and MPEG-2 AAC encoder (yes / no) FAAC_SUPPORT="yes" +# build and install Tvheadend TV server (yes / no) + TVHEADEND="yes" + # additional drivers to install: +# bcm_sta: Broadcom STA WLAN Driver # rtl8192se: Realtek RTL8192SE WLAN driver # Space separated list is supported, # e.g. ADDITIONAL_DRIVERS="rtl8192se" @@ -101,9 +101,6 @@ # build and install Avahi (Zeroconf) daemon (yes / no) AVAHI_DAEMON="yes" -# build and install PulseAudio support (yes / no) - PULSEAUDIO_SUPPORT="no" - # build and install Samba Server (yes / no) SAMBA_SERVER="yes" @@ -127,18 +124,21 @@ # Displayserver to use (xorg-server / no) DISPLAYSERVER="xorg-server" -# Graphic drivers to use (all / i915,i965,r200,r300,r600,radeon,nvidia,nouveau) +# Graphic drivers to use (all / i915,i965,r200,r300,r600,radeon,nvidia,nouveau,vmware) # Space separated list is supported, # e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 radeon nvidia nouveau" - GRAPHIC_DRIVERS="i915 i965 r200 r300 r600 radeon nvidia" + GRAPHIC_DRIVERS="i915 i965 r200 r300 r600 radeon nvidia vmware" -# libdrm to use (libdrm / libdrm-master) - LIBDRM="libdrm" +# use libdrm-master (latest git) instead latest released version + LIBDRM_MASTER="no" -# Mesa to use (Mesa / mesa-master) - MESA="Mesa" +# use Mesa-master (latest git) instead latest released version + MESA_MASTER="no" -# Use VDPAU video acceleration (needs nVidia driver and a supported card) +# Use VDPAU video# use linux-next (latest rc) instead latest released version + LINUX_NEXT="no" + +# acceleration (needs nVidia driver and a supported card) VDPAU="yes" # Use VAAPI video acceleration (needs intel i965 driver and a supported card) @@ -151,12 +151,6 @@ # build and install remote support (yes / no) REMOTE_SUPPORT="yes" -# Remote to Use (pctv/logitech/hauppauge/realmagic/creative/leadtek/ -# leadtek-pvr2000/RM-S6/RX-V850/animax/askey/avermedia/packard_bell/atiusb/ -# atiusb2/LG/D-10/digimatrix/mceusb/streamzap/cinergy1400/nova-s-plus/twinhan/ -# tosh-vt76f/flytv-prime/Medion-X10/imonknob/ultrax/dvico/MCE-X10) - REMOTE="mceusb" - # build and install WiiMote support (yes / no) WIIMOTE_SUPPORT="yes" @@ -178,10 +172,10 @@ # "none" for disable LCD support LCD_DRIVER="irtrans" -# Firmware to use (iwl1000, iwl3945, iwl4965, iwl5000, iwl5150, iwl6000) +# Firmware to use (iwl1000, iwl3945, iwl4965, iwl5000, iwl5150, iwl6000, iwl6050) # Space separated list is supported, # e.g. FIRMWARE="iwl3945 iwl5000" - FIRMWARE="ipw2100 ipw2200 iwl1000 iwl3945 iwl4965 iwl5000 iwl5150 iwl6000" + FIRMWARE="ipw2100 ipw2200 iwl1000 iwl3945 iwl4965 iwl5000 iwl5150 iwl6000 iwl6050" # build with lm_sensors hardware monitoring support (yes / no) SENSOR_SUPPORT="yes" diff --git a/projects/intel/linux/linux.i386.conf b/projects/intel/linux/linux.i386.conf index 200b2aae2e..aefaac51e0 100644 --- a/projects/intel/linux/linux.i386.conf +++ b/projects/intel/linux/linux.i386.conf @@ -90,13 +90,14 @@ CONFIG_BSD_PROCESS_ACCT=y # RCU Subsystem # CONFIG_TREE_RCU=y +# CONFIG_TREE_PREEMPT_RCU is not set # CONFIG_RCU_TRACE is not set CONFIG_RCU_FANOUT=32 # CONFIG_RCU_FANOUT_EXACT is not set # CONFIG_TREE_RCU_TRACE is not set CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=18 +CONFIG_LOG_BUF_SHIFT=16 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y CONFIG_CGROUPS=y # CONFIG_CGROUP_DEBUG is not set @@ -152,9 +153,9 @@ CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set CONFIG_PCI_QUIRKS=y # CONFIG_COMPAT_BRK is not set -CONFIG_SLAB=y +# CONFIG_SLAB is not set # CONFIG_SLUB is not set -# CONFIG_SLOB is not set +CONFIG_SLOB=y # CONFIG_PROFILING is not set CONFIG_HAVE_OPROFILE=y # CONFIG_KPROBES is not set @@ -176,7 +177,6 @@ CONFIG_HAVE_PERF_EVENTS_NMI=y # GCOV-based kernel profiling # CONFIG_HAVE_GENERIC_DMA_COHERENT=y -CONFIG_SLABINFO=y CONFIG_RT_MUTEXES=y CONFIG_BASE_SMALL=0 CONFIG_MODULES=y @@ -206,27 +206,27 @@ CONFIG_DEFAULT_IOSCHED="cfq" # CONFIG_INLINE_SPIN_LOCK_BH is not set # CONFIG_INLINE_SPIN_LOCK_IRQ is not set # CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set -CONFIG_INLINE_SPIN_UNLOCK=y +# CONFIG_INLINE_SPIN_UNLOCK is not set # CONFIG_INLINE_SPIN_UNLOCK_BH is not set -CONFIG_INLINE_SPIN_UNLOCK_IRQ=y +# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set # CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set # CONFIG_INLINE_READ_TRYLOCK is not set # CONFIG_INLINE_READ_LOCK is not set # CONFIG_INLINE_READ_LOCK_BH is not set # CONFIG_INLINE_READ_LOCK_IRQ is not set # CONFIG_INLINE_READ_LOCK_IRQSAVE is not set -CONFIG_INLINE_READ_UNLOCK=y +# CONFIG_INLINE_READ_UNLOCK is not set # CONFIG_INLINE_READ_UNLOCK_BH is not set -CONFIG_INLINE_READ_UNLOCK_IRQ=y +# CONFIG_INLINE_READ_UNLOCK_IRQ is not set # CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set # CONFIG_INLINE_WRITE_TRYLOCK is not set # CONFIG_INLINE_WRITE_LOCK is not set # CONFIG_INLINE_WRITE_LOCK_BH is not set # CONFIG_INLINE_WRITE_LOCK_IRQ is not set # CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set -CONFIG_INLINE_WRITE_UNLOCK=y +# CONFIG_INLINE_WRITE_UNLOCK is not set # CONFIG_INLINE_WRITE_UNLOCK_BH is not set -CONFIG_INLINE_WRITE_UNLOCK_IRQ=y +# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set # CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_FREEZER=y @@ -304,8 +304,8 @@ CONFIG_NR_CPUS=8 CONFIG_SCHED_SMT=y CONFIG_SCHED_MC=y # CONFIG_PREEMPT_NONE is not set -CONFIG_PREEMPT_VOLUNTARY=y -# CONFIG_PREEMPT is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y # CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set @@ -549,7 +549,7 @@ CONFIG_INET_TCP_DIAG=y CONFIG_TCP_CONG_CUBIC=y CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=m +CONFIG_IPV6=y # CONFIG_IPV6_PRIVACY is not set # CONFIG_IPV6_ROUTER_PREF is not set # CONFIG_IPV6_OPTIMISTIC_DAD is not set @@ -1339,8 +1339,8 @@ CONFIG_MEDIA_SUPPORT=m # Multimedia core support # # CONFIG_VIDEO_DEV is not set -# CONFIG_DVB_CORE is not set -# CONFIG_VIDEO_MEDIA is not set +CONFIG_DVB_CORE=m +CONFIG_VIDEO_MEDIA=m # # Multimedia drivers @@ -1360,6 +1360,223 @@ CONFIG_IR_NUVOTON=m CONFIG_IR_MCEUSB=m CONFIG_IR_ENE=m CONFIG_IR_STREAMZAP=m +CONFIG_MEDIA_ATTACH=y +CONFIG_MEDIA_TUNER=m +CONFIG_MEDIA_TUNER_CUSTOMISE=y +# CONFIG_MEDIA_TUNER_SIMPLE is not set +# CONFIG_MEDIA_TUNER_TDA8290 is not set +# CONFIG_MEDIA_TUNER_TDA827X is not set +# CONFIG_MEDIA_TUNER_TDA18271 is not set +# CONFIG_MEDIA_TUNER_TDA9887 is not set +# CONFIG_MEDIA_TUNER_TEA5761 is not set +# CONFIG_MEDIA_TUNER_TEA5767 is not set +# CONFIG_MEDIA_TUNER_MT20XX is not set +# CONFIG_MEDIA_TUNER_MT2060 is not set +# CONFIG_MEDIA_TUNER_MT2266 is not set +# CONFIG_MEDIA_TUNER_MT2131 is not set +# CONFIG_MEDIA_TUNER_QT1010 is not set +# CONFIG_MEDIA_TUNER_XC2028 is not set +# CONFIG_MEDIA_TUNER_XC5000 is not set +# CONFIG_MEDIA_TUNER_MXL5005S is not set +# CONFIG_MEDIA_TUNER_MXL5007T is not set +# CONFIG_MEDIA_TUNER_MC44S803 is not set +# CONFIG_MEDIA_TUNER_MAX2165 is not set +CONFIG_DVB_MAX_ADAPTERS=8 +# CONFIG_DVB_DYNAMIC_MINORS is not set +CONFIG_DVB_CAPTURE_DRIVERS=y + +# +# Supported SAA7146 based PCI Adapters +# +# CONFIG_TTPCI_EEPROM is not set +# CONFIG_DVB_BUDGET_CORE is not set + +# +# Supported USB Adapters +# +CONFIG_DVB_USB=m +# CONFIG_DVB_USB_DEBUG is not set +# CONFIG_DVB_USB_A800 is not set +# CONFIG_DVB_USB_DIBUSB_MB is not set +# CONFIG_DVB_USB_DIBUSB_MC is not set +# CONFIG_DVB_USB_DIB0700 is not set +# CONFIG_DVB_USB_UMT_010 is not set +# CONFIG_DVB_USB_CXUSB is not set +# CONFIG_DVB_USB_M920X is not set +# CONFIG_DVB_USB_GL861 is not set +# CONFIG_DVB_USB_AU6610 is not set +# CONFIG_DVB_USB_DIGITV is not set +# CONFIG_DVB_USB_VP7045 is not set +# CONFIG_DVB_USB_VP702X is not set +# CONFIG_DVB_USB_GP8PSK is not set +# CONFIG_DVB_USB_NOVA_T_USB2 is not set +# CONFIG_DVB_USB_TTUSB2 is not set +# CONFIG_DVB_USB_DTT200U is not set +# CONFIG_DVB_USB_OPERA1 is not set +# CONFIG_DVB_USB_AF9005 is not set +# CONFIG_DVB_USB_DW2102 is not set +# CONFIG_DVB_USB_CINERGY_T2 is not set +CONFIG_DVB_USB_ANYSEE=m +# CONFIG_DVB_USB_DTV5100 is not set +# CONFIG_DVB_USB_AF9015 is not set +# CONFIG_DVB_USB_CE6230 is not set +# CONFIG_DVB_USB_FRIIO is not set +# CONFIG_DVB_USB_EC168 is not set +# CONFIG_DVB_USB_AZ6027 is not set +# CONFIG_DVB_TTUSB_BUDGET is not set +# CONFIG_DVB_TTUSB_DEC is not set +# CONFIG_SMS_SIANO_MDTV is not set + +# +# Supported FlexCopII (B2C2) Adapters +# +# CONFIG_DVB_B2C2_FLEXCOP is not set + +# +# Supported BT878 Adapters +# + +# +# Supported Pluto2 Adapters +# +# CONFIG_DVB_PLUTO2 is not set + +# +# Supported SDMC DM1105 Adapters +# +# CONFIG_DVB_DM1105 is not set +# CONFIG_DVB_FIREDTV is not set + +# +# Supported Earthsoft PT1 Adapters +# +# CONFIG_DVB_PT1 is not set + +# +# Supported Mantis Adapters +# +# CONFIG_MANTIS_CORE is not set + +# +# Supported nGene Adapters +# +# CONFIG_DVB_NGENE is not set + +# +# Supported DVB Frontends +# +CONFIG_DVB_FE_CUSTOMISE=y + +# +# Customise DVB Frontends +# + +# +# Multistandard (satellite) frontends +# +# CONFIG_DVB_STB0899 is not set +# CONFIG_DVB_STB6100 is not set +# CONFIG_DVB_STV090x is not set +# CONFIG_DVB_STV6110x is not set + +# +# DVB-S (satellite) frontends +# +# CONFIG_DVB_CX24110 is not set +# CONFIG_DVB_CX24123 is not set +# CONFIG_DVB_MT312 is not set +# CONFIG_DVB_ZL10036 is not set +# CONFIG_DVB_ZL10039 is not set +# CONFIG_DVB_S5H1420 is not set +# CONFIG_DVB_STV0288 is not set +# CONFIG_DVB_STB6000 is not set +# CONFIG_DVB_STV0299 is not set +# CONFIG_DVB_STV6110 is not set +# CONFIG_DVB_STV0900 is not set +# CONFIG_DVB_TDA8083 is not set +# CONFIG_DVB_TDA10086 is not set +# CONFIG_DVB_TDA8261 is not set +# CONFIG_DVB_VES1X93 is not set +# CONFIG_DVB_TUNER_ITD1000 is not set +# CONFIG_DVB_TUNER_CX24113 is not set +# CONFIG_DVB_TDA826X is not set +# CONFIG_DVB_TUA6100 is not set +# CONFIG_DVB_CX24116 is not set +# CONFIG_DVB_SI21XX is not set +# CONFIG_DVB_DS3000 is not set +# CONFIG_DVB_MB86A16 is not set + +# +# DVB-T (terrestrial) frontends +# +# CONFIG_DVB_SP8870 is not set +# CONFIG_DVB_SP887X is not set +# CONFIG_DVB_CX22700 is not set +# CONFIG_DVB_CX22702 is not set +# CONFIG_DVB_DRX397XD is not set +# CONFIG_DVB_L64781 is not set +# CONFIG_DVB_TDA1004X is not set +# CONFIG_DVB_NXT6000 is not set +CONFIG_DVB_MT352=m +CONFIG_DVB_ZL10353=m +# CONFIG_DVB_DIB3000MB is not set +# CONFIG_DVB_DIB3000MC is not set +# CONFIG_DVB_DIB7000M is not set +# CONFIG_DVB_DIB7000P is not set +# CONFIG_DVB_TDA10048 is not set +# CONFIG_DVB_AF9013 is not set +# CONFIG_DVB_EC100 is not set + +# +# DVB-C (cable) frontends +# +# CONFIG_DVB_VES1820 is not set +# CONFIG_DVB_TDA10021 is not set +CONFIG_DVB_TDA10023=m +# CONFIG_DVB_STV0297 is not set + +# +# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# +# CONFIG_DVB_NXT200X is not set +# CONFIG_DVB_OR51211 is not set +# CONFIG_DVB_OR51132 is not set +# CONFIG_DVB_BCM3510 is not set +# CONFIG_DVB_LGDT330X is not set +# CONFIG_DVB_LGDT3304 is not set +# CONFIG_DVB_LGDT3305 is not set +# CONFIG_DVB_S5H1409 is not set +# CONFIG_DVB_S5H1411 is not set + +# +# ISDB-T (terrestrial) frontends +# +# CONFIG_DVB_S921 is not set +# CONFIG_DVB_DIB8000 is not set + +# +# Digital terrestrial only tuners/PLL +# +CONFIG_DVB_PLL=m +# CONFIG_DVB_TUNER_DIB0070 is not set +# CONFIG_DVB_TUNER_DIB0090 is not set + +# +# SEC control devices for DVB-S +# +# CONFIG_DVB_LNBP21 is not set +# CONFIG_DVB_ISL6405 is not set +# CONFIG_DVB_ISL6421 is not set +# CONFIG_DVB_ISL6423 is not set +# CONFIG_DVB_LGS8GL5 is not set +# CONFIG_DVB_LGS8GXX is not set +# CONFIG_DVB_ATBM8830 is not set +# CONFIG_DVB_TDA665x is not set + +# +# Tools to develop new frontends +# +# CONFIG_DVB_DUMMY_FE is not set # CONFIG_DAB is not set # @@ -1643,7 +1860,7 @@ CONFIG_HID_MICROSOFT=y # CONFIG_HID_SAMSUNG is not set CONFIG_HID_SONY=y # CONFIG_HID_STANTUM is not set -# CONFIG_HID_SUNPLUS is not set +CONFIG_HID_SUNPLUS=y # CONFIG_HID_GREENASIA is not set # CONFIG_HID_SMARTJOYPLUS is not set CONFIG_HID_TOPSEED=y @@ -1993,7 +2210,7 @@ CONFIG_DNOTIFY=y CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set # CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m +CONFIG_AUTOFS4_FS=y CONFIG_FUSE_FS=m # CONFIG_CUSE is not set diff --git a/projects/intel/linux/linux.x86_64.conf b/projects/intel/linux/linux.x86_64.conf index e5f8cfc4c2..09599c1c03 100644 --- a/projects/intel/linux/linux.x86_64.conf +++ b/projects/intel/linux/linux.x86_64.conf @@ -90,13 +90,14 @@ CONFIG_BSD_PROCESS_ACCT=y # RCU Subsystem # CONFIG_TREE_RCU=y +# CONFIG_TREE_PREEMPT_RCU is not set # CONFIG_RCU_TRACE is not set CONFIG_RCU_FANOUT=32 # CONFIG_RCU_FANOUT_EXACT is not set # CONFIG_TREE_RCU_TRACE is not set CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y -CONFIG_LOG_BUF_SHIFT=18 +CONFIG_LOG_BUF_SHIFT=16 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y CONFIG_CGROUPS=y # CONFIG_CGROUP_DEBUG is not set @@ -151,9 +152,9 @@ CONFIG_PERF_EVENTS=y # CONFIG_VM_EVENT_COUNTERS is not set CONFIG_PCI_QUIRKS=y # CONFIG_COMPAT_BRK is not set -CONFIG_SLAB=y +# CONFIG_SLAB is not set # CONFIG_SLUB is not set -# CONFIG_SLOB is not set +CONFIG_SLOB=y # CONFIG_PROFILING is not set CONFIG_HAVE_OPROFILE=y # CONFIG_KPROBES is not set @@ -175,7 +176,6 @@ CONFIG_HAVE_PERF_EVENTS_NMI=y # GCOV-based kernel profiling # # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set -CONFIG_SLABINFO=y CONFIG_RT_MUTEXES=y CONFIG_BASE_SMALL=0 CONFIG_MODULES=y @@ -204,27 +204,27 @@ CONFIG_DEFAULT_IOSCHED="cfq" # CONFIG_INLINE_SPIN_LOCK_BH is not set # CONFIG_INLINE_SPIN_LOCK_IRQ is not set # CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set -CONFIG_INLINE_SPIN_UNLOCK=y +# CONFIG_INLINE_SPIN_UNLOCK is not set # CONFIG_INLINE_SPIN_UNLOCK_BH is not set -CONFIG_INLINE_SPIN_UNLOCK_IRQ=y +# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set # CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set # CONFIG_INLINE_READ_TRYLOCK is not set # CONFIG_INLINE_READ_LOCK is not set # CONFIG_INLINE_READ_LOCK_BH is not set # CONFIG_INLINE_READ_LOCK_IRQ is not set # CONFIG_INLINE_READ_LOCK_IRQSAVE is not set -CONFIG_INLINE_READ_UNLOCK=y +# CONFIG_INLINE_READ_UNLOCK is not set # CONFIG_INLINE_READ_UNLOCK_BH is not set -CONFIG_INLINE_READ_UNLOCK_IRQ=y +# CONFIG_INLINE_READ_UNLOCK_IRQ is not set # CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set # CONFIG_INLINE_WRITE_TRYLOCK is not set # CONFIG_INLINE_WRITE_LOCK is not set # CONFIG_INLINE_WRITE_LOCK_BH is not set # CONFIG_INLINE_WRITE_LOCK_IRQ is not set # CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set -CONFIG_INLINE_WRITE_UNLOCK=y +# CONFIG_INLINE_WRITE_UNLOCK is not set # CONFIG_INLINE_WRITE_UNLOCK_BH is not set -CONFIG_INLINE_WRITE_UNLOCK_IRQ=y +# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set # CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_FREEZER=y @@ -279,8 +279,8 @@ CONFIG_NR_CPUS=8 CONFIG_SCHED_SMT=y CONFIG_SCHED_MC=y # CONFIG_PREEMPT_NONE is not set -CONFIG_PREEMPT_VOLUNTARY=y -# CONFIG_PREEMPT is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y # CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set @@ -500,7 +500,7 @@ CONFIG_INET_TCP_DIAG=y CONFIG_TCP_CONG_CUBIC=y CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_TCP_MD5SIG is not set -CONFIG_IPV6=m +CONFIG_IPV6=y # CONFIG_IPV6_PRIVACY is not set # CONFIG_IPV6_ROUTER_PREF is not set # CONFIG_IPV6_OPTIMISTIC_DAD is not set @@ -1282,8 +1282,8 @@ CONFIG_MEDIA_SUPPORT=m # Multimedia core support # # CONFIG_VIDEO_DEV is not set -# CONFIG_DVB_CORE is not set -# CONFIG_VIDEO_MEDIA is not set +CONFIG_DVB_CORE=m +CONFIG_VIDEO_MEDIA=m # # Multimedia drivers @@ -1303,6 +1303,223 @@ CONFIG_IR_NUVOTON=m CONFIG_IR_MCEUSB=m CONFIG_IR_ENE=m CONFIG_IR_STREAMZAP=m +CONFIG_MEDIA_ATTACH=y +CONFIG_MEDIA_TUNER=m +CONFIG_MEDIA_TUNER_CUSTOMISE=y +# CONFIG_MEDIA_TUNER_SIMPLE is not set +# CONFIG_MEDIA_TUNER_TDA8290 is not set +# CONFIG_MEDIA_TUNER_TDA827X is not set +# CONFIG_MEDIA_TUNER_TDA18271 is not set +# CONFIG_MEDIA_TUNER_TDA9887 is not set +# CONFIG_MEDIA_TUNER_TEA5761 is not set +# CONFIG_MEDIA_TUNER_TEA5767 is not set +# CONFIG_MEDIA_TUNER_MT20XX is not set +# CONFIG_MEDIA_TUNER_MT2060 is not set +# CONFIG_MEDIA_TUNER_MT2266 is not set +# CONFIG_MEDIA_TUNER_MT2131 is not set +# CONFIG_MEDIA_TUNER_QT1010 is not set +# CONFIG_MEDIA_TUNER_XC2028 is not set +# CONFIG_MEDIA_TUNER_XC5000 is not set +# CONFIG_MEDIA_TUNER_MXL5005S is not set +# CONFIG_MEDIA_TUNER_MXL5007T is not set +# CONFIG_MEDIA_TUNER_MC44S803 is not set +# CONFIG_MEDIA_TUNER_MAX2165 is not set +CONFIG_DVB_MAX_ADAPTERS=8 +# CONFIG_DVB_DYNAMIC_MINORS is not set +CONFIG_DVB_CAPTURE_DRIVERS=y + +# +# Supported SAA7146 based PCI Adapters +# +# CONFIG_TTPCI_EEPROM is not set +# CONFIG_DVB_BUDGET_CORE is not set + +# +# Supported USB Adapters +# +CONFIG_DVB_USB=m +# CONFIG_DVB_USB_DEBUG is not set +# CONFIG_DVB_USB_A800 is not set +# CONFIG_DVB_USB_DIBUSB_MB is not set +# CONFIG_DVB_USB_DIBUSB_MC is not set +# CONFIG_DVB_USB_DIB0700 is not set +# CONFIG_DVB_USB_UMT_010 is not set +# CONFIG_DVB_USB_CXUSB is not set +# CONFIG_DVB_USB_M920X is not set +# CONFIG_DVB_USB_GL861 is not set +# CONFIG_DVB_USB_AU6610 is not set +# CONFIG_DVB_USB_DIGITV is not set +# CONFIG_DVB_USB_VP7045 is not set +# CONFIG_DVB_USB_VP702X is not set +# CONFIG_DVB_USB_GP8PSK is not set +# CONFIG_DVB_USB_NOVA_T_USB2 is not set +# CONFIG_DVB_USB_TTUSB2 is not set +# CONFIG_DVB_USB_DTT200U is not set +# CONFIG_DVB_USB_OPERA1 is not set +# CONFIG_DVB_USB_AF9005 is not set +# CONFIG_DVB_USB_DW2102 is not set +# CONFIG_DVB_USB_CINERGY_T2 is not set +CONFIG_DVB_USB_ANYSEE=m +# CONFIG_DVB_USB_DTV5100 is not set +# CONFIG_DVB_USB_AF9015 is not set +# CONFIG_DVB_USB_CE6230 is not set +# CONFIG_DVB_USB_FRIIO is not set +# CONFIG_DVB_USB_EC168 is not set +# CONFIG_DVB_USB_AZ6027 is not set +# CONFIG_DVB_TTUSB_BUDGET is not set +# CONFIG_DVB_TTUSB_DEC is not set +# CONFIG_SMS_SIANO_MDTV is not set + +# +# Supported FlexCopII (B2C2) Adapters +# +# CONFIG_DVB_B2C2_FLEXCOP is not set + +# +# Supported BT878 Adapters +# + +# +# Supported Pluto2 Adapters +# +# CONFIG_DVB_PLUTO2 is not set + +# +# Supported SDMC DM1105 Adapters +# +# CONFIG_DVB_DM1105 is not set +# CONFIG_DVB_FIREDTV is not set + +# +# Supported Earthsoft PT1 Adapters +# +# CONFIG_DVB_PT1 is not set + +# +# Supported Mantis Adapters +# +# CONFIG_MANTIS_CORE is not set + +# +# Supported nGene Adapters +# +# CONFIG_DVB_NGENE is not set + +# +# Supported DVB Frontends +# +CONFIG_DVB_FE_CUSTOMISE=y + +# +# Customise DVB Frontends +# + +# +# Multistandard (satellite) frontends +# +# CONFIG_DVB_STB0899 is not set +# CONFIG_DVB_STB6100 is not set +# CONFIG_DVB_STV090x is not set +# CONFIG_DVB_STV6110x is not set + +# +# DVB-S (satellite) frontends +# +# CONFIG_DVB_CX24110 is not set +# CONFIG_DVB_CX24123 is not set +# CONFIG_DVB_MT312 is not set +# CONFIG_DVB_ZL10036 is not set +# CONFIG_DVB_ZL10039 is not set +# CONFIG_DVB_S5H1420 is not set +# CONFIG_DVB_STV0288 is not set +# CONFIG_DVB_STB6000 is not set +# CONFIG_DVB_STV0299 is not set +# CONFIG_DVB_STV6110 is not set +# CONFIG_DVB_STV0900 is not set +# CONFIG_DVB_TDA8083 is not set +# CONFIG_DVB_TDA10086 is not set +# CONFIG_DVB_TDA8261 is not set +# CONFIG_DVB_VES1X93 is not set +# CONFIG_DVB_TUNER_ITD1000 is not set +# CONFIG_DVB_TUNER_CX24113 is not set +# CONFIG_DVB_TDA826X is not set +# CONFIG_DVB_TUA6100 is not set +# CONFIG_DVB_CX24116 is not set +# CONFIG_DVB_SI21XX is not set +# CONFIG_DVB_DS3000 is not set +# CONFIG_DVB_MB86A16 is not set + +# +# DVB-T (terrestrial) frontends +# +# CONFIG_DVB_SP8870 is not set +# CONFIG_DVB_SP887X is not set +# CONFIG_DVB_CX22700 is not set +# CONFIG_DVB_CX22702 is not set +# CONFIG_DVB_DRX397XD is not set +# CONFIG_DVB_L64781 is not set +# CONFIG_DVB_TDA1004X is not set +# CONFIG_DVB_NXT6000 is not set +CONFIG_DVB_MT352=m +CONFIG_DVB_ZL10353=m +# CONFIG_DVB_DIB3000MB is not set +# CONFIG_DVB_DIB3000MC is not set +# CONFIG_DVB_DIB7000M is not set +# CONFIG_DVB_DIB7000P is not set +# CONFIG_DVB_TDA10048 is not set +# CONFIG_DVB_AF9013 is not set +# CONFIG_DVB_EC100 is not set + +# +# DVB-C (cable) frontends +# +# CONFIG_DVB_VES1820 is not set +# CONFIG_DVB_TDA10021 is not set +CONFIG_DVB_TDA10023=m +# CONFIG_DVB_STV0297 is not set + +# +# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# +# CONFIG_DVB_NXT200X is not set +# CONFIG_DVB_OR51211 is not set +# CONFIG_DVB_OR51132 is not set +# CONFIG_DVB_BCM3510 is not set +# CONFIG_DVB_LGDT330X is not set +# CONFIG_DVB_LGDT3304 is not set +# CONFIG_DVB_LGDT3305 is not set +# CONFIG_DVB_S5H1409 is not set +# CONFIG_DVB_S5H1411 is not set + +# +# ISDB-T (terrestrial) frontends +# +# CONFIG_DVB_S921 is not set +# CONFIG_DVB_DIB8000 is not set + +# +# Digital terrestrial only tuners/PLL +# +CONFIG_DVB_PLL=m +# CONFIG_DVB_TUNER_DIB0070 is not set +# CONFIG_DVB_TUNER_DIB0090 is not set + +# +# SEC control devices for DVB-S +# +# CONFIG_DVB_LNBP21 is not set +# CONFIG_DVB_ISL6405 is not set +# CONFIG_DVB_ISL6421 is not set +# CONFIG_DVB_ISL6423 is not set +# CONFIG_DVB_LGS8GL5 is not set +# CONFIG_DVB_LGS8GXX is not set +# CONFIG_DVB_ATBM8830 is not set +# CONFIG_DVB_TDA665x is not set + +# +# Tools to develop new frontends +# +# CONFIG_DVB_DUMMY_FE is not set # CONFIG_DAB is not set # @@ -1578,7 +1795,7 @@ CONFIG_HID_MICROSOFT=y # CONFIG_HID_SAMSUNG is not set CONFIG_HID_SONY=y # CONFIG_HID_STANTUM is not set -# CONFIG_HID_SUNPLUS is not set +CONFIG_HID_SUNPLUS=y # CONFIG_HID_GREENASIA is not set # CONFIG_HID_SMARTJOYPLUS is not set CONFIG_HID_TOPSEED=y @@ -1928,7 +2145,7 @@ CONFIG_DNOTIFY=y CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set # CONFIG_AUTOFS_FS is not set -CONFIG_AUTOFS4_FS=m +CONFIG_AUTOFS4_FS=y CONFIG_FUSE_FS=m # CONFIG_CUSE is not set diff --git a/projects/intel/options b/projects/intel/options index 9d1c4d1433..2a260d052c 100644 --- a/projects/intel/options +++ b/projects/intel/options @@ -1,6 +1,6 @@ # Welcome Message for e.g. SSH Server (up to 5 Lines) GREATING0="#######################################################" - GREATING1="# Welcome to OpenELEC - the powerfull Mediacenter4you #" + GREATING1="# Welcome to OpenELEC - the powerful Mediacenter4you #" GREATING2="# .......... visit http://www.openelec.tv ........... #" GREATING3="#######################################################" GREATING4="" @@ -50,10 +50,6 @@ # Project CFLAGS PROJECT_CFLAGS="" -# Timezone to use (empty disables timezone support) -# use a TZ environment string - TIMEZONE="" - # Mediacenter to use (xbmc / no) MEDIACENTER="xbmc-dharma" @@ -83,7 +79,11 @@ # FAAC is an MPEG-4 and MPEG-2 AAC encoder (yes / no) FAAC_SUPPORT="yes" +# build and install Tvheadend TV server (yes / no) + TVHEADEND="yes" + # additional drivers to install: +# bcm_sta: Broadcom STA WLAN Driver # rtl8192se: Realtek RTL8192SE WLAN driver # Space separated list is supported, # e.g. ADDITIONAL_DRIVERS="rtl8192se" @@ -101,9 +101,6 @@ # build and install Avahi (Zeroconf) daemon (yes / no) AVAHI_DAEMON="yes" -# build and install PulseAudio support (yes / no) - PULSEAUDIO_SUPPORT="no" - # build and install Samba Server (yes / no) SAMBA_SERVER="yes" @@ -127,16 +124,19 @@ # Displayserver to use (xorg-server / no) DISPLAYSERVER="xorg-server" -# Graphic drivers to use (all / i915,i965,r200,r300,r600,radeon,nvidia,nouveau) +# Graphic drivers to use (all / i915,i965,r200,r300,r600,radeon,nvidia,nouveau,vmware) # Space separated list is supported, -# e.g. GRAPHIC_DRIVERS="i915 i965 radeon nvidia nouveau" +# e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 radeon nvidia nouveau" GRAPHIC_DRIVERS="i965" -# libdrm to use (libdrm / libdrm-master) - LIBDRM="libdrm" +# use libdrm-master (latest git) instead latest released version + LIBDRM_MASTER="no" -# Mesa to use (Mesa / mesa-master) - MESA="Mesa" +# use Mesa-master (latest git) instead latest released version + MESA_MASTER="no" + +# use linux-next (latest rc) instead latest released version + LINUX_NEXT="no" # Use VDPAU video acceleration (needs nVidia driver and a supported card) VDPAU="no" @@ -151,12 +151,6 @@ # build and install remote support (yes / no) REMOTE_SUPPORT="yes" -# Remote to Use (pctv/logitech/hauppauge/realmagic/creative/leadtek/ -# leadtek-pvr2000/RM-S6/RX-V850/animax/askey/avermedia/packard_bell/atiusb/ -# atiusb2/LG/D-10/digimatrix/mceusb/streamzap/cinergy1400/nova-s-plus/twinhan/ -# tosh-vt76f/flytv-prime/Medion-X10/imonknob/ultrax/dvico/MCE-X10) - REMOTE="mceusb" - # build and install WiiMote support (yes / no) WIIMOTE_SUPPORT="yes" @@ -178,7 +172,7 @@ # "none" for disable LCD support LCD_DRIVER="irtrans" -# Firmware to use (iwl1000, iwl3945, iwl4965, iwl5000, iwl5150, iwl6000) +# Firmware to use (iwl1000, iwl3945, iwl4965, iwl5000, iwl5150, iwl6000, iwl6050) # Space separated list is supported, # e.g. FIRMWARE="iwl3945 iwl5000" FIRMWARE="iwl5000" diff --git a/scripts/autoreconf b/scripts/autoreconf new file mode 100755 index 0000000000..674164a079 --- /dev/null +++ b/scripts/autoreconf @@ -0,0 +1,13 @@ +#!/bin/sh + +. config/options $1 + +[ ! -f "$PKG_BUILD/configure.in" -a ! -f "$PKG_BUILD/configure.ac" ] && echo "configure.in or configure.ac not found" && exit 1 +#[ ! -f "$PKG_BUILD/Makefile.am" -a ! -f "$PKG_BUILD/Makefile.in" ] && echo "Makefile.am or Makefile.in not found" && exit 1 + +printf "%${INDENT}c AUTORECONF $1\n" >&$SILENT_OUT +export INDENT=$((${INDENT:-1}+$INDENT_SIZE)) + +do_autoreconf $PKG_BUILD + +exit 0 diff --git a/scripts/build b/scripts/build index a404346037..4e8bd6fc36 100755 --- a/scripts/build +++ b/scripts/build @@ -7,14 +7,9 @@ if [ -z "$1" ]; then exit 1 fi -if [ -f $PKG_DIR/arch ]; then - grep -q "$TARGET_ARCH" "$PKG_DIR/arch" || exit 0 - grep -q "\-$TARGET_ARCH" "$PKG_DIR/arch" && exit 0 -fi - -if [ -f $PKG_DIR/platform ]; then - grep -q "$TARGET_PLATFORM" "$PKG_DIR/platform" || exit 0 - grep -q "\-$TARGET_PLATFORM" "$PKG_DIR/platform" && exit 0 +if [ -n "$PKG_ARCH" -a ! "$PKG_ARCH" = "any" ]; then + echo "$PKG_ARCH" | grep -q "$TARGET_ARCH" || exit 0 + echo "$PKG_ARCH" | grep -q "\-$TARGET_ARCH" && exit 0 fi unset INSTALL @@ -23,9 +18,11 @@ mkdir -p $STAMPS/$1 STAMP=$STAMPS/$1/build $SCRIPTS/unpack $1 + if [ -f $STAMP -a -f $PKG_DIR/need_build ]; then $PKG_DIR/need_build $@ fi + if [ -f $STAMP -a $PKG_DIR/build -nt $STAMP ]; then rm -f $STAMP fi @@ -40,6 +37,10 @@ if [ ! -f $STAMP ]; then $SCRIPTS/build $p done + [ -d $BUILD/${PKG_NAME}[-_.]${PKG_VERSION} ] && PKG_BUILD=`ls -d $BUILD/${PKG_NAME}[-_.]${PKG_VERSION}` + [ -d $BUILD/${PKG_NAME}${PKG_VERSION} ] && PKG_BUILD=`ls -d $BUILD/${PKG_NAME}${PKG_VERSION}` + [ "$PKG_AUTORECONF" = yes ] && $SCRIPTS/autoreconf $1 + if [ -f $PKG_DIR/build ]; then $PKG_DIR/build $@ >&$VERBOSE_OUT if [ "$DEBUG" = no ]; then @@ -62,7 +63,6 @@ if [ ! -f $STAMP ]; then make -C $PKG_BUILD $1 >&$VERBOSE_OUT fi - . $PROJECT_DIR/$PROJECT/options for i in `sed -n "s/^\([^#].*\)=\".*$/\1/p" $PROJECT_DIR/$PROJECT/options | grep -v "#"`; do eval val=\$$i echo "STAMP_$i=\"$val\"" >> $STAMP diff --git a/scripts/configtools/README b/scripts/configtools/README new file mode 100644 index 0000000000..6ab86fe60d --- /dev/null +++ b/scripts/configtools/README @@ -0,0 +1,2 @@ +URL: http://git.savannah.gnu.org/cgit/config.git + diff --git a/scripts/configtools/config.guess b/scripts/configtools/config.guess new file mode 100755 index 0000000000..4c8f032e78 --- /dev/null +++ b/scripts/configtools/config.guess @@ -0,0 +1,1508 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +# Free Software Foundation, Inc. + +timestamp='2010-09-24' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a ChangeLog +# entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free +Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' HUP INT TERM + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) + echo crisv32-axis-linux-gnu + exit ;; + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-gnu + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-tilera-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/scripts/configtools/config.sub b/scripts/configtools/config.sub new file mode 100755 index 0000000000..320e303881 --- /dev/null +++ b/scripts/configtools/config.sub @@ -0,0 +1,1739 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +# Free Software Foundation, Inc. + +timestamp='2010-09-11' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +# Please send patches to . Submit a context +# diff and a properly formatted GNU ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free +Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | picochip) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile-* | tilegx-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze) + basic_machine=microblaze-xilinx + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + # This must be matched before tile*. + tilegx*) + basic_machine=tilegx-unknown + os=-linux-gnu + ;; + tile*) + basic_machine=tile-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/scripts/create_addon b/scripts/create_addon index e03f1aecde..9a1c5e2a83 100755 --- a/scripts/create_addon +++ b/scripts/create_addon @@ -7,14 +7,9 @@ if [ -z "$1" ]; then exit 1 fi -if [ -f $PKG_DIR/arch ]; then - grep -q "$TARGET_ARCH" "$PKG_DIR/arch" || exit 0 - grep -q "\-$TARGET_ARCH" "$PKG_DIR/arch" && exit 0 -fi - -if [ -f $PKG_DIR/platform ]; then - grep -q "$TARGET_PLATFORM" "$PKG_DIR/platform" || exit 0 - grep -q "\-$TARGET_PLATFORM" "$PKG_DIR/platform" && exit 0 +if [ -n $PKG_ARCH -a ! "$PKG_ARCH" = "any" ]; then + echo "$PKG_ARCH" | grep -q "$TARGET_ARCH" || exit 0 + echo "$PKG_ARCH" | grep -q "\-$TARGET_ARCH" && exit 0 fi $SCRIPTS/build $@ diff --git a/scripts/extract b/scripts/extract index ffc2a0355c..cad9cf5ad1 100755 --- a/scripts/extract +++ b/scripts/extract @@ -7,25 +7,21 @@ if [ -z "$3" ]; then exit 1 fi -[ ! -f $PACKAGE_URL -a -z "$PKG_URL" ] && exit 1 +[ -z "$PKG_URL" ] && exit 1 [ ! -d "$SOURCES/$1" -o ! -d "$3" ] && exit 1 -[ -f $PACKAGE_URL ] && \ - FILES=`sed 's%.*/\(.*\)\$%\1%' $PACKAGE_URL` +for i in $PKG_URL; do + FILE="`basename $i`" -[ -n "$PKG_URL" ] && \ - FILES="$FILES `echo $PKG_URL | sed 's%.*/\(.*\)\$%\1%'`" - -for s in $FILES; do - case $s in + case $FILE in $2) - f="$SOURCES/$1/$s" + f="$SOURCES/$1/$FILE" if [ ! -f $f ]; then - echo "error: File $s doesn't exists in package $1 sources directory" + echo "error: File $FILE doesn't exists in package $1 sources directory" echo "have you called scripts/extract before scripts/get ?" exit 1 fi - case $s in + case $FILE in *.tar) tar xf $f -C $3 ;; diff --git a/scripts/fixconfigtools b/scripts/fixconfigtools index 3613d8f602..26f1015e87 100755 --- a/scripts/fixconfigtools +++ b/scripts/fixconfigtools @@ -1,17 +1,12 @@ #!/bin/sh -. config/options - -# Avoid infinite loop -[ "$*" = "$BUILD/configtools" ] && exit 0 - -$SCRIPTS/build configtools +. config/options $1 for i in $@; do - [ -f "$i/config.guess" ] && cp -f $BUILD/configtools/config.guess $i - [ -f "$i/config.sub" ] && cp -f $BUILD/configtools/config.sub $i - [ -f "$i/configure.guess" ] && cp -f $BUILD/configtools/config.guess $i/configure.guess - [ -f "$i/configure.sub" ] && cp -f $BUILD/configtools/config.sub $i/configure.sub + [ -f "$i/config.guess" ] && cp -f $SCRIPTS/configtools/config.guess $i + [ -f "$i/config.sub" ] && cp -f $SCRIPTS/configtools/config.sub $i + [ -f "$i/configure.guess" ] && cp -f $SCRIPTS/configtools/config.guess $i/configure.guess + [ -f "$i/configure.sub" ] && cp -f $SCRIPTS/configtools/config.sub $i/configure.sub done exit 0 diff --git a/scripts/get b/scripts/get index f9cc3f6cb5..7b86b16670 100755 --- a/scripts/get +++ b/scripts/get @@ -2,59 +2,54 @@ . config/options $1 -mkdir -p $STAMPS_NOARCH/$1 -STAMP=$STAMPS_NOARCH/$1/get - -if [ -f $PACKAGE_URL ]; then - if [ -f $STAMP ]; then - [ ! $STAMP -ot $PACKAGE_URL ] && exit 0 - fi - DL="yes" +if [ -z $1 ]; then + for i in `find packages/ -type f -name meta`; do + GET_PKG=`grep ^PKG_NAME= $i | sed -e "s,\",,g" -e "s,PKG_NAME=,,"` + $SCRIPTS/get $GET_PKG + done fi +[ -z "$PKG_URL" ] && exit 0 + if [ -n "$PKG_URL" ]; then - if [ -f $STAMP ]; then - [ ! $STAMP -ot $PKG_DIR/meta ] && exit 0 - fi - DL="yes" -fi - -if [ "$DL" = yes ]; then - $SCRIPTS/checkdeps get - - rm -f $STAMP - - printf "%${INDENT}c GET $1\n" >&$SILENT_OUT - export INDENT=$((${INDENT:-1}+$INDENT_SIZE)) - - [ "$VERBOSE" != yes ] && WGET_OPT=-q - - mkdir -p $SOURCES/$1 - - [ -f $PACKAGE_URL ] && \ - URLS=`sed s%GEEXBOX_SRCS%$GEEXBOX_SRCS% $PACKAGE_URL` - - [ -n "$PKG_URL" ] && \ - URLS="$URLS `echo $PKG_URL | sed s%GEEXBOX_SRCS%$GEEXBOX_SRCS%`" + URLS="$URLS `echo $PKG_URL | sed s%GEEXBOX_SRCS%$GEEXBOX_SRCS%`" for i in $URLS; do + PACKAGE="$SOURCES/$1/`basename $i`" + STAMP="$PACKAGE.url" + MD5SUM="$PACKAGE.md5" + + mkdir -p $SOURCES/$1 + + if [ -f $STAMP ]; then + [ `cat $STAMP` = "$i" ] && continue + fi + DL="yes" + + $SCRIPTS/checkdeps get + + rm -f $STAMP + + printf "%${INDENT}c GET $1\n" >&$SILENT_OUT + export INDENT=$((${INDENT:-1}+$INDENT_SIZE)) + + [ "$VERBOSE" != yes ] && WGET_OPT=-q + NBWGET=1 - until [ -f $STAMPS_NOARCH/$1/`basename $i`.ok ] || wget --passive-ftp -c $WGET_OPT -P $SOURCES/$1 $i; do + until [ -f $STAMP ] || wget --passive-ftp -c $WGET_OPT -P $SOURCES/$1 $i; do NBWGET=$(($NBWGET+1)) if [ $NBWGET -gt 10 ]; then echo -e "\nCant't get $1 sources : $i\n Try later !!" exit 1 fi done - touch $STAMPS_NOARCH/$1/`basename $i`.ok + + echo $i > $STAMP + md5sum -t $PACKAGE > $MD5SUM + + rm -f $BUILD_BASE*/$STAMPS_NOARCH/$1/unpack + rm -f $BUILD_BASE*/$STAMPS_NOARCH/$1/build + done - - [ -f $PACKAGE_URL ] && \ - cp -p $PACKAGE_URL $STAMP - - [ -n "$PKG_URL" ] && \ - cp -p $PKG_DIR/meta $STAMP - - rm -f $BUILD_BASE*/$STAMPS_NOARCH/$1/unpack - rm -f $BUILD_BASE*/$STAMPS_NOARCH/$1/build fi + diff --git a/scripts/image b/scripts/image new file mode 100755 index 0000000000..ac242fb063 --- /dev/null +++ b/scripts/image @@ -0,0 +1,113 @@ +#!/bin/sh + +. config/options $1 + +$SCRIPTS/checkdeps build +$SCRIPTS/build toolchain + +export INSTALL=$BUILD/image/system + +get_version + +rm -rf $INSTALL +rm -rf $STAMPS_INSTALL + +mkdir -p $INSTALL + +# setup fakeroot + echo "chown -R 0:0 $INSTALL" >> $FAKEROOT_SCRIPT + +# create baselayout + mkdir -p $INSTALL/bin + mkdir -p $INSTALL/etc + mkdir -p $INSTALL/lib + mkdir -p $INSTALL/sbin + mkdir -p $INSTALL/dev + mkdir -p $INSTALL/proc + mkdir -p $INSTALL/sys + mkdir -p $INSTALL/usr + mkdir -p $INSTALL/var + mkdir -p $INSTALL/flash + mkdir -p $INSTALL/storage + + ln -sf /var $INSTALL/usr/var + ln -sf /var/tmp $INSTALL/tmp + ln -sf /var/media $INSTALL/media + + if [ $TARGET_ARCH = x86_64 -o $TARGET_ARCH = powerpc64 ]; then + ln -s /lib $INSTALL/lib64 + ln -s lib $INSTALL/usr/lib64 + fi + + echo "OpenELEC" > $INSTALL/etc/distribution + echo "$PROJECT.$TARGET_ARCH" > $INSTALL/etc/arch + echo "$OPENELEC_VERSION" > $INSTALL/etc/version + echo "OpenELEC.tv - Date of build: $BUILD_DATE Build: $GIT_BUILD" > $INSTALL/etc/openelec-release + echo "$TARGET_VERSION" > $INSTALL/etc/release + +# copy project related files to filesystem + if [ -d $PROJECT_DIR/$PROJECT/filesystem ]; then + cp -PR $PROJECT_DIR/$PROJECT/filesystem/* $INSTALL + fi + +# Basissystem... + $SCRIPTS/install eglibc + $SCRIPTS/install gcc-final + $SCRIPTS/install linux system + $SCRIPTS/install busybox + $SCRIPTS/install acpid + $SCRIPTS/install util-linux-ng + +# Network support + [ "$NETWORK" = yes ] && $SCRIPTS/install network + +# Transmission BitTorrent support + [ "$TRANSMISSION" = yes ] && $SCRIPTS/install transmission + +# Graphic support + [ ! "$DISPLAYSERVER" = no ] && $SCRIPTS/install $DISPLAYSERVER + +# Multimedia support + [ ! "$MEDIACENTER" = no ] && $SCRIPTS/install mediacenter + [ "$TVHEADEND" = yes ] && $SCRIPTS/install tvheadend + +# Automounter support + [ "$UDISKS" = yes ] && $SCRIPTS/install udisks + +# Powermanagement support + [ "$UPOWER" = yes ] && $SCRIPTS/install upower + [ "$UPOWER" = yes ] && $SCRIPTS/install ConsoleKit + +# NTFS 3G support + [ "$NTFS3G" = yes ] && $SCRIPTS/install ntfs-3g + +# Remote support + [ "$REMOTE_SUPPORT" = yes ] && $SCRIPTS/install remote + +# LCD support + [ ! "$LCD_DRIVER" = none ] && $SCRIPTS/install lcdproc + +# Sensors support + [ "$SENSOR_SUPPORT" = yes ] && $SCRIPTS/install lm_sensors + +# Update support + [ "$UPDATE_SUPPORT" = yes ] && $SCRIPTS/install autoupdate + +# Update support + [ "$INSTALLER_SUPPORT" = yes ] && $SCRIPTS/install installer + +# Games and Emulators support (SDK's) + [ "$GAMES" = yes ] && $SCRIPTS/install games-sdk + [ "$EMULATORS" = yes ] && $SCRIPTS/install emulators-sdk + +# Devtools... (not for Release) + [ "$TESTING" = yes ] && $SCRIPTS/install testing + [ "$DEVTOOLS" = yes ] && $SCRIPTS/install debug + +# OEM packages + [ "$OEM_SUPPORT" = yes ] && $SCRIPTS/install oem + +# strip kernel modules + for MOD in `find $INSTALL/lib/modules/ -name *.ko`; do + $STRIP --strip-debug $MOD + done diff --git a/scripts/image_release b/scripts/image_release new file mode 100755 index 0000000000..24e5697e62 --- /dev/null +++ b/scripts/image_release @@ -0,0 +1,45 @@ +#!/bin/sh + +. config/options $1 + +$SCRIPTS/image_squashfs + +get_version + +RELEASE_DIR="target/OpenELEC-$TARGET_VERSION" + +# cleanup + rm -rf $RELEASE_DIR + +# create release dir + mkdir -p $RELEASE_DIR + cp $ROOT/README $RELEASE_DIR + cp $ROOT/CHANGELOG $RELEASE_DIR + # cp -R $CONFIG/image/* $RELEASE_DIR + cp -R $CONFIG/release/* $RELEASE_DIR + echo "$TARGET_VERSION" > $RELEASE_DIR/RELEASE + + mkdir -p $RELEASE_DIR/licenses + cp $ROOT/licenses/* $RELEASE_DIR/licenses + + mkdir -p $RELEASE_DIR/target + cp $TARGET_IMG/OpenELEC-$TARGET_VERSION.system $RELEASE_DIR/target/SYSTEM + cp $TARGET_IMG/OpenELEC-$TARGET_VERSION.kernel $RELEASE_DIR/target/KERNEL + +# create md5sum's + pushd $RELEASE_DIR > /dev/null 2>&1 + md5sum -t target/SYSTEM > target/SYSTEM.md5 + md5sum -t target/KERNEL > target/KERNEL.md5 + popd 2>/dev/null > /dev/null 2>&1 + +# create target directory + mkdir -p $TARGET_IMG + +# remove an previous created release tarball + rm -rf $TARGET_IMG/OpenELEC-$TARGET_VERSION.tar.bz2 + +# create release tarball + tar cjf $TARGET_IMG/OpenELEC-$TARGET_VERSION.tar.bz2 -C target OpenELEC-$TARGET_VERSION + +# cleanup release dir + rm -rf $RELEASE_DIR diff --git a/scripts/image_squashfs b/scripts/image_squashfs new file mode 100755 index 0000000000..0a18bc4566 --- /dev/null +++ b/scripts/image_squashfs @@ -0,0 +1,24 @@ +#!/bin/sh + +. config/options $1 + +rm -rf $FAKEROOT_SCRIPT # remove $FAKEROOT_SCRIPT if it exist +touch $FAKEROOT_SCRIPT # create an empty $FAKEROOT_SCRIPT +chmod +x $FAKEROOT_SCRIPT # make $FAKEROOT_SCRIPT executable + +$SCRIPTS/image +$SCRIPTS/build squashfs +$SCRIPTS/build fakeroot + +get_version + +mkdir -p $TARGET_IMG + rm -rf $TARGET_IMG/OpenELEC-$TARGET_VERSION.kernel + cp -PR $BUILD/linux-*/arch/x86/boot/bzImage $TARGET_IMG/OpenELEC-$TARGET_VERSION.kernel + + echo "rm -rf $TARGET_IMG/OpenELEC-$TARGET_VERSION.system" >> $FAKEROOT_SCRIPT +# echo "$ROOT/$TOOLCHAIN/bin/mksquashfs $BUILD/image/system $TARGET_IMG/OpenELEC-$TARGET_VERSION.system -noappend -comp lzma" >> $FAKEROOT_SCRIPT + echo "$ROOT/$TOOLCHAIN/bin/mksquashfs $BUILD/image/system $TARGET_IMG/OpenELEC-$TARGET_VERSION.system -noappend" >> $FAKEROOT_SCRIPT + $ROOT/$TOOLCHAIN/bin/fakeroot -- $FAKEROOT_SCRIPT + chmod 0644 $TARGET_IMG/OpenELEC-$TARGET_VERSION.system + rm -rf $FAKEROOT_SCRIPT diff --git a/scripts/install b/scripts/install index 357f0a0475..3b6ec7c3a8 100755 --- a/scripts/install +++ b/scripts/install @@ -2,58 +2,55 @@ . config/options $1 +STAMP=$STAMPS_INSTALL/$1/install + if [ -z "$1" ]; then echo "usage: $0 package_name" exit 1 fi -# mkdir -p $INSTALLSTAMPS/$1 -# INSTALLSTAMP=$INSTALLSTAMPS/$1/install +mkdir -p $STAMPS_INSTALL/$1 -# if [ $1 = "image" ]; then -# rm -rf $INSTALLSTAMPS -# mkdir -p $INSTALLSTAMPS/image -# fi +if [ -f $STAMP -a $PKG_DIR/install -nt $STAMP ]; then + rm -f $STAMP +fi -# if [ ! -f $INSTALLSTAMP ]; then +[ -f $STAMP -a $FORCE_INSTALL = "no" ] && exit 0 - if [ -f $PKG_DIR/arch ]; then - grep -q "$TARGET_ARCH" "$PKG_DIR/arch" || exit 0 - grep -q "\-$TARGET_ARCH" "$PKG_DIR/arch" && exit 0 - fi +if [ -n "$PKG_ARCH" -a ! "$PKG_ARCH" = "any" ]; then + echo "$PKG_ARCH" | grep -q "$TARGET_ARCH" || exit 0 + echo "$PKG_ARCH" | grep -q "\-$TARGET_ARCH" && exit 0 +fi - if [ -f $PKG_DIR/platform ]; then - grep -q "$TARGET_PLATFORM" "$PKG_DIR/platform" || exit 0 - grep -q "\-$TARGET_PLATFORM" "$PKG_DIR/platform" && exit 0 - fi +if [ -d $PKG_DIR/init.d ]; then + mkdir -p $INSTALL/etc/init.d + cp $PKG_DIR/init.d/* $INSTALL/etc/init.d/ +fi - if [ -d $PKG_DIR/init.d ]; then - mkdir -p $INSTALL/etc/init.d - cp $PKG_DIR/init.d/* $INSTALL/etc/init.d/ - fi +if [ -d $PKG_DIR/profile.d ]; then + mkdir -p $INSTALL/etc/profile.d + cp $PKG_DIR/profile.d/*.conf $INSTALL/etc/profile.d/ +fi - if [ -d $PKG_DIR/profile.d ]; then - mkdir -p $INSTALL/etc/profile.d - cp $PKG_DIR/profile.d/*.conf $INSTALL/etc/profile.d/ - fi +if [ -d $PKG_DIR/init.network ]; then + mkdir -p $INSTALL/etc/init.d/network + cp $PKG_DIR/init.network/* $INSTALL/etc/init.d/network/ +fi - if [ -d $PKG_DIR/init.network ]; then - mkdir -p $INSTALL/etc/init.d/network - cp $PKG_DIR/init.network/* $INSTALL/etc/init.d/network/ - fi +$SCRIPTS/build $@ - $SCRIPTS/build $@ - printf "%${INDENT}c INSTALL $1\n" >&$SILENT_OUT - #dialog --infobox "%${INDENT}c INSTALL $1\n" 15 40 - export INDENT=$((${INDENT:-1}+$INDENT_SIZE)) +printf "%${INDENT}c INSTALL $1\n" >&$SILENT_OUT +export INDENT=$((${INDENT:-1}+$INDENT_SIZE)) - for p in $PKG_DEPENDS; do - $SCRIPTS/install $p - done +for p in $PKG_DEPENDS; do + $SCRIPTS/install $p +done - if [ -f $PKG_DIR/install ]; then - $PKG_DIR/install $@ >&$VERBOSE_OUT - fi +if [ -f $PKG_DIR/install ]; then + $PKG_DIR/install $@ >&$VERBOSE_OUT +fi -# touch $INSTALLSTAMP -# fi +for i in `sed -n "s/^\([^#].*\)=\".*$/\1/p" $PROJECT_DIR/$PROJECT/options | grep -v "#"`; do + eval val=\$$i + echo "STAMP_$i=\"$val"\" >> $STAMP +done diff --git a/scripts/unpack b/scripts/unpack index 59f15d193f..8f058bf3ea 100755 --- a/scripts/unpack +++ b/scripts/unpack @@ -17,12 +17,14 @@ mkdir -p $STAMPS/$1 STAMP=$STAMPS/$1/unpack [ -f $STAMP -a -f $PKG_DIR/need_unpack ] && $PKG_DIR/need_unpack $@ + for patch in $PKG_DIR/patches/*; do if [ $patch -nt $STAMP ]; then rm -f $STAMP break fi done + [ -f $STAMP ] && exit 0 printf "%${INDENT}c UNPACK $1\n" >&$SILENT_OUT @@ -34,7 +36,7 @@ rm -rf $BUILD/$1[-_]cvs* rm -rf $BUILD/$1[-_]svn* rm -rf $BUILD/$1[-_]git* -if [ -f $PACKAGE_URL -o -n "$PKG_URL" ]; then +if [ -n "$PKG_URL" ]; then $SCRIPTS/extract $1 "$1*.tar.bz2" $BUILD $SCRIPTS/extract $1 "$1*.tar.gz" $BUILD $SCRIPTS/extract $1 "$1*.tgz" $BUILD @@ -46,28 +48,29 @@ if [ -d $PKG_DIR/sources ]; then cp -PRf $PKG_DIR/sources/* $BUILD/$1*/ fi -[ -f $PKG_DIR/after_unpack ] && $PKG_DIR/after_unpack $@ >&$VERBOSE_OUT +[ -d $BUILD/${PKG_NAME}[-_.]${PKG_VERSION} ] && PKG_BUILD=`ls -d $BUILD/${PKG_NAME}[-_.]${PKG_VERSION}` +[ -d $BUILD/${PKG_NAME}${PKG_VERSION} ] && PKG_BUILD=`ls -d $BUILD/${PKG_NAME}${PKG_VERSION}` -for i in $PKG_DIR/patches/*.diff*; do +for i in $PKG_DIR/patches/$PKG_NAME-$PKG_VERSION*.patch ; do if [ -f $i ]; then PATCH=`basename $i` PT=`echo $PATCH | sed 's/.*\.\(.*\)$/\1/'` - if [ "$PT" != diff -a "$PT" != "$TARGET_ARCH" -a "$PT" != "$TARGET_PLATFORM" ]; then + if [ "$PT" != "patch" -a "$PT" != "$TARGET_ARCH" ]; then echo "## Skipping patch: $i" continue; else echo "## Applying patch: $i" - cat $i | patch -d `echo $BUILD/$1* | cut -f1 -d\ ` -p1 >&$VERBOSE_OUT + cat $i | patch -d `echo $PKG_BUILD | cut -f1 -d\ ` -p1 >&$VERBOSE_OUT fi fi done -$SCRIPTS/fixconfigtools $BUILD/$1* +$SCRIPTS/fixconfigtools $PKG_BUILD [ -f $PKG_DIR/unpack ] && $PKG_DIR/unpack $@ >&$VERBOSE_OUT rm -f $STAMPS/$1/build -. $PROJECT_DIR/$PROJECT/options + for i in `sed -n "s/^\([^#].*\)=\".*$/\1/p" $PROJECT_DIR/$PROJECT/options | grep -v "#"`; do eval val=\$$i echo "STAMP_$i=\"$val"\" >> $STAMP