Skip to content

Commit 6acea9f

Browse files
committed
Merge branch 'develop'
2 parents accc25a + 2f50a6e commit 6acea9f

39 files changed

+352
-172
lines changed

.github/workflows/auto-release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,5 @@ jobs:
4646
--title="${GITHUB_REPOSITORY#*/} ${tag}" \
4747
--generate-notes \
4848
--draft \
49-
build/dist/*.swu
49+
build/dist/*.swu \
50+
build/dist/*.zip

.github/workflows/build-swu-tools.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/build-swu.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
compression-level: 0
4242
path: |
4343
build/dist/*-k2p-k3.swu
44+
build/dist/*-k2p-k3.zip
4445
4546
- name: Upload artifact for KS1
4647
uses: actions/upload-artifact@v4
@@ -49,3 +50,13 @@ jobs:
4950
compression-level: 0
5051
path: |
5152
build/dist/*-ks1.swu
53+
build/dist/*-ks1.zip
54+
55+
- name: Upload artifact for K3M
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: update-k3m
59+
compression-level: 0
60+
path: |
61+
build/dist/*-k3m.swu
62+
build/dist/*-k3m.zip

Dockerfile

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,18 +191,48 @@ RUN chmod +x /build/get-novnc.sh && \
191191
/build/get-novnc.sh
192192

193193
###############################################################
194-
# tool-installer prepares Installer tool files
195-
FROM build-base AS tool-installer
194+
# build-swu-installer builds the Installer tool SWU files
195+
FROM build-base AS build-swu-installer
196196
COPY ./build/swu-tools/installer/ /build/swu-tools/installer/
197197
COPY ./build/*.* /build/
198198
COPY --from=buildroot-rebuild /files/1-buildroot/ /files/1-buildroot/
199199
COPY --from=build-python-armv7 /files/2-python/ /files/2-python/
200200
COPY ./files/3-rinkhals/ /files/3-rinkhals/
201201
COPY ./files/*.* /files/
202+
202203
RUN chmod +x /build/swu-tools/installer/build-swu.sh
203204
RUN KOBRA_MODEL_CODE=K3 /build/swu-tools/installer/build-swu.sh /swu/installer-k2p-k3.swu
205+
RUN KOBRA_MODEL_CODE=K3M /build/swu-tools/installer/build-swu.sh /swu/installer-k3m.swu
204206
RUN KOBRA_MODEL_CODE=KS1 /build/swu-tools/installer/build-swu.sh /swu/installer-ks1.swu
205207

208+
###############################################################
209+
# build-swu-tools builds the tools SWU files
210+
FROM build-base AS build-swu-tools
211+
COPY ./build/swu-tools/ /build/swu-tools/
212+
COPY ./build/*.* /build/
213+
COPY --from=buildroot-rebuild /files/1-buildroot/ /files/1-buildroot/
214+
COPY --from=build-python-armv7 /files/2-python/ /files/2-python/
215+
COPY ./files/3-rinkhals/ /files/3-rinkhals/
216+
COPY ./files/*.* /files/
217+
218+
RUN <<EOT
219+
set -e
220+
chmod +x /build/swu-tools/*/build-swu.sh
221+
for tool in $(ls /build/swu-tools/); do
222+
if [ "$tool" = "installer" ]; then
223+
continue
224+
fi
225+
KOBRA_MODEL_CODE=K3 /build/swu-tools/$tool/build-swu.sh /swu/${tool}-k2p-k3.swu
226+
KOBRA_MODEL_CODE=K3M /build/swu-tools/$tool/build-swu.sh /swu/${tool}-k3m.swu
227+
KOBRA_MODEL_CODE=KS1 /build/swu-tools/$tool/build-swu.sh /swu/${tool}-ks1.swu
228+
done
229+
cd /swu
230+
for suffix in k2p-k3 k3m ks1; do
231+
zip -j "tools-${suffix}.zip" *.swu -i "*-${suffix}.swu"
232+
done
233+
EOT
234+
235+
206236
###############################################################
207237
# prepare-bundle collects all files and prepares a bundle
208238
FROM build-base AS prepare-bundle
@@ -264,7 +294,7 @@ FROM scratch AS files-export
264294
COPY --from=prepare-bundle /bundle/ /
265295

266296
###############################################################
267-
# build-swu
297+
# build-swu builds the main firmware SWU files
268298
FROM prepare-bundle AS build-swu
269299
COPY ./build/tools.sh /
270300
RUN <<EOT
@@ -274,11 +304,13 @@ RUN <<EOT
274304
prepare_tgz /bundle /swu
275305
compress_swu K3 /swu/update-k2p-k3.swu &
276306
compress_swu KS1 /swu/update-ks1.swu &
307+
compress_swu K3M /swu/update-k3m.swu &
277308
wait $(jobs -p)
278309
EOT
279310

280311
###############################################################
281-
# swu-export creates the firmware updates export image
312+
# swu-export creates the SWU build export image
282313
FROM scratch AS swu-export
283-
COPY --from=tool-installer /swu/ /
314+
COPY --from=build-swu-installer /swu/ /
315+
COPY --from=build-swu-tools /swu/*.zip /
284316
COPY --from=build-swu /swu/ /

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Here are the suported printers and firmwares with latest Rinkhals release:
2020
| Kobra 3 (+ combo) | `2.3.9.3` `2.4.0` |
2121
| Kobra 2 Pro | `3.1.2.3` | Only with mainboard [Trigorilla Spe **B** v1.0.x](https://1coderookie.github.io/Kobra2ProInsights/hardware/mainboard/#trigorilla_spe_b_v10x-stock-new-revision). `3.1.4` is buggy |
2222
| Kobra S1 (+ combo) | `2.5.1.6` `2.5.2.3` |
23+
| Kobra 3 Max (+ combo) | `2.4.6` |
2324

2425
In case you're wondering this project is named after rinkhals, a sub-species of Cobras ... Kobra ... Rinkhals 👏
2526

@@ -103,17 +104,21 @@ If your printer shows a 11407 error, check the documentation there: [Read about
103104

104105
## SWU tools
105106

106-
This repo contains some tools you can use **no matter what firmware you are using**. It is a set of scripts packaged in a SWU file.
107+
> [!NOTE]
108+
> Those tools are also available through the Rinkhals installer touch UI ([documentation](https://jbatonnet.github.io/Rinkhals/Rinkhals/rinkhals-installer/))
107109
108-
They are available on this page: https://github.com/jbatonnet/Rinkhals/actions/workflows/build-swu-tools.yml
110+
This repo contains some tools you can use **no matter what firmware you are using**. It is a set of scripts packaged in a SWU file.
109111

110-
You can download the SWU file for the tool you want, copy it as **update.swu** on a FAT32 USB drive in a **aGVscF9zb3Nf** directory, plug the USB drive in your printer and it just works.
112+
From the [Releases](https://github.com/jbatonnet/Rinkhals/releases) page, identify the tools.zip file for your printer.
113+
Extract it, copy the SWU file you want as **update.swu** on a FAT32 USB drive in a **aGVscF9zb3Nf** directory, plug the USB drive in your printer and it just works.
111114
You will ear two beeps, the second one will tell you that the tool completed its work. There is no need to reboot afterwards.
112115

113116
Here are the tools available:
114117
- **SSH**: get a SSH server running on port **2222**, even on stock firmware
115118
- **Backup partitions**: creates a dump of your userdata and useremain partition on the USB drive
116119
- **Debug bundle**: creates a zip file with printer and configuration information on the USB drive to ease debugging
120+
- **Rinkhals uninstall**: uninstall Rinkhals completely from your printer
121+
- **Clean Rinkhals**: Removes old Rinkhals versions from your printer (keeps 3 versions including the current one)
117122

118123
<p align="center">
119124
<img width="48" src="https://github.com/jbatonnet/Rinkhals/blob/master/icon.png?raw=true" />

build/1-buildroot/.config

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3007,7 +3007,9 @@ BR2_PACKAGE_HAPROXY_ARCH_SUPPORTS=y
30073007
# BR2_PACKAGE_IPERF3 is not set
30083008
# BR2_PACKAGE_IPROUTE2 is not set
30093009
# BR2_PACKAGE_IPSET is not set
3010-
# BR2_PACKAGE_IPTABLES is not set
3010+
BR2_PACKAGE_IPTABLES=y
3011+
# BR2_PACKAGE_IPTABLES_BPF_NFSYNPROXY is not set
3012+
# BR2_PACKAGE_IPTABLES_NFTABLES is not set
30113013
# BR2_PACKAGE_IPTRAF_NG is not set
30123014
# BR2_PACKAGE_IPUTILS is not set
30133015
# BR2_PACKAGE_IRSSI is not set

build/1-buildroot/prepare-final.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ mkdir -p /files/1-buildroot
55
rm -rf /files/1-buildroot/*
66
cp -pr ./output/target/* /files/1-buildroot/
77

8+
# Fix a broken symlink in iptables
9+
cd /files/1-buildroot/usr/bin
10+
ln -f ../sbin/xtables-legacy-multi iptables-xml
11+
812
# Clean unused files
913
rm -rf /files/1-buildroot/dev
1014
rm -rf /files/1-buildroot/lib32

build/tools.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ compress_swu() {
2525
zip -0 -P U2FsdGVkX19deTfqpXHZnB5GeyQ/dtlbHjkUnwgCi+w= -r $SWU_NAME update_swu
2626
elif [ "$KOBRA_MODEL_CODE" = "KS1" ]; then
2727
zip -0 -P U2FsdGVkX1+lG6cHmshPLI/LaQr9cZCjA8HZt6Y8qmbB7riY -r $SWU_NAME update_swu
28+
elif [ "$KOBRA_MODEL_CODE" = "K3M" ]; then
29+
zip -0 -P 4DKXtEGStWHpPgZm8Xna9qluzAI8VJzpOsEIgd8brTLiXs8fLSu3vRx8o7fMf4h6 -r $SWU_NAME update_swu
2830
else
2931
echo "Unknown Kobra model code: $KOBRA_MODEL_CODE"
3032
exit 1

docs/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
To deploy the documentation locally, you'll need to:
2+
- Have Python installed
3+
- Install pip dependencies from the `requirements.txt` file
4+
- Run `python -m mkdocs serve` from this directory
5+
- Go to http://127.0.0.1:8000/Rinkhals/

docs/docs/Rinkhals/rinkhals-installer.md

Lines changed: 86 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,106 @@
22
title: Rinkhals Installer
33
---
44

5-
Starting from release 20250514_01, Rinkhals is released as a stadard SWU update file and an Installer tool.
5+
Starting from release 20250514_01, Rinkhals is released as a standard SWU update file and an Installer tool.
6+
7+
The installer allows you to:
68

7-
The installer allows you to
89
- Quickly install / update / uninstall Rinkhals versions
910
- Update your printer firmware
1011
- Perform some operations using tools (debug bundle, reset configuration, backups, ...)
1112
- Collect some diagnostics in case something seems wrong and provide known fixes
1213

14+
<figure markdown="span">
15+
![](../assets/rinkhals-installer/installer-main.png){ width="160" }<figcaption>Installer main screen</figcaption>
16+
</figure>
17+
18+
## Downlaod and use the Rinkhals Installer
19+
20+
From the GitHub [Releases](https://github.com/jbatonnet/Rinkhals/releases) page, find the version you want and download the installer.swu matching your printer model.
21+
As detailed in the [installation](./installation-and-firmware-updates.md) page, copy the .swu file as update.swu on a FAT32 USB drive. Then plug into the printer.
22+
1323
The installer takes about 10s to start. Once started, a SSH server will be listening on port 2222.
1424

25+
The main screen will show you some diagnostics results. You can tap on those to display more details and to apply the appropriate fix.
26+
27+
1528
## Install & Updates
1629

17-
To install last Rinkhals version:
18-
Home > Install & Updates > Rinkhals / Manage > Click on latest > Download > Install
30+
![](../assets/rinkhals-installer/installer-updates.png){ width="160", align=left }
31+
32+
From this view you'll be able to quickly see what Rinkhals and system version are installed right now on your printer and see the last available versions from GitHub and [https://rinkhals.meowcat285.com](https://rinkhals.meowcat285.com)
33+
34+
35+
<div style="clear: both;"></div>
36+
37+
38+
### Manage Rinkhals versions
39+
40+
!!! note
41+
42+
Test Rinkhals versions will be announced on the Discord server to collect users feedback.
43+
44+
![](../assets/rinkhals-installer/installer-updates-rinkhals-install.png){ width="160", align=right }
45+
![](../assets/rinkhals-installer/installer-updates-rinkhals.png){ width="160", align=right }
46+
47+
This screen shows installed and GitHub available versions of Rinkhals. You can choose wether to display test version from GitHub as well.
48+
49+
Tapping on one version will allow you to install, update or uninstall depending on your selection.
50+
51+
The version will be downloaded, extracted and then installed on your printer. The printer will then reboot to your new Rinkhals installation.
52+
53+
<div style="clear: both;"></div>
54+
55+
56+
### Manage system versions
57+
58+
!!! warning
59+
60+
A couple of things to keep in mind:
61+
62+
- Downgrading firmware is not recommended as other printer components could be incompatible with the version you want to downgrade to.
63+
- When upgrading, if your installed Rinkhals version is not compatible with the new version it will not work properly
64+
65+
![](../assets/rinkhals-installer/installer-updates-system-install.png){ width="160", align=right }
66+
![](../assets/rinkhals-installer/installer-updates-system.png){ width="160", align=right }
67+
68+
This screen shows the installed system firmware and all available firmware versions from a mirror server: [https://rinkhals.meowcat285.com](https://rinkhals.meowcat285.com)
69+
70+
The installer will also check directly with Anycubic servers if a new version not yet mirrored is available.
71+
72+
Tapping on one version will allow you to upgrade or downgrade depending on your selection.
73+
74+
The version will be downloaded, extracted and then installed on your printer. The printer will then reboot to your new Firmware installation.
75+
During the installation process, the installation will be patched in order for Rinkhals to survive the OTA process.
76+
77+
<div style="clear: both;"></div>
1978

20-
You can enable test versions to list beta / testing version from GitHub. Those will be anounced on the Discord server.
2179

2280
## Tools
2381

24-
- Generate a Debug Bundle > Generate a ZIP of useful logs / states of your pritner on the USB drive
25-
- Reset Rinkhals configuration > Create a backup of your configuration on the USB drive and resets printer, moonraker and other configurations to default
26-
- Backup partitions > Create a backup of /userdata and /useremain partitions (excluding gcodes, Rinkhals and other less important things) on the USB drive
27-
- Clean old Rinkhals > Remove older Rinkhals versions, keeping only the last 3 version including the currently running one
28-
- Uninstall Rinkhals > Completely remove Rinkhals files and configuration and revert back to stock firmware
82+
![](../assets/rinkhals-installer/installer-tools-uninstall.png){ width="160", align=right }
83+
![](../assets/rinkhals-installer/installer-tools.png){ width="160", align=right }
84+
85+
- **Generate a Debug Bundle**: Generate a ZIP of useful logs / states of your pritner on the USB drive
86+
- **Reset Rinkhals configuration**: Create a backup of your configuration on the USB drive and resets printer, moonraker and other configurations to default
87+
- **Backup partitions**: Create a backup of /userdata and /useremain partitions (excluding gcodes, Rinkhals and other less important things) on the USB drive
88+
- **Clean old Rinkhals**: Remove older Rinkhals versions, keeping only the last 3 version including the currently running one
89+
- **Uninstall Rinkhals**: Completely remove Rinkhals files and configuration and revert back to stock firmware
90+
91+
<div style="clear: both;"></div>
92+
2993

3094
## Diagnostics
3195

32-
-
96+
![](../assets/rinkhals-installer/installer-diagnostics-fix.png){ width="160", align=right }
97+
![](../assets/rinkhals-installer/installer-diagnostics.png){ width="160", align=right }
98+
99+
This view will list some diagnostics the installer performs to detect potential issues with your printer.
100+
101+
Tapping on them will show more details and the appropriate fix to apply.
102+
103+
The list of diagnostics is increasing over time, here are a couple of examples:
104+
105+
- Rinkhals being disabled
106+
- Modified pritner configuration
107+
- Missing startup files

0 commit comments

Comments
 (0)