From 2defc5f4bc9a378742f684e8c3744c603568e5ce Mon Sep 17 00:00:00 2001 From: Christian Hewitt Date: Tue, 29 Jan 2013 19:59:36 +0400 Subject: [PATCH 1/4] revert b43 to wl for ATV users --- packages/linux-drivers/bcm_sta/build | 30 +++++++ packages/linux-drivers/bcm_sta/install | 33 ++++++++ packages/linux-drivers/bcm_sta/meta | 39 +++++++++ packages/linux-drivers/bcm_sta/need_unpack | 32 ++++++++ .../bcm_sta-5.100.82.112-001-license.patch | 21 +++++ .../bcm_sta-5.100.82.112-002-user-ioctl.patch | 29 +++++++ ...cm_sta-5.100.82.112-003-linux-recent.patch | 79 +++++++++++++++++++ ...m_sta-5.100.82.112-004-rename-device.patch | 26 ++++++ 8 files changed, 289 insertions(+) create mode 100755 packages/linux-drivers/bcm_sta/build create mode 100755 packages/linux-drivers/bcm_sta/install create mode 100644 packages/linux-drivers/bcm_sta/meta create mode 100755 packages/linux-drivers/bcm_sta/need_unpack create mode 100644 packages/linux-drivers/bcm_sta/patches/bcm_sta-5.100.82.112-001-license.patch create mode 100644 packages/linux-drivers/bcm_sta/patches/bcm_sta-5.100.82.112-002-user-ioctl.patch create mode 100644 packages/linux-drivers/bcm_sta/patches/bcm_sta-5.100.82.112-003-linux-recent.patch create mode 100644 packages/linux-drivers/bcm_sta/patches/bcm_sta-5.100.82.112-004-rename-device.patch diff --git a/packages/linux-drivers/bcm_sta/build b/packages/linux-drivers/bcm_sta/build new file mode 100755 index 0000000000..08f9b73866 --- /dev/null +++ b/packages/linux-drivers/bcm_sta/build @@ -0,0 +1,30 @@ +#!/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 + +[ "$TARGET_ARCH" = "i386" ] && cd x86-32 +[ "$TARGET_ARCH" = "x86_64" ] && cd x86-64 + +KBUILD_NOPEDANTIC=1 make V=1 CC=$CC -C $(kernel_path) M=`pwd` diff --git a/packages/linux-drivers/bcm_sta/install b/packages/linux-drivers/bcm_sta/install new file mode 100755 index 0000000000..c7a21304d2 --- /dev/null +++ b/packages/linux-drivers/bcm_sta/install @@ -0,0 +1,33 @@ +#!/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/bcm_sta + if [ "$TARGET_ARCH" = "i386" ]; then + cp $PKG_BUILD/x86-32/wl.ko $INSTALL/lib/modules/$VER/bcm_sta + fi + if [ "$TARGET_ARCH" = "x86_64" ]; then + cp $PKG_BUILD/x86-64/wl.ko $INSTALL/lib/modules/$VER/bcm_sta + fi diff --git a/packages/linux-drivers/bcm_sta/meta b/packages/linux-drivers/bcm_sta/meta new file mode 100644 index 0000000000..763ab141f6 --- /dev/null +++ b/packages/linux-drivers/bcm_sta/meta @@ -0,0 +1,39 @@ +################################################################################ +# 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="bcm_sta" +PKG_VERSION="5.100.82.112" +PKG_REV="1" +PKG_ARCH="i386 x86_64" +PKG_LICENSE="nonfree" +PKG_SITE="http://www.broadcom.com/" +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="bcm_sta: Broadcom's BCM4311-, BCM4312-, BCM4313-, BCM4321-, BCM4322-, BCM43224-, and BCM43225-based WLAN driver" +PKG_LONGDESC="These packages contain Broadcom's IEEE 802.11a/b/g/n hybrid Linux® device driver for use with Broadcom's BCM4311-, BCM4312-, BCM4313-, BCM4321-, BCM4322-, BCM43224-, and BCM43225-based hardware. There are different tars for 32-bit and 64-bit x86 CPU architectures. Make sure that you download the appropriate tar because the hybrid binary file must be of the appropriate architecture type. The hybrid binary file is agnostic to the specific version of the Linux kernel because it is designed to perform all interactions with the operating system through operating-system-specific files and an operating system abstraction layer file. All Linux operating-system-specific code is provided in source form, making it possible to retarget to different kernel versions and fix operating system related issues." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" + +# Downloadlocation: +# http://www.broadcom.com/support/802.11/linux_sta.php \ No newline at end of file diff --git a/packages/linux-drivers/bcm_sta/need_unpack b/packages/linux-drivers/bcm_sta/need_unpack new file mode 100755 index 0000000000..ed70b61127 --- /dev/null +++ b/packages/linux-drivers/bcm_sta/need_unpack @@ -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 diff --git a/packages/linux-drivers/bcm_sta/patches/bcm_sta-5.100.82.112-001-license.patch b/packages/linux-drivers/bcm_sta/patches/bcm_sta-5.100.82.112-001-license.patch new file mode 100644 index 0000000000..e891a1180d --- /dev/null +++ b/packages/linux-drivers/bcm_sta/patches/bcm_sta-5.100.82.112-001-license.patch @@ -0,0 +1,21 @@ +--- a/x86-32/src/wl/sys/wl_linux.c 2010-12-15 02:58:07.000000000 +0100 ++++ b/x86-32/src/wl/sys/wl_linux.c 2010-12-25 18:15:43.356676382 +0100 +@@ -240,6 +240,7 @@ + + static int nompc = 0; + module_param(nompc, int, 0); ++MODULE_LICENSE("Mixed/Proprietary"); + + #ifdef quote_str + #undef quote_str +--- a/x86-64/src/wl/sys/wl_linux.c 2010-12-15 02:58:07.000000000 +0100 ++++ b/x86-64/src/wl/sys/wl_linux.c 2010-12-25 18:15:43.356676382 +0100 +@@ -240,6 +240,7 @@ + + static int nompc = 0; + module_param(nompc, int, 0); ++MODULE_LICENSE("Mixed/Proprietary"); + + #ifdef quote_str + #undef quote_str + diff --git a/packages/linux-drivers/bcm_sta/patches/bcm_sta-5.100.82.112-002-user-ioctl.patch b/packages/linux-drivers/bcm_sta/patches/bcm_sta-5.100.82.112-002-user-ioctl.patch new file mode 100644 index 0000000000..76dc48a4cf --- /dev/null +++ b/packages/linux-drivers/bcm_sta/patches/bcm_sta-5.100.82.112-002-user-ioctl.patch @@ -0,0 +1,29 @@ +--- a/x86-32/src/wl/sys/wl_cfg80211.c 2011-10-23 03:56:55.000000000 +1100 ++++ b/x86-32/src/wl/sys/wl_cfg80211.c 2012-05-24 18:43:17.324465658 +1000 +@@ -1466,7 +1466,10 @@ + scb_val.val = 0; + err = wl_dev_ioctl(dev, WLC_GET_RSSI, &scb_val, sizeof(scb_val_t)); + if (err) { +- WL_ERR(("Could not get rssi (%d)\n", err)); ++ if (err != -EINVAL) { ++ // Don't fill syslog with EINVAL error ++ WL_ERR(("Could not get rssi (%d)\n", err)); ++ } + return err; + } + rssi = dtoh32(scb_val.val); +--- a/x86-32/src/wl/sys/wl_linux.c 2011-10-23 03:56:55.000000000 +1100 ++++ b/x86-32/src/wl/sys/wl_linux.c 2012-05-24 18:43:17.324465658 +1000 +@@ -1579,11 +1579,7 @@ + } + + WL_LOCK(wl); +- if (!capable(CAP_NET_ADMIN)) { +- bcmerror = BCME_EPERM; +- } else { +- bcmerror = wlc_ioctl(wl->wlc, ioc.cmd, buf, ioc.len, wlif->wlcif); +- } ++ bcmerror = wlc_ioctl(wl->wlc, ioc.cmd, buf, ioc.len, wlif->wlcif); + WL_UNLOCK(wl); + + done1: diff --git a/packages/linux-drivers/bcm_sta/patches/bcm_sta-5.100.82.112-003-linux-recent.patch b/packages/linux-drivers/bcm_sta/patches/bcm_sta-5.100.82.112-003-linux-recent.patch new file mode 100644 index 0000000000..6037c1510c --- /dev/null +++ b/packages/linux-drivers/bcm_sta/patches/bcm_sta-5.100.82.112-003-linux-recent.patch @@ -0,0 +1,79 @@ +--- a/x86-32/Makefile 2012-10-15 23:08:11.256904135 +1100 ++++ b/x86-32/Makefile 2012-10-15 23:08:18.970262327 +1100 +@@ -15,21 +15,9 @@ + + ifneq ($(KERNELRELEASE),) + +- LINUXVER_GOODFOR_CFG80211:=$(strip $(shell \ +- if [ "$(VERSION)" -ge "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "32" ]; then \ +- echo TRUE; \ +- else \ +- echo FALSE; \ +- fi \ +- )) ++ LINUXVER_GOODFOR_CFG80211:=TRUE + +- LINUXVER_WEXT_ONLY:=$(strip $(shell \ +- if [ "$(VERSION)" -ge "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "17" ]; then \ +- echo FALSE; \ +- else \ +- echo TRUE; \ +- fi \ +- )) ++ LINUXVER_WEXT_ONLY:=FALSE + + ifneq ($(API),) + ifeq ($(API), CFG80211) +--- a/x86-32/src/wl/sys/wl_cfg80211.c 2012-10-15 23:08:11.266904352 +1100 ++++ b/x86-32/src/wl/sys/wl_cfg80211.c 2012-10-15 23:08:32.313638398 +1100 +@@ -42,7 +42,7 @@ + enum nl80211_iftype type, u32 *flags, struct vif_params *params); + static s32 __wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, + struct cfg80211_scan_request *request, struct cfg80211_ssid *this_ssid); +-static s32 wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, ++static s32 wl_cfg80211_scan(struct wiphy *wiphy, + struct cfg80211_scan_request *request); + static s32 wl_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed); + static s32 wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, +@@ -570,10 +570,12 @@ + } + + static s32 +-wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, ++wl_cfg80211_scan(struct wiphy *wiphy, + struct cfg80211_scan_request *request) + { + s32 err = 0; ++ struct wl_priv *wl = wiphy_to_wl(wiphy); ++ struct net_device *ndev = wl_to_ndev(wl); + + CHECK_SYS_UP(); + err = __wl_cfg80211_scan(wiphy, ndev, request, NULL); +--- a/x86-32/src/wl/sys/wl_iw.h 2012-10-15 23:08:11.266904352 +1100 ++++ b/x86-32/src/wl/sys/wl_iw.h 2012-10-15 23:08:18.973595675 +1100 +@@ -15,6 +15,7 @@ + #ifndef _wl_iw_h_ + #define _wl_iw_h_ + ++#include + #include + + #include +--- a/x86-32/src/wl/sys/wl_linux.c 2012-10-15 23:08:11.266904352 +1100 ++++ b/x86-32/src/wl/sys/wl_linux.c 2012-10-15 23:08:18.973595675 +1100 +@@ -40,7 +40,6 @@ + #include + #define WLC_MAXBSSCFG 1 + +-#include + #include + #include + #include +@@ -385,7 +384,7 @@ + #endif + .ndo_get_stats = wl_get_stats, + .ndo_set_mac_address = wl_set_mac_address, +- .ndo_set_multicast_list = wl_set_multicast_list, ++ .ndo_set_rx_mode = wl_set_multicast_list, + .ndo_do_ioctl = wl_ioctl + }; diff --git a/packages/linux-drivers/bcm_sta/patches/bcm_sta-5.100.82.112-004-rename-device.patch b/packages/linux-drivers/bcm_sta/patches/bcm_sta-5.100.82.112-004-rename-device.patch new file mode 100644 index 0000000000..36d3d27288 --- /dev/null +++ b/packages/linux-drivers/bcm_sta/patches/bcm_sta-5.100.82.112-004-rename-device.patch @@ -0,0 +1,26 @@ +diff -Naur bcm_sta-5.100.82.38/x86-32/src/wl/sys/wl_linux.c bcm_sta-5.100.82.38.patch/x86-32/src/wl/sys/wl_linux.c +--- bcm_sta-5.100.82.38/x86-32/src/wl/sys/wl_linux.c 2010-12-15 02:58:07.000000000 +0100 ++++ bcm_sta-5.100.82.38.patch/x86-32/src/wl/sys/wl_linux.c 2010-12-27 22:14:38.679428984 +0100 +@@ -251,7 +251,7 @@ + #define quote_str(s) to_str(s) + + #ifndef BRCM_WLAN_IFNAME +-#define BRCM_WLAN_IFNAME eth%d ++#define BRCM_WLAN_IFNAME wlan%d + #endif + + static char name[IFNAMSIZ] = quote_str(BRCM_WLAN_IFNAME); +diff -Naur bcm_sta-5.100.82.38/x86-32/src/wl/sys/wl_linux.c.orig bcm_sta-5.100.82.38.patch/x86-32/src/wl/sys/wl_linux.c.orig +diff -Naur bcm_sta-5.100.82.38/x86-64/src/wl/sys/wl_linux.c bcm_sta-5.100.82.38.patch/x86-64/src/wl/sys/wl_linux.c +--- bcm_sta-5.100.82.38/x86-64/src/wl/sys/wl_linux.c 2010-12-15 03:01:09.000000000 +0100 ++++ bcm_sta-5.100.82.38.patch/x86-64/src/wl/sys/wl_linux.c 2010-12-27 22:15:18.273865927 +0100 +@@ -251,7 +251,7 @@ + #define quote_str(s) to_str(s) + + #ifndef BRCM_WLAN_IFNAME +-#define BRCM_WLAN_IFNAME eth%d ++#define BRCM_WLAN_IFNAME wlan%d + #endif + + static char name[IFNAMSIZ] = quote_str(BRCM_WLAN_IFNAME); +diff -Naur bcm_sta-5.100.82.38/x86-64/src/wl/sys/wl_linux.c.orig bcm_sta-5.100.82.38.patch/x86-64/src/wl/sys/wl_linux.c.orig From 2c51355e7774aefed8e919d9cbc21f42c354683f Mon Sep 17 00:00:00 2001 From: Christian Hewitt Date: Tue, 29 Jan 2013 20:24:00 +0400 Subject: [PATCH 2/4] remove b43 kernel config --- projects/ATV/linux/linux.i386.conf | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/projects/ATV/linux/linux.i386.conf b/projects/ATV/linux/linux.i386.conf index 5301805838..a6c4c54407 100644 --- a/projects/ATV/linux/linux.i386.conf +++ b/projects/ATV/linux/linux.i386.conf @@ -1309,15 +1309,15 @@ CONFIG_CARL9170=m CONFIG_CARL9170_LEDS=y CONFIG_CARL9170_WPC=y # CONFIG_ATH6KL is not set -CONFIG_B43=m -CONFIG_B43_SSB=y -CONFIG_B43_PCI_AUTOSELECT=y -CONFIG_B43_PCICORE_AUTOSELECT=y -CONFIG_B43_PIO=y -CONFIG_B43_PHY_N=y -CONFIG_B43_PHY_LP=y +# CONFIG_B43 is not set +# CONFIG_B43_SSB is not set +# CONFIG_B43_PCI_AUTOSELECT is not set +# CONFIG_B43_PCICORE_AUTOSELECT is not set +# CONFIG_B43_PIO is not set +# CONFIG_B43_PHY_N is not set +# CONFIG_B43_PHY_LP is not set # CONFIG_B43_PHY_HT is not set -CONFIG_B43_LEDS=y +# CONFIG_B43_LEDS is not set # CONFIG_B43_DEBUG is not set # CONFIG_B43LEGACY is not set # CONFIG_BRCMFMAC is not set From 4f05ddedaa18776c5fd5468b808686f6b099eb6d Mon Sep 17 00:00:00 2001 From: Christian Hewitt Date: Tue, 29 Jan 2013 20:25:16 +0400 Subject: [PATCH 3/4] add bcm_sta to ATV drivers --- projects/ATV/options | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/ATV/options b/projects/ATV/options index 2207844b46..5432431588 100755 --- a/projects/ATV/options +++ b/projects/ATV/options @@ -161,7 +161,7 @@ # for a list of additinoal drivers see packages/linux-drivers # Space separated list is supported, # e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2" - ADDITIONAL_DRIVERS="RTL8192CU dvbhdhomerun" + ADDITIONAL_DRIVERS="RTL8192CU dvbhdhomerun bcm_sta" # build with network support (yes / no) NETWORK="yes" From fc78eb074ce3912a3dca555af00f8ecc76a252a5 Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Tue, 29 Jan 2013 19:48:06 +0200 Subject: [PATCH 4/4] Python: install wsgiref. closes #1710 --- packages/lang/Python/build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/lang/Python/build b/packages/lang/Python/build index 06f2e57c99..44e1ee00e5 100755 --- a/packages/lang/Python/build +++ b/packages/lang/Python/build @@ -80,11 +80,11 @@ make -j1 CC="$TARGET_CC" \ sed -e "s|^LIBDIR=.*|LIBDIR= $SYSROOT_PREFIX/usr/lib|" \ -i $SYSROOT_PREFIX/usr/lib/python*/config/Makefile -EXCLUDE_DIRS="bsddb curses idlelib lib-tk lib2to3 msilib wsgiref" +EXCLUDE_DIRS="bsddb curses idlelib lib-tk lib2to3 msilib" INCLUDE_DIRS="compiler ctypes ctypes/macholib distutils distutils/command email" INCLUDE_DIRS="$INCLUDE_DIRS email/mime encodings hotshot importlib json logging" INCLUDE_DIRS="$INCLUDE_DIRS multiprocessing plat-linux2 sqlite3 xml xml/dom xml/etree" -INCLUDE_DIRS="$INCLUDE_DIRS xml/parsers xml/sax" +INCLUDE_DIRS="$INCLUDE_DIRS xml/parsers xml/sax wsgiref" mkdir -p ./Lib cp ../Lib/*.py ./Lib