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:
parent
bd4a975530
commit
af1ede930b
@ -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()
|
||||
|
@ -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)
|
||||
|
@ -1,5 +1,4 @@
|
||||
import sys
|
||||
#import uos as os
|
||||
import os
|
||||
import machine
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user