remove linux 2.4 support from several packages

SVN-Revision: 21954
This commit is contained in:
Felix Fietkau 2010-06-26 20:43:41 +00:00
parent 08e4d51c29
commit 543d870e82
19 changed files with 53 additions and 512 deletions

View file

@ -11,16 +11,8 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=bridge-utils PKG_NAME:=bridge-utils
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_SOURCE_URL:=@SF/bridge PKG_SOURCE_URL:=@SF/bridge
PKG_VERSION:=1.4
ifeq ($(CONFIG_LINUX_2_4),y) PKG_MD5SUM:=0182fcac3a2b307113bbec34e5f1c673
PKG_VERSION:=1.0.6
PKG_MD5SUM:=9b7dc52656f5cbec846a7ba3299f73bd
endif
ifeq ($(CONFIG_LINUX_2_6),y)
PKG_VERSION:=1.4
PKG_MD5SUM:=0182fcac3a2b307113bbec34e5f1c673
endif
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz

View file

@ -15,7 +15,7 @@ include $(INCLUDE_DIR)/package.mk
define KernelPackage/diag define KernelPackage/diag
SUBMENU:=Other modules SUBMENU:=Other modules
DEPENDS:=@TARGET_brcm_2_4||TARGET_brcm47xx DEPENDS:=@TARGET_brcm47xx
TITLE:=Driver for router LEDs and Buttons TITLE:=Driver for router LEDs and Buttons
FILES:=$(PKG_BUILD_DIR)/diag.$(LINUX_KMOD_SUFFIX) FILES:=$(PKG_BUILD_DIR)/diag.$(LINUX_KMOD_SUFFIX)
endef endef
@ -25,10 +25,6 @@ define Build/Prepare
$(CP) ./src/* $(PKG_BUILD_DIR)/ $(CP) ./src/* $(PKG_BUILD_DIR)/
endef endef
ifeq ($(BOARD),brcm-2.4)
BUILDFLAGS=-DBCMDRIVER -I$(LINUX_DIR)/arch/mips/bcm947xx/include -DLINUX_2_4
endif
define Build/Compile define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \ $(MAKE) -C "$(LINUX_DIR)" \
CROSS_COMPILE="$(TARGET_CROSS)" \ CROSS_COMPILE="$(TARGET_CROSS)" \

View file

@ -27,20 +27,12 @@
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/version.h> #include <linux/version.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#ifndef LINUX_2_4
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <linux/netlink.h> #include <linux/netlink.h>
#include <net/sock.h> #include <net/sock.h>
extern struct sock *uevent_sock; extern struct sock *uevent_sock;
extern u64 uevent_next_seqnum(void); extern u64 uevent_next_seqnum(void);
#else
#include <linux/tqueue.h>
#define INIT_WORK INIT_TQUEUE
#define schedule_work schedule_task
#define work_struct tq_struct
#endif
#include "gpio.h" #include "gpio.h"
#include "diag.h" #include "diag.h"
@ -179,12 +171,10 @@ static void __init NetCenter_init(void) {
static void __init bcm57xx_init(void) { static void __init bcm57xx_init(void) {
int pin = 1 << 2; int pin = 1 << 2;
#ifndef LINUX_2_4
/* FIXME: switch comes up, but port mappings/vlans not right */ /* FIXME: switch comes up, but port mappings/vlans not right */
gpio_outen(pin, pin); gpio_outen(pin, pin);
gpio_control(pin, 0); gpio_control(pin, 0);
gpio_out(pin, pin); gpio_out(pin, pin);
#endif
} }
static struct platform_t __initdata platforms[] = { static struct platform_t __initdata platforms[] = {
@ -1145,7 +1135,6 @@ static void unregister_buttons(struct button_t *b)
} }
#ifndef LINUX_2_4
static void add_msg(struct event_t *event, char *msg, int argv) static void add_msg(struct event_t *event, char *msg, int argv)
{ {
char *s; char *s;
@ -1177,43 +1166,6 @@ static void hotplug_button(struct work_struct *work)
kfree(event); kfree(event);
} }
#else /* !LINUX_2_4 */
static inline char *kzalloc(unsigned int size, unsigned int gfp)
{
char *p;
p = kmalloc(size, gfp);
if (p == NULL)
return NULL;
memset(p, 0, size);
return p;
}
static void add_msg(struct event_t *event, char *msg, int argv)
{
if (argv)
event->argv[event->anr++] = event->scratch;
else
event->envp[event->enr++] = event->scratch;
event->scratch += sprintf(event->scratch, "%s", msg) + 1;
}
static void hotplug_button(struct event_t *event)
{
char *scratch = kzalloc(256, GFP_KERNEL);
event->scratch = scratch;
add_msg(event, hotplug_path, 1);
add_msg(event, "button", 1);
fill_event(event);
call_usermodehelper (event->argv[0], event->argv, event->envp);
kfree(scratch);
kfree(event);
}
#endif /* !LINUX_2_4 */
static int fill_event (struct event_t *event) static int fill_event (struct event_t *event)
{ {
@ -1228,20 +1180,14 @@ static int fill_event (struct event_t *event)
add_msg(event, buf, 0); add_msg(event, buf, 0);
snprintf(buf, 128, "SEEN=%ld", event->seen); snprintf(buf, 128, "SEEN=%ld", event->seen);
add_msg(event, buf, 0); add_msg(event, buf, 0);
#ifndef LINUX_2_4
snprintf(buf, 128, "SEQNUM=%llu", uevent_next_seqnum()); snprintf(buf, 128, "SEQNUM=%llu", uevent_next_seqnum());
add_msg(event, buf, 0); add_msg(event, buf, 0);
#endif
return 0; return 0;
} }
#ifndef LINUX_2_4
static irqreturn_t button_handler(int irq, void *dev_id) static irqreturn_t button_handler(int irq, void *dev_id)
#else
static irqreturn_t button_handler(int irq, void *dev_id, struct pt_regs *regs)
#endif
{ {
struct button_t *b; struct button_t *b;
u32 in, changed; u32 in, changed;
@ -1264,11 +1210,7 @@ static irqreturn_t button_handler(int irq, void *dev_id, struct pt_regs *regs)
event->seen = (jiffies - b->seen)/HZ; event->seen = (jiffies - b->seen)/HZ;
event->name = b->name; event->name = b->name;
event->action = b->pressed ? "pressed" : "released"; event->action = b->pressed ? "pressed" : "released";
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
INIT_WORK(&event->wq, (void *)(void *)hotplug_button); INIT_WORK(&event->wq, (void *)(void *)hotplug_button);
#else
INIT_WORK(&event->wq, (void *)(void *)hotplug_button, (void *)event);
#endif
schedule_work(&event->wq); schedule_work(&event->wq);
} }
@ -1362,12 +1304,7 @@ static void led_flash(unsigned long dummy) {
static ssize_t diag_proc_read(struct file *file, char *buf, size_t count, loff_t *ppos) static ssize_t diag_proc_read(struct file *file, char *buf, size_t count, loff_t *ppos)
{ {
#ifdef LINUX_2_4
struct inode *inode = file->f_dentry->d_inode;
struct proc_dir_entry *dent = inode->u.generic_ip;
#else
struct proc_dir_entry *dent = PDE(file->f_dentry->d_inode); struct proc_dir_entry *dent = PDE(file->f_dentry->d_inode);
#endif
char *page; char *page;
int len = 0; int len = 0;
@ -1420,12 +1357,7 @@ static ssize_t diag_proc_read(struct file *file, char *buf, size_t count, loff_t
static ssize_t diag_proc_write(struct file *file, const char *buf, size_t count, loff_t *ppos) static ssize_t diag_proc_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
{ {
#ifdef LINUX_2_4
struct inode *inode = file->f_dentry->d_inode;
struct proc_dir_entry *dent = inode->u.generic_ip;
#else
struct proc_dir_entry *dent = PDE(file->f_dentry->d_inode); struct proc_dir_entry *dent = PDE(file->f_dentry->d_inode);
#endif
char *page; char *page;
int ret = -EINVAL; int ret = -EINVAL;

View file

@ -23,7 +23,7 @@ define Package/broadcom-wl/Default
CATEGORY:=Kernel modules CATEGORY:=Kernel modules
DEPENDS:=@PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mini DEPENDS:=@PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mini
SUBMENU:=Proprietary BCM43xx WiFi driver SUBMENU:=Proprietary BCM43xx WiFi driver
SUBMENUDEP:=@TARGET_brcm47xx||@TARGET_brcm_2_4 SUBMENUDEP:=@TARGET_brcm47xx
endef endef
define KernelPackage/brcm-wl/Default define KernelPackage/brcm-wl/Default

View file

@ -1,21 +1,6 @@
menu "Configuration" menu "Configuration"
depends on PACKAGE_busybox depends on PACKAGE_busybox
config BUSYBOX_CONFIG_FEATURE_DEVFS
bool
default y if LINUX_2_4
default n if LINUX_2_6
config BUSYBOX_CONFIG_FEATURE_2_4_MODULES
bool
default y if LINUX_2_4
default n if LINUX_2_6
config BUSYBOX_CONFIG_FEATURE_2_6_MODULES
bool
default n if LINUX_2_4
default y if LINUX_2_6
config BUSYBOX_CONFIG_NOMMU config BUSYBOX_CONFIG_NOMMU
bool bool
depends NOMMU depends NOMMU

View file

@ -18,14 +18,6 @@ PKG_MD5SUM:=a26ec54e410bb826a387947b10c0fd2c
PKG_INSTALL:=1 PKG_INSTALL:=1
# Kernel 2.4 Module
FUSE24_VERSION=2.5.3
FUSE24_SOURCE:=$(PKG_NAME)-$(FUSE24_VERSION).tar.gz
FUSE24_MD5SUM:=9c7e8b6606b9f158ae20b8521ba2867c
FUSE24_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(FUSE24_VERSION)
FUSE24_INSTALL_DIR:=$(FUSE24_BUILD_DIR)/ipkg-install
FUSE24_PATCH_DIR:=./patches-kernel24
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
define Package/fuse/Default define Package/fuse/Default
@ -57,14 +49,9 @@ define KernelPackage/fuse
$(call Package/fuse/Default) $(call Package/fuse/Default)
SUBMENU:=Filesystems SUBMENU:=Filesystems
TITLE+= (kernel module) TITLE+= (kernel module)
ifeq ($(KERNEL),2.4)
FILES:=$(FUSE24_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX)
VERSION:=$(LINUX_VERSION)+$(FUSE24_VERSION)-$(PKG_RELEASE)
else
KCONFIG:= CONFIG_FUSE_FS KCONFIG:= CONFIG_FUSE_FS
FILES:=$(LINUX_DIR)/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX) FILES:=$(LINUX_DIR)/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX)
VERSION:=$(LINUX_VERSION)-$(LINUX_RELEASE) VERSION:=$(LINUX_VERSION)-$(LINUX_RELEASE)
endif
AUTOLOAD:=$(call AutoLoad,80,fuse) AUTOLOAD:=$(call AutoLoad,80,fuse)
endef endef
@ -97,95 +84,9 @@ CONFIGURE_ARGS += \
--disable-example \ --disable-example \
--disable-mtab --disable-mtab
# kmod 2.4 args
FUSE24_CONFIGURE_ARGS := $(CONFIGURE_ARGS) \
--disable-lib --disable-util \
--enable-kernel-module --disable-auto-modprobe \
--with-kernel="$(LINUX_DIR)"
# generic package uses lib & utils # generic package uses lib & utils
CONFIGURE_ARGS += --enable-lib --enable-util CONFIGURE_ARGS += --enable-lib --enable-util
####### FUSE24 - START ######
### if we're on kernel 2.4 build a kernel 2.4 compatible fuse module from older version, see also
### http://sourceforge.net/apps/mediawiki/fuse/index.php?title=FAQ#What_version_of_FUSE_do_I_need_to_use_FUSE_with_Linux_2.4.3F
ifeq ($(KERNEL),2.4)
define Download/fuse24
FILE:=$(FUSE24_SOURCE)
URL:=$(PKG_SOURCE_URL)
MD5SUM:=$(FUSE24_MD5SUM)
endef
$(eval $(call Download,fuse24))
define Build/Prepare/fuse24
rm -rf $(FUSE24_BUILD_DIR)/
mkdir -p $(FUSE24_BUILD_DIR)/
$(TAR) -xzf $(DL_DIR)/$(FUSE24_SOURCE) -C $(FUSE24_BUILD_DIR)/..
endef
define Build/Patch/fuse24
$(call PatchDir,$(FUSE24_BUILD_DIR),$(FUSE24_PATCH_DIR),)
endef
define Build/Configure/fuse24
(cd $(FUSE24_BUILD_DIR); \
rm -rf config.{cache,status} ; \
$(CONFIGURE_VARS) \
./configure \
$(FUSE24_CONFIGURE_ARGS) \
);
endef
define Build/Compile/fuse24
$(MAKE) -C $(FUSE24_BUILD_DIR)/$(MAKE_PATH) \
ARCH="$(LINUX_KARCH)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
all;
endef
define Build/Install/fuse24
rm -rf $(FUSE24_INSTALL_DIR)
mkdir -p $(FUSE24_INSTALL_DIR)
$(MAKE) -C $(FUSE24_BUILD_DIR) \
ARCH="$(LINUX_KARCH)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
DESTDIR="$(FUSE24_INSTALL_DIR)" \
install
endef
define Build/Prepare
@echo "--> Build/Prepare enter"
$(call Build/Prepare/fuse24)
$(call Build/Patch/fuse24)
$(call Build/Prepare/Default)
@echo "--> Build/Prepare leave"
endef
define Build/Configure
@echo "--> Build/Configure enter"
$(call Build/Configure/fuse24)
$(call Build/Configure/Default)
@echo "--> Build/Configure leave"
endef
define Build/Compile
@echo "--> Build/Compile enter"
$(call Build/Compile/fuse24)
$(call Build/Compile/Default)
@echo "--> Build/Compile leave"
endef
define Build/Install
@echo "--> Build/Install enter"
$(call Build/Install/fuse24)
$(call Build/Install/Default)
@echo "--> Build/Install leave"
endef
endif
####### FUSE24 - END ######
define Build/InstallDev define Build/InstallDev
@echo "--> Build/InstallDev enter" @echo "--> Build/InstallDev enter"
mkdir -p $(1)/usr/include mkdir -p $(1)/usr/include

View file

@ -17,20 +17,9 @@ PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/
PKG_MD5SUM:=c7534dc040ab90218257a78488ecd378 PKG_MD5SUM:=c7534dc040ab90218257a78488ecd378
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
ifeq ($(DUMP),)
-include $(LINUX_DIR)/.config
endif
define KernelPackage/hostap/Default/2.4
VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
endef
define KernelPackage/hostap/Default/2.6
VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE)
endef
define KernelPackage/hostap/Default define KernelPackage/hostap/Default
$(call KernelPackage/hostap/Default/$(KERNEL)) VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE)
SUBMENU:=Wireless Drivers SUBMENU:=Wireless Drivers
URL:=http://hostap.epitest.fi/ URL:=http://hostap.epitest.fi/
endef endef
@ -45,26 +34,9 @@ endef
define KernelPackage/hostap define KernelPackage/hostap
$(call KernelPackage/hostap/Default) $(call KernelPackage/hostap/Default)
TITLE:=Host AP support for Prism2/2.5/3 TITLE:=Host AP support for Prism2/2.5/3
DEPENDS:=@PCI_SUPPORT||PCMCIA_SUPPORT +LINUX_2_6:kmod-lib80211 +wireless-tools DEPENDS:=@PCI_SUPPORT||PCMCIA_SUPPORT +kmod-lib80211 +wireless-tools
KCONFIG:=CONFIG_HOSTAP CONFIG_HOSTAP_FIRMWARE=y CONFIG_HOSTAP_FIRMWARE_NVRAM=y KCONFIG:=CONFIG_HOSTAP CONFIG_HOSTAP_FIRMWARE=y CONFIG_HOSTAP_FIRMWARE_NVRAM=y
endef FILES:=$(LINUX_DIR)/drivers/net/wireless/hostap/hostap.$(LINUX_KMOD_SUFFIX)
define KernelPackage/hostap/2.4
# NOTE: needed to remove the dependency on kmod-ieee80211 in the final ipkg
DEPENDS:=
# NOTE: needed to build the standalone version on 2.4
KCONFIG:=
FILES:= \
$(PKG_BUILD_DIR)/driver/modules/hostap.$(LINUX_KMOD_SUFFIX) \
$(PKG_BUILD_DIR)/driver/modules/hostap_crypt_ccmp.$(LINUX_KMOD_SUFFIX) \
$(PKG_BUILD_DIR)/driver/modules/hostap_crypt_tkip.$(LINUX_KMOD_SUFFIX) \
$(PKG_BUILD_DIR)/driver/modules/hostap_crypt_wep.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,60,hostap hostap_crypt_wep hostap_crypt_tkip hostap_crypt_ccmp)
endef
define KernelPackage/hostap/2.6
FILES:= \
$(LINUX_DIR)/drivers/net/wireless/hostap/hostap.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,60,hostap) AUTOLOAD:=$(call AutoLoad,60,hostap)
endef endef
@ -81,18 +53,9 @@ $(call KernelPackage/hostap/Default)
TITLE:=Host AP driver for PCMCIA adaptors TITLE:=Host AP driver for PCMCIA adaptors
DEPENDS:=@PCMCIA_SUPPORT +kmod-hostap +kmod-pcmcia-core DEPENDS:=@PCMCIA_SUPPORT +kmod-hostap +kmod-pcmcia-core
KCONFIG:=CONFIG_HOSTAP_CS KCONFIG:=CONFIG_HOSTAP_CS
FILES:=$(LINUX_DIR)/drivers/net/wireless/hostap/hostap_cs.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,60,hostap_cs) AUTOLOAD:=$(call AutoLoad,60,hostap_cs)
endef endef
define KernelPackage/hostap-cs/2.4
# NOTE: needed to build the standalone version on 2.4
KCONFIG:=
FILES:= \
$(PKG_BUILD_DIR)/driver/modules/hostap_cs.$(LINUX_KMOD_SUFFIX)
endef
define KernelPackage/hostap-cs/2.6
FILES:= \
$(LINUX_DIR)/drivers/net/wireless/hostap/hostap_cs.$(LINUX_KMOD_SUFFIX)
endef
define KernelPackage/hostap-cs/description define KernelPackage/hostap-cs/description
$(call KernelPackage/hostap/Default/description) $(call KernelPackage/hostap/Default/description)
@ -105,21 +68,10 @@ $(call KernelPackage/hostap/Default)
TITLE:=Host AP driver for PCI adaptors TITLE:=Host AP driver for PCI adaptors
DEPENDS:=@PCI_SUPPORT +kmod-hostap DEPENDS:=@PCI_SUPPORT +kmod-hostap
KCONFIG:=CONFIG_HOSTAP_PCI KCONFIG:=CONFIG_HOSTAP_PCI
FILES:=$(LINUX_DIR)/drivers/net/wireless/hostap/hostap_pci.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,60,hostap_pci) AUTOLOAD:=$(call AutoLoad,60,hostap_pci)
endef endef
define KernelPackage/hostap-pci/2.4
# NOTE: needed to build the standalone version on 2.4
KCONFIG:=
FILES:= \
$(PKG_BUILD_DIR)/driver/modules/hostap_pci.$(LINUX_KMOD_SUFFIX)
endef
define KernelPackage/hostap-pci/2.6
FILES:= \
$(LINUX_DIR)/drivers/net/wireless/hostap/hostap_pci.$(LINUX_KMOD_SUFFIX)
endef
define KernelPackage/hostap-pci/description define KernelPackage/hostap-pci/description
$(call KernelPackage/hostap/Default/description) $(call KernelPackage/hostap/Default/description)
This package contains the Host AP driver for Prism2.5 PCI adaptors. This package contains the Host AP driver for Prism2.5 PCI adaptors.
@ -131,21 +83,10 @@ $(call KernelPackage/hostap/Default)
TITLE:=Host AP driver for PLX9052 based PCI adaptors TITLE:=Host AP driver for PLX9052 based PCI adaptors
DEPENDS:=@PCI_SUPPORT +kmod-hostap DEPENDS:=@PCI_SUPPORT +kmod-hostap
KCONFIG:=CONFIG_HOSTAP_PLX KCONFIG:=CONFIG_HOSTAP_PLX
FILES:=$(LINUX_DIR)/drivers/net/wireless/hostap/hostap_plx.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,60,hostap_plx) AUTOLOAD:=$(call AutoLoad,60,hostap_plx)
endef endef
define KernelPackage/hostap-plx/2.4
# NOTE: needed to build the standalone version on 2.4
KCONFIG:=
FILES:= \
$(PKG_BUILD_DIR)/driver/modules/hostap_plx.$(LINUX_KMOD_SUFFIX)
endef
define KernelPackage/hostap-plx/2.6
FILES:= \
$(LINUX_DIR)/drivers/net/wireless/hostap/hostap_plx.$(LINUX_KMOD_SUFFIX)
endef
define KernelPackage/hostap-plx/description define KernelPackage/hostap-plx/description
$(call KernelPackage/hostap/Default/description) $(call KernelPackage/hostap/Default/description)
This package contains the Host AP driver for Prism2/2.5/3 in PLX9052 This package contains the Host AP driver for Prism2/2.5/3 in PLX9052
@ -153,25 +94,17 @@ $(call KernelPackage/hostap/Default/description)
endef endef
ifeq ($(KERNEL),2.4) define Build/Prepare
define Build/Compile
$(MAKE) -C $(LINUX_DIR)/ \
ARCH="$(LINUX_KARCH)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
SUBDIRS="$(PKG_BUILD_DIR)/driver/modules" \
modules
endef
else
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR) mkdir -p $(PKG_BUILD_DIR)
endef endef
define Build/Configure define Build/Configure
endef
define Build/Compile endef
endef
endif define Build/Compile
endef
define KernelPackage/hostap/install define KernelPackage/hostap/install
$(INSTALL_DIR) $(1)/lib/wifi $(INSTALL_DIR) $(1)/lib/wifi

View file

@ -8,11 +8,11 @@
# XXX: xburst has CONFIG_CRC16=y because of CONFIG_UBIFS_FS=y # XXX: xburst has CONFIG_CRC16=y because of CONFIG_UBIFS_FS=y
define SetDepends/crc16 define SetDepends/crc16
DEPENDS:= @!(LINUX_2_4||TARGET_xburst) DEPENDS:= @!TARGET_xburst
endef endef
define AddDepends/crc16 define AddDepends/crc16
DEPENDS+= +!(LINUX_2_4||TARGET_xburst):kmod-crc16 $(1) DEPENDS+= +!TARGET_xburst:kmod-crc16 $(1)
endef endef

View file

@ -106,8 +106,8 @@ $(eval $(call KernelPackage,capi))
define KernelPackage/misdn define KernelPackage/misdn
SUBMENU:=$(NETWORK_SUPPORT_MENU) SUBMENU:=$(NETWORK_SUPPORT_MENU)
TITLE:=mISDN (ISDN) Support TITLE:=mISDN (ISDN) Support
DEPENDS:=@LINUX_2_6
KCONFIG:= \ KCONFIG:= \
CONFIG_ISDN=y \
CONFIG_MISDN \ CONFIG_MISDN \
CONFIG_MISDN_DSP \ CONFIG_MISDN_DSP \
CONFIG_MISDN_L1OIP CONFIG_MISDN_L1OIP
@ -118,16 +118,6 @@ define KernelPackage/misdn
AUTOLOAD:=$(call AutoLoad,30,mISDN_core mISDN_dsp l1oip) AUTOLOAD:=$(call AutoLoad,30,mISDN_core mISDN_dsp l1oip)
endef endef
define KernelPackage/misdn/2.4
KCONFIG+= \
CONFIG_ISDN
endef
define KernelPackage/misdn/2.6
KCONFIG+= \
CONFIG_ISDN=y
endef
define KernelPackage/misdn/description define KernelPackage/misdn/description
Modular ISDN driver support Modular ISDN driver support
endef endef
@ -140,6 +130,7 @@ define KernelPackage/isdn4linux
TITLE:=Old ISDN4Linux (deprecated) TITLE:=Old ISDN4Linux (deprecated)
DEPENDS:=@LINUX_2_6 DEPENDS:=@LINUX_2_6
KCONFIG:= \ KCONFIG:= \
CONFIG_ISDN=y \
CONFIG_ISDN_I4L \ CONFIG_ISDN_I4L \
CONFIG_ISDN_PPP=y \ CONFIG_ISDN_PPP=y \
CONFIG_ISDN_PPP_VJ=y \ CONFIG_ISDN_PPP_VJ=y \
@ -153,23 +144,10 @@ define KernelPackage/isdn4linux
CONFIG_ISDN_X25=y \ CONFIG_ISDN_X25=y \
CONFIG_ISDN_DIVERSION CONFIG_ISDN_DIVERSION
FILES:= \ FILES:= \
$(LINUX_DIR)/drivers/isdn/divert/dss1_divert.$(LINUX_KMOD_SUFFIX) $(LINUX_DIR)/drivers/isdn/divert/dss1_divert.$(LINUX_KMOD_SUFFIX) \
AUTOLOAD:=$(call AutoLoad,40,isdn isdn_bsdcomp dss1_divert)
endef
define KernelPackage/isdn4linux/2.4
KCONFIG+= \
CONFIG_ISDN
FILES+= \
$(LINUX_DIR)/drivers/isdn/isdn_bsdcomp.$(LINUX_KMOD_SUFFIX)
endef
define KernelPackage/isdn4linux/2.6
KCONFIG+= \
CONFIG_ISDN=y
FILES+= \
$(LINUX_DIR)/drivers/isdn/i4l/isdn.$(LINUX_KMOD_SUFFIX) \ $(LINUX_DIR)/drivers/isdn/i4l/isdn.$(LINUX_KMOD_SUFFIX) \
$(LINUX_DIR)/drivers/isdn/i4l/isdn_bsdcomp.$(LINUX_KMOD_SUFFIX) $(LINUX_DIR)/drivers/isdn/i4l/isdn_bsdcomp.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,40,isdn isdn_bsdcomp dss1_divert)
endef endef
define KernelPackage/isdn4linux/description define KernelPackage/isdn4linux/description
@ -360,10 +338,9 @@ endef
$(eval $(call KernelPackage,ipv6)) $(eval $(call KernelPackage,ipv6))
# sit is not selectable on 2.4, but built when ipv6 is enabled
define KernelPackage/sit define KernelPackage/sit
SUBMENU:=$(NETWORK_SUPPORT_MENU) SUBMENU:=$(NETWORK_SUPPORT_MENU)
DEPENDS:=+kmod-ipv6 +LINUX_2_6:kmod-iptunnel4 DEPENDS:=+kmod-ipv6 +kmod-iptunnel4
TITLE:=IPv6-in-IPv4 tunnelling TITLE:=IPv6-in-IPv4 tunnelling
KCONFIG:=CONFIG_IPV6 CONFIG_IPV6_SIT KCONFIG:=CONFIG_IPV6 CONFIG_IPV6_SIT
FILES:=$(LINUX_DIR)/net/ipv6/sit.$(LINUX_KMOD_SUFFIX) FILES:=$(LINUX_DIR)/net/ipv6/sit.$(LINUX_KMOD_SUFFIX)
@ -534,16 +511,6 @@ define KernelPackage/mppe
KCONFIG:= \ KCONFIG:= \
CONFIG_PPP_MPPE_MPPC \ CONFIG_PPP_MPPE_MPPC \
CONFIG_PPP_MPPE CONFIG_PPP_MPPE
endef
define KernelPackage/mppe/2.4
# KCONFIG:=CONFIG_PPP_MPPE_MPPC
FILES:=$(LINUX_DIR)/drivers/net/ppp_mppe_mppc.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,31,ppp_mppe_mppc)
endef
define KernelPackage/mppe/2.6
# KCONFIG:=CONFIG_PPP_MPPE
FILES:=$(LINUX_DIR)/drivers/net/ppp_mppe.$(LINUX_KMOD_SUFFIX) FILES:=$(LINUX_DIR)/drivers/net/ppp_mppe.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,31,ppp_mppe) AUTOLOAD:=$(call AutoLoad,31,ppp_mppe)
endef endef

View file

@ -6,7 +6,7 @@
# #
define AddDepends/nls define AddDepends/nls
DEPENDS+= +!LINUX_2_4:kmod-nls-base DEPENDS+= +kmod-nls-base
endef endef
define KernelPackage/nls-base define KernelPackage/nls-base

View file

@ -7,11 +7,7 @@
OTHER_MENU:=Other modules OTHER_MENU:=Other modules
# XXX: added a workaround for watchdog path changes WATCHDOG_DIR:=watchdog
ifeq ($(KERNEL),2.4)
WATCHDOG_DIR=char
endif
WATCHDOG_DIR?=watchdog
define KernelPackage/bluetooth define KernelPackage/bluetooth
@ -39,37 +35,6 @@ define KernelPackage/bluetooth
$(call AddDepends/crc16) $(call AddDepends/crc16)
$(call AddDepends/hid) $(call AddDepends/hid)
$(call AddDepends/rfkill) $(call AddDepends/rfkill)
endef
define KernelPackage/bluetooth/2.4
# KCONFIG:= \
# CONFIG_BLUEZ \
# CONFIG_BLUEZ_L2CAP \
# CONFIG_BLUEZ_SCO \
# CONFIG_BLUEZ_RFCOMM \
# CONFIG_BLUEZ_BNEP \
# CONFIG_BLUEZ_HCIUART \
# CONFIG_BLUEZ_HCIUSB
FILES:= \
$(LINUX_DIR)/net/bluetooth/bluez.$(LINUX_KMOD_SUFFIX) \
$(LINUX_DIR)/net/bluetooth/l2cap.$(LINUX_KMOD_SUFFIX) \
$(LINUX_DIR)/net/bluetooth/sco.$(LINUX_KMOD_SUFFIX) \
$(LINUX_DIR)/net/bluetooth/rfcomm/rfcomm.$(LINUX_KMOD_SUFFIX) \
$(LINUX_DIR)/net/bluetooth/bnep/bnep.$(LINUX_KMOD_SUFFIX) \
$(LINUX_DIR)/drivers/bluetooth/hci_uart.$(LINUX_KMOD_SUFFIX) \
$(LINUX_DIR)/drivers/bluetooth/hci_usb.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,90,bluez l2cap sco rfcomm bnep hci_uart hci_usb)
endef
define KernelPackage/bluetooth/2.6
# KCONFIG:= \
# CONFIG_BT \
# CONFIG_BT_L2CAP \
# CONFIG_BT_SCO \
# CONFIG_BT_RFCOMM \
# CONFIG_BT_BNEP \
# CONFIG_BT_HCIUSB \
# CONFIG_BT_HCIUART
FILES:= \ FILES:= \
$(LINUX_DIR)/net/bluetooth/bluetooth.$(LINUX_KMOD_SUFFIX) \ $(LINUX_DIR)/net/bluetooth/bluetooth.$(LINUX_KMOD_SUFFIX) \
$(LINUX_DIR)/net/bluetooth/l2cap.$(LINUX_KMOD_SUFFIX) \ $(LINUX_DIR)/net/bluetooth/l2cap.$(LINUX_KMOD_SUFFIX) \
@ -286,22 +251,14 @@ define KernelPackage/input-core
TITLE:=Input device core TITLE:=Input device core
KCONFIG:=CONFIG_INPUT KCONFIG:=CONFIG_INPUT
$(call SetDepends/input) $(call SetDepends/input)
FILES:=$(LINUX_DIR)/drivers/input/input-core.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,19,input-core)
endef endef
define KernelPackage/input-core/description define KernelPackage/input-core/description
Kernel modules for support of input device Kernel modules for support of input device
endef endef
define KernelPackage/input-core/2.4
FILES:=$(LINUX_DIR)/drivers/input/input.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,19,input)
endef
define KernelPackage/input-core/2.6
FILES:=$(LINUX_DIR)/drivers/input/input-core.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,19,input-core)
endef
$(eval $(call KernelPackage,input-core)) $(eval $(call KernelPackage,input-core))
@ -521,7 +478,7 @@ $(eval $(call KernelPackage,ledtrig-netdev))
define KernelPackage/lp define KernelPackage/lp
SUBMENU:=$(OTHER_MENU) SUBMENU:=$(OTHER_MENU)
TITLE:=Parallel port and line printer support TITLE:=Parallel port and line printer support
DEPENDS:=@LINUX_2_4 DEPENDS:=@BROKEN
KCONFIG:= \ KCONFIG:= \
CONFIG_PARPORT \ CONFIG_PARPORT \
CONFIG_PRINTER \ CONFIG_PRINTER \
@ -533,19 +490,6 @@ define KernelPackage/lp
AUTOLOAD:=$(call AutoLoad,50,parport lp) AUTOLOAD:=$(call AutoLoad,50,parport lp)
endef endef
define KernelPackage/lp/2.4
FILES:= \
$(LINUX_DIR)/drivers/parport/parport.$(LINUX_KMOD_SUFFIX) \
$(LINUX_DIR)/drivers/parport/parport_*.$(LINUX_KMOD_SUFFIX) \
$(LINUX_DIR)/drivers/char/lp.$(LINUX_KMOD_SUFFIX) \
$(LINUX_DIR)/drivers/char/ppdev.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,50, \
parport \
parport_splink \
lp \
)
endef
$(eval $(call KernelPackage,lp)) $(eval $(call KernelPackage,lp))

View file

@ -7,11 +7,7 @@
USB_MENU:=USB Support USB_MENU:=USB Support
ifneq ($(CONFIG_LINUX_2_4),) USBNET_DIR:=net/usb
USBNET_DIR:=usb/net
endif
USBNET_DIR?=net/usb
USBHID_DIR?=hid/usbhid USBHID_DIR?=hid/usbhid
USBINPUT_DIR?=input/misc USBINPUT_DIR?=input/misc
@ -20,15 +16,8 @@ define KernelPackage/usb-core
TITLE:=Support for USB TITLE:=Support for USB
DEPENDS:=@USB_SUPPORT +LINUX_2_6_31:kmod-nls-base +LINUX_2_6_32:kmod-nls-base +LINUX_2_6_33:kmod-nls-base +LINUX_2_6_34:kmod-nls-base DEPENDS:=@USB_SUPPORT +LINUX_2_6_31:kmod-nls-base +LINUX_2_6_32:kmod-nls-base +LINUX_2_6_33:kmod-nls-base +LINUX_2_6_34:kmod-nls-base
KCONFIG:=CONFIG_USB KCONFIG:=CONFIG_USB
AUTOLOAD:=$(call AutoLoad,20,usbcore,1)
endef
define KernelPackage/usb-core/2.4
FILES:=$(LINUX_DIR)/drivers/usb/usbcore.$(LINUX_KMOD_SUFFIX)
endef
define KernelPackage/usb-core/2.6
FILES:=$(LINUX_DIR)/drivers/usb/core/usbcore.$(LINUX_KMOD_SUFFIX) FILES:=$(LINUX_DIR)/drivers/usb/core/usbcore.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,20,usbcore,1)
endef endef
define KernelPackage/usb-core/description define KernelPackage/usb-core/description
@ -49,19 +38,9 @@ define KernelPackage/usb-uhci
KCONFIG:= \ KCONFIG:= \
CONFIG_USB_UHCI_ALT \ CONFIG_USB_UHCI_ALT \
CONFIG_USB_UHCI_HCD CONFIG_USB_UHCI_HCD
$(call AddDepends/usb)
endef
define KernelPackage/usb-uhci/2.4
# KCONFIG:=CONFIG_USB_UHCI_ALT
FILES:=$(LINUX_DIR)/drivers/usb/host/uhci.o
AUTOLOAD:=$(call AutoLoad,50,uhci,1)
endef
define KernelPackage/usb-uhci/2.6
# KCONFIG:=CONFIG_USB_UHCI_HCD
FILES:=$(LINUX_DIR)/drivers/usb/host/uhci-hcd.ko FILES:=$(LINUX_DIR)/drivers/usb/host/uhci-hcd.ko
AUTOLOAD:=$(call AutoLoad,50,uhci-hcd,1) AUTOLOAD:=$(call AutoLoad,50,uhci-hcd,1)
$(call AddDepends/usb)
endef endef
define KernelPackage/usb-uhci/description define KernelPackage/usb-uhci/description
@ -71,41 +50,15 @@ endef
$(eval $(call KernelPackage,usb-uhci,1)) $(eval $(call KernelPackage,usb-uhci,1))
define KernelPackage/usb-uhci-iv
TITLE:=Support for Intel/VIA UHCI controllers
DEPENDS:=@LINUX_2_4
KCONFIG:=CONFIG_USB_UHCI
FILES:=$(LINUX_DIR)/drivers/usb/host/usb-uhci.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,50,usb-uhci,1)
$(call AddDepends/usb)
endef
define KernelPackage/usb-uhci-iv/description
Kernel support for Intel/VIA USB UHCI controllers
endef
$(eval $(call KernelPackage,usb-uhci-iv,1))
define KernelPackage/usb-ohci define KernelPackage/usb-ohci
TITLE:=Support for OHCI controllers TITLE:=Support for OHCI controllers
KCONFIG:= \ KCONFIG:= \
CONFIG_USB_OHCI \ CONFIG_USB_OHCI \
CONFIG_USB_OHCI_HCD \ CONFIG_USB_OHCI_HCD \
CONFIG_USB_OHCI_AR71XX=y CONFIG_USB_OHCI_AR71XX=y
$(call AddDepends/usb)
endef
define KernelPackage/usb-ohci/2.4
# KCONFIG:=CONFIG_USB_OHCI
FILES:=$(LINUX_DIR)/drivers/usb/host/usb-ohci.o
AUTOLOAD:=$(call AutoLoad,50,usb-ohci,1)
endef
define KernelPackage/usb-ohci/2.6
# KCONFIG:=CONFIG_USB_OHCI_HCD
FILES:=$(LINUX_DIR)/drivers/usb/host/ohci-hcd.ko FILES:=$(LINUX_DIR)/drivers/usb/host/ohci-hcd.ko
AUTOLOAD:=$(call AutoLoad,50,ohci-hcd,1) AUTOLOAD:=$(call AutoLoad,50,ohci-hcd,1)
$(call AddDepends/usb)
endef endef
define KernelPackage/usb-ohci/description define KernelPackage/usb-ohci/description
@ -153,17 +106,9 @@ $(eval $(call KernelPackage,usb2))
define KernelPackage/usb-acm define KernelPackage/usb-acm
TITLE:=Support for modems/isdn controllers TITLE:=Support for modems/isdn controllers
KCONFIG:=CONFIG_USB_ACM KCONFIG:=CONFIG_USB_ACM
$(call AddDepends/usb)
endef
define KernelPackage/usb-acm/2.4
FILES:=$(LINUX_DIR)/drivers/usb/acm.o
AUTOLOAD:=$(call AutoLoad,60,acm)
endef
define KernelPackage/usb-acm/2.6
FILES:=$(LINUX_DIR)/drivers/usb/class/cdc-acm.ko FILES:=$(LINUX_DIR)/drivers/usb/class/cdc-acm.ko
AUTOLOAD:=$(call AutoLoad,60,cdc-acm) AUTOLOAD:=$(call AutoLoad,60,cdc-acm)
$(call AddDepends/usb)
endef endef
define KernelPackage/usb-acm/description define KernelPackage/usb-acm/description
@ -180,16 +125,6 @@ define KernelPackage/usb-audio
CONFIG_SND_USB_AUDIO CONFIG_SND_USB_AUDIO
$(call AddDepends/usb) $(call AddDepends/usb)
$(call AddDepends/sound) $(call AddDepends/sound)
endef
define KernelPackage/usb-audio/2.4
# KCONFIG:=CONFIG_USB_AUDIO
FILES:=$(LINUX_DIR)/drivers/usb/audio.o
AUTOLOAD:=$(call AutoLoad,60,audio)
endef
define KernelPackage/usb-audio/2.6
# KCONFIG:=CONFIG_SND_USB_AUDIO
FILES:= \ FILES:= \
$(LINUX_DIR)/sound/usb/snd-usb-lib.ko \ $(LINUX_DIR)/sound/usb/snd-usb-lib.ko \
$(LINUX_DIR)/sound/usb/snd-usb-audio.ko $(LINUX_DIR)/sound/usb/snd-usb-audio.ko
@ -206,17 +141,9 @@ $(eval $(call KernelPackage,usb-audio))
define KernelPackage/usb-printer define KernelPackage/usb-printer
TITLE:=Support for printers TITLE:=Support for printers
KCONFIG:=CONFIG_USB_PRINTER KCONFIG:=CONFIG_USB_PRINTER
$(call AddDepends/usb)
endef
define KernelPackage/usb-printer/2.4
FILES:=$(LINUX_DIR)/drivers/usb/printer.o
AUTOLOAD:=$(call AutoLoad,60,printer)
endef
define KernelPackage/usb-printer/2.6
FILES:=$(LINUX_DIR)/drivers/usb/class/usblp.ko FILES:=$(LINUX_DIR)/drivers/usb/class/usblp.ko
AUTOLOAD:=$(call AutoLoad,60,usblp) AUTOLOAD:=$(call AutoLoad,60,usblp)
$(call AddDepends/usb)
endef endef
define KernelPackage/usb-printer/description define KernelPackage/usb-printer/description
@ -641,15 +568,8 @@ define KernelPackage/usb-net
TITLE:=Kernel modules for USB-to-Ethernet convertors TITLE:=Kernel modules for USB-to-Ethernet convertors
KCONFIG:=CONFIG_USB_USBNET KCONFIG:=CONFIG_USB_USBNET
AUTOLOAD:=$(call AutoLoad,60,usbnet) AUTOLOAD:=$(call AutoLoad,60,usbnet)
$(call AddDepends/usb)
endef
define KernelPackage/usb-net/2.4
FILES:=$(LINUX_DIR)/drivers/usb/usbnet.$(LINUX_KMOD_SUFFIX)
endef
define KernelPackage/usb-net/2.6
FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/usbnet.$(LINUX_KMOD_SUFFIX) FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/usbnet.$(LINUX_KMOD_SUFFIX)
$(call AddDepends/usb)
endef endef
define KernelPackage/usb-net/description define KernelPackage/usb-net/description

View file

@ -10,7 +10,6 @@ WIRELESS_MENU:=Wireless Drivers
define KernelPackage/lib80211 define KernelPackage/lib80211
SUBMENU:=$(WIRELESS_MENU) SUBMENU:=$(WIRELESS_MENU)
TITLE:=802.11 Networking stack TITLE:=802.11 Networking stack
DEPENDS:=@!LINUX_2_4
KCONFIG:= \ KCONFIG:= \
CONFIG_LIB80211 \ CONFIG_LIB80211 \
CONFIG_LIB80211_CRYPT_WEP \ CONFIG_LIB80211_CRYPT_WEP \

View file

@ -18,12 +18,12 @@ define Package/nvram
SECTION:=utils SECTION:=utils
CATEGORY:=Base system CATEGORY:=Base system
TITLE:=Userspace port of the Broadcom NVRAM manipulation tool TITLE:=Userspace port of the Broadcom NVRAM manipulation tool
DEPENDS:=@TARGET_brcm_2_4||@TARGET_brcm47xx||@TARGET_ar71xx DEPENDS:=@TARGET_brcm47xx||@TARGET_ar71xx
endef endef
define Package/nvram/description define Package/nvram/description
This package contains an utility to manipulate NVRAM on Broadcom based devices. This package contains an utility to manipulate NVRAM on Broadcom based devices.
It works on both brcm-2.4 and bcm47xx (Linux 2.6) without using the kernel api. It works on bcm47xx (Linux 2.6) without using the kernel api.
endef endef
define Build/Prepare define Build/Prepare

View file

@ -15,7 +15,7 @@ include $(INCLUDE_DIR)/package.mk
define KernelPackage/rtc-rv5c386a define KernelPackage/rtc-rv5c386a
SUBMENU:=Other modules SUBMENU:=Other modules
DEPENDS:=@TARGET_brcm_2_4||TARGET_brcm47xx DEPENDS:=@TARGET_brcm47xx
TITLE:=Driver for RTC RV5C386A (used in WL-700gE and WL-HDD) TITLE:=Driver for RTC RV5C386A (used in WL-700gE and WL-HDD)
AUTOLOAD:=$(call AutoLoad,70,rtc) AUTOLOAD:=$(call AutoLoad,70,rtc)
FILES:=$(PKG_BUILD_DIR)/rtc.$(LINUX_KMOD_SUFFIX) FILES:=$(PKG_BUILD_DIR)/rtc.$(LINUX_KMOD_SUFFIX)
@ -26,10 +26,6 @@ define Build/Prepare
$(CP) ./src/* $(PKG_BUILD_DIR)/ $(CP) ./src/* $(PKG_BUILD_DIR)/
endef endef
ifeq ($(BOARD),brcm-2.4)
BUILDFLAGS=-DBCMDRIVER -I$(LINUX_DIR)/arch/mips/bcm947xx/include -DLINUX_2_4
endif
define Build/Compile define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \ $(MAKE) -C "$(LINUX_DIR)" \
CROSS_COMPILE="$(TARGET_CROSS)" \ CROSS_COMPILE="$(TARGET_CROSS)" \

View file

@ -15,7 +15,7 @@ include $(INCLUDE_DIR)/package.mk
define KernelPackage/switch define KernelPackage/switch
SUBMENU:=Other modules SUBMENU:=Other modules
DEPENDS:=@TARGET_brcm_2_4||TARGET_brcm47xx||TARGET_brcm63xx DEPENDS:=@TARGET_brcm47xx||TARGET_brcm63xx
TITLE:=Switch drivers TITLE:=Switch drivers
FILES:= \ FILES:= \
$(PKG_BUILD_DIR)/switch-core.$(LINUX_KMOD_SUFFIX) \ $(PKG_BUILD_DIR)/switch-core.$(LINUX_KMOD_SUFFIX) \
@ -33,15 +33,10 @@ define Build/Prepare
$(CP) ./src/* $(PKG_BUILD_DIR)/ $(CP) ./src/* $(PKG_BUILD_DIR)/
endef endef
ifeq ($(BOARD),brcm-2.4) ifeq ($(BOARD),brcm47xx)
BUILDFLAGS := -DBROADCOM -DBCMDRIVER -I$(LINUX_DIR)/arch/mips/bcm947xx/include
else
ifeq ($(BOARD),brcm47xx)
BUILDFLAGS := -DBROADCOM BUILDFLAGS := -DBROADCOM
endif
endif endif
define Build/Compile define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \ $(MAKE) -C "$(LINUX_DIR)" \
CROSS_COMPILE="$(TARGET_CROSS)" \ CROSS_COMPILE="$(TARGET_CROSS)" \

View file

@ -68,12 +68,7 @@ static struct file_operations switch_proc_fops = {
static ssize_t switch_proc_read(struct file *file, char *buf, size_t count, loff_t *ppos) static ssize_t switch_proc_read(struct file *file, char *buf, size_t count, loff_t *ppos)
{ {
#ifdef LINUX_2_4
struct inode *inode = file->f_dentry->d_inode;
struct proc_dir_entry *dent = inode->u.generic_ip;
#else
struct proc_dir_entry *dent = PDE(file->f_dentry->d_inode); struct proc_dir_entry *dent = PDE(file->f_dentry->d_inode);
#endif
char *page; char *page;
int len = 0; int len = 0;
@ -105,12 +100,7 @@ static ssize_t switch_proc_read(struct file *file, char *buf, size_t count, loff
static ssize_t switch_proc_write(struct file *file, const char *buf, size_t count, void *data) static ssize_t switch_proc_write(struct file *file, const char *buf, size_t count, void *data)
{ {
#ifdef LINUX_2_4
struct inode *inode = file->f_dentry->d_inode;
struct proc_dir_entry *dent = inode->u.generic_ip;
#else
struct proc_dir_entry *dent = PDE(file->f_dentry->d_inode); struct proc_dir_entry *dent = PDE(file->f_dentry->d_inode);
#endif
char *page; char *page;
int ret = -EINVAL; int ret = -EINVAL;

View file

@ -13,10 +13,6 @@
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#endif #endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#define LINUX_2_4
#endif
typedef int (*switch_handler)(void *driver, char *buf, int nr); typedef int (*switch_handler)(void *driver, char *buf, int nr);
typedef struct { typedef struct {

View file

@ -63,12 +63,7 @@
#define SIOCGETCPHYRD (SIOCDEVPRIVATE + 9) #define SIOCGETCPHYRD (SIOCDEVPRIVATE + 9)
#define SIOCSETCPHYWR (SIOCDEVPRIVATE + 10) #define SIOCSETCPHYWR (SIOCDEVPRIVATE + 10)
/* linux 2.4 does not have 'bool' */ /* Only available on brcm47xx */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#define bool int
#endif
/* Only available on brcm-2.4/brcm47xx */
#ifdef BROADCOM #ifdef BROADCOM
extern char *nvram_get(const char *name); extern char *nvram_get(const char *name);
#define getvar(str) (nvram_get(str)?:"") #define getvar(str) (nvram_get(str)?:"")