Makefile 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. #
  2. # Copyright (C) 2010 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:=ep80579-drivers
  10. PKG_VERSION:=1.0.34
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=Embedded.L.1.0.34.ADI.R100.tar.gz
  13. PKG_SOURCE_URL:=ftp://ftp.adiengineering.com/Archive/OcracokeIsland/Drivers/Linux/1.0.34/
  14. PKG_MD5SUM:=61df9778f8c1f919257d2f48a0bcb000
  15. PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  16. include $(INCLUDE_DIR)/package.mk
  17. define KernelPackage/ep80579-drivers/Default
  18. DEPENDS:=@TARGET_x86_ep80579
  19. endef
  20. define KernelPackage/ep80579-eth
  21. $(call KernelPackage/ep80579-drivers/Default)
  22. SUBMENU:=Network Devices
  23. TITLE:=Intel EP80579 ethernet driver
  24. FILES:= \
  25. $(PKG_BUILD_DIR)/Embedded/src/GbE/gcu.ko \
  26. $(PKG_BUILD_DIR)/Embedded/src/GbE/iegbe.ko
  27. AUTOLOAD:=$(call AutoLoad,40,gcu iegbe)
  28. endef
  29. define KernelPackage/ep80579-misc
  30. $(call KernelPackage/ep80579-drivers/Default)
  31. SUBMENU:=Other modules
  32. TITLE:=Misc. Intel EP80579 drivers (DMA,, gpio)
  33. FILES:= \
  34. $(PKG_BUILD_DIR)/Embedded/src/EDMA/dma.ko \
  35. $(PKG_BUILD_DIR)/Embedded/src/GPIO/gpio.ko
  36. AUTOLOAD:=$(call AutoLoad,40,gpio dma)
  37. endef
  38. define KernelPackage/ep80579-can
  39. $(call KernelPackage/ep80579-drivers/Default)
  40. SUBMENU:=Other modules
  41. TITLE:=Intel EP80579 CAN driver
  42. FILES:= \
  43. $(PKG_BUILD_DIR)/Embedded/src/1588/timesync.ko \
  44. $(PKG_BUILD_DIR)/Embedded/src/CAN/can.ko
  45. AUTOLOAD:=$(call AutoLoad,40,timesync can)
  46. endef
  47. define Build/Prepare
  48. rm -rf $(PKG_BUILD_DIR)
  49. mkdir -p $(PKG_BUILD_DIR)
  50. tar xzvf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR)/
  51. $(Build/Patch)
  52. endef
  53. define Build/Compile/Subdir
  54. $(MAKE) -C "$(LINUX_DIR)" \
  55. KSRC="$(LINUX_DIR)" \
  56. KOBJ="$(LINUX_DIR)" \
  57. ENV_DIR=$(PKG_BUILD_DIR)/Embedded \
  58. SUBDIRS="$(PKG_BUILD_DIR)/Embedded/src/$(1)" \
  59. CROSS_COMPILE="$(TARGET_CROSS)" \
  60. ARCHIVER="$(TARGET_CROSS)ar" \
  61. COMPILER="$(TARGET_CC)" \
  62. LINKER="$(TARGET_CROSS)ld" \
  63. ARCH="$(LINUX_KARCH)"
  64. endef
  65. define Build/Compile
  66. $(call Build/Compile/Subdir,GbE)
  67. $(call Build/Compile/Subdir,CAN)
  68. $(call Build/Compile/Subdir,EDMA)
  69. $(call Build/Compile/Subdir,GPIO)
  70. $(call Build/Compile/Subdir,WDT)
  71. $(call Build/Compile/Subdir,1588)
  72. endef
  73. define KernelPackage/ep80579-eth/install
  74. endef
  75. $(eval $(call KernelPackage,ep80579-can))
  76. $(eval $(call KernelPackage,ep80579-eth))
  77. $(eval $(call KernelPackage,ep80579-misc))