1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-27 16:43:09 +02:00

remove linux 2.4 support from several packages

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21954 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2010-06-26 20:43:41 +00:00
parent 75bd418e14
commit fef81766d0
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_RELEASE:=1
PKG_SOURCE_URL:=@SF/bridge
ifeq ($(CONFIG_LINUX_2_4),y)
PKG_VERSION:=1.0.6
PKG_MD5SUM:=9b7dc52656f5cbec846a7ba3299f73bd
endif
ifeq ($(CONFIG_LINUX_2_6),y)
PKG_VERSION:=1.4
PKG_MD5SUM:=0182fcac3a2b307113bbec34e5f1c673
endif
PKG_VERSION:=1.4
PKG_MD5SUM:=0182fcac3a2b307113bbec34e5f1c673
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz

View File

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

View File

@ -27,20 +27,12 @@
#include <linux/timer.h>
#include <linux/version.h>
#include <asm/uaccess.h>
#ifndef LINUX_2_4
#include <linux/workqueue.h>
#include <linux/skbuff.h>
#include <linux/netlink.h>
#include <net/sock.h>
extern struct sock *uevent_sock;
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 "diag.h"
@ -179,12 +171,10 @@ static void __init NetCenter_init(void) {
static void __init bcm57xx_init(void) {
int pin = 1 << 2;
#ifndef LINUX_2_4
/* FIXME: switch comes up, but port mappings/vlans not right */
gpio_outen(pin, pin);
gpio_control(pin, 0);
gpio_out(pin, pin);
#endif
}
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)
{
char *s;
@ -1177,43 +1166,6 @@ static void hotplug_button(struct work_struct *work)
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)
{
@ -1228,20 +1180,14 @@ static int fill_event (struct event_t *event)
add_msg(event, buf, 0);
snprintf(buf, 128, "SEEN=%ld", event->seen);
add_msg(event, buf, 0);
#ifndef LINUX_2_4
snprintf(buf, 128, "SEQNUM=%llu", uevent_next_seqnum());
add_msg(event, buf, 0);
#endif
return 0;
}
#ifndef LINUX_2_4
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;
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->name = b->name;
event->action = b->pressed ? "pressed" : "released";
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
INIT_WORK(&event->wq, (void *)(void *)hotplug_button);
#else
INIT_WORK(&event->wq, (void *)(void *)hotplug_button, (void *)event);
#endif
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)
{
#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);
#endif
char *page;
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)
{
#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);
#endif
char *page;
int ret = -EINVAL;

View File

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

View File

@ -1,21 +1,6 @@
menu "Configuration"
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
bool
depends NOMMU

View File

@ -18,14 +18,6 @@ PKG_MD5SUM:=a26ec54e410bb826a387947b10c0fd2c
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
define Package/fuse/Default
@ -57,14 +49,9 @@ define KernelPackage/fuse
$(call Package/fuse/Default)
SUBMENU:=Filesystems
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
FILES:=$(LINUX_DIR)/fs/fuse/fuse.$(LINUX_KMOD_SUFFIX)
VERSION:=$(LINUX_VERSION)-$(LINUX_RELEASE)
endif
AUTOLOAD:=$(call AutoLoad,80,fuse)
endef
@ -97,95 +84,9 @@ CONFIGURE_ARGS += \
--disable-example \
--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
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
@echo "--> Build/InstallDev enter"
mkdir -p $(1)/usr/include

View File

@ -17,20 +17,9 @@ PKG_SOURCE_URL:=http://hostap.epitest.fi/releases/
PKG_MD5SUM:=c7534dc040ab90218257a78488ecd378
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
$(call KernelPackage/hostap/Default/$(KERNEL))
VERSION:=$(LINUX_VERSION)-$(BOARD)-$(PKG_RELEASE)
SUBMENU:=Wireless Drivers
URL:=http://hostap.epitest.fi/
endef
@ -45,26 +34,9 @@ endef
define KernelPackage/hostap
$(call KernelPackage/hostap/Default)
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
endef
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)
FILES:=$(LINUX_DIR)/drivers/net/wireless/hostap/hostap.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,60,hostap)
endef
@ -81,18 +53,9 @@ $(call KernelPackage/hostap/Default)
TITLE:=Host AP driver for PCMCIA adaptors
DEPENDS:=@PCMCIA_SUPPORT +kmod-hostap +kmod-pcmcia-core
KCONFIG:=CONFIG_HOSTAP_CS
FILES:=$(LINUX_DIR)/drivers/net/wireless/hostap/hostap_cs.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,60,hostap_cs)
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
$(call KernelPackage/hostap/Default/description)
@ -105,21 +68,10 @@ $(call KernelPackage/hostap/Default)
TITLE:=Host AP driver for PCI adaptors
DEPENDS:=@PCI_SUPPORT +kmod-hostap
KCONFIG:=CONFIG_HOSTAP_PCI
FILES:=$(LINUX_DIR)/drivers/net/wireless/hostap/hostap_pci.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,60,hostap_pci)
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
$(call KernelPackage/hostap/Default/description)
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
DEPENDS:=@PCI_SUPPORT +kmod-hostap
KCONFIG:=CONFIG_HOSTAP_PLX
FILES:=$(LINUX_DIR)/drivers/net/wireless/hostap/hostap_plx.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,60,hostap_plx)
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
$(call KernelPackage/hostap/Default/description)
This package contains the Host AP driver for Prism2/2.5/3 in PLX9052
@ -153,25 +94,17 @@ $(call KernelPackage/hostap/Default/description)
endef
ifeq ($(KERNEL),2.4)
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
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
endef
define Build/Configure
endef
define Build/Configure
define Build/Compile
endef
endif
endef
define Build/Compile
endef
define KernelPackage/hostap/install
$(INSTALL_DIR) $(1)/lib/wifi

View File

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

View File

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

View File

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

View File

@ -7,11 +7,7 @@
OTHER_MENU:=Other modules
# XXX: added a workaround for watchdog path changes
ifeq ($(KERNEL),2.4)
WATCHDOG_DIR=char
endif
WATCHDOG_DIR?=watchdog
WATCHDOG_DIR:=watchdog
define KernelPackage/bluetooth
@ -39,37 +35,6 @@ define KernelPackage/bluetooth
$(call AddDepends/crc16)
$(call AddDepends/hid)
$(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:= \
$(LINUX_DIR)/net/bluetooth/bluetooth.$(LINUX_KMOD_SUFFIX) \
$(LINUX_DIR)/net/bluetooth/l2cap.$(LINUX_KMOD_SUFFIX) \
@ -286,22 +251,14 @@ define KernelPackage/input-core
TITLE:=Input device core
KCONFIG:=CONFIG_INPUT
$(call SetDepends/input)
FILES:=$(LINUX_DIR)/drivers/input/input-core.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,19,input-core)
endef
define KernelPackage/input-core/description
Kernel modules for support of input device
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))
@ -521,7 +478,7 @@ $(eval $(call KernelPackage,ledtrig-netdev))
define KernelPackage/lp
SUBMENU:=$(OTHER_MENU)
TITLE:=Parallel port and line printer support
DEPENDS:=@LINUX_2_4
DEPENDS:=@BROKEN
KCONFIG:= \
CONFIG_PARPORT \
CONFIG_PRINTER \
@ -533,19 +490,6 @@ define KernelPackage/lp
AUTOLOAD:=$(call AutoLoad,50,parport lp)
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))

View File

@ -7,11 +7,7 @@
USB_MENU:=USB Support
ifneq ($(CONFIG_LINUX_2_4),)
USBNET_DIR:=usb/net
endif
USBNET_DIR?=net/usb
USBNET_DIR:=net/usb
USBHID_DIR?=hid/usbhid
USBINPUT_DIR?=input/misc
@ -20,15 +16,8 @@ define KernelPackage/usb-core
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
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)
AUTOLOAD:=$(call AutoLoad,20,usbcore,1)
endef
define KernelPackage/usb-core/description
@ -49,19 +38,9 @@ define KernelPackage/usb-uhci
KCONFIG:= \
CONFIG_USB_UHCI_ALT \
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
AUTOLOAD:=$(call AutoLoad,50,uhci-hcd,1)
$(call AddDepends/usb)
endef
define KernelPackage/usb-uhci/description
@ -71,41 +50,15 @@ endef
$(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
TITLE:=Support for OHCI controllers
KCONFIG:= \
CONFIG_USB_OHCI \
CONFIG_USB_OHCI_HCD \
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
AUTOLOAD:=$(call AutoLoad,50,ohci-hcd,1)
$(call AddDepends/usb)
endef
define KernelPackage/usb-ohci/description
@ -153,17 +106,9 @@ $(eval $(call KernelPackage,usb2))
define KernelPackage/usb-acm
TITLE:=Support for modems/isdn controllers
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
AUTOLOAD:=$(call AutoLoad,60,cdc-acm)
$(call AddDepends/usb)
endef
define KernelPackage/usb-acm/description
@ -180,16 +125,6 @@ define KernelPackage/usb-audio
CONFIG_SND_USB_AUDIO
$(call AddDepends/usb)
$(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:= \
$(LINUX_DIR)/sound/usb/snd-usb-lib.ko \
$(LINUX_DIR)/sound/usb/snd-usb-audio.ko
@ -206,17 +141,9 @@ $(eval $(call KernelPackage,usb-audio))
define KernelPackage/usb-printer
TITLE:=Support for printers
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
AUTOLOAD:=$(call AutoLoad,60,usblp)
$(call AddDepends/usb)
endef
define KernelPackage/usb-printer/description
@ -641,15 +568,8 @@ define KernelPackage/usb-net
TITLE:=Kernel modules for USB-to-Ethernet convertors
KCONFIG:=CONFIG_USB_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)
$(call AddDepends/usb)
endef
define KernelPackage/usb-net/description

View File

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

View File

@ -18,12 +18,12 @@ define Package/nvram
SECTION:=utils
CATEGORY:=Base system
TITLE:=Userspace port of the Broadcom NVRAM manipulation tool
DEPENDS:=@TARGET_brcm_2_4||@TARGET_brcm47xx||@TARGET_ar71xx
DEPENDS:=@TARGET_brcm47xx||@TARGET_ar71xx
endef
define Package/nvram/description
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
define Build/Prepare

View File

@ -15,7 +15,7 @@ include $(INCLUDE_DIR)/package.mk
define KernelPackage/rtc-rv5c386a
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)
AUTOLOAD:=$(call AutoLoad,70,rtc)
FILES:=$(PKG_BUILD_DIR)/rtc.$(LINUX_KMOD_SUFFIX)
@ -26,10 +26,6 @@ define Build/Prepare
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
ifeq ($(BOARD),brcm-2.4)
BUILDFLAGS=-DBCMDRIVER -I$(LINUX_DIR)/arch/mips/bcm947xx/include -DLINUX_2_4
endif
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
CROSS_COMPILE="$(TARGET_CROSS)" \

View File

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

View File

@ -13,10 +13,6 @@
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#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 struct {

View File

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