-
Notifications
You must be signed in to change notification settings - Fork 101
Implement mesh upgrade package #1109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 109 commits
a5f59c2
288f202
1f96c5d
75fb96a
863c076
5757011
f259854
e9aadbd
49d4e23
0d82acf
7895145
f98ac08
7605733
62b6f12
d7d3d30
2504b60
076fdd5
b7dd972
ac7c595
e373d28
bd9e791
e86639d
12c1ad2
4bbba91
d285f99
b905783
308f67b
f061115
85f7f95
306cb7b
d220532
d2f00aa
c58fdad
e04af02
532ad42
e0458b7
e1fafc8
46fe6f2
84ae8eb
ab08fee
cfb0306
a6467f7
5f2938c
95e3e77
ba73b05
4aa81e8
ce16017
ccbab49
3800135
eae0613
72fdde1
775633a
e3ac277
724abf8
08402bd
3b67b7f
426db52
088c26f
2f942aa
3d8205f
084b24c
f920940
39c25da
16c9567
8394178
b27caa5
4be266e
e66d071
d7ea20f
49c7449
e9e5dd9
d984674
889b46d
0a9e851
183a131
d65a96a
85b4bbb
6e3adea
d85b950
f45d888
50242d2
5e60e13
88c500f
a306df7
d99480d
a00e9e5
88e61e8
0bedc8a
d644536
2e88248
79e6411
9734b3b
14323cb
e9f334f
fad984b
7c62efd
0db9965
ef16fbb
c39be29
98ba399
58a3fea
d2ae110
d14626f
9dcbed9
7210e05
9b761d8
2828bbd
1f5cc43
ba6e26c
d4332af
8a9efc8
7d366fc
a03cc22
32b40a1
937c645
26fc404
2f9794a
c338195
6e0e715
7fd8d38
160a2a4
f54b79a
3545b72
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
include $(TOPDIR)/rules.mk | ||
|
||
PKG_NAME:=lime-mesh-upgrade | ||
PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) | ||
GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) | ||
GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) | ||
|
||
include $(INCLUDE_DIR)/package.mk | ||
|
||
define Package/$(PKG_NAME) | ||
CATEGORY:=LibreMesh | ||
MAINTAINER:=selankon <selankon@selankon.xyz> | ||
TITLE:=LibreMesh mesh wide firmware upgrade | ||
DEPENDS:= +lua +libubus-lua +wget +safe-upgrade \ | ||
+shared-state-mesh_wide_upgrade | ||
|
||
PKGARCH:=all | ||
endef | ||
|
||
define Build/Compile | ||
endef | ||
|
||
define Package/$(PKG_NAME)/install | ||
$(INSTALL_DIR) $(1)/ | ||
$(CP) ./files/* $(1)/ | ||
endef | ||
|
||
$(eval $(call BuildPackage,$(PKG_NAME))) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Mesh upgrade | ||
This package can help you upgrade the firmware of all the routers in a network from a single node. | ||
|
||
## Description and steps | ||
1- A node must become main node, the main node will fetch the firmware for all the others. And expose it in the local network. | ||
2- The main node announces the new firmware over shared-state-async | ||
3- Other nodes with this package will get the news and try to download the firmware. | ||
4- Once all the nodes have the firmware in their tmp folder the main node user will be able to schedule the safe upgrade of all the nodes (this last step is done synchronously). | ||
5- After the specified time (60s default) all the nodes will start the safe upgrade process and the nodes will reboot. | ||
6- The nodes will report that the new firmware has to be confirmed. | ||
7- The main node user will verify that everything is in place an press the confirm button. | ||
8- If the firmware is not confirmed after 600 seconds the routers will go back to the previous firmware. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
config mesh-upgrade 'main' | ||
option firmware_ver '' | ||
option candidate_fw '' | ||
option fw_path '' | ||
option repo_url '' | ||
option upgrade_state '' | ||
option error '0' | ||
option timestamp '0' | ||
option main_node 'NO' | ||
option retry_count '0' | ||
option safeupgrade_start_mark '0' | ||
option su_start_time_out '0' | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing new line. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this config file main reason to exist is to keep the settings and status of the current upgrade. This is to be keep across, operating system process, reboots and sysupgrades. It is a backend mesh-upgrade state and config persistence. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/etc/config/mesh-upgrade |
Uh oh!
There was an error while loading. Please reload this page.