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.
This commit is contained in:
Girts Folkmanis 2017-07-22 15:54:50 -07:00 committed by Scott Shawcroft
parent bd4a975530
commit af1ede930b
3 changed files with 8 additions and 8 deletions

View File

@ -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()

View File

@ -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)

View File

@ -1,5 +1,4 @@
import sys
#import uos as os
import os
import machine