diff --git a/net/madwimax/Makefile b/net/madwimax/Makefile new file mode 100644 index 000000000..5525bc806 --- /dev/null +++ b/net/madwimax/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. + +include $(TOPDIR)/rules.mk + +PKG_NAME:=madwimax +PKG_VERSION:=0.1.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=madwimax-0.1.1.tar.gz +PKG_SOURCE_URL:=http://madwimax.googlecode.com/files/ +PKG_MD5SUM:=4ebd2d74e887e6f9d6f23067a4ad8272 + +include $(INCLUDE_DIR)/package.mk + +define Package/madwimax + SECTION:=net + CATEGORY:=Network + TITLE:=driver for WiMAX devices based on Samsung CMC-730 chip + URL:=http://code.google.com/p/madwimax/ + DEPENDS:=+libusb-1.0 +kmod-tun +libpthread +endef + +define Package/madwimax/description +madWiMAX is a reverse-engineered Linux driver for mobile WiMAX (802.16e) devices based on Samsung CMC-730 chip. These devices are currently supported: + +Samsung SWC-U200 +Samsung SWC-E100 +Samsung SWM-S10R (built in Samsung NC-10 netbook) +endef + +TARGET_CFLAGS += $(FPIC) + +CONFIGURE_ARGS += --without-man-pages + +define Package/madwimax/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/madwimax $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/madwimax + $(INSTALL_DIR) $(1)/etc/hotplug.d/usb + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/20-madwimax $(1)/etc/hotplug.d/usb/ + $(INSTALL_BIN) ./files/event.sh $(1)/etc/madwimax/ + $(INSTALL_BIN) ./files/madwimax $(1)/etc/init.d/ +endef + +$(eval $(call BuildPackage,madwimax)) diff --git a/net/madwimax/files/20-madwimax b/net/madwimax/files/20-madwimax new file mode 100644 index 000000000..252eb5e0b --- /dev/null +++ b/net/madwimax/files/20-madwimax @@ -0,0 +1,22 @@ +#!/bin/sh + +case "$ACTION" in + add) + [ -n ${PRODUCT} ] && + [ -n ${INTERFACE} ] && + [ "${PRODUCT}" = "4e8/6761/1" ] && + [ "${INTERFACE}" = "255/0/0" ] && { + /usr/sbin/madwimax -qofd + } + ;; + remove) + [ -n ${PRODUCT} ] && + [ -n ${INTERFACE} ] && + [ "${PRODUCT}" = "4e8/6761/1" ] && + [ "${INTERFACE}" = "255/0/0" ] && { + /usr/bin/killall madwimax + return 0 + } + ;; +esac + diff --git a/net/madwimax/files/event.sh b/net/madwimax/files/event.sh new file mode 100644 index 000000000..c44afec28 --- /dev/null +++ b/net/madwimax/files/event.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +case "$1" in + if-create) + ;; + if-up) + /sbin/ifdown wan + /sbin/ifup wimax + ;; + if-down) + /sbin/ifdown wimax + /sbin/ifup wan + ;; + if-release) + ;; +esac + +exit 0 \ No newline at end of file diff --git a/net/madwimax/files/madwimax b/net/madwimax/files/madwimax new file mode 100755 index 000000000..5be447d30 --- /dev/null +++ b/net/madwimax/files/madwimax @@ -0,0 +1,6 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006 OpenWrt.org +START=90 +boot() { + /usr/sbin/madwimax -qofd +}