esp8266/modules: Mount filesystem at root when creating for first time.
This commit is contained in:
parent
e26fb3ad73
commit
eea584860d
@ -8,6 +8,6 @@ try:
|
|||||||
uos.mount(bdev, '/')
|
uos.mount(bdev, '/')
|
||||||
except OSError:
|
except OSError:
|
||||||
import inisetup
|
import inisetup
|
||||||
vfs = inisetup.setup()
|
inisetup.setup()
|
||||||
|
|
||||||
gc.collect()
|
gc.collect()
|
||||||
|
@ -38,8 +38,7 @@ def setup():
|
|||||||
wifi()
|
wifi()
|
||||||
uos.VfsFat.mkfs(bdev)
|
uos.VfsFat.mkfs(bdev)
|
||||||
vfs = uos.VfsFat(bdev)
|
vfs = uos.VfsFat(bdev)
|
||||||
uos.mount(vfs, '/flash')
|
uos.mount(vfs, '/')
|
||||||
uos.chdir('/flash')
|
|
||||||
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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user