🛠 Boot SD/eMMC et récupération (pyamlboot) sur Amlogic S905X
Objectives
Understand the Amlogic boot chain (proprietary BL2/BL30/BL31 blobs + mainline U-Boot signed in FIP), install Armbian on microSD, flash the eMMC from a running system, and recover a non-booting board via USB bootrom and pyamlboot. Boot failures ("boot loop", "red + blue LED only") are the board's #1 support topic: bad SD card, weak power supply, or inconsistent image/bootloader mix.
Hardware
- Le Potato AML-S905X-CC (v1: micro-USB 5 V/2.5 A; weak power supply = silent hangs)
- Quality microSD card, Armbian "lepotato" image (dl.armbian.com/lepotato/)
- Optional eMMC module (no standalone eMMC boot path: flashing is mandatory from a running system, using the LEFT tool)
- USB cable for recovery, Linux PC
Full Code
# 1) Ecrire l'image Armbian sur la SD (bootloader U-Boot deja integre)
xzcat Armbian_*_Lepotato_*.img.xz | sudo dd of=/dev/sdX bs=4M status=progress conv=fsync
# Bootloader U-Boot construit a la main (doc officielle) : deux passes dd, offset 8 Ko
# dd if=u-boot.bin.sd.bin of=/dev/sdX conv=fsync,notrunc bs=512 skip=1 seek=1
# dd if=u-boot.bin.sd.bin of=/dev/sdX conv=fsync,notrunc bs=1 count=440
# 2) Depuis le systeme demarre : flasher l'eMMC puis installer
sudo apt install git && git clone https://github.com/libre-computer-project/libretech-emmc-flash-tool
cd libretech-emmc-flash-tool && sudo ./emmc-flash-tool # outil LEFT
sudo armbian-install
# 3) Recuperation : maintenir le bouton de boot puis brancher l'USB,
# le bootrom Amlogic apparait sur le bus USB :
sudo pip install pyamlboot
lsusb # appareil Amlogic visible = bootrom accessible
sudo ./boot-aarch64.sh # script pyamlboot : demarrer un noyau en RAM
Expected Verification
cat /proc/device-tree/compatible contains libretech,aml-s905x-cc amlogic,s905x amlogic,meson-gxl; in recovery mode, lsusb shows the Amlogic bootrom device before any action, and pyamlboot can load a kernel into memory.
Common Errors
- Mixing legacy "box" images (Android 3.14/4.9) with mainline: incompatible, no in-place updates;
installtointernalscripts break mainline boot. - Cheap SD card or marginal 5 V power supply: boot loop without error messages.
- Attempting to boot directly from eMMC: without prior flashing via LEFT, the eMMC has no standalone boot path.
- Overheating: the S905X gets hot without a heatsink — add a heatsink.
Other tutorials for this board
- Faire clignoter une LED en C avec libgpiod sur Le Potato
- Lire un bouton poussoir avec libgpiod (pull-up interne)
- GPIO en Python avec python3-libgpiod sur Le Potato
- Fondu LED progressif avec PWM sous sysfs (meson)
- Capteur BME280 (I2C) sur Le Potato : overlay et lecture
- Console série (ttyAML0) et SSH sur Le Potato
Code examples for this board
clignotante.pyPythonbouton-gpio.pyPythoncapteur-i2c.shBashsurveillance-temperature.shBashcapteur-dht11.pyPythonservo-pwm-sysfs.shBash