Makefile.plc-utils 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. # ====================================================================
  2. #
  3. # Copyright (C) 2013 Qualcomm Atheros, Inc.
  4. #
  5. # Permission to use, copy, modify, and/or distribute this software
  6. # for any purpose with or without fee is hereby granted, provided
  7. # that the above copyright notice and this permission notice appear
  8. # in all copies.
  9. #
  10. # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. # WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. # WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
  13. # THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
  14. # CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  15. # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
  16. # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  17. # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  18. #
  19. # --------------------------------------------------------------------
  20. include $(TOPDIR)/rules.mk
  21. # ====================================================================
  22. #
  23. # --------------------------------------------------------------------
  24. PKG_NAME:=plc-utils
  25. PKG_VERSION:=2.1.5
  26. PKG_RELEASE:=6b4b5543cc2c961178260695f7a49f7a50308f36
  27. # ====================================================================
  28. #
  29. # --------------------------------------------------------------------
  30. PKG_SOURCE_PROTO:=git
  31. PKG_SOURCE_URL:=git://github.qualcomm.com/cmaier/plc-utils.git
  32. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  33. PKG_SOURCE_VERSION:=$(PKG_RELEASE)
  34. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  35. # ====================================================================
  36. #
  37. # --------------------------------------------------------------------
  38. # PKG_BUILD_PARALLEL:=1
  39. # ====================================================================
  40. #
  41. # --------------------------------------------------------------------
  42. include $(INCLUDE_DIR)/package.mk
  43. # ====================================================================
  44. #
  45. # --------------------------------------------------------------------
  46. define Package/plc-utils/default
  47. SECTION:=utils
  48. CATEGORY:=Utilities
  49. TITLE:=Qualcomm Atheros Powerline Communication utilities
  50. URL:=https://github.qualcomm.com/cmaier/plc-utils/blob/master/README
  51. MAINTAINER:=Qualcomm Atheros, Ocala FL USA
  52. endef
  53. # ====================================================================
  54. #
  55. # --------------------------------------------------------------------
  56. include $(INCLUDE_DIR)/package.mk
  57. # ====================================================================
  58. #
  59. # --------------------------------------------------------------------
  60. define Package/plc-utils
  61. $(call Package/plc-utils/default)
  62. TITLE:=Qualcomm Atheros Powerline Toolkit
  63. MENU:=1
  64. endef
  65. # ====================================================================
  66. #
  67. # --------------------------------------------------------------------
  68. define Package/plc-utils/description
  69. This package contains the PLC toolkit.
  70. It can be used to control PLC devices over the network.
  71. endef
  72. # ====================================================================
  73. #
  74. # --------------------------------------------------------------------
  75. define Build/Compile
  76. $(TARGET_CONFIG_OPTS) $(MAKE) -C $(PKG_BUILD_DIR) CROSS=$(TARGET_CROSS)
  77. endef
  78. # ====================================================================
  79. #
  80. # --------------------------------------------------------------------
  81. define Manager
  82. define Package/plc-utils-$(2)
  83. $(call Package/plc-utils/default)
  84. TITLE:=$(3)
  85. DEPENDS+=plc-utils
  86. endef
  87. define Package/plc-utils-$(2)/description
  88. $(4).
  89. endef
  90. define Package/plc-utils-$(2)/install
  91. $(INSTALL_DIR) $$(1)/usr/bin
  92. $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(1)/$(2) $$(1)/usr/bin
  93. endef
  94. $$(eval $$(call BuildPackage,plc-utils-$(2)))
  95. endef
  96. # ===
  97. # Call a package/program handler;
  98. # ---
  99. $(eval $(call Manager,ether,efsu,'Ethernet Frame Send Utility','Used to send Ethernet frames. Ethernet frames can be defined using a text editor.'))
  100. $(eval $(call Manager,key,hpavkey,'HomePlugAV Key Generator','Used to generate DAK, NMK and NID keys from Homeplug AV passwords entered on the command line.'))
  101. $(eval $(call Manager,key,hpavkeys,'HomePlugAV Key Generator','Used to generate DAK, NMK or NID keys from HomePlug AV passwords stored in a file.'))
  102. $(eval $(call Manager,key,mac2pw,'QCA Password Generator','Generate pseudo-random passwords from MAC addresses entered on the command line.'))
  103. $(eval $(call Manager,key,mac2pwd,'QCA Password Generator','Generate pseudo-random passwords from an range of MAC addresses stored in a file.'))
  104. $(eval $(call Manager,key,rkey,'QCA Random Key Generator','Generate pseudo-random DAK, NMK or NID keys with each invocation of the program.'))
  105. $(eval $(call Manager,mdio,mdioblock,'QCA MDIO Block Genertor',''))
  106. $(eval $(call Manager,mdio,mdioblock2,'QCA MDIO Block Generator',''))
  107. $(eval $(call Manager,mdio,mdiodump,'QCA MDIO Block Inspector',''))
  108. $(eval $(call Manager,mme,hpav,'HomePlugAV Message Monitor','Display incoming HomePlug AV messages frames. Ignore all other frames.'))
  109. $(eval $(call Manager,mme,mme,'QCA Message Cheat Sheet','Used for quick lookup of message types and error codes.'))
  110. $(eval $(call Manager,nda,ampinit,'PLC Device Initializer','Used to qca or recover corrupted Thunderbolt/Lightning powerline devices. Intended for factory use only.'))
  111. $(eval $(call Manager,nda,int6kecho,'PLC Frame Echo Utility',''))
  112. $(eval $(call Manager,nda,plcecho,'PLC Frame Echo Utility',''))
  113. $(eval $(call Manager,nda,plcinit,'PLC Device Initializer','Used to qca or recover corrupted Panther/Lynx powerline devices. Intended for factory use only.'))
  114. $(eval $(call Manager,nda,plcmod,'PLC Module Manager','Used to read and write PLC flash memory modules.'))
  115. $(eval $(call Manager,nda,psgen,'Prescaler Generator','This qca is legacy and may be obsolete.'))
  116. $(eval $(call Manager,nvm,chknvm,'PLC Firmware File Validator','Performs simple pass/fail sanity check of qca PLC firmware files. Can be used to determine the number and type of images stored within the file."'))
  117. $(eval $(call Manager,nvm,chknvm2,'PLC Firmware File Validator','Performs simple pass/fail sanity check of qca PLC firmware files. Can be used to determine the number and type of images stored within the file.'))
  118. $(eval $(call Manager,nvm,nvmmerge,'PLC Firmware File Assembler','Used to assemble qca NVM file chains from individual images.'))
  119. $(eval $(call Manager,nvm,nvmsplit,'PLC Firmware File Dissector','Explodes a qca NVM file chain into component images.'))
  120. $(eval $(call Manager,pib,chkpib,'PLC Parameter File Validator','Performs simple pass/fail sanity check on qca PLC parameter files.'))
  121. $(eval $(call Manager,pib,chkpib2,'PLC Parameter File Validator','Performs simple pass/fail sanity check on qca PLC parameter files.'))
  122. $(eval $(call Manager,pib,getpib,'QCA PIB Parameter Extractor','Used to extract parameters from a qca PLC parameter file. This qca is of little use without a valid parameter map.'))
  123. $(eval $(call Manager,pib,modpib,'QCA PLC Identity Manager','Used to configure a small number of common settings stored in qca PLC parameter files. This qca is safer to use than setpib.'))
  124. $(eval $(call Manager,pib,pibcomp,'PLC Parameter File Compare','Compare two qca PLC parameter files, field by field. This qca requires an object definition file.'))
  125. $(eval $(call Manager,pib,pibdump,'PLC Parameter File Dump','Display the contents of a qca PLC paramenter file, field by field. This qca requies an object definition file.'))
  126. $(eval $(call Manager,pib,setpib,'PLC Parameter File Editor','Used to set a variety of PLC parameters. This qca requires detailed knowledge of the file layout which could change from one firmware version to the next.'))
  127. $(eval $(call Manager,plc,ampboot,'PLC Boot Utility','Thunderbolt/Lightning bootstrap utility. Sutiable for INT6300, INT6400, AR7400 and QCA7450 chipsets.'))
  128. $(eval $(call Manager,plc,amphost,'PLC Host Emulator','Thunderbolt/Lightning host emulator. Demonstrates boot-from-host by servicing VS_HST_ACTION messages.'))
  129. $(eval $(call Manager,plc,amprate,'PLC Rate Monitor','Used to sample PHY rates between a device and each neighbor.'))
  130. $(eval $(call Manager,plc,amptest,'PLC Test Utility',''))
  131. $(eval $(call Manager,plc,amptool,'PLC Multi-tool',''))
  132. $(eval $(call Manager,plc,ampwait,'PLC Procrastinator',''))
  133. $(eval $(call Manager,plc,int6krule,'PLC QoS Rule Manager','Used to set and clear permanent and temporary QoS rules.'))
  134. $(eval $(call Manager,plc,plcboot,'PLC Boot Utility','Used to intialize and/or flash Panther/Lynx powerline devices. Can be used to erase flash memory.'))
  135. $(eval $(call Manager,plc,plcdevs,'WinPcap Device Enumerator','Enumerate the number and name of WinPcap devices on the local host.'))
  136. $(eval $(call Manager,plc,plcfwd,'',''))
  137. $(eval $(call Manager,plc,plcget,'PLC Get Property','Get PLC device properties using VS_GET_PROPERTY message.'))
  138. $(eval $(call Manager,plc,plchost,'PLC Host Emulator',''))
  139. $(eval $(call Manager,plc,plchostd,'PLC Hose Emulator Daemon',''))
  140. $(eval $(call Manager,plc,plcid,'PLC Key Grabber',''))
  141. $(eval $(call Manager,plc,plcrate,'PLC Rate Monitor','Used to sample PHY rates between a device and each neighbor. Can be used to stimulate a mesh network.'))
  142. $(eval $(call Manager,plc,plcset,'PLC Set Property','Set PLC device properties using VS_SET_PROPERTY message.'))
  143. $(eval $(call Manager,plc,plctest,'PLC Test Utility',''))
  144. $(eval $(call Manager,plc,plctool,'PLC Multi-tool',''))
  145. $(eval $(call Manager,programs,netifs,'Ethernet Port Enumerator','Enumerate host Ethernet ports.'))
  146. $(eval $(call Manager,programs,plcnets,'PLC Network Enumerator','Enumerate qca PLC networks connected to the host.'))
  147. $(eval $(call Manager,serial,ptsctl,'PTS Attenuation Controller',''))
  148. $(eval $(call Manager,serial,weeder,'Progammable Attenuator Controller','Set and/or inspect PTS Weeder attenuator module setting from the command line.'))
  149. # ====================================================================
  150. #
  151. # --------------------------------------------------------------------
  152. $(eval $(call BuildPackage,plc-utils))