Skip to content

Rebase on upstream Elegoo 1.4.46 firmware, adding CANVAS support#94

Merged
pdscomp merged 10 commits into
mainfrom
1.4.46
Jun 7, 2026
Merged

Rebase on upstream Elegoo 1.4.46 firmware, adding CANVAS support#94
pdscomp merged 10 commits into
mainfrom
1.4.46

Conversation

@pdscomp
Copy link
Copy Markdown
Contributor

@pdscomp pdscomp commented May 25, 2026

Updated patched firmware rebased to 1.4.46 (now with Canvas support!)

  • Firmware installs, runs, and prints! Upon testing load filament doesn't seem to work, not sure if this is a bug in binary patches or deficiency in 1.4.46 on non-canvas OG Elegoo toolhead board.
  • Replace Entware with latest version of Kipware (optimized for hard float optimizations).
  • Also added 'flash' and 'switch-to-cosmos' scripts to base to make swapping between builds more easier!

Known issues:

  • Running filament load appears to not function correctly on OG Elegoo mainboard. Not sure if this is a stock 1.4.46 issue or a issue with the binary paches, need to test more. Need someone to try with Canvas installed. For stock toolhead board, just heat up nozzle manually and command extrusion while pushing filament in to load.
    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

Copilot AI review requested due to automatic review settings May 25, 2026 22:21
@pdscomp pdscomp marked this pull request as draft May 25, 2026 22:21
pdscomp added 4 commits May 25, 2026 18:22
…o allow selection of different patches, added README.md for each binary patch version since approach might be different.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-app binary patches to 1.4.46, updating patch scripts to select version-specific .bsdiff payloads.
  • Replace the older OpenCentauri entware bootstrap flow with a Kipware bootstrap flow, and add device-side flash / switch-to-cosmos helpers.
  • 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.

Comment on lines 11 to +27
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"
Comment on lines +36 to +46
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
Comment on lines +49 to +52
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
Comment on lines +18 to +22
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
Comment on lines +45 to +49
# 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
Comment on lines +22 to +27
# 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.
@Savion
Copy link
Copy Markdown

Savion commented Jun 3, 2026

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:
pin stm32:PA4 used multiple times in config
pin PG8 used multiple times in config
error on temperature_sensor box: max_temp must have minimum of 1.79769e+308 ← max_temp unset (that's DBL_MAX)
bed_mesh: malformed value
error on strain_gauge: bed_max_err must have maximum of 10
error on extruder: pressure_advance_smooth_time must have minimum of 0.02

Is it possible there are some pin overlaps with the canvas pcb vs non?

pdscomp added 2 commits June 3, 2026 09:00
…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.
@pdscomp pdscomp merged commit 7be5f24 into main Jun 7, 2026
1 check passed
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
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.

3 participants