Jump to content

Espressobin: rescue instruction for macronix SPI chip


FoodGenius

Recommended Posts

On 9/24/2018 at 9:51 AM, FoodGenius said:

would be nice to publish these images in https://dl.armbian.com/espressobin/u-boot/
in a subfolder "rescue".


Done. Do we have some quick sum of how to use them?

BTW. I received a new board today but it still has Winbond flash. It was also mentioned that it will be probably a 4G model, but it's 1G. Basically, it is the same model that I already have with some changes to PCB which need to be inspected.
 

Spoiler

P1090919.JPGP1090914.JPGP1090906.JPG

 

 

Link to comment
Share on other sites

6 hours ago, Igor said:

BTW. I received a new board today but it still has Winbond flash. It was also mentioned that it will be probably a 4G model, but it's 1G. Basically, it is the same model that I already have with some changes to PCB which need to be inspected.

 

So it is a system still with two ddr ram chips - and it comes with a huge heat sink :-)) .

 

Link to comment
Share on other sites

On 9/25/2018 at 1:51 PM, Igor said:

Do we have some quick sum of how to use them?

 

Along the lines of the summary provided by FoodGenius, recovery with these UART images should work like this:

 

* jumper your board to "UART-Bootmode"
* use a terminal and connect to espressobin by usb
* you now see the recovery prompt ">" instead of "Marvell>>"

  so type the command

'wtp'

followed by enter. board is now in a mode to receive the temporary bootloader.. so close the terminal.

*  use the marvell tool to flash the UART recovery images to RAM
./WtpDownload_linux -P UART -C 0 -R 115200 -B TIM_ATF.bin -I wtmi_h.bin -I boot-image_h.bin -E

* reset the board.

Link to comment
Share on other sites

14 hours ago, ebin-dev said:

./WtpDownload_linux -P UART -C 0 -R 115200 -B TIM_ATF.bin -I wtmi_h.bin -I boot-image_h.bin -E

* reset the board.

 

Not enough. The recovery image is loaded to RAM only, so when you reset it goes away and you boot again from a borked image once jumpers are back to normal.

 

What you need to do is use the image in RAM you just booted from to flash a good one to SPI.

 

After WtpDownload finishes, going back to the serial terminal and pressing enter a couple of times should give you a working uboot prompt (with your UART image that now can write to your flash). From there you should be able to use the bubt command like explained here, or some other of the commands in that page to make your changes permanent.

Link to comment
Share on other sites

So, I just checked that I could use the images in this folder to flash the current ones in its grand-parent one, and that I still was able to boot from the Armbian already installed in my SD card with a Macronix chip. Thanks a lot for these fixed images! 

 

Steps:

  1. Had to use miniterm:
    miniterm --eol CR /dev/ttyUSB0 115200
    rather than minicom. Minicom would interfere with the transfer from WtpDownload by trying to reopen the serial port once it had lost it; and then WtpDownload_linux would get interrupted.
  2. Set the jumpers for UART recovery and powered the board.
  3. In miniterm I hit enter until I got the E prompt, then entered "wtp".
  4. Then I ran the upload: 
    <path>/<to>/WtpDownload_linux -P UART -C 0 -R 115200 -B TIM_ATF.bin -I wtmi_h.bin -I boot-image_h.bin -E

     

  5. As my bootable SD card was in, the just-downloaded bootloader in RAM would quickly go and start Linux from the SD card. If your EspressoBIN is borked, you probably should just remove any boot device. In my case I didn't bother; I just restarted miniterm quickly after WtpDownload had finished and pressed enter a number of times to interrupt the boot sequence.

  6. I plugged in a USB stick with flash-image-2g-2cs-1000_800.bin in it.

  7. I flashed it to SPI:

    Marvell>> bubt flash-image-2g-2cs-1000_800.bin spi usb
    Burning U-BOOT image "flash-image-2g-2cs-1000_800.bin" from "usb" to "spi"
    USB0:   Register 2000104 NbrPorts 2
    Starting the controller
    USB XHCI 1.00
    USB1:   USB EHCI 1.00
    scanning bus 0 for devices... 1 USB Device(s) found
    scanning bus 1 for devices... 2 USB Device(s) found
    reading flash-image-2g-2cs-1000_800.bin
    Image checksum...OK!
    SF: Detected mx25u3235f with page size 256 Bytes, erase size 64 KiB, total 4 MiB
       
    Updating, 8% 126859 B/s   
    Updating, 16% 127704 B/s   
    Updating, 31% 167458 B/s   
    Updating, 39% 155994 B/s
    262144 bytes written, 593344 bytes skipped in 2.249s, speed 389342 B/s
    
    Done!
  8. I then powered the board off, switched the boot jumpers back to their default position, and powered it on again. The board booted Armbian from SD card as usual.

 

Link to comment
Share on other sites

  • Igor unpinned this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines