mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-05 18:44:03 +08:00
🤞 Sync 2026-04-23 06:19:46
This commit is contained in:
1 parent
a1df15cd3d
commit
b86d032e91
250 files changed
+41507
-188
No files matched your search
Executable
+39
@@ -0,0 +1,39 @@
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=svupgrade
|
||||
PKG_VERSION:=48.7.1.2.1
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/svupgrade
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/svupgrade
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Supervisor FW upgrade for LT70
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/svupgrade/description
|
||||
This package contains a script and fw for supervisor update
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/svupgrade/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/svupgrade.init $(1)/etc/init.d/svupgrade
|
||||
$(INSTALL_DIR) $(1)/lib/firmware/gd3x
|
||||
$(INSTALL_BIN) ./files/gd3x.bin $(1)/lib/firmware/gd3x/gd3x.bin.backup
|
||||
#$(INSTALL_BIN) ./files/gd3x.bin $(1)/lib/firmware/gd3x/gd3x.bin
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,svupgrade))
|
||||
Binary file not shown.
Executable
+37
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=50
|
||||
STOP=10
|
||||
|
||||
boot() {
|
||||
if [[ -e "/lib/firmware/gd3x/gd3x.bin" ]]; then
|
||||
/etc/init.d/svcontrol stop
|
||||
/etc/init.d/event-handler stop
|
||||
echo 1 > /sys/bus/i2c/devices/0-0011/fw_upgrade
|
||||
echo 0 > /sys/bus/i2c/devices/0-0011/heat_end_temp
|
||||
count=0
|
||||
while [[ "$count" -le "5" ]]; do
|
||||
sleep 2
|
||||
stm32flash -a 0x22 /dev/i2c-0
|
||||
if [[ "$?" -eq 0 ]]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [[ "$count" -eq "5" ]]; then
|
||||
/etc/init.d/svcontrol start
|
||||
exit 1
|
||||
fi
|
||||
sleep 1
|
||||
stm32flash -a 0x22 -o -S 0x8024000 /dev/i2c-0
|
||||
sleep 1
|
||||
stm32flash -a 0x22 -w /lib/firmware/gd3x/gd3x.bin -g 0x8024000 -S 0x8024000 /dev/i2c-0
|
||||
if [[ "$?" -eq 0 ]]; then
|
||||
sleep 60
|
||||
rm /lib/firmware/gd3x/gd3x.bin
|
||||
fi
|
||||
echo 5 > /sys/bus/i2c/devices/0-0011/heat_end_temp
|
||||
sync
|
||||
/etc/init.d/svcontrol start
|
||||
/etc/init.d/event-handler start
|
||||
fi
|
||||
}
|
||||
Reference in new issue
Block a user