This method is an alternative to the recommended way of flashing eMMC. This method only works on certain Amlogic boards, board models beginning with AML- .
Detach all peripherals including HDMI cable, USB devices, and MicroUSB power.
Plug one end of the USB Type A cable into your computer/SBC with pyamlboot.
Press and hold the K11/Uboot button on the board while attaching the other end of the USB Type A cable into the top left USB port next to the Ethernet. Release button.
Attach auxiliary power via MicroUSB if your computer/SBC does not provide enough. (Optional)
Below are two actions. Only run one of the following actions per connect. If you need to run a different action, power off the board completely (usually HDMI, MicroUSB, and USB Type A) and repeat from step 3.
To erase eMMC user partition table and bootloader, run the following:
sudo pyamlboot/run.sh aml-s905x-cc erase-emmc
# erases first 1MB of eMMC user hardware partition
# this includes any MBR/GPT partition table and bootloader
To turn eMMC into a virtual flash drive to flash images, run the following:
sudo pyamlboot/run.sh aml-s905x-cc ums-emmc
# exposes eMMC user hardware partition as a flash drive after 5 seconds
# you do not have to erase the eMMC first before flashing images
Wait 10 seconds and a virtual flash drive should appear to your Linux machine/SBC. You can use gnome-disk-imager or dd to flash any of our images directly to the eMMC. This method of dumping to eMMC is limited by the Programmable IO USB transfer mode which has a peak write speed of around 10MB/s.
There is a known issue with AMD machines timing out on USB transfers. We have yet to figure out a workaround so please use Intel machines or an SBC to do this. If anyone at AMD is reading this, please fix your USB please
I’ve encounter an error while trying to flash the eMMC, I can’t mount as virtual flash drive nor delete user partition due to the next error:
Using GX Family boot parameters
ROM: 2.4 Stage: 0.0
Writing /home/<user>/pyamlboot/files/libretech-cc/u-boot.bin.usb.bl2 at 0xd9000000...
[DONE]
Writing /home/<user>/pyamlboot/files/usbbl2runpara_ddrinit.bin at 0xd900c000...
[DONE]
Running at 0xd9000000...
[DONE]
Waiting...
[DONE]
ROM: 2.2 Stage: 0.8
Running at 0xd900c000...
[DONE]
Waiting...
[DONE]
Writing /home/<user>/pyamlboot/files/libretech-cc/u-boot.bin.usb.bl2 at 0xd9000000...
Traceback (most recent call last):
File "./boot.py", line 132, in <module>
usb.load_uboot()
File "./boot.py", line 87, in load_uboot
self.write_file(os.path.join(self.bpath, self.BL2_FILE), self.DDR_LOAD, large = 64)
File "./boot.py", line 63, in write_file
self.dev.writeLargeMemory(addr, b, large, fill)
File "/home/<user>/pyamlboot/pyamlboot/pyamlboot.py", line 241, in writeLargeMemory
self._writeLargeMemory(address+offset, data[offset:offset+writeLength], \
File "/home/<user>/pyamlboot/pyamlboot/pyamlboot.py", line 215, in _writeLargeMemory
self.dev.ctrl_transfer(bmRequestType = 0x40,
File "/usr/lib/python3/dist-packages/usb/core.py", line 1036, in ctrl_transfer
ret = self._ctx.backend.ctrl_transfer(
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 875, in ctrl_transfer
ret = _check(self.lib.libusb_control_transfer(
File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 19] No such device (it may have been disconnected)
Thanks, it was a Power Issue, after providing auxiliary power on the MicroUSB the error appeared no more and I was able to flash the Ubuntu image using dd.
i was able to get another raspberry pi and was able to get the device to be detected with the aux power
without power running lsusb doesnt show the amlogic gx chip
with aux power lsusb shows amlogic gx chip.
running the erase command i get:
sudo pyamlboot/run.sh aml-s905x-cc erase-emmc
Using GX Family boot parameters
ROM: 2.4 Stage: 0.0
Writing /usr/local/lib/python3.9/dist-packages/files/libretech-cc/u-boot.bin.usb.bl2 at 0xd9000000…
[DONE]
Writing /usr/local/lib/python3.9/dist-packages/files/usbbl2runpara_ddrinit.bin at 0xd900c000…
[DONE]
Running at 0xd9000000…
[DONE]
Waiting…
[DONE]
ROM: 2.2 Stage: 0.8
Running at 0xd900c000…
[DONE]
Waiting…
[DONE]
Writing /usr/local/lib/python3.9/dist-packages/files/libretech-cc/u-boot.bin.usb.bl2 at 0xd9000000…
[DONE]
Writing /usr/local/lib/python3.9/dist-packages/files/usbbl2runpara_runfipimg.bin at 0xd900c000…
[DONE]
Writing /usr/local/lib/python3.9/dist-packages/files/libretech-cc/u-boot.bin.usb.tpl at 0x200c000…
[DONE]
Writing scripts/libretech-cc-erase-emmc.scr at 0x8000000…
[DONE]
Running at 0xd900c000…
[DONE]
but when i run the other command “sudo pyamlboot/run.sh aml-s905x-cc ums-emmc”
It gives me some errors.
sudo pyamlboot/run.sh aml-s905x-cc ums-emmc
Using GX Family boot parameters
Traceback (most recent call last):
File “/home/naku/pyamlboot/./boot.py”, line 132, in
usb.load_uboot()
File “/home/naku/pyamlboot/./boot.py”, line 86, in load_uboot
self.init_ddr()
File “/home/naku/pyamlboot/./boot.py”, line 74, in init_ddr
self.soc_id()
File “/home/naku/pyamlboot/./boot.py”, line 54, in soc_id
s = self.dev.identify()
File “/home/naku/pyamlboot/pyamlboot/pyamlboot.py”, line 306, in identify
ret = self.dev.ctrl_transfer(bmRequestType = 0xc0,
File “/usr/local/lib/python3.9/dist-packages/usb/core.py”, line 1082, in ctrl_transfer
ret = self._ctx.backend.ctrl_transfer(
File “/usr/local/lib/python3.9/dist-packages/usb/backend/libusb1.py”, line 893, in ctrl_transfer
ret = _check(self.lib.libusb_control_transfer(
File “/usr/local/lib/python3.9/dist-packages/usb/backend/libusb1.py”, line 602, in _check
raise USBTimeoutError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBTimeoutError: [Errno 110] Operation timed out
hey i wanted to let you know i got it running and ran updates its running ubuntu!
there were some power issues but iu got them solved and finally after several attempts it showed up as usb device i was able to use that tool baobab the gnome disk imager.
Thank you for your support. I would like to help out in the forum if possible
could we use other low resource linux distros? like linux mate or the ones for digital signage?
See the notes at the top about weston. Weston is a wayland compositor and uses the least resources and comes pre-installed on the server images. It is much faster and tear free compared to X11. Ubuntu 22.04 Weston Desktop Help
I have a Le Potato and a 64gb emmc module on the way from Amazon, but I’m curious if a mac can mount the Le Potato correctly in order to flash it. If not I have a Raspberry Pi Zero that should do the trick, but I’m still curious.
Maybe I didn’t clarify myself good enough, sorry for that. My real question is: can I flash, for instance, the Raspbian image on the eMMC board so that the Le Potato SBC can boot from the eMMC module instead of the SD card? Which would mean that I can fully get rid of an SD card to boot up the system?
You can flash Le Potato’s eMMC. You can use the above guide to flash the regular SD card image to the eMMC and it will work. The other way is to just flash to /dev/mmcblk0 when booted from MicroSD card. Either way works.
Hi…I followed the procedure above and was able to successfully erase the emmc partition but I cannot get the next step to proceed. I have fully disconnected the La Frite board and powered it on exactly as before but every time I try to run the ums-emmc command it gives me the device not found error. I even tried re-running the erase-emmc as before but it also gives the same device not found error.
Is there a step I am missing? I only received the board and emmc modules a couple of days ago