esp8266: Add Python modules for initial configuration.
Main entry point is _boot.py which checks whether FAT FS in flash mountable,
and if so, mounts it. Otherwise, it checks if flash is empty, and if so,
performs initial module setup: makes FAT FS, configures default AP name,
etc. As a last option, if flash is not empty, and could not be mounted,
it means filesystem corruption, and warning message with instructions is
printed in an infinite loop.
2016-04-11 17:37:04 -04:00
|
|
|
import uos
|
|
|
|
import builtins
|
|
|
|
from flashbdev import bdev
|
|
|
|
|
|
|
|
try:
|
2016-04-18 10:14:00 -04:00
|
|
|
if bdev:
|
|
|
|
vfs = uos.VfsFat(bdev, "")
|
esp8266: Add Python modules for initial configuration.
Main entry point is _boot.py which checks whether FAT FS in flash mountable,
and if so, mounts it. Otherwise, it checks if flash is empty, and if so,
performs initial module setup: makes FAT FS, configures default AP name,
etc. As a last option, if flash is not empty, and could not be mounted,
it means filesystem corruption, and warning message with instructions is
printed in an infinite loop.
2016-04-11 17:37:04 -04:00
|
|
|
except OSError:
|
|
|
|
import inisetup
|
|
|
|
inisetup.check_bootsec()
|
|
|
|
uos.VfsFat.mkfs(bdev)
|
2016-04-14 17:56:21 -04:00
|
|
|
vfs = uos.VfsFat(bdev, "")
|
esp8266: Add Python modules for initial configuration.
Main entry point is _boot.py which checks whether FAT FS in flash mountable,
and if so, mounts it. Otherwise, it checks if flash is empty, and if so,
performs initial module setup: makes FAT FS, configures default AP name,
etc. As a last option, if flash is not empty, and could not be mounted,
it means filesystem corruption, and warning message with instructions is
printed in an infinite loop.
2016-04-11 17:37:04 -04:00
|
|
|
inisetup.wifi()
|