Makefile 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #
  2. # Copyright (C) 2016 Jiang Yutang <jiangyutang1978@gmail.com>
  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)/image.mk
  9. PKG_NAME:=fman-ucode
  10. PKG_VERSION:=fsl-sdk-v2.0
  11. PKG_RELEASE:=1
  12. PKG_SOURCE_PROTO:=git
  13. PKG_MIRROR_HASH:=209c60e4efaa3ce9c9a954266a7210fa0047a2de47ce00a412aa0318d94d0d88
  14. PKG_SOURCE_URL:=https://github.com/fsl-jyt/fm-ucode.git
  15. PKG_SOURCE_VERSION:=b19c645821941493fbef32e616b5a16404259976
  16. PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  17. PKG_LICENSE:=GPL-2.0 GPL-2.0+
  18. PKG_LICENSE_FILES:=Licenses/README
  19. PKG_FLAGS:=nonshared
  20. include $(INCLUDE_DIR)/package.mk
  21. define fman/Default
  22. TITLE:=
  23. CONFIG:=
  24. endef
  25. define fman/ls1043ardb
  26. TITLE=FMAN UCODE $(PKG_NAME)-$(PKG_VERSION) for NXP ls1043ardb 64b/32b Dev Board
  27. CONFIG=fsl_fman_ucode_ls1043_r1.0_108_4_5.bin
  28. endef
  29. define fman/ls1046ardb
  30. TITLE=FMAN UCODE $(PKG_NAME)-$(PKG_VERSION) for NXP ls1046ardb 64b/32b Dev Board
  31. CONFIG=fsl_fman_ucode_t2080_r1.1_106_4_18.bin
  32. endef
  33. FMANS := \
  34. ls1043ardb \
  35. ls1046ardb
  36. define Package/fman/template
  37. define Package/fman-layerscape-$(1)
  38. SECTION:=firmware
  39. CATEGORY:=Firmware
  40. DEPENDS:=@TARGET_layerscape
  41. TITLE:=$(2)
  42. URL:=http://git.freescale.com/git/cgit.cgi/ppc/sdk/fm-ucode.git
  43. VARIANT:=$(1)
  44. MAINTAINER:=Jiang Yutang <jiangyutang1978@gmail.com>
  45. endef
  46. endef
  47. define BuildFMANPackage
  48. $(eval $(fman/Default))
  49. $(eval $(fman/$(1)))
  50. $(call Package/fman/template,$(1),$(TITLE))
  51. endef
  52. ifdef BUILD_VARIANT
  53. $(eval $(call fman/$(BUILD_VARIANT)))
  54. FMAN_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
  55. endif
  56. define Build/Compile
  57. endef
  58. define Package/fman/install/default
  59. $(CP) $(PKG_BUILD_DIR)/$(FMAN_CONFIG) $(KDIR)/$(1)-fman.bin
  60. endef
  61. define Package/fman/install/template
  62. define Package/fman-layerscape-$(1)/install
  63. $(call Package/fman/install/default,$(2))
  64. endef
  65. endef
  66. $(foreach f,$(FMANS), \
  67. $(eval $(call Package/fman/install/template,$(f),$(f))) \
  68. )
  69. $(foreach f,$(FMANS), \
  70. $(eval $(call BuildFMANPackage,$(f))) \
  71. $(eval $(call BuildPackage,fman-layerscape-$(f))) \
  72. )