Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #
  2. # Copyright (C) 2008-2009 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=broadcom-57xx
  10. PKG_RELEASE:=2
  11. include $(INCLUDE_DIR)/package.mk
  12. define KernelPackage/brcm-57xx
  13. SUBMENU:=Network Devices
  14. DEPENDS:=@TARGET_brcm_2_4 +kmod-switch
  15. TITLE:=Broadcom 57xx ethernet support
  16. FILES:=$(PKG_BUILD_DIR)/bcm57xx.$(LINUX_KMOD_SUFFIX)
  17. AUTOLOAD:=$(call AutoLoad,30,bcm57xx)
  18. endef
  19. define Build/Prepare
  20. mkdir -p $(PKG_BUILD_DIR)
  21. $(CP) ./src/* $(PKG_BUILD_DIR)/
  22. endef
  23. ifeq ($(BOARD),brcm-2.4)
  24. BUILDFLAGS := \
  25. -DBCMDRIVER -I$(LINUX_DIR)/arch/mips/bcm947xx/include $(TARGET_CPPFLAGS) \
  26. -DDBG=0 -DBCM_PROC_FS=1 -DT3_JUMBO_RCV_RCB_ENTRY_COUNT=256 -DNICE_SUPPORT \
  27. -DPCIX_TARGET_WORKAROUND=1 -DINCLUDE_TBI_SUPPORT=1 -DINCLUDE_5701_AX_FIX=1
  28. endif
  29. define Build/Compile
  30. $(MAKE) -C "$(LINUX_DIR)" \
  31. CROSS_COMPILE="$(TARGET_CROSS)" \
  32. ARCH="$(LINUX_KARCH)" \
  33. SUBDIRS="$(PKG_BUILD_DIR)" \
  34. EXTRA_CFLAGS="$(BUILDFLAGS)" \
  35. modules
  36. endef
  37. define KernelPackage/brcm-57xx/install
  38. $(call Package/brcm-57xx/install/Default,$(1))
  39. #$(INSTALL_DIR) $(1)/etc/modules.d
  40. #echo "bcm57xx activate_gpio=1" > $(1)/etc/modules.d/30-bcm57xx
  41. endef
  42. $(eval $(call KernelPackage,brcm-57xx))