1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-25 21:07:32 +00:00

🔨 [2.0.9.7] Use older chitu_crypt.py

This commit is contained in:
Scott Lahteine 2023-07-04 00:19:45 -05:00
parent 5ac0c72bac
commit 743d3100fa
5 changed files with 15 additions and 24 deletions

View File

@ -28,7 +28,7 @@
/** /**
* Marlin release version identifier * 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 * 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 * here we define this default string as the date where the latest release
* version was tagged. * 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. * Defines a generic printer name to be output to the LCD after booting Marlin.

View File

@ -25,7 +25,7 @@
* Release version. Leave the Marlin version or apply a custom scheme. * Release version. Leave the Marlin version or apply a custom scheme.
*/ */
#ifndef SHORT_BUILD_VERSION #ifndef SHORT_BUILD_VERSION
#define SHORT_BUILD_VERSION "2.0.9.6" #define SHORT_BUILD_VERSION "2.0.9.7"
#endif #endif
/** /**
@ -42,7 +42,7 @@
* version was tagged. * version was tagged.
*/ */
#ifndef STRING_DISTRIBUTION_DATE #ifndef STRING_DISTRIBUTION_DATE
#define STRING_DISTRIBUTION_DATE "2023-03-25" #define STRING_DISTRIBUTION_DATE "2023-07-04"
#endif #endif
/** /**

View File

@ -5,7 +5,7 @@
# Examples: # Examples:
# use_example_configs # use_example_configs
# use_example_configs Creality/CR-10/CrealityV1 # 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 # If a configpath has spaces (or quotes) escape them or enquote the path
# #

View File

@ -4,9 +4,9 @@
# #
import pioutil import pioutil
if pioutil.is_pio_build(): if pioutil.is_pio_build():
import struct,uuid,marlin import os,random,struct,uuid,marlin
# Relocate firmware from 0x08000000 to 0x08008800
board = marlin.env.BoardConfig() marlin.relocate_firmware("0x08008800")
def calculate_crc(contents, seed): def calculate_crc(contents, seed):
accumulating_xor_value = seed; accumulating_xor_value = seed;
@ -105,22 +105,13 @@ if pioutil.is_pio_build():
# Encrypt ${PROGNAME}.bin and save it as 'update.cbd' # Encrypt ${PROGNAME}.bin and save it as 'update.cbd'
def encrypt(source, target, env): 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) encrypt_file(firmware, update, length)
fwsize = fwpath.stat().st_size
enname = board.get("build.crypt_chitu") firmware.close()
enpath = Path(target[0].dir.path) 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); marlin.add_post_action(encrypt);

View File

@ -1,3 +1,3 @@
# Where have all the configurations gone? # 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