Makefile 1.6 KB

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