2006-06-27 00:35:46 +00:00
|
|
|
#
|
2012-03-13 21:15:41 +00:00
|
|
|
# Copyright (C) 2006-2012 OpenWrt.org
|
2006-06-27 00:35:46 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2006-05-31 16:01:46 +00:00
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
2006-06-21 02:32:39 +00:00
|
|
|
include $(INCLUDE_DIR)/kernel.mk
|
2006-05-31 16:01:46 +00:00
|
|
|
|
2006-06-18 18:30:40 +00:00
|
|
|
PKG_NAME:=kmod-switch
|
2013-01-03 01:58:01 +00:00
|
|
|
PKG_RELEASE:=6
|
2006-06-18 18:30:40 +00:00
|
|
|
|
2006-06-21 02:32:39 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2006-05-31 16:01:46 +00:00
|
|
|
|
2007-01-20 02:01:53 +00:00
|
|
|
define KernelPackage/switch
|
|
|
|
SUBMENU:=Other modules
|
2013-07-14 13:44:45 +00:00
|
|
|
DEPENDS:=@TARGET_brcm47xx @!LINUX_3_10
|
2006-09-23 19:23:09 +00:00
|
|
|
TITLE:=Switch drivers
|
2007-01-20 02:01:53 +00:00
|
|
|
FILES:= \
|
2010-07-12 14:06:13 +00:00
|
|
|
$(PKG_BUILD_DIR)/switch-core.ko \
|
|
|
|
$(PKG_BUILD_DIR)/switch-adm.ko \
|
|
|
|
$(PKG_BUILD_DIR)/switch-robo.ko
|
2013-06-21 16:53:15 +00:00
|
|
|
AUTOLOAD:=$(call AutoLoad,20,switch-core switch-robo switch-adm,1)
|
2006-06-18 18:30:40 +00:00
|
|
|
endef
|
2006-05-31 16:01:46 +00:00
|
|
|
|
2007-09-07 08:34:51 +00:00
|
|
|
define KernelPackage/switch/description
|
|
|
|
This package contains switch drivers for ADM6996L and BCM53XX RoboSwitch.
|
|
|
|
endef
|
|
|
|
|
2006-05-31 16:01:46 +00:00
|
|
|
define Build/Prepare
|
|
|
|
mkdir -p $(PKG_BUILD_DIR)
|
|
|
|
$(CP) ./src/* $(PKG_BUILD_DIR)/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
$(MAKE) -C "$(LINUX_DIR)" \
|
|
|
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
|
|
|
ARCH="$(LINUX_KARCH)" \
|
|
|
|
SUBDIRS="$(PKG_BUILD_DIR)" \
|
2007-03-14 01:19:24 +00:00
|
|
|
EXTRA_CFLAGS="$(BUILDFLAGS)" \
|
2006-05-31 16:01:46 +00:00
|
|
|
modules
|
|
|
|
endef
|
2008-01-06 19:28:26 +00:00
|
|
|
|
|
|
|
define Build/InstallDev
|
|
|
|
mkdir -p $(1)/usr/include
|
|
|
|
$(CP) ./src/switch-core.h $(1)/usr/include/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/UninstallDev
|
|
|
|
rm -f $(1)/usr/include/switch-core.h
|
|
|
|
endef
|
|
|
|
|
2007-01-20 02:01:53 +00:00
|
|
|
define KernelPackage/switch/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/lib/network/
|
|
|
|
$(INSTALL_BIN) ./files/switch.sh $(1)/lib/network/
|
2006-05-31 16:01:46 +00:00
|
|
|
endef
|
|
|
|
|
2007-01-20 02:01:53 +00:00
|
|
|
$(eval $(call KernelPackage,switch))
|