diff options
author | David Bauer <mail@david-bauer.net> | 2020-06-29 12:24:04 +0200 |
---|---|---|
committer | David Bauer <mail@david-bauer.net> | 2020-06-29 12:24:04 +0200 |
commit | 1ba0466d43efd03621eb491a4c52b5ae16f2ace5 (patch) | |
tree | 1401b88abb34209647d40c013aff564cfcc358c9 | |
parent | e959048c128e4350b78df653be7cd7277787518e (diff) | |
download | upstream-1ba0466d43efd03621eb491a4c52b5ae16f2ace5.tar.gz upstream-1ba0466d43efd03621eb491a4c52b5ae16f2ace5.tar.bz2 upstream-1ba0466d43efd03621eb491a4c52b5ae16f2ace5.zip |
package: add ravpower-mcu package
This package allows to read battery status information and control the
power state of the RAVPower RP-WD009 power management IC.
Signed-off-by: David Bauer <mail@david-bauer.net>
-rw-r--r-- | package/utils/ravpower-mcu/Makefile | 34 | ||||
-rw-r--r-- | target/linux/ramips/image/mt76x8.mk | 3 |
2 files changed, 36 insertions, 1 deletions
diff --git a/package/utils/ravpower-mcu/Makefile b/package/utils/ravpower-mcu/Makefile new file mode 100644 index 0000000000..435445fcc5 --- /dev/null +++ b/package/utils/ravpower-mcu/Makefile @@ -0,0 +1,34 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=ravpower-mcu + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL=https://github.com/blocktrron/ravpower-mcu.git +PKG_MIRROR_HASH:=edde0fda3fc708eac65baff46b5b6f1290ab733d3f4bd7fc027ef45c3d1b5814 +PKG_SOURCE_DATE:=2020-06-19 +PKG_SOURCE_VERSION:=1665d9e9212dcd118629a74fbe658841f81036f7 +PKG_MAINTAINER:=David Bauer <mail@david-bauer.net> +PKG_LICENSE:=GPL-2.0-or-later + +include $(INCLUDE_DIR)/package.mk + +define Package/ravpower-mcu + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Utility to control the RAVPower RP-WD009 PMIC + DEPENDS:=@TARGET_ramips_mt76x8 + URL:=https://github.com/blocktrron/ravpower-mcu/ +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -Wall" +endef + +define Package/ravpower-mcu/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/out/ravpower-mcu $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,ravpower-mcu)) diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index 9fa81406c9..cd5cdd4e8c 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -258,7 +258,8 @@ define Device/ravpower_rp-wd009 DEVICE_VENDOR := RAVPower DEVICE_MODEL := RP-WD009 UBOOT_PATH := $(STAGING_DIR_IMAGE)/ravpower_rp-wd009-u-boot.bin - DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 kmod-i2c-mt7628 + DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-ohci \ + kmod-sdhci-mt7620 kmod-i2c-mt7628 ravpower-mcu IMAGES += factory.bin IMAGE/factory.bin := $$(sysupgrade_bin) | ravpower-wd009-factory endef |