Skip to content

Commit 315dd10

Browse files
OTA updates
1 parent 8af2359 commit 315dd10

File tree

8 files changed

+41
-1
lines changed

8 files changed

+41
-1
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# OTA updates for OpenCentauri
2+
3+
This patch bundle patches 3 functions and 1 string:
4+
5+
- Patch [hl_net_wan_is_conncted](https://github.com/elegooofficial/CentauriCarbon/blob/e5c8dac7f8689a9a45e4153b80c6a6e3617f2b26/firmware/hl/devices/hl_net.c#L239) (sub_29475c) to redirect to hl_net_lan_is_connected (sub_294718) instead.
6+
7+
![hl_net_wan_is_conncted_patch](./hl_net_wan_is_connected.png)
8+
9+
- Patch [hl_netif_wan_is_connected](https://github.com/elegooofficial/CentauriCarbon/blob/e5c8dac7f8689a9a45e4153b80c6a6e3617f2b26/firmware/hl/devices/hl_net.c#L646) (sub_295924) to redirect to hl_netif_lan_is_connected (sub_2958ec) instead.
10+
11+
![hl_netif_wan_is_connected_patch](./hl_netif_wan_is_connected.png)
12+
13+
- Patch [is_ota_version_greater](https://github.com/elegooofficial/CentauriCarbon/blob/e5c8dac7f8689a9a45e4153b80c6a6e3617f2b26/firmware/devices/ota.c#L1019) (sub_261e6c) to instead check if ota_ctx.info[OTA_FIREMARE_CH_SYS].version (data_3e35d1) is an empty string.
14+
15+
![is_ota_version_greater_patch](./is_ota_version_greater.png)
16+
17+
- Patch string "https://mms.chituiot.com/" to "https://u.opencentauri.cc/"
54.1 KB
Loading
47 KB
Loading
22.9 KB
Loading
274 Bytes
Binary file not shown.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
if [ $UID -ne 0 ]; then
4+
echo "Error: Please run as root."
5+
exit 1
6+
fi
7+
8+
set -e
9+
10+
project_root="$REPOSITORY_ROOT"
11+
source "$project_root/TOOLS/helpers/utils.sh" "$project_root"
12+
check_tools "bspatch"
13+
14+
cd "$SQUASHFS_ROOT/app"
15+
bspatch ./app ./app-patch "$CURRENT_PATCH_PATH/oc-ota-updates.bsdiff"
16+
rm ./app
17+
mv ./app-patch ./app
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
id = "ota_updates"
2+
name = "Implement OTA updates for OpenCentauri firmware"
3+
after = ["base"]
4+
requires = ["block_connectivity_check"]
5+
compatible_versions = ["1.1.40"]

oc-patches/patch_config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ REPLACE_BOOTLOGO=true
2727
SET_FIRMWARE_VERSION=true
2828
ALWAYS_ALLOW_Z_OFFSET_ADJUST=true
2929
WAIT_FOR_CHAMBER_TEMP=true
30-
REPORT_FILAMENT_USAGE=true
30+
REPORT_FILAMENT_USAGE=true
31+
OTA_UPDATES=true

0 commit comments

Comments
 (0)