esp8266/modules/flashbdev: Remove code to patch bootloader flash size.

This code is no longer pertinent for some time - since switchover to
SDK2.0, there must be correct flash size set for bootloader, or there's
a risk of flash data corruption. And indeed, the correct flash size is
by default auto-detected by esptool.py 1.2.
This commit is contained in:
Paul Sokolovsky 2017-01-05 22:26:23 +03:00
parent 5d0d61586c
commit 4a72294d7d
1 changed files with 0 additions and 15 deletions

View File

@ -46,21 +46,6 @@ def set_bl_flash_size(real_size):
esp.flash_erase(0)
esp.flash_write(0, buf)
# If bootloader size ID doesn't correspond to real Flash size,
# fix bootloader value and reboot.
size = esp.flash_id() >> 16
# Check that it looks like realistic power of 2 for flash sizes
# commonly used with esp8266
if 22 >= size >= 18:
size = 1 << size
if size != esp.flash_size():
import machine
import time
print("Bootloader Flash size appear to have been set incorrectly, trying to fix")
set_bl_flash_size(size)
machine.reset()
while 1: time.sleep(1)
size = esp.flash_size()
if size < 1024*1024:
bdev = None