From 549f2649f32261fc85001ca8dc946b00d1cfee5f Mon Sep 17 00:00:00 2001 From: Lukas Rusak Date: Sat, 11 Apr 2015 12:29:02 -0700 Subject: [PATCH] New Package - mt7601u --- packages/linux-drivers/mt7601u/package.mk | 44 +++++++++++++++++++++++ tools/mkpkg/mkpkg_mt7601u | 43 ++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 packages/linux-drivers/mt7601u/package.mk create mode 100755 tools/mkpkg/mkpkg_mt7601u diff --git a/packages/linux-drivers/mt7601u/package.mk b/packages/linux-drivers/mt7601u/package.mk new file mode 100644 index 0000000000..fceee5c6b0 --- /dev/null +++ b/packages/linux-drivers/mt7601u/package.mk @@ -0,0 +1,44 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv) +# +# OpenELEC is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# OpenELEC 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. If not, see . +################################################################################ + +PKG_NAME="mt7601u" +PKG_VERSION="ba391b3" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +# mediatek: PKG_SITE="http://www.mediatek.com/en/downloads/mt7601u-usb/" +PKG_SITE="https://github.com/kuba-moo/mt7601u" +PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" +PKG_DEPENDS_TARGET="toolchain linux" +PKG_NEED_UNPACK="$LINUX_DEPENDS" +PKG_PRIORITY="optional" +PKG_SECTION="driver" +PKG_SHORTDESC="mt7601u linux 3.19+ driver" +PKG_LONGDESC="mt7601u linux 3.19+ driver" + +PKG_IS_ADDON="no" +PKG_AUTORECONF="no" + +make_target() { + KDIR=$(kernel_path) make +} + +makeinstall_target() { + mkdir -p $INSTALL/lib/modules/$(get_module_dir)/$PKG_NAME + cp $ROOT/$PKG_BUILD/mt7601u.ko $INSTALL/lib/modules/$(get_module_dir)/$PKG_NAME +} diff --git a/tools/mkpkg/mkpkg_mt7601u b/tools/mkpkg/mkpkg_mt7601u new file mode 100755 index 0000000000..5e9172821c --- /dev/null +++ b/tools/mkpkg/mkpkg_mt7601u @@ -0,0 +1,43 @@ +#!/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 +################################################################################ + +echo "getting sources..." + if [ ! -d mt7601u.git ]; then + git clone https://github.com/kuba-moo/mt7601u.git mt7601u.git + fi + + cd mt7601u.git + git pull + GIT_REV=`git log -n1 --format=%h` + cd .. + +echo "copying sources..." + rm -rf mt7601u-$GIT_REV + cp -R mt7601u.git mt7601u-$GIT_REV + +echo "cleaning sources..." + rm -rf mt7601u-$GIT_REV/.git + +echo "packing sources..." + tar cvJf mt7601u-$GIT_REV.tar.xz mt7601u-$GIT_REV + +echo "remove temporary sourcedir..." + rm -rf mt7601u-$GIT_REV