Commit Graph
100 Commits
Author SHA1 Message Date
Kostas Missos 7803bbcd83 Add payload launching. Supports all CFW bins, Linux, Tools. 2018-08-23 05:05:31 +03:00
Kostas Missos 382f727be3 Fix all the bugs
- Mem leaks
- Stack corruption
- Div by 0
- Double frees
2018-08-23 04:37:02 +03:00
Kostas Missos 6a554eec6c Update Readme + Fix Auto Update 2018-08-23 04:27:49 +03:00
Kostas Missos 0540128709 Faster backups
- 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.
2018-08-22 03:42:25 +03:00
Kostas Missos da5a1a9641 Fix a critical bug with exFAT FatFs + a list bug
Nintendo you hear? Fix your driver already.
(for us never caused any problem, because we always sync fs dir changes to medium.)
2018-08-22 03:38:25 +03:00
Kostas Missos c5a6ad823e Add payload/libtools launching prerequisites 2018-08-21 04:45:19 +03:00
Kostas Missos 463383abca AutoRCM disabler support for all AutoRCM versions 2018-08-21 04:43:00 +03:00
Kostas Missos 13a07663ee Add autolaunch updated bootloader (mostly for modchips) 2018-08-21 04:41:16 +03:00
Kostas Missos 5328f89ffe Add support for split inis in 'bootloader/ini'
- A new option was added to Launch.
- These can be configured for autoboot
2018-08-21 04:37:40 +03:00
Kostas Missos 7e876388b4 Bugfixes
- Fixed partial dumping filename/bar position
- Add return for menu function handler
- More files to bootloader folder
2018-08-21 04:26:14 +03:00
Kostas Missos bf816c5107 Move everything to 'bootloader' folder to reduce clutter
+ Make everything all lowercase
2018-08-21 04:21:09 +03:00
Kostas Missos 1d623eacf9 Our 1st module. LP0 configuration. 2018-08-21 04:14:31 +03:00
Kostas Missos 3d6216a6f3 Deploy ianos. Our elf/module loader. 2018-08-21 04:12:03 +03:00
Kostas Missos 5fd9daa364 Add display_end fix for all fw + easter egg
The easter egg is sth that was forgotten in booting via hekate's hwinit.
2018-08-14 02:30:44 +03:00
Kostas Missos 6b8887b5d8 Move display_end before secmon + add boolean supp.
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.
2018-08-13 12:12:53 +03:00
Kostas Missos e5abdd938e Refactor ALL the things + enable LTO 2018-08-13 11:58:24 +03:00
Kostas Missos 2666b440ef Merge pull request #66 from m4xw/feature/elf_loader
Implement basic elfloader/module support
2018-08-08 00:25:40 +03:00
Kostas Missos 71c4e2c155 Merge pull request #63 from misson20000/misson20000-patch-1
Update README.md to document `atmosphere` option in hekate.ini
2018-08-06 10:15:41 +03:00
Kostas Missos 355ebb6acf Whitespaces, fixes 2018-08-05 14:40:32 +03:00
Kostas Missos c9379d97a3 Merge pull request #62 from rajkosto/pull_improvenogc
Better nogc patch, no longer causes 10s hang on bootup and wakeup
2018-08-05 13:50:08 +03:00
Kostas Missos e9d1256df8 Merge pull request #51 from rajkosto/kip1patching
Add KIP1 patching support (with 2 FS patches included)
2018-07-29 23:09:25 +03:00
Kostas Missos d33f60e924 Add unique id to backup folder
+ Choose to boot into HOS if no SD card or .ini

*The unique id for the backup folder is eMMC's serial number.
2018-07-22 15:24:09 +03:00
Kostas Missos 39653f7678 Bugfixes + Unfattening + Remove white on boot 2018-07-22 15:18:30 +03:00
Kostas Missos bc67798f43 More unfattening (like always) 2018-07-10 16:59:03 +03:00
Kostas Missos 1988e3f19d Bump version to v3.2
Forgot to commit that ^^
2018-07-09 23:22:11 +03:00
Kostas Missos 7af531de77 Add sleep mode support for 3.X.X. ^^ 2018-07-09 23:01:40 +03:00
Kostas Missos a77783b922 Add dumping of decrypted package2 2018-07-09 22:16:42 +03:00
Kostas Missos 33457ad8f8 As always remove more uneeded stuff 2018-07-09 22:13:56 +03:00
Kostas Missos 828b616468 Add status bar (battery info)
This gets updated in menus and backup/restore options and it's still visible to other options
2018-07-09 16:06:17 +03:00
Kostas Missos 2f120d1cbb Change partial backup msg + some fixes 2018-07-09 16:02:47 +03:00
Kostas Missos a5f2bb9d57 Support custom backcolor when logo is smaller
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.
2018-07-09 15:55:09 +03:00
Kostas Missos 60905c3829 Don't run hos keygen twice + Fix memory leaks 2018-07-07 18:36:18 +03:00
Kostas Missos 19e9292128 More unfattening 2018-07-07 18:34:33 +03:00
Kostas Missos 6d556bf213 Remove null term from "" as suggested
Additionally rename the archive bits again ( :) ) to have a little better syntax.
2018-07-06 16:11:51 +03:00
Kostas Missos eecdca3f03 Bump version to v3.1 2018-07-05 02:03:01 +03:00
Kostas Missos a14f554657 Make the sleeps faster
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.
2018-07-05 02:02:17 +03:00
Kostas Missos 879fc643d9 Add important fuse info (like burnt eFuses) 2018-07-05 01:51:36 +03:00
Kostas Missos 5e8eb1c57a Implement ms timer and fix all timers
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)
2018-07-04 18:39:26 +03:00
Kostas Missos ebb9ca5bf5 Fix partial+single backup/restore verification
and archive bit for switch folder.
2018-07-04 18:28:03 +03:00
Kostas Missos d16477ed20 Merge pull request #26 from TheDgtl/4_x_x_patch_fix
Fix Atmosphere's kernel patches for 4.x
2018-07-03 01:45:34 +03:00
Kostas Missos d4731bb540 Split remove archive bit in two
1. Only switch folder and its subfolders/files
2. Everything in sd card
2018-07-02 17:12:15 +03:00
Kostas Missos 3e35d99a3b Bump version to v3.0 2018-07-01 20:47:54 +03:00
Kostas Missos 57399e4df1 Add restore options 2018-07-01 20:46:22 +03:00
Kostas Missos 6df5fdc9c3 Add auto boot 2018-07-01 20:45:52 +03:00
Kostas Missos 94bd9a24d3 Add global configuration and saving mechanism 2018-07-01 20:45:25 +03:00
Kostas Missos a442737a59 Update ini parsing to the new version 2018-07-01 20:29:30 +03:00
Kostas Missos df8e6ea57d Add hekate new style .ini template 2018-07-01 20:26:26 +03:00
Kostas Missos f22616894c Update README and README_BOOTLOGO 2018-07-01 20:21:25 +03:00
Kostas Missos 7b97015df6 Fix low battery shutdown tool 2
(forgot the driver changes)
2018-07-01 17:01:10 +03:00
Kostas Missos 9672650d1a Fix low battery shutdown tool
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
2018-07-01 16:58:59 +03:00
Kostas Missos 42d743d9d5 Fix build 2018-07-01 05:06:13 +03:00
Kostas Missos ffeb8c60df Preliminary Exosphère support 2018-07-01 05:03:17 +03:00
Kostas Missos d9dba2b182 Fix timing issues with battery desync fix 2018-07-01 04:58:37 +03:00
Kostas Missos e5a34c3818 Small unfattening 2018-07-01 04:56:58 +03:00
Kostas Missos 0c5c827d0b Add battery/charge info + bugfixes 2018-06-28 04:05:19 +03:00
Kostas Missos 3908493cf5 Fix the accents lost in commits 2018-06-28 00:40:43 +03:00
Kostas Missos 6561a3e738 Preparation for adding config + restore options 2018-06-28 00:36:18 +03:00
Kostas Missos 66b6c5cdf0 Add 16px font support back 2018-06-28 00:21:05 +03:00
Kostas Missos 3175dbc1c9 Prepare about for 16px font 2018-06-26 19:09:26 +03:00
Kostas Missos 37a15ca8ff Make Backup verifying faster by using SE's SHA256 2018-06-26 19:07:34 +03:00
Kostas Missos 3f18713f53 Add seconds timer + bugfixes 2018-06-26 19:00:46 +03:00
Kostas Missos c215b1c74c Disable verification for now & add memcmp32sparse
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.
2018-06-24 23:02:35 +03:00
Kostas Missos 60f4000e9d Fix build 2018-06-24 22:42:46 +03:00
Kostas Missos 52506def30 Add Battery Charger & Fuel Gauge dirvers
* Add Fuel gauge configuration fix
* Add Battery de-sync fix
* Fuel gauge registers dumping
* Add help and battery status in menu
2018-06-24 22:38:32 +03:00
Kostas Missos 6961769a86 Name more hardcoded values 2018-06-24 22:31:24 +03:00
Kostas Missos df30512fd9 [Info] Add current bus maximum rate and refactor a bit 2018-06-23 07:18:53 +03:00
Kostas Missos 532a9f9949 [Tools] dump_emmc_verify() :/
With a working verify functions, the speed is 10.5 times slower.
(A 2.5 seconds operation takes now 28 minutes)

TODO: Find a faster way!
2018-06-23 07:12:30 +03:00
Kostas Missos bee8004b74 [GFX] Add position saving and muting 2018-06-23 07:07:53 +03:00
Kostas Missos f3149e0be3 FatFS and general file operations fixes
* 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.
2018-06-23 07:04:41 +03:00
Kostas Missos e8ee994ad0 [SDMMC] Raise power limit & fix sd power cycle
*Change sd_switch to accept other functions
*Allow for faster speeds by raising the power limit via switch cmd
*Fix the power cycle of sd cards.
2018-06-23 06:45:29 +03:00
Kostas Missos 901f2bb5bd Replace hardcoded values 2018-06-23 06:37:58 +03:00
Kostas Missos 481a3945e8 [FatFS] Update to 0.13b_rev2 2018-06-23 06:30:57 +03:00
Kostas Missos e5c1e18f1f Add bootlogo resources 2018-06-21 11:31:05 +03:00
Kostas Missos 171e5ba30f Compile time configurable menu logo 2018-06-19 17:10:59 +03:00
Kostas Missos 426551b9b7 Minor changes to font + refactoring 2018-06-19 16:54:58 +03:00
Kostas Missos d2291a78e2 Switch Framebuffer to ARGB by default 2018-06-19 16:53:41 +03:00
Kostas Missos 95878d1ad1 Hekate bootlogo and CTCaer logo 2018-06-18 09:04:45 +03:00
Kostas Missos e76c2b4cb6 General additions, fixes and bugfixes 2018-06-18 09:04:13 +03:00
Kostas Missos 9d50a13ef0 Update GNU copyright for big changes
Additionally change the readme
2018-06-18 09:00:53 +03:00
Kostas Missos 36bd3bbed1 Merge pull request #7 from nwert/master
Merge upstream
2018-06-15 23:42:21 +03:00
Kostas Missos b2dd070d10 [INI] Fix memory leaks + other fixes (#38)
* [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
2018-06-13 11:34:32 +12:00
Kostas Missos 0f23f9baec [Tools] Fix SD files archive bit tool
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.
2018-06-11 18:28:04 +03:00
Kostas Missos 16ac26f583 [DP/GFX/SDMMC] Bugfixes
- 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.
2018-06-06 13:29:38 +03:00
Kostas Missos b299cb40c7 [PKG2] Switch kernel patching to crc32c based kernel id
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.
2018-06-05 02:04:08 +03:00
Kostas Missos fb9e91ed0c Better dump of pkg1 + Wording 2018-06-05 01:55:32 +03:00
Kostas Missos c43b6f8a5d SD errata, bugfixes, replace hardcoded values 2018-06-03 22:27:15 +12:00
Kostas Missos e0cb0e867b [HOS] Add sd unmount and proper secmon signaling 2018-06-03 22:27:15 +12:00
Kostas Missos 4b806f1e7d Oups. Remove unmerged functions 2018-06-03 22:27:15 +12:00
Kostas Missos 1f501e08ff [PKG1] Move 1.0.0 secmon to 0x4002B020
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).
2018-06-03 22:27:15 +12:00
Kostas Missos e2a8b36750 [PKG1] Add kernel patching
Add Disable Svc Verification and Debug mode.
Can be enabled via the hekate .ini

https://gist.github.com/roblabla/440f3ceaa0b2d3ca530c2a43fe258420
2018-06-03 22:27:15 +12:00
Kostas Missos dac8cd83ec [LP0] Inform user that console halted :P
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.
2018-06-03 22:27:15 +12:00
Kostas Missos 54a0a353bc Bug fixes, wording, etc 2018-06-03 22:27:15 +12:00
Kostas Missos d8251ab28b [Backup] Add dump verification 2018-06-03 22:27:15 +12:00
Kostas Missos 381b3fa7f0 [GFX] Fix hedump print last 1-16 bytes 2018-06-03 22:27:15 +12:00
Kostas Missos 7a22dddb01 [DC/DSI] Replace hardcoded values with named values
To better understand the procedure.
2018-05-30 14:03:10 -07:00
Kostas Missos 7a771f4855 [sdmmc] Change internal read/write retries
This can fix busy errors when writing to sd cards.
Additionally it now returns properly on success
2018-05-28 18:27:02 -07:00
Kostas Missos 746a557deb Add 3.X support through SE patches
This includes @jsaowji commits and also adds support for 3.0.1 and 3.0.2
2018-05-28 18:27:02 -07:00
Kostas Missos b2762d737d Small cosmetic fixes 2018-05-28 18:27:02 -07:00
Kostas Missos e268222dae [Main] Small fixes 2018-05-25 01:28:03 -07:00
Kostas Missos 81eb1d0972 [Main] Filter POWER button down
And remove uneeded double press protection through sleep().
2018-05-25 01:28:03 -07:00