Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #
  2. # Copyright (C) 2007 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. PKG_NAME:=ixp4xx-microcode
  9. PKG_VERSION:=2.4
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=IPL_ixp400NpeLibraryWithCrypto-2_4.zip
  12. PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
  13. PKG_MD5SUM:=dd5f6482e625ecb334469958bcd54b37
  14. include $(INCLUDE_DIR)/package.mk
  15. define Package/ixp4xx-microcode
  16. SECTION:=net
  17. CATEGORY:=Network
  18. TITLE:=Microcode for the IXP4xx network engines
  19. DEPENDS:=@TARGET_ixp4xx
  20. endef
  21. define Package/ixp4xx-microcode/description
  22. This package contains the microcode needed to use the network engines in IXP4xx CPUs
  23. endef
  24. define Build/Prepare
  25. rm -rf $(PKG_BUILD_DIR)
  26. mkdir -p $(PKG_BUILD_DIR)
  27. unzip -d $(PKG_BUILD_DIR)/ $(DL_DIR)/$(PKG_SOURCE)
  28. mv $(PKG_BUILD_DIR)/ixp400_xscale_sw/src/npeDl/IxNpeMicrocode.c $(PKG_BUILD_DIR)/
  29. rm -rf $(PKG_BUILD_DIR)/ixp400_xscale_sw
  30. $(CP) ./src/* $(PKG_BUILD_DIR)/
  31. endef
  32. define Build/Compile
  33. (cd $(PKG_BUILD_DIR); \
  34. $(HOSTCC) -Wall -I$(STAGING_DIR_HOST)/include IxNpeMicrocode.c -o IxNpeMicrocode; \
  35. ./IxNpeMicrocode -be \
  36. )
  37. endef
  38. define Package/ixp4xx-microcode/install
  39. $(INSTALL_DIR) $(1)/lib/firmware
  40. $(INSTALL_DIR) $(1)/usr/share/doc
  41. $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-A $(1)/lib/firmware/
  42. $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-A-HSS $(1)/lib/firmware/
  43. $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-B $(1)/lib/firmware/
  44. $(INSTALL_BIN) $(PKG_BUILD_DIR)/NPE-C $(1)/lib/firmware/
  45. $(INSTALL_DATA) $(PKG_BUILD_DIR)/LICENSE.IPL $(1)/usr/share/doc/
  46. endef
  47. $(eval $(call BuildPackage,ixp4xx-microcode))