I have a proprietary ARM device with very limited tools and SDK, but I can manage to start an Android bootloader in RAM. On the host PC, I see:
# fastboot devices
SERIAL Android Fastboot
# lsusb
Bus 003 Device 098: ID 18d1:0002 Google Inc. USB download gadget
In other words, the device is connected to a PC via USB OTG and it has this Android bootloader running in RAM.
The device has only one emmc and I have a working emmc: image img-4GB (0x0 to 0xE9000000). This image is a custom OS which has nothing to do with Android. It's not Android. The emmc is full of zeros, there is nothing on it.
How could I flash directly the whole image to the emmc via fastboot without having to load a kernel?
I'm ready to patch fastboot on the PC if needed. I have tried to play with a partmap.txt file:
flash=mmc,0:all:all:0x0,0xE9000000:img-4GB;
and wanted to do something like:
fastboot flash partmap partmap_emmc.txt
fastboot flash all
but it's not working.