You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1016 B

  1. include $(TOPDIR)/rules.mk
  2. include $(INCLUDE_DIR)/kernel.mk
  3. PKG_NAME:=gl-mifi-mcu
  4. PKG_VERSION:=1
  5. PKG_RELEASE:=1
  6. PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
  7. PKG_LICENSE:=GPL-3.0-or-later
  8. include $(INCLUDE_DIR)/package.mk
  9. define KernelPackage/gl-mifi-mcu
  10. SUBMENU:=Hardware Monitoring Support
  11. TITLE:=GL.iNet GL-MiFI Power monitoring support
  12. AUTOLOAD:=$(call AutoLoad,60,gl-mifi-mcu)
  13. FILES:=$(PKG_BUILD_DIR)/gl-mifi-mcu.ko
  14. endef
  15. define KernelPackage/gl-mifi-mcu/description
  16. Interfaces with GL-MiFI Power monitoring MCU with a soft UART
  17. and provides Battery SOC, Temperature and charging data at
  18. /proc/gl_mifi_mcu.
  19. This feature is supported from GL-MiFi PCB revision v2.6.2.
  20. The content of /proc/gl_mifi_mcu is JSON as received from the
  21. UART and will frequenty contain corrupted data due to soft UART
  22. unreliability. User application must validate the data.
  23. endef
  24. define Build/Compile
  25. $(KERNEL_MAKE) \
  26. M="$(PKG_BUILD_DIR)" \
  27. modules
  28. endef
  29. $(eval $(call KernelPackage,gl-mifi-mcu))