Makefile 1.7 KB

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