* [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.
Others:
*Add cluster size in SD card info
*Add error message for emmc read failure. Also fix return value.
*Added more comments and more constant naming
*Remove option to ignore errors and abort right away.
In the end what's the point if you end up with corrupted backup.
*Always create partial.idx before running on errors.
*Allow forced partial dumping on exFAT with large space, by creating the correct patial.idx file
*Some cleanup
* Make button check delay 1s to avoid button repressing from "button ip" state
* Dumping: Fix part logic and honor user actions on ignoring errors
* Add time taken to dump emmc
Now that the cid/csd/ssr/etc bytes/bitfields are correct:
* MMC/SD: Add cid/csd parsing and use new cid/csd variables
* SD: Add ssr (sd status) reading/parsing
* MMC/SD: Change many hardcoded values to named ones
* MMC/SD: Fix scr and csd byte/bitfield ordering
* MMC: Add ext csd parsing and using these variables isntead of arrays
* MMC: Fix BKOPS support but disabled
* SD: Add partial sd v1 support
* SD: Fix we support low voltage OCR bit
* SD: Add scr parsing and using these variables instead of hardcoded ones
Write error to sd is now fatal as per FatFs guidelines.
Let the user choose to continue or to abort and try again.
Add a message to let the user know that we calculate free space