mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 21:26:49 +00:00
Merge branch 'master' of github.com:OpenELEC/OpenELEC.tv into openelec-next
Conflicts: packages/linux/meta projects/ATV/linux/linux.i386.conf projects/ATV/options projects/Fusion/linux/linux.i386.conf projects/Fusion/linux/linux.x86_64.conf projects/Fusion/options projects/Generic/linux/linux.i386.conf projects/Generic/options projects/Generic_OSS/linux/linux.i386.conf projects/Generic_OSS/options projects/ION/linux/linux.i386.conf projects/ION/linux/linux.x86_64.conf projects/ION/options projects/Intel/linux/linux.i386.conf projects/Intel/linux/linux.x86_64.conf projects/Intel/options projects/Ultra/linux/linux.x86_64.conf projects/Ultra/options projects/Virtual/linux/linux.i386.conf projects/Virtual/linux/linux.x86_64.conf projects/Virtual/options
This commit is contained in:
commit
936fa6aa1f
2
packages/3rdparty/download/CouchPotato/meta
vendored
2
packages/3rdparty/download/CouchPotato/meta
vendored
@ -20,7 +20,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="CouchPotato"
|
||||
PKG_VERSION="2cb84f0"
|
||||
PKG_VERSION="806bed6"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
|
@ -20,7 +20,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="CouchPotatoServer"
|
||||
PKG_VERSION="7367f7d"
|
||||
PKG_VERSION="e1d7440"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
|
2
packages/3rdparty/download/Headphones/meta
vendored
2
packages/3rdparty/download/Headphones/meta
vendored
@ -20,7 +20,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Headphones"
|
||||
PKG_VERSION="89c2a8c"
|
||||
PKG_VERSION="d07dc39"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
|
2
packages/3rdparty/download/SABnzbd/meta
vendored
2
packages/3rdparty/download/SABnzbd/meta
vendored
@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="SABnzbd"
|
||||
PKG_VERSION="0.7.0"
|
||||
PKG_VERSION="0.7.3"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
|
2
packages/3rdparty/download/SickBeard/meta
vendored
2
packages/3rdparty/download/SickBeard/meta
vendored
@ -20,7 +20,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="SickBeard"
|
||||
PKG_VERSION="b3a7afe"
|
||||
PKG_VERSION="b7cf06e"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
|
@ -1,3 +1,10 @@
|
||||
2.1.8
|
||||
- update to SABnzbd-0.7.3
|
||||
- update to CouchPotato-806bed6
|
||||
- update to CouchPotatoServer-e1d7440
|
||||
- update to Headphones-d07dc39
|
||||
- update to SickBeard-b7cf06e
|
||||
|
||||
2.1.7
|
||||
- update to SABnzbd-0.7.0
|
||||
- update to Headphones-89c2a8c
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
PKG_NAME="SABnzbd-Suite"
|
||||
PKG_VERSION="2.1"
|
||||
PKG_REV="7"
|
||||
PKG_REV="8"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://www.openelec.tv"
|
||||
|
@ -34,7 +34,7 @@ cd $PKG_BUILD
|
||||
--localstatedir=/var \
|
||||
--disable-static \
|
||||
--enable-shared \
|
||||
--disable-utp \
|
||||
--enable-utp \
|
||||
--enable-largefile \
|
||||
--disable-nls \
|
||||
--disable-cli \
|
||||
|
@ -1,3 +1,7 @@
|
||||
2.1.5
|
||||
- update to transmission-2.61
|
||||
- update libevent to libevent-2.0.19-stable
|
||||
|
||||
2.1.4
|
||||
- update to transmission-2.52
|
||||
|
||||
|
@ -19,8 +19,8 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="transmission"
|
||||
PKG_VERSION="2.52"
|
||||
PKG_REV="4"
|
||||
PKG_VERSION="2.61"
|
||||
PKG_REV="5"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://www.transmissionbt.com/"
|
||||
|
27
packages/devel/libcofi/build
Executable file
27
packages/devel/libcofi/build
Executable file
@ -0,0 +1,27 @@
|
||||
#!/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
|
||||
|
||||
make libcofi_rpi.so
|
29
packages/devel/libcofi/install
Executable file
29
packages/devel/libcofi/install
Executable file
@ -0,0 +1,29 @@
|
||||
#!/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/lib
|
||||
cp -P $PKG_BUILD/*.so* $INSTALL/lib
|
||||
|
||||
mkdir -p $INSTALL/etc
|
||||
echo "/lib/libcofi_rpi.so" >> $INSTALL/etc/ld.so.preload
|
36
packages/devel/libcofi/meta
Normal file
36
packages/devel/libcofi/meta
Normal file
@ -0,0 +1,36 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This Program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="libcofi"
|
||||
PKG_VERSION="7313fbe"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="arm"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/simonjhall/copies-and-fills"
|
||||
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS=""
|
||||
PKG_BUILD_DEPENDS="toolchain"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="devel"
|
||||
PKG_SHORTDESC="libcofi: a replacement for memcpy and memset functionality for the Raspberry Pi with the intention of gaining greater performance"
|
||||
PKG_LONGDESC="libcofi is a replacement for memcpy and memset functionality for the Raspberry Pi with the intention of gaining greater performance"
|
||||
PKG_IS_ADDON="no"
|
||||
|
||||
PKG_AUTORECONF="no"
|
@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="libevent"
|
||||
PKG_VERSION="2.0.16-stable"
|
||||
PKG_VERSION="2.0.19-stable"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="BSD"
|
||||
|
@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="bcm2835-driver"
|
||||
PKG_VERSION="c2c114a"
|
||||
PKG_VERSION="4ec01c7"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="nonfree"
|
||||
|
@ -34,3 +34,7 @@ PKG_LONGDESC="The Embedded GLIBC (EGLIBC) is a variant of the GNU C Library (GLI
|
||||
PKG_IS_ADDON="no"
|
||||
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
if [ "$OPENMAX" = "bcm2835-driver" ]; then
|
||||
PKG_DEPENDS="$PKG_DEPENDS libcofi-initramfs"
|
||||
fi
|
||||
|
31
packages/initramfs/devel/libcofi-initramfs/install
Executable file
31
packages/initramfs/devel/libcofi-initramfs/install
Executable file
@ -0,0 +1,31 @@
|
||||
#!/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
|
||||
|
||||
LIBCOFI_DIR="$BUILD/libcofi-*"
|
||||
|
||||
mkdir -p $INSTALL/lib
|
||||
cp -P $LIBCOFI_DIR/*.so* $INSTALL/lib
|
||||
|
||||
mkdir -p $INSTALL/etc
|
||||
echo "/lib/libcofi_rpi.so" > $INSTALL/etc/ld.so.preload
|
36
packages/initramfs/devel/libcofi-initramfs/meta
Normal file
36
packages/initramfs/devel/libcofi-initramfs/meta
Normal file
@ -0,0 +1,36 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This Program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="libcofi"
|
||||
PKG_VERSION=""
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="arm"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/simonjhall/copies-and-fills"
|
||||
PKG_URL=""
|
||||
PKG_DEPENDS=""
|
||||
PKG_BUILD_DEPENDS="toolchain libcofi"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="initramfs/devel"
|
||||
PKG_SHORTDESC="libcofi: a replacement for memcpy and memset functionality for the Raspberry Pi with the intention of gaining greater performance"
|
||||
PKG_LONGDESC="libcofi is a replacement for memcpy and memset functionality for the Raspberry Pi with the intention of gaining greater performance"
|
||||
PKG_IS_ADDON="no"
|
||||
|
||||
PKG_AUTORECONF="no"
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Busybox version: 1.20.0
|
||||
# Thu May 3 22:26:07 2012
|
||||
# Busybox version: 1.20.2
|
||||
# Tue Aug 7 00:21:10 2012
|
||||
#
|
||||
CONFIG_HAVE_DOT_CONFIG=y
|
||||
|
||||
@ -200,7 +200,7 @@ CONFIG_FEATURE_TR_EQUIV=y
|
||||
CONFIG_CHROOT=y
|
||||
# CONFIG_CKSUM is not set
|
||||
# CONFIG_COMM is not set
|
||||
# CONFIG_CP is not set
|
||||
CONFIG_CP=y
|
||||
# CONFIG_FEATURE_CP_LONG_OPTIONS is not set
|
||||
# CONFIG_CUT is not set
|
||||
# CONFIG_DD is not set
|
||||
|
@ -295,6 +295,25 @@ NBD_DEVS="0"
|
||||
fi
|
||||
}
|
||||
|
||||
update_bootloader() {
|
||||
if [ -f "/flash/$IMAGE_SYSTEM" ]; then
|
||||
# /flash is filesystem with system image file
|
||||
export BOOT_ROOT="/flash"
|
||||
export SYSTEM_ROOT="/sysroot"
|
||||
|
||||
mount_part "/flash/$IMAGE_SYSTEM" "/sysroot" "ro,loop"
|
||||
|
||||
if [ -f $SYSTEM_ROOT/usr/share/bootloader/update.sh ]; then
|
||||
echo "updating Bootloader..."
|
||||
$IONICE /bin/busybox sh $SYSTEM_ROOT/usr/share/bootloader/update.sh
|
||||
$IONICE /bin/busybox sync
|
||||
fi
|
||||
|
||||
umount /sysroot
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
hfsdiskprep() {
|
||||
for DEVICE in /dev/sd*; do
|
||||
for device in $(/bin/busybox blkid $DEVICE); do
|
||||
@ -353,10 +372,14 @@ NBD_DEVS="0"
|
||||
fi
|
||||
}
|
||||
|
||||
mount_disks() {
|
||||
progress "Mounting disks"
|
||||
mount_flash() {
|
||||
progress "Mounting flash"
|
||||
|
||||
mount_part "$boot" "/flash" "ro,noatime"
|
||||
}
|
||||
|
||||
mount_storage() {
|
||||
progress "Mounting storage"
|
||||
|
||||
if [ -n "$disk" ]; then
|
||||
if [ -n "$OVERLAY" ]; then
|
||||
@ -411,6 +434,7 @@ NBD_DEVS="0"
|
||||
if [ "$MD5_FAILED" -eq "0" -o "$MD5_NOCHECK" -eq "1" ] ; then
|
||||
update "Kernel" "$UPDATE_KERNEL" "/flash/$IMAGE_KERNEL"
|
||||
update "System" "$UPDATE_SYSTEM" "/flash/$IMAGE_SYSTEM"
|
||||
update_bootloader
|
||||
REBOOT="1"
|
||||
else
|
||||
/bin/busybox rm "$UPDATE_DIR/$UPDATE_KERNEL"
|
||||
@ -451,9 +475,10 @@ NBD_DEVS="0"
|
||||
# main boot sequence
|
||||
for BOOT_STEP in \
|
||||
load_modules \
|
||||
load_splash \
|
||||
check_disks \
|
||||
mount_disks \
|
||||
mount_flash \
|
||||
load_splash \
|
||||
mount_storage \
|
||||
check_update \
|
||||
prepare_sysroot; do
|
||||
$BOOT_STEP
|
||||
|
@ -25,8 +25,8 @@ PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://www.python.org/"
|
||||
PKG_URL="http://www.python.org/ftp/python/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS="sqlite expat zlib openssl libffi file"
|
||||
PKG_BUILD_DEPENDS="toolchain Python-host sqlite expat zlib openssl libffi"
|
||||
PKG_DEPENDS="sqlite expat zlib bzip2 openssl libffi file"
|
||||
PKG_BUILD_DEPENDS="toolchain Python-host sqlite expat zlib bzip2 openssl libffi"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="lang"
|
||||
PKG_SHORTDESC="python: The Python programming language"
|
||||
|
@ -22,9 +22,6 @@
|
||||
|
||||
. config/options $1
|
||||
|
||||
# dont use our LDFLAGS, use the KERNEL LDFLAGS
|
||||
LDFLAGS=""
|
||||
|
||||
cd $PKG_BUILD
|
||||
make V=1 CC=$CC KDIR=$(kernel_path)
|
||||
LDFLAGS="" make V=1 CC=$CC KDIR=$(kernel_path)
|
||||
|
||||
|
@ -32,10 +32,7 @@ sed -i "s|KDIR = .*|KDIR = $(kernel_path)|" Makefile
|
||||
sed -i "s|KSRC = .*|KSRC = \$KDIR|" Makefile
|
||||
sed -i "s|KINS = .*|KINS = \./modules|" Makefile
|
||||
|
||||
# dont use our LDFLAGS, use the KERNEL LDFLAGS
|
||||
LDFLAGS=""
|
||||
|
||||
make CC=$CC
|
||||
LDFLAGS="" make CC=$CC
|
||||
|
||||
# ultraman: Original build module doesn't depends on dvb-usb module
|
||||
# How to fix that? For now let's just modify .modinfo section in kernel module
|
||||
|
@ -22,8 +22,6 @@
|
||||
|
||||
. config/options $1
|
||||
|
||||
# dont use our LDFLAGS, use the KERNEL LDFLAGS
|
||||
LDFLAGS=""
|
||||
|
||||
cd $PKG_BUILD
|
||||
make V=1 CC=$CC KDIR=$(kernel_path)
|
||||
LDFLAGS="" make V=1 CC=$CC KDIR=$(kernel_path)
|
||||
|
26
packages/linux-drivers/RTL8192CU/build
Executable file
26
packages/linux-drivers/RTL8192CU/build
Executable file
@ -0,0 +1,26 @@
|
||||
#!/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
|
||||
LDFLAGS="" make V=1 ARCH=$TARGET_ARCH KSRC=$(kernel_path) CROSS_COMPILE=$TARGET_PREFIX
|
28
packages/linux-drivers/RTL8192CU/install
Executable file
28
packages/linux-drivers/RTL8192CU/install
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This Program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
. config/options $1
|
||||
|
||||
VER=`ls $BUILD/linux*/modules/lib/modules`
|
||||
|
||||
mkdir -p $INSTALL/lib/modules/$VER/RTL8188CU
|
||||
cp $PKG_BUILD/*.ko $INSTALL/lib/modules/$VER/RTL8188CU
|
36
packages/linux-drivers/RTL8192CU/meta
Normal file
36
packages/linux-drivers/RTL8192CU/meta
Normal file
@ -0,0 +1,36 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This Program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="RTL8192CU"
|
||||
PKG_VERSION="v3.4.3_4369.20120622"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PFid=48&Level=5&Conn=4&ProdID=274&DownTypeID=3&GetDown=false&Downloads=true"
|
||||
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS=""
|
||||
PKG_BUILD_DEPENDS="toolchain linux"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="driver"
|
||||
PKG_SHORTDESC="Realtek RTL81xxCU Linux 3.x driver"
|
||||
PKG_LONGDESC="Realtek RTL81xxCU Linux 3.x driver"
|
||||
PKG_IS_ADDON="no"
|
||||
|
||||
PKG_AUTORECONF="no"
|
32
packages/linux-drivers/RTL8192CU/need_unpack
Executable file
32
packages/linux-drivers/RTL8192CU/need_unpack
Executable file
@ -0,0 +1,32 @@
|
||||
#!/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
|
||||
|
||||
STAMP=$STAMPS/$1/unpack
|
||||
|
||||
test $PKG_DIR/config/linux.$TARGET_ARCH.conf -nt $STAMP -o \
|
||||
$PROJECT_DIR/$PROJECT/linux/linux.$TARGET_ARCH.conf -nt $STAMP -o \
|
||||
$PKG_DIR/url -nt $STAMP -o \
|
||||
$PKG_DIR/meta -nt $STAMP && rm -f $STAMP
|
||||
|
||||
exit 0
|
@ -0,0 +1,13 @@
|
||||
diff -Naur RTL8192CU-v3.4.3_4369.20120622/os_dep/linux/usb_intf.c RTL8192CU-v3.4.3_4369.20120622.patch/os_dep/linux/usb_intf.c
|
||||
--- RTL8192CU-v3.4.3_4369.20120622/os_dep/linux/usb_intf.c 2012-06-22 16:59:51.000000000 +0200
|
||||
+++ RTL8192CU-v3.4.3_4369.20120622.patch/os_dep/linux/usb_intf.c 2012-08-08 08:13:59.755932307 +0200
|
||||
@@ -99,7 +99,9 @@
|
||||
{USB_DEVICE(0x2019, 0xED17)},//PCI - Edimax
|
||||
{USB_DEVICE(0x0DF6, 0x0052)},//Sitecom - Edimax
|
||||
{USB_DEVICE(0x7392, 0x7811)},//Edimax - Edimax
|
||||
+ {USB_DEVICE(0x07B8, 0x8188)},//Abocom - Abocom
|
||||
{USB_DEVICE(0x07B8, 0x8189)},//Abocom - Abocom
|
||||
+ {USB_DEVICE(0x0846, 0x9041)},//NetGear WNA1000M
|
||||
{USB_DEVICE(0x0EB0, 0x9071)},//NO Brand - Etop
|
||||
{USB_DEVICE(0x06F8, 0xE033)},//Hercules - Edimax
|
||||
{USB_DEVICE(0x103C, 0x1629)},//HP - Lite-On ,8188CUS Slim Combo
|
@ -27,7 +27,7 @@ cd $PKG_BUILD
|
||||
[ -z "$OBJDUMP" ] && OBJDUMP=${TARGET_PREFIX}objdump
|
||||
[ -z "$ECHO" ] && ECHO=/bin/echo
|
||||
|
||||
make CC=$CC KSRC=$(kernel_path) KOBJ=$(kernel_path)
|
||||
LDFLAGS="" make CC=$CC KSRC=$(kernel_path) KOBJ=$(kernel_path)
|
||||
|
||||
# ultraman: Original build module doesn't depends on dvb-usb module
|
||||
# How to fix that? For now let's just modify .modinfo section in kernel module
|
||||
|
@ -22,8 +22,5 @@
|
||||
|
||||
. config/options $1
|
||||
|
||||
# dont use our LDFLAGS, use the KERNEL LDFLAGS
|
||||
LDFLAGS=""
|
||||
|
||||
cd $PKG_BUILD
|
||||
make V=1 CC=$CC KDIR=$(kernel_path)
|
||||
LDFLAGS="" make V=1 CC=$CC KDIR=$(kernel_path)
|
||||
|
@ -24,6 +24,6 @@
|
||||
|
||||
cd $PKG_BUILD/installer/src
|
||||
|
||||
make KERNELDIR=$(kernel_path)
|
||||
LDFLAGS="" make KERNELDIR=$(kernel_path)
|
||||
|
||||
fix_module_depends "h826d.ko" "averusbh826d,videodev"
|
||||
|
@ -27,4 +27,4 @@ cd $PKG_BUILD
|
||||
[ "$TARGET_ARCH" = "i386" ] && cd x86-32
|
||||
[ "$TARGET_ARCH" = "x86_64" ] && cd x86-64
|
||||
|
||||
KBUILD_NOPEDANTIC=1 make V=1 CC=$CC -C $(kernel_path) M=`pwd`
|
||||
LDFLAGS="" KBUILD_NOPEDANTIC=1 make V=1 CC=$CC -C $(kernel_path) M=`pwd`
|
||||
|
@ -24,9 +24,7 @@
|
||||
|
||||
$SCRIPTS/unpack dvbhdhomerun
|
||||
|
||||
# dont use our LDFLAGS, use the KERNEL LDFLAGS
|
||||
LDFLAGS=""
|
||||
|
||||
cd $BUILD/dvbhdhomerun-*/kernel
|
||||
make dvb_hdhomerun KERNEL_DIR=$(kernel_path)
|
||||
LDFLAGS="" make dvb_hdhomerun KERNEL_DIR=$(kernel_path)
|
||||
fix_module_depends dvb_hdhomerun_core.ko "dvb_core"
|
||||
|
@ -27,4 +27,4 @@ cd $BUILD/${PKG_NAME}-${PKG_VERSION}/linux-tbs-drivers
|
||||
[ "$TARGET_ARCH" = "i386" ] && ./v4l/tbs-x86_r3.sh
|
||||
[ "$TARGET_ARCH" = "x86_64" ] && ./v4l/tbs-x86_64.sh
|
||||
|
||||
make DIR=$(kernel_path)
|
||||
LDFLAGS="" make DIR=$(kernel_path)
|
||||
|
@ -23,5 +23,4 @@
|
||||
. config/options $1
|
||||
|
||||
cd $BUILD/${PKG_NAME}-${PKG_VERSION}
|
||||
|
||||
make KERN_DIR=$(kernel_path)
|
||||
LDFLAGS="" make KERN_DIR=$(kernel_path)
|
||||
|
@ -23,10 +23,6 @@
|
||||
. config/options $1
|
||||
|
||||
cd $PKG_BUILD
|
||||
|
||||
# dont use our LDFLAGS, use the KERNEL LDFLAGS
|
||||
LDFLAGS=""
|
||||
|
||||
make KDIR=$(kernel_path) CC=$CC
|
||||
fix_module_depends vtunerc.ko "dvb_core"
|
||||
LDFLAGS="" make KDIR=$(kernel_path) CC=$CC
|
||||
fix_module_depends vtunerc.ko "dvb_core"
|
||||
|
||||
|
@ -29,8 +29,6 @@ else
|
||||
KERNEL_IMAGE="bzImage"
|
||||
fi
|
||||
|
||||
unset LDFLAGS
|
||||
|
||||
# dont build parallel
|
||||
MAKEFLAGS=-j1
|
||||
|
||||
@ -38,8 +36,8 @@ cd $(kernel_path)
|
||||
rm -rf modules
|
||||
mkdir -p modules
|
||||
|
||||
make modules
|
||||
make INSTALL_MOD_PATH=modules DEPMOD="$ROOT/$TOOLCHAIN/bin/depmod" modules_install
|
||||
LDFLAGS="" make modules
|
||||
LDFLAGS="" make INSTALL_MOD_PATH=modules DEPMOD="$ROOT/$TOOLCHAIN/bin/depmod" modules_install
|
||||
rm -f modules/lib/modules/*/build
|
||||
rm -f modules/lib/modules/*/source
|
||||
cd -
|
||||
@ -52,15 +50,15 @@ cd $INSTALL
|
||||
cd -
|
||||
|
||||
cd $(kernel_path)
|
||||
make $KERNEL_IMAGE
|
||||
LDFLAGS="" make $KERNEL_IMAGE
|
||||
|
||||
( cd tools/power/cpupower
|
||||
|
||||
# dont use some optimizations because of build problems
|
||||
TARGET_LDFLAGS=`echo $TARGET_LDFLAGS | sed -e "s|-Wl,--as-needed||"`
|
||||
LDFLAGS=`echo $LDFLAGS | sed -e "s|-Wl,--as-needed||"`
|
||||
|
||||
export CFLAGS="$TARGET_CFLAGS -I$SYSROOT_PREFIX/usr/include"
|
||||
export LDFLAGS="$TARGET_LDFLAGS -L$SYSROOT_PREFIX/lib -L$SYSROOT_PREFIX/usr/lib"
|
||||
export CFLAGS="$CFLAGS -I$SYSROOT_PREFIX/usr/include"
|
||||
export LDFLAGS="$LDFLAGS -L$SYSROOT_PREFIX/lib -L$SYSROOT_PREFIX/usr/lib"
|
||||
|
||||
make CROSS="$TARGET_PREFIX" \
|
||||
V=1 \
|
||||
|
@ -21,7 +21,7 @@
|
||||
PKG_NAME="linux"
|
||||
PKG_VERSION="3.5"
|
||||
if [ "$LINUX" = "3.2" ]; then
|
||||
PKG_VERSION="3.2.24"
|
||||
PKG_VERSION="3.2.26"
|
||||
fi
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
|
@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="xbmc-rpi-theme-Confluence"
|
||||
PKG_VERSION="365953f"
|
||||
PKG_VERSION="efef226"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
|
@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="xbmc-rpi"
|
||||
PKG_VERSION="365953f"
|
||||
PKG_VERSION="efef226"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
|
@ -0,0 +1,27 @@
|
||||
diff --git a/xbmc/filesystem/PluginDirectory.cpp b/xbmc/filesystem/PluginDirectory.cpp
|
||||
index 9e519fb..b64267b 100644
|
||||
--- a/xbmc/filesystem/PluginDirectory.cpp
|
||||
+++ b/xbmc/filesystem/PluginDirectory.cpp
|
||||
@@ -479,7 +479,7 @@ bool CPluginDirectory::WaitOnScriptResult(const CStdString &scriptPath, const CS
|
||||
}
|
||||
|
||||
// check whether we should pop up the progress dialog
|
||||
- if (!progressBar && XbmcThreads::SystemClockMillis() - startTime > timeBeforeProgressBar)
|
||||
+ if (!progressBar && XbmcThreads::SystemClockMillis() - startTime > timeBeforeProgressBar && !g_windowManager.HasModalDialog())
|
||||
{ // loading takes more then 1.5 secs, show a progress dialog
|
||||
progressBar = (CGUIDialogProgress *)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
|
||||
|
||||
diff --git a/xbmc/interfaces/python/xbmcmodule/keyboard.cpp b/xbmc/interfaces/python/xbmcmodule/keyboard.cpp
|
||||
index 0330215..0604a65 100644
|
||||
--- a/xbmc/interfaces/python/xbmcmodule/keyboard.cpp
|
||||
+++ b/xbmc/interfaces/python/xbmcmodule/keyboard.cpp
|
||||
@@ -92,6 +92,9 @@ namespace PYXBMC
|
||||
|
||||
if (!PyArg_ParseTuple(args, (char*)"|i", &autoClose)) return NULL;
|
||||
|
||||
+ if (g_windowManager.IsWindowActive(WINDOW_DIALOG_PROGRESS))
|
||||
+ g_windowManager.CloseDialogs();
|
||||
+
|
||||
PyXBMCGUILock();
|
||||
pKeyboard->Initialize();
|
||||
pKeyboard->SetHeading(self->strHeading);
|
@ -0,0 +1,27 @@
|
||||
diff --git a/xbmc/filesystem/PluginDirectory.cpp b/xbmc/filesystem/PluginDirectory.cpp
|
||||
index 9e519fb..b64267b 100644
|
||||
--- a/xbmc/filesystem/PluginDirectory.cpp
|
||||
+++ b/xbmc/filesystem/PluginDirectory.cpp
|
||||
@@ -479,7 +479,7 @@ bool CPluginDirectory::WaitOnScriptResult(const CStdString &scriptPath, const CS
|
||||
}
|
||||
|
||||
// check whether we should pop up the progress dialog
|
||||
- if (!progressBar && XbmcThreads::SystemClockMillis() - startTime > timeBeforeProgressBar)
|
||||
+ if (!progressBar && XbmcThreads::SystemClockMillis() - startTime > timeBeforeProgressBar && !g_windowManager.HasModalDialog())
|
||||
{ // loading takes more then 1.5 secs, show a progress dialog
|
||||
progressBar = (CGUIDialogProgress *)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
|
||||
|
||||
diff --git a/xbmc/interfaces/python/xbmcmodule/keyboard.cpp b/xbmc/interfaces/python/xbmcmodule/keyboard.cpp
|
||||
index 0330215..0604a65 100644
|
||||
--- a/xbmc/interfaces/python/xbmcmodule/keyboard.cpp
|
||||
+++ b/xbmc/interfaces/python/xbmcmodule/keyboard.cpp
|
||||
@@ -92,6 +92,9 @@ namespace PYXBMC
|
||||
|
||||
if (!PyArg_ParseTuple(args, (char*)"|i", &autoClose)) return NULL;
|
||||
|
||||
+ if (g_windowManager.IsWindowActive(WINDOW_DIALOG_PROGRESS))
|
||||
+ g_windowManager.CloseDialogs();
|
||||
+
|
||||
PyXBMCGUILock();
|
||||
pKeyboard->Initialize();
|
||||
pKeyboard->SetHeading(self->strHeading);
|
@ -28,7 +28,7 @@ cd $PKG_BUILD/driver/linux
|
||||
--prefix=/usr \
|
||||
--with-kernel-path=$(kernel_path) \
|
||||
|
||||
make V=1
|
||||
LDFLAGS="" make V=1
|
||||
|
||||
cd ../../linux_lib/libcrystalhd
|
||||
|
||||
|
@ -0,0 +1,56 @@
|
||||
#The clang integrated assembler does not support pre-UAL syntax,
|
||||
#while gcc requires pre-UAL syntax for ARM code. A patch[1] for
|
||||
#clang to support the old syntax as well has been ignored since
|
||||
#January.
|
||||
#
|
||||
#This patch chooses the syntax appropriate for each compiler,
|
||||
#allowing both to build the code. Notably, this change allows
|
||||
#building for iphone with the latest Apple Xcode update.
|
||||
#
|
||||
#[1] http://llvm.org/bugs/show_bug.cgi?id=11855
|
||||
#
|
||||
#Signed-off-by: Mans Rullgard <mans at mansr.com>
|
||||
|
||||
diff --git a/libavcodec/arm/vp56_arith.h b/libavcodec/arm/vp56_arith.h
|
||||
index ef30ffe..d1a8837 100644
|
||||
--- a/libavcodec/arm/vp56_arith.h
|
||||
+++ b/libavcodec/arm/vp56_arith.h
|
||||
@@ -29,6 +29,14 @@
|
||||
# define T(x)
|
||||
#endif
|
||||
|
||||
+#if CONFIG_THUMB || defined __clang__
|
||||
+# define L(x)
|
||||
+# define U(x) x
|
||||
+#else
|
||||
+# define L(x) x
|
||||
+# define U(x)
|
||||
+#endif
|
||||
+
|
||||
#if HAVE_ARMV6 && HAVE_INLINE_ASM
|
||||
|
||||
#define vp56_rac_get_prob vp56_rac_get_prob_armv6
|
||||
@@ -42,8 +50,8 @@ static inline int vp56_rac_get_prob_armv6(VP56RangeCoder *c, int pr)
|
||||
__asm__ ("adds %3, %3, %0 \n"
|
||||
"itt cs \n"
|
||||
"cmpcs %7, %4 \n"
|
||||
- A("ldrcsh %2, [%4], #2 \n")
|
||||
- T("ldrhcs %2, [%4], #2 \n")
|
||||
+ L("ldrcsh %2, [%4], #2 \n")
|
||||
+ U("ldrhcs %2, [%4], #2 \n")
|
||||
"rsb %0, %6, #256 \n"
|
||||
"smlabb %0, %5, %6, %0 \n"
|
||||
T("itttt cs \n")
|
||||
@@ -80,8 +88,8 @@ static inline int vp56_rac_get_prob_branchy_armv6(VP56RangeCoder *c, int pr)
|
||||
__asm__ ("adds %3, %3, %0 \n"
|
||||
"itt cs \n"
|
||||
"cmpcs %7, %4 \n"
|
||||
- A("ldrcsh %2, [%4], #2 \n")
|
||||
- T("ldrhcs %2, [%4], #2 \n")
|
||||
+ L("ldrcsh %2, [%4], #2 \n")
|
||||
+ U("ldrhcs %2, [%4], #2 \n")
|
||||
"rsb %0, %6, #256 \n"
|
||||
"smlabb %0, %5, %6, %0 \n"
|
||||
T("itttt cs \n")
|
||||
--
|
||||
1.7.11.1
|
@ -19,12 +19,12 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="libva-driver-intel"
|
||||
PKG_VERSION="27719c529e1fdd61927f89b671bd62590865d4ef"
|
||||
PKG_VERSION="1.0.18"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="i386 x86_64"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://freedesktop.org/wiki/Software/vaapi"
|
||||
PKG_URL="http://cgit.freedesktop.org/vaapi/intel-driver/snapshot/intel-driver-$PKG_VERSION.tar.bz2"
|
||||
PKG_URL="http://cgit.freedesktop.org/vaapi/intel-driver/snapshot/intel-driver-$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS="libdrm"
|
||||
PKG_BUILD_DEPENDS="toolchain libva libdrm"
|
||||
PKG_PRIORITY="optional"
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
[ -d $BUILD/$PKG_NAME-$PKG_VERSION ] && rm -rf $BUILD/$PKG_NAME-$PKG_VERSION
|
||||
|
||||
tar -xjf $SOURCES/$PKG_NAME/intel-driver-$PKG_VERSION.tar.bz2 -C $BUILD
|
||||
tar -xzf $SOURCES/$PKG_NAME/intel-driver-$PKG_VERSION.tar.gz -C $BUILD
|
||||
mv $BUILD/intel-driver-$PKG_VERSION $BUILD/$PKG_NAME-$PKG_VERSION
|
||||
|
||||
for patch in `ls $PKG_DIR/patches.upstream/*.patch`; do
|
||||
|
@ -19,12 +19,12 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="libva"
|
||||
PKG_VERSION="465d96e609764b256383a1a5cd0dd2c8752f2e6f"
|
||||
PKG_VERSION="1.0.16"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="i386 x86_64"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://freedesktop.org/wiki/Software/vaapi"
|
||||
PKG_URL="http://cgit.freedesktop.org/libva/snapshot/$PKG_NAME-$PKG_VERSION.tar.gz"
|
||||
PKG_URL="http://cgit.freedesktop.org/vaapi/libva/snapshot/$PKG_NAME-$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS="libX11 libXext libXfixes libdrm Mesa"
|
||||
PKG_BUILD_DEPENDS="toolchain libX11 libXext libXfixes libdrm Mesa"
|
||||
PKG_PRIORITY="optional"
|
||||
|
@ -38,14 +38,11 @@ mkdir -p $INSTALL/etc/dbus-1/system.d
|
||||
mkdir -p $INSTALL/usr/bin
|
||||
cp -P $PKG_BUILD/client/cm $INSTALL/usr/bin
|
||||
|
||||
mkdir -p $INSTALL/usr/lib/connman
|
||||
cp -P $PKG_BUILD/test/* $INSTALL/usr/lib/connman
|
||||
|
||||
mkdir -p $INSTALL/usr/sbin
|
||||
cp -P $PKG_BUILD/src/connmand $INSTALL/usr/sbin
|
||||
|
||||
mkdir -p $INSTALL/usr/config
|
||||
cp $PKG_DIR/config/hosts.conf $INSTALL/usr/config
|
||||
|
||||
if [ "$DEVTOOLS" = yes ]; then
|
||||
mkdir -p $INSTALL/usr/bin
|
||||
cp $PKG_DIR/scripts/cmcc $INSTALL/usr/bin
|
||||
fi
|
||||
|
||||
|
@ -25,7 +25,7 @@ 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_DEPENDS="glib dbus systemd iptables wpa_supplicant ntp"
|
||||
PKG_DEPENDS="glib dbus systemd iptables wpa_supplicant ntp Python pygobject dbus-python"
|
||||
PKG_BUILD_DEPENDS="toolchain glib dbus systemd iptables"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="network"
|
||||
@ -34,7 +34,3 @@ PKG_LONGDESC="The ConnMan project provides a daemon for managing internet connec
|
||||
PKG_IS_ADDON="no"
|
||||
|
||||
PKG_AUTORECONF="yes"
|
||||
|
||||
if [ "$DEVTOOLS" = yes ]; then
|
||||
PKG_DEPENDS="$PKG_DEPENDS Python pygobject dbus-python"
|
||||
fi
|
||||
|
@ -1,944 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# indicator-network - user interface for connman
|
||||
# Copyright 2010 Canonical Ltd.
|
||||
#
|
||||
# Authors:
|
||||
# Kalle Valo <kalle.valo@canonical.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 3, as published
|
||||
# by the Free Software Foundation.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranties of
|
||||
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import sys
|
||||
import dbus
|
||||
import dbus.mainloop.glib
|
||||
import gobject
|
||||
import time
|
||||
|
||||
WPAS_DBUS_SERVICE = "fi.w1.wpa_supplicant1"
|
||||
WPAS_DBUS_INTERFACE = "fi.w1.wpa_supplicant1"
|
||||
WPAS_DBUS_PATH = "/fi/w1/wpa_supplicant1"
|
||||
|
||||
WPAS_DBUS_INTERFACES_INTERFACE = "fi.w1.wpa_supplicant1.Interface"
|
||||
WPAS_DBUS_INTERFACES_OPATH = "/fi/w1/wpa_supplicant1/Interfaces"
|
||||
WPAS_DBUS_BSS_INTERFACE = "fi.w1.wpa_supplicant1.BSS"
|
||||
|
||||
stamp = False
|
||||
|
||||
class ArgumentException(Exception):
|
||||
def __init__(self, msg):
|
||||
self.msg = msg
|
||||
|
||||
def __str__(self):
|
||||
return self.msg
|
||||
|
||||
def get_bus(async=False):
|
||||
if (async):
|
||||
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
|
||||
|
||||
return dbus.SystemBus()
|
||||
|
||||
def get_manager(bus=None):
|
||||
if bus == None:
|
||||
bus = get_bus()
|
||||
|
||||
return dbus.Interface(bus.get_object("net.connman", "/"),
|
||||
"net.connman.Manager")
|
||||
|
||||
def usage(name):
|
||||
print "Usage: %s <command>" % (name)
|
||||
print ""
|
||||
print "Commands:"
|
||||
print " state"
|
||||
print " services"
|
||||
print " connect <service>"
|
||||
print " connect-hidden <name> [passphrase] [type]"
|
||||
print " disconnect <service>"
|
||||
print " show <service>"
|
||||
print " edit <service> [property..]"
|
||||
print " remove <service>"
|
||||
print " scan [technology]"
|
||||
print " enable <technology>"
|
||||
print " disable <technology>"
|
||||
print " offlinemode <on|off>"
|
||||
print " event [-t]"
|
||||
print " modem list"
|
||||
print " modem pin <number>"
|
||||
print " modem puk <number>"
|
||||
print " wpas list"
|
||||
print " wpas networks"
|
||||
print " wpas bss"
|
||||
print " technologies"
|
||||
print ""
|
||||
print "Properties:"
|
||||
print " apn <name>"
|
||||
print " passphrase <passphrase>"
|
||||
print " autoconnect <true|false>"
|
||||
print " ipv4 <dhcp|manual address netmask gateway>"
|
||||
print " ipv6 <auto | off | manual address netmask gateway>"
|
||||
print " nameservers auto | <nameserver> [nameserver] [nameserver]"
|
||||
print " domains [domain] [domain] ..."
|
||||
|
||||
return
|
||||
|
||||
def is_connected(state):
|
||||
connected = [ "ready", "offline", "online"]
|
||||
|
||||
if state in connected:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def is_associating(state):
|
||||
return state == "association"
|
||||
|
||||
def is_configuration(state):
|
||||
return state == "configuration"
|
||||
|
||||
def is_failed(state):
|
||||
return state == "failure"
|
||||
|
||||
def find_service(name):
|
||||
bus = get_bus()
|
||||
manager = get_manager(bus)
|
||||
manager_properties = manager.GetProperties()
|
||||
|
||||
path = "/profile/default/" + name
|
||||
|
||||
if path in manager_properties["Services"]:
|
||||
service = dbus.Interface(bus.get_object("net.connman",
|
||||
path),
|
||||
"net.connman.Service")
|
||||
return service
|
||||
|
||||
# service not found with the path, let's try find it with name
|
||||
|
||||
found = []
|
||||
|
||||
for path in manager_properties["Services"]:
|
||||
service = dbus.Interface(bus.get_object("net.connman",
|
||||
path),
|
||||
"net.connman.Service")
|
||||
|
||||
properties = service.GetProperties()
|
||||
|
||||
if "Name" in properties.keys():
|
||||
if properties["Name"].lower() == name.lower():
|
||||
found.append(service)
|
||||
|
||||
if len(found) > 1:
|
||||
raise ArgumentException("Multiple services with same name, "
|
||||
"use id instead.")
|
||||
elif len(found) == 1:
|
||||
return found.pop()
|
||||
else:
|
||||
raise ArgumentException("Service '%s' not found." % name)
|
||||
|
||||
def get_service_name(path):
|
||||
bus = get_bus()
|
||||
|
||||
try:
|
||||
service = dbus.Interface(bus.get_object("net.connman",
|
||||
path),
|
||||
"net.connman.Service")
|
||||
properties = service.GetProperties()
|
||||
name = properties["Name"]
|
||||
if len(name) == 0:
|
||||
name = path[path.rfind("/") + 1:]
|
||||
|
||||
except dbus.DBusException:
|
||||
name = path[path.rfind("/") + 1:]
|
||||
|
||||
return name
|
||||
|
||||
def extract_dict(values):
|
||||
s = ""
|
||||
for k, v in values.items():
|
||||
s += " %s=%s" % (k, convert_dbus_value(v))
|
||||
return "{ %s }" % s
|
||||
|
||||
def extract_list(values):
|
||||
return "[ %s ]" % " ".join(values)
|
||||
|
||||
def convert_dbus_value(value):
|
||||
"""Convert a dbus object to a pretty string"""
|
||||
|
||||
if type(value) is dbus.Dictionary:
|
||||
result = extract_dict(value)
|
||||
elif type(value) is dbus.Array:
|
||||
result = extract_list(value)
|
||||
elif type(value) is dbus.Boolean:
|
||||
if value:
|
||||
result = "true"
|
||||
else:
|
||||
result = "false"
|
||||
elif type(value) is dbus.Byte:
|
||||
result = str(int(value))
|
||||
else:
|
||||
result = str(value)
|
||||
|
||||
return result
|
||||
|
||||
def cmd_state():
|
||||
manager = get_manager()
|
||||
properties = manager.GetProperties()
|
||||
order = ["State", "OfflineMode", "DefaultTechnology",
|
||||
"ConnectedTechnologies", "EnabledTechnologies",
|
||||
"AvailableTechnologies", "ActiveProfile", "Profiles",
|
||||
"Providers", "EnabledDebugs", "AvailableDebugs",
|
||||
"Technologies", "Services"]
|
||||
|
||||
print "[ / ]"
|
||||
|
||||
keys = properties.keys()
|
||||
|
||||
for key in order:
|
||||
if key in keys:
|
||||
keys.remove(key)
|
||||
value = convert_dbus_value(properties[key])
|
||||
print " %s = %s" % (key, value)
|
||||
|
||||
# print properties missing in the order
|
||||
for key in keys:
|
||||
value = convert_dbus_value(properties[key])
|
||||
print " %s = %s" % (key, value)
|
||||
|
||||
def cmd_services():
|
||||
bus = get_bus()
|
||||
manager = get_manager()
|
||||
manager_properties = manager.GetProperties()
|
||||
|
||||
for path in manager_properties["Services"]:
|
||||
service = dbus.Interface(bus.get_object("net.connman",
|
||||
path),
|
||||
"net.connman.Service")
|
||||
|
||||
properties = service.GetProperties()
|
||||
|
||||
identifier = path[path.rfind("/") + 1:]
|
||||
state = properties["State"]
|
||||
|
||||
if is_connected(state):
|
||||
connected = "*"
|
||||
elif is_configuration(state):
|
||||
connected = "+"
|
||||
elif is_associating(state):
|
||||
connected = "-"
|
||||
elif is_failed(state):
|
||||
connected = "f"
|
||||
else:
|
||||
connected = " "
|
||||
|
||||
if "Name" in properties.keys():
|
||||
name = properties["Name"]
|
||||
else:
|
||||
name = "{" + properties["Type"] + "}"
|
||||
|
||||
print "%s %-26s { %s }" % (connected, name, identifier)
|
||||
|
||||
def cmd_edit_apn(service, argv):
|
||||
if (len(sys.argv) < 1):
|
||||
raise ArgumentException("apn value missing")
|
||||
|
||||
apn = argv.pop(0)
|
||||
service.SetProperty("APN", apn);
|
||||
|
||||
def cmd_edit_passphrase(service, argv):
|
||||
if (len(sys.argv) < 1):
|
||||
raise ArgumentException("passphrase value missing")
|
||||
|
||||
passphrase = argv.pop(0)
|
||||
service.SetProperty("Passphrase", passphrase);
|
||||
|
||||
def cmd_edit_autoconnect(service, argv):
|
||||
if (len(argv) < 1):
|
||||
raise ArgumentException("autoconnect value missing")
|
||||
|
||||
arg = argv.pop(0)
|
||||
|
||||
if arg == "true":
|
||||
autoconnect = dbus.Boolean(True)
|
||||
elif arg == "false":
|
||||
autoconnect = dbus.Boolean(False)
|
||||
else:
|
||||
raise ArgumentException("Invalid value for autoconnect: %s" %
|
||||
arg)
|
||||
|
||||
print autoconnect
|
||||
service.SetProperty("AutoConnect", autoconnect);
|
||||
|
||||
def cmd_edit_ipv6(service, argv):
|
||||
if len(argv) < 1:
|
||||
raise ArgumentException("ipv6 method missing")
|
||||
|
||||
method = argv.pop(0)
|
||||
|
||||
if method == "auto":
|
||||
value = { "Method": "auto" }
|
||||
elif method == "off":
|
||||
value = { "Method": "off" }
|
||||
elif method == "manual":
|
||||
if len(argv) < 3:
|
||||
raise ArgumentException("invalid syntax for ipv6 "
|
||||
"manual configuration")
|
||||
|
||||
address = argv.pop(0)
|
||||
prefix = argv.pop(0)
|
||||
gateway = argv.pop(0)
|
||||
|
||||
value = { "Method": "manual",
|
||||
"Address": address,
|
||||
"PrefixLength": prefix,
|
||||
"Gateway": gateway }
|
||||
else:
|
||||
raise ArgumentException("Unknown ipv6 method: " + method)
|
||||
|
||||
service.SetProperty("IPv6.Configuration", value);
|
||||
|
||||
def cmd_edit_ipv4(service, argv):
|
||||
if len(argv) < 1:
|
||||
raise ArgumentException("ipv4 method missing")
|
||||
|
||||
method = argv.pop(0)
|
||||
|
||||
if method == "dhcp":
|
||||
value = { "Method": "dhcp" }
|
||||
elif method == "manual":
|
||||
if len(argv) < 3:
|
||||
raise ArgumentException("invalid syntax for ipv4 "
|
||||
"manual configuration")
|
||||
|
||||
address = argv.pop(0)
|
||||
netmask = argv.pop(0)
|
||||
gateway = argv.pop(0)
|
||||
|
||||
value = { "Method": "manual",
|
||||
"Address": address,
|
||||
"Netmask": netmask,
|
||||
"Gateway": gateway }
|
||||
else:
|
||||
raise ArgumentException("Unknown ipv4 method: " + method)
|
||||
|
||||
|
||||
service.SetProperty("IPv4.Configuration", value);
|
||||
|
||||
def cmd_edit_nameservers(service, argv):
|
||||
items = len(argv)
|
||||
|
||||
if items == 1 and argv[0] == "auto":
|
||||
# disable manual nameservers
|
||||
argv = dbus.Array(signature="s")
|
||||
elif items < 1:
|
||||
raise ArgumentException("nameserver address missing")
|
||||
elif items > 3:
|
||||
raise ArgumentException("maximum of 3 nameserver addresses")
|
||||
|
||||
service.SetProperty("Nameservers.Configuration", argv)
|
||||
|
||||
def cmd_edit_domains(service, argv):
|
||||
l = dbus.Array(argv, signature="s")
|
||||
service.SetProperty("Domains.Configuration", l)
|
||||
|
||||
def cmd_edit(argv):
|
||||
if len(argv) < 1:
|
||||
raise ArgumentException("service name missing")
|
||||
|
||||
name = argv.pop(0)
|
||||
|
||||
service = find_service(name)
|
||||
|
||||
if len(argv) < 1:
|
||||
raise ArgumentException("property name missing")
|
||||
|
||||
while len(argv) > 0:
|
||||
if len(argv) < 1:
|
||||
print "property name missing"
|
||||
prop = argv.pop(0)
|
||||
|
||||
if prop == "apn":
|
||||
cmd_edit_apn(service, argv)
|
||||
elif prop in ["passphrase", "pass"]:
|
||||
cmd_edit_passphrase(service, argv)
|
||||
elif prop in ["autoconnect", "autoconn"]:
|
||||
cmd_edit_autoconnect(service, argv)
|
||||
elif prop in ["ipv4"]:
|
||||
cmd_edit_ipv4(service, argv)
|
||||
elif prop in ["ipv6"]:
|
||||
cmd_edit_ipv6(service, argv)
|
||||
elif prop in ["nameservers"]:
|
||||
cmd_edit_nameservers(service, argv)
|
||||
elif prop in ["domains"]:
|
||||
cmd_edit_domains(service, argv)
|
||||
else:
|
||||
raise ArgumentException("unknown property: %s" % prop)
|
||||
|
||||
|
||||
def cmd_connect(argv):
|
||||
|
||||
if (len(argv) < 1):
|
||||
raise ArgumentException("Need at least service parameter")
|
||||
|
||||
name = argv.pop(0)
|
||||
service = find_service(name)
|
||||
|
||||
try:
|
||||
service.Connect(timeout=60000)
|
||||
except dbus.DBusException, error:
|
||||
print "%s: %s" % (error._dbus_error_name, error.message)
|
||||
|
||||
def cmd_disconnect(argv):
|
||||
if (len(argv) < 1):
|
||||
raise ArgumentException("Need at least service parameter")
|
||||
|
||||
name = argv.pop(0)
|
||||
service = find_service(name)
|
||||
|
||||
try:
|
||||
service.Disconnect()
|
||||
except dbus.DBusException, error:
|
||||
print "%s: %s" % (error._dbus_error_name, error.message)
|
||||
|
||||
def cmd_remove(argv):
|
||||
if (len(argv) < 1):
|
||||
raise ArgumentException("Need at least service parameter")
|
||||
|
||||
name = argv.pop(0)
|
||||
service = find_service(name)
|
||||
properties = service.GetProperties()
|
||||
|
||||
if properties["Favorite"] == dbus.Boolean(0):
|
||||
raise ArgumentException("Only favorite services can be removed")
|
||||
|
||||
try:
|
||||
service.Remove()
|
||||
except dbus.DBusException, error:
|
||||
print "%s: %s" % (error._dbus_error_name, error.message)
|
||||
|
||||
def cmd_scan(argv):
|
||||
if len(argv) > 0:
|
||||
arg = argv.pop(0)
|
||||
else:
|
||||
arg = ""
|
||||
|
||||
manager = get_manager()
|
||||
manager.RequestScan(arg)
|
||||
|
||||
# there's no way to know when scan has ended, so just wait and
|
||||
# hope for best
|
||||
time.sleep(10)
|
||||
|
||||
cmd_services()
|
||||
|
||||
def cmd_enable(argv):
|
||||
if len(argv) > 0:
|
||||
technology = argv.pop(0)
|
||||
else:
|
||||
technology = ""
|
||||
|
||||
manager = get_manager()
|
||||
manager.EnableTechnology(technology)
|
||||
|
||||
def cmd_disable(argv):
|
||||
if len(argv) > 0:
|
||||
technology = argv.pop(0)
|
||||
else:
|
||||
technology = ""
|
||||
|
||||
manager = get_manager()
|
||||
manager.DisableTechnology(technology)
|
||||
|
||||
def cmd_offlinemode(argv):
|
||||
if len(argv) > 0:
|
||||
arg = sys.argv.pop(0)
|
||||
if arg == "on":
|
||||
active = dbus.Boolean(1)
|
||||
elif arg == "off":
|
||||
active = dbus.Boolean(0)
|
||||
else:
|
||||
active = dbus.Boolean(arg)
|
||||
|
||||
manager = get_manager()
|
||||
manager.SetProperty("OfflineMode", active)
|
||||
else:
|
||||
properties = manager.GetProperties()
|
||||
print "Offline mode is %s" % (properties["OfflineMode"])
|
||||
|
||||
def cmd_show(argv):
|
||||
if len(argv) < 1:
|
||||
raise ArgumentException("service name missing")
|
||||
|
||||
name = argv.pop(0)
|
||||
service = find_service(name)
|
||||
properties = service.GetProperties()
|
||||
|
||||
order = [ "Name", "Type", "State", "Strength", "Mode", "Security",
|
||||
"IPv4", "IPv4.Configuration",
|
||||
"IPv6", "IPv6.Configuration",
|
||||
"Ethernet",
|
||||
"Nameservers", "Nameservers.Configuration",
|
||||
"Domains", "Domains.Configuration",
|
||||
"Proxy",
|
||||
"PassphraseRequired", "Passphrase",
|
||||
"SetupRequired", "Roaming",
|
||||
"Immutable", "Favorite", "AutoConnect" ]
|
||||
|
||||
keys = properties.keys()
|
||||
|
||||
print "[ %s ]" % service.object_path
|
||||
|
||||
for key in order:
|
||||
if key in keys:
|
||||
keys.remove(key)
|
||||
val = convert_dbus_value(properties[key])
|
||||
print " %s = %s" % (key, val)
|
||||
|
||||
# print properties missing in the order
|
||||
for key in keys:
|
||||
val = convert_dbus_value(properties[key])
|
||||
print " %s = %s" % (key, val)
|
||||
|
||||
def connman_property_changed(name, value, path, interface):
|
||||
global stamp
|
||||
|
||||
if stamp:
|
||||
timestamp = "%f " % time.time()
|
||||
else:
|
||||
timestamp = ""
|
||||
|
||||
if interface == "net.connman.Service":
|
||||
val = convert_dbus_value(value)
|
||||
print "%s[%s] %s: %s" % (timestamp, get_service_name(path),
|
||||
name, val)
|
||||
elif interface == "net.connman.Manager":
|
||||
val = convert_dbus_value(value)
|
||||
print "%s%s: %s" % (timestamp, name, val)
|
||||
|
||||
def cmd_event(argv):
|
||||
global stamp
|
||||
|
||||
if len(argv) > 0 and argv.pop(0) == "-t":
|
||||
stamp = True
|
||||
|
||||
bus = get_bus(async=True)
|
||||
bus.add_signal_receiver(connman_property_changed,
|
||||
bus_name="net.connman",
|
||||
signal_name = "PropertyChanged",
|
||||
path_keyword="path",
|
||||
interface_keyword="interface")
|
||||
|
||||
mainloop = gobject.MainLoop()
|
||||
mainloop.run()
|
||||
|
||||
def print_sms_manager(path):
|
||||
bus = get_bus()
|
||||
interface = "org.ofono.SmsManager"
|
||||
manager = dbus.Interface(bus.get_object("org.ofono", path),
|
||||
interface)
|
||||
|
||||
print " [ %s ]" % interface
|
||||
|
||||
properties = manager.GetProperties()
|
||||
for key in properties.keys():
|
||||
value = convert_dbus_value(properties[key])
|
||||
print " %s = %s" % (key, value)
|
||||
|
||||
def print_context(path, properties):
|
||||
print " [ %s ]" % path
|
||||
|
||||
for key in properties.keys():
|
||||
value = convert_dbus_value(properties[key])
|
||||
print " %s = %s" % (key, value)
|
||||
|
||||
def print_data_manager(path):
|
||||
bus = get_bus()
|
||||
interface = "org.ofono.ConnectionManager"
|
||||
manager = dbus.Interface(bus.get_object("org.ofono", path),
|
||||
interface)
|
||||
|
||||
print " [ %s ]" % interface
|
||||
|
||||
properties = manager.GetProperties()
|
||||
for key in properties.keys():
|
||||
value = convert_dbus_value(properties[key])
|
||||
print " %s = %s" % (key, value)
|
||||
|
||||
contexts = manager.GetContexts()
|
||||
|
||||
for path, properties in contexts:
|
||||
print_context(path, properties)
|
||||
|
||||
def print_cell_broadcast(path):
|
||||
bus = get_bus()
|
||||
interface = "org.ofono.CellBroadcast"
|
||||
manager = dbus.Interface(bus.get_object("org.ofono", path),
|
||||
interface)
|
||||
|
||||
print " [ %s ]" % interface
|
||||
|
||||
properties = manager.GetProperties()
|
||||
for key in properties.keys():
|
||||
value = convert_dbus_value(properties[key])
|
||||
print " %s = %s" % (key, value)
|
||||
|
||||
def print_network_registration(path):
|
||||
bus = get_bus()
|
||||
interface = "org.ofono.NetworkRegistration"
|
||||
manager = dbus.Interface(bus.get_object("org.ofono", path),
|
||||
interface)
|
||||
|
||||
print " [ %s ]" % interface
|
||||
|
||||
properties = manager.GetProperties()
|
||||
for key in properties.keys():
|
||||
value = convert_dbus_value(properties[key])
|
||||
print " %s = %s" % (key, value)
|
||||
|
||||
def print_supplementary_services(path):
|
||||
bus = get_bus()
|
||||
interface = "org.ofono.SupplementaryServices"
|
||||
manager = dbus.Interface(bus.get_object("org.ofono", path),
|
||||
interface)
|
||||
|
||||
print " [ %s ]" % interface
|
||||
|
||||
properties = manager.GetProperties()
|
||||
for key in properties.keys():
|
||||
value = convert_dbus_value(properties[key])
|
||||
print " %s = %s" % (key, value)
|
||||
|
||||
def print_sim_manager(path):
|
||||
bus = get_bus()
|
||||
interface = "org.ofono.SimManager"
|
||||
manager = dbus.Interface(bus.get_object("org.ofono", path),
|
||||
interface)
|
||||
|
||||
print " [ %s ]" % interface
|
||||
|
||||
properties = manager.GetProperties()
|
||||
for key in properties.keys():
|
||||
value = convert_dbus_value(properties[key])
|
||||
print " %s = %s" % (key, value)
|
||||
|
||||
def print_modem(path, properties):
|
||||
print "[ %s ]" % path
|
||||
|
||||
for key in properties.keys():
|
||||
value = convert_dbus_value(properties[key])
|
||||
print " %s = %s" % (key, value)
|
||||
|
||||
if "Interfaces" not in properties:
|
||||
return
|
||||
|
||||
for interface in properties["Interfaces"]:
|
||||
if interface == "org.ofono.SmsManager":
|
||||
print_sms_manager(path)
|
||||
elif interface == "org.ofono.ConnectionManager":
|
||||
print_data_manager(path)
|
||||
elif interface == "org.ofono.CellBroadcast":
|
||||
print_cell_broadcast(path)
|
||||
elif interface == "org.ofono.NetworkRegistration":
|
||||
print_network_registration(path)
|
||||
elif interface == "org.ofono.SupplementaryServices":
|
||||
print_supplementary_services(path)
|
||||
elif interface == "org.ofono.SimManager":
|
||||
print_sim_manager(path)
|
||||
|
||||
def cmd_modem_list(argv):
|
||||
bus = get_bus()
|
||||
manager = dbus.Interface(bus.get_object("org.ofono", "/"),
|
||||
"org.ofono.Manager")
|
||||
|
||||
try:
|
||||
modems = manager.GetModems()
|
||||
except dbus.exceptions.DBusException as e:
|
||||
raise ArgumentException("Failed to contact ofonod:", e)
|
||||
|
||||
if len(modems) == 0:
|
||||
print "No modems found"
|
||||
return
|
||||
|
||||
for path, properties in modems:
|
||||
print_modem(path, properties)
|
||||
|
||||
def cmd_modem_pin(pin_type, argv):
|
||||
if len(argv) < 1:
|
||||
raise ArgumentException("%s value missing" % pin_type)
|
||||
|
||||
pin = argv.pop(0)
|
||||
|
||||
bus = get_bus()
|
||||
manager = dbus.Interface(bus.get_object("org.ofono", "/"),
|
||||
"org.ofono.Manager")
|
||||
modems = manager.GetModems()
|
||||
|
||||
if len(modems) == 0:
|
||||
print "No modems found"
|
||||
return
|
||||
|
||||
(modem, properties) = modems[0]
|
||||
|
||||
print "Using modem %s" % modem
|
||||
|
||||
sim_manager = dbus.Interface(bus.get_object("org.ofono", modem),
|
||||
"org.ofono.SimManager")
|
||||
|
||||
# check that pin is really needed
|
||||
properties = sim_manager.GetProperties()
|
||||
|
||||
if "PinRequired" not in properties:
|
||||
print "PinRequired not found in properties"
|
||||
return
|
||||
|
||||
if properties["PinRequired"] != pin_type:
|
||||
print "pin type '%s' not required by modem %s (%s)" % (pin_type,
|
||||
modem,
|
||||
properties["PinRequired"])
|
||||
return
|
||||
try:
|
||||
sim_manager.EnterPin(pin_type, pin)
|
||||
except dbus.exceptions.DBusException as e:
|
||||
print "Failed to enter %s: %s" % (pin_type, str(e))
|
||||
|
||||
def cmd_modem(argv):
|
||||
if len(argv) < 1:
|
||||
raise ArgumentException("modem command missing")
|
||||
|
||||
cmd = argv.pop(0)
|
||||
|
||||
if cmd == "list":
|
||||
cmd_modem_list(argv)
|
||||
elif cmd in ["pin", "puk"]:
|
||||
cmd_modem_pin(cmd, argv)
|
||||
else:
|
||||
raise ArgumentException("unknown modem commmand: %s" % cmd)
|
||||
|
||||
def print_wpas_network_properties(properties):
|
||||
print " Properties = {"
|
||||
|
||||
for p in properties:
|
||||
print " %s = %s" % (p, convert_dbus_value(properties[p]))
|
||||
|
||||
print " }"
|
||||
|
||||
def print_wpas_network(props):
|
||||
for prop in props:
|
||||
if prop == "Properties":
|
||||
print_wpas_network_properties(props["Properties"])
|
||||
else:
|
||||
print " %s = %s" % (prop,
|
||||
convert_dbus_value(props[prop]))
|
||||
|
||||
def print_wpas_networks(networks):
|
||||
bus = get_bus()
|
||||
|
||||
for path in networks:
|
||||
print
|
||||
network = bus.get_object("fi.w1.wpa_supplicant1", path)
|
||||
props = network.GetAll("fi.w1.wpa_supplicant1.Network",
|
||||
dbus_interface=dbus.PROPERTIES_IFACE)
|
||||
print "[ %s ]" % path
|
||||
print_wpas_network(props)
|
||||
|
||||
def print_wpas_bss(props):
|
||||
for prop in props:
|
||||
if prop in ["RSN", "IEs", "Rates"]:
|
||||
pass
|
||||
elif prop in ["SSID", "BSSID"]:
|
||||
print " %s =" % prop,
|
||||
|
||||
for b in props[prop]:
|
||||
print "%x" % b,
|
||||
|
||||
print
|
||||
else:
|
||||
print " %s = %s" % (prop,
|
||||
convert_dbus_value(props[prop]))
|
||||
|
||||
def print_wpas_bsss(bsss):
|
||||
bus = get_bus()
|
||||
|
||||
for path in bsss:
|
||||
print
|
||||
bss = bus.get_object("fi.w1.wpa_supplicant1", path)
|
||||
props = bss.GetAll("fi.w1.wpa_supplicant1.BSS",
|
||||
dbus_interface=dbus.PROPERTIES_IFACE)
|
||||
print "[ %s ]" % path
|
||||
print_wpas_bss(props)
|
||||
|
||||
def print_wpas_interface(props):
|
||||
for prop in props:
|
||||
if prop == "Capabilities":
|
||||
pass
|
||||
else:
|
||||
print " %s = %s" % (prop, convert_dbus_value(props[prop]))
|
||||
|
||||
def print_wpas(props):
|
||||
print "[ %s ]" % WPAS_DBUS_PATH
|
||||
|
||||
for prop in props:
|
||||
print " %s = %s " % (prop, convert_dbus_value(props[prop]))
|
||||
|
||||
def cmd_wpas_list(argv, show_bss=False, show_networks=False):
|
||||
bus = get_bus()
|
||||
wpas = bus.get_object(WPAS_DBUS_SERVICE, WPAS_DBUS_PATH)
|
||||
|
||||
try:
|
||||
props = wpas.GetAll("fi.w1.wpa_supplicant1",
|
||||
dbus_interface=dbus.PROPERTIES_IFACE)
|
||||
except dbus.exceptions.DBusException as e:
|
||||
raise ArgumentException("Failed to contact wpasupplicant: %s"
|
||||
"\nAre you root?" % e)
|
||||
|
||||
|
||||
print_wpas(props)
|
||||
|
||||
if "Interfaces" not in props:
|
||||
raise ArgumentException("No Interfaces in properties")
|
||||
|
||||
bsss = []
|
||||
networks = []
|
||||
|
||||
for path in props["Interfaces"]:
|
||||
print
|
||||
print "[ %s ]" % path
|
||||
interface = bus.get_object("fi.w1.wpa_supplicant1", path)
|
||||
props = interface.GetAll("fi.w1.wpa_supplicant1.Interface",
|
||||
dbus_interface=dbus.PROPERTIES_IFACE)
|
||||
print_wpas_interface(props)
|
||||
|
||||
bsss = bsss + props["BSSs"]
|
||||
networks = networks + props["Networks"]
|
||||
|
||||
if show_bss:
|
||||
print_wpas_bsss(bsss)
|
||||
|
||||
if show_networks:
|
||||
print_wpas_networks(networks)
|
||||
|
||||
def cmd_wpas(argv):
|
||||
if len(argv) < 1:
|
||||
raise ArgumentException("wpas command missing")
|
||||
|
||||
cmd = argv.pop(0)
|
||||
|
||||
if cmd == "list":
|
||||
cmd_wpas_list(argv)
|
||||
elif cmd == "networks":
|
||||
cmd_wpas_list(argv, show_networks=True)
|
||||
elif cmd == "bss":
|
||||
cmd_wpas_list(argv, show_bss=True, show_networks=True)
|
||||
else:
|
||||
raise ArgumentException("unknown wpas commmand: %s" % cmd)
|
||||
|
||||
def cmd_connect_hidden(argv):
|
||||
|
||||
if (len(argv) < 1):
|
||||
raise ArgumentException("Network name missing")
|
||||
|
||||
name = argv.pop(0)
|
||||
|
||||
if len(argv) > 0:
|
||||
passphrase = argv.pop(0)
|
||||
else:
|
||||
passphrase = ""
|
||||
|
||||
if len(argv) > 0:
|
||||
security = argv.pop(0)
|
||||
else:
|
||||
if len(passphrase) > 0:
|
||||
security = "rsn"
|
||||
else:
|
||||
security = "none"
|
||||
|
||||
properties = { "Type": "wifi", "Mode": "managed", "SSID": name,
|
||||
"Security": security, "Passphrase": passphrase }
|
||||
|
||||
try:
|
||||
manager = get_manager()
|
||||
manager.ConnectService(properties, timeout=60000)
|
||||
except dbus.DBusException, error:
|
||||
print "%s: %s" % (error._dbus_error_name, error.message)
|
||||
|
||||
def cmd_technologies(argv):
|
||||
bus = get_bus()
|
||||
manager = get_manager()
|
||||
|
||||
result = []
|
||||
|
||||
properties = manager.GetProperties()
|
||||
for path in properties["Technologies"]:
|
||||
technology = dbus.Interface(bus.get_object("net.connman",
|
||||
path),
|
||||
"net.connman.Technology")
|
||||
props = technology.GetProperties()
|
||||
|
||||
print "[ %s ]" % path
|
||||
|
||||
for key in props.keys():
|
||||
value = convert_dbus_value(props[key])
|
||||
print " %s = %s" % (key, value)
|
||||
|
||||
def handle_cmd(cmd, argv, name):
|
||||
if cmd == "help":
|
||||
usage(name)
|
||||
elif cmd == "state":
|
||||
cmd_state()
|
||||
elif cmd in ["services", "list"]:
|
||||
cmd_services()
|
||||
elif cmd == "edit":
|
||||
cmd_edit(argv)
|
||||
elif cmd in ["connect", "conn"]:
|
||||
cmd_connect(argv)
|
||||
elif cmd in ["disconnect", "disc"]:
|
||||
cmd_disconnect(argv)
|
||||
elif cmd in ["remove"]:
|
||||
cmd_remove(argv)
|
||||
elif cmd == "scan":
|
||||
cmd_scan(argv)
|
||||
elif cmd == "enable":
|
||||
cmd_enable(argv)
|
||||
elif cmd == "disable":
|
||||
cmd_disable(argv)
|
||||
elif cmd in ["offlinemode", "flightmode"]:
|
||||
cmd_offlinemode(argv)
|
||||
elif cmd == "show":
|
||||
cmd_show(argv)
|
||||
elif cmd == "event":
|
||||
cmd_event(argv)
|
||||
elif cmd == "modem":
|
||||
cmd_modem(argv)
|
||||
elif cmd == "wpas":
|
||||
cmd_wpas(argv)
|
||||
elif cmd == "connect-hidden":
|
||||
cmd_connect_hidden(argv)
|
||||
elif cmd in ["technologies", "tech"]:
|
||||
cmd_technologies(argv)
|
||||
else:
|
||||
print "Unknown command"
|
||||
|
||||
def main():
|
||||
name = sys.argv.pop(0)
|
||||
|
||||
if len(sys.argv) == 0:
|
||||
usage(name)
|
||||
return
|
||||
|
||||
cmd = sys.argv.pop(0)
|
||||
|
||||
try:
|
||||
handle_cmd(cmd, sys.argv, name)
|
||||
except ArgumentException as e:
|
||||
print e
|
||||
sys.exit(1)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@ -1 +0,0 @@
|
||||
https://code.launchpad.net/~indicator-network-developers/indicator-network/indicator-network
|
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