Date:2010-06-26 22:42:26 (13 years 9 months ago)
Author:nbd
Commit:93e7bbfc3f9f189984d21704b3171940ddfcc3e6
Message:remove a few packages which only work with linux 2.4

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21949 3c298f89-4303-0410-b956-a3cf2f4a3e73
Files: package/nozomi/Makefile (1 diff)
package/nozomi/files/Makefile (1 diff)
package/nozomi/patches/001-devfs.patch (1 diff)
package/nozomi/patches/002-nozomi_vf_01.patch (1 diff)
package/pcmcia-cs/Makefile (1 diff)
package/pcmcia-cs/patches/001-config-novatel_merlin_u630.patch (1 diff)
package/pcmcia-cs/patches/002-serial-cardctl_path.patch (1 diff)
package/pcmcia-cs/patches/003-cardmgr_c.patch (1 diff)
package/pcmcia-cs/patches/004-pcmcia_resources.patch (1 diff)
package/rt2570/Makefile (1 diff)

Change Details

package/nozomi/Makefile
1#
2# Copyright (C) 2006 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9include $(INCLUDE_DIR)/kernel.mk
10
11PKG_NAME:=nozomi
12PKG_VERSION:=060209
13PKG_RELEASE:=1
14
15PKG_SOURCE:=nozomi_$(PKG_VERSION).tar.gz
16PKG_SOURCE_URL:=http://www.pharscape.org/3G
17PKG_MD5SUM:=90e4d8f389a18b5579f7234a23e32e99
18
19include $(INCLUDE_DIR)/package.mk
20
21PKG_UNPACK:=mkdir -p $(PKG_BUILD_DIR); gzip -dc $(DL_DIR)/$(PKG_SOURCE) | $(TAR) -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
22
23define KernelPackage/nozomi
24  SUBMENU:=Other modules
25  TITLE:=Option Globetrotter HSDPA driver
26  URL:=http://www.pharscape.org/
27  DEPENDS:=@LINUX_2_4 @PCMCIA_SUPPORT
28  FILES:=$(PKG_BUILD_DIR)/noz.$(LINUX_KMOD_SUFFIX)
29  AUTOLOAD:=$(call AutoLoad,70,noz)
30endef
31
32define Build/Configure
33    $(CP) ./files/Makefile $(PKG_BUILD_DIR)/
34endef
35
36define Build/Compile
37    $(MAKE) -C "$(LINUX_DIR)" \
38        CROSS_COMPILE="$(TARGET_CROSS)" \
39        ARCH="$(LINUX_KARCH)" \
40        PATH="$(TARGET_PATH)" \
41        SUBDIRS="$(PKG_BUILD_DIR)" \
42        modules
43endef
44
45$(eval $(call KernelPackage,nozomi))
package/nozomi/files/Makefile
1
2O_TARGET := noz.o
3
4export-objs := nozomi.o kfifo.o
5
6list-multi := noz.o
7noz-objs := nozomi.o kfifo.o
8
9obj-m := noz.o
10
11include $(TOPDIR)/Rules.make
12
13noz.o: $(noz-objs)
14    $(LD) -r -o $@ $(noz-objs)
package/nozomi/patches/001-devfs.patch
1+++ b/nozomi.c
2@@ -2093,11 +2093,15 @@ static int ntty_tty_init(dc_t *dc) {
3
4     td->magic = TTY_DRIVER_MAGIC;
5     td->driver_name = NOZOMI_NAME_TTY;
6+#ifndef CONFIG_DEVFS_FS
7     td->name = "noz";
8+#else
9+ td->name = "noz%d";
10+#endif
11     td->major = NTTY_TTY_MAJOR,
12     td->type = TTY_DRIVER_TYPE_SERIAL,
13     td->subtype = SERIAL_TYPE_NORMAL,
14- td->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS,
15+ td->flags = TTY_DRIVER_REAL_RAW,
16     td->init_termios = tty_std_termios;
17     td->init_termios.c_cflag = B115200 | CS8 | CREAD | HUPCL | CLOCAL;
18
package/nozomi/patches/002-nozomi_vf_01.patch
1+++ b/nozomi.c
2@@ -7,6 +7,9 @@
3  *
4  * Maintained by: Paul Hardwick, p.hardwick@option.com
5  *
6+ * Patches:
7+ * Locking code changes for Vodafone, Andrew Bird & Phil Sanderson
8+ *
9  * Source has been ported from an implementation made by Filip Aben, f.aben@option.com
10  *
11  * --------------------------------------------------------------------------
12@@ -61,6 +64,7 @@
13 #include <linux/interrupt.h>
14 #include <linux/kmod.h>
15 #include <linux/proc_fs.h>
16+#include <linux/init.h>
17 #include <asm/uaccess.h>
18
19
20@@ -133,23 +137,23 @@ static int nzdebug = NOZOMI_DEBUG_LEVEL;
21 /* TODO: rewrite to optimize macros... */
22 #define SET_FCR(value__) \
23   do { \
24- writew((value__), (void*) (dc->REG_FCR )); \
25+ writew((value__), (dc->REG_FCR )); \
26 } while(0)
27
28 #define SET_IER(value__, mask__) \
29   do { \
30     dc->ier_last_written = (dc->ier_last_written & ~mask__) | (value__ & mask__ );\
31- writew( dc->ier_last_written, (void*) (dc->REG_IER));\
32+ writew( dc->ier_last_written, (dc->REG_IER));\
33 } while(0)
34
35 #define GET_IER(read_val__) \
36   do { \
37- (read_val__) = readw((void*) (dc->REG_IER));\
38+ (read_val__) = readw((dc->REG_IER));\
39 } while(0)
40
41 #define GET_IIR(read_val__) \
42   do { \
43- (read_val__) = readw((void*) (dc->REG_IIR));\
44+ (read_val__) = readw( (dc->REG_IIR));\
45 } while(0)
46
47 #define GET_MEM(value__, addr__, length__) \
48@@ -265,7 +269,7 @@ static int nzdebug = NOZOMI_DEBUG_LEVEL;
49 /* There are two types of nozomi cards, one with 2048 memory and with 8192 memory */
50 typedef enum {
51     F32_2 = 2048, /* Has 512 bytes downlink and uplink * 2 -> 2048 */
52- F32_8 = 9192, /* Has 3072 bytes downlink and 1024 bytes uplink * 2 -> 8192 */
53+ F32_8 = 8192, /* Has 3072 bytes downlink and 1024 bytes uplink * 2 -> 8192 */
54 } card_type_t;
55
56 /* Two different toggle channels exist */
57@@ -438,12 +442,12 @@ typedef struct {
58     u32 base_addr;
59     u8 closing;
60
61- /* Register addresses */
62- u32 REG_IIR;
63- u32 REG_FCR;
64- u32 REG_IER;
65+ /* Pointers to registers ( register is tagged volatile, not pointer ) */
66+ volatile u16 * REG_IIR;
67+ volatile u16 * REG_FCR;
68+ volatile u16 * REG_IER;
69
70- volatile u16 ier_last_written;
71+ u16 ier_last_written;
72     card_type_t card_type;
73     config_table_t config_table; /* Configuration table */
74     struct pci_dev *pdev;
75@@ -490,7 +494,7 @@ static struct pci_device_id nozomi_pci_t
76
77 /* Used to store interrupt variables */
78 typedef struct {
79- volatile u16 read_iir; /* Holds current interrupt tokens */
80+ u16 read_iir; /* Holds current interrupt tokens */
81 } irq_t;
82
83 MODULE_DEVICE_TABLE(pci, nozomi_pci_tbl);
84@@ -1345,9 +1349,9 @@ void nozomi_setup_private_data(dc_t *dc)
85     u32 offset = dc->base_addr + dc->card_type/2;
86     int i;
87
88- dc->REG_FCR = offset + R_FCR;
89- dc->REG_IIR = offset + R_IIR;
90- dc->REG_IER = offset + R_IER;
91+ dc->REG_FCR = (u16 *) (offset + R_FCR);
92+ dc->REG_IIR = (u16 *) (offset + R_IIR);
93+ dc->REG_IER = (u16 *) (offset + R_IER);
94     dc->ier_last_written = 0;
95     dc->closing = 0;
96
97@@ -1366,13 +1370,16 @@ void nozomi_setup_private_data(dc_t *dc)
98 static void tty_flip_queue_function(void *tmp_dc) {
99     dc_t *dc = (dc_t*) tmp_dc;
100     int i;
101+ u32 flags;
102
103     /* Enable interrupt for that port */
104     for(i=0;i<MAX_PORT;i++) {
105         if (dc->port[i].tty_dont_flip) {
106             D6("Enable for port: %d", i);
107             dc->port[i].tty_dont_flip = 0;
108+ spin_lock_irqsave(&dc->spin_mutex, flags);
109             enable_transmit_dl(dc->port[i].tty_index, dc);
110+ spin_unlock_irqrestore(&dc->spin_mutex, flags);
111         }
112     }
113 }
114@@ -1555,7 +1562,11 @@ err_disable_device:
115
116 static void tty_do_close(dc_t *dc, port_t *port) {
117
118- down(&port->tty_sem);
119+ u32 flags;
120+
121+ if(down_interruptible(&port->tty_sem)){
122+ return;
123+ }
124
125     if ( !port->tty_open_count ) {
126         goto exit;
127@@ -1569,7 +1580,9 @@ static void tty_do_close(dc_t *dc, port_
128
129     if ( port->tty_open_count == 0) {
130         D1("close: %d", port->token_dl );
131+ spin_lock_irqsave(&dc->spin_mutex, flags);
132         SET_IER( 0, port->token_dl );
133+ spin_unlock_irqrestore(&dc->spin_mutex, flags);
134     }
135
136 exit:
137@@ -1679,8 +1692,11 @@ static int ntty_open(struct tty_struct *
138     s32 index = get_index(tty);
139     port_t *port = get_port_by_tty(tty);
140     dc_t *dc = get_dc_by_tty(tty);
141+ u32 flags;
142
143- down(&port->tty_sem);
144+ if(down_interruptible(&port->tty_sem)){
145+ return -ERESTARTSYS;
146+ }
147
148     tty->low_latency = 1;
149     tty->driver_data = port;
150@@ -1698,7 +1714,9 @@ static int ntty_open(struct tty_struct *
151     if ( port->tty_open_count == 1) {
152         port->rx_data = port->tx_data = 0;
153         D1("open: %d", port->token_dl );
154+ spin_lock_irqsave(&dc->spin_mutex, flags);
155         SET_IER( port->token_dl, port->token_dl );
156+ spin_unlock_irqrestore(&dc->spin_mutex, flags);
157     }
158
159     up(&port->tty_sem);
160@@ -1722,6 +1740,7 @@ static s32 ntty_write(struct tty_struct
161     int rval = -EINVAL;
162     dc_t *dc = get_dc_by_tty(tty);
163     port_t *port = (port_t *) tty->driver_data;
164+ u32 flags;
165
166     /* D1( "WRITEx: %d, index = %d", count, index); */
167
168@@ -1729,7 +1748,10 @@ static s32 ntty_write(struct tty_struct
169         return -ENODEV;
170     }
171
172- down(&port->tty_sem);
173+ if(down_trylock(&port->tty_sem) ) { // must test lock as tty layer wraps calls to this function with BKL
174+ ERR("Would have deadlocked - return ERESTARTSYS");
175+ return -ERESTARTSYS;
176+ }
177
178     if (! port->tty_open_count) {
179         D1( " ");
180@@ -1752,6 +1774,7 @@ static s32 ntty_write(struct tty_struct
181         goto exit;
182     }
183
184+ spin_lock_irqsave(&dc->spin_mutex, flags);
185     // CTS is only valid on the modem channel
186     if ( port == &(dc->port[PORT_MDM]) ) {
187         if ( port->ctrl_dl.CTS ) {
188@@ -1763,6 +1786,7 @@ static s32 ntty_write(struct tty_struct
189     } else {
190         enable_transmit_ul(port->tty_index, dc );
191     }
192+ spin_unlock_irqrestore(&dc->spin_mutex, flags);
193
194 exit:
195     up(&port->tty_sem);
196@@ -1782,7 +1806,9 @@ static int ntty_write_room(struct tty_st
197         return 0;
198     }
199
200- down(&port->tty_sem);
201+ if(down_interruptible(&port->tty_sem)){
202+ return 0;
203+ }
204
205     if (! port->tty_open_count) {
206         goto exit;
207@@ -1969,6 +1995,8 @@ static int ntty_ioctl_tiocgicount(struct
208
209 static int ntty_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) {
210     port_t *port = (port_t *) tty->driver_data;
211+ dc_t *dc = get_dc_by_tty(tty);
212+ u32 flags;
213     int mask;
214     int rval = -ENOIOCTLCMD;
215
216@@ -1991,7 +2019,9 @@ static int ntty_ioctl(struct tty_struct
217         rval = ntty_ioctl_tiocgicount(tty, file, cmd, arg);
218         break;
219     case TIOCMGET:
220+ spin_lock_irqsave(&dc->spin_mutex, flags);
221         rval = ntty_tiocmget(tty, file);
222+ spin_unlock_irqrestore(&dc->spin_mutex, flags);
223         break;
224     case TIOCMSET:
225         rval = ntty_tiocmset(tty, file, arg);
226@@ -2000,20 +2030,24 @@ static int ntty_ioctl(struct tty_struct
227         if (get_user(mask, (unsigned long *) arg))
228             return -EFAULT;
229
230+ spin_lock_irqsave(&dc->spin_mutex, flags);
231         if (mask & TIOCM_RTS)
232             set_rts(port->tty_index, 0);
233         if (mask & TIOCM_DTR)
234             set_dtr(port->tty_index, 0);
235+ spin_unlock_irqrestore(&dc->spin_mutex, flags);
236         rval = 0;
237         break;
238        case TIOCMBIS:
239         if (get_user(mask, (unsigned long *) arg))
240             return -EFAULT;
241
242+ spin_lock_irqsave(&dc->spin_mutex, flags);
243         if (mask & TIOCM_RTS)
244             set_rts(port->tty_index, 1);
245         if (mask & TIOCM_DTR)
246             set_dtr(port->tty_index, 1);
247+ spin_unlock_irqrestore(&dc->spin_mutex, flags);
248         rval = 0;
249         break;
250     case TCFLSH:
package/pcmcia-cs/Makefile
1#
2# Copyright (C) 2006 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9include $(INCLUDE_DIR)/kernel.mk
10
11PKG_NAME:=pcmcia-cs
12PKG_VERSION:=3.2.8
13PKG_RELEASE:=1
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16PKG_SOURCE_URL:=@SF/$(PKG_NAME)
17PKG_MD5SUM:=0d6d65be8896eff081aee996049afaa5
18
19include $(INCLUDE_DIR)/package.mk
20
21define Package/pcmcia-cs
22  SECTION:=utils
23  CATEGORY:=Utilities
24  DEPENDS:=@LINUX_2_4 @PCMCIA_SUPPORT
25  TITLE:=PCMCIA/Cardbus management utilities
26  URL:=http://pcmcia-cs.sourceforge.net/
27endef
28
29$(STAMP_CONFIGURED): $(LINUX_DIR)/.config
30
31define Build/Configure
32    ( cd $(PKG_BUILD_DIR); \
33        ./Configure \
34            --noprompt \
35            --kernel="$(LINUX_DIR)" \
36            --target="$(PKG_INSTALL_DIR)" \
37            --arch="$(ARCH)" \
38            --ucc="$(TARGET_CC)" \
39            --uflags="$(TARGET_CFLAGS)" \
40            --srctree \
41            --cardbus \
42            --noapm \
43            --nopnp \
44            --notrust \
45            --nox11 \
46            --rcdir="/etc" \
47            --sysv \
48    )
49endef
50
51define Build/Compile
52    rm -rf $(PKG_INSTALL_DIR)
53    mkdir -p $(PKG_INSTALL_DIR)
54    $(call Build/Compile/Default, \
55        CFLAGS="$(TARGET_CFLAGS)" \
56        all install \
57    )
58endef
59
60define Package/pcmcia-cs/install
61    $(INSTALL_DIR) $(1)/etc
62    $(CP) $(PKG_INSTALL_DIR)/etc/pcmcia $(1)/etc/
63    $(INSTALL_DIR) $(1)/usr/sbin
64    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/cardctl $(1)/usr/sbin/
65    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/cardmgr $(1)/usr/sbin/
66endef
67
68$(eval $(call BuildPackage,pcmcia-cs))
package/pcmcia-cs/patches/001-config-novatel_merlin_u630.patch
1+++ b/etc/config
2@@ -2413,6 +2413,10 @@ card "Xircom RBM56G Modem"
3   pci 0x115d, 0x0101
4   bind "serial_cb"
5
6+card "Novatel Wireless - Merlin U630 UMTS Modem"
7+ manfid 0x00a4, 0x0276
8+ bind "serial_cs" to 0, "serial_cs" to 1
9+
10 # Include configuration files for add-on drivers
11
12 source ./*.conf
package/pcmcia-cs/patches/002-serial-cardctl_path.patch
1+++ b/etc/shared
2@@ -167,7 +167,7 @@ get_info ()
3         STAB=/var/run/stab
4     fi
5     grep_stab $1 < $STAB || usage
6- eval `/sbin/cardctl info $SOCKET`
7+ eval `/usr/sbin/cardctl info $SOCKET`
8     fi
9 }
10
package/pcmcia-cs/patches/003-cardmgr_c.patch
1+++ b/cardmgr/cardmgr.c
2@@ -739,10 +739,7 @@ static int try_insmod(char *mod, char *o
3     int ret;
4
5     strcpy(cmd, "insmod ");
6- if (strchr(mod, '/') != NULL)
7- sprintf(cmd+7, "%s/%s.o", modpath, mod);
8- else
9- sprintf(cmd+7, "%s/pcmcia/%s.o", modpath, mod);
10+ sprintf(cmd+7, "%s/%s.o", modpath, mod);
11     if (access(cmd+7, R_OK) != 0) {
12     syslog(LOG_NOTICE, "module %s not available", cmd+7);
13     free(cmd);
14@@ -808,11 +805,13 @@ static void install_module(char *mod, ch
15     }
16
17     if (do_modprobe) {
18- if (try_modprobe(mod, opts) != 0)
19+ if (try_modprobe(mod, opts) != 0) {
20         try_insmod(mod, opts);
21+ }
22     } else {
23- if (try_insmod(mod, opts) != 0)
24+ if (try_insmod(mod, opts) != 0) {
25         try_modprobe(mod, opts);
26+ }
27     }
28 }
29
30@@ -1113,8 +1112,9 @@ static void do_remove(int sn)
31
32     /* remove kernel modules in inverse order */
33     for (i = 0; i < card->bindings; i++) {
34- for (j = dev[i]->modules-1; j >= 0; j--)
35+ for (j = dev[i]->modules-1; j >= 0; j--) {
36         remove_module(dev[i]->module[j]);
37+ }
38     free_device(dev[i]);
39     }
40     /* Remove any MTD's bound to this socket */
package/pcmcia-cs/patches/004-pcmcia_resources.patch
1+++ b/etc/config.opts
2@@ -17,14 +17,13 @@
3 #
4
5 include port 0x100-0x4ff, port 0x800-0x8ff, port 0xc00-0xcff
6-include memory 0xc0000-0xfffff
7-include memory 0xa0000000-0xa0ffffff, memory 0x60000000-0x60ffffff
8+include memory 0x40004000-0x40007fff
9
10 # High port numbers do not always work...
11 # include port 0x1000-0x17ff
12
13 # Extra port range for IBM Token Ring
14-include port 0xa00-0xaff
15+# include port 0xa00-0xaff
16
17 # Resources we should not use, even if they appear to be available
18
package/rt2570/Makefile
1#
2# Copyright (C) 2006 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9include $(INCLUDE_DIR)/kernel.mk
10
11PKG_NAME:=rt2570
12PKG_VERSION:=1.1.0-b2
13PKG_RELEASE:=1
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16PKG_SOURCE_URL:=@SF/rt2400
17PKG_MD5SUM:=f4131d670920a878b4d4a0f5d4d8b93a
18
19include $(INCLUDE_DIR)/package.mk
20
21define KernelPackage/rt2570
22  SUBMENU:=Wireless Drivers
23  TITLE:=Driver for Ralink RT2570 usb wireless chipsets
24  DEPENDS:=@LINUX_2_4 @USB_SUPPORT +wireless-tools
25  URL:=http://rt2x00.serialmonkey.com/
26  FILES:=$(PKG_BUILD_DIR)/Module/rt2570.$(LINUX_KMOD_SUFFIX)
27  AUTOLOAD:=$(call AutoLoad,50,rt2570)
28endef
29
30define KernelPackage/rt2570/description
31 This package contains a driver for Ralink RT2570 usb chipsets.
32endef
33
34define Build/Compile
35    $(MAKE) -C "$(PKG_BUILD_DIR)/Module" \
36        CC="$(TARGET_CC)" \
37        LD="$(TARGET_CROSS)ld" \
38        ARCH="$(LINUX_KARCH)" \
39        PWD="$(PKG_BUILD_DIR)/Module" \
40        KERNDIR="$(LINUX_DIR)" \
41        PATCHLEVEL="$(patsubst 2.%,%,$(KERNEL))"
42endef
43
44$(eval $(call KernelPackage,rt2570))

Archive Download the corresponding diff file



interactive