I nuked u-boot and can't get it back

This is on an emmc model. I don’t even have an sdcard. I had a Batocera install that was booting and running fine but I was experimenting with mainline U-Boot trying to use a pwm backlight for my display. I started noticing that even after building u-boot per the wiki instructions (except using the mainline repo instead of the Radxa repo) the u-boot installation on the board never changed. (Yes, I followed the instructions to write u-boot to the board with ‘dd,’ not just sideloading and running the binary once).

So I decided to erase emmc and try again. Only even after erasing emmc, the board still booted up normally. After much fiddling, I carelessly issued `dd if=/dev/zero of=/dev/sdg bs=512 seek=1’, which wrote more than 3GB of zeroes to the device.

Now when I power the board on, all I get from the serial console is:

I’ve tried the “official” methods for restoring a fresh image but keep hitting snags. On Windows, using EZ Boot Helper to get into maskrom mode isn’t working even though it used to. The tool always gets stuck like this:
I have tried the emmc erase image, the disk loader one, the fastboot, even the factory install, and they all hang at this point. I have tried running EZ Boot Helper in administrator mode. Still sticks here.

On linux though, the boot-g12.py script works fine and is able to sideload and execute those scripts. I have tried using dd to install new images, and have even tried reinstalling the official u-boot image from here using dd, and it still won’t boot.

I don’t seem to be able to use fastboot to install the bootloader. After doing sudo boot-g12.py rz-fastboot-loader.bin the device goes into fastboot mode and I can see it:

$ sudo /home/theophile/.nexustools/fastboot devices
RADXA   Android Fastboot

But if I try to flash u-boot, I get this:

$ sudo /home/theophile/.nexustools/fastboot flash 0x200 u-boot_official.bin
Sending '0x200' (1373 KB)                          OKAY [  0.078s]
Writing '0x200'                                    FAILED (remote: 'no such device')
fastboot: error: Command failed

I’m not sure what I’ve done but I could use some help undoing it!

OK, I managed to get u-boot back by these instructions: https://wiki.radxa.com/Zero/install/Boot_Troubleshooting#Modify_bootloader_on_eMMC

But I still have the issue with RZ Boot Helper hanging on the first “Writing” command per the screenshot above, even though boot-g12.py in linux works fine.

Glad to hear you got it working under Linux.

There may be some problems with boot-g12.py or libusb under Windows. What brand of computer are you using, and have you gone through the USB Hub?

I’m using a Lenovo X1 tablet (3rd gen). I am indeed going through a USB hub, although the same setup worked previously. I’ll see if a direct connection makes a difference.