If you are desperate, you could try to find out if you can use “ide write” to overwrite the entire eMMC content, including the partition table from a raw disk image, but I would not dare try this on my board .
Alternatively, you could try to load the Linux kernel into memory as well, boot from this, and then format your eMMC from Linux (I cannot give you more details).
Here’s a few comments in an attempt to be helpful.
I believe that the HPS first stage boot looks for a partition table. If no partition table exists then the preloader should be written to address zero (start of the card). I’ve never done this but I would guess that it might be done as follows:
If the card has a partition table then the HPS looks for the first partition type A2 (raw). It can be any partition number but the first A2 partition must contain the preloader. Assuming you’ve used partition 2 for the card you’d write it like this:
To update a preloader in a running system on partition 2 (for Arria10 it’s the preloader and u-boot all in one binary) you’d do it like this:
dd if=uboot_w_dtb-mkpimage.bin of=/dev/mmcblk0p2 bs=64k seek=0
You can also read the preloader back to do a binary comparison if you’d like:
read it
dd if=/dev/mmcblk0p2 of=mypreloader.bin bs=64k seek=0 count=16
Summary:
I’ve only booted Cyclone V and Arria10 devices using a partition table. I’ve used different partitions (p2 and p3) for the preloader with no issue. I’ve also placed additional RAW A2 partitions on a card and observed that only the first A2 partition is used for the preloader. For Cyclone V you must also have a u-boot binary on the card. I’m not sure how this would work with no partitions. I’ve typically made partition 1 a FAT with u-boot and partition 2 a RAW partition with the preloader (no u-boot binary needed on FAT for Arria10). I started by using a script supplied with one of the GSRD downloads to make the partition table. You can do all of this manually with fdisk and mkfs to partition and format the card mcanually if you prefer. Search for making an SD card on Rocketboards for examples and more info.
I had a similar problem. Eventually I managed to get a UART to work to get u-boot loaded into the EMMC, and then went from there, painful, but works. Future revisions of the board had a small header fitted which connects to an SD-card reader. Now I just dd it from my PC running Unix.