Libre Computer AML-S905X-CC eMMC Flashing via MicroSD Card and u-boot

i have tired method 2 and the Drive does not show up at all, if I use Gnome Disk Utility i do not see the drive at all. if i try to use dd it just tell me the drive is full which i suspect means it does not detect it. So on another thread, I saw where it said to just try using the [Libre Computer AML-S905X-CC eMMC Flashing Steps from Linux] and just configure and write image to disk while attached to your AML-S905X-cc board. I tried this and it did work for the 2 32GB emmc cards i had for my S905X-cc and also for the H5 trantium(spelling probably off) but for the 128GB it worked to begin with but when i tried to boot the ROC-RK3328-CC from the 128GB emmc module it started to boot where i saw ubuntu start screen but then went to a terminal interface and any command i try to enter just say unknown command. So I thought it could be the image so i tried again still the same. now the drive will no longer show up after running sudo pyamlboot/run.sh aml-s905x-cc ums-emmc.
Not sure what to try next.
what gets me is no matter how I ask I don’t get an answer to how i can tell if it is connected and or even being reconized.
I was hoing someone from librecomputer might respond with some information but no reply yet

You can interrupt boot if your USB keyboard is recognized or via UART connection.

Make sure you are using eMMC 4.x for Tritium and eMMC 5.x for everything else.

You need to let us know exactly what you see via either a photo or copying the log.

If you no long see the eMMC module, check the pins for damage. eMMC are very prone to damage is meant for permanent attachment and not meant for being moved around.

thank you for the information.

is there a specfic key to hit like with Dell and F2?

So the 2 32GB emmc were 5.x and the 128GB emmc was 4.x. I missed that just say 128GB.

this is a copy of the log but may not matter as it was a emmc 4.x but if you see anything and could explain what it means by invalid build .

roc@roc-rh3328-cc:~$ lsusb

Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Bus 002 Device 002: ID 1b8e:c003 Amlogic, Inc. GX-CHIP

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 005 Device 002: ID 04f2:0939 Chicony Electronics Co., Ltd Amazon Basics mouse

Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 001 Device 002: ID 046d:c31c Logitech, Inc. Keyboard K120

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

roc@roc-rh3328-cc:~$ lsusb

Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 005 Device 002: ID 04f2:0939 Chicony Electronics Co., Ltd Amazon Basics mouse

Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 001 Device 002: ID 046d:c31c Logitech, Inc. Keyboard K120

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

roc@roc-rh3328-cc:~$ ls /dev/mmcblk*

/dev/mmcblk1 /dev/mmcblk1p1 /dev/mmcblk1p2

roc@roc-rh3328-cc:~$ lsusb

Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Bus 002 Device 003: ID 1b8e:c003 Amlogic, Inc. GX-CHIP

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 005 Device 002: ID 04f2:0939 Chicony Electronics Co., Ltd Amazon Basics mouse

Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 001 Device 002: ID 046d:c31c Logitech, Inc. Keyboard K120

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

roc@roc-rh3328-cc:~$ sudo pyamlboot/run.sh aml-s905x-cc erase-emmc

[sudo] password for roc:

/usr/lib/python3/dist-packages/pkg_resources/init.py:116: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release

warnings.warn(

/usr/lib/python3/dist-packages/pkg_resources/init.py:116: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release

warnings.warn(

Using GX Family boot parameters

ROM: 2.4 Stage: 0.0

Writing /home/roc/pyamlboot/files/libretech-cc/u-boot.bin.usb.bl2 at 0xd9000000…

[DONE]

Writing /home/roc/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/roc/pyamlboot/files/libretech-cc/u-boot.bin.usb.bl2 at 0xd9000000…

Traceback (most recent call last):

File “/home/roc/pyamlboot/./boot.py”, line 132, in

usb.load_uboot()

File “/home/roc/pyamlboot/./boot.py”, line 87, in load_uboot

self.write_file(os.path.join(self.bpath, self.BL2_FILE), self.DDR_LOAD, large = 64)

File “/home/roc/pyamlboot/./boot.py”, line 63, in write_file

self.dev.writeLargeMemory(addr, b, large, fill)

File “/home/roc/pyamlboot/pyamlboot/pyamlboot.py”, line 241, in writeLargeMemory

self._writeLargeMemory(address+offset, data[offset:offset+writeLength], \

File “/home/roc/pyamlboot/pyamlboot/pyamlboot.py”, line 215, in _writeLargeMemory

self.dev.ctrl_transfer(bmRequestType = 0x40,

File “/usr/lib/python3/dist-packages/usb/core.py”, line 1082, in ctrl_transfer

ret = self._ctx.backend.ctrl_transfer(

File “/usr/lib/python3/dist-packages/usb/backend/libusb1.py”, line 893, in ctrl_transfer

ret = _check(self.lib.libusb_control_transfer(

File “/usr/lib/python3/dist-packages/usb/backend/libusb1.py”, 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)

roc@roc-rh3328-cc:~$ sudo pyamlboot/run.sh aml-s905x-cc erase-emmc

/usr/lib/python3/dist-packages/pkg_resources/init.py:116: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release

warnings.warn(

/usr/lib/python3/dist-packages/pkg_resources/init.py:116: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release

warnings.warn(

Using GX Family boot parameters

ROM: 2.4 Stage: 0.0

Writing /home/roc/pyamlboot/files/libretech-cc/u-boot.bin.usb.bl2 at 0xd9000000…

[DONE]

Writing /home/roc/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/roc/pyamlboot/files/libretech-cc/u-boot.bin.usb.bl2 at 0xd9000000…

[DONE]

Writing /home/roc/pyamlboot/files/usbbl2runpara_runfipimg.bin at 0xd900c000…

[DONE]

Writing /home/roc/pyamlboot/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]

roc@roc-rh3328-cc:~$

thank your help

Any key will work at the u-boot prompt.

I have an AML-S905X-CC and I installed 2022-09-22-raspbian-bullseye-arm64+aml-s905x-cc.img.xz onto a 32GB microSD card. I have added a GenBasic WiFi 4 USB Nano, the system is connected to my WiFi, and I can connect with SSH.

Next, I installed a 32GB eMMC (5.x) and followed the instructions here using method 2 (xz -cd IMAGE.xz | sudo…) which I believe was successful. I shutdown the system, removed the microSD card and powered up again. The system does not boot successfully.

After attaching an HDMI monitor I see what looks like a normal boot sequence but it ends with:
Begin: Running /scripts/local-block ... done.
repeated many times followed by:

Gave up waiting for root file system device. Common problems:
- Boot args (cat /proc/cmdline)
- Check rootdelay= (did the system wait long enough?)
- Missing modules (cat /proc/modules: ls /dev)
ALERT! (UUID=1cd42925-4305-4a79-bb10-f50d1fda10f8 does not exist. Dropping to a shell!

and the system is unresponsive at this point. I’ve looked for solutions here but haven’t found anything yet.

Apparently, a fresh 32GB eMMC 5.x must be flashed via the procedure in Libre Computer AML-S905X-CC eMMC Flashing Steps from Linux. Using the procedure documented in this topic didn’t work (see my previous post).

I’m not sure if subsequent flashes (i.e. to change OSes) will work with this procedure now that one image has successfully been flashed. If someone knows the answer please let me know.

It does not matter which procedure you use. The goal is to have a bit-accurate flash of the image on the eMMC module. You can dd from Linux on the device or flash from an external computer using USB mass storage emulation.

You can reflash the eMMC with a different OS and it should work fine.

Is it possible to follow method 2 from the Renegade itself?

I’m wondering if I can boot a headless unit from the SD and clone that SD install to the eMMC?

Yes, it is probably the fastest way. Boot from SD, download the image, decompress, and write to eMMC.

Thanks. Now I just need to find a way to resolve my login problem.

A few observations I made regarding method 1 that might help others:

  1. Using the MicroSD card is only required if you haven’t already written a bootable image to the eMMC. If your have an existing bootable image on the eMMC and want to replace it the MicroSD is not needed.

  2. The bootloader command “ums 0 mmc 0” doesn’t always work because the eMMC card might show up as a different device number (eg. try “ums 0 mmc 1”).

  3. While most of the flashing methods mention using a Linux machine to set up the Le Potato, Windows will also work (at least with method 1). I usually use the Raspberry Pi imager with Windows as I haven’t had much luck with Win32DiskImager (keeps failing the verify step).

  1. It will always show up as mmc 0. Never as mmc 1 if you are using our software.
  2. Failure to verify because automount needs to be disabled in Windows.

I can confirm that this error DOES NOT happen due to automount not being disabled as, after disabling before any previous attempts, it still fails to verify sector 8192 . A quick search online will come up with tons of people having this issue dating back years now;

"If the SD-Card contains partitions which are accessible from Windows (FAT, FAT32, NTFS), Windows will create or change contents in the folder “System Volume Information” after writing or reading (because volume is locked for writing and reading and unlocked after this), so verification fails because content on SD-Card meanwhile was changed by Windows before you start the Verify.

Make sure that Windows does not change or create “System Volume Information” !"

Using GPEDIT Do not allow locations on removable drives to be added to libraries setting

  1. In Windows 10/8.1 Pro & Enterprise Editions, press Windows Key + R combination, type put gpedit.msc in Run dialog box and hit Enter to open the Local Group Policy Editor

  2. Navigate here;

Computer Configuration → Administrative Templates → Windows Components → Search

  1. In the right pane, look for the setting named Do not allow locations on removable drives to be added to libraries and double click to open

  2. Click on Enabled and then click Apply followed by OK . Close the Local Group Policy Editor and restart the machine, plug in the USB and plug out. You should no longer get error when verifying and nothing should get changed with file/folder structure etc.

Hope this helps and glad to be able to offer a solution for my first post here.

Sources:
sorceforge /p/win32diskimager/tickets/50/?page=1

the windows club /prevent-system-volume-information-folder-usb

2 Likes

Hi, I have a Libre Computer Board ROC-RK3328-CC (Renegade) and a Libre Computer 32GB eMMC 5.x Module. I am trying to follow the instructions to flash the eMMC via MicroSD Card with no success.

I flashed a 32 GB Samsung Evo Plus SD card with this image: ubuntu-22.04.2-preinstalled-desktop-arm64+roc-rk3328-cc.img using Win32DiskImager under Windows 10.

I connect the eMMC to the Renegade and power it up.

I stop the autoboot by hitting any key during bootup and get to the command prompt that looks like this: “=>”

After that I type: “ums 0 mmc 0” and get the following error: “Unknown command ‘ums’ - try ‘help’”

Can anyone help me to figure out what I am doing wrong? It seems odd that uboot doesn’t even know about the ums command at all. This seems to be independent of if the eMMC is working or even installed.

I would appreciate any help with this as I would really like to get ubuntu running on the renegade with eMMC.

  1. Download, extract, and write an OS to the MicroSD card.
  2. Boot the board with the eMMC attached.
  3. Download the image or copy it to the board using SSH or an USB key.
  4. Extract the image if you are copying it compressed with xz -dk FILENAME.xz.
  5. dd it to the eMMC sudo dd if=FILENAME of=/dev/mmcblk0 bs=1M.
  6. Reboot

If the eMMC already has a corrupted system written on it and you want to overwrite it:

  1. Boot the board via SD card without eMMC.
  2. Attach the eMMC. Be very careful not to short anything. Also be careful not to destroy the connectors by fat fingering it while attaching. Line everything up.
  3. In a terminal type:
git clone https://github.com/libre-computer-project/libretech-flash-tool.git lft
cd lft
sudo ./lft.sh b-emmc rebind
  1. Continue from step 3 of the regular process above.
2 Likes

Wow, thank you for this thread!

While I certainly skipped around in it, there are some things I noticed and worked to avoid and to encounter.

I have managed to install RaspbianPi to the eMMC and have it boot. It did require microsd card. I did use an AMD machine. Did the thing to stop uboot and then the dd to the emmc.

I’m fairly sure that I have a set of steps that would work for anyone, while explaining a little bit of troubleshooting that could help along the way. For example my first time through I just followed the steps without thinking about what I was doing. After failing, I went back and tried with what I know and found success.

Is there a place that I can upload a document when I redo this for verification? Or can I just KCS the original post? As screen shots help in these cases, I will be using them. If there is a SME that would like to review I’ll happily work with them as well.

Regards from a warm potato and happy tater’n to y’all!

1 Like

For guides, please post on an external site and then post a link here. We will provide some feedback to your guide.

Thank you for your quick reply! Unfortunately I still can’t get it to work.
Your instructions worked fine. the dd command finished with the following output:

4668+0 records in
4668+0 records out
4894752768 bytes (4.9 GB, 4.6 GiB) copied, 74.6514 s, 65.6MB/s

I then:

  • powered down the board
  • removed the SD card (I am assuming this is the right thing to do at this point?)
  • powered the board back up

What I am getting is the regular start sequence. uboot interruption option first [which I do not interrupt] and then booting withe the following ouput:
** Booting bootflow ‘mmc@ff520000.bootdev.part_1’ with efi
Card did not respond to voltage select! : -110
Booting /efi\boot\bootaa64.efi

After that the boot seems to crash at different times. Sometimes the HDMI output stops alltogether, sometimes I get the Ubuntu load screen with the spinning wheel and the wheel stops spinning and then it just sits there forever, sometimes it seems to keep going for a while and then I get a bunch of text output that I don’t know what it means (see upload attached).
Since the behavior is not consistent it seems like something is unstable and leads to crashes at different times but I am not sure what to make of that or how to proceed.

I would like to get the emmc to work as performance should be much faster than with an SD card.

When I run from SD card the system seems a bit slow but generally stable, consistent and workable (it boots into the desktop environment and everything seems to generally work).

Do you have any tips what I can do to get this to work reliably with the emmc?

Oh I forgot to mention, I do have a CanaKit 5V 2.5A power supply. I read that too weak of a power supply could cause those issues but I don’t think this is the issue in this case as it works fine with the same power supply when booting from the SD card.

What is the output of journalctl -xb --no-pager?