How to Flash Firmware or Recover Firmware on Libre Computer AML Boards

Please note, these instructions are for boards starting with AML- ONLY!

Plug a USB cable into the board’s OTG port with the onboard button held to enter USB ROM mode.

Run the following:

sudo apt install dfu-util python3-usb
git clone https://github.com/libre-computer-project/pyamlboot.git
pyamlboot/run.sh BOARD firmware-update #replace BOARD with AML board model

For example:

pyamlboot$ ./run.sh aml-s905x-cc-v2 firmware-update
/usr/bin/dfu-util
--2025-07-09 10:37:38--  https://boot.libre.computer/ci/aml-s905x-cc-v2
Resolving boot.libre.computer (boot.libre.computer)... 2600:3c00::f03c:93ff:fea1:358c, 192.53.162.101
Connecting to boot.libre.computer (boot.libre.computer)|2600:3c00::f03c:93ff:fea1:358c|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 999424 (976K) [application/octet-stream]
Saving to: ‘/tmp/tmp.PupBxE9lIZ’

/tmp/tmp.PupBxE9lIZ                                              100%[==========================================================================================================================================================>] 976.00K  2.90MB/s    in 0.3s    

2025-07-09 10:37:39 (2.90 MB/s) - ‘/tmp/tmp.PupBxE9lIZ’ saved [999424/999424]

Using GX Family boot parameters
ROM: 2.4 Stage: 0.0
Writing /home/dxue/share/pyamlboot/files/aml-s905x-cc-v2/u-boot.bin.usb.bl2 at 0xd9000000...
[DONE]
Writing /home/dxue/share/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/dxue/share/pyamlboot/files/aml-s905x-cc-v2/u-boot.bin.usb.bl2 at 0xd9000000...
[DONE]
Writing /home/dxue/share/pyamlboot/files/usbbl2runpara_runfipimg.bin at 0xd900c000...
[DONE]
Writing /home/dxue/share/pyamlboot/files/aml-s905x-cc-v2/u-boot.bin.usb.tpl at 0x200c000...
[DONE]
Running at 0xd900c000...
[DONE]
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Waiting for device, exit with ctrl-C
Opening DFU capable USB device...
Device ID 1b8e:fada
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 4096
Copying data from PC to DFU device
Download	[=========================] 100%       999424 bytes
Download done.
DFU state(7) = dfuMANIFEST, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!
2 Likes

I have Alta Board, I have updated the firmware via Firmware Update. Should I follow both instruction? or one of them is enough?

They both download from the same source.

1 Like

I try to flash my sweet potato after brick but seems aml-s905x-cc-v2 not supported.

lag@lag-VM-dev:~/lab/TEST/pboot$ ./run.sh aml-s905x-cc-v2 firmware-update
/usr/bin/dfu-util
--2025-09-29 18:30:40--  https://boot.libre.computer/ci/aml-s905x-cc-v2-spi
Risoluzione di boot.libre.computer (boot.libre.computer)... 192.53.162.101, 2600:3c00::f03c:93ff:fea1:358c
Connessione a boot.libre.computer (boot.libre.computer)|192.53.162.101|:443... connesso.
Richiesta HTTP inviata, in attesa di risposta... 200 OK
Lunghezza: 1114112 (1,1M) [application/octet-stream]
Salvataggio in: ‘/tmp/tmp.F5DTRDPWpM’

/tmp/tmp.F5DTRDPWpM                                100%[================================================================================================================>]   1,06M  1,49MB/s    in 0,7s    

2025-09-29 18:30:41 (1,49 MB/s) - ‘/tmp/tmp.F5DTRDPWpM’ salvato [1114112/1114112]


usage: boot.py [-h] [--version] [--board-files UPATH] [--image IMAGEFILE] [--script SCRIPTFILE] [--fdt DTBFILE] [--ramfs RAMFSFILE] [--timeout TIMEOUT]
               {q200,libretech-s912-pc,khadas-vim,khadas-vim2,libretech-s905d-pc,p212,s400}
boot.py: error: argument board: invalid choice: 'aml-s905x-cc-v2' (choose from 'q200', 'libretech-s912-pc', 'khadas-vim', 'khadas-vim2', 'libretech-s905d-pc', 'p212', 's400')
lag@lag-VM-dev:~/lab/TEST/pboot$ 

How to solve this brick? (spi bootloader/firmware is corrupted)

LAG

Re-clone the repository with master-lc branch.