Skip to content

Add update scripts#27

Merged
jamesturton merged 9 commits into
mainfrom
james/update-scripts
Mar 25, 2026
Merged

Add update scripts#27
jamesturton merged 9 commits into
mainfrom
james/update-scripts

Conversation

@jamesturton
Copy link
Copy Markdown
Collaborator

No description provided.

@jamesturton jamesturton self-assigned this Mar 23, 2026
@jamesturton jamesturton force-pushed the james/update-scripts branch from 7d7a0d8 to c1e8d15 Compare March 23, 2026 21:47

set -e

# ver 1.1.46
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would switch to patched oc instead of stock.

If anything blows up in the upgrade process, on stock recovery is insanely tricky. Under patched OC we have options.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could implement both and let the user choose?
Then it's only the case of changing the URL to download from and skip decrypting it.


# Flash stock bootloader
service klipper stop
flashtool -d $SERIALPORT_BED -b 115200 -r
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a lot better to do it here as well. Patching this in in the patched firmware is quite a mess

@@ -0,0 +1,17 @@
#!/bin/sh
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question, does guppy/grumpy show stdout/stderr while its running the script?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, it just looks at the exit code, however it shouldn't return if it successful as it should reboot.
Not as nice as your recovery app 😉

#!/bin/sh

sleep 3
touch /data/.factory-reset
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this work? I assume another script somewhere else not in this PR?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# ver 1.1.46
FW_URL="https://download.chitubox.com/chitusystems/chitusystems/public/printer/firmware/release/1/ca8e1d9a20974a5896f8f744e780a8a7/1/01.01.46/2025-10-22/f9bd2b9b1926408ca238de8e7eac69b6.bin"
DECRYPT="/usr/bin/swu-decrypt.py"
KEY="78B6A614B6B6E361DC84D705B7FDDA33C967DDF2970A689F8156F78EFE0B1FCE"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, unsure if plaintext key here is the best approach. Although don't think elegoo particuarly cares (or anycubic for that matter)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well... it already exists on the internet...

@jamesturton jamesturton marked this pull request as ready for review March 25, 2026 19:51
@jamesturton jamesturton merged commit 9b545f1 into main Mar 25, 2026
1 check failed
@jamesturton jamesturton deleted the james/update-scripts branch March 28, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants