Skip to content

Commit 743d310

Browse files
committed
🔨 [2.0.9.7] Use older chitu_crypt.py
1 parent 5ac0c72 commit 743d310

File tree

5 files changed

+15
-24
lines changed

5 files changed

+15
-24
lines changed

Marlin/Version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
/**
2929
* Marlin release version identifier
3030
*/
31-
//#define SHORT_BUILD_VERSION "2.0.9.6"
31+
//#define SHORT_BUILD_VERSION "2.0.9.7"
3232

3333
/**
3434
* Verbose version identifier which should contain a reference to the location
@@ -41,7 +41,7 @@
4141
* here we define this default string as the date where the latest release
4242
* version was tagged.
4343
*/
44-
//#define STRING_DISTRIBUTION_DATE "2023-03-25"
44+
//#define STRING_DISTRIBUTION_DATE "2023-07-04"
4545

4646
/**
4747
* Defines a generic printer name to be output to the LCD after booting Marlin.

Marlin/src/inc/Version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* Release version. Leave the Marlin version or apply a custom scheme.
2626
*/
2727
#ifndef SHORT_BUILD_VERSION
28-
#define SHORT_BUILD_VERSION "2.0.9.6"
28+
#define SHORT_BUILD_VERSION "2.0.9.7"
2929
#endif
3030

3131
/**
@@ -42,7 +42,7 @@
4242
* version was tagged.
4343
*/
4444
#ifndef STRING_DISTRIBUTION_DATE
45-
#define STRING_DISTRIBUTION_DATE "2023-03-25"
45+
#define STRING_DISTRIBUTION_DATE "2023-07-04"
4646
#endif
4747

4848
/**

buildroot/bin/use_example_configs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Examples:
66
# use_example_configs
77
# use_example_configs Creality/CR-10/CrealityV1
8-
# use_example_configs release-2.0.9.6:Creality/CR-10/CrealityV1
8+
# use_example_configs release-2.0.9.7:Creality/CR-10/CrealityV1
99
#
1010
# If a configpath has spaces (or quotes) escape them or enquote the path
1111
#

buildroot/share/PlatformIO/scripts/chitu_crypt.py

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
#
55
import pioutil
66
if pioutil.is_pio_build():
7-
import struct,uuid,marlin
8-
9-
board = marlin.env.BoardConfig()
7+
import os,random,struct,uuid,marlin
8+
# Relocate firmware from 0x08000000 to 0x08008800
9+
marlin.relocate_firmware("0x08008800")
1010

1111
def calculate_crc(contents, seed):
1212
accumulating_xor_value = seed;
@@ -105,22 +105,13 @@ def encrypt_file(input, output_file, file_length):
105105

106106
# Encrypt ${PROGNAME}.bin and save it as 'update.cbd'
107107
def encrypt(source, target, env):
108-
from pathlib import Path
109-
110-
fwpath = Path(target[0].path)
111-
fwsize = fwpath.stat().st_size
108+
firmware = open(target[0].path, "rb")
109+
update = open(target[0].dir.path + '/update.cbd', "wb")
110+
length = os.path.getsize(target[0].path)
112111

113-
enname = board.get("build.crypt_chitu")
114-
enpath = Path(target[0].dir.path)
112+
encrypt_file(firmware, update, length)
115113

116-
fwfile = fwpath.open("rb")
117-
enfile = (enpath / enname).open("wb")
114+
firmware.close()
115+
update.close()
118116

119-
print(f"Encrypting {fwpath} to {enname}")
120-
encrypt_file(fwfile, enfile, fwsize)
121-
fwfile.close()
122-
enfile.close()
123-
fwpath.unlink()
124-
125-
marlin.relocate_firmware("0x08008800")
126117
marlin.add_post_action(encrypt);

config/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Where have all the configurations gone?
22

3-
## https://github.com/MarlinFirmware/Configurations/archive/release-2.0.9.6.zip
3+
## https://github.com/MarlinFirmware/Configurations/archive/release-2.0.9.7.zip

0 commit comments

Comments
 (0)