2006-06-27 03:35:46 +03:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2007-03-14 03:19:24 +02:00
|
|
|
# $Id$
|
2006-05-31 19:01:46 +03:00
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
2006-06-21 05:32:39 +03:00
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
2006-05-31 19:01:46 +03:00
|
|
|
|
2006-06-18 21:30:40 +03:00
|
|
|
PKG_NAME:=kmod-switch
|
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
2006-06-21 05:32:39 +03:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2006-05-31 19:01:46 +03:00
|
|
|
|
2007-01-20 04:01:53 +02:00
|
|
|
define KernelPackage/switch
|
|
|
|
SUBMENU:=Other modules
|
2007-09-06 19:27:37 +03:00
|
|
|
DEPENDS:=@TARGET_BRCM_2_4||TARGET_BRCM47XX
|
2006-09-23 22:23:09 +03:00
|
|
|
TITLE:=Switch drivers
|
2007-01-20 04:01:53 +02:00
|
|
|
FILES:= \
|
|
|
|
$(PKG_BUILD_DIR)/switch-core.$(LINUX_KMOD_SUFFIX) \
|
|
|
|
$(PKG_BUILD_DIR)/switch-adm.$(LINUX_KMOD_SUFFIX) \
|
|
|
|
$(PKG_BUILD_DIR)/switch-robo.$(LINUX_KMOD_SUFFIX)
|
|
|
|
AUTOLOAD:=$(call AutoLoad,20,switch-core switch-robo switch-adm)
|
2006-06-18 21:30:40 +03:00
|
|
|
endef
|
2006-05-31 19:01:46 +03:00
|
|
|
|
2007-09-07 11:34:51 +03:00
|
|
|
define KernelPackage/switch/description
|
|
|
|
This package contains switch drivers for ADM6996L and BCM53XX RoboSwitch.
|
|
|
|
endef
|
|
|
|
|
2006-05-31 19:01:46 +03:00
|
|
|
define Build/Prepare
|
|
|
|
mkdir -p $(PKG_BUILD_DIR)
|
|
|
|
$(CP) ./src/* $(PKG_BUILD_DIR)/
|
|
|
|
endef
|
|
|
|
|
2007-03-14 03:19:24 +02:00
|
|
|
ifeq ($(BOARD),brcm)
|
2007-03-14 15:42:21 +02:00
|
|
|
BUILDFLAGS := -DBROADCOM -DBCMDRIVER -I$(LINUX_DIR)/arch/mips/bcm947xx/include
|
2007-03-14 03:19:24 +02:00
|
|
|
else
|
|
|
|
ifeq ($(BOARD),brcm47xx)
|
|
|
|
BUILDFLAGS := -DBROADCOM
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2006-05-31 19:01:46 +03:00
|
|
|
define Build/Compile
|
|
|
|
$(MAKE) -C "$(LINUX_DIR)" \
|
|
|
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
|
|
|
ARCH="$(LINUX_KARCH)" \
|
|
|
|
SUBDIRS="$(PKG_BUILD_DIR)" \
|
2007-03-14 03:19:24 +02:00
|
|
|
EXTRA_CFLAGS="$(BUILDFLAGS)" \
|
2006-05-31 19:01:46 +03:00
|
|
|
modules
|
|
|
|
endef
|
|
|
|
|
2007-01-20 04:01:53 +02:00
|
|
|
define KernelPackage/switch/install
|
2006-11-23 02:29:07 +02:00
|
|
|
$(INSTALL_DIR) $(1)/lib/network/
|
|
|
|
$(INSTALL_BIN) ./files/switch.sh $(1)/lib/network/
|
2006-05-31 19:01:46 +03:00
|
|
|
endef
|
|
|
|
|
2007-01-20 04:01:53 +02:00
|
|
|
$(eval $(call KernelPackage,switch))
|