Libre Computer AML-S905X-CC eMMC Flashing Steps from Linux with pyamlboot

I was wondering why I was having such a hard time flashing the eMMc so I took a look at the board and the module is missing from mine. I have the AML-S905X-CC-V1.0-A. I thought it was to come with a eMMc module? I checked the box it came in and it is not there either.

eMMC is a separate component you purchase. It’s not built onto the boards since it’s a flash device and can potentially wear out.

Does anyone know why i am unable to find the emmc as a storage drive when plugged into a raspberry PI 4?

I followed the steps above and have successfully flashed it in the past. but since the new bookworm release, i noticed that I am unable to flash using this method.

I follow the steps above and erase my drive then turn on it into a virtual flash drive but for some reason it is not being picked up in the raspberry pi imager on my raspberry pi 4

This is what I see but it seems correct.
rpi4node@raspberrypi4:~ $ sudo pyamlboot/run.sh aml-s905x-cc ums-emmc
Using GX Family boot parameters
ROM: 2.4 Stage: 0.0
Writing /home/gismc/pyamlboot/files/libretech-s905x-cc/u-boot.bin.usb.bl2 at 0xd9000000…
[DONE]
Writing /home/gismc/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/gismc/pyamlboot/files/libretech-s905x-cc/u-boot.bin.usb.bl2 at 0xd9000000…
[DONE]
Writing /home/gismc/pyamlboot/files/usbbl2runpara_runfipimg.bin at 0xd900c000…
[DONE]
Writing /home/gismc/pyamlboot/files/libretech-s905x-cc/u-boot.bin.usb.tpl at 0x200c000…
[DONE]
Writing scripts/ums-emmc.scr at 0x8000000…
[DONE]
Running at 0xd900c000…
[DONE]
rpi4node@raspberrypi4:~ $

What message does HDMI show?

That is the thing, I am not seeing any error messages. All shows completed correctly. When I use lsusb, I see the amlogic chip listed then after about 1 minute I run it again and it is gone.

You can run any function once. It should not be ran sequentially. If you run erase-emmc, you need to unplug the board to do ums-emmc. When you call the function, HDMI on the board should also display what it is doing so you can see the exact error.

I have successfully flashed the eMMC several times in the past and currently have a total of four eMMC modules. I have been able to flash them using Pyamlboot before without any issues. Here’s the process I follow:

  1. Turn on my Raspberry Pi 4.
  2. Launch the terminal on the Raspberry Pi 4.
  3. Connect the USB-A cable to the Raspberry Pi 4 (top USB port closest to the Ethernet port).
  4. Plug the eMMC into the Le Potato.
  5. Hold down the UBOOT button.
  6. Plug the Le Potato into the other end of the USB-A cable.
  7. Connect the external micro USB power.
  8. Release the UBOOT button.
  9. Run the command: sudo pyamlboot/run.sh aml-s905x-cc erase-emmc. The terminal shows a successful operation.
  10. Unplug the external power and disconnect the Le Potato from the Raspberry Pi.
  11. Hold down the UBOOT button again.
  12. Plug the Le Potato into the other end of the USB-A cable.
  13. Connect the external micro USB power.
  14. Release the UBOOT button.
  15. Run the command: sudo pyamlboot/run.sh aml-s905x-cc ums-emmc. The terminal shows “DONE” with no errors.

However, when I check the Raspberry Pi Imager, the eMMC is not listed as an available storage option, and running lsblk also does not show the eMMC. I have tried all four eMMC modules, swapped out the Le Potato boards, and used two different USB-A cables.

I need to flash the eMMC module because one of the Le Potato boards does not hold the micro SD card in place, rendering the SD card slot non-functional.

Do you have any suggestions on what might be causing this issue? Additionally, I have attempted to use a Le Potato with Ubuntu installed to run Pyamlboot instead of the Raspberry Pi, but the problem persists.

Make sure the connectors are not damaged on either board. Plug the Le Potato into HDMI before you run ums-emmc and see what the error is (if any) after running it.

On Raspberry Pi 4 Terminal, I see:

$ sudo pyamlboot/run.sh aml-s905x-cc erase-emmc
Using GX Family boot parameters
ROM: 2.4 Stage: 0.0
Writing /home/rpi4node/pyamlboot/files/libretech-s905x-cc/u-boot.bin.usb.bl2 at 0xd9000000...
[DONE]
Writing /home/rpi4node/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/rpi4node/pyamlboot/files/libretech-s905x-cc/u-boot.bin.usb.bl2 at 0xd9000000...
[DONE]
Writing /home/rpi4node/pyamlboot/files/usbbl2runpara_runfipimg.bin at 0xd900c000...
[DONE]
Writing /home/rpi4node/pyamlboot/files/libretech-s905x-cc/u-boot.bin.usb.tpl at 0x200c000...
[DONE]
Writing scripts/erase-emmc.scr at 0x8000000...
[DONE]
Running at 0xd900c000...
[DONE]
$

On Le potato HDMI, I see

Net: eth0: ethernet@c9410000
hit any key to stop autoboot: 0
(ROM USB boot)
## Excecuting script at 08000000
Card did not respond to voltage select!
eMMC erased

On raspberry Pi terminal,

$ sudo pyamlboot/run.sh aml-s905x-cc ums-emmc
Using GX Family boot parameters
ROM: 2.4 Stage: 0.0
Writing /home/rpi4node/pyamlboot/files/libretech-s905x-cc/u-boot.bin.usb.bl2 at 0xd9000000...
[DONE]
Writing /home/rpi4node/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/rpi4node/pyamlboot/files/libretech-s905x-cc/u-boot.bin.usb.bl2 at 0xd9000000...
[DONE]
Writing /home/rpi4node/pyamlboot/files/usbbl2runpara_runfipimg.bin at 0xd900c000...
[DONE]
Writing /home/rpi4node/pyamlboot/files/libretech-s905x-cc/u-boot.bin.usb.tpl at 0x200c000...
[DONE]
Writing scripts/ums-emmc.scr at 0x8000000...
[DONE]
Running at 0xd900c000...
[DONE]
$

Le Potato, HDMI

Shows the device restart and the previously installed OS is loaded

So the eMMC was not erased? Is there an SD card in there? Can you take a picture of the HDMI screen after ums-emmc before it reboots? It shouldn’t reboot since all it does is ums 0 mmc 0.

I used my video card to record the le potato when running the pyamlboot. The first part is the erase script. After the 14 second mark is the script run for the ums-emmc
Video recording is on youtube. https://youtu.be/AJTDqGKuIgs

Do you have a MicroSD card in the device? You need to remove it before you run ums-emmc. Either that or the ums scripts need to be changed to ums 0 mmc 1. You can also just type ums 0 mmc 1 on the keyboard in the u-boot console to turn on emulation. We’ll check the scripts and make sure the right binaries are used.

No, No sd card. As I stated earlier, The sd card slot is loose so sd cards do not stay in, they just slide out.

How do I do the change of ums 0 to mmc1

can you provide some steps?

run.sh was pointing to the wrong files to load. it was loading a legacy firmware. it’s fixed now. run git pull in the repo and retry. Thanks for reporting.

I used git pull to update the repo this morning.
I ran the command to erase and now get this.

$ sudo pyamlboot/run.sh aml-s905x-cc erase-emmc
usage: boot.py [-h] [–version] [–board-files UPATH] [–image IMAGEFILE] [–script SCRIPTFILE] [–fdt DTBFILE] [–ramfs RAMFSFILE]
{khadas-vim,khadas-vim2,libretech-s805x-ac,p212,s400,libretech-s905x-cc,libretech-s905d-pc,libretech-s912-pc,p241,q200}
boot.py: error: argument board: invalid choice: ‘aml-s905x-cc’ (choose from ‘khadas-vim’, ‘khadas-vim2’, ‘libretech-s805x-ac’, ‘p212’, ‘s400’, ‘libretech-s905x-cc’, ‘libretech-s905d-pc’, ‘libretech-s912-pc’, ‘p241’, ‘q200’)

Sorry, wrong branch.

git fetch origin master-lc
git checkout origin/master-lc -b master-lc
./run.sh aml-s905x-cc ums-emmc

Is the erase function no longer needed?

$ sudo pyamlboot/run.sh aml-s905x-cc erase-emmc
SCRIPT: erase-emmc does not exist.

It was never needed. You can erase yourself via your imaging tool. It’s only if you plan to load software by some other means.

Thank you, I was able to flash and install Ubuntu Base on my le potato.