Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. PKG_NAME:=ppfe
  9. PKG_VERSION:=v1.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_PROTO:=git
  12. PKG_MIRROR_HASH:=645d9aaaaa39ac1fa50cf805f1866feb5f717b34cb110c80e3f45303ea6d7259
  13. PKG_SOURCE_URL:=https://github.com/fsl-jyt/ppfe.git
  14. PKG_SOURCE_VERSION:=b9bb5cc690c0aab2592eb9d443ef55cc9dff8557
  15. PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  16. PKG_LICENSE:=GPL-2.0 GPL-2.0+
  17. PKG_LICENSE_FILES:=Licenses/README
  18. PKG_FLAGS:=nonshared
  19. include $(INCLUDE_DIR)/package.mk
  20. define ppfe/Default
  21. TITLE:=
  22. CONFIG:=
  23. endef
  24. define ppfe/ls1012ardb
  25. TITLE:=PPFE firmware $(PKG_NAME)-$(PKG_VERSION) for NXP ls1012a Dev Board\
  26. (must enable CONFIG_NO_STRIP=y for avoid firmware be broke)
  27. CONFIG:=ls1012a/Freescale-Binary-EULA ls1012a/ppfe_class_ls1012a.elf ls1012a/ppfe_tmu_ls1012a.elf
  28. endef
  29. PPFES := \
  30. ls1012ardb
  31. define Package/ppfe/template
  32. define Package/ppfe-$(1)
  33. SECTION:=firmware
  34. CATEGORY:=Firmware
  35. DEPENDS:=@TARGET_layerscape
  36. TITLE:=$(2)
  37. URL:=https://github.com/fsl-jyt/ppfe.git
  38. VARIANT:=$(1)
  39. MAINTAINER:=Jiang Yutang <jiangyutang1978@gmail.com>
  40. endef
  41. endef
  42. define BuildPPFEPackage
  43. $(eval $(ppfe/Default))
  44. $(eval $(ppfe/$(1)))
  45. $(call Package/ppfe/template,$(1),$(TITLE))
  46. endef
  47. ifdef BUILD_VARIANT
  48. $(eval $(call ppfe/$(BUILD_VARIANT)))
  49. PPFE_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
  50. endif
  51. define Build/Compile
  52. endef
  53. define Package/ppfe/install/default
  54. $(INSTALL_DIR) $(1)/lib/firmware
  55. $(foreach i,$(PPFE_CONFIG), \
  56. $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(i) $(1)/lib/firmware/ ;\
  57. )
  58. endef
  59. define Package/ppfe/install/template
  60. define Package/ppfe-$(1)/install
  61. $(call Package/ppfe/install/default,$$(1),$(2))
  62. endef
  63. endef
  64. $(foreach p,$(PPFES), \
  65. $(eval $(call Package/ppfe/install/template,$(p),$(p))) \
  66. )
  67. $(foreach p,$(PPFES), \
  68. $(eval $(call BuildPPFEPackage,$(p))) \
  69. $(eval $(call BuildPackage,ppfe-$(p))) \
  70. )