Skip to content

Commit

Permalink
Revert to esptool v3.3
Browse files Browse the repository at this point in the history
This is necessary due to the hash verification in v4 preventing the use of a universal bootloader.
  • Loading branch information
thorrak committed Aug 7, 2022
1 parent 8b8eaf4 commit c5622ae
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
19 changes: 10 additions & 9 deletions Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import brewflasher_com_integration
firmware_list = brewflasher_com_integration.FirmwareList()

__version__ = "1.3"
__version__ = "1.4"
# __flash_help__ = '''
# <p>This setting depends on your device - but in most cases you will want to use DIO.<p>
# <p>
Expand Down Expand Up @@ -104,7 +104,8 @@ def run(self):
return

print("Downloading firmware...")
if self._config.firmware_obj.download_to_file():
device_family = firmware_list.DeviceFamilies[self._config.firmware_obj.family_id]
if self._config.firmware_obj.download_to_file(device_family=device_family):
print("Downloaded successfully!\n")
else:
print("Error - unable to download firmware.\n")
Expand Down Expand Up @@ -140,8 +141,8 @@ def run(self):
command_extension.append(self._config.firmware_obj.full_filepath("partitions"))

# For now, I'm assuming bootloader flashing is ESP32 only
if len(self._config.firmware_obj.download_url_bootloader) > 0 and \
len(self._config.firmware_obj.checksum_bootloader) > 0:
if len(device_family.download_url_bootloader) > 0 and \
len(device_family.checksum_bootloader) > 0:
command_extension.append("0x1000")
command_extension.append(self._config.firmware_obj.full_filepath("bootloader"))

Expand All @@ -164,11 +165,11 @@ def run(self):
command_extension.append(self._config.firmware_obj.full_filepath("spiffs"))

# For both ESP32 and ESP8266 we can directly flash an image to the otadata section
if len(self._config.firmware_obj.download_url_otadata) > 0 and \
len(self._config.firmware_obj.checksum_otadata) > 0 and \
len(self._config.firmware_obj.otadata_address) > 2:
if len(device_family.download_url_otadata) > 0 and \
len(device_family.checksum_otadata) > 0 and \
len(device_family.otadata_address) > 2:
# We need to flash the otadata section. The location is dependent on the partition scheme
command_extension.append(self._config.firmware_obj.otadata_address)
command_extension.append(device_family.otadata_address)
command_extension.append(self._config.firmware_obj.full_filepath("otadata"))

if not self._config.port.startswith(__auto_select__):
Expand Down Expand Up @@ -270,7 +271,7 @@ def load(cls, file_path):
if os.path.exists(file_path):
with open(file_path, 'r') as f:
data = json.load(f)
conf.port = data['port']
# conf.port = data['port']
conf.baud = data['baud']
# conf.mode = data['mode']
conf.erase_before_flash = data['erase']
Expand Down
6 changes: 3 additions & 3 deletions build-on-mac-m1.spec
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ exe = EXE(pyz,
codesign_identity='Developer ID Application: John Beeler (RAS94LVJ7S)',
console=False , icon='images/icon-512.icns')
app = BUNDLE(exe,
name='BrewFlasher-1.3.app',
name='BrewFlasher-1.4.app',
icon='./images/icon-512.icns',
bundle_identifier='com.brewflasher.macos',
info_plist={
'NSPrincipalClass': 'NSApplication',
'NSAppleScriptEnabled': False,
'LSRequiresIPhoneOS': False,
'LSApplicationCategoryType': 'public.app-category.utilities',
'CFBundleVersion': '1.3.0',
'CFBundleShortVersionString': '1.3',
'CFBundleVersion': '1.4.0',
'CFBundleShortVersionString': '1.4',
'CFBundleSignature': 'BFLS',
'LSMinimumSystemVersion': '10.4.0'
},
Expand Down
6 changes: 3 additions & 3 deletions build-on-mac.spec
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ exe = EXE(pyz,
codesign_identity='Developer ID Application: John Beeler (RAS94LVJ7S)',
console=False , icon='images/icon-512.icns')
app = BUNDLE(exe,
name='BrewFlasher-1.3.app',
name='BrewFlasher-1.4.app',
icon='./images/icon-512.icns',
bundle_identifier='com.brewflasher.macos',
info_plist={
'NSPrincipalClass': 'NSApplication',
'NSAppleScriptEnabled': False,
'LSRequiresIPhoneOS': False,
'LSApplicationCategoryType': 'public.app-category.utilities',
'CFBundleVersion': '1.3.0',
'CFBundleShortVersionString': '1.3',
'CFBundleVersion': '1.4.0',
'CFBundleShortVersionString': '1.4',
'CFBundleSignature': 'BFLS',
'LSMinimumSystemVersion': '10.4.0'
},
Expand Down
2 changes: 1 addition & 1 deletion build-on-win.spec
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ exe = EXE(pyz,
a.zipfiles,
a.datas,
[],
name='BrewFlasher-1.3',
name='BrewFlasher-1.4',
debug=False,
bootloader_ignore_signals=False,
strip=False,
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# esptool==4.1
# We need to use my version of esptool, as the "esptool.py" utility file creates issues with PyInstaller
git+https://github.com/thorrak/esptool.git@v41_noutil
esptool==3.3
# For v4+ of esptool, We need to use my version of esptool, as the "esptool.py" utility file creates issues with PyInstaller
# git+https://github.com/thorrak/esptool.git@v41_noutil
wxPython
# Previously PyInstaller 3.4 was used - this has security vulnerabilities per GitHub
PyInstaller==5.2
Expand Down

0 comments on commit c5622ae

Please sign in to comment.