summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGirts Folkmanis <girtsf@users.noreply.github.com>2017-07-22 15:54:50 -0700
committerScott Shawcroft <scott@tannewt.org>2017-07-22 21:18:37 -0400
commitaf1ede930ba643d68850c541ef4075d5f7fd4f02 (patch)
tree410078a49352fd9a096cc71e21bfea2a69336d77
parentbd4a9755300287de8cf66f917d8f9dd2b59109f2 (diff)
esp8266: fix "uos" includes
Fix couple places in startup scripts that still had "import uos". This would cause an exception when _boot.py was executed during startup.
-rw-r--r--esp8266/modules/_boot.py5
-rw-r--r--esp8266/modules/inisetup.py10
-rw-r--r--esp8266/modules/webrepl_setup.py1
3 files changed, 8 insertions, 8 deletions
diff --git a/esp8266/modules/_boot.py b/esp8266/modules/_boot.py
index 81eb20dd6..cbaf2aba6 100644
--- a/esp8266/modules/_boot.py
+++ b/esp8266/modules/_boot.py
@@ -1,11 +1,12 @@
import gc
gc.threshold((gc.mem_free() + gc.mem_alloc()) // 4)
-import uos
from flashbdev import bdev
+import storage
try:
if bdev:
- uos.mount(bdev, '/')
+ vfs = storage.VfsFat(bdev)
+ storage.mount(vfs, '/')
except OSError:
import inisetup
inisetup.setup()
diff --git a/esp8266/modules/inisetup.py b/esp8266/modules/inisetup.py
index af78dfad5..192ff5ea8 100644
--- a/esp8266/modules/inisetup.py
+++ b/esp8266/modules/inisetup.py
@@ -1,6 +1,6 @@
-import uos
-import network
from flashbdev import bdev
+import network
+import storage
def wifi():
import ubinascii
@@ -36,9 +36,9 @@ def setup():
check_bootsec()
print("Performing initial setup")
wifi()
- uos.VfsFat.mkfs(bdev)
- vfs = uos.VfsFat(bdev)
- uos.mount(vfs, '/')
+ storage.VfsFat.mkfs(bdev)
+ vfs = storage.VfsFat(bdev)
+ storage.mount(vfs, '/')
with open("boot.py", "w") as f:
f.write("""\
# This file is executed on every boot (including wake-boot from deepsleep)
diff --git a/esp8266/modules/webrepl_setup.py b/esp8266/modules/webrepl_setup.py
index 473067974..52c76863a 100644
--- a/esp8266/modules/webrepl_setup.py
+++ b/esp8266/modules/webrepl_setup.py
@@ -1,5 +1,4 @@
import sys
-#import uos as os
import os
import machine