Commit eea58486 authored by Damien George's avatar Damien George

esp8266/modules: Mount filesystem at root when creating for first time.

parent e26fb3ad
...@@ -8,6 +8,6 @@ try: ...@@ -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(): ...@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment