BertoldVdb / jms578flash

Utility for flashing JMicron JMS578 (and probably others) SATA bridges
MIT License
24 stars 8 forks source link

Unclear about usage #9

Open ithinkido opened 4 months ago

ithinkido commented 4 months ago

Could there be something missing in the usage instructions for the flasher ? I dont see a ./jms578flash executable in the repo. Do we need to "go" make / build this , or have I overseen something obvious ?

ithinkido commented 4 months ago

May I sugest a small update to the README - I am not a go user so please correct me if I am wrong , but something along these lines

How to use it

Build package:

Ensure you have go installed on your system. For Debian this would be sudo apt-get install golang -y
Download the repo from git
git clone https://github.com/pexcn/jms578flash.git
and build the go package
cd jms578flash && go build - you may need sudo

Dump the BootROM:

The chip has a small internal ROM that normally loads the firmware from flash and starts it. If no valid firmware is found, it connects to the host and presents a zero bytes SCSI device that has a few vendor commands to load the initial firmware. This utility adds some extra commands to the BootROM to access the flash over DMA. Since the license of this ROM is not known, you will need to dump it yourself. You can then give the dumped file to the extract and flash commands to speed it up massively.

WARNING: The dumprom command will wipe the flash memory. If you don't have a backup you will brick your device. If needed, try extracting the firmware first, see the next section.

You can dump the ROM with the following command:

./jms578flash -dumprom -unsafe -bootrom /tmp/boot_rom.bin

You need to dump it only once per chip type.