summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'esp8266/scripts')
-rw-r--r--esp8266/scripts/_boot.py3
-rw-r--r--esp8266/scripts/flashbdev.py5
2 files changed, 6 insertions, 2 deletions
diff --git a/esp8266/scripts/_boot.py b/esp8266/scripts/_boot.py
index 2b261fb475..7e38f03236 100644
--- a/esp8266/scripts/_boot.py
+++ b/esp8266/scripts/_boot.py
@@ -3,7 +3,8 @@ import builtins
from flashbdev import bdev
try:
- vfs = uos.VfsFat(bdev, "")
+ if bdev:
+ vfs = uos.VfsFat(bdev, "")
except OSError:
import inisetup
inisetup.check_bootsec()
diff --git a/esp8266/scripts/flashbdev.py b/esp8266/scripts/flashbdev.py
index 09223d8e7e..f1e85d923b 100644
--- a/esp8266/scripts/flashbdev.py
+++ b/esp8266/scripts/flashbdev.py
@@ -26,4 +26,7 @@ class FlashBdev:
if op == 5: # BP_IOCTL_SEC_SIZE
return self.SEC_SIZE
-bdev = FlashBdev()
+if esp.flash_size() < 1024*1024:
+ bdev = None
+else:
+ bdev = FlashBdev()