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 https://github.com/libre-computer-project/pyamlboot 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...
[DONE]
Writing ./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 ./pyamlboot/files/libretech-cc/u-boot.bin.usb.bl2 at 0xd9000000...
Traceback (most recent call last):
File "./pyamlboot/./boot.py", line 132, in <module>
usb.load_uboot()
File "./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 "./pyamlboot/./boot.py", line 63, in write_file
self.dev.writeLargeMemory(addr, b, large, fill)
File "./pyamlboot/pyamlboot/pyamlboot.py", line 241, in writeLargeMemory
self._writeLargeMemory(address+offset, data[offset:offset+writeLength], \
File "./pyamlboot/pyamlboot/pyamlboot.py", line 215, in _writeLargeMemory
self.dev.ctrl_transfer(bmRequestType = 0x40,
File "/root/.local/lib/python3.9/site-packages/usb/core.py", line 1082, in ctrl_transfer
ret = self._ctx.backend.ctrl_transfer(
File "/root/.local/lib/python3.9/site-packages/usb/backend/libusb1.py", line 893, in ctrl_transfer
ret = _check(self.lib.libusb_control_transfer(
File "/root/.local/lib/python3.9/site-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)
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 ./lft.sh board-emmc rebind
Thank you! The first method works well for me. Now I can use dd to copy my custom again images.