- Add file pre-allocations to greatly reduce overhead of FatFS.
This was missing before, because it takes 1.5KB payload size.
Speed bumps (no verify) are between 7 to 30% for exFAT and ~50% for FAT32, depending on the workload.
Currently bpmp loses access to the relevant registers when secmon or exosphere is launched.
This change provides support for all firmwares and properly sanitizes the display.
When the bootlogo is smaller than 720x1280, the background color will be set to match the color of bmp's 1st pixel.
This ends the limit of having to use a background color of 0x1B1B1B.
Based on tests they are not faster, even though the raw sleeps have less instuctions.
But having them call get_tmr breaks important logic.
Make both raw to avoid any future problems.
This will fix everything that uses a timer (or sleep).
Without this any function like eMMC/SD read/write/verify, TSEC/SE, etc can break when the time reaches the max value of the u32 microsecond timer (71minutes).
This fixes every possible breakage, including backup and restore (read/write/verify errors) that takes a lot of time.
The new max before a timer reset is now 48 days (the old one was 71 minutes)
The real reason for the "battery de-sync" is a misconfig of MAX77620 low battery monitor.
So there's no real battery battery de-sync.
Thanks @natinusala and @perillamint for finding this
When the commit with the configuration will be a available, these 3 options will exist:
- Disable verification
- Sparse verification (Fast)
- Full (Slow)
Sparse will take approx 8 minutes for rawnand.bin and Full will take 4.5 hours.
* Make FatFS thread safe via malloc and remove alloca.
* Fix memory leak from emmc gpt parsing
* Always unmount SD card in menu and when launching
* Use folders for Backup/Dump/Restore operations
* Add error report for some important f_opens
* Don't let partial dumping if backup chosen is not GPP or USER.
* [INI] Fix memory leaks + other fixes
* Add ini_free
* check and return if NULL pointer in free()
* Add button check with timeout
* Fix a bug in menu rendering that tries to parse a string without existing
* Change initial cnt value to max (fixes menus with first entry not a selectable entry)
* Some & ? clarifications
* [INI] Add get selected boot cfg
- This allows to free ini as we launch the firmware and have the lowest mem leak
* [INI] Rename ini section clone/free functions
Switch's filesystem sys module has a bug which rejects files if the archive bit is set.
This tool, clears this attribute and will help users using Windows to edit/copy/create files in SD card.
- Sanitize framebuffer. Original idea from @StevenMattera
- Change clear framebuffer to memset (for grey colors), for performance (we don't use alpha blending, so it does not matter to set it to 0xFF).
- Enable screen backlight after gfx init
- Reduce wait time for emmc/sd read/write retries to 100ms.
This provides support for the 3.0.2 kernel, where pkg1 has the same id with 3.0.1.
Thanks @roblabla for noticing and providing the Debug mode kernel patch.
So, it's time to move 1.0.0 secmon.
If we want to continue having a full featured bootloader, this change is a must.
It will move the secmon to 0x4002B000 + 0x20 (to keep the values addresses aligned).
It fixes relocator patch.
So now the payload size limit is 160KB - .bss (~158KB).
Actually this corrects sdram cfg parsing in LP0.
The cfg is missing 3 variables, which ultimately are unused in T210.
Remove them and fix LP0 configuration saving.
The console sleep, still does not work. But now it tries to enter/leave sleep and halts with backlight on.
At least, this reminds the user to power off the console to not deplete the battery completely.