AML-S905X-CC-V2 (Sweet Potato) how to put image on eMMC module

I have successfully booted the Debian Bookworm image from uSD card on the Sweet Potato, but if I install the optional eMMC card the system no longer boots! How does one get the software image onto the eMMC if the device doesn’t boot with it installed? On other vendor board with eMMC one can use either a eMMC to uSD adapter or eMMC to USB adapter to write the image to the eMMC, but this doesn’t appear to be an option with your board as the eMMC connector is very different from that used by most other vendors.

You can hot plug eMMC modules and use the libretech-flash-tool to remount the eMMC drive to flash.

Getting the eMMC hot plugged was quite the challenge! The Libre Flash Tool appears to contain many useful functions, but appears to be out of date. It doesn’t appear to support the Debian Distro, only the Raspbian and Ubuntu were listed. I was able to download and flash the Debian 12 image once I used the rebind command.

Thanks for the quick reply!

I used to use the pyamlboot script from your Github repo with the Le Potato to mount the eMMC to flash it. Recently I switched to the Sweet Potato board but the script no longer mounts the module.
The error I get is: usb.core.USBError: No such device (it may have been disconnected)

The complete output:

ROM: 2.4 Stage: 0.0
Writing ./pyamlboot/files/libretech-cc/u-boot.bin.usb.bl2 at 0xd9000000...
Writing ./pyamlboot/files/usbbl2runpara_ddrinit.bin at 0xd900c000...
Running at 0xd9000000...
ROM: 2.2 Stage: 0.8
Running at 0xd900c000...
Writing ./pyamlboot/files/libretech-cc/u-boot.bin.usb.bl2 at 0xd9000000...
Traceback (most recent call last):
  File "./pyamlboot/./", line 132, in <module>
  File "./pyamlboot/./", line 87, in load_uboot
    self.write_file(os.path.join(self.bpath, self.BL2_FILE), self.DDR_LOAD, large = 64)
  File "./pyamlboot/./", line 63, in write_file, b, large, fill)
  File "./pyamlboot/pyamlboot/", line 241, in writeLargeMemory
    self._writeLargeMemory(address+offset, data[offset:offset+writeLength], \
  File "./pyamlboot/pyamlboot/", line 215, in _writeLargeMemory = 0x40,
  File "/root/.local/lib/python3.9/site-packages/usb/", line 1082, in ctrl_transfer
    ret = self._ctx.backend.ctrl_transfer(
  File "/root/.local/lib/python3.9/site-packages/usb/backend/", line 893, in ctrl_transfer
    ret = _check(self.lib.libusb_control_transfer(
  File "/root/.local/lib/python3.9/site-packages/usb/backend/", line 604, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 19] No such device (it may have been disconnected)

Is there any other way I can flash the eMMC on this board without the hassle of hot plugging the eMMC?
I need to flash 10 of them every couple of weeks, hot-swapping will take too long.

Boot the board with the eMMC attached. Then type in the u-boot console:

ums 0 mmc 0

You can also do it in Linux by hot attaching the eMMC and then with libretech-flash-tool:

sudo ./ board-emmc rebind

Thank you! The first method works well for me. Now I can use dd to copy my custom again images.

Good day,

I have the same problem but need some clarification because the solution mentioned isn’t working for me.

I have emmc in over 12 la potato using pyamlboot method, works perfectly.

Now with the AML-S905X-CC-V2 (sweet potato) I get the same error Eli_Weaver posted.

When you say "Boot the board with eMMC attached. Then type in u-boot console “ums 0 mmc 0”

Are you talking about an out of the box sweet potato with no OS using HDMI monitor and keyboard, or is this using a linux box with pyamlboot installed and connected with the USB cable to the upper left USB port ?

Usually I ‘erase’ then mount eMMC using pyamlboot from a linux box, when I see the eMMC with “lsblk” I “dd” the image to it.

With the sweet potato this doesn’t work.

When I attach an HDMI monitor to the sweet potato that has eMMC installed (no OS), I get no signal on the HDMI monitor and just a solid blue and red LED.

How has this process changed?

Thanks you in advance for any help,