update 2025-02-16 15:13:05
This commit is contained in:
parent
52df37e1a8
commit
d8232e36df
47
pcat-manager/Makefile
Normal file
47
pcat-manager/Makefile
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=pcat-manager
|
||||||
|
PKG_RELEASE:=1.0.16
|
||||||
|
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_DATE:=2023-03-17
|
||||||
|
PKG_SOURCE_URL:=https://github.com/photonicat/rockchip_rk3568_pcat_manager
|
||||||
|
PKG_SOURCE_VERSION:=5b8d8e098205e92fe9587f03d8bc34f8383987b2
|
||||||
|
PKG_MIRROR_HASH:=309ff9a0c73701af3428951d0df13e29525bcb5636262486b42f6a17eaebe2c0
|
||||||
|
|
||||||
|
PKG_LICENSE:=GPL-3.0
|
||||||
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include $(INCLUDE_DIR)/meson.mk
|
||||||
|
|
||||||
|
define Package/pcat-manager
|
||||||
|
SECTION:=utils
|
||||||
|
CATEGORY:=Utilities
|
||||||
|
TITLE:=photonicat watchdog
|
||||||
|
URL:=https://photonicat.com
|
||||||
|
DEPENDS:=+glib2 +libgpiod +libjson-c +libusb-1.0
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/pcat-manager/description
|
||||||
|
Photonicat Manager is a system service for
|
||||||
|
power management and modem controlling.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/pcat-manager/install
|
||||||
|
$(INSTALL_DIR) $(1)/etc/
|
||||||
|
$(INSTALL_CONF) ./files/pcat-manager.conf $(1)/etc
|
||||||
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
|
$(INSTALL_BIN) ./files/pcat-manager.init $(1)/etc/init.d/pcat-manager
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) \
|
||||||
|
$(PKG_INSTALL_DIR)/usr/bin/pcat-manager \
|
||||||
|
$(1)/usr/bin/pcat-manager
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,pcat-manager))
|
28
pcat-manager/files/pcat-manager.conf
Normal file
28
pcat-manager/files/pcat-manager.conf
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
[Hardware]
|
||||||
|
GPIOModemPowerChip=gpiochip4
|
||||||
|
GPIOModemPowerLine=18
|
||||||
|
GPIOModemPowerActiveLow=0
|
||||||
|
GPIOModemRFKillChip=gpiochip4
|
||||||
|
GPIOModemRFKillLine=20
|
||||||
|
GPIOModemRFKillActiveLow=1
|
||||||
|
GPIOModemResetChip=gpiochip0
|
||||||
|
GPIOModemResetLine=8
|
||||||
|
GPIOModemResetActiveLow=0
|
||||||
|
|
||||||
|
[PowerManager]
|
||||||
|
SerialDevice=/dev/ttyS0
|
||||||
|
SerialBaud=115200
|
||||||
|
AutoShutdownVoltageGeneral=0
|
||||||
|
AutoShutdownVoltageLTE=0
|
||||||
|
AutoShutdownVoltage5G=3600
|
||||||
|
LEDHighVoltage=0
|
||||||
|
LEDMediumVoltage=0
|
||||||
|
LEDLowVoltage=0
|
||||||
|
LEDWorkLowVoltage=0
|
||||||
|
StartupVoltage=0
|
||||||
|
ChargerLimitVoltage=0
|
||||||
|
ChargerFastVoltage=0
|
||||||
|
BatteryFullThreshold=4100
|
||||||
|
BatteryDischargeTableNormal=4100;4040;3980;3920;3870;3820;3790;3770;3740;3680;3450
|
||||||
|
BatteryDischargeTable5G=4050;3980;3930;3890;3850;3815;3780;3740;3700;3655;3610
|
||||||
|
BatteryChargeTable=4100;4085;4067;4040;4003;3942;3880;3825;3780;3725;3600
|
24
pcat-manager/files/pcat-manager.init
Normal file
24
pcat-manager/files/pcat-manager.init
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
|
||||||
|
START=45
|
||||||
|
STOP=89
|
||||||
|
|
||||||
|
start() {
|
||||||
|
service_start /usr/bin/pcat-manager -D
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
service_stop /usr/bin/pcat-manager
|
||||||
|
}
|
||||||
|
|
||||||
|
restart() {
|
||||||
|
killall -USR1 pcat-manager
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
}
|
||||||
|
|
||||||
|
shutdown() {
|
||||||
|
touch /tmp/pcat-manager-shutdown.tmp
|
||||||
|
stop
|
||||||
|
rfkill block wwan 2>/dev/null || true
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user