Merge pull request #812 from dhalbert/2.x-filesystem-writability-on-boot
2.x: Fix regression preventing remount as readwrite in boot.py
This commit is contained in:
commit
6e95c90401
@ -762,6 +762,11 @@ int main(void) {
|
|||||||
// USB isn't up, so we can write the file.
|
// USB isn't up, so we can write the file.
|
||||||
flash_set_usb_writeable(false);
|
flash_set_usb_writeable(false);
|
||||||
f_open(fs, boot_output_file, CIRCUITPY_BOOT_OUTPUT_FILE, FA_WRITE | FA_CREATE_ALWAYS);
|
f_open(fs, boot_output_file, CIRCUITPY_BOOT_OUTPUT_FILE, FA_WRITE | FA_CREATE_ALWAYS);
|
||||||
|
|
||||||
|
// Switch the filesystem back to non-writable by Python now instead of later,
|
||||||
|
// since boot.py might change it back to writable.
|
||||||
|
flash_set_usb_writeable(true);
|
||||||
|
|
||||||
// Write version info to boot_out.txt.
|
// Write version info to boot_out.txt.
|
||||||
mp_hal_stdout_tx_str(MICROPY_FULL_VERSION_INFO);
|
mp_hal_stdout_tx_str(MICROPY_FULL_VERSION_INFO);
|
||||||
mp_hal_stdout_tx_str("\r\n");
|
mp_hal_stdout_tx_str("\r\n");
|
||||||
@ -779,7 +784,6 @@ int main(void) {
|
|||||||
flash_flush();
|
flash_flush();
|
||||||
boot_output_file = NULL;
|
boot_output_file = NULL;
|
||||||
}
|
}
|
||||||
flash_set_usb_writeable(true);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Reset to remove any state that boot.py setup. It should only be used to
|
// Reset to remove any state that boot.py setup. It should only be used to
|
||||||
|
Loading…
Reference in New Issue
Block a user