2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
10 include $(INCLUDE_DIR
)/kernel.mk
15 PKG_BUILD_DIR
:=$(KERNEL_BUILD_DIR
)/$(PKG_NAME
)
17 include $(INCLUDE_DIR
)/package.mk
19 define Package
/kmod-switch
21 CATEGORY
:=Kernel drivers
22 DEPENDS
:=@LINUX_2_6_BRCM||LINUX_2_4_BRCM
25 This package contains switch drivers for ADM6996L and BCM53XX RoboSwitch.
26 VERSION
:=$(LINUX_VERSION
)-$(BOARD
)-$(PKG_RELEASE
)
30 mkdir
-p
$(PKG_BUILD_DIR
)
31 $(CP
) .
/src
/* $(PKG_BUILD_DIR
)/
35 $(MAKE
) -C
"$(LINUX_DIR)" \
36 CROSS_COMPILE
="$(TARGET_CROSS)" \
37 ARCH
="$(LINUX_KARCH)" \
38 SUBDIRS
="$(PKG_BUILD_DIR)" \
39 EXTRA_CFLAGS
="-DBCMGPIO2" \
43 define Package
/kmod-switch
/install
44 $(INSTALL_DIR
) $(1)/lib
/modules
/$(LINUX_VERSION
)
45 $(CP
) $(PKG_BUILD_DIR
)/*.
$(LINUX_KMOD_SUFFIX
) \
46 $(1)/lib
/modules
/$(LINUX_VERSION
)
47 $(INSTALL_DIR
) $(1)/lib
/network
/
48 $(INSTALL_BIN
) .
/files
/switch.sh
$(1)/lib
/network
/
49 $(INSTALL_DIR
) $(1)/etc
/modules.d
/
50 printf
'switch-core\nswitch-robo\nswitch-adm\n' > $(1)/etc
/modules.d
/20-switch
53 $(eval
$(call BuildPackage
,kmod-switch
))