- Refactor various variables and defines
- Removed Card/BGA and OEM ID info as they are static and useless
- Commented out bkops functions completely as not used
- Remove extra buf usage when there's already storage for storing that data
- Optimize various functions to save space
- Clean up useless or duplicate code
Now the SD Card info function on hekate main will not rely on proper FAT partition, allowing for SDMMC init and FAT mounting to be separate for debugging issues with each one.
Additionally, add SDMMC error counters info.
If `fss0=` key is detected, sept will be loaded from fusee-secondary.bin instead of `sept/sept_*`.
This will negate missing sept and failed to decrypt pkg2 errors, when booting HOS, for users that forget to update sept folder.
Add a configuration option "Full w/ hashfile" to
the "verification" option menu, to enable hashfile
generation when doing full verification of a backup.
When enabled, during full backup verification we save the
chunk's SHA256 digest in a hashfile next to the output file
we're currently verifying.
The performance impact is negligible between "Full verify"
and "Full verify w/ hashfile", because we already
compute the SHA256 of the chunks when verifying.
We save the SHA256 per chunks (4 MB) because due to
SE limitations, we can't compute the SHA256 of the
whole partition (or rawnand).
On the other hand a pure software implementation
is way too slow to be bearable, even asm-optimized:
between 15 and 90 seconds per 4 MB chunk for
crc32/sha1/sha256, depending on the optimizations
and the actual algorithm.
The output hash file format is as follows:
# chunksize: <CHUNKSIZE_IN_BYTES>
sha256_of_chunk_1
sha256_of_chunk_2
...
sha256_of_chunk_N
- Use always aligned buffers to up the speed for DMA usage. For verification, backup and restore.
- Rework verification a little bit and make default Sparse mode.
Sparse mode protects from fake sd cards, bad sectors and frequent I/O corruption. Aka, ~100% of cases.