Makefile 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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:=0.3-rc3
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=https://gitlab.nic.cz/turris/$(PKG_NAME)/-/archive/$(PKG_VERSION)/
  13. PKG_HASH:=80bc6a01ab86d51ebfdbddf77d74eead999a9bf7dbd08ca1fd4e8e1910eaf192
  14. PKG_MAINTAINER:=Marek Mojik <[email protected]>
  15. PKG_LICENSE:=GPL-2.0-or-later
  16. include $(INCLUDE_DIR)/package.mk
  17. define Package/omnia-mcutool
  18. SECTION:=utils
  19. CATEGORY:=Utilities
  20. URL:=https://gitlab.nic.cz/turris/$(PKG_NAME)
  21. TITLE:=CZ.NIC Turris Omnia MCU utility
  22. DEPENDS:=+libopenssl +omnia-mcu-firmware @TARGET_mvebu_cortexa9_DEVICE_cznic_turris-omnia
  23. endef
  24. define Package/omnia-mcutool/description
  25. The omnia-mcutool utility is mainly used to upgrade the firmware on the
  26. microcontroller on the Turris Omnia router. It can also show state of MCU
  27. settings and configure MCU options (GPIOs, LEDs, power).
  28. endef
  29. TARGET_LDFLAGS += -lcrypto
  30. define Build/Compile
  31. $(MAKE) -C $(PKG_BUILD_DIR) \
  32. CC="$(TARGET_CC)" \
  33. CFLAGS="$(TARGET_CFLAGS) -Wall" \
  34. LDFLAGS="$(TARGET_LDFLAGS)" \
  35. MCUTOOL_VERSION="$(PKG_VERSION)"
  36. endef
  37. define Package/omnia-mcutool/install
  38. $(INSTALL_DIR) $(1)/usr/bin
  39. $(INSTALL_BIN) $(PKG_BUILD_DIR)/omnia-mcutool $(1)/usr/bin/
  40. endef
  41. $(eval $(call BuildPackage,omnia-mcutool))