Libre Computer Flash Tool

Libre Computer Flash Tool on GitHub

This tool is currently used to flash bootloaders onto MicroSD cards or eMMC modules exported as USB Flash drives.
sudo ./lft.sh bl-flash BOARD_MODEL BLOCK_DEVICE
Replace BOARD_MODEL with a model from ./lft.sh b-list
Replace BLOCK_DEVICE with a device from ./lft.sh dev-list
Please note that this tool may destroy GPT partitions so we recommend that you back up any valuable data on the target device.

Thanks for this. Thought I would just like to share my experience in the hope that it might help others. I did this with an AML-S905X-CC (V1)

  1. I used a MicroSD. I found that this procedure worked when the partition on the MicroSD was MBR.
  2. Mine worked when the MicroSD was completely blank. By that I mean that there was an MBR partition but it had not been formatted.
  3. Flash the blank MicroSD using the tool. Make sure you specify the right board in the flash command.
  4. You boot from the MicroSD card prepared by the tool and it then picks up the OS on your USB (in my case a mSata SSD in USB enclosure).
  5. If you want to migrate an installation you already have on a MicroSD, back it up with Win32DiskImager and restore to your USB.

Tip: If you are using an AML-S905X-CC the version is printed on the top of the board itself.

The only downside I’ve found is that the keyboard won’t respond at the actual command prompt. Not sure why. Might be power draw of the mSata. My feeling is that it unrelated to the actual booting process. Over SSH it’s fine.

It’s certainty much much snappier than using the MicroSD as the OS host, even over USB2.

Keyboard should work at the prompt. We use it all the time.

Hi, I checked further after the initial post. The issue was as expected. The mSata SSD I was using put too much of a strain on the power so there wasn’t enough to power the keyboard’s USB dongle.

I setup a regular USB and low and behold the wireless keyboard worked perfectly.

I’m sure a wired keyboard would have been fine.

The instruction indicate to specify the target board’s model:

./lft.sh board-list
aml-s905x-cc-v2
aml-s905x-cc
all-h3-cc-h5
all-h3-cc-h3
aml-s805x-ac
roc-rk3399-pc
roc-rk3328-cc

How do I know if my Potato aml-s905x-cc is version 2 or not?

If I get this wrong, what error message will I receive?

The board is marked as V1 or V2 on the PCB.
Note that V2 is a completely different product from V1 and is not for sale yet. We do not increment major numbers for revisions.

I have the aml-s905x-cc board. There is only one main device showing (mmcblk1) as my sd disk. When I try to flash, it says the the device is a not a valid target. Just a thought here and stupid question:

Do I have to flash the sdcard from another computer? What I have done is install raspian, run it on the libre, then try to get the flash tool flashed on that same sdcard from the same computer.

By default, the tool blocks you from overwriting your boot device in case of accident. You have to add force to the end to force it to flash the device.

Is there any known problem with the current roc-rk3328-cc bootloader? I only get a steady red light on the board after flashing. I’ve tried multiple microSD cards including ones that have tested working with ubuntu/raspbian images. Is there any particular way the card should be formated prior to flashing?

If using the flash tool for ROC-RK3328-CC, the green light will turn off after it found the bootloader. u-boot does not yet support video so you won’t get any HDMI output until you get to Linux. UART is helpful in this regard. HDMI support was recently completed but it will be another week or two before we fully integrate it.

Dave, thank you for your advice. I have a stupid question, how do you flash to an sd of you already have the os in the potato to be able to access and install the bootloader?