milkv-mars / mars-tools

3 stars 1 forks source link

Source code of recovery tool #1

Open eshattow opened 7 months ago

eshattow commented 7 months ago

The recovery tool benefits from a lot of open source software. Can the source code of this recovery tool itself be published? And for update/usbprog-mars-230510.out ?

orangecms commented 7 months ago

See also this issue where we reversed StarFive's tool: https://github.com/starfive-tech/Tools/issues/1#issuecomment-1366497242

Document what the fuses are and if you have set them etc.. If I cannot run my own firmware, I essentially have a brick now. I will check on that. Note that I am a developer in the oreboot project. This is important information before purchasing devices. It has direct impact on your reputation as an OEM.

See also this related article where Apple messed up with Intel ME FPF (fuses): https://malware.news/t/intel-me-manufacturing-mode-obscured-dangers-and-their-relationship-to-apple-macbook-vulnerability-cve-2018-4251/23214

orangecms commented 7 months ago

So far I can tell that oreboot starts fine when run over the XMODEM loader from the mask ROM, works on both Mars CM and Mars.

For the Mars CM: Just short the boot pin to GND (e.g. the hole right next to it). :partying_face:

eshattow commented 7 months ago

For the Mars CM: Just short the boot pin to GND (e.g. the hole right next to it). 🥳

Every CM4 compatible carrier should have a jumper or DIP switch "nRPIBOOT" or eMMC/UART disable, something like that, which is wired as the select for JH7110 MaskROM ZSBL load SPL from UART (note the errata that XMODEM implementation in JH7110 MaskROM is flawed, your experience may vary depending what software and adapter you send the transfer with).

orangecms commented 7 months ago

Ah yes, thanks for adding the note on that switch - works just fine!

We have our own XMODEM loader written in Rust, that one does the job witg an FTDI adapter. :)