Makefile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #
  2. # Copyright (C) 2024 Marek Behún <[email protected]>
  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-eeprom
  9. PKG_VERSION:=0.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=https://gitlab.nic.cz/turris/omnia-eeprom/-/archive/v$(PKG_VERSION)/
  13. PKG_HASH:=6f949d0b8080adca8bae088774ce615b563ba6ec2807cce97ee6769b4eee7bbf
  14. PKG_FLAGS:=nonshared
  15. PKG_MAINTAINER:=Marek Behun <[email protected]>
  16. PKG_LICENSE:=GPL-2.0-or-later
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/omnia-eeprom
  20. SECTION:=utils
  21. CATEGORY:=Utilities
  22. URL:=https://gitlab.nic.cz/turris/omnia-eeprom
  23. TITLE:=CZ.NIC Turris Omnia EEPROM accessing utility
  24. DEPENDS:=@TARGET_mvebu_cortexa9 +kmod-eeprom-at24
  25. endef
  26. define Package/omnia-eeprom/description
  27. This package contains the omnia-eeprom utility, which allows you to display
  28. and update EEPROM fields on the Turris Omnia router.
  29. The EEPROM is normally not meant to be updated by users, but there are some
  30. exceptions where it might be useful.
  31. One such example is to change the DDR3 speed from the default 1600K mode to
  32. 1333H mode, in order to solve random crashes that occur on some boards with
  33. newer versions of the U-Boot bootloader (because of bugs in newer versions of
  34. the DDR training algorithm).
  35. endef
  36. MAKE_VARS += OMNIA_EEPROM_VERSION="v$(PKG_VERSION)"
  37. TARGET_CFLAGS += -Wall
  38. define Package/omnia-eeprom/install
  39. $(INSTALL_DIR) $(1)/usr/bin
  40. $(INSTALL_BIN) $(PKG_BUILD_DIR)/omnia-eeprom $(1)/usr/bin/
  41. endef
  42. $(eval $(call BuildPackage,omnia-eeprom))