From 743d3100fa7b7cb00d2456652e2604f0c63c16f3 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 4 Jul 2023 00:19:45 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20[2.0.9.7]=20Use=20older=20chitu?= =?UTF-8?q?=5Fcrypt.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Version.h | 4 +-- Marlin/src/inc/Version.h | 4 +-- buildroot/bin/use_example_configs | 2 +- .../share/PlatformIO/scripts/chitu_crypt.py | 27 +++++++------------ config/README.md | 2 +- 5 files changed, 15 insertions(+), 24 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 172c92b286..bbeb3084f0 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -28,7 +28,7 @@ /** * Marlin release version identifier */ -//#define SHORT_BUILD_VERSION "2.0.9.6" +//#define SHORT_BUILD_VERSION "2.0.9.7" /** * Verbose version identifier which should contain a reference to the location @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2023-03-25" +//#define STRING_DISTRIBUTION_DATE "2023-07-04" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 1e9a5f9e12..7ddd04a976 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -25,7 +25,7 @@ * Release version. Leave the Marlin version or apply a custom scheme. */ #ifndef SHORT_BUILD_VERSION - #define SHORT_BUILD_VERSION "2.0.9.6" + #define SHORT_BUILD_VERSION "2.0.9.7" #endif /** @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2023-03-25" + #define STRING_DISTRIBUTION_DATE "2023-07-04" #endif /** diff --git a/buildroot/bin/use_example_configs b/buildroot/bin/use_example_configs index 2bb582379b..728e113e19 100755 --- a/buildroot/bin/use_example_configs +++ b/buildroot/bin/use_example_configs @@ -5,7 +5,7 @@ # Examples: # use_example_configs # use_example_configs Creality/CR-10/CrealityV1 -# use_example_configs release-2.0.9.6:Creality/CR-10/CrealityV1 +# use_example_configs release-2.0.9.7:Creality/CR-10/CrealityV1 # # If a configpath has spaces (or quotes) escape them or enquote the path # diff --git a/buildroot/share/PlatformIO/scripts/chitu_crypt.py b/buildroot/share/PlatformIO/scripts/chitu_crypt.py index 4e81061a19..cd909f55bd 100644 --- a/buildroot/share/PlatformIO/scripts/chitu_crypt.py +++ b/buildroot/share/PlatformIO/scripts/chitu_crypt.py @@ -4,9 +4,9 @@ # import pioutil if pioutil.is_pio_build(): - import struct,uuid,marlin - - board = marlin.env.BoardConfig() + import os,random,struct,uuid,marlin + # Relocate firmware from 0x08000000 to 0x08008800 + marlin.relocate_firmware("0x08008800") def calculate_crc(contents, seed): accumulating_xor_value = seed; @@ -105,22 +105,13 @@ if pioutil.is_pio_build(): # Encrypt ${PROGNAME}.bin and save it as 'update.cbd' def encrypt(source, target, env): - from pathlib import Path + firmware = open(target[0].path, "rb") + update = open(target[0].dir.path + '/update.cbd', "wb") + length = os.path.getsize(target[0].path) - fwpath = Path(target[0].path) - fwsize = fwpath.stat().st_size + encrypt_file(firmware, update, length) - enname = board.get("build.crypt_chitu") - enpath = Path(target[0].dir.path) + firmware.close() + update.close() - fwfile = fwpath.open("rb") - enfile = (enpath / enname).open("wb") - - print(f"Encrypting {fwpath} to {enname}") - encrypt_file(fwfile, enfile, fwsize) - fwfile.close() - enfile.close() - fwpath.unlink() - - marlin.relocate_firmware("0x08008800") marlin.add_post_action(encrypt); diff --git a/config/README.md b/config/README.md index 1906198c52..3c384ab5ac 100644 --- a/config/README.md +++ b/config/README.md @@ -1,3 +1,3 @@ # Where have all the configurations gone? -## https://github.com/MarlinFirmware/Configurations/archive/release-2.0.9.6.zip +## https://github.com/MarlinFirmware/Configurations/archive/release-2.0.9.7.zip