aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2006-12-30 02:42:12 +0000
committerFlorian Fainelli <florian@openwrt.org>2006-12-30 02:42:12 +0000
commit212b015ced31540cf190d817da0a72d3eac43213 (patch)
tree53378dbe36062e58b866fe237dd6eaeb3a049190
parent5b79e882ecc454a7fe86872bcca7e519b0e8d3ad (diff)
downloadmaster-187ad058-212b015ced31540cf190d817da0a72d3eac43213.tar.gz
master-187ad058-212b015ced31540cf190d817da0a72d3eac43213.tar.bz2
master-187ad058-212b015ced31540cf190d817da0a72d3eac43213.zip
Add rt2500 as a kernel package, with pci id fix to make the latest a/b/g card be recognized
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5932 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/rt2500/Makefile48
-rw-r--r--package/rt2500/patches/01-rt2561t.patch31
2 files changed, 79 insertions, 0 deletions
diff --git a/package/rt2500/Makefile b/package/rt2500/Makefile
new file mode 100644
index 0000000000..ca1b837be4
--- /dev/null
+++ b/package/rt2500/Makefile
@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id: Makefile 5314 2006-10-27 19:14:43Z nico $
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=rt2500
+PKG_VERSION:=1.1.0-b4
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/rt2400
+PKG_MD5SUM:=83b8b9a091705c08d99268479f3b3b6a
+PKG_CAT:=zcat
+
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/rt2500
+ SUBMENU:=Wireless Drivers
+ TITLE:=Driver for ralink pci wireless chipsets
+ DEPENDS:=@USB_SUPPORT +wireless-tools
+ DESCRIPTION:=\
+ This package contains a driver for ralink rt2500 pci chipsets.
+ URL:=http://rt2x00.serialmonkey.com/
+ VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
+ FILES:= \
+ $(PKG_BUILD_DIR)/Module/rt2500.$(LINUX_KMOD_SUFFIX)
+ AUTOLOAD:=$(call AutoLoad,50,rt2500)
+endef
+
+define Build/Compile
+ $(MAKE) -C "$(PKG_BUILD_DIR)/Module" \
+ CC="$(TARGET_CC)" \
+ LD="$(TARGET_CROSS)ld" \
+ ARCH="$(LINUX_KARCH)" \
+ PWD="$(PKG_BUILD_DIR)/Module" \
+ KERNDIR="$(LINUX_DIR)" \
+ PATCHLEVEL="$(patsubst 2.%,%,$(KERNEL))"
+endef
+
+$(eval $(call KernelPackage,rt2500))
diff --git a/package/rt2500/patches/01-rt2561t.patch b/package/rt2500/patches/01-rt2561t.patch
new file mode 100644
index 0000000000..8bdb623b51
--- /dev/null
+++ b/package/rt2500/patches/01-rt2561t.patch
@@ -0,0 +1,31 @@
+diff -urN rt2500-1.1.0-b4/Module/rt_config.h rt2500-1.1.0-b4.new/Module/rt_config.h
+--- rt2500-1.1.0-b4/Module/rt_config.h 2006-06-17 22:12:58.000000000 +0200
++++ rt2500-1.1.0-b4.new/Module/rt_config.h 2006-12-30 02:56:30.000000000 +0100
+@@ -55,7 +55,7 @@
+ #error You must compile this driver with "-O".
+ #endif
+
+-#include <linux/config.h> //can delete
++#include <linux/autoconf.h> //can delete
+ #include <linux/module.h>
+ #include <linux/version.h>
+ #include <linux/kernel.h>
+@@ -154,6 +154,7 @@
+
+ enum rt2560_chips {
+ RT2560A = 0,
++ RT2561T = 0,
+ };
+
+ #ifdef RTMP_EMBEDDED
+diff -urN rt2500-1.1.0-b4/Module/rtmp_main.c rt2500-1.1.0-b4.new/Module/rtmp_main.c
+--- rt2500-1.1.0-b4/Module/rtmp_main.c 2006-06-17 22:12:58.000000000 +0200
++++ rt2500-1.1.0-b4.new/Module/rtmp_main.c 2006-12-30 02:56:01.000000000 +0100
+@@ -975,6 +975,7 @@
+ static struct pci_device_id rt2500_pci_tbl[] __devinitdata =
+ {
+ {0x1814, 0x0201, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RT2560A},
++ {0x1814, 0x0301, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RT2561T},
+ {0,} /* terminate list */
+ };
+ MODULE_DEVICE_TABLE(pci, rt2500_pci_tbl);