Makefile 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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:=rcw
  10. PKG_VERSION:=v1.0
  11. PKG_RELEASE:=1
  12. PKG_SOURCE_PROTO:=git
  13. PKG_MIRROR_HASH:=8082979dbdef57e36a3096986aa426ef678c152403eb1dbd132da28f01490b6d
  14. PKG_SOURCE_URL:=https://github.com/fsl-jyt/rcw.git
  15. PKG_SOURCE_VERSION:=17e09e19bd5cf94e5ebc84916b4607743c29723e
  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 rcw/Default
  22. TITLE:=
  23. CONFIG:=
  24. endef
  25. define rcw/ls1043ardb
  26. TITLE=RCW binary $(PKG_NAME)-$(PKG_VERSION) for NXP ls1043ardb 64b/32b Dev Board
  27. CONFIG=ls1043ardb-rcw.bin
  28. endef
  29. define rcw/ls1046ardb
  30. TITLE=RCW binary $(PKG_NAME)-$(PKG_VERSION) for NXP ls1046ardb 64b/32b Dev Board
  31. CONFIG=ls1046ardb-rcw.bin
  32. endef
  33. define rcw/ls1012ardb
  34. TITLE=RCW binary $(PKG_NAME)-$(PKG_VERSION) for NXP ls1012ardb 64b/32b Dev Board
  35. CONFIG=ls1012ardb-rcw.bin
  36. endef
  37. RCWS := \
  38. ls1043ardb \
  39. ls1046ardb \
  40. ls1012ardb
  41. define Package/rcw/template
  42. define Package/rcw-layerscape-$(1)
  43. SECTION:=firmware
  44. CATEGORY:=Firmware
  45. DEPENDS:= @TARGET_layerscape
  46. TITLE:=$(2)
  47. URL:=http://git.freescale.com/git/cgit.cgi/ppc/sdk/rcw.git
  48. VARIANT:=$(1)
  49. MAINTAINER:=Jiang Yutang <jiangyutang1978@gmail.com>
  50. endef
  51. endef
  52. define BuildRCWPackage
  53. $(eval $(rcw/Default))
  54. $(eval $(rcw/$(1)))
  55. $(call Package/rcw/template,$(1),$(TITLE))
  56. endef
  57. ifdef BUILD_VARIANT
  58. $(eval $(call rcw/$(BUILD_VARIANT)))
  59. RCW_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
  60. endif
  61. define Build/Configure
  62. endef
  63. define Build/Compile
  64. endef
  65. define Package/rcw/install/default
  66. $(CP) $(PKG_BUILD_DIR)/$(RCW_CONFIG) $(KDIR)/$(1)-rcw.bin
  67. endef
  68. define Package/rcw/install/template
  69. define Package/rcw-layerscape-$(1)/install
  70. $(call Package/rcw/install/default,$(2))
  71. endef
  72. endef
  73. $(foreach r,$(RCWS), \
  74. $(eval $(call Package/rcw/install/template,$(r),$(r))) \
  75. )
  76. $(foreach r,$(RCWS), \
  77. $(eval $(call BuildRCWPackage,$(r))) \
  78. $(eval $(call BuildPackage,rcw-layerscape-$(r))) \
  79. )