Hacking [RCM Payload] Hekate - CTCaer mod

  • Thread starter CTCaer
  • Start date
  • Views 1,072,160
  • Replies 3,243
  • Likes 128

CTCaer

Developer
OP
Developer
Joined
Mar 22, 2008
Messages
1,154
Trophies
0
XP
3,008
Country
Greece
I get the following if I use the Print SD Card Info option.

[FatFS] Error: No FAT/FAT32/exFAT found!
Failed to mount SD card (FatFS Error 13).
(make sure that a FAT type partition exists)

Thing is these cards work. Both in Windows and in the Switch OS. I can format them in both. I can write and read files in both. This only happens in RCM. I suspect my replacement sd reader (the internal one in the Switch) is at fault. My cards worked before. It's just weird, if it works in the Switch OS it should also work in RCM right?
Not if there's a new revision and has a quirk.

The thing is, is that really a new revision? What switch version you have?

Also do you see any SD card performance degradation in switch? I mean 4 times lower speeds than PC?
 

kamo

Well-Known Member
Member
Joined
Aug 7, 2006
Messages
180
Trophies
0
Age
46
Website
Visit site
XP
413
Country
Italy
Not if there's a new revision and has a quirk.

The thing is, is that really a new revision? What switch version you have?

Also do you see any SD card performance degradation in switch? I mean 4 times lower speeds than PC?
No performance problems with the newer 64gb exFAT card. The 32GB one was always slow. Both worked in RCM on that same Switch until I replaced the SD reader, I'll attach a picture of what I replaced to avoid confusion. The Switch is a launch model and I was able to use hekate before the slot broke.

edit
Now I'm getting a new error.
Failed to init SD card
Make sure that it is inserted

If I try to enter the launch menu I just get booted into Switch OS where the card is visible and usable.
 

Attachments

  • nxcf1ti42de_900x.jpg
    nxcf1ti42de_900x.jpg
    49.6 KB · Views: 297
Last edited by kamo,

CTCaer

Developer
OP
Developer
Joined
Mar 22, 2008
Messages
1,154
Trophies
0
XP
3,008
Country
Greece
No performance problems with the newer 64gb exFAT card. The 32GB one was always slow. Both worked in RCM on that same Switch until I replaced the SD reader, I'll attach a picture of what I replaced to avoid confusion. The Switch is a launch model and I was able to use hekate before the slot broke.

edit
Now I'm getting a new error.
Failed to init SD card
Make sure that it is inserted

If I try to enter the launch menu I just get booted into Switch OS where the card is visible and usable.
I'm asking for performance degradation because 2 things hekate's driver does not support:
  • SDSC cards (2GB and less)
  • 1 bit data bus (slow mode)
Which horizon's driver supports.
Basically, a card can fall into this mode if the lego connector or the data pins are not OK. For example if a card is a U3 (~90MB/s read) it can fall to ~20MB/s.
But you can't test this with hekate (untrained DRAM is the bottleneck).

It is easy to check if it's the lego connector, by applying pressure on it and trying to run hekate and a Backup.
And you can do a visual check on the pins inside with a torchlight.
 

kamo

Well-Known Member
Member
Joined
Aug 7, 2006
Messages
180
Trophies
0
Age
46
Website
Visit site
XP
413
Country
Italy
I'm asking for performance degradation because 2 things hekate's driver does not support:
  • SDSC cards (2GB and less)
  • 1 bit data bus (slow mode)
Which horizon's driver supports.
Basically, a card can fall into this mode if the lego connector or the data pins are not OK. For example if a card is a U3 (~90MB/s read) it can fall to ~20MB/s.
But you can't test this with hekate (untrained DRAM is the bottleneck).

It is easy to check if it's the lego connector, by applying pressure on it and trying to run hekate and a Backup.
And you can do a visual check on the pins inside with a torchlight.
By lego connector you mean that thing that I connected to the mainboard? If yes, I could check that later.
 

WallsAreLiquid

Active Member
Newcomer
Joined
Jul 12, 2018
Messages
26
Trophies
0
XP
990
Country
Russia
Thanks for your work! I have some questions:
1. Does Hekate need an unit with "exFAT update" to use SDXC card for non-partial (one 32 GiB file) eMMC RAW GPP backup? Can it use an exFAT card (formatted on a PC) regardless of the unit software?
2. Is partial backup (set of 2 GiB or 1 GiB) mergable? Can one make partial backup on FAT32 card, copy it to a PC, merge to the 32 GiB file with 'cat' command and restore from an exFAT card?
 

CTCaer

Developer
OP
Developer
Joined
Mar 22, 2008
Messages
1,154
Trophies
0
XP
3,008
Country
Greece
Thanks for your work! I have some questions:
1. Does Hekate need an unit with "exFAT update" to use SDXC card for non-partial (one 32 GiB file) eMMC RAW GPP backup? Can it use an exFAT card (formatted on a PC) regardless of the unit software?
2. Is partial backup (set of 2 GiB or 1 GiB) mergable? Can one make partial backup on FAT32 card, copy it to a PC, merge to the 32 GiB file with 'cat' command and restore from an exFAT card?
  1. As stated in OP, it has its own driver and does not care what switch os version you have.
  2. As stated in OP, it is and there are instructions there and scripts to do it in the repo's release section.
 

CTCaer

Developer
OP
Developer
Joined
Mar 22, 2008
Messages
1,154
Trophies
0
XP
3,008
Country
Greece
Holy shit, applied some pressure and it worked I love you mate, seriously thank you!
Good to know.
It helps to not support 1bit width bus modes.

Otherwise, you would have 4 times lower speeds now.
Find a flexible pad and attach it on top of the connector, so the case can keep it down.


EDIT:
I just remembered that the stock one has a pad on it. What happened to this?
 
Last edited by CTCaer,
  • Like
Reactions: Azel and kamo

kamo

Well-Known Member
Member
Joined
Aug 7, 2006
Messages
180
Trophies
0
Age
46
Website
Visit site
XP
413
Country
Italy
Good to know.
It helps to not support 1bit width bus modes.

Otherwise, you would have 4 times lower speeds now.
Find a flexible pad and attach it on top of the connector, so the case can keep it down.


EDIT:
I just remembered that the stock one has a pad on it. What happened to this?
I'm an idiot who threw the original one away. I put something new in it already.
 

murpcsm48

Member
Newcomer
Joined
Jun 29, 2018
Messages
21
Trophies
0
Age
53
XP
62
Country
United States
I have a clean Nand that I want to restore from Hekate v3.1. I have the boot0, boot1, and rawnand.bin files.

I have also made another full backup of my Nand with Hekate 3.2 just in case the above doesn't work.

Question is there a certain order to restore the Nand files?

Also if it doesn't work can I remove the SDCard and then put my latest Hekate 3.2 Nand backup on the SD Card and then restore without powering off the Switch?

I don't want to risk a brick from occurring.

I am going to sell this switch and will ensure it is not banned before I sell it as I bought a new one with 4.1 firmware.

Thanks
 

CTCaer

Developer
OP
Developer
Joined
Mar 22, 2008
Messages
1,154
Trophies
0
XP
3,008
Country
Greece
Both fail during the verification step.
If it's a mismatch error, that's not good; Try to run h2testw and post results.

Otherwise I'll need the error.


I have a clean Nand that I want to restore from Hekate v3.1. I have the boot0, boot1, and rawnand.bin files.

I have also made another full backup of my Nand with Hekate 3.2 just in case the above doesn't work.

Question is there a certain order to restore the Nand files?

Also if it doesn't work can I remove the SDCard and then put my latest Hekate 3.2 Nand backup on the SD Card and then restore without powering off the Switch?

I don't want to risk a brick from occurring.

I am going to sell this switch and will ensure it is not banned before I sell it as I bought a new one with 4.1 firmware.

Thanks
Nope there's no certain order. You can start from BOOT0/1 or rawnand.bin. Just make sure that you restored all of them.

Yes you can remove the sd card, as long as you are in a menu!
Otherwise you may corrupt sd card data.

But this does not matter. If the restore fails, it's still bricked. So just make sure to retry with the old or new backup again. (And don't delete any backup from your PC, until you are 100% sure.)
 
  • Like
Reactions: murpcsm48

Minikea

Active Member
Newcomer
Joined
Nov 14, 2017
Messages
27
Trophies
0
XP
122
Country
France
@CTCaer
could we compile hekate with the blob for DDR4 from Pixel C?
https://developers.google.com/android/images#ryu

with the command provided by F0:
Code:
./build/util/cbfstool/cbfstool bootloader-dragon-google_smaug.7900.97.0.img extract -n fallback/tegra_mtc -f tegra_mtc.bin
source: https://fail0verflow.com/blog/2018/shofel2/

The only closed-source component, which is optional, is the Tegra210 DDR4 memory training code. For unknown reasons, this is released as a binary blob for the Pixel C, which gets copied into memory and jumped into. This blob can be obtained from the Pixel C factory image

Make sure you get a tegra_mtc.bin with this SHA256:

edb32e3f9ed15b55e780e8a01ef927a3b8a1f25b34a6f95467041d8953777d21

Although this blob contains hardcoded tables and a “do everything” entrypoint for the Pixel C, it is possible to jump in one level deeper into the call tree and pass in custom tables, which is what our patched coreboot does to configure DDR4 on the Switch. Without this blob, the stack will still work, but the memory will run at ~200Mhz, which needless to say rather cripples performance.

(I can provide the blob by PM if that can be easier for you)
 

CTCaer

Developer
OP
Developer
Joined
Mar 22, 2008
Messages
1,154
Trophies
0
XP
3,008
Country
Greece
@CTCaer
could we compile hekate with the blob for DDR4 from Pixel C?
https://developers.google.com/android/images#ryu

with the command provided by F0:
Code:
./build/util/cbfstool/cbfstool bootloader-dragon-google_smaug.7900.97.0.img extract -n fallback/tegra_mtc -f tegra_mtc.bin
source: https://fail0verflow.com/blog/2018/shofel2/



(I can provide the blob by PM if that can be easier for you)
I have it.
The thing is why?
It's not that this will save you. You gonna still have a bottleneck from BPMP.

This could only help for backup/restore options. But still.

Edit:
Also that command does not compile it. It extracts it from pixel c coreboot.
 
Last edited by CTCaer,

Minikea

Active Member
Newcomer
Joined
Nov 14, 2017
Messages
27
Trophies
0
XP
122
Country
France
I have it.
The thing is why?
It's not that this will save you. You gonna still have a bottleneck from BPMP.

This could only help for backup/restore options. But still.

Edit:
Also that command does not compile it. It extracts it from pixel c coreboot.

Yes, the command is for extracting. The file is used during compilation when it is put in:
src/soc/nvidia/tegra210
of coreboot folder.
For hekate, since it's not based on coreboot, I think it would be hardcoded to use the file.

I suggested this because of what you said yesterday:

I'm asking for performance degradation because 2 things hekate's driver does not support:
  • SDSC cards (2GB and less)
  • 1 bit data bus (slow mode)
Which horizon's driver supports.
Basically, a card can fall into this mode if the lego connector or the data pins are not OK. For example if a card is a U3 (~90MB/s read) it can fall to ~20MB/s.
But you can't test this with hekate (untrained DRAM is the bottleneck).

It is easy to check if it's the lego connector, by applying pressure on it and trying to run hekate and a Backup.
And you can do a visual check on the pins inside with a torchlight.
 

CTCaer

Developer
OP
Developer
Joined
Mar 22, 2008
Messages
1,154
Trophies
0
XP
3,008
Country
Greece
But you can't distribute it together with hekate because this blob is copyright protected.
Well this depends.

I can distribute the coreboot file even though it has this blob inside.

yeah that's why I asked in the first place if we could compile hekate with this.
It seems we could but I don't know how, now. :D
You can't compile it, but embed it. Good luck with that though. The blob alone exceeds the maximum payload limit.

Additionally, hekate is armv4t and this blob is aarch64 and must run on the A57 cores.
So you have to enable CCPLEX and call it. Which normally do it only for horizon's secure monitor.

i don't know, maybe I'll play with this sometime. Still though, I have more important things to do (booting linux through hekate is a pain in the ass).
 
  • Like
Reactions: Azel

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Veho @ Veho: Firefox users be like "look at what they have to do to mimic a fraction of our power."