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 import gc
gc.threshold((gc.mem_free() + gc.mem_alloc()) // 4) gc.threshold((gc.mem_free() + gc.mem_alloc()) // 4)
import uos
from flashbdev import bdev from flashbdev import bdev
import storage
try: try:
if bdev: if bdev:
uos.mount(bdev, '/') vfs = storage.VfsFat(bdev)
storage.mount(vfs, '/')
except OSError: except OSError:
import inisetup import inisetup
inisetup.setup() inisetup.setup()

View File

@ -1,6 +1,6 @@
import uos
import network
from flashbdev import bdev from flashbdev import bdev
import network
import storage
def wifi(): def wifi():
import ubinascii import ubinascii
@ -36,9 +36,9 @@ def setup():
check_bootsec() check_bootsec()
print("Performing initial setup") print("Performing initial setup")
wifi() wifi()
uos.VfsFat.mkfs(bdev) storage.VfsFat.mkfs(bdev)
vfs = uos.VfsFat(bdev) vfs = storage.VfsFat(bdev)
uos.mount(vfs, '/') storage.mount(vfs, '/')
with open("boot.py", "w") as f: with open("boot.py", "w") as f:
f.write("""\ f.write("""\
# This file is executed on every boot (including wake-boot from deepsleep) # This file is executed on every boot (including wake-boot from deepsleep)

View File

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