mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Merge remote-tracking branch 'upstream/master' into openelec-3.2
This commit is contained in:
commit
03b54b0e6b
@ -344,7 +344,8 @@ if [ "$BOOTLOADER" = "u-boot" ]; then
|
||||
config_message="$config_message\n - U-Boot configuration:\t\t $UBOOT_CONFIG"
|
||||
config_message="$config_message\n - U-Boot config file:\t\t\t $UBOOT_CONFIGFILE"
|
||||
fi
|
||||
config_message="$config_message\n - UDisks support:\t\t\t $UDISKS"
|
||||
config_message="$config_message\n - UDevil support:\t\t\t $UDEVIL"
|
||||
config_message="$config_message\n - Parted support:\t\t\t $PARTED"
|
||||
config_message="$config_message\n - UPower support:\t\t\t $UPOWER"
|
||||
config_message="$config_message\n - Installer support:\t\t\t $INSTALLER_SUPPORT"
|
||||
|
||||
|
@ -38,6 +38,11 @@ PKG_AUTORECONF="no"
|
||||
CC_FOR_BUILD="$HOST_CC"
|
||||
CFLAGS_FOR_BUILD="$HOST_CFLAGS"
|
||||
|
||||
pre_configure_target() {
|
||||
strip_gold
|
||||
strip_lto
|
||||
}
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="bash_cv_have_mbstate_t=set \
|
||||
--disable-shared \
|
||||
--enable-static \
|
||||
|
@ -19,12 +19,12 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Mesa"
|
||||
PKG_VERSION="9.1.6"
|
||||
PKG_VERSION="9.2.0"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://www.mesa3d.org/"
|
||||
PKG_URL="ftp://freedesktop.org/pub/mesa/$PKG_VERSION/MesaLib-$PKG_VERSION.tar.bz2"
|
||||
PKG_URL="ftp://freedesktop.org/pub/mesa/9.2/MesaLib-$PKG_VERSION.tar.bz2"
|
||||
PKG_DEPENDS="libXdamage libdrm expat libXext libXfixes libX11"
|
||||
PKG_BUILD_DEPENDS_TARGET="toolchain Python-host makedepend:host libxml2-host expat glproto dri2proto libdrm libXext libXdamage libXfixes libXxf86vm libxcb libX11"
|
||||
PKG_PRIORITY="optional"
|
||||
|
@ -1,39 +0,0 @@
|
||||
diff -Naur Mesa-9.1.1/configure.ac Mesa-9.1.1.patch/configure.ac
|
||||
--- Mesa-9.1.1/configure.ac 2013-03-20 01:14:17.000000000 +0100
|
||||
+++ Mesa-9.1.1.patch/configure.ac 2013-05-01 02:51:48.086299947 +0200
|
||||
@@ -1923,7 +1923,9 @@
|
||||
if test "x$with_llvm_shared_libs" = xyes; then
|
||||
dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
|
||||
LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
|
||||
- AC_CHECK_FILE("$LLVM_LIBDIR/lib$LLVM_SO_NAME.so", llvm_have_one_so=yes,)
|
||||
+ if test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.so"; then
|
||||
+ llvm_have_one_so=yes
|
||||
+ fi
|
||||
|
||||
if test "x$llvm_have_one_so" = xyes; then
|
||||
dnl LLVM was built using auto*, so there is only one shared object.
|
||||
@@ -1931,8 +1933,8 @@
|
||||
else
|
||||
dnl If LLVM was built with CMake, there will be one shared object per
|
||||
dnl component.
|
||||
- AC_CHECK_FILE("$LLVM_LIBDIR/libLLVMTarget.so",,
|
||||
- AC_MSG_ERROR([Could not find llvm shared libraries:
|
||||
+ if test ! -f "$LLVM_LIBDIR/libLLVMTarget.so"; then
|
||||
+ AC_MSG_ERROR([Could not find llvm shared libraries:
|
||||
Please make sure you have built llvm with the --enable-shared option
|
||||
and that your llvm libraries are installed in $LLVM_LIBDIR
|
||||
If you have installed your llvm libraries to a different directory you
|
||||
@@ -1943,11 +1945,12 @@
|
||||
--enable-opencl
|
||||
If you do not want to build with llvm shared libraries and instead want to
|
||||
use llvm static libraries then remove these options from your configure
|
||||
- invocation and reconfigure.]))
|
||||
+ invocation and reconfigure.])
|
||||
|
||||
dnl We don't need to update LLVM_LIBS in this case because the LLVM
|
||||
dnl install uses a shared object for each compoenent and we have
|
||||
dnl already added all of these objects to LLVM_LIBS.
|
||||
+ fi
|
||||
fi
|
||||
fi
|
||||
fi
|
@ -1,60 +0,0 @@
|
||||
diff -up Mesa-9.1.1/src/glsl/builtin_compiler/Makefile.am.cross Mesa-9.1.1/src/glsl/builtin_compiler/Makefile.am
|
||||
--- Mesa-9.1.1/src/glsl/builtin_compiler/Makefile.am.cross 2013-03-28 14:56:22.990746189 +0100
|
||||
+++ Mesa-9.1.1/src/glsl/builtin_compiler/Makefile.am 2013-03-28 14:56:32.483577384 +0100
|
||||
@@ -64,13 +64,13 @@ AM_CXXFLAGS = $(AM_CFLAGS)
|
||||
include ../Makefile.sources
|
||||
|
||||
noinst_PROGRAMS = builtin_compiler
|
||||
-noinst_LTLIBRARIES = libglslcore.la libglcpp.la
|
||||
+noinst_LIBRARIES = libglslcore.a libglcpp.a
|
||||
|
||||
-libglcpp_la_SOURCES = \
|
||||
+libglcpp_a_SOURCES = \
|
||||
$(LIBGLCPP_GENERATED_FILES) \
|
||||
$(LIBGLCPP_FILES)
|
||||
|
||||
-libglslcore_la_SOURCES = \
|
||||
+libglslcore_a_SOURCES = \
|
||||
$(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
|
||||
$(LIBGLSL_FILES)
|
||||
|
||||
@@ -81,4 +81,4 @@ builtin_compiler_SOURCES = \
|
||||
$(top_srcdir)/src/mesa/program/symbol_table.c \
|
||||
$(BUILTIN_COMPILER_CXX_FILES) \
|
||||
$(GLSL_COMPILER_CXX_FILES)
|
||||
-builtin_compiler_LDADD = libglslcore.la libglcpp.la
|
||||
+builtin_compiler_LDADD = libglslcore.a libglcpp.a
|
||||
diff -up Mesa-9.1.1/src/glsl/Makefile.am.cross Mesa-9.1.1/src/glsl/Makefile.am
|
||||
--- Mesa-9.1.1/src/glsl/Makefile.am.cross 2013-03-28 14:56:26.565682626 +0100
|
||||
+++ Mesa-9.1.1/src/glsl/Makefile.am 2013-03-28 14:59:13.109723407 +0100
|
||||
@@ -73,14 +73,10 @@ tests_ralloc_test_LDADD = \
|
||||
$(top_builddir)/src/gtest/libgtest.la \
|
||||
$(PTHREAD_LIBS)
|
||||
|
||||
-if CROSS_COMPILING
|
||||
libglcpp_la_SOURCES = \
|
||||
glcpp/glcpp-lex.c \
|
||||
glcpp/glcpp-parse.c \
|
||||
$(LIBGLCPP_FILES)
|
||||
-else
|
||||
-libglcpp_la_LIBADD = builtin_compiler/libglcpp.la
|
||||
-endif
|
||||
|
||||
glcpp_glcpp_SOURCES = \
|
||||
glcpp/glcpp.c \
|
||||
@@ -89,15 +85,10 @@ glcpp_glcpp_LDADD = libglcpp.la
|
||||
|
||||
libglsl_la_SOURCES = builtin_function.cpp
|
||||
libglsl_la_LIBADD = libglcpp.la
|
||||
-if CROSS_COMPILING
|
||||
libglsl_la_SOURCES += \
|
||||
glsl_lexer.cpp \
|
||||
glsl_parser.cpp \
|
||||
$(LIBGLSL_FILES)
|
||||
-else
|
||||
-libglsl_la_LIBADD += \
|
||||
- builtin_compiler/libglslcore.la
|
||||
-endif
|
||||
|
||||
glsl_test_SOURCES = \
|
||||
$(top_srcdir)/src/mesa/main/hash_table.c \
|
@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="bcm2835-driver"
|
||||
PKG_VERSION="fb15696"
|
||||
PKG_VERSION="3ab17ac"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="nonfree"
|
||||
|
@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="misc-firmware"
|
||||
PKG_VERSION="0.0.2"
|
||||
PKG_VERSION="0.0.3"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="Free-to-use"
|
||||
|
@ -34,7 +34,7 @@ case "$LINUX" in
|
||||
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
;;
|
||||
*)
|
||||
PKG_VERSION="3.10.7"
|
||||
PKG_VERSION="3.10.9"
|
||||
PKG_URL="http://www.kernel.org/pub/linux/kernel/v3.x/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
;;
|
||||
esac
|
||||
|
@ -1,13 +0,0 @@
|
||||
--- a/drivers/gpu/drm/i915/intel_pm.c 2013-05-30 22:57:09.098080381 +0200
|
||||
+++ b/drivers/gpu/drm/i915/intel_pm.c 2013-05-30 23:31:31.644308032 +0200
|
||||
@@ -2503,8 +2503,8 @@
|
||||
if (i915_enable_rc6 >= 0)
|
||||
return i915_enable_rc6;
|
||||
|
||||
- /* Disable RC6 on Ironlake */
|
||||
- if (INTEL_INFO(dev)->gen == 5)
|
||||
+ /* Disable RC6 on Ironlake and Sandybridge GT1 */
|
||||
+ if (INTEL_INFO(dev)->gen == 5 || IS_SNB_GT1(dev))
|
||||
return 0;
|
||||
|
||||
if (IS_HASWELL(dev)) {
|
@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="service.openelec.settings"
|
||||
PKG_VERSION="0.2.8"
|
||||
PKG_VERSION="0.2.10"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="prop."
|
||||
|
@ -19,9 +19,9 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="xbmc-theme-Confluence"
|
||||
PKG_VERSION="12.2-5ba69b6"
|
||||
PKG_VERSION="12.2-83bda98"
|
||||
if [ "$XBMC" = "master" ]; then
|
||||
PKG_VERSION="13.alpha-df91888"
|
||||
PKG_VERSION="13.alpha-0efa87e"
|
||||
elif [ "$XBMC" = "xbmc-aml" ]; then
|
||||
PKG_VERSION="aml-frodo-d9119f2"
|
||||
fi
|
||||
|
@ -19,9 +19,9 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="xbmc"
|
||||
PKG_VERSION="12.2-5ba69b6"
|
||||
PKG_VERSION="12.2-83bda98"
|
||||
if [ "$XBMC" = "master" ]; then
|
||||
PKG_VERSION="13.alpha-df91888"
|
||||
PKG_VERSION="13.alpha-0efa87e"
|
||||
elif [ "$XBMC" = "xbmc-aml" ]; then
|
||||
PKG_VERSION="aml-frodo-d9119f2"
|
||||
fi
|
||||
|
@ -0,0 +1,13 @@
|
||||
diff -Naur xbmc-12.2-83bda98/xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp xbmc-12.2-83bda98.patch/xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp
|
||||
--- xbmc-12.2-83bda98/xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp 2013-08-25 21:45:30.000000000 +0200
|
||||
+++ xbmc-12.2-83bda98.patch/xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp 2013-08-26 01:26:41.950633846 +0200
|
||||
@@ -277,7 +277,9 @@
|
||||
case 0: g_guiSettings.SetInt("audiooutput.mode", AUDIO_ANALOG ); break;
|
||||
case 1: g_guiSettings.SetInt("audiooutput.mode", AUDIO_IEC958 ); bitstream = true; break;
|
||||
case 2: g_guiSettings.SetInt("audiooutput.mode", AUDIO_HDMI ); bitstream = true; break;
|
||||
+#ifdef TARGET_RASPBERRY_PI
|
||||
case 3: g_guiSettings.SetInt("audiooutput.mode", AUDIO_BOTH ); break;
|
||||
+#endif
|
||||
}
|
||||
|
||||
EnableSettings(AUDIO_SETTINGS_OUTPUT_TO_ALL_SPEAKERS, bitstream);
|
File diff suppressed because it is too large
Load Diff
@ -1,113 +0,0 @@
|
||||
From 3c27e947a2c52c7b124b1bcf32f554b82b60f690 Mon Sep 17 00:00:00 2001
|
||||
From: Stephan Raue <stephan@openelec.tv>
|
||||
Date: Fri, 2 Aug 2013 01:32:03 +0200
|
||||
Subject: [PATCH] Disable Hibernate and Suspend related power options for
|
||||
Raspberry & Co. without (working) Upower/HAL/CK/Systemd support. Usually this
|
||||
devices dont support Suspend & Hibernate.
|
||||
|
||||
---
|
||||
xbmc/powermanagement/PowerManager.cpp | 21 ++++++++----
|
||||
xbmc/powermanagement/linux/FallbackPowerSyscall.h | 39 +++++++++++++++++++++++
|
||||
2 files changed, 53 insertions(+), 7 deletions(-)
|
||||
create mode 100644 xbmc/powermanagement/linux/FallbackPowerSyscall.h
|
||||
|
||||
diff --git a/xbmc/powermanagement/PowerManager.cpp b/xbmc/powermanagement/PowerManager.cpp
|
||||
index d658a97..993477e 100644
|
||||
--- a/xbmc/powermanagement/PowerManager.cpp
|
||||
+++ b/xbmc/powermanagement/PowerManager.cpp
|
||||
@@ -40,14 +40,17 @@
|
||||
#include "osx/CocoaPowerSyscall.h"
|
||||
#elif defined(TARGET_ANDROID)
|
||||
#include "android/AndroidPowerSyscall.h"
|
||||
-#elif defined(TARGET_POSIX) && defined(HAS_DBUS)
|
||||
+#elif defined(TARGET_POSIX)
|
||||
+#include "linux/FallbackPowerSyscall.h"
|
||||
+#if defined(HAS_DBUS)
|
||||
#include "linux/ConsoleUPowerSyscall.h"
|
||||
#include "linux/ConsoleDeviceKitPowerSyscall.h"
|
||||
#include "linux/LogindUPowerSyscall.h"
|
||||
#include "linux/UPowerSyscall.h"
|
||||
-#ifdef HAS_HAL
|
||||
+#if defined(HAS_HAL)
|
||||
#include "linux/HALPowerSyscall.h"
|
||||
-#endif
|
||||
+#endif // HAS_HAL
|
||||
+#endif // HAS_DBUS
|
||||
#elif defined(TARGET_WINDOWS)
|
||||
#include "powermanagement/windows/Win32PowerSyscall.h"
|
||||
extern HWND g_hWnd;
|
||||
@@ -73,7 +76,8 @@ void CPowerManager::Initialize()
|
||||
m_instance = new CCocoaPowerSyscall();
|
||||
#elif defined(TARGET_ANDROID)
|
||||
m_instance = new CAndroidPowerSyscall();
|
||||
-#elif defined(TARGET_POSIX) && defined(HAS_DBUS)
|
||||
+#elif defined(TARGET_POSIX)
|
||||
+#if defined(HAS_DBUS)
|
||||
if (CConsoleUPowerSyscall::HasConsoleKitAndUPower())
|
||||
m_instance = new CConsoleUPowerSyscall();
|
||||
else if (CConsoleDeviceKitPowerSyscall::HasDeviceConsoleKit())
|
||||
@@ -82,10 +86,13 @@ void CPowerManager::Initialize()
|
||||
m_instance = new CLogindUPowerSyscall();
|
||||
else if (CUPowerSyscall::HasUPower())
|
||||
m_instance = new CUPowerSyscall();
|
||||
-#ifdef HAS_HAL
|
||||
- else
|
||||
+#if defined(HAS_HAL)
|
||||
+ else if(1)
|
||||
m_instance = new CHALPowerSyscall();
|
||||
-#endif
|
||||
+#endif // HAS_HAL
|
||||
+ else
|
||||
+#endif // HAS_DBUS
|
||||
+ m_instance = new CFallbackPowerSyscall();
|
||||
#elif defined(TARGET_WINDOWS)
|
||||
m_instance = new CWin32PowerSyscall();
|
||||
#endif
|
||||
diff --git a/xbmc/powermanagement/linux/FallbackPowerSyscall.h b/xbmc/powermanagement/linux/FallbackPowerSyscall.h
|
||||
new file mode 100644
|
||||
index 0000000..a6ed27b
|
||||
--- /dev/null
|
||||
+++ b/xbmc/powermanagement/linux/FallbackPowerSyscall.h
|
||||
@@ -0,0 +1,39 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2005-2013 Team XBMC
|
||||
+ * http://xbmc.org
|
||||
+ *
|
||||
+ * 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 XBMC; see the file COPYING. If not, see
|
||||
+ * <http://www.gnu.org/licenses/>.
|
||||
+ *
|
||||
+ */
|
||||
+#pragma once
|
||||
+#include "powermanagement/IPowerSyscall.h"
|
||||
+#include "system.h"
|
||||
+#if defined(TARGET_POSIX)
|
||||
+
|
||||
+class CFallbackPowerSyscall : public CPowerSyscallWithoutEvents
|
||||
+{
|
||||
+public:
|
||||
+ virtual bool Powerdown() {return true; }
|
||||
+ virtual bool Suspend() {return false; }
|
||||
+ virtual bool Hibernate() {return false; }
|
||||
+ virtual bool Reboot() {return true; }
|
||||
+
|
||||
+ virtual bool CanPowerdown() {return true; }
|
||||
+ virtual bool CanSuspend() {return false; }
|
||||
+ virtual bool CanHibernate() {return false; }
|
||||
+ virtual bool CanReboot() {return true; }
|
||||
+ virtual int BatteryLevel() {return 0; }
|
||||
+};
|
||||
+#endif
|
||||
--
|
||||
1.8.1.6
|
||||
|
@ -0,0 +1,367 @@
|
||||
From 9295c3ffac97c64cebee88229ee6ac8376f150ae Mon Sep 17 00:00:00 2001
|
||||
From: davilla <davilla@4pi.com>
|
||||
Date: Fri, 20 Apr 2012 13:23:19 -0400
|
||||
Subject: [PATCH] [aml] fixed, add UDevProvider to handle usb disk add/remove
|
||||
storage handling
|
||||
|
||||
---
|
||||
xbmc/storage/linux/LinuxStorageProvider.h | 5 +
|
||||
xbmc/storage/linux/Makefile | 9 +-
|
||||
xbmc/storage/linux/UDevProvider.cpp | 241 ++++++++++++++++++++++++++++++
|
||||
xbmc/storage/linux/UDevProvider.h | 55 +++++++
|
||||
4 files changed, 306 insertions(+), 4 deletions(-)
|
||||
create mode 100644 xbmc/storage/linux/UDevProvider.cpp
|
||||
create mode 100644 xbmc/storage/linux/UDevProvider.h
|
||||
|
||||
diff --git a/xbmc/storage/linux/LinuxStorageProvider.h b/xbmc/storage/linux/LinuxStorageProvider.h
|
||||
index 1f14548..740b282 100644
|
||||
--- a/xbmc/storage/linux/LinuxStorageProvider.h
|
||||
+++ b/xbmc/storage/linux/LinuxStorageProvider.h
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "storage/IStorageProvider.h"
|
||||
#include "HALProvider.h"
|
||||
#include "DeviceKitDisksProvider.h"
|
||||
+#include "UDevProvider.h"
|
||||
#include "UDisksProvider.h"
|
||||
#include "PosixMountProvider.h"
|
||||
|
||||
@@ -41,6 +42,10 @@ class CLinuxStorageProvider : public IStorageProvider
|
||||
if (m_instance == NULL)
|
||||
m_instance = new CHALProvider();
|
||||
#endif
|
||||
+#ifdef HAVE_LIBUDEV
|
||||
+ if (m_instance == NULL)
|
||||
+ m_instance = new CUDevProvider();
|
||||
+#endif
|
||||
|
||||
if (m_instance == NULL)
|
||||
m_instance = new CPosixMountProvider();
|
||||
diff --git a/xbmc/storage/linux/Makefile b/xbmc/storage/linux/Makefile
|
||||
index 9be601d..325f84d 100644
|
||||
--- a/xbmc/storage/linux/Makefile
|
||||
+++ b/xbmc/storage/linux/Makefile
|
||||
@@ -1,8 +1,9 @@
|
||||
-SRCS=DeviceKitDisksProvider.cpp \
|
||||
- HALProvider.cpp \
|
||||
- UDisksProvider.cpp \
|
||||
+SRCS = DeviceKitDisksProvider.cpp
|
||||
+SRCS += UDisksProvider.cpp
|
||||
+SRCS += HALProvider.cpp
|
||||
+SRCS += UDevProvider.cpp
|
||||
|
||||
-LIB=storage_linux.a
|
||||
+LIB = storage_linux.a
|
||||
|
||||
include ../../../Makefile.include
|
||||
-include $(patsubst %.cpp,%.P,$(patsubst %.c,%.P,$(SRCS)))
|
||||
diff --git a/xbmc/storage/linux/UDevProvider.cpp b/xbmc/storage/linux/UDevProvider.cpp
|
||||
new file mode 100644
|
||||
index 0000000..21b6b50
|
||||
--- /dev/null
|
||||
+++ b/xbmc/storage/linux/UDevProvider.cpp
|
||||
@@ -0,0 +1,241 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2005-2012 Team XBMC
|
||||
+ * http://www.xbmc.org
|
||||
+ *
|
||||
+ * 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 XBMC; see the file COPYING. If not, write to
|
||||
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
+ * http://www.gnu.org/copyleft/gpl.html
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#include "UDevProvider.h"
|
||||
+
|
||||
+#ifdef HAVE_LIBUDEV
|
||||
+
|
||||
+#include "linux/PosixMountProvider.h"
|
||||
+#include "utils/log.h"
|
||||
+#include "utils/URIUtils.h"
|
||||
+
|
||||
+extern "C" {
|
||||
+#include <libudev.h>
|
||||
+#include <poll.h>
|
||||
+}
|
||||
+
|
||||
+static const char *get_mountpoint(const char *devnode)
|
||||
+{
|
||||
+ static char buf[4096];
|
||||
+ const char *delim = " ";
|
||||
+ const char *mountpoint = NULL;
|
||||
+ FILE *fp = fopen("/proc/mounts", "r");
|
||||
+
|
||||
+ while (fgets(buf, sizeof (buf), fp))
|
||||
+ {
|
||||
+ const char *node = strtok(buf, delim);
|
||||
+ if (strcmp(node, devnode) == 0)
|
||||
+ {
|
||||
+ mountpoint = strtok(NULL, delim);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (mountpoint != NULL)
|
||||
+ {
|
||||
+ // If mount point contain characters like space, it is converted to
|
||||
+ // "\040". This situation should be handled.
|
||||
+ char *c1, *c2;
|
||||
+ for (c1 = c2 = (char*)mountpoint; *c2; ++c1)
|
||||
+ {
|
||||
+ if (*c2 == '\\')
|
||||
+ {
|
||||
+ *c1 = (((c2[1] - '0') << 6) | ((c2[2] - '0') << 3) | (c2[3] - '0'));
|
||||
+ c2 += 4;
|
||||
+ continue;
|
||||
+ }
|
||||
+ if (c1 != c2)
|
||||
+ *c1 = *c2;
|
||||
+ ++c2;
|
||||
+ }
|
||||
+ *c1 = *c2;
|
||||
+ }
|
||||
+
|
||||
+ fclose(fp);
|
||||
+ return mountpoint;
|
||||
+}
|
||||
+
|
||||
+CUDevProvider::CUDevProvider()
|
||||
+{
|
||||
+ m_udev = NULL;
|
||||
+ m_udevMon = NULL;
|
||||
+}
|
||||
+
|
||||
+void CUDevProvider::Initialize()
|
||||
+{
|
||||
+ CLog::Log(LOGDEBUG, "Selected UDev as storage provider");
|
||||
+
|
||||
+ m_udev = udev_new();
|
||||
+ if (!m_udev)
|
||||
+ {
|
||||
+ CLog::Log(LOGERROR, "%s - failed to allocate udev context", __FUNCTION__);
|
||||
+ return;
|
||||
+ }
|
||||
+ /* set up a devices monitor that listen for any device change */
|
||||
+ m_udevMon = udev_monitor_new_from_netlink(m_udev, "udev");
|
||||
+ udev_monitor_filter_add_match_subsystem_devtype(m_udevMon, "block", "disk");
|
||||
+ udev_monitor_filter_add_match_subsystem_devtype(m_udevMon, "block", "partition");
|
||||
+ udev_monitor_enable_receiving(m_udevMon);
|
||||
+
|
||||
+ PumpDriveChangeEvents(NULL);
|
||||
+}
|
||||
+
|
||||
+void CUDevProvider::Stop()
|
||||
+{
|
||||
+ udev_monitor_unref(m_udevMon);
|
||||
+ udev_unref(m_udev);
|
||||
+}
|
||||
+
|
||||
+void CUDevProvider::GetDisks(VECSOURCES& disks, bool removable)
|
||||
+{
|
||||
+ // enumerate existing block devices
|
||||
+ struct udev_enumerate *u_enum = udev_enumerate_new(m_udev);
|
||||
+ if (u_enum == NULL)
|
||||
+ {
|
||||
+ fprintf(stderr, "Error: udev_enumerate_new(udev)\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ udev_enumerate_add_match_subsystem(u_enum, "block");
|
||||
+ udev_enumerate_add_match_property(u_enum, "DEVTYPE", "disk");
|
||||
+ udev_enumerate_add_match_property(u_enum, "DEVTYPE", "partition");
|
||||
+ udev_enumerate_scan_devices(u_enum);
|
||||
+
|
||||
+ struct udev_list_entry *u_list_ent;
|
||||
+ struct udev_list_entry *u_first_list_ent;
|
||||
+ u_first_list_ent = udev_enumerate_get_list_entry(u_enum);
|
||||
+ udev_list_entry_foreach(u_list_ent, u_first_list_ent)
|
||||
+ {
|
||||
+ const char *name = udev_list_entry_get_name(u_list_ent);
|
||||
+ struct udev *context = udev_enumerate_get_udev(u_enum);
|
||||
+ struct udev_device *device = udev_device_new_from_syspath(context, name);
|
||||
+ if (device == NULL)
|
||||
+ continue;
|
||||
+
|
||||
+ // filter out devices that are not mounted
|
||||
+ const char *mountpoint = get_mountpoint(udev_device_get_devnode(device));
|
||||
+ if (!mountpoint)
|
||||
+ {
|
||||
+ udev_device_unref(device);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ // filter out things mounted on /tmp
|
||||
+ if (strstr(mountpoint, "/tmp"))
|
||||
+ {
|
||||
+ udev_device_unref(device);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ // look for usb devices on the usb bus or mounted on /media/usbX (sdcards)
|
||||
+ const char *bus = udev_device_get_property_value(device, "ID_BUS");
|
||||
+ if (removable &&
|
||||
+ ((bus && strstr(bus, "usb")) ||
|
||||
+ (mountpoint && strstr(mountpoint, "usb"))))
|
||||
+ {
|
||||
+ const char *label = udev_device_get_property_value(device, "ID_FS_LABEL");
|
||||
+ if (!label)
|
||||
+ label = URIUtils::GetFileName(mountpoint);
|
||||
+
|
||||
+ CMediaSource share;
|
||||
+ share.strName = label;
|
||||
+ share.strPath = mountpoint;
|
||||
+ share.m_ignore = true;
|
||||
+ share.m_iDriveType = CMediaSource::SOURCE_TYPE_REMOVABLE;
|
||||
+ AddOrReplace(disks, share);
|
||||
+ }
|
||||
+ udev_device_unref(device);
|
||||
+ }
|
||||
+ udev_enumerate_unref(u_enum);
|
||||
+}
|
||||
+
|
||||
+void CUDevProvider::GetLocalDrives(VECSOURCES &localDrives)
|
||||
+{
|
||||
+ GetDisks(localDrives, false);
|
||||
+}
|
||||
+
|
||||
+void CUDevProvider::GetRemovableDrives(VECSOURCES &removableDrives)
|
||||
+{
|
||||
+ GetDisks(removableDrives, true);
|
||||
+}
|
||||
+
|
||||
+bool CUDevProvider::Eject(CStdString mountpath)
|
||||
+{
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+std::vector<CStdString> CUDevProvider::GetDiskUsage()
|
||||
+{
|
||||
+ CPosixMountProvider legacy;
|
||||
+ return legacy.GetDiskUsage();
|
||||
+}
|
||||
+
|
||||
+bool CUDevProvider::PumpDriveChangeEvents(IStorageEventsCallback *callback)
|
||||
+{
|
||||
+ bool changed = false;
|
||||
+
|
||||
+ fd_set readfds;
|
||||
+ FD_ZERO(&readfds);
|
||||
+ FD_SET(udev_monitor_get_fd(m_udevMon), &readfds);
|
||||
+
|
||||
+ // non-blocking, check the file descriptor for received data
|
||||
+ struct timeval tv = {0};
|
||||
+ int count = select(udev_monitor_get_fd(m_udevMon) + 1, &readfds, NULL, NULL, &tv);
|
||||
+ if (count < 0)
|
||||
+ return false;
|
||||
+
|
||||
+ if (FD_ISSET(udev_monitor_get_fd(m_udevMon), &readfds))
|
||||
+ {
|
||||
+ struct udev_device *dev = udev_monitor_receive_device(m_udevMon);
|
||||
+ if (!dev)
|
||||
+ return false;
|
||||
+
|
||||
+ const char *action = udev_device_get_action(dev);
|
||||
+ const char *devtype = udev_device_get_devtype(dev);
|
||||
+ if (action)
|
||||
+ {
|
||||
+ const char *label = udev_device_get_property_value(dev, "ID_FS_LABEL");
|
||||
+ const char *mountpoint = get_mountpoint(udev_device_get_devnode(dev));
|
||||
+ if (!label)
|
||||
+ label = URIUtils::GetFileName(mountpoint);
|
||||
+
|
||||
+ if (!strcmp(action, "add") && !strcmp(devtype, "partition"))
|
||||
+ {
|
||||
+ CLog::Log(LOGNOTICE, "UDev: Added %s", mountpoint);
|
||||
+ if (callback)
|
||||
+ callback->OnStorageAdded(label, mountpoint);
|
||||
+ changed = true;
|
||||
+ }
|
||||
+ if (!strcmp(action, "remove") && !strcmp(devtype, "partition"))
|
||||
+ {
|
||||
+ CLog::Log(LOGNOTICE, "UDev: Removed %s", mountpoint);
|
||||
+ if (callback)
|
||||
+ callback->OnStorageSafelyRemoved(label);
|
||||
+ changed = true;
|
||||
+ }
|
||||
+ }
|
||||
+ udev_device_unref(dev);
|
||||
+ }
|
||||
+
|
||||
+ return changed;
|
||||
+}
|
||||
+
|
||||
+#endif
|
||||
diff --git a/xbmc/storage/linux/UDevProvider.h b/xbmc/storage/linux/UDevProvider.h
|
||||
new file mode 100644
|
||||
index 0000000..6b51e2a
|
||||
--- /dev/null
|
||||
+++ b/xbmc/storage/linux/UDevProvider.h
|
||||
@@ -0,0 +1,55 @@
|
||||
+#pragma once
|
||||
+/*
|
||||
+ * Copyright (C) 2005-2012 Team XBMC
|
||||
+ * http://www.xbmc.org
|
||||
+ *
|
||||
+ * 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 XBMC; see the file COPYING. If not, write to
|
||||
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
+ * http://www.gnu.org/copyleft/gpl.html
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#include "storage/IStorageProvider.h"
|
||||
+
|
||||
+#ifdef HAVE_LIBUDEV
|
||||
+
|
||||
+struct udev;
|
||||
+struct udev_monitor;
|
||||
+
|
||||
+class CUDevProvider : public IStorageProvider
|
||||
+{
|
||||
+public:
|
||||
+ CUDevProvider();
|
||||
+ virtual ~CUDevProvider() { }
|
||||
+
|
||||
+ virtual void Initialize();
|
||||
+ virtual void Stop();
|
||||
+
|
||||
+ virtual void GetLocalDrives(VECSOURCES &localDrives);
|
||||
+ virtual void GetRemovableDrives(VECSOURCES &removableDrives);
|
||||
+
|
||||
+ virtual bool Eject(CStdString mountpath);
|
||||
+
|
||||
+ virtual std::vector<CStdString> GetDiskUsage();
|
||||
+
|
||||
+ virtual bool PumpDriveChangeEvents(IStorageEventsCallback *callback);
|
||||
+
|
||||
+private:
|
||||
+ void GetDisks(VECSOURCES& devices, bool removable);
|
||||
+
|
||||
+ struct udev *m_udev;
|
||||
+ struct udev_monitor *m_udevMon;
|
||||
+};
|
||||
+
|
||||
+#endif
|
||||
--
|
||||
1.8.1.6
|
||||
|
@ -0,0 +1,17 @@
|
||||
diff -Naur xbmc-12.2-5ba69b6/xbmc/storage/linux/UDevProvider.cpp xbmc-12.2-5ba69b6.patch/xbmc/storage/linux/UDevProvider.cpp
|
||||
--- xbmc-12.2-5ba69b6/xbmc/storage/linux/UDevProvider.cpp 2013-08-22 21:37:41.543830684 +0200
|
||||
+++ xbmc-12.2-5ba69b6.patch/xbmc/storage/linux/UDevProvider.cpp 2013-08-22 21:37:34.557825148 +0200
|
||||
@@ -145,10 +145,12 @@
|
||||
continue;
|
||||
}
|
||||
|
||||
- // look for usb devices on the usb bus or mounted on /media/usbX (sdcards)
|
||||
+ // look for usb devices on the usb bus, or mounted on /media/usbX (sdcards) or cdroms
|
||||
const char *bus = udev_device_get_property_value(device, "ID_BUS");
|
||||
+ const char *cdrom = udev_device_get_property_value(device, "ID_CDROM");
|
||||
if (removable &&
|
||||
((bus && strstr(bus, "usb")) ||
|
||||
+ (cdrom && strstr(cdrom,"1")) ||
|
||||
(mountpoint && strstr(mountpoint, "usb"))))
|
||||
{
|
||||
const char *label = udev_device_get_property_value(device, "ID_FS_LABEL");
|
@ -0,0 +1,40 @@
|
||||
From 90ac611930e202c8255887c6b3e82ff97a1117f0 Mon Sep 17 00:00:00 2001
|
||||
From: popcornmix <popcornmix@gmail.com>
|
||||
Date: Thu, 22 Aug 2013 14:34:37 +0100
|
||||
Subject: [PATCH] h264_parser: Initialize the h264dsp context in the parser as
|
||||
well
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Each AVStream struct for an H.264 elementary stream actually has two
|
||||
copies of the H264DSPContext struct (and in fact all the other members
|
||||
of H264Context as well):
|
||||
|
||||
((H264Context *) ((AVStream *)st)->codec->priv_data)->h264dsp
|
||||
((H264Context *) ((AVStream *)st)->parser->priv_data)->h264dsp
|
||||
|
||||
but only the first of these was actually being initialised. This
|
||||
prevented the addition of platform-specific implementations of
|
||||
parser-related functions.
|
||||
|
||||
Signed-off-by: Martin Storsjö <martin@martin.st>
|
||||
---
|
||||
libavcodec/h264_parser.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
|
||||
index c9dea81..98e2844 100644
|
||||
--- a/libavcodec/h264_parser.c
|
||||
+++ b/libavcodec/h264_parser.c
|
||||
@@ -377,6 +377,7 @@ static int init(AVCodecParserContext *s)
|
||||
H264Context *h = s->priv_data;
|
||||
h->thread_context[0] = h;
|
||||
h->s.slice_context_count = 1;
|
||||
+ ff_h264dsp_init(&h->h264dsp, 8, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
1.8.1.6
|
||||
|
@ -0,0 +1,129 @@
|
||||
From c58d69bea87c77c7a1e8221624137beaaa670586 Mon Sep 17 00:00:00 2001
|
||||
From: popcornmix <popcornmix@gmail.com>
|
||||
Date: Thu, 22 Aug 2013 14:37:18 +0100
|
||||
Subject: [PATCH] h264dsp: Factorize code into a new function,
|
||||
h264_find_start_code_candidate
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This performs the start code search which was previously part of
|
||||
h264_find_frame_end() - the most CPU intensive part of the function.
|
||||
|
||||
By itself, this results in a performance regression:
|
||||
Before After
|
||||
Mean StdDev Mean StdDev Change
|
||||
Overall time 2925.6 26.2 3068.5 31.7 -4.7%
|
||||
|
||||
but this can more than be made up for by platform-optimised
|
||||
implementations of the function.
|
||||
|
||||
Signed-off-by: Martin Storsjö <martin@martin.st>
|
||||
---
|
||||
libavcodec/h264_parser.c | 21 +++------------------
|
||||
libavcodec/h264dsp.c | 29 +++++++++++++++++++++++++++++
|
||||
libavcodec/h264dsp.h | 9 +++++++++
|
||||
3 files changed, 41 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
|
||||
index 98e2844..41c874d 100644
|
||||
--- a/libavcodec/h264_parser.c
|
||||
+++ b/libavcodec/h264_parser.c
|
||||
@@ -65,24 +65,9 @@ static int ff_h264_find_frame_end(H264Context *h, const uint8_t *buf, int buf_si
|
||||
}
|
||||
|
||||
if(state==7){
|
||||
-#if HAVE_FAST_UNALIGNED
|
||||
- /* we check i<buf_size instead of i+3/7 because its simpler
|
||||
- * and there should be FF_INPUT_BUFFER_PADDING_SIZE bytes at the end
|
||||
- */
|
||||
-# if HAVE_FAST_64BIT
|
||||
- while(i<next_avc && !((~*(const uint64_t*)(buf+i) & (*(const uint64_t*)(buf+i) - 0x0101010101010101ULL)) & 0x8080808080808080ULL))
|
||||
- i+=8;
|
||||
-# else
|
||||
- while(i<next_avc && !((~*(const uint32_t*)(buf+i) & (*(const uint32_t*)(buf+i) - 0x01010101U)) & 0x80808080U))
|
||||
- i+=4;
|
||||
-# endif
|
||||
-#endif
|
||||
- for(; i<next_avc; i++){
|
||||
- if(!buf[i]){
|
||||
- state=2;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
+ i += h->h264dsp.h264_find_start_code_candidate(buf + i, buf_size - i);
|
||||
+ if (i < buf_size)
|
||||
+ state = 2;
|
||||
}else if(state<=2){
|
||||
if(buf[i]==1) state^= 5; //2->7, 1->4, 0->5
|
||||
else if(buf[i]) state = 7;
|
||||
diff --git a/libavcodec/h264dsp.c b/libavcodec/h264dsp.c
|
||||
index bd35aa3..0703172 100644
|
||||
--- a/libavcodec/h264dsp.c
|
||||
+++ b/libavcodec/h264dsp.c
|
||||
@@ -41,6 +41,34 @@
|
||||
#include "h264dsp_template.c"
|
||||
#undef BIT_DEPTH
|
||||
|
||||
+static int h264_find_start_code_candidate_c(const uint8_t *buf, int size)
|
||||
+{
|
||||
+ int i = 0;
|
||||
+#if HAVE_FAST_UNALIGNED
|
||||
+ /* we check i < size instead of i + 3 / 7 because it is
|
||||
+ * simpler and there must be FF_INPUT_BUFFER_PADDING_SIZE
|
||||
+ * bytes at the end.
|
||||
+ */
|
||||
+#if HAVE_FAST_64BIT
|
||||
+ while (i < size &&
|
||||
+ !((~*(const uint64_t *)(buf + i) &
|
||||
+ (*(const uint64_t *)(buf + i) - 0x0101010101010101ULL)) &
|
||||
+ 0x8080808080808080ULL))
|
||||
+ i += 8;
|
||||
+#else
|
||||
+ while (i < size &&
|
||||
+ !((~*(const uint32_t *)(buf + i) &
|
||||
+ (*(const uint32_t *)(buf + i) - 0x01010101U)) &
|
||||
+ 0x80808080U))
|
||||
+ i += 4;
|
||||
+#endif
|
||||
+#endif
|
||||
+ for (; i < size; i++)
|
||||
+ if (!buf[i])
|
||||
+ break;
|
||||
+ return i;
|
||||
+}
|
||||
+
|
||||
void ff_h264dsp_init(H264DSPContext *c, const int bit_depth, const int chroma_format_idc)
|
||||
{
|
||||
#undef FUNC
|
||||
@@ -110,6 +138,7 @@ void ff_h264dsp_init(H264DSPContext *c, const int bit_depth, const int chroma_fo
|
||||
H264_DSP(8);
|
||||
break;
|
||||
}
|
||||
+ c->h264_find_start_code_candidate = h264_find_start_code_candidate_c;
|
||||
|
||||
if (ARCH_ARM) ff_h264dsp_init_arm(c, bit_depth, chroma_format_idc);
|
||||
if (HAVE_ALTIVEC) ff_h264dsp_init_ppc(c, bit_depth, chroma_format_idc);
|
||||
diff --git a/libavcodec/h264dsp.h b/libavcodec/h264dsp.h
|
||||
index 490a936..1d172f1 100644
|
||||
--- a/libavcodec/h264dsp.h
|
||||
+++ b/libavcodec/h264dsp.h
|
||||
@@ -74,6 +74,15 @@ typedef void (*h264_biweight_func)(uint8_t *dst, uint8_t *src, int stride, int h
|
||||
void (*h264_idct_add16intra)(uint8_t *dst/*align 16*/, const int *blockoffset, DCTELEM *block/*align 16*/, int stride, const uint8_t nnzc[15*8]);
|
||||
void (*h264_luma_dc_dequant_idct)(DCTELEM *output, DCTELEM *input/*align 16*/, int qmul);
|
||||
void (*h264_chroma_dc_dequant_idct)(DCTELEM *block, int qmul);
|
||||
+
|
||||
+ /**
|
||||
+ * Search buf from the start for up to size bytes. Return the index
|
||||
+ * of a zero byte, or >= size if not found. Ideally, use lookahead
|
||||
+ * to filter out any zero bytes that are known to not be followed by
|
||||
+ * one or more further zero bytes and a one byte. Better still, filter
|
||||
+ * out any bytes that form the trailing_zero_8bits syntax element too.
|
||||
+ */
|
||||
+ int (*h264_find_start_code_candidate)(const uint8_t *buf, int size);
|
||||
}H264DSPContext;
|
||||
|
||||
void ff_h264dsp_init(H264DSPContext *c, const int bit_depth, const int chroma_format_idc);
|
||||
--
|
||||
1.8.1.6
|
||||
|
@ -0,0 +1,321 @@
|
||||
From 4b8f90c0702324a9fcc3909c8bf7d80f090c41ba Mon Sep 17 00:00:00 2001
|
||||
From: popcornmix <popcornmix@gmail.com>
|
||||
Date: Thu, 22 Aug 2013 14:39:21 +0100
|
||||
Subject: [PATCH] arm: Add assembly version of h264_find_start_code_candidate
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Before After
|
||||
Mean StdDev Mean StdDev Change
|
||||
This function 508.8 23.4 185.4 9.0 +174.4%
|
||||
Overall 3068.5 31.7 2752.1 29.4 +11.5%
|
||||
|
||||
In combination with the preceding patch:
|
||||
Before After
|
||||
Mean StdDev Mean StdDev Change
|
||||
Overall 2925.6 26.2 2752.1 29.4 +6.3%
|
||||
|
||||
Signed-off-by: Martin Storsjö <martin@martin.st>
|
||||
---
|
||||
libavcodec/arm/Makefile | 1 +
|
||||
libavcodec/arm/h264dsp_armv6.S | 253 +++++++++++++++++++++++++++
|
||||
libavcodec/arm/h264dsp_init_arm.c | 4 +
|
||||
3 files changed, 258 insertions(+)
|
||||
create mode 100644 libavcodec/arm/h264dsp_armv6.S
|
||||
|
||||
diff --git a/libavcodec/arm/Makefile b/libavcodec/arm/Makefile
|
||||
index 798dfe3..8f2b683 100644
|
||||
--- a/libavcodec/arm/Makefile
|
||||
+++ b/libavcodec/arm/Makefile
|
||||
@@ -4,6 +4,7 @@ OBJS-$(CONFIG_AC3DSP) += arm/ac3dsp_init_arm.o \
|
||||
OBJS-$(CONFIG_DCA_DECODER) += arm/dcadsp_init_arm.o \
|
||||
|
||||
ARMV6-OBJS-$(CONFIG_AC3DSP) += arm/ac3dsp_armv6.o
|
||||
+ARMV6-OBJS-$(CONFIG_H264DSP) += arm/h264dsp_armv6.o
|
||||
|
||||
OBJS-$(CONFIG_MPEGAUDIODSP) += arm/mpegaudiodsp_init_arm.o
|
||||
ARMV6-OBJS-$(CONFIG_MPEGAUDIODSP) += arm/mpegaudiodsp_fixed_armv6.o
|
||||
diff --git a/libavcodec/arm/h264dsp_armv6.S b/libavcodec/arm/h264dsp_armv6.S
|
||||
new file mode 100644
|
||||
index 0000000..c2cafc2
|
||||
--- /dev/null
|
||||
+++ b/libavcodec/arm/h264dsp_armv6.S
|
||||
@@ -0,0 +1,253 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2013 RISC OS Open Ltd
|
||||
+ * Author: Ben Avison <bavison@riscosopen.org>
|
||||
+ *
|
||||
+ * This file is part of Libav.
|
||||
+ *
|
||||
+ * Libav is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * Libav is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with Libav; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
+ */
|
||||
+
|
||||
+#include "asm.S"
|
||||
+
|
||||
+RESULT .req a1
|
||||
+BUF .req a1
|
||||
+SIZE .req a2
|
||||
+PATTERN .req a3
|
||||
+PTR .req a4
|
||||
+DAT0 .req v1
|
||||
+DAT1 .req v2
|
||||
+DAT2 .req v3
|
||||
+DAT3 .req v4
|
||||
+TMP0 .req v5
|
||||
+TMP1 .req v6
|
||||
+TMP2 .req ip
|
||||
+TMP3 .req lr
|
||||
+
|
||||
+#define PRELOAD_DISTANCE 4
|
||||
+
|
||||
+.macro innerloop4
|
||||
+ ldr DAT0, [PTR], #4
|
||||
+ subs SIZE, SIZE, #4 @ C flag survives rest of macro
|
||||
+ sub TMP0, DAT0, PATTERN, lsr #14
|
||||
+ bic TMP0, TMP0, DAT0
|
||||
+ ands TMP0, TMP0, PATTERN
|
||||
+.endm
|
||||
+
|
||||
+.macro innerloop16 decrement, do_preload
|
||||
+ ldmia PTR!, {DAT0,DAT1,DAT2,DAT3}
|
||||
+ .ifnc "\do_preload",""
|
||||
+ pld [PTR, #PRELOAD_DISTANCE*32]
|
||||
+ .endif
|
||||
+ .ifnc "\decrement",""
|
||||
+ subs SIZE, SIZE, #\decrement @ C flag survives rest of macro
|
||||
+ .endif
|
||||
+ sub TMP0, DAT0, PATTERN, lsr #14
|
||||
+ sub TMP1, DAT1, PATTERN, lsr #14
|
||||
+ bic TMP0, TMP0, DAT0
|
||||
+ bic TMP1, TMP1, DAT1
|
||||
+ sub TMP2, DAT2, PATTERN, lsr #14
|
||||
+ sub TMP3, DAT3, PATTERN, lsr #14
|
||||
+ ands TMP0, TMP0, PATTERN
|
||||
+ bic TMP2, TMP2, DAT2
|
||||
+ it eq
|
||||
+ andseq TMP1, TMP1, PATTERN
|
||||
+ bic TMP3, TMP3, DAT3
|
||||
+ itt eq
|
||||
+ andseq TMP2, TMP2, PATTERN
|
||||
+ andseq TMP3, TMP3, PATTERN
|
||||
+.endm
|
||||
+
|
||||
+/* int ff_h264_find_start_code_candidate_armv6(const uint8_t *buf, int size) */
|
||||
+function ff_h264_find_start_code_candidate_armv6, export=1
|
||||
+ push {v1-v6,lr}
|
||||
+ mov PTR, BUF
|
||||
+ @ Ensure there are at least (PRELOAD_DISTANCE+2) complete cachelines to go
|
||||
+ @ before using code that does preloads
|
||||
+ cmp SIZE, #(PRELOAD_DISTANCE+3)*32 - 1
|
||||
+ blo 60f
|
||||
+
|
||||
+ @ Get to word-alignment, 1 byte at a time
|
||||
+ tst PTR, #3
|
||||
+ beq 2f
|
||||
+1: ldrb DAT0, [PTR], #1
|
||||
+ sub SIZE, SIZE, #1
|
||||
+ teq DAT0, #0
|
||||
+ beq 90f
|
||||
+ tst PTR, #3
|
||||
+ bne 1b
|
||||
+2: @ Get to 4-word alignment, 1 word at a time
|
||||
+ ldr PATTERN, =0x80008000
|
||||
+ setend be
|
||||
+ tst PTR, #12
|
||||
+ beq 4f
|
||||
+3: innerloop4
|
||||
+ bne 91f
|
||||
+ tst PTR, #12
|
||||
+ bne 3b
|
||||
+4: @ Get to cacheline (8-word) alignment
|
||||
+ tst PTR, #16
|
||||
+ beq 5f
|
||||
+ innerloop16 16
|
||||
+ bne 93f
|
||||
+5: @ Check complete cachelines, with preloading
|
||||
+ @ We need to stop when there are still (PRELOAD_DISTANCE+1)
|
||||
+ @ complete cachelines to go
|
||||
+ sub SIZE, SIZE, #(PRELOAD_DISTANCE+2)*32
|
||||
+6: innerloop16 , do_preload
|
||||
+ bne 93f
|
||||
+ innerloop16 32
|
||||
+ bne 93f
|
||||
+ bcs 6b
|
||||
+ @ Preload trailing part-cacheline, if any
|
||||
+ tst SIZE, #31
|
||||
+ beq 7f
|
||||
+ pld [PTR, #(PRELOAD_DISTANCE+1)*32]
|
||||
+ @ Check remaining data without doing any more preloads. First
|
||||
+ @ do in chunks of 4 words:
|
||||
+7: adds SIZE, SIZE, #(PRELOAD_DISTANCE+2)*32 - 16
|
||||
+ bmi 9f
|
||||
+8: innerloop16 16
|
||||
+ bne 93f
|
||||
+ bcs 8b
|
||||
+ @ Then in words:
|
||||
+9: adds SIZE, SIZE, #16 - 4
|
||||
+ bmi 11f
|
||||
+10: innerloop4
|
||||
+ bne 91f
|
||||
+ bcs 10b
|
||||
+11: setend le
|
||||
+ @ Check second byte of final halfword
|
||||
+ ldrb DAT0, [PTR, #-1]
|
||||
+ teq DAT0, #0
|
||||
+ beq 90f
|
||||
+ @ Check any remaining bytes
|
||||
+ tst SIZE, #3
|
||||
+ beq 13f
|
||||
+12: ldrb DAT0, [PTR], #1
|
||||
+ sub SIZE, SIZE, #1
|
||||
+ teq DAT0, #0
|
||||
+ beq 90f
|
||||
+ tst SIZE, #3
|
||||
+ bne 12b
|
||||
+ @ No candidate found
|
||||
+13: sub RESULT, PTR, BUF
|
||||
+ b 99f
|
||||
+
|
||||
+60: @ Small buffer - simply check by looping over bytes
|
||||
+ subs SIZE, SIZE, #1
|
||||
+ bcc 99f
|
||||
+61: ldrb DAT0, [PTR], #1
|
||||
+ subs SIZE, SIZE, #1
|
||||
+ teq DAT0, #0
|
||||
+ beq 90f
|
||||
+ bcs 61b
|
||||
+ @ No candidate found
|
||||
+ sub RESULT, PTR, BUF
|
||||
+ b 99f
|
||||
+
|
||||
+90: @ Found a candidate at the preceding byte
|
||||
+ sub RESULT, PTR, BUF
|
||||
+ sub RESULT, RESULT, #1
|
||||
+ b 99f
|
||||
+
|
||||
+91: @ Found a candidate somewhere in the preceding 4 bytes
|
||||
+ sub RESULT, PTR, BUF
|
||||
+ sub RESULT, RESULT, #4
|
||||
+ sub TMP0, DAT0, #0x20000
|
||||
+ bics TMP0, TMP0, DAT0
|
||||
+ itt pl
|
||||
+ ldrbpl DAT0, [PTR, #-3]
|
||||
+ addpl RESULT, RESULT, #2
|
||||
+ bpl 92f
|
||||
+ teq RESULT, #0
|
||||
+ beq 98f @ don't look back a byte if found at first byte in buffer
|
||||
+ ldrb DAT0, [PTR, #-5]
|
||||
+92: teq DAT0, #0
|
||||
+ it eq
|
||||
+ subeq RESULT, RESULT, #1
|
||||
+ b 98f
|
||||
+
|
||||
+93: @ Found a candidate somewhere in the preceding 16 bytes
|
||||
+ sub RESULT, PTR, BUF
|
||||
+ sub RESULT, RESULT, #16
|
||||
+ teq TMP0, #0
|
||||
+ beq 95f @ not in first 4 bytes
|
||||
+ sub TMP0, DAT0, #0x20000
|
||||
+ bics TMP0, TMP0, DAT0
|
||||
+ itt pl
|
||||
+ ldrbpl DAT0, [PTR, #-15]
|
||||
+ addpl RESULT, RESULT, #2
|
||||
+ bpl 94f
|
||||
+ teq RESULT, #0
|
||||
+ beq 98f @ don't look back a byte if found at first byte in buffer
|
||||
+ ldrb DAT0, [PTR, #-17]
|
||||
+94: teq DAT0, #0
|
||||
+ it eq
|
||||
+ subeq RESULT, RESULT, #1
|
||||
+ b 98f
|
||||
+95: add RESULT, RESULT, #4
|
||||
+ teq TMP1, #0
|
||||
+ beq 96f @ not in next 4 bytes
|
||||
+ sub TMP1, DAT1, #0x20000
|
||||
+ bics TMP1, TMP1, DAT1
|
||||
+ itee mi
|
||||
+ ldrbmi DAT0, [PTR, #-13]
|
||||
+ ldrbpl DAT0, [PTR, #-11]
|
||||
+ addpl RESULT, RESULT, #2
|
||||
+ teq DAT0, #0
|
||||
+ it eq
|
||||
+ subeq RESULT, RESULT, #1
|
||||
+ b 98f
|
||||
+96: add RESULT, RESULT, #4
|
||||
+ teq TMP2, #0
|
||||
+ beq 97f @ not in next 4 bytes
|
||||
+ sub TMP2, DAT2, #0x20000
|
||||
+ bics TMP2, TMP2, DAT2
|
||||
+ itee mi
|
||||
+ ldrbmi DAT0, [PTR, #-9]
|
||||
+ ldrbpl DAT0, [PTR, #-7]
|
||||
+ addpl RESULT, RESULT, #2
|
||||
+ teq DAT0, #0
|
||||
+ it eq
|
||||
+ subeq RESULT, RESULT, #1
|
||||
+ b 98f
|
||||
+97: add RESULT, RESULT, #4
|
||||
+ sub TMP3, DAT3, #0x20000
|
||||
+ bics TMP3, TMP3, DAT3
|
||||
+ itee mi
|
||||
+ ldrbmi DAT0, [PTR, #-5]
|
||||
+ ldrbpl DAT0, [PTR, #-3]
|
||||
+ addpl RESULT, RESULT, #2
|
||||
+ teq DAT0, #0
|
||||
+ it eq
|
||||
+ subeq RESULT, RESULT, #1
|
||||
+ @ drop through to 98f
|
||||
+98: setend le
|
||||
+99: pop {v1-v6,pc}
|
||||
+.endfunc
|
||||
+
|
||||
+ .unreq RESULT
|
||||
+ .unreq BUF
|
||||
+ .unreq SIZE
|
||||
+ .unreq PATTERN
|
||||
+ .unreq PTR
|
||||
+ .unreq DAT0
|
||||
+ .unreq DAT1
|
||||
+ .unreq DAT2
|
||||
+ .unreq DAT3
|
||||
+ .unreq TMP0
|
||||
+ .unreq TMP1
|
||||
+ .unreq TMP2
|
||||
+ .unreq TMP3
|
||||
diff --git a/libavcodec/arm/h264dsp_init_arm.c b/libavcodec/arm/h264dsp_init_arm.c
|
||||
index cc4c688..c282c21 100644
|
||||
--- a/libavcodec/arm/h264dsp_init_arm.c
|
||||
+++ b/libavcodec/arm/h264dsp_init_arm.c
|
||||
@@ -23,6 +23,8 @@
|
||||
#include "libavcodec/dsputil.h"
|
||||
#include "libavcodec/h264dsp.h"
|
||||
|
||||
+int ff_h264_find_start_code_candidate_armv6(const uint8_t *buf, int size);
|
||||
+
|
||||
void ff_h264_v_loop_filter_luma_neon(uint8_t *pix, int stride, int alpha,
|
||||
int beta, int8_t *tc0);
|
||||
void ff_h264_h_loop_filter_luma_neon(uint8_t *pix, int stride, int alpha,
|
||||
@@ -99,5 +101,7 @@ static void ff_h264dsp_init_neon(H264DSPContext *c, const int bit_depth, const i
|
||||
|
||||
void ff_h264dsp_init_arm(H264DSPContext *c, const int bit_depth, const int chroma_format_idc)
|
||||
{
|
||||
+ if (HAVE_ARMV6)
|
||||
+ c->h264_find_start_code_candidate = ff_h264_find_start_code_candidate_armv6;
|
||||
if (HAVE_NEON) ff_h264dsp_init_neon(c, bit_depth, chroma_format_idc);
|
||||
}
|
||||
--
|
||||
1.8.1.6
|
||||
|
@ -19,13 +19,13 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="connman"
|
||||
PKG_VERSION="8378438"
|
||||
PKG_VERSION="1.17"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.connman.net"
|
||||
#PKG_URL="http://www.kernel.org/pub/linux/network/connman/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_URL="http://www.kernel.org/pub/linux/network/connman/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
# PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS="glib readline dbus iptables wpa_supplicant ntp Python pygobject dbus-python"
|
||||
PKG_BUILD_DEPENDS_TARGET="toolchain glib readline dbus iptables"
|
||||
PKG_PRIORITY="optional"
|
||||
|
@ -1,36 +0,0 @@
|
||||
################################################################################
|
||||
# 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="libssh"
|
||||
PKG_VERSION="0.5.2"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OpenSource"
|
||||
PKG_SITE="http://www.libssh.org/"
|
||||
PKG_URL="http://www.libssh.org/files/0.5/$PKG_NAME-$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS="zlib libgcrypt"
|
||||
PKG_BUILD_DEPENDS="toolchain zlib libgcrypt"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="network"
|
||||
PKG_SHORTDESC="libssh: A working SSH implementation by means of a library"
|
||||
PKG_LONGDESC="The ssh library was designed to be used by programmers needing a working SSH implementation by the mean of a library. The complete control of the client is made by the programmer. With libssh, you can remotely execute programs, transfer files, use a secure and transparent tunnel for your remote programs. With its Secure FTP implementation, you can play with remote files easily, without third-party programs others than libcrypto (from openssl)."
|
||||
PKG_IS_ADDON="no"
|
||||
|
||||
PKG_AUTORECONF="no"
|
35
packages/network/libssh/build → packages/network/libssh/package.mk
Executable file → Normal file
35
packages/network/libssh/build → packages/network/libssh/package.mk
Executable file → Normal file
@ -1,5 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
@ -20,18 +18,32 @@
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
. config/options $1
|
||||
PKG_NAME="libssh"
|
||||
PKG_VERSION="0.5.5"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OpenSource"
|
||||
PKG_SITE="http://www.libssh.org/"
|
||||
# PKG_URL="http://www.libssh.org/files/0.5/$PKG_NAME-$PKG_VERSION.tar.gz"
|
||||
PKG_URL="https://red.libssh.org/attachments/download/51/$PKG_NAME-$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS="zlib libgcrypt"
|
||||
PKG_BUILD_DEPENDS_TARGET="toolchain zlib libgcrypt"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="network"
|
||||
PKG_SHORTDESC="libssh: A working SSH implementation by means of a library"
|
||||
PKG_LONGDESC="The ssh library was designed to be used by programmers needing a working SSH implementation by the mean of a library. The complete control of the client is made by the programmer. With libssh, you can remotely execute programs, transfer files, use a secure and transparent tunnel for your remote programs. With its Secure FTP implementation, you can play with remote files easily, without third-party programs others than libcrypto (from openssl)."
|
||||
|
||||
cd $PKG_BUILD
|
||||
mkdir -p build && cd build
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DWITH_STATIC_LIB=1 -DWITH_GCRYPT="ON" \
|
||||
..
|
||||
|
||||
make
|
||||
configure_target() {
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DWITH_STATIC_LIB=1 -DWITH_GCRYPT="ON" \
|
||||
..
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
# install static library only
|
||||
mkdir -p $SYSROOT_PREFIX/usr/lib
|
||||
cp src/libssh.a $SYSROOT_PREFIX/usr/lib
|
||||
@ -48,3 +60,4 @@ make
|
||||
cp ../include/libssh/server.h $SYSROOT_PREFIX/usr/include/libssh
|
||||
cp ../include/libssh/sftp.h $SYSROOT_PREFIX/usr/include/libssh
|
||||
cp ../include/libssh/ssh2.h $SYSROOT_PREFIX/usr/include/libssh
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
#!/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
|
||||
|
||||
cd $PKG_BUILD
|
||||
./configure --host=$TARGET_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--disable-static \
|
||||
--enable-shared \
|
||||
--disable-asm \
|
||||
--with-gnu-ld
|
||||
|
||||
make
|
||||
$MAKEINSTALL
|
||||
|
||||
sed -e "s:\(['= ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" -i src/libgcrypt-config
|
||||
|
||||
cp src/libgcrypt-config $ROOT/$TOOLCHAIN/bin
|
@ -1,26 +0,0 @@
|
||||
#!/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
|
||||
|
||||
mkdir -p $INSTALL/usr/lib
|
||||
cp -P $PKG_BUILD/src/.libs/*.so* $INSTALL/usr/lib
|
@ -19,18 +19,27 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="libgcrypt"
|
||||
PKG_VERSION="1.5.2"
|
||||
PKG_VERSION="1.5.3"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.gnupg.org/"
|
||||
PKG_URL="ftp://ftp.gnupg.org/gcrypt/libgcrypt/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_DEPENDS="libgpg-error"
|
||||
PKG_BUILD_DEPENDS="toolchain libgpg-error"
|
||||
PKG_BUILD_DEPENDS_TARGET="toolchain libgpg-error"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="security"
|
||||
PKG_SHORTDESC="libgcrypt: General purpose cryptographic library"
|
||||
PKG_LONGDESC="Libgcrypt is a general purpose cryptographic library based on the code from GnuPG. It provides functions for all cryptographic building blocks: symmetric ciphers, hash algorithms, MACs, public key algorithms, large integer functions, random numbers and a lot of supporting functions."
|
||||
PKG_IS_ADDON="no"
|
||||
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="yes"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--disable-asm --with-gnu-ld"
|
||||
|
||||
post_makeinstall_target() {
|
||||
sed -e "s:\(['= ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" -i src/libgcrypt-config
|
||||
cp src/libgcrypt-config $ROOT/$TOOLCHAIN/bin
|
||||
|
||||
rm -rf $INSTALL/usr/bin
|
||||
}
|
@ -635,16 +635,16 @@ CONFIG_FEATURE_VOLUMEID_LINUXRAID=y
|
||||
# Miscellaneous Utilities
|
||||
#
|
||||
# CONFIG_CONSPY is not set
|
||||
# CONFIG_LESS is not set
|
||||
CONFIG_FEATURE_LESS_MAXLINES=0
|
||||
# CONFIG_FEATURE_LESS_BRACKETS is not set
|
||||
# CONFIG_FEATURE_LESS_FLAGS is not set
|
||||
# CONFIG_FEATURE_LESS_MARKS is not set
|
||||
# CONFIG_FEATURE_LESS_REGEXP is not set
|
||||
# CONFIG_FEATURE_LESS_WINCH is not set
|
||||
# CONFIG_FEATURE_LESS_ASK_TERMINAL is not set
|
||||
# CONFIG_FEATURE_LESS_DASHCMD is not set
|
||||
# CONFIG_FEATURE_LESS_LINENUMS is not set
|
||||
CONFIG_LESS=y
|
||||
CONFIG_FEATURE_LESS_MAXLINES=16384
|
||||
CONFIG_FEATURE_LESS_BRACKETS=y
|
||||
CONFIG_FEATURE_LESS_FLAGS=y
|
||||
CONFIG_FEATURE_LESS_MARKS=y
|
||||
CONFIG_FEATURE_LESS_REGEXP=y
|
||||
CONFIG_FEATURE_LESS_WINCH=y
|
||||
CONFIG_FEATURE_LESS_ASK_TERMINAL=y
|
||||
CONFIG_FEATURE_LESS_DASHCMD=y
|
||||
CONFIG_FEATURE_LESS_LINENUMS=y
|
||||
# CONFIG_NANDWRITE is not set
|
||||
# CONFIG_NANDDUMP is not set
|
||||
CONFIG_SETSERIAL=y
|
||||
@ -904,7 +904,7 @@ CONFIG_FEATURE_TOP_SMP_PROCESS=y
|
||||
CONFIG_FEATURE_TOPMEM=y
|
||||
CONFIG_UPTIME=y
|
||||
# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set
|
||||
# CONFIG_FREE is not set
|
||||
CONFIG_FREE=y
|
||||
CONFIG_FUSER=y
|
||||
CONFIG_KILL=y
|
||||
CONFIG_KILLALL=y
|
||||
|
@ -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="kexec-tools hdparm dosfstools e2fsprogs speedcontrol zip pciutils usbutils less procps-ng"
|
||||
PKG_DEPENDS="kexec-tools hdparm dosfstools e2fsprogs speedcontrol zip pciutils usbutils"
|
||||
PKG_BUILD_DEPENDS="toolchain busybox-hosttools"
|
||||
PKG_PRIORITY="required"
|
||||
PKG_SECTION="system"
|
||||
@ -40,6 +40,11 @@ PKG_AUTORECONF="no"
|
||||
PKG_DEPENDS="$PKG_DEPENDS nano"
|
||||
fi
|
||||
|
||||
# parted support
|
||||
if [ "$PARTED" = "yes" ]; then
|
||||
PKG_DEPENDS="$PKG_DEPENDS parted"
|
||||
fi
|
||||
|
||||
# nfs support
|
||||
if [ "$NFS_SUPPORT" = yes ]; then
|
||||
PKG_DEPENDS="$PKG_DEPENDS rpcbind"
|
||||
|
@ -25,9 +25,5 @@
|
||||
|
||||
(
|
||||
progress "Starting D-BUS"
|
||||
while true; do
|
||||
dbus-daemon --system --nofork &>/dev/null
|
||||
rm /var/run/dbus/pid &>/dev/null
|
||||
usleep 500000
|
||||
done
|
||||
)&
|
||||
dbus-daemon --system &>/dev/null
|
||||
)
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
wait_for_dbus () {
|
||||
while [ ! -e /var/run/dbus/system_bus_socket ]; do
|
||||
usleep 200000
|
||||
usleep 1000000
|
||||
done
|
||||
}
|
||||
|
||||
|
@ -1,43 +0,0 @@
|
||||
#!/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
|
||||
|
||||
cd $PKG_BUILD
|
||||
./configure --host=$TARGET_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--prefix=/usr \
|
||||
--disable-silent-rules \
|
||||
--disable-static \
|
||||
--enable-shared \
|
||||
--enable-tools \
|
||||
--enable-logging \
|
||||
--disable-debug \
|
||||
--disable-gtk-doc \
|
||||
--disable-gtk-doc-html \
|
||||
--disable-gtk-doc-pdf \
|
||||
--with-gnu-ld \
|
||||
--without-xz \
|
||||
--without-zlib
|
||||
|
||||
make
|
||||
$MAKEINSTALL
|
@ -1,44 +0,0 @@
|
||||
#!/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
|
||||
|
||||
mkdir -p $INSTALL/usr/lib
|
||||
cp -P $PKG_BUILD/libkmod/.libs/*.so* $INSTALL/usr/lib
|
||||
|
||||
mkdir -p $INSTALL/usr/bin
|
||||
cp -P $PKG_BUILD/tools/.libs/kmod $INSTALL/usr/bin
|
||||
|
||||
mkdir -p $INSTALL/sbin
|
||||
ln -sf /usr/bin/kmod $INSTALL/sbin/lsmod
|
||||
ln -sf /usr/bin/kmod $INSTALL/sbin/insmod
|
||||
ln -sf /usr/bin/kmod $INSTALL/sbin/rmmod
|
||||
ln -sf /usr/bin/kmod $INSTALL/sbin/modinfo
|
||||
ln -sf /usr/bin/kmod $INSTALL/sbin/modprobe
|
||||
|
||||
# add system modprobe.d dir
|
||||
mkdir -p $INSTALL/etc/modprobe.d
|
||||
cp $PKG_DIR/modprobe.d/* $INSTALL/etc/modprobe.d
|
||||
|
||||
# add user modprobe.d dir
|
||||
mkdir -p $INSTALL/usr/config/modprobe.d
|
||||
|
@ -19,18 +19,46 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="kmod"
|
||||
PKG_VERSION="14"
|
||||
PKG_VERSION="15"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://git.profusion.mobi/cgit.cgi/kmod.git/"
|
||||
PKG_URL="http://ftp.kernel.org/pub/linux/utils/kernel/kmod/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS=""
|
||||
PKG_BUILD_DEPENDS="toolchain"
|
||||
PKG_BUILD_DEPENDS_TARGET="toolchain"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="system"
|
||||
PKG_SHORTDESC="kmod offers the needed flexibility and fine grained control over insertion, removal, configuration and listing of kernel modules."
|
||||
PKG_LONGDESC="kmod offers the needed flexibility and fine grained control over insertion, removal, configuration and listing of kernel modules."
|
||||
PKG_IS_ADDON="no"
|
||||
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="yes"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--enable-tools \
|
||||
--enable-logging \
|
||||
--disable-debug \
|
||||
--disable-gtk-doc \
|
||||
--disable-gtk-doc-html \
|
||||
--disable-gtk-doc-pdf \
|
||||
--disable-manpages \
|
||||
--with-gnu-ld \
|
||||
--without-xz \
|
||||
--without-zlib"
|
||||
|
||||
post_makeinstall_target() {
|
||||
# make symlinks for compatibility
|
||||
mkdir -p $INSTALL/sbin
|
||||
ln -sf /usr/bin/kmod $INSTALL/sbin/lsmod
|
||||
ln -sf /usr/bin/kmod $INSTALL/sbin/insmod
|
||||
ln -sf /usr/bin/kmod $INSTALL/sbin/rmmod
|
||||
ln -sf /usr/bin/kmod $INSTALL/sbin/modinfo
|
||||
ln -sf /usr/bin/kmod $INSTALL/sbin/modprobe
|
||||
|
||||
# add system modprobe.d dir
|
||||
mkdir -p $INSTALL/etc/modprobe.d
|
||||
cp $PKG_DIR/modprobe.d/* $INSTALL/etc/modprobe.d
|
||||
|
||||
# add user modprobe.d dir
|
||||
mkdir -p $INSTALL/usr/config/modprobe.d
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
#!/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 sourcefiles writable and run autotools
|
||||
find . -type f -exec chmod +w "{}" ";"
|
||||
do_autoreconf
|
||||
|
||||
./configure --host=$TARGET_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--prefix=/usr \
|
||||
--bindir=/usr/bin \
|
||||
|
||||
make
|
||||
|
@ -1,27 +0,0 @@
|
||||
#!/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/less $INSTALL/usr/bin/
|
||||
|
@ -1,35 +0,0 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2013 (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="less"
|
||||
PKG_VERSION="451"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_URL="http://www.greenwoodsoftware.com/less/$PKG_NAME-$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS="ncurses"
|
||||
PKG_BUILD_DEPENDS="toolchain ncurses"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="system"
|
||||
PKG_SHORTDESC="less: free, open-source file pager"
|
||||
PKG_LONGDESC="Less is a free, open-source file pager. It can be found on most versions of Linux, Unix and Mac OS, as well as on many other operating systems."
|
||||
PKG_IS_ADDON="no"
|
||||
|
||||
PKG_AUTORECONF="no"
|
@ -1,44 +0,0 @@
|
||||
#!/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
|
||||
|
||||
# comment out, seems to be broken in 0.19 - todo:
|
||||
# export CC_FOR_BUILD="$HOST_CC"
|
||||
# export BUILD_CFLAGS="$HOST_CFLAGS"
|
||||
# export BUILD_LDFLAGS="$HOST_LDFLAGS"
|
||||
|
||||
cd $PKG_BUILD
|
||||
./configure --host=$TARGET_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--datadir=/usr/share \
|
||||
--localstatedir=/var \
|
||||
--enable-static \
|
||||
--disable-shared \
|
||||
|
||||
# building hosttools seems to be broken in 0.19 - todo:
|
||||
make CFLAGS="$HOST_CFLAGS" LDFLAGS="$HOST_LDFLAGS" CC="$HOST_CC" -C strpool
|
||||
|
||||
make
|
||||
$MAKEINSTALL
|
@ -1,29 +0,0 @@
|
||||
#!/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
|
||||
|
||||
if [ "$DEVTOOLS" = yes ]; then
|
||||
mkdir -p $INSTALL/usr/bin
|
||||
cp -P $PKG_BUILD/sktest $INSTALL/usr/bin
|
||||
cp -P $PKG_BUILD/skdump $INSTALL/usr/bin
|
||||
fi
|
@ -1,37 +0,0 @@
|
||||
#!/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
|
||||
|
||||
export CFLAGS="$CFLAGS -I$SYSROOT_PREFIX/usr/include/ncurses"
|
||||
export LIBS="-ltinfo"
|
||||
|
||||
cd $PKG_BUILD
|
||||
ac_cv_func_malloc_0_nonnull=yes \
|
||||
ac_cv_func_realloc_0_nonnull=yes \
|
||||
./configure --host=$TARGET_NAME \
|
||||
--build=$HOST_NAME \
|
||||
--prefix=/usr \
|
||||
--disable-skill \
|
||||
--disable-kill
|
||||
|
||||
make
|
@ -1,35 +0,0 @@
|
||||
#!/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 -P $PKG_BUILD/proc/.libs/libprocps.so* $INSTALL/usr/lib/
|
||||
|
||||
mkdir -p $INSTALL/usr/bin/
|
||||
cp $PKG_BUILD/.libs/free $INSTALL/usr/bin/
|
||||
cp $PKG_BUILD/.libs/pgrep $INSTALL/usr/bin/
|
||||
ln -sf pgrep $INSTALL/usr/bin/pkill
|
||||
cp $PKG_BUILD/.libs/pmap $INSTALL/usr/bin/
|
||||
cp $PKG_BUILD/.libs/slabtop $INSTALL/usr/bin/
|
||||
cp $PKG_BUILD/.libs/vmstat $INSTALL/usr/bin/
|
||||
cp $PKG_BUILD/.libs/watch $INSTALL/usr/bin/
|
@ -1,36 +0,0 @@
|
||||
################################################################################
|
||||
# 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="procps-ng"
|
||||
PKG_VERSION="3.3.8"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://gitorious.org/procps/procps"
|
||||
PKG_URL="$SOURCEFORGE_SRC/procps-ng/Production/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS="ncurses"
|
||||
PKG_BUILD_DEPENDS="toolchain ncurses"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="debug"
|
||||
PKG_SHORTDESC="procps: Small useful utilities that give information about processes"
|
||||
PKG_LONGDESC="procps is the package that has a bunch of small useful utilities that give information about processes using the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, free, slabtop, and skill."
|
||||
PKG_IS_ADDON="no"
|
||||
|
||||
PKG_AUTORECONF="yes"
|
@ -1,28 +0,0 @@
|
||||
################################################################################
|
||||
# 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
|
||||
################################################################################
|
||||
# start the ATVclient daemon
|
||||
#
|
||||
# runlevels: openelec, textmode
|
||||
|
||||
(
|
||||
progress "starting ATVclient"
|
||||
exec atvclient -m > /dev/null 2>&1
|
||||
)&
|
@ -0,0 +1,2 @@
|
||||
# must be started in a shell, otherwise it exits after sometime for unknown reasons
|
||||
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="824[012]", RUN+="/bin/sh -c '/usr/sbin/atvclient -m &'"
|
330
packages/sysutils/udevil/config/udevil.conf
Normal file
330
packages/sysutils/udevil/config/udevil.conf
Normal file
@ -0,0 +1,330 @@
|
||||
##############################################################################
|
||||
#
|
||||
# udevil configuration file /etc/udevil/udevil.conf
|
||||
#
|
||||
# This file controls what devices, networks, and files users may mount and
|
||||
# unmount via udevil (set suid).
|
||||
#
|
||||
# IMPORTANT: IT IS POSSIBLE TO CREATE SERIOUS SECURITY PROBLEMS IF THIS FILE
|
||||
# IS MISCONFIGURED - EDIT WITH CARE
|
||||
#
|
||||
# Note: For greater control for specific users, including root, copy this
|
||||
# file to /etc/udevil/udevil-user-USERNAME.conf replacing USERNAME with the
|
||||
# desired username (eg /etc/udevil/udevil-user-jim.conf).
|
||||
#
|
||||
# Format:
|
||||
# OPTION = VALUE[, VALUE, ...]
|
||||
#
|
||||
# DO NOT USE QUOTES except literally
|
||||
# Lines beginning with # are ignored
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
# To log all uses of udevil, set log_file to a file path:
|
||||
# log_file = /var/log/udevil.log
|
||||
|
||||
# Approximate number of days to retain log entries (0=forever, max=60):
|
||||
log_keep_days = 10
|
||||
|
||||
|
||||
# allowed_types determines what fstypes can be passed by a user to the u/mount
|
||||
# program, what device filesystems may be un/mounted implicitly, and what
|
||||
# network filesystems may be un/mounted.
|
||||
# It may also include the 'file' keyword, indicating that the user is allowed
|
||||
# to mount files (eg an ISO file). The $KNOWN_FILESYSTEMS variable may
|
||||
# be included to include common local filesystems as well as those listed in
|
||||
# /etc/filesystems and /proc/filesystems.
|
||||
# allowed_types_USERNAME, if present, is used to override allowed_types for
|
||||
# the specific user 'USERNAME'. For example, to allow user 'jim' to mount
|
||||
# only vfat filesystems, add:
|
||||
# allowed_types_jim = vfat
|
||||
# Setting allowed_types = * does NOT allow all types, as this is a security
|
||||
# risk, but does allow all recognized types.
|
||||
# allowed_types = $KNOWN_FILESYSTEMS, file, cifs, smbfs, nfs, curlftpfs, ftpfs, sshfs, davfs, tmpfs, ramfs
|
||||
allowed_types = $KNOWN_FILESYSTEMS, hfsplus, hfs
|
||||
|
||||
|
||||
# allowed_users is a list of users permitted to mount and unmount with udevil.
|
||||
# Wildcards (* or ?) may be used in the usernames. To allow all users,
|
||||
# specify "allowed_users=*". UIDs may be included using the form UID=1000.
|
||||
# For example: allowed_users = carl, UID=1000, pre*
|
||||
# Also note that permission to execute udevil may be limited to users belonging
|
||||
# to the group that owns /usr/bin/udevil, such as 'plugdev' or 'storage',
|
||||
# depending on installation.
|
||||
# allowed_users_FSTYPE, if present, is used to override allowed_users when
|
||||
# mounting or unmounting a specific fstype (eg nfs, ext3, file).
|
||||
# Note that when mounting a file, fstype will always be 'file' regardless of
|
||||
# the internal fstype of the file.
|
||||
# For example, to allow only user 'bob' to mount nfs shares, add:
|
||||
# allowed_users_nfs = bob
|
||||
# The root user is NOT automatically allowed to use udevil in some cases unless
|
||||
# listed here (except for unmounting anything or mounting fstab devices).
|
||||
allowed_users = *
|
||||
|
||||
|
||||
# allowed_groups is a list of groups permitted to mount and unmount with
|
||||
# udevil. The user MUST belong to at least one of these groups. Wildcards
|
||||
# or GIDs may NOT be used in group names, but a single * may be used to allow
|
||||
# all groups.
|
||||
# Also note that permission to execute udevil may be limited to users belonging
|
||||
# to the group that owns /usr/bin/udevil, such as 'plugdev' or 'storage',
|
||||
# depending on installation.
|
||||
# allowed_groups_FSTYPE, if present, is used to override allowed_groups when
|
||||
# mounting or unmounting a specific fstype (eg nfs, ext3, file). For example,
|
||||
# to allow only members of the 'network' group to mount smb and nfs shares,
|
||||
# use both of these lines:
|
||||
# allowed_groups_smbfs = network
|
||||
# allowed_groups_nfs = network
|
||||
# The root user is NOT automatically allowed to use udevil in some cases unless
|
||||
# listed here (except for unmounting anything or mounting fstab devices).
|
||||
allowed_groups = *
|
||||
|
||||
|
||||
# allowed_media_dirs specifies the media directories in which user mount points
|
||||
# may be located. The first directory which exists and does not contain a
|
||||
# wildcard will be used as the default media directory (normally /media or
|
||||
# /run/media/$USER).
|
||||
# The $USER variable, if included, will be replaced with the username of the
|
||||
# user running udevil. Wildcards may also be used in any directory EXCEPT the
|
||||
# default. Wildcards will not match a /
|
||||
# allowed_media_dirs_FSTYPE, if present, is used to override allowed_media_dirs
|
||||
# when mounting or unmounting a specific fstype (eg ext2, nfs). For example,
|
||||
# to cause /media/network to be used as the default media directory for
|
||||
# nfs and ftpfs mounts, use these two lines:
|
||||
# allowed_media_dirs_nfs = /media/network, /media, /run/media/$USER
|
||||
# allowed_media_dirs_ftpfs = /media/network, /media, /run/media/$USER
|
||||
# NOTE: If you want only the user who mounted a device to have access to it
|
||||
# and be allowed to unmount it, specify /run/media/$USER as the first
|
||||
# allowed media directory.
|
||||
# IMPORTANT: If an allowed file is mounted to a media directory, the user may
|
||||
# be permitted to unmount its associated loop device even though internal.
|
||||
# INCLUDING /MNT HERE IS NOT RECOMMENDED. ALL ALLOWED MEDIA DIRECTORIES
|
||||
# SHOULD BE OWNED AND WRITABLE ONLY BY ROOT.
|
||||
allowed_media_dirs = /media, /var/media, /run/media/$USER
|
||||
|
||||
|
||||
# allowed_devices is the first criteria for what block devices users may mount
|
||||
# or unmount. If a device is not listed in allowed_devices, it cannot be
|
||||
# un/mounted (unless in fstab). However, even if a device is listed, other
|
||||
# factors may prevent its use. For example, access to system internal devices
|
||||
# will be denied to normal users even if they are included in allowed_devices.
|
||||
# allowed_devices_FSTYPE, if present, is used to override allowed_devices when
|
||||
# mounting or unmounting a specific fstype (eg ext3, ntfs). For example, to
|
||||
# prevent all block devices containing an ext4 filesystem from being
|
||||
# un/mounted use:
|
||||
# allowed_devices_ext4 =
|
||||
# Note: Wildcards may be used, but a wildcard will never match a /, except
|
||||
# for "allowed_devices=*" which allows any device. The recommended setting is
|
||||
# allowed_devices = /dev/*
|
||||
# WARNING: ALLOWING USERS TO MOUNT DEVICES OUTSIDE OF /dev CAN CAUSE SERIOUS
|
||||
# SECURITY PROBLEMS. DO NOT ALLOW DEVICES IN /dev/shm
|
||||
allowed_devices = /dev/*
|
||||
|
||||
|
||||
# allowed_internal_devices causes udevil to treat any listed block devices as
|
||||
# removable, thus allowing normal users to un/mount them (providing they are
|
||||
# also listed in allowed_devices).
|
||||
# allowed_internal_devices_FSTYPE, if present, is used to override
|
||||
# allowed_internal_devices when mounting or unmounting a specific fstype
|
||||
# (eg ext3, ntfs). For example, to allow block devices containing a vfat
|
||||
# filesystem to be un/mounted even if they are system internal devices, use:
|
||||
# allowed_internal_devices_vfat = /dev/sdb*
|
||||
# Some removable esata drives look like internal drives to udevil. To avoid
|
||||
# this problem, they can be treated as removable with this setting.
|
||||
# WARNING: SETTING A SYSTEM DEVICE HERE CAN CAUSE SERIOUS SECURITY PROBLEMS.
|
||||
# allowed_internal_devices = /dev/sd*
|
||||
|
||||
|
||||
# allowed_internal_uuids and allowed_internal_uuids_FSTYPE work similarly to
|
||||
# allowed_internal_devices, except that UUIDs are specified instead of devices.
|
||||
# For example, to allow un/mounting of an internal filesystem based on UUID:
|
||||
# allowed_internal_uuids = cc0c4489-8def-1e5b-a304-ab87c3cb626c0
|
||||
# WARNING: SETTING A SYSTEM DEVICE HERE CAN CAUSE SERIOUS SECURITY PROBLEMS.
|
||||
# allowed_internal_uuids =
|
||||
|
||||
|
||||
# forbidden_devices is used to prevent block devices from being un/mounted
|
||||
# even if other settings would allow them (except devices in fstab).
|
||||
# forbidden_devices_FSTYPE, if present, is used to override
|
||||
# forbidden_devices when mounting or unmounting a specific fstype
|
||||
# (eg ext3, ntfs). For example, to prevent device /dev/sdd1 from being
|
||||
# mounted when it contains an ntfs filesystem, use:
|
||||
# forbidden_devices_ntfs = /dev/sdd1
|
||||
# NOTE: device node paths are canonicalized before being tested, so forbidding
|
||||
# a link to a device will have no effect.
|
||||
forbidden_devices =
|
||||
|
||||
|
||||
# allowed_networks determines what hosts may be un/mounted by udevil users when
|
||||
# using nfs, cifs, smbfs, curlftpfs, ftpfs, or sshfs. Hosts may be specified
|
||||
# using a hostname (eg myserver.com) or IP address (192.168.1.100).
|
||||
# Wildcards may be used in hostnames and IP addresses, but CIDR notation
|
||||
# (192.168.1.0/16) is NOT supported. IP v6 is supported. For example:
|
||||
# allowed_networks = 127.0.0.1, 192.168.1.*, 10.0.0.*, localmachine, *.okay.com
|
||||
# Or, to prevent un/mounting of any network shares, set:
|
||||
# allowed_networks =
|
||||
# allowed_networks_FSTYPE, if present, is used to override allowed_networks
|
||||
# when mounting or unmounting a specific network fstype (eg nfs, cifs, sshfs,
|
||||
# curlftpfs). For example, to limit nfs and samba shares to only local
|
||||
# networks, use these two lines:
|
||||
# allowed_networks_nfs = 192.168.1.*, 10.0.0.*
|
||||
# allowed_networks_cifs = 192.168.1.*, 10.0.0.*
|
||||
allowed_networks = *
|
||||
|
||||
|
||||
# forbidden_networks and forbidden_networks_FSTYPE are used to specify networks
|
||||
# that are never allowed, even if other settings allow them (except fstab).
|
||||
# NO REVERSE LOOKUP IS PERFORMED, so including bad.com will only have an effect
|
||||
# if the user uses that hostname. IP lookup is always performed, so forbidding
|
||||
# an IP address will also forbid all corresponding hostnames.
|
||||
forbidden_networks =
|
||||
|
||||
|
||||
# allowed_files is used to determine what files in what directories may be
|
||||
# un/mounted. A user must also have read permission on a file to mount it.
|
||||
# Note: Wildcards may be used, but a wildcard will never match a /, except
|
||||
# for "allowed_files=*" which allows any file. For example, to allow only
|
||||
# files in the /share directory to be mounted, use:
|
||||
# allowed_files = /share/*
|
||||
# NOTE: Specifying allowed_files_FSTYPE will NOT work because the fstype of
|
||||
# files is always 'file'.
|
||||
allowed_files = *
|
||||
|
||||
|
||||
# forbidden_files is used to specify files that are never allowed, even if
|
||||
# other settings allow them (except fstab). Specify a full path.
|
||||
# Note: Wildcards may be used, but a wildcard will never match a /, except
|
||||
# for "forbidden_files = *".
|
||||
# NOTE: file paths are canonicalized before being tested, so forbidding
|
||||
# a link to a file will have no effect.
|
||||
forbidden_files =
|
||||
|
||||
|
||||
# default_options specifies what options are always included when performing
|
||||
# a mount, in addition to any options the user may specify.
|
||||
# Note: When a device is present in /etc/fstab, and the user does not specify
|
||||
# a mount point, the device is mounted with normal user permissions using
|
||||
# the fstab entry, without these options.
|
||||
# default_options_FSTYPE, if present, is used to override default_options
|
||||
# when mounting a specific fstype (eg ext2, nfs).
|
||||
# The variables $USER, $UID, and $GID are changed to the user's username, UID,
|
||||
# and GID.
|
||||
# FOR GOOD SECURITY, default_options SHOULD ALWAYS INCLUDE: nosuid,noexec,nodev
|
||||
# WARNING: OPTIONS PRESENT OR MISSING CAN CAUSE SERIOUS SECURITY PROBLEMS.
|
||||
default_options = nosuid, noexec, nodev, noatime
|
||||
default_options_file = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, ro
|
||||
# mount iso9660 with 'ro' to prevent mount read-only warning
|
||||
default_options_iso9660 = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, ro, utf8
|
||||
default_options_udf = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
|
||||
default_options_vfat = nosuid, noexec, nodev, noatime, fmask=0022, dmask=0022, uid=$UID, gid=$GID, utf8
|
||||
default_options_msdos = nosuid, noexec, nodev, noatime, fmask=0022, dmask=0022, uid=$UID, gid=$GID
|
||||
default_options_umsdos = nosuid, noexec, nodev, noatime, fmask=0022, dmask=0022, uid=$UID, gid=$GID
|
||||
default_options_ntfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, utf8
|
||||
default_options_cifs = nosuid, noexec, nodev, uid=$UID, gid=$GID
|
||||
default_options_smbfs = nosuid, noexec, nodev, uid=$UID, gid=$GID
|
||||
default_options_sshfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, nonempty, allow_other
|
||||
default_options_curlftpfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, nonempty, allow_other
|
||||
default_options_ftpfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
|
||||
default_options_davfs = nosuid, noexec, nodev, uid=$UID, gid=$GID
|
||||
default_options_tmpfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
|
||||
default_options_ramfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
|
||||
|
||||
|
||||
# allowed_options determines all options that a user may specify when mounting.
|
||||
# All the options used in default_options above must be included here too, or
|
||||
# they will be rejected. If the user attempts to use an option not included
|
||||
# here, an error will result. Wildcards may be used.
|
||||
# allowed_options_FSTYPE, if present, is used to override allowed_options
|
||||
# when mounting a specific fstype (eg ext2, nfs).
|
||||
# The variables $USER, $UID, and $GID are changed to the user's username, UID,
|
||||
# and GID.
|
||||
# If you want to forbid remounts, remove 'remount' from here.
|
||||
# WARNING: OPTIONS HERE CAN CAUSE SERIOUS SECURITY PROBLEMS - CHOOSE CAREFULLY
|
||||
allowed_options = nosuid, noexec, nodev, noatime, fmask=0022, dmask=0022, uid=$UID, gid=$GID, ro, rw, sync, flush, iocharset=*, utf8, remount
|
||||
allowed_options_nfs = nosuid, noexec, nodev, noatime, ro, rw, sync, remount, port=*, rsize=*, wsize=*, hard, proto=*, timeo=*, retrans=*
|
||||
allowed_options_cifs = nosuid, noexec, nodev, ro, rw, remount, port=*, user=*, username=*, pass=*, password=*, guest, domain=*, uid=$UID, gid=$GID, credentials=*
|
||||
allowed_options_smbfs = nosuid, noexec, nodev, ro, rw, remount, port=*, user=*, username=*, pass=*, password=*, guest, domain=*, uid=$UID, gid=$GID, credentials=*
|
||||
allowed_options_sshfs = nosuid, noexec, nodev, noatime, ro, rw, uid=$UID, gid=$GID, nonempty, allow_other, idmap=user, BatchMode=yes, port=*
|
||||
allowed_options_curlftpfs = nosuid, noexec, nodev, noatime, ro, rw, uid=$UID, gid=$GID, nonempty, allow_other, user=*
|
||||
allowed_options_ftpfs = nosuid, noexec, nodev, noatime, ro, rw, port=*, user=*, pass=*, ip=*, root=*, uid=$UID, gid=$GID
|
||||
|
||||
|
||||
# mount_point_mode, if present and set to a non-empty value, will cause udevil
|
||||
# to set the mode (permissions) on the moint point after mounting If not
|
||||
# specified or if left empty, the mode is not changed. Mode must be octal
|
||||
# starting with a zero (0755).
|
||||
# mount_point_mode_FSTYPE, if present, is used to override mount_point_mode
|
||||
# when mounting a specific fstype (eg ext2, nfs).
|
||||
# NOT SETTING A MODE CAN HAVE SECURITY IMPLICATIONS FOR SOME FSTYPES
|
||||
mount_point_mode = 0755
|
||||
# don't set a mode for some types:
|
||||
mount_point_mode_sshfs =
|
||||
mount_point_mode_curlftpfs =
|
||||
mount_point_mode_ftpfs =
|
||||
|
||||
|
||||
# Use the settings below to change the default locations of programs used by
|
||||
# udevil, or (advanced topic) to redirect commands to your scripts.
|
||||
# When substituting scripts, make sure they are root-owned and accept the
|
||||
# options used by udevil (for example, the mount_program must accept --fake,
|
||||
# -o, -v, and other options valid to mount.)
|
||||
# Be sure to specify the full path and include NO OPTIONS or other arguments.
|
||||
# These programs may also be specified as configure options when building
|
||||
# udevil.
|
||||
# THESE PROGRAMS ARE RUN AS ROOT
|
||||
# mount_program = /bin/mount
|
||||
# umount_program = /bin/umount
|
||||
# losetup_program = /sbin/losetup
|
||||
# setfacl_program = /usr/bin/setfacl
|
||||
|
||||
|
||||
# validate_exec specifies a program or script which provides additional
|
||||
# validation of a mount or unmount command, beyond the checks performed by
|
||||
# udevil. The program is run as a normal user (if root runs udevil,
|
||||
# validate_exec will NOT be run). The program is NOT run if the user is
|
||||
# mounting a device without root priviledges (a device in fstab).
|
||||
# The program is passed the username, a printable description of what is
|
||||
# happening, and the entire udevil command line as the first three arguments.
|
||||
# The program must return an exit status of 0 to allow the mount or unmount
|
||||
# to proceed. If it returns non-zero, the user will be denied permission.
|
||||
# For example, validate_exec might specify a script which notifies you
|
||||
# of the command being run, or performs additional steps to authenticate the
|
||||
# user.
|
||||
# Specify a full path to the program, with NO options or arguments.
|
||||
# validate_exec =
|
||||
|
||||
|
||||
# validate_rootexec works similarly to validate_exec, except that the program
|
||||
# is run as root. validate_rootexec will also be run if the root user runs
|
||||
# udevil. If both validate_exec and validate_rootexec are specified,
|
||||
# validate_rootexec will run first, followed by validate_exec.
|
||||
# The program must return an exit status of 0 to allow the mount or unmount
|
||||
# to proceed. If it returns non-zero, the user will be denied permission.
|
||||
# Unless you are familiar with writing root scripts, it is recommended that
|
||||
# rootexec settings NOT be used, as it is easy to inadvertently open exploits.
|
||||
# THIS PROGRAM IS ALWAYS RUN AS ROOT, even if the user running udevil is not.
|
||||
# validate_rootexec =
|
||||
|
||||
|
||||
# success_exec is run after a successful mount, remount, or unmount. The
|
||||
# program is run as a normal user (if root runs udevil, success_exec
|
||||
# will NOT be run).
|
||||
# The program is passed the username, a printable description of what action
|
||||
# was taken, and the entire udevil command line as the first three arguments.
|
||||
# The program's exit status is ignored.
|
||||
# For example, success_exec might run a script which informs you of what action
|
||||
# was taken, and might perform further actions.
|
||||
# Specify a full path to the program, with NO options or arguments.
|
||||
# success_exec =
|
||||
|
||||
|
||||
# success_rootexec works similarly to success_exec, except that the program is
|
||||
# run as root. success_rootexec will also be run if the root user runs udevil.
|
||||
# If both success_exec and success_rootexec are specified, success_rootexec
|
||||
# will run first, followed by success_exec.
|
||||
# Unless you are familiar with writing root scripts, it is recommended that
|
||||
# rootexec settings NOT be used, as it is easy to inadvertently open exploits.
|
||||
# THIS PROGRAM IS ALWAYS RUN AS ROOT, even if the user running udevil is not.
|
||||
# success_rootexec =
|
||||
|
@ -18,19 +18,37 @@
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="libatasmart"
|
||||
PKG_VERSION="0.19"
|
||||
PKG_NAME="udevil"
|
||||
PKG_VERSION="77e0ba0"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://0pointer.de/blog/projects/being-smart.html"
|
||||
PKG_URL="http://0pointer.de/public/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS="systemd"
|
||||
PKG_BUILD_DEPENDS="toolchain systemd"
|
||||
PKG_SITE="https://github.com/IgnorantGuru/udevil"
|
||||
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS="systemd glib"
|
||||
PKG_BUILD_DEPENDS_TARGET="toolchain systemd glib"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="system"
|
||||
PKG_SHORTDESC="libatasmart: a lean, small and clean implementation of an ATA S.M.A.R.T. reading and parsing library"
|
||||
PKG_LONGDESC="libatasmart is a lean, small and clean implementation of an ATA S.M.A.R.T. reading and parsing library. It's fairly comprehensive, however I only support a subset of the full S.M.A.R.T. set of functions: those parts which made sense to me, not the esoteric stuff."
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_SHORTDESC="udevil: Mounts and unmounts removable devices and networks without a password."
|
||||
PKG_LONGDESC="udevil Mounts and unmounts removable devices and networks without a password (set suid), shows device info, monitors device changes. Emulates mount's and udisks's command line usage and udisks v1's output. Includes the devmon automounting daemon."
|
||||
|
||||
PKG_AUTORECONF="no"
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="yes"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--disable-systemd \
|
||||
--with-mount-prog=/bin/mount \
|
||||
--with-umount-prog=/bin/umount \
|
||||
--with-losetup-prog=/sbin/losetup \
|
||||
--with-setfacl-prog=/usr/bin/setfacl"
|
||||
|
||||
makeinstall_target() {
|
||||
: # nothing to install
|
||||
}
|
||||
|
||||
post_makeinstall_target() {
|
||||
mkdir -p $INSTALL/etc/udevil
|
||||
cp $PKG_DIR/config/udevil.conf $INSTALL/etc/udevil
|
||||
|
||||
mkdir -p $INSTALL/usr/bin
|
||||
cp -PR src/udevil $INSTALL/usr/bin
|
||||
}
|
22
packages/sysutils/udevil/udev.d/95-udevil-mount.rules
Normal file
22
packages/sysutils/udevil/udev.d/95-udevil-mount.rules
Normal file
@ -0,0 +1,22 @@
|
||||
# check for blockdevices, /dev/sd* and /dev/sr*
|
||||
SUBSYSTEM!="block", KERNEL!="sd*|sr*",GOTO="exit"
|
||||
|
||||
# /dev/sd* with partitions only and /dev/sr* disks only
|
||||
KERNEL=="sd*", ENV{DEVTYPE}=="partition", GOTO="harddisk"
|
||||
KERNEL=="sr*", ENV{DEVTYPE}=="disk", GOTO="optical"
|
||||
GOTO="exit"
|
||||
|
||||
# mount or umount for hdds
|
||||
LABEL="harddisk"
|
||||
ACTION=="add", RUN+="/usr/bin/udevil --mount /dev/%k"
|
||||
ACTION=="remove", RUN+="/usr/bin/udevil --umount /dev/%k"
|
||||
GOTO="exit"
|
||||
|
||||
# mount or umount for opticals
|
||||
LABEL="optical"
|
||||
ACTION=="add|change", RUN+="/usr/bin/udevil --umount /dev/%k", RUN+="/usr/bin/udevil --mount /dev/%k"
|
||||
GOTO="exit"
|
||||
|
||||
# Exit
|
||||
LABEL="exit"
|
||||
|
@ -1,39 +0,0 @@
|
||||
################################################################################
|
||||
# Copyright (C) 2009-2010 OpenELEC.tv
|
||||
# http://www.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
|
||||
################################################################################
|
||||
|
||||
#
|
||||
# automount internal disks
|
||||
#
|
||||
# runlevels: openelec, textmode
|
||||
|
||||
(
|
||||
progress "automount internal disks"
|
||||
|
||||
wait_for_dbus
|
||||
|
||||
for DEVICE in `ls /sys/class/block/sd*/removable 2>/dev/null`; do
|
||||
if [ "$(cat $DEVICE)" = "0" ]; then
|
||||
DISK=$(echo "$DEVICE" | sed -e "s,/sys/class/block,/dev," -e "s,/removable,,")
|
||||
for PART in $(ls "$DISK"[0-9]*);do
|
||||
udisks --mount "$PART" >/dev/null
|
||||
done
|
||||
fi
|
||||
done
|
||||
)&
|
@ -1,52 +0,0 @@
|
||||
################################################################################
|
||||
# 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="udisks"
|
||||
PKG_VERSION="1.0.4"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.freedesktop.org/wiki/Software/udisks"
|
||||
PKG_URL="http://hal.freedesktop.org/releases/$PKG_NAME-$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS="systemd glib dbus parted polkit libatasmart"
|
||||
PKG_BUILD_DEPENDS_TARGET="toolchain sg3_utils systemd glib dbus dbus-glib parted polkit libatasmart"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="system"
|
||||
PKG_SHORTDESC="udisks: a modular hardware abstraction layer designed for use in Linux systems that is designed to simplify device management."
|
||||
PKG_LONGDESC="Udisks is a modular hardware abstraction layer designed for use in Linux systems that is designed to simplify device management and replace the current monolithic Linux HAL. Udisks includes the ability to enumerate system devices and send notifications when hardware is added or removed from the computer system."
|
||||
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="yes"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--datadir=/usr/share \
|
||||
--libexecdir=/usr/lib/udisks \
|
||||
--disable-man-pages \
|
||||
--disable-gtk-doc \
|
||||
--disable-gtk-doc-html \
|
||||
--disable-gtk-doc-pdf \
|
||||
--disable-lvm2 \
|
||||
--disable-dmmp \
|
||||
--disable-remote-access \
|
||||
--enable-nls"
|
||||
|
||||
post_makeinstall_target() {
|
||||
rm -rf $INSTALL/etc/profile.d
|
||||
rm -rf $INSTALL/lib/udev/rules.d
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
diff -Naur udisks-1.0.2/src/device.c udisks-1.0.2.patch/src/device.c
|
||||
--- udisks-1.0.2/src/device.c 2010-11-06 17:41:23.000000000 +0100
|
||||
+++ udisks-1.0.2.patch/src/device.c 2011-03-08 23:25:46.382977610 +0100
|
||||
@@ -6307,7 +6307,7 @@
|
||||
options = prepend_default_mount_options (fsmo, caller_uid, given_options);
|
||||
|
||||
/* validate mount options and check for authorizations */
|
||||
- s = g_string_new ("uhelper=udisks,nodev,nosuid");
|
||||
+ s = g_string_new ("nodev,nosuid");
|
||||
for (n = 0; options[n] != NULL; n++)
|
||||
{
|
||||
const char *option = options[n];
|
@ -1,17 +0,0 @@
|
||||
diff -Naur udisks-1.0.4/configure.ac udisks-1.0.4.patch/configure.ac
|
||||
--- udisks-1.0.4/configure.ac 2011-08-26 17:08:35.000000000 +0200
|
||||
+++ udisks-1.0.4.patch/configure.ac 2013-01-12 16:43:38.483117569 +0100
|
||||
@@ -3,12 +3,11 @@
|
||||
AC_PREREQ(2.59c)
|
||||
AC_INIT(udisks, 1.0.4, http://bugs.freedesktop.org/enter_bug.cgi?product=udisks)
|
||||
AM_INIT_AUTOMAKE(udisks, 1.0.4)
|
||||
-AM_CONFIG_HEADER(config.h)
|
||||
+AC_CONFIG_HEADERS(config.h)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AC_ISC_POSIX
|
||||
AC_PROG_CC
|
||||
-AM_PROG_CC_STDC
|
||||
AC_HEADER_STDC
|
||||
AM_PROG_LIBTOOL
|
||||
AC_PROG_MAKE_SET
|
@ -1,29 +0,0 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 50c0fe2..1d67de7 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -159,10 +159,6 @@ PKG_CHECK_MODULES(LIBPARTED, [libparted >= 1.8.8])
|
||||
AC_SUBST(LIBPARTED_CFLAGS)
|
||||
AC_SUBST(LIBPARTED_LIBS)
|
||||
|
||||
-PKG_CHECK_MODULES(DEVMAPPER, [devmapper >= 1.02])
|
||||
-AC_SUBST(DEVMAPPER_CFLAGS)
|
||||
-AC_SUBST(DEVMAPPER_LIBS)
|
||||
-
|
||||
have_lvm2=no
|
||||
AC_ARG_ENABLE(lvm2, AS_HELP_STRING([--enable-lvm2], [enable LVM2 support]))
|
||||
if test "x$enable_lvm2" = "xyes"; then
|
||||
diff --git a/src/probers/Makefile.am b/src/probers/Makefile.am
|
||||
index 06bb566..578b8ae 100644
|
||||
--- a/src/probers/Makefile.am
|
||||
+++ b/src/probers/Makefile.am
|
||||
@@ -22,9 +22,7 @@ INCLUDES = \
|
||||
|
||||
udevhelperdir = $(slashlibdir)/udev
|
||||
udevhelper_PROGRAMS = udisks-part-id \
|
||||
- udisks-dm-export \
|
||||
udisks-probe-ata-smart \
|
||||
- udisks-probe-sas-expander \
|
||||
$(NULL)
|
||||
|
||||
if HAVE_LVM2
|
@ -1,21 +0,0 @@
|
||||
################################################################################
|
||||
# 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
|
||||
################################################################################
|
||||
|
||||
d /var/lib/udisks 0755 root root - -
|
@ -26,7 +26,7 @@ PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://sources.redhat.com/autoconf/"
|
||||
PKG_URL="http://ftp.gnu.org/gnu/autoconf/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS=""
|
||||
PKG_BUILD_DEPENDS="ccache m4 gettext"
|
||||
PKG_BUILD_DEPENDS="ccache m4 gettext:host"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="toolchain/devel"
|
||||
PKG_SHORTDESC="autoconf: A GNU tool for automatically configuring source code"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user