Conversation
…d flash and switch-to-cosmos scripts
…o allow selection of different patches, added README.md for each binary patch version since approach might be different.
…d 1.4.46 firmware and resolve some bugs
There was a problem hiding this comment.
Pull request overview
This PR rebases the patch set onto Elegoo Centauri Carbon firmware 1.4.46 (and partially 1.4.44) while porting multiple existing binary patches and updating the bootstrap tooling to support the newer firmware layout and “CANVAS” workflow.
Changes:
- Port/extend multiple
cc1-appbinary patches to 1.4.46, updating patch scripts to select version-specific.bsdiffpayloads. - Replace the older OpenCentauri entware bootstrap flow with a Kipware bootstrap flow, and add device-side
flash/switch-to-cosmoshelpers. - Update build/config tooling and metadata to default to 1.4.46 and recognize new compatible versions.
Reviewed changes
Copilot reviewed 45 out of 80 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| oc-patches/services/bootstrap-oc/switch-to-cosmos | Adds a helper to download a COSMOS/OpenCentauri .swu and flash it. |
| oc-patches/services/bootstrap-oc/patch.sh | Updates bootstrap patching to fetch/verify Kipware and install flash helpers + versioned kmods. |
| oc-patches/services/bootstrap-oc/OpenCentauri/root/.profile | Adds login shell redirection for legacy OpenCentauri root home content. |
| oc-patches/services/bootstrap-oc/OpenCentauri/root/.bash_profile | Adds PATH augmentation for legacy OpenCentauri root home content. |
| oc-patches/services/bootstrap-oc/OpenCentauri-bootstrap.tar.gz | Removes the previous OpenCentauri bootstrap tarball (LFS pointer). |
| oc-patches/services/bootstrap-oc/oc-startwifi.sh | Updates Wi-Fi bring-up flow (modules + udhcpc behavior) and bash shebang. |
| oc-patches/services/bootstrap-oc/oc-bootstrap | Switches bootstrap runtime from /opt entware to /kip Kipware and adjusts services. |
| oc-patches/services/bootstrap-oc/mount_usb_daemon | Updates shebang to use env bash. |
| oc-patches/services/bootstrap-oc/mount_usb | Updates shebang to use env bash. |
| oc-patches/services/bootstrap-oc/flash | Adds a device-side SWUpdate “flash” helper that targets the inactive A/B slot. |
| oc-patches/patch_planner.py | Improves patch_config parsing (comments/whitespace handling) using shlex. |
| oc-patches/firmware/uboot-patch/patch.toml | Extends U-Boot patch compatibility to 1.4.44/1.4.46. |
| oc-patches/firmware/uart-patch/patch.toml | Extends UART patch compatibility to 1.4.44/1.4.46. |
| oc-patches/cc1-app/wait-for-chamber-temp/temp_wait_patch-1.1.40.bsdiff | Versioned bsdiff payload for 1.1.40 (tracked in repo). |
| oc-patches/cc1-app/wait-for-chamber-temp/README-1.4.46.md | Documents the 1.4.46 port of the chamber TEMPERATURE_WAIT SENSOR=box patch. |
| oc-patches/cc1-app/wait-for-chamber-temp/README-1.1.40.md | Adds/updates documentation for the 1.1.40 chamber TEMPERATURE_WAIT patch. |
| oc-patches/cc1-app/wait-for-chamber-temp/patch.toml | Marks this patch compatible with 1.4.46 in addition to 1.1.40. |
| oc-patches/cc1-app/wait-for-chamber-temp/patch.sh | Selects the correct versioned bsdiff based on FW_VER. |
| oc-patches/cc1-app/report-filament-usage/report_filament_usage_patch-1.1.40.bsdiff | Versioned bsdiff payload for 1.1.40 (tracked in repo). |
| oc-patches/cc1-app/report-filament-usage/README-1.4.46.md | Documents the 1.4.46 port of the filament usage JSON patch. |
| oc-patches/cc1-app/report-filament-usage/README-1.1.40.md | Adds/updates documentation for the 1.1.40 filament usage JSON patch. |
| oc-patches/cc1-app/report-filament-usage/patch.toml | Marks this patch compatible with 1.4.46 in addition to 1.1.40. |
| oc-patches/cc1-app/report-filament-usage/patch.sh | Selects the correct versioned bsdiff based on FW_VER. |
| oc-patches/cc1-app/ota-updates-patch/README-1.4.46.md | Documents the 1.4.46 OTA update redirection/version-check port. |
| oc-patches/cc1-app/ota-updates-patch/README-1.1.40.md | Adds/updates documentation for the 1.1.40 OTA update patch. |
| oc-patches/cc1-app/ota-updates-patch/patch.toml | Marks OTA patch compatible with 1.4.46 and keeps dependency on connectivity-check block. |
| oc-patches/cc1-app/ota-updates-patch/patch.sh | Selects the correct versioned bsdiff based on FW_VER. |
| oc-patches/cc1-app/ota-updates-patch/oc-ota-updates-1.1.40.bsdiff | Versioned bsdiff payload for 1.1.40 (tracked in repo). |
| oc-patches/cc1-app/misc-app-patch/patch.toml | Extends misc app patch compatibility to 1.4.44/1.4.46. |
| oc-patches/cc1-app/do-not-block-z-offset-adjust-patch/README-1.4.46.md | Documents the 1.4.46 port of “always allow Z offset adjust”. |
| oc-patches/cc1-app/do-not-block-z-offset-adjust-patch/README-1.1.40.md | Adds/updates documentation for the 1.1.40 Z-offset adjust patch. |
| oc-patches/cc1-app/do-not-block-z-offset-adjust-patch/patch.toml | Marks Z-offset patch compatible with 1.4.46. |
| oc-patches/cc1-app/do-not-block-z-offset-adjust-patch/patch.sh | Selects the correct versioned bsdiff based on FW_VER. |
| oc-patches/cc1-app/do-not-block-z-offset-adjust-patch/no-block-z-offset-1.1.40.bsdiff | Versioned bsdiff payload for 1.1.40 (tracked in repo). |
| oc-patches/cc1-app/disable-exhaust-fan-patch/README-1.4.46.md | Documents the 1.4.46 port of the exhaust fan suppression patch. |
| oc-patches/cc1-app/disable-exhaust-fan-patch/README-1.1.40.md | Adds/updates documentation for the 1.1.40 exhaust fan patch. |
| oc-patches/cc1-app/disable-exhaust-fan-patch/patch.toml | Marks exhaust fan patch compatible with 1.4.46. |
| oc-patches/cc1-app/disable-exhaust-fan-patch/patch.sh | Selects the correct versioned bsdiff based on FW_VER. |
| oc-patches/cc1-app/disable-exhaust-fan-patch/exhaust-fan-patch-1.1.40.bsdiff | Versioned bsdiff payload for 1.1.40 (tracked in repo). |
| oc-patches/cc1-app/block-connectivity-check-patch/README-1.4.46.md | Documents the 1.4.46 port that prevents WAN connectivity check thread startup. |
| oc-patches/cc1-app/block-connectivity-check-patch/README-1.1.40.md | Adds/updates documentation for the 1.1.40 connectivity check block patch. |
| oc-patches/cc1-app/block-connectivity-check-patch/patch.sh | Extends bsdiff application to 1.4.46 using versioned filename. |
| oc-patches/cc1-app/allow-uploads-during-printing-patch/README-1.4.46.md | Documents the 1.4.46 port allowing uploads while printing. |
| oc-patches/cc1-app/allow-uploads-during-printing-patch/README-1.1.40.md | Adds/updates documentation for the 1.1.40 allow-upload patch. |
| oc-patches/cc1-app/allow-uploads-during-printing-patch/patch.toml | Marks allow-upload patch compatible with 1.4.46. |
| oc-patches/cc1-app/allow-uploads-during-printing-patch/patch.sh | Selects the correct versioned bsdiff based on FW_VER. |
| oc-patches/cc1-app/allow-uploads-during-printing-patch/allow-upload-patch-1.1.40.bsdiff | Versioned bsdiff payload for 1.1.40 (tracked in repo). |
| oc-patches/cc1-app/allow-api-during-printing-patch/README-1.4.46.md | Documents the 1.4.46 port allowing API status updates while printing. |
| oc-patches/cc1-app/allow-api-during-printing-patch/README-1.1.40.md | Adds/updates documentation for the 1.1.40 API control patch. |
| oc-patches/cc1-app/allow-api-during-printing-patch/patch.toml | Marks API patch compatible with 1.4.46. |
| oc-patches/cc1-app/allow-api-during-printing-patch/patch.sh | Selects the correct versioned bsdiff based on FW_VER. |
| oc-patches/cc1-app/allow-api-during-printing-patch/api-control-patch-1.1.40.bsdiff | Versioned bsdiff payload for 1.1.40 (tracked in repo). |
| oc-patches/cc1-app/add-chamber-light-gcode-patch/README-1.4.46.md | Documents the 1.4.46 port adding M8212/M8213 chamber light control. |
| oc-patches/cc1-app/add-chamber-light-gcode-patch/README-1.1.40.md | Adds/updates documentation for the 1.1.40 chamber light gcode patch. |
| oc-patches/cc1-app/add-chamber-light-gcode-patch/patch.toml | Marks chamber light gcode patch compatible with 1.4.46. |
| oc-patches/cc1-app/add-chamber-light-gcode-patch/patch.sh | Selects the correct versioned bsdiff based on FW_VER. |
| oc-patches/cc1-app/add-chamber-light-gcode-patch/add-chamber-light-gcode-1.1.40.bsdiff | Versioned bsdiff payload for 1.1.40 (tracked in repo). |
| install.sh | Fixes the printed follow-up command to re-run install.sh instead of upload.sh. |
| fwdl.sh | Adds firmware download URLs and dates for 1.4.44 and 1.4.46. |
| firmware-editions/patched | Updates the default edition config to use Kipware bootstrap URL/path/SHA256 settings. |
| firmware-editions/klipper-pi | Updates edition config but currently diverges from new Kipware bootstrap variables. |
| build.sh | Changes the default firmware version selection to 1.4.46. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| check_tools "grep md5sum openssl wc awk sha256sum mksquashfs git git-lfs" | ||
|
|
||
| echo Go into the squashfs-root dir for the rest of the steps! | ||
| cd "$SQUASHFS_ROOT" | ||
|
|
||
| set -x | ||
| set -e | ||
|
|
||
| echo Check MD5sum on OpenCentauri bootstrap | ||
| BOOTSTRAP_PATH="$CURRENT_PATCH_PATH/OpenCentauri-bootstrap.tar.gz" | ||
| MD5_SUM="$(md5sum "$BOOTSTRAP_PATH" | awk '{print $1}')" | ||
| if [[ ! "$MD5_SUM" = "$OC_BOOTSTRAP_MD5" ]]; then | ||
| printf "MD5 hash of %s (%s) does not match expected %s, aborting...\n" "$BOOTSTRAP_PATH" "$MD5_SUM" "$OC_BOOTSTRAP_MD5" | ||
| : "${KIP_BOOTSTRAP_URL:?KIP_BOOTSTRAP_URL must be set in $PATCHES_ROOT/patch_config}" | ||
| : "${KIP_BOOTSTRAP_PATH:?KIP_BOOTSTRAP_PATH must be set in $PATCHES_ROOT/patch_config}" | ||
| : "${KIP_BOOTSTRAP_SHA256:?KIP_BOOTSTRAP_SHA256 must be set in $PATCHES_ROOT/patch_config}" | ||
|
|
||
| #echo Copy over the OpenCentauri bootstrap tarball to /app | ||
| #cp "$CURRENT_PATCH_PATH/OpenCentauri-bootstrap.tar.gz" ./app | ||
| #chmod 644 ./app/OpenCentauri-bootstrap.tar.gz | ||
| echo Copy over the Kipware bootstrap tarball to /app | ||
| wget "$KIP_BOOTSTRAP_URL" -O "$KIP_BOOTSTRAP_PATH" | ||
| chmod 644 "$KIP_BOOTSTRAP_PATH" |
| echo 'Add symlink for /lib/modules/ for new kernel ver 5.4.61-${kmod} (harmless for earlier revs)' | ||
| cd ./lib/modules | ||
| ln -sf 5.4.61 5.4.61-ab1175 | ||
| if [ "$FW_VER" = "1.1.40" ]; then | ||
| kmod=ab1175 | ||
| elif [ "$FW_VER" = "1.4.44" ]; then | ||
| kmod=ab1434 | ||
| elif [ "$FW_VER" = "1.4.46" ]; then | ||
| kmod=ab1444 | ||
| fi | ||
| echo 'Add symlink for /lib/modules/ for new kernel ver 5.4.61-${kmod} (harmless for earlier revs)' | ||
| [[ ! -z "$kmod" ]] && ln -sf 5.4.61 5.4.61-$kmod |
| echo $VERSION | ||
|
|
||
| echo "Install Ethernet kmod(s)" | ||
| cp "$CURRENT_PATCH_PATH/kmod/r8152.ko" "$SQUASHFS_ROOT/lib/modules/5.4.61/" | ||
| cp "$CURRENT_PATCH_PATH/kmod/ax88179_178a.ko" "$SQUASHFS_ROOT/lib/modules/5.4.61/" | ||
| if [[ ! -z "$kmod" ]]; then |
| if [ ! -f /kip/etc/entware_release ]; then | ||
| cd / && | ||
| tar zxvf /app/kipware.tar.gz user-resource | ||
| echo 'Entware is now Kipware, and lives in /kip! Now with more Mudkips...' > /opt/Kipware-Info.txt | ||
| fi |
| # Enable root login if this is the first boot after installing Kipware | ||
| sed -re 's/^#PermitRootLogin.*/PermitRootLogin yes/' -i /kip/etc/ssh/sshd_config | ||
|
|
||
| # Start entware system services, includes openssh | ||
| /opt/etc/init.d/rc.unslung start | ||
| /kip/etc/init.d/rc.unslung start |
| # Download firmware | ||
| curl -k -f -S -o "$SWUFILE" -L "$FW_URL" | ||
|
|
||
| # Install firmware | ||
| flash "$SWUFILE" | ||
|
|
| @@ -4,7 +4,7 @@ | |||
| ### You can edit variables in here to tweak settings in the FW! | |||
| ### | |||
|
|
|||
The klipper-pi edition fails because patch.sh requires KIP_BOOTSTRAP_URL to be set in its firmware-edition config, which is currently missing on the 1.4.46 rebase branch. This causes the 'Enable Entware setup, load new kernel modules and more' patch to abort with exit code 1. Comment out the klipper-pi step and its artifact upload so CI can pass on the 'patched' edition alone. Re-enable once KIP_BOOTSTRAP_URL is configured in firmware-editions/klipper-pi. TODO: Re-enable klipper-pi build once KIP_BOOTSTRAP_URL is configured.
|
I am trying to run this on a CC1 with Canvas but it is stuck on the boot loading screen at 100% progress bar. I have ssh so killing /app and running it gives me the following errors: Is it possible there are some pin overlaps with the canvas pcb vs non? |
…ll pointer issue when running this firmware on a non-canvas toolhead without FRS. Also isolate a potential similar segfault on checking filament cutter sensor. Resolves issues with loading and possibly unloading on CC1 with OG toolhead board.
Forces SET_ALL_CHANNELS_SAME handler to always write 0, preventing cmd_M749 from skipping the unload/load cycle on single-color prints. The printer will now respect the user-selected filament color for both slicer and touchscreen selection paths. Patch: movne r0, #1 -> mov r0, #0 at 0x239714 Stock: ae693f7dc096da1f734c2972694963286cba20dc8f6afac79f8468139b613129 Patch: dd967e9dddb77966e2828fa08ae67f8a7c68c7917e1adce4aa97de880b749895
Updated patched firmware rebased to 1.4.46 (now with Canvas support!)
Known issues:
TODO: Maybe fix this in a binary patch?
Need to test out binary patches:
[X] Port chamber light gcode patch (tested by PD, works!)
[ ] Port allow uploads during printing patch
[ ] Port OTA updates patch
[ ] Port do-not-block Z offset patch
[ ] Port allow API during printing patch
[ ] Port wait-for-chamber-temp patch
[O] Port report filament usage patch (patch is printing to log, so it is likely working but couldn't fully test)
[ ] Port disable exhaust fan patch
[ ] Port block connectivity check patch
[X] Load/unload filament fixes targeting OG toolhead board (tested by PD, works!)
[ ] Load/unload filament fixes targeting OG toolhead board, make sure doesn't break Canvas toolhead board