Makefile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #
  2. # Copyright (C) 2016-2024 CZ.NIC z.s.p.o. (http://www.nic.cz/)
  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:=omnia-mcutool
  9. PKG_VERSION_REAL:=0.3-rc3
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL=https://gitlab.nic.cz/turris/$(PKG_NAME)
  13. PKG_SOURCE_DATE:=2024-08-05
  14. PKG_SOURCE_VERSION:=3833ade1377076a5c8e394d7afe7679716af0107
  15. PKG_MIRROR_HASH:=63cfaa388cffc8a5a7d08c14d6428d1bb33ae7aebf62a1764fd57f8bc94f9144
  16. PKG_MAINTAINER:=Marek Mojik <[email protected]>
  17. PKG_LICENSE:=GPL-2.0-or-later
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/omnia-mcutool
  20. SECTION:=utils
  21. CATEGORY:=Utilities
  22. URL:=https://gitlab.nic.cz/turris/$(PKG_NAME)
  23. TITLE:=CZ.NIC Turris Omnia MCU utility
  24. DEPENDS:=+libopenssl +omnia-mcu-firmware
  25. endef
  26. define Package/omnia-mcutool/description
  27. The omnia-mcutool utility is mainly used to upgrade the firmware on the
  28. microcontroller on the Turris Omnia router. It can also show state of MCU
  29. settings and configure MCU options (GPIOs, LEDs, power).
  30. endef
  31. TARGET_LDFLAGS += -lcrypto
  32. define Build/Compile
  33. $(MAKE) -C $(PKG_BUILD_DIR) \
  34. CC="$(TARGET_CC)" \
  35. CFLAGS="$(TARGET_CFLAGS) -Wall" \
  36. LDFLAGS="$(TARGET_LDFLAGS)" \
  37. MCUTOOL_VERSION="$(PKG_VERSION_REAL)"
  38. endef
  39. define Package/omnia-mcutool/install
  40. $(INSTALL_DIR) $(1)/usr/bin
  41. $(INSTALL_BIN) $(PKG_BUILD_DIR)/omnia-mcutool $(1)/usr/bin/
  42. endef
  43. $(eval $(call BuildPackage,omnia-mcutool))