esp32/modules/inisetup.py: Format partition as FAT if its label is ffat.
Signed-off-by: Wind-stormger <storm-wind@foxmail.com>
This commit is contained in:
parent
2ede7c6c21
commit
23fe170da4
|
@ -37,8 +37,12 @@ by firmware programming).
|
||||||
def setup():
|
def setup():
|
||||||
check_bootsec()
|
check_bootsec()
|
||||||
print("Performing initial setup")
|
print("Performing initial setup")
|
||||||
os.VfsLfs2.mkfs(bdev)
|
if bdev.info()[4] == "vfs":
|
||||||
vfs = os.VfsLfs2(bdev)
|
os.VfsLfs2.mkfs(bdev)
|
||||||
|
vfs = os.VfsLfs2(bdev)
|
||||||
|
elif bdev.info()[4] == "ffat":
|
||||||
|
os.VfsFat.mkfs(bdev)
|
||||||
|
vfs = os.VfsFat(bdev)
|
||||||
os.mount(vfs, "/")
|
os.mount(vfs, "/")
|
||||||
with open("boot.py", "w") as f:
|
with open("boot.py", "w") as f:
|
||||||
f.write(
|
f.write(
|
||||||
|
|
Loading…
Reference in New Issue