Amlogic

Amlogic Incorporated, or Amlogic (sometimes AMLogic) is a chip maker company which has its headquarters in the USA. They mainly operate in China.

They mainly produce SoCs suitable for use in set top boxes running either AOSP or Android TV, but also produce SoCs used in televisions.

-H variant
There's also a -H variant of some Amlogic SoCs (like the S905X, S812, etc), which merely include Dolby licenses, but otherwise they're the same as the non-H counterparts.

Boot process
Generally, the boot ROM (=BL1) of Amlogic-based devices either boot to:


 * SPI NOR
 * eMMC
 * NAND
 * an SD card
 * USB (via a custom protocol, please note that all Amlogic SoCs cannot boot from a USB stick)

You can force them to boot from an SD card or USB (via Amlogic's in-house protocol) by using a HDMI dongle. This is a suitable alternative for those who want to boot to an SD card without wiping everything else, and for devices that have a locked flash mode that would be bricked if the eMMC is wiped.

Most set-top boxes have U-Boot on the eMMC, which then (for some reason) looks for the following U-Boot scripts if a "multiboot" mode is triggered on either an SD card or a USB device (FAT32 boot partition!):

If it doesn't find either ones, it'll boot to Android.
 * (if using an Amlogic S8XX SoC. Not packaged.)
 * (if using an Amlogic S8XX SoC. Not packaged.)
 * (if using an Amlogic S8XX SoC. Not packaged.)

Triggering "multiboot" mode depends on the set-top box, but they generally have a button at the bottom or hidden inside the AV port. Press it while booting up.

We use this quirk to load a mainline U-Boot and then boot postmarketOS (see soc-amlogic-s905).

Sometimes, however, the "multiboot" mode isn't available on some devices or after some Android TV upgrades; that is the case for the Xiaomi Mi Box 3 (xiaomi-once), which doesn't have this feature unless you manually implement it in the U-Boot environment via the U-Boot shell (some devices may not give you the U-Boot shell).

Depending on the SoC family, what happens before U-Boot runs may differ; refer to their respective SoC page.

Amlogic USB Burning tool
The Amlogic USB Burning tool is Amlogic's proprietary flashing software. It's used to flash Amlogic devices by using Amlogic's in-house protocol. It only works on Microsoft Windows.

There's also another proprietary CLI tool from Amlogic called. It allows you to read the Amlogic SoC info, flash the firmware, temporarily boot firmware (u-boot) (just like ), extract the firmware and lock the flash mode with a password in the flash mode. It has a Microsoft Windows version and a GNU+Linux version.

Some other software is built around this CLI tool such as aml-linux-usb-burn, aml-usb-load-uboot and aml-flash-tool

pyamlboot
pyamlboot is an effort to reverse-engineer Amlogic's custom USB boot protocol. It allows you to boot any binary you want (depending on the device). Instructions on how to use it can be found on the GitHub page linked below.