diff --git a/config/graphic b/config/graphic index c96aff4099..e931a7165a 100644 --- a/config/graphic +++ b/config/graphic @@ -34,7 +34,7 @@ fi get_graphicdrivers() { if [ "$GRAPHIC_DRIVERS" = "all" ]; then - GRAPHIC_DRIVERS="i915 i965 r200 r300 r600 fglrx nvidia vmware virtualbox" + GRAPHIC_DRIVERS="i915 i965 r200 r300 r600 fglrx fglrx-legacy nvidia vmware virtualbox" fi for drv in $GRAPHIC_DRIVERS; do diff --git a/packages/3rdparty/download/SABnzbd/meta b/packages/3rdparty/download/SABnzbd/meta index 520efa73b3..dd411ad525 100644 --- a/packages/3rdparty/download/SABnzbd/meta +++ b/packages/3rdparty/download/SABnzbd/meta @@ -26,7 +26,7 @@ PKG_LICENSE="OSS" PKG_SITE="http://sabnzbd.org/" PKG_URL="$SOURCEFORGE_SRC/sabnzbdplus/sabnzbdplus/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}-src.tar.gz" PKG_DEPENDS="Python Cheetah pyOpenSSL yenc unrar unzip par2cmdline" -PKG_BUILD_DEPENDS="toolchain Python Cheetah pyOpenSSL yenc unrar unzip par2cmdline" +PKG_BUILD_DEPENDS="toolchain Python Cheetah pyOpenSSL yenc unrar unzip par2cmdline configobj" PKG_PRIORITY="optional" PKG_SECTION="service/downloadmanager" PKG_SHORTDESC="SABnzbd makes Usenet as simple and streamlined as possible by automating everything we can." diff --git a/packages/3rdparty/lib/ccid/meta b/packages/3rdparty/lib/ccid/meta index 3dea4a2b1c..2e90501c03 100644 --- a/packages/3rdparty/lib/ccid/meta +++ b/packages/3rdparty/lib/ccid/meta @@ -19,12 +19,12 @@ ################################################################################ PKG_NAME="ccid" -PKG_VERSION="1.4.8" +PKG_VERSION="1.4.9" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="LGPL" PKG_SITE="http://pcsclite.alioth.debian.org/ccid.html" -PKG_URL="https://alioth.debian.org/frs/download.php/3768/${PKG_NAME}-${PKG_VERSION}.tar.bz2" +PKG_URL="https://alioth.debian.org/frs/download.php/3866/${PKG_NAME}-${PKG_VERSION}.tar.bz2" PKG_DEPENDS="" PKG_BUILD_DEPENDS="toolchain pcsc-lite" PKG_PRIORITY="optional" diff --git a/packages/3rdparty/system/pcsc-lite/meta b/packages/3rdparty/system/pcsc-lite/meta index e12d846649..910bbc2212 100644 --- a/packages/3rdparty/system/pcsc-lite/meta +++ b/packages/3rdparty/system/pcsc-lite/meta @@ -20,12 +20,12 @@ ################################################################################ PKG_NAME="pcsc-lite" -PKG_VERSION="1.8.7" +PKG_VERSION="1.8.8" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://pcsclite.alioth.debian.org/pcsclite.html" -PKG_URL="https://alioth.debian.org/frs/download.php/3842/${PKG_NAME}-${PKG_VERSION}.tar.bz2" +PKG_URL="https://alioth.debian.org/frs/download.php/3862/${PKG_NAME}-${PKG_VERSION}.tar.bz2" PKG_DEPENDS="" PKG_BUILD_DEPENDS="toolchain libusb" PKG_PRIORITY="optional" diff --git a/packages/addons/multimedia/makemkv/changelog.txt b/packages/addons/multimedia/makemkv/changelog.txt index c0754ab8a7..8504b40552 100644 --- a/packages/addons/multimedia/makemkv/changelog.txt +++ b/packages/addons/multimedia/makemkv/changelog.txt @@ -1,3 +1,6 @@ +3.0.4 +- update to makemkv-1.8.0 + 3.0.3 - update to makemkv-1.7.10 diff --git a/packages/addons/multimedia/makemkv/meta b/packages/addons/multimedia/makemkv/meta index 4d2871caf3..c69ce17f6d 100644 --- a/packages/addons/multimedia/makemkv/meta +++ b/packages/addons/multimedia/makemkv/meta @@ -19,8 +19,8 @@ ################################################################################ PKG_NAME="makemkv" -PKG_VERSION="1.7.10" -PKG_REV="3" +PKG_VERSION="1.8.0" +PKG_REV="4" PKG_ARCH="any" PKG_LICENSE="OSS" PKG_SITE="http://www.makemkv.com/forum2/viewforum.php?f=3" diff --git a/packages/addons/multimedia/makemkv/patches.upstream/makemkv-1.7.2-000-crosscompiling-0.1.patch b/packages/addons/multimedia/makemkv/patches.upstream/makemkv-000-crosscompiling-0.1.patch similarity index 51% rename from packages/addons/multimedia/makemkv/patches.upstream/makemkv-1.7.2-000-crosscompiling-0.1.patch rename to packages/addons/multimedia/makemkv/patches.upstream/makemkv-000-crosscompiling-0.1.patch index b34d0b7881..e2ca9f4ce5 100644 --- a/packages/addons/multimedia/makemkv/patches.upstream/makemkv-1.7.2-000-crosscompiling-0.1.patch +++ b/packages/addons/multimedia/makemkv/patches.upstream/makemkv-000-crosscompiling-0.1.patch @@ -1,14 +1,13 @@ -diff -Naur makemkv-1.6.10/lib/makefile.linux makemkv-1.6.10.patch/lib/makefile.linux ---- makemkv-1.6.10/lib/makefile.linux 2011-05-29 23:17:48.000000000 +0200 -+++ makemkv-1.6.10.patch/lib/makefile.linux 2011-05-30 15:29:15.510417904 +0200 -@@ -1,11 +1,11 @@ +diff --git a/lib/makefile.linux b/lib/makefile.linux +index b3b5afa..07322ad 100644 +--- a/lib/makefile.linux ++++ b/lib/makefile.linux +@@ -1,10 +1,10 @@ include makefile.common -GCC=gcc --RCC=rcc +GCC:=gcc -+RCC:=rcc MOC=$(strip $(shell which moc-qt4)) ifeq ($(MOC),) -MOC=moc @@ -16,8 +15,8 @@ diff -Naur makemkv-1.6.10/lib/makefile.linux makemkv-1.6.10.patch/lib/makefile.l endif CXXOPTS=-Os -D_GNU_SOURCE -D_linux_ -@@ -14,7 +14,7 @@ - BUILDINFO_BUILD_DATE=$(shell date) +@@ -16,7 +16,7 @@ PREFIX=/usr + LIBDIR=${PREFIX}/lib -all: out/libdriveio.so.0 out/libmakemkv.so.1 out/makemkv diff --git a/packages/addons/multimedia/makemkv/patches.upstream/makemkv-1.7.2-001-crosscompiling-objcopy.patch b/packages/addons/multimedia/makemkv/patches.upstream/makemkv-001-crosscompiling-objcopy.patch similarity index 100% rename from packages/addons/multimedia/makemkv/patches.upstream/makemkv-1.7.2-001-crosscompiling-objcopy.patch rename to packages/addons/multimedia/makemkv/patches.upstream/makemkv-001-crosscompiling-objcopy.patch diff --git a/packages/addons/networking/analyzer/tcpdump/changelog.txt b/packages/addons/networking/analyzer/tcpdump/changelog.txt deleted file mode 100644 index 18432df6cf..0000000000 --- a/packages/addons/networking/analyzer/tcpdump/changelog.txt +++ /dev/null @@ -1,12 +0,0 @@ -3.0.1 -- bump addon version - -2.1.3 -- updated to tcpdump-4.3.0 -- updated to libpcap-1.3.0 - -2.1.2 -- rebuild - -2.1.1 -- initial addon based on tcpdump-4.1.1 diff --git a/packages/addons/networking/analyzer/tcpdump/icon/icon.png b/packages/addons/networking/analyzer/tcpdump/icon/icon.png deleted file mode 100644 index b369966677..0000000000 Binary files a/packages/addons/networking/analyzer/tcpdump/icon/icon.png and /dev/null differ diff --git a/packages/addons/service/downloadmanager/SABnzbd-Suite/addon b/packages/addons/service/downloadmanager/SABnzbd-Suite/addon index 0c43ee5b91..4bf37389a5 100755 --- a/packages/addons/service/downloadmanager/SABnzbd-Suite/addon +++ b/packages/addons/service/downloadmanager/SABnzbd-Suite/addon @@ -34,6 +34,7 @@ mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/pylib cp -R $BUILD/Cheetah*/.install/usr/lib/python*/site-packages/* $ADDON_BUILD/$PKG_ADDON_ID/pylib cp -R $BUILD/pyOpenSSL*/.install/usr/lib/python*/site-packages/* $ADDON_BUILD/$PKG_ADDON_ID/pylib cp -R $BUILD/yenc*/.install/usr/lib/python*/site-packages/* $ADDON_BUILD/$PKG_ADDON_ID/pylib + cp -R $BUILD/configobj*/.install/usr/lib/python*/site-packages/* $ADDON_BUILD/$PKG_ADDON_ID/pylib mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/SABnzbd cp -PR $BUILD/SABnzbd-*/* $ADDON_BUILD/$PKG_ADDON_ID/SABnzbd diff --git a/packages/addons/service/downloadmanager/SABnzbd-Suite/changelog.txt b/packages/addons/service/downloadmanager/SABnzbd-Suite/changelog.txt index 5008331f93..749e0bffac 100644 --- a/packages/addons/service/downloadmanager/SABnzbd-Suite/changelog.txt +++ b/packages/addons/service/downloadmanager/SABnzbd-Suite/changelog.txt @@ -1,3 +1,9 @@ +3.0.6 +- fix configobj error n startup + +3.0.5 +- rebuild. configobj included + 3.0.4 - update to SickBeard-4e57625 - update to CouchPotatoServer-a49a00a diff --git a/packages/addons/service/downloadmanager/SABnzbd-Suite/meta b/packages/addons/service/downloadmanager/SABnzbd-Suite/meta index 27762494d4..08d2a5ee4e 100644 --- a/packages/addons/service/downloadmanager/SABnzbd-Suite/meta +++ b/packages/addons/service/downloadmanager/SABnzbd-Suite/meta @@ -20,7 +20,7 @@ PKG_NAME="SABnzbd-Suite" PKG_VERSION="3.0" -PKG_REV="4" +PKG_REV="6" PKG_ARCH="any" PKG_LICENSE="OSS" PKG_SITE="http://www.openelec.tv" diff --git a/packages/addons/service/downloadmanager/SABnzbd-Suite/source/bin/SABnzbd-Suite.py b/packages/addons/service/downloadmanager/SABnzbd-Suite/source/bin/SABnzbd-Suite.py index 5ed24abd59..4639ed6d2a 100755 --- a/packages/addons/service/downloadmanager/SABnzbd-Suite/source/bin/SABnzbd-Suite.py +++ b/packages/addons/service/downloadmanager/SABnzbd-Suite/source/bin/SABnzbd-Suite.py @@ -27,7 +27,7 @@ import signal import subprocess import urllib2 import hashlib -from configobj import ConfigObj +import sys from xml.dom.minidom import parseString import logging import traceback @@ -195,6 +195,9 @@ except: signal.signal(signal.SIGCHLD, signal.SIG_DFL) os.environ['PYTHONPATH'] = str(os.environ.get('PYTHONPATH')) + ':' + pPylib +sys.path.append(pPylib) + +from configobj import ConfigObj # SABnzbd start try: diff --git a/packages/addons/service/downloadmanager/SABnzbd-Suite/source/default.py b/packages/addons/service/downloadmanager/SABnzbd-Suite/source/default.py index b24f34feb4..50317c5684 100644 --- a/packages/addons/service/downloadmanager/SABnzbd-Suite/source/default.py +++ b/packages/addons/service/downloadmanager/SABnzbd-Suite/source/default.py @@ -28,7 +28,6 @@ import urllib2 import socket import time import datetime -from configobj import ConfigObj __scriptname__ = "SABnzbd Suite" __author__ = "OpenELEC" @@ -51,6 +50,9 @@ subprocess.call(['python',__start__]) # check for launching sabnzbd sabNzbdLaunch = (__settings__.getSetting('SABNZBD_LAUNCH').lower() == 'true') +sys.path.append(os.path.join(__cwd__, 'pylib')) +from configobj import ConfigObj + if sabNzbdLaunch: # SABnzbd addresses and api key sabNzbdAddress = '127.0.0.1:8081' diff --git a/packages/addons/service/multimedia/tvheadend/build b/packages/addons/service/multimedia/tvheadend/build index 90c4c4481c..02fa45bdc6 100755 --- a/packages/addons/service/multimedia/tvheadend/build +++ b/packages/addons/service/multimedia/tvheadend/build @@ -36,6 +36,7 @@ cd $PKG_BUILD --cc=$TARGET_CC \ --enable-timeshift \ --disable-libav \ + --disable-avahi \ --enable-bundle make diff --git a/packages/addons/service/multimedia/tvheadend/changelog.txt b/packages/addons/service/multimedia/tvheadend/changelog.txt index 151f64fad0..c912a5a531 100644 --- a/packages/addons/service/multimedia/tvheadend/changelog.txt +++ b/packages/addons/service/multimedia/tvheadend/changelog.txt @@ -1,3 +1,7 @@ +3.0.6 +- update to TVHeadend 3.3.491 +- disable avahi support + 3.0.5 - update to TVHeadend 3.3.485 diff --git a/packages/addons/service/multimedia/tvheadend/meta b/packages/addons/service/multimedia/tvheadend/meta index 81cb85629c..84d329f3d4 100644 --- a/packages/addons/service/multimedia/tvheadend/meta +++ b/packages/addons/service/multimedia/tvheadend/meta @@ -19,15 +19,15 @@ ################################################################################ PKG_NAME="tvheadend" -PKG_VERSION="3.3.485" -PKG_REV="5" +PKG_VERSION="3.3.491" +PKG_REV="6" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.lonelycoder.com/hts/tvheadend_overview.html" #PKG_URL="https://github.com/downloads/tvheadend/tvheadend/${PKG_NAME}-${PKG_VERSION}.tar.gz" PKG_URL="$DISTRO_SRC/${PKG_NAME}-${PKG_VERSION}.tar.gz" -PKG_DEPENDS="$ICONV avahi openssl curl" -PKG_BUILD_DEPENDS="toolchain $ICONV avahi openssl curl" +PKG_DEPENDS="$ICONV openssl curl" +PKG_BUILD_DEPENDS="toolchain $ICONV openssl curl" PKG_PRIORITY="optional" PKG_SECTION="service/multimedia" PKG_SHORTDESC="tvheadend (Version: $PKG_VERSION): a TV streaming server for Linux supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV, and Analog video (V4L) as input sources." diff --git a/packages/addons/service/softcam/oscam/changelog.txt b/packages/addons/service/softcam/oscam/changelog.txt index a9366c8500..81ed275a44 100644 --- a/packages/addons/service/softcam/oscam/changelog.txt +++ b/packages/addons/service/softcam/oscam/changelog.txt @@ -1,3 +1,7 @@ +3.0.8 +- update to oscam-8469 +- update to pcsc-lite-1.8.8 + 3.0.7 - update to oscam-8357 diff --git a/packages/addons/service/softcam/oscam/meta b/packages/addons/service/softcam/oscam/meta index 9e33856c44..fdab792aa2 100644 --- a/packages/addons/service/softcam/oscam/meta +++ b/packages/addons/service/softcam/oscam/meta @@ -20,8 +20,8 @@ ################################################################################ PKG_NAME="oscam" -PKG_VERSION="8357" -PKG_REV="7" +PKG_VERSION="8469" +PKG_REV="8" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.streamboard.tv/oscam/wiki" diff --git a/packages/addons/service/system/pcscd-addon/changelog.txt b/packages/addons/service/system/pcscd-addon/changelog.txt index 96e36e410a..270c1c351b 100644 --- a/packages/addons/service/system/pcscd-addon/changelog.txt +++ b/packages/addons/service/system/pcscd-addon/changelog.txt @@ -1,3 +1,7 @@ +3.0.4 +- update to pcsc-lite-1.8.8 +- update to libccid-1.4.9 + 3.0.3 - update to pcsc-lite-1.8.7 diff --git a/packages/addons/service/system/pcscd-addon/meta b/packages/addons/service/system/pcscd-addon/meta index 5bb9ea8152..95bab6f169 100755 --- a/packages/addons/service/system/pcscd-addon/meta +++ b/packages/addons/service/system/pcscd-addon/meta @@ -21,7 +21,7 @@ PKG_NAME="pcscd-addon" PKG_VERSION="3.0" -PKG_REV="3" +PKG_REV="4" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.openelec.tv" diff --git a/packages/debug/iftop/build b/packages/debug/iftop/build new file mode 100755 index 0000000000..18c8890abf --- /dev/null +++ b/packages/debug/iftop/build @@ -0,0 +1,35 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2013 Dag Wieers (dag@wieers.com) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +#strip_lto + +export LIBS="-lpthread -ltinfo" + +cd $PKG_BUILD + +./configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + +make diff --git a/packages/debug/iftop/install b/packages/debug/iftop/install new file mode 100755 index 0000000000..23ae6b0c38 --- /dev/null +++ b/packages/debug/iftop/install @@ -0,0 +1,26 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2013 Dag Wieers (dag@wieers.com) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +mkdir -p $INSTALL/usr/bin/ + cp $PKG_BUILD/iftop $INSTALL/usr/bin/ diff --git a/packages/debug/iftop/meta b/packages/debug/iftop/meta new file mode 100644 index 0000000000..eb58ca6b48 --- /dev/null +++ b/packages/debug/iftop/meta @@ -0,0 +1,37 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2013 Dag Wieers (dag@wieers.com) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="iftop" +PKG_VERSION="1.0pre2" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://htop.sourceforge.net/" +PKG_URL="http://www.ex-parrot.com/pdw/iftop/download/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="ncurses" +PKG_BUILD_DEPENDS="toolchain ncurses libpcap" +PKG_PRIORITY="optional" +PKG_SECTION="debug/tools" +PKG_SHORTDESC="iftop: display bandwidth usage on an interface" +PKG_LONGDESC="iftop does for network usage what top(1) does for CPU usage. It listens to network traffic on a named interface and displays a table of current bandwidth usage by pairs of hosts. Handy for answering the question 'why is our ADSL link so slow?'." + +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/debug/iftop/patches/iftop-automake-1.13.patch b/packages/debug/iftop/patches/iftop-automake-1.13.patch new file mode 100644 index 0000000000..9997f7998b --- /dev/null +++ b/packages/debug/iftop/patches/iftop-automake-1.13.patch @@ -0,0 +1,12 @@ +diff -Naur iftop-1.0pre2/configure.in iftop-1.0pre2.patch/configure.in +--- iftop-1.0pre2/configure.in 2011-10-03 23:55:33.000000000 +0200 ++++ iftop-1.0pre2.patch/configure.in 2013-03-05 11:17:10.423257608 +0100 +@@ -28,7 +28,7 @@ + + AC_CANONICAL_SYSTEM + +-AM_CONFIG_HEADER(config.h) ++AC_CONFIG_HEADERS(config.h) + AM_INIT_AUTOMAKE(iftop, "1.0pre2") + + AC_DEFINE_UNQUOTED(IFTOP_VERSION, "$VERSION", [The iftop version number]) diff --git a/packages/debug/meta b/packages/debug/meta index 57ecc573d3..89e78eaf05 100644 --- a/packages/debug/meta +++ b/packages/debug/meta @@ -25,7 +25,7 @@ PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.openelec.tv" PKG_URL="" -PKG_DEPENDS="acpica cpuid dmidecode dstat evtest gdb hddtemp htop i2c-tools pmtools powertop strace" +PKG_DEPENDS="acpica cpuid dmidecode dstat evtest gdb hddtemp htop i2c-tools iftop pmtools powertop smem strace wireless_tools tcpdump" PKG_BUILD_DEPENDS="toolchain" PKG_PRIORITY="optional" PKG_SECTION="debug" diff --git a/packages/addons/networking/analyzer/tcpdump/source/default.py b/packages/debug/smem/install old mode 100644 new mode 100755 similarity index 86% rename from packages/addons/networking/analyzer/tcpdump/source/default.py rename to packages/debug/smem/install index 8d4c5e9e96..a647fc3aaa --- a/packages/addons/networking/analyzer/tcpdump/source/default.py +++ b/packages/debug/smem/install @@ -1,6 +1,8 @@ +#!/bin/sh + ################################################################################ # This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# Copyright (C) 2013 Dag Wieers (dag@wieers.com) # # 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 @@ -18,6 +20,7 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -import os -import sys -import xbmcaddon +. config/options $1 + +mkdir -p $INSTALL/usr/bin/ + cp $PKG_BUILD/smem $INSTALL/usr/bin/ diff --git a/packages/tools/pastebinit/meta b/packages/debug/smem/meta similarity index 63% rename from packages/tools/pastebinit/meta rename to packages/debug/smem/meta index a8d3a1f098..4686f7e58f 100644 --- a/packages/tools/pastebinit/meta +++ b/packages/debug/smem/meta @@ -1,6 +1,6 @@ ################################################################################ # This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# Copyright (C) 2013 Dag Wieers (dag@wieers.com) # # 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 @@ -18,19 +18,19 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -PKG_NAME="pastebinit" -PKG_VERSION="1.3.1" +PKG_NAME="smem" +PKG_VERSION="1.2" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" -PKG_SITE="http://launchpad.net/pastebinit" -PKG_URL="http://launchpad.net/pastebinit/trunk/$PKG_VERSION/+download/$PKG_NAME-$PKG_VERSION.tar.gz" -PKG_DEPENDS="Python simplejson configobj" -PKG_BUILD_DEPENDS="toolchain" +PKG_SITE="http://www.selenic.com/smem/" +PKG_URL="http://www.selenic.com/smem/download/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="Python" +PKG_BUILD_DEPENDS="toolchain Python" PKG_PRIORITY="optional" -PKG_SECTION="tools" -PKG_SHORTDESC="pastebinit: Upload Directly to Pastebin from the Linux Shell" -PKG_LONGDESC="pastebinit is a tool for Uploading Directly to Pastebin from the Linux Shell" +PKG_SECTION="system" +PKG_SHORTDESC="smem: memory reporting tool" +PKG_LONGDESC="smem is a tool that can give numerous reports on memory usage on Linux systems. Unlike existing tools, smem can report proportional set size (PSS), which is a more meaningful representation of the amount of memory used by libraries and applications in a virtual memory system." PKG_IS_ADDON="no" PKG_AUTORECONF="no" diff --git a/packages/debug/wireless_tools/build b/packages/debug/wireless_tools/build new file mode 100755 index 0000000000..2241b76e85 --- /dev/null +++ b/packages/debug/wireless_tools/build @@ -0,0 +1,31 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2013 Dag Wieers (dag@wieers.com) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +cd $PKG_BUILD + +make PREFIX=/usr \ + CC="$TARGET_CC" \ + AR="$TARGET_AR" \ + CFLAGS="$TARGET_CFLAGS" \ + CPPFLAGS="$TARGET_CPPFLAGS" \ diff --git a/packages/debug/wireless_tools/install b/packages/debug/wireless_tools/install new file mode 100755 index 0000000000..f338e2c47b --- /dev/null +++ b/packages/debug/wireless_tools/install @@ -0,0 +1,35 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2013 Dag Wieers (dag@wieers.com) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +mkdir -p $INSTALL/usr/bin/ + cp $PKG_BUILD/iwconfig $INSTALL/usr/bin/ + cp $PKG_BUILD/iwgetid $INSTALL/usr/bin/ + cp $PKG_BUILD/iwevent $INSTALL/usr/bin/ + cp $PKG_BUILD/iwlist $INSTALL/usr/bin/ + cp $PKG_BUILD/iwspy $INSTALL/usr/bin/ + cp $PKG_BUILD/iwpriv $INSTALL/usr/bin/ + cp $PKG_BUILD/ifrename $INSTALL/usr/bin/ + +mkdir -p $INSTALL/usr/lib/ + cp $PKG_BUILD/libiw.so.29 $INSTALL/usr/lib/ diff --git a/packages/debug/wireless_tools/meta b/packages/debug/wireless_tools/meta new file mode 100644 index 0000000000..40ce84acb7 --- /dev/null +++ b/packages/debug/wireless_tools/meta @@ -0,0 +1,36 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2013 Dag Wieers (dag@wieers.com) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="wireless_tools" +PKG_VERSION="29" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html" +PKG_URL="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/$PKG_NAME.$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="wireless-tools: tools allowing to manipulate the Wireless Extensions" +PKG_LONGDESC="The Wireless Tools (WT) is a set of tools allowing to manipulate the Wireless Extensions. They use a textual interface and are rather crude, but aim to support the full Wireless Extension. There are many other tools you can use with Wireless Extensions, however Wireless Tools is the reference implementation." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/devel/elfutils/build b/packages/devel/elfutils/build new file mode 100755 index 0000000000..6075bc06f5 --- /dev/null +++ b/packages/devel/elfutils/build @@ -0,0 +1,38 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +strip_lto + +cd $PKG_BUILD +./configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + --disable-werror \ + --disable-progs \ + --with-zlib \ + --without-bzlib \ + --without-lzma \ + +make V=1 +$MAKEINSTALL diff --git a/packages/devel/elfutils/install b/packages/devel/elfutils/install new file mode 100755 index 0000000000..4d248b18b1 --- /dev/null +++ b/packages/devel/elfutils/install @@ -0,0 +1,28 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +#      Copyright (C) 2010-2011 Roman Weber (roman@openelec.tv) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +mkdir -p $INSTALL/usr/lib + cp -P $PKG_BUILD/libdw/*.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/libelf/*.so* $INSTALL/usr/lib diff --git a/packages/devel/elfutils/meta b/packages/devel/elfutils/meta new file mode 100644 index 0000000000..112be36013 --- /dev/null +++ b/packages/devel/elfutils/meta @@ -0,0 +1,36 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="elfutils" +PKG_VERSION="0.155" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="https://fedorahosted.org/elfutils/" +PKG_URL="https://fedorahosted.org/releases/e/l/elfutils/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="zlib" +PKG_BUILD_DEPENDS="toolchain zlib" +PKG_PRIORITY="optional" +PKG_SECTION="devel" +PKG_SHORTDESC="elfutils: collection of utilities to handle ELF objects" +PKG_LONGDESC="Elfutils is a collection of utilities, including eu-ld (a linker), eu-nm (for listing symbols from object files), eu-size (for listing the section sizes of an object or archive file), eu-strip (for discarding symbols), eu-readelf (to see the raw ELF file structures), and eu-elflint (to check for well-formed ELF files)." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/devel/elfutils/patches/bk/elfutils-02-argp-support.patch b/packages/devel/elfutils/patches/bk/elfutils-02-argp-support.patch new file mode 100644 index 0000000000..f81ac8f9fa --- /dev/null +++ b/packages/devel/elfutils/patches/bk/elfutils-02-argp-support.patch @@ -0,0 +1,92 @@ +Allow the usage of an external implementation of the argp functions + +uClibc lack the argp family of functions that glibc has. Therefore, we +add a check in the configure script to see if argp_parse is available +in the C library. If not, we look if it is available in the additional +'argp' library. If so, we link against that library. If not, we error +out. + +This allows to build elfutils against uClibc with an external argp +library. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -269,6 +269,13 @@ + enable_progs=yes) + AM_CONDITIONAL(ENABLE_PROGS, test "$enable_progs" = yes) + ++AC_CHECK_FUNC([argp_parse]) ++if test "$ac_cv_func_argp_parse" != yes; then ++ AC_CHECK_LIB([argp],[argp_parse],ARGP_LIBS=-largp, ++ AC_MSG_ERROR([No argp_parse function available.])) ++fi ++AC_SUBST(ARGP_LIBS) ++ + dnl Test for zlib and bzlib, gives ZLIB/BZLIB .am + dnl conditional and config.h USE_ZLIB/USE_BZLIB #define. + save_LIBS="$LIBS" +Index: b/src/Makefile.am +=================================================================== +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -98,26 +98,29 @@ + # Buggy old compilers. + readelf_no_Werror = yes + +-readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl ++readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \ ++ $(ARGP_LIBS) + nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \ +- $(demanglelib) +-size_LDADD = $(libelf) $(libeu) $(libmudflap) +-strip_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl +-ld_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl ++ $(demanglelib) $(ARGP_LIBS) ++size_LDADD = $(libelf) $(libeu) $(libmudflap) $(ARGP_LIBS) ++strip_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl $(ARGP_LIBS) ++ld_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl $(ARGP_LIBS) + if NATIVE_LD + # -ldl is always needed for libebl. + ld_LDADD += libld_elf.a + endif + ld_LDFLAGS = -rdynamic +-elflint_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl +-findtextrel_LDADD = $(libdw) $(libelf) $(libmudflap) +-addr2line_LDADD = $(libdw) $(libelf) $(libmudflap) +-elfcmp_LDADD = $(libebl) $(libelf) $(libmudflap) -ldl +-objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl +-ranlib_LDADD = libar.a $(libelf) $(libeu) $(libmudflap) +-strings_LDADD = $(libelf) $(libeu) $(libmudflap) +-ar_LDADD = libar.a $(libelf) $(libeu) $(libmudflap) +-unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(libmudflap) -ldl ++elflint_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl $(ARGP_LIBS) ++findtextrel_LDADD = $(libdw) $(libelf) $(libmudflap) $(ARGP_LIBS) ++addr2line_LDADD = $(libdw) $(libelf) $(libmudflap) $(ARGP_LIBS) ++elfcmp_LDADD = $(libebl) $(libelf) $(libmudflap) -ldl $(ARGP_LIBS) ++objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \ ++ $(ARGP_LIBS) ++ranlib_LDADD = libar.a $(libelf) $(libeu) $(libmudflap) $(ARGP_LIBS) ++strings_LDADD = $(libelf) $(libeu) $(libmudflap) $(ARGP_LIBS) ++ar_LDADD = libar.a $(libelf) $(libeu) $(libmudflap) $(ARGP_LIBS) ++unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(libmudflap) -ldl \ ++ $(ARGP_LIBS) + + ldlex.o: ldscript.c + ldlex_no_Werror = yes +Index: b/libdw/Makefile.am +=================================================================== +--- a/libdw/Makefile.am ++++ b/libdw/Makefile.am +@@ -111,7 +111,7 @@ + -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \ + -Wl,--version-script,$<,--no-undefined \ + -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\ +- -ldl $(zip_LIBS) ++ -ldl $(zip_LIBS) $(ARGP_LIBS) + if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi + ln -fs $@ $@.$(VERSION) + diff --git a/packages/devel/elfutils/patches/bk/elfutils-03-memcpy-def.patch b/packages/devel/elfutils/patches/bk/elfutils-03-memcpy-def.patch new file mode 100644 index 0000000000..eb50cf654d --- /dev/null +++ b/packages/devel/elfutils/patches/bk/elfutils-03-memcpy-def.patch @@ -0,0 +1,24 @@ +Provide a compatibility alias __memcpy + +For some reason, libelf uses the internal glibc alias __memcpy, which +doesn't exist in uClibc. Add a manual alias so that the build can +proceed with uClibc. + +Signed-off-by: Thomas Petazzoni + +Index: b/libelf/libelf.h +=================================================================== +--- a/libelf/libelf.h ++++ b/libelf/libelf.h +@@ -34,6 +34,11 @@ + /* Get the ELF types. */ + #include + ++#ifndef _LIBC ++#ifndef __mempcpy ++#define __mempcpy mempcpy ++#endif ++#endif + + /* Known translation types. */ + typedef enum diff --git a/packages/devel/elfutils/patches/bk/elfutils-04-fts.patch b/packages/devel/elfutils/patches/bk/elfutils-04-fts.patch new file mode 100644 index 0000000000..7318236d29 --- /dev/null +++ b/packages/devel/elfutils/patches/bk/elfutils-04-fts.patch @@ -0,0 +1,1307 @@ +Add an implementation of the fts_*() functions + +The fts_*() functions are optional in uClibc, and not compiled in our +default configuration. The best option would be to migrate this +elfutils code to the nftw family of functions, but it requires quite +some work. + +So we have several options here: + + *) Enable fts_*() functions in our default uClibc configuration. Not + nice since only one package needs them (the help text of uClibc + for fts_*() functions explicitly mention that they have been added + to be able to build elfutils). + + *) Use gnulib, but it is quite heavy to setup, requires modifications + to configure.ac, and other things. + + *) Copy the fts function from uClibc into elfutils source code. This + is the solution used below. uClibc is LGPL, and elfutils is + LGPL/GPL, so there should not be any licensing issue. + +Of course, the fts_*() functions are only built if they are not +already provided by the C library. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -276,6 +276,10 @@ + fi + AC_SUBST(ARGP_LIBS) + ++AC_CHECK_HEADER([fts.h], ++ AC_DEFINE([HAVE_FTS_H], [], [Define if is available in C library])) ++AM_CONDITIONAL(HAVE_FTS, test "$ac_cv_header_fts_h" = yes) ++ + dnl Test for zlib and bzlib, gives ZLIB/BZLIB .am + dnl conditional and config.h USE_ZLIB/USE_BZLIB #define. + save_LIBS="$LIBS" +Index: b/libdwfl/Makefile.am +=================================================================== +--- a/libdwfl/Makefile.am ++++ b/libdwfl/Makefile.am +@@ -79,6 +79,9 @@ + if LZMA + libdwfl_a_SOURCES += lzma.c + endif ++if !HAVE_FTS ++libdwfl_a_SOURCES += fts.c ++endif + + if MUDFLAP + libdwfl = libdwfl.a $(libdw) $(libebl) $(libelf) $(libeu) +Index: b/libdwfl/fts.c +=================================================================== +--- /dev/null ++++ b/libdwfl/fts.c +@@ -0,0 +1,1095 @@ ++/*- ++ * Copyright (c) 1990, 1993, 1994 ++ * The Regents of the University of California. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 4. Neither the name of the University nor the names of its contributors ++ * may be used to endorse or promote products derived from this software ++ * without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include "fts_.h" ++#include ++#include ++#include ++ ++/* Largest alignment size needed, minus one. ++ Usually long double is the worst case. */ ++#ifndef ALIGNBYTES ++#define ALIGNBYTES (__alignof__ (long double) - 1) ++#endif ++/* Align P to that size. */ ++#ifndef ALIGN ++#define ALIGN(p) (((unsigned long int) (p) + ALIGNBYTES) & ~ALIGNBYTES) ++#endif ++ ++ ++static FTSENT *fts_alloc (FTS *, const char *, size_t); ++static FTSENT *fts_build (FTS *, int); ++static void fts_lfree (FTSENT *); ++static void fts_load (FTS *, FTSENT *); ++static size_t fts_maxarglen (char * const *); ++static void fts_padjust (FTS *, FTSENT *); ++static int fts_palloc (FTS *, size_t); ++static FTSENT *fts_sort (FTS *, FTSENT *, int); ++static u_short fts_stat (FTS *, FTSENT *, int); ++static int fts_safe_changedir (FTS *, FTSENT *, int, const char *); ++ ++#ifndef MAX ++#define MAX(a, b) ({ __typeof__ (a) _a = (a); \ ++ __typeof__ (b) _b = (b); \ ++ _a > _b ? _a : _b; }) ++#endif ++ ++#define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2]))) ++ ++#define CLR(opt) (sp->fts_options &= ~(opt)) ++#define ISSET(opt) (sp->fts_options & (opt)) ++#define SET(opt) (sp->fts_options |= (opt)) ++ ++#define FCHDIR(sp, fd) (!ISSET(FTS_NOCHDIR) && fchdir(fd)) ++ ++/* fts_build flags */ ++#define BCHILD 1 /* fts_children */ ++#define BNAMES 2 /* fts_children, names only */ ++#define BREAD 3 /* fts_read */ ++ ++FTS * ++fts_open( char * const *argv, register int options, ++ int (*compar) (const FTSENT **, const FTSENT **)) ++{ ++ register FTS *sp; ++ register FTSENT *p, *root; ++ register int nitems; ++ FTSENT *parent = NULL; ++ FTSENT *tmp = NULL; ++ ++ /* Options check. */ ++ if (options & ~FTS_OPTIONMASK) { ++ errno = EINVAL; ++ return (NULL); ++ } ++ ++ /* Allocate/initialize the stream */ ++ if ((sp = malloc((u_int)sizeof(FTS))) == NULL) ++ return (NULL); ++ memset(sp, 0, sizeof(FTS)); ++ sp->fts_compar = (int (*) (const void *, const void *)) compar; ++ sp->fts_options = options; ++ ++ /* Logical walks turn on NOCHDIR; symbolic links are too hard. */ ++ if (ISSET(FTS_LOGICAL)) ++ SET(FTS_NOCHDIR); ++ ++ /* ++ * Start out with 1K of path space, and enough, in any case, ++ * to hold the user's paths. ++ */ ++#ifndef MAXPATHLEN ++#define MAXPATHLEN 1024 ++#endif ++ size_t maxarglen = fts_maxarglen(argv); ++ if (fts_palloc(sp, MAX(maxarglen, MAXPATHLEN))) ++ goto mem1; ++ ++ /* Allocate/initialize root's parent. */ ++ if (*argv != NULL) { ++ if ((parent = fts_alloc(sp, "", 0)) == NULL) ++ goto mem2; ++ parent->fts_level = FTS_ROOTPARENTLEVEL; ++ } ++ ++ /* Allocate/initialize root(s). */ ++ for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) { ++ /* Don't allow zero-length paths. */ ++ size_t len = strlen(*argv); ++ if (len == 0) { ++ errno = ENOENT; ++ goto mem3; ++ } ++ ++ p = fts_alloc(sp, *argv, len); ++ p->fts_level = FTS_ROOTLEVEL; ++ p->fts_parent = parent; ++ p->fts_accpath = p->fts_name; ++ p->fts_info = fts_stat(sp, p, ISSET(FTS_COMFOLLOW)); ++ ++ /* Command-line "." and ".." are real directories. */ ++ if (p->fts_info == FTS_DOT) ++ p->fts_info = FTS_D; ++ ++ /* ++ * If comparison routine supplied, traverse in sorted ++ * order; otherwise traverse in the order specified. ++ */ ++ if (compar) { ++ p->fts_link = root; ++ root = p; ++ } else { ++ p->fts_link = NULL; ++ if (root == NULL) ++ tmp = root = p; ++ else { ++ tmp->fts_link = p; ++ tmp = p; ++ } ++ } ++ } ++ if (compar && nitems > 1) ++ root = fts_sort(sp, root, nitems); ++ ++ /* ++ * Allocate a dummy pointer and make fts_read think that we've just ++ * finished the node before the root(s); set p->fts_info to FTS_INIT ++ * so that everything about the "current" node is ignored. ++ */ ++ if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL) ++ goto mem3; ++ sp->fts_cur->fts_link = root; ++ sp->fts_cur->fts_info = FTS_INIT; ++ ++ /* ++ * If using chdir(2), grab a file descriptor pointing to dot to ensure ++ * that we can get back here; this could be avoided for some paths, ++ * but almost certainly not worth the effort. Slashes, symbolic links, ++ * and ".." are all fairly nasty problems. Note, if we can't get the ++ * descriptor we run anyway, just more slowly. ++ */ ++ if (!ISSET(FTS_NOCHDIR) ++ && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0) ++ SET(FTS_NOCHDIR); ++ ++ return (sp); ++ ++mem3: fts_lfree(root); ++ free(parent); ++mem2: free(sp->fts_path); ++mem1: free(sp); ++ return (NULL); ++} ++ ++static void ++fts_load(FTS *sp, register FTSENT *p) ++{ ++ register int len; ++ register char *cp; ++ ++ /* ++ * Load the stream structure for the next traversal. Since we don't ++ * actually enter the directory until after the preorder visit, set ++ * the fts_accpath field specially so the chdir gets done to the right ++ * place and the user can access the first node. From fts_open it's ++ * known that the path will fit. ++ */ ++ len = p->fts_pathlen = p->fts_namelen; ++ memmove(sp->fts_path, p->fts_name, len + 1); ++ if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) { ++ len = strlen(++cp); ++ memmove(p->fts_name, cp, len + 1); ++ p->fts_namelen = len; ++ } ++ p->fts_accpath = p->fts_path = sp->fts_path; ++ sp->fts_dev = p->fts_dev; ++} ++ ++int ++fts_close(FTS *sp) ++{ ++ register FTSENT *freep, *p; ++ int saved_errno; ++ ++ /* ++ * This still works if we haven't read anything -- the dummy structure ++ * points to the root list, so we step through to the end of the root ++ * list which has a valid parent pointer. ++ */ ++ if (sp->fts_cur) { ++ for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) { ++ freep = p; ++ p = p->fts_link != NULL ? p->fts_link : p->fts_parent; ++ free(freep); ++ } ++ free(p); ++ } ++ ++ /* Free up child linked list, sort array, path buffer. */ ++ if (sp->fts_child) ++ fts_lfree(sp->fts_child); ++ free(sp->fts_array); ++ free(sp->fts_path); ++ ++ /* Return to original directory, save errno if necessary. */ ++ if (!ISSET(FTS_NOCHDIR)) { ++ saved_errno = fchdir(sp->fts_rfd) ? errno : 0; ++ (void)close(sp->fts_rfd); ++ ++ /* Set errno and return. */ ++ if (saved_errno != 0) { ++ /* Free up the stream pointer. */ ++ free(sp); ++ errno = saved_errno; ++ return (-1); ++ } ++ } ++ ++ /* Free up the stream pointer. */ ++ free(sp); ++ return (0); ++} ++ ++/* ++ * Special case of "/" at the end of the path so that slashes aren't ++ * appended which would cause paths to be written as "....//foo". ++ */ ++#define NAPPEND(p) \ ++ (p->fts_path[p->fts_pathlen - 1] == '/' \ ++ ? p->fts_pathlen - 1 : p->fts_pathlen) ++ ++FTSENT * ++fts_read(register FTS *sp) ++{ ++ register FTSENT *p, *tmp; ++ register int instr; ++ register char *t; ++ int saved_errno; ++ ++ /* If finished or unrecoverable error, return NULL. */ ++ if (sp->fts_cur == NULL || ISSET(FTS_STOP)) ++ return (NULL); ++ ++ /* Set current node pointer. */ ++ p = sp->fts_cur; ++ ++ /* Save and zero out user instructions. */ ++ instr = p->fts_instr; ++ p->fts_instr = FTS_NOINSTR; ++ ++ /* Any type of file may be re-visited; re-stat and re-turn. */ ++ if (instr == FTS_AGAIN) { ++ p->fts_info = fts_stat(sp, p, 0); ++ return (p); ++ } ++ ++ /* ++ * Following a symlink -- SLNONE test allows application to see ++ * SLNONE and recover. If indirecting through a symlink, have ++ * keep a pointer to current location. If unable to get that ++ * pointer, follow fails. ++ */ ++ if (instr == FTS_FOLLOW && ++ (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) { ++ p->fts_info = fts_stat(sp, p, 1); ++ if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { ++ if ((p->fts_symfd = open(".", O_RDONLY, 0)) < 0) { ++ p->fts_errno = errno; ++ p->fts_info = FTS_ERR; ++ } else ++ p->fts_flags |= FTS_SYMFOLLOW; ++ } ++ return (p); ++ } ++ ++ /* Directory in pre-order. */ ++ if (p->fts_info == FTS_D) { ++ /* If skipped or crossed mount point, do post-order visit. */ ++ if (instr == FTS_SKIP || ++ (ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev)) { ++ if (p->fts_flags & FTS_SYMFOLLOW) ++ (void)close(p->fts_symfd); ++ if (sp->fts_child) { ++ fts_lfree(sp->fts_child); ++ sp->fts_child = NULL; ++ } ++ p->fts_info = FTS_DP; ++ return (p); ++ } ++ ++ /* Rebuild if only read the names and now traversing. */ ++ if (sp->fts_child != NULL && ISSET(FTS_NAMEONLY)) { ++ CLR(FTS_NAMEONLY); ++ fts_lfree(sp->fts_child); ++ sp->fts_child = NULL; ++ } ++ ++ /* ++ * Cd to the subdirectory. ++ * ++ * If have already read and now fail to chdir, whack the list ++ * to make the names come out right, and set the parent errno ++ * so the application will eventually get an error condition. ++ * Set the FTS_DONTCHDIR flag so that when we logically change ++ * directories back to the parent we don't do a chdir. ++ * ++ * If haven't read do so. If the read fails, fts_build sets ++ * FTS_STOP or the fts_info field of the node. ++ */ ++ if (sp->fts_child != NULL) { ++ if (fts_safe_changedir(sp, p, -1, p->fts_accpath)) { ++ p->fts_errno = errno; ++ p->fts_flags |= FTS_DONTCHDIR; ++ for (p = sp->fts_child; p != NULL; ++ p = p->fts_link) ++ p->fts_accpath = ++ p->fts_parent->fts_accpath; ++ } ++ } else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) { ++ if (ISSET(FTS_STOP)) ++ return (NULL); ++ return (p); ++ } ++ p = sp->fts_child; ++ sp->fts_child = NULL; ++ sp->fts_cur = p; ++ goto name; ++ } ++ ++ /* Move to the next node on this level. */ ++next: tmp = p; ++ if ((p = p->fts_link) != NULL) { ++ sp->fts_cur = p; ++ free(tmp); ++ ++ /* ++ * If reached the top, return to the original directory (or ++ * the root of the tree), and load the paths for the next root. ++ */ ++ if (p->fts_level == FTS_ROOTLEVEL) { ++ if (FCHDIR(sp, sp->fts_rfd)) { ++ SET(FTS_STOP); ++ return (NULL); ++ } ++ fts_load(sp, p); ++ return p; ++ } ++ ++ /* ++ * User may have called fts_set on the node. If skipped, ++ * ignore. If followed, get a file descriptor so we can ++ * get back if necessary. ++ */ ++ if (p->fts_instr == FTS_SKIP) ++ goto next; ++ if (p->fts_instr == FTS_FOLLOW) { ++ p->fts_info = fts_stat(sp, p, 1); ++ if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { ++ if ((p->fts_symfd = ++ open(".", O_RDONLY, 0)) < 0) { ++ p->fts_errno = errno; ++ p->fts_info = FTS_ERR; ++ } else ++ p->fts_flags |= FTS_SYMFOLLOW; ++ } ++ p->fts_instr = FTS_NOINSTR; ++ } ++ ++name: t = sp->fts_path + NAPPEND(p->fts_parent); ++ *t++ = '/'; ++ memmove(t, p->fts_name, p->fts_namelen + 1); ++ return p; ++ } ++ ++ /* Move up to the parent node. */ ++ p = tmp->fts_parent; ++ sp->fts_cur = p; ++ free(tmp); ++ ++ if (p->fts_level == FTS_ROOTPARENTLEVEL) { ++ /* ++ * Done; free everything up and set errno to 0 so the user ++ * can distinguish between error and EOF. ++ */ ++ free(p); ++ errno = 0; ++ return (sp->fts_cur = NULL); ++ } ++ ++ /* NUL terminate the pathname. */ ++ sp->fts_path[p->fts_pathlen] = '\0'; ++ ++ /* ++ * Return to the parent directory. If at a root node or came through ++ * a symlink, go back through the file descriptor. Otherwise, cd up ++ * one directory. ++ */ ++ if (p->fts_level == FTS_ROOTLEVEL) { ++ if (FCHDIR(sp, sp->fts_rfd)) { ++ SET(FTS_STOP); ++ return (NULL); ++ } ++ } else if (p->fts_flags & FTS_SYMFOLLOW) { ++ if (FCHDIR(sp, p->fts_symfd)) { ++ saved_errno = errno; ++ (void)close(p->fts_symfd); ++ errno = saved_errno; ++ SET(FTS_STOP); ++ return (NULL); ++ } ++ (void)close(p->fts_symfd); ++ } else if (!(p->fts_flags & FTS_DONTCHDIR) && ++ fts_safe_changedir(sp, p->fts_parent, -1, "..")) { ++ SET(FTS_STOP); ++ return (NULL); ++ } ++ p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP; ++ return p; ++} ++ ++/* ++ * Fts_set takes the stream as an argument although it's not used in this ++ * implementation; it would be necessary if anyone wanted to add global ++ * semantics to fts using fts_set. An error return is allowed for similar ++ * reasons. ++ */ ++/* ARGSUSED */ ++int ++fts_set(FTS *sp, FTSENT *p, int instr) ++{ ++ if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW && ++ instr != FTS_NOINSTR && instr != FTS_SKIP) { ++ errno = EINVAL; ++ return (1); ++ } ++ p->fts_instr = instr; ++ return (0); ++} ++ ++FTSENT * ++fts_children(register FTS *sp, int instr) ++{ ++ register FTSENT *p; ++ int fd; ++ ++ if (instr != 0 && instr != FTS_NAMEONLY) { ++ errno = EINVAL; ++ return (NULL); ++ } ++ ++ /* Set current node pointer. */ ++ p = sp->fts_cur; ++ ++ /* ++ * Errno set to 0 so user can distinguish empty directory from ++ * an error. ++ */ ++ errno = 0; ++ ++ /* Fatal errors stop here. */ ++ if (ISSET(FTS_STOP)) ++ return (NULL); ++ ++ /* Return logical hierarchy of user's arguments. */ ++ if (p->fts_info == FTS_INIT) ++ return (p->fts_link); ++ ++ /* ++ * If not a directory being visited in pre-order, stop here. Could ++ * allow FTS_DNR, assuming the user has fixed the problem, but the ++ * same effect is available with FTS_AGAIN. ++ */ ++ if (p->fts_info != FTS_D /* && p->fts_info != FTS_DNR */) ++ return (NULL); ++ ++ /* Free up any previous child list. */ ++ if (sp->fts_child != NULL) ++ fts_lfree(sp->fts_child); ++ ++ if (instr == FTS_NAMEONLY) { ++ SET(FTS_NAMEONLY); ++ instr = BNAMES; ++ } else ++ instr = BCHILD; ++ ++ /* ++ * If using chdir on a relative path and called BEFORE fts_read does ++ * its chdir to the root of a traversal, we can lose -- we need to ++ * chdir into the subdirectory, and we don't know where the current ++ * directory is, so we can't get back so that the upcoming chdir by ++ * fts_read will work. ++ */ ++ if (p->fts_level != FTS_ROOTLEVEL || p->fts_accpath[0] == '/' || ++ ISSET(FTS_NOCHDIR)) ++ return (sp->fts_child = fts_build(sp, instr)); ++ ++ if ((fd = open(".", O_RDONLY, 0)) < 0) ++ return (NULL); ++ sp->fts_child = fts_build(sp, instr); ++ if (fchdir(fd)) ++ return (NULL); ++ (void)close(fd); ++ return (sp->fts_child); ++} ++ ++/* ++ * This is the tricky part -- do not casually change *anything* in here. The ++ * idea is to build the linked list of entries that are used by fts_children ++ * and fts_read. There are lots of special cases. ++ * ++ * The real slowdown in walking the tree is the stat calls. If FTS_NOSTAT is ++ * set and it's a physical walk (so that symbolic links can't be directories), ++ * we can do things quickly. First, if it's a 4.4BSD file system, the type ++ * of the file is in the directory entry. Otherwise, we assume that the number ++ * of subdirectories in a node is equal to the number of links to the parent. ++ * The former skips all stat calls. The latter skips stat calls in any leaf ++ * directories and for any files after the subdirectories in the directory have ++ * been found, cutting the stat calls by about 2/3. ++ */ ++static FTSENT * ++fts_build(register FTS *sp, int type) ++{ ++ register struct dirent *dp; ++ register FTSENT *p, *head; ++ register int nitems; ++ FTSENT *cur, *tail; ++ DIR *dirp; ++ void *oldaddr; ++ int cderrno, descend, len, level, nlinks, saved_errno, ++ nostat, doadjust; ++ size_t maxlen; ++ char *cp; ++ ++ /* Set current node pointer. */ ++ cur = sp->fts_cur; ++ ++ /* ++ * Open the directory for reading. If this fails, we're done. ++ * If being called from fts_read, set the fts_info field. ++ */ ++#if defined FTS_WHITEOUT && 0 ++ if (ISSET(FTS_WHITEOUT)) ++ oflag = DTF_NODUP|DTF_REWIND; ++ else ++ oflag = DTF_HIDEW|DTF_NODUP|DTF_REWIND; ++#else ++# define opendir2(path, flag) opendir(path) ++#endif ++ if ((dirp = opendir2(cur->fts_accpath, oflag)) == NULL) { ++ if (type == BREAD) { ++ cur->fts_info = FTS_DNR; ++ cur->fts_errno = errno; ++ } ++ return (NULL); ++ } ++ ++ /* ++ * Nlinks is the number of possible entries of type directory in the ++ * directory if we're cheating on stat calls, 0 if we're not doing ++ * any stat calls at all, -1 if we're doing stats on everything. ++ */ ++ if (type == BNAMES) { ++ nlinks = 0; ++ /* Be quiet about nostat, GCC. */ ++ nostat = 0; ++ } else if (ISSET(FTS_NOSTAT) && ISSET(FTS_PHYSICAL)) { ++ nlinks = cur->fts_nlink - (ISSET(FTS_SEEDOT) ? 0 : 2); ++ nostat = 1; ++ } else { ++ nlinks = -1; ++ nostat = 0; ++ } ++ ++#ifdef notdef ++ (void)printf("nlinks == %d (cur: %d)\n", nlinks, cur->fts_nlink); ++ (void)printf("NOSTAT %d PHYSICAL %d SEEDOT %d\n", ++ ISSET(FTS_NOSTAT), ISSET(FTS_PHYSICAL), ISSET(FTS_SEEDOT)); ++#endif ++ /* ++ * If we're going to need to stat anything or we want to descend ++ * and stay in the directory, chdir. If this fails we keep going, ++ * but set a flag so we don't chdir after the post-order visit. ++ * We won't be able to stat anything, but we can still return the ++ * names themselves. Note, that since fts_read won't be able to ++ * chdir into the directory, it will have to return different path ++ * names than before, i.e. "a/b" instead of "b". Since the node ++ * has already been visited in pre-order, have to wait until the ++ * post-order visit to return the error. There is a special case ++ * here, if there was nothing to stat then it's not an error to ++ * not be able to stat. This is all fairly nasty. If a program ++ * needed sorted entries or stat information, they had better be ++ * checking FTS_NS on the returned nodes. ++ */ ++ cderrno = 0; ++ if (nlinks || type == BREAD) { ++ if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) { ++ if (nlinks && type == BREAD) ++ cur->fts_errno = errno; ++ cur->fts_flags |= FTS_DONTCHDIR; ++ descend = 0; ++ cderrno = errno; ++ (void)closedir(dirp); ++ dirp = NULL; ++ } else ++ descend = 1; ++ } else ++ descend = 0; ++ ++ /* ++ * Figure out the max file name length that can be stored in the ++ * current path -- the inner loop allocates more path as necessary. ++ * We really wouldn't have to do the maxlen calculations here, we ++ * could do them in fts_read before returning the path, but it's a ++ * lot easier here since the length is part of the dirent structure. ++ * ++ * If not changing directories set a pointer so that can just append ++ * each new name into the path. ++ */ ++ len = NAPPEND(cur); ++ if (ISSET(FTS_NOCHDIR)) { ++ cp = sp->fts_path + len; ++ *cp++ = '/'; ++ } else { ++ /* GCC, you're too verbose. */ ++ cp = NULL; ++ } ++ len++; ++ maxlen = sp->fts_pathlen - len; ++ ++ level = cur->fts_level + 1; ++ ++ /* Read the directory, attaching each entry to the `link' pointer. */ ++ doadjust = 0; ++ for (head = tail = NULL, nitems = 0; dirp && (dp = readdir(dirp));) { ++ if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name)) ++ continue; ++ ++ if ((p = fts_alloc(sp, dp->d_name, _D_EXACT_NAMLEN (dp))) == NULL) ++ goto mem1; ++ if (_D_EXACT_NAMLEN (dp) >= maxlen) {/* include space for NUL */ ++ oldaddr = sp->fts_path; ++ if (fts_palloc(sp, _D_EXACT_NAMLEN (dp) + len + 1)) { ++ /* ++ * No more memory for path or structures. Save ++ * errno, free up the current structure and the ++ * structures already allocated. ++ */ ++mem1: saved_errno = errno; ++ free(p); ++ fts_lfree(head); ++ (void)closedir(dirp); ++ cur->fts_info = FTS_ERR; ++ SET(FTS_STOP); ++ errno = saved_errno; ++ return (NULL); ++ } ++ /* Did realloc() change the pointer? */ ++ if (oldaddr != sp->fts_path) { ++ doadjust = 1; ++ if (ISSET(FTS_NOCHDIR)) ++ cp = sp->fts_path + len; ++ } ++ maxlen = sp->fts_pathlen - len; ++ } ++ ++ if (len + _D_EXACT_NAMLEN (dp) >= USHRT_MAX) { ++ /* ++ * In an FTSENT, fts_pathlen is a u_short so it is ++ * possible to wraparound here. If we do, free up ++ * the current structure and the structures already ++ * allocated, then error out with ENAMETOOLONG. ++ */ ++ free(p); ++ fts_lfree(head); ++ (void)closedir(dirp); ++ cur->fts_info = FTS_ERR; ++ SET(FTS_STOP); ++ errno = ENAMETOOLONG; ++ return (NULL); ++ } ++ p->fts_level = level; ++ p->fts_parent = sp->fts_cur; ++ p->fts_pathlen = len + _D_EXACT_NAMLEN (dp); ++ ++#if defined FTS_WHITEOUT && 0 ++ if (dp->d_type == DT_WHT) ++ p->fts_flags |= FTS_ISW; ++#endif ++ ++#if 0 ++ /* Unreachable code. cderrno is only ever set to a nonnull ++ value if dirp is closed at the same time. But then we ++ cannot enter this loop. */ ++ if (cderrno) { ++ if (nlinks) { ++ p->fts_info = FTS_NS; ++ p->fts_errno = cderrno; ++ } else ++ p->fts_info = FTS_NSOK; ++ p->fts_accpath = cur->fts_accpath; ++ } else ++#endif ++ if (nlinks == 0 ++#if defined DT_DIR && defined _DIRENT_HAVE_D_TYPE ++ || (nostat && ++ dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN) ++#endif ++ ) { ++ p->fts_accpath = ++ ISSET(FTS_NOCHDIR) ? p->fts_path : p->fts_name; ++ p->fts_info = FTS_NSOK; ++ } else { ++ /* Build a file name for fts_stat to stat. */ ++ if (ISSET(FTS_NOCHDIR)) { ++ p->fts_accpath = p->fts_path; ++ memmove(cp, p->fts_name, p->fts_namelen + 1); ++ } else ++ p->fts_accpath = p->fts_name; ++ /* Stat it. */ ++ p->fts_info = fts_stat(sp, p, 0); ++ ++ /* Decrement link count if applicable. */ ++ if (nlinks > 0 && (p->fts_info == FTS_D || ++ p->fts_info == FTS_DC || p->fts_info == FTS_DOT)) ++ --nlinks; ++ } ++ ++ /* We walk in directory order so "ls -f" doesn't get upset. */ ++ p->fts_link = NULL; ++ if (head == NULL) ++ head = tail = p; ++ else { ++ tail->fts_link = p; ++ tail = p; ++ } ++ ++nitems; ++ } ++ if (dirp) ++ (void)closedir(dirp); ++ ++ /* ++ * If realloc() changed the address of the path, adjust the ++ * addresses for the rest of the tree and the dir list. ++ */ ++ if (doadjust) ++ fts_padjust(sp, head); ++ ++ /* ++ * If not changing directories, reset the path back to original ++ * state. ++ */ ++ if (ISSET(FTS_NOCHDIR)) { ++ if (len == sp->fts_pathlen || nitems == 0) ++ --cp; ++ *cp = '\0'; ++ } ++ ++ /* ++ * If descended after called from fts_children or after called from ++ * fts_read and nothing found, get back. At the root level we use ++ * the saved fd; if one of fts_open()'s arguments is a relative path ++ * to an empty directory, we wind up here with no other way back. If ++ * can't get back, we're done. ++ */ ++ if (descend && (type == BCHILD || !nitems) && ++ (cur->fts_level == FTS_ROOTLEVEL ? ++ FCHDIR(sp, sp->fts_rfd) : ++ fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) { ++ cur->fts_info = FTS_ERR; ++ SET(FTS_STOP); ++ fts_lfree(head); ++ return (NULL); ++ } ++ ++ /* If didn't find anything, return NULL. */ ++ if (!nitems) { ++ if (type == BREAD) ++ cur->fts_info = FTS_DP; ++ fts_lfree(head); ++ return (NULL); ++ } ++ ++ /* Sort the entries. */ ++ if (sp->fts_compar && nitems > 1) ++ head = fts_sort(sp, head, nitems); ++ return (head); ++} ++ ++static u_short ++fts_stat(FTS *sp, register FTSENT *p, int follow) ++{ ++ register FTSENT *t; ++ register dev_t dev; ++ register ino_t ino; ++ struct stat *sbp, sb; ++ int saved_errno; ++ ++ /* If user needs stat info, stat buffer already allocated. */ ++ sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp; ++ ++#if defined FTS_WHITEOUT && 0 ++ /* check for whiteout */ ++ if (p->fts_flags & FTS_ISW) { ++ if (sbp != &sb) { ++ memset(sbp, '\0', sizeof (*sbp)); ++ sbp->st_mode = S_IFWHT; ++ } ++ return (FTS_W); ++ } ++#endif ++ ++ /* ++ * If doing a logical walk, or application requested FTS_FOLLOW, do ++ * a stat(2). If that fails, check for a non-existent symlink. If ++ * fail, set the errno from the stat call. ++ */ ++ if (ISSET(FTS_LOGICAL) || follow) { ++ if (stat(p->fts_accpath, sbp)) { ++ saved_errno = errno; ++ if (!lstat(p->fts_accpath, sbp)) { ++ errno = 0; ++ return (FTS_SLNONE); ++ } ++ p->fts_errno = saved_errno; ++ goto err; ++ } ++ } else if (lstat(p->fts_accpath, sbp)) { ++ p->fts_errno = errno; ++err: memset(sbp, 0, sizeof(struct stat)); ++ return (FTS_NS); ++ } ++ ++ if (S_ISDIR(sbp->st_mode)) { ++ /* ++ * Set the device/inode. Used to find cycles and check for ++ * crossing mount points. Also remember the link count, used ++ * in fts_build to limit the number of stat calls. It is ++ * understood that these fields are only referenced if fts_info ++ * is set to FTS_D. ++ */ ++ dev = p->fts_dev = sbp->st_dev; ++ ino = p->fts_ino = sbp->st_ino; ++ p->fts_nlink = sbp->st_nlink; ++ ++ if (ISDOT(p->fts_name)) ++ return (FTS_DOT); ++ ++ /* ++ * Cycle detection is done by brute force when the directory ++ * is first encountered. If the tree gets deep enough or the ++ * number of symbolic links to directories is high enough, ++ * something faster might be worthwhile. ++ */ ++ for (t = p->fts_parent; ++ t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent) ++ if (ino == t->fts_ino && dev == t->fts_dev) { ++ p->fts_cycle = t; ++ return (FTS_DC); ++ } ++ return (FTS_D); ++ } ++ if (S_ISLNK(sbp->st_mode)) ++ return (FTS_SL); ++ if (S_ISREG(sbp->st_mode)) ++ return (FTS_F); ++ return (FTS_DEFAULT); ++} ++ ++static FTSENT * ++fts_sort(FTS *sp, FTSENT *head, register int nitems) ++{ ++ register FTSENT **ap, *p; ++ ++ /* ++ * Construct an array of pointers to the structures and call qsort(3). ++ * Reassemble the array in the order returned by qsort. If unable to ++ * sort for memory reasons, return the directory entries in their ++ * current order. Allocate enough space for the current needs plus ++ * 40 so don't realloc one entry at a time. ++ */ ++ if (nitems > sp->fts_nitems) { ++ struct _ftsent **a; ++ ++ sp->fts_nitems = nitems + 40; ++ if ((a = realloc(sp->fts_array, ++ (size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) { ++ free(sp->fts_array); ++ sp->fts_array = NULL; ++ sp->fts_nitems = 0; ++ return (head); ++ } ++ sp->fts_array = a; ++ } ++ for (ap = sp->fts_array, p = head; p; p = p->fts_link) ++ *ap++ = p; ++ qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar); ++ for (head = *(ap = sp->fts_array); --nitems; ++ap) ++ ap[0]->fts_link = ap[1]; ++ ap[0]->fts_link = NULL; ++ return (head); ++} ++ ++static FTSENT * ++fts_alloc(FTS *sp, const char *name, size_t namelen) ++{ ++ register FTSENT *p; ++ size_t len; ++ ++ /* ++ * The file name is a variable length array and no stat structure is ++ * necessary if the user has set the nostat bit. Allocate the FTSENT ++ * structure, the file name and the stat structure in one chunk, but ++ * be careful that the stat structure is reasonably aligned. Since the ++ * fts_name field is declared to be of size 1, the fts_name pointer is ++ * namelen + 2 before the first possible address of the stat structure. ++ */ ++ len = sizeof(FTSENT) + namelen; ++ if (!ISSET(FTS_NOSTAT)) ++ len += sizeof(struct stat) + ALIGNBYTES; ++ if ((p = malloc(len)) == NULL) ++ return (NULL); ++ ++ /* Copy the name and guarantee NUL termination. */ ++ memmove(p->fts_name, name, namelen); ++ p->fts_name[namelen] = '\0'; ++ ++ if (!ISSET(FTS_NOSTAT)) ++ p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2); ++ p->fts_namelen = namelen; ++ p->fts_path = sp->fts_path; ++ p->fts_errno = 0; ++ p->fts_flags = 0; ++ p->fts_instr = FTS_NOINSTR; ++ p->fts_number = 0; ++ p->fts_pointer = NULL; ++ return (p); ++} ++ ++static void ++fts_lfree(register FTSENT *head) ++{ ++ register FTSENT *p; ++ ++ /* Free a linked list of structures. */ ++ while ((p = head)) { ++ head = head->fts_link; ++ free(p); ++ } ++} ++ ++/* ++ * Allow essentially unlimited paths; find, rm, ls should all work on any tree. ++ * Most systems will allow creation of paths much longer than MAXPATHLEN, even ++ * though the kernel won't resolve them. Add the size (not just what's needed) ++ * plus 256 bytes so don't realloc the path 2 bytes at a time. ++ */ ++static int ++fts_palloc(FTS *sp, size_t more) ++{ ++ char *p; ++ ++ sp->fts_pathlen += more + 256; ++ /* ++ * Check for possible wraparound. In an FTS, fts_pathlen is ++ * a signed int but in an FTSENT it is an unsigned short. ++ * We limit fts_pathlen to USHRT_MAX to be safe in both cases. ++ */ ++ if (sp->fts_pathlen < 0 || sp->fts_pathlen >= USHRT_MAX) { ++ free(sp->fts_path); ++ sp->fts_path = NULL; ++ errno = ENAMETOOLONG; ++ return (1); ++ } ++ p = realloc(sp->fts_path, sp->fts_pathlen); ++ if (p == NULL) { ++ free(sp->fts_path); ++ sp->fts_path = NULL; ++ return 1; ++ } ++ sp->fts_path = p; ++ return 0; ++} ++ ++/* ++ * When the path is realloc'd, have to fix all of the pointers in structures ++ * already returned. ++ */ ++static void ++fts_padjust(FTS *sp, FTSENT *head) ++{ ++ FTSENT *p; ++ char *addr = sp->fts_path; ++ ++#define ADJUST(p) do { \ ++ if ((p)->fts_accpath != (p)->fts_name) { \ ++ (p)->fts_accpath = \ ++ (char *)addr + ((p)->fts_accpath - (p)->fts_path); \ ++ } \ ++ (p)->fts_path = addr; \ ++} while (0) ++ /* Adjust the current set of children. */ ++ for (p = sp->fts_child; p; p = p->fts_link) ++ ADJUST(p); ++ ++ /* Adjust the rest of the tree, including the current level. */ ++ for (p = head; p->fts_level >= FTS_ROOTLEVEL;) { ++ ADJUST(p); ++ p = p->fts_link ? p->fts_link : p->fts_parent; ++ } ++} ++ ++static size_t ++fts_maxarglen(char * const *argv) ++{ ++ size_t len, max; ++ ++ for (max = 0; *argv; ++argv) ++ if ((len = strlen(*argv)) > max) ++ max = len; ++ return (max + 1); ++} ++ ++/* ++ * Change to dir specified by fd or p->fts_accpath without getting ++ * tricked by someone changing the world out from underneath us. ++ * Assumes p->fts_dev and p->fts_ino are filled in. ++ */ ++static int ++fts_safe_changedir(FTS *sp, FTSENT *p, int fd, const char *path) ++{ ++ int ret, oerrno, newfd; ++ struct stat64 sb; ++ ++ newfd = fd; ++ if (ISSET(FTS_NOCHDIR)) ++ return (0); ++ if (fd < 0 && (newfd = open(path, O_RDONLY, 0)) < 0) ++ return (-1); ++ if (fstat64(newfd, &sb)) { ++ ret = -1; ++ goto bail; ++ } ++ if (p->fts_dev != sb.st_dev || p->fts_ino != sb.st_ino) { ++ errno = ENOENT; /* disinformation */ ++ ret = -1; ++ goto bail; ++ } ++ ret = fchdir(newfd); ++bail: ++ oerrno = errno; ++ if (fd < 0) ++ (void)close(newfd); ++ errno = oerrno; ++ return (ret); ++} +Index: b/libdwfl/fts_.h +=================================================================== +--- /dev/null ++++ b/libdwfl/fts_.h +@@ -0,0 +1,131 @@ ++/* ++ * Copyright (c) 1989, 1993 ++ * The Regents of the University of California. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 4. Neither the name of the University nor the names of its contributors ++ * may be used to endorse or promote products derived from this software ++ * without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ * ++ * @(#)fts.h 8.3 (Berkeley) 8/14/94 ++ */ ++ ++#ifndef _FTS_H ++#define _FTS_H 1 ++ ++#include ++#include ++ ++/* The fts interface is incompatible with the LFS interface which ++ transparently uses the 64-bit file access functions. */ ++#ifdef __USE_FILE_OFFSET64 ++# error " cannot be used with -D_FILE_OFFSET_BITS==64" ++#endif ++ ++ ++typedef struct { ++ struct _ftsent *fts_cur; /* current node */ ++ struct _ftsent *fts_child; /* linked list of children */ ++ struct _ftsent **fts_array; /* sort array */ ++ dev_t fts_dev; /* starting device # */ ++ char *fts_path; /* path for this descent */ ++ int fts_rfd; /* fd for root */ ++ int fts_pathlen; /* sizeof(path) */ ++ int fts_nitems; /* elements in the sort array */ ++ int (*fts_compar) (const void *, const void *); /* compare fn */ ++ ++#define FTS_COMFOLLOW 0x0001 /* follow command line symlinks */ ++#define FTS_LOGICAL 0x0002 /* logical walk */ ++#define FTS_NOCHDIR 0x0004 /* don't change directories */ ++#define FTS_NOSTAT 0x0008 /* don't get stat info */ ++#define FTS_PHYSICAL 0x0010 /* physical walk */ ++#define FTS_SEEDOT 0x0020 /* return dot and dot-dot */ ++#define FTS_XDEV 0x0040 /* don't cross devices */ ++#define FTS_WHITEOUT 0x0080 /* return whiteout information */ ++#define FTS_OPTIONMASK 0x00ff /* valid user option mask */ ++ ++#define FTS_NAMEONLY 0x0100 /* (private) child names only */ ++#define FTS_STOP 0x0200 /* (private) unrecoverable error */ ++ int fts_options; /* fts_open options, global flags */ ++} FTS; ++ ++typedef struct _ftsent { ++ struct _ftsent *fts_cycle; /* cycle node */ ++ struct _ftsent *fts_parent; /* parent directory */ ++ struct _ftsent *fts_link; /* next file in directory */ ++ long fts_number; /* local numeric value */ ++ void *fts_pointer; /* local address value */ ++ char *fts_accpath; /* access path */ ++ char *fts_path; /* root path */ ++ int fts_errno; /* errno for this node */ ++ int fts_symfd; /* fd for symlink */ ++ u_short fts_pathlen; /* strlen(fts_path) */ ++ u_short fts_namelen; /* strlen(fts_name) */ ++ ++ ino_t fts_ino; /* inode */ ++ dev_t fts_dev; /* device */ ++ nlink_t fts_nlink; /* link count */ ++ ++#define FTS_ROOTPARENTLEVEL -1 ++#define FTS_ROOTLEVEL 0 ++ short fts_level; /* depth (-1 to N) */ ++ ++#define FTS_D 1 /* preorder directory */ ++#define FTS_DC 2 /* directory that causes cycles */ ++#define FTS_DEFAULT 3 /* none of the above */ ++#define FTS_DNR 4 /* unreadable directory */ ++#define FTS_DOT 5 /* dot or dot-dot */ ++#define FTS_DP 6 /* postorder directory */ ++#define FTS_ERR 7 /* error; errno is set */ ++#define FTS_F 8 /* regular file */ ++#define FTS_INIT 9 /* initialized only */ ++#define FTS_NS 10 /* stat(2) failed */ ++#define FTS_NSOK 11 /* no stat(2) requested */ ++#define FTS_SL 12 /* symbolic link */ ++#define FTS_SLNONE 13 /* symbolic link without target */ ++#define FTS_W 14 /* whiteout object */ ++ u_short fts_info; /* user flags for FTSENT structure */ ++ ++#define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */ ++#define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */ ++ u_short fts_flags; /* private flags for FTSENT structure */ ++ ++#define FTS_AGAIN 1 /* read node again */ ++#define FTS_FOLLOW 2 /* follow symbolic link */ ++#define FTS_NOINSTR 3 /* no instructions */ ++#define FTS_SKIP 4 /* discard node */ ++ u_short fts_instr; /* fts_set() instructions */ ++ ++ struct stat *fts_statp; /* stat(2) information */ ++ char fts_name[1]; /* file name */ ++} FTSENT; ++ ++__BEGIN_DECLS ++FTSENT *fts_children (FTS *, int); ++int fts_close (FTS *); ++FTS *fts_open (char * const *, int, ++ int (*)(const FTSENT **, const FTSENT **)); ++FTSENT *fts_read (FTS *); ++int fts_set (FTS *, FTSENT *, int) __THROW; ++__END_DECLS ++ ++#endif /* fts.h */ +Index: b/libdwfl/linux-kernel-modules.c +=================================================================== +--- a/libdwfl/linux-kernel-modules.c ++++ b/libdwfl/linux-kernel-modules.c +@@ -29,7 +29,11 @@ + /* We include this before config.h because it can't handle _FILE_OFFSET_BITS. + Everything we need here is fine if its declarations just come first. */ + ++#ifdef HAVE_FTS_H + #include ++#else ++#include "fts_.h" ++#endif + + #include + diff --git a/packages/devel/elfutils/patches/elfutils-00-portability.patch b/packages/devel/elfutils/patches/elfutils-00-portability.patch new file mode 100644 index 0000000000..dd9eeb2238 --- /dev/null +++ b/packages/devel/elfutils/patches/elfutils-00-portability.patch @@ -0,0 +1,1684 @@ +--- elfutils/backends/ChangeLog ++++ elfutils/backends/ChangeLog +@@ -135,6 +135,10 @@ + * ppc_attrs.c (ppc_check_object_attribute): Handle tag + GNU_Power_ABI_Struct_Return. + ++2009-01-23 Roland McGrath ++ ++ * Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED). ++ + 2008-10-04 Ulrich Drepper + + * i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and +@@ -462,6 +466,11 @@ + * sparc_init.c: Likewise. + * x86_64_init.c: Likewise. + ++2005-11-22 Roland McGrath ++ ++ * Makefile.am (LD_AS_NEEDED): New variable, substituted by configure. ++ (libebl_%.so rule): Use it in place of -Wl,--as-needed. ++ + 2005-11-19 Roland McGrath + + * ppc64_reloc.def: REL30 -> ADDR30. +@@ -484,6 +493,9 @@ + * Makefile.am (uninstall): Don't try to remove $(pkgincludedir). + (CLEANFILES): Add libebl_$(m).so. + ++ * Makefile.am (WEXTRA): New variable, substituted by configure. ++ (AM_CFLAGS): Use it in place of -Wextra. ++ + * ppc_reloc.def: Update bits per Alan Modra . + * ppc64_reloc.def: Likewise. + +--- elfutils/backends/Makefile.am ++++ elfutils/backends/Makefile.am +@@ -111,7 +111,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a + $(LINK) -shared -o $(@:.map=.so) \ + -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ + -Wl,--version-script,$(@:.so=.map) \ +- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap) ++ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap) + $(textrel_check) + + libebl_i386.so: $(cpu_i386) +--- elfutils/backends/Makefile.in ++++ elfutils/backends/Makefile.in +@@ -38,7 +38,8 @@ build_triplet = @build@ + host_triplet = @host@ + DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/config/eu.am ChangeLog +-@MUDFLAP_TRUE@am__append_1 = -fmudflap ++@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) ++@MUDFLAP_TRUE@am__append_2 = -fmudflap + subdir = backends + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ +@@ -172,6 +173,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -201,6 +203,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = @VERSION@ ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -263,10 +266,9 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi + -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ + -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ +- $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ +- $(am__append_1) ++ $(am__append_1) $(am__append_2) + @MUDFLAP_FALSE@libmudflap = + @MUDFLAP_TRUE@libmudflap = -lmudflap + COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ +@@ -719,7 +721,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a + $(LINK) -shared -o $(@:.map=.so) \ + -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ + -Wl,--version-script,$(@:.so=.map) \ +- -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap) ++ -Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw) $(libmudflap) + $(textrel_check) + + libebl_i386.so: $(cpu_i386) +--- elfutils/ChangeLog ++++ elfutils/ChangeLog +@@ -16,6 +16,8 @@ + + 2012-01-24 Mark Wielaard + ++ * configure.ac: Wrap AC_COMPILE_IFELSE sources in AC_LANG_SOURCE. ++ + * COPYING: Fix address. Updated version from gnulib. + + 2012-01-23 Mark Wielaard +@@ -34,6 +36,9 @@ + + 2011-10-08 Mike Frysinger + ++ * configure.ac (--disable-werror): Handle it, controlling BUILD_WERROR ++ automake option. ++ + * configure.ac: Fix use of AC_ARG_ENABLE to handle $enableval correctly. + + 2011-10-02 Ulrich Drepper +@@ -55,6 +60,10 @@ + + * configure.ac (LOCALEDIR, DATADIRNAME): Removed. + ++2009-11-22 Roland McGrath ++ ++ * configure.ac: Use sed and expr instead of modern bash extensions. ++ + 2009-09-21 Ulrich Drepper + + * configure.ac: Update for more modern autoconf. +@@ -63,6 +72,10 @@ + + * configure.ac (zip_LIBS): Check for liblzma too. + ++2009-08-17 Roland McGrath ++ ++ * configure.ac: Check for -fgnu89-inline; add it to WEXTRA if it works. ++ + 2009-04-19 Roland McGrath + + * configure.ac (eu_version): Round down here, not in version.h macros. +@@ -74,6 +87,8 @@ + + 2009-01-23 Roland McGrath + ++ * configure.ac: Check for __builtin_popcount. ++ + * configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3. + + * configure.ac (__thread check): Use AC_LINK_IFELSE, in case of +@@ -154,6 +169,10 @@ + * configure.ac: Add dummy automake conditional to get dependencies + for non-generic linker right. See src/Makefile.am. + ++2005-11-22 Roland McGrath ++ ++ * configure.ac: Check for --as-needed linker option. ++ + 2005-11-18 Roland McGrath + + * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable. +@@ -201,6 +220,17 @@ + * Makefile.am (all_SUBDIRS): Add libdwfl. + * configure.ac: Write libdwfl/Makefile. + ++2005-05-31 Roland McGrath ++ ++ * configure.ac (WEXTRA): Check for -Wextra and set this substitution. ++ ++ * configure.ac: Check for struct stat st_?tim members. ++ * src/strip.c (process_file): Use st_?time if st_?tim are not there. ++ ++ * configure.ac: Check for futimes function. ++ * src/strip.c (handle_elf) [! HAVE_FUTIMES]: Use utimes instead. ++ (handle_ar) [! HAVE_FUTIMES]: Likewise. ++ + 2005-05-19 Roland McGrath + + * configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros. +--- elfutils/config/ChangeLog ++++ elfutils/config/ChangeLog +@@ -19,6 +19,10 @@ + + * known-dwarf.awk: Use gawk. + ++2011-10-08 Mike Frysinger ++ ++ * eu.am [BUILD_WERROR]: Conditionalize -Werror use on this. ++ + 2010-07-02 Ulrich Drepper + + * elfutils.spec.in: Add more BuildRequires. +--- elfutils/config/eu.am ++++ elfutils/config/eu.am +@@ -1,6 +1,6 @@ + ## Common automake fragments for elfutils subdirectory makefiles. + ## +-## Copyright (C) 2010 Red Hat, Inc. ++## Copyright (C) 2010-2011 Red Hat, Inc. + ## + ## This file is part of elfutils. + ## +@@ -29,14 +29,20 @@ + ## not, see . + ## + ++WEXTRA = @WEXTRA@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ ++ + DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"' + INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. + AM_CFLAGS = -std=gnu99 -Wall -Wshadow \ +- $(if $($(*F)_no_Werror),,-Werror) \ +- $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ ++ $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \ + $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \ + $($(*F)_CFLAGS) + ++if BUILD_WERROR ++AM_CFLAGS += $(if $($(*F)_no_Werror),,-Werror) ++endif ++ + if MUDFLAP + AM_CFLAGS += -fmudflap + libmudflap = -lmudflap +--- elfutils/config/Makefile.in ++++ elfutils/config/Makefile.in +@@ -76,6 +76,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -105,6 +106,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = @VERSION@ ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +--- elfutils/config.h.in ++++ elfutils/config.h.in +@@ -6,6 +6,9 @@ + /* Defined if libdw should support GNU ref_alt FORM, dwz multi files. */ + #undef ENABLE_DWZ + ++/* Have __builtin_popcount. */ ++#undef HAVE_BUILTIN_POPCOUNT ++ + /* $libdir subdirectory containing libebl modules. */ + #undef LIBEBL_SUBDIR + +@@ -64,4 +67,7 @@ + /* Define for large files, on AIX-style hosts. */ + #undef _LARGE_FILES + ++/* Stubbed out if missing compiler support. */ ++#undef __thread ++ + #include +--- elfutils/configure ++++ elfutils/configure +@@ -598,6 +598,8 @@ ZLIB_TRUE + LIBEBL_SUBDIR + TESTS_RPATH_FALSE + TESTS_RPATH_TRUE ++BUILD_WERROR_FALSE ++BUILD_WERROR_TRUE + BUILD_STATIC_FALSE + BUILD_STATIC_TRUE + GCOV_FALSE +@@ -612,6 +614,8 @@ NEVER_TRUE + base_cpu + NATIVE_LD_FALSE + NATIVE_LD_TRUE ++LD_AS_NEEDED ++WEXTRA + LEXLIB + LEX_OUTPUT_ROOT + LEX +@@ -725,6 +729,7 @@ enable_mudflap + enable_debugpred + enable_gprof + enable_gcov ++enable_werror + enable_tests_rpath + enable_libebl_subdir + with_zlib +@@ -1378,6 +1383,7 @@ Optional Features: + prediction + --enable-gprof build binaries with gprof support + --enable-gcov build binaries with gcov support ++ --disable-werror do not build with -Werror + --enable-tests-rpath build $ORIGIN-using rpath into tests + --enable-libebl-subdir=DIR + install libebl_CPU modules in $(libdir)/DIR +@@ -3917,6 +3923,130 @@ if test "x$ac_cv_c99" != xyes; then : + as_fn_error $? "gcc with C99 support required" "$LINENO" 5 + fi + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra option to $CC" >&5 ++$as_echo_n "checking for -Wextra option to $CC... " >&6; } ++if ${ac_cv_cc_wextra+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ old_CFLAGS="$CFLAGS" ++CFLAGS="$CFLAGS -Wextra" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++void foo (void) { } ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_cc_wextra=yes ++else ++ ac_cv_cc_wextra=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++CFLAGS="$old_CFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_wextra" >&5 ++$as_echo "$ac_cv_cc_wextra" >&6; } ++ ++if test "x$ac_cv_cc_wextra" = xyes; then : ++ WEXTRA=-Wextra ++else ++ WEXTRA=-W ++fi ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fgnu89-inline option to $CC" >&5 ++$as_echo_n "checking for -fgnu89-inline option to $CC... " >&6; } ++if ${ac_cv_cc_gnu89_inline+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ old_CFLAGS="$CFLAGS" ++CFLAGS="$CFLAGS -fgnu89-inline -Werror" ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++void foo (void) ++{ ++ inline void bar (void) {} ++ bar (); ++} ++extern inline void baz (void) {} ++ ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_cc_gnu89_inline=yes ++else ++ ac_cv_cc_gnu89_inline=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++CFLAGS="$old_CFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_gnu89_inline" >&5 ++$as_echo "$ac_cv_cc_gnu89_inline" >&6; } ++if test "x$ac_cv_cc_gnu89_inline" = xyes; then : ++ WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline" ++fi ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --as-needed linker option" >&5 ++$as_echo_n "checking for --as-needed linker option... " >&6; } ++if ${ac_cv_as_needed+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat > conftest.c <&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; } ++then ++ ac_cv_as_needed=yes ++else ++ ac_cv_as_needed=no ++fi ++rm -f conftest* ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_as_needed" >&5 ++$as_echo "$ac_cv_as_needed" >&6; } ++if test "x$ac_cv_as_needed" = xyes; then : ++ LD_AS_NEEDED=-Wl,--as-needed ++else ++ LD_AS_NEEDED= ++fi ++ ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5 ++$as_echo_n "checking for __builtin_popcount... " >&6; } ++if ${ac_cv_popcount+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++exit (__builtin_popcount (127)); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_popcount=yes ++else ++ ac_cv_popcount=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_popcount" >&5 ++$as_echo "$ac_cv_popcount" >&6; } ++if test "x$ac_cv_popcount" = xyes; then : ++ ++$as_echo "#define HAVE_BUILTIN_POPCOUNT 1" >>confdefs.h ++ ++fi ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread support" >&5 + $as_echo_n "checking for __thread support... " >&6; } + if ${ac_cv_tls+:} false; then : +@@ -3953,7 +4083,13 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tls" >&5 + $as_echo "$ac_cv_tls" >&6; } + if test "x$ac_cv_tls" != xyes; then : +- as_fn_error $? "__thread support required" "$LINENO" 5 ++ if test "$use_locks" = yes; then : ++ as_fn_error $? "--enable-thread-safety requires __thread support" "$LINENO" 5 ++else ++ ++$as_echo "#define __thread /* empty: no multi-thread support */" >>confdefs.h ++ ++fi + fi + + # Check whether --enable-largefile was given. +@@ -4302,6 +4438,22 @@ else + fi + + ++# Check whether --enable-werror was given. ++if test "${enable_werror+set}" = set; then : ++ enableval=$enable_werror; enable_werror=$enableval ++else ++ enable_werror=yes ++fi ++ ++ if test "$enable_werror" = yes; then ++ BUILD_WERROR_TRUE= ++ BUILD_WERROR_FALSE='#' ++else ++ BUILD_WERROR_TRUE='#' ++ BUILD_WERROR_FALSE= ++fi ++ ++ + # Check whether --enable-tests-rpath was given. + if test "${enable_tests_rpath+set}" = set; then : + enableval=$enable_tests_rpath; tests_use_rpath=$enableval +@@ -5022,7 +5174,7 @@ case "$eu_version" in + esac + + # Round up to the next release API (x.y) version. +-eu_version=$(( (eu_version + 999) / 1000 )) ++eu_version=`expr \( $eu_version + 999 \) / 1000` + + cat >confcache <<\_ACEOF + # This file is a shell script that caches the results of configure +@@ -5185,6 +5337,10 @@ if test -z "${BUILD_STATIC_TRUE}" && tes + as_fn_error $? "conditional \"BUILD_STATIC\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${BUILD_WERROR_TRUE}" && test -z "${BUILD_WERROR_FALSE}"; then ++ as_fn_error $? "conditional \"BUILD_WERROR\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${TESTS_RPATH_TRUE}" && test -z "${TESTS_RPATH_FALSE}"; then + as_fn_error $? "conditional \"TESTS_RPATH\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 +--- elfutils/configure.ac ++++ elfutils/configure.ac +@@ -90,6 +90,54 @@ CFLAGS="$old_CFLAGS"]) + AS_IF([test "x$ac_cv_c99" != xyes], + AC_MSG_ERROR([gcc with C99 support required])) + ++AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, [dnl ++old_CFLAGS="$CFLAGS" ++CFLAGS="$CFLAGS -Wextra" ++AC_COMPILE_IFELSE([AC_LANG_SOURCE([void foo (void) { }])], ++ ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no) ++CFLAGS="$old_CFLAGS"]) ++AC_SUBST(WEXTRA) ++AS_IF([test "x$ac_cv_cc_wextra" = xyes], [WEXTRA=-Wextra], [WEXTRA=-W]) ++ ++AC_CACHE_CHECK([for -fgnu89-inline option to $CC], ac_cv_cc_gnu89_inline, [dnl ++old_CFLAGS="$CFLAGS" ++CFLAGS="$CFLAGS -fgnu89-inline -Werror" ++AC_COMPILE_IFELSE([AC_LANG_SOURCE([ ++void foo (void) ++{ ++ inline void bar (void) {} ++ bar (); ++} ++extern inline void baz (void) {} ++])], ac_cv_cc_gnu89_inline=yes, ac_cv_cc_gnu89_inline=no) ++CFLAGS="$old_CFLAGS"]) ++AS_IF([test "x$ac_cv_cc_gnu89_inline" = xyes], ++ [WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"]) ++ ++AC_CACHE_CHECK([for --as-needed linker option], ++ ac_cv_as_needed, [dnl ++cat > conftest.c <&AS_MESSAGE_LOG_FD]) ++then ++ ac_cv_as_needed=yes ++else ++ ac_cv_as_needed=no ++fi ++rm -f conftest*]) ++AS_IF([test "x$ac_cv_as_needed" = xyes], ++ [LD_AS_NEEDED=-Wl,--as-needed], [LD_AS_NEEDED=]) ++AC_SUBST(LD_AS_NEEDED) ++ ++AC_CACHE_CHECK([for __builtin_popcount], ac_cv_popcount, [dnl ++AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[exit (__builtin_popcount (127));]])], ++ ac_cv_popcount=yes, ac_cv_popcount=no)]) ++AS_IF([test "x$ac_cv_popcount" = xyes], ++ [AC_DEFINE([HAVE_BUILTIN_POPCOUNT], [1], [Have __builtin_popcount.])]) ++ + AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl + # Use the same flags that we use for our DSOs, so the test is representative. + # Some old compiler/linker/libc combinations fail some ways and not others. +@@ -105,7 +153,10 @@ static __thread int a; int foo (int b) { + CFLAGS="$save_CFLAGS" + LDFLAGS="$save_LDFLAGS"]) + AS_IF([test "x$ac_cv_tls" != xyes], +- AC_MSG_ERROR([__thread support required])) ++ [AS_IF([test "$use_locks" = yes], ++ [AC_MSG_ERROR([--enable-thread-safety requires __thread support])], ++ [AC_DEFINE([__thread], [/* empty: no multi-thread support */], ++ [Stubbed out if missing compiler support.])])]) + + dnl This test must come as early as possible after the compiler configuration + dnl tests, because the choice of the file model can (in principle) affect +@@ -193,6 +244,11 @@ AM_CONDITIONAL(GCOV, test "$use_gcov" = + AM_CONDITIONAL(BUILD_STATIC, [dnl + test "$use_mudflap" = yes -o "$use_gprof" = yes -o "$use_gcov" = yes]) + ++AC_ARG_ENABLE([werror], ++AS_HELP_STRING([--disable-werror],[do not build with -Werror]), ++ [enable_werror=$enableval], [enable_werror=yes]) ++AM_CONDITIONAL(BUILD_WERROR, test "$enable_werror" = yes) ++ + AC_ARG_ENABLE([tests-rpath], + AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]), + [tests_use_rpath=$enableval], [tests_use_rpath=no]) +@@ -304,6 +360,6 @@ case "$eu_version" in + esac + + # Round up to the next release API (x.y) version. +-eu_version=$(( (eu_version + 999) / 1000 )) ++eu_version=`expr \( $eu_version + 999 \) / 1000` + + AC_OUTPUT +--- elfutils/lib/ChangeLog ++++ elfutils/lib/ChangeLog +@@ -35,6 +35,9 @@ + + 2009-01-23 Roland McGrath + ++ * eu-config.h [! HAVE_BUILTIN_POPCOUNT] ++ (__builtin_popcount): New inline function. ++ + * eu-config.h: Add multiple inclusion protection. + + 2009-01-17 Ulrich Drepper +@@ -91,6 +94,11 @@ + * Makefile.am (libeu_a_SOURCES): Add it. + * system.h: Declare crc32_file. + ++2005-02-07 Roland McGrath ++ ++ * Makefile.am (WEXTRA): New variable, substituted by configure. ++ (AM_CFLAGS): Use it in place of -Wextra. ++ + 2005-04-30 Ulrich Drepper + + * Makefile.am: Use -ffunction-sections for xmalloc.c. +--- elfutils/lib/eu-config.h ++++ elfutils/lib/eu-config.h +@@ -162,6 +162,17 @@ asm (".section predict_data, \"aw\"; .pr + /* This macro is used by the tests conditionalize for standalone building. */ + #define ELFUTILS_HEADER(name) + ++#ifndef HAVE_BUILTIN_POPCOUNT ++# define __builtin_popcount hakmem_popcount ++static inline unsigned int __attribute__ ((unused)) ++hakmem_popcount (unsigned int x) ++{ ++ /* HAKMEM 169 */ ++ unsigned int n = x - ((x >> 1) & 033333333333) - ((x >> 2) & 011111111111); ++ return ((n + (n >> 3)) & 030707070707) % 63; ++} ++#endif /* HAVE_BUILTIN_POPCOUNT */ ++ + + #ifdef SHARED + # define OLD_VERSION(name, version) \ +--- elfutils/lib/Makefile.in ++++ elfutils/lib/Makefile.in +@@ -37,7 +37,8 @@ build_triplet = @build@ + host_triplet = @host@ + DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/config/eu.am ChangeLog +-@MUDFLAP_TRUE@am__append_1 = -fmudflap ++@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) ++@MUDFLAP_TRUE@am__append_2 = -fmudflap + subdir = lib + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ +@@ -100,6 +101,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -129,6 +131,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = @VERSION@ ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -190,10 +193,9 @@ zip_LIBS = @zip_LIBS@ + INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ + -I$(srcdir)/../libelf + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ +- $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ +- $(am__append_1) -fpic ++ $(am__append_1) $(am__append_2) -fpic + @MUDFLAP_FALSE@libmudflap = + @MUDFLAP_TRUE@libmudflap = -lmudflap + COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ +--- elfutils/libasm/ChangeLog ++++ elfutils/libasm/ChangeLog +@@ -71,6 +71,11 @@ + * asm_error.c: Add new error ASM_E_IOERROR. + * libasmP.h: Add ASM_E_IOERROR definition. + ++2005-05-31 Roland McGrath ++ ++ * Makefile.am (WEXTRA): New variable, substituted by configure. ++ (AM_CFLAGS): Use it in place of -Wextra. ++ + 2005-02-15 Ulrich Drepper + + * Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2. +--- elfutils/libasm/Makefile.in ++++ elfutils/libasm/Makefile.in +@@ -39,10 +39,11 @@ host_triplet = @host@ + DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/config/eu.am ChangeLog +-@MUDFLAP_TRUE@am__append_1 = -fmudflap ++@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) ++@MUDFLAP_TRUE@am__append_2 = -fmudflap + @MUDFLAP_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1) + @MUDFLAP_TRUE@am_libasm_pic_a_OBJECTS = +-@MUDFLAP_FALSE@@USE_LOCKS_TRUE@am__append_2 = -lpthread ++@MUDFLAP_FALSE@@USE_LOCKS_TRUE@am__append_3 = -lpthread + subdir = libasm + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ +@@ -147,6 +148,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -176,6 +178,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = 1 ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -238,10 +241,9 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi + -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl \ + -I$(top_srcdir)/libdw + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ +- $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ +- $(am__append_1) ++ $(am__append_1) $(am__append_2) + @MUDFLAP_FALSE@libmudflap = + @MUDFLAP_TRUE@libmudflap = -lmudflap + COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ +@@ -270,7 +272,7 @@ libasm_a_SOURCES = asm_begin.c asm_abort + + @MUDFLAP_FALSE@libasm_pic_a_SOURCES = + @MUDFLAP_FALSE@am_libasm_pic_a_OBJECTS = $(libasm_a_SOURCES:.c=.os) +-@MUDFLAP_FALSE@libasm_so_LDLIBS = $(am__append_2) ++@MUDFLAP_FALSE@libasm_so_LDLIBS = $(am__append_3) + @MUDFLAP_FALSE@libasm_so_SOURCES = + noinst_HEADERS = libasmP.h symbolhash.h + EXTRA_DIST = libasm.map +--- elfutils/libcpu/ChangeLog ++++ elfutils/libcpu/ChangeLog +@@ -38,6 +38,9 @@ + + 2009-01-23 Roland McGrath + ++ * i386_disasm.c (i386_disasm): Add abort after assert-constant for old ++ compilers that don't realize it's noreturn. ++ + * Makefile.am (i386_parse_CFLAGS): Use quotes around command + substitution that can produce leading whitespace. + +@@ -367,6 +370,11 @@ + * defs/i386.doc: New file. + * defs/x86_64: New file. + ++2005-04-04 Roland McGrath ++ ++ * Makefile.am (WEXTRA): New variable, substituted by configure. ++ (AM_CFLAGS): Use it instead of -Wextra. ++ + 2005-02-15 Ulrich Drepper + + * Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2. +--- elfutils/libcpu/i386_disasm.c ++++ elfutils/libcpu/i386_disasm.c +@@ -822,6 +822,7 @@ i386_disasm (const uint8_t **startp, con + + default: + assert (! "INVALID not handled"); ++ abort (); + } + } + else +--- elfutils/libcpu/Makefile.in ++++ elfutils/libcpu/Makefile.in +@@ -39,7 +39,8 @@ host_triplet = @host@ + DIST_COMMON = $(am__noinst_HEADERS_DIST) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/config/eu.am ChangeLog \ + i386_lex.c i386_parse.c +-@MUDFLAP_TRUE@am__append_1 = -fmudflap ++@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) ++@MUDFLAP_TRUE@am__append_2 = -fmudflap + @MAINTAINER_MODE_TRUE@noinst_PROGRAMS = i386_gendis$(EXEEXT) + subdir = libcpu + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +@@ -117,6 +118,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = lex.$( ++ ++ * dwarf_begin_elf.c: Add fallback for be64toh if not defined. ++ + 2011-07-14 Mark Wielaard + + * libdw.h (dwarf_offdie): Fix documentation to mention .debug_info. +@@ -441,6 +445,10 @@ + + * dwarf_hasattr_integrate.c: Integrate DW_AT_specification too. + ++2009-08-17 Roland McGrath ++ ++ * libdw.h: Disable extern inlines for GCC 4.2. ++ + 2009-08-10 Roland McGrath + + * dwarf_getscopevar.c: Use dwarf_diename. +@@ -1209,6 +1217,11 @@ + + 2005-05-31 Roland McGrath + ++ * Makefile.am (WEXTRA): New variable, substituted by configure. ++ (AM_CFLAGS): Use it in place of -Wextra. ++ ++2005-05-31 Roland McGrath ++ + * dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to + formref offset. + +--- elfutils/libdw/dwarf_begin_elf.c ++++ elfutils/libdw/dwarf_begin_elf.c +@@ -48,6 +48,14 @@ + #if USE_ZLIB + # include + # define crc32 loser_crc32 ++# ifndef be64toh ++# include ++# if __BYTE_ORDER == __LITTLE_ENDIAN ++# define be64toh(x) bswap_64 (x) ++# else ++# define be64toh(x) (x) ++# endif ++# endif + # include + # undef crc32 + #endif +--- elfutils/libdw/libdw.h ++++ elfutils/libdw/libdw.h +@@ -831,7 +831,7 @@ extern Dwarf_OOM dwarf_new_oom_handler ( + + + /* Inline optimizations. */ +-#ifdef __OPTIMIZE__ ++#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2) + /* Return attribute code of given attribute. */ + __libdw_extern_inline unsigned int + dwarf_whatattr (Dwarf_Attribute *attr) +--- elfutils/libdw/Makefile.in ++++ elfutils/libdw/Makefile.in +@@ -39,8 +39,9 @@ host_triplet = @host@ + DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) \ + $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/config/eu.am ChangeLog +-@MUDFLAP_TRUE@am__append_1 = -fmudflap +-@BUILD_STATIC_TRUE@am__append_2 = -fpic ++@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) ++@MUDFLAP_TRUE@am__append_2 = -fmudflap ++@BUILD_STATIC_TRUE@am__append_3 = -fpic + @MUDFLAP_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1) + @MUDFLAP_TRUE@am_libdw_pic_a_OBJECTS = + subdir = libdw +@@ -192,6 +193,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -221,6 +223,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = 1 ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -282,10 +285,9 @@ zip_LIBS = @zip_LIBS@ + INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. \ + -I$(srcdir)/../libelf + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ +- $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ +- $(am__append_1) $(am__append_2) ++ $(am__append_1) $(am__append_2) $(am__append_3) + @MUDFLAP_FALSE@libmudflap = + @MUDFLAP_TRUE@libmudflap = -lmudflap + COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ +--- elfutils/libdwfl/ChangeLog ++++ elfutils/libdwfl/ChangeLog +@@ -1420,6 +1420,11 @@ + + 2005-07-21 Roland McGrath + ++ * Makefile.am (WEXTRA): New variable, substituted by configure. ++ (AM_CFLAGS): Use it in place of -Wextra. ++ ++2005-07-21 Roland McGrath ++ + * Makefile.am (noinst_HEADERS): Add loc2c.c. + + * test2.c (main): Check sscanf result to quiet warning. +--- elfutils/libdwfl/Makefile.in ++++ elfutils/libdwfl/Makefile.in +@@ -38,11 +38,12 @@ host_triplet = @host@ + DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/config/eu.am ChangeLog +-@MUDFLAP_TRUE@am__append_1 = -fmudflap +-@MUDFLAP_FALSE@am__append_2 = libdwfl_pic.a +-@ZLIB_TRUE@am__append_3 = gzip.c +-@BZLIB_TRUE@am__append_4 = bzip2.c +-@LZMA_TRUE@am__append_5 = lzma.c ++@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) ++@MUDFLAP_TRUE@am__append_2 = -fmudflap ++@MUDFLAP_FALSE@am__append_3 = libdwfl_pic.a ++@ZLIB_TRUE@am__append_4 = gzip.c ++@BZLIB_TRUE@am__append_5 = bzip2.c ++@LZMA_TRUE@am__append_6 = lzma.c + @MUDFLAP_TRUE@am_libdwfl_pic_a_OBJECTS = + subdir = libdwfl + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +@@ -182,6 +183,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -211,6 +213,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = 1 ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -273,10 +276,9 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi + -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ + -I$(srcdir)/../libdw + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ +- $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ +- $(am__append_1) ++ $(am__append_1) $(am__append_2) + @MUDFLAP_FALSE@libmudflap = + @MUDFLAP_TRUE@libmudflap = -lmudflap + COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ +@@ -284,7 +286,7 @@ COMPILE.os = $(filter-out -fprofile-arcs + + CLEANFILES = *.gcno *.gcda $(am_libdwfl_pic_a_OBJECTS) + textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi +-noinst_LIBRARIES = libdwfl.a $(am__append_2) ++noinst_LIBRARIES = libdwfl.a $(am__append_3) + pkginclude_HEADERS = libdwfl.h + libdwfl_a_SOURCES = dwfl_begin.c dwfl_end.c dwfl_error.c \ + dwfl_version.c dwfl_module.c dwfl_report_elf.c relocate.c \ +@@ -305,8 +307,8 @@ libdwfl_a_SOURCES = dwfl_begin.c dwfl_en + dwfl_module_getsym.c dwfl_module_addrname.c \ + dwfl_module_addrsym.c dwfl_module_return_value_location.c \ + dwfl_module_register_names.c dwfl_segment_report_module.c \ +- link_map.c core-file.c open.c image-header.c $(am__append_3) \ +- $(am__append_4) $(am__append_5) ++ link_map.c core-file.c open.c image-header.c $(am__append_4) \ ++ $(am__append_5) $(am__append_6) + @MUDFLAP_FALSE@libdwfl = $(libdw) + @MUDFLAP_TRUE@libdwfl = libdwfl.a $(libdw) $(libebl) $(libelf) $(libeu) + @MUDFLAP_FALSE@libdw = ../libdw/libdw.so +--- elfutils/libebl/ChangeLog ++++ elfutils/libebl/ChangeLog +@@ -658,6 +658,11 @@ + * Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency + tracking works right. + ++2005-05-31 Roland McGrath ++ ++ * Makefile.am (WEXTRA): New variable, substituted by configure. ++ (AM_CFLAGS): Use it in place of -Wextra. ++ + 2005-05-21 Ulrich Drepper + + * libebl_x86_64.map: Add x86_64_core_note. +--- elfutils/libebl/Makefile.in ++++ elfutils/libebl/Makefile.in +@@ -38,7 +38,8 @@ host_triplet = @host@ + DIST_COMMON = $(noinst_HEADERS) $(pkginclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/config/eu.am ChangeLog +-@MUDFLAP_TRUE@am__append_1 = -fmudflap ++@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) ++@MUDFLAP_TRUE@am__append_2 = -fmudflap + subdir = libebl + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ +@@ -144,6 +145,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -173,6 +175,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = 1 ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -235,10 +238,9 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi + -I$(srcdir)/../libelf -I$(srcdir)/../libdw \ + -I$(srcdir)/../libasm + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ +- $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ +- $(am__append_1) -fpic ++ $(am__append_1) $(am__append_2) -fpic + @MUDFLAP_FALSE@libmudflap = + @MUDFLAP_TRUE@libmudflap = -lmudflap + COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ +--- elfutils/libelf/ChangeLog ++++ elfutils/libelf/ChangeLog +@@ -34,6 +34,11 @@ + + * elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check. + ++2011-03-10 Roland McGrath ++ ++ * gnuhash_xlate.h (elf_cvt_gnuhash): Avoid post-increment in bswap_32 ++ argument, since some implementations are buggy macros. ++ + 2011-02-26 Mark Wielaard + + * elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini. +@@ -711,6 +716,11 @@ + + * elf.h: Update from glibc. + ++2005-05-31 Roland McGrath ++ ++ * Makefile.am (WEXTRA): New variable, substituted by configure. ++ (AM_CFLAGS): Use it in place of -Wextra. ++ + 2005-05-08 Roland McGrath + + * elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now. +--- elfutils/libelf/common.h ++++ elfutils/libelf/common.h +@@ -139,7 +139,7 @@ libelf_release_all (Elf *elf) + (Var) = (sizeof (Var) == 1 \ + ? (unsigned char) (Var) \ + : (sizeof (Var) == 2 \ +- ? bswap_16 (Var) \ ++ ? (unsigned short int) bswap_16 (Var) \ + : (sizeof (Var) == 4 \ + ? bswap_32 (Var) \ + : bswap_64 (Var)))) +@@ -148,7 +148,7 @@ libelf_release_all (Elf *elf) + (Dst) = (sizeof (Var) == 1 \ + ? (unsigned char) (Var) \ + : (sizeof (Var) == 2 \ +- ? bswap_16 (Var) \ ++ ? (unsigned short int) bswap_16 (Var) \ + : (sizeof (Var) == 4 \ + ? bswap_32 (Var) \ + : bswap_64 (Var)))) +--- elfutils/libelf/gnuhash_xlate.h ++++ elfutils/libelf/gnuhash_xlate.h +@@ -1,5 +1,5 @@ + /* Conversion functions for versioning information. +- Copyright (C) 2006, 2007 Red Hat, Inc. ++ Copyright (C) 2006-2011 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 2006. + +@@ -68,7 +68,9 @@ elf_cvt_gnuhash (void *dest, const void + dest32 = (Elf32_Word *) &dest64[bitmask_words]; + while (len >= 4) + { +- *dest32++ = bswap_32 (*src32++); ++ *dest32 = bswap_32 (*src32); ++ ++dest32; ++ ++src32; + len -= 4; + } + } +--- elfutils/libelf/Makefile.in ++++ elfutils/libelf/Makefile.in +@@ -39,11 +39,12 @@ host_triplet = @host@ + DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) \ + $(pkginclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/config/eu.am ChangeLog +-@MUDFLAP_TRUE@am__append_1 = -fmudflap +-@BUILD_STATIC_TRUE@am__append_2 = -fpic ++@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) ++@MUDFLAP_TRUE@am__append_2 = -fmudflap ++@BUILD_STATIC_TRUE@am__append_3 = -fpic + @MUDFLAP_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1) + @MUDFLAP_TRUE@am_libelf_pic_a_OBJECTS = +-@MUDFLAP_FALSE@@USE_LOCKS_TRUE@am__append_3 = -lpthread ++@MUDFLAP_FALSE@@USE_LOCKS_TRUE@am__append_4 = -lpthread + subdir = libelf + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ +@@ -189,6 +190,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -218,6 +220,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = 1 ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -278,10 +281,9 @@ top_srcdir = @top_srcdir@ + zip_LIBS = @zip_LIBS@ + INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ +- $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ +- $(am__append_1) $(am__append_2) ++ $(am__append_1) $(am__append_2) $(am__append_3) + @MUDFLAP_FALSE@libmudflap = + @MUDFLAP_TRUE@libmudflap = -lmudflap + COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ +@@ -346,7 +348,7 @@ libelf_a_SOURCES = elf_version.c elf_has + + @MUDFLAP_FALSE@libelf_pic_a_SOURCES = + @MUDFLAP_FALSE@am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os) +-@MUDFLAP_FALSE@libelf_so_LDLIBS = $(am__append_3) ++@MUDFLAP_FALSE@libelf_so_LDLIBS = $(am__append_4) + @MUDFLAP_FALSE@libelf_so_SOURCES = + noinst_HEADERS = elf.h abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \ + version_xlate.h gnuhash_xlate.h note_xlate.h dl-hash.h +--- elfutils/m4/Makefile.in ++++ elfutils/m4/Makefile.in +@@ -75,6 +75,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -104,6 +105,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = @VERSION@ ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +--- elfutils/Makefile.in ++++ elfutils/Makefile.in +@@ -155,6 +155,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -184,6 +185,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = @VERSION@ ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +--- elfutils/src/addr2line.c ++++ elfutils/src/addr2line.c +@@ -447,10 +447,10 @@ handle_address (const char *string, Dwfl + bool parsed = false; + int i, j; + char *name = NULL; +- if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2 ++ if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2 + && string[i] == '\0') + parsed = adjust_to_section (name, &addr, dwfl); +- switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j)) ++ switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j)) + { + default: + break; +--- elfutils/src/ChangeLog ++++ elfutils/src/ChangeLog +@@ -606,8 +606,16 @@ + * readelf.c (attr_callback): Use print_block only when we don't use + print_ops. + ++2009-08-17 Roland McGrath ++ ++ * ld.h: Disable extern inlines for GCC 4.2. ++ + 2009-08-14 Roland McGrath + ++ * strings.c (read_block): Conditionalize posix_fadvise use ++ on [POSIX_FADV_SEQUENTIAL]. ++ From Petr Salinger . ++ + * ar.c (do_oper_extract): Use pathconf instead of statfs. + + 2009-08-01 Ulrich Drepper +@@ -771,6 +779,8 @@ + * readelf.c (print_debug_frame_section): Use t instead of j formats + for ptrdiff_t OFFSET. + ++ * addr2line.c (handle_address): Use %a instead of %m for compatibility. ++ + 2009-01-21 Ulrich Drepper + + * elflint.c (check_program_header): Fix typo in .eh_frame_hdr section +@@ -954,6 +964,11 @@ + that matches its PT_LOAD's p_flags &~ PF_W. On sparc, PF_X really + is valid in RELRO. + ++2008-03-01 Roland McGrath ++ ++ * readelf.c (dump_archive_index): Tweak portability hack ++ to match [__GNUC__ < 4] too. ++ + 2008-02-29 Roland McGrath + + * readelf.c (print_attributes): Add a cast. +@@ -1205,6 +1220,8 @@ + + * readelf.c (hex_dump): Fix rounding error in whitespace calculation. + ++ * Makefile.am (readelf_no_Werror): New variable. ++ + 2007-10-15 Roland McGrath + + * make-debug-archive.in: New file. +@@ -1644,6 +1661,10 @@ + * elflint.c (valid_e_machine): Add EM_ALPHA. + Reported by Christian Aichinger . + ++ * strings.c (map_file): Define POSIX_MADV_SEQUENTIAL to ++ MADV_SEQUENTIAL if undefined. Don't call posix_madvise ++ if neither is defined. ++ + 2006-08-08 Ulrich Drepper + + * elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB. +@@ -1720,6 +1741,10 @@ + * Makefile.am: Add hacks to create dependency files for non-generic + linker. + ++2006-04-05 Roland McGrath ++ ++ * strings.c (MAP_POPULATE): Define to 0 if undefined. ++ + 2006-06-12 Ulrich Drepper + + * ldgeneric.c (ld_generic_generate_sections): Don't create .interp +@@ -2068,6 +2093,11 @@ + * readelf.c (print_debug_loc_section): Fix indentation for larger + address size. + ++2005-05-31 Roland McGrath ++ ++ * Makefile.am (WEXTRA): New variable, substituted by configure. ++ (AM_CFLAGS): Use it in place of -Wextra. ++ + 2005-05-30 Roland McGrath + + * readelf.c (print_debug_line_section): Print section offset of each +--- elfutils/src/findtextrel.c ++++ elfutils/src/findtextrel.c +@@ -496,7 +496,11 @@ ptrcompare (const void *p1, const void * + + + static void +-check_rel (size_t nsegments, struct segments segments[nsegments], ++check_rel (size_t nsegments, struct segments segments[ ++#if __GNUC__ >= 4 ++ nsegments ++#endif ++ ], + GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw, + const char *fname, bool more_than_one, void **knownsrcs) + { +--- elfutils/src/ld.h ++++ elfutils/src/ld.h +@@ -1114,6 +1114,7 @@ extern bool dynamically_linked_p (void); + + /* Checked whether the symbol is undefined and referenced from a DSO. */ + extern bool linked_from_dso_p (struct scninfo *scninfo, size_t symidx); ++#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2) + #ifdef __GNUC_STDC_INLINE__ + __attribute__ ((__gnu_inline__)) + #endif +@@ -1131,5 +1132,6 @@ linked_from_dso_p (struct scninfo *scnin + + return sym->defined && sym->in_dso; + } ++#endif /* Optimizing and not GCC 4.2. */ + + #endif /* ld.h */ +--- elfutils/src/Makefile.am ++++ elfutils/src/Makefile.am +@@ -95,6 +95,9 @@ addr2line_no_Wformat = yes + # XXX While the file is not finished, don't warn about this + ldgeneric_no_Wunused = yes + ++# Buggy old compilers. ++readelf_no_Werror = yes ++ + readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl + nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \ + $(demanglelib) +--- elfutils/src/Makefile.in ++++ elfutils/src/Makefile.in +@@ -40,7 +40,8 @@ host_triplet = @host@ + DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/config/eu.am ChangeLog \ + ldlex.c ldscript.c +-@MUDFLAP_TRUE@am__append_1 = -fmudflap ++@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) ++@MUDFLAP_TRUE@am__append_2 = -fmudflap + bin_PROGRAMS = readelf$(EXEEXT) nm$(EXEEXT) size$(EXEEXT) \ + strip$(EXEEXT) ld$(EXEEXT) elflint$(EXEEXT) \ + findtextrel$(EXEEXT) addr2line$(EXEEXT) elfcmp$(EXEEXT) \ +@@ -49,9 +50,9 @@ bin_PROGRAMS = readelf$(EXEEXT) nm$(EXEE + @NATIVE_LD_FALSE@noinst_PROGRAMS = $(am__EXEEXT_1) + # We never build this library but we need to get the dependency files + # of all the linker backends that might be used in a non-generic linker. +-@NEVER_TRUE@am__append_2 = libdummy.a ++@NEVER_TRUE@am__append_3 = libdummy.a + # -ldl is always needed for libebl. +-@NATIVE_LD_TRUE@am__append_3 = libld_elf.a ++@NATIVE_LD_TRUE@am__append_4 = libld_elf.a + @NATIVE_LD_TRUE@am_libld_elf_i386_pic_a_OBJECTS = + subdir = src + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +@@ -115,7 +116,7 @@ am_ld_OBJECTS = ld.$(OBJEXT) ldgeneric.$ + versionhash.$(OBJEXT) + ld_OBJECTS = $(am_ld_OBJECTS) + ld_DEPENDENCIES = $(libebl) $(libelf) $(libeu) $(am__DEPENDENCIES_1) \ +- $(am__append_3) ++ $(am__append_4) + ld_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(ld_LDFLAGS) $(LDFLAGS) -o \ + $@ + am_libld_elf_i386_so_OBJECTS = +@@ -229,6 +230,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -258,6 +260,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = @VERSION@ ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -321,10 +324,9 @@ INCLUDES = -I. -I$(srcdir) -I$(top_srcdi + -I$(srcdir)/../libdw -I$(srcdir)/../libdwfl \ + -I$(srcdir)/../libasm + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ +- $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ +- $(am__append_1) ++ $(am__append_1) $(am__append_2) + @MUDFLAP_FALSE@libmudflap = + @MUDFLAP_TRUE@libmudflap = -lmudflap + COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ +@@ -340,8 +342,8 @@ AM_LFLAGS = -Pld -olex.yy.c + native_ld = @native_ld@ + ld_dsos = libld_elf_i386_pic.a + @NATIVE_LD_FALSE@noinst_LIBRARIES = libld_elf.a libar.a $(ld_dsos) \ +-@NATIVE_LD_FALSE@ $(am__append_2) +-@NATIVE_LD_TRUE@noinst_LIBRARIES = libld_elf.a libar.a $(am__append_2) ++@NATIVE_LD_FALSE@ $(am__append_3) ++@NATIVE_LD_TRUE@noinst_LIBRARIES = libld_elf.a libar.a $(am__append_3) + @NATIVE_LD_TRUE@native_ld_cflags = -DBASE_ELF_NAME=elf_$(base_cpu) + @NEVER_TRUE@libdummy_a_SOURCES = i386_ld.c + ld_SOURCES = ld.c ldgeneric.c ldlex.l ldscript.y symbolhash.c sectionhash.c \ +@@ -370,6 +372,9 @@ strings_no_Wformat = yes + addr2line_no_Wformat = yes + # XXX While the file is not finished, don't warn about this + ldgeneric_no_Wunused = yes ++ ++# Buggy old compilers. ++readelf_no_Werror = yes + readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl + nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \ + $(demanglelib) +@@ -377,7 +382,7 @@ nm_LDADD = $(libdw) $(libebl) $(libelf) + size_LDADD = $(libelf) $(libeu) $(libmudflap) + strip_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl + ld_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl \ +- $(am__append_3) ++ $(am__append_4) + ld_LDFLAGS = -rdynamic + elflint_LDADD = $(libebl) $(libelf) $(libeu) $(libmudflap) -ldl + findtextrel_LDADD = $(libdw) $(libelf) $(libmudflap) +--- elfutils/src/readelf.c ++++ elfutils/src/readelf.c +@@ -3949,10 +3949,11 @@ struct listptr + #define listptr_offset_size(p) ((p)->dwarf64 ? 8 : 4) + #define listptr_address_size(p) ((p)->addr64 ? 8 : 4) + ++static const char *listptr_name; + static int +-compare_listptr (const void *a, const void *b, void *arg) ++compare_listptr (const void *a, const void *b) + { +- const char *name = arg; ++ const char *const name = listptr_name; + struct listptr *p1 = (void *) a; + struct listptr *p2 = (void *) b; + +@@ -4033,8 +4034,11 @@ static void + sort_listptr (struct listptr_table *table, const char *name) + { + if (table->n > 0) +- qsort_r (table->table, table->n, sizeof table->table[0], +- &compare_listptr, (void *) name); ++ { ++ listptr_name = name; ++ qsort (table->table, table->n, sizeof table->table[0], ++ &compare_listptr); ++ } + } + + static bool +@@ -8442,7 +8446,7 @@ dump_archive_index (Elf *elf, const char + if (unlikely (elf_rand (elf, as_off) == 0) + || unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf)) + == NULL)) +-#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7) ++#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7) || __GNUC__ < 4 + while (1) + #endif + error (EXIT_FAILURE, 0, +--- elfutils/src/strings.c ++++ elfutils/src/strings.c +@@ -43,6 +43,10 @@ + + #include + ++#ifndef MAP_POPULATE ++# define MAP_POPULATE 0 ++#endif ++ + + /* Prototypes of local functions. */ + static int read_fd (int fd, const char *fname, off64_t fdlen); +@@ -483,8 +487,13 @@ map_file (int fd, off64_t start_off, off + fd, start_off); + if (mem != MAP_FAILED) + { ++#if !defined POSIX_MADV_SEQUENTIAL && defined MADV_SEQUENTIAL ++# define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL ++#endif ++#ifdef POSIX_MADV_SEQUENTIAL + /* We will go through the mapping sequentially. */ + (void) posix_madvise (mem, map_size, POSIX_MADV_SEQUENTIAL); ++#endif + break; + } + if (errno != EINVAL && errno != ENOMEM) +@@ -576,9 +585,11 @@ read_block (int fd, const char *fname, o + elfmap_off = from & ~(ps - 1); + elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size); + ++#ifdef POSIX_FADV_SEQUENTIAL + if (unlikely (elfmap == MAP_FAILED)) + /* Let the kernel know we are going to read everything in sequence. */ + (void) posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL); ++#endif + } + + if (unlikely (elfmap == MAP_FAILED)) +--- elfutils/src/strip.c ++++ elfutils/src/strip.c +@@ -45,6 +45,12 @@ + #include + #include + ++#ifdef HAVE_FUTIMES ++# define FUTIMES(fd, fname, tvp) futimes (fd, tvp) ++#else ++# define FUTIMES(fd, fname, tvp) utimes (fname, tvp) ++#endif ++ + typedef uint8_t GElf_Byte; + + /* Name and version of program. */ +@@ -318,8 +324,18 @@ process_file (const char *fname) + + /* If we have to preserve the timestamp, we need it in the + format utimes() understands. */ ++#ifdef HAVE_STRUCT_STAT_ST_ATIM + TIMESPEC_TO_TIMEVAL (&tv[0], &pre_st.st_atim); ++#else ++ tv[0].tv_sec = pre_st.st_atime; ++ tv[0].tv_usec = 0; ++#endif ++#ifdef HAVE_STRUCT_STAT_ST_MTIM + TIMESPEC_TO_TIMEVAL (&tv[1], &pre_st.st_mtim); ++#else ++ tv[1].tv_sec = pre_st.st_atime; ++ tv[1].tv_usec = 0; ++#endif + } + + /* Open the file. */ +@@ -2055,7 +2071,7 @@ while computing checksum for debug infor + /* If requested, preserve the timestamp. */ + if (tvp != NULL) + { +- if (futimes (fd, tvp) != 0) ++ if (FUTIMES (fd, output_fname, tvp) != 0) + { + error (0, errno, gettext ("\ + cannot set access and modification date of '%s'"), +@@ -2112,7 +2128,7 @@ handle_ar (int fd, Elf *elf, const char + + if (tvp != NULL) + { +- if (unlikely (futimes (fd, tvp) != 0)) ++ if (unlikely (FUTIMES (fd, fname, tvp) != 0)) + { + error (0, errno, gettext ("\ + cannot set access and modification date of '%s'"), fname); +--- elfutils/tests/ChangeLog ++++ elfutils/tests/ChangeLog +@@ -439,6 +439,8 @@ + + 2008-01-21 Roland McGrath + ++ * line2addr.c (main): Revert last change. ++ + * testfile45.S.bz2: Add tests for cltq, cqto. + * testfile45.expect.bz2: Adjust. + +@@ -1147,6 +1149,11 @@ + * Makefile.am (TESTS): Add run-elflint-test.sh. + (EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2. + ++2005-05-31 Roland McGrath ++ ++ * Makefile.am (WEXTRA): New variable, substituted by configure. ++ (AM_CFLAGS): Use it in place of -Wextra. ++ + 2005-05-24 Ulrich Drepper + + * get-files.c (main): Use correct format specifier. +--- elfutils/tests/line2addr.c ++++ elfutils/tests/line2addr.c +@@ -124,7 +124,7 @@ main (int argc, char *argv[]) + { + struct args a = { .arg = argv[cnt] }; + +- switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line)) ++ switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line)) + { + default: + case 0: +--- elfutils/tests/Makefile.in ++++ elfutils/tests/Makefile.in +@@ -35,14 +35,15 @@ build_triplet = @build@ + host_triplet = @host@ + DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/config/eu.am ChangeLog +-@MUDFLAP_TRUE@am__append_1 = -fmudflap +-@STANDALONE_FALSE@am__append_2 = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \ ++@BUILD_WERROR_TRUE@am__append_1 = $(if $($(*F)_no_Werror),,-Werror) ++@MUDFLAP_TRUE@am__append_2 = -fmudflap ++@STANDALONE_FALSE@am__append_3 = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \ + @STANDALONE_FALSE@ -I$(top_srcdir)/libdwfl \ + @STANDALONE_FALSE@ -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \ + @STANDALONE_FALSE@ -I$(top_srcdir)/lib -I.. + +-@STANDALONE_FALSE@am__append_3 = -Wl,-rpath-link,../libasm:../libdw:../libelf +-@TESTS_RPATH_TRUE@am__append_4 = -Wl,-rpath,$(BUILD_RPATH) ++@STANDALONE_FALSE@am__append_4 = -Wl,-rpath-link,../libasm:../libdw:../libelf ++@TESTS_RPATH_TRUE@am__append_5 = -Wl,-rpath,$(BUILD_RPATH) + check_PROGRAMS = arextract$(EXEEXT) arsymtest$(EXEEXT) \ + newfile$(EXEEXT) saridx$(EXEEXT) scnnames$(EXEEXT) \ + sectiondump$(EXEEXT) showptable$(EXEEXT) update1$(EXEEXT) \ +@@ -92,12 +93,12 @@ TESTS = run-arextract.sh run-arsymtest.s + run-readelf-gdb_index.sh run-unstrip-n.sh run-low_high_pc.sh \ + run-macro-test.sh run-elf_cntl_gelf_getshdr.sh \ + run-test-archive64.sh $(am__EXEEXT_1) $(am__EXEEXT_3) \ +- $(am__append_9) +-@STANDALONE_FALSE@am__append_5 = msg_tst md5-sha1-test ++ $(am__append_10) + @STANDALONE_FALSE@am__append_6 = msg_tst md5-sha1-test +-@HAVE_LIBASM_TRUE@am__append_7 = $(asm_TESTS) ++@STANDALONE_FALSE@am__append_7 = msg_tst md5-sha1-test + @HAVE_LIBASM_TRUE@am__append_8 = $(asm_TESTS) +-@ENABLE_DWZ_TRUE@am__append_9 = run-readelf-dwz-multi.sh ++@HAVE_LIBASM_TRUE@am__append_9 = $(asm_TESTS) ++@ENABLE_DWZ_TRUE@am__append_10 = run-readelf-dwz-multi.sh + subdir = tests + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ +@@ -412,6 +413,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_SCRIPT = @INSTALL_SCRIPT@ + INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LDFLAGS = @LDFLAGS@ ++LD_AS_NEEDED = @LD_AS_NEEDED@ + LEX = @LEX@ + LEXLIB = @LEXLIB@ + LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +@@ -441,6 +443,7 @@ SHELL = @SHELL@ + STRIP = @STRIP@ + USE_NLS = @USE_NLS@ + VERSION = @VERSION@ ++WEXTRA = @WEXTRA@ + XGETTEXT = @XGETTEXT@ + XGETTEXT_015 = @XGETTEXT_015@ + XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +@@ -499,12 +502,11 @@ top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + zip_LIBS = @zip_LIBS@ +-INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_2) ++INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. $(am__append_3) + AM_CFLAGS = -std=gnu99 -Wall -Wshadow $(if \ +- $($(*F)_no_Werror),,-Werror) $(if \ +- $($(*F)_no_Wunused),,-Wunused -Wextra) $(if \ ++ $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) $(if \ + $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $($(*F)_CFLAGS) \ +- $(am__append_1) ++ $(am__append_1) $(am__append_2) + @MUDFLAP_FALSE@libmudflap = + @MUDFLAP_TRUE@libmudflap = -lmudflap + COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ +@@ -514,7 +516,7 @@ CLEANFILES = *.gcno *.gcda + textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi + @MUDFLAP_FALSE@BUILD_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf + @MUDFLAP_TRUE@BUILD_RPATH = \$$ORIGIN/../backends +-AM_LDFLAGS = $(am__append_3) $(am__append_4) ++AM_LDFLAGS = $(am__append_4) $(am__append_5) + @TESTS_RPATH_FALSE@tests_rpath = no + @TESTS_RPATH_TRUE@tests_rpath = yes + asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \ diff --git a/packages/devel/elfutils/patches/elfutils-00-robustify.patch b/packages/devel/elfutils/patches/elfutils-00-robustify.patch new file mode 100644 index 0000000000..9eee98412d --- /dev/null +++ b/packages/devel/elfutils/patches/elfutils-00-robustify.patch @@ -0,0 +1,1756 @@ +--- elfutils/libdwfl/ChangeLog ++++ elfutils/libdwfl/ChangeLog +@@ -52,6 +52,11 @@ + * dwfl_module_getdwarf.c (open_elf): Clear errno before CBFAIL. + Reported by Kurt Roeckx . + ++2011-03-23 Petr Machata ++ ++ * relocate.c (relocate_section): Use gelf_fsize instead of relying ++ on shdr->sh_entsize. ++ + 2011-02-11 Roland McGrath + + * linux-kernel-modules.c (try_kernel_name): Try .gz, .bz2, .xz +--- elfutils/libdwfl/relocate.c ++++ elfutils/libdwfl/relocate.c +@@ -1,5 +1,5 @@ + /* Relocate debug information. +- Copyright (C) 2005-2010 Red Hat, Inc. ++ Copyright (C) 2005-2011 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify +@@ -457,7 +457,10 @@ relocate_section (Dwfl_Module *mod, Elf + } + } + +- size_t nrels = shdr->sh_size / shdr->sh_entsize; ++ size_t sh_entsize ++ = gelf_fsize (relocated, shdr->sh_type == SHT_REL ? ELF_T_REL : ELF_T_RELA, ++ 1, EV_CURRENT); ++ size_t nrels = shdr->sh_size / sh_entsize; + size_t complete = 0; + if (shdr->sh_type == SHT_REL) + for (size_t relidx = 0; !result && relidx < nrels; ++relidx) +@@ -559,7 +562,7 @@ relocate_section (Dwfl_Module *mod, Elf + nrels = next; + } + +- shdr->sh_size = reldata->d_size = nrels * shdr->sh_entsize; ++ shdr->sh_size = reldata->d_size = nrels * sh_entsize; + gelf_update_shdr (scn, shdr); + } + +--- elfutils/libelf/ChangeLog ++++ elfutils/libelf/ChangeLog +@@ -703,10 +703,53 @@ + If section content hasn't been read yet, do it before looking for the + block size. If no section data present, infer size of section header. + ++2005-05-14 Jakub Jelinek ++ ++ * libelfP.h (INVALID_NDX): Define. ++ * gelf_getdyn.c (gelf_getdyn): Use it. Remove ndx < 0 test if any. ++ * gelf_getlib.c (gelf_getlib): Likewise. ++ * gelf_getmove.c (gelf_getmove): Likewise. ++ * gelf_getrel.c (gelf_getrel): Likewise. ++ * gelf_getrela.c (gelf_getrela): Likewise. ++ * gelf_getsym.c (gelf_getsym): Likewise. ++ * gelf_getsyminfo.c (gelf_getsyminfo): Likewise. ++ * gelf_getsymshndx.c (gelf_getsymshndx): Likewise. ++ * gelf_getversym.c (gelf_getversym): Likewise. ++ * gelf_update_dyn.c (gelf_update_dyn): Likewise. ++ * gelf_update_lib.c (gelf_update_lib): Likewise. ++ * gelf_update_move.c (gelf_update_move): Likewise. ++ * gelf_update_rel.c (gelf_update_rel): Likewise. ++ * gelf_update_rela.c (gelf_update_rela): Likewise. ++ * gelf_update_sym.c (gelf_update_sym): Likewise. ++ * gelf_update_syminfo.c (gelf_update_syminfo): Likewise. ++ * gelf_update_symshndx.c (gelf_update_symshndx): Likewise. ++ * gelf_update_versym.c (gelf_update_versym): Likewise. ++ * elf_newscn.c (elf_newscn): Check for overflow. ++ * elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Likewise. ++ (__elfw2(LIBELFBITS,updatefile)): Likewise. ++ * elf_begin.c (file_read_elf): Likewise. ++ * elf32_newphdr.c (elfw2(LIBELFBITS,newphdr)): Likewise. ++ * elf_getarsym.c (elf_getarsym): Likewise. ++ * elf32_getshdr.c (elfw2(LIBELFBITS,getshdr)): Likewise. + 2005-05-11 Ulrich Drepper + + * elf.h: Update again. + ++2005-05-17 Jakub Jelinek ++ ++ * elf32_getphdr.c (elfw2(LIBELFBITS,getphdr)): Check if program header ++ table fits into object's bounds. ++ * elf_getshstrndx.c (elf_getshstrndx): Add elf->start_offset to ++ elf->map_address. Check if first section header fits into object's ++ bounds. ++ * elf32_getshdr.c (elfw2(LIBELFBITS,getshdr)): ++ Check if section header table fits into object's bounds. ++ * elf_begin.c (get_shnum): Ensure section headers fits into ++ object's bounds. ++ (file_read_elf): Make sure scncnt is small enough to allocate both ++ ElfXX_Shdr and Elf_Scn array. Make sure section and program header ++ tables fit into object's bounds. Avoid memory leak on failure. ++ + 2005-05-09 Ulrich Drepper + + * elf.h: Update from glibc. +--- elfutils/libelf/elf32_getphdr.c ++++ elfutils/libelf/elf32_getphdr.c +@@ -93,6 +93,16 @@ __elfw2(LIBELFBITS,getphdr_wrlock) (elf) + + if (elf->map_address != NULL) + { ++ /* First see whether the information in the ELF header is ++ valid and it does not ask for too much. */ ++ if (unlikely (ehdr->e_phoff >= elf->maximum_size) ++ || unlikely (elf->maximum_size - ehdr->e_phoff < size)) ++ { ++ /* Something is wrong. */ ++ __libelf_seterrno (ELF_E_INVALID_PHDR); ++ goto out; ++ } ++ + /* All the data is already mapped. Use it. */ + void *file_phdr = ((char *) elf->map_address + + elf->start_offset + ehdr->e_phoff); +--- elfutils/libelf/elf32_getshdr.c ++++ elfutils/libelf/elf32_getshdr.c +@@ -60,7 +60,8 @@ load_shdr_wrlock (Elf_Scn *scn) + goto out; + + size_t shnum; +- if (__elf_getshdrnum_rdlock (elf, &shnum) != 0) ++ if (__elf_getshdrnum_rdlock (elf, &shnum) != 0 ++ || shnum > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Shdr))) + goto out; + size_t size = shnum * sizeof (ElfW2(LIBELFBITS,Shdr)); + +@@ -77,6 +78,16 @@ load_shdr_wrlock (Elf_Scn *scn) + + if (elf->map_address != NULL) + { ++ /* First see whether the information in the ELF header is ++ valid and it does not ask for too much. */ ++ if (unlikely (ehdr->e_shoff >= elf->maximum_size) ++ || unlikely (elf->maximum_size - ehdr->e_shoff < size)) ++ { ++ /* Something is wrong. */ ++ __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER); ++ goto free_and_out; ++ } ++ + ElfW2(LIBELFBITS,Shdr) *notcvt; + + /* All the data is already mapped. If we could use it +--- elfutils/libelf/elf32_newphdr.c ++++ elfutils/libelf/elf32_newphdr.c +@@ -114,6 +114,12 @@ elfw2(LIBELFBITS,newphdr) (elf, count) + || count == PN_XNUM + || elf->state.ELFW(elf,LIBELFBITS).phdr == NULL) + { ++ if (unlikely (count > SIZE_MAX / sizeof (ElfW2(LIBELFBITS,Phdr)))) ++ { ++ result = NULL; ++ goto out; ++ } ++ + /* Allocate a new program header with the appropriate number of + elements. */ + result = (ElfW2(LIBELFBITS,Phdr) *) +--- elfutils/libelf/elf32_updatefile.c ++++ elfutils/libelf/elf32_updatefile.c +@@ -202,6 +202,9 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf + /* Write all the sections. Well, only those which are modified. */ + if (shnum > 0) + { ++ if (unlikely (shnum > SIZE_MAX / sizeof (Elf_Scn *))) ++ return 1; ++ + Elf_ScnList *list = &elf->state.ELFW(elf,LIBELFBITS).scns; + Elf_Scn **scns = (Elf_Scn **) alloca (shnum * sizeof (Elf_Scn *)); + char *const shdr_start = ((char *) elf->map_address + elf->start_offset +@@ -624,6 +627,10 @@ __elfw2(LIBELFBITS,updatefile) (Elf *elf + /* Write all the sections. Well, only those which are modified. */ + if (shnum > 0) + { ++ if (unlikely (shnum > SIZE_MAX / (sizeof (Elf_Scn *) ++ + sizeof (ElfW2(LIBELFBITS,Shdr))))) ++ return 1; ++ + off_t shdr_offset = elf->start_offset + ehdr->e_shoff; + #if EV_NUM != 2 + xfct_t shdr_fctp = __elf_xfctstom[__libelf_version - 1][EV_CURRENT - 1][ELFW(ELFCLASS, LIBELFBITS) - 1][ELF_T_SHDR]; +--- elfutils/libelf/elf_begin.c ++++ elfutils/libelf/elf_begin.c +@@ -144,7 +144,8 @@ get_shnum (void *map_address, unsigned c + + if (unlikely (result == 0) && ehdr.e32->e_shoff != 0) + { +- if (ehdr.e32->e_shoff + sizeof (Elf32_Shdr) > maxsize) ++ if (unlikely (ehdr.e32->e_shoff >= maxsize) ++ || unlikely (maxsize - ehdr.e32->e_shoff < sizeof (Elf32_Shdr))) + /* Cannot read the first section header. */ + return 0; + +@@ -192,7 +193,8 @@ get_shnum (void *map_address, unsigned c + + if (unlikely (result == 0) && ehdr.e64->e_shoff != 0) + { +- if (ehdr.e64->e_shoff + sizeof (Elf64_Shdr) > maxsize) ++ if (unlikely (ehdr.e64->e_shoff >= maxsize) ++ || unlikely (ehdr.e64->e_shoff + sizeof (Elf64_Shdr) > maxsize)) + /* Cannot read the first section header. */ + return 0; + +@@ -264,6 +266,15 @@ file_read_elf (int fildes, void *map_add + /* Could not determine the number of sections. */ + return NULL; + ++ /* Check for too many sections. */ ++ if (e_ident[EI_CLASS] == ELFCLASS32) ++ { ++ if (scncnt > SIZE_MAX / (sizeof (Elf_Scn) + sizeof (Elf32_Shdr))) ++ return NULL; ++ } ++ else if (scncnt > SIZE_MAX / (sizeof (Elf_Scn) + sizeof (Elf64_Shdr))) ++ return NULL; ++ + /* We can now allocate the memory. Even if there are no section headers, + we allocate space for a zeroth section in case we need it later. */ + const size_t scnmax = (scncnt ?: (cmd == ELF_C_RDWR || cmd == ELF_C_RDWR_MMAP) +@@ -303,6 +314,16 @@ file_read_elf (int fildes, void *map_add + { + /* We can use the mmapped memory. */ + elf->state.elf32.ehdr = ehdr; ++ ++ if (unlikely (ehdr->e_shoff >= maxsize) ++ || unlikely (maxsize - ehdr->e_shoff ++ < scncnt * sizeof (Elf32_Shdr))) ++ { ++ free_and_out: ++ free (elf); ++ __libelf_seterrno (ELF_E_INVALID_FILE); ++ return NULL; ++ } + elf->state.elf32.shdr + = (Elf32_Shdr *) ((char *) ehdr + ehdr->e_shoff); + +@@ -389,6 +410,11 @@ file_read_elf (int fildes, void *map_add + { + /* We can use the mmapped memory. */ + elf->state.elf64.ehdr = ehdr; ++ ++ if (unlikely (ehdr->e_shoff >= maxsize) ++ || unlikely (ehdr->e_shoff ++ + scncnt * sizeof (Elf32_Shdr) > maxsize)) ++ goto free_and_out; + elf->state.elf64.shdr + = (Elf64_Shdr *) ((char *) ehdr + ehdr->e_shoff); + +--- elfutils/libelf/elf_getarsym.c ++++ elfutils/libelf/elf_getarsym.c +@@ -181,6 +181,9 @@ elf_getarsym (elf, ptr) + size_t index_size = atol (tmpbuf); + + if (SARMAG + sizeof (struct ar_hdr) + index_size > elf->maximum_size ++#if SIZE_MAX <= 4294967295U ++ || n >= SIZE_MAX / sizeof (Elf_Arsym) ++#endif + || n * w > index_size) + { + /* This index table cannot be right since it does not fit into +--- elfutils/libelf/elf_getshdrstrndx.c ++++ elfutils/libelf/elf_getshdrstrndx.c +@@ -104,10 +104,25 @@ elf_getshdrstrndx (elf, dst) + if (elf->map_address != NULL + && elf->state.elf32.ehdr->e_ident[EI_DATA] == MY_ELFDATA + && (ALLOW_UNALIGNED +- || (((size_t) ((char *) elf->map_address + offset)) ++ || (((size_t) ((char *) elf->map_address ++ + elf->start_offset + offset)) + & (__alignof__ (Elf32_Shdr) - 1)) == 0)) +- /* We can directly access the memory. */ +- num = ((Elf32_Shdr *) (elf->map_address + offset))->sh_link; ++ { ++ /* First see whether the information in the ELF header is ++ valid and it does not ask for too much. */ ++ if (unlikely (elf->maximum_size - offset ++ < sizeof (Elf32_Shdr))) ++ { ++ /* Something is wrong. */ ++ __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER); ++ result = -1; ++ goto out; ++ } ++ ++ /* We can directly access the memory. */ ++ num = ((Elf32_Shdr *) (elf->map_address + elf->start_offset ++ + offset))->sh_link; ++ } + else + { + /* We avoid reading in all the section headers. Just read +@@ -142,10 +157,25 @@ elf_getshdrstrndx (elf, dst) + if (elf->map_address != NULL + && elf->state.elf64.ehdr->e_ident[EI_DATA] == MY_ELFDATA + && (ALLOW_UNALIGNED +- || (((size_t) ((char *) elf->map_address + offset)) ++ || (((size_t) ((char *) elf->map_address ++ + elf->start_offset + offset)) + & (__alignof__ (Elf64_Shdr) - 1)) == 0)) +- /* We can directly access the memory. */ +- num = ((Elf64_Shdr *) (elf->map_address + offset))->sh_link; ++ { ++ /* First see whether the information in the ELF header is ++ valid and it does not ask for too much. */ ++ if (unlikely (elf->maximum_size - offset ++ < sizeof (Elf64_Shdr))) ++ { ++ /* Something is wrong. */ ++ __libelf_seterrno (ELF_E_INVALID_SECTION_HEADER); ++ result = -1; ++ goto out; ++ } ++ ++ /* We can directly access the memory. */ ++ num = ((Elf64_Shdr *) (elf->map_address + elf->start_offset ++ + offset))->sh_link; ++ } + else + { + /* We avoid reading in all the section headers. Just read +--- elfutils/libelf/elf_newscn.c ++++ elfutils/libelf/elf_newscn.c +@@ -83,10 +83,18 @@ elf_newscn (elf) + else + { + /* We must allocate a new element. */ +- Elf_ScnList *newp; ++ Elf_ScnList *newp = NULL; + + assert (elf->state.elf.scnincr > 0); + ++ if ( ++#if SIZE_MAX <= 4294967295U ++ likely (elf->state.elf.scnincr ++ < SIZE_MAX / 2 / sizeof (Elf_Scn) - sizeof (Elf_ScnList)) ++#else ++ 1 ++#endif ++ ) + newp = (Elf_ScnList *) calloc (sizeof (Elf_ScnList) + + ((elf->state.elf.scnincr *= 2) + * sizeof (Elf_Scn)), 1); +--- elfutils/libelf/gelf_getdyn.c ++++ elfutils/libelf/gelf_getdyn.c +@@ -1,5 +1,5 @@ + /* Get information from dynamic table at the given index. +- Copyright (C) 2000, 2001, 2002 Red Hat, Inc. ++ Copyright (C) 2000-2009 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 2000. + +@@ -72,7 +72,7 @@ gelf_getdyn (data, ndx, dst) + table entries has to be adopted. The user better has provided + a buffer where we can store the information. While copying the + data we are converting the format. */ +- if (unlikely ((ndx + 1) * sizeof (Elf32_Dyn) > data_scn->d.d_size)) ++ if (INVALID_NDX (ndx, Elf32_Dyn, &data_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + goto out; +@@ -93,7 +93,7 @@ gelf_getdyn (data, ndx, dst) + + /* The data is already in the correct form. Just make sure the + index is OK. */ +- if (unlikely ((ndx + 1) * sizeof (GElf_Dyn) > data_scn->d.d_size)) ++ if (INVALID_NDX (ndx, GElf_Dyn, &data_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + goto out; +--- elfutils/libelf/gelf_getlib.c ++++ elfutils/libelf/gelf_getlib.c +@@ -1,5 +1,5 @@ + /* Get library from table at the given index. +- Copyright (C) 2004 Red Hat, Inc. ++ Copyright (C) 2004-2009 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 2004. + +@@ -65,7 +65,7 @@ gelf_getlib (data, ndx, dst) + /* The data is already in the correct form. Just make sure the + index is OK. */ + GElf_Lib *result = NULL; +- if (unlikely ((ndx + 1) * sizeof (GElf_Lib) > data->d_size)) ++ if (INVALID_NDX (ndx, GElf_Lib, data)) + __libelf_seterrno (ELF_E_INVALID_INDEX); + else + { +--- elfutils/libelf/gelf_getmove.c ++++ elfutils/libelf/gelf_getmove.c +@@ -1,5 +1,5 @@ + /* Get move structure at the given index. +- Copyright (C) 2000, 2001, 2002 Red Hat, Inc. ++ Copyright (C) 2000-2009 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 2000. + +@@ -62,7 +62,7 @@ gelf_getmove (data, ndx, dst) + + /* The data is already in the correct form. Just make sure the + index is OK. */ +- if (unlikely ((ndx + 1) * sizeof (GElf_Move) > data->d_size)) ++ if (INVALID_NDX (ndx, GElf_Move, data)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + goto out; +--- elfutils/libelf/gelf_getrela.c ++++ elfutils/libelf/gelf_getrela.c +@@ -1,5 +1,5 @@ + /* Get RELA relocation information at given index. +- Copyright (C) 2000, 2001, 2002 Red Hat, Inc. ++ Copyright (C) 2000-2009 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 2000. + +@@ -50,12 +50,6 @@ gelf_getrela (data, ndx, dst) + if (data_scn == NULL) + return NULL; + +- if (unlikely (ndx < 0)) +- { +- __libelf_seterrno (ELF_E_INVALID_INDEX); +- return NULL; +- } +- + if (unlikely (data_scn->d.d_type != ELF_T_RELA)) + { + __libelf_seterrno (ELF_E_INVALID_HANDLE); +@@ -72,7 +66,7 @@ gelf_getrela (data, ndx, dst) + if (scn->elf->class == ELFCLASS32) + { + /* We have to convert the data. */ +- if (unlikely ((ndx + 1) * sizeof (Elf32_Rela) > data_scn->d.d_size)) ++ if (INVALID_NDX (ndx, Elf32_Rela, &data_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + result = NULL; +@@ -93,7 +87,7 @@ gelf_getrela (data, ndx, dst) + { + /* Simply copy the data after we made sure we are actually getting + correct data. */ +- if (unlikely ((ndx + 1) * sizeof (Elf64_Rela) > data_scn->d.d_size)) ++ if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + result = NULL; +--- elfutils/libelf/gelf_getrel.c ++++ elfutils/libelf/gelf_getrel.c +@@ -1,5 +1,5 @@ + /* Get REL relocation information at given index. +- Copyright (C) 2000, 2001, 2002 Red Hat, Inc. ++ Copyright (C) 2000-2009 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 2000. + +@@ -50,12 +50,6 @@ gelf_getrel (data, ndx, dst) + if (data_scn == NULL) + return NULL; + +- if (unlikely (ndx < 0)) +- { +- __libelf_seterrno (ELF_E_INVALID_INDEX); +- return NULL; +- } +- + if (unlikely (data_scn->d.d_type != ELF_T_REL)) + { + __libelf_seterrno (ELF_E_INVALID_HANDLE); +@@ -72,7 +66,7 @@ gelf_getrel (data, ndx, dst) + if (scn->elf->class == ELFCLASS32) + { + /* We have to convert the data. */ +- if (unlikely ((ndx + 1) * sizeof (Elf32_Rel) > data_scn->d.d_size)) ++ if (INVALID_NDX (ndx, Elf32_Rel, &data_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + result = NULL; +@@ -92,7 +86,7 @@ gelf_getrel (data, ndx, dst) + { + /* Simply copy the data after we made sure we are actually getting + correct data. */ +- if (unlikely ((ndx + 1) * sizeof (Elf64_Rel) > data_scn->d.d_size)) ++ if (INVALID_NDX (ndx, Elf64_Rel, &data_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + result = NULL; +--- elfutils/libelf/gelf_getsym.c ++++ elfutils/libelf/gelf_getsym.c +@@ -1,5 +1,5 @@ + /* Get symbol information from symbol table at the given index. +- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc. ++ Copyright (C) 1999-2009 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 1999. + +@@ -69,7 +69,7 @@ gelf_getsym (data, ndx, dst) + table entries has to be adopted. The user better has provided + a buffer where we can store the information. While copying the + data we are converting the format. */ +- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > data->d_size)) ++ if (INVALID_NDX (ndx, Elf32_Sym, data)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + goto out; +@@ -98,7 +98,7 @@ gelf_getsym (data, ndx, dst) + + /* The data is already in the correct form. Just make sure the + index is OK. */ +- if (unlikely ((ndx + 1) * sizeof (GElf_Sym) > data->d_size)) ++ if (INVALID_NDX (ndx, GElf_Sym, data)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + goto out; +--- elfutils/libelf/gelf_getsyminfo.c ++++ elfutils/libelf/gelf_getsyminfo.c +@@ -1,5 +1,5 @@ + /* Get additional symbol information from symbol table at the given index. +- Copyright (C) 2000, 2001, 2002 Red Hat, Inc. ++ Copyright (C) 2000-2009 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 2000. + +@@ -63,7 +63,7 @@ gelf_getsyminfo (data, ndx, dst) + + /* The data is already in the correct form. Just make sure the + index is OK. */ +- if (unlikely ((ndx + 1) * sizeof (GElf_Syminfo) > data->d_size)) ++ if (INVALID_NDX (ndx, GElf_Syminfo, data)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + goto out; +--- elfutils/libelf/gelf_getsymshndx.c ++++ elfutils/libelf/gelf_getsymshndx.c +@@ -1,6 +1,6 @@ + /* Get symbol information and separate section index from symbol table + at the given index. +- Copyright (C) 2000, 2001, 2002 Red Hat, Inc. ++ Copyright (C) 2000-2009 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 2000. + +@@ -69,7 +69,7 @@ gelf_getsymshndx (symdata, shndxdata, nd + section index table. */ + if (likely (shndxdata_scn != NULL)) + { +- if (unlikely ((ndx + 1) * sizeof (Elf32_Word) > shndxdata_scn->d.d_size)) ++ if (INVALID_NDX (ndx, Elf32_Word, &shndxdata_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + goto out; +@@ -89,7 +89,7 @@ gelf_getsymshndx (symdata, shndxdata, nd + table entries has to be adopted. The user better has provided + a buffer where we can store the information. While copying the + data we are converting the format. */ +- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > symdata->d_size)) ++ if (INVALID_NDX (ndx, Elf32_Sym, symdata)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + goto out; +@@ -118,7 +118,7 @@ gelf_getsymshndx (symdata, shndxdata, nd + + /* The data is already in the correct form. Just make sure the + index is OK. */ +- if (unlikely ((ndx + 1) * sizeof (GElf_Sym) > symdata->d_size)) ++ if (INVALID_NDX (ndx, GElf_Sym, symdata)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + goto out; +--- elfutils/libelf/gelf_getversym.c ++++ elfutils/libelf/gelf_getversym.c +@@ -1,5 +1,5 @@ + /* Get symbol version information at the given index. +- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc. ++ Copyright (C) 1999-2009 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 1999. + +@@ -71,7 +71,7 @@ gelf_getversym (data, ndx, dst) + + /* The data is already in the correct form. Just make sure the + index is OK. */ +- if (unlikely ((ndx + 1) * sizeof (GElf_Versym) > data->d_size)) ++ if (INVALID_NDX (ndx, GElf_Versym, data)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + result = NULL; +--- elfutils/libelf/gelf_update_dyn.c ++++ elfutils/libelf/gelf_update_dyn.c +@@ -1,5 +1,5 @@ + /* Update information in dynamic table at the given index. +- Copyright (C) 2000, 2001, 2002 Red Hat, Inc. ++ Copyright (C) 2000-2009 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 2000. + +@@ -50,12 +50,6 @@ gelf_update_dyn (data, ndx, src) + if (data == NULL) + return 0; + +- if (unlikely (ndx < 0)) +- { +- __libelf_seterrno (ELF_E_INVALID_INDEX); +- return 0; +- } +- + if (unlikely (data_scn->d.d_type != ELF_T_DYN)) + { + /* The type of the data better should match. */ +@@ -81,7 +75,7 @@ gelf_update_dyn (data, ndx, src) + } + + /* Check whether we have to resize the data buffer. */ +- if (unlikely ((ndx + 1) * sizeof (Elf32_Dyn) > data_scn->d.d_size)) ++ if (INVALID_NDX (ndx, Elf32_Dyn, &data_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + goto out; +@@ -95,7 +89,7 @@ gelf_update_dyn (data, ndx, src) + else + { + /* Check whether we have to resize the data buffer. */ +- if (unlikely ((ndx + 1) * sizeof (Elf64_Dyn) > data_scn->d.d_size)) ++ if (INVALID_NDX (ndx, Elf64_Dyn, &data_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + goto out; +--- elfutils/libelf/gelf_update_lib.c ++++ elfutils/libelf/gelf_update_lib.c +@@ -1,5 +1,5 @@ + /* Update library in table at the given index. +- Copyright (C) 2004 Red Hat, Inc. ++ Copyright (C) 2004-2009 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 2004. + +@@ -47,12 +47,6 @@ gelf_update_lib (data, ndx, src) + if (data == NULL) + return 0; + +- if (unlikely (ndx < 0)) +- { +- __libelf_seterrno (ELF_E_INVALID_INDEX); +- return 0; +- } +- + Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data; + if (unlikely (data_scn->d.d_type != ELF_T_LIB)) + { +@@ -66,7 +60,7 @@ gelf_update_lib (data, ndx, src) + + /* Check whether we have to resize the data buffer. */ + int result = 0; +- if (unlikely ((ndx + 1) * sizeof (Elf64_Lib) > data_scn->d.d_size)) ++ if (INVALID_NDX (ndx, Elf64_Lib, &data_scn->d)) + __libelf_seterrno (ELF_E_INVALID_INDEX); + else + { +--- elfutils/libelf/gelf_update_move.c ++++ elfutils/libelf/gelf_update_move.c +@@ -1,5 +1,5 @@ + /* Update move structure at the given index. +- Copyright (C) 2000, 2001, 2002 Red Hat, Inc. ++ Copyright (C) 2000-2009 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 2000. + +@@ -54,8 +54,7 @@ gelf_update_move (data, ndx, src) + assert (sizeof (GElf_Move) == sizeof (Elf64_Move)); + + /* Check whether we have to resize the data buffer. */ +- if (unlikely (ndx < 0) +- || unlikely ((ndx + 1) * sizeof (GElf_Move) > data_scn->d.d_size)) ++ if (INVALID_NDX (ndx, GElf_Move, &data_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + return 0; +--- elfutils/libelf/gelf_update_rela.c ++++ elfutils/libelf/gelf_update_rela.c +@@ -1,5 +1,5 @@ + /* Update RELA relocation information at given index. +- Copyright (C) 2000, 2001, 2002 Red Hat, Inc. ++ Copyright (C) 2000-2009 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 2000. + +@@ -47,12 +47,6 @@ gelf_update_rela (Elf_Data *dst, int ndx + if (dst == NULL) + return 0; + +- if (unlikely (ndx < 0)) +- { +- __libelf_seterrno (ELF_E_INVALID_INDEX); +- return 0; +- } +- + if (unlikely (data_scn->d.d_type != ELF_T_RELA)) + { + /* The type of the data better should match. */ +@@ -80,7 +74,7 @@ gelf_update_rela (Elf_Data *dst, int ndx + } + + /* Check whether we have to resize the data buffer. */ +- if (unlikely ((ndx + 1) * sizeof (Elf32_Rela) > data_scn->d.d_size)) ++ if (INVALID_NDX (ndx, Elf32_Rela, &data_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + goto out; +@@ -96,7 +90,7 @@ gelf_update_rela (Elf_Data *dst, int ndx + else + { + /* Check whether we have to resize the data buffer. */ +- if (unlikely ((ndx + 1) * sizeof (Elf64_Rela) > data_scn->d.d_size)) ++ if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + goto out; +--- elfutils/libelf/gelf_update_rel.c ++++ elfutils/libelf/gelf_update_rel.c +@@ -1,5 +1,5 @@ + /* Update REL relocation information at given index. +- Copyright (C) 2000, 2001, 2002 Red Hat, Inc. ++ Copyright (C) 2000-2009 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 2000. + +@@ -47,12 +47,6 @@ gelf_update_rel (Elf_Data *dst, int ndx, + if (dst == NULL) + return 0; + +- if (unlikely (ndx < 0)) +- { +- __libelf_seterrno (ELF_E_INVALID_INDEX); +- return 0; +- } +- + if (unlikely (data_scn->d.d_type != ELF_T_REL)) + { + /* The type of the data better should match. */ +@@ -78,7 +72,7 @@ gelf_update_rel (Elf_Data *dst, int ndx, + } + + /* Check whether we have to resize the data buffer. */ +- if (unlikely ((ndx + 1) * sizeof (Elf32_Rel) > data_scn->d.d_size)) ++ if (INVALID_NDX (ndx, Elf32_Rel, &data_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + goto out; +@@ -93,7 +87,7 @@ gelf_update_rel (Elf_Data *dst, int ndx, + else + { + /* Check whether we have to resize the data buffer. */ +- if (unlikely ((ndx + 1) * sizeof (Elf64_Rel) > data_scn->d.d_size)) ++ if (INVALID_NDX (ndx, Elf64_Rel, &data_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + goto out; +--- elfutils/libelf/gelf_update_sym.c ++++ elfutils/libelf/gelf_update_sym.c +@@ -1,5 +1,5 @@ + /* Update symbol information in symbol table at the given index. +- Copyright (C) 2000, 2001, 2002 Red Hat, Inc. ++ Copyright (C) 2000-2009 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 2000. + +@@ -51,12 +51,6 @@ gelf_update_sym (data, ndx, src) + if (data == NULL) + return 0; + +- if (unlikely (ndx < 0)) +- { +- __libelf_seterrno (ELF_E_INVALID_INDEX); +- return 0; +- } +- + if (unlikely (data_scn->d.d_type != ELF_T_SYM)) + { + /* The type of the data better should match. */ +@@ -81,7 +75,7 @@ gelf_update_sym (data, ndx, src) + } + + /* Check whether we have to resize the data buffer. */ +- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > data_scn->d.d_size)) ++ if (INVALID_NDX (ndx, Elf32_Sym, &data_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + goto out; +@@ -104,7 +98,7 @@ gelf_update_sym (data, ndx, src) + else + { + /* Check whether we have to resize the data buffer. */ +- if (unlikely ((ndx + 1) * sizeof (Elf64_Sym) > data_scn->d.d_size)) ++ if (INVALID_NDX (ndx, Elf64_Sym, &data_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + goto out; +--- elfutils/libelf/gelf_update_syminfo.c ++++ elfutils/libelf/gelf_update_syminfo.c +@@ -1,5 +1,5 @@ + /* Update additional symbol information in symbol table at the given index. +- Copyright (C) 2000, 2001, 2002 Red Hat, Inc. ++ Copyright (C) 2000-2009 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 2000. + +@@ -51,12 +51,6 @@ gelf_update_syminfo (data, ndx, src) + if (data == NULL) + return 0; + +- if (unlikely (ndx < 0)) +- { +- __libelf_seterrno (ELF_E_INVALID_INDEX); +- return 0; +- } +- + if (unlikely (data_scn->d.d_type != ELF_T_SYMINFO)) + { + /* The type of the data better should match. */ +@@ -72,7 +66,7 @@ gelf_update_syminfo (data, ndx, src) + rwlock_wrlock (scn->elf->lock); + + /* Check whether we have to resize the data buffer. */ +- if (unlikely ((ndx + 1) * sizeof (GElf_Syminfo) > data_scn->d.d_size)) ++ if (INVALID_NDX (ndx, GElf_Syminfo, &data_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + goto out; +--- elfutils/libelf/gelf_update_symshndx.c ++++ elfutils/libelf/gelf_update_symshndx.c +@@ -1,6 +1,6 @@ + /* Update symbol information and section index in symbol table at the + given index. +- Copyright (C) 2000, 2001, 2002 Red Hat, Inc. ++ Copyright (C) 2000-2009 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 2000. + +@@ -56,12 +56,6 @@ gelf_update_symshndx (symdata, shndxdata + if (symdata == NULL) + return 0; + +- if (unlikely (ndx < 0)) +- { +- __libelf_seterrno (ELF_E_INVALID_INDEX); +- return 0; +- } +- + if (unlikely (symdata_scn->d.d_type != ELF_T_SYM)) + { + /* The type of the data better should match. */ +@@ -107,7 +101,7 @@ gelf_update_symshndx (symdata, shndxdata + } + + /* Check whether we have to resize the data buffer. */ +- if (unlikely ((ndx + 1) * sizeof (Elf32_Sym) > symdata_scn->d.d_size)) ++ if (INVALID_NDX (ndx, Elf32_Sym, &symdata_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + goto out; +@@ -130,7 +124,7 @@ gelf_update_symshndx (symdata, shndxdata + else + { + /* Check whether we have to resize the data buffer. */ +- if (unlikely ((ndx + 1) * sizeof (Elf64_Sym) > symdata_scn->d.d_size)) ++ if (INVALID_NDX (ndx, Elf64_Sym, &symdata_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + goto out; +--- elfutils/libelf/gelf_update_versym.c ++++ elfutils/libelf/gelf_update_versym.c +@@ -1,5 +1,5 @@ + /* Update symbol version information. +- Copyright (C) 2001, 2002 Red Hat, Inc. ++ Copyright (C) 2001-2009 Red Hat, Inc. + This file is part of elfutils. + Written by Ulrich Drepper , 2001. + +@@ -54,8 +54,7 @@ gelf_update_versym (data, ndx, src) + assert (sizeof (GElf_Versym) == sizeof (Elf64_Versym)); + + /* Check whether we have to resize the data buffer. */ +- if (unlikely (ndx < 0) +- || unlikely ((ndx + 1) * sizeof (GElf_Versym) > data_scn->d.d_size)) ++ if (INVALID_NDX (ndx, GElf_Versym, &data_scn->d)) + { + __libelf_seterrno (ELF_E_INVALID_INDEX); + return 0; +--- elfutils/libelf/libelfP.h ++++ elfutils/libelf/libelfP.h +@@ -587,4 +587,8 @@ extern uint32_t __libelf_crc32 (uint32_t + /* Align offset to 4 bytes as needed for note name and descriptor data. */ + #define NOTE_ALIGN(n) (((n) + 3) & -4U) + ++/* Convenience macro. */ ++#define INVALID_NDX(ndx, type, data) \ ++ unlikely ((data)->d_size / sizeof (type) <= (unsigned int) (ndx)) ++ + #endif /* libelfP.h */ +--- elfutils/src/ChangeLog ++++ elfutils/src/ChangeLog +@@ -344,6 +344,12 @@ + + * readelf.c (dwarf_attr_string): Grok DW_AT_GNU_odr_signature. + ++2011-03-23 Petr Machata ++ ++ * readelf.c (handle_dynamic, handle_relocs_rel) ++ (handle_relocs_rela, handle_versym, print_liblist): ++ Use gelf_fsize instead of relying on shdr->sh_entsize. ++ + 2011-02-11 Roland McGrath + + * elfcmp.c (verbose): New variable. +@@ -2056,6 +2062,16 @@ + object symbols or symbols with unknown type. + (check_rel): Likewise. + ++2005-06-09 Roland McGrath ++ ++ * readelf.c (handle_dynamic, handle_symtab): Check for bogus sh_link. ++ (handle_verneed, handle_verdef, handle_versym, handle_hash): Likewise. ++ (handle_scngrp): Check for bogus sh_info. ++ ++ * strip.c (handle_elf): Check for bogus values in sh_link, sh_info, ++ st_shndx, e_shstrndx, and SHT_GROUP or SHT_SYMTAB_SHNDX data. ++ Don't use assert on input values, instead bail with "illformed" error. ++ + 2005-06-08 Roland McGrath + + * readelf.c (print_ops): Add consts. +@@ -2101,6 +2117,19 @@ + + * readelf.c (dwarf_tag_string): Add new tags. + ++2005-05-17 Jakub Jelinek ++ ++ * elflint.c (check_hash): Don't check entries beyond end of section. ++ (check_note): Don't crash if gelf_rawchunk fails. ++ (section_name): Return if gelf_getshdr returns NULL. ++ ++2005-05-14 Jakub Jelinek ++ ++ * elflint.c (section_name): Return "" instead of ++ crashing on invalid section name. ++ (check_symtab, is_rel_dyn, check_rela, check_rel, check_dynamic, ++ check_symtab_shndx, check_hash, check_versym): Robustify. ++ + 2005-05-08 Roland McGrath + + * strip.c (handle_elf): Don't translate hash and versym data formats, +--- elfutils/src/elflint.c ++++ elfutils/src/elflint.c +@@ -123,6 +123,10 @@ static uint32_t shstrndx; + /* Array to count references in section groups. */ + static int *scnref; + ++/* Numbers of sections and program headers. */ ++static unsigned int shnum; ++static unsigned int phnum; ++ + + int + main (int argc, char *argv[]) +@@ -311,10 +315,19 @@ section_name (Ebl *ebl, int idx) + { + GElf_Shdr shdr_mem; + GElf_Shdr *shdr; ++ const char *ret; ++ ++ if ((unsigned int) idx > shnum) ++ return ""; + + shdr = gelf_getshdr (elf_getscn (ebl->elf, idx), &shdr_mem); ++ if (shdr == NULL) ++ return ""; + +- return elf_strptr (ebl->elf, shstrndx, shdr->sh_name); ++ ret = elf_strptr (ebl->elf, shstrndx, shdr->sh_name); ++ if (ret == NULL) ++ return ""; ++ return ret; + } + + +@@ -337,11 +350,6 @@ static const int valid_e_machine[] = + (sizeof (valid_e_machine) / sizeof (valid_e_machine[0])) + + +-/* Numbers of sections and program headers. */ +-static unsigned int shnum; +-static unsigned int phnum; +- +- + static void + check_elf_header (Ebl *ebl, GElf_Ehdr *ehdr, size_t size) + { +@@ -625,7 +633,8 @@ section [%2d] '%s': symbol table cannot + } + } + +- if (shdr->sh_entsize != gelf_fsize (ebl->elf, ELF_T_SYM, 1, EV_CURRENT)) ++ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_SYM, 1, EV_CURRENT); ++ if (shdr->sh_entsize != sh_entsize) + ERROR (gettext ("\ + section [%2u] '%s': entry size is does not match ElfXX_Sym\n"), + idx, section_name (ebl, idx)); +@@ -663,7 +672,7 @@ section [%2d] '%s': XINDEX for zeroth en + xndxscnidx, section_name (ebl, xndxscnidx)); + } + +- for (size_t cnt = 1; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt) ++ for (size_t cnt = 1; cnt < shdr->sh_size / sh_entsize; ++cnt) + { + sym = gelf_getsymshndx (data, xndxdata, cnt, &sym_mem, &xndx); + if (sym == NULL) +@@ -683,7 +692,8 @@ section [%2d] '%s': symbol %zu: invalid + else + { + name = elf_strptr (ebl->elf, shdr->sh_link, sym->st_name); +- assert (name != NULL); ++ assert (name != NULL ++ || strshdr->sh_type != SHT_STRTAB); + } + + if (sym->st_shndx == SHN_XINDEX) +@@ -1032,9 +1042,11 @@ is_rel_dyn (Ebl *ebl, const GElf_Ehdr *e + { + GElf_Shdr rcshdr_mem; + const GElf_Shdr *rcshdr = gelf_getshdr (scn, &rcshdr_mem); +- assert (rcshdr != NULL); + +- if (rcshdr->sh_type == SHT_DYNAMIC) ++ if (rcshdr == NULL) ++ break; ++ ++ if (rcshdr->sh_type == SHT_DYNAMIC && rcshdr->sh_entsize) + { + /* Found the dynamic section. Look through it. */ + Elf_Data *d = elf_getdata (scn, NULL); +@@ -1044,7 +1056,9 @@ is_rel_dyn (Ebl *ebl, const GElf_Ehdr *e + { + GElf_Dyn dyn_mem; + GElf_Dyn *dyn = gelf_getdyn (d, cnt, &dyn_mem); +- assert (dyn != NULL); ++ ++ if (dyn == NULL) ++ break; + + if (dyn->d_tag == DT_RELCOUNT) + { +@@ -1058,7 +1072,9 @@ section [%2d] '%s': DT_RELCOUNT used for + /* Does the number specified number of relative + relocations exceed the total number of + relocations? */ +- if (dyn->d_un.d_val > shdr->sh_size / shdr->sh_entsize) ++ if (shdr->sh_entsize != 0 ++ && dyn->d_un.d_val > (shdr->sh_size ++ / shdr->sh_entsize)) + ERROR (gettext ("\ + section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n"), + idx, section_name (ebl, idx), +@@ -1218,7 +1234,8 @@ section [%2d] '%s': no relocations for m + } + } + +- if (shdr->sh_entsize != gelf_fsize (ebl->elf, reltype, 1, EV_CURRENT)) ++ size_t sh_entsize = gelf_fsize (ebl->elf, reltype, 1, EV_CURRENT); ++ if (shdr->sh_entsize != sh_entsize) + ERROR (gettext (reltype == ELF_T_RELA ? "\ + section [%2d] '%s': section entry size does not match ElfXX_Rela\n" : "\ + section [%2d] '%s': section entry size does not match ElfXX_Rel\n"), +@@ -1441,7 +1458,8 @@ check_rela (Ebl *ebl, GElf_Ehdr *ehdr, G + Elf_Data *symdata = elf_getdata (symscn, NULL); + enum load_state state = state_undecided; + +- for (size_t cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt) ++ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_RELA, 1, EV_CURRENT); ++ for (size_t cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt) + { + GElf_Rela rela_mem; + GElf_Rela *rela = gelf_getrela (data, cnt, &rela_mem); +@@ -1491,7 +1509,8 @@ check_rel (Ebl *ebl, GElf_Ehdr *ehdr, GE + Elf_Data *symdata = elf_getdata (symscn, NULL); + enum load_state state = state_undecided; + +- for (size_t cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt) ++ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_REL, 1, EV_CURRENT); ++ for (size_t cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt) + { + GElf_Rel rel_mem; + GElf_Rel *rel = gelf_getrel (data, cnt, &rel_mem); +@@ -1590,7 +1609,8 @@ section [%2d] '%s': referenced as string + shdr->sh_link, section_name (ebl, shdr->sh_link), + idx, section_name (ebl, idx)); + +- if (shdr->sh_entsize != gelf_fsize (ebl->elf, ELF_T_DYN, 1, EV_CURRENT)) ++ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_DYN, 1, EV_CURRENT); ++ if (shdr->sh_entsize != sh_entsize) + ERROR (gettext ("\ + section [%2d] '%s': section entry size does not match ElfXX_Dyn\n"), + idx, section_name (ebl, idx)); +@@ -1600,7 +1620,7 @@ section [%2d] '%s': section entry size d + idx, section_name (ebl, idx)); + + bool non_null_warned = false; +- for (cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt) ++ for (cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt) + { + GElf_Dyn dyn_mem; + GElf_Dyn *dyn = gelf_getdyn (data, cnt, &dyn_mem); +@@ -1872,6 +1892,8 @@ section [%2d] '%s': entry size does not + idx, section_name (ebl, idx)); + + if (symshdr != NULL ++ && shdr->sh_entsize ++ && symshdr->sh_entsize + && (shdr->sh_size / shdr->sh_entsize + < symshdr->sh_size / symshdr->sh_entsize)) + ERROR (gettext ("\ +@@ -1898,6 +1920,12 @@ section [%2d] '%s': extended section ind + } + + Elf_Data *data = elf_getdata (elf_getscn (ebl->elf, idx), NULL); ++ if (data == NULL) ++ { ++ ERROR (gettext ("section [%2d] '%s': cannot get section data\n"), ++ idx, section_name (ebl, idx)); ++ return; ++ } + + if (*((Elf32_Word *) data->d_buf) != 0) + ERROR (gettext ("symbol 0 should have zero extended section index\n")); +@@ -1940,7 +1968,7 @@ section [%2d] '%s': hash table section i + + size_t maxidx = nchain; + +- if (symshdr != NULL) ++ if (symshdr != NULL && symshdr->sh_entsize != 0) + { + size_t symsize = symshdr->sh_size / symshdr->sh_entsize; + +@@ -1951,18 +1979,28 @@ section [%2d] '%s': hash table section i + maxidx = symsize; + } + ++ Elf32_Word *buf = (Elf32_Word *) data->d_buf; ++ Elf32_Word *end = (Elf32_Word *) ((char *) data->d_buf + shdr->sh_size); + size_t cnt; + for (cnt = 2; cnt < 2 + nbucket; ++cnt) +- if (((Elf32_Word *) data->d_buf)[cnt] >= maxidx) ++ { ++ if (buf + cnt >= end) ++ break; ++ else if (buf[cnt] >= maxidx) + ERROR (gettext ("\ + section [%2d] '%s': hash bucket reference %zu out of bounds\n"), + idx, section_name (ebl, idx), cnt - 2); ++ } + + for (; cnt < 2 + nbucket + nchain; ++cnt) +- if (((Elf32_Word *) data->d_buf)[cnt] >= maxidx) ++ { ++ if (buf + cnt >= end) ++ break; ++ else if (buf[cnt] >= maxidx) + ERROR (gettext ("\ + section [%2d] '%s': hash chain reference %zu out of bounds\n"), + idx, section_name (ebl, idx), cnt - 2 - nbucket); ++ } + } + + +@@ -1992,18 +2030,28 @@ section [%2d] '%s': hash table section i + maxidx = symsize; + } + ++ Elf64_Xword *buf = (Elf64_Xword *) data->d_buf; ++ Elf64_Xword *end = (Elf64_Xword *) ((char *) data->d_buf + shdr->sh_size); + size_t cnt; + for (cnt = 2; cnt < 2 + nbucket; ++cnt) +- if (((Elf64_Xword *) data->d_buf)[cnt] >= maxidx) ++ { ++ if (buf + cnt >= end) ++ break; ++ else if (buf[cnt] >= maxidx) + ERROR (gettext ("\ + section [%2d] '%s': hash bucket reference %zu out of bounds\n"), + idx, section_name (ebl, idx), cnt - 2); ++ } + + for (; cnt < 2 + nbucket + nchain; ++cnt) +- if (((Elf64_Xword *) data->d_buf)[cnt] >= maxidx) ++ { ++ if (buf + cnt >= end) ++ break; ++ else if (buf[cnt] >= maxidx) + ERROR (gettext ("\ + section [%2d] '%s': hash chain reference %" PRIu64 " out of bounds\n"), +- idx, section_name (ebl, idx), (uint64_t) (cnt - 2 - nbucket)); ++ idx, section_name (ebl, idx), (uint64_t) cnt - 2 - nbucket); ++ } + } + + +@@ -2028,7 +2076,7 @@ section [%2d] '%s': bitmask size not pow + if (shdr->sh_size < (4 + bitmask_words + nbuckets) * sizeof (Elf32_Word)) + { + ERROR (gettext ("\ +-section [%2d] '%s': hash table section is too small (is %ld, expected at least%ld)\n"), ++section [%2d] '%s': hash table section is too small (is %ld, expected at least %ld)\n"), + idx, section_name (ebl, idx), (long int) shdr->sh_size, + (long int) ((4 + bitmask_words + nbuckets) * sizeof (Elf32_Word))); + return; +@@ -2700,8 +2748,9 @@ section [%2d] '%s' refers in sh_link to + + /* The number of elements in the version symbol table must be the + same as the number of symbols. */ +- if (shdr->sh_size / shdr->sh_entsize +- != symshdr->sh_size / symshdr->sh_entsize) ++ if (shdr->sh_entsize && symshdr->sh_entsize ++ && (shdr->sh_size / shdr->sh_entsize ++ != symshdr->sh_size / symshdr->sh_entsize)) + ERROR (gettext ("\ + section [%2d] '%s' has different number of entries than symbol table [%2d] '%s'\n"), + idx, section_name (ebl, idx), +--- elfutils/src/readelf.c ++++ elfutils/src/readelf.c +@@ -1189,6 +1189,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G + Elf32_Word *grpref = (Elf32_Word *) data->d_buf; + + GElf_Sym sym_mem; ++ GElf_Sym *sym = gelf_getsym (symdata, shdr->sh_info, &sym_mem); ++ + printf ((grpref[0] & GRP_COMDAT) + ? ngettext ("\ + \nCOMDAT section group [%2zu] '%s' with signature '%s' contains %zu entry:\n", +@@ -1201,8 +1203,8 @@ handle_scngrp (Ebl *ebl, Elf_Scn *scn, G + data->d_size / sizeof (Elf32_Word) - 1), + elf_ndxscn (scn), + elf_strptr (ebl->elf, shstrndx, shdr->sh_name), +- elf_strptr (ebl->elf, symshdr->sh_link, +- gelf_getsym (symdata, shdr->sh_info, &sym_mem)->st_name) ++ (sym == NULL ? NULL ++ : elf_strptr (ebl->elf, symshdr->sh_link, sym->st_name)) + ?: gettext (""), + data->d_size / sizeof (Elf32_Word) - 1); + +@@ -1353,10 +1355,12 @@ static void + handle_dynamic (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr) + { + int class = gelf_getclass (ebl->elf); +- GElf_Shdr glink; ++ GElf_Shdr glink_mem; ++ GElf_Shdr *glink; + Elf_Data *data; + size_t cnt; + size_t shstrndx; ++ size_t sh_entsize; + + /* Get the data of the section. */ + data = elf_getdata (scn, NULL); +@@ -1368,21 +1372,26 @@ handle_dynamic (Ebl *ebl, Elf_Scn *scn, + error (EXIT_FAILURE, 0, + gettext ("cannot get section header string table index")); + ++ sh_entsize = gelf_fsize (ebl->elf, ELF_T_DYN, 1, EV_CURRENT); ++ ++ glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &glink_mem); ++ if (glink == NULL) ++ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"), ++ elf_ndxscn (scn)); ++ + printf (ngettext ("\ + \nDynamic segment contains %lu entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n", + "\ + \nDynamic segment contains %lu entries:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n", +- shdr->sh_size / shdr->sh_entsize), +- (unsigned long int) (shdr->sh_size / shdr->sh_entsize), ++ shdr->sh_size / sh_entsize), ++ (unsigned long int) (shdr->sh_size / sh_entsize), + class == ELFCLASS32 ? 10 : 18, shdr->sh_addr, + shdr->sh_offset, + (int) shdr->sh_link, +- elf_strptr (ebl->elf, shstrndx, +- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), +- &glink)->sh_name)); ++ elf_strptr (ebl->elf, shstrndx, glink->sh_name)); + fputs_unlocked (gettext (" Type Value\n"), stdout); + +- for (cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt) ++ for (cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt) + { + GElf_Dyn dynmem; + GElf_Dyn *dyn = gelf_getdyn (data, cnt, &dynmem); +@@ -1531,7 +1540,8 @@ static void + handle_relocs_rel (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr) + { + int class = gelf_getclass (ebl->elf); +- int nentries = shdr->sh_size / shdr->sh_entsize; ++ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_REL, 1, EV_CURRENT); ++ int nentries = shdr->sh_size / sh_entsize; + + /* Get the data of the section. */ + Elf_Data *data = elf_getdata (scn, NULL); +@@ -1717,7 +1727,8 @@ static void + handle_relocs_rela (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr) + { + int class = gelf_getclass (ebl->elf); +- int nentries = shdr->sh_size / shdr->sh_entsize; ++ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_RELA, 1, EV_CURRENT); ++ int nentries = shdr->sh_size / sh_entsize; + + /* Get the data of the section. */ + Elf_Data *data = elf_getdata (scn, NULL); +@@ -1964,6 +1975,13 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G + error (EXIT_FAILURE, 0, + gettext ("cannot get section header string table index")); + ++ GElf_Shdr glink_mem; ++ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), ++ &glink_mem); ++ if (glink == NULL) ++ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"), ++ elf_ndxscn (scn)); ++ + /* Now we can compute the number of entries in the section. */ + unsigned int nsyms = data->d_size / (class == ELFCLASS32 + ? sizeof (Elf32_Sym) +@@ -1974,15 +1992,12 @@ handle_symtab (Ebl *ebl, Elf_Scn *scn, G + nsyms), + (unsigned int) elf_ndxscn (scn), + elf_strptr (ebl->elf, shstrndx, shdr->sh_name), nsyms); +- GElf_Shdr glink; + printf (ngettext (" %lu local symbol String table: [%2u] '%s'\n", + " %lu local symbols String table: [%2u] '%s'\n", + shdr->sh_info), + (unsigned long int) shdr->sh_info, + (unsigned int) shdr->sh_link, +- elf_strptr (ebl->elf, shstrndx, +- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), +- &glink)->sh_name)); ++ elf_strptr (ebl->elf, shstrndx, glink->sh_name)); + + fputs_unlocked (class == ELFCLASS32 + ? gettext ("\ +@@ -2218,7 +2233,13 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn, + error (EXIT_FAILURE, 0, + gettext ("cannot get section header string table index")); + +- GElf_Shdr glink; ++ GElf_Shdr glink_mem; ++ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), ++ &glink_mem); ++ if (glink == NULL) ++ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"), ++ elf_ndxscn (scn)); ++ + printf (ngettext ("\ + \nVersion needs section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n", + "\ +@@ -2229,9 +2250,7 @@ handle_verneed (Ebl *ebl, Elf_Scn *scn, + class == ELFCLASS32 ? 10 : 18, shdr->sh_addr, + shdr->sh_offset, + (unsigned int) shdr->sh_link, +- elf_strptr (ebl->elf, shstrndx, +- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), +- &glink)->sh_name)); ++ elf_strptr (ebl->elf, shstrndx, glink->sh_name)); + + unsigned int offset = 0; + for (int cnt = shdr->sh_info; --cnt >= 0; ) +@@ -2284,8 +2303,14 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G + error (EXIT_FAILURE, 0, + gettext ("cannot get section header string table index")); + ++ GElf_Shdr glink_mem; ++ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), ++ &glink_mem); ++ if (glink == NULL) ++ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"), ++ elf_ndxscn (scn)); ++ + int class = gelf_getclass (ebl->elf); +- GElf_Shdr glink; + printf (ngettext ("\ + \nVersion definition section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n", + "\ +@@ -2297,9 +2322,7 @@ handle_verdef (Ebl *ebl, Elf_Scn *scn, G + class == ELFCLASS32 ? 10 : 18, shdr->sh_addr, + shdr->sh_offset, + (unsigned int) shdr->sh_link, +- elf_strptr (ebl->elf, shstrndx, +- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), +- &glink)->sh_name)); ++ elf_strptr (ebl->elf, shstrndx, glink->sh_name)); + + unsigned int offset = 0; + for (int cnt = shdr->sh_info; --cnt >= 0; ) +@@ -2561,25 +2584,30 @@ handle_versym (Ebl *ebl, Elf_Scn *scn, G + filename = NULL; + } + ++ GElf_Shdr glink_mem; ++ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), ++ &glink_mem); ++ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_HALF, 1, EV_CURRENT); ++ if (glink == NULL) ++ error (EXIT_FAILURE, 0, gettext ("invalid sh_link value in section %Zu"), ++ elf_ndxscn (scn)); ++ + /* Print the header. */ +- GElf_Shdr glink; + printf (ngettext ("\ + \nVersion symbols section [%2u] '%s' contains %d entry:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'", + "\ + \nVersion symbols section [%2u] '%s' contains %d entries:\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'", +- shdr->sh_size / shdr->sh_entsize), ++ shdr->sh_size / sh_entsize), + (unsigned int) elf_ndxscn (scn), + elf_strptr (ebl->elf, shstrndx, shdr->sh_name), +- (int) (shdr->sh_size / shdr->sh_entsize), ++ (int) (shdr->sh_size / sh_entsize), + class == ELFCLASS32 ? 10 : 18, shdr->sh_addr, + shdr->sh_offset, + (unsigned int) shdr->sh_link, +- elf_strptr (ebl->elf, shstrndx, +- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), +- &glink)->sh_name)); ++ elf_strptr (ebl->elf, shstrndx, glink->sh_name)); + + /* Now we can finally look at the actual contents of this section. */ +- for (unsigned int cnt = 0; cnt < shdr->sh_size / shdr->sh_entsize; ++cnt) ++ for (unsigned int cnt = 0; cnt < shdr->sh_size / sh_entsize; ++cnt) + { + if (cnt % 2 == 0) + printf ("\n %4d:", cnt); +@@ -2628,7 +2656,17 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn, + for (Elf32_Word cnt = 0; cnt < nbucket; ++cnt) + ++counts[lengths[cnt]]; + +- GElf_Shdr glink; ++ GElf_Shdr glink_mem; ++ GElf_Shdr *glink = gelf_getshdr (elf_getscn (ebl->elf, ++ shdr->sh_link), ++ &glink_mem); ++ if (glink == NULL) ++ { ++ error (0, 0, gettext ("invalid sh_link value in section %Zu"), ++ elf_ndxscn (scn)); ++ return; ++ } ++ + printf (ngettext ("\ + \nHistogram for bucket list length in section [%2u] '%s' (total of %d bucket):\n Addr: %#0*" PRIx64 " Offset: %#08" PRIx64 " Link to section: [%2u] '%s'\n", + "\ +@@ -2641,9 +2679,7 @@ print_hash_info (Ebl *ebl, Elf_Scn *scn, + shdr->sh_addr, + shdr->sh_offset, + (unsigned int) shdr->sh_link, +- elf_strptr (ebl->elf, shstrndx, +- gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), +- &glink)->sh_name)); ++ elf_strptr (ebl->elf, shstrndx, glink->sh_name)); + + if (extrastr != NULL) + fputs (extrastr, stdout); +@@ -2903,7 +2939,8 @@ print_liblist (Ebl *ebl) + + if (shdr != NULL && shdr->sh_type == SHT_GNU_LIBLIST) + { +- int nentries = shdr->sh_size / shdr->sh_entsize; ++ size_t sh_entsize = gelf_fsize (ebl->elf, ELF_T_LIB, 1, EV_CURRENT); ++ int nentries = shdr->sh_size / sh_entsize; + printf (ngettext ("\ + \nLibrary list section [%2zu] '%s' at offset %#0" PRIx64 " contains %d entry:\n", + "\ +@@ -4164,6 +4201,16 @@ print_debug_aranges_section (Dwfl_Module + return; + } + ++ GElf_Shdr glink_mem; ++ GElf_Shdr *glink; ++ glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &glink_mem); ++ if (glink == NULL) ++ { ++ error (0, 0, gettext ("invalid sh_link value in section %Zu"), ++ elf_ndxscn (scn)); ++ return; ++ } ++ + printf (ngettext ("\ + \nDWARF section [%2zu] '%s' at offset %#" PRIx64 " contains %zu entry:\n", + "\ +--- elfutils/src/strip.c ++++ elfutils/src/strip.c +@@ -564,6 +564,11 @@ handle_elf (int fd, Elf *elf, const char + goto fail_close; + } + ++ if (shstrndx >= shnum) ++ goto illformed; ++ ++#define elf_assert(test) do { if (!(test)) goto illformed; } while (0) ++ + /* Storage for section information. We leave room for two more + entries since we unconditionally create a section header string + table. Maybe some weird tool created an ELF file without one. +@@ -585,7 +590,7 @@ handle_elf (int fd, Elf *elf, const char + { + /* This should always be true (i.e., there should not be any + holes in the numbering). */ +- assert (elf_ndxscn (scn) == cnt); ++ elf_assert (elf_ndxscn (scn) == cnt); + + shdr_info[cnt].scn = scn; + +@@ -598,6 +603,7 @@ handle_elf (int fd, Elf *elf, const char + shdr_info[cnt].shdr.sh_name); + if (shdr_info[cnt].name == NULL) + { ++ illformed: + error (0, 0, gettext ("illformed file '%s'"), fname); + goto fail_close; + } +@@ -607,6 +613,8 @@ handle_elf (int fd, Elf *elf, const char + + /* Remember the shdr.sh_link value. */ + shdr_info[cnt].old_sh_link = shdr_info[cnt].shdr.sh_link; ++ if (shdr_info[cnt].old_sh_link >= shnum) ++ goto illformed; + + /* Sections in files other than relocatable object files which + are not loaded can be freely moved by us. In relocatable +@@ -619,7 +627,7 @@ handle_elf (int fd, Elf *elf, const char + appropriate reference. */ + if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB_SHNDX)) + { +- assert (shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx == 0); ++ elf_assert (shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx == 0); + shdr_info[shdr_info[cnt].shdr.sh_link].symtab_idx = cnt; + } + else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GROUP)) +@@ -636,7 +644,12 @@ handle_elf (int fd, Elf *elf, const char + for (inner = 1; + inner < shdr_info[cnt].data->d_size / sizeof (Elf32_Word); + ++inner) ++ { ++ if (grpref[inner] < shnum) + shdr_info[grpref[inner]].group_idx = cnt; ++ else ++ goto illformed; ++ } + + if (inner == 1 || (inner == 2 && (grpref[0] & GRP_COMDAT) == 0)) + /* If the section group contains only one element and this +@@ -647,7 +660,7 @@ handle_elf (int fd, Elf *elf, const char + } + else if (unlikely (shdr_info[cnt].shdr.sh_type == SHT_GNU_versym)) + { +- assert (shdr_info[shdr_info[cnt].shdr.sh_link].version_idx == 0); ++ elf_assert (shdr_info[shdr_info[cnt].shdr.sh_link].version_idx == 0); + shdr_info[shdr_info[cnt].shdr.sh_link].version_idx = cnt; + } + +@@ -655,7 +668,7 @@ handle_elf (int fd, Elf *elf, const char + discarded right away. */ + if ((shdr_info[cnt].shdr.sh_flags & SHF_GROUP) != 0) + { +- assert (shdr_info[cnt].group_idx != 0); ++ elf_assert (shdr_info[cnt].group_idx != 0); + + if (shdr_info[shdr_info[cnt].group_idx].idx == 0) + { +@@ -731,10 +744,14 @@ handle_elf (int fd, Elf *elf, const char + { + /* If a relocation section is marked as being removed make + sure the section it is relocating is removed, too. */ +- if ((shdr_info[cnt].shdr.sh_type == SHT_REL ++ if (shdr_info[cnt].shdr.sh_type == SHT_REL + || shdr_info[cnt].shdr.sh_type == SHT_RELA) +- && shdr_info[shdr_info[cnt].shdr.sh_info].idx != 0) +- shdr_info[cnt].idx = 1; ++ { ++ if (shdr_info[cnt].shdr.sh_info >= shnum) ++ goto illformed; ++ else if (shdr_info[shdr_info[cnt].shdr.sh_info].idx != 0) ++ shdr_info[cnt].idx = 1; ++ } + + /* If a group section is marked as being removed make + sure all the sections it contains are being removed, too. */ +@@ -778,7 +795,7 @@ handle_elf (int fd, Elf *elf, const char + if (shdr_info[cnt].symtab_idx != 0 + && shdr_info[shdr_info[cnt].symtab_idx].data == NULL) + { +- assert (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB); ++ elf_assert (shdr_info[cnt].shdr.sh_type == SHT_SYMTAB); + + shdr_info[shdr_info[cnt].symtab_idx].data + = elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn, +@@ -818,6 +835,9 @@ handle_elf (int fd, Elf *elf, const char + else if (scnidx == SHN_XINDEX) + scnidx = xndx; + ++ if (scnidx >= shnum) ++ goto illformed; ++ + if (shdr_info[scnidx].idx == 0) + /* This symbol table has a real symbol in + a discarded section. So preserve the +@@ -848,12 +868,16 @@ handle_elf (int fd, Elf *elf, const char + } + + /* Handle references through sh_info. */ +- if (SH_INFO_LINK_P (&shdr_info[cnt].shdr) +- && shdr_info[shdr_info[cnt].shdr.sh_info].idx == 0) ++ if (SH_INFO_LINK_P (&shdr_info[cnt].shdr)) ++ { ++ if (shdr_info[cnt].shdr.sh_info >= shnum) ++ goto illformed; ++ else if ( shdr_info[shdr_info[cnt].shdr.sh_info].idx == 0) + { + shdr_info[shdr_info[cnt].shdr.sh_info].idx = 1; + changes |= shdr_info[cnt].shdr.sh_info < cnt; + } ++ } + + /* Mark the section as investigated. */ + shdr_info[cnt].idx = 2; +@@ -994,7 +1018,7 @@ handle_elf (int fd, Elf *elf, const char + error (EXIT_FAILURE, 0, gettext ("while generating output file: %s"), + elf_errmsg (-1)); + +- assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx); ++ elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx); + + /* Add this name to the section header string table. */ + shdr_info[cnt].se = ebl_strtabadd (shst, shdr_info[cnt].name, 0); +@@ -1031,7 +1055,7 @@ handle_elf (int fd, Elf *elf, const char + error (EXIT_FAILURE, 0, + gettext ("while create section header section: %s"), + elf_errmsg (-1)); +- assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx); ++ elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == shdr_info[cnt].idx); + + shdr_info[cnt].data = elf_newdata (shdr_info[cnt].newscn); + if (shdr_info[cnt].data == NULL) +@@ -1087,7 +1111,7 @@ handle_elf (int fd, Elf *elf, const char + error (EXIT_FAILURE, 0, + gettext ("while create section header section: %s"), + elf_errmsg (-1)); +- assert (elf_ndxscn (shdr_info[cnt].newscn) == idx); ++ elf_assert (elf_ndxscn (shdr_info[cnt].newscn) == idx); + + /* Finalize the string table and fill in the correct indices in the + section headers. */ +@@ -1177,20 +1201,20 @@ handle_elf (int fd, Elf *elf, const char + shndxdata = elf_getdata (shdr_info[shdr_info[cnt].symtab_idx].scn, + NULL); + +- assert ((versiondata->d_size / sizeof (Elf32_Word)) ++ elf_assert ((versiondata->d_size / sizeof (Elf32_Word)) + >= shdr_info[cnt].data->d_size / elsize); + } + + if (shdr_info[cnt].version_idx != 0) + { +- assert (shdr_info[cnt].shdr.sh_type == SHT_DYNSYM); ++ elf_assert (shdr_info[cnt].shdr.sh_type == SHT_DYNSYM); + /* This section has associated version + information. We have to modify that + information, too. */ + versiondata = elf_getdata (shdr_info[shdr_info[cnt].version_idx].scn, + NULL); + +- assert ((versiondata->d_size / sizeof (GElf_Versym)) ++ elf_assert ((versiondata->d_size / sizeof (GElf_Versym)) + >= shdr_info[cnt].data->d_size / elsize); + } + +@@ -1245,7 +1269,7 @@ handle_elf (int fd, Elf *elf, const char + sec = shdr_info[sym->st_shndx].idx; + else + { +- assert (shndxdata != NULL); ++ elf_assert (shndxdata != NULL); + + sec = shdr_info[xshndx].idx; + } +@@ -1266,7 +1290,7 @@ handle_elf (int fd, Elf *elf, const char + nxshndx = sec; + } + +- assert (sec < SHN_LORESERVE || shndxdata != NULL); ++ elf_assert (sec < SHN_LORESERVE || shndxdata != NULL); + + if ((inner != destidx || nshndx != sym->st_shndx + || (shndxdata != NULL && nxshndx != xshndx)) +@@ -1293,9 +1317,11 @@ handle_elf (int fd, Elf *elf, const char + { + size_t sidx = (sym->st_shndx != SHN_XINDEX + ? sym->st_shndx : xshndx); +- assert (GELF_ST_TYPE (sym->st_info) == STT_SECTION +- || (shdr_info[sidx].shdr.sh_type == SHT_GROUP +- && shdr_info[sidx].shdr.sh_info == inner)); ++ elf_assert (GELF_ST_TYPE (sym->st_info) == STT_SECTION ++ || ((shdr_info[sidx].shdr.sh_type ++ == SHT_GROUP) ++ && (shdr_info[sidx].shdr.sh_info ++ == inner))); + } + } + +@@ -1483,11 +1509,11 @@ handle_elf (int fd, Elf *elf, const char + { + GElf_Sym sym_mem; + GElf_Sym *sym = gelf_getsym (symd, inner, &sym_mem); +- assert (sym != NULL); ++ elf_assert (sym != NULL); + + const char *name = elf_strptr (elf, strshndx, + sym->st_name); +- assert (name != NULL); ++ elf_assert (name != NULL); + size_t hidx = elf_hash (name) % nbucket; + + if (bucket[hidx] == 0) +@@ -1506,8 +1532,8 @@ handle_elf (int fd, Elf *elf, const char + else + { + /* Alpha and S390 64-bit use 64-bit SHT_HASH entries. */ +- assert (shdr_info[cnt].shdr.sh_entsize +- == sizeof (Elf64_Xword)); ++ elf_assert (shdr_info[cnt].shdr.sh_entsize ++ == sizeof (Elf64_Xword)); + + Elf64_Xword *bucket = (Elf64_Xword *) hashd->d_buf; + +@@ -1537,11 +1563,11 @@ handle_elf (int fd, Elf *elf, const char + { + GElf_Sym sym_mem; + GElf_Sym *sym = gelf_getsym (symd, inner, &sym_mem); +- assert (sym != NULL); ++ elf_assert (sym != NULL); + + const char *name = elf_strptr (elf, strshndx, + sym->st_name); +- assert (name != NULL); ++ elf_assert (name != NULL); + size_t hidx = elf_hash (name) % nbucket; + + if (bucket[hidx] == 0) diff --git a/packages/devel/elfutils/patches/elfutils-no_textrel_check.patch b/packages/devel/elfutils/patches/elfutils-no_textrel_check.patch new file mode 100644 index 0000000000..d2d0c9d6ad --- /dev/null +++ b/packages/devel/elfutils/patches/elfutils-no_textrel_check.patch @@ -0,0 +1,77 @@ +diff -Naur elfutils-0.155/libasm/Makefile.am elfutils-0.155.patch/libasm/Makefile.am +--- elfutils-0.155/libasm/Makefile.am 2012-08-27 20:27:31.000000000 +0200 ++++ elfutils-0.155.patch/libasm/Makefile.am 2013-03-05 18:11:43.841545009 +0100 +@@ -69,7 +69,6 @@ + -Wl,--version-script,$(srcdir)/libasm.map,--no-undefined \ + -Wl,--soname,$@.$(VERSION) \ + ../libebl/libebl.a ../libelf/libelf.so $(libasm_so_LDLIBS) +- if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi + ln -fs $@ $@.$(VERSION) + + install: install-am libasm.so +diff -Naur elfutils-0.155/libasm/Makefile.in elfutils-0.155.patch/libasm/Makefile.in +--- elfutils-0.155/libasm/Makefile.in 2012-08-27 20:29:45.000000000 +0200 ++++ elfutils-0.155.patch/libasm/Makefile.in 2013-03-05 18:12:05.604432305 +0100 +@@ -654,7 +654,6 @@ + @MUDFLAP_FALSE@ -Wl,--version-script,$(srcdir)/libasm.map,--no-undefined \ + @MUDFLAP_FALSE@ -Wl,--soname,$@.$(VERSION) \ + @MUDFLAP_FALSE@ ../libebl/libebl.a ../libelf/libelf.so $(libasm_so_LDLIBS) +-@MUDFLAP_FALSE@ if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi + @MUDFLAP_FALSE@ ln -fs $@ $@.$(VERSION) + + @MUDFLAP_FALSE@install: install-am libasm.so +diff -Naur elfutils-0.155/libdw/Makefile.am elfutils-0.155.patch/libdw/Makefile.am +--- elfutils-0.155/libdw/Makefile.am 2012-08-27 20:27:31.000000000 +0200 ++++ elfutils-0.155.patch/libdw/Makefile.am 2013-03-05 18:12:26.753322780 +0100 +@@ -112,7 +112,6 @@ + -Wl,--version-script,$<,--no-undefined \ + -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\ + -ldl $(zip_LIBS) +- if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi + ln -fs $@ $@.$(VERSION) + + install: install-am libdw.so +diff -Naur elfutils-0.155/libdw/Makefile.in elfutils-0.155.patch/libdw/Makefile.in +--- elfutils-0.155/libdw/Makefile.in 2012-08-27 20:29:45.000000000 +0200 ++++ elfutils-0.155.patch/libdw/Makefile.in 2013-03-05 18:12:41.272246520 +0100 +@@ -844,7 +844,6 @@ + @MUDFLAP_FALSE@ -Wl,--version-script,$<,--no-undefined \ + @MUDFLAP_FALSE@ -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\ + @MUDFLAP_FALSE@ -ldl $(zip_LIBS) +-@MUDFLAP_FALSE@ if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi + @MUDFLAP_FALSE@ ln -fs $@ $@.$(VERSION) + + @MUDFLAP_FALSE@install: install-am libdw.so +diff -Naur elfutils-0.155/libelf/Makefile.am elfutils-0.155.patch/libelf/Makefile.am +--- elfutils-0.155/libelf/Makefile.am 2012-08-27 20:27:31.000000000 +0200 ++++ elfutils-0.155.patch/libelf/Makefile.am 2013-03-05 18:13:23.328024851 +0100 +@@ -106,7 +106,6 @@ + $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \ + -Wl,--version-script,$(srcdir)/libelf.map,--no-undefined \ + -Wl,--soname,$@.$(VERSION),-z,defs,-z,relro $(libelf_so_LDLIBS) +- if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi + ln -fs $@ $@.$(VERSION) + + install: install-am libelf.so +diff -Naur elfutils-0.155/libelf/Makefile.in elfutils-0.155.patch/libelf/Makefile.in +--- elfutils-0.155/libelf/Makefile.in 2012-08-27 20:29:45.000000000 +0200 ++++ elfutils-0.155.patch/libelf/Makefile.in 2013-03-05 18:13:37.270951393 +0100 +@@ -830,7 +830,6 @@ + @MUDFLAP_FALSE@ $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \ + @MUDFLAP_FALSE@ -Wl,--version-script,$(srcdir)/libelf.map,--no-undefined \ + @MUDFLAP_FALSE@ -Wl,--soname,$@.$(VERSION),-z,defs,-z,relro $(libelf_so_LDLIBS) +-@MUDFLAP_FALSE@ if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi + @MUDFLAP_FALSE@ ln -fs $@ $@.$(VERSION) + + @MUDFLAP_FALSE@install: install-am libelf.so +diff -Naur elfutils-0.155/src/Makefile.in elfutils-0.155.patch/src/Makefile.in +--- elfutils-0.155/src/Makefile.in 2012-08-27 20:29:46.000000000 +0200 ++++ elfutils-0.155.patch/src/Makefile.in 2013-03-05 18:14:22.361713943 +0100 +@@ -867,7 +867,6 @@ + @NATIVE_LD_FALSE@ $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \ + @NATIVE_LD_FALSE@ $(libelf) $(libeu) \ + @NATIVE_LD_FALSE@ -Wl,--version-script,$(srcdir)/libld_elf_i386.map +-@NATIVE_LD_FALSE@ $(textrel_check) + + # Special rule to make it possible to define libld_elf_a_SOURCES as we do. + # Otherwise make would complain. diff --git a/packages/devel/elfutils/patches/elfutils-only_libdw_libelf.patch b/packages/devel/elfutils/patches/elfutils-only_libdw_libelf.patch new file mode 100644 index 0000000000..bd9a771a03 --- /dev/null +++ b/packages/devel/elfutils/patches/elfutils-only_libdw_libelf.patch @@ -0,0 +1,26 @@ +diff -Naur elfutils-0.155/Makefile.am elfutils-0.155.patch/Makefile.am +--- elfutils-0.155/Makefile.am 2012-08-27 20:27:31.000000000 +0200 ++++ elfutils-0.155.patch/Makefile.am 2013-03-05 18:38:47.565095550 +0100 +@@ -23,8 +23,7 @@ + pkginclude_HEADERS = version.h + + # Add doc back when we have some real content. +-SUBDIRS = config m4 lib libelf libebl libdwfl libdw libcpu libasm backends \ +- src po tests ++SUBDIRS = config m4 lib libelf libebl libdwfl libdw + + EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \ + COPYING COPYING-GPLV2 COPYING-LGPLV3 +diff -Naur elfutils-0.155/Makefile.in elfutils-0.155.patch/Makefile.in +--- elfutils-0.155/Makefile.in 2012-08-27 20:29:45.000000000 +0200 ++++ elfutils-0.155.patch/Makefile.in 2013-03-05 18:39:11.176974119 +0100 +@@ -256,8 +256,7 @@ + pkginclude_HEADERS = version.h + + # Add doc back when we have some real content. +-SUBDIRS = config m4 lib libelf libebl libdwfl libdw libcpu libasm backends \ +- src po tests ++SUBDIRS = config m4 lib libelf libebl libdwfl libdw + + EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \ + COPYING COPYING-GPLV2 COPYING-LGPLV3 diff --git a/packages/devel/libcec/meta b/packages/devel/libcec/meta index 6734963e2c..7f94bdf2d8 100644 --- a/packages/devel/libcec/meta +++ b/packages/devel/libcec/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="libcec" -PKG_VERSION="2.1.0" +PKG_VERSION="2.1.1" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/devel/libpcap/build b/packages/devel/libpcap/build index 165315c527..62a4e45078 100755 --- a/packages/devel/libpcap/build +++ b/packages/devel/libpcap/build @@ -29,10 +29,15 @@ cd $BUILD/$1* sed -i -e 's/ac_cv_linux_vers=unknown/ac_cv_linux_vers=2/' configure LIBS="-lpthread" \ +ac_cv_header_libusb_1_0_libusb_h=no \ ./configure \ --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ - --with-pcap=linux + --disable-shared \ + --with-pcap=linux \ + --disable-bluetooth \ + --disable-can \ + --disable-canusb \ $MAKEINSTALL diff --git a/packages/devel/ncurses/install b/packages/devel/ncurses/install index a6c15d1b27..883ff9b267 100755 --- a/packages/devel/ncurses/install +++ b/packages/devel/ncurses/install @@ -36,6 +36,10 @@ TERMINFO=$INSTALL/usr/share/terminfo $ROOT/$TOOLCHAIN/bin/tic -xe linux \ $PKG_BUILD/misc/terminfo.src + mkdir -p $INSTALL/usr/share/terminfo/s + TERMINFO=$INSTALL/usr/share/terminfo $ROOT/$TOOLCHAIN/bin/tic -xe screen \ + $PKG_BUILD/misc/terminfo.src + mkdir -p $INSTALL/usr/share/terminfo/v TERMINFO=$INSTALL/usr/share/terminfo $ROOT/$TOOLCHAIN/bin/tic -xe vt100 \ $PKG_BUILD/misc/terminfo.src @@ -45,5 +49,3 @@ $PKG_BUILD/misc/terminfo.src TERMINFO=$INSTALL/usr/share/terminfo $ROOT/$TOOLCHAIN/bin/tic -xe xterm-color \ $PKG_BUILD/misc/terminfo.src - TERMINFO=$INSTALL/usr/share/terminfo $ROOT/$TOOLCHAIN/bin/tic -xe vt100 \ - $PKG_BUILD/misc/terminfo.src diff --git a/packages/devel/newt/build b/packages/devel/newt/build new file mode 100755 index 0000000000..fd6bee44c3 --- /dev/null +++ b/packages/devel/newt/build @@ -0,0 +1,36 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2013 Dag Wieers (dag@wieers.com) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +cd $PKG_BUILD +./configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + --exec-prefix=/usr \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --without-python \ + --without-tcl + +make +$MAKEINSTALL diff --git a/packages/devel/newt/install b/packages/devel/newt/install new file mode 100755 index 0000000000..4d035c084b --- /dev/null +++ b/packages/devel/newt/install @@ -0,0 +1,26 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2013 Dag Wieers (dag@wieers.com) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +mkdir -p $INSTALL/usr/lib/ + cp -PR $PKG_BUILD/libnewt.so* $INSTALL/usr/lib/ diff --git a/packages/devel/newt/meta b/packages/devel/newt/meta new file mode 100644 index 0000000000..4e54a60551 --- /dev/null +++ b/packages/devel/newt/meta @@ -0,0 +1,36 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2013 Dag Wieers (dag@wieers.com) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="newt" +PKG_VERSION="0.52.14" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="LGPL" +PKG_SITE="https://fedorahosted.org/newt/" +PKG_URL="https://fedorahosted.org/releases/n/e/newt/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="popt slang" +PKG_BUILD_DEPENDS="toolchain popt slang" +PKG_PRIORITY="optional" +PKG_SECTION="devel" +PKG_SHORTDESC="newt: library for color text mode, widget based user interfaces" +PKG_LONGDESC="Newt is a programming library for color text mode, widget based user interfaces. Newt can be used to add stacked windows, entry widgets, checkboxes, radio buttons, labels, plain text fields, scrollbars, etc., to text mode user interfaces. Newt is based on the S-Lang library." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/devel/popt/build b/packages/devel/popt/build new file mode 100755 index 0000000000..9455093226 --- /dev/null +++ b/packages/devel/popt/build @@ -0,0 +1,36 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2013 Dag Wieers (dag@wieers.com) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. 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/popt/install b/packages/devel/popt/install new file mode 100755 index 0000000000..880d16ecd4 --- /dev/null +++ b/packages/devel/popt/install @@ -0,0 +1,26 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2013 Dag Wieers (dag@wieers.com) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +mkdir -p $INSTALL/usr/lib/ + cp -PR $PKG_BUILD/.libs/libpopt.so* $INSTALL/usr/lib/ diff --git a/packages/devel/popt/meta b/packages/devel/popt/meta new file mode 100644 index 0000000000..255ab1a904 --- /dev/null +++ b/packages/devel/popt/meta @@ -0,0 +1,36 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2023 Dag Wieers (dag@wieers.com) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="popt" +PKG_VERSION="1.16" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="LGPL" +PKG_SITE="http://www.rpm5.org/" +PKG_URL="http://rpm5.org/files/popt/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="devel" +PKG_SHORTDESC="popt: library for parsing command line parameters" +PKG_LONGDESC="Popt is a C library for parsing command line parameters. Popt was heavily influenced by the getopt() and getopt_long() functions, but it improves on them by allowing more powerful argument expansion. Popt can parse arbitrary argv[] style arrays and automatically set variables based on command line arguments. Popt allows command line arguments to be aliased via configuration files and includes utility functions for parsing arbitrary strings into argv[] arrays using shell-like rules." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/devel/popt/patches/popt-automake-1.12.patch b/packages/devel/popt/patches/popt-automake-1.12.patch new file mode 100644 index 0000000000..3bd92081d6 --- /dev/null +++ b/packages/devel/popt/patches/popt-automake-1.12.patch @@ -0,0 +1,11 @@ +diff -Naur popt-1.16/configure.ac popt-1.16.patch/configure.ac +--- popt-1.16/configure.ac 2010-05-04 22:55:54.000000000 +0200 ++++ popt-1.16.patch/configure.ac 2013-03-05 13:20:28.769315267 +0100 +@@ -46,7 +46,6 @@ + AC_SYS_LARGEFILE + + AC_ISC_POSIX +-AM_C_PROTOTYPES + + AC_CHECK_HEADERS(float.h fnmatch.h glob.h langinfo.h libintl.h mcheck.h unistd.h) + diff --git a/packages/devel/popt/patches/popt-automake-1.13.patch b/packages/devel/popt/patches/popt-automake-1.13.patch new file mode 100644 index 0000000000..d62ec3d1e4 --- /dev/null +++ b/packages/devel/popt/patches/popt-automake-1.13.patch @@ -0,0 +1,15 @@ +diff -Naur popt-1.16/Makefile.am popt-1.16.patch/Makefile.am +--- popt-1.16/Makefile.am 2010-05-04 22:55:54.000000000 +0200 ++++ popt-1.16.patch/Makefile.am 2013-03-05 13:27:22.179156704 +0100 +@@ -34,11 +34,6 @@ + + noinst_SCRIPTS = testit.sh + +-TESTS_ENVIRONMENT = \ +-test1="$(top_builddir)/test1" +- +-TESTS = $(top_srcdir)/testit.sh +- + include_HEADERS = popt.h + + usrlibdir = $(libdir) diff --git a/packages/devel/slang/build b/packages/devel/slang/build new file mode 100755 index 0000000000..f79f129022 --- /dev/null +++ b/packages/devel/slang/build @@ -0,0 +1,42 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2013 Dag Wieers (dag@wieers.com) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +MAKEFLAGS=-j1 + +cd $PKG_BUILD +./configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + --exec-prefix=/usr \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --without-iconv \ + --without-onig \ + --without-pcre \ + --without-png \ + --without-z \ + --without-x \ + +make +$MAKEINSTALL diff --git a/packages/devel/slang/install b/packages/devel/slang/install new file mode 100755 index 0000000000..420329f195 --- /dev/null +++ b/packages/devel/slang/install @@ -0,0 +1,26 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2013 Dag Wieers (dag@wieers.com) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + + mkdir -p $INSTALL/usr/lib/ + cp -PR $PKG_BUILD/src/*/libslang.so* $INSTALL/usr/lib/ diff --git a/packages/devel/slang/meta b/packages/devel/slang/meta new file mode 100644 index 0000000000..9a7460ba15 --- /dev/null +++ b/packages/devel/slang/meta @@ -0,0 +1,36 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2013 Dag Wieers (dag@wieers.com) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="slang" +PKG_VERSION="2.2.4" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="LGPL" +PKG_SITE="http://www.jedsoft.org/slang/" +PKG_URL="ftp://ftp.fu-berlin.de/pub/unix/misc/slang/v2.2/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="devel" +PKG_SHORTDESC="slang: library for the S-Lang extension language" +PKG_LONGDESC="S-Lang is an interpreted language and a programming library. The S-Lang language was designed so that it can be easily embedded into a program to provide the program with a powerful extension language. The S-Lang library, provided in this package, provides the S-Lang extension language. S-Lang's syntax resembles C, which makes it easy to recode S-Lang procedures in C if you need to." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/graphics/bcm2835-driver/meta b/packages/graphics/bcm2835-driver/meta index b6685c33c8..b82728899c 100644 --- a/packages/graphics/bcm2835-driver/meta +++ b/packages/graphics/bcm2835-driver/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="bcm2835-driver" -PKG_VERSION="fea69f6" +PKG_VERSION="98e5704" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="nonfree" diff --git a/packages/initramfs/sysutils/busybox-initramfs/config/busybox-initramfs.conf b/packages/initramfs/sysutils/busybox-initramfs/config/busybox-initramfs.conf index 073c50ec04..8f59686f18 100644 --- a/packages/initramfs/sysutils/busybox-initramfs/config/busybox-initramfs.conf +++ b/packages/initramfs/sysutils/busybox-initramfs/config/busybox-initramfs.conf @@ -209,7 +209,7 @@ CONFIG_CP=y # CONFIG_FEATURE_DD_SIGNAL_HANDLING is not set # CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set # CONFIG_FEATURE_DD_IBS_OBS is not set -# CONFIG_DF is not set +CONFIG_DF=y # CONFIG_FEATURE_DF_FANCY is not set # CONFIG_DIRNAME is not set # CONFIG_DOS2UNIX is not set @@ -273,7 +273,7 @@ CONFIG_SLEEP=y # CONFIG_FEATURE_SORT_BIG is not set # CONFIG_SPLIT is not set # CONFIG_FEATURE_SPLIT_FANCY is not set -# CONFIG_STAT is not set +CONFIG_STAT=y # CONFIG_FEATURE_STAT_FORMAT is not set # CONFIG_STTY is not set # CONFIG_SUM is not set @@ -997,7 +997,7 @@ CONFIG_FEATURE_BASH_IS_ASH=y # CONFIG_FEATURE_BASH_IS_HUSH is not set # CONFIG_FEATURE_BASH_IS_NONE is not set CONFIG_SH_MATH_SUPPORT=y -# CONFIG_SH_MATH_SUPPORT_64 is not set +CONFIG_SH_MATH_SUPPORT_64=y CONFIG_FEATURE_SH_EXTRA_QUIET=y CONFIG_FEATURE_SH_STANDALONE=y # CONFIG_FEATURE_SH_NOFORK is not set diff --git a/packages/initramfs/sysutils/busybox-initramfs/scripts/init b/packages/initramfs/sysutils/busybox-initramfs/scripts/init index 51dab2d243..e8d9344412 100755 --- a/packages/initramfs/sysutils/busybox-initramfs/scripts/init +++ b/packages/initramfs/sysutils/busybox-initramfs/scripts/init @@ -39,8 +39,10 @@ REBOOT="0" MD5_FAILED="0" MD5_NOCHECK="0" + SIZE_FAILED="0" NBD_DEVS="0" + FLASH_FREE_MIN="5" INSTALLED_MEMORY=`cat /proc/meminfo | grep 'MemTotal:' | awk '{print $2}'` SYSTEM_TORAM_LIMIT=1024000 @@ -444,21 +446,53 @@ MD5_FAILED="1" fi - # update if md5 check is ok or .nocheck exists - if [ "$MD5_FAILED" -eq "0" -o "$MD5_NOCHECK" -eq "1" ] ; then - update "Kernel" "$UPDATE_KERNEL" "/flash/$IMAGE_KERNEL" - update "System" "$UPDATE_SYSTEM" "/flash/$IMAGE_SYSTEM" - update_bootloader - REBOOT="1" + # get sizes + FLASH_FREE=$(/bin/busybox df /flash/ | awk '/[0-9]%/{print $4}') + FLASH_FREE=$(( $FLASH_FREE * 1024 )) + OLD_KERNEL=$(/bin/busybox stat -t "/flash/$IMAGE_KERNEL" | awk '{print $2}') + OLD_SYSTEM=$(/bin/busybox stat -t "/flash/$IMAGE_SYSTEM" | awk '{print $2}') + NEW_KERNEL=$(/bin/busybox stat -t "$UPDATE_DIR/$UPDATE_KERNEL" | awk '{print $2}') + NEW_SYSTEM=$(/bin/busybox stat -t "$UPDATE_DIR/$UPDATE_SYSTEM" | awk '{print $2}') + + # old KERNEL+SYSTEM+free space - new KERNEL+SYSTEM must be higher then 5MB + # at least 5MB free after update + + TMP_SIZE=$(($OLD_KERNEL+$OLD_SYSTEM+$FLASH_FREE-$NEW_KERNEL-$NEW_SYSTEM)) + FLASH_FREE_MIN=$(($FLASH_FREE_MIN*1024*1024)) + + if [ $TMP_SIZE -ge $FLASH_FREE_MIN ]; then + echo "Checking size: OK" + else + echo "Checking size: FAILED" + SIZE_FAILED="1" + fi + + # update if size check is ok + if [ "$SIZE_FAILED" -eq "0" ] ; then + # update if md5 check is ok or .nocheck exists + if [ "$MD5_FAILED" -eq "0" -o "$MD5_NOCHECK" -eq "1" ] ; then + update "Kernel" "$UPDATE_KERNEL" "/flash/$IMAGE_KERNEL" + update "System" "$UPDATE_SYSTEM" "/flash/$IMAGE_SYSTEM" + update_bootloader + REBOOT="1" + else + /bin/busybox rm "$UPDATE_DIR/$UPDATE_KERNEL" + /bin/busybox rm "$UPDATE_DIR/$UPDATE_SYSTEM" + echo "md5 check failed. normal startup in 30s..." + /bin/busybox sync + /bin/busybox usleep 30000000 + fi + /bin/busybox rm "$UPDATE_DIR/${UPDATE_KERNEL}.md5" &>/dev/null + /bin/busybox rm "$UPDATE_DIR/${UPDATE_SYSTEM}.md5" &>/dev/null else /bin/busybox rm "$UPDATE_DIR/$UPDATE_KERNEL" /bin/busybox rm "$UPDATE_DIR/$UPDATE_SYSTEM" - echo "md5 check failed. normal startup in 30s..." + /bin/busybox rm "$UPDATE_DIR/${UPDATE_KERNEL}.md5" &>/dev/null + /bin/busybox rm "$UPDATE_DIR/${UPDATE_SYSTEM}.md5" &>/dev/null + echo "size check failed. normal startup in 30s..." /bin/busybox sync /bin/busybox usleep 30000000 fi - /bin/busybox rm "$UPDATE_DIR/${UPDATE_KERNEL}.md5" &>/dev/null - /bin/busybox rm "$UPDATE_DIR/${UPDATE_SYSTEM}.md5" &>/dev/null fi if test "$REBOOT" -eq "1"; then diff --git a/packages/linux-drivers/dvbhdhomerun/meta b/packages/linux-drivers/dvbhdhomerun/meta index c64c40ce5a..af55830e4f 100644 --- a/packages/linux-drivers/dvbhdhomerun/meta +++ b/packages/linux-drivers/dvbhdhomerun/meta @@ -19,12 +19,13 @@ ################################################################################ PKG_NAME="dvbhdhomerun" -PKG_VERSION="20130121" +PKG_VERSION="0.0.15" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://sourceforge.net/projects/dvbhdhomerun/" -PKG_URL="${DISTRO_SRC}/${PKG_NAME}-${PKG_VERSION}.tar.xz" +# PKG_URL="${DISTRO_SRC}/${PKG_NAME}-${PKG_VERSION}.tar.xz" +PKG_URL="$SOURCEFORGE_SRC/project/dvbhdhomerun/${PKG_NAME}_${PKG_VERSION}.tar.gz" PKG_DEPENDS="" PKG_BUILD_DEPENDS="toolchain linux libhdhomerun" PKG_PRIORITY="optional" diff --git a/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-20120831-001-conf_file.patch b/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-001-conf_file.patch similarity index 60% rename from packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-20120831-001-conf_file.patch rename to packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-001-conf_file.patch index 60f1a492f6..d93002d43f 100644 --- a/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-20120831-001-conf_file.patch +++ b/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-001-conf_file.patch @@ -1,7 +1,7 @@ -diff -uNr dvbhdhomerun-0.0.9-orig/userhdhomerun/conf_inifile.cpp dvbhdhomerun-0.0.9/userhdhomerun/conf_inifile.cpp ---- dvbhdhomerun-0.0.9-orig/userhdhomerun/conf_inifile.cpp 2011-03-06 21:00:01.000000000 +0100 -+++ dvbhdhomerun-0.0.9/userhdhomerun/conf_inifile.cpp 2011-12-20 23:21:46.000000000 +0100 -@@ -8,6 +8,37 @@ +diff -uNr dvbhdhomerun-0.0.15-orig/userhdhomerun/conf_inifile.cpp dvbhdhomerun-0.0.15/userhdhomerun/conf_inifile.cpp +--- dvbhdhomerun-0.0.15-orig/userhdhomerun/conf_inifile.cpp 2013-02-17 22:37:34.000000000 +0100 ++++ dvbhdhomerun-0.0.15/userhdhomerun/conf_inifile.cpp 2013-03-02 10:23:46.000000000 +0100 +@@ -8,6 +8,38 @@ using namespace std; @@ -35,17 +35,18 @@ diff -uNr dvbhdhomerun-0.0.9-orig/userhdhomerun/conf_inifile.cpp dvbhdhomerun-0. + } + } +} ++ + bool ConfIniFile::OpenIniFile(const string& _filename) { - ifstream conffile; -@@ -15,7 +46,8 @@ - if(conffile.is_open()) { - string line; - string section; -- while(getline(conffile, line)) { -+ //while(getline(conffile, line)) { -+ while(safeGetline(conffile, line)) { - if(line.empty()) { - //LOG() << " ignore, empty"; - } + m_sectionKeyValue.clear(); +@@ -17,7 +49,8 @@ + if(conffile.is_open()) { + string line; + string section; +- while(getline(conffile, line)) { ++ //while(getline(conffile, line)) { ++ while(safeGetline(conffile, line)) { + if(line.empty()) { + //LOG() << " ignore, empty"; + } diff --git a/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-20120831-002-auto_detect.patch b/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-002-auto_detect.patch similarity index 78% rename from packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-20120831-002-auto_detect.patch rename to packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-002-auto_detect.patch index e81954c809..9a926b9960 100644 --- a/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-20120831-002-auto_detect.patch +++ b/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-002-auto_detect.patch @@ -1,6 +1,6 @@ -diff -uNr dvbhdhomerun-0.0.10-orig/userhdhomerun/hdhomerun_tuner.cpp dvbhdhomerun-0.0.10/userhdhomerun/hdhomerun_tuner.cpp ---- dvbhdhomerun-0.0.10-orig/userhdhomerun/hdhomerun_tuner.cpp 2012-04-28 18:05:40.000000000 +0200 -+++ dvbhdhomerun-0.0.10/userhdhomerun/hdhomerun_tuner.cpp 2012-06-05 13:21:16.000000000 +0200 +diff -uNr dvbhdhomerun-0.0.15-orig/userhdhomerun/hdhomerun_tuner.cpp dvbhdhomerun-0.0.15/userhdhomerun/hdhomerun_tuner.cpp +--- dvbhdhomerun-0.0.15-orig/userhdhomerun/hdhomerun_tuner.cpp 2013-02-17 22:37:34.000000000 +0100 ++++ dvbhdhomerun-0.0.15/userhdhomerun/hdhomerun_tuner.cpp 2013-03-02 10:25:15.000000000 +0100 @@ -97,12 +97,28 @@ string type(tmp); LOG() << "Type of device: " << type << endl; diff --git a/packages/linux-drivers/vboxguest/meta b/packages/linux-drivers/vboxguest/meta index 81b9612339..7fa904095f 100644 --- a/packages/linux-drivers/vboxguest/meta +++ b/packages/linux-drivers/vboxguest/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="vboxguest" -PKG_VERSION="4.2.6" +PKG_VERSION="4.2.8" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/linux/build b/packages/linux/build index 25f321a0c9..6c93154291 100755 --- a/packages/linux/build +++ b/packages/linux/build @@ -65,3 +65,28 @@ LDFLAGS="" make $KERNEL_IMAGE DEBUG=false \ NLS=false \ ) + +if [ "$DEVTOOLS" = yes ]; then + ( cd tools/perf + + # dont use some optimizations because of build problems + LDFLAGS=`echo $LDFLAGS | sed -e "s|-Wl,--as-needed||"` + + export FLAGSGLIBC="$CFLAGS -I$SYSROOT_PREFIX/usr/include" + export CFLAGS="$CFLAGS -I$SYSROOT_PREFIX/usr/include" + export LDFLAGS="$LDFLAGS -L$SYSROOT_PREFIX/lib -L$SYSROOT_PREFIX/usr/lib" + + make CROSS_COMPILE="$TARGET_PREFIX" \ + ARCH="$TARGET_ARCH" \ + V=1 \ + DEBUG=false \ + NLS=false \ + NO_GTK2=true \ + NO_LIBELF=false \ + NO_LIBPERL=true \ + NO_LIBPYTHON=false \ + PYTHON=$SYSROOT_PREFIX/usr/bin/python \ + WERROR=0 \ + ) +fi + diff --git a/packages/linux/install b/packages/linux/install index be498fcf1e..d8287358a0 100755 --- a/packages/linux/install +++ b/packages/linux/install @@ -46,3 +46,12 @@ mkdir -p $INSTALL/usr/lib mkdir -p $INSTALL/usr/bin cp -P $PKG_BUILD/tools/power/cpupower/cpupower $INSTALL/usr/bin + +if [ "$DEVTOOLS" = "yes" ]; then + mkdir -p $INSTALL/usr/bin + cp -P $PKG_BUILD/tools/perf/perf $INSTALL/usr/bin/ + + mkdir -p $INSTALL/usr/libexec/perf-core/scripts/python/ + cp -P $PKG_BUILD/tools/perf/perf-archive $INSTALL/usr/libexec/perf-core/ + cp -rP $PKG_BUILD/tools/perf/scripts/python/* $INSTALL/usr/libexec/perf-core/scripts/python/ +fi diff --git a/packages/linux/meta b/packages/linux/meta index 42bee3e347..e6a40d7309 100644 --- a/packages/linux/meta +++ b/packages/linux/meta @@ -26,7 +26,7 @@ PKG_LICENSE="GPL" PKG_SITE="http://www.kernel.org" PKG_URL="http://www.kernel.org/pub/linux/kernel/v3.x/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_DEPENDS="busybox linux-drivers linux-firmware pciutils $BOOTLOADER" -PKG_BUILD_DEPENDS="toolchain module-init-tools xz cpio pciutils" +PKG_BUILD_DEPENDS="toolchain cpio module-init-tools pciutils xz" PKG_PRIORITY="optional" PKG_SECTION="linux" PKG_SHORTDESC="linux26: The Linux kernel 2.6 precompiled kernel binary image and modules" @@ -44,3 +44,8 @@ if [ "$LINUX" = "ti-omap4" ]; then PKG_VERSION="2.6.38-ti-omap4" PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2" fi + +if [ "$DEVTOOLS" = "yes" ]; then + PKG_DEPENDS="$PKG_DEPENDS newt elfutils Python" + PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS newt elfutils Python" +fi diff --git a/packages/linux/patches/3.6.11/linux-010-perf_crosscompiling.patch b/packages/linux/patches/3.6.11/linux-010-perf_crosscompiling.patch new file mode 100644 index 0000000000..a4a1c918b4 --- /dev/null +++ b/packages/linux/patches/3.6.11/linux-010-perf_crosscompiling.patch @@ -0,0 +1,12 @@ +diff -Naur linux-3.6.11/tools/perf/Makefile linux-3.6.11.patch/tools/perf/Makefile +--- linux-3.6.11/tools/perf/Makefile 2012-12-17 18:27:45.000000000 +0100 ++++ linux-3.6.11.patch/tools/perf/Makefile 2013-03-06 16:30:43.107805512 +0100 +@@ -496,8 +496,6 @@ + msg := $(warning newt not found, disables TUI support. Please install newt-devel or libnewt-dev); + BASIC_CFLAGS += -DNO_NEWT_SUPPORT + else +- # Fedora has /usr/include/slang/slang.h, but ubuntu /usr/include/slang.h +- BASIC_CFLAGS += -I/usr/include/slang + EXTLIBS += -lnewt -lslang + LIB_OBJS += $(OUTPUT)ui/setup.o + LIB_OBJS += $(OUTPUT)ui/browser.o diff --git a/packages/linux/patches/3.7.10/linux-010-perf_crosscompiling.patch b/packages/linux/patches/3.7.10/linux-010-perf_crosscompiling.patch new file mode 100644 index 0000000000..f61031edc6 --- /dev/null +++ b/packages/linux/patches/3.7.10/linux-010-perf_crosscompiling.patch @@ -0,0 +1,12 @@ +diff -Naur linux-3.7.10/tools/perf/Makefile linux-3.7.10.patch/tools/perf/Makefile +--- linux-3.7.10/tools/perf/Makefile 2013-02-27 18:22:04.000000000 +0100 ++++ linux-3.7.10.patch/tools/perf/Makefile 2013-03-06 16:36:15.633521884 +0100 +@@ -591,8 +591,6 @@ + ifneq ($(call try-cc,$(SOURCE_NEWT),$(FLAGS_NEWT)),y) + msg := $(warning newt not found, disables TUI support. Please install newt-devel or libnewt-dev); + else +- # Fedora has /usr/include/slang/slang.h, but ubuntu /usr/include/slang.h +- BASIC_CFLAGS += -I/usr/include/slang + BASIC_CFLAGS += -DNEWT_SUPPORT + EXTLIBS += -lnewt -lslang + LIB_OBJS += $(OUTPUT)ui/setup.o diff --git a/packages/mediacenter/xbmc-pvr-addons/meta b/packages/mediacenter/xbmc-pvr-addons/meta index afb4fba3ce..1d76989ae3 100644 --- a/packages/mediacenter/xbmc-pvr-addons/meta +++ b/packages/mediacenter/xbmc-pvr-addons/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="xbmc-pvr-addons" -PKG_VERSION="96774c4" +PKG_VERSION="590f862" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/mediacenter/xbmc-theme-Confluence/meta b/packages/mediacenter/xbmc-theme-Confluence/meta index 32d57e9d3d..e9d4da29c1 100644 --- a/packages/mediacenter/xbmc-theme-Confluence/meta +++ b/packages/mediacenter/xbmc-theme-Confluence/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="xbmc-theme-Confluence" -PKG_VERSION="12.0.3" +PKG_VERSION="12.0.4" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/mediacenter/xbmc/build b/packages/mediacenter/xbmc/build index 7f13c7eca9..64b233ce3e 100755 --- a/packages/mediacenter/xbmc/build +++ b/packages/mediacenter/xbmc/build @@ -237,7 +237,7 @@ fi LDFLAGS=`echo $LDFLAGS | sed -e "s|-Wl,--as-needed||"` # dont build parallel - MAKEFLAGS=-j1 +# MAKEFLAGS=-j1 export PYTHON_VERSION="2.7" export PYTHON_CPPFLAGS="-I$SYSROOT_PREFIX/usr/include/python$PYTHON_VERSION" diff --git a/packages/mediacenter/xbmc/init.d/93_xbmc b/packages/mediacenter/xbmc/init.d/93_xbmc index ed0d4f6020..24d1577b5d 100644 --- a/packages/mediacenter/xbmc/init.d/93_xbmc +++ b/packages/mediacenter/xbmc/init.d/93_xbmc @@ -55,6 +55,9 @@ fi # wait for network wait_for_inet_addr +# wait for udevadm settle to finish + wait_for_udevadm_settle + # set cpu's to 'ondemand' ( usleep 15000000 progress "set cpu's to 'ondemand'" diff --git a/packages/mediacenter/xbmc/meta b/packages/mediacenter/xbmc/meta index 02fd03da7e..9c0a4a8655 100644 --- a/packages/mediacenter/xbmc/meta +++ b/packages/mediacenter/xbmc/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="xbmc" -PKG_VERSION="12.0.3" +PKG_VERSION="12.0.4" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" @@ -184,6 +184,12 @@ if [ "$CRYSTALHD" = yes ]; then PKG_DEPENDS="$PKG_DEPENDS crystalhd" fi -if [ "$XVBA" = yes ]; then - PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS xf86-video-fglrx" -fi +get_graphicdrivers + +for drv in $GRAPHIC_DRIVERS; do + if [ "$drv" = "fglrx" -a "$XVBA" = yes ]; then + PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS xf86-video-fglrx" + elif [ "$drv" = "fglrx-legacy" -a "$XVBA" = yes ]; then + PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS xf86-video-fglrx-legacy" + fi +done diff --git a/packages/mediacenter/xbmc/patches/xbmc-995.01-xvba_support-1ea917e.patch b/packages/mediacenter/xbmc/patches.x86/xbmc-995.01-xvba_support-912b6ed.patch similarity index 99% rename from packages/mediacenter/xbmc/patches/xbmc-995.01-xvba_support-1ea917e.patch rename to packages/mediacenter/xbmc/patches.x86/xbmc-995.01-xvba_support-912b6ed.patch index ac7780f5c2..159eaa0f4c 100644 --- a/packages/mediacenter/xbmc/patches/xbmc-995.01-xvba_support-1ea917e.patch +++ b/packages/mediacenter/xbmc/patches.x86/xbmc-995.01-xvba_support-912b6ed.patch @@ -1,4 +1,4 @@ -From bfd49543c49747236d401df4351767d584f756ac Mon Sep 17 00:00:00 2001 +From c111752701bb2447a833ef1768e912c87d9bbf65 Mon Sep 17 00:00:00 2001 From: wsnipex Date: Sun, 4 Nov 2012 14:05:52 +0100 Subject: [PATCH 01/73] configure: add --enable-pvraddons-with-dependencies @@ -48,7 +48,7 @@ index 4769315..350d960 100644 1.7.10 -From dc83e2351e8bf8e904102782ea489d2c8caa2802 Mon Sep 17 00:00:00 2001 +From 86fb17f786cf9efacaa84f64188975312ef4ec6a Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 28 May 2012 10:03:31 +0200 Subject: [PATCH 02/73] VideoRenerers: add buffering @@ -71,10 +71,10 @@ Subject: [PATCH 02/73] VideoRenerers: add buffering 14 files changed, 380 insertions(+), 93 deletions(-) diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp -index c6f0a14..18e6310 100644 +index 15f1233..7ed09ee 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp -@@ -2367,7 +2367,10 @@ void CApplication::Render() +@@ -2371,7 +2371,10 @@ void CApplication::Render() m_lastFrameTime = XbmcThreads::SystemClockMillis(); if (flip) @@ -905,7 +905,7 @@ index 7fe6bb2..34ff8d0 100644 OVERLAY::CRenderer m_overlays; diff --git a/xbmc/cores/VideoRenderers/WinRenderer.cpp b/xbmc/cores/VideoRenderers/WinRenderer.cpp -index 7842089..6e4433c 100644 +index f1d0768..f0f5b2d 100644 --- a/xbmc/cores/VideoRenderers/WinRenderer.cpp +++ b/xbmc/cores/VideoRenderers/WinRenderer.cpp @@ -253,12 +253,12 @@ int CWinRenderer::NextYV12Texture() @@ -1034,7 +1034,7 @@ index 3008c25..a4bb1ba 100644 1.7.10 -From dacc0167c993efa6ac884fd3c439fc5f0c823934 Mon Sep 17 00:00:00 2001 +From efb0e5d9a372d2c4a6c7fcb9bd74369a8a910cd0 Mon Sep 17 00:00:00 2001 From: xbmc Date: Tue, 2 Oct 2012 10:49:09 +0200 Subject: [PATCH 03/73] linuxrenderer: delete all textures on reconfigure @@ -1060,7 +1060,7 @@ index b32a7ea..a2dc2be 100644 1.7.10 -From 226539d21ba940ea8add89417df7102302c7ba79 Mon Sep 17 00:00:00 2001 +From 140768ac0a1b909ed0c0821a1dfdf6df8717a64b Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 28 May 2012 10:17:33 +0200 Subject: [PATCH 04/73] drop frame counter in application, ask render manager @@ -1074,10 +1074,10 @@ Subject: [PATCH 04/73] drop frame counter in application, ask render manager 4 files changed, 23 insertions(+), 45 deletions(-) diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp -index 18e6310..9a7b900 100644 +index 7ed09ee..b623250 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp -@@ -415,8 +415,6 @@ +@@ -419,8 +419,6 @@ #endif m_currentStack = new CFileItemList; @@ -1086,7 +1086,7 @@ index 18e6310..9a7b900 100644 m_bPresentFrame = false; m_bPlatformDirectories = true; -@@ -2227,28 +2225,18 @@ float CApplication::GetDimScreenSaverLevel() const +@@ -2231,28 +2229,18 @@ float CApplication::GetDimScreenSaverLevel() const bool CApplication::WaitFrame(unsigned int timeout) { @@ -1120,7 +1120,7 @@ index 18e6310..9a7b900 100644 } void CApplication::Render() -@@ -2268,7 +2256,6 @@ void CApplication::Render() +@@ -2272,7 +2260,6 @@ void CApplication::Render() int vsync_mode = g_guiSettings.GetInt("videoscreen.vsync"); @@ -1128,7 +1128,7 @@ index 18e6310..9a7b900 100644 bool hasRendered = false; bool limitFrames = false; unsigned int singleFrameTime = 10; // default limit 100 fps -@@ -2282,13 +2269,10 @@ void CApplication::Render() +@@ -2286,13 +2273,10 @@ void CApplication::Render() m_bPresentFrame = false; if (!extPlayerActive && g_graphicsContext.IsFullScreenVideo() && !IsPaused()) { @@ -1146,7 +1146,7 @@ index 18e6310..9a7b900 100644 hasRendered = true; } else -@@ -2312,8 +2296,6 @@ void CApplication::Render() +@@ -2316,8 +2300,6 @@ void CApplication::Render() else if (lowfps) singleFrameTime = 200; // 5 fps, <=200 ms latency to wake up } @@ -1155,7 +1155,7 @@ index 18e6310..9a7b900 100644 } } -@@ -2377,13 +2359,6 @@ void CApplication::Render() +@@ -2381,13 +2363,6 @@ void CApplication::Render() g_renderManager.UpdateResolution(); g_renderManager.ManageCaptures(); @@ -1169,7 +1169,7 @@ index 18e6310..9a7b900 100644 } void CApplication::SetStandAlone(bool value) -@@ -5638,12 +5613,6 @@ bool CApplication::SwitchToFullScreen() +@@ -5646,12 +5621,6 @@ bool CApplication::SwitchToFullScreen() // See if we're playing a video, and are in GUI mode if ( IsPlayingVideo() && g_windowManager.GetActiveWindow() != WINDOW_FULLSCREEN_VIDEO) { @@ -1182,7 +1182,7 @@ index 18e6310..9a7b900 100644 // then switch to fullscreen mode g_windowManager.ActivateWindow(WINDOW_FULLSCREEN_VIDEO); return true; -@@ -5876,7 +5845,6 @@ bool CApplication::IsCurrentThread() const +@@ -5884,7 +5853,6 @@ bool CApplication::IsCurrentThread() const bool CApplication::IsPresentFrame() { @@ -1242,7 +1242,7 @@ index 34ff8d0..288175e 100644 1.7.10 -From 0f81843cb7279f3b99607551967354ff30e15e4d Mon Sep 17 00:00:00 2001 +From ba3a2cb07d319dc1e2fbb56c272744d0a7cbc772 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 28 May 2012 10:34:39 +0200 Subject: [PATCH 05/73] videoplayer: adopt lateness detection and dropping to @@ -1784,7 +1784,7 @@ index fe7e12c..4913712 100644 1.7.10 -From 4bc6ff77b121468020578f9d393e8aaae1a419f6 Mon Sep 17 00:00:00 2001 +From 18bb11c657eca56a2454b15ec558b6e6b126a52b Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 28 May 2012 10:41:31 +0200 Subject: [PATCH 06/73] videoplayer: update frametime, it might change due to @@ -1811,7 +1811,7 @@ index 93908a7..4675556 100644 1.7.10 -From 723a731d68b9360f9804e8711255afa62c4ce34d Mon Sep 17 00:00:00 2001 +From 0f3e41aa9f5f61baad9558606ff9ccacf3ef5192 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 28 May 2012 10:43:06 +0200 Subject: [PATCH 07/73] videoplayer: give streams with invalid fps a chance @@ -1838,7 +1838,7 @@ index 4675556..2ef6358 100644 1.7.10 -From 60c955c30cdfcf361396e47fc92a1e1883b085fe Mon Sep 17 00:00:00 2001 +From 5ea05eef35600708fa58ba121e32245d09cd491e Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 28 May 2012 10:49:05 +0200 Subject: [PATCH 08/73] dvdplayer: allow rewinding at end of stream, do a seek @@ -1878,7 +1878,7 @@ index 315d64a..6fcb6b3 100644 1.7.10 -From 8d237cf023501560fc394679819463034a209413 Mon Sep 17 00:00:00 2001 +From d42b9a3ed15f855f9e4aecaae176f8aeeb4b8da2 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 2 Sep 2012 16:05:21 +0200 Subject: [PATCH 09/73] video player: present correct pts to user for a/v sync @@ -1972,7 +1972,7 @@ index 4913712..509d5f7 100644 1.7.10 -From 04a6a8b4ca29c17da6bbb9591685922b2f6f1442 Mon Sep 17 00:00:00 2001 +From fba7871aacd8c0b7cac5eafdc4d3da5d3724cf79 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 28 May 2012 11:02:29 +0200 Subject: [PATCH 10/73] vaapi: adopt to buffering in renderer @@ -2033,7 +2033,7 @@ index 863edc4..417cbc0 100644 1.7.10 -From 4d237410264bbff9c4ac373de498f80ecb15f7a3 Mon Sep 17 00:00:00 2001 +From b8f4a9b323ceea4950624525c88339fb2a23ebe7 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 7 Apr 2012 09:19:00 +0200 Subject: [PATCH 11/73] vdpau: redesign @@ -8196,7 +8196,7 @@ index e7af3cb..2dd8a9f 100644 1.7.10 -From c088467d9d0955051a510dadbddb270ddc3e3c20 Mon Sep 17 00:00:00 2001 +From ee1ed2c835620021278e38a6e7be94cfde073a78 Mon Sep 17 00:00:00 2001 From: xbmc Date: Tue, 25 Sep 2012 12:14:15 +0200 Subject: [PATCH 12/73] linuxrenderer: drop method RenderMultiPass @@ -8249,7 +8249,7 @@ index 3218cd5..afc78c2 100644 1.7.10 -From 0de3939247a63509e6bfab2e77c298eaa28aa29c Mon Sep 17 00:00:00 2001 +From 267f61079ae6a4f77fb5c068eecb0d1aeddd0337 Mon Sep 17 00:00:00 2001 From: xbmc Date: Tue, 25 Sep 2012 13:20:47 +0200 Subject: [PATCH 13/73] linuxrenderer: implement progressive weave for vdpau @@ -8380,7 +8380,7 @@ index afc78c2..2fc34ae 100644 1.7.10 -From c12380f4b9c9c2671bfd1ebd3e29ba7cd83ac95e Mon Sep 17 00:00:00 2001 +From 4c76478000f03a2460c407a66a779b2232c186c5 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 15:22:05 +0200 Subject: [PATCH 14/73] X11: ditch SDL for video and window events @@ -8399,10 +8399,10 @@ Subject: [PATCH 14/73] X11: ditch SDL for video and window events create mode 100644 xbmc/windowing/WinEventsX11.h diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp -index 9a7b900..fc8e721 100644 +index b623250..3a1d6a1 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp -@@ -790,7 +790,7 @@ bool CApplication::CreateGUI() +@@ -794,7 +794,7 @@ bool CApplication::CreateGUI() uint32_t sdlFlags = 0; @@ -9867,7 +9867,7 @@ index 2dd8a9f..9616d17 100644 1.7.10 -From 58fa894afaffbc990ee1ab87ff55db30e36ab2c2 Mon Sep 17 00:00:00 2001 +From 9fc77631a47445e67b587d3c2d967c8415ef1601 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 15:24:22 +0200 Subject: [PATCH 15/73] X11: Add xbmc icon @@ -10059,7 +10059,7 @@ index 9616d17..debf714 100644 1.7.10 -From cad2ac7f357906f10f100a038ff28e83a69c68e8 Mon Sep 17 00:00:00 2001 +From 86a25b3b4355259720f5f54f6fe5650710873911 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 20 May 2012 14:11:26 +0200 Subject: [PATCH 16/73] X11: add SDL joystick until we have a better solution @@ -10116,7 +10116,7 @@ index 24477ae..2ec86a8 100644 1.7.10 -From fdefd4cf296518f31ad1165268fccd651e08dd3c Mon Sep 17 00:00:00 2001 +From 992db82a2cc2d9e8af6388f67e8a2890c7742726 Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Thu, 5 Jul 2012 12:35:55 +0200 Subject: [PATCH 17/73] X11: factor out code handling device reset @@ -10183,7 +10183,7 @@ index debf714..8c28e3f 100644 1.7.10 -From 9a409794d1eb8ee0c4b0b1124dea7dd30af32c06 Mon Sep 17 00:00:00 2001 +From d6f428a5369ef66336e3f7f07e2dedfc0d1d8f7f Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 15:02:00 +0200 Subject: [PATCH 18/73] X11: move xrandr events to WinEventsX11 @@ -10330,7 +10330,7 @@ index 70557d0..1cce843 100644 1.7.10 -From 1dc579a2d5c608cfd4f799971759d18cbd2957e5 Mon Sep 17 00:00:00 2001 +From daf0f02f96f6a640c06b50a0823e1f1858027c85 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 12 Apr 2012 15:43:56 +0200 Subject: [PATCH 19/73] xrandr: remove method RestoreState @@ -10412,7 +10412,7 @@ index 2a269d0..5b64633 100644 1.7.10 -From 4a6f0e986fc27b356041a4b1bb989e0e594c8aa7 Mon Sep 17 00:00:00 2001 +From e8b72dbf152bb1a2ff380d604e0fd9bbd7451994 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 20 May 2012 13:17:10 +0200 Subject: [PATCH 20/73] xrandr: observe orientation @@ -10584,7 +10584,7 @@ index 5b64633..618bd68 100644 1.7.10 -From 97e5811e05a4ecde7249b2f76283729ff300fda9 Mon Sep 17 00:00:00 2001 +From a89e12b3ac29d108c32a554e93cb94f1cb2afc75 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 11:54:15 +0200 Subject: [PATCH 21/73] xrandr: allow getting info for multiple screen's @@ -10762,7 +10762,7 @@ index 618bd68..0824af5 100644 1.7.10 -From 2b379b9ce21b6d61b44b647b79ef3587dbbcf0ec Mon Sep 17 00:00:00 2001 +From 748512b3692f1f4cec63082dd9dc4d996277d44a Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 11:44:00 +0200 Subject: [PATCH 22/73] X11: fix multi-head setups @@ -11497,7 +11497,7 @@ index 93cf5db..71034fc 100644 1.7.10 -From 2a747f13a0a50dea0883d0d3c701ef290235a99b Mon Sep 17 00:00:00 2001 +From fcc6a223fdca36b95327dab99758255e7be0e69e Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 11:36:32 +0200 Subject: [PATCH 23/73] X11: remove all DefaultScreen and RootWindow macros @@ -11568,7 +11568,7 @@ index f858f88..d192697 100644 1.7.10 -From cf018ebbf1eae8f5ae2914ef347aac5f963c0d71 Mon Sep 17 00:00:00 2001 +From 019079003538369000d57b26a534a68f61ad6256 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 11:45:22 +0200 Subject: [PATCH 24/73] X11: remove all DefaultScreen and RootWindow macros @@ -11643,7 +11643,7 @@ index 9785fe7..0004e07 100644 1.7.10 -From 5d8bfcd52e5a189515629c15c73434ef6c6bcc88 Mon Sep 17 00:00:00 2001 +From 770cdec440e330d23629cc70153a5a05c3ddf9b7 Mon Sep 17 00:00:00 2001 From: xbmc Date: Wed, 20 Jun 2012 17:37:11 +0200 Subject: [PATCH 25/73] X11: recreate gl context after output has changed @@ -11797,7 +11797,7 @@ index d192697..0f2d1d2 100644 1.7.10 -From bd9a29b7661c75152174959f9f269f32c13a658b Mon Sep 17 00:00:00 2001 +From 097d10727fc8e75a3976850782d3e8da74482140 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 12:06:25 +0200 Subject: [PATCH 26/73] X11: hook video reference clock in windowing @@ -12005,7 +12005,7 @@ index dcc4f09..7eb6317 100644 1.7.10 -From 702f79eab647ec68030c99d6113976f3c602e87c Mon Sep 17 00:00:00 2001 +From 88e10ce5f4b4172129dd258b91ee4d7b6a6ecaec Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 21 Jun 2012 17:26:51 +0200 Subject: [PATCH 27/73] X11: fix video calibrations @@ -12113,7 +12113,7 @@ index cc28f56..c046c86 100644 1.7.10 -From 07920e322c9770ebb99becd104ebce0789c502fa Mon Sep 17 00:00:00 2001 +From 96ccf3d52796fdba75d37a18e9b514814657f332 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 12:00:26 +0200 Subject: [PATCH 28/73] X11: deactivate screen saver on startup @@ -12186,7 +12186,7 @@ index c046c86..e953d2d 100644 1.7.10 -From 835bcc9c7fd477012492ffc4cad2bdd9ce506064 Mon Sep 17 00:00:00 2001 +From 305cd979dbf8226fa8826f410172f3df8caa4811 Mon Sep 17 00:00:00 2001 From: FernetMenta Date: Thu, 5 Jul 2012 12:10:09 +0200 Subject: [PATCH 29/73] X11: change method of going full-screen @@ -12233,7 +12233,7 @@ index b3e7ab5..91f92c1 100644 1.7.10 -From e2442797ff82b3ed8053f1a6422863ffce9cbe5f Mon Sep 17 00:00:00 2001 +From ded35a8abe03367f8b316106e2062c1d0a44fc02 Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 28 Jun 2012 19:12:39 +0200 Subject: [PATCH 30/73] X11: reset key repeat and key modifier on focus lost @@ -12268,7 +12268,7 @@ index 6c22358..d86205d 100644 1.7.10 -From 77a22163a7f611e9183b7cd0b817fc51a42d45de Mon Sep 17 00:00:00 2001 +From ef601448e65346a8c7746cb1c470269a66f9afa0 Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Thu, 5 Jul 2012 14:18:46 +0200 Subject: [PATCH 31/73] X11: replace custom utf8 to unicode with charset @@ -12488,7 +12488,7 @@ index 6100933..72955ad 100644 1.7.10 -From e060b3197bbac54b79b604bbbf9a8e86257980f5 Mon Sep 17 00:00:00 2001 +From 3d9931214dc45ed6442e39f2576175d90879e413 Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Thu, 5 Jul 2012 14:23:54 +0200 Subject: [PATCH 32/73] X11: fixed invalid usage of sizeof() (squash into x11 @@ -12555,7 +12555,7 @@ index 72955ad..102a076 100644 1.7.10 -From c52af3ba68292f08331cbbbc940dfcea838a2f44 Mon Sep 17 00:00:00 2001 +From 8b292cf47d12a0e8e1c980e9187074f5da30582e Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 9 Jun 2012 18:23:53 +0200 Subject: [PATCH 33/73] add missing keys to xbmc keytable @@ -12581,7 +12581,7 @@ index aaf65ba..9d7922f 100644 1.7.10 -From 25587ee807eca2fc9dde4528e3fc930b337e38b0 Mon Sep 17 00:00:00 2001 +From 285cb8393ff2c80aef5b0f8fd6f32cb24160fa66 Mon Sep 17 00:00:00 2001 From: xbmc Date: Fri, 16 Mar 2012 15:57:51 +0100 Subject: [PATCH 34/73] videorefclock: temp deactivate of nv settings @@ -12607,7 +12607,7 @@ index fa8e35a..85e36c7 100644 1.7.10 -From 4f8a95de09408321e2df3da891536c314fe3b4d2 Mon Sep 17 00:00:00 2001 +From f9326bbe9799df7e48baedd4c29a5084cc7f291d Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 20 Aug 2012 09:09:09 +0200 Subject: [PATCH 35/73] videorefclock: ask graphics context for refresh rate @@ -12641,7 +12641,7 @@ index 85e36c7..8209163 100644 1.7.10 -From 85d81f0c933cb0a75c2c21de86b4065e3db86002 Mon Sep 17 00:00:00 2001 +From 335cfdabc94f26144a021484bef565280fdb468c Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 9 Jul 2012 14:00:18 +0200 Subject: [PATCH 36/73] X11: fix icon texture after @@ -12752,7 +12752,7 @@ index 91f92c1..174ccef 100644 1.7.10 -From 111c2f8fd0f6b698fbff0fda6dc6c17ce3644626 Mon Sep 17 00:00:00 2001 +From b88e65666f467ccd3ab90a2cdc9cf90f32676667 Mon Sep 17 00:00:00 2001 From: xbmc Date: Tue, 10 Jul 2012 11:14:12 +0200 Subject: [PATCH 37/73] X11: check for window manager @@ -12876,7 +12876,7 @@ index e953d2d..0b7c10a 100644 1.7.10 -From f1051e1991e5ef5d83ce428b841ac365082042ec Mon Sep 17 00:00:00 2001 +From d69db585a0877699a1b21701a024c5a02cea9084 Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 12 Jul 2012 11:11:47 +0200 Subject: [PATCH 38/73] X11: dont set window on xrandr if no mode available @@ -12916,7 +12916,7 @@ index 4f1ae26..c11ea89 100644 1.7.10 -From 83b9c33e88077d957884ee22316c218e570dc3d5 Mon Sep 17 00:00:00 2001 +From 9144abbbea8aeaae193fe5d35029d8796874093d Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 26 Jul 2012 09:34:28 +0200 Subject: [PATCH 39/73] X11: fix crash after a resolution change on startup @@ -12943,7 +12943,7 @@ index c11ea89..0bd72d4 100644 1.7.10 -From b8956ed57f1b683ae79d7306c7461a31c894e9a9 Mon Sep 17 00:00:00 2001 +From f7b05be0696cbda0d145deb7155d409fe7f25932 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 15 Sep 2012 18:27:29 +0200 Subject: [PATCH 40/73] X11: lock graphics context in NotifyXRREvent @@ -12969,7 +12969,7 @@ index 0bd72d4..ef83133 100644 1.7.10 -From aed5d244b81b1a0b171b7fea3b332decafc96c56 Mon Sep 17 00:00:00 2001 +From bc501e4a04225ce1ac7eadb90fc926ba156e46f5 Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Sat, 8 Oct 2011 16:45:13 +0200 Subject: [PATCH 41/73] ffmpeg: add xvba hwaccel @@ -13839,7 +13839,7 @@ index f0d9c01..0f8cf7b 100644 1.7.10 -From 922cada27e255bc3f685b700c2ffa4a146f87624 Mon Sep 17 00:00:00 2001 +From 1502daa2e3432e56b5c7a156754fda9d1a804f91 Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 12 Apr 2012 12:09:31 +0200 Subject: [PATCH 42/73] xvba: add decoder @@ -17289,7 +17289,7 @@ index f25d10d..f6b1ea4 100644 1.7.10 -From 517eda0bf58a6376a82839ab92e51b97c143edf1 Mon Sep 17 00:00:00 2001 +From 5b47c760839742a585f5e1aa3f6275eb283ae564 Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 23 Aug 2012 19:39:49 +0200 Subject: [PATCH 43/73] ffmpeg: add av_find_default_stream_index to interface @@ -17338,7 +17338,7 @@ index 9bda3f3..bf31fcb 100644 1.7.10 -From 23be471842ae9ea7bd62c18261a5e96a11045d04 Mon Sep 17 00:00:00 2001 +From 2a600a0e3acac4f668f10f81a430f2b1d24d2243 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 20 Aug 2012 16:06:39 +0200 Subject: [PATCH 44/73] dvdplayer: observe pts counter overflow @@ -17627,7 +17627,7 @@ index 2b5f2e8..e0acf29 100644 1.7.10 -From 66382788a903f99ba317e972ba0445fc68320750 Mon Sep 17 00:00:00 2001 +From 64e55ac8d4fb589f337daba53ada52d6a8d3abf0 Mon Sep 17 00:00:00 2001 From: xbmc Date: Tue, 2 Oct 2012 13:02:10 +0200 Subject: [PATCH 45/73] dvdplayer: avoid short screen flicker caused by @@ -17663,7 +17663,7 @@ index e5e71f3..8b02d81 100644 1.7.10 -From 04f4521c1938a7ac17acd59f3bd6be59c7ba8184 Mon Sep 17 00:00:00 2001 +From 3dff64b607a88901b4bad7439c39b9133b01ed00 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 16 Jun 2012 12:46:30 +0200 Subject: [PATCH 46/73] xvba: do not use vaapi if xvba is present @@ -17696,7 +17696,7 @@ index a2b9195..43a05b3 100644 1.7.10 -From a133b7fa119e859ec50b9f05a33de984105234f3 Mon Sep 17 00:00:00 2001 +From 3c5e2eb61270b516341c1846722f5df42ba27eec Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 11 Oct 2012 12:05:50 +0200 Subject: [PATCH 47/73] vdpau: advanced settings for auto deinterlacing @@ -17765,7 +17765,7 @@ index 72718e5..aaa4702 100644 1.7.10 -From 62540aeaa356823bd34e9367ac39eef23a6e4ce4 Mon Sep 17 00:00:00 2001 +From 4ecb573a4578240c76d47edfa071a2872285c0ef Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 11 Oct 2012 13:01:08 +0200 Subject: [PATCH 48/73] dvdplayer: correct determination if video is playing @@ -17801,7 +17801,7 @@ index 6fcb6b3..f76691d 100644 1.7.10 -From 5a093bbd60d1ca47ed7c5e4639f28dafc1b565c1 Mon Sep 17 00:00:00 2001 +From 18112c69378d18c498e5f9e0a0ca2db262be6120 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 14 Oct 2012 13:46:54 +0200 Subject: [PATCH 49/73] rendermanager: fix stuttering in non full-screen mode, @@ -17830,7 +17830,7 @@ index 0506823..b141c80 100644 1.7.10 -From d0597caa2c922575efdf081d719d5665c626ffec Mon Sep 17 00:00:00 2001 +From 5488ba31ed2039da5186e4e6e26c16bfae6a7cb2 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 14 Oct 2012 17:54:02 +0200 Subject: [PATCH 50/73] rendermanager: forgot to set flip event if buffering @@ -17876,7 +17876,7 @@ index b141c80..9290f80 100644 1.7.10 -From c485392afa608bfbcf903fa53a9dd824258c96dd Mon Sep 17 00:00:00 2001 +From 3ac9979f74f43b629ea9391243697ed4168b290b Mon Sep 17 00:00:00 2001 From: xbmc Date: Fri, 26 Oct 2012 15:30:22 +0200 Subject: [PATCH 51/73] vdpau: fix small mem leak @@ -17902,7 +17902,7 @@ index d95797b..fec4b88 100644 1.7.10 -From 9d7228a84013e409149d7b05d34545d1bdf06e27 Mon Sep 17 00:00:00 2001 +From 5c6e31de5b357022878c46c94885f34e62ba9a66 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 29 Oct 2012 18:25:56 +0100 Subject: [PATCH 52/73] xvba: do not render if there is no valid texture @@ -17939,7 +17939,7 @@ index ec3606a..7c3adcb 100644 1.7.10 -From 85be082db41b27cdd3824b8360dc021e17a84c22 Mon Sep 17 00:00:00 2001 +From 49267751b5b4d0315c0ff850c06c2c465cd0d2a5 Mon Sep 17 00:00:00 2001 From: xbmc Date: Fri, 2 Nov 2012 13:20:03 +0100 Subject: [PATCH 53/73] player: fix rewind @@ -18187,7 +18187,7 @@ index 509d5f7..7cddda7 100644 1.7.10 -From 024ecda241754f02ad985fab9116e33b06b8d174 Mon Sep 17 00:00:00 2001 +From 42907b5fc097d5b1d9cbc3941fee44af7b5ad95a Mon Sep 17 00:00:00 2001 From: fritsch Date: Fri, 2 Nov 2012 17:56:12 +0100 Subject: [PATCH 54/73] xvba: do not create decoder for surfaces larger than @@ -18227,7 +18227,7 @@ index e8e376a..b73c48a 100644 1.7.10 -From 98ebb0d0232cf4a7ea2082f9f16e210a39e983e8 Mon Sep 17 00:00:00 2001 +From 8aacdb77cd98243077ecf2d3f7195233dcc38c15 Mon Sep 17 00:00:00 2001 From: fritsch Date: Sun, 4 Nov 2012 16:24:10 +0100 Subject: [PATCH 55/73] xvba: add string for available decoders - we are @@ -18257,7 +18257,7 @@ index 0cea7a9..6fb74b7 100644 1.7.10 -From 84e701f7db6603a2942611d5c74ba645c625ec0d Mon Sep 17 00:00:00 2001 +From fe452b364c738733b949b3c7f09a6fb8fe228978 Mon Sep 17 00:00:00 2001 From: fritsch Date: Thu, 22 Nov 2012 21:32:21 +0100 Subject: [PATCH 56/73] xvba: revisit Artefacts. There are more broken video @@ -18294,7 +18294,7 @@ index a077442..87af687 100644 1.7.10 -From afd776e3e90a1787ce4c3392266d70368de4e164 Mon Sep 17 00:00:00 2001 +From c7b995f8d10dc0171f80a4d604c5cbf0e6520a59 Mon Sep 17 00:00:00 2001 From: xbmc Date: Fri, 23 Nov 2012 09:42:02 +0100 Subject: [PATCH 57/73] xvba: reactivate accidently disabled @@ -18321,7 +18321,7 @@ index b73c48a..47ff25f 100644 1.7.10 -From 37576c15f9e3a0c2dce593e9d9cb5a7863845de7 Mon Sep 17 00:00:00 2001 +From 2e4d9701752aa760c2cc5b8ca9b247ec476026e2 Mon Sep 17 00:00:00 2001 From: xbmc Date: Fri, 23 Nov 2012 17:41:12 +0100 Subject: [PATCH 58/73] xrandr: fix query for multiple screens @@ -18365,7 +18365,7 @@ index cc933b9..533e03d 100644 1.7.10 -From bd5d572c69ee254beedb5e9339831652943ea8b4 Mon Sep 17 00:00:00 2001 +From c39f8e5141d6e176f1edb0eb510fa54976915654 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 2 Dec 2012 15:46:55 +0100 Subject: [PATCH 59/73] X11: add debug log to print out refresh after xrr @@ -18396,7 +18396,7 @@ index ef83133..76c6362 100644 1.7.10 -From d418ae1053a3842eb3e6a3bbd84666a5ee3defe2 Mon Sep 17 00:00:00 2001 +From 181697e9001e0568ff06098d0f2223fc4c0d8f51 Mon Sep 17 00:00:00 2001 From: xbmc Date: Tue, 11 Dec 2012 11:08:13 +0100 Subject: [PATCH 60/73] X11: dont call XCloseDisplay on shutdown, it crashes @@ -18424,7 +18424,7 @@ index 76c6362..e4e25b2 100644 1.7.10 -From 3b700401e9aace50b5ce6c5d7ba2a2e33bb5217f Mon Sep 17 00:00:00 2001 +From 87d87db6cd67fc7f7f7afa88f089eafaac1b9605 Mon Sep 17 00:00:00 2001 From: xbmc Date: Wed, 12 Dec 2012 09:52:17 +0100 Subject: [PATCH 61/73] vdpau: make interop gl default and remove setting, @@ -18582,7 +18582,7 @@ index 3c19a06..b9f18e4 100644 1.7.10 -From a060312a4e236858bf3c9a97d663c5643796b649 Mon Sep 17 00:00:00 2001 +From d468e959e2d7d888e02db3848542b5a203e007c3 Mon Sep 17 00:00:00 2001 From: xbmc Date: Wed, 12 Dec 2012 18:34:47 +0100 Subject: [PATCH 62/73] vdpau: drop studio level conversion @@ -18768,7 +18768,7 @@ index a4bd524..67aeec9 100644 1.7.10 -From 6d03704ce1cbc7d09d684da1ced478b2b59c0b35 Mon Sep 17 00:00:00 2001 +From 672e2f03b5b8d133ebfa87e0ebf20fd9f3fb0beb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Coutant?= Date: Wed, 12 Dec 2012 19:49:47 +0100 Subject: [PATCH 63/73] x11: support for multiple x screens @@ -18794,7 +18794,7 @@ index 533e03d..7a16488 100644 1.7.10 -From 597c8449084e1e5ebfebfb31db570f7826d06517 Mon Sep 17 00:00:00 2001 +From c0f54dac42fba2a522ab4f43f3f20a11a3bace3b Mon Sep 17 00:00:00 2001 From: xbmc Date: Wed, 12 Dec 2012 20:28:49 +0100 Subject: [PATCH 64/73] vdpau: observe ffmpeg tags for color space @@ -18901,7 +18901,7 @@ index 4d1559c..471ad68 100644 1.7.10 -From 3f9308d76025ef1e31923fa9a06587f75c00f870 Mon Sep 17 00:00:00 2001 +From 82584e21f05fb275853f9baca72a65b6ff0672ff Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 20 Dec 2012 19:35:38 +0100 Subject: [PATCH 65/73] fix compile error after recent change @@ -18927,7 +18927,7 @@ index b9f18e4..cacb32a 100644 1.7.10 -From 213792b2678760d42740d581a1ee71e186a31c4d Mon Sep 17 00:00:00 2001 +From 514833b80006796c7985e37e414137e50a0c0d43 Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 24 Dec 2012 16:02:42 +0100 Subject: [PATCH 66/73] pvr: increase changes counter of stream on stream @@ -18965,7 +18965,7 @@ index 8c984f6..034e545 100644 1.7.10 -From e810d3bd68e89e800fba217e88184c2df0fe4040 Mon Sep 17 00:00:00 2001 +From 118041f574fa106e74e7a8ef26243ea4225643b5 Mon Sep 17 00:00:00 2001 From: xbmc Date: Thu, 17 Jan 2013 16:03:22 +0100 Subject: [PATCH 67/73] X11: add keymapping for XF86XK_Sleep @@ -18990,7 +18990,7 @@ index c31877e..ed31c04 100644 1.7.10 -From 2cb807b2f801f06723cde1bdd636550c08fc08ab Mon Sep 17 00:00:00 2001 +From adce338a8fef2247a878e52c34c8a38d2788beb3 Mon Sep 17 00:00:00 2001 From: fritsch Date: Sat, 12 Jan 2013 13:03:50 +0100 Subject: [PATCH 68/73] dvdplayer: Allow multithread decoding for hi10p @@ -19098,7 +19098,7 @@ index aaa4702..863e4f3 100644 1.7.10 -From 5e52fa15742e1300ac394738ead4ca2792c4812c Mon Sep 17 00:00:00 2001 +From a4824bb077abbf61dcc123f70e4bd78a021de2eb Mon Sep 17 00:00:00 2001 From: xbmc Date: Mon, 21 Jan 2013 09:00:19 +0100 Subject: [PATCH 69/73] X11: remove toggle full screen after resume @@ -19127,7 +19127,7 @@ index a5534c9..7e2ddc6 100644 1.7.10 -From e8f3e20dfb3bde4434e2aea69b34e22ba1859a31 Mon Sep 17 00:00:00 2001 +From db652deb4330ab7b7f3cc83a55359e910fc2caec Mon Sep 17 00:00:00 2001 From: xbmc Date: Wed, 23 Jan 2013 17:03:02 +0100 Subject: [PATCH 70/73] xrandr: set screen on mode change command @@ -19153,7 +19153,7 @@ index 7a16488..6531ba3 100644 1.7.10 -From f229dba603070e1f0528d395c9d5d63f9044ae6e Mon Sep 17 00:00:00 2001 +From 81a1c20546aec833174595a86db363dd058b43b4 Mon Sep 17 00:00:00 2001 From: xbmc Date: Wed, 23 Jan 2013 17:03:39 +0100 Subject: [PATCH 71/73] X11: recreate glx context when output changes @@ -19207,7 +19207,7 @@ index 0b7c10a..33b1739 100644 1.7.10 -From ae08a23a2f4fd78139e2ebca8a4a87ab619feb0b Mon Sep 17 00:00:00 2001 +From 30eaf88e0a66baab5a3a18add429d295e4a272fb Mon Sep 17 00:00:00 2001 From: xbmc Date: Sun, 27 Jan 2013 12:10:19 +0100 Subject: [PATCH 72/73] vdpau: switch off de-interlacing on ff @@ -19236,7 +19236,7 @@ index 8858614..3e21d9d 100644 1.7.10 -From 1ea917e026e8c5df15de6ce6276cba9e58d09d3d Mon Sep 17 00:00:00 2001 +From 912b6ede1258d68c0f7cc7e57201bf1b50ae3fa7 Mon Sep 17 00:00:00 2001 From: xbmc Date: Sat, 2 Feb 2013 13:17:09 +0100 Subject: [PATCH 73/73] vdpau: fix mp4 part2 decoding, activate by default diff --git a/packages/mediacenter/xbmc/patches.x86/xbmc-995.10-disable-alt-tab.patch b/packages/mediacenter/xbmc/patches.x86/xbmc-995.10-disable-alt-tab.patch new file mode 100644 index 0000000000..2ee2b7a271 --- /dev/null +++ b/packages/mediacenter/xbmc/patches.x86/xbmc-995.10-disable-alt-tab.patch @@ -0,0 +1,12 @@ +diff --git a/xbmc/windowing/WinEventsX11.cpp b/xbmc/windowing/WinEventsX11.cpp +index ed31c04..34fcfae 100644 +--- a/xbmc/windowing/WinEventsX11.cpp ++++ b/xbmc/windowing/WinEventsX11.cpp +@@ -709,7 +709,6 @@ bool CWinEventsX11::ProcessShortcuts(XBMC_Event& event) + switch(event.key.keysym.sym) + { + case XBMCK_TAB: // ALT+TAB to minimize/hide +- g_application.Minimize(); + return true; + + default: diff --git a/packages/mediacenter/xbmc/patches/xbmc-990.00-remove-windowed-display-mode.patch b/packages/mediacenter/xbmc/patches/xbmc-990.00-remove-windowed-display-mode.patch new file mode 100644 index 0000000000..88d8ac4a2b --- /dev/null +++ b/packages/mediacenter/xbmc/patches/xbmc-990.00-remove-windowed-display-mode.patch @@ -0,0 +1,13 @@ +diff --git a/xbmc/settings/GUIWindowSettingsCategory.cpp b/xbmc/settings/GUIWindowSettingsCategory.cpp +index cbf0acb..f789e18 100644 +--- a/xbmc/settings/GUIWindowSettingsCategory.cpp ++++ b/xbmc/settings/GUIWindowSettingsCategory.cpp +@@ -2434,7 +2434,7 @@ DisplayMode CGUIWindowSettingsCategory::FillInScreens(CStdString strSetting, RES + pControl->Clear(); + + CStdString strScreen; +- if (g_advancedSettings.m_canWindowed) ++ if (g_advancedSettings.m_canWindowed && !g_application.IsStandAlone()) + pControl->AddLabel(g_localizeStrings.Get(242), -1); + + #if !defined(HAS_GLX) diff --git a/packages/mediacenter/xbmc/patches/xbmc-990.16-PR2353.patch b/packages/mediacenter/xbmc/patches/xbmc-990.16-PR2353.patch deleted file mode 100644 index 27aca80295..0000000000 --- a/packages/mediacenter/xbmc/patches/xbmc-990.16-PR2353.patch +++ /dev/null @@ -1,309 +0,0 @@ -From 0a2c144355ed750e61fadabe2dde185a76064f0a Mon Sep 17 00:00:00 2001 -From: montellese -Date: Fri, 1 Mar 2013 17:53:54 +0100 -Subject: [PATCH] websocket: fix inability to handle multiple queued websocket - frames/messages (fixes #13848) - ---- - xbmc/network/TCPServer.cpp | 31 +++--- - xbmc/network/websocket/WebSocket.cpp | 174 +++++++++++++++++++--------------- - xbmc/network/websocket/WebSocket.h | 2 +- - 3 files changed, 114 insertions(+), 93 deletions(-) - -diff --git a/xbmc/network/TCPServer.cpp b/xbmc/network/TCPServer.cpp -index 2d9fde0..e4b5984 100644 ---- a/xbmc/network/TCPServer.cpp -+++ b/xbmc/network/TCPServer.cpp -@@ -654,23 +654,28 @@ void CTCPServer::CWebSocketClient::Send(const char *data, unsigned int size) - void CTCPServer::CWebSocketClient::PushBuffer(CTCPServer *host, const char *buffer, int length) - { - bool send; -- const CWebSocketMessage *msg; -- if ((msg = m_websocket->Handle(buffer, length, send)) != NULL && msg->IsComplete()) -+ const CWebSocketMessage *msg = NULL; -+ size_t len = length; -+ do - { -- std::vector frames = msg->GetFrames(); -- if (send) -- { -- for (unsigned int index = 0; index < frames.size(); index++) -- Send(frames.at(index)->GetFrameData(), (unsigned int)frames.at(index)->GetFrameLength()); -- } -- else -+ if ((msg = m_websocket->Handle(buffer, len, send)) != NULL && msg->IsComplete()) - { -- for (unsigned int index = 0; index < frames.size(); index++) -- CTCPClient::PushBuffer(host, frames.at(index)->GetApplicationData(), (int)frames.at(index)->GetLength()); -- } -+ std::vector frames = msg->GetFrames(); -+ if (send) -+ { -+ for (unsigned int index = 0; index < frames.size(); index++) -+ Send(frames.at(index)->GetFrameData(), (unsigned int)frames.at(index)->GetFrameLength()); -+ } -+ else -+ { -+ for (unsigned int index = 0; index < frames.size(); index++) -+ CTCPClient::PushBuffer(host, frames.at(index)->GetApplicationData(), (int)frames.at(index)->GetLength()); -+ } - -- delete msg; -+ delete msg; -+ } - } -+ while (len > 0 && msg != NULL); - - if (m_websocket->GetState() == WebSocketStateClosed) - Disconnect(); -diff --git a/xbmc/network/websocket/WebSocket.cpp b/xbmc/network/websocket/WebSocket.cpp -index 94e7ab0..5008073 100644 ---- a/xbmc/network/websocket/WebSocket.cpp -+++ b/xbmc/network/websocket/WebSocket.cpp -@@ -80,11 +80,11 @@ - // Get the MASK flag - m_masked = ((m_data[1] & MASK_MASK) == MASK_MASK); - -- // Get the playload length -+ // Get the payload length - m_length = (uint64_t)(m_data[1] & MASK_LENGTH); -- if ((m_length <= 125 && length < m_length + LENGTH_MIN) || -- (m_length == 126 && length < LENGTH_MIN + 2) || -- (m_length == 127 && length < LENGTH_MIN + 8)) -+ if ((m_length <= 125 && m_lengthFrame < m_length + LENGTH_MIN) || -+ (m_length == 126 && m_lengthFrame < LENGTH_MIN + 2) || -+ (m_length == 127 && m_lengthFrame < LENGTH_MIN + 8)) - { - CLog::Log(LOGINFO, "WebSocket: Frame with invalid length received"); - reset(); -@@ -110,7 +110,7 @@ - offset = 8; - } - -- if (length < LENGTH_MIN + offset + m_length) -+ if (m_lengthFrame < LENGTH_MIN + offset + m_length) - { - CLog::Log(LOGINFO, "WebSocket: Frame with invalid length received"); - reset(); -@@ -124,12 +124,8 @@ - offset += 4; - } - -- if (length != LENGTH_MIN + offset + m_length) -- { -- CLog::Log(LOGINFO, "WebSocket: Frame with invalid length received"); -- reset(); -- return; -- } -+ if (m_lengthFrame != LENGTH_MIN + offset + m_length) -+ m_lengthFrame = LENGTH_MIN + offset + m_length; - - // Get application data - if (m_length > 0) -@@ -305,102 +301,122 @@ void CWebSocketMessage::Clear() - m_frames.clear(); - } - --const CWebSocketMessage* CWebSocket::Handle(const char *buffer, size_t length, bool &send) -+const CWebSocketMessage* CWebSocket::Handle(const char* &buffer, size_t &length, bool &send) - { - send = false; - -- switch (m_state) -+ while (length > 0) - { -- case WebSocketStateConnected: -+ switch (m_state) - { -- CWebSocketFrame *frame = GetFrame(buffer, length); -- if (!frame->IsValid()) -+ case WebSocketStateConnected: - { -- CLog::Log(LOGINFO, "WebSocket: Invalid frame received"); -- delete frame; -- return NULL; -- } -- -- if (frame->IsControlFrame()) -- { -- if (!frame->IsFinal()) -+ CWebSocketFrame *frame = GetFrame(buffer, length); -+ if (!frame->IsValid()) - { -+ CLog::Log(LOGINFO, "WebSocket: Invalid frame received"); - delete frame; - return NULL; - } - -- CWebSocketMessage *msg = NULL; -- switch (frame->GetOpcode()) -+ // adjust the length and the buffer values -+ length -= frame->GetFrameLength(); -+ buffer += frame->GetFrameLength(); -+ -+ if (frame->IsControlFrame()) - { -- case WebSocketPing: -- msg = GetMessage(); -- if (msg != NULL) -- msg->AddFrame(Pong(frame->GetApplicationData())); -- break; -+ if (!frame->IsFinal()) -+ { -+ delete frame; -+ return NULL; -+ } -+ -+ CWebSocketMessage *msg = NULL; -+ switch (frame->GetOpcode()) -+ { -+ case WebSocketPing: -+ msg = GetMessage(); -+ if (msg != NULL) -+ msg->AddFrame(Pong(frame->GetApplicationData())); -+ break; - -- case WebSocketConnectionClose: -- CLog::Log(LOGINFO, "WebSocket: connection closed by client"); -- -- msg = GetMessage(); -- if (msg != NULL) -- msg->AddFrame(Close()); -- -- m_state = WebSocketStateClosed; -- break; -- -- case WebSocketContinuationFrame: -- case WebSocketTextFrame: -- case WebSocketBinaryFrame: -- case WebSocketPong: -- case WebSocketUnknownFrame: -- default: -- break; -+ case WebSocketConnectionClose: -+ CLog::Log(LOGINFO, "WebSocket: connection closed by client"); -+ -+ msg = GetMessage(); -+ if (msg != NULL) -+ msg->AddFrame(Close()); -+ -+ m_state = WebSocketStateClosed; -+ break; -+ -+ case WebSocketContinuationFrame: -+ case WebSocketTextFrame: -+ case WebSocketBinaryFrame: -+ case WebSocketPong: -+ case WebSocketUnknownFrame: -+ default: -+ break; -+ } -+ -+ delete frame; -+ -+ if (msg != NULL) -+ send = true; -+ -+ return msg; - } - -- delete frame; -+ if (m_message == NULL && (m_message = GetMessage()) == NULL) -+ { -+ CLog::Log(LOGINFO, "WebSocket: Could not allocate a new websocket message"); -+ delete frame; -+ return NULL; -+ } - -- if (msg != NULL) -- send = true; -+ m_message->AddFrame(frame); -+ if (!m_message->IsComplete()) -+ { -+ if (length > 0) -+ continue; -+ else -+ return NULL; -+ } - -+ CWebSocketMessage *msg = m_message; -+ m_message = NULL; - return msg; - } - -- if (m_message == NULL && (m_message = GetMessage()) == NULL) -+ case WebSocketStateClosing: - { -- CLog::Log(LOGINFO, "WebSocket: Could not allocate a new websocket message"); -- delete frame; -- return NULL; -- } -+ CWebSocketFrame *frame = GetFrame(buffer, length); - -- m_message->AddFrame(frame); -- if (!m_message->IsComplete()) -- return NULL; -+ if (frame->IsValid()) -+ { -+ // adjust the length and the buffer values -+ length -= frame->GetFrameLength(); -+ buffer += frame->GetFrameLength(); -+ } - -- CWebSocketMessage *msg = m_message; -- m_message = NULL; -- return msg; -- } -+ if (!frame->IsValid() || frame->GetOpcode() == WebSocketConnectionClose) -+ { -+ CLog::Log(LOGINFO, "WebSocket: Invalid or unexpected frame received (only closing handshake expected)"); -+ delete frame; -+ return NULL; -+ } - -- case WebSocketStateClosing: -- { -- CWebSocketFrame *frame = GetFrame(buffer, length); -- if (!frame->IsValid() || frame->GetOpcode() == WebSocketConnectionClose) -- { -- CLog::Log(LOGINFO, "WebSocket: Invalid or unexpected frame received (only closing handshake expected)"); -- delete frame; -+ m_state = WebSocketStateClosed; - return NULL; - } - -- m_state = WebSocketStateClosed; -- return NULL; -+ case WebSocketStateNotConnected: -+ case WebSocketStateClosed: -+ case WebSocketStateHandshaking: -+ default: -+ CLog::Log(LOGINFO, "WebSocket: No frame expected in the current state"); -+ return NULL; - } -- -- case WebSocketStateNotConnected: -- case WebSocketStateClosed: -- case WebSocketStateHandshaking: -- default: -- CLog::Log(LOGINFO, "WebSocket: No frame expected in the current state"); -- return NULL; - } - - return NULL; -diff --git a/xbmc/network/websocket/WebSocket.h b/xbmc/network/websocket/WebSocket.h -index bbfaa89..e0d3cae 100644 ---- a/xbmc/network/websocket/WebSocket.h -+++ b/xbmc/network/websocket/WebSocket.h -@@ -122,7 +122,7 @@ class CWebSocket - WebSocketState GetState() { return m_state; } - - virtual bool Handshake(const char* data, size_t length, std::string &response) = 0; -- virtual const CWebSocketMessage* Handle(const char *buffer, size_t length, bool &send); -+ virtual const CWebSocketMessage* Handle(const char* &buffer, size_t &length, bool &send); - virtual const CWebSocketMessage* Send(WebSocketFrameOpcode opcode, const char* data = NULL, uint32_t length = 0); - virtual const CWebSocketFrame* Ping(const char* data = NULL) const = 0; - virtual const CWebSocketFrame* Pong(const char* data = NULL) const = 0; --- -1.7.10 - diff --git a/packages/mediacenter/xbmc/patches/xbmc-990.17-PR2320.patch b/packages/mediacenter/xbmc/patches/xbmc-990.17-PR2320.patch new file mode 100644 index 0000000000..c800347443 --- /dev/null +++ b/packages/mediacenter/xbmc/patches/xbmc-990.17-PR2320.patch @@ -0,0 +1,144 @@ +From f2faaa846e03cbcc1ba11f09baad690c792035c5 Mon Sep 17 00:00:00 2001 +From: fritsch +Date: Thu, 28 Feb 2013 00:17:03 +0100 +Subject: [PATCH] AE: Revisit Device Opening. Try to set periodSize of 100 ms + and BufferSize of 800 ms + +--- + xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp | 98 ++++++++++++++++----------- + 1 file changed, 59 insertions(+), 39 deletions(-) + +diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp +index fe40d17..821bd2e 100644 +--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp ++++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp +@@ -38,7 +38,6 @@ + #endif + + #define ALSA_OPTIONS (SND_PCM_NONBLOCK | SND_PCM_NO_AUTO_FORMAT | SND_PCM_NO_AUTO_CHANNELS | SND_PCM_NO_AUTO_RESAMPLE) +-#define ALSA_PERIODS 16 + + #define ALSA_MAX_CHANNELS 16 + static enum AEChannel ALSAChannelMap[ALSA_MAX_CHANNELS + 1] = { +@@ -328,59 +327,80 @@ bool CAESinkALSA::InitializeHW(AEAudioFormat &format) + } + } + +- unsigned int periods; +- + snd_pcm_uframes_t periodSize, bufferSize; + snd_pcm_hw_params_get_buffer_size_max(hw_params, &bufferSize); ++ snd_pcm_hw_params_get_period_size_max(hw_params, &periodSize, NULL); ++ ++ /* ++ We want to make sure, that we have approx 500 to 800 ms Buffer with ++ a periodSize of approx 100 ms. ++ It is calced: ++ periodSize = sampleRate / 10 ++ buffersize = periodSize * 1 frame * 8. ++ */ ++ periodSize = std::min(periodSize, (snd_pcm_uframes_t) sampleRate / 10); ++ bufferSize = std::min(bufferSize, (snd_pcm_uframes_t) periodSize * 8); ++ ++ /* ++ According to upstream we should set buffer size first - so make sure it is always at least ++ double of period size to not get underruns ++ */ ++ periodSize = std::min(periodSize, bufferSize / 2); + +- bufferSize = std::min(bufferSize, (snd_pcm_uframes_t)8192); +- periodSize = bufferSize / ALSA_PERIODS; +- periods = ALSA_PERIODS; +- +- CLog::Log(LOGDEBUG, "CAESinkALSA::InitializeHW - Request: periodSize %lu, periods %u, bufferSize %lu", periodSize, periods, bufferSize); ++ CLog::Log(LOGDEBUG, "CAESinkALSA::InitializeHW - Request: periodSize %lu, bufferSize %lu", periodSize, bufferSize); + +- /* work on a copy of the hw params */ + snd_pcm_hw_params_t *hw_params_copy; + snd_pcm_hw_params_alloca(&hw_params_copy); +- +- /* try to set the buffer size then the period size */ +- snd_pcm_hw_params_copy(hw_params_copy, hw_params); +- snd_pcm_hw_params_set_buffer_size_near(m_pcm, hw_params_copy, &bufferSize); +- snd_pcm_hw_params_set_period_size_near(m_pcm, hw_params_copy, &periodSize, NULL); +- snd_pcm_hw_params_set_periods_near (m_pcm, hw_params_copy, &periods , NULL); +- if (snd_pcm_hw_params(m_pcm, hw_params_copy) != 0) ++ snd_pcm_hw_params_copy(hw_params_copy, hw_params); // copy what we have and is already working ++ ++ // first trying bufferSize, PeriodSize ++ // for more info see here: ++ // http://mailman.alsa-project.org/pipermail/alsa-devel/2009-September/021069.html ++ // the last three tries are done as within pulseaudio ++ ++ // backup periodSize and bufferSize first. Restore them after every failed try ++ snd_pcm_uframes_t periodSizeTemp, bufferSizeTemp; ++ periodSizeTemp = periodSize; ++ bufferSizeTemp = bufferSize; ++ if (snd_pcm_hw_params_set_buffer_size_near(m_pcm, hw_params_copy, &bufferSize) != 0 ++ || snd_pcm_hw_params_set_period_size_near(m_pcm, hw_params_copy, &periodSize, NULL) != 0 ++ || snd_pcm_hw_params(m_pcm, hw_params_copy) != 0) + { +- /* try to set the period size then the buffer size */ +- snd_pcm_hw_params_copy(hw_params_copy, hw_params); +- snd_pcm_hw_params_set_period_size_near(m_pcm, hw_params_copy, &periodSize, NULL); +- snd_pcm_hw_params_set_buffer_size_near(m_pcm, hw_params_copy, &bufferSize); +- snd_pcm_hw_params_set_periods_near (m_pcm, hw_params_copy, &periods , NULL); +- if (snd_pcm_hw_params(m_pcm, hw_params_copy) != 0) ++ bufferSize = bufferSizeTemp; ++ periodSize = periodSizeTemp; ++ // retry with PeriodSize, bufferSize ++ snd_pcm_hw_params_copy(hw_params_copy, hw_params); // restore working copy ++ if (snd_pcm_hw_params_set_period_size_near(m_pcm, hw_params_copy, &periodSize, NULL) != 0 ++ || snd_pcm_hw_params_set_buffer_size_near(m_pcm, hw_params_copy, &bufferSize) != 0 ++ || snd_pcm_hw_params(m_pcm, hw_params_copy) != 0) + { +- /* try to just set the buffer size */ +- snd_pcm_hw_params_copy(hw_params_copy, hw_params); +- snd_pcm_hw_params_set_buffer_size_near(m_pcm, hw_params_copy, &bufferSize); +- snd_pcm_hw_params_set_periods_near (m_pcm, hw_params_copy, &periods , NULL); +- if (snd_pcm_hw_params(m_pcm, hw_params_copy) != 0) ++ // try only periodSize ++ periodSize = periodSizeTemp; ++ snd_pcm_hw_params_copy(hw_params_copy, hw_params); // restore working copy ++ if(snd_pcm_hw_params_set_period_size_near(m_pcm, hw_params_copy, &periodSize, NULL) != 0 ++ || snd_pcm_hw_params(m_pcm, hw_params_copy) != 0) + { +- /* try to just set the period size */ +- snd_pcm_hw_params_copy(hw_params_copy, hw_params); +- snd_pcm_hw_params_set_period_size_near(m_pcm, hw_params_copy, &periodSize, NULL); +- snd_pcm_hw_params_set_periods_near (m_pcm, hw_params_copy, &periods , NULL); +- if (snd_pcm_hw_params(m_pcm, hw_params_copy) != 0) ++ // try only BufferSize ++ bufferSize = bufferSizeTemp; ++ snd_pcm_hw_params_copy(hw_params_copy, hw_params); // restory working copy ++ if (snd_pcm_hw_params_set_buffer_size_near(m_pcm, hw_params_copy, &bufferSize) != 0 ++ || snd_pcm_hw_params(m_pcm, hw_params_copy) != 0) + { +- CLog::Log(LOGERROR, "CAESinkALSA::InitializeHW - Failed to set the parameters"); +- return false; ++ // set default that Alsa would choose ++ CLog::Log(LOGWARNING, "CAESinkAlsa::IntializeHW - Using default alsa values - set failed"); ++ if (snd_pcm_hw_params(m_pcm, hw_params) != 0) ++ { ++ CLog::Log(LOGDEBUG, "CAESinkALSA::InitializeHW - Could not init a valid sink"); ++ return false; ++ } + } + } ++ // reread values when alsa default was kept ++ snd_pcm_get_params(m_pcm, &bufferSize, &periodSize); + } + } +- +- snd_pcm_hw_params_get_period_size(hw_params_copy, &periodSize, NULL); +- snd_pcm_hw_params_get_buffer_size(hw_params_copy, &bufferSize); + +- +- CLog::Log(LOGDEBUG, "CAESinkALSA::InitializeHW - Got: periodSize %lu, periods %u, bufferSize %lu", periodSize, periods, bufferSize); ++ CLog::Log(LOGDEBUG, "CAESinkALSA::InitializeHW - Got: periodSize %lu, bufferSize %lu", periodSize, bufferSize); + + /* set the format parameters */ + format.m_sampleRate = sampleRate; +-- +1.7.10 + diff --git a/packages/mediacenter/xbmc/patches/xbmc-990.18-PR2368.patch b/packages/mediacenter/xbmc/patches/xbmc-990.18-PR2368.patch new file mode 100644 index 0000000000..d9c9c1f634 --- /dev/null +++ b/packages/mediacenter/xbmc/patches/xbmc-990.18-PR2368.patch @@ -0,0 +1,156 @@ +From 632825b71a2bc248eb5705666debc5f7653d6878 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Sun, 24 Feb 2013 15:25:49 +0000 +Subject: [PATCH] [rbp] Fix for stuttery video when seeking before zero + +There are a few issues with seeking I found. +We weren't correctly setting OMX_BUFFERFLAG_TIME_UNKNOWN on the first frame after a seek which could make the GPU think video was at 0 and audio at a much larger offset. +A full video fifo (to GPU) stops any higher priority messages from being received which can stall a seek and the flush message doesn't get through. Use m_flush to discard the video packet that doesn't fit. +We get an audio frame through with unknown pts/dts after the flush, but before the GENERAL_RESYNC when seeking. This was given to GPU and was perhaps 30 seconds out from the following packets and that throws off the timing between audio and video streams. Keeping m_flush true until the GENERAL_RESYNC discards this frame. Hopefully that is safe. +--- + xbmc/cores/omxplayer/OMXPlayerAudio.cpp | 13 ++----------- + xbmc/cores/omxplayer/OMXPlayerAudio.h | 1 - + xbmc/cores/omxplayer/OMXPlayerVideo.cpp | 7 +++++++ + xbmc/cores/omxplayer/OMXPlayerVideo.h | 1 + + xbmc/cores/omxplayer/OMXVideo.cpp | 11 +++-------- + 5 files changed, 13 insertions(+), 20 deletions(-) + +diff --git a/xbmc/cores/omxplayer/OMXPlayerAudio.cpp b/xbmc/cores/omxplayer/OMXPlayerAudio.cpp +index 58c3a4f..16ea6c3 100644 +--- a/xbmc/cores/omxplayer/OMXPlayerAudio.cpp ++++ b/xbmc/cores/omxplayer/OMXPlayerAudio.cpp +@@ -369,13 +369,9 @@ bool OMXPlayerAudio::Decode(DemuxPacket *pkt, bool bDropPacket) + + while(!m_bStop) + { ++ // discard if flushing as clocks may be stopped and we'll never submit it + if(m_flush) +- { +- CSingleLock lock(m_flushLock); +- m_flush = false; +- lock.Leave(); + break; +- } + + if(m_omxAudio.GetSpace() < (unsigned int)pkt->iSize) + { +@@ -420,12 +416,7 @@ bool OMXPlayerAudio::Decode(DemuxPacket *pkt, bool bDropPacket) + while(!m_bStop) + { + if(m_flush) +- { +- CSingleLock lock(m_flushLock); +- m_flush = false; +- lock.Leave(); + break; +- } + + if(m_omxAudio.GetSpace() < (unsigned int)pkt->iSize) + { +@@ -544,6 +535,7 @@ void OMXPlayerAudio::Process() + } + else + CLog::Log(LOGDEBUG, "COMXPlayerAudio - CDVDMsg::GENERAL_RESYNC(%f, 0)", m_audioClock); ++ m_flush = false; + } + else if (pMsg->IsType(CDVDMsg::GENERAL_RESET)) + { +@@ -627,7 +619,6 @@ void OMXPlayerAudio::Process() + + void OMXPlayerAudio::Flush() + { +- CSingleLock lock(m_flushLock); + m_flush = true; + m_messageQueue.Flush(); + m_messageQueue.Put( new CDVDMsg(CDVDMsg::GENERAL_FLUSH), 1); +diff --git a/xbmc/cores/omxplayer/OMXPlayerAudio.h b/xbmc/cores/omxplayer/OMXPlayerAudio.h +index d10133e..d6083e9 100644 +--- a/xbmc/cores/omxplayer/OMXPlayerAudio.h ++++ b/xbmc/cores/omxplayer/OMXPlayerAudio.h +@@ -42,7 +42,6 @@ + class OMXPlayerAudio : public CThread + { + protected: +- CCriticalSection m_flushLock; + CDVDMessageQueue m_messageQueue; + CDVDMessageQueue &m_messageParent; + +diff --git a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp +index 5a6e31e..5dd908b 100644 +--- a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp ++++ b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp +@@ -122,6 +122,7 @@ bool OMXPlayerVideo::OpenStream(CDVDStreamInfo &hints) + m_Deinterlace = ( g_settings.m_currentVideoSettings.m_DeinterlaceMode == VS_DEINTERLACEMODE_OFF ) ? false : true; + m_hdmi_clock_sync = (g_guiSettings.GetInt("videoplayer.adjustrefreshrate") != ADJUST_REFRESHRATE_OFF); + m_started = false; ++ m_flush = false; + m_stalled = m_messageQueue.GetPacketCount(CDVDMsg::DEMUXER_PACKET) == 0; + m_autosync = 1; + m_iSleepEndTime = DVD_NOPTS_VALUE; +@@ -593,6 +594,7 @@ void OMXPlayerVideo::Process() + m_omxVideo.Reset(); + m_av_clock->OMXReset(false); + m_av_clock->UnLock(); ++ m_flush = false; + } + else if (pMsg->IsType(CDVDMsg::PLAYER_SETSPEED)) + { +@@ -633,6 +635,10 @@ void OMXPlayerVideo::Process() + + while (!m_bStop) + { ++ // discard if flushing as clocks may be stopped and we'll never submit it ++ if (m_flush) ++ break; ++ + if((int)m_omxVideo.GetFreeSpace() < pPacket->iSize) + { + Sleep(10); +@@ -697,6 +703,7 @@ void OMXPlayerVideo::Process() + + void OMXPlayerVideo::Flush() + { ++ m_flush = true; + m_messageQueue.Flush(); + m_messageQueue.Put(new CDVDMsg(CDVDMsg::GENERAL_FLUSH), 1); + } +diff --git a/xbmc/cores/omxplayer/OMXPlayerVideo.h b/xbmc/cores/omxplayer/OMXPlayerVideo.h +index cf05c1f..7df1b0b 100644 +--- a/xbmc/cores/omxplayer/OMXPlayerVideo.h ++++ b/xbmc/cores/omxplayer/OMXPlayerVideo.h +@@ -61,6 +61,7 @@ class OMXPlayerVideo : public CThread + int m_audio_count; + bool m_stalled; + bool m_started; ++ bool m_flush; + std::string m_codecname; + double m_droptime; + double m_dropbase; +diff --git a/xbmc/cores/omxplayer/OMXVideo.cpp b/xbmc/cores/omxplayer/OMXVideo.cpp +index 3417286..4f11ff8 100644 +--- a/xbmc/cores/omxplayer/OMXVideo.cpp ++++ b/xbmc/cores/omxplayer/OMXVideo.cpp +@@ -809,17 +809,12 @@ int COMXVideo::Decode(uint8_t *pData, int iSize, double dts, double pts) + // only send dts on first frame to get nearly correct starttime + if(pts == DVD_NOPTS_VALUE) + pts = dts; +- if(pts == DVD_NOPTS_VALUE) +- omx_buffer->nFlags |= OMX_BUFFERFLAG_TIME_UNKNOWN; +- omx_buffer->nFlags = OMX_BUFFERFLAG_STARTTIME; ++ omx_buffer->nFlags |= OMX_BUFFERFLAG_STARTTIME; + CLog::Log(LOGDEBUG, "OMXVideo::Decode VDec : setStartTime %f\n", (pts == DVD_NOPTS_VALUE ? 0.0 : pts) / DVD_TIME_BASE); + m_av_clock->VideoStart(false); + } +- else +- { +- if(pts == DVD_NOPTS_VALUE) +- omx_buffer->nFlags = OMX_BUFFERFLAG_TIME_UNKNOWN; +- } ++ if(pts == DVD_NOPTS_VALUE) ++ omx_buffer->nFlags |= OMX_BUFFERFLAG_TIME_UNKNOWN; + + omx_buffer->nTimeStamp = ToOMXTime((uint64_t)(pts == DVD_NOPTS_VALUE) ? 0 : pts); + omx_buffer->nFilledLen = (demuxer_bytes > omx_buffer->nAllocLen) ? omx_buffer->nAllocLen : demuxer_bytes; +-- +1.7.10 + diff --git a/packages/mediacenter/xbmc/patches/xbmc-990.19-PR2382.patch b/packages/mediacenter/xbmc/patches/xbmc-990.19-PR2382.patch new file mode 100644 index 0000000000..988377325b --- /dev/null +++ b/packages/mediacenter/xbmc/patches/xbmc-990.19-PR2382.patch @@ -0,0 +1,46 @@ +From eb4ae32119a83716d7fb930381d2848c02383cea Mon Sep 17 00:00:00 2001 +From: fritsch +Date: Wed, 6 Mar 2013 07:52:59 +0100 +Subject: [PATCH] AE: Fix menu sounds by decreasing buffer(max 200 ms) and + periodSize(50 ms) + +--- + xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) + +diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp +index 821bd2e..21891a5 100644 +--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp ++++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp +@@ -332,18 +332,19 @@ bool CAESinkALSA::InitializeHW(AEAudioFormat &format) + snd_pcm_hw_params_get_period_size_max(hw_params, &periodSize, NULL); + + /* +- We want to make sure, that we have approx 500 to 800 ms Buffer with +- a periodSize of approx 100 ms. +- It is calced: +- periodSize = sampleRate / 10 +- buffersize = periodSize * 1 frame * 8. ++ We want to make sure, that we have max 200 ms Buffer with ++ a periodSize of approx 50 ms. Choosing a higher bufferSize ++ will cause problems with menu sounds. Buffer will be increased ++ after those are fixed. ++ periodSize = sampleRate / 20 ++ bufferSize = periodSize * 1 frame * 4. + */ +- periodSize = std::min(periodSize, (snd_pcm_uframes_t) sampleRate / 10); +- bufferSize = std::min(bufferSize, (snd_pcm_uframes_t) periodSize * 8); ++ periodSize = std::min(periodSize, (snd_pcm_uframes_t) sampleRate / 20); ++ bufferSize = std::min(bufferSize, (snd_pcm_uframes_t) periodSize * 4); + + /* +- According to upstream we should set buffer size first - so make sure it is always at least +- double of period size to not get underruns ++ According to upstream we should set buffer size first - so make sure it is always at least ++ double of period size to not get underruns + */ + periodSize = std::min(periodSize, bufferSize / 2); + +-- +1.7.10 + diff --git a/packages/mediacenter/xbmc/patches/xbmc-990.20-PR2286.patch b/packages/mediacenter/xbmc/patches/xbmc-990.20-PR2286.patch new file mode 100644 index 0000000000..373c7963de --- /dev/null +++ b/packages/mediacenter/xbmc/patches/xbmc-990.20-PR2286.patch @@ -0,0 +1,520 @@ +From dac7871e3440b9d4235fcd91af1c2d41a931d69d Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Mon, 18 Feb 2013 23:04:28 +0000 +Subject: [PATCH] [rbp] Handle resolution changes during video stream. + +When the resolution changes, GPU sends a port settings changed message. Host has to acknowledge it by disabling and enabling the affected ports. +--- + xbmc/cores/omxplayer/OMXPlayerVideo.cpp | 229 ++++++++++++------------------- + xbmc/cores/omxplayer/OMXPlayerVideo.h | 7 +- + xbmc/cores/omxplayer/OMXVideo.cpp | 95 ++++++++----- + xbmc/cores/omxplayer/OMXVideo.h | 7 +- + 4 files changed, 151 insertions(+), 187 deletions(-) + +diff --git a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp +index 5a6e31e..a033c78 100644 +--- a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp ++++ b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp +@@ -83,9 +83,6 @@ class COMXMsgVideoCodecChange : public CDVDMsg + m_iSubtitleDelay = 0; + m_FlipTimeStamp = 0.0; + m_bRenderSubs = false; +- m_width = 0; +- m_height = 0; +- m_fps = 0.0f; + m_flags = 0; + m_bAllowFullscreen = false; + m_iCurrentPts = DVD_NOPTS_VALUE; +@@ -98,12 +95,7 @@ class COMXMsgVideoCodecChange : public CDVDMsg + m_messageQueue.SetMaxDataSize(10 * 1024 * 1024); + m_messageQueue.SetMaxTimeSize(8.0); + +- RESOLUTION res = g_graphicsContext.GetVideoResolution(); +- m_video_width = g_settings.m_ResInfo[res].iScreenWidth; +- m_video_height = g_settings.m_ResInfo[res].iScreenHeight; +- + m_dst_rect.SetRect(0, 0, 0, 0); +- + } + + OMXPlayerVideo::~OMXPlayerVideo() +@@ -125,6 +117,8 @@ bool OMXPlayerVideo::OpenStream(CDVDStreamInfo &hints) + m_stalled = m_messageQueue.GetPacketCount(CDVDMsg::DEMUXER_PACKET) == 0; + m_autosync = 1; + m_iSleepEndTime = DVD_NOPTS_VALUE; ++ // force SetVideoRect to be called initially ++ m_dst_rect.SetRect(0, 0, 0, 0); + + m_audio_count = m_av_clock->HasAudio(); + +@@ -220,154 +214,45 @@ void OMXPlayerVideo::ProcessOverlays(int iGroupId, double pts) + if (m_started) + m_pOverlayContainer->CleanUp(pts - m_iSubtitleDelay); + +- enum EOverlay +- { OVERLAY_AUTO // select mode auto +- , OVERLAY_GPU // render osd using gpu +- , OVERLAY_BUF // render osd on buffer +- } render = OVERLAY_AUTO; +- +- /* +- if(m_pOverlayContainer->ContainsOverlayType(DVDOVERLAY_TYPE_SPU) +- || m_pOverlayContainer->ContainsOverlayType(DVDOVERLAY_TYPE_IMAGE) +- || m_pOverlayContainer->ContainsOverlayType(DVDOVERLAY_TYPE_SSA) ) +- render = OVERLAY_BUF; +- */ +- +- if(render == OVERLAY_BUF) +- { +- // rendering spu overlay types directly on video memory costs a lot of processing power. +- // thus we allocate a temp picture, copy the original to it (needed because the same picture can be used more than once). +- // then do all the rendering on that temp picture and finaly copy it to video memory. +- // In almost all cases this is 5 or more times faster!. +- +- if(m_pTempOverlayPicture && ( m_pTempOverlayPicture->iWidth != m_width +- || m_pTempOverlayPicture->iHeight != m_height)) +- { +- CDVDCodecUtils::FreePicture(m_pTempOverlayPicture); +- m_pTempOverlayPicture = NULL; +- } +- +- if(!m_pTempOverlayPicture) +- m_pTempOverlayPicture = CDVDCodecUtils::AllocatePicture(m_width, m_height); +- if(!m_pTempOverlayPicture) +- return; +- m_pTempOverlayPicture->format = RENDER_FMT_YUV420P; +- } +- +- if(render == OVERLAY_AUTO) +- render = OVERLAY_GPU; +- + VecOverlays overlays; + +- { +- CSingleLock lock(*m_pOverlayContainer); ++ CSingleLock lock(*m_pOverlayContainer); + +- VecOverlays* pVecOverlays = m_pOverlayContainer->GetOverlays(); +- VecOverlaysIter it = pVecOverlays->begin(); +- +- //Check all overlays and render those that should be rendered, based on time and forced +- //Both forced and subs should check timeing, pts == 0 in the stillframe case +- while (it != pVecOverlays->end()) +- { +- CDVDOverlay* pOverlay = *it++; +- if(!pOverlay->bForced && !m_bRenderSubs) +- continue; +- +- if(pOverlay->iGroupId != iGroupId) +- continue; ++ VecOverlays* pVecOverlays = m_pOverlayContainer->GetOverlays(); ++ VecOverlaysIter it = pVecOverlays->begin(); + +- double pts2 = pOverlay->bForced ? pts : pts - m_iSubtitleDelay; ++ //Check all overlays and render those that should be rendered, based on time and forced ++ //Both forced and subs should check timeing, pts == 0 in the stillframe case ++ while (it != pVecOverlays->end()) ++ { ++ CDVDOverlay* pOverlay = *it++; ++ if(!pOverlay->bForced && !m_bRenderSubs) ++ continue; + +- if((pOverlay->iPTSStartTime <= pts2 && (pOverlay->iPTSStopTime > pts2 || pOverlay->iPTSStopTime == 0LL)) || pts == 0) +- { +- if(pOverlay->IsOverlayType(DVDOVERLAY_TYPE_GROUP)) +- overlays.insert(overlays.end(), static_cast(pOverlay)->m_overlays.begin() +- , static_cast(pOverlay)->m_overlays.end()); +- else +- overlays.push_back(pOverlay); ++ if(pOverlay->iGroupId != iGroupId) ++ continue; + +- } +- } ++ double pts2 = pOverlay->bForced ? pts : pts - m_iSubtitleDelay; + +- for(it = overlays.begin(); it != overlays.end(); ++it) ++ if((pOverlay->iPTSStartTime <= pts2 && (pOverlay->iPTSStopTime > pts2 || pOverlay->iPTSStopTime == 0LL)) || pts == 0) + { +- double pts2 = (*it)->bForced ? pts : pts - m_iSubtitleDelay; +- +- if (render == OVERLAY_GPU) +- g_renderManager.AddOverlay(*it, pts2); +- +- /* +- printf("subtitle : DVDOVERLAY_TYPE_SPU %d DVDOVERLAY_TYPE_IMAGE %d DVDOVERLAY_TYPE_SSA %d\n", +- m_pOverlayContainer->ContainsOverlayType(DVDOVERLAY_TYPE_SPU), +- m_pOverlayContainer->ContainsOverlayType(DVDOVERLAY_TYPE_IMAGE), +- m_pOverlayContainer->ContainsOverlayType(DVDOVERLAY_TYPE_SSA) ); +- */ +- +- if (render == OVERLAY_BUF) +- CDVDOverlayRenderer::Render(m_pTempOverlayPicture, *it, pts2); ++ if(pOverlay->IsOverlayType(DVDOVERLAY_TYPE_GROUP)) ++ overlays.insert(overlays.end(), static_cast(pOverlay)->m_overlays.begin() ++ , static_cast(pOverlay)->m_overlays.end()); ++ else ++ overlays.push_back(pOverlay); + } + } +-} +- +-void OMXPlayerVideo::Output(int iGroupId, double pts, bool bDropPacket) +-{ + +- if (!g_renderManager.IsConfigured() +- || m_video_width != m_width +- || m_video_height != m_height +- || m_fps != m_fFrameRate) ++ for(it = overlays.begin(); it != overlays.end(); ++it) + { +- m_width = m_video_width; +- m_height = m_video_height; +- m_fps = m_fFrameRate; +- +- unsigned flags = 0; +- ERenderFormat format = RENDER_FMT_BYPASS; +- +- if(m_bAllowFullscreen) +- { +- flags |= CONF_FLAGS_FULLSCREEN; +- m_bAllowFullscreen = false; // only allow on first configure +- } +- +- if(m_flags & CONF_FLAGS_FORMAT_SBS) +- { +- if(g_Windowing.Support3D(m_video_width, m_video_height, D3DPRESENTFLAG_MODE3DSBS)) +- { +- CLog::Log(LOGNOTICE, "3DSBS movie found"); +- flags |= CONF_FLAGS_FORMAT_SBS; +- } +- } +- else if(m_flags & CONF_FLAGS_FORMAT_TB) +- { +- if(g_Windowing.Support3D(m_video_width, m_video_height, D3DPRESENTFLAG_MODE3DTB)) +- { +- CLog::Log(LOGNOTICE, "3DTB movie found"); +- flags |= CONF_FLAGS_FORMAT_TB; +- } +- } +- +- unsigned int iDisplayWidth = m_hints.width; +- unsigned int iDisplayHeight = m_hints.height; +- +- /* use forced aspect if any */ +- if( m_fForcedAspectRatio != 0.0f ) +- iDisplayWidth = (int) (iDisplayHeight * m_fForcedAspectRatio); +- +- CLog::Log(LOGDEBUG,"%s - change configuration. %dx%d. framerate: %4.2f. %dx%x format: BYPASS", +- __FUNCTION__, m_width, m_height, m_fps, iDisplayWidth, iDisplayHeight); +- +- if(!g_renderManager.Configure(m_hints.width, m_hints.height, +- iDisplayWidth, iDisplayHeight, m_fps, flags, format, 0, +- m_hints.orientation)) +- { +- CLog::Log(LOGERROR, "%s - failed to configure renderer", __FUNCTION__); +- return; +- } +- +- g_renderManager.RegisterRenderUpdateCallBack((const void*)this, RenderUpdateCallBack); ++ double pts2 = (*it)->bForced ? pts : pts - m_iSubtitleDelay; ++ g_renderManager.AddOverlay(*it, pts2); + } ++} + ++void OMXPlayerVideo::Output(int iGroupId, double pts, bool bDropPacket) ++{ + if (!g_renderManager.IsStarted()) { + CLog::Log(LOGERROR, "%s - renderer not started", __FUNCTION__); + return; +@@ -724,6 +609,7 @@ bool OMXPlayerVideo::OpenDecoder() + m_av_clock->OMXStop(false); + + bool bVideoDecoderOpen = m_omxVideo.Open(m_hints, m_av_clock, m_Deinterlace, m_hdmi_clock_sync); ++ m_omxVideo.RegisterResolutionUpdateCallBack((void *)this, ResolutionUpdateCallBack); + + if(!bVideoDecoderOpen) + { +@@ -859,3 +745,62 @@ void OMXPlayerVideo::RenderUpdateCallBack(const void *ctx, const CRect &SrcRect, + player->SetVideoRect(SrcRect, DestRect); + } + ++void OMXPlayerVideo::ResolutionUpdateCallBack(uint32_t width, uint32_t height) ++{ ++ RESOLUTION res = g_graphicsContext.GetVideoResolution(); ++ uint32_t video_width = g_settings.m_ResInfo[res].iScreenWidth; ++ uint32_t video_height = g_settings.m_ResInfo[res].iScreenHeight; ++ ++ unsigned flags = 0; ++ ERenderFormat format = RENDER_FMT_BYPASS; ++ ++ if(m_bAllowFullscreen) ++ { ++ flags |= CONF_FLAGS_FULLSCREEN; ++ m_bAllowFullscreen = false; // only allow on first configure ++ } ++ ++ if(m_flags & CONF_FLAGS_FORMAT_SBS) ++ { ++ if(g_Windowing.Support3D(video_width, video_height, D3DPRESENTFLAG_MODE3DSBS)) ++ { ++ CLog::Log(LOGNOTICE, "3DSBS movie found"); ++ flags |= CONF_FLAGS_FORMAT_SBS; ++ } ++ } ++ else if(m_flags & CONF_FLAGS_FORMAT_TB) ++ { ++ if(g_Windowing.Support3D(video_width, video_height, D3DPRESENTFLAG_MODE3DTB)) ++ { ++ CLog::Log(LOGNOTICE, "3DTB movie found"); ++ flags |= CONF_FLAGS_FORMAT_TB; ++ } ++ } ++ ++ unsigned int iDisplayWidth = width; ++ unsigned int iDisplayHeight = height; ++ ++ /* use forced aspect if any */ ++ if( m_fForcedAspectRatio != 0.0f ) ++ iDisplayWidth = (int) (iDisplayHeight * m_fForcedAspectRatio); ++ ++ CLog::Log(LOGDEBUG,"%s - change configuration. video:%dx%d. framerate: %4.2f. %dx%d format: BYPASS", ++ __FUNCTION__, video_width, video_height, m_fFrameRate, iDisplayWidth, iDisplayHeight); ++ ++ if(!g_renderManager.Configure(width, height, ++ iDisplayWidth, iDisplayHeight, m_fFrameRate, flags, format, 0, ++ m_hints.orientation)) ++ { ++ CLog::Log(LOGERROR, "%s - failed to configure renderer", __FUNCTION__); ++ return; ++ } ++ ++ g_renderManager.RegisterRenderUpdateCallBack((const void*)this, RenderUpdateCallBack); ++} ++ ++void OMXPlayerVideo::ResolutionUpdateCallBack(void *ctx, uint32_t width, uint32_t height) ++{ ++ OMXPlayerVideo *player = static_cast(ctx); ++ player->ResolutionUpdateCallBack(width, height); ++} ++ +diff --git a/xbmc/cores/omxplayer/OMXPlayerVideo.h b/xbmc/cores/omxplayer/OMXPlayerVideo.h +index cf05c1f..95a691b 100644 +--- a/xbmc/cores/omxplayer/OMXPlayerVideo.h ++++ b/xbmc/cores/omxplayer/OMXPlayerVideo.h +@@ -70,12 +70,7 @@ class OMXPlayerVideo : public CThread + bool m_bAllowFullscreen; + + float m_fForcedAspectRatio; +- unsigned int m_width; +- unsigned int m_height; +- unsigned int m_video_width; +- unsigned int m_video_height; + unsigned m_flags; +- float m_fps; + + CRect m_dst_rect; + int m_view_mode; +@@ -133,5 +128,7 @@ class OMXPlayerVideo : public CThread + int GetFreeSpace(); + void SetVideoRect(const CRect &SrcRect, const CRect &DestRect); + static void RenderUpdateCallBack(const void *ctx, const CRect &SrcRect, const CRect &DestRect); ++ void ResolutionUpdateCallBack(uint32_t width, uint32_t height); ++ static void ResolutionUpdateCallBack(void *ctx, uint32_t width, uint32_t height); + }; + #endif +diff --git a/xbmc/cores/omxplayer/OMXVideo.cpp b/xbmc/cores/omxplayer/OMXVideo.cpp +index 3417286..b6b42e7 100644 +--- a/xbmc/cores/omxplayer/OMXVideo.cpp ++++ b/xbmc/cores/omxplayer/OMXVideo.cpp +@@ -86,7 +86,6 @@ + m_video_codec_name = ""; + m_deinterlace = false; + m_hdmi_clock_sync = false; +- m_first_frame = true; + } + + COMXVideo::~COMXVideo() +@@ -154,6 +153,9 @@ bool COMXVideo::Open(CDVDStreamInfo &hints, OMXClock *clock, bool deinterlace, b + OMX_ERRORTYPE omx_err = OMX_ErrorNone; + std::string decoder_name; + ++ m_res_ctx = NULL; ++ m_res_callback = NULL; ++ + m_video_codec_name = ""; + m_codingType = OMX_VIDEO_CodingUnused; + +@@ -697,7 +699,6 @@ bool COMXVideo::Open(CDVDStreamInfo &hints, OMXClock *clock, bool deinterlace, b + CLASSNAME, __func__, m_omx_decoder.GetComponent(), m_omx_decoder.GetInputPort(), m_omx_decoder.GetOutputPort(), + m_deinterlace, m_hdmi_clock_sync); + +- m_first_frame = true; + // start from assuming all recent frames had valid pts + m_history_valid_pts = ~0; + +@@ -736,8 +737,10 @@ void COMXVideo::Close() + m_video_convert = false; + m_video_codec_name = ""; + m_deinterlace = false; +- m_first_frame = true; + m_av_clock = NULL; ++ ++ m_res_ctx = NULL; ++ m_res_callback = NULL; + } + + void COMXVideo::SetDropState(bool bDrop) +@@ -851,57 +854,74 @@ int COMXVideo::Decode(uint8_t *pData, int iSize, double dts, double pts) + } + } + +- if(m_first_frame && m_deinterlace) ++ omx_err = m_omx_decoder.WaitForEvent(OMX_EventPortSettingsChanged, 0); ++ if (omx_err == OMX_ErrorNone) + { + OMX_PARAM_PORTDEFINITIONTYPE port_image; + OMX_INIT_STRUCTURE(port_image); + port_image.nPortIndex = m_omx_decoder.GetOutputPort(); +- + omx_err = m_omx_decoder.GetParameter(OMX_IndexParamPortDefinition, &port_image); + if(omx_err != OMX_ErrorNone) +- CLog::Log(LOGERROR, "%s::%s - error OMX_IndexParamPortDefinition 1 omx_err(0x%08x)\n", CLASSNAME, __func__, omx_err); ++ { ++ CLog::Log(LOGERROR, "%s::%s - error m_omx_decoder.GetParameter(OMX_IndexParamPortDefinition) omx_err(0x%08x)\n", CLASSNAME, __func__, omx_err); ++ } ++ // let OMXPlayerVideo know about resolution so it can inform RenderManager ++ if (m_res_callback) ++ m_res_callback(m_res_ctx, port_image.format.video.nFrameWidth, port_image.format.video.nFrameHeight); ++ ++ m_omx_decoder.DisablePort(m_omx_decoder.GetOutputPort(), true); ++ m_omx_sched.DisablePort(m_omx_sched.GetInputPort(), true); + +- /* we assume when the sizes equal we have the first decoded frame */ +- if(port_image.format.video.nFrameWidth == m_decoded_width && port_image.format.video.nFrameHeight == m_decoded_height) ++ OMX_CONFIG_INTERLACETYPE interlace; ++ OMX_INIT_STRUCTURE(interlace); ++ interlace.nPortIndex = m_omx_decoder.GetOutputPort(); ++ omx_err = m_omx_decoder.GetConfig(OMX_IndexConfigCommonInterlace, &interlace); ++ if(omx_err != OMX_ErrorNone) + { +- m_first_frame = false; ++ CLog::Log(LOGERROR, "%s::%s - error m_omx_decoder.GetConfig(OMX_IndexConfigCommonInterlace) omx_err(0x%08x)\n", CLASSNAME, __func__, omx_err); ++ } + +- omx_err = m_omx_decoder.WaitForEvent(OMX_EventPortSettingsChanged); +- if(omx_err == OMX_ErrorStreamCorrupt) ++ if (m_deinterlace) ++ { ++ m_omx_image_fx.DisablePort(m_omx_image_fx.GetInputPort(), true); ++ port_image.nPortIndex = m_omx_image_fx.GetInputPort(); ++ omx_err = m_omx_image_fx.SetParameter(OMX_IndexParamPortDefinition, &port_image); ++ if(omx_err != OMX_ErrorNone) + { +- CLog::Log(LOGERROR, "%s::%s - image not unsupported\n", CLASSNAME, __func__); +- return false; ++ CLog::Log(LOGERROR, "%s::%s - error m_omx_image_fx.SetParameter(OMX_IndexParamPortDefinition) omx_err(0x%08x)\n", CLASSNAME, __func__, omx_err); + } +- +- m_omx_decoder.DisablePort(m_omx_decoder.GetOutputPort(), false); +- m_omx_sched.DisablePort(m_omx_sched.GetInputPort(), false); +- +- if(m_deinterlace) ++ omx_err = m_omx_decoder.WaitForEvent(OMX_EventPortSettingsChanged); ++ if(omx_err != OMX_ErrorNone) + { +- m_omx_image_fx.DisablePort(m_omx_image_fx.GetOutputPort(), false); +- m_omx_image_fx.DisablePort(m_omx_image_fx.GetInputPort(), false); +- +- port_image.nPortIndex = m_omx_image_fx.GetInputPort(); +- omx_err = m_omx_image_fx.SetParameter(OMX_IndexParamPortDefinition, &port_image); +- if(omx_err != OMX_ErrorNone) +- CLog::Log(LOGERROR, "%s::%s - error OMX_IndexParamPortDefinition 2 omx_err(0x%08x)\n", CLASSNAME, __func__, omx_err); +- +- port_image.nPortIndex = m_omx_image_fx.GetOutputPort(); +- omx_err = m_omx_image_fx.SetParameter(OMX_IndexParamPortDefinition, &port_image); +- if(omx_err != OMX_ErrorNone) +- CLog::Log(LOGERROR, "%s::%s - error OMX_IndexParamPortDefinition 3 omx_err(0x%08x)\n", CLASSNAME, __func__, omx_err); ++ CLog::Log(LOGERROR, "%s::%s - error m_omx_decoder.WaitForEvent(OMX_EventPortSettingsChanged) omx_err(0x%08x)\n", CLASSNAME, __func__, omx_err); + } +- +- m_omx_decoder.EnablePort(m_omx_decoder.GetOutputPort(), false); +- +- if(m_deinterlace) ++ port_image.nPortIndex = m_omx_image_fx.GetOutputPort(); ++ omx_err = m_omx_image_fx.GetParameter(OMX_IndexParamPortDefinition, &port_image); ++ if(omx_err != OMX_ErrorNone) + { +- m_omx_image_fx.EnablePort(m_omx_image_fx.GetOutputPort(), false); +- m_omx_image_fx.EnablePort(m_omx_image_fx.GetInputPort(), false); ++ CLog::Log(LOGERROR, "%s::%s - error m_omx_image_fx.GetParameter(OMX_IndexParamPortDefinition) omx_err(0x%08x)\n", CLASSNAME, __func__, omx_err); + } ++ m_omx_image_fx.EnablePort(m_omx_image_fx.GetInputPort(), true); + +- m_omx_sched.EnablePort(m_omx_sched.GetInputPort(), false); ++ m_omx_image_fx.DisablePort(m_omx_image_fx.GetOutputPort(), true); ++ } ++ port_image.nPortIndex = m_omx_sched.GetInputPort(); ++ omx_err = m_omx_sched.SetParameter(OMX_IndexParamPortDefinition, &port_image); ++ if(omx_err != OMX_ErrorNone) ++ { ++ CLog::Log(LOGERROR, "%s::%s - error m_omx_sched.SetParameter(OMX_IndexParamPortDefinition) omx_err(0x%08x)\n", CLASSNAME, __func__, omx_err); ++ } ++ omx_err = m_omx_sched.WaitForEvent(OMX_EventPortSettingsChanged); ++ if(omx_err != OMX_ErrorNone) ++ { ++ CLog::Log(LOGERROR, "%s::%s - error m_omx_sched.WaitForEvent(OMX_EventPortSettingsChanged) omx_err(0x%08x)\n", CLASSNAME, __func__, omx_err); ++ } ++ if (m_deinterlace) ++ { ++ m_omx_image_fx.EnablePort(m_omx_image_fx.GetOutputPort(), true); + } ++ m_omx_decoder.EnablePort(m_omx_decoder.GetOutputPort(), true); ++ m_omx_sched.EnablePort(m_omx_sched.GetInputPort(), true); + } + } + +@@ -932,7 +952,6 @@ void COMXVideo::Reset(void) + + SendDecoderConfig(); + +- m_first_frame = true; + */ + } + +diff --git a/xbmc/cores/omxplayer/OMXVideo.h b/xbmc/cores/omxplayer/OMXVideo.h +index 0afa56d..037f155 100644 +--- a/xbmc/cores/omxplayer/OMXVideo.h ++++ b/xbmc/cores/omxplayer/OMXVideo.h +@@ -36,6 +36,8 @@ + + #define CLASSNAME "COMXVideo" + ++typedef void (*ResolutionUpdateCallBackFn)(void *ctx, uint32_t width, uint32_t height); ++ + class COMXVideo + { + public: +@@ -45,6 +47,7 @@ class COMXVideo + // Required overrides + bool SendDecoderConfig(); + bool Open(CDVDStreamInfo &hints, OMXClock *clock, bool deinterlace = false, bool hdmi_clock_sync = false); ++ void RegisterResolutionUpdateCallBack(void *ctx, ResolutionUpdateCallBackFn callback) { m_res_ctx = ctx; m_res_callback = callback; } + void Close(void); + unsigned int GetFreeSpace(); + unsigned int GetSize(); +@@ -89,9 +92,9 @@ class COMXVideo + + bool m_deinterlace; + bool m_hdmi_clock_sync; +- bool m_first_frame; + uint32_t m_history_valid_pts; +- ++ ResolutionUpdateCallBackFn m_res_callback; ++ void *m_res_ctx; + bool NaluFormatStartCodes(enum CodecID codec, uint8_t *in_extradata, int in_extrasize); + }; + +-- +1.7.10 + diff --git a/packages/mediacenter/xbmc/patches/xbmc-990.23-PR2363.patch b/packages/mediacenter/xbmc/patches/xbmc-990.23-PR2363.patch new file mode 100644 index 0000000000..11ccd5224c --- /dev/null +++ b/packages/mediacenter/xbmc/patches/xbmc-990.23-PR2363.patch @@ -0,0 +1,202 @@ +From 3d1005fdd34e72f81aff9034f8d30a0d33a780a8 Mon Sep 17 00:00:00 2001 +From: xbmc +Date: Mon, 4 Mar 2013 08:30:47 +0100 +Subject: [PATCH] Always copy overlays from file parser - Fixes stuck hw + resources on render + +--- + .../cores/dvdplayer/DVDCodecs/Overlay/DVDOverlay.h | 6 +++ + .../dvdplayer/DVDCodecs/Overlay/DVDOverlayImage.h | 6 +++ + .../dvdplayer/DVDCodecs/Overlay/DVDOverlaySSA.h | 11 ++++++ + .../dvdplayer/DVDCodecs/Overlay/DVDOverlayText.h | 41 ++++++++++++++++++++ + xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp | 1 + + .../dvdplayer/DVDSubtitles/DVDSubtitleParser.h | 8 +++- + 6 files changed, 72 insertions(+), 1 deletion(-) + +diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlay.h b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlay.h +index 8c87bc4..da8de1f 100644 +--- a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlay.h ++++ b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlay.h +@@ -103,6 +103,12 @@ class CDVDOverlay + + bool IsOverlayType(DVDOverlayType type) { return (m_type == type); } + ++ /** ++ * return a copy to DVDPlayerSubtitle in order to have hw resources cleared ++ * after rendering ++ */ ++ virtual CDVDOverlay* Clone() { return Acquire(); } ++ + double iPTSStartTime; + double iPTSStopTime; + bool bForced; // display, no matter what +diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayImage.h b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayImage.h +index bc90d68..e1cdf59 100644 +--- a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayImage.h ++++ b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayImage.h +@@ -20,6 +20,7 @@ + * + */ + ++#include "PlatformDefs.h" + #include "DVDOverlay.h" + #include + #include +@@ -117,6 +118,11 @@ class CDVDOverlayImage : public CDVDOverlay + if(palette) free(palette); + } + ++ virtual CDVDOverlayImage* Clone() ++ { ++ return new CDVDOverlayImage(*this); ++ } ++ + BYTE* data_at(int sub_x, int sub_y) const + { + int bpp; +diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlaySSA.h b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlaySSA.h +index 31deba1..f42c571 100644 +--- a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlaySSA.h ++++ b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlaySSA.h +@@ -37,10 +37,21 @@ class CDVDOverlaySSA : public CDVDOverlay + libass->Acquire(); + } + ++ CDVDOverlaySSA(CDVDOverlaySSA& src) ++ : CDVDOverlay(src) ++ , m_libass(src.m_libass) ++ { ++ m_libass->Acquire(); ++ } ++ + ~CDVDOverlaySSA() + { + if(m_libass) + SAFE_RELEASE(m_libass); + } + ++ virtual CDVDOverlaySSA* Clone() ++ { ++ return new CDVDOverlaySSA(*this); ++ } + }; +diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayText.h b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayText.h +index 849a6e3..54e3bfa 100644 +--- a/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayText.h ++++ b/xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayText.h +@@ -46,6 +46,12 @@ class CDVDOverlayText : public CDVDOverlay + m_type = type; + } + ++ CElement(CElement& src) ++ { ++ pNext = NULL; ++ m_type = src.m_type; ++ } ++ + virtual ~CElement() + { + } +@@ -71,6 +77,12 @@ class CDVDOverlayText : public CDVDOverlay + } + } + ++ CElementText(CElementText& src) ++ : CElement(src) ++ { ++ m_text = strdup(src.m_text); ++ } ++ + virtual ~CElementText() + { + if (m_text) free(m_text); +@@ -81,12 +93,20 @@ class CDVDOverlayText : public CDVDOverlay + + class CElementProperty : public CElement + { ++ public: + CElementProperty() : CElement(ELEMENT_TYPE_PROPERTY) + { + bItalic = false; + bBold = false; + } + ++ CElementProperty(CElementProperty& src) ++ : CElement(src) ++ { ++ bItalic = src.bItalic; ++ bBold = src.bBold; ++ } ++ + public: + bool bItalic; + bool bBold; +@@ -99,6 +119,22 @@ class CDVDOverlayText : public CDVDOverlay + m_pEnd = NULL; + } + ++ CDVDOverlayText(CDVDOverlayText& src) ++ : CDVDOverlay(src) ++ { ++ m_pHead = NULL; ++ m_pEnd = NULL; ++ for(CElement* e = src.m_pHead; e; e = e->pNext) ++ { ++ if(e->IsElementType(ELEMENT_TYPE_TEXT)) ++ AddElement(new CElementText(*static_cast(e))); ++ else if(e->IsElementType(ELEMENT_TYPE_PROPERTY)) ++ AddElement(new CElementProperty(*static_cast(e))); ++ else ++ AddElement(new CElement(*static_cast(e))); ++ } ++ } ++ + virtual ~CDVDOverlayText() + { + CElement* pTemp; +@@ -110,6 +146,11 @@ class CDVDOverlayText : public CDVDOverlay + } + } + ++ virtual CDVDOverlayText* Clone() ++ { ++ return new CDVDOverlayText(*this); ++ } ++ + void AddElement(CDVDOverlayText::CElement* pElement) + { + pElement->pNext = NULL; +diff --git a/xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp b/xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp +index 29c8d57..540d890 100644 +--- a/xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp ++++ b/xbmc/cores/dvdplayer/DVDPlayerSubtitle.cpp +@@ -222,6 +222,7 @@ void CDVDPlayerSubtitle::Process(double pts) + while(pOverlay) + { + m_pOverlayContainer->Add(pOverlay); ++ pOverlay->Release(); + pOverlay = m_pSubtitleFileParser->Parse(pts); + } + +diff --git a/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleParser.h b/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleParser.h +index 944bf06..3cd1e95 100644 +--- a/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleParser.h ++++ b/xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleParser.h +@@ -47,7 +47,13 @@ class CDVDSubtitleParserCollection + m_filename = strFile; + } + virtual ~CDVDSubtitleParserCollection() { } +- virtual CDVDOverlay* Parse(double iPts) { return m_collection.Get(iPts); } ++ virtual CDVDOverlay* Parse(double iPts) ++ { ++ CDVDOverlay* o = m_collection.Get(iPts); ++ if(o == NULL) ++ return o; ++ return o->Clone(); ++ } + virtual void Reset() { m_collection.Reset(); } + virtual void Dispose() { m_collection.Clear(); } + +-- +1.7.10 + diff --git a/packages/mediacenter/xbmc/patches/xbmc-990.24-PR2375.patch b/packages/mediacenter/xbmc/patches/xbmc-990.24-PR2375.patch new file mode 100644 index 0000000000..ddf3dd7e81 --- /dev/null +++ b/packages/mediacenter/xbmc/patches/xbmc-990.24-PR2375.patch @@ -0,0 +1,31 @@ +From 8717c162b8c5092d77672351ce3bfa2d4e7e32d8 Mon Sep 17 00:00:00 2001 +From: fritsch +Date: Tue, 5 Mar 2013 22:17:15 +0100 +Subject: [PATCH] AE: Fix resample of e.g. 192 khz to 48 khz audio by scaling + the usual suspects with the src sampleRate + +--- + xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp +index 258dcac..a64beb1 100644 +--- a/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp ++++ b/xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp +@@ -196,6 +196,13 @@ void CSoftAEStream::Initialize() + m_ssrcData.data_out = (float*)_aligned_malloc(m_format.m_frameSamples * (int)std::ceil(m_ssrcData.src_ratio) * sizeof(float), 16); + m_ssrcData.output_frames = m_format.m_frames * (long)std::ceil(m_ssrcData.src_ratio); + m_ssrcData.end_of_input = 0; ++ // we must buffer the same amount as before but taking the source sample rate into account ++ // there is no reason to decrease the buffer for upsampling ++ if (m_internalRatio < 1) ++ { ++ m_waterLevel *= (1.0 / m_internalRatio); ++ m_refillBuffer = m_waterLevel; ++ } + } + + m_limiter.SetSamplerate(AE.GetSampleRate()); +-- +1.7.10 + diff --git a/packages/mediacenter/xbmc/patches/xbmc-990.26-PR2378.patch b/packages/mediacenter/xbmc/patches/xbmc-990.26-PR2378.patch new file mode 100644 index 0000000000..838c7a6198 --- /dev/null +++ b/packages/mediacenter/xbmc/patches/xbmc-990.26-PR2378.patch @@ -0,0 +1,53 @@ +From 907f5086e76b0b6d0211c9bbd9da6c6fb54e891b Mon Sep 17 00:00:00 2001 +From: Juan Font +Date: Wed, 6 Mar 2013 09:50:15 +0100 +Subject: [PATCH 1/2] Avoid fps detection when probing the format if we will + trust codec fps during playback. + +--- + xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp +index 7d4e35b..4b62d75 100644 +--- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp ++++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp +@@ -425,6 +425,9 @@ bool CDVDDemuxFFmpeg::Open(CDVDInputStream* pInput) + + // set the interrupt callback, appeared in libavformat 53.15.0 + m_pFormatContext->interrupt_callback = int_cb; ++ ++ // Avoid detecting framerate if advancedsettings.xml says so ++ m_pFormatContext->fps_probe_size = (!g_advancedSettings.m_videoFpsDetect) ? 0 : -1; + + // analyse very short to speed up mjpeg playback start + if (iformat && (strcmp(iformat->name, "mjpeg") == 0) && m_ioContext->seekable == 0) +-- +1.7.10 + + +From e2966a346140fcd7a9742f17bfd7710bffbe1066 Mon Sep 17 00:00:00 2001 +From: Juan Font +Date: Wed, 6 Mar 2013 10:33:32 +0100 +Subject: [PATCH 2/2] Improved code legibility. + +--- + xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp +index 4b62d75..e84290d 100644 +--- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp ++++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp +@@ -427,7 +427,7 @@ bool CDVDDemuxFFmpeg::Open(CDVDInputStream* pInput) + m_pFormatContext->interrupt_callback = int_cb; + + // Avoid detecting framerate if advancedsettings.xml says so +- m_pFormatContext->fps_probe_size = (!g_advancedSettings.m_videoFpsDetect) ? 0 : -1; ++ m_pFormatContext->fps_probe_size = (g_advancedSettings.m_videoFpsDetect == 0) ? 0 : -1; + + // analyse very short to speed up mjpeg playback start + if (iformat && (strcmp(iformat->name, "mjpeg") == 0) && m_ioContext->seekable == 0) +-- +1.7.10 + diff --git a/packages/mediacenter/xbmc/patches/xbmc-990.27-PR2388.patch b/packages/mediacenter/xbmc/patches/xbmc-990.27-PR2388.patch new file mode 100644 index 0000000000..2b158d1f20 --- /dev/null +++ b/packages/mediacenter/xbmc/patches/xbmc-990.27-PR2388.patch @@ -0,0 +1,25 @@ +From 249cccc2da097917995571b123ac22e30ed3f686 Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Thu, 7 Mar 2013 12:50:57 +0000 +Subject: [PATCH] [rbp] Enable Vsync as a default + +--- + xbmc/settings/Settings.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xbmc/settings/Settings.h b/xbmc/settings/Settings.h +index fd44a0f..5ba1d36 100644 +--- a/xbmc/settings/Settings.h ++++ b/xbmc/settings/Settings.h +@@ -36,7 +36,7 @@ + #ifdef MID + #define DEFAULT_VSYNC VSYNC_DISABLED + #else // MID +-#if defined(TARGET_DARWIN) || defined(_WIN32) ++#if defined(TARGET_DARWIN) || defined(_WIN32) || defined(TARGET_RASPBERRY_PI) + #define DEFAULT_VSYNC VSYNC_ALWAYS + #else + #define DEFAULT_VSYNC VSYNC_DRIVER +-- +1.7.10 + diff --git a/packages/mediacenter/xbmc/patches/xbmc-995.09-revert-rpi-fixes.patch b/packages/mediacenter/xbmc/patches/xbmc-995.09-revert-rpi-fixes.patch deleted file mode 100644 index b7d03823ff..0000000000 --- a/packages/mediacenter/xbmc/patches/xbmc-995.09-revert-rpi-fixes.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff -Naur xbmc-12.0.2/xbmc/cores/omxplayer/OMXPlayerVideo.cpp xbmc-12.0.2.patch/xbmc/cores/omxplayer/OMXPlayerVideo.cpp ---- xbmc-12.0.2/xbmc/cores/omxplayer/OMXPlayerVideo.cpp 2013-02-19 19:04:39.000000000 +0100 -+++ xbmc-12.0.2.patch/xbmc/cores/omxplayer/OMXPlayerVideo.cpp 2013-02-22 18:18:47.298296862 +0100 -@@ -124,7 +124,6 @@ - m_started = false; - m_stalled = m_messageQueue.GetPacketCount(CDVDMsg::DEMUXER_PACKET) == 0; - m_autosync = 1; -- m_iSleepEndTime = DVD_NOPTS_VALUE; - - m_audio_count = m_av_clock->HasAudio(); - -@@ -453,23 +452,13 @@ - m_dropbase = 0.0f; - #endif - -- // DVDPlayer sleeps until m_iSleepEndTime here before calling FlipPage. -- // Video playback in asynchronous in OMXPlayer, so we don't want to do that here, as it prevents the video fifo from being kept full. -- // So, we keep track of when FlipPage would have been called on DVDPlayer and return early if it is not time. -- // m_iSleepEndTime == DVD_NOPTS_VALUE means we are not waiting to call FlipPage, otherwise it is the time we want to call FlipPage -- if (m_iSleepEndTime == DVD_NOPTS_VALUE) { -- m_iSleepEndTime = iCurrentClock + iSleepTime; -- } -- -- if (!CThread::m_bStop && m_av_clock->GetAbsoluteClock(false) < m_iSleepEndTime + DVD_MSEC_TO_TIME(500)) -- return; -- - double pts_media = m_av_clock->OMXMediaTime(false, false); - ProcessOverlays(iGroupId, pts_media); - -- g_renderManager.FlipPage(CThread::m_bStop, m_iSleepEndTime / DVD_TIME_BASE, -1, FS_NONE); -+ while(!CThread::m_bStop && m_av_clock->GetAbsoluteClock(false) < (iCurrentClock + iSleepTime + DVD_MSEC_TO_TIME(500)) ) -+ Sleep(1); - -- m_iSleepEndTime = DVD_NOPTS_VALUE; -+ g_renderManager.FlipPage(CThread::m_bStop, (iCurrentClock + iSleepTime) / DVD_TIME_BASE, -1, FS_NONE); - - //m_av_clock->WaitAbsoluteClock((iCurrentClock + iSleepTime)); - } -@@ -580,14 +569,12 @@ - m_av_clock->OMXReset(false); - m_av_clock->UnLock(); - m_started = false; -- m_iSleepEndTime = DVD_NOPTS_VALUE; - } - else if (pMsg->IsType(CDVDMsg::GENERAL_FLUSH)) // private message sent by (COMXPlayerVideo::Flush()) - { - CLog::Log(LOGDEBUG, "COMXPlayerVideo - CDVDMsg::GENERAL_FLUSH"); - m_stalled = true; - m_started = false; -- m_iSleepEndTime = DVD_NOPTS_VALUE; - m_av_clock->Lock(); - m_av_clock->OMXStop(false); - m_omxVideo.Reset(); -diff -Naur xbmc-12.0.2/xbmc/cores/omxplayer/OMXPlayerVideo.h xbmc-12.0.2.patch/xbmc/cores/omxplayer/OMXPlayerVideo.h ---- xbmc-12.0.2/xbmc/cores/omxplayer/OMXPlayerVideo.h 2013-02-19 19:04:39.000000000 +0100 -+++ xbmc-12.0.2.patch/xbmc/cores/omxplayer/OMXPlayerVideo.h 2013-02-22 18:18:44.166310881 +0100 -@@ -49,7 +49,6 @@ - bool m_open; - CDVDStreamInfo m_hints; - double m_iCurrentPts; -- double m_iSleepEndTime; - OMXClock *m_av_clock; - COMXVideo m_omxVideo; - float m_fFrameRate; diff --git a/packages/mediacenter/xbmc/patches/xbmc-995.10-xvba_rpi_fixes-059b89b.patch b/packages/mediacenter/xbmc/patches/xbmc-995.10-xvba_rpi_fixes-059b89b.patch deleted file mode 100644 index 7f5a4136ab..0000000000 --- a/packages/mediacenter/xbmc/patches/xbmc-995.10-xvba_rpi_fixes-059b89b.patch +++ /dev/null @@ -1,1079 +0,0 @@ -From bc4a2f53976c71c403b91ab1aa6138f966a90480 Mon Sep 17 00:00:00 2001 -From: unknown -Date: Fri, 18 Jan 2013 15:16:38 +0100 -Subject: [PATCH 1/7] multi-screen: fix compilation on windows - ---- - xbmc/settings/GUIWindowSettingsCategory.cpp | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -diff --git a/xbmc/settings/GUIWindowSettingsCategory.cpp b/xbmc/settings/GUIWindowSettingsCategory.cpp -index cacb32a..cbf0acb 100644 ---- a/xbmc/settings/GUIWindowSettingsCategory.cpp -+++ b/xbmc/settings/GUIWindowSettingsCategory.cpp -@@ -528,12 +528,14 @@ void CGUIWindowSettingsCategory::CreateSettings() - FillInRefreshRates(strSetting, g_guiSettings.GetResolution(), false); - continue; - } -+#if defined(HAS_GLX) - else if (strSetting.Equals("videoscreen.monitor")) - { - AddSetting(pSetting, group->GetWidth(), iControlID); - FillInMonitors(strSetting); - continue; - } -+#endif - else if (strSetting.Equals("lookandfeel.skintheme")) - { - AddSetting(pSetting, group->GetWidth(), iControlID); -@@ -1483,6 +1485,7 @@ void CGUIWindowSettingsCategory::OnSettingChanged(BaseSettingControlPtr pSetting - // Cascade - FillInResolutions("videoscreen.resolution", mode, RES_DESKTOP, true); - } -+#if defined(HAS_GLX) - else if (strSetting.Equals("videoscreen.monitor")) - { - CSettingString *pSettingString = (CSettingString *)pSettingControl->GetSetting(); -@@ -1497,6 +1500,7 @@ void CGUIWindowSettingsCategory::OnSettingChanged(BaseSettingControlPtr pSetting - FillInResolutions("videoscreen.resolution", mode, RES_DESKTOP, true); - } - } -+#endif - else if (strSetting.Equals("videoscreen.resolution")) - { - RESOLUTION nextRes = (RESOLUTION) g_guiSettings.GetInt("videoscreen.resolution"); -@@ -2451,6 +2455,7 @@ DisplayMode CGUIWindowSettingsCategory::FillInScreens(CStdString strSetting, RES - - void CGUIWindowSettingsCategory::FillInMonitors(CStdString strSetting) - { -+#if defined(HAS_GLX) - // we expect "videoscreen.monitor" but it might be hidden on some platforms, - // so check that we actually have a visable control. - BaseSettingControlPtr control = GetSetting(strSetting); -@@ -2476,6 +2481,7 @@ void CGUIWindowSettingsCategory::FillInMonitors(CStdString strSetting) - pControl->SetValue(currentMonitor); - g_guiSettings.SetString("videoscreen.monitor", g_settings.m_ResInfo[RES_DESKTOP].strOutput); - } -+#endif - } - - -@@ -2607,7 +2613,10 @@ void CGUIWindowSettingsCategory::OnRefreshRateChanged(RESOLUTION nextRes) - RESOLUTION lastRes = g_graphicsContext.GetVideoResolution(); - bool cancelled = false; - -- bool outputChanged = !g_Windowing.IsCurrentOutput(g_guiSettings.GetString("videoscreen.monitor")); -+ bool outputChanged = true; -+#if defined(HAS_GLX) -+ outputChanged = !g_Windowing.IsCurrentOutput(g_guiSettings.GetString("videoscreen.monitor")); -+#endif - - g_guiSettings.SetResolution(nextRes); - g_graphicsContext.SetVideoResolution(nextRes, outputChanged); --- -1.7.10 - - -From 3724a6e137d00f92b5eb4e419883ae239f0562f8 Mon Sep 17 00:00:00 2001 -From: xbmc -Date: Fri, 22 Feb 2013 09:57:17 +0100 -Subject: [PATCH 2/7] buffering back ports - ---- - xbmc/cores/IPlayer.h | 5 ++ - xbmc/cores/VideoRenderers/BaseRenderer.h | 7 ++- - xbmc/cores/VideoRenderers/LinuxRendererGL.h | 6 +- - xbmc/cores/VideoRenderers/OverlayRenderer.cpp | 17 +++--- - xbmc/cores/VideoRenderers/OverlayRenderer.h | 8 +-- - xbmc/cores/VideoRenderers/RenderManager.cpp | 64 +++++++++++++--------- - xbmc/cores/VideoRenderers/RenderManager.h | 73 ++++++++++++++++++++++--- - xbmc/cores/dvdplayer/DVDPlayer.cpp | 7 ++- - xbmc/cores/dvdplayer/DVDPlayer.h | 2 + - xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 18 +++++- - 10 files changed, 150 insertions(+), 57 deletions(-) - -diff --git a/xbmc/cores/IPlayer.h b/xbmc/cores/IPlayer.h -index f2aa227..cbf2faa 100644 ---- a/xbmc/cores/IPlayer.h -+++ b/xbmc/cores/IPlayer.h -@@ -229,6 +229,11 @@ class IPlayer - */ - virtual void GetSubtitleCapabilities(std::vector &subCaps) { subCaps.assign(1,IPC_SUBS_ALL); }; - -+ /*! -+ \brief called by RenderManager in order to schedule frames -+ */ -+ virtual double GetClock(double& absolute, bool interpolated = true) {return 0; }; -+ - protected: - IPlayerCallback& m_callback; - }; -diff --git a/xbmc/cores/VideoRenderers/BaseRenderer.h b/xbmc/cores/VideoRenderers/BaseRenderer.h -index b02d536..60b7197 100644 ---- a/xbmc/cores/VideoRenderers/BaseRenderer.h -+++ b/xbmc/cores/VideoRenderers/BaseRenderer.h -@@ -26,10 +26,11 @@ - - #define MAX_PLANES 3 - #define MAX_FIELDS 3 -+#define NUM_BUFFERS 10 - - typedef struct YV12Image - { -- BYTE * plane[MAX_PLANES]; -+ uint8_t* plane[MAX_PLANES]; - int planesize[MAX_PLANES]; - unsigned stride[MAX_PLANES]; - unsigned width; -@@ -84,8 +85,8 @@ class CBaseRenderer - virtual void Flush() {}; - - virtual unsigned int GetProcessorSize() { return 0; } -- virtual unsigned int GetMaxProcessorSize() { return 0; } -- virtual void SetProcessorSize(int numBuffers) { } -+ virtual unsigned int GetMaxBufferSize() { return 0; } -+ virtual void SetBufferSize(int numBuffers) { } - virtual void ReleaseBuffer(int idx) { } - - virtual bool Supports(ERENDERFEATURE feature) { return false; } -diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.h b/xbmc/cores/VideoRenderers/LinuxRendererGL.h -index e76624b..a189892 100644 ---- a/xbmc/cores/VideoRenderers/LinuxRendererGL.h -+++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.h -@@ -46,8 +46,6 @@ - namespace XVBA { class CXvbaRenderPicture; } - - --#define NUM_BUFFERS 10 -- - #undef ALIGN - #define ALIGN(value, alignment) (((value)+((alignment)-1))&~((alignment)-1)) - #define CLAMP(a, min, max) ((a) > (max) ? (max) : ( (a) < (min) ? (min) : a )) -@@ -141,8 +139,8 @@ class CLinuxRendererGL : public CBaseRenderer - virtual void Reset(); /* resets renderer after seek for example */ - virtual void Flush(); - virtual void ReleaseBuffer(int idx); -- virtual void SetProcessorSize(int numBuffers) { m_NumYV12Buffers = numBuffers; } -- virtual unsigned int GetMaxProcessorSize() { return NUM_BUFFERS; } -+ virtual void SetBufferSize(int numBuffers) { m_NumYV12Buffers = numBuffers; } -+ virtual unsigned int GetMaxBufferSize() { return NUM_BUFFERS; } - virtual unsigned int GetProcessorSize() { return m_NumYV12Buffers; } - - #ifdef HAVE_LIBVDPAU -diff --git a/xbmc/cores/VideoRenderers/OverlayRenderer.cpp b/xbmc/cores/VideoRenderers/OverlayRenderer.cpp -index 94aaaf5..5236390 100644 ---- a/xbmc/cores/VideoRenderers/OverlayRenderer.cpp -+++ b/xbmc/cores/VideoRenderers/OverlayRenderer.cpp -@@ -93,24 +93,28 @@ long COverlayMainThread::Release() - - CRenderer::~CRenderer() - { -- for(int i = 0; i < 2; i++) -+ for(int i = 0; i < NUM_BUFFERS; i++) - Release(m_buffers[i]); - } - --void CRenderer::AddOverlay(CDVDOverlay* o, double pts) -+void CRenderer::AddOverlay(CDVDOverlay* o, double pts, int index) - { - CSingleLock lock(m_section); - -+ m_decode = index; -+ - SElement e; - e.pts = pts; - e.overlay_dvd = o->Acquire(); - m_buffers[m_decode].push_back(e); - } - --void CRenderer::AddOverlay(COverlay* o, double pts) -+void CRenderer::AddOverlay(COverlay* o, double pts, int index) - { - CSingleLock lock(m_section); - -+ m_decode = index; -+ - SElement e; - e.pts = pts; - e.overlay = o->Acquire(); -@@ -163,13 +167,6 @@ void CRenderer::Flip() - m_render = (m_render + 1) % m_iNumBuffers; - } - --void CRenderer::SetBuffer(int idx) --{ -- CSingleLock lock(m_section); -- Release(m_buffers[idx]); -- m_decode = idx; --} -- - void CRenderer::ReleaseBuffer(int idx) - { - CSingleLock lock(m_section); -diff --git a/xbmc/cores/VideoRenderers/OverlayRenderer.h b/xbmc/cores/VideoRenderers/OverlayRenderer.h -index c6740a5..66c592a 100644 ---- a/xbmc/cores/VideoRenderers/OverlayRenderer.h -+++ b/xbmc/cores/VideoRenderers/OverlayRenderer.h -@@ -23,6 +23,7 @@ - #pragma once - - #include "threads/CriticalSection.h" -+#include "BaseRenderer.h" - - #include - -@@ -92,14 +93,13 @@ - CRenderer(); - ~CRenderer(); - -- void AddOverlay(CDVDOverlay* o, double pts); -- void AddOverlay(COverlay* o, double pts); -+ void AddOverlay(CDVDOverlay* o, double pts, int index); -+ void AddOverlay(COverlay* o, double pts, int index); - void AddCleanup(COverlay* o); - void Flip(); - void Render(); - void Flush(); - void SetNumBuffers(int numBuffers) { m_iNumBuffers = numBuffers; } -- void SetBuffer(int idx); - void ReleaseBuffer(int idx); - - protected: -@@ -127,7 +127,7 @@ - void Release(SElementV& list); - - CCriticalSection m_section; -- SElementV m_buffers[10]; -+ SElementV m_buffers[NUM_BUFFERS]; - int m_iNumBuffers; - int m_decode; - int m_render; -diff --git a/xbmc/cores/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoRenderers/RenderManager.cpp -index 9290f80..ca454eb 100644 ---- a/xbmc/cores/VideoRenderers/RenderManager.cpp -+++ b/xbmc/cores/VideoRenderers/RenderManager.cpp -@@ -228,7 +228,7 @@ CStdString CXBMCRenderManager::GetVSyncState() - return state; - } - --bool CXBMCRenderManager::Configure(unsigned int width, unsigned int height, unsigned int d_width, unsigned int d_height, float fps, unsigned flags, ERenderFormat format, unsigned extended_format, unsigned int orientation) -+bool CXBMCRenderManager::Configure(unsigned int width, unsigned int height, unsigned int d_width, unsigned int d_height, float fps, unsigned flags, ERenderFormat format, unsigned extended_format, unsigned int orientation, bool buffering) - { - /* make sure any queued frame was fully presented */ - double timeout = m_presenttime + 0.1; -@@ -248,12 +248,8 @@ bool CXBMCRenderManager::Configure(unsigned int width, unsigned int height, unsi - return false; - } - -- // check if decoder supports buffering -- m_bCodecSupportsBuffering = false; -- if (format == RENDER_FMT_VDPAU -- || format == RENDER_FMT_VDPAU_420 -- || format == RENDER_FMT_XVBA) -- m_bCodecSupportsBuffering = true; -+ // set buffering -+ m_bCodecSupportsBuffering = buffering; - - bool result = m_pRenderer->Configure(width, height, d_width, d_height, fps, flags, format, extended_format, orientation); - if(result) -@@ -325,7 +321,7 @@ void CXBMCRenderManager::RenderUpdate(bool clear, DWORD flags, DWORD alpha) - m_presentevent.Set(); - } - --unsigned int CXBMCRenderManager::PreInit(CDVDClock *pClock) -+unsigned int CXBMCRenderManager::PreInit() - { - CRetakeLock lock(m_sharedSection); - -@@ -333,7 +329,6 @@ unsigned int CXBMCRenderManager::PreInit(CDVDClock *pClock) - m_presenterr = 0.0; - m_errorindex = 0; - memset(m_errorbuff, 0, sizeof(m_errorbuff)); -- m_pClock = pClock; - - m_bIsStarted = false; - m_bPauseDrawing = false; -@@ -617,10 +612,12 @@ void CXBMCRenderManager::FlipPage(volatile bool& bStop, double timestamp /* = 0L - } - } - -- FlipFreeBuffer(); -- m_renderBuffers[m_iOutputRenderBuffer].pts = timestamp; -- m_renderBuffers[m_iOutputRenderBuffer].presentfield = presentfield; -- m_renderBuffers[m_iOutputRenderBuffer].presentmethod = presentmethod; -+ if (FlipFreeBuffer() >= 0) -+ { -+ m_renderBuffers[m_iOutputRenderBuffer].pts = timestamp; -+ m_renderBuffers[m_iOutputRenderBuffer].presentfield = presentfield; -+ m_renderBuffers[m_iOutputRenderBuffer].presentmethod = presentmethod; -+ } - m_speed = speed; - } - -@@ -880,9 +877,17 @@ int CXBMCRenderManager::AddVideoPicture(DVDVideoPicture& pic) - #endif - m_pRenderer->ReleaseImage(index, false); - -+ m_bRenderBufferUsed = true; - return index; - } - -+void CXBMCRenderManager::AddOverlay(CDVDOverlay* o, double pts) -+{ -+ CSharedLock lock(m_sharedSection); -+ m_overlays.AddOverlay(o, pts, (m_iOutputRenderBuffer + 1) % m_iNumRenderBuffers); -+ m_bRenderBufferUsed = true; -+} -+ - bool CXBMCRenderManager::Supports(ERENDERFEATURE feature) - { - CSharedLock lock(m_sharedSection); -@@ -939,31 +944,28 @@ EINTERLACEMETHOD CXBMCRenderManager::AutoInterlaceMethodInternal(EINTERLACEMETHO - return mInt; - } - --int CXBMCRenderManager::WaitForBuffer(volatile bool& bStop) -+int CXBMCRenderManager::WaitForBuffer(volatile bool& bStop, int timeout) - { - CSharedLock lock(m_sharedSection); - if (!m_pRenderer) - return -1; - - //wait up to a second as this is our slowest allowed output rate -- double timeout = GetPresentTime() + 0.1; -+ double maxwait = GetPresentTime() + (float)timeout/1000; - while(!HasFreeBuffer() && !bStop) - { - lock.Leave(); -- m_flipEvent.WaitMSec(50); -- if(GetPresentTime() > timeout && !bStop) -+ m_flipEvent.WaitMSec(std::min(50, timeout)); -+ if(GetPresentTime() > maxwait && !bStop) - { -- CLog::Log(LOGWARNING, "CRenderManager::WaitForBuffer - timeout waiting for buffer"); -+ if (timeout != 0) -+ CLog::Log(LOGWARNING, "CRenderManager::WaitForBuffer - timeout waiting for buffer"); - return -1; - } - lock.Enter(); - } - lock.Leave(); - -- { CRetakeLock lock(m_sharedSection); -- m_overlays.SetBuffer((m_iOutputRenderBuffer + 1) % m_iNumRenderBuffers); -- } -- - if (bStop) - return -1; - -@@ -987,10 +989,17 @@ int CXBMCRenderManager::FlipFreeBuffer() - // See "Render Buffer State Description" in header for information. - if (HasFreeBuffer()) - { -+ if (!m_bRenderBufferUsed) -+ { -+ return -1; -+ } -+ m_bRenderBufferUsed = false; - m_bAllRenderBuffersDisplayed = false; - m_iOutputRenderBuffer = (m_iOutputRenderBuffer + 1) % m_iNumRenderBuffers; - return m_iOutputRenderBuffer; - } -+ else -+ return -1; - } - - bool CXBMCRenderManager::HasFreeBuffer() -@@ -1013,7 +1022,7 @@ bool CXBMCRenderManager::HasFreeBuffer() - - void CXBMCRenderManager::ResetRenderBuffer() - { -- m_iNumRenderBuffers = m_pRenderer->GetMaxProcessorSize(); -+ m_iNumRenderBuffers = m_pRenderer->GetMaxBufferSize(); - m_iNumRenderBuffers = std::min(5, m_iNumRenderBuffers); - m_iNumRenderBuffers = std::max(2, m_iNumRenderBuffers); - -@@ -1022,7 +1031,7 @@ void CXBMCRenderManager::ResetRenderBuffer() - - CLog::Log(LOGNOTICE,"CXBMCRenderManager::ResetRenderBuffer - using %d render buffers", m_iNumRenderBuffers); - m_overlays.SetNumBuffers(m_iNumRenderBuffers); -- m_pRenderer->SetProcessorSize(m_iNumRenderBuffers); -+ m_pRenderer->SetBufferSize(m_iNumRenderBuffers); - - m_iCurrentRenderBuffer = 0; - m_iOutputRenderBuffer = 0; -@@ -1031,6 +1040,7 @@ void CXBMCRenderManager::ResetRenderBuffer() - m_sleeptime = 1.0; - m_presentPts = DVD_NOPTS_VALUE; - m_speed = 0; -+ m_bRenderBufferUsed = false; - } - - void CXBMCRenderManager::PrepareNextRender() -@@ -1045,7 +1055,11 @@ void CXBMCRenderManager::PrepareNextRender() - } - - double iClockSleep, iPlayingClock, iCurrentClock; -- iPlayingClock = m_pClock->GetClock(iCurrentClock, false); -+ if (g_application.m_pPlayer) -+ iPlayingClock = g_application.m_pPlayer->GetClock(iCurrentClock, false); -+ else -+ iPlayingClock = iCurrentClock = 0; -+ - iClockSleep = m_renderBuffers[idx].pts - iPlayingClock; - - if (m_speed) -diff --git a/xbmc/cores/VideoRenderers/RenderManager.h b/xbmc/cores/VideoRenderers/RenderManager.h -index 6746957..1a460c7 100644 ---- a/xbmc/cores/VideoRenderers/RenderManager.h -+++ b/xbmc/cores/VideoRenderers/RenderManager.h -@@ -66,21 +66,44 @@ class CXBMCRenderManager - void SetViewMode(int iViewMode); - - // Functions called from mplayer -- bool Configure(unsigned int width, unsigned int height, unsigned int d_width, unsigned int d_height, float fps, unsigned flags, ERenderFormat format, unsigned extended_format, unsigned int orientation); -+ /** -+ * Called by video player to configure renderer -+ * @param width width of decoded frame -+ * @param height height of decoded frame -+ * @param d_width displayed width of frame (aspect ratio) -+ * @param d_height displayed height of frame -+ * @param fps frames per second of video -+ * @param flags see RenderFlags.h -+ * @param format see RenderFormats.h -+ * @param extended_format used by DXVA -+ * @param orientation -+ * @param buffering enable buffering in renderer, defaults to false -+ */ -+ bool Configure(unsigned int width, unsigned int height, unsigned int d_width, unsigned int d_height, float fps, unsigned flags, ERenderFormat format, unsigned extended_format, unsigned int orientation, bool buffering = false); - bool IsConfigured(); - - int AddVideoPicture(DVDVideoPicture& picture); - -+ /** -+ * Called by video player to flip render buffers -+ * If buffering is enabled this method does not block. In case of disabled buffering -+ * this method blocks waiting for the render thread to pass by. -+ * When buffering is used there might be no free buffer available after the call to -+ * this method. Player has to call WaitForBuffer. A free buffer will become -+ * available after the main thread has flipped front / back buffers. -+ * -+ * @param bStop reference to stop flag of calling thread -+ * @param timestamp pts of frame delivered with AddVideoPicture -+ * @param source depreciated -+ * @param sync signals frame, top, or bottom field -+ * @param speed current speed of player, needed to calculate presenttime when buffering is avtive -+ */ - void FlipPage(volatile bool& bStop, double timestamp = 0.0, int source = -1, EFIELDSYNC sync = FS_NONE, int speed = 0); -- unsigned int PreInit(CDVDClock *pClock); -+ unsigned int PreInit(); - void UnInit(); - bool Flush(); - -- void AddOverlay(CDVDOverlay* o, double pts) -- { -- CSharedLock lock(m_sharedSection); -- m_overlays.AddOverlay(o, pts); -- } -+ void AddOverlay(CDVDOverlay* o, double pts); - - void AddCleanup(OVERLAY::COverlay* o) - { -@@ -132,11 +155,43 @@ class CXBMCRenderManager - CSharedSection& GetSection() { return m_sharedSection; }; - - void RegisterRenderUpdateCallBack(const void *ctx, RenderUpdateCallBackFn fn); -- int WaitForBuffer(volatile bool& bStop); -+ -+ /** -+ * If player uses buffering it has to wait for a buffer before it calls -+ * AddVideoPicture and AddOverlay. It waits for max 50 ms before it returns -1 -+ * in case no buffer is available. Player may call this in a loop and decides -+ * by itself when it wants to drop a frame. -+ * If no buffering is requested in Configure, player does not need to call this, -+ * because FlipPage will block. -+ */ -+ int WaitForBuffer(volatile bool& bStop, int timeout = 100); -+ -+ /** -+ * Called by application right after flip. The buffer which has been rendered to -+ * display becomes available for player to deliver a new frame. -+ */ - void NotifyDisplayFlip(); -+ -+ /** -+ * Can be called by player for lateness detection. This is done best by -+ * looking at the end of the queue. -+ */ - bool GetStats(double &sleeptime, double &pts, int &bufferLevel); -+ -+ /** -+ * Called by application (main thread) to query if there is any frame to render -+ */ - bool HasFrame(); -+ -+ /** -+ * Video player can dynamically enable/disable buffering. In situations like -+ * rewind buffering is not ideal. -+ */ - void EnableBuffering(bool enable); -+ -+ /** -+ * Video player call this on flush in oder to discard any queued frames -+ */ - void DiscardBuffer(); - - protected: -@@ -202,6 +257,7 @@ class CXBMCRenderManager - bool m_bUseBuffering; - bool m_bCodecSupportsBuffering; - int m_speed; -+ bool m_bRenderBufferUsed; - CEvent m_flipEvent; - - struct -@@ -225,7 +281,6 @@ class CXBMCRenderManager - int m_presentsource; - CEvent m_presentevent; - CEvent m_flushEvent; -- CDVDClock *m_pClock; - - - OVERLAY::CRenderer m_overlays; -diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp -index 07df0d8..18fae70 100644 ---- a/xbmc/cores/dvdplayer/DVDPlayer.cpp -+++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp -@@ -463,7 +463,7 @@ bool CDVDPlayer::OpenFile(const CFileItem& file, const CPlayerOptions &options) - m_ready.Reset(); - - #if defined(HAS_VIDEO_PLAYBACK) -- g_renderManager.PreInit(&m_clock); -+ g_renderManager.PreInit(); - #endif - - Create(); -@@ -4097,3 +4097,8 @@ bool CDVDPlayer::CachePVRStream(void) const - !g_PVRManager.IsPlayingRecording() && - g_advancedSettings.m_bPVRCacheInDvdPlayer; - } -+ -+double CDVDPlayer::GetClock(double& absolute, bool interpolated) -+{ -+ return m_clock.GetClock(absolute, interpolated); -+} -diff --git a/xbmc/cores/dvdplayer/DVDPlayer.h b/xbmc/cores/dvdplayer/DVDPlayer.h -index 70ecea9..2b67d4c 100644 ---- a/xbmc/cores/dvdplayer/DVDPlayer.h -+++ b/xbmc/cores/dvdplayer/DVDPlayer.h -@@ -252,6 +252,8 @@ class CDVDPlayer : public IPlayer, public CThread, public IDVDPlayer - virtual bool SwitchChannel(const PVR::CPVRChannel &channel); - virtual bool CachePVRStream(void) const; - -+ virtual double GetClock(double& absolute, bool interpolated = true); -+ - enum ECacheState - { CACHESTATE_DONE = 0 - , CACHESTATE_FULL // player is filling up the demux queue -diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -index d26ab9c..19ba35d 100644 ---- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -+++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp -@@ -1117,53 +1117,69 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts) - } - - CStdString formatstr; -+ bool buffering; - - switch(pPicture->format) - { - case RENDER_FMT_YUV420P: - formatstr = "YV12"; -+ buffering = true; - break; - case RENDER_FMT_YUV420P16: - formatstr = "YV12P16"; -+ buffering = true; - break; - case RENDER_FMT_YUV420P10: - formatstr = "YV12P10"; -+ buffering = true; - break; - case RENDER_FMT_NV12: - formatstr = "NV12"; -+ buffering = true; - break; - case RENDER_FMT_UYVY422: - formatstr = "UYVY"; -+ buffering = true; - break; - case RENDER_FMT_YUYV422: - formatstr = "YUY2"; -+ buffering = true; - break; - case RENDER_FMT_VDPAU: - formatstr = "VDPAU"; -+ buffering = true; - break; - case RENDER_FMT_VDPAU_420: - formatstr = "VDPAU_420"; -+ buffering = true; - break; - case RENDER_FMT_DXVA: - formatstr = "DXVA"; -+ buffering = true; - break; - case RENDER_FMT_VAAPI: - formatstr = "VAAPI"; -+ buffering = false; - break; - case RENDER_FMT_OMXEGL: - formatstr = "OMXEGL"; -+ buffering = false; - break; - case RENDER_FMT_CVBREF: - formatstr = "BGRA"; -+ buffering = false; - break; - case RENDER_FMT_BYPASS: - formatstr = "BYPASS"; -+ buffering = false; - break; - case RENDER_FMT_NONE: - formatstr = "NONE"; -+ buffering = false; - break; - case RENDER_FMT_XVBA: - formatstr = "XVBA"; -+ buffering = true; - break; - } - -@@ -1174,7 +1190,7 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts) - } - - CLog::Log(LOGDEBUG,"%s - change configuration. %dx%d. framerate: %4.2f. format: %s",__FUNCTION__,pPicture->iWidth, pPicture->iHeight, config_framerate, formatstr.c_str()); -- if(!g_renderManager.Configure(pPicture->iWidth, pPicture->iHeight, pPicture->iDisplayWidth, pPicture->iDisplayHeight, config_framerate, flags, pPicture->format, pPicture->extended_format, m_hints.orientation)) -+ if(!g_renderManager.Configure(pPicture->iWidth, pPicture->iHeight, pPicture->iDisplayWidth, pPicture->iDisplayHeight, config_framerate, flags, pPicture->format, pPicture->extended_format, m_hints.orientation, buffering)) - { - CLog::Log(LOGERROR, "%s - failed to configure renderer", __FUNCTION__); - return EOS_ABORT; --- -1.7.10 - - -From 1cfeec2846a58b7e2ad44471bb085cef9d2c687d Mon Sep 17 00:00:00 2001 -From: xbmc -Date: Sat, 16 Feb 2013 08:32:18 +0100 -Subject: [PATCH 3/7] add buffering for GLES - ---- - xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp | 10 ---------- - xbmc/cores/VideoRenderers/LinuxRendererGLES.h | 6 ++++-- - 2 files changed, 4 insertions(+), 12 deletions(-) - -diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp -index 2a59e2b..1bf2f3b 100644 ---- a/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp -+++ b/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp -@@ -135,13 +135,6 @@ - delete m_dllSwScale; - } - --void CLinuxRendererGLES::ManageTextures() --{ -- m_NumYV12Buffers = 2; -- //m_iYV12RenderBuffer = 0; -- return; --} -- - bool CLinuxRendererGLES::ValidateRenderTarget() - { - if (!m_bValidated) -@@ -395,7 +388,6 @@ void CLinuxRendererGLES::Update(bool bPauseDrawing) - { - if (!m_bConfigured) return; - ManageDisplay(); -- ManageTextures(); - } - - void CLinuxRendererGLES::RenderUpdate(bool clear, DWORD flags, DWORD alpha) -@@ -409,7 +401,6 @@ void CLinuxRendererGLES::RenderUpdate(bool clear, DWORD flags, DWORD alpha) - if (m_renderMethod & RENDER_BYPASS) - { - ManageDisplay(); -- ManageTextures(); - // if running bypass, then the player might need the src/dst rects - // for sizing video playback on a layer other than the gles layer. - if (m_RenderUpdateCallBackFn) -@@ -449,7 +440,6 @@ void CLinuxRendererGLES::RenderUpdate(bool clear, DWORD flags, DWORD alpha) - return; - - ManageDisplay(); -- ManageTextures(); - - g_graphicsContext.BeginPaint(); - -diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGLES.h b/xbmc/cores/VideoRenderers/LinuxRendererGLES.h -index c6b69db..5bae10d 100644 ---- a/xbmc/cores/VideoRenderers/LinuxRendererGLES.h -+++ b/xbmc/cores/VideoRenderers/LinuxRendererGLES.h -@@ -41,7 +41,7 @@ - class COpenMaxVideo; - typedef std::vector Features; - --#define NUM_BUFFERS 3 -+#define NUM_BUFFERS 10 - - - #undef ALIGN -@@ -138,6 +138,9 @@ class CLinuxRendererGLES : public CBaseRenderer - virtual void UnInit(); - virtual void Reset(); /* resets renderer after seek for example */ - virtual void ReorderDrawPoints(); -+ virtual void SetBufferSize(int numBuffers) { m_NumYV12Buffers = numBuffers; } -+ virtual unsigned int GetMaxBufferSize() { return NUM_BUFFERS; } -+ virtual unsigned int GetProcessorSize() { return m_NumYV12Buffers; } - - virtual void RenderUpdate(bool clear, DWORD flags = 0, DWORD alpha = 255); - -@@ -162,7 +165,6 @@ class CLinuxRendererGLES : public CBaseRenderer - protected: - virtual void Render(DWORD flags, int index); - -- virtual void ManageTextures(); - int NextYV12Texture(); - virtual bool ValidateRenderTarget(); - virtual void LoadShaders(int field=FIELD_FULL); --- -1.7.10 - - -From 20fe728e43350442747c05adde545103516f377b Mon Sep 17 00:00:00 2001 -From: xbmc -Date: Sun, 10 Feb 2013 18:40:30 +0100 -Subject: [PATCH 4/7] OMXPlayer: adapt to buffering - ---- - xbmc/cores/omxplayer/OMXPlayer.cpp | 6 ++++++ - xbmc/cores/omxplayer/OMXPlayer.h | 2 ++ - xbmc/cores/omxplayer/OMXPlayerVideo.cpp | 21 +++++++++++++-------- - 3 files changed, 21 insertions(+), 8 deletions(-) - -diff --git a/xbmc/cores/omxplayer/OMXPlayer.cpp b/xbmc/cores/omxplayer/OMXPlayer.cpp -index 60aa9ab..b4eda41 100644 ---- a/xbmc/cores/omxplayer/OMXPlayer.cpp -+++ b/xbmc/cores/omxplayer/OMXPlayer.cpp -@@ -4210,4 +4210,10 @@ void COMXPlayer::GetSubtitleCapabilities(std::vector &subCaps) - subCaps.push_back(IPC_SUBS_ALL); - } - -+double COMXPlayer::GetClock(double& absolute, bool interpolated) -+{ -+ m_av_clock.GetClock(absolute, interpolated); -+ return m_av_clock.OMXMediaTime(false, false); -+} -+ - #endif -diff --git a/xbmc/cores/omxplayer/OMXPlayer.h b/xbmc/cores/omxplayer/OMXPlayer.h -index d606e84..ad9d1e6 100644 ---- a/xbmc/cores/omxplayer/OMXPlayer.h -+++ b/xbmc/cores/omxplayer/OMXPlayer.h -@@ -332,6 +332,8 @@ class COMXPlayer : public IPlayer, public CThread, public IDVDPlayer - virtual void GetScalingMethods(std::vector &scalingMethods); - virtual void GetAudioCapabilities(std::vector &audioCaps); - virtual void GetSubtitleCapabilities(std::vector &subCaps); -+ -+ virtual double GetClock(double& absolute, bool interpolated = true); - protected: - friend class COMXSelectionStreams; - -diff --git a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp -index 90f94aa..ecf4c9a 100644 ---- a/xbmc/cores/omxplayer/OMXPlayerVideo.cpp -+++ b/xbmc/cores/omxplayer/OMXPlayerVideo.cpp -@@ -158,6 +158,8 @@ bool OMXPlayerVideo::OpenStream(CDVDStreamInfo &hints) - m_open = true; - m_send_eos = false; - -+ g_renderManager.EnableBuffering(false); -+ - return true; - } - -@@ -358,7 +360,7 @@ void OMXPlayerVideo::Output(int iGroupId, double pts, bool bDropPacket) - - if(!g_renderManager.Configure(m_hints.width, m_hints.height, - iDisplayWidth, iDisplayHeight, m_fps, flags, format, 0, -- m_hints.orientation)) -+ m_hints.orientation, true)) - { - CLog::Log(LOGERROR, "%s - failed to configure renderer", __FUNCTION__); - return; -@@ -452,15 +454,15 @@ void OMXPlayerVideo::Output(int iGroupId, double pts, bool bDropPacket) - m_dropbase = 0.0f; - #endif - -- double pts_media = m_av_clock->OMXMediaTime(false, false); -- ProcessOverlays(iGroupId, pts_media); -- -- while(!CThread::m_bStop && m_av_clock->GetAbsoluteClock(false) < (iCurrentClock + iSleepTime + DVD_MSEC_TO_TIME(500)) ) -- Sleep(1); -+ int buffer = g_renderManager.WaitForBuffer(m_bStop, 0); -+ if (buffer < 0) -+ return; - -- g_renderManager.FlipPage(CThread::m_bStop, (iCurrentClock + iSleepTime) / DVD_TIME_BASE, -1, FS_NONE); -+ double pts_overlay = m_av_clock->OMXMediaTime(false, false) -+ + 2* (double)DVD_TIME_BASE / g_graphicsContext.GetFPS(); -+ ProcessOverlays(iGroupId, pts_overlay); - -- //m_av_clock->WaitAbsoluteClock((iCurrentClock + iSleepTime)); -+ g_renderManager.FlipPage(CThread::m_bStop, pts_overlay, -1, FS_NONE, m_speed); - } - - void OMXPlayerVideo::Process() -@@ -569,6 +571,7 @@ void OMXPlayerVideo::Process() - m_av_clock->OMXReset(false); - m_av_clock->UnLock(); - m_started = false; -+ g_renderManager.EnableBuffering(false); - } - else if (pMsg->IsType(CDVDMsg::GENERAL_FLUSH)) // private message sent by (COMXPlayerVideo::Flush()) - { -@@ -580,6 +583,7 @@ void OMXPlayerVideo::Process() - m_omxVideo.Reset(); - m_av_clock->OMXReset(false); - m_av_clock->UnLock(); -+ g_renderManager.EnableBuffering(false); - } - else if (pMsg->IsType(CDVDMsg::PLAYER_SETSPEED)) - { -@@ -664,6 +668,7 @@ void OMXPlayerVideo::Process() - m_codecname = m_omxVideo.GetDecoderName(); - m_started = true; - m_messageParent.Put(new CDVDMsgInt(CDVDMsg::PLAYER_STARTED, DVDPLAYER_VIDEO)); -+ g_renderManager.EnableBuffering(true); - } - - // guess next frame pts. iDuration is always valid --- -1.7.10 - - -From 572031ecf662ee23af414e6961004b3cf1336644 Mon Sep 17 00:00:00 2001 -From: xbmc -Date: Sun, 24 Feb 2013 09:55:00 +0100 -Subject: [PATCH 6/7] flip free buffer after overlay has been released - ---- - xbmc/cores/VideoRenderers/OverlayRenderer.cpp | 19 ++++++++++++------- - xbmc/cores/VideoRenderers/OverlayRenderer.h | 6 +++--- - xbmc/cores/VideoRenderers/RenderManager.cpp | 6 ++++-- - xbmc/cores/VideoRenderers/RenderManager.h | 1 + - 4 files changed, 20 insertions(+), 12 deletions(-) - -diff --git a/xbmc/cores/VideoRenderers/OverlayRenderer.cpp b/xbmc/cores/VideoRenderers/OverlayRenderer.cpp -index 5236390..3039751 100644 ---- a/xbmc/cores/VideoRenderers/OverlayRenderer.cpp -+++ b/xbmc/cores/VideoRenderers/OverlayRenderer.cpp -@@ -127,27 +127,32 @@ void CRenderer::AddCleanup(COverlay* o) - m_cleanup.push_back(o->Acquire()); - } - --void CRenderer::Release(SElementV& list) -+long CRenderer::Release(SElementV& list) - { - SElementV l = list; - list.clear(); - -+ long count = 0; - for(SElementV::iterator it = l.begin(); it != l.end(); it++) - { - if(it->overlay) -- it->overlay->Release(); -+ count += it->overlay->Release(); - if(it->overlay_dvd) -- it->overlay_dvd->Release(); -+ count += it->overlay_dvd->Release(); - } -+ return count; - } - --void CRenderer::Release(COverlayV& list) -+long CRenderer::Release(COverlayV& list) - { - COverlayV l = list; - list.clear(); - -+ long count = 0; - for(COverlayV::iterator it = l.begin(); it != l.end(); it++) -- (*it)->Release(); -+ count += (*it)->Release(); -+ -+ return count; - } - - void CRenderer::Flush() -@@ -167,10 +172,10 @@ void CRenderer::Flip() - m_render = (m_render + 1) % m_iNumBuffers; - } - --void CRenderer::ReleaseBuffer(int idx) -+long CRenderer::ReleaseBuffer(int idx) - { - CSingleLock lock(m_section); -- Release(m_buffers[idx]); -+ return Release(m_buffers[idx]); - } - - void CRenderer::Render() -diff --git a/xbmc/cores/VideoRenderers/OverlayRenderer.h b/xbmc/cores/VideoRenderers/OverlayRenderer.h -index 66c592a..2fcac4a 100644 ---- a/xbmc/cores/VideoRenderers/OverlayRenderer.h -+++ b/xbmc/cores/VideoRenderers/OverlayRenderer.h -@@ -100,7 +100,7 @@ - void Render(); - void Flush(); - void SetNumBuffers(int numBuffers) { m_iNumBuffers = numBuffers; } -- void ReleaseBuffer(int idx); -+ long ReleaseBuffer(int idx); - - protected: - -@@ -123,8 +123,8 @@ - COverlay* Convert(CDVDOverlay* o, double pts); - COverlay* Convert(CDVDOverlaySSA* o, double pts); - -- void Release(COverlayV& list); -- void Release(SElementV& list); -+ long Release(COverlayV& list); -+ long Release(SElementV& list); - - CCriticalSection m_section; - SElementV m_buffers[NUM_BUFFERS]; -diff --git a/xbmc/cores/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoRenderers/RenderManager.cpp -index ca454eb..bc2e403 100644 ---- a/xbmc/cores/VideoRenderers/RenderManager.cpp -+++ b/xbmc/cores/VideoRenderers/RenderManager.cpp -@@ -989,7 +989,7 @@ int CXBMCRenderManager::FlipFreeBuffer() - // See "Render Buffer State Description" in header for information. - if (HasFreeBuffer()) - { -- if (!m_bRenderBufferUsed) -+ if (!m_bRenderBufferUsed && !m_bOverlayReleased) - { - return -1; - } -@@ -1041,6 +1041,7 @@ void CXBMCRenderManager::ResetRenderBuffer() - m_presentPts = DVD_NOPTS_VALUE; - m_speed = 0; - m_bRenderBufferUsed = false; -+ m_bOverlayReleased = false; - } - - void CXBMCRenderManager::PrepareNextRender() -@@ -1119,7 +1120,8 @@ void CXBMCRenderManager::NotifyDisplayFlip() - && m_iDisplayedRenderBuffer != m_iCurrentRenderBuffer) - { - m_pRenderer->ReleaseBuffer(m_iDisplayedRenderBuffer); -- m_overlays.ReleaseBuffer(m_iDisplayedRenderBuffer); -+ if (m_overlays.ReleaseBuffer(m_iDisplayedRenderBuffer) > 0) -+ m_bOverlayReleased = true; - } - } - -diff --git a/xbmc/cores/VideoRenderers/RenderManager.h b/xbmc/cores/VideoRenderers/RenderManager.h -index 1a460c7..fd85882 100644 ---- a/xbmc/cores/VideoRenderers/RenderManager.h -+++ b/xbmc/cores/VideoRenderers/RenderManager.h -@@ -258,6 +258,7 @@ class CXBMCRenderManager - bool m_bCodecSupportsBuffering; - int m_speed; - bool m_bRenderBufferUsed; -+ bool m_bOverlayReleased; - CEvent m_flipEvent; - - struct --- -1.7.10 - - -From 059b89b5e0b50af7560783a4e6a0638ab9f2680c Mon Sep 17 00:00:00 2001 -From: xbmc -Date: Sun, 24 Feb 2013 17:38:25 +0100 -Subject: [PATCH 7/7] RverlayRenderer: align buffers with index in - renderManager - ---- - xbmc/cores/VideoRenderers/OverlayRenderer.cpp | 7 +++++-- - xbmc/cores/VideoRenderers/OverlayRenderer.h | 2 +- - xbmc/cores/VideoRenderers/RenderManager.cpp | 5 +++-- - 3 files changed, 9 insertions(+), 5 deletions(-) - -diff --git a/xbmc/cores/VideoRenderers/OverlayRenderer.cpp b/xbmc/cores/VideoRenderers/OverlayRenderer.cpp -index 3039751..5592eca 100644 ---- a/xbmc/cores/VideoRenderers/OverlayRenderer.cpp -+++ b/xbmc/cores/VideoRenderers/OverlayRenderer.cpp -@@ -166,10 +166,13 @@ void CRenderer::Flush() - Release(m_cleanup); - } - --void CRenderer::Flip() -+void CRenderer::Flip(int source) - { - CSingleLock lock(m_section); -- m_render = (m_render + 1) % m_iNumBuffers; -+ if( source >= 0 && source < m_iNumBuffers ) -+ m_render = source; -+ else -+ m_render = (m_render + 1) % m_iNumBuffers; - } - - long CRenderer::ReleaseBuffer(int idx) -diff --git a/xbmc/cores/VideoRenderers/OverlayRenderer.h b/xbmc/cores/VideoRenderers/OverlayRenderer.h -index 2fcac4a..627dd9f 100644 ---- a/xbmc/cores/VideoRenderers/OverlayRenderer.h -+++ b/xbmc/cores/VideoRenderers/OverlayRenderer.h -@@ -96,7 +96,7 @@ - void AddOverlay(CDVDOverlay* o, double pts, int index); - void AddOverlay(COverlay* o, double pts, int index); - void AddCleanup(COverlay* o); -- void Flip(); -+ void Flip(int source); - void Render(); - void Flush(); - void SetNumBuffers(int numBuffers) { m_iNumBuffers = numBuffers; } -diff --git a/xbmc/cores/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoRenderers/RenderManager.cpp -index bc2e403..099eb4d 100644 ---- a/xbmc/cores/VideoRenderers/RenderManager.cpp -+++ b/xbmc/cores/VideoRenderers/RenderManager.cpp -@@ -303,7 +303,7 @@ void CXBMCRenderManager::RenderUpdate(bool clear, DWORD flags, DWORD alpha) - if(m_presentstep == PRESENT_FLIP) - { - FlipRenderBuffer(); -- m_overlays.Flip(); -+ m_overlays.Flip(m_presentsource); - m_pRenderer->FlipPage(m_presentsource); - m_presentstep = PRESENT_FRAME; - m_presentevent.Set(); -@@ -703,7 +703,7 @@ void CXBMCRenderManager::Present() - if(m_presentstep == PRESENT_FLIP) - { - FlipRenderBuffer(); -- m_overlays.Flip(); -+ m_overlays.Flip(m_presentsource); - m_pRenderer->FlipPage(m_presentsource); - m_presentstep = PRESENT_FRAME; - m_presentevent.Set(); -@@ -994,6 +994,7 @@ int CXBMCRenderManager::FlipFreeBuffer() - return -1; - } - m_bRenderBufferUsed = false; -+ m_bOverlayReleased = false; - m_bAllRenderBuffersDisplayed = false; - m_iOutputRenderBuffer = (m_iOutputRenderBuffer + 1) % m_iNumRenderBuffers; - return m_iOutputRenderBuffer; --- -1.7.10 - diff --git a/packages/mediacenter/xbmc/scripts/gputemp b/packages/mediacenter/xbmc/scripts/gputemp index d5152aa4f6..6b312d00b4 100755 --- a/packages/mediacenter/xbmc/scripts/gputemp +++ b/packages/mediacenter/xbmc/scripts/gputemp @@ -27,11 +27,13 @@ if lspci -n | grep 0300 | grep -q 10de; then fi if lspci -n | grep 0300 | grep -q 1002; then - if [ -f /storage/.config/xorg.conf ]; then - XORG="/storage/.config/xorg.conf" - else - XORG="/etc/X11/xorg-fglrx.conf" - fi + if [ -f /storage/.config/xorg.conf ]; then + XORG="/storage/.config/xorg.conf" + elif [ -f /etc/X11/xorg-fglrx-legacy.conf ]; then + XORG="/etc/X11/xorg-fglrx-legacy.conf" + else + XORG="/etc/X11/xorg-fglrx.conf" + fi [ -f /usr/bin/aticonfig ] && TEMP=`/usr/bin/aticonfig -i $XORG --od-gettemperature | grep Temperature | cut -f 2 -d "-" | cut -f 1 -d "." | sed -e "s, ,,"` fi diff --git a/packages/tools/pastebinit/install b/packages/mediacenter/xbmc/unpack similarity index 81% rename from packages/tools/pastebinit/install rename to packages/mediacenter/xbmc/unpack index 86d71f0964..f21b1bc057 100755 --- a/packages/tools/pastebinit/install +++ b/packages/mediacenter/xbmc/unpack @@ -22,9 +22,11 @@ . config/options $1 -mkdir -p $INSTALL/etc/pastebin.d - cp $PKG_BUILD/pastebin.d/sprunge.us.conf $INSTALL/etc/pastebin.d +echo "### Applying architecture based patches ###" -mkdir -p $INSTALL/usr/bin - cp $PKG_BUILD/pastebinit $INSTALL/usr/bin - ln -sf pastebinit $INSTALL/usr/bin/paste # link for a shorter command +if [ ! $TARGET_ARCH = arm ]; then + for patch in `ls $PKG_DIR/patches.x86`; do + cat $PKG_DIR/patches.x86/$patch | patch -d \ + `echo $PKG_BUILD | cut -f1 -d\ ` -p1 + done +fi diff --git a/packages/network/connman/init.d/21_network b/packages/network/connman/init.d/21_network index f246e474ef..5f59f96a19 100644 --- a/packages/network/connman/init.d/21_network +++ b/packages/network/connman/init.d/21_network @@ -271,9 +271,9 @@ set_interface() { set_hwclock if [ -f $HOME/.config/debug.connman ]; then - /usr/sbin/connmand -nd > /dev/null 2>&1 + /usr/sbin/connmand -nrd > /dev/null 2>&1 else - /usr/sbin/connmand -n > /dev/null 2>&1 + /usr/sbin/connmand -nr > /dev/null 2>&1 fi usleep 250000 done diff --git a/packages/network/connman/install b/packages/network/connman/install index c7added2b3..3fa8b20eec 100755 --- a/packages/network/connman/install +++ b/packages/network/connman/install @@ -26,7 +26,7 @@ add_user system x 430 430 "service" "/var/run/connman" "/bin/sh" add_group system 430 mkdir -p $INSTALL/etc - cp $PKG_DIR/config/resolv.conf $INSTALL/etc + ln -sf /var/cache/resolv.conf $INSTALL/etc/resolv.conf mkdir -p $INSTALL/etc/connman cp $PKG_DIR/config/main.conf $INSTALL/etc/connman diff --git a/packages/addons/networking/analyzer/tcpdump/build b/packages/network/tcpdump/build similarity index 100% rename from packages/addons/networking/analyzer/tcpdump/build rename to packages/network/tcpdump/build diff --git a/packages/addons/networking/analyzer/tcpdump/addon b/packages/network/tcpdump/install similarity index 91% rename from packages/addons/networking/analyzer/tcpdump/addon rename to packages/network/tcpdump/install index 3d36c9fa9d..677d4d5435 100755 --- a/packages/addons/networking/analyzer/tcpdump/addon +++ b/packages/network/tcpdump/install @@ -22,5 +22,6 @@ . config/options $1 -mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin - cp $PKG_BUILD/tcpdump $ADDON_BUILD/$PKG_ADDON_ID/bin +mkdir -p $INSTALL/usr/sbin + cp -P $PKG_BUILD/tcpdump $INSTALL/usr/sbin + diff --git a/packages/addons/networking/analyzer/tcpdump/meta b/packages/network/tcpdump/meta similarity index 94% rename from packages/addons/networking/analyzer/tcpdump/meta rename to packages/network/tcpdump/meta index d26a9ba446..ff8e396fe9 100644 --- a/packages/addons/networking/analyzer/tcpdump/meta +++ b/packages/network/tcpdump/meta @@ -27,11 +27,9 @@ PKG_URL="http://www.tcpdump.org/release/tcpdump-${PKG_VERSION}.tar.gz" PKG_DEPENDS="" PKG_BUILD_DEPENDS="toolchain libpcap" PKG_PRIORITY=optional -PKG_SECTION="network/analyzer" +PKG_SECTION="network" PKG_SHORTDESC="powerful tool for network monitoring and data acquisition" PKG_LONGDESC="This program allows you to dump the traffic on a network. tcpdump is able to examine IPv4, ICMPv4, IPv6, ICMPv6, UDP, TCP, SNMP, AFS BGP, RIP, PIM, DVMRP, IGMP, SMB, OSPF, NFS and many other packet types." - -PKG_IS_ADDON="yes" -PKG_ADDON_TYPE="xbmc.python.script" +PKG_IS_ADDON="no" PKG_AUTORECONF="yes" diff --git a/packages/python/devel/Cheetah/build b/packages/python/devel/Cheetah/build index 285d2998d2..854cad3db2 100755 --- a/packages/python/devel/Cheetah/build +++ b/packages/python/devel/Cheetah/build @@ -31,3 +31,4 @@ python setup.py build --cross-compile python setup.py install --root=./.install --prefix=/usr rm -rf .install/usr/bin +find .install/usr/lib/python*/site-packages/ -name "*.py" -exec rm -rf {} ";" diff --git a/packages/python/system/yenc/build b/packages/python/system/yenc/build index 285d2998d2..07a62bda96 100755 --- a/packages/python/system/yenc/build +++ b/packages/python/system/yenc/build @@ -31,3 +31,4 @@ python setup.py build --cross-compile python setup.py install --root=./.install --prefix=/usr rm -rf .install/usr/bin +rm -rf .install/usr/lib/python*/site-packages/*.py diff --git a/packages/sysutils/bash/profile.d/shell.conf b/packages/sysutils/bash/profile.d/shell.conf index 468a3bb085..652518d396 100644 --- a/packages/sysutils/bash/profile.d/shell.conf +++ b/packages/sysutils/bash/profile.d/shell.conf @@ -23,8 +23,24 @@ # evironment variables that are not user defined. ################################################################################ -PS1='\[\e[0;32m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[1;32m\]\$\[\e[m\] ' +PS1='\[\e[0;32m\]\u\e[1;30m@\e[1;32m\h\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[1;32m\]\$\[\e[m\] ' export PS1 -TERM="linux" +case "$TERM" in + + # Do nothing when TERM already set (e.g. by SSH) and known + (linux|nxterm|screen|vt100|vt100-am|xterm|xterm-color) + ;; + + # Default to "linux" when unset + ("") + TERM="linux" + ;; + + # Default to "xterm" when unknown + (*) + TERM="xterm" + ;; + +esac export TERM \ No newline at end of file diff --git a/packages/sysutils/busybox/init.d/08_syslogd b/packages/sysutils/busybox/init.d/23_syslogd similarity index 94% rename from packages/sysutils/busybox/init.d/08_syslogd rename to packages/sysutils/busybox/init.d/23_syslogd index d3cf2e3242..3eb91fe548 100644 --- a/packages/sysutils/busybox/init.d/08_syslogd +++ b/packages/sysutils/busybox/init.d/23_syslogd @@ -28,10 +28,10 @@ source /var/config/settings.conf - SYSLOGD_OPTIONS="-L" + SYSLOGD_OPTIONS="-L -D" if [ "$SYSLOG_REMOTE" == "true" -a "$SYSLOG_SERVER" ]; then - SYSLOGD_OPTIONS="$SYSLOGD_OPTIONS -R $SYSLOG_SERVER" + SYSLOGD_OPTIONS="-R $SYSLOG_SERVER $SYSLOGD_OPTIONS" fi if [ -f /storage/.config/syslog.conf ]; then diff --git a/packages/sysutils/busybox/install b/packages/sysutils/busybox/install index 3cd5b33e0f..8786c86b01 100755 --- a/packages/sysutils/busybox/install +++ b/packages/sysutils/busybox/install @@ -40,6 +40,8 @@ USER_PWD="`$ROOT/$TOOLCHAIN/bin/cryptpw -m sha512 $USER_PASSWORD`" cp $PKG_DIR/scripts/lsb_release $INSTALL/usr/bin/ cp $PKG_DIR/scripts/apt-get $INSTALL/usr/bin/ ln -sf /bin/busybox $INSTALL/usr/bin/env #/usr/bin/env is needed for most python scripts + cp $PKG_DIR/scripts/pastebinit $INSTALL/usr/bin/ + ln -sf pastebinit $INSTALL/usr/bin/paste mkdir -p $INSTALL/sbin cp $PKG_DIR/scripts/init $INSTALL/sbin/ diff --git a/packages/sysutils/busybox/meta b/packages/sysutils/busybox/meta index bdbe49cd55..51f0927db7 100644 --- a/packages/sysutils/busybox/meta +++ b/packages/sysutils/busybox/meta @@ -25,7 +25,7 @@ PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.busybox.net" PKG_URL="http://busybox.net/downloads/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="bash kexec-tools hdparm speedcontrol pastebinit zip pciutils usbutils" +PKG_DEPENDS="bash kexec-tools hdparm speedcontrol zip pciutils usbutils" PKG_BUILD_DEPENDS="toolchain busybox-hosttools" PKG_PRIORITY="required" PKG_SECTION="system" diff --git a/packages/sysutils/busybox/scripts/pastebinit b/packages/sysutils/busybox/scripts/pastebinit new file mode 100755 index 0000000000..94a09d1142 --- /dev/null +++ b/packages/sysutils/busybox/scripts/pastebinit @@ -0,0 +1,28 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +# +# wrapper for curl, posting to the sprunge.us pastebin +# reads from stdin if called without an argument +# + +cat "$@" | curl -F 'sprunge=<-' http://sprunge.us diff --git a/packages/sysutils/systemd/profile.d/udev.conf b/packages/sysutils/systemd/profile.d/udev.conf new file mode 100644 index 0000000000..3eeb5ae3ff --- /dev/null +++ b/packages/sysutils/systemd/profile.d/udev.conf @@ -0,0 +1,27 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# 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, 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +wait_for_udevadm_settle () { + progress "Wait for udevadm settle to finish" + for i in $(seq 1 50) ; do + ps | grep -q "[u]devadm settle" || break + usleep 200000 + done +} diff --git a/packages/sysutils/util-linux/scripts/32_swapfile b/packages/sysutils/util-linux/scripts/32_swapfile index 0a21f425d0..42caea6a12 100644 --- a/packages/sysutils/util-linux/scripts/32_swapfile +++ b/packages/sysutils/util-linux/scripts/32_swapfile @@ -45,6 +45,6 @@ fi for i in $SWAP; do swapon -p 10000 $SWAP 2>&1 > /dev/null done - sysctl -w vm.swappiness=1 2>&1 > /dev/null + sysctl -w vm.swappiness=10 2>&1 > /dev/null fi )& diff --git a/packages/toolchain/devel/eglibc/build b/packages/toolchain/devel/eglibc/build index 1bb6880f9e..997d15d92c 100755 --- a/packages/toolchain/devel/eglibc/build +++ b/packages/toolchain/devel/eglibc/build @@ -142,7 +142,7 @@ EOF --without-gd \ --enable-obsolete-rpc \ --disable-build-nscd \ -        --disable-nscd \ + --disable-nscd \ $DEBUG_CONFIG \ make diff --git a/packages/tools/bcm2835-bootloader/meta b/packages/tools/bcm2835-bootloader/meta index 4b036de570..2d486e58aa 100644 --- a/packages/tools/bcm2835-bootloader/meta +++ b/packages/tools/bcm2835-bootloader/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="bcm2835-bootloader" -PKG_VERSION="fea69f6" +PKG_VERSION="98e5704" PKG_REV="1" PKG_ARCH="arm" PKG_LICENSE="nonfree" diff --git a/packages/tools/installer/scripts/installer b/packages/tools/installer/scripts/installer index 16a7e75153..56b5a1b3d7 100755 --- a/packages/tools/installer/scripts/installer +++ b/packages/tools/installer/scripts/installer @@ -50,6 +50,9 @@ # cumulative, e.g., "\Zb\Z1" makes the following text bold (perhaps bright) # red. Restore normal settings with "\Zn". +# disable Ctrl+C - can be very dangerous +trap '' 2 + [ -f /etc/installer.conf ] && . /etc/installer.conf || exit 0 dbglg() { @@ -171,22 +174,23 @@ do_install_mbr() { } do_install_quick() { - # show menu MSG_TITLE="\Z4[ QUICK INSTALL MENU ]\Zn" MSG_MENU="\nUse the up/down arrows to select the correct device.\n\n Please select a device:" MSG_CANCEL="Back" + DIALOG_OPTIONS="--defaultno" create_device_list dialog --colors --backtitle "$BACKTITLE" --cancel-label "$MSG_CANCEL" \ - --title "$MSG_TITLE" --menu "$MSG_MENU" 20 50 5 \ + $DIALOG_OPTIONS --title "$MSG_TITLE" --menu "$MSG_MENU" 20 50 5 \ $DEVICE_LIST 2> $TMPDIR/device_for_install # now we must do everything case $? in 0) INSTALL_DEVICE=$(cat "$TMPDIR/device_for_install") + INSTALL_DEVICE_FULL=$(echo $DEVICE_LIST | sed "s|.*$INSTALL_DEVICE \([^ ]*\).*|$INSTALL_DEVICE \1|") prompt_gpt prompt_ssh @@ -197,6 +201,25 @@ do_install_quick() { EXTLINUX_SSH="ssh" fi + # check for confirmation (twice!) + MSG_TITLE="\Z1[ Confirmation before installing ]\Zn" + MSG_DETAIL="\nIf you continue the target disk will be wiped out:\n\n$INSTALL_DEVICE_FULL\n\n" + DIALOG_OPTIONS="--defaultno" + dialog --colors --backtitle "$BACKTITLE" --title "$MSG_TITLE" \ + $DIALOG_OPTIONS --yesno "$MSG_DETAIL" 0 0 + if [ $? -ne 0 ]; then + menu_main + fi + + MSG_TITLE="\Z1[ Confirmation before installing ]\Zn" + MSG_DETAIL="\nThis is last chance to abort the installation!\n\nIf you continue the target disk will be wiped out:\n\n$INSTALL_DEVICE_FULL\n\n\n" + DIALOG_OPTIONS="--defaultno" + dialog --colors --backtitle "$BACKTITLE" --title "$MSG_TITLE" \ + $DIALOG_OPTIONS --yesno "$MSG_DETAIL" 0 0 + if [ $? -ne 0 ]; then + menu_main + fi + # remove all partitions msg_progress_install "1" "get all partitions $INSTALL_DEVICE" get_partition $INSTALL_DEVICE @@ -316,6 +339,124 @@ do_install_quick() { esac } +do_install_custom() { + # show menu + MSG_TITLE="\Z4[ CUSTOM INSTALL MENU ]\Zn" + MSG_MENU="\nUse the up/down arrows to select the correct partition where you want to overwrite KERNEL and SYSTEM files.\n\n Please select a partition:" + MSG_CANCEL="Back" + DIALOG_OPTIONS="--defaultno" + + get_device_unmount + + if [ "$DEVICES" = "" ]; then + msg_no_device + fi + + PARTITION_LIST="" + for device in $DEVICES; do + get_partition $device + for partition in $PARTITIONS; do + LABEL=$(tune2fs -l $device$partition | awk 'BEGIN {FS=":"} /Filesystem volume name/ {gsub(/ /,"",$2); print $2}') + if [ "$LABEL" = "$DISKLABEL_SYSTEM" ]; then + DEVICE_MODEL=$(parted -s $device -m print | grep ^$device | cut -f7 -d ":" | sed "s/;//") + DEVICE_SIZE=$(parted -s $device -m print | grep ^$device | cut -f2 -d ":") + DEVICE_NAME=$(echo $DEVICE_MODEL ${DEVICE_SIZE} | sed 's/ /_/g') + PARTITION_LIST="$PARTITION_LIST $device$partition $DEVICE_NAME" + fi + done + done + + if [ "$PARTITION_LIST" = "" ]; then + msg_no_device + fi + + dialog --colors --backtitle "$BACKTITLE" --cancel-label "$MSG_CANCEL" \ + $DIALOG_OPTIONS --title "$MSG_TITLE" --menu "$MSG_MENU" 20 50 5 \ + $PARTITION_LIST 2> $TMPDIR/device_for_install + + # now we must do everything + case $? in + 0) + INSTALL_PARTITION=$(cat "$TMPDIR/device_for_install") + INSTALL_PARTITION_FULL=$(echo $PARTITION_LIST | sed "s|.*$INSTALL_PARTITION \([^ ]*\).*|$INSTALL_PARTITION \1|") + + # check for confirmation (twice!) + MSG_TITLE="\Z1[ Confirmation before copying ]\Zn" + MSG_DETAIL="\nIf you continue the target partition will be\noverwritten with new KERNEL and SYSTEM files:\n\n$INSTALL_PARTITION_FULL\n\n" + DIALOG_OPTIONS="--defaultno" + dialog --colors --backtitle "$BACKTITLE" --title "$MSG_TITLE" \ + $DIALOG_OPTIONS --yesno "$MSG_DETAIL" 0 0 + if [ $? -ne 0 ]; then + menu_main + fi + + MSG_TITLE="\Z1[ Confirmation before copying ]\Zn" + MSG_DETAIL="\nThis is last chance to abort the copying!\n\nIf you continue the target partition will be\noverwritten with new KERNEL and SYSTEM files:\n\n$INSTALL_PARTITION_FULL\n\n\n" + DIALOG_OPTIONS="--defaultno" + dialog --colors --backtitle "$BACKTITLE" --title "$MSG_TITLE" \ + $DIALOG_OPTIONS --yesno "$MSG_DETAIL" 0 0 + if [ $? -ne 0 ]; then + menu_main + fi + + # mount system partition + msg_progress_install "5" "creating $TMPDIR/part1" + mkdir -p $TMPDIR/part1 >> $LOGFILE 2>&1 + + msg_progress_install "10" "mounting $INSTALL_PARTITION to $TMPDIR/part1" + mount -t ext4 $INSTALL_PARTITION $TMPDIR/part1 >> $LOGFILE 2>&1 + + # check for enough target space + msg_progress_install "15" "checking for space on $INSTALL_PARTITION" + + KERNEL_SIZE=$(stat -t /flash/KERNEL | awk '{print $2}') + SYSTEM_SIZE=$(stat -t /flash/SYSTEM | awk '{print $2}') + SRC_SIZE=$(( $KERNEL_SIZE + $SYSTEM_SIZE )) + + DEST_SIZE=$(df $TMPDIR/part1 | awk '/[0-9]%/{print $4}') + DEST_SIZE=$(( $DEST_SIZE * 1024 )) + if [ -f $TMPDIR/part1/KERNEL ]; then + KERNEL_SIZE=$(stat -t $TMPDIR/part1/KERNEL | awk '{print $2}') + DEST_SIZE=$(( $DEST_SIZE + $KERNEL_SIZE )) + fi + if [ -f $TMPDIR/part1/SYSTEM ]; then + SYSTEM_SIZE=$(stat -t $TMPDIR/part1/SYSTEM | awk '{print $2}') + DEST_SIZE=$(( $DEST_SIZE + $SYSTEM_SIZE )) + fi + + if [ $SRC_SIZE -ge $DEST_SIZE ]; then + umount $TMPDIR/part1 >> $LOGFILE 2>&1 + rmdir $TMPDIR/part1 >> $LOGFILE 2>&1 + msg_target_space + menu_main + fi + + # install system files + msg_progress_install "20" "installing Kernel" + cp /flash/KERNEL $TMPDIR/part1 >> $LOGFILE 2>&1 + + msg_progress_install "40" "installing System" + cp /flash/SYSTEM $TMPDIR/part1 >> $LOGFILE 2>&1 + sync + + # umount system partition, remove mountpoint + msg_progress_install "95" "unmount $TMPDIR/part1" + umount $TMPDIR/part1 >> $LOGFILE 2>&1 + + msg_progress_install "100" "remove $TMPDIR/part1" + rmdir $TMPDIR/part1 >> $LOGFILE 2>&1 + + menu_main + ;; + 1) + menu_main + ;; + 255) + do_poweroff + ;; + esac +} + msg_not_implemented() { # show a dialog that this function is not yet implemented MSG_TITLE="\Z2[ WORK IN PROGRESS ]\Zn" @@ -350,6 +491,16 @@ msg_no_device() { menu_main } +msg_target_space() { + # show an error dialog for missing space + MSG_TITLE="\Z1[ TARGET SPACE ]\Zn" + MSG_INFOBOX="\nNot enough target space!\nCopying aborted.\n" + + dialog --colors --backtitle "$BACKTITLE" --title "$MSG_TITLE" --msgbox "$MSG_INFOBOX" 8 70 + + menu_main +} + msg_install_ready() { # show a dialog that we have installed MSG_TITLE="\Z1[ INFORMATION ]\Zn" @@ -452,7 +603,7 @@ menu_main() { ITEM_MAINMENU=$(cat "$TMPDIR/mainmenu") case $ITEM_MAINMENU in 1) do_install_quick; break;; - 2) menu_custom; break;; + 2) do_install_custom; break;; 3) menu_setup; break;; 4) menu_bios; break;; 5) logfile_show; break;; @@ -503,12 +654,6 @@ menu_bios() { esac } -menu_custom() { - # TODO: show the installmenu - msg_not_implemented - menu_main -} - bios_backup() { # create a backup of the installed bios if [ "$BIOS_UPDATE" = "yes" -a -f "$BIOS_FILE" ]; then diff --git a/packages/tools/pastebinit/patches/pastebinit-1.3.1-01-change_default_pastebin.patch b/packages/tools/pastebinit/patches/pastebinit-1.3.1-01-change_default_pastebin.patch deleted file mode 100644 index e64d5c9ab0..0000000000 --- a/packages/tools/pastebinit/patches/pastebinit-1.3.1-01-change_default_pastebin.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur pastebinit-1.3/pastebinit pastebinit-1.3.patch/pastebinit ---- pastebinit-1.3/pastebinit 2012-02-15 22:14:22.000000000 +0100 -+++ pastebinit-1.3.patch/pastebinit 2012-05-07 03:40:49.119612858 +0200 -@@ -17,7 +17,7 @@ - # along with this program; if not, write to the Free Software - # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - --defaultPB = "http://pastebin.com" #Default pastebin -+defaultPB = "http://sprunge.us" #Default pastebin - try: - import lsb_release - release = lsb_release.get_distro_information()['ID'].lower() diff --git a/packages/x11/driver/xf86-video-fglrx/patches.upstream/xf86-video-fglrx-12.10-remove-overlapping-pci-ids.patch b/packages/x11/driver/xf86-video-fglrx/patches.upstream/xf86-video-fglrx-12.10-remove-overlapping-pci-ids.patch new file mode 100644 index 0000000000..cb6d32642f --- /dev/null +++ b/packages/x11/driver/xf86-video-fglrx/patches.upstream/xf86-video-fglrx-12.10-remove-overlapping-pci-ids.patch @@ -0,0 +1,20 @@ +diff --git a/common/lib/modules/fglrx/build_mod/fglrxko_pci_ids.h b/common/lib/modules/fglrx/build_mod/fglrxko_pci_ids.h +index b358d0b..d45a78a 100755 +--- a/common/lib/modules/fglrx/build_mod/fglrxko_pci_ids.h ++++ b/common/lib/modules/fglrx/build_mod/fglrxko_pci_ids.h +@@ -97,7 +97,6 @@ + FGL_ASIC_ID(0x677B), + FGL_ASIC_ID(0x6772), + FGL_ASIC_ID(0x6779), +- FGL_ASIC_ID(0x6770), + FGL_ASIC_ID(0x671F), + FGL_ASIC_ID(0x6718), + FGL_ASIC_ID(0x6719), +@@ -147,7 +146,6 @@ + FGL_ASIC_ID(0x68D1), + FGL_ASIC_ID(0x68C7), + FGL_ASIC_ID(0x68E0), +- FGL_ASIC_ID(0x68E1), + FGL_ASIC_ID(0x68F0), + FGL_ASIC_ID(0x68F1), + FGL_ASIC_ID(0x68E4), diff --git a/packages/x11/driver/xf86-video-nvidia-legacy/meta b/packages/x11/driver/xf86-video-nvidia-legacy/meta index 782f54b1b2..874cb62844 100644 --- a/packages/x11/driver/xf86-video-nvidia-legacy/meta +++ b/packages/x11/driver/xf86-video-nvidia-legacy/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="xf86-video-nvidia-legacy" -PKG_VERSION="304.64" +PKG_VERSION="304.84" PKG_REV="1" PKG_ARCH="i386 x86_64" PKG_LICENSE="nonfree" diff --git a/packages/x11/driver/xf86-video-nvidia-legacy/patches.upstream/make-use-of-the-new-uapi-framework.patch b/packages/x11/driver/xf86-video-nvidia-legacy/patches.upstream/make-use-of-the-new-uapi-framework.patch deleted file mode 100644 index 852021d657..0000000000 --- a/packages/x11/driver/xf86-video-nvidia-legacy/patches.upstream/make-use-of-the-new-uapi-framework.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 1e3d34ce7d8c4912c08386589843fcc4ba4d38bf Mon Sep 17 00:00:00 2001 -From: Alberto Milone -Date: Wed, 7 Nov 2012 12:03:46 +0100 -Subject: [PATCH 1/2] Make use of the new uapi framework - ---- - conftest.sh | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/kernel/conftest.sh b/kernel/conftest.sh -index 388e268..8eff4d7 100755 ---- a/kernel/conftest.sh -+++ b/kernel/conftest.sh -@@ -20,6 +20,7 @@ ARCH=$3 - ISYSTEM=`$CC -print-file-name=include 2> /dev/null` - SOURCES=$4 - HEADERS=$SOURCES/include -+HEADERSA=$SOURCES/include/uapi - OUTPUT=$5 - XEN_PRESENT=1 - -@@ -118,7 +119,7 @@ build_cflags() { - fi - fi - -- CFLAGS="$CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS" -+ CFLAGS="$CFLAGS $OUTPUT_CFLAGS -I$HEADERS -I$HEADERSA $AUTOCONF_CFLAGS" - - test_xen - -@@ -146,10 +147,10 @@ build_cflags() { - fi - fi - -- CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS" -+ CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS -I$HEADERSA $AUTOCONF_CFLAGS" - - if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then -- CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include -I$OUTPUT/arch/x86/include/generated" -+ CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include -I$SOURCES/arch/x86/include/uapi -I$OUTPUT/arch/x86/include/generated -I$OUTPUT/arch/x86/include/generated/uapi" - elif [ "$ARCH" = "arm" ]; then - CFLAGS="$CFLAGS -I$SOURCES/arch/arm/include -I$OUTPUT/arch/arm/include/generated" - fi --- -1.7.9.5 - diff --git a/packages/x11/driver/xf86-video-nvidia-legacy/patches.upstream/replace-VM_RESERVED-with-VM_DONTEXPAND-and-VM_DONTDU.patch b/packages/x11/driver/xf86-video-nvidia-legacy/patches.upstream/replace-VM_RESERVED-with-VM_DONTEXPAND-and-VM_DONTDU.patch deleted file mode 100644 index 84bd164e76..0000000000 --- a/packages/x11/driver/xf86-video-nvidia-legacy/patches.upstream/replace-VM_RESERVED-with-VM_DONTEXPAND-and-VM_DONTDU.patch +++ /dev/null @@ -1,28 +0,0 @@ -From fed1fa17202cf13bf80bbbad3bf0ffdfd192df42 Mon Sep 17 00:00:00 2001 -From: Alberto Milone -Date: Wed, 7 Nov 2012 12:11:02 +0100 -Subject: [PATCH 1/1] Replace VM_RESERVED with VM_DONTEXPAND and VM_DONTDUMP - ---- - nv-mmap.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/kernel/nv-mmap.c b/kernel/nv-mmap.c -index acc02ec..b2d5cdb 100644 ---- a/kernel/nv-mmap.c -+++ b/kernel/nv-mmap.c -@@ -463,7 +463,11 @@ int nv_kern_mmap( - NV_PRINT_AT(NV_DBG_MEMINFO, at); - nv_vm_list_page_count(&at->page_table[i], pages); - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) -+ vma->vm_flags |= (VM_IO | VM_LOCKED | (VM_DONTEXPAND | VM_DONTDUMP)); -+#else - vma->vm_flags |= (VM_IO | VM_LOCKED | VM_RESERVED); -+#endif - - #if defined(VM_DRIVER_PAGES) - vma->vm_flags |= VM_DRIVER_PAGES; --- -1.7.9.5 - diff --git a/packages/x11/driver/xf86-video-nvidia/meta b/packages/x11/driver/xf86-video-nvidia/meta index 52bea1e52e..7baba9f3ca 100644 --- a/packages/x11/driver/xf86-video-nvidia/meta +++ b/packages/x11/driver/xf86-video-nvidia/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="xf86-video-nvidia" -PKG_VERSION="304.64" +PKG_VERSION="304.84" PKG_REV="1" PKG_ARCH="i386 x86_64" PKG_LICENSE="nonfree" diff --git a/packages/x11/driver/xf86-video-nvidia/patches.upstream/make-use-of-the-new-uapi-framework.patch b/packages/x11/driver/xf86-video-nvidia/patches.upstream/make-use-of-the-new-uapi-framework.patch deleted file mode 100644 index 852021d657..0000000000 --- a/packages/x11/driver/xf86-video-nvidia/patches.upstream/make-use-of-the-new-uapi-framework.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 1e3d34ce7d8c4912c08386589843fcc4ba4d38bf Mon Sep 17 00:00:00 2001 -From: Alberto Milone -Date: Wed, 7 Nov 2012 12:03:46 +0100 -Subject: [PATCH 1/2] Make use of the new uapi framework - ---- - conftest.sh | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/kernel/conftest.sh b/kernel/conftest.sh -index 388e268..8eff4d7 100755 ---- a/kernel/conftest.sh -+++ b/kernel/conftest.sh -@@ -20,6 +20,7 @@ ARCH=$3 - ISYSTEM=`$CC -print-file-name=include 2> /dev/null` - SOURCES=$4 - HEADERS=$SOURCES/include -+HEADERSA=$SOURCES/include/uapi - OUTPUT=$5 - XEN_PRESENT=1 - -@@ -118,7 +119,7 @@ build_cflags() { - fi - fi - -- CFLAGS="$CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS" -+ CFLAGS="$CFLAGS $OUTPUT_CFLAGS -I$HEADERS -I$HEADERSA $AUTOCONF_CFLAGS" - - test_xen - -@@ -146,10 +147,10 @@ build_cflags() { - fi - fi - -- CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS" -+ CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS -I$HEADERSA $AUTOCONF_CFLAGS" - - if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then -- CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include -I$OUTPUT/arch/x86/include/generated" -+ CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include -I$SOURCES/arch/x86/include/uapi -I$OUTPUT/arch/x86/include/generated -I$OUTPUT/arch/x86/include/generated/uapi" - elif [ "$ARCH" = "arm" ]; then - CFLAGS="$CFLAGS -I$SOURCES/arch/arm/include -I$OUTPUT/arch/arm/include/generated" - fi --- -1.7.9.5 - diff --git a/packages/x11/driver/xf86-video-nvidia/patches.upstream/replace-VM_RESERVED-with-VM_DONTEXPAND-and-VM_DONTDU.patch b/packages/x11/driver/xf86-video-nvidia/patches.upstream/replace-VM_RESERVED-with-VM_DONTEXPAND-and-VM_DONTDU.patch deleted file mode 100644 index 84bd164e76..0000000000 --- a/packages/x11/driver/xf86-video-nvidia/patches.upstream/replace-VM_RESERVED-with-VM_DONTEXPAND-and-VM_DONTDU.patch +++ /dev/null @@ -1,28 +0,0 @@ -From fed1fa17202cf13bf80bbbad3bf0ffdfd192df42 Mon Sep 17 00:00:00 2001 -From: Alberto Milone -Date: Wed, 7 Nov 2012 12:11:02 +0100 -Subject: [PATCH 1/1] Replace VM_RESERVED with VM_DONTEXPAND and VM_DONTDUMP - ---- - nv-mmap.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/kernel/nv-mmap.c b/kernel/nv-mmap.c -index acc02ec..b2d5cdb 100644 ---- a/kernel/nv-mmap.c -+++ b/kernel/nv-mmap.c -@@ -463,7 +463,11 @@ int nv_kern_mmap( - NV_PRINT_AT(NV_DBG_MEMINFO, at); - nv_vm_list_page_count(&at->page_table[i], pages); - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) -+ vma->vm_flags |= (VM_IO | VM_LOCKED | (VM_DONTEXPAND | VM_DONTDUMP)); -+#else - vma->vm_flags |= (VM_IO | VM_LOCKED | VM_RESERVED); -+#endif - - #if defined(VM_DRIVER_PAGES) - vma->vm_flags |= VM_DRIVER_PAGES; --- -1.7.9.5 - diff --git a/packages/x11/driver/xf86-video-virtualbox/meta b/packages/x11/driver/xf86-video-virtualbox/meta index a113d47395..7f086e6f09 100644 --- a/packages/x11/driver/xf86-video-virtualbox/meta +++ b/packages/x11/driver/xf86-video-virtualbox/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="xf86-video-virtualbox" -PKG_VERSION="4.2.6" +PKG_VERSION="4.2.8" PKG_REV="1" PKG_ARCH="i386 x86_64" PKG_LICENSE="OSS" diff --git a/projects/ARCTIC_MC/linux/linux.x86_64.conf b/projects/ARCTIC_MC/linux/linux.x86_64.conf index b46c62d08f..b0830889c2 100644 --- a/projects/ARCTIC_MC/linux/linux.x86_64.conf +++ b/projects/ARCTIC_MC/linux/linux.x86_64.conf @@ -121,28 +121,10 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=16 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -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_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set +# CONFIG_CGROUPS is not set # CONFIG_CHECKPOINT_RESTORE is not set -CONFIG_NAMESPACES=y -CONFIG_UTS_NS=y -CONFIG_IPC_NS=y -CONFIG_PID_NS=y -CONFIG_NET_NS=y -CONFIG_SCHED_AUTOGROUP=y +# CONFIG_NAMESPACES is not set +# CONFIG_SCHED_AUTOGROUP is not set # CONFIG_SYSFS_DEPRECATED is not set # CONFIG_RELAY is not set CONFIG_BLK_DEV_INITRD=y @@ -176,7 +158,7 @@ CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y -CONFIG_AIO=y +# CONFIG_AIO is not set # CONFIG_EMBEDDED is not set CONFIG_HAVE_PERF_EVENTS=y @@ -475,12 +457,12 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y CONFIG_X86_ACPI_CPUFREQ=y # CONFIG_X86_POWERNOW_K8 is not set # CONFIG_X86_SPEEDSTEP_CENTRINO is not set -# CONFIG_X86_P4_CLOCKMOD is not set +CONFIG_X86_P4_CLOCKMOD=y # # shared options # -# CONFIG_X86_SPEEDSTEP_LIB is not set +CONFIG_X86_SPEEDSTEP_LIB=y CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_GOV_LADDER=y CONFIG_CPU_IDLE_GOV_MENU=y @@ -707,7 +689,6 @@ CONFIG_DNS_RESOLVER=y CONFIG_RPS=y CONFIG_RFS_ACCEL=y CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set CONFIG_BQL=y # CONFIG_BPF_JIT is not set @@ -2237,16 +2218,16 @@ CONFIG_FONT_8x16=y # CONFIG_LOGO is not set CONFIG_SOUND=y # CONFIG_SOUND_OSS_CORE is not set -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=y CONFIG_SND_RAWMIDI=m CONFIG_SND_JACK=y # CONFIG_SND_SEQUENCER is not set # CONFIG_SND_MIXER_OSS is not set # CONFIG_SND_PCM_OSS is not set -CONFIG_SND_HRTIMER=m +CONFIG_SND_HRTIMER=y CONFIG_SND_DYNAMIC_MINORS=y # CONFIG_SND_SUPPORT_OLD_API is not set # CONFIG_SND_VERBOSE_PROCFS is not set @@ -2302,7 +2283,7 @@ CONFIG_SND_PCI=y # CONFIG_SND_ES1938 is not set # CONFIG_SND_ES1968 is not set # CONFIG_SND_FM801 is not set -CONFIG_SND_HDA_INTEL=m +CONFIG_SND_HDA_INTEL=y CONFIG_SND_HDA_PREALLOC_SIZE=64 CONFIG_SND_HDA_HWDEP=y CONFIG_SND_HDA_RECONFIG=y @@ -2846,10 +2827,7 @@ CONFIG_NET_VENDOR_SILICOM=y # CONFIG_CLKEVT_I8253=y CONFIG_CLKBLD_I8253=y -CONFIG_IOMMU_SUPPORT=y -# CONFIG_AMD_IOMMU is not set -# CONFIG_INTEL_IOMMU is not set -# CONFIG_IRQ_REMAP is not set +# CONFIG_IOMMU_SUPPORT is not set # # Remoteproc drivers (EXPERIMENTAL) diff --git a/projects/ARCTIC_MC/options b/projects/ARCTIC_MC/options index 2d8c3afbd1..8c33d1abd1 100755 --- a/projects/ARCTIC_MC/options +++ b/projects/ARCTIC_MC/options @@ -248,7 +248,7 @@ # Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,fglrx,nvidia,nouveau,vmware) # Space separated list is supported, # e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 radeon nvidia nouveau" - GRAPHIC_DRIVERS="fglrx" + GRAPHIC_DRIVERS="fglrx-legacy" # OpenMAX implementation to use (no / bcm2835-driver) OPENMAX="no" diff --git a/projects/ARCTIC_MC/xbmc/advancedsettings.xml b/projects/ARCTIC_MC/xbmc/advancedsettings.xml new file mode 100644 index 0000000000..a2942f0628 --- /dev/null +++ b/projects/ARCTIC_MC/xbmc/advancedsettings.xml @@ -0,0 +1,30 @@ + + + false + cputemp + gputemp + + + 30 + + + 30 + + + + false + false + false + false + false + + diff --git a/projects/ATV/filesystem/etc/modprobe.d/nvidia.conf b/projects/ATV/filesystem/etc/modprobe.d/nvidia.conf new file mode 100644 index 0000000000..382c641534 --- /dev/null +++ b/projects/ATV/filesystem/etc/modprobe.d/nvidia.conf @@ -0,0 +1,2 @@ +# Enable MSI (Message Signaled Interrupts) +options nvidia NVreg_EnableMSI=1 \ No newline at end of file diff --git a/projects/ATV/linux/linux.i386.conf b/projects/ATV/linux/linux.i386.conf index b3d8871a69..18b29c687a 100644 --- a/projects/ATV/linux/linux.i386.conf +++ b/projects/ATV/linux/linux.i386.conf @@ -116,28 +116,10 @@ CONFIG_RCU_FAST_NO_HZ=y # 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_FREEZER is not set -# CONFIG_CGROUP_DEVICE is not set -# CONFIG_CPUSETS is not set -CONFIG_CGROUP_CPUACCT=y -CONFIG_RESOURCE_COUNTERS=y -# CONFIG_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -CONFIG_BLK_CGROUP=y -# CONFIG_DEBUG_BLK_CGROUP is not set +# CONFIG_CGROUPS is not set # CONFIG_CHECKPOINT_RESTORE is not set -CONFIG_NAMESPACES=y -CONFIG_UTS_NS=y -CONFIG_IPC_NS=y -CONFIG_PID_NS=y -CONFIG_NET_NS=y -CONFIG_SCHED_AUTOGROUP=y +# CONFIG_NAMESPACES is not set +# CONFIG_SCHED_AUTOGROUP is not set # CONFIG_SYSFS_DEPRECATED is not set # CONFIG_RELAY is not set CONFIG_BLK_DEV_INITRD=y @@ -173,7 +155,7 @@ CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y -CONFIG_AIO=y +# CONFIG_AIO is not set # CONFIG_EMBEDDED is not set CONFIG_HAVE_PERF_EVENTS=y @@ -245,7 +227,6 @@ CONFIG_LBDAF=y CONFIG_BLK_DEV_BSG=y CONFIG_BLK_DEV_BSGLIB=y # CONFIG_BLK_DEV_INTEGRITY is not set -# CONFIG_BLK_DEV_THROTTLING is not set # # Partition Types @@ -276,7 +257,6 @@ CONFIG_EFI_PARTITION=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" @@ -369,7 +349,7 @@ CONFIG_X86_MCE_INTEL=y CONFIG_X86_MCE_THRESHOLD=y # CONFIG_X86_MCE_INJECT is not set CONFIG_X86_THERMAL_VECTOR=y -CONFIG_VM86=y +# CONFIG_VM86 is not set # CONFIG_TOSHIBA is not set # CONFIG_I8K is not set # CONFIG_X86_REBOOTFIXUPS is not set @@ -505,12 +485,13 @@ CONFIG_CPU_FREQ_GOV_ONDEMAND=y # x86 CPU frequency scaling drivers # # CONFIG_X86_PCC_CPUFREQ is not set -# CONFIG_X86_ACPI_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=y +# 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 @@ -521,8 +502,7 @@ CONFIG_X86_SPEEDSTEP_ICH=y # # shared options # -CONFIG_X86_SPEEDSTEP_LIB=y -# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set +# CONFIG_X86_SPEEDSTEP_LIB is not set CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_GOV_LADDER=y CONFIG_CPU_IDLE_GOV_MENU=y @@ -752,7 +732,6 @@ CONFIG_DNS_RESOLVER=y CONFIG_RPS=y CONFIG_RFS_ACCEL=y CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set CONFIG_BQL=y # @@ -2190,16 +2169,16 @@ CONFIG_FONT_8x16=y # CONFIG_LOGO is not set CONFIG_SOUND=y # CONFIG_SOUND_OSS_CORE is not set -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=y CONFIG_SND_RAWMIDI=m CONFIG_SND_JACK=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_HRTIMER=y CONFIG_SND_DYNAMIC_MINORS=y # CONFIG_SND_SUPPORT_OLD_API is not set # CONFIG_SND_VERBOSE_PROCFS is not set @@ -2257,7 +2236,7 @@ CONFIG_SND_PCI=y # CONFIG_SND_ES1938 is not set # CONFIG_SND_ES1968 is not set # CONFIG_SND_FM801 is not set -CONFIG_SND_HDA_INTEL=m +CONFIG_SND_HDA_INTEL=y CONFIG_SND_HDA_PREALLOC_SIZE=64 CONFIG_SND_HDA_HWDEP=y CONFIG_SND_HDA_RECONFIG=y @@ -2755,8 +2734,7 @@ CONFIG_NET_VENDOR_SILICOM=y CONFIG_CLKSRC_I8253=y CONFIG_CLKEVT_I8253=y CONFIG_CLKBLD_I8253=y -CONFIG_IOMMU_SUPPORT=y -# CONFIG_INTEL_IOMMU is not set +# CONFIG_IOMMU_SUPPORT is not set # # Remoteproc drivers (EXPERIMENTAL) diff --git a/projects/Fusion/linux/linux.i386.conf b/projects/Fusion/linux/linux.i386.conf index 7d86a7fd7f..d773092ffc 100644 --- a/projects/Fusion/linux/linux.i386.conf +++ b/projects/Fusion/linux/linux.i386.conf @@ -117,28 +117,10 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=16 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -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_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set +# CONFIG_CGROUPS is not set # CONFIG_CHECKPOINT_RESTORE is not set -CONFIG_NAMESPACES=y -CONFIG_UTS_NS=y -CONFIG_IPC_NS=y -CONFIG_PID_NS=y -CONFIG_NET_NS=y -CONFIG_SCHED_AUTOGROUP=y +# CONFIG_NAMESPACES is not set +# CONFIG_SCHED_AUTOGROUP is not set # CONFIG_SYSFS_DEPRECATED is not set # CONFIG_RELAY is not set CONFIG_BLK_DEV_INITRD=y @@ -174,7 +156,7 @@ CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y -CONFIG_AIO=y +# CONFIG_AIO is not set # CONFIG_EMBEDDED is not set CONFIG_HAVE_PERF_EVENTS=y @@ -360,7 +342,7 @@ CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y # CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set # CONFIG_X86_MCE is not set -CONFIG_VM86=y +# CONFIG_VM86 is not set # CONFIG_TOSHIBA is not set # CONFIG_I8K is not set # CONFIG_X86_REBOOTFIXUPS is not set @@ -757,7 +739,6 @@ CONFIG_DNS_RESOLVER=y CONFIG_RPS=y CONFIG_RFS_ACCEL=y CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set CONFIG_BQL=y # @@ -2465,8 +2446,8 @@ CONFIG_FONT_8x16=y # CONFIG_LOGO is not set CONFIG_SOUND=y # CONFIG_SOUND_OSS_CORE is not set -CONFIG_SND=m -CONFIG_SND_TIMER=m +CONFIG_SND=y +CONFIG_SND_TIMER=y CONFIG_SND_PCM=m CONFIG_SND_HWDEP=m CONFIG_SND_RAWMIDI=m @@ -2474,7 +2455,7 @@ CONFIG_SND_JACK=y # CONFIG_SND_SEQUENCER is not set # CONFIG_SND_MIXER_OSS is not set # CONFIG_SND_PCM_OSS is not set -CONFIG_SND_HRTIMER=m +CONFIG_SND_HRTIMER=y CONFIG_SND_DYNAMIC_MINORS=y # CONFIG_SND_SUPPORT_OLD_API is not set # CONFIG_SND_VERBOSE_PROCFS is not set @@ -3071,8 +3052,7 @@ CONFIG_ACPI_WMI=m CONFIG_CLKSRC_I8253=y CONFIG_CLKEVT_I8253=y CONFIG_CLKBLD_I8253=y -CONFIG_IOMMU_SUPPORT=y -# CONFIG_INTEL_IOMMU is not set +# CONFIG_IOMMU_SUPPORT is not set # # Remoteproc drivers (EXPERIMENTAL) diff --git a/projects/Fusion/linux/linux.x86_64.conf b/projects/Fusion/linux/linux.x86_64.conf index 7d7b9faae8..1f67676900 100644 --- a/projects/Fusion/linux/linux.x86_64.conf +++ b/projects/Fusion/linux/linux.x86_64.conf @@ -119,28 +119,10 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=16 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -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_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set +# CONFIG_CGROUPS is not set # CONFIG_CHECKPOINT_RESTORE is not set -CONFIG_NAMESPACES=y -CONFIG_UTS_NS=y -CONFIG_IPC_NS=y -CONFIG_PID_NS=y -CONFIG_NET_NS=y -CONFIG_SCHED_AUTOGROUP=y +# CONFIG_NAMESPACES is not set +# CONFIG_SCHED_AUTOGROUP is not set # CONFIG_SYSFS_DEPRECATED is not set # CONFIG_RELAY is not set CONFIG_BLK_DEV_INITRD=y @@ -176,7 +158,7 @@ CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y -CONFIG_AIO=y +# CONFIG_AIO is not set # CONFIG_EMBEDDED is not set CONFIG_HAVE_PERF_EVENTS=y @@ -722,7 +704,6 @@ CONFIG_DNS_RESOLVER=y CONFIG_RPS=y CONFIG_RFS_ACCEL=y CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set CONFIG_BQL=y # CONFIG_BPF_JIT is not set @@ -2412,8 +2393,8 @@ CONFIG_FONT_8x16=y # CONFIG_LOGO is not set CONFIG_SOUND=y # CONFIG_SOUND_OSS_CORE is not set -CONFIG_SND=m -CONFIG_SND_TIMER=m +CONFIG_SND=y +CONFIG_SND_TIMER=y CONFIG_SND_PCM=m CONFIG_SND_HWDEP=m CONFIG_SND_RAWMIDI=m @@ -2421,7 +2402,7 @@ CONFIG_SND_JACK=y # CONFIG_SND_SEQUENCER is not set # CONFIG_SND_MIXER_OSS is not set # CONFIG_SND_PCM_OSS is not set -CONFIG_SND_HRTIMER=m +CONFIG_SND_HRTIMER=y CONFIG_SND_DYNAMIC_MINORS=y # CONFIG_SND_SUPPORT_OLD_API is not set # CONFIG_SND_VERBOSE_PROCFS is not set @@ -3013,10 +2994,7 @@ CONFIG_ACPI_WMI=m # CONFIG_CLKEVT_I8253=y CONFIG_CLKBLD_I8253=y -CONFIG_IOMMU_SUPPORT=y -# CONFIG_AMD_IOMMU is not set -# CONFIG_INTEL_IOMMU is not set -# CONFIG_IRQ_REMAP is not set +# CONFIG_IOMMU_SUPPORT is not set # # Remoteproc drivers (EXPERIMENTAL) diff --git a/projects/Fusion/xbmc/advancedsettings.xml b/projects/Fusion/xbmc/advancedsettings.xml index a77140b427..a2942f0628 100644 --- a/projects/Fusion/xbmc/advancedsettings.xml +++ b/projects/Fusion/xbmc/advancedsettings.xml @@ -1,5 +1,24 @@ + false + cputemp + gputemp + + + 30 + + + 30 + false diff --git a/projects/Generic/linux/linux.i386.conf b/projects/Generic/linux/linux.i386.conf index 21f53f33d0..4b65ef1df5 100644 --- a/projects/Generic/linux/linux.i386.conf +++ b/projects/Generic/linux/linux.i386.conf @@ -119,28 +119,10 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=16 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -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_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set +# CONFIG_CGROUPS is not set # CONFIG_CHECKPOINT_RESTORE is not set -CONFIG_NAMESPACES=y -CONFIG_UTS_NS=y -CONFIG_IPC_NS=y -CONFIG_PID_NS=y -CONFIG_NET_NS=y -CONFIG_SCHED_AUTOGROUP=y +# CONFIG_NAMESPACES is not set +# CONFIG_SCHED_AUTOGROUP is not set # CONFIG_SYSFS_DEPRECATED is not set # CONFIG_RELAY is not set CONFIG_BLK_DEV_INITRD=y @@ -176,7 +158,7 @@ CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y -CONFIG_AIO=y +# CONFIG_AIO is not set # CONFIG_EMBEDDED is not set CONFIG_HAVE_PERF_EVENTS=y @@ -364,7 +346,7 @@ CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y # CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set # CONFIG_X86_MCE is not set -CONFIG_VM86=y +# CONFIG_VM86 is not set # CONFIG_TOSHIBA is not set # CONFIG_I8K is not set # CONFIG_X86_REBOOTFIXUPS is not set @@ -520,7 +502,7 @@ CONFIG_X86_POWERNOW_K8=y # 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_P4_CLOCKMOD=y # CONFIG_X86_CPUFREQ_NFORCE2 is not set # CONFIG_X86_LONGRUN is not set # CONFIG_X86_LONGHAUL is not set @@ -529,7 +511,7 @@ CONFIG_X86_POWERNOW_K8=y # # shared options # -# CONFIG_X86_SPEEDSTEP_LIB is not set +CONFIG_X86_SPEEDSTEP_LIB=y CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_GOV_LADDER=y CONFIG_CPU_IDLE_GOV_MENU=y @@ -763,7 +745,6 @@ CONFIG_DNS_RESOLVER=y CONFIG_RPS=y CONFIG_RFS_ACCEL=y CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set CONFIG_BQL=y # @@ -2587,8 +2568,8 @@ CONFIG_FONT_8x16=y # CONFIG_LOGO is not set CONFIG_SOUND=y # CONFIG_SOUND_OSS_CORE is not set -CONFIG_SND=m -CONFIG_SND_TIMER=m +CONFIG_SND=y +CONFIG_SND_TIMER=y CONFIG_SND_PCM=m CONFIG_SND_HWDEP=m CONFIG_SND_RAWMIDI=m @@ -2596,7 +2577,7 @@ CONFIG_SND_JACK=y # CONFIG_SND_SEQUENCER is not set # CONFIG_SND_MIXER_OSS is not set # CONFIG_SND_PCM_OSS is not set -CONFIG_SND_HRTIMER=m +CONFIG_SND_HRTIMER=y CONFIG_SND_DYNAMIC_MINORS=y # CONFIG_SND_SUPPORT_OLD_API is not set # CONFIG_SND_VERBOSE_PROCFS is not set @@ -3253,8 +3234,7 @@ CONFIG_ACPI_WMI=m CONFIG_CLKSRC_I8253=y CONFIG_CLKEVT_I8253=y CONFIG_CLKBLD_I8253=y -CONFIG_IOMMU_SUPPORT=y -# CONFIG_INTEL_IOMMU is not set +# CONFIG_IOMMU_SUPPORT is not set # # Remoteproc drivers (EXPERIMENTAL) diff --git a/projects/Generic_OSS/linux/linux.i386.conf b/projects/Generic_OSS/linux/linux.i386.conf index 04283ed507..c71addab24 100644 --- a/projects/Generic_OSS/linux/linux.i386.conf +++ b/projects/Generic_OSS/linux/linux.i386.conf @@ -119,28 +119,10 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=16 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -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_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set +# CONFIG_CGROUPS is not set # CONFIG_CHECKPOINT_RESTORE is not set -CONFIG_NAMESPACES=y -CONFIG_UTS_NS=y -CONFIG_IPC_NS=y -CONFIG_PID_NS=y -CONFIG_NET_NS=y -CONFIG_SCHED_AUTOGROUP=y +# CONFIG_NAMESPACES is not set +# CONFIG_SCHED_AUTOGROUP is not set # CONFIG_SYSFS_DEPRECATED is not set # CONFIG_RELAY is not set CONFIG_BLK_DEV_INITRD=y @@ -176,7 +158,7 @@ CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y -CONFIG_AIO=y +# CONFIG_AIO is not set # CONFIG_EMBEDDED is not set CONFIG_HAVE_PERF_EVENTS=y @@ -364,7 +346,7 @@ CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y # CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set # CONFIG_X86_MCE is not set -CONFIG_VM86=y +# CONFIG_VM86 is not set # CONFIG_TOSHIBA is not set # CONFIG_I8K is not set # CONFIG_X86_REBOOTFIXUPS is not set @@ -520,7 +502,7 @@ CONFIG_X86_POWERNOW_K8=y # 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_P4_CLOCKMOD=y # CONFIG_X86_CPUFREQ_NFORCE2 is not set # CONFIG_X86_LONGRUN is not set # CONFIG_X86_LONGHAUL is not set @@ -529,7 +511,7 @@ CONFIG_X86_POWERNOW_K8=y # # shared options # -# CONFIG_X86_SPEEDSTEP_LIB is not set +CONFIG_X86_SPEEDSTEP_LIB=y CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_GOV_LADDER=y CONFIG_CPU_IDLE_GOV_MENU=y @@ -763,7 +745,6 @@ CONFIG_DNS_RESOLVER=y CONFIG_RPS=y CONFIG_RFS_ACCEL=y CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set CONFIG_BQL=y # @@ -2590,8 +2571,8 @@ CONFIG_FONT_8x16=y # CONFIG_LOGO is not set CONFIG_SOUND=y # CONFIG_SOUND_OSS_CORE is not set -CONFIG_SND=m -CONFIG_SND_TIMER=m +CONFIG_SND=y +CONFIG_SND_TIMER=y CONFIG_SND_PCM=m CONFIG_SND_HWDEP=m CONFIG_SND_RAWMIDI=m @@ -2599,7 +2580,7 @@ CONFIG_SND_JACK=y # CONFIG_SND_SEQUENCER is not set # CONFIG_SND_MIXER_OSS is not set # CONFIG_SND_PCM_OSS is not set -CONFIG_SND_HRTIMER=m +CONFIG_SND_HRTIMER=y CONFIG_SND_DYNAMIC_MINORS=y # CONFIG_SND_SUPPORT_OLD_API is not set # CONFIG_SND_VERBOSE_PROCFS is not set @@ -3256,8 +3237,7 @@ CONFIG_MXM_WMI=y CONFIG_CLKSRC_I8253=y CONFIG_CLKEVT_I8253=y CONFIG_CLKBLD_I8253=y -CONFIG_IOMMU_SUPPORT=y -# CONFIG_INTEL_IOMMU is not set +# CONFIG_IOMMU_SUPPORT is not set # # Remoteproc drivers (EXPERIMENTAL) diff --git a/projects/ION/linux/linux.i386.conf b/projects/ION/linux/linux.i386.conf index 6a13bd2325..bd37918dd9 100644 --- a/projects/ION/linux/linux.i386.conf +++ b/projects/ION/linux/linux.i386.conf @@ -119,28 +119,10 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=16 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -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_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set +# CONFIG_CGROUPS is not set # CONFIG_CHECKPOINT_RESTORE is not set -CONFIG_NAMESPACES=y -CONFIG_UTS_NS=y -CONFIG_IPC_NS=y -CONFIG_PID_NS=y -CONFIG_NET_NS=y -CONFIG_SCHED_AUTOGROUP=y +# CONFIG_NAMESPACES is not set +# CONFIG_SCHED_AUTOGROUP is not set # CONFIG_SYSFS_DEPRECATED is not set # CONFIG_RELAY is not set CONFIG_BLK_DEV_INITRD=y @@ -176,7 +158,7 @@ CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y -CONFIG_AIO=y +# CONFIG_AIO is not set # CONFIG_EMBEDDED is not set CONFIG_HAVE_PERF_EVENTS=y @@ -362,7 +344,7 @@ CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y # CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set # CONFIG_X86_MCE is not set -CONFIG_VM86=y +# CONFIG_VM86 is not set # CONFIG_TOSHIBA is not set # CONFIG_I8K is not set # CONFIG_X86_REBOOTFIXUPS is not set @@ -516,7 +498,7 @@ CONFIG_X86_ACPI_CPUFREQ=y # 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_P4_CLOCKMOD=y # CONFIG_X86_CPUFREQ_NFORCE2 is not set # CONFIG_X86_LONGRUN is not set # CONFIG_X86_LONGHAUL is not set @@ -525,7 +507,7 @@ CONFIG_X86_ACPI_CPUFREQ=y # # shared options # -# CONFIG_X86_SPEEDSTEP_LIB is not set +CONFIG_X86_SPEEDSTEP_LIB=y CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_GOV_LADDER=y CONFIG_CPU_IDLE_GOV_MENU=y @@ -758,7 +740,6 @@ CONFIG_DNS_RESOLVER=y CONFIG_RPS=y CONFIG_RFS_ACCEL=y CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set CONFIG_BQL=y # @@ -2478,8 +2459,8 @@ CONFIG_FONT_8x16=y # CONFIG_LOGO is not set CONFIG_SOUND=y # CONFIG_SOUND_OSS_CORE is not set -CONFIG_SND=m -CONFIG_SND_TIMER=m +CONFIG_SND=y +CONFIG_SND_TIMER=y CONFIG_SND_PCM=m CONFIG_SND_HWDEP=m CONFIG_SND_RAWMIDI=m @@ -2487,7 +2468,7 @@ CONFIG_SND_JACK=y # CONFIG_SND_SEQUENCER is not set # CONFIG_SND_MIXER_OSS is not set # CONFIG_SND_PCM_OSS is not set -CONFIG_SND_HRTIMER=m +CONFIG_SND_HRTIMER=y CONFIG_SND_DYNAMIC_MINORS=y # CONFIG_SND_SUPPORT_OLD_API is not set # CONFIG_SND_VERBOSE_PROCFS is not set @@ -3101,8 +3082,7 @@ CONFIG_NET_VENDOR_SILICOM=y CONFIG_CLKSRC_I8253=y CONFIG_CLKEVT_I8253=y CONFIG_CLKBLD_I8253=y -CONFIG_IOMMU_SUPPORT=y -# CONFIG_INTEL_IOMMU is not set +# CONFIG_IOMMU_SUPPORT is not set # # Remoteproc drivers (EXPERIMENTAL) diff --git a/projects/ION/linux/linux.x86_64.conf b/projects/ION/linux/linux.x86_64.conf index 9861af854f..8d1c533cc6 100644 --- a/projects/ION/linux/linux.x86_64.conf +++ b/projects/ION/linux/linux.x86_64.conf @@ -121,28 +121,10 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=16 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -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_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set +# CONFIG_CGROUPS is not set # CONFIG_CHECKPOINT_RESTORE is not set -CONFIG_NAMESPACES=y -CONFIG_UTS_NS=y -CONFIG_IPC_NS=y -CONFIG_PID_NS=y -CONFIG_NET_NS=y -CONFIG_SCHED_AUTOGROUP=y +# CONFIG_NAMESPACES is not set +# CONFIG_SCHED_AUTOGROUP is not set # CONFIG_SYSFS_DEPRECATED is not set # CONFIG_RELAY is not set CONFIG_BLK_DEV_INITRD=y @@ -176,7 +158,7 @@ CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y -CONFIG_AIO=y +# CONFIG_AIO is not set # CONFIG_EMBEDDED is not set CONFIG_HAVE_PERF_EVENTS=y @@ -475,12 +457,12 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y CONFIG_X86_ACPI_CPUFREQ=y # CONFIG_X86_POWERNOW_K8 is not set # CONFIG_X86_SPEEDSTEP_CENTRINO is not set -# CONFIG_X86_P4_CLOCKMOD is not set +CONFIG_X86_P4_CLOCKMOD=y # # shared options # -# CONFIG_X86_SPEEDSTEP_LIB is not set +CONFIG_X86_SPEEDSTEP_LIB=y CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_GOV_LADDER=y CONFIG_CPU_IDLE_GOV_MENU=y @@ -707,7 +689,6 @@ CONFIG_DNS_RESOLVER=y CONFIG_RPS=y CONFIG_RFS_ACCEL=y CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set CONFIG_BQL=y # CONFIG_BPF_JIT is not set @@ -2407,8 +2388,8 @@ CONFIG_FONT_8x16=y # CONFIG_LOGO is not set CONFIG_SOUND=y # CONFIG_SOUND_OSS_CORE is not set -CONFIG_SND=m -CONFIG_SND_TIMER=m +CONFIG_SND=y +CONFIG_SND_TIMER=y CONFIG_SND_PCM=m CONFIG_SND_HWDEP=m CONFIG_SND_RAWMIDI=m @@ -2416,7 +2397,7 @@ CONFIG_SND_JACK=y # CONFIG_SND_SEQUENCER is not set # CONFIG_SND_MIXER_OSS is not set # CONFIG_SND_PCM_OSS is not set -CONFIG_SND_HRTIMER=m +CONFIG_SND_HRTIMER=y CONFIG_SND_DYNAMIC_MINORS=y # CONFIG_SND_SUPPORT_OLD_API is not set # CONFIG_SND_VERBOSE_PROCFS is not set @@ -3025,10 +3006,7 @@ CONFIG_NET_VENDOR_SILICOM=y # CONFIG_CLKEVT_I8253=y CONFIG_CLKBLD_I8253=y -CONFIG_IOMMU_SUPPORT=y -# CONFIG_AMD_IOMMU is not set -# CONFIG_INTEL_IOMMU is not set -# CONFIG_IRQ_REMAP is not set +# CONFIG_IOMMU_SUPPORT is not set # # Remoteproc drivers (EXPERIMENTAL) diff --git a/projects/Intel/linux/linux.i386.conf b/projects/Intel/linux/linux.i386.conf index ef78acab51..c300edde03 100644 --- a/projects/Intel/linux/linux.i386.conf +++ b/projects/Intel/linux/linux.i386.conf @@ -119,28 +119,10 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=16 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -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_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set +# CONFIG_CGROUPS is not set # CONFIG_CHECKPOINT_RESTORE is not set -CONFIG_NAMESPACES=y -CONFIG_UTS_NS=y -CONFIG_IPC_NS=y -CONFIG_PID_NS=y -CONFIG_NET_NS=y -CONFIG_SCHED_AUTOGROUP=y +# CONFIG_NAMESPACES is not set +# CONFIG_SCHED_AUTOGROUP is not set # CONFIG_SYSFS_DEPRECATED is not set # CONFIG_RELAY is not set CONFIG_BLK_DEV_INITRD=y @@ -176,7 +158,7 @@ CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y -CONFIG_AIO=y +# CONFIG_AIO is not set # CONFIG_EMBEDDED is not set CONFIG_HAVE_PERF_EVENTS=y @@ -363,7 +345,7 @@ CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y # CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set # CONFIG_X86_MCE is not set -CONFIG_VM86=y +# CONFIG_VM86 is not set # CONFIG_TOSHIBA is not set # CONFIG_I8K is not set # CONFIG_X86_REBOOTFIXUPS is not set @@ -760,7 +742,6 @@ CONFIG_DNS_RESOLVER=y CONFIG_RPS=y CONFIG_RFS_ACCEL=y CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set CONFIG_BQL=y # @@ -2529,8 +2510,8 @@ CONFIG_FONT_8x16=y # CONFIG_LOGO is not set CONFIG_SOUND=y # CONFIG_SOUND_OSS_CORE is not set -CONFIG_SND=m -CONFIG_SND_TIMER=m +CONFIG_SND=y +CONFIG_SND_TIMER=y CONFIG_SND_PCM=m CONFIG_SND_HWDEP=m CONFIG_SND_RAWMIDI=m @@ -2538,7 +2519,7 @@ CONFIG_SND_JACK=y # CONFIG_SND_SEQUENCER is not set # CONFIG_SND_MIXER_OSS is not set # CONFIG_SND_PCM_OSS is not set -CONFIG_SND_HRTIMER=m +CONFIG_SND_HRTIMER=y CONFIG_SND_DYNAMIC_MINORS=y # CONFIG_SND_SUPPORT_OLD_API is not set # CONFIG_SND_VERBOSE_PROCFS is not set @@ -3148,8 +3129,7 @@ CONFIG_NET_VENDOR_SILICOM=y CONFIG_CLKSRC_I8253=y CONFIG_CLKEVT_I8253=y CONFIG_CLKBLD_I8253=y -CONFIG_IOMMU_SUPPORT=y -# CONFIG_INTEL_IOMMU is not set +# CONFIG_IOMMU_SUPPORT is not set # # Remoteproc drivers (EXPERIMENTAL) diff --git a/projects/Intel/linux/linux.x86_64.conf b/projects/Intel/linux/linux.x86_64.conf index 0df18c9c11..c21f3eeec4 100644 --- a/projects/Intel/linux/linux.x86_64.conf +++ b/projects/Intel/linux/linux.x86_64.conf @@ -121,28 +121,10 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=16 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -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_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set +# CONFIG_CGROUPS is not set # CONFIG_CHECKPOINT_RESTORE is not set -CONFIG_NAMESPACES=y -CONFIG_UTS_NS=y -CONFIG_IPC_NS=y -CONFIG_PID_NS=y -CONFIG_NET_NS=y -CONFIG_SCHED_AUTOGROUP=y +# CONFIG_NAMESPACES is not set +# CONFIG_SCHED_AUTOGROUP is not set # CONFIG_SYSFS_DEPRECATED is not set # CONFIG_RELAY is not set CONFIG_BLK_DEV_INITRD=y @@ -176,7 +158,7 @@ CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y -CONFIG_AIO=y +# CONFIG_AIO is not set # CONFIG_EMBEDDED is not set CONFIG_HAVE_PERF_EVENTS=y @@ -710,7 +692,6 @@ CONFIG_DNS_RESOLVER=y CONFIG_RPS=y CONFIG_RFS_ACCEL=y CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set CONFIG_BQL=y # CONFIG_BPF_JIT is not set @@ -2459,8 +2440,8 @@ CONFIG_FONT_8x16=y # CONFIG_LOGO is not set CONFIG_SOUND=y # CONFIG_SOUND_OSS_CORE is not set -CONFIG_SND=m -CONFIG_SND_TIMER=m +CONFIG_SND=y +CONFIG_SND_TIMER=y CONFIG_SND_PCM=m CONFIG_SND_HWDEP=m CONFIG_SND_RAWMIDI=m @@ -2468,7 +2449,7 @@ CONFIG_SND_JACK=y # CONFIG_SND_SEQUENCER is not set # CONFIG_SND_MIXER_OSS is not set # CONFIG_SND_PCM_OSS is not set -CONFIG_SND_HRTIMER=m +CONFIG_SND_HRTIMER=y CONFIG_SND_DYNAMIC_MINORS=y # CONFIG_SND_SUPPORT_OLD_API is not set # CONFIG_SND_VERBOSE_PROCFS is not set @@ -3073,10 +3054,7 @@ CONFIG_NET_VENDOR_SILICOM=y # CONFIG_CLKEVT_I8253=y CONFIG_CLKBLD_I8253=y -CONFIG_IOMMU_SUPPORT=y -# CONFIG_AMD_IOMMU is not set -# CONFIG_INTEL_IOMMU is not set -# CONFIG_IRQ_REMAP is not set +# CONFIG_IOMMU_SUPPORT is not set # # Remoteproc drivers (EXPERIMENTAL) diff --git a/projects/RPi/linux/linux.arm.conf b/projects/RPi/linux/linux.arm.conf index 1bb9ea523c..c7d7823630 100644 --- a/projects/RPi/linux/linux.arm.conf +++ b/projects/RPi/linux/linux.arm.conf @@ -83,21 +83,10 @@ CONFIG_RCU_BOOST_DELAY=500 CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=17 -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -# 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 is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -# CONFIG_RT_GROUP_SCHED is not set -# CONFIG_BLK_CGROUP is not set +# CONFIG_CGROUPS is not set # CONFIG_CHECKPOINT_RESTORE is not set # CONFIG_NAMESPACES is not set -CONFIG_SCHED_AUTOGROUP=y +# CONFIG_SCHED_AUTOGROUP is not set # CONFIG_SYSFS_DEPRECATED is not set # CONFIG_RELAY is not set CONFIG_BLK_DEV_INITRD=y @@ -130,7 +119,7 @@ CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y -CONFIG_AIO=y +# CONFIG_AIO is not set CONFIG_EMBEDDED=y CONFIG_HAVE_PERF_EVENTS=y CONFIG_PERF_USE_VMALLOC=y @@ -635,7 +624,6 @@ CONFIG_LLC=y CONFIG_DNS_RESOLVER=y # CONFIG_BATMAN_ADV is not set # CONFIG_OPENVSWITCH is not set -# CONFIG_NETPRIO_CGROUP is not set CONFIG_BQL=y # CONFIG_BPF_JIT is not set diff --git a/projects/Ultra/linux/linux.x86_64.conf b/projects/Ultra/linux/linux.x86_64.conf index d755480cc1..8bb1fd3d15 100644 --- a/projects/Ultra/linux/linux.x86_64.conf +++ b/projects/Ultra/linux/linux.x86_64.conf @@ -121,28 +121,10 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=16 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -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_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set +# CONFIG_CGROUPS is not set # CONFIG_CHECKPOINT_RESTORE is not set -CONFIG_NAMESPACES=y -CONFIG_UTS_NS=y -CONFIG_IPC_NS=y -CONFIG_PID_NS=y -CONFIG_NET_NS=y -CONFIG_SCHED_AUTOGROUP=y +# CONFIG_NAMESPACES is not set +# CONFIG_SCHED_AUTOGROUP is not set # CONFIG_SYSFS_DEPRECATED is not set # CONFIG_RELAY is not set CONFIG_BLK_DEV_INITRD=y @@ -176,7 +158,7 @@ CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y -CONFIG_AIO=y +# CONFIG_AIO is not set # CONFIG_EMBEDDED is not set CONFIG_HAVE_PERF_EVENTS=y @@ -707,7 +689,6 @@ CONFIG_DNS_RESOLVER=y CONFIG_RPS=y CONFIG_RFS_ACCEL=y CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set CONFIG_BQL=y # CONFIG_BPF_JIT is not set @@ -2233,16 +2214,16 @@ CONFIG_FONT_8x16=y # CONFIG_LOGO is not set CONFIG_SOUND=y # CONFIG_SOUND_OSS_CORE is not set -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=y CONFIG_SND_RAWMIDI=m CONFIG_SND_JACK=y # CONFIG_SND_SEQUENCER is not set # CONFIG_SND_MIXER_OSS is not set # CONFIG_SND_PCM_OSS is not set -CONFIG_SND_HRTIMER=m +CONFIG_SND_HRTIMER=y CONFIG_SND_DYNAMIC_MINORS=y # CONFIG_SND_SUPPORT_OLD_API is not set # CONFIG_SND_VERBOSE_PROCFS is not set @@ -2298,7 +2279,7 @@ CONFIG_SND_PCI=y # CONFIG_SND_ES1938 is not set # CONFIG_SND_ES1968 is not set # CONFIG_SND_FM801 is not set -CONFIG_SND_HDA_INTEL=m +CONFIG_SND_HDA_INTEL=y CONFIG_SND_HDA_PREALLOC_SIZE=64 CONFIG_SND_HDA_HWDEP=y CONFIG_SND_HDA_RECONFIG=y @@ -2802,10 +2783,7 @@ CONFIG_NET_VENDOR_SILICOM=y # CONFIG_CLKEVT_I8253=y CONFIG_CLKBLD_I8253=y -CONFIG_IOMMU_SUPPORT=y -# CONFIG_AMD_IOMMU is not set -# CONFIG_INTEL_IOMMU is not set -# CONFIG_IRQ_REMAP is not set +# CONFIG_IOMMU_SUPPORT is not set # # Remoteproc drivers (EXPERIMENTAL) diff --git a/projects/Virtual/linux/linux.i386.conf b/projects/Virtual/linux/linux.i386.conf index 4d280cc891..39bba34193 100644 --- a/projects/Virtual/linux/linux.i386.conf +++ b/projects/Virtual/linux/linux.i386.conf @@ -119,28 +119,10 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=16 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -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_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set +# CONFIG_CGROUPS is not set # CONFIG_CHECKPOINT_RESTORE is not set -CONFIG_NAMESPACES=y -CONFIG_UTS_NS=y -CONFIG_IPC_NS=y -CONFIG_PID_NS=y -CONFIG_NET_NS=y -CONFIG_SCHED_AUTOGROUP=y +# CONFIG_NAMESPACES is not set +# CONFIG_SCHED_AUTOGROUP is not set # CONFIG_SYSFS_DEPRECATED is not set # CONFIG_RELAY is not set CONFIG_BLK_DEV_INITRD=y @@ -176,7 +158,7 @@ CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y -CONFIG_AIO=y +# CONFIG_AIO is not set # CONFIG_EMBEDDED is not set CONFIG_HAVE_PERF_EVENTS=y @@ -361,7 +343,7 @@ CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y # CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS is not set # CONFIG_X86_MCE is not set -CONFIG_VM86=y +# CONFIG_VM86 is not set # CONFIG_TOSHIBA is not set # CONFIG_I8K is not set # CONFIG_X86_REBOOTFIXUPS is not set @@ -758,7 +740,6 @@ CONFIG_DNS_RESOLVER=y CONFIG_RPS=y CONFIG_RFS_ACCEL=y CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set CONFIG_BQL=y # @@ -2534,8 +2515,8 @@ CONFIG_FONT_8x16=y # CONFIG_LOGO is not set CONFIG_SOUND=y # CONFIG_SOUND_OSS_CORE is not set -CONFIG_SND=m -CONFIG_SND_TIMER=m +CONFIG_SND=y +CONFIG_SND_TIMER=y CONFIG_SND_PCM=m CONFIG_SND_HWDEP=m CONFIG_SND_RAWMIDI=m @@ -2543,7 +2524,7 @@ CONFIG_SND_JACK=y # CONFIG_SND_SEQUENCER is not set # CONFIG_SND_MIXER_OSS is not set # CONFIG_SND_PCM_OSS is not set -CONFIG_SND_HRTIMER=m +CONFIG_SND_HRTIMER=y CONFIG_SND_DYNAMIC_MINORS=y # CONFIG_SND_SUPPORT_OLD_API is not set # CONFIG_SND_VERBOSE_PROCFS is not set @@ -3145,8 +3126,7 @@ CONFIG_NET_VENDOR_SILICOM=y CONFIG_CLKSRC_I8253=y CONFIG_CLKEVT_I8253=y CONFIG_CLKBLD_I8253=y -CONFIG_IOMMU_SUPPORT=y -# CONFIG_INTEL_IOMMU is not set +# CONFIG_IOMMU_SUPPORT is not set # # Remoteproc drivers (EXPERIMENTAL) diff --git a/projects/Virtual/linux/linux.x86_64.conf b/projects/Virtual/linux/linux.x86_64.conf index bba2e7407e..16cc7a4893 100644 --- a/projects/Virtual/linux/linux.x86_64.conf +++ b/projects/Virtual/linux/linux.x86_64.conf @@ -121,28 +121,10 @@ CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=16 CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y -CONFIG_CGROUPS=y -# CONFIG_CGROUP_DEBUG is not set -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_MEMCG is not set -# CONFIG_CGROUP_PERF is not set -CONFIG_CGROUP_SCHED=y -CONFIG_FAIR_GROUP_SCHED=y -# CONFIG_CFS_BANDWIDTH is not set -CONFIG_RT_GROUP_SCHED=y -# CONFIG_BLK_CGROUP is not set +# CONFIG_CGROUPS is not set # CONFIG_CHECKPOINT_RESTORE is not set -CONFIG_NAMESPACES=y -CONFIG_UTS_NS=y -CONFIG_IPC_NS=y -CONFIG_PID_NS=y -CONFIG_NET_NS=y -CONFIG_SCHED_AUTOGROUP=y +# CONFIG_NAMESPACES is not set +# CONFIG_SCHED_AUTOGROUP is not set # CONFIG_SYSFS_DEPRECATED is not set # CONFIG_RELAY is not set CONFIG_BLK_DEV_INITRD=y @@ -176,7 +158,7 @@ CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y -CONFIG_AIO=y +# CONFIG_AIO is not set # CONFIG_EMBEDDED is not set CONFIG_HAVE_PERF_EVENTS=y @@ -707,7 +689,6 @@ CONFIG_DNS_RESOLVER=y CONFIG_RPS=y CONFIG_RFS_ACCEL=y CONFIG_XPS=y -# CONFIG_NETPRIO_CGROUP is not set CONFIG_BQL=y # CONFIG_BPF_JIT is not set @@ -2463,8 +2444,8 @@ CONFIG_FONT_8x16=y # CONFIG_LOGO is not set CONFIG_SOUND=y # CONFIG_SOUND_OSS_CORE is not set -CONFIG_SND=m -CONFIG_SND_TIMER=m +CONFIG_SND=y +CONFIG_SND_TIMER=y CONFIG_SND_PCM=m CONFIG_SND_HWDEP=m CONFIG_SND_RAWMIDI=m @@ -2472,7 +2453,7 @@ CONFIG_SND_JACK=y # CONFIG_SND_SEQUENCER is not set # CONFIG_SND_MIXER_OSS is not set # CONFIG_SND_PCM_OSS is not set -CONFIG_SND_HRTIMER=m +CONFIG_SND_HRTIMER=y CONFIG_SND_DYNAMIC_MINORS=y # CONFIG_SND_SUPPORT_OLD_API is not set # CONFIG_SND_VERBOSE_PROCFS is not set @@ -3069,10 +3050,7 @@ CONFIG_NET_VENDOR_SILICOM=y # CONFIG_CLKEVT_I8253=y CONFIG_CLKBLD_I8253=y -CONFIG_IOMMU_SUPPORT=y -# CONFIG_AMD_IOMMU is not set -# CONFIG_INTEL_IOMMU is not set -# CONFIG_IRQ_REMAP is not set +# CONFIG_IOMMU_SUPPORT is not set # # Remoteproc drivers (EXPERIMENTAL) diff --git a/tools/mkpkg/mkpkg_xbmc-frodo b/tools/mkpkg/mkpkg_xbmc-frodo index 751289b3b4..2a4bd460e8 100755 --- a/tools/mkpkg/mkpkg_xbmc-frodo +++ b/tools/mkpkg/mkpkg_xbmc-frodo @@ -20,7 +20,7 @@ ################################################################################ PKG_NAME="xbmc" -PKG_VERSION="12.0.3" +PKG_VERSION="12.0.4" GIT_REPO="-b Frodo git://github.com/xbmc/xbmc.git" DEST_DIR="$PKG_NAME-frodo"